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 #define YYBISON 1
00045
00046
00047 #define YYBISON_VERSION "2.5"
00048
00049
00050 #define YYSKELETON_NAME "yacc.c"
00051
00052
00053 #define YYPURE 1
00054
00055
00056 #define YYPUSH 0
00057
00058
00059 #define YYPULL 1
00060
00061
00062 #define YYLSP_NEEDED 0
00063
00064
00065
00066
00067
00068
00069 #line 12 "ripper.y"
00070
00071
00072 #define YYDEBUG 1
00073 #define YYERROR_VERBOSE 1
00074 #define YYSTACK_USE_ALLOCA 0
00075
00076 #include "ruby/ruby.h"
00077 #include "ruby/st.h"
00078 #include "ruby/encoding.h"
00079 #include "internal.h"
00080 #include "node.h"
00081 #include "parse.h"
00082 #include "id.h"
00083 #include "regenc.h"
00084 #include <stdio.h>
00085 #include <errno.h>
00086 #include <ctype.h>
00087
00088 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
00089
00090 #define YYMALLOC(size) rb_parser_malloc(parser, (size))
00091 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size))
00092 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size))
00093 #define YYFREE(ptr) rb_parser_free(parser, (ptr))
00094 #define malloc YYMALLOC
00095 #define realloc YYREALLOC
00096 #define calloc YYCALLOC
00097 #define free YYFREE
00098
00099 #ifndef RIPPER
00100 static ID register_symid(ID, const char *, long, rb_encoding *);
00101 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc)
00102 #include "id.c"
00103 #endif
00104
00105 #define is_notop_id(id) ((id)>tLAST_TOKEN)
00106 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
00107 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
00108 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
00109 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
00110 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
00111 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
00112 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
00113
00114 #define is_asgn_or_id(id) ((is_notop_id(id)) && \
00115 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
00116 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
00117 ((id)&ID_SCOPE_MASK) == ID_CLASS))
00118
00119 enum lex_state_e {
00120 EXPR_BEG,
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 vtable *used;
00162 struct local_vars *prev;
00163 stack_type cmdargs;
00164 };
00165
00166 #define DVARS_INHERIT ((void*)1)
00167 #define DVARS_TOPSCOPE NULL
00168 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl))
00169 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3)
00170
00171 static int
00172 vtable_size(const struct vtable *tbl)
00173 {
00174 if (POINTER_P(tbl)) {
00175 return tbl->pos;
00176 }
00177 else {
00178 return 0;
00179 }
00180 }
00181
00182 #define VTBL_DEBUG 0
00183
00184 static struct vtable *
00185 vtable_alloc(struct vtable *prev)
00186 {
00187 struct vtable *tbl = ALLOC(struct vtable);
00188 tbl->pos = 0;
00189 tbl->capa = 8;
00190 tbl->tbl = ALLOC_N(ID, tbl->capa);
00191 tbl->prev = prev;
00192 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl);
00193 return tbl;
00194 }
00195
00196 static void
00197 vtable_free(struct vtable *tbl)
00198 {
00199 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl);
00200 if (POINTER_P(tbl)) {
00201 if (tbl->tbl) {
00202 xfree(tbl->tbl);
00203 }
00204 xfree(tbl);
00205 }
00206 }
00207
00208 static void
00209 vtable_add(struct vtable *tbl, ID id)
00210 {
00211 if (!POINTER_P(tbl)) {
00212 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl);
00213 }
00214 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id));
00215
00216 if (tbl->pos == tbl->capa) {
00217 tbl->capa = tbl->capa * 2;
00218 REALLOC_N(tbl->tbl, ID, tbl->capa);
00219 }
00220 tbl->tbl[tbl->pos++] = id;
00221 }
00222
00223 static int
00224 vtable_included(const struct vtable * tbl, ID id)
00225 {
00226 int i;
00227
00228 if (POINTER_P(tbl)) {
00229 for (i = 0; i < tbl->pos; i++) {
00230 if (tbl->tbl[i] == id) {
00231 return i+1;
00232 }
00233 }
00234 }
00235 return 0;
00236 }
00237
00238
00239 #ifndef RIPPER
00240 typedef struct token_info {
00241 const char *token;
00242 int linenum;
00243 int column;
00244 int nonspc;
00245 struct token_info *next;
00246 } token_info;
00247 #endif
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258 struct parser_params {
00259 int is_ripper;
00260 NODE *heap;
00261
00262 YYSTYPE *parser_yylval;
00263 VALUE eofp;
00264
00265 NODE *parser_lex_strterm;
00266 enum lex_state_e parser_lex_state;
00267 stack_type parser_cond_stack;
00268 stack_type parser_cmdarg_stack;
00269 int parser_class_nest;
00270 int parser_paren_nest;
00271 int parser_lpar_beg;
00272 int parser_in_single;
00273 int parser_in_def;
00274 int parser_compile_for_eval;
00275 VALUE parser_cur_mid;
00276 int parser_in_defined;
00277 char *parser_tokenbuf;
00278 int parser_tokidx;
00279 int parser_toksiz;
00280 VALUE parser_lex_input;
00281 VALUE parser_lex_lastline;
00282 VALUE parser_lex_nextline;
00283 const char *parser_lex_pbeg;
00284 const char *parser_lex_p;
00285 const char *parser_lex_pend;
00286 int parser_heredoc_end;
00287 int parser_command_start;
00288 NODE *parser_deferred_nodes;
00289 long parser_lex_gets_ptr;
00290 VALUE (*parser_lex_gets)(struct parser_params*,VALUE);
00291 struct local_vars *parser_lvtbl;
00292 int parser_ruby__end__seen;
00293 int line_count;
00294 int has_shebang;
00295 char *parser_ruby_sourcefile;
00296 int parser_ruby_sourceline;
00297 rb_encoding *enc;
00298 rb_encoding *utf8;
00299
00300 int parser_yydebug;
00301
00302 #ifndef RIPPER
00303
00304 NODE *parser_eval_tree_begin;
00305 NODE *parser_eval_tree;
00306 VALUE debug_lines;
00307 VALUE coverage;
00308 int nerr;
00309
00310 int parser_token_info_enabled;
00311 token_info *parser_token_info;
00312 #else
00313
00314 VALUE parser_ruby_sourcefile_string;
00315 const char *tokp;
00316 VALUE delayed;
00317 int delayed_line;
00318 int delayed_col;
00319
00320 VALUE value;
00321 VALUE result;
00322 VALUE parsing_thread;
00323 int toplevel_p;
00324 #endif
00325 };
00326
00327 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \
00328 (parser->utf8 = rb_utf8_encoding()))
00329 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc)
00330 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc)
00331 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc)
00332 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc)
00333 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT)
00334 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc)
00335
00336 static int parser_yyerror(struct parser_params*, const char*);
00337 #define yyerror(msg) parser_yyerror(parser, (msg))
00338
00339 #define lex_strterm (parser->parser_lex_strterm)
00340 #define lex_state (parser->parser_lex_state)
00341 #define cond_stack (parser->parser_cond_stack)
00342 #define cmdarg_stack (parser->parser_cmdarg_stack)
00343 #define class_nest (parser->parser_class_nest)
00344 #define paren_nest (parser->parser_paren_nest)
00345 #define lpar_beg (parser->parser_lpar_beg)
00346 #define in_single (parser->parser_in_single)
00347 #define in_def (parser->parser_in_def)
00348 #define compile_for_eval (parser->parser_compile_for_eval)
00349 #define cur_mid (parser->parser_cur_mid)
00350 #define in_defined (parser->parser_in_defined)
00351 #define tokenbuf (parser->parser_tokenbuf)
00352 #define tokidx (parser->parser_tokidx)
00353 #define toksiz (parser->parser_toksiz)
00354 #define lex_input (parser->parser_lex_input)
00355 #define lex_lastline (parser->parser_lex_lastline)
00356 #define lex_nextline (parser->parser_lex_nextline)
00357 #define lex_pbeg (parser->parser_lex_pbeg)
00358 #define lex_p (parser->parser_lex_p)
00359 #define lex_pend (parser->parser_lex_pend)
00360 #define heredoc_end (parser->parser_heredoc_end)
00361 #define command_start (parser->parser_command_start)
00362 #define deferred_nodes (parser->parser_deferred_nodes)
00363 #define lex_gets_ptr (parser->parser_lex_gets_ptr)
00364 #define lex_gets (parser->parser_lex_gets)
00365 #define lvtbl (parser->parser_lvtbl)
00366 #define ruby__end__seen (parser->parser_ruby__end__seen)
00367 #define ruby_sourceline (parser->parser_ruby_sourceline)
00368 #define ruby_sourcefile (parser->parser_ruby_sourcefile)
00369 #define current_enc (parser->enc)
00370 #define yydebug (parser->parser_yydebug)
00371 #ifdef RIPPER
00372 #else
00373 #define ruby_eval_tree (parser->parser_eval_tree)
00374 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin)
00375 #define ruby_debug_lines (parser->debug_lines)
00376 #define ruby_coverage (parser->coverage)
00377 #endif
00378
00379 #if YYPURE
00380 static int yylex(void*, void*);
00381 #else
00382 static int yylex(void*);
00383 #endif
00384
00385 #ifndef RIPPER
00386 #define yyparse ruby_yyparse
00387
00388 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE);
00389 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3))
00390
00391 static NODE *cond_gen(struct parser_params*,NODE*);
00392 #define cond(node) cond_gen(parser, (node))
00393 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*);
00394 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2))
00395
00396 static NODE *newline_node(NODE*);
00397 static void fixpos(NODE*,NODE*);
00398
00399 static int value_expr_gen(struct parser_params*,NODE*);
00400 static void void_expr_gen(struct parser_params*,NODE*);
00401 static NODE *remove_begin(NODE*);
00402 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
00403 #define void_expr0(node) void_expr_gen(parser, (node))
00404 #define void_expr(node) void_expr0((node) = remove_begin(node))
00405 static void void_stmts_gen(struct parser_params*,NODE*);
00406 #define void_stmts(node) void_stmts_gen(parser, (node))
00407 static void reduce_nodes_gen(struct parser_params*,NODE**);
00408 #define reduce_nodes(n) reduce_nodes_gen(parser,(n))
00409 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*);
00410 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2))
00411
00412 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*);
00413 #define block_append(h,t) block_append_gen(parser,(h),(t))
00414 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*);
00415 #define list_append(l,i) list_append_gen(parser,(l),(i))
00416 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*);
00417 #define list_concat(h,t) list_concat_gen(parser,(h),(t))
00418 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*);
00419 #define arg_append(h,t) arg_append_gen(parser,(h),(t))
00420 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*);
00421 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t))
00422 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*);
00423 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t))
00424 static int literal_concat0(struct parser_params *, VALUE, VALUE);
00425 static NODE *new_evstr_gen(struct parser_params*,NODE*);
00426 #define new_evstr(n) new_evstr_gen(parser,(n))
00427 static NODE *evstr2dstr_gen(struct parser_params*,NODE*);
00428 #define evstr2dstr(n) evstr2dstr_gen(parser,(n))
00429 static NODE *splat_array(NODE*);
00430
00431 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*);
00432 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1))
00433 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID);
00434 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id))
00435
00436 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID);
00437 #define new_args(f,o,r,p,b) new_args_gen(parser, (f),(o),(r),(p),(b))
00438
00439 static NODE *negate_lit(NODE*);
00440 static NODE *ret_args_gen(struct parser_params*,NODE*);
00441 #define ret_args(node) ret_args_gen(parser, (node))
00442 static NODE *arg_blk_pass(NODE*,NODE*);
00443 static NODE *new_yield_gen(struct parser_params*,NODE*);
00444 #define new_yield(node) new_yield_gen(parser, (node))
00445
00446 static NODE *gettable_gen(struct parser_params*,ID);
00447 #define gettable(id) gettable_gen(parser,(id))
00448 static NODE *assignable_gen(struct parser_params*,ID,NODE*);
00449 #define assignable(id,node) assignable_gen(parser, (id), (node))
00450
00451 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*);
00452 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2))
00453 static NODE *attrset_gen(struct parser_params*,NODE*,ID);
00454 #define attrset(node,id) attrset_gen(parser, (node), (id))
00455
00456 static void rb_backref_error_gen(struct parser_params*,NODE*);
00457 #define rb_backref_error(n) rb_backref_error_gen(parser,(n))
00458 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*);
00459 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2))
00460
00461 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*);
00462 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2))
00463
00464 static ID *local_tbl_gen(struct parser_params*);
00465 #define local_tbl() local_tbl_gen(parser)
00466
00467 static void fixup_nodes(NODE **);
00468
00469 static VALUE reg_compile_gen(struct parser_params*, VALUE, int);
00470 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options))
00471 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int);
00472 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options))
00473 static int reg_fragment_check_gen(struct parser_params*, VALUE, int);
00474 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options))
00475 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match);
00476 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match))
00477
00478 #define get_id(id) (id)
00479 #define get_value(val) (val)
00480 #else
00481 #define remove_begin(node) (node)
00482 #define rb_dvar_defined(id) 0
00483 #define rb_local_defined(id) 0
00484 static ID ripper_get_id(VALUE);
00485 #define get_id(id) ripper_get_id(id)
00486 static VALUE ripper_get_value(VALUE);
00487 #define get_value(val) ripper_get_value(val)
00488 static VALUE assignable_gen(struct parser_params*,VALUE);
00489 #define assignable(lhs,node) assignable_gen(parser, (lhs))
00490 static int id_is_var_gen(struct parser_params *parser, ID id);
00491 #define id_is_var(id) id_is_var_gen(parser, (id))
00492 #endif
00493
00494 static ID formal_argument_gen(struct parser_params*, ID);
00495 #define formal_argument(id) formal_argument_gen(parser, (id))
00496 static ID shadowing_lvar_gen(struct parser_params*,ID);
00497 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name))
00498 static void new_bv_gen(struct parser_params*,ID);
00499 #define new_bv(id) new_bv_gen(parser, (id))
00500
00501 static void local_push_gen(struct parser_params*,int);
00502 #define local_push(top) local_push_gen(parser,(top))
00503 static void local_pop_gen(struct parser_params*);
00504 #define local_pop() local_pop_gen(parser)
00505 static int local_var_gen(struct parser_params*, ID);
00506 #define local_var(id) local_var_gen(parser, (id));
00507 static int arg_var_gen(struct parser_params*, ID);
00508 #define arg_var(id) arg_var_gen(parser, (id))
00509 static int local_id_gen(struct parser_params*, ID);
00510 #define local_id(id) local_id_gen(parser, (id))
00511 static ID internal_id_gen(struct parser_params*);
00512 #define internal_id() internal_id_gen(parser)
00513
00514 static const struct vtable *dyna_push_gen(struct parser_params *);
00515 #define dyna_push() dyna_push_gen(parser)
00516 static void dyna_pop_gen(struct parser_params*, const struct vtable *);
00517 #define dyna_pop(node) dyna_pop_gen(parser, (node))
00518 static int dyna_in_block_gen(struct parser_params*);
00519 #define dyna_in_block() dyna_in_block_gen(parser)
00520 #define dyna_var(id) local_var(id)
00521 static int dvar_defined_gen(struct parser_params*,ID,int);
00522 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0)
00523 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1)
00524 static int dvar_curr_gen(struct parser_params*,ID);
00525 #define dvar_curr(id) dvar_curr_gen(parser, (id))
00526
00527 static int lvar_defined_gen(struct parser_params*, ID);
00528 #define lvar_defined(id) lvar_defined_gen(parser, (id))
00529
00530 #define RE_OPTION_ONCE (1<<16)
00531 #define RE_OPTION_ENCODING_SHIFT 8
00532 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
00533 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
00534 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
00535 #define RE_OPTION_MASK 0xff
00536 #define RE_OPTION_ARG_ENCODING_NONE 32
00537
00538 #define NODE_STRTERM NODE_ZARRAY
00539 #define NODE_HEREDOC NODE_ARRAY
00540 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
00541 #define nd_func u1.id
00542 #if SIZEOF_SHORT == 2
00543 #define nd_term(node) ((signed short)(node)->u2.id)
00544 #else
00545 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
00546 #endif
00547 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
00548 #define nd_nest u3.cnt
00549
00550
00551
00552 #ifdef RIPPER
00553 #define RIPPER_VERSION "0.1.0"
00554
00555 #include "eventids1.c"
00556 #include "eventids2.c"
00557 static ID ripper_id_gets;
00558
00559 static VALUE ripper_dispatch0(struct parser_params*,ID);
00560 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
00561 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
00562 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
00563 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
00564 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
00565
00566 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
00567 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a))
00568 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b))
00569 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
00570 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
00571 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
00572
00573 #define yyparse ripper_yyparse
00574
00575 #define ripper_intern(s) ID2SYM(rb_intern(s))
00576 static VALUE ripper_id2sym(ID);
00577 #ifdef __GNUC__
00578 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \
00579 ID2SYM(id) : ripper_id2sym(id))
00580 #endif
00581
00582 #define arg_new() dispatch0(args_new)
00583 #define arg_add(l,a) dispatch2(args_add, (l), (a))
00584 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a))
00585 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b))
00586 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b)))
00587 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v))
00588 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b))
00589
00590 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a))
00591 #define mrhs_new() dispatch0(mrhs_new)
00592 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a))
00593 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a))
00594
00595 #define mlhs_new() dispatch0(mlhs_new)
00596 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a))
00597 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a))
00598
00599 #define params_new(pars, opts, rest, pars2, blk) \
00600 dispatch5(params, (pars), (opts), (rest), (pars2), (blk))
00601
00602 #define blockvar_new(p,v) dispatch2(block_var, (p), (v))
00603 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a))
00604 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a))
00605
00606 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a)))
00607 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a))
00608 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b))
00609
00610 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
00611
00612 #define FIXME 0
00613
00614 #endif
00615
00616 #ifndef RIPPER
00617 # define ifndef_ripper(x) (x)
00618 #else
00619 # define ifndef_ripper(x)
00620 #endif
00621
00622 #ifndef RIPPER
00623 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt))
00624 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
00625 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
00626 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt))
00627 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a))
00628 #else
00629 # define rb_warn0(fmt) ripper_warn0(parser, (fmt))
00630 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a))
00631 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a))
00632 # define rb_warning0(fmt) ripper_warning0(parser, (fmt))
00633 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a))
00634 static void ripper_warn0(struct parser_params*, const char*);
00635 static void ripper_warnI(struct parser_params*, const char*, int);
00636 #if 0
00637 static void ripper_warnS(struct parser_params*, const char*, const char*);
00638 #endif
00639 static void ripper_warning0(struct parser_params*, const char*);
00640 static void ripper_warningS(struct parser_params*, const char*, const char*);
00641 #endif
00642
00643 #ifdef RIPPER
00644 static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
00645 # define rb_compile_error ripper_compile_error
00646 # define compile_error ripper_compile_error
00647 # define PARSER_ARG parser,
00648 #else
00649 # define rb_compile_error rb_compile_error_with_enc
00650 # define compile_error parser->nerr++,rb_compile_error_with_enc
00651 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc,
00652 #endif
00653
00654
00655
00656
00657 #ifdef OLD_YACC
00658 #ifndef YYMAXDEPTH
00659 #define YYMAXDEPTH 10000
00660 #endif
00661 #endif
00662
00663 #ifndef RIPPER
00664 static void token_info_push(struct parser_params*, const char *token);
00665 static void token_info_pop(struct parser_params*, const char *token);
00666 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0)
00667 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0)
00668 #else
00669 #define token_info_push(token)
00670 #define token_info_pop(token)
00671 #endif
00672
00673
00674
00675 #line 676 "parse.c"
00676
00677
00678 #ifndef YYDEBUG
00679 # define YYDEBUG 1
00680 #endif
00681
00682
00683 #ifdef YYERROR_VERBOSE
00684 # undef YYERROR_VERBOSE
00685 # define YYERROR_VERBOSE 1
00686 #else
00687 # define YYERROR_VERBOSE 0
00688 #endif
00689
00690
00691 #ifndef YYTOKEN_TABLE
00692 # define YYTOKEN_TABLE 0
00693 #endif
00694
00695
00696
00697 #ifndef YYTOKENTYPE
00698 # define YYTOKENTYPE
00699
00700
00701 enum yytokentype {
00702 keyword_class = 258,
00703 keyword_module = 259,
00704 keyword_def = 260,
00705 keyword_undef = 261,
00706 keyword_begin = 262,
00707 keyword_rescue = 263,
00708 keyword_ensure = 264,
00709 keyword_end = 265,
00710 keyword_if = 266,
00711 keyword_unless = 267,
00712 keyword_then = 268,
00713 keyword_elsif = 269,
00714 keyword_else = 270,
00715 keyword_case = 271,
00716 keyword_when = 272,
00717 keyword_while = 273,
00718 keyword_until = 274,
00719 keyword_for = 275,
00720 keyword_break = 276,
00721 keyword_next = 277,
00722 keyword_redo = 278,
00723 keyword_retry = 279,
00724 keyword_in = 280,
00725 keyword_do = 281,
00726 keyword_do_cond = 282,
00727 keyword_do_block = 283,
00728 keyword_do_LAMBDA = 284,
00729 keyword_return = 285,
00730 keyword_yield = 286,
00731 keyword_super = 287,
00732 keyword_self = 288,
00733 keyword_nil = 289,
00734 keyword_true = 290,
00735 keyword_false = 291,
00736 keyword_and = 292,
00737 keyword_or = 293,
00738 keyword_not = 294,
00739 modifier_if = 295,
00740 modifier_unless = 296,
00741 modifier_while = 297,
00742 modifier_until = 298,
00743 modifier_rescue = 299,
00744 keyword_alias = 300,
00745 keyword_defined = 301,
00746 keyword_BEGIN = 302,
00747 keyword_END = 303,
00748 keyword__LINE__ = 304,
00749 keyword__FILE__ = 305,
00750 keyword__ENCODING__ = 306,
00751 tIDENTIFIER = 307,
00752 tFID = 308,
00753 tGVAR = 309,
00754 tIVAR = 310,
00755 tCONSTANT = 311,
00756 tCVAR = 312,
00757 tLABEL = 313,
00758 tINTEGER = 314,
00759 tFLOAT = 315,
00760 tSTRING_CONTENT = 316,
00761 tCHAR = 317,
00762 tNTH_REF = 318,
00763 tBACK_REF = 319,
00764 tREGEXP_END = 320,
00765 tUPLUS = 321,
00766 tUMINUS = 322,
00767 tPOW = 323,
00768 tCMP = 324,
00769 tEQ = 325,
00770 tEQQ = 326,
00771 tNEQ = 327,
00772 tGEQ = 328,
00773 tLEQ = 329,
00774 tANDOP = 330,
00775 tOROP = 331,
00776 tMATCH = 332,
00777 tNMATCH = 333,
00778 tDOT2 = 334,
00779 tDOT3 = 335,
00780 tAREF = 336,
00781 tASET = 337,
00782 tLSHFT = 338,
00783 tRSHFT = 339,
00784 tCOLON2 = 340,
00785 tCOLON3 = 341,
00786 tOP_ASGN = 342,
00787 tASSOC = 343,
00788 tLPAREN = 344,
00789 tLPAREN_ARG = 345,
00790 tRPAREN = 346,
00791 tLBRACK = 347,
00792 tLBRACE = 348,
00793 tLBRACE_ARG = 349,
00794 tSTAR = 350,
00795 tAMPER = 351,
00796 tLAMBDA = 352,
00797 tSYMBEG = 353,
00798 tSTRING_BEG = 354,
00799 tXSTRING_BEG = 355,
00800 tREGEXP_BEG = 356,
00801 tWORDS_BEG = 357,
00802 tQWORDS_BEG = 358,
00803 tSTRING_DBEG = 359,
00804 tSTRING_DVAR = 360,
00805 tSTRING_END = 361,
00806 tLAMBEG = 362,
00807 tLOWEST = 363,
00808 tUMINUS_NUM = 364,
00809 idNULL = 365,
00810 idRespond_to = 366,
00811 idIFUNC = 367,
00812 idCFUNC = 368,
00813 id_core_set_method_alias = 369,
00814 id_core_set_variable_alias = 370,
00815 id_core_undef_method = 371,
00816 id_core_define_method = 372,
00817 id_core_define_singleton_method = 373,
00818 id_core_set_postexe = 374,
00819 tLAST_TOKEN = 375
00820 };
00821 #endif
00822
00823
00824
00825 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00826 typedef union YYSTYPE
00827 {
00828
00829
00830 #line 620 "ripper.y"
00831
00832 VALUE val;
00833 NODE *node;
00834 ID id;
00835 int num;
00836 const struct vtable *vars;
00837
00838
00839
00840
00841 #line 842 "parse.c"
00842 } YYSTYPE;
00843 # define YYSTYPE_IS_TRIVIAL 1
00844 # define yystype YYSTYPE
00845 # define YYSTYPE_IS_DECLARED 1
00846 #endif
00847
00848
00849
00850
00851
00852
00853 #line 854 "parse.c"
00854
00855 #ifdef short
00856 # undef short
00857 #endif
00858
00859 #ifdef YYTYPE_UINT8
00860 typedef YYTYPE_UINT8 yytype_uint8;
00861 #else
00862 typedef unsigned char yytype_uint8;
00863 #endif
00864
00865 #ifdef YYTYPE_INT8
00866 typedef YYTYPE_INT8 yytype_int8;
00867 #elif (defined __STDC__ || defined __C99__FUNC__ \
00868 || defined __cplusplus || defined _MSC_VER)
00869 typedef signed char yytype_int8;
00870 #else
00871 typedef short int yytype_int8;
00872 #endif
00873
00874 #ifdef YYTYPE_UINT16
00875 typedef YYTYPE_UINT16 yytype_uint16;
00876 #else
00877 typedef unsigned short int yytype_uint16;
00878 #endif
00879
00880 #ifdef YYTYPE_INT16
00881 typedef YYTYPE_INT16 yytype_int16;
00882 #else
00883 typedef short int yytype_int16;
00884 #endif
00885
00886 #ifndef YYSIZE_T
00887 # ifdef __SIZE_TYPE__
00888 # define YYSIZE_T __SIZE_TYPE__
00889 # elif defined size_t
00890 # define YYSIZE_T size_t
00891 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00892 || defined __cplusplus || defined _MSC_VER)
00893 # include <stddef.h>
00894 # define YYSIZE_T size_t
00895 # else
00896 # define YYSIZE_T unsigned int
00897 # endif
00898 #endif
00899
00900 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00901
00902 #ifndef YY_
00903 # if defined YYENABLE_NLS && YYENABLE_NLS
00904 # if ENABLE_NLS
00905 # include <libintl.h>
00906 # define YY_(msgid) dgettext ("bison-runtime", msgid)
00907 # endif
00908 # endif
00909 # ifndef YY_
00910 # define YY_(msgid) msgid
00911 # endif
00912 #endif
00913
00914
00915 #if ! defined lint || defined __GNUC__
00916 # define YYUSE(e) ((void) (e))
00917 #else
00918 # define YYUSE(e)
00919 #endif
00920
00921
00922 #ifndef lint
00923 # define YYID(n) (n)
00924 #else
00925 #if (defined __STDC__ || defined __C99__FUNC__ \
00926 || defined __cplusplus || defined _MSC_VER)
00927 static int
00928 YYID (int yyi)
00929 #else
00930 static int
00931 YYID (yyi)
00932 int yyi;
00933 #endif
00934 {
00935 return yyi;
00936 }
00937 #endif
00938
00939 #if ! defined yyoverflow || YYERROR_VERBOSE
00940
00941
00942
00943 # ifdef YYSTACK_USE_ALLOCA
00944 # if YYSTACK_USE_ALLOCA
00945 # ifdef __GNUC__
00946 # define YYSTACK_ALLOC __builtin_alloca
00947 # elif defined __BUILTIN_VA_ARG_INCR
00948 # include <alloca.h>
00949 # elif defined _AIX
00950 # define YYSTACK_ALLOC __alloca
00951 # elif defined _MSC_VER
00952 # include <malloc.h>
00953 # define alloca _alloca
00954 # else
00955 # define YYSTACK_ALLOC alloca
00956 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
00957 || defined __cplusplus || defined _MSC_VER)
00958 # include <stdlib.h>
00959 # ifndef EXIT_SUCCESS
00960 # define EXIT_SUCCESS 0
00961 # endif
00962 # endif
00963 # endif
00964 # endif
00965 # endif
00966
00967 # ifdef YYSTACK_ALLOC
00968
00969 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
00970 # ifndef YYSTACK_ALLOC_MAXIMUM
00971
00972
00973
00974
00975 # define YYSTACK_ALLOC_MAXIMUM 4032
00976 # endif
00977 # else
00978 # define YYSTACK_ALLOC YYMALLOC
00979 # define YYSTACK_FREE YYFREE
00980 # ifndef YYSTACK_ALLOC_MAXIMUM
00981 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00982 # endif
00983 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
00984 && ! ((defined YYMALLOC || defined malloc) \
00985 && (defined YYFREE || defined free)))
00986 # include <stdlib.h>
00987 # ifndef EXIT_SUCCESS
00988 # define EXIT_SUCCESS 0
00989 # endif
00990 # endif
00991 # ifndef YYMALLOC
00992 # define YYMALLOC malloc
00993 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
00994 || defined __cplusplus || defined _MSC_VER)
00995 void *malloc (YYSIZE_T);
00996 # endif
00997 # endif
00998 # ifndef YYFREE
00999 # define YYFREE free
01000 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
01001 || defined __cplusplus || defined _MSC_VER)
01002 void free (void *);
01003 # endif
01004 # endif
01005 # endif
01006 #endif
01007
01008
01009 #if (! defined yyoverflow \
01010 && (! defined __cplusplus \
01011 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
01012
01013
01014 union yyalloc
01015 {
01016 yytype_int16 yyss_alloc;
01017 YYSTYPE yyvs_alloc;
01018 };
01019
01020
01021 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
01022
01023
01024
01025 # define YYSTACK_BYTES(N) \
01026 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
01027 + YYSTACK_GAP_MAXIMUM)
01028
01029 # define YYCOPY_NEEDED 1
01030
01031
01032
01033
01034
01035
01036 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
01037 do \
01038 { \
01039 YYSIZE_T yynewbytes; \
01040 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
01041 Stack = &yyptr->Stack_alloc; \
01042 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
01043 yyptr += yynewbytes / sizeof (*yyptr); \
01044 } \
01045 while (YYID (0))
01046
01047 #endif
01048
01049 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
01050
01051
01052 # ifndef YYCOPY
01053 # if defined __GNUC__ && 1 < __GNUC__
01054 # define YYCOPY(To, From, Count) \
01055 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
01056 # else
01057 # define YYCOPY(To, From, Count) \
01058 do \
01059 { \
01060 YYSIZE_T yyi; \
01061 for (yyi = 0; yyi < (Count); yyi++) \
01062 (To)[yyi] = (From)[yyi]; \
01063 } \
01064 while (YYID (0))
01065 # endif
01066 # endif
01067 #endif
01068
01069
01070 #define YYFINAL 3
01071
01072 #define YYLAST 10748
01073
01074
01075 #define YYNTOKENS 148
01076
01077 #define YYNNTS 174
01078
01079 #define YYNRULES 573
01080
01081 #define YYNSTATES 991
01082
01083
01084 #define YYUNDEFTOK 2
01085 #define YYMAXUTOK 375
01086
01087 #define YYTRANSLATE(YYX) \
01088 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
01089
01090
01091 static const yytype_uint8 yytranslate[] =
01092 {
01093 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01094 147, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01095 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01096 2, 2, 146, 123, 2, 2, 2, 121, 116, 2,
01097 142, 143, 119, 117, 140, 118, 139, 120, 2, 2,
01098 2, 2, 2, 2, 2, 2, 2, 2, 111, 145,
01099 113, 109, 112, 110, 2, 2, 2, 2, 2, 2,
01100 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01102 2, 138, 2, 144, 115, 2, 141, 2, 2, 2,
01103 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01104 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01105 2, 2, 2, 136, 114, 137, 124, 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, 2, 2, 2, 2,
01117 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01118 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
01119 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
01120 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
01121 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
01122 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
01123 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
01124 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
01125 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
01126 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
01127 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
01128 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
01129 105, 106, 107, 108, 122, 125, 126, 127, 128, 129,
01130 130, 131, 132, 133, 134, 135
01131 };
01132
01133 #if YYDEBUG
01134
01135
01136 static const yytype_uint16 yyprhs[] =
01137 {
01138 0, 0, 3, 4, 7, 10, 12, 14, 18, 21,
01139 23, 24, 30, 35, 38, 40, 42, 46, 49, 50,
01140 55, 59, 63, 67, 70, 74, 78, 82, 86, 90,
01141 95, 97, 101, 105, 112, 118, 124, 130, 136, 140,
01142 144, 148, 152, 154, 158, 162, 164, 168, 172, 176,
01143 179, 181, 183, 185, 187, 189, 194, 199, 200, 206,
01144 209, 213, 218, 224, 229, 235, 238, 241, 244, 247,
01145 250, 252, 256, 258, 262, 264, 267, 271, 277, 280,
01146 285, 288, 293, 295, 299, 301, 305, 308, 312, 314,
01147 318, 320, 322, 327, 331, 335, 339, 343, 346, 348,
01148 350, 352, 357, 361, 365, 369, 373, 376, 378, 380,
01149 382, 385, 387, 391, 393, 395, 397, 399, 401, 403,
01150 405, 407, 409, 411, 412, 417, 419, 421, 423, 425,
01151 427, 429, 431, 433, 435, 437, 439, 441, 443, 445,
01152 447, 449, 451, 453, 455, 457, 459, 461, 463, 465,
01153 467, 469, 471, 473, 475, 477, 479, 481, 483, 485,
01154 487, 489, 491, 493, 495, 497, 499, 501, 503, 505,
01155 507, 509, 511, 513, 515, 517, 519, 521, 523, 525,
01156 527, 529, 531, 533, 535, 537, 539, 541, 543, 545,
01157 547, 549, 551, 553, 555, 557, 561, 567, 571, 577,
01158 584, 590, 596, 602, 608, 613, 617, 621, 625, 629,
01159 633, 637, 641, 645, 649, 654, 659, 662, 665, 669,
01160 673, 677, 681, 685, 689, 693, 697, 701, 705, 709,
01161 713, 717, 720, 723, 727, 731, 735, 739, 740, 745,
01162 752, 754, 756, 758, 761, 766, 769, 773, 775, 777,
01163 779, 781, 784, 789, 792, 794, 797, 800, 805, 807,
01164 808, 811, 814, 817, 819, 821, 824, 828, 833, 837,
01165 842, 845, 847, 849, 851, 853, 855, 857, 859, 861,
01166 863, 864, 869, 870, 875, 879, 883, 886, 890, 894,
01167 896, 901, 905, 907, 908, 915, 920, 924, 927, 929,
01168 932, 935, 942, 949, 950, 951, 959, 960, 961, 969,
01169 975, 980, 981, 982, 992, 993, 1000, 1001, 1002, 1011,
01170 1012, 1018, 1019, 1026, 1027, 1028, 1038, 1040, 1042, 1044,
01171 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064,
01172 1066, 1068, 1070, 1072, 1074, 1077, 1079, 1081, 1083, 1089,
01173 1091, 1094, 1096, 1098, 1100, 1104, 1106, 1110, 1112, 1117,
01174 1124, 1128, 1134, 1137, 1142, 1144, 1148, 1155, 1164, 1169,
01175 1176, 1181, 1184, 1191, 1194, 1199, 1206, 1209, 1214, 1217,
01176 1222, 1224, 1226, 1228, 1232, 1234, 1239, 1241, 1244, 1246,
01177 1250, 1252, 1254, 1255, 1256, 1261, 1266, 1268, 1272, 1276,
01178 1277, 1283, 1286, 1291, 1296, 1299, 1304, 1309, 1313, 1317,
01179 1321, 1324, 1326, 1331, 1332, 1338, 1339, 1345, 1351, 1353,
01180 1355, 1362, 1364, 1366, 1368, 1370, 1373, 1375, 1378, 1380,
01181 1382, 1384, 1386, 1388, 1390, 1392, 1395, 1399, 1403, 1407,
01182 1411, 1415, 1416, 1420, 1422, 1425, 1429, 1433, 1434, 1438,
01183 1439, 1442, 1443, 1446, 1447, 1450, 1452, 1453, 1457, 1458,
01184 1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1480, 1482,
01185 1484, 1488, 1490, 1492, 1495, 1498, 1500, 1502, 1504, 1506,
01186 1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526,
01187 1528, 1530, 1532, 1534, 1536, 1537, 1542, 1545, 1549, 1552,
01188 1559, 1568, 1573, 1580, 1585, 1592, 1595, 1600, 1607, 1610,
01189 1615, 1618, 1623, 1625, 1626, 1628, 1630, 1632, 1634, 1636,
01190 1638, 1640, 1644, 1646, 1650, 1654, 1658, 1660, 1664, 1666,
01191 1670, 1672, 1674, 1677, 1679, 1681, 1683, 1686, 1689, 1691,
01192 1693, 1694, 1699, 1701, 1704, 1706, 1710, 1714, 1717, 1719,
01193 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739,
01194 1741, 1742, 1744, 1745, 1747, 1750, 1753, 1754, 1756, 1758,
01195 1760, 1762, 1764, 1767
01196 };
01197
01198
01199 static const yytype_int16 yyrhs[] =
01200 {
01201 149, 0, -1, -1, 150, 151, -1, 152, 314, -1,
01202 321, -1, 153, -1, 152, 320, 153, -1, 1, 153,
01203 -1, 158, -1, -1, 47, 154, 136, 151, 137, -1,
01204 156, 256, 231, 259, -1, 157, 314, -1, 321, -1,
01205 158, -1, 157, 320, 158, -1, 1, 158, -1, -1,
01206 45, 180, 159, 180, -1, 45, 54, 54, -1, 45,
01207 54, 64, -1, 45, 54, 63, -1, 6, 181, -1,
01208 158, 40, 162, -1, 158, 41, 162, -1, 158, 42,
01209 162, -1, 158, 43, 162, -1, 158, 44, 158, -1,
01210 48, 136, 156, 137, -1, 160, -1, 168, 109, 163,
01211 -1, 286, 87, 163, -1, 216, 138, 191, 317, 87,
01212 163, -1, 216, 139, 52, 87, 163, -1, 216, 139,
01213 56, 87, 163, -1, 216, 85, 56, 87, 163, -1,
01214 216, 85, 52, 87, 163, -1, 287, 87, 163, -1,
01215 175, 109, 198, -1, 168, 109, 187, -1, 168, 109,
01216 198, -1, 161, -1, 175, 109, 163, -1, 175, 109,
01217 160, -1, 163, -1, 161, 37, 161, -1, 161, 38,
01218 161, -1, 39, 315, 161, -1, 123, 163, -1, 185,
01219 -1, 161, -1, 167, -1, 164, -1, 249, -1, 249,
01220 139, 311, 193, -1, 249, 85, 311, 193, -1, -1,
01221 94, 166, 237, 156, 137, -1, 310, 193, -1, 310,
01222 193, 165, -1, 216, 139, 311, 193, -1, 216, 139,
01223 311, 193, 165, -1, 216, 85, 311, 193, -1, 216,
01224 85, 311, 193, 165, -1, 32, 193, -1, 31, 193,
01225 -1, 30, 192, -1, 21, 192, -1, 22, 192, -1,
01226 170, -1, 89, 169, 316, -1, 170, -1, 89, 169,
01227 316, -1, 172, -1, 172, 171, -1, 172, 95, 174,
01228 -1, 172, 95, 174, 140, 173, -1, 172, 95, -1,
01229 172, 95, 140, 173, -1, 95, 174, -1, 95, 174,
01230 140, 173, -1, 95, -1, 95, 140, 173, -1, 174,
01231 -1, 89, 169, 316, -1, 171, 140, -1, 172, 171,
01232 140, -1, 171, -1, 173, 140, 171, -1, 283, -1,
01233 284, -1, 216, 138, 191, 317, -1, 216, 139, 52,
01234 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216,
01235 85, 56, -1, 86, 56, -1, 287, -1, 283, -1,
01236 284, -1, 216, 138, 191, 317, -1, 216, 139, 52,
01237 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216,
01238 85, 56, -1, 86, 56, -1, 287, -1, 52, -1,
01239 56, -1, 86, 176, -1, 176, -1, 216, 85, 176,
01240 -1, 52, -1, 56, -1, 53, -1, 183, -1, 184,
01241 -1, 178, -1, 279, -1, 179, -1, 281, -1, 180,
01242 -1, -1, 181, 140, 182, 180, -1, 114, -1, 115,
01243 -1, 116, -1, 69, -1, 70, -1, 71, -1, 77,
01244 -1, 78, -1, 112, -1, 73, -1, 113, -1, 74,
01245 -1, 72, -1, 83, -1, 84, -1, 117, -1, 118,
01246 -1, 119, -1, 95, -1, 120, -1, 121, -1, 68,
01247 -1, 123, -1, 124, -1, 66, -1, 67, -1, 81,
01248 -1, 82, -1, 141, -1, 49, -1, 50, -1, 51,
01249 -1, 47, -1, 48, -1, 45, -1, 37, -1, 7,
01250 -1, 21, -1, 16, -1, 3, -1, 5, -1, 46,
01251 -1, 26, -1, 15, -1, 14, -1, 10, -1, 9,
01252 -1, 36, -1, 20, -1, 25, -1, 4, -1, 22,
01253 -1, 34, -1, 39, -1, 38, -1, 23, -1, 8,
01254 -1, 24, -1, 30, -1, 33, -1, 32, -1, 13,
01255 -1, 35, -1, 6, -1, 17, -1, 31, -1, 11,
01256 -1, 12, -1, 18, -1, 19, -1, 175, 109, 185,
01257 -1, 175, 109, 185, 44, 185, -1, 286, 87, 185,
01258 -1, 286, 87, 185, 44, 185, -1, 216, 138, 191,
01259 317, 87, 185, -1, 216, 139, 52, 87, 185, -1,
01260 216, 139, 56, 87, 185, -1, 216, 85, 52, 87,
01261 185, -1, 216, 85, 56, 87, 185, -1, 86, 56,
01262 87, 185, -1, 287, 87, 185, -1, 185, 79, 185,
01263 -1, 185, 80, 185, -1, 185, 117, 185, -1, 185,
01264 118, 185, -1, 185, 119, 185, -1, 185, 120, 185,
01265 -1, 185, 121, 185, -1, 185, 68, 185, -1, 122,
01266 59, 68, 185, -1, 122, 60, 68, 185, -1, 66,
01267 185, -1, 67, 185, -1, 185, 114, 185, -1, 185,
01268 115, 185, -1, 185, 116, 185, -1, 185, 69, 185,
01269 -1, 185, 112, 185, -1, 185, 73, 185, -1, 185,
01270 113, 185, -1, 185, 74, 185, -1, 185, 70, 185,
01271 -1, 185, 71, 185, -1, 185, 72, 185, -1, 185,
01272 77, 185, -1, 185, 78, 185, -1, 123, 185, -1,
01273 124, 185, -1, 185, 83, 185, -1, 185, 84, 185,
01274 -1, 185, 75, 185, -1, 185, 76, 185, -1, -1,
01275 46, 315, 186, 185, -1, 185, 110, 185, 315, 111,
01276 185, -1, 199, -1, 185, -1, 321, -1, 197, 318,
01277 -1, 197, 140, 308, 318, -1, 308, 318, -1, 142,
01278 191, 316, -1, 321, -1, 189, -1, 321, -1, 192,
01279 -1, 197, 140, -1, 197, 140, 308, 140, -1, 308,
01280 140, -1, 167, -1, 197, 196, -1, 308, 196, -1,
01281 197, 140, 308, 196, -1, 195, -1, -1, 194, 192,
01282 -1, 96, 187, -1, 140, 195, -1, 321, -1, 187,
01283 -1, 95, 187, -1, 197, 140, 187, -1, 197, 140,
01284 95, 187, -1, 197, 140, 187, -1, 197, 140, 95,
01285 187, -1, 95, 187, -1, 260, -1, 261, -1, 264,
01286 -1, 265, -1, 266, -1, 269, -1, 285, -1, 287,
01287 -1, 53, -1, -1, 217, 200, 155, 227, -1, -1,
01288 90, 161, 201, 316, -1, 89, 156, 143, -1, 216,
01289 85, 56, -1, 86, 56, -1, 92, 188, 144, -1,
01290 93, 307, 137, -1, 30, -1, 31, 142, 192, 316,
01291 -1, 31, 142, 316, -1, 31, -1, -1, 46, 315,
01292 142, 202, 161, 316, -1, 39, 142, 161, 316, -1,
01293 39, 142, 316, -1, 310, 251, -1, 250, -1, 250,
01294 251, -1, 97, 242, -1, 218, 162, 228, 156, 230,
01295 227, -1, 219, 162, 228, 156, 231, 227, -1, -1,
01296 -1, 220, 203, 162, 229, 204, 156, 227, -1, -1,
01297 -1, 221, 205, 162, 229, 206, 156, 227, -1, 222,
01298 162, 314, 254, 227, -1, 222, 314, 254, 227, -1,
01299 -1, -1, 223, 232, 25, 207, 162, 229, 208, 156,
01300 227, -1, -1, 224, 177, 288, 209, 155, 227, -1,
01301 -1, -1, 224, 83, 161, 210, 319, 211, 155, 227,
01302 -1, -1, 225, 177, 212, 155, 227, -1, -1, 226,
01303 178, 213, 290, 155, 227, -1, -1, -1, 226, 305,
01304 313, 214, 178, 215, 290, 155, 227, -1, 21, -1,
01305 22, -1, 23, -1, 24, -1, 199, -1, 7, -1,
01306 11, -1, 12, -1, 18, -1, 19, -1, 16, -1,
01307 20, -1, 3, -1, 4, -1, 5, -1, 10, -1,
01308 319, -1, 13, -1, 319, 13, -1, 319, -1, 27,
01309 -1, 231, -1, 14, 162, 228, 156, 230, -1, 321,
01310 -1, 15, 156, -1, 175, -1, 168, -1, 293, -1,
01311 89, 235, 316, -1, 233, -1, 234, 140, 233, -1,
01312 234, -1, 234, 140, 95, 293, -1, 234, 140, 95,
01313 293, 140, 234, -1, 234, 140, 95, -1, 234, 140,
01314 95, 140, 234, -1, 95, 293, -1, 95, 293, 140,
01315 234, -1, 95, -1, 95, 140, 234, -1, 295, 140,
01316 298, 140, 301, 304, -1, 295, 140, 298, 140, 301,
01317 140, 295, 304, -1, 295, 140, 298, 304, -1, 295,
01318 140, 298, 140, 295, 304, -1, 295, 140, 301, 304,
01319 -1, 295, 140, -1, 295, 140, 301, 140, 295, 304,
01320 -1, 295, 304, -1, 298, 140, 301, 304, -1, 298,
01321 140, 301, 140, 295, 304, -1, 298, 304, -1, 298,
01322 140, 295, 304, -1, 301, 304, -1, 301, 140, 295,
01323 304, -1, 303, -1, 321, -1, 238, -1, 114, 239,
01324 114, -1, 76, -1, 114, 236, 239, 114, -1, 321,
01325 -1, 145, 240, -1, 241, -1, 240, 140, 241, -1,
01326 52, -1, 292, -1, -1, -1, 243, 244, 245, 246,
01327 -1, 142, 291, 239, 316, -1, 291, -1, 107, 156,
01328 137, -1, 29, 156, 10, -1, -1, 28, 248, 237,
01329 156, 10, -1, 167, 247, -1, 249, 139, 311, 190,
01330 -1, 249, 85, 311, 190, -1, 310, 189, -1, 216,
01331 139, 311, 190, -1, 216, 85, 311, 189, -1, 216,
01332 85, 312, -1, 216, 139, 189, -1, 216, 85, 189,
01333 -1, 32, 189, -1, 32, -1, 216, 138, 191, 317,
01334 -1, -1, 136, 252, 237, 156, 137, -1, -1, 26,
01335 253, 237, 156, 10, -1, 17, 197, 228, 156, 255,
01336 -1, 231, -1, 254, -1, 8, 257, 258, 228, 156,
01337 256, -1, 321, -1, 187, -1, 198, -1, 321, -1,
01338 88, 175, -1, 321, -1, 9, 156, -1, 321, -1,
01339 282, -1, 279, -1, 281, -1, 262, -1, 62, -1,
01340 263, -1, 262, 263, -1, 99, 271, 106, -1, 100,
01341 272, 106, -1, 101, 273, 65, -1, 102, 146, 106,
01342 -1, 102, 267, 106, -1, -1, 267, 268, 146, -1,
01343 274, -1, 268, 274, -1, 103, 146, 106, -1, 103,
01344 270, 106, -1, -1, 270, 61, 146, -1, -1, 271,
01345 274, -1, -1, 272, 274, -1, -1, 273, 274, -1,
01346 61, -1, -1, 105, 275, 278, -1, -1, -1, 104,
01347 276, 277, 156, 137, -1, 54, -1, 55, -1, 57,
01348 -1, 287, -1, 98, 280, -1, 178, -1, 55, -1,
01349 54, -1, 57, -1, 98, 272, 106, -1, 59, -1,
01350 60, -1, 122, 59, -1, 122, 60, -1, 52, -1,
01351 55, -1, 54, -1, 56, -1, 57, -1, 34, -1,
01352 33, -1, 35, -1, 36, -1, 50, -1, 49, -1,
01353 51, -1, 283, -1, 284, -1, 283, -1, 284, -1,
01354 63, -1, 64, -1, 319, -1, -1, 113, 289, 162,
01355 319, -1, 1, 319, -1, 142, 291, 316, -1, 291,
01356 319, -1, 295, 140, 299, 140, 301, 304, -1, 295,
01357 140, 299, 140, 301, 140, 295, 304, -1, 295, 140,
01358 299, 304, -1, 295, 140, 299, 140, 295, 304, -1,
01359 295, 140, 301, 304, -1, 295, 140, 301, 140, 295,
01360 304, -1, 295, 304, -1, 299, 140, 301, 304, -1,
01361 299, 140, 301, 140, 295, 304, -1, 299, 304, -1,
01362 299, 140, 295, 304, -1, 301, 304, -1, 301, 140,
01363 295, 304, -1, 303, -1, -1, 56, -1, 55, -1,
01364 54, -1, 57, -1, 292, -1, 52, -1, 293, -1,
01365 89, 235, 316, -1, 294, -1, 295, 140, 294, -1,
01366 52, 109, 187, -1, 52, 109, 216, -1, 297, -1,
01367 298, 140, 297, -1, 296, -1, 299, 140, 296, -1,
01368 119, -1, 95, -1, 300, 52, -1, 300, -1, 116,
01369 -1, 96, -1, 302, 52, -1, 140, 303, -1, 321,
01370 -1, 285, -1, -1, 142, 306, 161, 316, -1, 321,
01371 -1, 308, 318, -1, 309, -1, 308, 140, 309, -1,
01372 187, 88, 187, -1, 58, 187, -1, 52, -1, 56,
01373 -1, 53, -1, 52, -1, 56, -1, 53, -1, 183,
01374 -1, 52, -1, 53, -1, 183, -1, 139, -1, 85,
01375 -1, -1, 320, -1, -1, 147, -1, 315, 143, -1,
01376 315, 144, -1, -1, 147, -1, 140, -1, 145, -1,
01377 147, -1, 319, -1, 320, 145, -1, -1
01378 };
01379
01380
01381 static const yytype_uint16 yyrline[] =
01382 {
01383 0, 786, 786, 786, 817, 828, 837, 845, 853, 859,
01384 861, 860, 884, 917, 928, 937, 945, 953, 959, 959,
01385 967, 975, 986, 996, 1004, 1013, 1022, 1035, 1048, 1057,
01386 1069, 1070, 1080, 1109, 1130, 1147, 1164, 1175, 1192, 1202,
01387 1211, 1220, 1229, 1232, 1241, 1253, 1254, 1262, 1270, 1278,
01388 1286, 1289, 1301, 1302, 1305, 1306, 1315, 1327, 1326, 1348,
01389 1357, 1369, 1378, 1390, 1399, 1411, 1420, 1429, 1437, 1445,
01390 1455, 1456, 1466, 1467, 1477, 1485, 1493, 1501, 1510, 1518,
01391 1527, 1535, 1544, 1552, 1563, 1564, 1574, 1582, 1592, 1600,
01392 1610, 1614, 1618, 1626, 1634, 1642, 1650, 1662, 1672, 1684,
01393 1693, 1702, 1710, 1718, 1726, 1734, 1747, 1760, 1771, 1779,
01394 1782, 1790, 1798, 1808, 1809, 1810, 1811, 1816, 1827, 1828,
01395 1831, 1839, 1842, 1850, 1850, 1860, 1861, 1862, 1863, 1864,
01396 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874,
01397 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884,
01398 1885, 1886, 1887, 1888, 1891, 1891, 1891, 1892, 1892, 1893,
01399 1893, 1893, 1894, 1894, 1894, 1894, 1895, 1895, 1895, 1895,
01400 1896, 1896, 1896, 1897, 1897, 1897, 1897, 1898, 1898, 1898,
01401 1898, 1899, 1899, 1899, 1899, 1900, 1900, 1900, 1900, 1901,
01402 1901, 1901, 1901, 1902, 1902, 1905, 1914, 1924, 1953, 1984,
01403 2010, 2027, 2044, 2061, 2072, 2083, 2094, 2108, 2122, 2130,
01404 2138, 2146, 2154, 2162, 2170, 2179, 2188, 2196, 2204, 2212,
01405 2220, 2228, 2236, 2244, 2252, 2260, 2268, 2276, 2284, 2292,
01406 2303, 2311, 2319, 2327, 2335, 2343, 2351, 2359, 2359, 2369,
01407 2379, 2385, 2397, 2398, 2402, 2410, 2420, 2430, 2431, 2434,
01408 2435, 2436, 2440, 2448, 2458, 2467, 2475, 2485, 2494, 2503,
01409 2503, 2515, 2525, 2529, 2535, 2543, 2551, 2565, 2581, 2595,
01410 2610, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628,
01411 2637, 2636, 2661, 2661, 2670, 2678, 2686, 2694, 2707, 2715,
01412 2723, 2731, 2739, 2747, 2747, 2757, 2765, 2773, 2784, 2785,
01413 2796, 2800, 2812, 2824, 2824, 2824, 2835, 2835, 2835, 2846,
01414 2857, 2866, 2868, 2865, 2932, 2931, 2953, 2958, 2952, 2977,
01415 2976, 2998, 2997, 3020, 3021, 3020, 3041, 3049, 3057, 3065,
01416 3075, 3087, 3093, 3099, 3105, 3111, 3117, 3123, 3129, 3135,
01417 3141, 3151, 3157, 3162, 3163, 3170, 3175, 3178, 3179, 3192,
01418 3193, 3203, 3204, 3207, 3215, 3225, 3233, 3243, 3251, 3260,
01419 3269, 3277, 3285, 3294, 3306, 3314, 3324, 3332, 3340, 3348,
01420 3356, 3364, 3373, 3381, 3389, 3397, 3405, 3413, 3421, 3429,
01421 3437, 3447, 3448, 3454, 3463, 3472, 3483, 3484, 3494, 3501,
01422 3510, 3518, 3524, 3527, 3524, 3545, 3553, 3563, 3567, 3574,
01423 3573, 3594, 3610, 3619, 3630, 3639, 3649, 3659, 3667, 3678,
01424 3689, 3697, 3705, 3720, 3719, 3739, 3738, 3759, 3771, 3772,
01425 3775, 3794, 3797, 3805, 3813, 3816, 3820, 3823, 3831, 3834,
01426 3835, 3843, 3846, 3863, 3864, 3865, 3875, 3885, 3912, 3977,
01427 3986, 3997, 4004, 4014, 4022, 4032, 4041, 4052, 4059, 4070,
01428 4077, 4088, 4095, 4106, 4113, 4142, 4144, 4143, 4160, 4166,
01429 4159, 4185, 4193, 4201, 4209, 4212, 4223, 4224, 4225, 4226,
01430 4229, 4259, 4260, 4261, 4269, 4279, 4280, 4281, 4282, 4283,
01431 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4295, 4308, 4318,
01432 4326, 4336, 4337, 4340, 4349, 4348, 4356, 4368, 4378, 4386,
01433 4394, 4402, 4410, 4418, 4426, 4434, 4442, 4450, 4458, 4466,
01434 4474, 4482, 4490, 4499, 4508, 4517, 4526, 4535, 4546, 4547,
01435 4554, 4563, 4582, 4589, 4602, 4614, 4626, 4634, 4650, 4658,
01436 4674, 4675, 4678, 4691, 4702, 4703, 4706, 4723, 4727, 4737,
01437 4747, 4747, 4776, 4777, 4787, 4794, 4804, 4812, 4822, 4823,
01438 4824, 4827, 4828, 4829, 4830, 4833, 4834, 4835, 4838, 4843,
01439 4850, 4851, 4854, 4855, 4858, 4861, 4864, 4865, 4866, 4869,
01440 4870, 4873, 4874, 4878
01441 };
01442 #endif
01443
01444 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
01445
01446
01447 static const char *const yytname[] =
01448 {
01449 "$end", "error", "$undefined", "keyword_class", "keyword_module",
01450 "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue",
01451 "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless",
01452 "keyword_then", "keyword_elsif", "keyword_else", "keyword_case",
01453 "keyword_when", "keyword_while", "keyword_until", "keyword_for",
01454 "keyword_break", "keyword_next", "keyword_redo", "keyword_retry",
01455 "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block",
01456 "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super",
01457 "keyword_self", "keyword_nil", "keyword_true", "keyword_false",
01458 "keyword_and", "keyword_or", "keyword_not", "modifier_if",
01459 "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue",
01460 "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END",
01461 "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__",
01462 "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL",
01463 "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF",
01464 "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ",
01465 "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH",
01466 "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2",
01467 "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN",
01468 "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA",
01469 "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG",
01470 "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG",
01471 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'",
01472 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL",
01473 "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias",
01474 "id_core_set_variable_alias", "id_core_undef_method",
01475 "id_core_define_method", "id_core_define_singleton_method",
01476 "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','",
01477 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
01478 "$@1", "top_compstmt", "top_stmts", "top_stmt", "$@2", "bodystmt",
01479 "compstmt", "stmts", "stmt", "$@3", "command_asgn", "expr", "expr_value",
01480 "command_call", "block_command", "cmd_brace_block", "@4", "command",
01481 "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head",
01482 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym",
01483 "fitem", "undef_list", "$@5", "op", "reswords", "arg", "$@6",
01484 "arg_value", "aref_args", "paren_args", "opt_paren_args",
01485 "opt_call_args", "call_args", "command_args", "@7", "block_arg",
01486 "opt_block_arg", "args", "mrhs", "primary", "@8", "$@9", "$@10", "$@11",
01487 "$@12", "$@13", "$@14", "$@15", "$@16", "@17", "@18", "@19", "@20",
01488 "@21", "$@22", "$@23", "primary_value", "k_begin", "k_if", "k_unless",
01489 "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def",
01490 "k_end", "then", "do", "if_tail", "opt_else", "for_var", "f_marg",
01491 "f_marg_list", "f_margs", "block_param", "opt_block_param",
01492 "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@24",
01493 "@25", "f_larglist", "lambda_body", "do_block", "@26", "block_call",
01494 "method_call", "brace_block", "@27", "@28", "case_body", "cases",
01495 "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", "strings",
01496 "string", "string1", "xstring", "regexp", "words", "word_list", "word",
01497 "qwords", "qword_list", "string_contents", "xstring_contents",
01498 "regexp_contents", "string_content", "@29", "@30", "@31", "string_dvar",
01499 "symbol", "sym", "dsym", "numeric", "user_variable", "keyword_variable",
01500 "var_ref", "var_lhs", "backref", "superclass", "$@32", "f_arglist",
01501 "f_args", "f_bad_arg", "f_norm_arg", "f_arg_item", "f_arg", "f_opt",
01502 "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark",
01503 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg",
01504 "singleton", "$@33", "assoc_list", "assocs", "assoc", "operation",
01505 "operation2", "operation3", "dot_or_colon", "opt_terms", "opt_nl",
01506 "rparen", "rbracket", "trailer", "term", "terms", "none", 0
01507 };
01508 #endif
01509
01510 # ifdef YYPRINT
01511
01512
01513 static const yytype_uint16 yytoknum[] =
01514 {
01515 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
01516 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
01517 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
01518 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
01519 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
01520 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
01521 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
01522 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
01523 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
01524 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
01525 355, 356, 357, 358, 359, 360, 361, 362, 363, 61,
01526 63, 58, 62, 60, 124, 94, 38, 43, 45, 42,
01527 47, 37, 364, 33, 126, 365, 366, 367, 368, 369,
01528 370, 371, 372, 373, 374, 375, 123, 125, 91, 46,
01529 44, 96, 40, 41, 93, 59, 32, 10
01530 };
01531 # endif
01532
01533
01534 static const yytype_uint16 yyr1[] =
01535 {
01536 0, 148, 150, 149, 151, 152, 152, 152, 152, 153,
01537 154, 153, 155, 156, 157, 157, 157, 157, 159, 158,
01538 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
01539 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
01540 158, 158, 158, 160, 160, 161, 161, 161, 161, 161,
01541 161, 162, 163, 163, 164, 164, 164, 166, 165, 167,
01542 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
01543 168, 168, 169, 169, 170, 170, 170, 170, 170, 170,
01544 170, 170, 170, 170, 171, 171, 172, 172, 173, 173,
01545 174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
01546 175, 175, 175, 175, 175, 175, 175, 175, 176, 176,
01547 177, 177, 177, 178, 178, 178, 178, 178, 179, 179,
01548 180, 180, 181, 182, 181, 183, 183, 183, 183, 183,
01549 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
01550 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
01551 183, 183, 183, 183, 184, 184, 184, 184, 184, 184,
01552 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
01553 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
01554 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
01555 184, 184, 184, 184, 184, 185, 185, 185, 185, 185,
01556 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
01557 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
01558 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
01559 185, 185, 185, 185, 185, 185, 185, 186, 185, 185,
01560 185, 187, 188, 188, 188, 188, 189, 190, 190, 191,
01561 191, 191, 191, 191, 192, 192, 192, 192, 192, 194,
01562 193, 195, 196, 196, 197, 197, 197, 197, 198, 198,
01563 198, 199, 199, 199, 199, 199, 199, 199, 199, 199,
01564 200, 199, 201, 199, 199, 199, 199, 199, 199, 199,
01565 199, 199, 199, 202, 199, 199, 199, 199, 199, 199,
01566 199, 199, 199, 203, 204, 199, 205, 206, 199, 199,
01567 199, 207, 208, 199, 209, 199, 210, 211, 199, 212,
01568 199, 213, 199, 214, 215, 199, 199, 199, 199, 199,
01569 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
01570 226, 227, 228, 228, 228, 229, 229, 230, 230, 231,
01571 231, 232, 232, 233, 233, 234, 234, 235, 235, 235,
01572 235, 235, 235, 235, 235, 235, 236, 236, 236, 236,
01573 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
01574 236, 237, 237, 238, 238, 238, 239, 239, 240, 240,
01575 241, 241, 243, 244, 242, 245, 245, 246, 246, 248,
01576 247, 249, 249, 249, 250, 250, 250, 250, 250, 250,
01577 250, 250, 250, 252, 251, 253, 251, 254, 255, 255,
01578 256, 256, 257, 257, 257, 258, 258, 259, 259, 260,
01579 260, 260, 261, 262, 262, 262, 263, 264, 265, 266,
01580 266, 267, 267, 268, 268, 269, 269, 270, 270, 271,
01581 271, 272, 272, 273, 273, 274, 275, 274, 276, 277,
01582 274, 278, 278, 278, 278, 279, 280, 280, 280, 280,
01583 281, 282, 282, 282, 282, 283, 283, 283, 283, 283,
01584 284, 284, 284, 284, 284, 284, 284, 285, 285, 286,
01585 286, 287, 287, 288, 289, 288, 288, 290, 290, 291,
01586 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
01587 291, 291, 291, 291, 292, 292, 292, 292, 293, 293,
01588 294, 294, 295, 295, 296, 297, 298, 298, 299, 299,
01589 300, 300, 301, 301, 302, 302, 303, 304, 304, 305,
01590 306, 305, 307, 307, 308, 308, 309, 309, 310, 310,
01591 310, 311, 311, 311, 311, 312, 312, 312, 313, 313,
01592 314, 314, 315, 315, 316, 317, 318, 318, 318, 319,
01593 319, 320, 320, 321
01594 };
01595
01596
01597 static const yytype_uint8 yyr2[] =
01598 {
01599 0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
01600 0, 5, 4, 2, 1, 1, 3, 2, 0, 4,
01601 3, 3, 3, 2, 3, 3, 3, 3, 3, 4,
01602 1, 3, 3, 6, 5, 5, 5, 5, 3, 3,
01603 3, 3, 1, 3, 3, 1, 3, 3, 3, 2,
01604 1, 1, 1, 1, 1, 4, 4, 0, 5, 2,
01605 3, 4, 5, 4, 5, 2, 2, 2, 2, 2,
01606 1, 3, 1, 3, 1, 2, 3, 5, 2, 4,
01607 2, 4, 1, 3, 1, 3, 2, 3, 1, 3,
01608 1, 1, 4, 3, 3, 3, 3, 2, 1, 1,
01609 1, 4, 3, 3, 3, 3, 2, 1, 1, 1,
01610 2, 1, 3, 1, 1, 1, 1, 1, 1, 1,
01611 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
01612 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01613 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01614 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01615 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01616 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01617 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01618 1, 1, 1, 1, 1, 3, 5, 3, 5, 6,
01619 5, 5, 5, 5, 4, 3, 3, 3, 3, 3,
01620 3, 3, 3, 3, 4, 4, 2, 2, 3, 3,
01621 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
01622 3, 2, 2, 3, 3, 3, 3, 0, 4, 6,
01623 1, 1, 1, 2, 4, 2, 3, 1, 1, 1,
01624 1, 2, 4, 2, 1, 2, 2, 4, 1, 0,
01625 2, 2, 2, 1, 1, 2, 3, 4, 3, 4,
01626 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01627 0, 4, 0, 4, 3, 3, 2, 3, 3, 1,
01628 4, 3, 1, 0, 6, 4, 3, 2, 1, 2,
01629 2, 6, 6, 0, 0, 7, 0, 0, 7, 5,
01630 4, 0, 0, 9, 0, 6, 0, 0, 8, 0,
01631 5, 0, 6, 0, 0, 9, 1, 1, 1, 1,
01632 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01633 1, 1, 1, 1, 2, 1, 1, 1, 5, 1,
01634 2, 1, 1, 1, 3, 1, 3, 1, 4, 6,
01635 3, 5, 2, 4, 1, 3, 6, 8, 4, 6,
01636 4, 2, 6, 2, 4, 6, 2, 4, 2, 4,
01637 1, 1, 1, 3, 1, 4, 1, 2, 1, 3,
01638 1, 1, 0, 0, 4, 4, 1, 3, 3, 0,
01639 5, 2, 4, 4, 2, 4, 4, 3, 3, 3,
01640 2, 1, 4, 0, 5, 0, 5, 5, 1, 1,
01641 6, 1, 1, 1, 1, 2, 1, 2, 1, 1,
01642 1, 1, 1, 1, 1, 2, 3, 3, 3, 3,
01643 3, 0, 3, 1, 2, 3, 3, 0, 3, 0,
01644 2, 0, 2, 0, 2, 1, 0, 3, 0, 0,
01645 5, 1, 1, 1, 1, 2, 1, 1, 1, 1,
01646 3, 1, 1, 2, 2, 1, 1, 1, 1, 1,
01647 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01648 1, 1, 1, 1, 0, 4, 2, 3, 2, 6,
01649 8, 4, 6, 4, 6, 2, 4, 6, 2, 4,
01650 2, 4, 1, 0, 1, 1, 1, 1, 1, 1,
01651 1, 3, 1, 3, 3, 3, 1, 3, 1, 3,
01652 1, 1, 2, 1, 1, 1, 2, 2, 1, 1,
01653 0, 4, 1, 2, 1, 3, 3, 2, 1, 1,
01654 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01655 0, 1, 0, 1, 2, 2, 0, 1, 1, 1,
01656 1, 1, 2, 0
01657 };
01658
01659
01660
01661
01662 static const yytype_uint16 yydefact[] =
01663 {
01664 2, 0, 0, 1, 0, 338, 339, 340, 0, 331,
01665 332, 333, 336, 334, 335, 337, 326, 327, 328, 329,
01666 289, 259, 259, 481, 480, 482, 483, 562, 0, 562,
01667 10, 0, 485, 484, 486, 475, 550, 477, 476, 478,
01668 479, 471, 472, 433, 491, 492, 0, 0, 0, 0,
01669 0, 573, 573, 82, 392, 451, 449, 451, 453, 441,
01670 447, 0, 0, 0, 3, 560, 6, 9, 30, 42,
01671 45, 53, 52, 0, 70, 0, 74, 84, 0, 50,
01672 240, 0, 280, 0, 0, 303, 306, 560, 0, 0,
01673 0, 0, 54, 298, 271, 272, 432, 434, 273, 274,
01674 275, 276, 430, 431, 429, 487, 488, 277, 0, 278,
01675 259, 5, 8, 164, 175, 165, 188, 161, 181, 171,
01676 170, 191, 192, 186, 169, 168, 163, 189, 193, 194,
01677 173, 162, 176, 180, 182, 174, 167, 183, 190, 185,
01678 184, 177, 187, 172, 160, 179, 178, 159, 166, 157,
01679 158, 154, 155, 156, 113, 115, 114, 149, 150, 146,
01680 128, 129, 130, 137, 134, 136, 131, 132, 151, 152,
01681 138, 139, 143, 133, 135, 125, 126, 127, 140, 141,
01682 142, 144, 145, 147, 148, 153, 118, 120, 122, 23,
01683 116, 117, 119, 121, 0, 0, 0, 0, 0, 0,
01684 0, 254, 0, 241, 264, 68, 258, 573, 0, 487,
01685 488, 0, 278, 573, 544, 69, 67, 562, 66, 0,
01686 573, 410, 65, 562, 563, 0, 0, 18, 237, 0,
01687 0, 326, 327, 289, 292, 411, 216, 0, 0, 217,
01688 286, 0, 0, 0, 560, 15, 562, 72, 14, 282,
01689 0, 566, 566, 242, 0, 0, 566, 542, 562, 0,
01690 0, 0, 80, 330, 0, 90, 91, 98, 300, 393,
01691 468, 467, 469, 466, 0, 465, 0, 0, 0, 0,
01692 0, 0, 0, 473, 474, 49, 231, 232, 569, 570,
01693 4, 571, 561, 0, 0, 0, 0, 0, 0, 0,
01694 399, 401, 0, 86, 0, 78, 75, 0, 0, 0,
01695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
01696 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
01697 0, 0, 0, 0, 0, 573, 0, 0, 51, 0,
01698 0, 0, 0, 560, 0, 561, 0, 352, 351, 0,
01699 0, 487, 488, 278, 108, 109, 0, 0, 111, 0,
01700 0, 487, 488, 278, 319, 184, 177, 187, 172, 154,
01701 155, 156, 113, 114, 540, 321, 539, 0, 0, 0,
01702 415, 413, 299, 435, 0, 0, 404, 59, 297, 123,
01703 547, 286, 265, 261, 0, 0, 0, 255, 263, 0,
01704 573, 0, 0, 0, 0, 256, 562, 0, 291, 260,
01705 562, 250, 573, 573, 249, 562, 296, 48, 20, 22,
01706 21, 0, 293, 0, 0, 0, 0, 0, 0, 17,
01707 562, 284, 13, 561, 71, 562, 287, 568, 567, 243,
01708 568, 245, 288, 543, 0, 97, 473, 474, 88, 83,
01709 0, 0, 573, 0, 513, 455, 458, 456, 470, 452,
01710 436, 450, 437, 438, 454, 439, 440, 0, 443, 445,
01711 0, 446, 0, 0, 572, 7, 24, 25, 26, 27,
01712 28, 46, 47, 573, 0, 31, 40, 0, 41, 562,
01713 0, 76, 87, 44, 43, 0, 195, 264, 39, 213,
01714 221, 226, 227, 228, 223, 225, 235, 236, 229, 230,
01715 206, 207, 233, 234, 562, 222, 224, 218, 219, 220,
01716 208, 209, 210, 211, 212, 551, 556, 552, 557, 409,
01717 259, 407, 562, 551, 553, 552, 554, 408, 259, 0,
01718 573, 343, 0, 342, 0, 0, 0, 0, 0, 0,
01719 286, 0, 573, 0, 311, 316, 108, 109, 110, 0,
01720 494, 314, 493, 0, 573, 0, 0, 0, 513, 559,
01721 558, 323, 551, 552, 259, 259, 573, 573, 32, 197,
01722 38, 205, 57, 60, 0, 195, 546, 0, 266, 262,
01723 573, 555, 552, 562, 551, 552, 545, 290, 564, 246,
01724 251, 253, 295, 19, 0, 238, 0, 29, 0, 573,
01725 204, 73, 16, 283, 566, 0, 81, 94, 96, 562,
01726 551, 552, 519, 516, 515, 514, 517, 0, 531, 535,
01727 534, 530, 513, 0, 396, 518, 520, 522, 573, 528,
01728 573, 533, 573, 0, 512, 459, 0, 442, 444, 448,
01729 214, 215, 384, 573, 0, 382, 381, 270, 0, 85,
01730 79, 0, 0, 0, 0, 0, 0, 406, 63, 0,
01731 412, 0, 0, 248, 405, 61, 247, 341, 281, 573,
01732 573, 421, 573, 344, 573, 346, 304, 345, 307, 0,
01733 0, 310, 555, 285, 562, 551, 552, 0, 0, 496,
01734 0, 0, 108, 109, 112, 562, 0, 562, 513, 0,
01735 0, 0, 403, 56, 402, 55, 0, 0, 0, 573,
01736 124, 267, 257, 0, 0, 412, 0, 0, 573, 562,
01737 11, 244, 89, 92, 0, 519, 0, 364, 355, 357,
01738 562, 353, 573, 0, 0, 394, 0, 505, 538, 0,
01739 508, 532, 0, 510, 536, 0, 461, 462, 463, 457,
01740 464, 519, 0, 573, 0, 573, 526, 573, 573, 380,
01741 386, 0, 0, 268, 77, 196, 0, 37, 202, 36,
01742 203, 64, 565, 0, 34, 200, 35, 201, 62, 422,
01743 423, 573, 424, 0, 573, 349, 0, 0, 347, 0,
01744 0, 0, 309, 0, 0, 412, 0, 317, 0, 0,
01745 412, 320, 541, 562, 0, 498, 324, 0, 0, 198,
01746 0, 0, 252, 294, 524, 562, 0, 362, 0, 521,
01747 562, 0, 0, 523, 573, 573, 537, 573, 529, 573,
01748 573, 0, 0, 390, 387, 388, 391, 0, 383, 371,
01749 373, 0, 376, 0, 378, 400, 269, 239, 33, 199,
01750 0, 0, 426, 350, 0, 12, 428, 0, 301, 302,
01751 0, 0, 266, 573, 312, 0, 495, 315, 497, 322,
01752 513, 416, 414, 0, 354, 365, 0, 360, 356, 395,
01753 398, 397, 0, 501, 0, 503, 0, 509, 0, 506,
01754 511, 460, 0, 525, 0, 385, 573, 573, 573, 527,
01755 573, 573, 0, 425, 0, 99, 100, 107, 0, 427,
01756 0, 305, 308, 418, 419, 417, 0, 0, 0, 58,
01757 0, 363, 0, 358, 573, 573, 573, 573, 286, 0,
01758 389, 0, 368, 0, 370, 377, 0, 374, 379, 106,
01759 0, 573, 0, 573, 573, 0, 318, 0, 361, 0,
01760 502, 0, 499, 504, 507, 555, 285, 573, 573, 573,
01761 573, 555, 105, 562, 551, 552, 420, 348, 313, 325,
01762 359, 573, 369, 0, 366, 372, 375, 412, 500, 573,
01763 367
01764 };
01765
01766
01767 static const yytype_int16 yydefgoto[] =
01768 {
01769 -1, 1, 2, 64, 65, 66, 229, 539, 540, 244,
01770 245, 421, 68, 69, 339, 70, 71, 583, 719, 72,
01771 73, 246, 74, 75, 76, 449, 77, 202, 358, 359,
01772 186, 187, 188, 189, 584, 536, 191, 79, 423, 204,
01773 250, 529, 674, 410, 411, 218, 219, 206, 397, 412,
01774 488, 80, 337, 435, 604, 341, 800, 342, 801, 697,
01775 926, 701, 698, 875, 566, 568, 711, 880, 237, 82,
01776 83, 84, 85, 86, 87, 88, 89, 90, 91, 678,
01777 542, 686, 797, 798, 350, 738, 739, 740, 763, 654,
01778 655, 764, 844, 845, 268, 269, 454, 633, 745, 301,
01779 483, 92, 93, 388, 577, 576, 549, 925, 680, 791,
01780 861, 865, 94, 95, 96, 97, 98, 99, 100, 280,
01781 467, 101, 282, 276, 274, 278, 459, 646, 645, 755,
01782 759, 102, 275, 103, 104, 209, 210, 107, 211, 212,
01783 561, 700, 709, 710, 635, 636, 637, 638, 639, 766,
01784 767, 640, 641, 642, 643, 836, 747, 377, 567, 255,
01785 413, 214, 238, 608, 531, 571, 290, 407, 408, 670,
01786 439, 543, 345, 248
01787 };
01788
01789
01790
01791 #define YYPACT_NINF -747
01792 static const yytype_int16 yypact[] =
01793 {
01794 -747, 81, 2552, -747, 7102, -747, -747, -747, 6615, -747,
01795 -747, -747, -747, -747, -747, -747, 7320, 7320, -747, -747,
01796 7320, 3237, 2814, -747, -747, -747, -747, 100, 6476, -31,
01797 -747, -26, -747, -747, -747, 5715, 2955, -747, -747, 5842,
01798 -747, -747, -747, -747, -747, -747, 8519, 8519, 83, 4434,
01799 8628, 7538, 7865, 6878, -747, 6337, -747, -747, -747, -24,
01800 29, 252, 8737, 8519, -747, 193, -747, 1104, -747, 458,
01801 -747, -747, 129, 77, -747, 69, 8846, -747, 139, 2797,
01802 22, 41, -747, 8628, 8628, -747, -747, 5078, 8951, 9056,
01803 9161, 5588, 33, 46, -747, -747, 157, -747, -747, -747,
01804 -747, -747, -747, -747, -747, 25, 58, -747, 179, 613,
01805 51, -747, -747, -747, -747, -747, -747, -747, -747, -747,
01806 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
01807 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
01808 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
01809 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
01810 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
01811 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
01812 -747, -747, -747, -747, -747, -747, -747, -747, -747, 134,
01813 -747, -747, -747, -747, 182, 8519, 279, 4564, 8519, 8519,
01814 8519, -747, 263, 2797, 260, -747, -747, 237, 207, 43,
01815 206, 298, 254, 265, -747, -747, -747, 4969, -747, 7320,
01816 7320, -747, -747, 5208, -747, 8628, 661, -747, 272, 287,
01817 4694, -747, -747, -747, 295, 307, -747, 304, 51, 416,
01818 619, 7211, 4434, 384, 193, 1104, -31, 399, -747, 458,
01819 419, 221, 300, -747, 260, 430, 300, -747, -31, 497,
01820 501, 9266, 442, -747, 351, 366, 383, 409, -747, -747,
01821 -747, -747, -747, -747, 644, -747, 754, 813, 605, 464,
01822 819, 478, 68, 530, 532, -747, -747, -747, -747, -747,
01823 -747, -747, 5317, 8628, 8628, 8628, 8628, 7211, 8628, 8628,
01824 -747, -747, 7974, -747, 4434, 6990, 470, 7974, 8519, 8519,
01825 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519,
01826 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519,
01827 8519, 8519, 8519, 8519, 9548, 7320, 9625, 3609, 458, 86,
01828 86, 8628, 8628, 193, 597, 480, 562, -747, -747, 454,
01829 601, 54, 76, 99, 331, 349, 8628, 481, -747, 45,
01830 473, -747, -747, -747, -747, 217, 286, 305, 318, 321,
01831 347, 363, 376, 381, -747, -747, -747, 391, 10549, 10549,
01832 -747, -747, -747, -747, 8737, 8737, -747, 535, -747, -747,
01833 -747, 388, -747, -747, 8519, 8519, 7429, -747, -747, 9702,
01834 7320, 9779, 8519, 8519, 7647, -747, -31, 492, -747, -747,
01835 -31, -747, 506, 539, -747, 106, -747, -747, -747, -747,
01836 -747, 6615, -747, 8519, 4029, 508, 9702, 9779, 8519, 1104,
01837 -31, -747, -747, 5445, 541, -31, -747, 7756, -747, -747,
01838 7865, -747, -747, -747, 272, 510, -747, -747, -747, 543,
01839 9266, 9856, 7320, 9933, 774, -747, -747, -747, -747, -747,
01840 -747, -747, -747, -747, -747, -747, -747, 313, -747, -747,
01841 491, -747, 8519, 8519, -747, -747, -747, -747, -747, -747,
01842 -747, -747, -747, 32, 8519, -747, 545, 546, -747, -31,
01843 9266, 551, -747, -747, -747, 566, 9473, -747, -747, 416,
01844 2184, 2184, 2184, 2184, 781, 781, 2273, 2938, 2184, 2184,
01845 1364, 1364, 662, 662, 2656, 781, 781, 927, 927, 768,
01846 397, 397, 416, 416, 416, 3378, 6083, 3464, 6197, -747,
01847 307, -747, -31, 647, -747, 660, -747, -747, 3096, 650,
01848 688, -747, 3754, 685, 4174, 56, 56, 597, 8083, 650,
01849 112, 10010, 7320, 10087, -747, 458, -747, 510, -747, 193,
01850 -747, -747, -747, 10164, 7320, 10241, 3609, 8628, 1131, -747,
01851 -747, -747, -747, -747, 1739, 1739, 32, 32, -747, 10608,
01852 -747, 2797, -747, -747, 6615, 10627, -747, 8519, 260, -747,
01853 265, 5969, 2673, -31, 490, 500, -747, -747, -747, -747,
01854 7429, 7647, -747, -747, 8628, 2797, 570, -747, 307, 307,
01855 2797, 213, 1104, -747, 300, 9266, 543, 505, 282, -31,
01856 38, 261, 603, -747, -747, -747, -747, 972, -747, -747,
01857 -747, -747, 1223, 66, -747, -747, -747, -747, 580, -747,
01858 583, 683, 589, 687, -747, -747, 893, -747, -747, -747,
01859 416, 416, -747, 576, 4839, -747, -747, 604, 8192, -747,
01860 543, 9266, 8737, 8519, 630, 8737, 8737, -747, 535, 608,
01861 677, 8737, 8737, -747, -747, 535, -747, -747, -747, 8301,
01862 740, -747, 588, -747, 740, -747, -747, -747, -747, 650,
01863 44, -747, 239, 257, -31, 141, 145, 8628, 193, -747,
01864 8628, 3609, 505, 282, -747, -31, 650, 106, 1223, 3609,
01865 193, 6754, -747, -747, -747, -747, 4839, 4694, 8519, 32,
01866 -747, -747, -747, 8519, 8519, 507, 8519, 8519, 636, 106,
01867 -747, -747, -747, 291, 8519, -747, 972, 457, -747, 651,
01868 -31, -747, 639, 4839, 4694, -747, 1223, -747, -747, 1223,
01869 -747, -747, 598, -747, -747, 4694, -747, -747, -747, -747,
01870 -747, 681, 1017, 639, 679, 654, -747, 656, 657, -747,
01871 -747, 789, 8519, 664, 543, 2797, 8519, -747, 2797, -747,
01872 2797, -747, -747, 8737, -747, 2797, -747, 2797, -747, 545,
01873 -747, 713, -747, 4304, 796, -747, 8628, 650, -747, 650,
01874 4839, 4839, -747, 8410, 3899, 189, 56, -747, 193, 650,
01875 -747, -747, -747, -31, 650, -747, -747, 799, 673, 2797,
01876 4694, 8519, 7647, -747, -747, -31, 884, 671, 1079, -747,
01877 -31, 803, 686, -747, 676, 678, -747, 684, -747, 694,
01878 684, 690, 9371, -747, 699, -747, -747, 711, -747, 1251,
01879 -747, 1251, -747, 598, -747, -747, 700, 2797, -747, 2797,
01880 9476, 86, -747, -747, 4839, -747, -747, 86, -747, -747,
01881 650, 650, -747, 365, -747, 3609, -747, -747, -747, -747,
01882 1131, -747, -747, 706, -747, 707, 884, 716, -747, -747,
01883 -747, -747, 1223, -747, 598, -747, 598, -747, 598, -747,
01884 -747, -747, 790, 520, 1017, -747, 708, 715, 684, -747,
01885 717, 684, 797, -747, 523, 366, 383, 409, 3609, -747,
01886 3754, -747, -747, -747, -747, -747, 4839, 650, 3609, -747,
01887 884, 707, 884, 721, 684, 727, 684, 684, -747, 10318,
01888 -747, 1251, -747, 598, -747, -747, 598, -747, -747, 510,
01889 10395, 7320, 10472, 688, 588, 650, -747, 650, 707, 884,
01890 -747, 598, -747, -747, -747, 730, 731, 684, 735, 684,
01891 684, 55, 282, -31, 128, 158, -747, -747, -747, -747,
01892 707, 684, -747, 598, -747, -747, -747, 163, -747, 684,
01893 -747
01894 };
01895
01896
01897 static const yytype_int16 yypgoto[] =
01898 {
01899 -747, -747, -747, 452, -747, 28, -747, -545, 277, -747,
01900 39, -747, -293, 184, -58, 71, -747, -169, -747, -7,
01901 791, -142, -13, -37, -747, -396, -29, 1623, -312, 788,
01902 -54, -747, -25, -747, -747, 20, -747, 1066, -747, -45,
01903 -747, 11, 47, -324, 115, 5, -747, -322, -196, 53,
01904 -295, 8, -747, -747, -747, -747, -747, -747, -747, -747,
01905 -747, -747, -747, -747, -747, -747, -747, -747, 2, -747,
01906 -747, -747, -747, -747, -747, -747, -747, -747, -747, 205,
01907 -338, -516, -72, -618, -747, -722, -671, 147, -747, -489,
01908 -747, -600, -747, -12, -747, -747, -747, -747, -747, -747,
01909 -747, -747, -747, 798, -747, -747, -531, -747, -50, -747,
01910 -747, -747, -747, -747, -747, 811, -747, -747, -747, -747,
01911 -747, -747, -747, -747, 856, -747, -140, -747, -747, -747,
01912 -747, 7, -747, 12, -747, 1268, 1605, 823, 1289, 1575,
01913 -747, -747, 35, -387, -697, -568, -690, 273, -696, -746,
01914 72, 181, -747, -526, -747, -449, 270, -747, -747, -747,
01915 97, -360, 758, -276, -747, -747, -56, -4, 278, -585,
01916 -214, 6, -18, -2
01917 };
01918
01919
01920
01921
01922 #define YYTABLE_NINF -574
01923 static const yytype_int16 yytable[] =
01924 {
01925 111, 273, 544, 227, 81, 644, 81, 254, 725, 201,
01926 201, 532, 498, 201, 493, 192, 689, 405, 208, 208,
01927 193, 706, 208, 225, 262, 228, 340, 222, 190, 343,
01928 688, 344, 112, 221, 733, 192, 247, 375, 441, 306,
01929 193, 67, 443, 67, 596, 558, 559, 292, 190, 253,
01930 257, 81, 208, 838, 616, 264, 833, 541, 530, 741,
01931 538, 263, 794, -93, 208, 846, 799, 634, -103, 207,
01932 207, 291, 380, 207, 589, 190, 593, 380, 264, -99,
01933 596, 3, 589, 685, 263, 208, 208, 716, 717, 208,
01934 349, 360, 360, 291, 660, 743, 263, 263, 263, 541,
01935 430, -100, 574, 575, 251, 909, 888, -330, 652, 805,
01936 230, 190, -489, 213, 213, 387, 224, 213, 378, 644,
01937 810, 386, 279, 530, -107, 538, 334, 768, 619, 470,
01938 -489, 205, 215, 285, -99, 216, 461, -106, 464, 240,
01939 468, -102, 830, 298, 299, -490, 653, -93, 252, 256,
01940 390, 609, -99, 392, 393, 885, 809, 300, 560, 833,
01941 -330, -330, 489, 847, 814, -90, -102, -100, 741, 827,
01942 -104, -104, 379, 744, 471, 281, -101, 609, -93, 335,
01943 336, -93, 381, 644, 803, -93, 302, 381, 432, 288,
01944 288, 289, 289, 220, -90, 909, 838, -551, -91, 81,
01945 -103, 288, -103, 289, 769, 398, 833, 846, 888, 303,
01946 201, 398, 201, 201, -101, 931, -91, 405, 414, 208,
01947 835, 208, 208, 839, 448, 208, 433, 208, 694, 247,
01948 820, 288, 81, 289, 249, 476, 477, 478, 479, -98,
01949 705, 596, 223, 81, 81, 742, 221, 224, 307, 386,
01950 291, 704, -97, 224, 444, 923, 56, 486, 741, 644,
01951 741, 958, 497, 264, -103, 774, 384, 338, 338, 263,
01952 207, 338, 207, -102, 389, -102, 491, 609, 589, 589,
01953 429, -93, -105, 545, 546, -95, -95, 547, 980, 609,
01954 874, 247, 399, -490, 81, 208, 208, 208, 208, 81,
01955 208, 208, -481, -104, 208, -104, 81, 264, -101, 208,
01956 -101, 283, 284, 263, 213, -100, 213, -412, 741, 933,
01957 475, 813, -71, 907, 223, 910, 243, 648, 201, -92,
01958 927, 67, 406, 414, 409, 391, 480, 208, 288, 81,
01959 289, 403, 924, 208, 208, 400, 401, 537, 395, 291,
01960 586, 588, 804, -85, 528, 487, -481, -548, 208, 254,
01961 487, 437, 741, -107, 741, 562, 935, -285, 438, 493,
01962 -95, -480, 394, 485, 455, -549, -412, 396, 494, -94,
01963 793, -551, 548, 957, 790, 402, 208, 208, 987, 426,
01964 -482, 741, 588, 201, 722, 254, 603, -96, 414, -552,
01965 731, -95, 208, -483, -95, 404, -485, 415, -95, 417,
01966 398, 398, 537, 448, 422, 968, -475, 456, 457, 528,
01967 -285, -285, 111, 424, -552, -480, 81, -412, 192, -412,
01968 -412, 644, -484, 193, -478, 81, 451, 217, 537, 657,
01969 440, 190, 400, 427, -482, 201, 528, 438, -486, 220,
01970 414, -487, 264, 448, 208, 578, 580, -483, 263, 647,
01971 -485, -475, 596, 67, 537, 308, -478, -548, -488, -475,
01972 -475, 528, 612, -548, 243, 428, 569, 338, 338, 338,
01973 338, 656, 481, 482, 308, -549, -484, -478, -478, 452,
01974 453, -549, 264, 590, -278, 298, 299, -106, 263, 781,
01975 589, 416, -486, 497, -487, -487, 788, 425, -70, 735,
01976 664, 623, 624, 625, 626, -475, 331, 332, 333, 243,
01977 -478, -488, -488, 918, 434, 338, 338, 431, 669, 920,
01978 570, -555, 722, 556, 614, 668, 676, 557, 681, 551,
01979 555, 667, 721, 675, 81, 201, 81, -278, -278, 673,
01980 414, 687, 687, 445, 208, 588, 254, 201, 563, 720,
01981 446, 447, 414, 436, 537, 699, 208, 442, 81, 208,
01982 465, 528, 676, 676, 656, 656, 537, 726, 732, 713,
01983 715, 243, 450, 528, 469, 673, 673, 727, 398, 669,
01984 -555, 192, 552, 553, 821, -286, 193, 826, 472, -102,
01985 473, 690, 796, 793, 190, 939, 208, 676, 950, -104,
01986 492, 564, 565, 773, 548, 669, -101, 264, 550, 667,
01987 673, 712, 714, 263, 448, 474, 554, 973, 761, 582,
01988 623, 624, 625, 626, 789, 598, 748, 649, 748, 806,
01989 748, -555, 808, -555, -555, 607, 600, -551, -286, -286,
01990 735, 770, 623, 624, 625, 626, 81, 816, 564, 565,
01991 677, 951, 952, 264, 208, 627, 455, 208, 208, 263,
01992 463, 628, 629, 208, 208, 662, 609, 792, 795, 601,
01993 795, -85, 795, 615, 597, -264, 658, 627, 599, 824,
01994 669, 661, 630, 602, 629, 631, 679, 728, 683, 208,
01995 385, 669, 208, 81, 807, 455, 428, 730, 611, 456,
01996 457, 81, 734, 613, 630, 418, 815, 656, 81, 81,
01997 746, 762, -107, 749, 419, 420, 398, 856, -106, 752,
01998 308, 190, 487, 494, 671, 751, 777, 779, 867, 754,
01999 770, 776, 784, 786, -265, 81, 81, 672, 456, 457,
02000 458, 707, 782, -98, 691, 793, -102, 81, 872, -97,
02001 110, 770, 110, 748, 783, 748, 748, 659, 735, -104,
02002 623, 624, 625, 626, 110, 110, 822, 254, 110, 329,
02003 330, 331, 332, 333, 762, 208, -101, -93, 729, 862,
02004 842, 828, 866, 848, 849, 81, 851, 853, 208, 855,
02005 -95, 860, 81, 81, -266, 864, 81, 110, 110, 881,
02006 882, 886, 687, 890, 876, 455, 892, -92, 894, 682,
02007 110, 684, 81, 891, 896, 905, 622, 901, 623, 624,
02008 625, 626, 748, 748, 898, 748, 308, 748, 748, 904,
02009 -267, 110, 110, 929, 903, 110, 938, 930, 941, 308,
02010 263, 321, 322, 949, 858, 943, 932, 946, 456, 457,
02011 460, 959, 914, 627, 321, 322, 81, 961, 263, 628,
02012 629, 795, -551, -552, 455, 983, 606, 81, 364, 347,
02013 455, 338, 977, 825, 338, 329, 330, 331, 332, 333,
02014 630, 382, 940, 631, 802, 326, 327, 328, 329, 330,
02015 331, 332, 333, 976, 748, 748, 748, 383, 748, 748,
02016 750, 811, 753, 277, 376, 928, 632, 456, 457, 462,
02017 81, 906, 81, 456, 457, 466, 765, 834, 81, 0,
02018 81, 771, 748, 748, 748, 748, 735, 0, 623, 624,
02019 625, 626, 0, 0, 201, 0, 0, 756, 757, 414,
02020 758, 681, 795, 208, 0, 110, 44, 45, 0, 528,
02021 0, 0, 0, 537, 0, 748, 748, 748, 748, 669,
02022 528, 0, 0, 736, 0, 110, 0, 110, 110, 748,
02023 338, 110, 0, 110, 0, 812, 0, 748, 110, 0,
02024 0, 0, 0, 817, 818, 308, 0, 0, 0, 110,
02025 110, 0, 868, 0, 869, 0, 0, 823, 0, 0,
02026 321, 322, 0, 0, 877, 0, 0, 0, 829, 879,
02027 831, 832, 837, 0, 735, 840, 623, 624, 625, 626,
02028 0, 0, 841, 0, 0, 850, 0, 852, 854, 0,
02029 0, 0, 0, 328, 329, 330, 331, 332, 333, 0,
02030 110, 110, 110, 110, 110, 110, 110, 110, 0, 0,
02031 110, 736, 110, 0, 0, 110, 0, 737, 0, 843,
02032 863, 623, 624, 625, 626, 921, 922, 870, 871, 0,
02033 0, 873, 203, 203, 0, 0, 203, 0, 0, 0,
02034 0, 878, 0, 110, 0, 110, 0, 883, 0, 110,
02035 110, 0, 0, 884, 893, 895, 0, 897, 889, 899,
02036 900, 0, 236, 239, 110, 0, 0, 203, 203, 0,
02037 0, 0, 0, 0, 908, 0, 911, 0, 286, 287,
02038 0, 735, 956, 623, 624, 625, 626, 0, 0, 0,
02039 0, 919, 110, 110, 293, 294, 295, 296, 297, 0,
02040 0, 0, 0, 0, 0, 0, 0, 0, 110, 0,
02041 978, 0, 979, 0, 0, 934, 0, 936, 736, 0,
02042 0, 937, 0, 0, 887, 0, 942, 944, 945, 0,
02043 947, 948, 110, 622, 0, 623, 624, 625, 626, 0,
02044 0, 110, 0, 0, 0, 953, 0, 954, 0, 0,
02045 0, 0, 0, 955, 960, 962, 963, 964, 0, 0,
02046 110, 0, 0, 0, 967, 0, 969, 0, 0, 970,
02047 627, 0, 0, 0, 0, 0, 628, 629, 0, 0,
02048 0, 0, 0, 0, 981, 0, 0, 982, 984, 985,
02049 986, 0, 0, 0, 0, 0, 0, 630, 0, 0,
02050 631, 988, 0, 0, 0, 0, 989, 0, 0, 990,
02051 0, 203, 0, 0, 203, 203, 286, 0, 0, 0,
02052 105, 0, 105, 708, 0, 622, 0, 623, 624, 625,
02053 626, 0, 0, 203, 0, 203, 203, 0, 0, 0,
02054 0, 108, 0, 108, 0, 0, 0, 0, 0, 0,
02055 110, 0, 110, 761, 0, 623, 624, 625, 626, 0,
02056 110, 0, 627, 0, 0, 0, 0, 105, 628, 629,
02057 0, 265, 110, 0, 110, 110, 0, 0, 0, 0,
02058 0, 0, 0, 0, 0, 0, 0, 0, 108, 630,
02059 627, 0, 631, 0, 265, 0, 628, 629, 0, 0,
02060 0, 0, 0, 0, 0, 0, 351, 361, 361, 361,
02061 0, 0, 110, 0, 0, 0, 0, 630, 203, 0,
02062 631, 0, 0, 496, 499, 500, 501, 502, 503, 504,
02063 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
02064 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
02065 0, 203, 0, 0, 0, 0, 0, 0, 0, 0,
02066 0, 0, 110, 0, 0, 0, 0, 0, 0, 0,
02067 110, 0, 0, 110, 110, 0, 0, 0, 0, 110,
02068 110, 0, 308, 309, 310, 311, 312, 313, 314, 315,
02069 316, 317, 318, -574, -574, 0, 0, 321, 322, 0,
02070 579, 581, 0, 0, 0, 110, 0, 0, 110, 110,
02071 585, 203, 203, 0, 0, 105, 203, 110, 579, 581,
02072 203, 0, 0, 0, 110, 110, 324, 325, 326, 327,
02073 328, 329, 330, 331, 332, 333, 108, 0, 0, 605,
02074 0, 0, 0, 0, 610, 0, 0, 0, 105, 0,
02075 0, 110, 110, 203, 0, 0, 203, 0, 0, 105,
02076 105, 0, 0, 110, 0, 0, 0, 0, 203, 108,
02077 0, 0, 0, 0, 0, 0, 0, 0, 0, 265,
02078 108, 108, 0, 0, 0, 0, 0, 0, 650, 651,
02079 0, 110, 0, 0, 0, 0, 0, 0, 0, 0,
02080 203, 110, 0, 0, 110, 0, 0, 0, 110, 110,
02081 105, 0, 110, 0, 0, 105, 0, 0, 0, 0,
02082 0, 0, 105, 265, 0, 0, 0, 109, 110, 109,
02083 0, 108, 0, 0, 0, 0, 108, 0, 0, 0,
02084 0, 0, 0, 108, 0, 0, 0, 0, 0, 0,
02085 0, 0, 0, 0, 0, 105, 0, 106, 0, 106,
02086 0, 0, 0, 0, 203, 0, 0, 0, 203, 0,
02087 0, 0, 110, 0, 109, 78, 108, 78, 267, 0,
02088 203, 0, 0, 110, 0, 0, 0, 0, 0, 0,
02089 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02090 0, 267, 0, 203, 106, 0, 0, 0, 266, 0,
02091 0, 0, 0, 353, 363, 363, 203, 203, 0, 0,
02092 0, 0, 78, 0, 0, 0, 110, 0, 110, 0,
02093 0, 266, 0, 0, 110, 0, 110, 0, 0, 0,
02094 0, 0, 105, 352, 362, 362, 362, 0, 0, 0,
02095 0, 105, 0, 0, 0, 0, 0, 0, 0, 110,
02096 0, 348, 0, 108, 0, 0, 0, 0, 265, 0,
02097 0, 0, 108, 0, 203, 0, 0, 0, 585, 775,
02098 0, 778, 780, 0, 0, 0, 0, 785, 787, -573,
02099 0, 0, 0, 0, 0, 203, 0, -573, -573, -573,
02100 0, 0, -573, -573, -573, 0, -573, 0, 265, 0,
02101 0, 0, 0, 0, 0, 0, -573, 0, 0, 0,
02102 0, 0, 109, 0, 0, 0, -573, -573, 0, -573,
02103 -573, -573, -573, -573, 819, 0, 0, 0, 0, 778,
02104 780, 0, 785, 787, 0, 0, 0, 0, 0, 0,
02105 203, 0, 106, 0, 0, 109, 0, 0, 0, 0,
02106 105, 0, 105, 0, 0, 0, 109, 109, 0, 0,
02107 78, 0, 0, 0, -573, 0, 0, 0, 0, 0,
02108 0, 108, 0, 108, 105, 106, 267, 0, 203, 0,
02109 0, 0, 857, 0, 0, 0, 106, 106, 0, 859,
02110 0, 0, 0, 78, 0, 108, 0, 0, 0, 0,
02111 0, 0, 0, 0, 78, 78, 266, 109, 0, 203,
02112 0, 0, 109, 0, 0, 0, -573, 0, -573, 109,
02113 267, 220, -573, 265, -573, 0, -573, 859, 203, 0,
02114 0, 0, 0, 0, 0, 0, 0, 106, 0, 0,
02115 0, 0, 106, 0, 0, 0, 0, 0, 0, 106,
02116 266, 0, 109, 0, 0, 78, 0, 0, 0, 0,
02117 78, 0, 105, 0, 0, 0, 0, 78, 0, 265,
02118 495, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02119 0, 0, 106, 108, 0, 0, 0, 0, 0, 0,
02120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02121 78, 0, 0, 0, 0, 0, 0, 0, 0, 105,
02122 0, 0, 0, 0, 0, 0, 0, 105, 0, 0,
02123 0, 0, 0, 0, 105, 105, 0, 0, 0, 0,
02124 108, 0, 0, 0, 0, 0, 0, 0, 108, 109,
02125 0, 0, 0, 0, 0, 108, 108, 0, 109, 0,
02126 0, 105, 105, 0, 0, 0, 0, 203, 0, 0,
02127 0, 0, 0, 105, 0, 267, 0, 0, 0, 106,
02128 0, 0, 108, 108, 0, 0, 0, 0, 106, 0,
02129 0, 0, 0, 0, 108, 0, 0, 78, 0, 0,
02130 0, 0, 0, 0, 0, 266, 78, 0, 0, 0,
02131 0, 105, 0, 0, 0, 267, 0, 0, 105, 105,
02132 0, 0, 105, 0, 0, 0, 0, 0, 0, 0,
02133 0, 0, 108, 0, 0, 0, 0, 0, 105, 108,
02134 108, 0, 0, 108, 0, 266, 0, 0, 0, 0,
02135 0, 0, 0, 0, 0, 0, 0, 0, 0, 108,
02136 361, 0, 0, 0, 0, 0, 0, 109, 0, 109,
02137 0, 0, 0, 0, 0, 0, 0, 0, 915, 0,
02138 0, 0, 105, 0, 0, 0, 0, 0, 0, 0,
02139 0, 109, 0, 105, 0, 0, 0, 106, 0, 106,
02140 0, 0, 0, 108, 0, 0, 0, 0, 0, 0,
02141 0, 0, 0, 0, 108, 78, 0, 78, 0, 0,
02142 0, 106, 0, 0, 0, 0, 0, 0, 0, 0,
02143 0, 0, 0, 0, 0, 0, 105, 0, 105, 78,
02144 267, 0, 0, 0, 105, 0, 105, 0, 0, 0,
02145 0, 0, 0, 0, 0, 0, 0, 108, 0, 108,
02146 0, 0, 0, 0, 0, 108, 0, 108, 0, 0,
02147 266, 760, 0, 0, 0, 0, 0, 0, 0, 109,
02148 0, 0, 0, 0, 0, 0, 267, 0, 0, 0,
02149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02150 0, 0, 308, -574, -574, -574, -574, 313, 314, 106,
02151 0, -574, -574, 0, 0, 0, 266, 321, 322, 0,
02152 0, 0, 0, 0, 0, 0, 109, 78, 0, 0,
02153 0, 0, 0, 0, 109, 495, 0, 0, 0, 0,
02154 0, 109, 109, 0, 0, 0, 324, 325, 326, 327,
02155 328, 329, 330, 331, 332, 333, 106, 0, 0, 0,
02156 0, 0, 0, 0, 106, 0, 0, 0, 109, 109,
02157 0, 106, 106, 0, 78, 0, 0, 0, 0, 0,
02158 109, 0, 78, 0, 0, 0, 0, 0, 0, 78,
02159 78, 308, 309, 310, 311, 312, 313, 314, 106, 106,
02160 317, 318, 0, 0, 0, 0, 321, 322, 0, 0,
02161 106, 0, 0, 0, 0, 0, 78, 78, 109, 0,
02162 0, 0, 0, 0, 0, 109, 109, 0, 78, 109,
02163 0, 0, 0, 0, 0, 324, 325, 326, 327, 328,
02164 329, 330, 331, 332, 333, 109, 0, 0, 106, 0,
02165 0, 0, 0, 0, 0, 106, 106, 0, 0, 106,
02166 0, 0, 0, 0, 0, 0, 78, 363, 0, 0,
02167 0, 0, 0, 78, 78, 106, 0, 78, 0, 0,
02168 0, 0, 0, 0, 0, 917, 0, 0, 0, 109,
02169 0, 0, 0, 78, 0, 0, 0, 362, 0, 0,
02170 109, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02171 0, 0, 0, 0, 0, 916, 0, 0, 0, 106,
02172 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02173 106, 0, 0, 913, 0, 0, 0, 78, 0, 0,
02174 0, 0, 0, 109, 0, 109, 0, 0, 78, 0,
02175 0, 109, 0, 109, 0, 0, 0, 0, 0, 0,
02176 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02177 0, 0, 0, 106, 0, 106, 0, 0, 0, 0,
02178 0, 106, 0, 106, 0, 0, 0, 0, 0, 0,
02179 0, 78, 0, 78, 0, 0, 0, 0, 0, 78,
02180 0, 78, -573, 4, 0, 5, 6, 7, 8, 9,
02181 0, 0, 0, 10, 11, 0, 0, 0, 12, 0,
02182 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02183 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02184 0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
02185 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02186 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02188 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
02189 0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
02190 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02192 0, 0, 0, -285, 61, 62, 63, 0, 0, 0,
02193 0, -285, -285, -285, 0, 0, -285, -285, -285, 0,
02194 -285, 0, 0, 0, 0, 0, 0, -573, 0, -573,
02195 -285, -285, -285, 0, 0, 0, 0, 0, 0, 0,
02196 -285, -285, 0, -285, -285, -285, -285, -285, 0, 0,
02197 0, 0, 0, 0, 308, 309, 310, 311, 312, 313,
02198 314, 315, 316, 317, 318, 319, 320, 0, 0, 321,
02199 322, -285, -285, -285, -285, -285, -285, -285, -285, -285,
02200 -285, -285, -285, -285, 0, 0, -285, -285, -285, 0,
02201 724, -285, 0, 0, 0, 0, 323, -285, 324, 325,
02202 326, 327, 328, 329, 330, 331, 332, 333, 0, 0,
02203 -285, 0, -105, -285, -285, -285, -285, -285, -285, -285,
02204 -285, -285, -285, -285, -285, 0, 0, 0, 0, 0,
02205 0, 0, 0, 224, 0, 0, 0, 0, 0, 0,
02206 -285, -285, -285, -285, -411, 0, -285, -285, -285, 0,
02207 -285, 0, -411, -411, -411, 0, 0, -411, -411, -411,
02208 0, -411, 0, 0, 0, 0, 0, 0, 0, 0,
02209 -411, -411, -411, 0, 0, 0, 0, 0, 0, 0,
02210 0, -411, -411, 0, -411, -411, -411, -411, -411, 0,
02211 0, 0, 0, 0, 0, 308, 309, 310, 311, 312,
02212 313, 314, 315, 316, 317, 318, 319, 320, 0, 0,
02213 321, 322, -411, -411, -411, -411, -411, -411, -411, -411,
02214 -411, -411, -411, -411, -411, 0, 0, -411, -411, -411,
02215 0, 0, -411, 0, 0, 0, 0, 323, -411, 324,
02216 325, 326, 327, 328, 329, 330, 331, 332, 333, 0,
02217 0, 0, 0, 0, -411, 0, -411, -411, -411, -411,
02218 -411, -411, -411, -411, -411, -411, 0, 0, 0, 0,
02219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02220 -411, -411, -411, -411, -411, -279, 220, -411, -411, -411,
02221 0, -411, 0, -279, -279, -279, 0, 0, -279, -279,
02222 -279, 0, -279, 0, 0, 0, 0, 0, 0, 0,
02223 0, 0, -279, -279, -279, 0, 0, 0, 0, 0,
02224 0, 0, -279, -279, 0, -279, -279, -279, -279, -279,
02225 0, 0, 0, 0, 0, 0, 308, 309, 310, 311,
02226 312, 313, 314, 315, 0, 317, 318, 0, 0, 0,
02227 0, 321, 322, -279, -279, -279, -279, -279, -279, -279,
02228 -279, -279, -279, -279, -279, -279, 0, 0, -279, -279,
02229 -279, 0, 0, -279, 0, 0, 0, 0, 0, -279,
02230 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
02231 0, 0, -279, 0, 0, -279, -279, -279, -279, -279,
02232 -279, -279, -279, -279, -279, -279, -279, 0, 0, 0,
02233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02234 0, 0, -279, -279, -279, -279, -573, 0, -279, -279,
02235 -279, 0, -279, 0, -573, -573, -573, 0, 0, -573,
02236 -573, -573, 0, -573, 0, 0, 0, 0, 0, 0,
02237 0, 0, -573, -573, -573, 0, 0, 0, 0, 0,
02238 0, 0, 0, -573, -573, 0, -573, -573, -573, -573,
02239 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02241 0, 0, 0, 0, -573, -573, -573, -573, -573, -573,
02242 -573, -573, -573, -573, -573, -573, -573, 0, 0, -573,
02243 -573, -573, 0, 0, -573, 0, 0, 0, 0, 0,
02244 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02245 0, 0, 0, 0, 0, 0, -573, 0, -573, -573,
02246 -573, -573, -573, -573, -573, -573, -573, -573, 0, 0,
02247 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02248 0, 0, -573, -573, -573, -573, -573, -292, 220, -573,
02249 -573, -573, 0, -573, 0, -292, -292, -292, 0, 0,
02250 -292, -292, -292, 0, -292, 0, 0, 0, 0, 0,
02251 0, 0, 0, 0, -292, -292, 0, 0, 0, 0,
02252 0, 0, 0, 0, -292, -292, 0, -292, -292, -292,
02253 -292, -292, 0, 0, 0, 0, 0, 0, 0, 0,
02254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02255 0, 0, 0, 0, 0, -292, -292, -292, -292, -292,
02256 -292, -292, -292, -292, -292, -292, -292, -292, 0, 0,
02257 -292, -292, -292, 0, 0, -292, 0, 0, 0, 0,
02258 0, -292, 0, 0, 0, 0, 0, 0, 0, 0,
02259 0, 0, 0, 0, 0, 0, 0, -292, 0, -292,
02260 -292, -292, -292, -292, -292, -292, -292, -292, -292, 0,
02261 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02262 0, 0, 0, 0, -292, -292, -292, -292, -555, 217,
02263 -292, -292, -292, 0, -292, 0, -555, -555, -555, 0,
02264 0, 0, -555, -555, 0, -555, 0, 0, 0, 0,
02265 0, 0, 0, 0, -555, 0, 0, 0, 0, 0,
02266 0, 0, 0, 0, 0, -555, -555, 0, -555, -555,
02267 -555, -555, -555, 0, 0, 0, 0, 0, 0, 0,
02268 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02269 0, 0, 0, 0, 0, 0, -555, -555, -555, -555,
02270 -555, -555, -555, -555, -555, -555, -555, -555, -555, 0,
02271 0, -555, -555, -555, -285, 665, 0, 0, 0, 0,
02272 0, 0, -285, -285, -285, 0, 0, 0, -285, -285,
02273 0, -285, 0, 0, 0, 0, 0, -103, -555, 0,
02274 -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
02275 0, -285, -285, 0, -285, -285, -285, -285, -285, 0,
02276 0, 0, 0, 0, -555, -555, -555, -555, -94, 0,
02277 0, -555, 0, -555, 0, -555, 0, 0, 0, 0,
02278 0, 0, -285, -285, -285, -285, -285, -285, -285, -285,
02279 -285, -285, -285, -285, -285, 0, 0, -285, -285, -285,
02280 0, 666, 0, 0, 0, 0, 0, 0, 0, 0,
02281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02282 0, 0, 0, -105, -285, 0, -285, -285, -285, -285,
02283 -285, -285, -285, -285, -285, -285, 0, 0, 0, 0,
02284 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02285 0, -285, -285, -285, -96, 0, 0, -285, 0, -285,
02286 241, -285, 5, 6, 7, 8, 9, -573, -573, -573,
02287 10, 11, 0, 0, -573, 12, 0, 13, 14, 15,
02288 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
02289 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
02290 0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
02291 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02292 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02293 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02294 0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
02295 0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
02296 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02298 0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
02299 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02300 0, 0, 0, 0, -573, 241, -573, 5, 6, 7,
02301 8, 9, 0, 0, -573, 10, 11, 0, -573, -573,
02302 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
02303 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
02304 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
02305 29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
02306 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02307 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
02308 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02309 48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
02310 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02311 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02312 0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
02313 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02314 0, 0, 0, 0, 0, 0, 0, 0, 0, -573,
02315 241, -573, 5, 6, 7, 8, 9, 0, 0, -573,
02316 10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
02317 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
02318 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
02319 0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
02320 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02321 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02323 0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
02324 0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
02325 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02326 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02327 0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
02328 4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
02329 10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
02330 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
02331 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
02332 0, 0, 0, 0, 28, 29, 30, 31, 32, 33,
02333 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02334 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02335 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02336 0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
02337 0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
02338 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02339 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02340 0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
02341 0, 0, 0, 0, 0, 0, -573, 0, 0, 0,
02342 0, 0, 0, 0, -573, 241, -573, 5, 6, 7,
02343 8, 9, 0, 0, -573, 10, 11, 0, 0, -573,
02344 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
02345 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
02346 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
02347 29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
02348 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02349 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
02350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02351 48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
02352 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02353 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02354 0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
02355 0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
02356 8, 9, 0, -573, -573, 10, 11, 0, 0, -573,
02357 12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
02358 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
02359 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
02360 29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
02361 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02362 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
02363 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02364 48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
02365 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02366 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02367 0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
02368 0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
02369 8, 9, 0, 0, 0, 10, 11, 0, 0, -573,
02370 12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
02371 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
02372 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
02373 29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
02374 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02375 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
02376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02377 48, 0, 0, 242, 50, 0, 51, 52, 0, 53,
02378 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02379 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02380 0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
02381 0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
02382 8, 9, 0, 0, 0, 10, 11, -573, 0, -573,
02383 12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
02384 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
02385 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
02386 29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
02387 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02388 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
02389 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02390 48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
02391 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02393 0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
02394 0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
02395 8, 9, 0, 0, 0, 10, 11, -573, 0, -573,
02396 12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
02397 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
02398 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
02399 29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
02400 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02401 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
02402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02403 48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
02404 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02406 0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
02407 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02408 0, -573, 0, 0, 0, 0, 0, 0, 0, -573,
02409 241, -573, 5, 6, 7, 8, 9, 0, 0, -573,
02410 10, 11, 0, 0, 0, 12, 0, 13, 14, 15,
02411 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
02412 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
02413 0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
02414 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02415 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02416 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02417 0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
02418 0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
02419 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02420 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02421 0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
02422 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
02423 10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
02424 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
02425 21, 22, 23, 24, 25, 26, 0, 0, 194, 0,
02426 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
02427 34, 35, 36, 37, 38, 39, 40, 195, 41, 42,
02428 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02429 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02430 0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
02431 0, 51, 52, 0, 198, 199, 54, 55, 56, 57,
02432 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02433 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
02434 11, 61, 200, 63, 12, 0, 13, 14, 15, 16,
02435 17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
02436 22, 23, 24, 25, 26, 0, 224, 27, 0, 0,
02437 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
02438 35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
02439 43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
02440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02441 0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
02442 51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
02443 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
02444 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02445 61, 62, 63, 0, 0, 0, 0, 0, 0, 0,
02446 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
02447 11, 0, 0, 288, 12, 289, 13, 14, 15, 16,
02448 17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
02449 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
02450 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
02451 35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
02452 43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
02453 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02454 0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
02455 51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
02456 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
02457 5, 6, 7, 8, 9, 0, 0, 0, 10, 11,
02458 61, 62, 63, 12, 0, 13, 14, 15, 16, 17,
02459 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
02460 23, 24, 25, 26, 0, 224, 27, 0, 0, 0,
02461 0, 0, 28, 29, 30, 31, 32, 33, 34, 35,
02462 36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
02463 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02464 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02465 0, 0, 0, 48, 0, 0, 49, 50, 0, 51,
02466 52, 0, 53, 0, 54, 55, 56, 57, 58, 59,
02467 60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02468 0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
02469 62, 63, 0, 0, 0, 0, 0, 0, 5, 6,
02470 7, 8, 9, 0, 0, 0, 10, 11, 0, 0,
02471 0, 12, 474, 13, 14, 15, 16, 17, 18, 19,
02472 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
02473 25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
02474 28, 29, 0, 31, 32, 33, 34, 35, 36, 37,
02475 38, 39, 40, 0, 41, 42, 0, 43, 44, 45,
02476 0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
02477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02478 0, 48, 0, 0, 49, 50, 0, 51, 52, 0,
02479 53, 0, 54, 55, 56, 57, 58, 59, 60, 0,
02480 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02481 0, 0, 0, 0, 0, 0, 0, 61, 62, 63,
02482 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02483 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02484 474, 113, 114, 115, 116, 117, 118, 119, 120, 121,
02485 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
02486 132, 133, 134, 135, 136, 0, 0, 0, 137, 138,
02487 139, 365, 366, 367, 368, 144, 145, 146, 0, 0,
02488 0, 0, 0, 147, 148, 149, 150, 369, 370, 371,
02489 372, 155, 37, 38, 373, 40, 0, 0, 0, 0,
02490 0, 0, 0, 0, 157, 158, 159, 160, 161, 162,
02491 163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
02492 169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
02493 0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
02494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02495 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
02496 0, 183, 184, 0, 0, 0, 0, 0, -548, -548,
02497 -548, 0, -548, 0, 0, 0, -548, -548, 0, 185,
02498 374, -548, 0, -548, -548, -548, -548, -548, -548, -548,
02499 0, -548, 0, 0, 0, -548, -548, -548, -548, -548,
02500 -548, -548, 0, 0, -548, 0, 0, 0, 0, 0,
02501 0, -548, 0, 0, -548, -548, -548, -548, -548, -548,
02502 -548, -548, -548, -548, -548, -548, 0, -548, -548, -548,
02503 0, -548, -548, 0, 0, 0, 0, 0, 0, 0,
02504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02505 0, -548, 0, 0, -548, -548, 0, -548, -548, 0,
02506 -548, -548, -548, -548, -548, -548, -548, -548, -548, 0,
02507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02508 0, 0, 0, 0, 0, 0, 0, -548, -548, -548,
02509 0, 0, 0, 0, 0, -549, -549, -549, 0, -549,
02510 0, -548, 0, -549, -549, 0, 0, -548, -549, 0,
02511 -549, -549, -549, -549, -549, -549, -549, 0, -549, 0,
02512 0, 0, -549, -549, -549, -549, -549, -549, -549, 0,
02513 0, -549, 0, 0, 0, 0, 0, 0, -549, 0,
02514 0, -549, -549, -549, -549, -549, -549, -549, -549, -549,
02515 -549, -549, -549, 0, -549, -549, -549, 0, -549, -549,
02516 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02517 0, 0, 0, 0, 0, 0, 0, 0, -549, 0,
02518 0, -549, -549, 0, -549, -549, 0, -549, -549, -549,
02519 -549, -549, -549, -549, -549, -549, 0, 0, 0, 0,
02520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02521 0, 0, 0, 0, -549, -549, -549, 0, 0, 0,
02522 0, 0, -551, -551, -551, 0, -551, 0, -549, 0,
02523 -551, -551, 0, 0, -549, -551, 0, -551, -551, -551,
02524 -551, -551, -551, -551, 0, 0, 0, 0, 0, -551,
02525 -551, -551, -551, -551, -551, -551, 0, 0, -551, 0,
02526 0, 0, 0, 0, 0, -551, 0, 0, -551, -551,
02527 -551, -551, -551, -551, -551, -551, -551, -551, -551, -551,
02528 0, -551, -551, -551, 0, -551, -551, 0, 0, 0,
02529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02530 0, 0, 0, 0, 0, -551, 723, 0, -551, -551,
02531 0, -551, -551, 0, -551, -551, -551, -551, -551, -551,
02532 -551, -551, -551, 0, 0, 0, 0, 0, -103, 0,
02533 0, 0, 0, 0, 0, 0, -553, -553, -553, 0,
02534 -553, -551, -551, -551, -553, -553, 0, 0, 0, -553,
02535 0, -553, -553, -553, -553, -553, -553, -553, 0, 0,
02536 0, -551, 0, -553, -553, -553, -553, -553, -553, -553,
02537 0, 0, -553, 0, 0, 0, 0, 0, 0, -553,
02538 0, 0, -553, -553, -553, -553, -553, -553, -553, -553,
02539 -553, -553, -553, -553, 0, -553, -553, -553, 0, -553,
02540 -553, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02541 0, 0, 0, 0, 0, 0, 0, 0, 0, -553,
02542 0, 0, -553, -553, 0, -553, -553, 0, -553, -553,
02543 -553, -553, -553, -553, -553, -553, -553, 0, 0, 0,
02544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02545 -554, -554, -554, 0, -554, -553, -553, -553, -554, -554,
02546 0, 0, 0, -554, 0, -554, -554, -554, -554, -554,
02547 -554, -554, 0, 0, 0, -553, 0, -554, -554, -554,
02548 -554, -554, -554, -554, 0, 0, -554, 0, 0, 0,
02549 0, 0, 0, -554, 0, 0, -554, -554, -554, -554,
02550 -554, -554, -554, -554, -554, -554, -554, -554, 0, -554,
02551 -554, -554, 0, -554, -554, 0, 0, 0, 0, 0,
02552 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02553 0, 0, 0, -554, 0, 0, -554, -554, 0, -554,
02554 -554, 0, -554, -554, -554, -554, -554, -554, -554, -554,
02555 -554, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02556 0, 0, 0, 0, 0, 0, 0, 0, 0, -554,
02557 -554, -554, 0, 0, 0, 0, 0, 0, 0, 0,
02558 0, 0, 0, 0, 0, 0, 0, 0, 0, -554,
02559 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
02560 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
02561 133, 134, 135, 136, 0, 0, 0, 137, 138, 139,
02562 140, 141, 142, 143, 144, 145, 146, 0, 0, 0,
02563 0, 0, 147, 148, 149, 150, 151, 152, 153, 154,
02564 155, 270, 271, 156, 272, 0, 0, 0, 0, 0,
02565 0, 0, 0, 157, 158, 159, 160, 161, 162, 163,
02566 164, 165, 0, 0, 166, 167, 0, 0, 168, 169,
02567 170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
02568 0, 0, 172, 0, 0, 0, 0, 0, 0, 0,
02569 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
02570 174, 175, 176, 177, 178, 179, 180, 181, 182, 0,
02571 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
02572 0, 0, 0, 0, 0, 0, 0, 0, 185, 113,
02573 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
02574 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
02575 134, 135, 136, 0, 0, 0, 137, 138, 139, 140,
02576 141, 142, 143, 144, 145, 146, 0, 0, 0, 0,
02577 0, 147, 148, 149, 150, 151, 152, 153, 154, 155,
02578 226, 0, 156, 0, 0, 0, 0, 0, 0, 0,
02579 0, 0, 157, 158, 159, 160, 161, 162, 163, 164,
02580 165, 0, 0, 166, 167, 0, 0, 168, 169, 170,
02581 171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02582 0, 172, 0, 0, 55, 0, 0, 0, 0, 0,
02583 0, 0, 0, 0, 0, 0, 0, 0, 173, 174,
02584 175, 176, 177, 178, 179, 180, 181, 182, 0, 183,
02585 184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02586 0, 0, 0, 0, 0, 0, 0, 185, 113, 114,
02587 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
02588 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
02589 135, 136, 0, 0, 0, 137, 138, 139, 140, 141,
02590 142, 143, 144, 145, 146, 0, 0, 0, 0, 0,
02591 147, 148, 149, 150, 151, 152, 153, 154, 155, 0,
02592 0, 156, 0, 0, 0, 0, 0, 0, 0, 0,
02593 0, 157, 158, 159, 160, 161, 162, 163, 164, 165,
02594 0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
02595 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02596 172, 0, 0, 55, 0, 0, 0, 0, 0, 0,
02597 0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
02598 176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
02599 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02600 0, 0, 0, 0, 0, 0, 185, 113, 114, 115,
02601 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
02602 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
02603 136, 0, 0, 0, 137, 138, 139, 140, 141, 142,
02604 143, 144, 145, 146, 0, 0, 0, 0, 0, 147,
02605 148, 149, 150, 151, 152, 153, 154, 155, 0, 0,
02606 156, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02607 157, 158, 159, 160, 161, 162, 163, 164, 165, 0,
02608 0, 166, 167, 0, 0, 168, 169, 170, 171, 0,
02609 0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
02610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02611 0, 0, 0, 0, 0, 0, 173, 174, 175, 176,
02612 177, 178, 179, 180, 181, 182, 0, 183, 184, 0,
02613 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
02614 11, 0, 0, 0, 12, 185, 13, 14, 15, 231,
02615 232, 18, 19, 0, 0, 0, 0, 0, 233, 234,
02616 235, 23, 24, 25, 26, 0, 0, 194, 0, 0,
02617 0, 0, 0, 0, 258, 0, 0, 32, 33, 34,
02618 35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
02619 43, 44, 45, 0, 0, 0, 0, 0, 0, 0,
02620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02621 0, 0, 0, 0, 259, 0, 0, 197, 50, 0,
02622 51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
02623 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
02624 0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
02625 260, 10, 11, 0, 0, 0, 12, 0, 13, 14,
02626 15, 231, 232, 18, 19, 0, 0, 0, 261, 0,
02627 233, 234, 235, 23, 24, 25, 26, 0, 0, 194,
02628 0, 0, 0, 0, 0, 0, 258, 0, 0, 32,
02629 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
02630 42, 0, 43, 44, 45, 0, 0, 0, 0, 0,
02631 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02632 0, 0, 0, 0, 0, 0, 259, 0, 0, 197,
02633 50, 0, 51, 52, 0, 0, 0, 54, 55, 56,
02634 57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
02635 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
02636 0, 0, 260, 10, 11, 0, 0, 0, 12, 0,
02637 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02638 490, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02639 0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
02640 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02641 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02643 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
02644 0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
02645 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02646 0, 0, 0, 0, 5, 6, 7, 8, 9, 0,
02647 0, 0, 10, 11, 61, 62, 63, 12, 0, 13,
02648 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
02649 0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
02650 27, 0, 0, 0, 0, 0, 28, 29, 0, 31,
02651 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
02652 41, 42, 0, 43, 44, 45, 0, 46, 47, 0,
02653 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02654 0, 0, 0, 0, 0, 0, 0, 48, 0, 0,
02655 49, 50, 0, 51, 52, 0, 53, 0, 54, 55,
02656 56, 57, 58, 59, 60, 0, 0, 0, 0, 0,
02657 0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
02658 0, 10, 11, 61, 62, 63, 12, 0, 13, 14,
02659 15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
02660 20, 21, 22, 23, 24, 25, 26, 0, 0, 194,
02661 0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
02662 33, 34, 35, 36, 37, 38, 39, 40, 195, 41,
02663 42, 0, 43, 44, 45, 0, 46, 47, 0, 0,
02664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02665 0, 0, 0, 0, 0, 0, 196, 0, 0, 197,
02666 50, 0, 51, 52, 0, 198, 199, 54, 55, 56,
02667 57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
02668 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
02669 10, 11, 61, 200, 63, 12, 0, 13, 14, 15,
02670 231, 232, 18, 19, 0, 0, 0, 0, 0, 233,
02671 234, 235, 23, 24, 25, 26, 0, 0, 194, 0,
02672 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
02673 34, 35, 36, 37, 38, 39, 40, 195, 41, 42,
02674 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02676 0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
02677 0, 51, 52, 0, 587, 199, 54, 55, 56, 57,
02678 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02679 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
02680 11, 61, 200, 63, 12, 0, 13, 14, 15, 231,
02681 232, 18, 19, 0, 0, 0, 0, 0, 233, 234,
02682 235, 23, 24, 25, 26, 0, 0, 194, 0, 0,
02683 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
02684 35, 36, 37, 38, 39, 40, 195, 41, 42, 0,
02685 43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
02686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02687 0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
02688 51, 52, 0, 198, 0, 54, 55, 56, 57, 58,
02689 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
02690 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
02691 61, 200, 63, 12, 0, 13, 14, 15, 231, 232,
02692 18, 19, 0, 0, 0, 0, 0, 233, 234, 235,
02693 23, 24, 25, 26, 0, 0, 194, 0, 0, 0,
02694 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
02695 36, 37, 38, 39, 40, 195, 41, 42, 0, 43,
02696 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02698 0, 0, 0, 196, 0, 0, 197, 50, 0, 51,
02699 52, 0, 0, 199, 54, 55, 56, 57, 58, 59,
02700 60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
02701 6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
02702 200, 63, 12, 0, 13, 14, 15, 231, 232, 18,
02703 19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
02704 24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
02705 0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
02706 37, 38, 39, 40, 195, 41, 42, 0, 43, 44,
02707 45, 0, 46, 47, 0, 0, 0, 0, 0, 0,
02708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02709 0, 0, 196, 0, 0, 197, 50, 0, 51, 52,
02710 0, 587, 0, 54, 55, 56, 57, 58, 59, 60,
02711 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
02712 7, 0, 9, 0, 0, 0, 10, 11, 61, 200,
02713 63, 12, 0, 13, 14, 15, 231, 232, 18, 19,
02714 0, 0, 0, 0, 0, 233, 234, 235, 23, 24,
02715 25, 26, 0, 0, 194, 0, 0, 0, 0, 0,
02716 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
02717 38, 39, 40, 195, 41, 42, 0, 43, 44, 45,
02718 0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
02719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02720 0, 196, 0, 0, 197, 50, 0, 51, 52, 0,
02721 0, 0, 54, 55, 56, 57, 58, 59, 60, 0,
02722 0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
02723 0, 9, 0, 0, 0, 10, 11, 61, 200, 63,
02724 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
02725 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
02726 26, 0, 0, 194, 0, 0, 0, 0, 0, 0,
02727 29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
02728 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02729 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
02730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02731 196, 0, 0, 197, 50, 0, 51, 52, 0, 484,
02732 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02733 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
02734 9, 0, 0, 0, 10, 11, 61, 200, 63, 12,
02735 0, 13, 14, 15, 231, 232, 18, 19, 0, 0,
02736 0, 0, 0, 233, 234, 235, 23, 24, 25, 26,
02737 0, 0, 194, 0, 0, 0, 0, 0, 0, 29,
02738 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
02739 40, 0, 41, 42, 0, 43, 44, 45, 0, 46,
02740 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02741 0, 0, 0, 0, 0, 0, 0, 0, 0, 196,
02742 0, 0, 197, 50, 0, 51, 52, 0, 198, 0,
02743 54, 55, 56, 57, 58, 59, 60, 0, 0, 0,
02744 0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
02745 0, 0, 0, 10, 11, 61, 200, 63, 12, 0,
02746 13, 14, 15, 231, 232, 18, 19, 0, 0, 0,
02747 0, 0, 233, 234, 235, 23, 24, 25, 26, 0,
02748 0, 194, 0, 0, 0, 0, 0, 0, 29, 0,
02749 0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02750 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02752 0, 0, 0, 0, 0, 0, 0, 0, 196, 0,
02753 0, 197, 50, 0, 51, 52, 0, 772, 0, 54,
02754 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02755 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
02756 0, 0, 10, 11, 61, 200, 63, 12, 0, 13,
02757 14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
02758 0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
02759 194, 0, 0, 0, 0, 0, 0, 29, 0, 0,
02760 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
02761 41, 42, 0, 43, 44, 45, 0, 46, 47, 0,
02762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02763 0, 0, 0, 0, 0, 0, 0, 196, 0, 0,
02764 197, 50, 0, 51, 52, 0, 484, 0, 54, 55,
02765 56, 57, 58, 59, 60, 0, 0, 0, 0, 0,
02766 0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
02767 0, 10, 11, 61, 200, 63, 12, 0, 13, 14,
02768 15, 231, 232, 18, 19, 0, 0, 0, 0, 0,
02769 233, 234, 235, 23, 24, 25, 26, 0, 0, 194,
02770 0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
02771 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
02772 42, 0, 43, 44, 45, 0, 46, 47, 0, 0,
02773 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02774 0, 0, 0, 0, 0, 0, 196, 0, 0, 197,
02775 50, 0, 51, 52, 0, 587, 0, 54, 55, 56,
02776 57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
02777 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
02778 10, 11, 61, 200, 63, 12, 0, 13, 14, 15,
02779 231, 232, 18, 19, 0, 0, 0, 0, 0, 233,
02780 234, 235, 23, 24, 25, 26, 0, 0, 194, 0,
02781 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
02782 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02783 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02785 0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
02786 0, 51, 52, 0, 0, 0, 54, 55, 56, 57,
02787 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02788 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
02789 11, 61, 200, 63, 12, 0, 13, 14, 15, 16,
02790 17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
02791 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
02792 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
02793 35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
02794 43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
02795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02796 0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
02797 51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
02798 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
02799 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
02800 61, 62, 63, 12, 0, 13, 14, 15, 16, 17,
02801 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
02802 23, 24, 25, 26, 0, 0, 194, 0, 0, 0,
02803 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
02804 36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
02805 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02807 0, 0, 0, 196, 0, 0, 197, 50, 0, 51,
02808 52, 0, 0, 0, 54, 55, 56, 57, 58, 59,
02809 60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
02810 6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
02811 200, 63, 12, 0, 13, 14, 15, 231, 232, 18,
02812 19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
02813 24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
02814 0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
02815 37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
02816 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02817 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02818 0, 0, 259, 0, 0, 304, 50, 0, 51, 52,
02819 0, 305, 0, 54, 55, 56, 57, 58, 59, 60,
02820 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
02821 0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
02822 14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
02823 0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
02824 194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
02825 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
02826 41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
02827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02828 0, 0, 0, 0, 0, 0, 0, 346, 0, 0,
02829 49, 50, 0, 51, 52, 0, 53, 0, 54, 55,
02830 56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
02831 6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
02832 0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
02833 19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
02834 24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
02835 0, 0, 258, 0, 0, 32, 33, 34, 354, 36,
02836 37, 38, 355, 40, 0, 41, 42, 0, 43, 44,
02837 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02838 0, 0, 0, 0, 0, 0, 0, 0, 0, 356,
02839 0, 0, 357, 0, 0, 197, 50, 0, 51, 52,
02840 0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
02841 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
02842 0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
02843 14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
02844 0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
02845 194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
02846 32, 33, 34, 354, 36, 37, 38, 355, 40, 0,
02847 41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
02848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02849 0, 0, 0, 0, 0, 0, 0, 357, 0, 0,
02850 197, 50, 0, 51, 52, 0, 0, 0, 54, 55,
02851 56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
02852 6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
02853 0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
02854 19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
02855 24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
02856 0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
02857 37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
02858 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02859 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02860 0, 0, 259, 0, 0, 304, 50, 0, 51, 52,
02861 0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
02862 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
02863 0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
02864 14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
02865 0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
02866 194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
02867 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
02868 41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
02869 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02870 0, 0, 0, 0, 0, 0, 0, 902, 0, 0,
02871 197, 50, 0, 51, 52, 0, 0, 0, 54, 55,
02872 56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
02873 6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
02874 0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
02875 19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
02876 24, 25, 26, 0, 0, 194, 0, 663, 0, 0,
02877 0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
02878 37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
02879 45, 308, 309, 310, 311, 312, 313, 314, 315, 316,
02880 317, 318, 319, 320, 0, 0, 321, 322, 0, 0,
02881 0, 0, 912, 0, 0, 197, 50, 0, 51, 52,
02882 0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
02883 0, 0, 0, 323, 0, 324, 325, 326, 327, 328,
02884 329, 330, 331, 332, 333, 0, 0, 0, 260, 0,
02885 525, 526, 0, 0, 527, 0, 0, 0, 0, 0,
02886 0, 0, 0, -241, 157, 158, 159, 160, 161, 162,
02887 163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
02888 169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
02889 0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
02890 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02891 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
02892 0, 183, 184, 0, 0, 0, 0, 533, 534, 0,
02893 0, 535, 0, 0, 0, 0, 0, 0, 0, 185,
02894 220, 157, 158, 159, 160, 161, 162, 163, 164, 165,
02895 0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
02896 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02897 172, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02898 0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
02899 176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
02900 0, 0, 0, 0, 591, 526, 0, 0, 592, 0,
02901 0, 0, 0, 0, 0, 0, 185, 220, 157, 158,
02902 159, 160, 161, 162, 163, 164, 165, 0, 0, 166,
02903 167, 0, 0, 168, 169, 170, 171, 0, 0, 0,
02904 0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
02905 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02906 0, 0, 0, 0, 173, 174, 175, 176, 177, 178,
02907 179, 180, 181, 182, 0, 183, 184, 0, 0, 0,
02908 0, 594, 534, 0, 0, 595, 0, 0, 0, 0,
02909 0, 0, 0, 185, 220, 157, 158, 159, 160, 161,
02910 162, 163, 164, 165, 0, 0, 166, 167, 0, 0,
02911 168, 169, 170, 171, 0, 0, 0, 0, 0, 0,
02912 0, 0, 0, 0, 172, 0, 0, 0, 0, 0,
02913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02914 0, 173, 174, 175, 176, 177, 178, 179, 180, 181,
02915 182, 0, 183, 184, 0, 0, 0, 0, 617, 526,
02916 0, 0, 618, 0, 0, 0, 0, 0, 0, 0,
02917 185, 220, 157, 158, 159, 160, 161, 162, 163, 164,
02918 165, 0, 0, 166, 167, 0, 0, 168, 169, 170,
02919 171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02920 0, 172, 0, 0, 0, 0, 0, 0, 0, 0,
02921 0, 0, 0, 0, 0, 0, 0, 0, 173, 174,
02922 175, 176, 177, 178, 179, 180, 181, 182, 0, 183,
02923 184, 0, 0, 0, 0, 620, 534, 0, 0, 621,
02924 0, 0, 0, 0, 0, 0, 0, 185, 220, 157,
02925 158, 159, 160, 161, 162, 163, 164, 165, 0, 0,
02926 166, 167, 0, 0, 168, 169, 170, 171, 0, 0,
02927 0, 0, 0, 0, 0, 0, 0, 0, 172, 0,
02928 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02929 0, 0, 0, 0, 0, 173, 174, 175, 176, 177,
02930 178, 179, 180, 181, 182, 0, 183, 184, 0, 0,
02931 0, 0, 692, 526, 0, 0, 693, 0, 0, 0,
02932 0, 0, 0, 0, 185, 220, 157, 158, 159, 160,
02933 161, 162, 163, 164, 165, 0, 0, 166, 167, 0,
02934 0, 168, 169, 170, 171, 0, 0, 0, 0, 0,
02935 0, 0, 0, 0, 0, 172, 0, 0, 0, 0,
02936 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02937 0, 0, 173, 174, 175, 176, 177, 178, 179, 180,
02938 181, 182, 0, 183, 184, 0, 0, 0, 0, 695,
02939 534, 0, 0, 696, 0, 0, 0, 0, 0, 0,
02940 0, 185, 220, 157, 158, 159, 160, 161, 162, 163,
02941 164, 165, 0, 0, 166, 167, 0, 0, 168, 169,
02942 170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
02943 0, 0, 172, 0, 0, 0, 0, 0, 0, 0,
02944 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
02945 174, 175, 176, 177, 178, 179, 180, 181, 182, 0,
02946 183, 184, 0, 0, 0, 0, 702, 526, 0, 0,
02947 703, 0, 0, 0, 0, 0, 0, 0, 185, 220,
02948 157, 158, 159, 160, 161, 162, 163, 164, 165, 0,
02949 0, 166, 167, 0, 0, 168, 169, 170, 171, 0,
02950 0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
02951 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02952 0, 0, 0, 0, 0, 0, 173, 174, 175, 176,
02953 177, 178, 179, 180, 181, 182, 0, 183, 184, 0,
02954 0, 0, 0, 572, 534, 0, 0, 573, 0, 0,
02955 0, 0, 0, 0, 0, 185, 220, 157, 158, 159,
02956 160, 161, 162, 163, 164, 165, 0, 0, 166, 167,
02957 0, 0, 168, 169, 170, 171, 0, 0, 0, 0,
02958 0, 0, 0, 0, 0, 0, 172, 0, 0, 0,
02959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02960 0, 0, 0, 173, 174, 175, 176, 177, 178, 179,
02961 180, 181, 182, 0, 183, 184, 0, 0, 0, 0,
02962 965, 526, 0, 0, 966, 0, 0, 0, 0, 0,
02963 0, 0, 185, 220, 157, 158, 159, 160, 161, 162,
02964 163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
02965 169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
02966 0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
02967 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02968 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
02969 0, 183, 184, 0, 0, 0, 0, 971, 526, 0,
02970 0, 972, 0, 0, 0, 0, 0, 0, 0, 185,
02971 220, 157, 158, 159, 160, 161, 162, 163, 164, 165,
02972 0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
02973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02974 172, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02975 0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
02976 176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
02977 0, 0, 0, 0, 974, 534, 0, 0, 975, 0,
02978 0, 0, 0, 0, 0, 0, 185, 220, 157, 158,
02979 159, 160, 161, 162, 163, 164, 165, 0, 0, 166,
02980 167, 0, 0, 168, 169, 170, 171, 0, 0, 0,
02981 0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
02982 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02983 0, 0, 0, 0, 173, 174, 175, 176, 177, 178,
02984 179, 180, 181, 182, 0, 183, 184, 0, 0, 0,
02985 0, 572, 534, 0, 0, 573, 0, 0, 0, 0,
02986 0, 0, 0, 185, 220, 157, 158, 159, 160, 161,
02987 162, 163, 164, 165, 0, 0, 166, 167, 0, 0,
02988 168, 169, 170, 171, 0, 0, 0, 0, 0, 0,
02989 0, 0, 0, 0, 172, 0, 0, 0, 0, 0,
02990 0, 0, 718, 0, 0, 0, 0, 0, 0, 0,
02991 0, 173, 174, 175, 176, 177, 178, 179, 180, 181,
02992 182, 663, 183, 184, 0, 0, 308, 309, 310, 311,
02993 312, 313, 314, 315, 316, 317, 318, 319, 320, 0,
02994 185, 321, 322, 0, 0, 308, 309, 310, 311, 312,
02995 313, 314, 315, 316, 317, 318, 319, 320, 0, 0,
02996 321, 322, 0, 0, 0, 0, 0, 0, 323, 0,
02997 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
02998 0, 0, 0, 0, 0, 0, 0, 323, 0, 324,
02999 325, 326, 327, 328, 329, 330, 331, 332, 333
03000 };
03001
03002 #define yypact_value_is_default(yystate) \
03003 ((yystate) == (-747))
03004
03005 #define yytable_value_is_error(yytable_value) \
03006 ((yytable_value) == (-574))
03007
03008 static const yytype_int16 yycheck[] =
03009 {
03010 2, 55, 340, 28, 2, 454, 4, 52, 593, 16,
03011 17, 335, 307, 20, 307, 8, 547, 213, 16, 17,
03012 8, 566, 20, 27, 53, 29, 84, 22, 8, 87,
03013 546, 87, 4, 22, 619, 28, 49, 91, 252, 76,
03014 28, 2, 256, 4, 404, 357, 1, 65, 28, 51,
03015 52, 49, 50, 749, 450, 53, 746, 13, 334, 627,
03016 336, 53, 680, 25, 62, 762, 684, 454, 13, 16,
03017 17, 65, 26, 20, 396, 55, 400, 26, 76, 25,
03018 440, 0, 404, 27, 76, 83, 84, 576, 577, 87,
03019 88, 89, 90, 87, 490, 29, 88, 89, 90, 13,
03020 242, 25, 378, 379, 51, 851, 828, 85, 76, 694,
03021 136, 91, 87, 16, 17, 110, 147, 20, 85, 568,
03022 705, 110, 146, 399, 25, 401, 85, 653, 452, 61,
03023 87, 16, 17, 62, 109, 20, 276, 25, 278, 56,
03024 280, 13, 742, 37, 38, 87, 114, 109, 51, 52,
03025 195, 427, 109, 198, 199, 826, 701, 28, 113, 849,
03026 138, 139, 304, 763, 709, 140, 25, 109, 736, 737,
03027 25, 13, 139, 107, 106, 146, 13, 453, 140, 138,
03028 139, 143, 136, 632, 140, 147, 109, 136, 244, 145,
03029 145, 147, 147, 142, 140, 941, 892, 142, 140, 197,
03030 145, 145, 147, 147, 653, 207, 896, 904, 930, 140,
03031 217, 213, 219, 220, 25, 886, 140, 413, 220, 217,
03032 746, 219, 220, 749, 261, 223, 244, 225, 552, 242,
03033 719, 145, 230, 147, 50, 293, 294, 295, 296, 140,
03034 564, 601, 142, 241, 242, 632, 235, 147, 109, 238,
03035 244, 563, 140, 147, 258, 873, 99, 302, 826, 708,
03036 828, 932, 307, 261, 25, 661, 87, 83, 84, 261,
03037 217, 87, 219, 145, 140, 147, 305, 553, 600, 601,
03038 241, 140, 25, 341, 342, 140, 25, 343, 959, 565,
03039 806, 304, 85, 87, 292, 293, 294, 295, 296, 297,
03040 298, 299, 85, 145, 302, 147, 304, 305, 145, 307,
03041 147, 59, 60, 305, 217, 109, 219, 26, 886, 887,
03042 292, 708, 109, 849, 142, 851, 49, 467, 335, 140,
03043 875, 292, 217, 335, 219, 56, 297, 335, 145, 337,
03044 147, 87, 873, 341, 342, 138, 139, 336, 88, 343,
03045 395, 396, 690, 140, 334, 302, 139, 26, 356, 404,
03046 307, 140, 930, 109, 932, 359, 892, 85, 147, 662,
03047 109, 85, 109, 302, 61, 26, 85, 140, 307, 140,
03048 15, 142, 17, 928, 679, 87, 384, 385, 973, 85,
03049 85, 959, 437, 400, 590, 440, 421, 140, 400, 142,
03050 614, 140, 400, 85, 143, 140, 85, 223, 147, 225,
03051 412, 413, 401, 450, 142, 941, 85, 104, 105, 399,
03052 138, 139, 424, 136, 142, 139, 424, 136, 421, 138,
03053 139, 880, 85, 421, 85, 433, 85, 142, 427, 484,
03054 140, 421, 138, 139, 139, 452, 426, 147, 85, 142,
03055 452, 85, 450, 490, 452, 384, 385, 139, 450, 146,
03056 139, 85, 822, 424, 453, 68, 85, 136, 85, 138,
03057 139, 451, 433, 142, 197, 87, 85, 293, 294, 295,
03058 296, 483, 298, 299, 68, 136, 139, 138, 139, 138,
03059 139, 142, 490, 396, 85, 37, 38, 109, 490, 668,
03060 822, 223, 139, 548, 138, 139, 675, 230, 109, 52,
03061 514, 54, 55, 56, 57, 139, 119, 120, 121, 242,
03062 139, 138, 139, 861, 246, 341, 342, 143, 532, 867,
03063 139, 26, 728, 52, 437, 530, 538, 56, 540, 85,
03064 356, 530, 587, 538, 542, 552, 544, 138, 139, 538,
03065 552, 545, 546, 56, 552, 600, 601, 564, 85, 584,
03066 59, 60, 564, 144, 553, 559, 564, 137, 566, 567,
03067 106, 551, 574, 575, 576, 577, 565, 87, 615, 574,
03068 575, 304, 140, 563, 106, 574, 575, 87, 590, 593,
03069 85, 584, 138, 139, 87, 85, 584, 140, 68, 109,
03070 68, 548, 14, 15, 584, 85, 604, 609, 85, 109,
03071 140, 138, 139, 658, 17, 619, 109, 615, 56, 608,
03072 609, 574, 575, 615, 661, 145, 25, 951, 52, 94,
03073 54, 55, 56, 57, 679, 143, 638, 146, 640, 697,
03074 642, 136, 700, 138, 139, 137, 140, 142, 138, 139,
03075 52, 653, 54, 55, 56, 57, 654, 711, 138, 139,
03076 10, 138, 139, 661, 662, 89, 61, 665, 666, 661,
03077 65, 95, 96, 671, 672, 109, 952, 679, 680, 140,
03078 682, 140, 684, 140, 406, 140, 140, 89, 410, 734,
03079 694, 140, 116, 415, 96, 119, 8, 600, 13, 697,
03080 87, 705, 700, 701, 698, 61, 87, 137, 430, 104,
03081 105, 709, 109, 435, 116, 54, 710, 719, 716, 717,
03082 140, 145, 109, 140, 63, 64, 728, 772, 109, 140,
03083 68, 711, 679, 662, 87, 52, 665, 666, 796, 52,
03084 742, 111, 671, 672, 140, 743, 744, 87, 104, 105,
03085 106, 567, 144, 140, 549, 15, 109, 755, 803, 140,
03086 2, 763, 4, 765, 87, 767, 768, 489, 52, 109,
03087 54, 55, 56, 57, 16, 17, 140, 822, 20, 117,
03088 118, 119, 120, 121, 145, 783, 109, 140, 604, 791,
03089 109, 140, 794, 114, 140, 793, 140, 140, 796, 10,
03090 140, 88, 800, 801, 140, 9, 804, 49, 50, 10,
03091 137, 140, 806, 10, 808, 61, 140, 140, 140, 542,
03092 62, 544, 820, 137, 140, 114, 52, 137, 54, 55,
03093 56, 57, 834, 835, 140, 837, 68, 839, 840, 140,
03094 140, 83, 84, 137, 842, 87, 56, 140, 140, 68,
03095 842, 83, 84, 56, 783, 140, 140, 140, 104, 105,
03096 106, 140, 860, 89, 83, 84, 864, 140, 860, 95,
03097 96, 873, 142, 142, 61, 140, 424, 875, 90, 88,
03098 61, 697, 954, 736, 700, 117, 118, 119, 120, 121,
03099 116, 93, 904, 119, 689, 114, 115, 116, 117, 118,
03100 119, 120, 121, 953, 906, 907, 908, 96, 910, 911,
03101 640, 706, 642, 57, 91, 880, 142, 104, 105, 106,
03102 918, 849, 920, 104, 105, 106, 653, 746, 926, -1,
03103 928, 654, 934, 935, 936, 937, 52, -1, 54, 55,
03104 56, 57, -1, -1, 951, -1, -1, 54, 55, 951,
03105 57, 953, 954, 951, -1, 197, 63, 64, -1, 939,
03106 -1, -1, -1, 952, -1, 967, 968, 969, 970, 973,
03107 950, -1, -1, 89, -1, 217, -1, 219, 220, 981,
03108 796, 223, -1, 225, -1, 707, -1, 989, 230, -1,
03109 -1, -1, -1, 716, 717, 68, -1, -1, -1, 241,
03110 242, -1, 797, -1, 799, -1, -1, 729, -1, -1,
03111 83, 84, -1, -1, 809, -1, -1, -1, 740, 814,
03112 743, 744, 749, -1, 52, 752, 54, 55, 56, 57,
03113 -1, -1, 755, -1, -1, 765, -1, 767, 768, -1,
03114 -1, -1, -1, 116, 117, 118, 119, 120, 121, -1,
03115 292, 293, 294, 295, 296, 297, 298, 299, -1, -1,
03116 302, 89, 304, -1, -1, 307, -1, 95, -1, 52,
03117 793, 54, 55, 56, 57, 870, 871, 800, 801, -1,
03118 -1, 804, 16, 17, -1, -1, 20, -1, -1, -1,
03119 -1, 813, -1, 335, -1, 337, -1, 820, -1, 341,
03120 342, -1, -1, 825, 834, 835, -1, 837, 830, 839,
03121 840, -1, 46, 47, 356, -1, -1, 51, 52, -1,
03122 -1, -1, -1, -1, 851, -1, 853, -1, 62, 63,
03123 -1, 52, 927, 54, 55, 56, 57, -1, -1, -1,
03124 -1, 864, 384, 385, 40, 41, 42, 43, 44, -1,
03125 -1, -1, -1, -1, -1, -1, -1, -1, 400, -1,
03126 955, -1, 957, -1, -1, 892, -1, 894, 89, -1,
03127 -1, 898, -1, -1, 95, -1, 906, 907, 908, -1,
03128 910, 911, 424, 52, -1, 54, 55, 56, 57, -1,
03129 -1, 433, -1, -1, -1, 918, -1, 920, -1, -1,
03130 -1, -1, -1, 926, 934, 935, 936, 937, -1, -1,
03131 452, -1, -1, -1, 941, -1, 943, -1, -1, 946,
03132 89, -1, -1, -1, -1, -1, 95, 96, -1, -1,
03133 -1, -1, -1, -1, 961, -1, -1, 967, 968, 969,
03134 970, -1, -1, -1, -1, -1, -1, 116, -1, -1,
03135 119, 981, -1, -1, -1, -1, 983, -1, -1, 989,
03136 -1, 195, -1, -1, 198, 199, 200, -1, -1, -1,
03137 2, -1, 4, 142, -1, 52, -1, 54, 55, 56,
03138 57, -1, -1, 217, -1, 219, 220, -1, -1, -1,
03139 -1, 2, -1, 4, -1, -1, -1, -1, -1, -1,
03140 542, -1, 544, 52, -1, 54, 55, 56, 57, -1,
03141 552, -1, 89, -1, -1, -1, -1, 49, 95, 96,
03142 -1, 53, 564, -1, 566, 567, -1, -1, -1, -1,
03143 -1, -1, -1, -1, -1, -1, -1, -1, 49, 116,
03144 89, -1, 119, -1, 76, -1, 95, 96, -1, -1,
03145 -1, -1, -1, -1, -1, -1, 88, 89, 90, 91,
03146 -1, -1, 604, -1, -1, -1, -1, 116, 302, -1,
03147 119, -1, -1, 307, 308, 309, 310, 311, 312, 313,
03148 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
03149 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
03150 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1,
03151 -1, -1, 654, -1, -1, -1, -1, -1, -1, -1,
03152 662, -1, -1, 665, 666, -1, -1, -1, -1, 671,
03153 672, -1, 68, 69, 70, 71, 72, 73, 74, 75,
03154 76, 77, 78, 79, 80, -1, -1, 83, 84, -1,
03155 384, 385, -1, -1, -1, 697, -1, -1, 700, 701,
03156 394, 395, 396, -1, -1, 197, 400, 709, 402, 403,
03157 404, -1, -1, -1, 716, 717, 112, 113, 114, 115,
03158 116, 117, 118, 119, 120, 121, 197, -1, -1, 423,
03159 -1, -1, -1, -1, 428, -1, -1, -1, 230, -1,
03160 -1, 743, 744, 437, -1, -1, 440, -1, -1, 241,
03161 242, -1, -1, 755, -1, -1, -1, -1, 452, 230,
03162 -1, -1, -1, -1, -1, -1, -1, -1, -1, 261,
03163 241, 242, -1, -1, -1, -1, -1, -1, 472, 473,
03164 -1, 783, -1, -1, -1, -1, -1, -1, -1, -1,
03165 484, 793, -1, -1, 796, -1, -1, -1, 800, 801,
03166 292, -1, 804, -1, -1, 297, -1, -1, -1, -1,
03167 -1, -1, 304, 305, -1, -1, -1, 2, 820, 4,
03168 -1, 292, -1, -1, -1, -1, 297, -1, -1, -1,
03169 -1, -1, -1, 304, -1, -1, -1, -1, -1, -1,
03170 -1, -1, -1, -1, -1, 337, -1, 2, -1, 4,
03171 -1, -1, -1, -1, 548, -1, -1, -1, 552, -1,
03172 -1, -1, 864, -1, 49, 2, 337, 4, 53, -1,
03173 564, -1, -1, 875, -1, -1, -1, -1, -1, -1,
03174 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03175 -1, 76, -1, 587, 49, -1, -1, -1, 53, -1,
03176 -1, -1, -1, 88, 89, 90, 600, 601, -1, -1,
03177 -1, -1, 49, -1, -1, -1, 918, -1, 920, -1,
03178 -1, 76, -1, -1, 926, -1, 928, -1, -1, -1,
03179 -1, -1, 424, 88, 89, 90, 91, -1, -1, -1,
03180 -1, 433, -1, -1, -1, -1, -1, -1, -1, 951,
03181 -1, 88, -1, 424, -1, -1, -1, -1, 450, -1,
03182 -1, -1, 433, -1, 658, -1, -1, -1, 662, 663,
03183 -1, 665, 666, -1, -1, -1, -1, 671, 672, 0,
03184 -1, -1, -1, -1, -1, 679, -1, 8, 9, 10,
03185 -1, -1, 13, 14, 15, -1, 17, -1, 490, -1,
03186 -1, -1, -1, -1, -1, -1, 27, -1, -1, -1,
03187 -1, -1, 197, -1, -1, -1, 37, 38, -1, 40,
03188 41, 42, 43, 44, 718, -1, -1, -1, -1, 723,
03189 724, -1, 726, 727, -1, -1, -1, -1, -1, -1,
03190 734, -1, 197, -1, -1, 230, -1, -1, -1, -1,
03191 542, -1, 544, -1, -1, -1, 241, 242, -1, -1,
03192 197, -1, -1, -1, 85, -1, -1, -1, -1, -1,
03193 -1, 542, -1, 544, 566, 230, 261, -1, 772, -1,
03194 -1, -1, 776, -1, -1, -1, 241, 242, -1, 783,
03195 -1, -1, -1, 230, -1, 566, -1, -1, -1, -1,
03196 -1, -1, -1, -1, 241, 242, 261, 292, -1, 803,
03197 -1, -1, 297, -1, -1, -1, 137, -1, 139, 304,
03198 305, 142, 143, 615, 145, -1, 147, 821, 822, -1,
03199 -1, -1, -1, -1, -1, -1, -1, 292, -1, -1,
03200 -1, -1, 297, -1, -1, -1, -1, -1, -1, 304,
03201 305, -1, 337, -1, -1, 292, -1, -1, -1, -1,
03202 297, -1, 654, -1, -1, -1, -1, 304, -1, 661,
03203 307, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03204 -1, -1, 337, 654, -1, -1, -1, -1, -1, -1,
03205 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03206 337, -1, -1, -1, -1, -1, -1, -1, -1, 701,
03207 -1, -1, -1, -1, -1, -1, -1, 709, -1, -1,
03208 -1, -1, -1, -1, 716, 717, -1, -1, -1, -1,
03209 701, -1, -1, -1, -1, -1, -1, -1, 709, 424,
03210 -1, -1, -1, -1, -1, 716, 717, -1, 433, -1,
03211 -1, 743, 744, -1, -1, -1, -1, 951, -1, -1,
03212 -1, -1, -1, 755, -1, 450, -1, -1, -1, 424,
03213 -1, -1, 743, 744, -1, -1, -1, -1, 433, -1,
03214 -1, -1, -1, -1, 755, -1, -1, 424, -1, -1,
03215 -1, -1, -1, -1, -1, 450, 433, -1, -1, -1,
03216 -1, 793, -1, -1, -1, 490, -1, -1, 800, 801,
03217 -1, -1, 804, -1, -1, -1, -1, -1, -1, -1,
03218 -1, -1, 793, -1, -1, -1, -1, -1, 820, 800,
03219 801, -1, -1, 804, -1, 490, -1, -1, -1, -1,
03220 -1, -1, -1, -1, -1, -1, -1, -1, -1, 820,
03221 842, -1, -1, -1, -1, -1, -1, 542, -1, 544,
03222 -1, -1, -1, -1, -1, -1, -1, -1, 860, -1,
03223 -1, -1, 864, -1, -1, -1, -1, -1, -1, -1,
03224 -1, 566, -1, 875, -1, -1, -1, 542, -1, 544,
03225 -1, -1, -1, 864, -1, -1, -1, -1, -1, -1,
03226 -1, -1, -1, -1, 875, 542, -1, 544, -1, -1,
03227 -1, 566, -1, -1, -1, -1, -1, -1, -1, -1,
03228 -1, -1, -1, -1, -1, -1, 918, -1, 920, 566,
03229 615, -1, -1, -1, 926, -1, 928, -1, -1, -1,
03230 -1, -1, -1, -1, -1, -1, -1, 918, -1, 920,
03231 -1, -1, -1, -1, -1, 926, -1, 928, -1, -1,
03232 615, 646, -1, -1, -1, -1, -1, -1, -1, 654,
03233 -1, -1, -1, -1, -1, -1, 661, -1, -1, -1,
03234 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03235 -1, -1, 68, 69, 70, 71, 72, 73, 74, 654,
03236 -1, 77, 78, -1, -1, -1, 661, 83, 84, -1,
03237 -1, -1, -1, -1, -1, -1, 701, 654, -1, -1,
03238 -1, -1, -1, -1, 709, 662, -1, -1, -1, -1,
03239 -1, 716, 717, -1, -1, -1, 112, 113, 114, 115,
03240 116, 117, 118, 119, 120, 121, 701, -1, -1, -1,
03241 -1, -1, -1, -1, 709, -1, -1, -1, 743, 744,
03242 -1, 716, 717, -1, 701, -1, -1, -1, -1, -1,
03243 755, -1, 709, -1, -1, -1, -1, -1, -1, 716,
03244 717, 68, 69, 70, 71, 72, 73, 74, 743, 744,
03245 77, 78, -1, -1, -1, -1, 83, 84, -1, -1,
03246 755, -1, -1, -1, -1, -1, 743, 744, 793, -1,
03247 -1, -1, -1, -1, -1, 800, 801, -1, 755, 804,
03248 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116,
03249 117, 118, 119, 120, 121, 820, -1, -1, 793, -1,
03250 -1, -1, -1, -1, -1, 800, 801, -1, -1, 804,
03251 -1, -1, -1, -1, -1, -1, 793, 842, -1, -1,
03252 -1, -1, -1, 800, 801, 820, -1, 804, -1, -1,
03253 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864,
03254 -1, -1, -1, 820, -1, -1, -1, 842, -1, -1,
03255 875, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03256 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864,
03257 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03258 875, -1, -1, 860, -1, -1, -1, 864, -1, -1,
03259 -1, -1, -1, 918, -1, 920, -1, -1, 875, -1,
03260 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1,
03261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03262 -1, -1, -1, 918, -1, 920, -1, -1, -1, -1,
03263 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1,
03264 -1, 918, -1, 920, -1, -1, -1, -1, -1, 926,
03265 -1, 928, 0, 1, -1, 3, 4, 5, 6, 7,
03266 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
03267 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03268 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03269 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
03270 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03271 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03272 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03273 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03274 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03275 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03276 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03277 -1, -1, -1, 0, 122, 123, 124, -1, -1, -1,
03278 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
03279 17, -1, -1, -1, -1, -1, -1, 145, -1, 147,
03280 27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
03281 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
03282 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
03283 74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
03284 84, 68, 69, 70, 71, 72, 73, 74, 75, 76,
03285 77, 78, 79, 80, -1, -1, 83, 84, 85, -1,
03286 87, 88, -1, -1, -1, -1, 110, 94, 112, 113,
03287 114, 115, 116, 117, 118, 119, 120, 121, -1, -1,
03288 107, -1, 109, 110, 111, 112, 113, 114, 115, 116,
03289 117, 118, 119, 120, 121, -1, -1, -1, -1, -1,
03290 -1, -1, -1, 147, -1, -1, -1, -1, -1, -1,
03291 137, 138, 139, 140, 0, -1, 143, 144, 145, -1,
03292 147, -1, 8, 9, 10, -1, -1, 13, 14, 15,
03293 -1, 17, -1, -1, -1, -1, -1, -1, -1, -1,
03294 26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
03295 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
03296 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72,
03297 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
03298 83, 84, 68, 69, 70, 71, 72, 73, 74, 75,
03299 76, 77, 78, 79, 80, -1, -1, 83, 84, 85,
03300 -1, -1, 88, -1, -1, -1, -1, 110, 94, 112,
03301 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
03302 -1, -1, -1, -1, 110, -1, 112, 113, 114, 115,
03303 116, 117, 118, 119, 120, 121, -1, -1, -1, -1,
03304 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03305 136, 137, 138, 139, 140, 0, 142, 143, 144, 145,
03306 -1, 147, -1, 8, 9, 10, -1, -1, 13, 14,
03307 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
03308 -1, -1, 27, 28, 29, -1, -1, -1, -1, -1,
03309 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
03310 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
03311 72, 73, 74, 75, -1, 77, 78, -1, -1, -1,
03312 -1, 83, 84, 68, 69, 70, 71, 72, 73, 74,
03313 75, 76, 77, 78, 79, 80, -1, -1, 83, 84,
03314 85, -1, -1, 88, -1, -1, -1, -1, -1, 94,
03315 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
03316 -1, -1, 107, -1, -1, 110, 111, 112, 113, 114,
03317 115, 116, 117, 118, 119, 120, 121, -1, -1, -1,
03318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03319 -1, -1, 137, 138, 139, 140, 0, -1, 143, 144,
03320 145, -1, 147, -1, 8, 9, 10, -1, -1, 13,
03321 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
03322 -1, -1, 26, 27, 28, -1, -1, -1, -1, -1,
03323 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
03324 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03326 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
03327 74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
03328 84, 85, -1, -1, 88, -1, -1, -1, -1, -1,
03329 94, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03330 -1, -1, -1, -1, -1, -1, 110, -1, 112, 113,
03331 114, 115, 116, 117, 118, 119, 120, 121, -1, -1,
03332 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03333 -1, -1, 136, 137, 138, 139, 140, 0, 142, 143,
03334 144, 145, -1, 147, -1, 8, 9, 10, -1, -1,
03335 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
03336 -1, -1, -1, -1, 27, 28, -1, -1, -1, -1,
03337 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
03338 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
03339 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03340 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72,
03341 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
03342 83, 84, 85, -1, -1, 88, -1, -1, -1, -1,
03343 -1, 94, -1, -1, -1, -1, -1, -1, -1, -1,
03344 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112,
03345 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
03346 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03347 -1, -1, -1, -1, 137, 138, 139, 140, 0, 142,
03348 143, 144, 145, -1, 147, -1, 8, 9, 10, -1,
03349 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
03350 -1, -1, -1, -1, 26, -1, -1, -1, -1, -1,
03351 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
03352 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
03353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03354 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
03355 72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
03356 -1, 83, 84, 85, 0, 87, -1, -1, -1, -1,
03357 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
03358 -1, 17, -1, -1, -1, -1, -1, 109, 110, -1,
03359 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
03360 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
03361 -1, -1, -1, -1, 136, 137, 138, 139, 140, -1,
03362 -1, 143, -1, 145, -1, 147, -1, -1, -1, -1,
03363 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75,
03364 76, 77, 78, 79, 80, -1, -1, 83, 84, 85,
03365 -1, 87, -1, -1, -1, -1, -1, -1, -1, -1,
03366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03367 -1, -1, -1, 109, 110, -1, 112, 113, 114, 115,
03368 116, 117, 118, 119, 120, 121, -1, -1, -1, -1,
03369 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03370 -1, 137, 138, 139, 140, -1, -1, 143, -1, 145,
03371 1, 147, 3, 4, 5, 6, 7, 8, 9, 10,
03372 11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
03373 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03374 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03375 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
03376 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03377 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03379 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03380 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
03381 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03382 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03383 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
03384 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03385 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5,
03386 6, 7, -1, -1, 10, 11, 12, -1, 14, 15,
03387 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
03388 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03389 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
03390 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
03391 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03392 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
03393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03394 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03395 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03396 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03397 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
03398 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03399 -1, -1, -1, -1, -1, -1, -1, -1, -1, 145,
03400 1, 147, 3, 4, 5, 6, 7, -1, -1, 10,
03401 11, 12, -1, -1, 15, 16, 17, 18, 19, 20,
03402 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03403 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03404 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
03405 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03406 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03408 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03409 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
03410 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03411 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03412 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
03413 1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
03414 11, 12, -1, -1, 145, 16, 147, 18, 19, 20,
03415 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03416 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03417 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
03418 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03419 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03420 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03421 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03422 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
03423 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03424 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03425 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
03426 -1, -1, -1, -1, -1, -1, 137, -1, -1, -1,
03427 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5,
03428 6, 7, -1, -1, 10, 11, 12, -1, -1, 15,
03429 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
03430 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03431 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
03432 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
03433 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03434 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
03435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03436 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03437 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03438 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03439 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
03440 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
03441 6, 7, -1, 9, 10, 11, 12, -1, -1, 145,
03442 16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
03443 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03444 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
03445 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
03446 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03447 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
03448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03449 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03450 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03452 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
03453 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
03454 6, 7, -1, -1, -1, 11, 12, -1, -1, 145,
03455 16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
03456 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03457 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
03458 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
03459 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03460 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
03461 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03462 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03463 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03464 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03465 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
03466 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
03467 6, 7, -1, -1, -1, 11, 12, 143, -1, 145,
03468 16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
03469 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03470 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
03471 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
03472 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03473 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
03474 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03475 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03476 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03478 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
03479 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
03480 6, 7, -1, -1, -1, 11, 12, 143, -1, 145,
03481 16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
03482 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03483 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
03484 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
03485 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03486 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
03487 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03488 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03489 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03491 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
03492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03493 -1, 137, -1, -1, -1, -1, -1, -1, -1, 145,
03494 1, 147, 3, 4, 5, 6, 7, -1, -1, 10,
03495 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
03496 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03497 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03498 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
03499 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03500 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03502 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03503 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
03504 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03506 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
03507 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
03508 11, 12, -1, -1, 145, 16, 147, 18, 19, 20,
03509 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03510 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03511 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
03512 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
03513 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03515 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03516 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
03517 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03518 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
03519 12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
03520 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
03521 32, 33, 34, 35, 36, -1, 147, 39, -1, -1,
03522 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
03523 52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
03524 62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
03525 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03526 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
03527 92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
03528 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
03529 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03530 122, 123, 124, -1, -1, -1, -1, -1, -1, -1,
03531 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
03532 12, -1, -1, 145, 16, 147, 18, 19, 20, 21,
03533 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
03534 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
03535 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
03536 52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
03537 62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
03538 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03539 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
03540 92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
03541 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
03542 3, 4, 5, 6, 7, -1, -1, -1, 11, 12,
03543 122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
03544 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03545 33, 34, 35, 36, -1, 147, 39, -1, -1, -1,
03546 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
03547 53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
03548 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03549 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03550 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03551 93, -1, 95, -1, 97, 98, 99, 100, 101, 102,
03552 103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03553 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
03554 123, 124, -1, -1, -1, -1, -1, -1, 3, 4,
03555 5, 6, 7, -1, -1, -1, 11, 12, -1, -1,
03556 -1, 16, 145, 18, 19, 20, 21, 22, 23, 24,
03557 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
03558 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
03559 45, 46, -1, 48, 49, 50, 51, 52, 53, 54,
03560 55, 56, 57, -1, 59, 60, -1, 62, 63, 64,
03561 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
03562 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03563 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
03564 95, -1, 97, 98, 99, 100, 101, 102, 103, -1,
03565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03566 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
03567 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03568 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03569 145, 3, 4, 5, 6, 7, 8, 9, 10, 11,
03570 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
03571 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
03572 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
03573 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
03574 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
03575 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71,
03576 72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
03577 82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
03578 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
03579 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03580 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
03581 -1, 123, 124, -1, -1, -1, -1, -1, 3, 4,
03582 5, -1, 7, -1, -1, -1, 11, 12, -1, 141,
03583 142, 16, -1, 18, 19, 20, 21, 22, 23, 24,
03584 -1, 26, -1, -1, -1, 30, 31, 32, 33, 34,
03585 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
03586 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
03587 55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
03588 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
03589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03590 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
03591 95, 96, 97, 98, 99, 100, 101, 102, 103, -1,
03592 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03593 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
03594 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
03595 -1, 136, -1, 11, 12, -1, -1, 142, 16, -1,
03596 18, 19, 20, 21, 22, 23, 24, -1, 26, -1,
03597 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03598 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
03599 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03600 58, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03601 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03602 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03603 -1, 89, 90, -1, 92, 93, -1, 95, 96, 97,
03604 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03605 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03606 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
03607 -1, -1, 3, 4, 5, -1, 7, -1, 136, -1,
03608 11, 12, -1, -1, 142, 16, -1, 18, 19, 20,
03609 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03610 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03611 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
03612 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
03613 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03614 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03615 -1, -1, -1, -1, -1, 86, 87, -1, 89, 90,
03616 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
03617 101, 102, 103, -1, -1, -1, -1, -1, 109, -1,
03618 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
03619 7, 122, 123, 124, 11, 12, -1, -1, -1, 16,
03620 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
03621 -1, 142, -1, 30, 31, 32, 33, 34, 35, 36,
03622 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
03623 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
03624 57, 58, 59, 60, -1, 62, 63, 64, -1, 66,
03625 67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03626 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
03627 -1, -1, 89, 90, -1, 92, 93, -1, 95, 96,
03628 97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
03629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03630 3, 4, 5, -1, 7, 122, 123, 124, 11, 12,
03631 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
03632 23, 24, -1, -1, -1, 142, -1, 30, 31, 32,
03633 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03634 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
03635 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
03636 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03637 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03638 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03639 93, -1, 95, 96, 97, 98, 99, 100, 101, 102,
03640 103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03641 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
03642 123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
03643 -1, -1, -1, -1, -1, -1, -1, -1, -1, 142,
03644 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
03645 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
03646 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
03647 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
03648 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
03649 53, 54, 55, 56, 57, -1, -1, -1, -1, -1,
03650 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72,
03651 73, 74, -1, -1, 77, 78, -1, -1, 81, 82,
03652 83, 84, -1, -1, -1, -1, -1, -1, -1, -1,
03653 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1,
03654 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
03655 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
03656 123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
03657 -1, -1, -1, -1, -1, -1, -1, -1, 141, 3,
03658 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
03659 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
03660 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
03661 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
03662 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
03663 54, -1, 56, -1, -1, -1, -1, -1, -1, -1,
03664 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
03665 74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
03666 84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03667 -1, 95, -1, -1, 98, -1, -1, -1, -1, -1,
03668 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113,
03669 114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
03670 124, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03671 -1, -1, -1, -1, -1, -1, -1, 141, 3, 4,
03672 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
03673 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
03674 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
03675 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
03676 45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
03677 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
03678 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74,
03679 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
03680 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03681 95, -1, -1, 98, -1, -1, -1, -1, -1, -1,
03682 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
03683 115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
03684 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03685 -1, -1, -1, -1, -1, -1, 141, 3, 4, 5,
03686 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
03687 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
03688 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03689 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
03690 46, 47, 48, 49, 50, 51, 52, 53, -1, -1,
03691 56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03692 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
03693 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1,
03694 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
03695 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03696 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115,
03697 116, 117, 118, 119, 120, 121, -1, 123, 124, -1,
03698 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
03699 12, -1, -1, -1, 16, 141, 18, 19, 20, 21,
03700 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
03701 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
03702 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
03703 52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
03704 62, 63, 64, -1, -1, -1, -1, -1, -1, -1,
03705 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03706 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
03707 92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
03708 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
03709 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
03710 122, 11, 12, -1, -1, -1, 16, -1, 18, 19,
03711 20, 21, 22, 23, 24, -1, -1, -1, 140, -1,
03712 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
03713 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
03714 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
03715 60, -1, 62, 63, 64, -1, -1, -1, -1, -1,
03716 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03717 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
03718 90, -1, 92, 93, -1, -1, -1, 97, 98, 99,
03719 100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
03720 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
03721 -1, -1, 122, 11, 12, -1, -1, -1, 16, -1,
03722 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03723 140, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03724 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
03725 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03726 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03727 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03728 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03729 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03730 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03731 -1, -1, -1, -1, 3, 4, 5, 6, 7, -1,
03732 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18,
03733 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
03734 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
03735 39, -1, -1, -1, -1, -1, 45, 46, -1, 48,
03736 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
03737 59, 60, -1, 62, 63, 64, -1, 66, 67, -1,
03738 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03739 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
03740 89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
03741 99, 100, 101, 102, 103, -1, -1, -1, -1, -1,
03742 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
03743 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19,
03744 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
03745 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
03746 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
03747 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
03748 60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
03749 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03750 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
03751 90, -1, 92, 93, -1, 95, 96, 97, 98, 99,
03752 100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
03753 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
03754 11, 12, 122, 123, 124, 16, -1, 18, 19, 20,
03755 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03756 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03757 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
03758 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
03759 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03760 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03761 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03762 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
03763 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03764 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
03765 12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
03766 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
03767 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
03768 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
03769 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
03770 62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
03771 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03772 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
03773 92, 93, -1, 95, -1, 97, 98, 99, 100, 101,
03774 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
03775 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
03776 122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
03777 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03778 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03779 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
03780 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
03781 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03782 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03783 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03784 93, -1, -1, 96, 97, 98, 99, 100, 101, 102,
03785 103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
03786 4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
03787 123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
03788 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03789 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
03790 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03791 54, 55, 56, 57, 58, 59, 60, -1, 62, 63,
03792 64, -1, 66, 67, -1, -1, -1, -1, -1, -1,
03793 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03794 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03795 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103,
03796 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
03797 5, -1, 7, -1, -1, -1, 11, 12, 122, 123,
03798 124, 16, -1, 18, 19, 20, 21, 22, 23, 24,
03799 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
03800 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
03801 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
03802 55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
03803 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
03804 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03805 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
03806 -1, -1, 97, 98, 99, 100, 101, 102, 103, -1,
03807 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
03808 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124,
03809 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
03810 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03811 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
03812 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
03813 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03814 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
03815 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03816 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03817 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03818 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
03819 7, -1, -1, -1, 11, 12, 122, 123, 124, 16,
03820 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
03821 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
03822 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
03823 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
03824 57, -1, 59, 60, -1, 62, 63, 64, -1, 66,
03825 67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03826 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
03827 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1,
03828 97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
03829 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
03830 -1, -1, -1, 11, 12, 122, 123, 124, 16, -1,
03831 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03832 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03833 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
03834 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03835 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03836 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03837 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03838 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03839 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03840 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
03841 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18,
03842 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
03843 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
03844 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
03845 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
03846 59, 60, -1, 62, 63, 64, -1, 66, 67, -1,
03847 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03848 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
03849 89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
03850 99, 100, 101, 102, 103, -1, -1, -1, -1, -1,
03851 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
03852 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19,
03853 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
03854 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
03855 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
03856 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
03857 60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
03858 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03859 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
03860 90, -1, 92, 93, -1, 95, -1, 97, 98, 99,
03861 100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
03862 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
03863 11, 12, 122, 123, 124, 16, -1, 18, 19, 20,
03864 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03865 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03866 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
03867 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03868 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03869 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03870 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03871 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100,
03872 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03873 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
03874 12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
03875 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
03876 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
03877 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
03878 52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
03879 62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
03880 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03881 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
03882 92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
03883 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
03884 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
03885 122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
03886 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03887 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03888 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
03889 53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
03890 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03891 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03892 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03893 93, -1, -1, -1, 97, 98, 99, 100, 101, 102,
03894 103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
03895 4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
03896 123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
03897 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03898 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
03899 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03900 54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
03901 64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03902 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03903 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03904 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103,
03905 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
03906 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
03907 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
03908 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
03909 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
03910 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
03911 59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
03912 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03913 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
03914 89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
03915 99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
03916 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
03917 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
03918 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03919 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
03920 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03921 54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
03922 64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03923 -1, -1, -1, -1, -1, -1, -1, -1, -1, 83,
03924 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03925 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
03926 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
03927 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
03928 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
03929 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
03930 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
03931 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
03932 59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
03933 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03934 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
03935 89, 90, -1, 92, 93, -1, -1, -1, 97, 98,
03936 99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
03937 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
03938 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
03939 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03940 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
03941 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03942 54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
03943 64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03944 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03945 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03946 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
03947 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
03948 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
03949 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
03950 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
03951 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
03952 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
03953 59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
03954 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03955 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
03956 89, 90, -1, 92, 93, -1, -1, -1, 97, 98,
03957 99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
03958 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
03959 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
03960 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03961 34, 35, 36, -1, -1, 39, -1, 44, -1, -1,
03962 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03963 54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
03964 64, 68, 69, 70, 71, 72, 73, 74, 75, 76,
03965 77, 78, 79, 80, -1, -1, 83, 84, -1, -1,
03966 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03967 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
03968 -1, -1, -1, 110, -1, 112, 113, 114, 115, 116,
03969 117, 118, 119, 120, 121, -1, -1, -1, 122, -1,
03970 52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
03971 -1, -1, -1, 140, 66, 67, 68, 69, 70, 71,
03972 72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
03973 82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
03974 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
03975 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03976 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
03977 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1,
03978 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141,
03979 142, 66, 67, 68, 69, 70, 71, 72, 73, 74,
03980 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
03981 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03982 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03983 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
03984 115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
03985 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
03986 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67,
03987 68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
03988 78, -1, -1, 81, 82, 83, 84, -1, -1, -1,
03989 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
03990 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03991 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
03992 118, 119, 120, 121, -1, 123, 124, -1, -1, -1,
03993 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
03994 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70,
03995 71, 72, 73, 74, -1, -1, 77, 78, -1, -1,
03996 81, 82, 83, 84, -1, -1, -1, -1, -1, -1,
03997 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1,
03998 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03999 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
04000 121, -1, 123, 124, -1, -1, -1, -1, 52, 53,
04001 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
04002 141, 142, 66, 67, 68, 69, 70, 71, 72, 73,
04003 74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
04004 84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04005 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1,
04006 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113,
04007 114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
04008 124, -1, -1, -1, -1, 52, 53, -1, -1, 56,
04009 -1, -1, -1, -1, -1, -1, -1, 141, 142, 66,
04010 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
04011 77, 78, -1, -1, 81, 82, 83, 84, -1, -1,
04012 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1,
04013 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04014 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116,
04015 117, 118, 119, 120, 121, -1, 123, 124, -1, -1,
04016 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1,
04017 -1, -1, -1, -1, 141, 142, 66, 67, 68, 69,
04018 70, 71, 72, 73, 74, -1, -1, 77, 78, -1,
04019 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1,
04020 -1, -1, -1, -1, -1, 95, -1, -1, -1, -1,
04021 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04022 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119,
04023 120, 121, -1, 123, 124, -1, -1, -1, -1, 52,
04024 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
04025 -1, 141, 142, 66, 67, 68, 69, 70, 71, 72,
04026 73, 74, -1, -1, 77, 78, -1, -1, 81, 82,
04027 83, 84, -1, -1, -1, -1, -1, -1, -1, -1,
04028 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1,
04029 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
04030 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
04031 123, 124, -1, -1, -1, -1, 52, 53, -1, -1,
04032 56, -1, -1, -1, -1, -1, -1, -1, 141, 142,
04033 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
04034 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1,
04035 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
04036 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04037 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115,
04038 116, 117, 118, 119, 120, 121, -1, 123, 124, -1,
04039 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
04040 -1, -1, -1, -1, -1, 141, 142, 66, 67, 68,
04041 69, 70, 71, 72, 73, 74, -1, -1, 77, 78,
04042 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1,
04043 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1,
04044 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04045 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118,
04046 119, 120, 121, -1, 123, 124, -1, -1, -1, -1,
04047 52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
04048 -1, -1, 141, 142, 66, 67, 68, 69, 70, 71,
04049 72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
04050 82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
04051 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
04052 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04053 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
04054 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1,
04055 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141,
04056 142, 66, 67, 68, 69, 70, 71, 72, 73, 74,
04057 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
04058 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04059 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04060 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
04061 115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
04062 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
04063 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67,
04064 68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
04065 78, -1, -1, 81, 82, 83, 84, -1, -1, -1,
04066 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
04067 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
04068 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
04069 118, 119, 120, 121, -1, 123, 124, -1, -1, -1,
04070 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
04071 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70,
04072 71, 72, 73, 74, -1, -1, 77, 78, -1, -1,
04073 81, 82, 83, 84, -1, -1, -1, -1, -1, -1,
04074 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1,
04075 -1, -1, 44, -1, -1, -1, -1, -1, -1, -1,
04076 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
04077 121, 44, 123, 124, -1, -1, 68, 69, 70, 71,
04078 72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
04079 141, 83, 84, -1, -1, 68, 69, 70, 71, 72,
04080 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
04081 83, 84, -1, -1, -1, -1, -1, -1, 110, -1,
04082 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
04083 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112,
04084 113, 114, 115, 116, 117, 118, 119, 120, 121
04085 };
04086
04087
04088
04089 static const yytype_uint16 yystos[] =
04090 {
04091 0, 149, 150, 0, 1, 3, 4, 5, 6, 7,
04092 11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
04093 30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
04094 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
04095 57, 59, 60, 62, 63, 64, 66, 67, 86, 89,
04096 90, 92, 93, 95, 97, 98, 99, 100, 101, 102,
04097 103, 122, 123, 124, 151, 152, 153, 158, 160, 161,
04098 163, 164, 167, 168, 170, 171, 172, 174, 175, 185,
04099 199, 216, 217, 218, 219, 220, 221, 222, 223, 224,
04100 225, 226, 249, 250, 260, 261, 262, 263, 264, 265,
04101 266, 269, 279, 281, 282, 283, 284, 285, 286, 287,
04102 310, 321, 153, 3, 4, 5, 6, 7, 8, 9,
04103 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
04104 20, 21, 22, 23, 24, 25, 26, 30, 31, 32,
04105 33, 34, 35, 36, 37, 38, 39, 45, 46, 47,
04106 48, 49, 50, 51, 52, 53, 56, 66, 67, 68,
04107 69, 70, 71, 72, 73, 74, 77, 78, 81, 82,
04108 83, 84, 95, 112, 113, 114, 115, 116, 117, 118,
04109 119, 120, 121, 123, 124, 141, 178, 179, 180, 181,
04110 183, 184, 279, 281, 39, 58, 86, 89, 95, 96,
04111 123, 167, 175, 185, 187, 192, 195, 197, 216, 283,
04112 284, 286, 287, 308, 309, 192, 192, 142, 193, 194,
04113 142, 189, 193, 142, 147, 315, 54, 180, 315, 154,
04114 136, 21, 22, 30, 31, 32, 185, 216, 310, 185,
04115 56, 1, 89, 156, 157, 158, 169, 170, 321, 161,
04116 188, 197, 308, 321, 187, 307, 308, 321, 46, 86,
04117 122, 140, 174, 199, 216, 283, 284, 287, 242, 243,
04118 54, 55, 57, 178, 272, 280, 271, 272, 273, 146,
04119 267, 146, 270, 59, 60, 163, 185, 185, 145, 147,
04120 314, 319, 320, 40, 41, 42, 43, 44, 37, 38,
04121 28, 247, 109, 140, 89, 95, 171, 109, 68, 69,
04122 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
04123 80, 83, 84, 110, 112, 113, 114, 115, 116, 117,
04124 118, 119, 120, 121, 85, 138, 139, 200, 161, 162,
04125 162, 203, 205, 162, 314, 320, 86, 168, 175, 216,
04126 232, 283, 284, 287, 52, 56, 83, 86, 176, 177,
04127 216, 283, 284, 287, 177, 33, 34, 35, 36, 49,
04128 50, 51, 52, 56, 142, 178, 285, 305, 85, 139,
04129 26, 136, 251, 263, 87, 87, 189, 193, 251, 140,
04130 187, 56, 187, 187, 109, 88, 140, 196, 321, 85,
04131 138, 139, 87, 87, 140, 196, 192, 315, 316, 192,
04132 191, 192, 197, 308, 321, 161, 316, 161, 54, 63,
04133 64, 159, 142, 186, 136, 156, 85, 139, 87, 158,
04134 169, 143, 314, 320, 316, 201, 144, 140, 147, 318,
04135 140, 318, 137, 318, 315, 56, 59, 60, 171, 173,
04136 140, 85, 138, 139, 244, 61, 104, 105, 106, 274,
04137 106, 274, 106, 65, 274, 106, 106, 268, 274, 106,
04138 61, 106, 68, 68, 145, 153, 162, 162, 162, 162,
04139 158, 161, 161, 248, 95, 163, 187, 197, 198, 169,
04140 140, 174, 140, 160, 163, 175, 185, 187, 198, 185,
04141 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
04142 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
04143 185, 185, 185, 185, 185, 52, 53, 56, 183, 189,
04144 311, 312, 191, 52, 53, 56, 183, 189, 311, 155,
04145 156, 13, 228, 319, 228, 162, 162, 314, 17, 254,
04146 56, 85, 138, 139, 25, 161, 52, 56, 176, 1,
04147 113, 288, 319, 85, 138, 139, 212, 306, 213, 85,
04148 139, 313, 52, 56, 311, 311, 253, 252, 163, 185,
04149 163, 185, 94, 165, 182, 185, 187, 95, 187, 195,
04150 308, 52, 56, 191, 52, 56, 309, 316, 143, 316,
04151 140, 140, 316, 180, 202, 185, 151, 137, 311, 311,
04152 185, 316, 158, 316, 308, 140, 173, 52, 56, 191,
04153 52, 56, 52, 54, 55, 56, 57, 89, 95, 96,
04154 116, 119, 142, 245, 291, 292, 293, 294, 295, 296,
04155 299, 300, 301, 302, 303, 276, 275, 146, 274, 146,
04156 185, 185, 76, 114, 237, 238, 321, 187, 140, 316,
04157 173, 140, 109, 44, 315, 87, 87, 189, 193, 315,
04158 317, 87, 87, 189, 190, 193, 321, 10, 227, 8,
04159 256, 321, 156, 13, 156, 27, 229, 319, 229, 254,
04160 197, 227, 52, 56, 191, 52, 56, 207, 210, 319,
04161 289, 209, 52, 56, 176, 191, 155, 161, 142, 290,
04162 291, 214, 190, 193, 190, 193, 237, 237, 44, 166,
04163 180, 187, 196, 87, 87, 317, 87, 87, 308, 161,
04164 137, 318, 171, 317, 109, 52, 89, 95, 233, 234,
04165 235, 293, 291, 29, 107, 246, 140, 304, 321, 140,
04166 304, 52, 140, 304, 52, 277, 54, 55, 57, 278,
04167 287, 52, 145, 236, 239, 295, 297, 298, 301, 303,
04168 321, 156, 95, 187, 173, 185, 111, 163, 185, 163,
04169 185, 165, 144, 87, 163, 185, 163, 185, 165, 187,
04170 198, 257, 321, 15, 231, 321, 14, 230, 231, 231,
04171 204, 206, 227, 140, 228, 317, 162, 319, 162, 155,
04172 317, 227, 316, 291, 155, 319, 178, 156, 156, 185,
04173 237, 87, 140, 316, 187, 235, 140, 293, 140, 316,
04174 239, 156, 156, 294, 299, 301, 303, 295, 296, 301,
04175 295, 156, 109, 52, 240, 241, 292, 239, 114, 140,
04176 304, 140, 304, 140, 304, 10, 187, 185, 163, 185,
04177 88, 258, 321, 156, 9, 259, 321, 162, 227, 227,
04178 156, 156, 187, 156, 229, 211, 319, 227, 316, 227,
04179 215, 10, 137, 156, 316, 234, 140, 95, 233, 316,
04180 10, 137, 140, 304, 140, 304, 140, 304, 140, 304,
04181 304, 137, 86, 216, 140, 114, 298, 301, 295, 297,
04182 301, 295, 86, 175, 216, 283, 284, 287, 228, 156,
04183 228, 227, 227, 231, 254, 255, 208, 155, 290, 137,
04184 140, 234, 140, 293, 295, 301, 295, 295, 56, 85,
04185 241, 140, 304, 140, 304, 304, 140, 304, 304, 56,
04186 85, 138, 139, 156, 156, 156, 227, 155, 234, 140,
04187 304, 140, 304, 304, 304, 52, 56, 295, 301, 295,
04188 295, 52, 56, 191, 52, 56, 256, 230, 227, 227,
04189 234, 295, 304, 140, 304, 304, 304, 317, 304, 295,
04190 304
04191 };
04192
04193 #define yyerrok (yyerrstatus = 0)
04194 #define yyclearin (yychar = YYEMPTY)
04195 #define YYEMPTY (-2)
04196 #define YYEOF 0
04197
04198 #define YYACCEPT goto yyacceptlab
04199 #define YYABORT goto yyabortlab
04200 #define YYERROR goto yyerrorlab
04201
04202
04203
04204
04205
04206
04207
04208
04209
04210 #define YYFAIL goto yyerrlab
04211 #if defined YYFAIL
04212
04213
04214
04215
04216 #endif
04217
04218 #define YYRECOVERING() (!!yyerrstatus)
04219
04220 #define YYBACKUP(Token, Value) \
04221 do \
04222 if (yychar == YYEMPTY && yylen == 1) \
04223 { \
04224 yychar = (Token); \
04225 yylval = (Value); \
04226 YYPOPSTACK (1); \
04227 goto yybackup; \
04228 } \
04229 else \
04230 { \
04231 parser_yyerror (parser, YY_("syntax error: cannot back up")); \
04232 YYERROR; \
04233 } \
04234 while (YYID (0))
04235
04236
04237 #define YYTERROR 1
04238 #define YYERRCODE 256
04239
04240
04241
04242
04243
04244
04245 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
04246 #ifndef YYLLOC_DEFAULT
04247 # define YYLLOC_DEFAULT(Current, Rhs, N) \
04248 do \
04249 if (YYID (N)) \
04250 { \
04251 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
04252 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
04253 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
04254 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
04255 } \
04256 else \
04257 { \
04258 (Current).first_line = (Current).last_line = \
04259 YYRHSLOC (Rhs, 0).last_line; \
04260 (Current).first_column = (Current).last_column = \
04261 YYRHSLOC (Rhs, 0).last_column; \
04262 } \
04263 while (YYID (0))
04264 #endif
04265
04266
04267
04268
04269 #ifndef YY_LOCATION_PRINT
04270 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
04271 #endif
04272
04273
04274
04275
04276 #ifdef YYLEX_PARAM
04277 # define YYLEX yylex (&yylval, YYLEX_PARAM)
04278 #else
04279 # define YYLEX yylex (&yylval, parser)
04280 #endif
04281
04282
04283 #if YYDEBUG
04284
04285 # ifndef YYFPRINTF
04286 # include <stdio.h>
04287 # define YYFPRINTF fprintf
04288 # endif
04289
04290 # define YYDPRINTF(Args) \
04291 do { \
04292 if (yydebug) \
04293 YYFPRINTF Args; \
04294 } while (YYID (0))
04295
04296 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
04297 do { \
04298 if (yydebug) \
04299 { \
04300 YYFPRINTF (stderr, "%s ", Title); \
04301 yy_symbol_print (stderr, \
04302 Type, Value, parser); \
04303 YYFPRINTF (stderr, "\n"); \
04304 } \
04305 } while (YYID (0))
04306
04307
04308
04309
04310
04311
04312
04313 #if (defined __STDC__ || defined __C99__FUNC__ \
04314 || defined __cplusplus || defined _MSC_VER)
04315 static void
04316 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser)
04317 #else
04318 static void
04319 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser)
04320 FILE *yyoutput;
04321 int yytype;
04322 YYSTYPE const * const yyvaluep;
04323 struct parser_params *parser;
04324 #endif
04325 {
04326 if (!yyvaluep)
04327 return;
04328 YYUSE (parser);
04329 # ifdef YYPRINT
04330 if (yytype < YYNTOKENS)
04331 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
04332 # else
04333 YYUSE (yyoutput);
04334 # endif
04335 switch (yytype)
04336 {
04337 default:
04338 break;
04339 }
04340 }
04341
04342
04343
04344
04345
04346
04347 #if (defined __STDC__ || defined __C99__FUNC__ \
04348 || defined __cplusplus || defined _MSC_VER)
04349 static void
04350 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser)
04351 #else
04352 static void
04353 yy_symbol_print (yyoutput, yytype, yyvaluep, parser)
04354 FILE *yyoutput;
04355 int yytype;
04356 YYSTYPE const * const yyvaluep;
04357 struct parser_params *parser;
04358 #endif
04359 {
04360 if (yytype < YYNTOKENS)
04361 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
04362 else
04363 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
04364
04365 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
04366 YYFPRINTF (yyoutput, ")");
04367 }
04368
04369
04370
04371
04372
04373
04374 #if (defined __STDC__ || defined __C99__FUNC__ \
04375 || defined __cplusplus || defined _MSC_VER)
04376 static void
04377 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
04378 #else
04379 static void
04380 yy_stack_print (yybottom, yytop)
04381 yytype_int16 *yybottom;
04382 yytype_int16 *yytop;
04383 #endif
04384 {
04385 YYFPRINTF (stderr, "Stack now");
04386 for (; yybottom <= yytop; yybottom++)
04387 {
04388 int yybot = *yybottom;
04389 YYFPRINTF (stderr, " %d", yybot);
04390 }
04391 YYFPRINTF (stderr, "\n");
04392 }
04393
04394 # define YY_STACK_PRINT(Bottom, Top) \
04395 do { \
04396 if (yydebug) \
04397 yy_stack_print ((Bottom), (Top)); \
04398 } while (YYID (0))
04399
04400
04401
04402
04403
04404
04405 #if (defined __STDC__ || defined __C99__FUNC__ \
04406 || defined __cplusplus || defined _MSC_VER)
04407 static void
04408 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser)
04409 #else
04410 static void
04411 yy_reduce_print (yyvsp, yyrule, parser)
04412 YYSTYPE *yyvsp;
04413 int yyrule;
04414 struct parser_params *parser;
04415 #endif
04416 {
04417 int yynrhs = yyr2[yyrule];
04418 int yyi;
04419 unsigned long int yylno = yyrline[yyrule];
04420 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
04421 yyrule - 1, yylno);
04422
04423 for (yyi = 0; yyi < yynrhs; yyi++)
04424 {
04425 YYFPRINTF (stderr, " $%d = ", yyi + 1);
04426 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
04427 &(yyvsp[(yyi + 1) - (yynrhs)])
04428 , parser);
04429 YYFPRINTF (stderr, "\n");
04430 }
04431 }
04432
04433 # define YY_REDUCE_PRINT(Rule) \
04434 do { \
04435 if (yydebug) \
04436 yy_reduce_print (yyvsp, Rule, parser); \
04437 } while (YYID (0))
04438
04439
04440
04441 #ifndef yydebug
04442 int yydebug;
04443 #endif
04444 #else
04445 # define YYDPRINTF(Args)
04446 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
04447 # define YY_STACK_PRINT(Bottom, Top)
04448 # define YY_REDUCE_PRINT(Rule)
04449 #endif
04450
04451
04452
04453 #ifndef YYINITDEPTH
04454 # define YYINITDEPTH 200
04455 #endif
04456
04457
04458
04459
04460
04461
04462
04463
04464 #ifndef YYMAXDEPTH
04465 # define YYMAXDEPTH 10000
04466 #endif
04467
04468
04469 #if YYERROR_VERBOSE
04470
04471 # ifndef yystrlen
04472 # if defined __GLIBC__ && defined _STRING_H
04473 # define yystrlen strlen
04474 # else
04475
04476 #if (defined __STDC__ || defined __C99__FUNC__ \
04477 || defined __cplusplus || defined _MSC_VER)
04478 static YYSIZE_T
04479 yystrlen (const char *yystr)
04480 #else
04481 static YYSIZE_T
04482 yystrlen (yystr)
04483 const char *yystr;
04484 #endif
04485 {
04486 YYSIZE_T yylen;
04487 for (yylen = 0; yystr[yylen]; yylen++)
04488 continue;
04489 return yylen;
04490 }
04491 # endif
04492 # endif
04493
04494 # ifndef yystpcpy
04495 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
04496 # define yystpcpy stpcpy
04497 # else
04498
04499
04500 #if (defined __STDC__ || defined __C99__FUNC__ \
04501 || defined __cplusplus || defined _MSC_VER)
04502 static char *
04503 yystpcpy (char *yydest, const char *yysrc)
04504 #else
04505 static char *
04506 yystpcpy (yydest, yysrc)
04507 char *yydest;
04508 const char *yysrc;
04509 #endif
04510 {
04511 char *yyd = yydest;
04512 const char *yys = yysrc;
04513
04514 while ((*yyd++ = *yys++) != '\0')
04515 continue;
04516
04517 return yyd - 1;
04518 }
04519 # endif
04520 # endif
04521
04522 # ifndef yytnamerr
04523
04524
04525
04526
04527
04528
04529
04530 static YYSIZE_T
04531 yytnamerr (char *yyres, const char *yystr)
04532 {
04533 if (*yystr == '"')
04534 {
04535 YYSIZE_T yyn = 0;
04536 char const *yyp = yystr;
04537
04538 for (;;)
04539 switch (*++yyp)
04540 {
04541 case '\'':
04542 case ',':
04543 goto do_not_strip_quotes;
04544
04545 case '\\':
04546 if (*++yyp != '\\')
04547 goto do_not_strip_quotes;
04548
04549 default:
04550 if (yyres)
04551 yyres[yyn] = *yyp;
04552 yyn++;
04553 break;
04554
04555 case '"':
04556 if (yyres)
04557 yyres[yyn] = '\0';
04558 return yyn;
04559 }
04560 do_not_strip_quotes: ;
04561 }
04562
04563 if (! yyres)
04564 return yystrlen (yystr);
04565
04566 return yystpcpy (yyres, yystr) - yyres;
04567 }
04568 # endif
04569
04570
04571
04572
04573
04574
04575
04576
04577
04578 static int
04579 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
04580 yytype_int16 *yyssp, int yytoken)
04581 {
04582 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
04583 YYSIZE_T yysize = yysize0;
04584 YYSIZE_T yysize1;
04585 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
04586
04587 const char *yyformat = 0;
04588
04589 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
04590
04591
04592 int yycount = 0;
04593
04594
04595
04596
04597
04598
04599
04600
04601
04602
04603
04604
04605
04606
04607
04608
04609
04610
04611
04612
04613
04614
04615
04616
04617
04618
04619
04620
04621 if (yytoken != YYEMPTY)
04622 {
04623 int yyn = yypact[*yyssp];
04624 yyarg[yycount++] = yytname[yytoken];
04625 if (!yypact_value_is_default (yyn))
04626 {
04627
04628
04629
04630 int yyxbegin = yyn < 0 ? -yyn : 0;
04631
04632 int yychecklim = YYLAST - yyn + 1;
04633 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
04634 int yyx;
04635
04636 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
04637 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
04638 && !yytable_value_is_error (yytable[yyx + yyn]))
04639 {
04640 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
04641 {
04642 yycount = 1;
04643 yysize = yysize0;
04644 break;
04645 }
04646 yyarg[yycount++] = yytname[yyx];
04647 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
04648 if (! (yysize <= yysize1
04649 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
04650 return 2;
04651 yysize = yysize1;
04652 }
04653 }
04654 }
04655
04656 switch (yycount)
04657 {
04658 # define YYCASE_(N, S) \
04659 case N: \
04660 yyformat = S; \
04661 break
04662 YYCASE_(0, YY_("syntax error"));
04663 YYCASE_(1, YY_("syntax error, unexpected %s"));
04664 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
04665 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
04666 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
04667 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
04668 # undef YYCASE_
04669 }
04670
04671 yysize1 = yysize + yystrlen (yyformat);
04672 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
04673 return 2;
04674 yysize = yysize1;
04675
04676 if (*yymsg_alloc < yysize)
04677 {
04678 *yymsg_alloc = 2 * yysize;
04679 if (! (yysize <= *yymsg_alloc
04680 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
04681 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
04682 return 1;
04683 }
04684
04685
04686
04687
04688 {
04689 char *yyp = *yymsg;
04690 int yyi = 0;
04691 while ((*yyp = *yyformat) != '\0')
04692 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
04693 {
04694 yyp += yytnamerr (yyp, yyarg[yyi++]);
04695 yyformat += 2;
04696 }
04697 else
04698 {
04699 yyp++;
04700 yyformat++;
04701 }
04702 }
04703 return 0;
04704 }
04705 #endif
04706
04707
04708
04709
04710
04711
04712 #if (defined __STDC__ || defined __C99__FUNC__ \
04713 || defined __cplusplus || defined _MSC_VER)
04714 static void
04715 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser)
04716 #else
04717 static void
04718 yydestruct (yymsg, yytype, yyvaluep, parser)
04719 const char *yymsg;
04720 int yytype;
04721 YYSTYPE *yyvaluep;
04722 struct parser_params *parser;
04723 #endif
04724 {
04725 YYUSE (yyvaluep);
04726 YYUSE (parser);
04727
04728 if (!yymsg)
04729 yymsg = "Deleting";
04730 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
04731
04732 switch (yytype)
04733 {
04734
04735 default:
04736 break;
04737 }
04738 }
04739
04740
04741
04742 #ifdef YYPARSE_PARAM
04743 #if defined __STDC__ || defined __cplusplus
04744 int yyparse (void *YYPARSE_PARAM);
04745 #else
04746 int yyparse ();
04747 #endif
04748 #else
04749 #if defined __STDC__ || defined __cplusplus
04750 int yyparse (struct parser_params *parser);
04751 #else
04752 int yyparse ();
04753 #endif
04754 #endif
04755
04756
04757
04758
04759
04760
04761 #ifdef YYPARSE_PARAM
04762 #if (defined __STDC__ || defined __C99__FUNC__ \
04763 || defined __cplusplus || defined _MSC_VER)
04764 int
04765 yyparse (void *YYPARSE_PARAM)
04766 #else
04767 int
04768 yyparse (YYPARSE_PARAM)
04769 void *YYPARSE_PARAM;
04770 #endif
04771 #else
04772 #if (defined __STDC__ || defined __C99__FUNC__ \
04773 || defined __cplusplus || defined _MSC_VER)
04774 int
04775 yyparse (struct parser_params *parser)
04776 #else
04777 int
04778 yyparse (parser)
04779 struct parser_params *parser;
04780 #endif
04781 #endif
04782 {
04783
04784 int yychar;
04785
04786
04787 YYSTYPE yylval;
04788
04789
04790 int yynerrs;
04791
04792 int yystate;
04793
04794 int yyerrstatus;
04795
04796
04797
04798
04799
04800
04801
04802
04803
04804 yytype_int16 yyssa[YYINITDEPTH];
04805 yytype_int16 *yyss;
04806 yytype_int16 *yyssp;
04807
04808
04809 YYSTYPE yyvsa[YYINITDEPTH];
04810 YYSTYPE *yyvs;
04811 YYSTYPE *yyvsp;
04812
04813 YYSIZE_T yystacksize;
04814
04815 int yyn;
04816 int yyresult;
04817
04818 int yytoken;
04819
04820
04821 YYSTYPE yyval;
04822
04823 #if YYERROR_VERBOSE
04824
04825 char yymsgbuf[128];
04826 char *yymsg = yymsgbuf;
04827 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
04828 #endif
04829
04830 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
04831
04832
04833
04834 int yylen = 0;
04835
04836 yytoken = 0;
04837 yyss = yyssa;
04838 yyvs = yyvsa;
04839 yystacksize = YYINITDEPTH;
04840
04841 YYDPRINTF ((stderr, "Starting parse\n"));
04842
04843 yystate = 0;
04844 yyerrstatus = 0;
04845 yynerrs = 0;
04846 yychar = YYEMPTY;
04847
04848
04849
04850
04851
04852 yyssp = yyss;
04853 yyvsp = yyvs;
04854
04855 goto yysetstate;
04856
04857
04858
04859
04860 yynewstate:
04861
04862
04863 yyssp++;
04864
04865 yysetstate:
04866 *yyssp = yystate;
04867
04868 if (yyss + yystacksize - 1 <= yyssp)
04869 {
04870
04871 YYSIZE_T yysize = yyssp - yyss + 1;
04872
04873 #ifdef yyoverflow
04874 {
04875
04876
04877
04878 YYSTYPE *yyvs1 = yyvs;
04879 yytype_int16 *yyss1 = yyss;
04880
04881
04882
04883
04884
04885 yyoverflow (YY_("memory exhausted"),
04886 &yyss1, yysize * sizeof (*yyssp),
04887 &yyvs1, yysize * sizeof (*yyvsp),
04888 &yystacksize);
04889
04890 yyss = yyss1;
04891 yyvs = yyvs1;
04892 }
04893 #else
04894 # ifndef YYSTACK_RELOCATE
04895 goto yyexhaustedlab;
04896 # else
04897
04898 if (YYMAXDEPTH <= yystacksize)
04899 goto yyexhaustedlab;
04900 yystacksize *= 2;
04901 if (YYMAXDEPTH < yystacksize)
04902 yystacksize = YYMAXDEPTH;
04903
04904 {
04905 yytype_int16 *yyss1 = yyss;
04906 union yyalloc *yyptr =
04907 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
04908 if (! yyptr)
04909 goto yyexhaustedlab;
04910 YYSTACK_RELOCATE (yyss_alloc, yyss);
04911 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
04912 # undef YYSTACK_RELOCATE
04913 if (yyss1 != yyssa)
04914 YYSTACK_FREE (yyss1);
04915 }
04916 # endif
04917 #endif
04918
04919 yyssp = yyss + yysize - 1;
04920 yyvsp = yyvs + yysize - 1;
04921
04922 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
04923 (unsigned long int) yystacksize));
04924
04925 if (yyss + yystacksize - 1 <= yyssp)
04926 YYABORT;
04927 }
04928
04929 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
04930
04931 if (yystate == YYFINAL)
04932 YYACCEPT;
04933
04934 goto yybackup;
04935
04936
04937
04938
04939 yybackup:
04940
04941
04942
04943
04944
04945 yyn = yypact[yystate];
04946 if (yypact_value_is_default (yyn))
04947 goto yydefault;
04948
04949
04950
04951
04952 if (yychar == YYEMPTY)
04953 {
04954 YYDPRINTF ((stderr, "Reading a token: "));
04955 yychar = YYLEX;
04956 }
04957
04958 if (yychar <= YYEOF)
04959 {
04960 yychar = yytoken = YYEOF;
04961 YYDPRINTF ((stderr, "Now at end of input.\n"));
04962 }
04963 else
04964 {
04965 yytoken = YYTRANSLATE (yychar);
04966 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
04967 }
04968
04969
04970
04971 yyn += yytoken;
04972 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
04973 goto yydefault;
04974 yyn = yytable[yyn];
04975 if (yyn <= 0)
04976 {
04977 if (yytable_value_is_error (yyn))
04978 goto yyerrlab;
04979 yyn = -yyn;
04980 goto yyreduce;
04981 }
04982
04983
04984
04985 if (yyerrstatus)
04986 yyerrstatus--;
04987
04988
04989 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
04990
04991
04992 yychar = YYEMPTY;
04993
04994 yystate = yyn;
04995 *++yyvsp = yylval;
04996
04997 goto yynewstate;
04998
04999
05000
05001
05002
05003 yydefault:
05004 yyn = yydefact[yystate];
05005 if (yyn == 0)
05006 goto yyerrlab;
05007 goto yyreduce;
05008
05009
05010
05011
05012
05013 yyreduce:
05014
05015 yylen = yyr2[yyn];
05016
05017
05018
05019
05020
05021
05022
05023
05024
05025 yyval = yyvsp[1-yylen];
05026
05027
05028 YY_REDUCE_PRINT (yyn);
05029 switch (yyn)
05030 {
05031 case 2:
05032
05033
05034 #line 786 "ripper.y"
05035 {
05036 lex_state = EXPR_BEG;
05037 #if 0
05038 local_push(compile_for_eval || rb_parse_in_main());
05039 #endif
05040 local_push(0);
05041
05042 }
05043 break;
05044
05045 case 3:
05046
05047
05048 #line 795 "ripper.y"
05049 {
05050 #if 0
05051 if ((yyvsp[(2) - (2)].val) && !compile_for_eval) {
05052
05053 if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val));
05054 else {
05055 NODE *node = (yyvsp[(2) - (2)].val);
05056 while (node->nd_next) {
05057 node = node->nd_next;
05058 }
05059 void_expr(node->nd_head);
05060 }
05061 }
05062 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val)));
05063 #endif
05064 (yyval.val) = (yyvsp[(2) - (2)].val);
05065 parser->result = dispatch1(program, (yyval.val));
05066
05067 local_pop();
05068 }
05069 break;
05070
05071 case 4:
05072
05073
05074 #line 818 "ripper.y"
05075 {
05076 #if 0
05077 void_stmts((yyvsp[(1) - (2)].val));
05078 fixup_nodes(&deferred_nodes);
05079 #endif
05080
05081 (yyval.val) = (yyvsp[(1) - (2)].val);
05082 }
05083 break;
05084
05085 case 5:
05086
05087
05088 #line 829 "ripper.y"
05089 {
05090 #if 0
05091 (yyval.val) = NEW_BEGIN(0);
05092 #endif
05093 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new),
05094 dispatch0(void_stmt));
05095
05096 }
05097 break;
05098
05099 case 6:
05100
05101
05102 #line 838 "ripper.y"
05103 {
05104 #if 0
05105 (yyval.val) = newline_node((yyvsp[(1) - (1)].val));
05106 #endif
05107 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val));
05108
05109 }
05110 break;
05111
05112 case 7:
05113
05114
05115 #line 846 "ripper.y"
05116 {
05117 #if 0
05118 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val)));
05119 #endif
05120 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05121
05122 }
05123 break;
05124
05125 case 8:
05126
05127
05128 #line 854 "ripper.y"
05129 {
05130 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val));
05131 }
05132 break;
05133
05134 case 10:
05135
05136
05137 #line 861 "ripper.y"
05138 {
05139 if (in_def || in_single) {
05140 yyerror("BEGIN in method");
05141 }
05142 #if 0
05143
05144 #endif
05145
05146 }
05147 break;
05148
05149 case 11:
05150
05151
05152 #line 871 "ripper.y"
05153 {
05154 #if 0
05155 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
05156 (yyvsp[(4) - (5)].val));
05157
05158
05159 (yyval.val) = NEW_BEGIN(0);
05160 #endif
05161 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val));
05162
05163 }
05164 break;
05165
05166 case 12:
05167
05168
05169 #line 888 "ripper.y"
05170 {
05171 #if 0
05172 (yyval.val) = (yyvsp[(1) - (4)].val);
05173 if ((yyvsp[(2) - (4)].val)) {
05174 (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val));
05175 }
05176 else if ((yyvsp[(3) - (4)].val)) {
05177 rb_warn0("else without rescue is useless");
05178 (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val));
05179 }
05180 if ((yyvsp[(4) - (4)].val)) {
05181 if ((yyval.val)) {
05182 (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val));
05183 }
05184 else {
05185 (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL());
05186 }
05187 }
05188 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
05189 #endif
05190 (yyval.val) = dispatch4(bodystmt,
05191 escape_Qundef((yyvsp[(1) - (4)].val)),
05192 escape_Qundef((yyvsp[(2) - (4)].val)),
05193 escape_Qundef((yyvsp[(3) - (4)].val)),
05194 escape_Qundef((yyvsp[(4) - (4)].val)));
05195
05196 }
05197 break;
05198
05199 case 13:
05200
05201
05202 #line 918 "ripper.y"
05203 {
05204 #if 0
05205 void_stmts((yyvsp[(1) - (2)].val));
05206 fixup_nodes(&deferred_nodes);
05207 #endif
05208
05209 (yyval.val) = (yyvsp[(1) - (2)].val);
05210 }
05211 break;
05212
05213 case 14:
05214
05215
05216 #line 929 "ripper.y"
05217 {
05218 #if 0
05219 (yyval.val) = NEW_BEGIN(0);
05220 #endif
05221 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new),
05222 dispatch0(void_stmt));
05223
05224 }
05225 break;
05226
05227 case 15:
05228
05229
05230 #line 938 "ripper.y"
05231 {
05232 #if 0
05233 (yyval.val) = newline_node((yyvsp[(1) - (1)].val));
05234 #endif
05235 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val));
05236
05237 }
05238 break;
05239
05240 case 16:
05241
05242
05243 #line 946 "ripper.y"
05244 {
05245 #if 0
05246 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val)));
05247 #endif
05248 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05249
05250 }
05251 break;
05252
05253 case 17:
05254
05255
05256 #line 954 "ripper.y"
05257 {
05258 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val));
05259 }
05260 break;
05261
05262 case 18:
05263
05264
05265 #line 959 "ripper.y"
05266 {lex_state = EXPR_FNAME;}
05267 break;
05268
05269 case 19:
05270
05271
05272 #line 960 "ripper.y"
05273 {
05274 #if 0
05275 (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val));
05276 #endif
05277 (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val));
05278
05279 }
05280 break;
05281
05282 case 20:
05283
05284
05285 #line 968 "ripper.y"
05286 {
05287 #if 0
05288 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05289 #endif
05290 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05291
05292 }
05293 break;
05294
05295 case 21:
05296
05297
05298 #line 976 "ripper.y"
05299 {
05300 #if 0
05301 char buf[2];
05302 buf[0] = '$';
05303 buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth;
05304 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2));
05305 #endif
05306 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05307
05308 }
05309 break;
05310
05311 case 22:
05312
05313
05314 #line 987 "ripper.y"
05315 {
05316 #if 0
05317 yyerror("can't make alias for the number variables");
05318 (yyval.val) = NEW_BEGIN(0);
05319 #endif
05320 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05321 (yyval.val) = dispatch1(alias_error, (yyval.val));
05322
05323 }
05324 break;
05325
05326 case 23:
05327
05328
05329 #line 997 "ripper.y"
05330 {
05331 #if 0
05332 (yyval.val) = (yyvsp[(2) - (2)].val);
05333 #endif
05334 (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val));
05335
05336 }
05337 break;
05338
05339 case 24:
05340
05341
05342 #line 1005 "ripper.y"
05343 {
05344 #if 0
05345 (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0);
05346 fixpos((yyval.val), (yyvsp[(3) - (3)].val));
05347 #endif
05348 (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05349
05350 }
05351 break;
05352
05353 case 25:
05354
05355
05356 #line 1014 "ripper.y"
05357 {
05358 #if 0
05359 (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0);
05360 fixpos((yyval.val), (yyvsp[(3) - (3)].val));
05361 #endif
05362 (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05363
05364 }
05365 break;
05366
05367 case 26:
05368
05369
05370 #line 1023 "ripper.y"
05371 {
05372 #if 0
05373 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) {
05374 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0);
05375 }
05376 else {
05377 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1);
05378 }
05379 #endif
05380 (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05381
05382 }
05383 break;
05384
05385 case 27:
05386
05387
05388 #line 1036 "ripper.y"
05389 {
05390 #if 0
05391 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) {
05392 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0);
05393 }
05394 else {
05395 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1);
05396 }
05397 #endif
05398 (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05399
05400 }
05401 break;
05402
05403 case 28:
05404
05405
05406 #line 1049 "ripper.y"
05407 {
05408 #if 0
05409 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0);
05410 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0);
05411 #endif
05412 (yyval.val) = dispatch2(rescue_mod, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05413
05414 }
05415 break;
05416
05417 case 29:
05418
05419
05420 #line 1058 "ripper.y"
05421 {
05422 if (in_def || in_single) {
05423 rb_warn0("END in method; use at_exit");
05424 }
05425 #if 0
05426 (yyval.val) = NEW_POSTEXE(NEW_NODE(
05427 NODE_SCOPE, 0 , (yyvsp[(3) - (4)].val) , 0 ));
05428 #endif
05429 (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val));
05430
05431 }
05432 break;
05433
05434 case 31:
05435
05436
05437 #line 1071 "ripper.y"
05438 {
05439 #if 0
05440 value_expr((yyvsp[(3) - (3)].val));
05441 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05442 (yyval.val) = (yyvsp[(1) - (3)].val);
05443 #endif
05444 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05445
05446 }
05447 break;
05448
05449 case 32:
05450
05451
05452 #line 1081 "ripper.y"
05453 {
05454 #if 0
05455 value_expr((yyvsp[(3) - (3)].val));
05456 if ((yyvsp[(1) - (3)].val)) {
05457 ID vid = (yyvsp[(1) - (3)].val)->nd_vid;
05458 if ((yyvsp[(2) - (3)].val) == tOROP) {
05459 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05460 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val));
05461 if (is_asgn_or_id(vid)) {
05462 (yyval.val)->nd_aid = vid;
05463 }
05464 }
05465 else if ((yyvsp[(2) - (3)].val) == tANDOP) {
05466 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05467 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val));
05468 }
05469 else {
05470 (yyval.val) = (yyvsp[(1) - (3)].val);
05471 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val)));
05472 }
05473 }
05474 else {
05475 (yyval.val) = NEW_BEGIN(0);
05476 }
05477 #endif
05478 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05479
05480 }
05481 break;
05482
05483 case 33:
05484
05485
05486 #line 1110 "ripper.y"
05487 {
05488 #if 0
05489 NODE *args;
05490
05491 value_expr((yyvsp[(6) - (6)].val));
05492 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY();
05493 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
05494 if ((yyvsp[(5) - (6)].val) == tOROP) {
05495 (yyvsp[(5) - (6)].val) = 0;
05496 }
05497 else if ((yyvsp[(5) - (6)].val) == tANDOP) {
05498 (yyvsp[(5) - (6)].val) = 1;
05499 }
05500 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args);
05501 fixpos((yyval.val), (yyvsp[(1) - (6)].val));
05502 #endif
05503 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val)));
05504 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
05505
05506 }
05507 break;
05508
05509 case 34:
05510
05511
05512 #line 1131 "ripper.y"
05513 {
05514 #if 0
05515 value_expr((yyvsp[(5) - (5)].val));
05516 if ((yyvsp[(4) - (5)].val) == tOROP) {
05517 (yyvsp[(4) - (5)].val) = 0;
05518 }
05519 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
05520 (yyvsp[(4) - (5)].val) = 1;
05521 }
05522 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05523 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05524 #endif
05525 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
05526 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05527
05528 }
05529 break;
05530
05531 case 35:
05532
05533
05534 #line 1148 "ripper.y"
05535 {
05536 #if 0
05537 value_expr((yyvsp[(5) - (5)].val));
05538 if ((yyvsp[(4) - (5)].val) == tOROP) {
05539 (yyvsp[(4) - (5)].val) = 0;
05540 }
05541 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
05542 (yyvsp[(4) - (5)].val) = 1;
05543 }
05544 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05545 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05546 #endif
05547 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
05548 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05549
05550 }
05551 break;
05552
05553 case 36:
05554
05555
05556 #line 1165 "ripper.y"
05557 {
05558 #if 0
05559 yyerror("constant re-assignment");
05560 (yyval.val) = 0;
05561 #endif
05562 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
05563 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05564 (yyval.val) = dispatch1(assign_error, (yyval.val));
05565
05566 }
05567 break;
05568
05569 case 37:
05570
05571
05572 #line 1176 "ripper.y"
05573 {
05574 #if 0
05575 value_expr((yyvsp[(5) - (5)].val));
05576 if ((yyvsp[(4) - (5)].val) == tOROP) {
05577 (yyvsp[(4) - (5)].val) = 0;
05578 }
05579 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
05580 (yyvsp[(4) - (5)].val) = 1;
05581 }
05582 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05583 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05584 #endif
05585 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val));
05586 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05587
05588 }
05589 break;
05590
05591 case 38:
05592
05593
05594 #line 1193 "ripper.y"
05595 {
05596 #if 0
05597 rb_backref_error((yyvsp[(1) - (3)].val));
05598 (yyval.val) = NEW_BEGIN(0);
05599 #endif
05600 (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
05601 (yyval.val) = dispatch1(assign_error, (yyval.val));
05602
05603 }
05604 break;
05605
05606 case 39:
05607
05608
05609 #line 1203 "ripper.y"
05610 {
05611 #if 0
05612 value_expr((yyvsp[(3) - (3)].val));
05613 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05614 #endif
05615 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05616
05617 }
05618 break;
05619
05620 case 40:
05621
05622
05623 #line 1212 "ripper.y"
05624 {
05625 #if 0
05626 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05627 (yyval.val) = (yyvsp[(1) - (3)].val);
05628 #endif
05629 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05630
05631 }
05632 break;
05633
05634 case 41:
05635
05636
05637 #line 1221 "ripper.y"
05638 {
05639 #if 0
05640 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05641 (yyval.val) = (yyvsp[(1) - (3)].val);
05642 #endif
05643 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05644
05645 }
05646 break;
05647
05648 case 43:
05649
05650
05651 #line 1233 "ripper.y"
05652 {
05653 #if 0
05654 value_expr((yyvsp[(3) - (3)].val));
05655 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05656 #endif
05657 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05658
05659 }
05660 break;
05661
05662 case 44:
05663
05664
05665 #line 1242 "ripper.y"
05666 {
05667 #if 0
05668 value_expr((yyvsp[(3) - (3)].val));
05669 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05670 #endif
05671 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05672
05673 }
05674 break;
05675
05676 case 46:
05677
05678
05679 #line 1255 "ripper.y"
05680 {
05681 #if 0
05682 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05683 #endif
05684 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val));
05685
05686 }
05687 break;
05688
05689 case 47:
05690
05691
05692 #line 1263 "ripper.y"
05693 {
05694 #if 0
05695 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05696 #endif
05697 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val));
05698
05699 }
05700 break;
05701
05702 case 48:
05703
05704
05705 #line 1271 "ripper.y"
05706 {
05707 #if 0
05708 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!');
05709 #endif
05710 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val));
05711
05712 }
05713 break;
05714
05715 case 49:
05716
05717
05718 #line 1279 "ripper.y"
05719 {
05720 #if 0
05721 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!');
05722 #endif
05723 (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val));
05724
05725 }
05726 break;
05727
05728 case 51:
05729
05730
05731 #line 1290 "ripper.y"
05732 {
05733 #if 0
05734 value_expr((yyvsp[(1) - (1)].val));
05735 (yyval.val) = (yyvsp[(1) - (1)].val);
05736 if (!(yyval.val)) (yyval.val) = NEW_NIL();
05737 #endif
05738 (yyval.val) = (yyvsp[(1) - (1)].val);
05739
05740 }
05741 break;
05742
05743 case 55:
05744
05745
05746 #line 1307 "ripper.y"
05747 {
05748 #if 0
05749 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05750 #endif
05751 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
05752 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val));
05753
05754 }
05755 break;
05756
05757 case 56:
05758
05759
05760 #line 1316 "ripper.y"
05761 {
05762 #if 0
05763 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05764 #endif
05765 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val));
05766 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val));
05767
05768 }
05769 break;
05770
05771 case 57:
05772
05773
05774 #line 1327 "ripper.y"
05775 {
05776 (yyvsp[(1) - (1)].vars) = dyna_push();
05777 #if 0
05778 (yyval.num) = ruby_sourceline;
05779 #endif
05780
05781 }
05782 break;
05783
05784 case 58:
05785
05786
05787 #line 1337 "ripper.y"
05788 {
05789 #if 0
05790 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
05791 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
05792 #endif
05793 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
05794
05795 dyna_pop((yyvsp[(1) - (5)].vars));
05796 }
05797 break;
05798
05799 case 59:
05800
05801
05802 #line 1349 "ripper.y"
05803 {
05804 #if 0
05805 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
05806 fixpos((yyval.val), (yyvsp[(2) - (2)].val));
05807 #endif
05808 (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
05809
05810 }
05811 break;
05812
05813 case 60:
05814
05815
05816 #line 1358 "ripper.y"
05817 {
05818 #if 0
05819 block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val));
05820 (yyvsp[(3) - (3)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
05821 (yyval.val) = (yyvsp[(3) - (3)].val);
05822 fixpos((yyval.val), (yyvsp[(2) - (3)].val));
05823 #endif
05824 (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
05825 (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val));
05826
05827 }
05828 break;
05829
05830 case 61:
05831
05832
05833 #line 1370 "ripper.y"
05834 {
05835 #if 0
05836 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05837 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
05838 #endif
05839 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05840
05841 }
05842 break;
05843
05844 case 62:
05845
05846
05847 #line 1379 "ripper.y"
05848 {
05849 #if 0
05850 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val));
05851 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
05852 (yyval.val) = (yyvsp[(5) - (5)].val);
05853 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05854 #endif
05855 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
05856 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val));
05857
05858 }
05859 break;
05860
05861 case 63:
05862
05863
05864 #line 1391 "ripper.y"
05865 {
05866 #if 0
05867 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05868 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
05869 #endif
05870 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05871
05872 }
05873 break;
05874
05875 case 64:
05876
05877
05878 #line 1400 "ripper.y"
05879 {
05880 #if 0
05881 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val));
05882 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
05883 (yyval.val) = (yyvsp[(5) - (5)].val);
05884 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05885 #endif
05886 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
05887 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val));
05888
05889 }
05890 break;
05891
05892 case 65:
05893
05894
05895 #line 1412 "ripper.y"
05896 {
05897 #if 0
05898 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val));
05899 fixpos((yyval.val), (yyvsp[(2) - (2)].val));
05900 #endif
05901 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val));
05902
05903 }
05904 break;
05905
05906 case 66:
05907
05908
05909 #line 1421 "ripper.y"
05910 {
05911 #if 0
05912 (yyval.val) = new_yield((yyvsp[(2) - (2)].val));
05913 fixpos((yyval.val), (yyvsp[(2) - (2)].val));
05914 #endif
05915 (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val));
05916
05917 }
05918 break;
05919
05920 case 67:
05921
05922
05923 #line 1430 "ripper.y"
05924 {
05925 #if 0
05926 (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val)));
05927 #endif
05928 (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val));
05929
05930 }
05931 break;
05932
05933 case 68:
05934
05935
05936 #line 1438 "ripper.y"
05937 {
05938 #if 0
05939 (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val)));
05940 #endif
05941 (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val));
05942
05943 }
05944 break;
05945
05946 case 69:
05947
05948
05949 #line 1446 "ripper.y"
05950 {
05951 #if 0
05952 (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val)));
05953 #endif
05954 (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val));
05955
05956 }
05957 break;
05958
05959 case 71:
05960
05961
05962 #line 1457 "ripper.y"
05963 {
05964 #if 0
05965 (yyval.val) = (yyvsp[(2) - (3)].val);
05966 #endif
05967 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
05968
05969 }
05970 break;
05971
05972 case 73:
05973
05974
05975 #line 1468 "ripper.y"
05976 {
05977 #if 0
05978 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0);
05979 #endif
05980 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
05981
05982 }
05983 break;
05984
05985 case 74:
05986
05987
05988 #line 1478 "ripper.y"
05989 {
05990 #if 0
05991 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0);
05992 #endif
05993 (yyval.val) = (yyvsp[(1) - (1)].val);
05994
05995 }
05996 break;
05997
05998 case 75:
05999
06000
06001 #line 1486 "ripper.y"
06002 {
06003 #if 0
06004 (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0);
06005 #endif
06006 (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
06007
06008 }
06009 break;
06010
06011 case 76:
06012
06013
06014 #line 1494 "ripper.y"
06015 {
06016 #if 0
06017 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06018 #endif
06019 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06020
06021 }
06022 break;
06023
06024 case 77:
06025
06026
06027 #line 1502 "ripper.y"
06028 {
06029 #if 0
06030 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val)));
06031 #endif
06032 (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
06033 (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val));
06034
06035 }
06036 break;
06037
06038 case 78:
06039
06040
06041 #line 1511 "ripper.y"
06042 {
06043 #if 0
06044 (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1);
06045 #endif
06046 (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil);
06047
06048 }
06049 break;
06050
06051 case 79:
06052
06053
06054 #line 1519 "ripper.y"
06055 {
06056 #if 0
06057 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val)));
06058 #endif
06059 (yyvsp[(1) - (4)].val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil);
06060 (yyval.val) = mlhs_add((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
06061
06062 }
06063 break;
06064
06065 case 80:
06066
06067
06068 #line 1528 "ripper.y"
06069 {
06070 #if 0
06071 (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val));
06072 #endif
06073 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val));
06074
06075 }
06076 break;
06077
06078 case 81:
06079
06080
06081 #line 1536 "ripper.y"
06082 {
06083 #if 0
06084 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val)));
06085 #endif
06086 (yyvsp[(2) - (4)].val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val));
06087 (yyval.val) = mlhs_add((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val));
06088
06089 }
06090 break;
06091
06092 case 82:
06093
06094
06095 #line 1545 "ripper.y"
06096 {
06097 #if 0
06098 (yyval.val) = NEW_MASGN(0, -1);
06099 #endif
06100 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
06101
06102 }
06103 break;
06104
06105 case 83:
06106
06107
06108 #line 1553 "ripper.y"
06109 {
06110 #if 0
06111 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val)));
06112 #endif
06113 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
06114 (yyval.val) = mlhs_add((yyval.val), (yyvsp[(3) - (3)].val));
06115
06116 }
06117 break;
06118
06119 case 85:
06120
06121
06122 #line 1565 "ripper.y"
06123 {
06124 #if 0
06125 (yyval.val) = (yyvsp[(2) - (3)].val);
06126 #endif
06127 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
06128
06129 }
06130 break;
06131
06132 case 86:
06133
06134
06135 #line 1575 "ripper.y"
06136 {
06137 #if 0
06138 (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val));
06139 #endif
06140 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val));
06141
06142 }
06143 break;
06144
06145 case 87:
06146
06147
06148 #line 1583 "ripper.y"
06149 {
06150 #if 0
06151 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
06152 #endif
06153 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
06154
06155 }
06156 break;
06157
06158 case 88:
06159
06160
06161 #line 1593 "ripper.y"
06162 {
06163 #if 0
06164 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
06165 #endif
06166 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val));
06167
06168 }
06169 break;
06170
06171 case 89:
06172
06173
06174 #line 1601 "ripper.y"
06175 {
06176 #if 0
06177 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06178 #endif
06179 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06180
06181 }
06182 break;
06183
06184 case 90:
06185
06186
06187 #line 1611 "ripper.y"
06188 {
06189 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
06190 }
06191 break;
06192
06193 case 91:
06194
06195
06196 #line 1615 "ripper.y"
06197 {
06198 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
06199 }
06200 break;
06201
06202 case 92:
06203
06204
06205 #line 1619 "ripper.y"
06206 {
06207 #if 0
06208 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
06209 #endif
06210 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
06211
06212 }
06213 break;
06214
06215 case 93:
06216
06217
06218 #line 1627 "ripper.y"
06219 {
06220 #if 0
06221 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06222 #endif
06223 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
06224
06225 }
06226 break;
06227
06228 case 94:
06229
06230
06231 #line 1635 "ripper.y"
06232 {
06233 #if 0
06234 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06235 #endif
06236 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06237
06238 }
06239 break;
06240
06241 case 95:
06242
06243
06244 #line 1643 "ripper.y"
06245 {
06246 #if 0
06247 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06248 #endif
06249 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
06250
06251 }
06252 break;
06253
06254 case 96:
06255
06256
06257 #line 1651 "ripper.y"
06258 {
06259 #if 0
06260 if (in_def || in_single)
06261 yyerror("dynamic constant assignment");
06262 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)));
06263 #endif
06264 if (in_def || in_single)
06265 yyerror("dynamic constant assignment");
06266 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06267
06268 }
06269 break;
06270
06271 case 97:
06272
06273
06274 #line 1663 "ripper.y"
06275 {
06276 #if 0
06277 if (in_def || in_single)
06278 yyerror("dynamic constant assignment");
06279 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val)));
06280 #endif
06281 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val));
06282
06283 }
06284 break;
06285
06286 case 98:
06287
06288
06289 #line 1673 "ripper.y"
06290 {
06291 #if 0
06292 rb_backref_error((yyvsp[(1) - (1)].val));
06293 (yyval.val) = NEW_BEGIN(0);
06294 #endif
06295 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val));
06296 (yyval.val) = dispatch1(assign_error, (yyval.val));
06297
06298 }
06299 break;
06300
06301 case 99:
06302
06303
06304 #line 1685 "ripper.y"
06305 {
06306 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
06307 #if 0
06308 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0);
06309 #endif
06310 (yyval.val) = dispatch1(var_field, (yyval.val));
06311
06312 }
06313 break;
06314
06315 case 100:
06316
06317
06318 #line 1694 "ripper.y"
06319 {
06320 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
06321 #if 0
06322 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0);
06323 #endif
06324 (yyval.val) = dispatch1(var_field, (yyval.val));
06325
06326 }
06327 break;
06328
06329 case 101:
06330
06331
06332 #line 1703 "ripper.y"
06333 {
06334 #if 0
06335 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
06336 #endif
06337 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
06338
06339 }
06340 break;
06341
06342 case 102:
06343
06344
06345 #line 1711 "ripper.y"
06346 {
06347 #if 0
06348 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06349 #endif
06350 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
06351
06352 }
06353 break;
06354
06355 case 103:
06356
06357
06358 #line 1719 "ripper.y"
06359 {
06360 #if 0
06361 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06362 #endif
06363 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val));
06364
06365 }
06366 break;
06367
06368 case 104:
06369
06370
06371 #line 1727 "ripper.y"
06372 {
06373 #if 0
06374 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06375 #endif
06376 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
06377
06378 }
06379 break;
06380
06381 case 105:
06382
06383
06384 #line 1735 "ripper.y"
06385 {
06386 #if 0
06387 if (in_def || in_single)
06388 yyerror("dynamic constant assignment");
06389 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)));
06390 #endif
06391 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06392 if (in_def || in_single) {
06393 (yyval.val) = dispatch1(assign_error, (yyval.val));
06394 }
06395
06396 }
06397 break;
06398
06399 case 106:
06400
06401
06402 #line 1748 "ripper.y"
06403 {
06404 #if 0
06405 if (in_def || in_single)
06406 yyerror("dynamic constant assignment");
06407 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val)));
06408 #endif
06409 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val));
06410 if (in_def || in_single) {
06411 (yyval.val) = dispatch1(assign_error, (yyval.val));
06412 }
06413
06414 }
06415 break;
06416
06417 case 107:
06418
06419
06420 #line 1761 "ripper.y"
06421 {
06422 #if 0
06423 rb_backref_error((yyvsp[(1) - (1)].val));
06424 (yyval.val) = NEW_BEGIN(0);
06425 #endif
06426 (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val));
06427
06428 }
06429 break;
06430
06431 case 108:
06432
06433
06434 #line 1772 "ripper.y"
06435 {
06436 #if 0
06437 yyerror("class/module name must be CONSTANT");
06438 #endif
06439 (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val));
06440
06441 }
06442 break;
06443
06444 case 110:
06445
06446
06447 #line 1783 "ripper.y"
06448 {
06449 #if 0
06450 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val));
06451 #endif
06452 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val));
06453
06454 }
06455 break;
06456
06457 case 111:
06458
06459
06460 #line 1791 "ripper.y"
06461 {
06462 #if 0
06463 (yyval.val) = NEW_COLON2(0, (yyval.val));
06464 #endif
06465 (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val));
06466
06467 }
06468 break;
06469
06470 case 112:
06471
06472
06473 #line 1799 "ripper.y"
06474 {
06475 #if 0
06476 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06477 #endif
06478 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06479
06480 }
06481 break;
06482
06483 case 116:
06484
06485
06486 #line 1812 "ripper.y"
06487 {
06488 lex_state = EXPR_ENDFN;
06489 (yyval.val) = (yyvsp[(1) - (1)].val);
06490 }
06491 break;
06492
06493 case 117:
06494
06495
06496 #line 1817 "ripper.y"
06497 {
06498 lex_state = EXPR_ENDFN;
06499 #if 0
06500 (yyval.val) = (yyvsp[(1) - (1)].id);
06501 #endif
06502 (yyval.val) = (yyvsp[(1) - (1)].val);
06503
06504 }
06505 break;
06506
06507 case 120:
06508
06509
06510 #line 1832 "ripper.y"
06511 {
06512 #if 0
06513 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val)));
06514 #endif
06515 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val));
06516
06517 }
06518 break;
06519
06520 case 122:
06521
06522
06523 #line 1843 "ripper.y"
06524 {
06525 #if 0
06526 (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val));
06527 #endif
06528 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
06529
06530 }
06531 break;
06532
06533 case 123:
06534
06535
06536 #line 1850 "ripper.y"
06537 {lex_state = EXPR_FNAME;}
06538 break;
06539
06540 case 124:
06541
06542
06543 #line 1851 "ripper.y"
06544 {
06545 #if 0
06546 (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val)));
06547 #endif
06548 rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
06549
06550 }
06551 break;
06552
06553 case 125:
06554
06555
06556 #line 1860 "ripper.y"
06557 { ifndef_ripper((yyval.val) = '|'); }
06558 break;
06559
06560 case 126:
06561
06562
06563 #line 1861 "ripper.y"
06564 { ifndef_ripper((yyval.val) = '^'); }
06565 break;
06566
06567 case 127:
06568
06569
06570 #line 1862 "ripper.y"
06571 { ifndef_ripper((yyval.val) = '&'); }
06572 break;
06573
06574 case 128:
06575
06576
06577 #line 1863 "ripper.y"
06578 { ifndef_ripper((yyval.val) = tCMP); }
06579 break;
06580
06581 case 129:
06582
06583
06584 #line 1864 "ripper.y"
06585 { ifndef_ripper((yyval.val) = tEQ); }
06586 break;
06587
06588 case 130:
06589
06590
06591 #line 1865 "ripper.y"
06592 { ifndef_ripper((yyval.val) = tEQQ); }
06593 break;
06594
06595 case 131:
06596
06597
06598 #line 1866 "ripper.y"
06599 { ifndef_ripper((yyval.val) = tMATCH); }
06600 break;
06601
06602 case 132:
06603
06604
06605 #line 1867 "ripper.y"
06606 { ifndef_ripper((yyval.val) = tNMATCH); }
06607 break;
06608
06609 case 133:
06610
06611
06612 #line 1868 "ripper.y"
06613 { ifndef_ripper((yyval.val) = '>'); }
06614 break;
06615
06616 case 134:
06617
06618
06619 #line 1869 "ripper.y"
06620 { ifndef_ripper((yyval.val) = tGEQ); }
06621 break;
06622
06623 case 135:
06624
06625
06626 #line 1870 "ripper.y"
06627 { ifndef_ripper((yyval.val) = '<'); }
06628 break;
06629
06630 case 136:
06631
06632
06633 #line 1871 "ripper.y"
06634 { ifndef_ripper((yyval.val) = tLEQ); }
06635 break;
06636
06637 case 137:
06638
06639
06640 #line 1872 "ripper.y"
06641 { ifndef_ripper((yyval.val) = tNEQ); }
06642 break;
06643
06644 case 138:
06645
06646
06647 #line 1873 "ripper.y"
06648 { ifndef_ripper((yyval.val) = tLSHFT); }
06649 break;
06650
06651 case 139:
06652
06653
06654 #line 1874 "ripper.y"
06655 { ifndef_ripper((yyval.val) = tRSHFT); }
06656 break;
06657
06658 case 140:
06659
06660
06661 #line 1875 "ripper.y"
06662 { ifndef_ripper((yyval.val) = '+'); }
06663 break;
06664
06665 case 141:
06666
06667
06668 #line 1876 "ripper.y"
06669 { ifndef_ripper((yyval.val) = '-'); }
06670 break;
06671
06672 case 142:
06673
06674
06675 #line 1877 "ripper.y"
06676 { ifndef_ripper((yyval.val) = '*'); }
06677 break;
06678
06679 case 143:
06680
06681
06682 #line 1878 "ripper.y"
06683 { ifndef_ripper((yyval.val) = '*'); }
06684 break;
06685
06686 case 144:
06687
06688
06689 #line 1879 "ripper.y"
06690 { ifndef_ripper((yyval.val) = '/'); }
06691 break;
06692
06693 case 145:
06694
06695
06696 #line 1880 "ripper.y"
06697 { ifndef_ripper((yyval.val) = '%'); }
06698 break;
06699
06700 case 146:
06701
06702
06703 #line 1881 "ripper.y"
06704 { ifndef_ripper((yyval.val) = tPOW); }
06705 break;
06706
06707 case 147:
06708
06709
06710 #line 1882 "ripper.y"
06711 { ifndef_ripper((yyval.val) = '!'); }
06712 break;
06713
06714 case 148:
06715
06716
06717 #line 1883 "ripper.y"
06718 { ifndef_ripper((yyval.val) = '~'); }
06719 break;
06720
06721 case 149:
06722
06723
06724 #line 1884 "ripper.y"
06725 { ifndef_ripper((yyval.val) = tUPLUS); }
06726 break;
06727
06728 case 150:
06729
06730
06731 #line 1885 "ripper.y"
06732 { ifndef_ripper((yyval.val) = tUMINUS); }
06733 break;
06734
06735 case 151:
06736
06737
06738 #line 1886 "ripper.y"
06739 { ifndef_ripper((yyval.val) = tAREF); }
06740 break;
06741
06742 case 152:
06743
06744
06745 #line 1887 "ripper.y"
06746 { ifndef_ripper((yyval.val) = tASET); }
06747 break;
06748
06749 case 153:
06750
06751
06752 #line 1888 "ripper.y"
06753 { ifndef_ripper((yyval.val) = '`'); }
06754 break;
06755
06756 case 195:
06757
06758
06759 #line 1906 "ripper.y"
06760 {
06761 #if 0
06762 value_expr((yyvsp[(3) - (3)].val));
06763 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06764 #endif
06765 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06766
06767 }
06768 break;
06769
06770 case 196:
06771
06772
06773 #line 1915 "ripper.y"
06774 {
06775 #if 0
06776 value_expr((yyvsp[(3) - (5)].val));
06777 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0);
06778 (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
06779 #endif
06780 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)));
06781
06782 }
06783 break;
06784
06785 case 197:
06786
06787
06788 #line 1925 "ripper.y"
06789 {
06790 #if 0
06791 value_expr((yyvsp[(3) - (3)].val));
06792 if ((yyvsp[(1) - (3)].val)) {
06793 ID vid = (yyvsp[(1) - (3)].val)->nd_vid;
06794 if ((yyvsp[(2) - (3)].val) == tOROP) {
06795 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
06796 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val));
06797 if (is_asgn_or_id(vid)) {
06798 (yyval.val)->nd_aid = vid;
06799 }
06800 }
06801 else if ((yyvsp[(2) - (3)].val) == tANDOP) {
06802 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
06803 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val));
06804 }
06805 else {
06806 (yyval.val) = (yyvsp[(1) - (3)].val);
06807 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val)));
06808 }
06809 }
06810 else {
06811 (yyval.val) = NEW_BEGIN(0);
06812 }
06813 #endif
06814 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
06815
06816 }
06817 break;
06818
06819 case 198:
06820
06821
06822 #line 1954 "ripper.y"
06823 {
06824 #if 0
06825 value_expr((yyvsp[(3) - (5)].val));
06826 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0);
06827 if ((yyvsp[(1) - (5)].val)) {
06828 ID vid = (yyvsp[(1) - (5)].val)->nd_vid;
06829 if ((yyvsp[(2) - (5)].val) == tOROP) {
06830 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val);
06831 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].val));
06832 if (is_asgn_or_id(vid)) {
06833 (yyval.val)->nd_aid = vid;
06834 }
06835 }
06836 else if ((yyvsp[(2) - (5)].val) == tANDOP) {
06837 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val);
06838 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].val));
06839 }
06840 else {
06841 (yyval.val) = (yyvsp[(1) - (5)].val);
06842 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].val), NEW_LIST((yyvsp[(3) - (5)].val)));
06843 }
06844 }
06845 else {
06846 (yyval.val) = NEW_BEGIN(0);
06847 }
06848 #endif
06849 (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val));
06850 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val));
06851
06852 }
06853 break;
06854
06855 case 199:
06856
06857
06858 #line 1985 "ripper.y"
06859 {
06860 #if 0
06861 NODE *args;
06862
06863 value_expr((yyvsp[(6) - (6)].val));
06864 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY();
06865 if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) {
06866 args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
06867 }
06868 else {
06869 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
06870 }
06871 if ((yyvsp[(5) - (6)].val) == tOROP) {
06872 (yyvsp[(5) - (6)].val) = 0;
06873 }
06874 else if ((yyvsp[(5) - (6)].val) == tANDOP) {
06875 (yyvsp[(5) - (6)].val) = 1;
06876 }
06877 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args);
06878 fixpos((yyval.val), (yyvsp[(1) - (6)].val));
06879 #endif
06880 (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val)));
06881 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
06882
06883 }
06884 break;
06885
06886 case 200:
06887
06888
06889 #line 2011 "ripper.y"
06890 {
06891 #if 0
06892 value_expr((yyvsp[(5) - (5)].val));
06893 if ((yyvsp[(4) - (5)].val) == tOROP) {
06894 (yyvsp[(4) - (5)].val) = 0;
06895 }
06896 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
06897 (yyvsp[(4) - (5)].val) = 1;
06898 }
06899 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06900 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
06901 #endif
06902 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
06903 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06904
06905 }
06906 break;
06907
06908 case 201:
06909
06910
06911 #line 2028 "ripper.y"
06912 {
06913 #if 0
06914 value_expr((yyvsp[(5) - (5)].val));
06915 if ((yyvsp[(4) - (5)].val) == tOROP) {
06916 (yyvsp[(4) - (5)].val) = 0;
06917 }
06918 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
06919 (yyvsp[(4) - (5)].val) = 1;
06920 }
06921 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06922 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
06923 #endif
06924 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
06925 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06926
06927 }
06928 break;
06929
06930 case 202:
06931
06932
06933 #line 2045 "ripper.y"
06934 {
06935 #if 0
06936 value_expr((yyvsp[(5) - (5)].val));
06937 if ((yyvsp[(4) - (5)].val) == tOROP) {
06938 (yyvsp[(4) - (5)].val) = 0;
06939 }
06940 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
06941 (yyvsp[(4) - (5)].val) = 1;
06942 }
06943 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06944 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
06945 #endif
06946 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val));
06947 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06948
06949 }
06950 break;
06951
06952 case 203:
06953
06954
06955 #line 2062 "ripper.y"
06956 {
06957 #if 0
06958 yyerror("constant re-assignment");
06959 (yyval.val) = NEW_BEGIN(0);
06960 #endif
06961 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
06962 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06963 (yyval.val) = dispatch1(assign_error, (yyval.val));
06964
06965 }
06966 break;
06967
06968 case 204:
06969
06970
06971 #line 2073 "ripper.y"
06972 {
06973 #if 0
06974 yyerror("constant re-assignment");
06975 (yyval.val) = NEW_BEGIN(0);
06976 #endif
06977 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val));
06978 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
06979 (yyval.val) = dispatch1(assign_error, (yyval.val));
06980
06981 }
06982 break;
06983
06984 case 205:
06985
06986
06987 #line 2084 "ripper.y"
06988 {
06989 #if 0
06990 rb_backref_error((yyvsp[(1) - (3)].val));
06991 (yyval.val) = NEW_BEGIN(0);
06992 #endif
06993 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val));
06994 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
06995 (yyval.val) = dispatch1(assign_error, (yyval.val));
06996
06997 }
06998 break;
06999
07000 case 206:
07001
07002
07003 #line 2095 "ripper.y"
07004 {
07005 #if 0
07006 value_expr((yyvsp[(1) - (3)].val));
07007 value_expr((yyvsp[(3) - (3)].val));
07008 (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07009 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) &&
07010 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) {
07011 deferred_nodes = list_append(deferred_nodes, (yyval.val));
07012 }
07013 #endif
07014 (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07015
07016 }
07017 break;
07018
07019 case 207:
07020
07021
07022 #line 2109 "ripper.y"
07023 {
07024 #if 0
07025 value_expr((yyvsp[(1) - (3)].val));
07026 value_expr((yyvsp[(3) - (3)].val));
07027 (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07028 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) &&
07029 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) {
07030 deferred_nodes = list_append(deferred_nodes, (yyval.val));
07031 }
07032 #endif
07033 (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07034
07035 }
07036 break;
07037
07038 case 208:
07039
07040
07041 #line 2123 "ripper.y"
07042 {
07043 #if 0
07044 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val));
07045 #endif
07046 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val));
07047
07048 }
07049 break;
07050
07051 case 209:
07052
07053
07054 #line 2131 "ripper.y"
07055 {
07056 #if 0
07057 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val));
07058 #endif
07059 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val));
07060
07061 }
07062 break;
07063
07064 case 210:
07065
07066
07067 #line 2139 "ripper.y"
07068 {
07069 #if 0
07070 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val));
07071 #endif
07072 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val));
07073
07074 }
07075 break;
07076
07077 case 211:
07078
07079
07080 #line 2147 "ripper.y"
07081 {
07082 #if 0
07083 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val));
07084 #endif
07085 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val));
07086
07087 }
07088 break;
07089
07090 case 212:
07091
07092
07093 #line 2155 "ripper.y"
07094 {
07095 #if 0
07096 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val));
07097 #endif
07098 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val));
07099
07100 }
07101 break;
07102
07103 case 213:
07104
07105
07106 #line 2163 "ripper.y"
07107 {
07108 #if 0
07109 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val));
07110 #endif
07111 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val));
07112
07113 }
07114 break;
07115
07116 case 214:
07117
07118
07119 #line 2171 "ripper.y"
07120 {
07121 #if 0
07122 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0);
07123 #endif
07124 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val));
07125 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val));
07126
07127 }
07128 break;
07129
07130 case 215:
07131
07132
07133 #line 2180 "ripper.y"
07134 {
07135 #if 0
07136 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0);
07137 #endif
07138 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val));
07139 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val));
07140
07141 }
07142 break;
07143
07144 case 216:
07145
07146
07147 #line 2189 "ripper.y"
07148 {
07149 #if 0
07150 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS);
07151 #endif
07152 (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val));
07153
07154 }
07155 break;
07156
07157 case 217:
07158
07159
07160 #line 2197 "ripper.y"
07161 {
07162 #if 0
07163 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS);
07164 #endif
07165 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
07166
07167 }
07168 break;
07169
07170 case 218:
07171
07172
07173 #line 2205 "ripper.y"
07174 {
07175 #if 0
07176 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val));
07177 #endif
07178 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val));
07179
07180 }
07181 break;
07182
07183 case 219:
07184
07185
07186 #line 2213 "ripper.y"
07187 {
07188 #if 0
07189 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val));
07190 #endif
07191 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val));
07192
07193 }
07194 break;
07195
07196 case 220:
07197
07198
07199 #line 2221 "ripper.y"
07200 {
07201 #if 0
07202 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val));
07203 #endif
07204 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val));
07205
07206 }
07207 break;
07208
07209 case 221:
07210
07211
07212 #line 2229 "ripper.y"
07213 {
07214 #if 0
07215 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val));
07216 #endif
07217 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val));
07218
07219 }
07220 break;
07221
07222 case 222:
07223
07224
07225 #line 2237 "ripper.y"
07226 {
07227 #if 0
07228 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val));
07229 #endif
07230 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val));
07231
07232 }
07233 break;
07234
07235 case 223:
07236
07237
07238 #line 2245 "ripper.y"
07239 {
07240 #if 0
07241 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (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 224:
07249
07250
07251 #line 2253 "ripper.y"
07252 {
07253 #if 0
07254 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val));
07255 #endif
07256 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val));
07257
07258 }
07259 break;
07260
07261 case 225:
07262
07263
07264 #line 2261 "ripper.y"
07265 {
07266 #if 0
07267 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (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 226:
07275
07276
07277 #line 2269 "ripper.y"
07278 {
07279 #if 0
07280 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val));
07281 #endif
07282 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val));
07283
07284 }
07285 break;
07286
07287 case 227:
07288
07289
07290 #line 2277 "ripper.y"
07291 {
07292 #if 0
07293 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val));
07294 #endif
07295 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val));
07296
07297 }
07298 break;
07299
07300 case 228:
07301
07302
07303 #line 2285 "ripper.y"
07304 {
07305 #if 0
07306 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val));
07307 #endif
07308 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val));
07309
07310 }
07311 break;
07312
07313 case 229:
07314
07315
07316 #line 2293 "ripper.y"
07317 {
07318 #if 0
07319 (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07320 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].val)->nd_lit) == T_REGEXP) {
07321 (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val));
07322 }
07323 #endif
07324 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val));
07325
07326 }
07327 break;
07328
07329 case 230:
07330
07331
07332 #line 2304 "ripper.y"
07333 {
07334 #if 0
07335 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val));
07336 #endif
07337 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val));
07338
07339 }
07340 break;
07341
07342 case 231:
07343
07344
07345 #line 2312 "ripper.y"
07346 {
07347 #if 0
07348 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!');
07349 #endif
07350 (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val));
07351
07352 }
07353 break;
07354
07355 case 232:
07356
07357
07358 #line 2320 "ripper.y"
07359 {
07360 #if 0
07361 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~');
07362 #endif
07363 (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val));
07364
07365 }
07366 break;
07367
07368 case 233:
07369
07370
07371 #line 2328 "ripper.y"
07372 {
07373 #if 0
07374 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val));
07375 #endif
07376 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val));
07377
07378 }
07379 break;
07380
07381 case 234:
07382
07383
07384 #line 2336 "ripper.y"
07385 {
07386 #if 0
07387 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val));
07388 #endif
07389 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val));
07390
07391 }
07392 break;
07393
07394 case 235:
07395
07396
07397 #line 2344 "ripper.y"
07398 {
07399 #if 0
07400 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07401 #endif
07402 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val));
07403
07404 }
07405 break;
07406
07407 case 236:
07408
07409
07410 #line 2352 "ripper.y"
07411 {
07412 #if 0
07413 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07414 #endif
07415 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val));
07416
07417 }
07418 break;
07419
07420 case 237:
07421
07422
07423 #line 2359 "ripper.y"
07424 {in_defined = 1;}
07425 break;
07426
07427 case 238:
07428
07429
07430 #line 2360 "ripper.y"
07431 {
07432 #if 0
07433 in_defined = 0;
07434 (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val));
07435 #endif
07436 in_defined = 0;
07437 (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val));
07438
07439 }
07440 break;
07441
07442 case 239:
07443
07444
07445 #line 2370 "ripper.y"
07446 {
07447 #if 0
07448 value_expr((yyvsp[(1) - (6)].val));
07449 (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
07450 fixpos((yyval.val), (yyvsp[(1) - (6)].val));
07451 #endif
07452 (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
07453
07454 }
07455 break;
07456
07457 case 240:
07458
07459
07460 #line 2380 "ripper.y"
07461 {
07462 (yyval.val) = (yyvsp[(1) - (1)].val);
07463 }
07464 break;
07465
07466 case 241:
07467
07468
07469 #line 2386 "ripper.y"
07470 {
07471 #if 0
07472 value_expr((yyvsp[(1) - (1)].val));
07473 (yyval.val) = (yyvsp[(1) - (1)].val);
07474 if (!(yyval.val)) (yyval.val) = NEW_NIL();
07475 #endif
07476 (yyval.val) = (yyvsp[(1) - (1)].val);
07477
07478 }
07479 break;
07480
07481 case 243:
07482
07483
07484 #line 2399 "ripper.y"
07485 {
07486 (yyval.val) = (yyvsp[(1) - (2)].val);
07487 }
07488 break;
07489
07490 case 244:
07491
07492
07493 #line 2403 "ripper.y"
07494 {
07495 #if 0
07496 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val)));
07497 #endif
07498 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
07499
07500 }
07501 break;
07502
07503 case 245:
07504
07505
07506 #line 2411 "ripper.y"
07507 {
07508 #if 0
07509 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val)));
07510 #endif
07511 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val));
07512
07513 }
07514 break;
07515
07516 case 246:
07517
07518
07519 #line 2421 "ripper.y"
07520 {
07521 #if 0
07522 (yyval.val) = (yyvsp[(2) - (3)].val);
07523 #endif
07524 (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val)));
07525
07526 }
07527 break;
07528
07529 case 251:
07530
07531
07532 #line 2437 "ripper.y"
07533 {
07534 (yyval.val) = (yyvsp[(1) - (2)].val);
07535 }
07536 break;
07537
07538 case 252:
07539
07540
07541 #line 2441 "ripper.y"
07542 {
07543 #if 0
07544 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val)));
07545 #endif
07546 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
07547
07548 }
07549 break;
07550
07551 case 253:
07552
07553
07554 #line 2449 "ripper.y"
07555 {
07556 #if 0
07557 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val)));
07558 #endif
07559 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val));
07560
07561 }
07562 break;
07563
07564 case 254:
07565
07566
07567 #line 2459 "ripper.y"
07568 {
07569 #if 0
07570 value_expr((yyvsp[(1) - (1)].val));
07571 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
07572 #endif
07573 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val));
07574
07575 }
07576 break;
07577
07578 case 255:
07579
07580
07581 #line 2468 "ripper.y"
07582 {
07583 #if 0
07584 (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
07585 #endif
07586 (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
07587
07588 }
07589 break;
07590
07591 case 256:
07592
07593
07594 #line 2476 "ripper.y"
07595 {
07596 #if 0
07597 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val)));
07598 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val));
07599 #endif
07600 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val));
07601 (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val));
07602
07603 }
07604 break;
07605
07606 case 257:
07607
07608
07609 #line 2486 "ripper.y"
07610 {
07611 #if 0
07612 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val)));
07613 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val));
07614 #endif
07615 (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val));
07616
07617 }
07618 break;
07619
07620 case 258:
07621
07622
07623 #line 2497 "ripper.y"
07624 {
07625 (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val));
07626 }
07627 break;
07628
07629 case 259:
07630
07631
07632 #line 2503 "ripper.y"
07633 {
07634 (yyval.val) = cmdarg_stack;
07635 CMDARG_PUSH(1);
07636 }
07637 break;
07638
07639 case 260:
07640
07641
07642 #line 2508 "ripper.y"
07643 {
07644
07645 cmdarg_stack = (yyvsp[(1) - (2)].val);
07646 (yyval.val) = (yyvsp[(2) - (2)].val);
07647 }
07648 break;
07649
07650 case 261:
07651
07652
07653 #line 2516 "ripper.y"
07654 {
07655 #if 0
07656 (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val));
07657 #endif
07658 (yyval.val) = (yyvsp[(2) - (2)].val);
07659
07660 }
07661 break;
07662
07663 case 262:
07664
07665
07666 #line 2526 "ripper.y"
07667 {
07668 (yyval.val) = (yyvsp[(2) - (2)].val);
07669 }
07670 break;
07671
07672 case 263:
07673
07674
07675 #line 2530 "ripper.y"
07676 {
07677 (yyval.val) = 0;
07678 }
07679 break;
07680
07681 case 264:
07682
07683
07684 #line 2536 "ripper.y"
07685 {
07686 #if 0
07687 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
07688 #endif
07689 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val));
07690
07691 }
07692 break;
07693
07694 case 265:
07695
07696
07697 #line 2544 "ripper.y"
07698 {
07699 #if 0
07700 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val));
07701 #endif
07702 (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val));
07703
07704 }
07705 break;
07706
07707 case 266:
07708
07709
07710 #line 2552 "ripper.y"
07711 {
07712 #if 0
07713 NODE *n1;
07714 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) {
07715 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val));
07716 }
07717 else {
07718 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07719 }
07720 #endif
07721 (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07722
07723 }
07724 break;
07725
07726 case 267:
07727
07728
07729 #line 2566 "ripper.y"
07730 {
07731 #if 0
07732 NODE *n1;
07733 if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) {
07734 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val));
07735 }
07736 else {
07737 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
07738 }
07739 #endif
07740 (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
07741
07742 }
07743 break;
07744
07745 case 268:
07746
07747
07748 #line 2582 "ripper.y"
07749 {
07750 #if 0
07751 NODE *n1;
07752 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) {
07753 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val));
07754 }
07755 else {
07756 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07757 }
07758 #endif
07759 (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
07760
07761 }
07762 break;
07763
07764 case 269:
07765
07766
07767 #line 2596 "ripper.y"
07768 {
07769 #if 0
07770 NODE *n1;
07771 if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY &&
07772 (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) {
07773 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val));
07774 }
07775 else {
07776 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
07777 }
07778 #endif
07779 (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val));
07780
07781 }
07782 break;
07783
07784 case 270:
07785
07786
07787 #line 2611 "ripper.y"
07788 {
07789 #if 0
07790 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val));
07791 #endif
07792 (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val));
07793
07794 }
07795 break;
07796
07797 case 279:
07798
07799
07800 #line 2629 "ripper.y"
07801 {
07802 #if 0
07803 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0);
07804 #endif
07805 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new());
07806
07807 }
07808 break;
07809
07810 case 280:
07811
07812
07813 #line 2637 "ripper.y"
07814 {
07815 #if 0
07816 (yyval.num) = ruby_sourceline;
07817 #endif
07818
07819 }
07820 break;
07821
07822 case 281:
07823
07824
07825 #line 2645 "ripper.y"
07826 {
07827 #if 0
07828 if ((yyvsp[(3) - (4)].val) == NULL) {
07829 (yyval.val) = NEW_NIL();
07830 }
07831 else {
07832 if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE ||
07833 nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE)
07834 nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num));
07835 (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val));
07836 }
07837 nd_set_line((yyval.val), (yyvsp[(2) - (4)].num));
07838 #endif
07839 (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val));
07840
07841 }
07842 break;
07843
07844 case 282:
07845
07846
07847 #line 2661 "ripper.y"
07848 {lex_state = EXPR_ENDARG;}
07849 break;
07850
07851 case 283:
07852
07853
07854 #line 2662 "ripper.y"
07855 {
07856 rb_warning0("(...) interpreted as grouped expression");
07857 #if 0
07858 (yyval.val) = (yyvsp[(2) - (4)].val);
07859 #endif
07860 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val));
07861
07862 }
07863 break;
07864
07865 case 284:
07866
07867
07868 #line 2671 "ripper.y"
07869 {
07870 #if 0
07871 (yyval.val) = (yyvsp[(2) - (3)].val);
07872 #endif
07873 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val));
07874
07875 }
07876 break;
07877
07878 case 285:
07879
07880
07881 #line 2679 "ripper.y"
07882 {
07883 #if 0
07884 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07885 #endif
07886 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07887
07888 }
07889 break;
07890
07891 case 286:
07892
07893
07894 #line 2687 "ripper.y"
07895 {
07896 #if 0
07897 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val));
07898 #endif
07899 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val));
07900
07901 }
07902 break;
07903
07904 case 287:
07905
07906
07907 #line 2695 "ripper.y"
07908 {
07909 #if 0
07910 if ((yyvsp[(2) - (3)].val) == 0) {
07911 (yyval.val) = NEW_ZARRAY();
07912 }
07913 else {
07914 (yyval.val) = (yyvsp[(2) - (3)].val);
07915 }
07916 #endif
07917 (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val)));
07918
07919 }
07920 break;
07921
07922 case 288:
07923
07924
07925 #line 2708 "ripper.y"
07926 {
07927 #if 0
07928 (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val));
07929 #endif
07930 (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val)));
07931
07932 }
07933 break;
07934
07935 case 289:
07936
07937
07938 #line 2716 "ripper.y"
07939 {
07940 #if 0
07941 (yyval.val) = NEW_RETURN(0);
07942 #endif
07943 (yyval.val) = dispatch0(return0);
07944
07945 }
07946 break;
07947
07948 case 290:
07949
07950
07951 #line 2724 "ripper.y"
07952 {
07953 #if 0
07954 (yyval.val) = new_yield((yyvsp[(3) - (4)].val));
07955 #endif
07956 (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val)));
07957
07958 }
07959 break;
07960
07961 case 291:
07962
07963
07964 #line 2732 "ripper.y"
07965 {
07966 #if 0
07967 (yyval.val) = NEW_YIELD(0, Qfalse);
07968 #endif
07969 (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new()));
07970
07971 }
07972 break;
07973
07974 case 292:
07975
07976
07977 #line 2740 "ripper.y"
07978 {
07979 #if 0
07980 (yyval.val) = NEW_YIELD(0, Qfalse);
07981 #endif
07982 (yyval.val) = dispatch0(yield0);
07983
07984 }
07985 break;
07986
07987 case 293:
07988
07989
07990 #line 2747 "ripper.y"
07991 {in_defined = 1;}
07992 break;
07993
07994 case 294:
07995
07996
07997 #line 2748 "ripper.y"
07998 {
07999 #if 0
08000 in_defined = 0;
08001 (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val));
08002 #endif
08003 in_defined = 0;
08004 (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val));
08005
08006 }
08007 break;
08008
08009 case 295:
08010
08011
08012 #line 2758 "ripper.y"
08013 {
08014 #if 0
08015 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!');
08016 #endif
08017 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val));
08018
08019 }
08020 break;
08021
08022 case 296:
08023
08024
08025 #line 2766 "ripper.y"
08026 {
08027 #if 0
08028 (yyval.val) = call_uni_op(cond(NEW_NIL()), '!');
08029 #endif
08030 (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil);
08031
08032 }
08033 break;
08034
08035 case 297:
08036
08037
08038 #line 2774 "ripper.y"
08039 {
08040 #if 0
08041 (yyvsp[(2) - (2)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].val), 0);
08042 (yyval.val) = (yyvsp[(2) - (2)].val);
08043 fixpos((yyvsp[(2) - (2)].val)->nd_iter, (yyvsp[(2) - (2)].val));
08044 #endif
08045 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new());
08046 (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val));
08047
08048 }
08049 break;
08050
08051 case 299:
08052
08053
08054 #line 2786 "ripper.y"
08055 {
08056 #if 0
08057 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val));
08058 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val);
08059 (yyval.val) = (yyvsp[(2) - (2)].val);
08060 fixpos((yyval.val), (yyvsp[(1) - (2)].val));
08061 #endif
08062 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
08063
08064 }
08065 break;
08066
08067 case 300:
08068
08069
08070 #line 2797 "ripper.y"
08071 {
08072 (yyval.val) = (yyvsp[(2) - (2)].val);
08073 }
08074 break;
08075
08076 case 301:
08077
08078
08079 #line 2804 "ripper.y"
08080 {
08081 #if 0
08082 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
08083 fixpos((yyval.val), (yyvsp[(2) - (6)].val));
08084 #endif
08085 (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val)));
08086
08087 }
08088 break;
08089
08090 case 302:
08091
08092
08093 #line 2816 "ripper.y"
08094 {
08095 #if 0
08096 (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
08097 fixpos((yyval.val), (yyvsp[(2) - (6)].val));
08098 #endif
08099 (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val)));
08100
08101 }
08102 break;
08103
08104 case 303:
08105
08106
08107 #line 2824 "ripper.y"
08108 {COND_PUSH(1);}
08109 break;
08110
08111 case 304:
08112
08113
08114 #line 2824 "ripper.y"
08115 {COND_POP();}
08116 break;
08117
08118 case 305:
08119
08120
08121 #line 2827 "ripper.y"
08122 {
08123 #if 0
08124 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1);
08125 fixpos((yyval.val), (yyvsp[(3) - (7)].val));
08126 #endif
08127 (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val));
08128
08129 }
08130 break;
08131
08132 case 306:
08133
08134
08135 #line 2835 "ripper.y"
08136 {COND_PUSH(1);}
08137 break;
08138
08139 case 307:
08140
08141
08142 #line 2835 "ripper.y"
08143 {COND_POP();}
08144 break;
08145
08146 case 308:
08147
08148
08149 #line 2838 "ripper.y"
08150 {
08151 #if 0
08152 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1);
08153 fixpos((yyval.val), (yyvsp[(3) - (7)].val));
08154 #endif
08155 (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val));
08156
08157 }
08158 break;
08159
08160 case 309:
08161
08162
08163 #line 2849 "ripper.y"
08164 {
08165 #if 0
08166 (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
08167 fixpos((yyval.val), (yyvsp[(2) - (5)].val));
08168 #endif
08169 (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
08170
08171 }
08172 break;
08173
08174 case 310:
08175
08176
08177 #line 2858 "ripper.y"
08178 {
08179 #if 0
08180 (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val));
08181 #endif
08182 (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val));
08183
08184 }
08185 break;
08186
08187 case 311:
08188
08189
08190 #line 2866 "ripper.y"
08191 {COND_PUSH(1);}
08192 break;
08193
08194 case 312:
08195
08196
08197 #line 2868 "ripper.y"
08198 {COND_POP();}
08199 break;
08200
08201 case 313:
08202
08203
08204 #line 2871 "ripper.y"
08205 {
08206 #if 0
08207
08208
08209
08210
08211
08212
08213
08214
08215
08216 ID id = internal_id();
08217 ID *tbl = ALLOC_N(ID, 2);
08218 NODE *m = NEW_ARGS_AUX(0, 0);
08219 NODE *args, *scope;
08220
08221 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) {
08222
08223
08224
08225
08226 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1)));
08227 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0)));
08228 m->nd_next = block_append(
08229 NEW_IF(
08230 NEW_NODE(NODE_AND,
08231 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0),
08232 rb_intern("=="), one),
08233 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero),
08234 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))),
08235 0),
08236 NEW_DASGN_CURR(id,
08237 NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)),
08238 0),
08239 node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id)));
08240
08241 args = new_args(m, 0, id, 0, 0);
08242 }
08243 else {
08244 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN ||
08245 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN ||
08246 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) {
08247 (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id);
08248 m->nd_plen = 1;
08249 m->nd_next = (yyvsp[(2) - (9)].val);
08250 args = new_args(m, 0, 0, 0, 0);
08251 }
08252 else {
08253 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id));
08254 args = new_args(m, 0, id, 0, 0);
08255 }
08256 }
08257 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args);
08258 tbl[0] = 1; tbl[1] = id;
08259 (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope);
08260 fixpos((yyval.val), (yyvsp[(2) - (9)].val));
08261 #endif
08262 (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val));
08263
08264 }
08265 break;
08266
08267 case 314:
08268
08269
08270 #line 2932 "ripper.y"
08271 {
08272 if (in_def || in_single)
08273 yyerror("class definition in method body");
08274 local_push(0);
08275 #if 0
08276 (yyval.num) = ruby_sourceline;
08277 #endif
08278
08279 }
08280 break;
08281
08282 case 315:
08283
08284
08285 #line 2943 "ripper.y"
08286 {
08287 #if 0
08288 (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val));
08289 nd_set_line((yyval.val), (yyvsp[(4) - (6)].num));
08290 #endif
08291 (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val));
08292
08293 local_pop();
08294 }
08295 break;
08296
08297 case 316:
08298
08299
08300 #line 2953 "ripper.y"
08301 {
08302 (yyval.num) = in_def;
08303 in_def = 0;
08304 }
08305 break;
08306
08307 case 317:
08308
08309
08310 #line 2958 "ripper.y"
08311 {
08312 (yyval.num) = in_single;
08313 in_single = 0;
08314 local_push(0);
08315 }
08316 break;
08317
08318 case 318:
08319
08320
08321 #line 2965 "ripper.y"
08322 {
08323 #if 0
08324 (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val));
08325 fixpos((yyval.val), (yyvsp[(3) - (8)].val));
08326 #endif
08327 (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val));
08328
08329 local_pop();
08330 in_def = (yyvsp[(4) - (8)].num);
08331 in_single = (yyvsp[(6) - (8)].num);
08332 }
08333 break;
08334
08335 case 319:
08336
08337
08338 #line 2977 "ripper.y"
08339 {
08340 if (in_def || in_single)
08341 yyerror("module definition in method body");
08342 local_push(0);
08343 #if 0
08344 (yyval.num) = ruby_sourceline;
08345 #endif
08346
08347 }
08348 break;
08349
08350 case 320:
08351
08352
08353 #line 2988 "ripper.y"
08354 {
08355 #if 0
08356 (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
08357 nd_set_line((yyval.val), (yyvsp[(3) - (5)].num));
08358 #endif
08359 (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
08360
08361 local_pop();
08362 }
08363 break;
08364
08365 case 321:
08366
08367
08368 #line 2998 "ripper.y"
08369 {
08370 (yyval.id) = cur_mid;
08371 cur_mid = (yyvsp[(2) - (2)].val);
08372 in_def++;
08373 local_push(0);
08374 }
08375 break;
08376
08377 case 322:
08378
08379
08380 #line 3007 "ripper.y"
08381 {
08382 #if 0
08383 NODE *body = remove_begin((yyvsp[(5) - (6)].val));
08384 reduce_nodes(&body);
08385 (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE);
08386 nd_set_line((yyval.val), (yyvsp[(1) - (6)].num));
08387 #endif
08388 (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
08389
08390 local_pop();
08391 in_def--;
08392 cur_mid = (yyvsp[(3) - (6)].id);
08393 }
08394 break;
08395
08396 case 323:
08397
08398
08399 #line 3020 "ripper.y"
08400 {lex_state = EXPR_FNAME;}
08401 break;
08402
08403 case 324:
08404
08405
08406 #line 3021 "ripper.y"
08407 {
08408 in_single++;
08409 lex_state = EXPR_ENDFN;
08410 local_push(0);
08411 }
08412 break;
08413
08414 case 325:
08415
08416
08417 #line 3029 "ripper.y"
08418 {
08419 #if 0
08420 NODE *body = remove_begin((yyvsp[(8) - (9)].val));
08421 reduce_nodes(&body);
08422 (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body);
08423 nd_set_line((yyval.val), (yyvsp[(1) - (9)].num));
08424 #endif
08425 (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val));
08426
08427 local_pop();
08428 in_single--;
08429 }
08430 break;
08431
08432 case 326:
08433
08434
08435 #line 3042 "ripper.y"
08436 {
08437 #if 0
08438 (yyval.val) = NEW_BREAK(0);
08439 #endif
08440 (yyval.val) = dispatch1(break, arg_new());
08441
08442 }
08443 break;
08444
08445 case 327:
08446
08447
08448 #line 3050 "ripper.y"
08449 {
08450 #if 0
08451 (yyval.val) = NEW_NEXT(0);
08452 #endif
08453 (yyval.val) = dispatch1(next, arg_new());
08454
08455 }
08456 break;
08457
08458 case 328:
08459
08460
08461 #line 3058 "ripper.y"
08462 {
08463 #if 0
08464 (yyval.val) = NEW_REDO();
08465 #endif
08466 (yyval.val) = dispatch0(redo);
08467
08468 }
08469 break;
08470
08471 case 329:
08472
08473
08474 #line 3066 "ripper.y"
08475 {
08476 #if 0
08477 (yyval.val) = NEW_RETRY();
08478 #endif
08479 (yyval.val) = dispatch0(retry);
08480
08481 }
08482 break;
08483
08484 case 330:
08485
08486
08487 #line 3076 "ripper.y"
08488 {
08489 #if 0
08490 value_expr((yyvsp[(1) - (1)].val));
08491 (yyval.val) = (yyvsp[(1) - (1)].val);
08492 if (!(yyval.val)) (yyval.val) = NEW_NIL();
08493 #endif
08494 (yyval.val) = (yyvsp[(1) - (1)].val);
08495
08496 }
08497 break;
08498
08499 case 331:
08500
08501
08502 #line 3088 "ripper.y"
08503 {
08504 token_info_push("begin");
08505 }
08506 break;
08507
08508 case 332:
08509
08510
08511 #line 3094 "ripper.y"
08512 {
08513 token_info_push("if");
08514 }
08515 break;
08516
08517 case 333:
08518
08519
08520 #line 3100 "ripper.y"
08521 {
08522 token_info_push("unless");
08523 }
08524 break;
08525
08526 case 334:
08527
08528
08529 #line 3106 "ripper.y"
08530 {
08531 token_info_push("while");
08532 }
08533 break;
08534
08535 case 335:
08536
08537
08538 #line 3112 "ripper.y"
08539 {
08540 token_info_push("until");
08541 }
08542 break;
08543
08544 case 336:
08545
08546
08547 #line 3118 "ripper.y"
08548 {
08549 token_info_push("case");
08550 }
08551 break;
08552
08553 case 337:
08554
08555
08556 #line 3124 "ripper.y"
08557 {
08558 token_info_push("for");
08559 }
08560 break;
08561
08562 case 338:
08563
08564
08565 #line 3130 "ripper.y"
08566 {
08567 token_info_push("class");
08568 }
08569 break;
08570
08571 case 339:
08572
08573
08574 #line 3136 "ripper.y"
08575 {
08576 token_info_push("module");
08577 }
08578 break;
08579
08580 case 340:
08581
08582
08583 #line 3142 "ripper.y"
08584 {
08585 token_info_push("def");
08586 #if 0
08587 (yyval.num) = ruby_sourceline;
08588 #endif
08589
08590 }
08591 break;
08592
08593 case 341:
08594
08595
08596 #line 3152 "ripper.y"
08597 {
08598 token_info_pop("end");
08599 }
08600 break;
08601
08602 case 342:
08603
08604
08605 #line 3160 "ripper.y"
08606 { (yyval.val) = Qnil; }
08607 break;
08608
08609 case 344:
08610
08611
08612 #line 3166 "ripper.y"
08613 { (yyval.val) = (yyvsp[(2) - (2)].val); }
08614 break;
08615
08616 case 345:
08617
08618
08619 #line 3173 "ripper.y"
08620 { (yyval.val) = Qnil; }
08621 break;
08622
08623 case 348:
08624
08625
08626 #line 3182 "ripper.y"
08627 {
08628 #if 0
08629 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
08630 fixpos((yyval.val), (yyvsp[(2) - (5)].val));
08631 #endif
08632 (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val)));
08633
08634 }
08635 break;
08636
08637 case 350:
08638
08639
08640 #line 3194 "ripper.y"
08641 {
08642 #if 0
08643 (yyval.val) = (yyvsp[(2) - (2)].val);
08644 #endif
08645 (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val));
08646
08647 }
08648 break;
08649
08650 case 353:
08651
08652
08653 #line 3208 "ripper.y"
08654 {
08655 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
08656 #if 0
08657 #endif
08658 (yyval.val) = dispatch1(mlhs_paren, (yyval.val));
08659
08660 }
08661 break;
08662
08663 case 354:
08664
08665
08666 #line 3216 "ripper.y"
08667 {
08668 #if 0
08669 (yyval.val) = (yyvsp[(2) - (3)].val);
08670 #endif
08671 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
08672
08673 }
08674 break;
08675
08676 case 355:
08677
08678
08679 #line 3226 "ripper.y"
08680 {
08681 #if 0
08682 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
08683 #endif
08684 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val));
08685
08686 }
08687 break;
08688
08689 case 356:
08690
08691
08692 #line 3234 "ripper.y"
08693 {
08694 #if 0
08695 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
08696 #endif
08697 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
08698
08699 }
08700 break;
08701
08702 case 357:
08703
08704
08705 #line 3244 "ripper.y"
08706 {
08707 #if 0
08708 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0);
08709 #endif
08710 (yyval.val) = (yyvsp[(1) - (1)].val);
08711
08712 }
08713 break;
08714
08715 case 358:
08716
08717
08718 #line 3252 "ripper.y"
08719 {
08720 (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0);
08721 #if 0
08722 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val));
08723 #endif
08724 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val));
08725
08726 }
08727 break;
08728
08729 case 359:
08730
08731
08732 #line 3261 "ripper.y"
08733 {
08734 (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0);
08735 #if 0
08736 (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val)));
08737 #endif
08738 (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val));
08739
08740 }
08741 break;
08742
08743 case 360:
08744
08745
08746 #line 3270 "ripper.y"
08747 {
08748 #if 0
08749 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1);
08750 #endif
08751 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil);
08752
08753 }
08754 break;
08755
08756 case 361:
08757
08758
08759 #line 3278 "ripper.y"
08760 {
08761 #if 0
08762 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val)));
08763 #endif
08764 (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val));
08765
08766 }
08767 break;
08768
08769 case 362:
08770
08771
08772 #line 3286 "ripper.y"
08773 {
08774 (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0);
08775 #if 0
08776 (yyval.val) = NEW_MASGN(0, (yyval.val));
08777 #endif
08778 (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val));
08779
08780 }
08781 break;
08782
08783 case 363:
08784
08785
08786 #line 3295 "ripper.y"
08787 {
08788 (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0);
08789 #if 0
08790 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val)));
08791 #endif
08792 #if 0
08793 TODO: Check me
08794 #endif
08795 (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val));
08796
08797 }
08798 break;
08799
08800 case 364:
08801
08802
08803 #line 3307 "ripper.y"
08804 {
08805 #if 0
08806 (yyval.val) = NEW_MASGN(0, -1);
08807 #endif
08808 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
08809
08810 }
08811 break;
08812
08813 case 365:
08814
08815
08816 #line 3315 "ripper.y"
08817 {
08818 #if 0
08819 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val)));
08820 #endif
08821 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
08822
08823 }
08824 break;
08825
08826 case 366:
08827
08828
08829 #line 3325 "ripper.y"
08830 {
08831 #if 0
08832 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val));
08833 #endif
08834 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val)));
08835
08836 }
08837 break;
08838
08839 case 367:
08840
08841
08842 #line 3333 "ripper.y"
08843 {
08844 #if 0
08845 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val));
08846 #endif
08847 (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)));
08848
08849 }
08850 break;
08851
08852 case 368:
08853
08854
08855 #line 3341 "ripper.y"
08856 {
08857 #if 0
08858 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val));
08859 #endif
08860 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
08861
08862 }
08863 break;
08864
08865 case 369:
08866
08867
08868 #line 3349 "ripper.y"
08869 {
08870 #if 0
08871 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
08872 #endif
08873 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
08874
08875 }
08876 break;
08877
08878 case 370:
08879
08880
08881 #line 3357 "ripper.y"
08882 {
08883 #if 0
08884 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
08885 #endif
08886 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
08887
08888 }
08889 break;
08890
08891 case 371:
08892
08893
08894 #line 3365 "ripper.y"
08895 {
08896 #if 0
08897 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 1, 0, 0);
08898 #endif
08899 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil, Qnil);
08900 dispatch1(excessed_comma, (yyval.val));
08901
08902 }
08903 break;
08904
08905 case 372:
08906
08907
08908 #line 3374 "ripper.y"
08909 {
08910 #if 0
08911 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
08912 #endif
08913 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
08914
08915 }
08916 break;
08917
08918 case 373:
08919
08920
08921 #line 3382 "ripper.y"
08922 {
08923 #if 0
08924 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val));
08925 #endif
08926 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil,Qnil, Qnil, escape_Qundef((yyvsp[(2) - (2)].val)));
08927
08928 }
08929 break;
08930
08931 case 374:
08932
08933
08934 #line 3390 "ripper.y"
08935 {
08936 #if 0
08937 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
08938 #endif
08939 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
08940
08941 }
08942 break;
08943
08944 case 375:
08945
08946
08947 #line 3398 "ripper.y"
08948 {
08949 #if 0
08950 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
08951 #endif
08952 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
08953
08954 }
08955 break;
08956
08957 case 376:
08958
08959
08960 #line 3406 "ripper.y"
08961 {
08962 #if 0
08963 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val));
08964 #endif
08965 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
08966
08967 }
08968 break;
08969
08970 case 377:
08971
08972
08973 #line 3414 "ripper.y"
08974 {
08975 #if 0
08976 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
08977 #endif
08978 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
08979
08980 }
08981 break;
08982
08983 case 378:
08984
08985
08986 #line 3422 "ripper.y"
08987 {
08988 #if 0
08989 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val));
08990 #endif
08991 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil, escape_Qundef((yyvsp[(2) - (2)].val)));
08992
08993 }
08994 break;
08995
08996 case 379:
08997
08998
08999 #line 3430 "ripper.y"
09000 {
09001 #if 0
09002 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09003 #endif
09004 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
09005
09006 }
09007 break;
09008
09009 case 380:
09010
09011
09012 #line 3438 "ripper.y"
09013 {
09014 #if 0
09015 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val));
09016 #endif
09017 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val));
09018
09019 }
09020 break;
09021
09022 case 382:
09023
09024
09025 #line 3449 "ripper.y"
09026 {
09027 command_start = TRUE;
09028 }
09029 break;
09030
09031 case 383:
09032
09033
09034 #line 3455 "ripper.y"
09035 {
09036 #if 0
09037 (yyval.val) = 0;
09038 #endif
09039 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
09040 escape_Qundef((yyvsp[(2) - (3)].val)));
09041
09042 }
09043 break;
09044
09045 case 384:
09046
09047
09048 #line 3464 "ripper.y"
09049 {
09050 #if 0
09051 (yyval.val) = 0;
09052 #endif
09053 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
09054 Qnil);
09055
09056 }
09057 break;
09058
09059 case 385:
09060
09061
09062 #line 3473 "ripper.y"
09063 {
09064 #if 0
09065 (yyval.val) = (yyvsp[(2) - (4)].val);
09066 #endif
09067 (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val)));
09068
09069 }
09070 break;
09071
09072 case 387:
09073
09074
09075 #line 3485 "ripper.y"
09076 {
09077 #if 0
09078 (yyval.val) = 0;
09079 #endif
09080 (yyval.val) = (yyvsp[(2) - (2)].val);
09081
09082 }
09083 break;
09084
09085 case 388:
09086
09087
09088 #line 3497 "ripper.y"
09089 {
09090 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
09091 }
09092 break;
09093
09094 case 389:
09095
09096
09097 #line 3504 "ripper.y"
09098 {
09099 rb_ary_push((yyval.val), (yyvsp[(3) - (3)].val));
09100 }
09101 break;
09102
09103 case 390:
09104
09105
09106 #line 3511 "ripper.y"
09107 {
09108 new_bv(get_id((yyvsp[(1) - (1)].val)));
09109 #if 0
09110 #endif
09111 (yyval.val) = get_value((yyvsp[(1) - (1)].val));
09112
09113 }
09114 break;
09115
09116 case 391:
09117
09118
09119 #line 3519 "ripper.y"
09120 {
09121 (yyval.val) = 0;
09122 }
09123 break;
09124
09125 case 392:
09126
09127
09128 #line 3524 "ripper.y"
09129 {
09130 (yyval.vars) = dyna_push();
09131 }
09132 break;
09133
09134 case 393:
09135
09136
09137 #line 3527 "ripper.y"
09138 {
09139 (yyval.num) = lpar_beg;
09140 lpar_beg = ++paren_nest;
09141 }
09142 break;
09143
09144 case 394:
09145
09146
09147 #line 3533 "ripper.y"
09148 {
09149 lpar_beg = (yyvsp[(2) - (4)].num);
09150 #if 0
09151 (yyval.val) = (yyvsp[(3) - (4)].val);
09152 (yyval.val)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].val)->nd_head, (yyvsp[(4) - (4)].val));
09153 #endif
09154 (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09155
09156 dyna_pop((yyvsp[(1) - (4)].vars));
09157 }
09158 break;
09159
09160 case 395:
09161
09162
09163 #line 3546 "ripper.y"
09164 {
09165 #if 0
09166 (yyval.val) = NEW_LAMBDA((yyvsp[(2) - (4)].val));
09167 #endif
09168 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val));
09169
09170 }
09171 break;
09172
09173 case 396:
09174
09175
09176 #line 3554 "ripper.y"
09177 {
09178 #if 0
09179 (yyval.val) = NEW_LAMBDA((yyvsp[(1) - (1)].val));
09180 #endif
09181 (yyval.val) = (yyvsp[(1) - (1)].val);
09182
09183 }
09184 break;
09185
09186 case 397:
09187
09188
09189 #line 3564 "ripper.y"
09190 {
09191 (yyval.val) = (yyvsp[(2) - (3)].val);
09192 }
09193 break;
09194
09195 case 398:
09196
09197
09198 #line 3568 "ripper.y"
09199 {
09200 (yyval.val) = (yyvsp[(2) - (3)].val);
09201 }
09202 break;
09203
09204 case 399:
09205
09206
09207 #line 3574 "ripper.y"
09208 {
09209 (yyvsp[(1) - (1)].vars) = dyna_push();
09210 #if 0
09211 (yyval.num) = ruby_sourceline;
09212 #endif
09213 }
09214 break;
09215
09216 case 400:
09217
09218
09219 #line 3583 "ripper.y"
09220 {
09221 #if 0
09222 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
09223 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
09224 #endif
09225 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
09226
09227 dyna_pop((yyvsp[(1) - (5)].vars));
09228 }
09229 break;
09230
09231 case 401:
09232
09233
09234 #line 3595 "ripper.y"
09235 {
09236 #if 0
09237 if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) {
09238 compile_error(PARSER_ARG "block given to yield");
09239 }
09240 else {
09241 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val));
09242 }
09243 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val);
09244 (yyval.val) = (yyvsp[(2) - (2)].val);
09245 fixpos((yyval.val), (yyvsp[(1) - (2)].val));
09246 #endif
09247 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09248
09249 }
09250 break;
09251
09252 case 402:
09253
09254
09255 #line 3611 "ripper.y"
09256 {
09257 #if 0
09258 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09259 #endif
09260 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
09261 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
09262
09263 }
09264 break;
09265
09266 case 403:
09267
09268
09269 #line 3620 "ripper.y"
09270 {
09271 #if 0
09272 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09273 #endif
09274 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val));
09275 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
09276
09277 }
09278 break;
09279
09280 case 404:
09281
09282
09283 #line 3631 "ripper.y"
09284 {
09285 #if 0
09286 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09287 fixpos((yyval.val), (yyvsp[(2) - (2)].val));
09288 #endif
09289 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val));
09290
09291 }
09292 break;
09293
09294 case 405:
09295
09296
09297 #line 3640 "ripper.y"
09298 {
09299 #if 0
09300 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09301 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
09302 #endif
09303 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
09304 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
09305
09306 }
09307 break;
09308
09309 case 406:
09310
09311
09312 #line 3650 "ripper.y"
09313 {
09314 #if 0
09315 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09316 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
09317 #endif
09318 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
09319 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
09320
09321 }
09322 break;
09323
09324 case 407:
09325
09326
09327 #line 3660 "ripper.y"
09328 {
09329 #if 0
09330 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0);
09331 #endif
09332 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val));
09333
09334 }
09335 break;
09336
09337 case 408:
09338
09339
09340 #line 3668 "ripper.y"
09341 {
09342 #if 0
09343 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val));
09344 fixpos((yyval.val), (yyvsp[(1) - (3)].val));
09345 #endif
09346 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_id2sym('.'),
09347 ripper_intern("call"));
09348 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val));
09349
09350 }
09351 break;
09352
09353 case 409:
09354
09355
09356 #line 3679 "ripper.y"
09357 {
09358 #if 0
09359 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val));
09360 fixpos((yyval.val), (yyvsp[(1) - (3)].val));
09361 #endif
09362 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"),
09363 ripper_intern("call"));
09364 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val));
09365
09366 }
09367 break;
09368
09369 case 410:
09370
09371
09372 #line 3690 "ripper.y"
09373 {
09374 #if 0
09375 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val));
09376 #endif
09377 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val));
09378
09379 }
09380 break;
09381
09382 case 411:
09383
09384
09385 #line 3698 "ripper.y"
09386 {
09387 #if 0
09388 (yyval.val) = NEW_ZSUPER();
09389 #endif
09390 (yyval.val) = dispatch0(zsuper);
09391
09392 }
09393 break;
09394
09395 case 412:
09396
09397
09398 #line 3706 "ripper.y"
09399 {
09400 #if 0
09401 if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF)
09402 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val));
09403 else
09404 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val));
09405 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
09406 #endif
09407 (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
09408
09409 }
09410 break;
09411
09412 case 413:
09413
09414
09415 #line 3720 "ripper.y"
09416 {
09417 (yyvsp[(1) - (1)].vars) = dyna_push();
09418 #if 0
09419 (yyval.num) = ruby_sourceline;
09420 #endif
09421
09422 }
09423 break;
09424
09425 case 414:
09426
09427
09428 #line 3729 "ripper.y"
09429 {
09430 #if 0
09431 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
09432 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
09433 #endif
09434 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
09435
09436 dyna_pop((yyvsp[(1) - (5)].vars));
09437 }
09438 break;
09439
09440 case 415:
09441
09442
09443 #line 3739 "ripper.y"
09444 {
09445 (yyvsp[(1) - (1)].vars) = dyna_push();
09446 #if 0
09447 (yyval.num) = ruby_sourceline;
09448 #endif
09449
09450 }
09451 break;
09452
09453 case 416:
09454
09455
09456 #line 3748 "ripper.y"
09457 {
09458 #if 0
09459 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
09460 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
09461 #endif
09462 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
09463
09464 dyna_pop((yyvsp[(1) - (5)].vars));
09465 }
09466 break;
09467
09468 case 417:
09469
09470
09471 #line 3762 "ripper.y"
09472 {
09473 #if 0
09474 (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
09475 #endif
09476 (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val)));
09477
09478 }
09479 break;
09480
09481 case 420:
09482
09483
09484 #line 3778 "ripper.y"
09485 {
09486 #if 0
09487 if ((yyvsp[(3) - (6)].val)) {
09488 (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO());
09489 (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val));
09490 }
09491 (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
09492 fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val));
09493 #endif
09494 (yyval.val) = dispatch4(rescue,
09495 escape_Qundef((yyvsp[(2) - (6)].val)),
09496 escape_Qundef((yyvsp[(3) - (6)].val)),
09497 escape_Qundef((yyvsp[(5) - (6)].val)),
09498 escape_Qundef((yyvsp[(6) - (6)].val)));
09499
09500 }
09501 break;
09502
09503 case 422:
09504
09505
09506 #line 3798 "ripper.y"
09507 {
09508 #if 0
09509 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
09510 #endif
09511 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
09512
09513 }
09514 break;
09515
09516 case 423:
09517
09518
09519 #line 3806 "ripper.y"
09520 {
09521 #if 0
09522 if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val);
09523 #endif
09524 (yyval.val) = (yyvsp[(1) - (1)].val);
09525
09526 }
09527 break;
09528
09529 case 425:
09530
09531
09532 #line 3817 "ripper.y"
09533 {
09534 (yyval.val) = (yyvsp[(2) - (2)].val);
09535 }
09536 break;
09537
09538 case 427:
09539
09540
09541 #line 3824 "ripper.y"
09542 {
09543 #if 0
09544 (yyval.val) = (yyvsp[(2) - (2)].val);
09545 #endif
09546 (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val));
09547
09548 }
09549 break;
09550
09551 case 430:
09552
09553
09554 #line 3836 "ripper.y"
09555 {
09556 #if 0
09557 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val)));
09558 #endif
09559 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val));
09560
09561 }
09562 break;
09563
09564 case 432:
09565
09566
09567 #line 3847 "ripper.y"
09568 {
09569 #if 0
09570 NODE *node = (yyvsp[(1) - (1)].val);
09571 if (!node) {
09572 node = NEW_STR(STR_NEW0());
09573 }
09574 else {
09575 node = evstr2dstr(node);
09576 }
09577 (yyval.val) = node;
09578 #endif
09579 (yyval.val) = (yyvsp[(1) - (1)].val);
09580
09581 }
09582 break;
09583
09584 case 435:
09585
09586
09587 #line 3866 "ripper.y"
09588 {
09589 #if 0
09590 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09591 #endif
09592 (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09593
09594 }
09595 break;
09596
09597 case 436:
09598
09599
09600 #line 3876 "ripper.y"
09601 {
09602 #if 0
09603 (yyval.val) = (yyvsp[(2) - (3)].val);
09604 #endif
09605 (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val));
09606
09607 }
09608 break;
09609
09610 case 437:
09611
09612
09613 #line 3886 "ripper.y"
09614 {
09615 #if 0
09616 NODE *node = (yyvsp[(2) - (3)].val);
09617 if (!node) {
09618 node = NEW_XSTR(STR_NEW0());
09619 }
09620 else {
09621 switch (nd_type(node)) {
09622 case NODE_STR:
09623 nd_set_type(node, NODE_XSTR);
09624 break;
09625 case NODE_DSTR:
09626 nd_set_type(node, NODE_DXSTR);
09627 break;
09628 default:
09629 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node));
09630 break;
09631 }
09632 }
09633 (yyval.val) = node;
09634 #endif
09635 (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val));
09636
09637 }
09638 break;
09639
09640 case 438:
09641
09642
09643 #line 3913 "ripper.y"
09644 {
09645 #if 0
09646 int options = (yyvsp[(3) - (3)].val);
09647 NODE *node = (yyvsp[(2) - (3)].val);
09648 NODE *list, *prev;
09649 if (!node) {
09650 node = NEW_LIT(reg_compile(STR_NEW0(), options));
09651 }
09652 else switch (nd_type(node)) {
09653 case NODE_STR:
09654 {
09655 VALUE src = node->nd_lit;
09656 nd_set_type(node, NODE_LIT);
09657 node->nd_lit = reg_compile(src, options);
09658 }
09659 break;
09660 default:
09661 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node));
09662 case NODE_DSTR:
09663 if (options & RE_OPTION_ONCE) {
09664 nd_set_type(node, NODE_DREGX_ONCE);
09665 }
09666 else {
09667 nd_set_type(node, NODE_DREGX);
09668 }
09669 node->nd_cflag = options & RE_OPTION_MASK;
09670 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options);
09671 for (list = (prev = node)->nd_next; list; list = list->nd_next) {
09672 if (nd_type(list->nd_head) == NODE_STR) {
09673 VALUE tail = list->nd_head->nd_lit;
09674 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) {
09675 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
09676 if (!literal_concat0(parser, lit, tail)) {
09677 node = 0;
09678 break;
09679 }
09680 rb_str_resize(tail, 0);
09681 prev->nd_next = list->nd_next;
09682 rb_gc_force_recycle((VALUE)list->nd_head);
09683 rb_gc_force_recycle((VALUE)list);
09684 list = prev;
09685 }
09686 else {
09687 prev = list;
09688 }
09689 }
09690 else {
09691 prev = 0;
09692 }
09693 }
09694 if (!node->nd_next) {
09695 VALUE src = node->nd_lit;
09696 nd_set_type(node, NODE_LIT);
09697 node->nd_lit = reg_compile(src, options);
09698 }
09699 break;
09700 }
09701 (yyval.val) = node;
09702 #endif
09703 (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
09704
09705 }
09706 break;
09707
09708 case 439:
09709
09710
09711 #line 3978 "ripper.y"
09712 {
09713 #if 0
09714 (yyval.val) = NEW_ZARRAY();
09715 #endif
09716 (yyval.val) = dispatch0(words_new);
09717 (yyval.val) = dispatch1(array, (yyval.val));
09718
09719 }
09720 break;
09721
09722 case 440:
09723
09724
09725 #line 3987 "ripper.y"
09726 {
09727 #if 0
09728 (yyval.val) = (yyvsp[(2) - (3)].val);
09729 #endif
09730 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val));
09731
09732 }
09733 break;
09734
09735 case 441:
09736
09737
09738 #line 3997 "ripper.y"
09739 {
09740 #if 0
09741 (yyval.val) = 0;
09742 #endif
09743 (yyval.val) = dispatch0(words_new);
09744
09745 }
09746 break;
09747
09748 case 442:
09749
09750
09751 #line 4005 "ripper.y"
09752 {
09753 #if 0
09754 (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val)));
09755 #endif
09756 (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
09757
09758 }
09759 break;
09760
09761 case 443:
09762
09763
09764 #line 4017 "ripper.y"
09765 {
09766 (yyval.val) = dispatch0(word_new);
09767 (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val));
09768 }
09769 break;
09770
09771 case 444:
09772
09773
09774 #line 4023 "ripper.y"
09775 {
09776 #if 0
09777 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09778 #endif
09779 (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09780
09781 }
09782 break;
09783
09784 case 445:
09785
09786
09787 #line 4033 "ripper.y"
09788 {
09789 #if 0
09790 (yyval.val) = NEW_ZARRAY();
09791 #endif
09792 (yyval.val) = dispatch0(qwords_new);
09793 (yyval.val) = dispatch1(array, (yyval.val));
09794
09795 }
09796 break;
09797
09798 case 446:
09799
09800
09801 #line 4042 "ripper.y"
09802 {
09803 #if 0
09804 (yyval.val) = (yyvsp[(2) - (3)].val);
09805 #endif
09806 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val));
09807
09808 }
09809 break;
09810
09811 case 447:
09812
09813
09814 #line 4052 "ripper.y"
09815 {
09816 #if 0
09817 (yyval.val) = 0;
09818 #endif
09819 (yyval.val) = dispatch0(qwords_new);
09820
09821 }
09822 break;
09823
09824 case 448:
09825
09826
09827 #line 4060 "ripper.y"
09828 {
09829 #if 0
09830 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
09831 #endif
09832 (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
09833
09834 }
09835 break;
09836
09837 case 449:
09838
09839
09840 #line 4070 "ripper.y"
09841 {
09842 #if 0
09843 (yyval.val) = 0;
09844 #endif
09845 (yyval.val) = dispatch0(string_content);
09846
09847 }
09848 break;
09849
09850 case 450:
09851
09852
09853 #line 4078 "ripper.y"
09854 {
09855 #if 0
09856 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09857 #endif
09858 (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09859
09860 }
09861 break;
09862
09863 case 451:
09864
09865
09866 #line 4088 "ripper.y"
09867 {
09868 #if 0
09869 (yyval.val) = 0;
09870 #endif
09871 (yyval.val) = dispatch0(xstring_new);
09872
09873 }
09874 break;
09875
09876 case 452:
09877
09878
09879 #line 4096 "ripper.y"
09880 {
09881 #if 0
09882 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09883 #endif
09884 (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09885
09886 }
09887 break;
09888
09889 case 453:
09890
09891
09892 #line 4106 "ripper.y"
09893 {
09894 #if 0
09895 (yyval.val) = 0;
09896 #endif
09897 (yyval.val) = dispatch0(regexp_new);
09898
09899 }
09900 break;
09901
09902 case 454:
09903
09904
09905 #line 4114 "ripper.y"
09906 {
09907 #if 0
09908 NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val);
09909 if (!head) {
09910 (yyval.val) = tail;
09911 }
09912 else if (!tail) {
09913 (yyval.val) = head;
09914 }
09915 else {
09916 switch (nd_type(head)) {
09917 case NODE_STR:
09918 nd_set_type(head, NODE_DSTR);
09919 break;
09920 case NODE_DSTR:
09921 break;
09922 default:
09923 head = list_append(NEW_DSTR(Qnil), head);
09924 break;
09925 }
09926 (yyval.val) = list_append(head, tail);
09927 }
09928 #endif
09929 (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09930
09931 }
09932 break;
09933
09934 case 456:
09935
09936
09937 #line 4144 "ripper.y"
09938 {
09939 (yyval.node) = lex_strterm;
09940 lex_strterm = 0;
09941 lex_state = EXPR_BEG;
09942 }
09943 break;
09944
09945 case 457:
09946
09947
09948 #line 4150 "ripper.y"
09949 {
09950 #if 0
09951 lex_strterm = (yyvsp[(2) - (3)].node);
09952 (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val));
09953 #endif
09954 lex_strterm = (yyvsp[(2) - (3)].node);
09955 (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val));
09956
09957 }
09958 break;
09959
09960 case 458:
09961
09962
09963 #line 4160 "ripper.y"
09964 {
09965 (yyvsp[(1) - (1)].val) = cond_stack;
09966 (yyval.val) = cmdarg_stack;
09967 cond_stack = 0;
09968 cmdarg_stack = 0;
09969 }
09970 break;
09971
09972 case 459:
09973
09974
09975 #line 4166 "ripper.y"
09976 {
09977 (yyval.node) = lex_strterm;
09978 lex_strterm = 0;
09979 lex_state = EXPR_BEG;
09980 }
09981 break;
09982
09983 case 460:
09984
09985
09986 #line 4172 "ripper.y"
09987 {
09988 cond_stack = (yyvsp[(1) - (5)].val);
09989 cmdarg_stack = (yyvsp[(2) - (5)].val);
09990 lex_strterm = (yyvsp[(3) - (5)].node);
09991 #if 0
09992 if ((yyvsp[(4) - (5)].val)) (yyvsp[(4) - (5)].val)->flags &= ~NODE_FL_NEWLINE;
09993 (yyval.val) = new_evstr((yyvsp[(4) - (5)].val));
09994 #endif
09995 (yyval.val) = dispatch1(string_embexpr, (yyvsp[(4) - (5)].val));
09996
09997 }
09998 break;
09999
10000 case 461:
10001
10002
10003 #line 4186 "ripper.y"
10004 {
10005 #if 0
10006 (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val));
10007 #endif
10008 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
10009
10010 }
10011 break;
10012
10013 case 462:
10014
10015
10016 #line 4194 "ripper.y"
10017 {
10018 #if 0
10019 (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val));
10020 #endif
10021 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
10022
10023 }
10024 break;
10025
10026 case 463:
10027
10028
10029 #line 4202 "ripper.y"
10030 {
10031 #if 0
10032 (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val));
10033 #endif
10034 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
10035
10036 }
10037 break;
10038
10039 case 465:
10040
10041
10042 #line 4213 "ripper.y"
10043 {
10044 lex_state = EXPR_END;
10045 #if 0
10046 (yyval.val) = (yyvsp[(2) - (2)].val);
10047 #endif
10048 (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val));
10049
10050 }
10051 break;
10052
10053 case 470:
10054
10055
10056 #line 4230 "ripper.y"
10057 {
10058 lex_state = EXPR_END;
10059 #if 0
10060 if (!((yyval.val) = (yyvsp[(2) - (3)].val))) {
10061 (yyval.val) = NEW_LIT(ID2SYM(rb_intern("")));
10062 }
10063 else {
10064 VALUE lit;
10065
10066 switch (nd_type((yyval.val))) {
10067 case NODE_DSTR:
10068 nd_set_type((yyval.val), NODE_DSYM);
10069 break;
10070 case NODE_STR:
10071 lit = (yyval.val)->nd_lit;
10072 (yyval.val)->nd_lit = ID2SYM(rb_intern_str(lit));
10073 nd_set_type((yyval.val), NODE_LIT);
10074 break;
10075 default:
10076 (yyval.val) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.val)));
10077 break;
10078 }
10079 }
10080 #endif
10081 (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val));
10082
10083 }
10084 break;
10085
10086 case 473:
10087
10088
10089 #line 4262 "ripper.y"
10090 {
10091 #if 0
10092 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val));
10093 #endif
10094 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
10095
10096 }
10097 break;
10098
10099 case 474:
10100
10101
10102 #line 4270 "ripper.y"
10103 {
10104 #if 0
10105 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val));
10106 #endif
10107 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
10108
10109 }
10110 break;
10111
10112 case 480:
10113
10114
10115 #line 4286 "ripper.y"
10116 {ifndef_ripper((yyval.val) = keyword_nil);}
10117 break;
10118
10119 case 481:
10120
10121
10122 #line 4287 "ripper.y"
10123 {ifndef_ripper((yyval.val) = keyword_self);}
10124 break;
10125
10126 case 482:
10127
10128
10129 #line 4288 "ripper.y"
10130 {ifndef_ripper((yyval.val) = keyword_true);}
10131 break;
10132
10133 case 483:
10134
10135
10136 #line 4289 "ripper.y"
10137 {ifndef_ripper((yyval.val) = keyword_false);}
10138 break;
10139
10140 case 484:
10141
10142
10143 #line 4290 "ripper.y"
10144 {ifndef_ripper((yyval.val) = keyword__FILE__);}
10145 break;
10146
10147 case 485:
10148
10149
10150 #line 4291 "ripper.y"
10151 {ifndef_ripper((yyval.val) = keyword__LINE__);}
10152 break;
10153
10154 case 486:
10155
10156
10157 #line 4292 "ripper.y"
10158 {ifndef_ripper((yyval.val) = keyword__ENCODING__);}
10159 break;
10160
10161 case 487:
10162
10163
10164 #line 4296 "ripper.y"
10165 {
10166 #if 0
10167 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0);
10168 #endif
10169 if (id_is_var(get_id((yyvsp[(1) - (1)].val)))) {
10170 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
10171 }
10172 else {
10173 (yyval.val) = dispatch1(vcall, (yyvsp[(1) - (1)].val));
10174 }
10175
10176 }
10177 break;
10178
10179 case 488:
10180
10181
10182 #line 4309 "ripper.y"
10183 {
10184 #if 0
10185 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0);
10186 #endif
10187 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
10188
10189 }
10190 break;
10191
10192 case 489:
10193
10194
10195 #line 4319 "ripper.y"
10196 {
10197 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
10198 #if 0
10199 #endif
10200 (yyval.val) = dispatch1(var_field, (yyval.val));
10201
10202 }
10203 break;
10204
10205 case 490:
10206
10207
10208 #line 4327 "ripper.y"
10209 {
10210 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
10211 #if 0
10212 #endif
10213 (yyval.val) = dispatch1(var_field, (yyval.val));
10214
10215 }
10216 break;
10217
10218 case 493:
10219
10220
10221 #line 4341 "ripper.y"
10222 {
10223 #if 0
10224 (yyval.val) = 0;
10225 #endif
10226 (yyval.val) = Qnil;
10227
10228 }
10229 break;
10230
10231 case 494:
10232
10233
10234 #line 4349 "ripper.y"
10235 {
10236 lex_state = EXPR_BEG;
10237 }
10238 break;
10239
10240 case 495:
10241
10242
10243 #line 4353 "ripper.y"
10244 {
10245 (yyval.val) = (yyvsp[(3) - (4)].val);
10246 }
10247 break;
10248
10249 case 496:
10250
10251
10252 #line 4357 "ripper.y"
10253 {
10254 #if 0
10255 yyerrok;
10256 (yyval.val) = 0;
10257 #endif
10258 yyerrok;
10259 (yyval.val) = Qnil;
10260
10261 }
10262 break;
10263
10264 case 497:
10265
10266
10267 #line 4369 "ripper.y"
10268 {
10269 #if 0
10270 (yyval.val) = (yyvsp[(2) - (3)].val);
10271 #endif
10272 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val));
10273
10274 lex_state = EXPR_BEG;
10275 command_start = TRUE;
10276 }
10277 break;
10278
10279 case 498:
10280
10281
10282 #line 4379 "ripper.y"
10283 {
10284 (yyval.val) = (yyvsp[(1) - (2)].val);
10285 lex_state = EXPR_BEG;
10286 command_start = TRUE;
10287 }
10288 break;
10289
10290 case 499:
10291
10292
10293 #line 4387 "ripper.y"
10294 {
10295 #if 0
10296 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val));
10297 #endif
10298 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val)));
10299
10300 }
10301 break;
10302
10303 case 500:
10304
10305
10306 #line 4395 "ripper.y"
10307 {
10308 #if 0
10309 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val));
10310 #endif
10311 (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)));
10312
10313 }
10314 break;
10315
10316 case 501:
10317
10318
10319 #line 4403 "ripper.y"
10320 {
10321 #if 0
10322 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val));
10323 #endif
10324 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
10325
10326 }
10327 break;
10328
10329 case 502:
10330
10331
10332 #line 4411 "ripper.y"
10333 {
10334 #if 0
10335 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
10336 #endif
10337 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
10338
10339 }
10340 break;
10341
10342 case 503:
10343
10344
10345 #line 4419 "ripper.y"
10346 {
10347 #if 0
10348 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
10349 #endif
10350 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
10351
10352 }
10353 break;
10354
10355 case 504:
10356
10357
10358 #line 4427 "ripper.y"
10359 {
10360 #if 0
10361 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
10362 #endif
10363 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
10364
10365 }
10366 break;
10367
10368 case 505:
10369
10370
10371 #line 4435 "ripper.y"
10372 {
10373 #if 0
10374 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val));
10375 #endif
10376 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
10377
10378 }
10379 break;
10380
10381 case 506:
10382
10383
10384 #line 4443 "ripper.y"
10385 {
10386 #if 0
10387 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
10388 #endif
10389 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
10390
10391 }
10392 break;
10393
10394 case 507:
10395
10396
10397 #line 4451 "ripper.y"
10398 {
10399 #if 0
10400 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
10401 #endif
10402 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
10403
10404 }
10405 break;
10406
10407 case 508:
10408
10409
10410 #line 4459 "ripper.y"
10411 {
10412 #if 0
10413 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val));
10414 #endif
10415 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
10416
10417 }
10418 break;
10419
10420 case 509:
10421
10422
10423 #line 4467 "ripper.y"
10424 {
10425 #if 0
10426 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
10427 #endif
10428 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
10429
10430 }
10431 break;
10432
10433 case 510:
10434
10435
10436 #line 4475 "ripper.y"
10437 {
10438 #if 0
10439 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val));
10440 #endif
10441 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
10442
10443 }
10444 break;
10445
10446 case 511:
10447
10448
10449 #line 4483 "ripper.y"
10450 {
10451 #if 0
10452 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
10453 #endif
10454 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
10455
10456 }
10457 break;
10458
10459 case 512:
10460
10461
10462 #line 4491 "ripper.y"
10463 {
10464 #if 0
10465 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val));
10466 #endif
10467 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val));
10468
10469 }
10470 break;
10471
10472 case 513:
10473
10474
10475 #line 4499 "ripper.y"
10476 {
10477 #if 0
10478 (yyval.val) = new_args(0, 0, 0, 0, 0);
10479 #endif
10480 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, Qnil);
10481
10482 }
10483 break;
10484
10485 case 514:
10486
10487
10488 #line 4509 "ripper.y"
10489 {
10490 #if 0
10491 yyerror("formal argument cannot be a constant");
10492 (yyval.val) = 0;
10493 #endif
10494 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
10495
10496 }
10497 break;
10498
10499 case 515:
10500
10501
10502 #line 4518 "ripper.y"
10503 {
10504 #if 0
10505 yyerror("formal argument cannot be an instance variable");
10506 (yyval.val) = 0;
10507 #endif
10508 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
10509
10510 }
10511 break;
10512
10513 case 516:
10514
10515
10516 #line 4527 "ripper.y"
10517 {
10518 #if 0
10519 yyerror("formal argument cannot be a global variable");
10520 (yyval.val) = 0;
10521 #endif
10522 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
10523
10524 }
10525 break;
10526
10527 case 517:
10528
10529
10530 #line 4536 "ripper.y"
10531 {
10532 #if 0
10533 yyerror("formal argument cannot be a class variable");
10534 (yyval.val) = 0;
10535 #endif
10536 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
10537
10538 }
10539 break;
10540
10541 case 519:
10542
10543
10544 #line 4548 "ripper.y"
10545 {
10546 formal_argument(get_id((yyvsp[(1) - (1)].val)));
10547 (yyval.val) = (yyvsp[(1) - (1)].val);
10548 }
10549 break;
10550
10551 case 520:
10552
10553
10554 #line 4555 "ripper.y"
10555 {
10556 arg_var(get_id((yyvsp[(1) - (1)].val)));
10557 #if 0
10558 (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1);
10559 #endif
10560 (yyval.val) = get_value((yyvsp[(1) - (1)].val));
10561
10562 }
10563 break;
10564
10565 case 521:
10566
10567
10568 #line 4564 "ripper.y"
10569 {
10570 ID tid = internal_id();
10571 arg_var(tid);
10572 #if 0
10573 if (dyna_in_block()) {
10574 (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid);
10575 }
10576 else {
10577 (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid);
10578 }
10579 (yyval.val) = NEW_ARGS_AUX(tid, 1);
10580 (yyval.val)->nd_next = (yyvsp[(2) - (3)].val);
10581 #endif
10582 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
10583
10584 }
10585 break;
10586
10587 case 522:
10588
10589
10590 #line 4585 "ripper.y"
10591 {
10592 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10593 }
10594 break;
10595
10596 case 523:
10597
10598
10599 #line 4590 "ripper.y"
10600 {
10601 #if 0
10602 (yyval.val) = (yyvsp[(1) - (3)].val);
10603 (yyval.val)->nd_plen++;
10604 (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next);
10605 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val));
10606 #endif
10607 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10608
10609 }
10610 break;
10611
10612 case 524:
10613
10614
10615 #line 4603 "ripper.y"
10616 {
10617 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val))));
10618 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10619 #if 0
10620 (yyval.val) = NEW_OPT_ARG(0, (yyval.val));
10621 #endif
10622 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val));
10623
10624 }
10625 break;
10626
10627 case 525:
10628
10629
10630 #line 4615 "ripper.y"
10631 {
10632 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val))));
10633 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10634 #if 0
10635 (yyval.val) = NEW_OPT_ARG(0, (yyval.val));
10636 #endif
10637 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val));
10638
10639 }
10640 break;
10641
10642 case 526:
10643
10644
10645 #line 4627 "ripper.y"
10646 {
10647 #if 0
10648 (yyval.val) = (yyvsp[(1) - (1)].val);
10649 #endif
10650 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10651
10652 }
10653 break;
10654
10655 case 527:
10656
10657
10658 #line 4635 "ripper.y"
10659 {
10660 #if 0
10661 NODE *opts = (yyvsp[(1) - (3)].val);
10662
10663 while (opts->nd_next) {
10664 opts = opts->nd_next;
10665 }
10666 opts->nd_next = (yyvsp[(3) - (3)].val);
10667 (yyval.val) = (yyvsp[(1) - (3)].val);
10668 #endif
10669 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10670
10671 }
10672 break;
10673
10674 case 528:
10675
10676
10677 #line 4651 "ripper.y"
10678 {
10679 #if 0
10680 (yyval.val) = (yyvsp[(1) - (1)].val);
10681 #endif
10682 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10683
10684 }
10685 break;
10686
10687 case 529:
10688
10689
10690 #line 4659 "ripper.y"
10691 {
10692 #if 0
10693 NODE *opts = (yyvsp[(1) - (3)].val);
10694
10695 while (opts->nd_next) {
10696 opts = opts->nd_next;
10697 }
10698 opts->nd_next = (yyvsp[(3) - (3)].val);
10699 (yyval.val) = (yyvsp[(1) - (3)].val);
10700 #endif
10701 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10702
10703 }
10704 break;
10705
10706 case 532:
10707
10708
10709 #line 4679 "ripper.y"
10710 {
10711 #if 0
10712 if (!is_local_id((yyvsp[(2) - (2)].val)))
10713 yyerror("rest argument must be local variable");
10714 #endif
10715 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val))));
10716 #if 0
10717 (yyval.val) = (yyvsp[(2) - (2)].val);
10718 #endif
10719 (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val));
10720
10721 }
10722 break;
10723
10724 case 533:
10725
10726
10727 #line 4692 "ripper.y"
10728 {
10729 #if 0
10730 (yyval.val) = internal_id();
10731 arg_var((yyval.val));
10732 #endif
10733 (yyval.val) = dispatch1(rest_param, Qnil);
10734
10735 }
10736 break;
10737
10738 case 536:
10739
10740
10741 #line 4707 "ripper.y"
10742 {
10743 #if 0
10744 if (!is_local_id((yyvsp[(2) - (2)].val)))
10745 yyerror("block argument must be local variable");
10746 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val)))
10747 yyerror("duplicated block argument name");
10748 #endif
10749 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val))));
10750 #if 0
10751 (yyval.val) = (yyvsp[(2) - (2)].val);
10752 #endif
10753 (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val));
10754
10755 }
10756 break;
10757
10758 case 537:
10759
10760
10761 #line 4724 "ripper.y"
10762 {
10763 (yyval.val) = (yyvsp[(2) - (2)].val);
10764 }
10765 break;
10766
10767 case 538:
10768
10769
10770 #line 4728 "ripper.y"
10771 {
10772 #if 0
10773 (yyval.val) = 0;
10774 #endif
10775 (yyval.val) = Qundef;
10776
10777 }
10778 break;
10779
10780 case 539:
10781
10782
10783 #line 4738 "ripper.y"
10784 {
10785 #if 0
10786 value_expr((yyvsp[(1) - (1)].val));
10787 (yyval.val) = (yyvsp[(1) - (1)].val);
10788 if (!(yyval.val)) (yyval.val) = NEW_NIL();
10789 #endif
10790 (yyval.val) = (yyvsp[(1) - (1)].val);
10791
10792 }
10793 break;
10794
10795 case 540:
10796
10797
10798 #line 4747 "ripper.y"
10799 {lex_state = EXPR_BEG;}
10800 break;
10801
10802 case 541:
10803
10804
10805 #line 4748 "ripper.y"
10806 {
10807 #if 0
10808 if ((yyvsp[(3) - (4)].val) == 0) {
10809 yyerror("can't define singleton method for ().");
10810 }
10811 else {
10812 switch (nd_type((yyvsp[(3) - (4)].val))) {
10813 case NODE_STR:
10814 case NODE_DSTR:
10815 case NODE_XSTR:
10816 case NODE_DXSTR:
10817 case NODE_DREGX:
10818 case NODE_LIT:
10819 case NODE_ARRAY:
10820 case NODE_ZARRAY:
10821 yyerror("can't define singleton method for literals");
10822 default:
10823 value_expr((yyvsp[(3) - (4)].val));
10824 break;
10825 }
10826 }
10827 (yyval.val) = (yyvsp[(3) - (4)].val);
10828 #endif
10829 (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val));
10830
10831 }
10832 break;
10833
10834 case 543:
10835
10836
10837 #line 4778 "ripper.y"
10838 {
10839 #if 0
10840 (yyval.val) = (yyvsp[(1) - (2)].val);
10841 #endif
10842 (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val));
10843
10844 }
10845 break;
10846
10847 case 544:
10848
10849
10850 #line 4790 "ripper.y"
10851 {
10852 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10853 }
10854 break;
10855
10856 case 545:
10857
10858
10859 #line 4795 "ripper.y"
10860 {
10861 #if 0
10862 (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10863 #endif
10864 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10865
10866 }
10867 break;
10868
10869 case 546:
10870
10871
10872 #line 4805 "ripper.y"
10873 {
10874 #if 0
10875 (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
10876 #endif
10877 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10878
10879 }
10880 break;
10881
10882 case 547:
10883
10884
10885 #line 4813 "ripper.y"
10886 {
10887 #if 0
10888 (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val));
10889 #endif
10890 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
10891
10892 }
10893 break;
10894
10895 case 558:
10896
10897
10898 #line 4841 "ripper.y"
10899 { (yyval.val) = (yyvsp[(1) - (1)].val); }
10900 break;
10901
10902 case 559:
10903
10904
10905 #line 4846 "ripper.y"
10906 { (yyval.val) = (yyvsp[(1) - (1)].val); }
10907 break;
10908
10909 case 569:
10910
10911
10912 #line 4869 "ripper.y"
10913 {yyerrok;}
10914 break;
10915
10916 case 572:
10917
10918
10919 #line 4874 "ripper.y"
10920 {yyerrok;}
10921 break;
10922
10923 case 573:
10924
10925
10926 #line 4878 "ripper.y"
10927 {
10928 #if 0
10929 (yyval.val) = 0;
10930 #endif
10931 (yyval.val) = Qundef;
10932
10933 }
10934 break;
10935
10936
10937
10938
10939 #line 10938 "parse.c"
10940 default: break;
10941 }
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
10954
10955 YYPOPSTACK (yylen);
10956 yylen = 0;
10957 YY_STACK_PRINT (yyss, yyssp);
10958
10959 *++yyvsp = yyval;
10960
10961
10962
10963
10964
10965 yyn = yyr1[yyn];
10966
10967 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
10968 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
10969 yystate = yytable[yystate];
10970 else
10971 yystate = yydefgoto[yyn - YYNTOKENS];
10972
10973 goto yynewstate;
10974
10975
10976
10977
10978
10979 yyerrlab:
10980
10981
10982 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
10983
10984
10985 if (!yyerrstatus)
10986 {
10987 ++yynerrs;
10988 #if ! YYERROR_VERBOSE
10989 parser_yyerror (parser, YY_("syntax error"));
10990 #else
10991 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
10992 yyssp, yytoken)
10993 {
10994 char const *yymsgp = YY_("syntax error");
10995 int yysyntax_error_status;
10996 yysyntax_error_status = YYSYNTAX_ERROR;
10997 if (yysyntax_error_status == 0)
10998 yymsgp = yymsg;
10999 else if (yysyntax_error_status == 1)
11000 {
11001 if (yymsg != yymsgbuf)
11002 YYSTACK_FREE (yymsg);
11003 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
11004 if (!yymsg)
11005 {
11006 yymsg = yymsgbuf;
11007 yymsg_alloc = sizeof yymsgbuf;
11008 yysyntax_error_status = 2;
11009 }
11010 else
11011 {
11012 yysyntax_error_status = YYSYNTAX_ERROR;
11013 yymsgp = yymsg;
11014 }
11015 }
11016 parser_yyerror (parser, yymsgp);
11017 if (yysyntax_error_status == 2)
11018 goto yyexhaustedlab;
11019 }
11020 # undef YYSYNTAX_ERROR
11021 #endif
11022 }
11023
11024
11025
11026 if (yyerrstatus == 3)
11027 {
11028
11029
11030
11031 if (yychar <= YYEOF)
11032 {
11033
11034 if (yychar == YYEOF)
11035 YYABORT;
11036 }
11037 else
11038 {
11039 yydestruct ("Error: discarding",
11040 yytoken, &yylval, parser);
11041 yychar = YYEMPTY;
11042 }
11043 }
11044
11045
11046
11047 goto yyerrlab1;
11048
11049
11050
11051
11052
11053 yyerrorlab:
11054
11055
11056
11057
11058 if ( 0)
11059 goto yyerrorlab;
11060
11061
11062
11063 YYPOPSTACK (yylen);
11064 yylen = 0;
11065 YY_STACK_PRINT (yyss, yyssp);
11066 yystate = *yyssp;
11067 goto yyerrlab1;
11068
11069
11070
11071
11072
11073 yyerrlab1:
11074 yyerrstatus = 3;
11075
11076 for (;;)
11077 {
11078 yyn = yypact[yystate];
11079 if (!yypact_value_is_default (yyn))
11080 {
11081 yyn += YYTERROR;
11082 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
11083 {
11084 yyn = yytable[yyn];
11085 if (0 < yyn)
11086 break;
11087 }
11088 }
11089
11090
11091 if (yyssp == yyss)
11092 YYABORT;
11093
11094
11095 yydestruct ("Error: popping",
11096 yystos[yystate], yyvsp, parser);
11097 YYPOPSTACK (1);
11098 yystate = *yyssp;
11099 YY_STACK_PRINT (yyss, yyssp);
11100 }
11101
11102 *++yyvsp = yylval;
11103
11104
11105
11106 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
11107
11108 yystate = yyn;
11109 goto yynewstate;
11110
11111
11112
11113
11114
11115 yyacceptlab:
11116 yyresult = 0;
11117 goto yyreturn;
11118
11119
11120
11121
11122 yyabortlab:
11123 yyresult = 1;
11124 goto yyreturn;
11125
11126 #if !defined(yyoverflow) || YYERROR_VERBOSE
11127
11128
11129
11130 yyexhaustedlab:
11131 parser_yyerror (parser, YY_("memory exhausted"));
11132 yyresult = 2;
11133
11134 #endif
11135
11136 yyreturn:
11137 if (yychar != YYEMPTY)
11138 {
11139
11140
11141 yytoken = YYTRANSLATE (yychar);
11142 yydestruct ("Cleanup: discarding lookahead",
11143 yytoken, &yylval, parser);
11144 }
11145
11146
11147 YYPOPSTACK (yylen);
11148 YY_STACK_PRINT (yyss, yyssp);
11149 while (yyssp != yyss)
11150 {
11151 yydestruct ("Cleanup: popping",
11152 yystos[*yyssp], yyvsp, parser);
11153 YYPOPSTACK (1);
11154 }
11155 #ifndef yyoverflow
11156 if (yyss != yyssa)
11157 YYSTACK_FREE (yyss);
11158 #endif
11159 #if YYERROR_VERBOSE
11160 if (yymsg != yymsgbuf)
11161 YYSTACK_FREE (yymsg);
11162 #endif
11163
11164 return YYID (yyresult);
11165 }
11166
11167
11168
11169
11170 #line 4886 "ripper.y"
11171
11172 # undef parser
11173 # undef yylex
11174 # undef yylval
11175 # define yylval (*((YYSTYPE*)(parser->parser_yylval)))
11176
11177 static int parser_regx_options(struct parser_params*);
11178 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**);
11179 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc);
11180 static int parser_parse_string(struct parser_params*,NODE*);
11181 static int parser_here_document(struct parser_params*,NODE*);
11182
11183
11184 # define nextc() parser_nextc(parser)
11185 # define pushback(c) parser_pushback(parser, (c))
11186 # define newtok() parser_newtok(parser)
11187 # define tokspace(n) parser_tokspace(parser, (n))
11188 # define tokadd(c) parser_tokadd(parser, (c))
11189 # define tok_hex(numlen) parser_tok_hex(parser, (numlen))
11190 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e))
11191 # define tokadd_escape(e) parser_tokadd_escape(parser, (e))
11192 # define regx_options() parser_regx_options(parser)
11193 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e))
11194 # define parse_string(n) parser_parse_string(parser,(n))
11195 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc))
11196 # define here_document(n) parser_here_document(parser,(n))
11197 # define heredoc_identifier() parser_heredoc_identifier(parser)
11198 # define heredoc_restore(n) parser_heredoc_restore(parser,(n))
11199 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i))
11200
11201 #ifndef RIPPER
11202 # define set_yylval_str(x) (yylval.node = NEW_STR(x))
11203 # define set_yylval_num(x) (yylval.num = (x))
11204 # define set_yylval_id(x) (yylval.id = (x))
11205 # define set_yylval_name(x) (yylval.id = (x))
11206 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x))
11207 # define set_yylval_node(x) (yylval.node = (x))
11208 # define yylval_id() (yylval.id)
11209 #else
11210 static inline VALUE
11211 ripper_yylval_id(ID x)
11212 {
11213 return (VALUE)NEW_LASGN(x, ID2SYM(x));
11214 }
11215 # define set_yylval_str(x) (void)(x)
11216 # define set_yylval_num(x) (void)(x)
11217 # define set_yylval_id(x) (void)(x)
11218 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x))
11219 # define set_yylval_literal(x) (void)(x)
11220 # define set_yylval_node(x) (void)(x)
11221 # define yylval_id() yylval.id
11222 #endif
11223
11224 #ifndef RIPPER
11225 #define ripper_flush(p) (void)(p)
11226 #else
11227 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p)
11228
11229 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
11230
11231 static int
11232 ripper_has_scan_event(struct parser_params *parser)
11233 {
11234
11235 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
11236 return lex_p > parser->tokp;
11237 }
11238
11239 static VALUE
11240 ripper_scan_event_val(struct parser_params *parser, int t)
11241 {
11242 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp);
11243 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str);
11244 ripper_flush(parser);
11245 return rval;
11246 }
11247
11248 static void
11249 ripper_dispatch_scan_event(struct parser_params *parser, int t)
11250 {
11251 if (!ripper_has_scan_event(parser)) return;
11252 yylval_rval = ripper_scan_event_val(parser, t);
11253 }
11254
11255 static void
11256 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t)
11257 {
11258 if (!ripper_has_scan_event(parser)) return;
11259 (void)ripper_scan_event_val(parser, t);
11260 }
11261
11262 static void
11263 ripper_dispatch_delayed_token(struct parser_params *parser, int t)
11264 {
11265 int saved_line = ruby_sourceline;
11266 const char *saved_tokp = parser->tokp;
11267
11268 ruby_sourceline = parser->delayed_line;
11269 parser->tokp = lex_pbeg + parser->delayed_col;
11270 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
11271 parser->delayed = Qnil;
11272 ruby_sourceline = saved_line;
11273 parser->tokp = saved_tokp;
11274 }
11275 #endif
11276
11277 #include "ruby/regex.h"
11278 #include "ruby/util.h"
11279
11280
11281
11282
11283
11284 #undef SIGN_EXTEND_CHAR
11285 #if __STDC__
11286 # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
11287 #else
11288
11289 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
11290 #endif
11291
11292 #define parser_encoding_name() (parser->enc->name)
11293 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc)
11294 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc)
11295 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))
11296 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc))
11297
11298 #define parser_isascii() ISASCII(*(lex_p-1))
11299
11300 #ifndef RIPPER
11301 static int
11302 token_info_get_column(struct parser_params *parser, const char *token)
11303 {
11304 int column = 1;
11305 const char *p, *pend = lex_p - strlen(token);
11306 for (p = lex_pbeg; p < pend; p++) {
11307 if (*p == '\t') {
11308 column = (((column - 1) / 8) + 1) * 8;
11309 }
11310 column++;
11311 }
11312 return column;
11313 }
11314
11315 static int
11316 token_info_has_nonspaces(struct parser_params *parser, const char *token)
11317 {
11318 const char *p, *pend = lex_p - strlen(token);
11319 for (p = lex_pbeg; p < pend; p++) {
11320 if (*p != ' ' && *p != '\t') {
11321 return 1;
11322 }
11323 }
11324 return 0;
11325 }
11326
11327 #undef token_info_push
11328 static void
11329 token_info_push(struct parser_params *parser, const char *token)
11330 {
11331 token_info *ptinfo;
11332
11333 if (!parser->parser_token_info_enabled) return;
11334 ptinfo = ALLOC(token_info);
11335 ptinfo->token = token;
11336 ptinfo->linenum = ruby_sourceline;
11337 ptinfo->column = token_info_get_column(parser, token);
11338 ptinfo->nonspc = token_info_has_nonspaces(parser, token);
11339 ptinfo->next = parser->parser_token_info;
11340
11341 parser->parser_token_info = ptinfo;
11342 }
11343
11344 #undef token_info_pop
11345 static void
11346 token_info_pop(struct parser_params *parser, const char *token)
11347 {
11348 int linenum;
11349 token_info *ptinfo = parser->parser_token_info;
11350
11351 if (!ptinfo) return;
11352 parser->parser_token_info = ptinfo->next;
11353 if (token_info_get_column(parser, token) == ptinfo->column) {
11354 goto finish;
11355 }
11356 linenum = ruby_sourceline;
11357 if (linenum == ptinfo->linenum) {
11358 goto finish;
11359 }
11360 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) {
11361 goto finish;
11362 }
11363 if (parser->parser_token_info_enabled) {
11364 rb_compile_warn(ruby_sourcefile, linenum,
11365 "mismatched indentations at '%s' with '%s' at %d",
11366 token, ptinfo->token, ptinfo->linenum);
11367 }
11368
11369 finish:
11370 xfree(ptinfo);
11371 }
11372 #endif
11373
11374 static int
11375 parser_yyerror(struct parser_params *parser, const char *msg)
11376 {
11377 #ifndef RIPPER
11378 const int max_line_margin = 30;
11379 const char *p, *pe;
11380 char *buf;
11381 long len;
11382 int i;
11383
11384 compile_error(PARSER_ARG "%s", msg);
11385 p = lex_p;
11386 while (lex_pbeg <= p) {
11387 if (*p == '\n') break;
11388 p--;
11389 }
11390 p++;
11391
11392 pe = lex_p;
11393 while (pe < lex_pend) {
11394 if (*pe == '\n') break;
11395 pe++;
11396 }
11397
11398 len = pe - p;
11399 if (len > 4) {
11400 char *p2;
11401 const char *pre = "", *post = "";
11402
11403 if (len > max_line_margin * 2 + 10) {
11404 if (lex_p - p > max_line_margin) {
11405 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline));
11406 pre = "...";
11407 }
11408 if (pe - lex_p > max_line_margin) {
11409 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline));
11410 post = "...";
11411 }
11412 len = pe - p;
11413 }
11414 buf = ALLOCA_N(char, len+2);
11415 MEMCPY(buf, p, char, len);
11416 buf[len] = '\0';
11417 rb_compile_error_append("%s%s%s", pre, buf, post);
11418
11419 i = (int)(lex_p - p);
11420 p2 = buf; pe = buf + len;
11421
11422 while (p2 < pe) {
11423 if (*p2 != '\t') *p2 = ' ';
11424 p2++;
11425 }
11426 buf[i] = '^';
11427 buf[i+1] = '\0';
11428 rb_compile_error_append("%s%s", pre, buf);
11429 }
11430 #else
11431 dispatch1(parse_error, STR_NEW2(msg));
11432 #endif
11433 return 0;
11434 }
11435
11436 static void parser_prepare(struct parser_params *parser);
11437
11438 #ifndef RIPPER
11439 static VALUE
11440 debug_lines(const char *f)
11441 {
11442 ID script_lines;
11443 CONST_ID(script_lines, "SCRIPT_LINES__");
11444 if (rb_const_defined_at(rb_cObject, script_lines)) {
11445 VALUE hash = rb_const_get_at(rb_cObject, script_lines);
11446 if (TYPE(hash) == T_HASH) {
11447 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding());
11448 VALUE lines = rb_ary_new();
11449 rb_hash_aset(hash, fname, lines);
11450 return lines;
11451 }
11452 }
11453 return 0;
11454 }
11455
11456 static VALUE
11457 coverage(const char *f, int n)
11458 {
11459 VALUE coverages = rb_get_coverages();
11460 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) {
11461 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding());
11462 VALUE lines = rb_ary_new2(n);
11463 int i;
11464 RBASIC(lines)->klass = 0;
11465 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil;
11466 RARRAY(lines)->as.heap.len = n;
11467 rb_hash_aset(coverages, fname, lines);
11468 return lines;
11469 }
11470 return 0;
11471 }
11472
11473 static int
11474 e_option_supplied(struct parser_params *parser)
11475 {
11476 return strcmp(ruby_sourcefile, "-e") == 0;
11477 }
11478
11479 static VALUE
11480 yycompile0(VALUE arg, int tracing)
11481 {
11482 int n;
11483 NODE *tree;
11484 struct parser_params *parser = (struct parser_params *)arg;
11485
11486 if (!compile_for_eval && rb_safe_level() == 0) {
11487 ruby_debug_lines = debug_lines(ruby_sourcefile);
11488 if (ruby_debug_lines && ruby_sourceline > 0) {
11489 VALUE str = STR_NEW0();
11490 n = ruby_sourceline;
11491 do {
11492 rb_ary_push(ruby_debug_lines, str);
11493 } while (--n);
11494 }
11495
11496 if (!e_option_supplied(parser)) {
11497 ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline);
11498 }
11499 }
11500
11501 parser_prepare(parser);
11502 deferred_nodes = 0;
11503 #ifndef RIPPER
11504 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
11505 #endif
11506 n = yyparse((void*)parser);
11507 ruby_debug_lines = 0;
11508 ruby_coverage = 0;
11509 compile_for_eval = 0;
11510
11511 lex_strterm = 0;
11512 lex_p = lex_pbeg = lex_pend = 0;
11513 lex_lastline = lex_nextline = 0;
11514 if (parser->nerr) {
11515 return 0;
11516 }
11517 tree = ruby_eval_tree;
11518 if (!tree) {
11519 tree = NEW_NIL();
11520 }
11521 else if (ruby_eval_tree_begin) {
11522 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body);
11523 }
11524 return (VALUE)tree;
11525 }
11526
11527 static NODE*
11528 yycompile(struct parser_params *parser, const char *f, int line)
11529 {
11530 ruby_sourcefile = ruby_strdup(f);
11531 ruby_sourceline = line - 1;
11532 return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE);
11533 }
11534 #endif
11535
11536 static rb_encoding *
11537 must_be_ascii_compatible(VALUE s)
11538 {
11539 rb_encoding *enc = rb_enc_get(s);
11540 if (!rb_enc_asciicompat(enc)) {
11541 rb_raise(rb_eArgError, "invalid source encoding");
11542 }
11543 return enc;
11544 }
11545
11546 static VALUE
11547 lex_get_str(struct parser_params *parser, VALUE s)
11548 {
11549 char *beg, *end, *pend;
11550 rb_encoding *enc = must_be_ascii_compatible(s);
11551
11552 beg = RSTRING_PTR(s);
11553 if (lex_gets_ptr) {
11554 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil;
11555 beg += lex_gets_ptr;
11556 }
11557 pend = RSTRING_PTR(s) + RSTRING_LEN(s);
11558 end = beg;
11559 while (end < pend) {
11560 if (*end++ == '\n') break;
11561 }
11562 lex_gets_ptr = end - RSTRING_PTR(s);
11563 return rb_enc_str_new(beg, end - beg, enc);
11564 }
11565
11566 static VALUE
11567 lex_getline(struct parser_params *parser)
11568 {
11569 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
11570 if (NIL_P(line)) return line;
11571 must_be_ascii_compatible(line);
11572 #ifndef RIPPER
11573 if (ruby_debug_lines) {
11574 rb_enc_associate(line, parser->enc);
11575 rb_ary_push(ruby_debug_lines, line);
11576 }
11577 if (ruby_coverage) {
11578 rb_ary_push(ruby_coverage, Qnil);
11579 }
11580 #endif
11581 return line;
11582 }
11583
11584 #ifdef RIPPER
11585 static rb_data_type_t parser_data_type;
11586 #else
11587 static const rb_data_type_t parser_data_type;
11588
11589 static NODE*
11590 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
11591 {
11592 struct parser_params *parser;
11593 NODE *node;
11594 volatile VALUE tmp;
11595
11596 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
11597 lex_gets = lex_get_str;
11598 lex_gets_ptr = 0;
11599 lex_input = s;
11600 lex_pbeg = lex_p = lex_pend = 0;
11601 compile_for_eval = rb_parse_in_eval();
11602
11603 node = yycompile(parser, f, line);
11604 tmp = vparser;
11605
11606 return node;
11607 }
11608
11609 NODE*
11610 rb_compile_string(const char *f, VALUE s, int line)
11611 {
11612 must_be_ascii_compatible(s);
11613 return parser_compile_string(rb_parser_new(), f, s, line);
11614 }
11615
11616 NODE*
11617 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
11618 {
11619 must_be_ascii_compatible(s);
11620 return parser_compile_string(vparser, f, s, line);
11621 }
11622
11623 NODE*
11624 rb_compile_cstr(const char *f, const char *s, int len, int line)
11625 {
11626 VALUE str = rb_str_new(s, len);
11627 return parser_compile_string(rb_parser_new(), f, str, line);
11628 }
11629
11630 NODE*
11631 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line)
11632 {
11633 VALUE str = rb_str_new(s, len);
11634 return parser_compile_string(vparser, f, str, line);
11635 }
11636
11637 static VALUE
11638 lex_io_gets(struct parser_params *parser, VALUE io)
11639 {
11640 return rb_io_gets(io);
11641 }
11642
11643 NODE*
11644 rb_compile_file(const char *f, VALUE file, int start)
11645 {
11646 VALUE volatile vparser = rb_parser_new();
11647
11648 return rb_parser_compile_file(vparser, f, file, start);
11649 }
11650
11651 NODE*
11652 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start)
11653 {
11654 struct parser_params *parser;
11655 volatile VALUE tmp;
11656 NODE *node;
11657
11658 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
11659 lex_gets = lex_io_gets;
11660 lex_input = file;
11661 lex_pbeg = lex_p = lex_pend = 0;
11662 compile_for_eval = rb_parse_in_eval();
11663
11664 node = yycompile(parser, f, start);
11665 tmp = vparser;
11666
11667 return node;
11668 }
11669 #endif
11670
11671 #define STR_FUNC_ESCAPE 0x01
11672 #define STR_FUNC_EXPAND 0x02
11673 #define STR_FUNC_REGEXP 0x04
11674 #define STR_FUNC_QWORDS 0x08
11675 #define STR_FUNC_SYMBOL 0x10
11676 #define STR_FUNC_INDENT 0x20
11677
11678 enum string_type {
11679 str_squote = (0),
11680 str_dquote = (STR_FUNC_EXPAND),
11681 str_xquote = (STR_FUNC_EXPAND),
11682 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
11683 str_sword = (STR_FUNC_QWORDS),
11684 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
11685 str_ssym = (STR_FUNC_SYMBOL),
11686 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
11687 };
11688
11689 static VALUE
11690 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0)
11691 {
11692 VALUE str;
11693
11694 str = rb_enc_str_new(p, n, enc);
11695 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
11696 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) {
11697 }
11698 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
11699 rb_enc_associate(str, rb_ascii8bit_encoding());
11700 }
11701 }
11702
11703 return str;
11704 }
11705
11706 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend)
11707 #define lex_eol_p() (lex_p >= lex_pend)
11708 #define peek(c) peek_n((c), 0)
11709 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n])
11710
11711 static inline int
11712 parser_nextc(struct parser_params *parser)
11713 {
11714 int c;
11715
11716 if (lex_p == lex_pend) {
11717 VALUE v = lex_nextline;
11718 lex_nextline = 0;
11719 if (!v) {
11720 if (parser->eofp)
11721 return -1;
11722
11723 if (!lex_input || NIL_P(v = lex_getline(parser))) {
11724 parser->eofp = Qtrue;
11725 lex_goto_eol(parser);
11726 return -1;
11727 }
11728 }
11729 {
11730 #ifdef RIPPER
11731 if (parser->tokp < lex_pend) {
11732 if (NIL_P(parser->delayed)) {
11733 parser->delayed = rb_str_buf_new(1024);
11734 rb_enc_associate(parser->delayed, parser->enc);
11735 rb_str_buf_cat(parser->delayed,
11736 parser->tokp, lex_pend - parser->tokp);
11737 parser->delayed_line = ruby_sourceline;
11738 parser->delayed_col = (int)(parser->tokp - lex_pbeg);
11739 }
11740 else {
11741 rb_str_buf_cat(parser->delayed,
11742 parser->tokp, lex_pend - parser->tokp);
11743 }
11744 }
11745 #endif
11746 if (heredoc_end > 0) {
11747 ruby_sourceline = heredoc_end;
11748 heredoc_end = 0;
11749 }
11750 ruby_sourceline++;
11751 parser->line_count++;
11752 lex_pbeg = lex_p = RSTRING_PTR(v);
11753 lex_pend = lex_p + RSTRING_LEN(v);
11754 ripper_flush(parser);
11755 lex_lastline = v;
11756 }
11757 }
11758 c = (unsigned char)*lex_p++;
11759 if (c == '\r' && peek('\n')) {
11760 lex_p++;
11761 c = '\n';
11762 }
11763
11764 return c;
11765 }
11766
11767 static void
11768 parser_pushback(struct parser_params *parser, int c)
11769 {
11770 if (c == -1) return;
11771 lex_p--;
11772 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
11773 lex_p--;
11774 }
11775 }
11776
11777 #define was_bol() (lex_p == lex_pbeg + 1)
11778
11779 #define tokfix() (tokenbuf[tokidx]='\0')
11780 #define tok() tokenbuf
11781 #define toklen() tokidx
11782 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
11783
11784 static char*
11785 parser_newtok(struct parser_params *parser)
11786 {
11787 tokidx = 0;
11788 if (!tokenbuf) {
11789 toksiz = 60;
11790 tokenbuf = ALLOC_N(char, 60);
11791 }
11792 if (toksiz > 4096) {
11793 toksiz = 60;
11794 REALLOC_N(tokenbuf, char, 60);
11795 }
11796 return tokenbuf;
11797 }
11798
11799 static char *
11800 parser_tokspace(struct parser_params *parser, int n)
11801 {
11802 tokidx += n;
11803
11804 if (tokidx >= toksiz) {
11805 do {toksiz *= 2;} while (toksiz < tokidx);
11806 REALLOC_N(tokenbuf, char, toksiz);
11807 }
11808 return &tokenbuf[tokidx-n];
11809 }
11810
11811 static void
11812 parser_tokadd(struct parser_params *parser, int c)
11813 {
11814 tokenbuf[tokidx++] = (char)c;
11815 if (tokidx >= toksiz) {
11816 toksiz *= 2;
11817 REALLOC_N(tokenbuf, char, toksiz);
11818 }
11819 }
11820
11821 static int
11822 parser_tok_hex(struct parser_params *parser, size_t *numlen)
11823 {
11824 int c;
11825
11826 c = scan_hex(lex_p, 2, numlen);
11827 if (!*numlen) {
11828 yyerror("invalid hex escape");
11829 return 0;
11830 }
11831 lex_p += *numlen;
11832 return c;
11833 }
11834
11835 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n))
11836
11837 static int
11838 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp,
11839 int string_literal, int symbol_literal, int regexp_literal)
11840 {
11841
11842
11843
11844
11845
11846
11847
11848 int codepoint;
11849 size_t numlen;
11850
11851 if (regexp_literal) { tokadd('\\'); tokadd('u'); }
11852
11853 if (peek('{')) {
11854 do {
11855 if (regexp_literal) { tokadd(*lex_p); }
11856 nextc();
11857 codepoint = scan_hex(lex_p, 6, &numlen);
11858 if (numlen == 0) {
11859 yyerror("invalid Unicode escape");
11860 return 0;
11861 }
11862 if (codepoint > 0x10ffff) {
11863 yyerror("invalid Unicode codepoint (too large)");
11864 return 0;
11865 }
11866 lex_p += numlen;
11867 if (regexp_literal) {
11868 tokcopy((int)numlen);
11869 }
11870 else if (codepoint >= 0x80) {
11871 *encp = UTF8_ENC();
11872 if (string_literal) tokaddmbc(codepoint, *encp);
11873 }
11874 else if (string_literal) {
11875 tokadd(codepoint);
11876 }
11877 } while (string_literal && (peek(' ') || peek('\t')));
11878
11879 if (!peek('}')) {
11880 yyerror("unterminated Unicode escape");
11881 return 0;
11882 }
11883
11884 if (regexp_literal) { tokadd('}'); }
11885 nextc();
11886 }
11887 else {
11888 codepoint = scan_hex(lex_p, 4, &numlen);
11889 if (numlen < 4) {
11890 yyerror("invalid Unicode escape");
11891 return 0;
11892 }
11893 lex_p += 4;
11894 if (regexp_literal) {
11895 tokcopy(4);
11896 }
11897 else if (codepoint >= 0x80) {
11898 *encp = UTF8_ENC();
11899 if (string_literal) tokaddmbc(codepoint, *encp);
11900 }
11901 else if (string_literal) {
11902 tokadd(codepoint);
11903 }
11904 }
11905
11906 return codepoint;
11907 }
11908
11909 #define ESCAPE_CONTROL 1
11910 #define ESCAPE_META 2
11911
11912 static int
11913 parser_read_escape(struct parser_params *parser, int flags,
11914 rb_encoding **encp)
11915 {
11916 int c;
11917 size_t numlen;
11918
11919 switch (c = nextc()) {
11920 case '\\':
11921 return c;
11922
11923 case 'n':
11924 return '\n';
11925
11926 case 't':
11927 return '\t';
11928
11929 case 'r':
11930 return '\r';
11931
11932 case 'f':
11933 return '\f';
11934
11935 case 'v':
11936 return '\13';
11937
11938 case 'a':
11939 return '\007';
11940
11941 case 'e':
11942 return 033;
11943
11944 case '0': case '1': case '2': case '3':
11945 case '4': case '5': case '6': case '7':
11946 pushback(c);
11947 c = scan_oct(lex_p, 3, &numlen);
11948 lex_p += numlen;
11949 return c;
11950
11951 case 'x':
11952 c = tok_hex(&numlen);
11953 if (numlen == 0) return 0;
11954 return c;
11955
11956 case 'b':
11957 return '\010';
11958
11959 case 's':
11960 return ' ';
11961
11962 case 'M':
11963 if (flags & ESCAPE_META) goto eof;
11964 if ((c = nextc()) != '-') {
11965 pushback(c);
11966 goto eof;
11967 }
11968 if ((c = nextc()) == '\\') {
11969 if (peek('u')) goto eof;
11970 return read_escape(flags|ESCAPE_META, encp) | 0x80;
11971 }
11972 else if (c == -1 || !ISASCII(c)) goto eof;
11973 else {
11974 return ((c & 0xff) | 0x80);
11975 }
11976
11977 case 'C':
11978 if ((c = nextc()) != '-') {
11979 pushback(c);
11980 goto eof;
11981 }
11982 case 'c':
11983 if (flags & ESCAPE_CONTROL) goto eof;
11984 if ((c = nextc())== '\\') {
11985 if (peek('u')) goto eof;
11986 c = read_escape(flags|ESCAPE_CONTROL, encp);
11987 }
11988 else if (c == '?')
11989 return 0177;
11990 else if (c == -1 || !ISASCII(c)) goto eof;
11991 return c & 0x9f;
11992
11993 eof:
11994 case -1:
11995 yyerror("Invalid escape character syntax");
11996 return '\0';
11997
11998 default:
11999 return c;
12000 }
12001 }
12002
12003 static void
12004 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc)
12005 {
12006 int len = rb_enc_codelen(c, enc);
12007 rb_enc_mbcput(c, tokspace(len), enc);
12008 }
12009
12010 static int
12011 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp)
12012 {
12013 int c;
12014 int flags = 0;
12015 size_t numlen;
12016
12017 first:
12018 switch (c = nextc()) {
12019 case '\n':
12020 return 0;
12021
12022 case '0': case '1': case '2': case '3':
12023 case '4': case '5': case '6': case '7':
12024 {
12025 ruby_scan_oct(--lex_p, 3, &numlen);
12026 if (numlen == 0) goto eof;
12027 lex_p += numlen;
12028 tokcopy((int)numlen + 1);
12029 }
12030 return 0;
12031
12032 case 'x':
12033 {
12034 tok_hex(&numlen);
12035 if (numlen == 0) return -1;
12036 tokcopy((int)numlen + 2);
12037 }
12038 return 0;
12039
12040 case 'M':
12041 if (flags & ESCAPE_META) goto eof;
12042 if ((c = nextc()) != '-') {
12043 pushback(c);
12044 goto eof;
12045 }
12046 tokcopy(3);
12047 flags |= ESCAPE_META;
12048 goto escaped;
12049
12050 case 'C':
12051 if (flags & ESCAPE_CONTROL) goto eof;
12052 if ((c = nextc()) != '-') {
12053 pushback(c);
12054 goto eof;
12055 }
12056 tokcopy(3);
12057 goto escaped;
12058
12059 case 'c':
12060 if (flags & ESCAPE_CONTROL) goto eof;
12061 tokcopy(2);
12062 flags |= ESCAPE_CONTROL;
12063 escaped:
12064 if ((c = nextc()) == '\\') {
12065 goto first;
12066 }
12067 else if (c == -1) goto eof;
12068 tokadd(c);
12069 return 0;
12070
12071 eof:
12072 case -1:
12073 yyerror("Invalid escape character syntax");
12074 return -1;
12075
12076 default:
12077 tokadd('\\');
12078 tokadd(c);
12079 }
12080 return 0;
12081 }
12082
12083 static int
12084 parser_regx_options(struct parser_params *parser)
12085 {
12086 int kcode = 0;
12087 int kopt = 0;
12088 int options = 0;
12089 int c, opt, kc;
12090
12091 newtok();
12092 while (c = nextc(), ISALPHA(c)) {
12093 if (c == 'o') {
12094 options |= RE_OPTION_ONCE;
12095 }
12096 else if (rb_char_to_option_kcode(c, &opt, &kc)) {
12097 if (kc >= 0) {
12098 if (kc != rb_ascii8bit_encindex()) kcode = c;
12099 kopt = opt;
12100 }
12101 else {
12102 options |= opt;
12103 }
12104 }
12105 else {
12106 tokadd(c);
12107 }
12108 }
12109 options |= kopt;
12110 pushback(c);
12111 if (toklen()) {
12112 tokfix();
12113 compile_error(PARSER_ARG "unknown regexp option%s - %s",
12114 toklen() > 1 ? "s" : "", tok());
12115 }
12116 return options | RE_OPTION_ENCODING(kcode);
12117 }
12118
12119 static void
12120 dispose_string(VALUE str)
12121 {
12122
12123 if (RBASIC(str)->flags & RSTRING_NOEMBED)
12124 xfree(RSTRING_PTR(str));
12125 rb_gc_force_recycle(str);
12126 }
12127
12128 static int
12129 parser_tokadd_mbchar(struct parser_params *parser, int c)
12130 {
12131 int len = parser_precise_mbclen();
12132 if (!MBCLEN_CHARFOUND_P(len)) {
12133 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name());
12134 return -1;
12135 }
12136 tokadd(c);
12137 lex_p += --len;
12138 if (len > 0) tokcopy(len);
12139 return c;
12140 }
12141
12142 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c))
12143
12144 static int
12145 parser_tokadd_string(struct parser_params *parser,
12146 int func, int term, int paren, long *nest,
12147 rb_encoding **encp)
12148 {
12149 int c;
12150 int has_nonascii = 0;
12151 rb_encoding *enc = *encp;
12152 char *errbuf = 0;
12153 static const char mixed_msg[] = "%s mixed within %s source";
12154
12155 #define mixed_error(enc1, enc2) if (!errbuf) { \
12156 size_t len = sizeof(mixed_msg) - 4; \
12157 len += strlen(rb_enc_name(enc1)); \
12158 len += strlen(rb_enc_name(enc2)); \
12159 errbuf = ALLOCA_N(char, len); \
12160 snprintf(errbuf, len, mixed_msg, \
12161 rb_enc_name(enc1), \
12162 rb_enc_name(enc2)); \
12163 yyerror(errbuf); \
12164 }
12165 #define mixed_escape(beg, enc1, enc2) do { \
12166 const char *pos = lex_p; \
12167 lex_p = (beg); \
12168 mixed_error((enc1), (enc2)); \
12169 lex_p = pos; \
12170 } while (0)
12171
12172 while ((c = nextc()) != -1) {
12173 if (paren && c == paren) {
12174 ++*nest;
12175 }
12176 else if (c == term) {
12177 if (!nest || !*nest) {
12178 pushback(c);
12179 break;
12180 }
12181 --*nest;
12182 }
12183 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
12184 int c2 = *lex_p;
12185 if (c2 == '$' || c2 == '@' || c2 == '{') {
12186 pushback(c);
12187 break;
12188 }
12189 }
12190 else if (c == '\\') {
12191 const char *beg = lex_p - 1;
12192 c = nextc();
12193 switch (c) {
12194 case '\n':
12195 if (func & STR_FUNC_QWORDS) break;
12196 if (func & STR_FUNC_EXPAND) continue;
12197 tokadd('\\');
12198 break;
12199
12200 case '\\':
12201 if (func & STR_FUNC_ESCAPE) tokadd(c);
12202 break;
12203
12204 case 'u':
12205 if ((func & STR_FUNC_EXPAND) == 0) {
12206 tokadd('\\');
12207 break;
12208 }
12209 parser_tokadd_utf8(parser, &enc, 1,
12210 func & STR_FUNC_SYMBOL,
12211 func & STR_FUNC_REGEXP);
12212 if (has_nonascii && enc != *encp) {
12213 mixed_escape(beg, enc, *encp);
12214 }
12215 continue;
12216
12217 default:
12218 if (c == -1) return -1;
12219 if (!ISASCII(c)) {
12220 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\');
12221 goto non_ascii;
12222 }
12223 if (func & STR_FUNC_REGEXP) {
12224 pushback(c);
12225 if ((c = tokadd_escape(&enc)) < 0)
12226 return -1;
12227 if (has_nonascii && enc != *encp) {
12228 mixed_escape(beg, enc, *encp);
12229 }
12230 continue;
12231 }
12232 else if (func & STR_FUNC_EXPAND) {
12233 pushback(c);
12234 if (func & STR_FUNC_ESCAPE) tokadd('\\');
12235 c = read_escape(0, &enc);
12236 }
12237 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12238
12239 }
12240 else if (c != term && !(paren && c == paren)) {
12241 tokadd('\\');
12242 pushback(c);
12243 continue;
12244 }
12245 }
12246 }
12247 else if (!parser_isascii()) {
12248 non_ascii:
12249 has_nonascii = 1;
12250 if (enc != *encp) {
12251 mixed_error(enc, *encp);
12252 continue;
12253 }
12254 if (tokadd_mbchar(c) == -1) return -1;
12255 continue;
12256 }
12257 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12258 pushback(c);
12259 break;
12260 }
12261 if (c & 0x80) {
12262 has_nonascii = 1;
12263 if (enc != *encp) {
12264 mixed_error(enc, *encp);
12265 continue;
12266 }
12267 }
12268 tokadd(c);
12269 }
12270 *encp = enc;
12271 return c;
12272 }
12273
12274 #define NEW_STRTERM(func, term, paren) \
12275 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
12276
12277 #ifdef RIPPER
12278 static void
12279 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc)
12280 {
12281 if (!NIL_P(parser->delayed)) {
12282 ptrdiff_t len = lex_p - parser->tokp;
12283 if (len > 0) {
12284 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);
12285 }
12286 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
12287 parser->tokp = lex_p;
12288 }
12289 }
12290
12291 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc))
12292 #else
12293 #define flush_string_content(enc) ((void)(enc))
12294 #endif
12295
12296 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
12297
12298
12299 #ifndef RIPPER
12300 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
12301 #define SPECIAL_PUNCT(idx) ( \
12302 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
12303 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
12304 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
12305 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
12306 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
12307 BIT('0', idx))
12308 const unsigned int ruby_global_name_punct_bits[] = {
12309 SPECIAL_PUNCT(0),
12310 SPECIAL_PUNCT(1),
12311 SPECIAL_PUNCT(2),
12312 };
12313 #undef BIT
12314 #undef SPECIAL_PUNCT
12315 #endif
12316
12317 static inline int
12318 is_global_name_punct(const char c)
12319 {
12320 if (c <= 0x20 || 0x7e < c) return 0;
12321 return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1;
12322 }
12323
12324 static int
12325 parser_peek_variable_name(struct parser_params *parser)
12326 {
12327 int c;
12328 const char *p = lex_p;
12329
12330 if (p + 1 >= lex_pend) return 0;
12331 c = *p++;
12332 switch (c) {
12333 case '$':
12334 if ((c = *p) == '-') {
12335 if (++p >= lex_pend) return 0;
12336 c = *p;
12337 }
12338 else if (is_global_name_punct(c) || ISDIGIT(c)) {
12339 return tSTRING_DVAR;
12340 }
12341 break;
12342 case '@':
12343 if ((c = *p) == '@') {
12344 if (++p >= lex_pend) return 0;
12345 c = *p;
12346 }
12347 break;
12348 case '{':
12349 lex_p = p;
12350 command_start = TRUE;
12351 return tSTRING_DBEG;
12352 default:
12353 return 0;
12354 }
12355 if (!ISASCII(c) || c == '_' || ISALPHA(c))
12356 return tSTRING_DVAR;
12357 return 0;
12358 }
12359
12360 static int
12361 parser_parse_string(struct parser_params *parser, NODE *quote)
12362 {
12363 int func = (int)quote->nd_func;
12364 int term = nd_term(quote);
12365 int paren = nd_paren(quote);
12366 int c, space = 0;
12367 rb_encoding *enc = parser->enc;
12368
12369 if (func == -1) return tSTRING_END;
12370 c = nextc();
12371 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12372 do {c = nextc();} while (ISSPACE(c));
12373 space = 1;
12374 }
12375 if (c == term && !quote->nd_nest) {
12376 if (func & STR_FUNC_QWORDS) {
12377 quote->nd_func = -1;
12378 return ' ';
12379 }
12380 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
12381 set_yylval_num(regx_options());
12382 return tREGEXP_END;
12383 }
12384 if (space) {
12385 pushback(c);
12386 return ' ';
12387 }
12388 newtok();
12389 if ((func & STR_FUNC_EXPAND) && c == '#') {
12390 int t = parser_peek_variable_name(parser);
12391 if (t) return t;
12392 tokadd('#');
12393 c = nextc();
12394 }
12395 pushback(c);
12396 if (tokadd_string(func, term, paren, "e->nd_nest,
12397 &enc) == -1) {
12398 ruby_sourceline = nd_line(quote);
12399 if (func & STR_FUNC_REGEXP) {
12400 if (parser->eofp)
12401 compile_error(PARSER_ARG "unterminated regexp meets end of file");
12402 return tREGEXP_END;
12403 }
12404 else {
12405 if (parser->eofp)
12406 compile_error(PARSER_ARG "unterminated string meets end of file");
12407 return tSTRING_END;
12408 }
12409 }
12410
12411 tokfix();
12412 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
12413 flush_string_content(enc);
12414
12415 return tSTRING_CONTENT;
12416 }
12417
12418 static int
12419 parser_heredoc_identifier(struct parser_params *parser)
12420 {
12421 int c = nextc(), term, func = 0;
12422 long len;
12423
12424 if (c == '-') {
12425 c = nextc();
12426 func = STR_FUNC_INDENT;
12427 }
12428 switch (c) {
12429 case '\'':
12430 func |= str_squote; goto quoted;
12431 case '"':
12432 func |= str_dquote; goto quoted;
12433 case '`':
12434 func |= str_xquote;
12435 quoted:
12436 newtok();
12437 tokadd(func);
12438 term = c;
12439 while ((c = nextc()) != -1 && c != term) {
12440 if (tokadd_mbchar(c) == -1) return 0;
12441 }
12442 if (c == -1) {
12443 compile_error(PARSER_ARG "unterminated here document identifier");
12444 return 0;
12445 }
12446 break;
12447
12448 default:
12449 if (!parser_is_identchar()) {
12450 pushback(c);
12451 if (func & STR_FUNC_INDENT) {
12452 pushback('-');
12453 }
12454 return 0;
12455 }
12456 newtok();
12457 term = '"';
12458 tokadd(func |= str_dquote);
12459 do {
12460 if (tokadd_mbchar(c) == -1) return 0;
12461 } while ((c = nextc()) != -1 && parser_is_identchar());
12462 pushback(c);
12463 break;
12464 }
12465
12466 tokfix();
12467 #ifdef RIPPER
12468 ripper_dispatch_scan_event(parser, tHEREDOC_BEG);
12469 #endif
12470 len = lex_p - lex_pbeg;
12471 lex_goto_eol(parser);
12472 lex_strterm = rb_node_newnode(NODE_HEREDOC,
12473 STR_NEW(tok(), toklen()),
12474 len,
12475 lex_lastline);
12476 nd_set_line(lex_strterm, ruby_sourceline);
12477 ripper_flush(parser);
12478 return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
12479 }
12480
12481 static void
12482 parser_heredoc_restore(struct parser_params *parser, NODE *here)
12483 {
12484 VALUE line;
12485
12486 line = here->nd_orig;
12487 lex_lastline = line;
12488 lex_pbeg = RSTRING_PTR(line);
12489 lex_pend = lex_pbeg + RSTRING_LEN(line);
12490 lex_p = lex_pbeg + here->nd_nth;
12491 heredoc_end = ruby_sourceline;
12492 ruby_sourceline = nd_line(here);
12493 dispose_string(here->nd_lit);
12494 rb_gc_force_recycle((VALUE)here);
12495 ripper_flush(parser);
12496 }
12497
12498 static int
12499 parser_whole_match_p(struct parser_params *parser,
12500 const char *eos, long len, int indent)
12501 {
12502 const char *p = lex_pbeg;
12503 long n;
12504
12505 if (indent) {
12506 while (*p && ISSPACE(*p)) p++;
12507 }
12508 n = lex_pend - (p + len);
12509 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE;
12510 return strncmp(eos, p, len) == 0;
12511 }
12512
12513 #ifdef RIPPER
12514 static void
12515 ripper_dispatch_heredoc_end(struct parser_params *parser)
12516 {
12517 if (!NIL_P(parser->delayed))
12518 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
12519 lex_goto_eol(parser);
12520 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END);
12521 }
12522
12523 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser)
12524 #else
12525 #define dispatch_heredoc_end() ((void)0)
12526 #endif
12527
12528 static int
12529 parser_here_document(struct parser_params *parser, NODE *here)
12530 {
12531 int c, func, indent = 0;
12532 const char *eos, *p, *pend;
12533 long len;
12534 VALUE str = 0;
12535 rb_encoding *enc = parser->enc;
12536
12537 eos = RSTRING_PTR(here->nd_lit);
12538 len = RSTRING_LEN(here->nd_lit) - 1;
12539 indent = (func = *eos++) & STR_FUNC_INDENT;
12540
12541 if ((c = nextc()) == -1) {
12542 error:
12543 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos);
12544 #ifdef RIPPER
12545 if (NIL_P(parser->delayed)) {
12546 ripper_dispatch_scan_event(parser, tSTRING_CONTENT);
12547 }
12548 else {
12549 if (str ||
12550 ((len = lex_p - parser->tokp) > 0 &&
12551 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) {
12552 rb_str_append(parser->delayed, str);
12553 }
12554 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
12555 }
12556 lex_goto_eol(parser);
12557 #endif
12558 restore:
12559 heredoc_restore(lex_strterm);
12560 lex_strterm = 0;
12561 return 0;
12562 }
12563 if (was_bol() && whole_match_p(eos, len, indent)) {
12564 dispatch_heredoc_end();
12565 heredoc_restore(lex_strterm);
12566 return tSTRING_END;
12567 }
12568
12569 if (!(func & STR_FUNC_EXPAND)) {
12570 do {
12571 p = RSTRING_PTR(lex_lastline);
12572 pend = lex_pend;
12573 if (pend > p) {
12574 switch (pend[-1]) {
12575 case '\n':
12576 if (--pend == p || pend[-1] != '\r') {
12577 pend++;
12578 break;
12579 }
12580 case '\r':
12581 --pend;
12582 }
12583 }
12584 if (str)
12585 rb_str_cat(str, p, pend - p);
12586 else
12587 str = STR_NEW(p, pend - p);
12588 if (pend < lex_pend) rb_str_cat(str, "\n", 1);
12589 lex_goto_eol(parser);
12590 if (nextc() == -1) {
12591 if (str) dispose_string(str);
12592 goto error;
12593 }
12594 } while (!whole_match_p(eos, len, indent));
12595 }
12596 else {
12597
12598 newtok();
12599 if (c == '#') {
12600 int t = parser_peek_variable_name(parser);
12601 if (t) return t;
12602 tokadd('#');
12603 c = nextc();
12604 }
12605 do {
12606 pushback(c);
12607 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) {
12608 if (parser->eofp) goto error;
12609 goto restore;
12610 }
12611 if (c != '\n') {
12612 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
12613 flush_string_content(enc);
12614 return tSTRING_CONTENT;
12615 }
12616 tokadd(nextc());
12617
12618 if ((c = nextc()) == -1) goto error;
12619 } while (!whole_match_p(eos, len, indent));
12620 str = STR_NEW3(tok(), toklen(), enc, func);
12621 }
12622 dispatch_heredoc_end();
12623 heredoc_restore(lex_strterm);
12624 lex_strterm = NEW_STRTERM(-1, 0, 0);
12625 set_yylval_str(str);
12626 return tSTRING_CONTENT;
12627 }
12628
12629 #include "lex.c"
12630
12631 static void
12632 arg_ambiguous_gen(struct parser_params *parser)
12633 {
12634 #ifndef RIPPER
12635 rb_warning0("ambiguous first argument; put parentheses or even spaces");
12636 #else
12637 dispatch0(arg_ambiguous);
12638 #endif
12639 }
12640 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1)
12641
12642 static ID
12643 formal_argument_gen(struct parser_params *parser, ID lhs)
12644 {
12645 #ifndef RIPPER
12646 if (!is_local_id(lhs))
12647 yyerror("formal argument must be local variable");
12648 #endif
12649 shadowing_lvar(lhs);
12650 return lhs;
12651 }
12652
12653 static int
12654 lvar_defined_gen(struct parser_params *parser, ID id)
12655 {
12656 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id);
12657 }
12658
12659
12660 static long
12661 parser_encode_length(struct parser_params *parser, const char *name, long len)
12662 {
12663 long nlen;
12664
12665 if (len > 5 && name[nlen = len - 5] == '-') {
12666 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
12667 return nlen;
12668 }
12669 if (len > 4 && name[nlen = len - 4] == '-') {
12670 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
12671 return nlen;
12672 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
12673 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
12674
12675 return nlen;
12676 }
12677 return len;
12678 }
12679
12680 static void
12681 parser_set_encode(struct parser_params *parser, const char *name)
12682 {
12683 int idx = rb_enc_find_index(name);
12684 rb_encoding *enc;
12685 VALUE excargs[3];
12686
12687 if (idx < 0) {
12688 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
12689 error:
12690 excargs[0] = rb_eArgError;
12691 excargs[2] = rb_make_backtrace();
12692 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline));
12693 rb_exc_raise(rb_make_exception(3, excargs));
12694 }
12695 enc = rb_enc_from_index(idx);
12696 if (!rb_enc_asciicompat(enc)) {
12697 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
12698 goto error;
12699 }
12700 parser->enc = enc;
12701 #ifndef RIPPER
12702 if (ruby_debug_lines) {
12703 long i, n = RARRAY_LEN(ruby_debug_lines);
12704 const VALUE *p = RARRAY_PTR(ruby_debug_lines);
12705 for (i = 0; i < n; ++i) {
12706 rb_enc_associate_index(*p, idx);
12707 }
12708 }
12709 #endif
12710 }
12711
12712 static int
12713 comment_at_top(struct parser_params *parser)
12714 {
12715 const char *p = lex_pbeg, *pend = lex_p - 1;
12716 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0;
12717 while (p < pend) {
12718 if (!ISSPACE(*p)) return 0;
12719 p++;
12720 }
12721 return 1;
12722 }
12723
12724 #ifndef RIPPER
12725 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len);
12726 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val);
12727
12728 static void
12729 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val)
12730 {
12731 if (!comment_at_top(parser)) {
12732 return;
12733 }
12734 parser_set_encode(parser, val);
12735 }
12736
12737 static void
12738 parser_set_token_info(struct parser_params *parser, const char *name, const char *val)
12739 {
12740 int *p = &parser->parser_token_info_enabled;
12741
12742 switch (*val) {
12743 case 't': case 'T':
12744 if (strcasecmp(val, "true") == 0) {
12745 *p = TRUE;
12746 return;
12747 }
12748 break;
12749 case 'f': case 'F':
12750 if (strcasecmp(val, "false") == 0) {
12751 *p = FALSE;
12752 return;
12753 }
12754 break;
12755 }
12756 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val);
12757 }
12758
12759 struct magic_comment {
12760 const char *name;
12761 rb_magic_comment_setter_t func;
12762 rb_magic_comment_length_t length;
12763 };
12764
12765 static const struct magic_comment magic_comments[] = {
12766 {"coding", magic_comment_encoding, parser_encode_length},
12767 {"encoding", magic_comment_encoding, parser_encode_length},
12768 {"warn_indent", parser_set_token_info},
12769 };
12770 #endif
12771
12772 static const char *
12773 magic_comment_marker(const char *str, long len)
12774 {
12775 long i = 2;
12776
12777 while (i < len) {
12778 switch (str[i]) {
12779 case '-':
12780 if (str[i-1] == '*' && str[i-2] == '-') {
12781 return str + i + 1;
12782 }
12783 i += 2;
12784 break;
12785 case '*':
12786 if (i + 1 >= len) return 0;
12787 if (str[i+1] != '-') {
12788 i += 4;
12789 }
12790 else if (str[i-1] != '-') {
12791 i += 2;
12792 }
12793 else {
12794 return str + i + 2;
12795 }
12796 break;
12797 default:
12798 i += 3;
12799 break;
12800 }
12801 }
12802 return 0;
12803 }
12804
12805 static int
12806 parser_magic_comment(struct parser_params *parser, const char *str, long len)
12807 {
12808 VALUE name = 0, val = 0;
12809 const char *beg, *end, *vbeg, *vend;
12810 #define str_copy(_s, _p, _n) ((_s) \
12811 ? (void)(rb_str_resize((_s), (_n)), \
12812 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
12813 : (void)((_s) = STR_NEW((_p), (_n))))
12814
12815 if (len <= 7) return FALSE;
12816 if (!(beg = magic_comment_marker(str, len))) return FALSE;
12817 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE;
12818 str = beg;
12819 len = end - beg - 3;
12820
12821
12822 while (len > 0) {
12823 #ifndef RIPPER
12824 const struct magic_comment *p = magic_comments;
12825 #endif
12826 char *s;
12827 int i;
12828 long n = 0;
12829
12830 for (; len > 0 && *str; str++, --len) {
12831 switch (*str) {
12832 case '\'': case '"': case ':': case ';':
12833 continue;
12834 }
12835 if (!ISSPACE(*str)) break;
12836 }
12837 for (beg = str; len > 0; str++, --len) {
12838 switch (*str) {
12839 case '\'': case '"': case ':': case ';':
12840 break;
12841 default:
12842 if (ISSPACE(*str)) break;
12843 continue;
12844 }
12845 break;
12846 }
12847 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
12848 if (!len) break;
12849 if (*str != ':') continue;
12850
12851 do str++; while (--len > 0 && ISSPACE(*str));
12852 if (!len) break;
12853 if (*str == '"') {
12854 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
12855 if (*str == '\\') {
12856 --len;
12857 ++str;
12858 }
12859 }
12860 vend = str;
12861 if (len) {
12862 --len;
12863 ++str;
12864 }
12865 }
12866 else {
12867 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
12868 vend = str;
12869 }
12870 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
12871
12872 n = end - beg;
12873 str_copy(name, beg, n);
12874 s = RSTRING_PTR(name);
12875 for (i = 0; i < n; ++i) {
12876 if (s[i] == '-') s[i] = '_';
12877 }
12878 #ifndef RIPPER
12879 do {
12880 if (STRNCASECMP(p->name, s, n) == 0) {
12881 n = vend - vbeg;
12882 if (p->length) {
12883 n = (*p->length)(parser, vbeg, n);
12884 }
12885 str_copy(val, vbeg, n);
12886 (*p->func)(parser, s, RSTRING_PTR(val));
12887 break;
12888 }
12889 } while (++p < magic_comments + numberof(magic_comments));
12890 #else
12891 str_copy(val, vbeg, vend - vbeg);
12892 dispatch2(magic_comment, name, val);
12893 #endif
12894 }
12895
12896 return TRUE;
12897 }
12898
12899 static void
12900 set_file_encoding(struct parser_params *parser, const char *str, const char *send)
12901 {
12902 int sep = 0;
12903 const char *beg = str;
12904 VALUE s;
12905
12906 for (;;) {
12907 if (send - str <= 6) return;
12908 switch (str[6]) {
12909 case 'C': case 'c': str += 6; continue;
12910 case 'O': case 'o': str += 5; continue;
12911 case 'D': case 'd': str += 4; continue;
12912 case 'I': case 'i': str += 3; continue;
12913 case 'N': case 'n': str += 2; continue;
12914 case 'G': case 'g': str += 1; continue;
12915 case '=': case ':':
12916 sep = 1;
12917 str += 6;
12918 break;
12919 default:
12920 str += 6;
12921 if (ISSPACE(*str)) break;
12922 continue;
12923 }
12924 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
12925 }
12926 for (;;) {
12927 do {
12928 if (++str >= send) return;
12929 } while (ISSPACE(*str));
12930 if (sep) break;
12931 if (*str != '=' && *str != ':') return;
12932 sep = 1;
12933 str++;
12934 }
12935 beg = str;
12936 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
12937 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg));
12938 parser_set_encode(parser, RSTRING_PTR(s));
12939 rb_str_resize(s, 0);
12940 }
12941
12942 static void
12943 parser_prepare(struct parser_params *parser)
12944 {
12945 int c = nextc();
12946 switch (c) {
12947 case '#':
12948 if (peek('!')) parser->has_shebang = 1;
12949 break;
12950 case 0xef:
12951 if (lex_pend - lex_p >= 2 &&
12952 (unsigned char)lex_p[0] == 0xbb &&
12953 (unsigned char)lex_p[1] == 0xbf) {
12954 parser->enc = rb_utf8_encoding();
12955 lex_p += 2;
12956 lex_pbeg = lex_p;
12957 return;
12958 }
12959 break;
12960 case EOF:
12961 return;
12962 }
12963 pushback(c);
12964 parser->enc = rb_enc_get(lex_lastline);
12965 }
12966
12967 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
12968 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN)
12969 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)
12970 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
12971 #define IS_LABEL_POSSIBLE() ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG())
12972 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1))
12973
12974 #ifndef RIPPER
12975 #define ambiguous_operator(op, syn) ( \
12976 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \
12977 rb_warning0("even though it seems like "syn""))
12978 #else
12979 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn))
12980 #endif
12981 #define warn_balanced(op, syn) ((void) \
12982 (last_state != EXPR_CLASS && last_state != EXPR_DOT && \
12983 last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
12984 last_state != EXPR_ENDARG && \
12985 space_seen && !ISSPACE(c) && \
12986 (ambiguous_operator(op, syn), 0)))
12987
12988 static int
12989 parser_yylex(struct parser_params *parser)
12990 {
12991 register int c;
12992 int space_seen = 0;
12993 int cmd_state;
12994 enum lex_state_e last_state;
12995 rb_encoding *enc;
12996 int mb;
12997 #ifdef RIPPER
12998 int fallthru = FALSE;
12999 #endif
13000
13001 if (lex_strterm) {
13002 int token;
13003 if (nd_type(lex_strterm) == NODE_HEREDOC) {
13004 token = here_document(lex_strterm);
13005 if (token == tSTRING_END) {
13006 lex_strterm = 0;
13007 lex_state = EXPR_END;
13008 }
13009 }
13010 else {
13011 token = parse_string(lex_strterm);
13012 if (token == tSTRING_END || token == tREGEXP_END) {
13013 rb_gc_force_recycle((VALUE)lex_strterm);
13014 lex_strterm = 0;
13015 lex_state = EXPR_END;
13016 }
13017 }
13018 return token;
13019 }
13020 cmd_state = command_start;
13021 command_start = FALSE;
13022 retry:
13023 last_state = lex_state;
13024 switch (c = nextc()) {
13025 case '\0':
13026 case '\004':
13027 case '\032':
13028 case -1:
13029 return 0;
13030
13031
13032 case ' ': case '\t': case '\f': case '\r':
13033 case '\13':
13034 space_seen = 1;
13035 #ifdef RIPPER
13036 while ((c = nextc())) {
13037 switch (c) {
13038 case ' ': case '\t': case '\f': case '\r':
13039 case '\13':
13040 break;
13041 default:
13042 goto outofloop;
13043 }
13044 }
13045 outofloop:
13046 pushback(c);
13047 ripper_dispatch_scan_event(parser, tSP);
13048 #endif
13049 goto retry;
13050
13051 case '#':
13052
13053 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) {
13054 if (comment_at_top(parser)) {
13055 set_file_encoding(parser, lex_p, lex_pend);
13056 }
13057 }
13058 lex_p = lex_pend;
13059 #ifdef RIPPER
13060 ripper_dispatch_scan_event(parser, tCOMMENT);
13061 fallthru = TRUE;
13062 #endif
13063
13064 case '\n':
13065 switch (lex_state) {
13066 case EXPR_BEG:
13067 case EXPR_FNAME:
13068 case EXPR_DOT:
13069 case EXPR_CLASS:
13070 case EXPR_VALUE:
13071 #ifdef RIPPER
13072 if (!fallthru) {
13073 ripper_dispatch_scan_event(parser, tIGNORED_NL);
13074 }
13075 fallthru = FALSE;
13076 #endif
13077 goto retry;
13078 default:
13079 break;
13080 }
13081 while ((c = nextc())) {
13082 switch (c) {
13083 case ' ': case '\t': case '\f': case '\r':
13084 case '\13':
13085 space_seen = 1;
13086 break;
13087 case '.': {
13088 if ((c = nextc()) != '.') {
13089 pushback(c);
13090 pushback('.');
13091 goto retry;
13092 }
13093 }
13094 default:
13095 --ruby_sourceline;
13096 lex_nextline = lex_lastline;
13097 case -1:
13098 lex_goto_eol(parser);
13099 #ifdef RIPPER
13100 if (c != -1) {
13101 parser->tokp = lex_p;
13102 }
13103 #endif
13104 goto normal_newline;
13105 }
13106 }
13107 normal_newline:
13108 command_start = TRUE;
13109 lex_state = EXPR_BEG;
13110 return '\n';
13111
13112 case '*':
13113 if ((c = nextc()) == '*') {
13114 if ((c = nextc()) == '=') {
13115 set_yylval_id(tPOW);
13116 lex_state = EXPR_BEG;
13117 return tOP_ASGN;
13118 }
13119 pushback(c);
13120 c = tPOW;
13121 }
13122 else {
13123 if (c == '=') {
13124 set_yylval_id('*');
13125 lex_state = EXPR_BEG;
13126 return tOP_ASGN;
13127 }
13128 pushback(c);
13129 if (IS_SPCARG(c)) {
13130 rb_warning0("`*' interpreted as argument prefix");
13131 c = tSTAR;
13132 }
13133 else if (IS_BEG()) {
13134 c = tSTAR;
13135 }
13136 else {
13137 warn_balanced("*", "argument prefix");
13138 c = '*';
13139 }
13140 }
13141 switch (lex_state) {
13142 case EXPR_FNAME: case EXPR_DOT:
13143 lex_state = EXPR_ARG; break;
13144 default:
13145 lex_state = EXPR_BEG; break;
13146 }
13147 return c;
13148
13149 case '!':
13150 c = nextc();
13151 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13152 lex_state = EXPR_ARG;
13153 if (c == '@') {
13154 return '!';
13155 }
13156 }
13157 else {
13158 lex_state = EXPR_BEG;
13159 }
13160 if (c == '=') {
13161 return tNEQ;
13162 }
13163 if (c == '~') {
13164 return tNMATCH;
13165 }
13166 pushback(c);
13167 return '!';
13168
13169 case '=':
13170 if (was_bol()) {
13171
13172 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
13173 #ifdef RIPPER
13174 int first_p = TRUE;
13175
13176 lex_goto_eol(parser);
13177 ripper_dispatch_scan_event(parser, tEMBDOC_BEG);
13178 #endif
13179 for (;;) {
13180 lex_goto_eol(parser);
13181 #ifdef RIPPER
13182 if (!first_p) {
13183 ripper_dispatch_scan_event(parser, tEMBDOC);
13184 }
13185 first_p = FALSE;
13186 #endif
13187 c = nextc();
13188 if (c == -1) {
13189 compile_error(PARSER_ARG "embedded document meets end of file");
13190 return 0;
13191 }
13192 if (c != '=') continue;
13193 if (strncmp(lex_p, "end", 3) == 0 &&
13194 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
13195 break;
13196 }
13197 }
13198 lex_goto_eol(parser);
13199 #ifdef RIPPER
13200 ripper_dispatch_scan_event(parser, tEMBDOC_END);
13201 #endif
13202 goto retry;
13203 }
13204 }
13205
13206 switch (lex_state) {
13207 case EXPR_FNAME: case EXPR_DOT:
13208 lex_state = EXPR_ARG; break;
13209 default:
13210 lex_state = EXPR_BEG; break;
13211 }
13212 if ((c = nextc()) == '=') {
13213 if ((c = nextc()) == '=') {
13214 return tEQQ;
13215 }
13216 pushback(c);
13217 return tEQ;
13218 }
13219 if (c == '~') {
13220 return tMATCH;
13221 }
13222 else if (c == '>') {
13223 return tASSOC;
13224 }
13225 pushback(c);
13226 return '=';
13227
13228 case '<':
13229 last_state = lex_state;
13230 c = nextc();
13231 if (c == '<' &&
13232 lex_state != EXPR_DOT &&
13233 lex_state != EXPR_CLASS &&
13234 !IS_END() &&
13235 (!IS_ARG() || space_seen)) {
13236 int token = heredoc_identifier();
13237 if (token) return token;
13238 }
13239 switch (lex_state) {
13240 case EXPR_FNAME: case EXPR_DOT:
13241 lex_state = EXPR_ARG; break;
13242 default:
13243 lex_state = EXPR_BEG; break;
13244 }
13245 if (c == '=') {
13246 if ((c = nextc()) == '>') {
13247 return tCMP;
13248 }
13249 pushback(c);
13250 return tLEQ;
13251 }
13252 if (c == '<') {
13253 if ((c = nextc()) == '=') {
13254 set_yylval_id(tLSHFT);
13255 lex_state = EXPR_BEG;
13256 return tOP_ASGN;
13257 }
13258 pushback(c);
13259 warn_balanced("<<", "here document");
13260 return tLSHFT;
13261 }
13262 pushback(c);
13263 return '<';
13264
13265 case '>':
13266 switch (lex_state) {
13267 case EXPR_FNAME: case EXPR_DOT:
13268 lex_state = EXPR_ARG; break;
13269 default:
13270 lex_state = EXPR_BEG; break;
13271 }
13272 if ((c = nextc()) == '=') {
13273 return tGEQ;
13274 }
13275 if (c == '>') {
13276 if ((c = nextc()) == '=') {
13277 set_yylval_id(tRSHFT);
13278 lex_state = EXPR_BEG;
13279 return tOP_ASGN;
13280 }
13281 pushback(c);
13282 return tRSHFT;
13283 }
13284 pushback(c);
13285 return '>';
13286
13287 case '"':
13288 lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
13289 return tSTRING_BEG;
13290
13291 case '`':
13292 if (lex_state == EXPR_FNAME) {
13293 lex_state = EXPR_ENDFN;
13294 return c;
13295 }
13296 if (lex_state == EXPR_DOT) {
13297 if (cmd_state)
13298 lex_state = EXPR_CMDARG;
13299 else
13300 lex_state = EXPR_ARG;
13301 return c;
13302 }
13303 lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
13304 return tXSTRING_BEG;
13305
13306 case '\'':
13307 lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
13308 return tSTRING_BEG;
13309
13310 case '?':
13311 if (IS_END()) {
13312 lex_state = EXPR_VALUE;
13313 return '?';
13314 }
13315 c = nextc();
13316 if (c == -1) {
13317 compile_error(PARSER_ARG "incomplete character syntax");
13318 return 0;
13319 }
13320 if (rb_enc_isspace(c, parser->enc)) {
13321 if (!IS_ARG()) {
13322 int c2 = 0;
13323 switch (c) {
13324 case ' ':
13325 c2 = 's';
13326 break;
13327 case '\n':
13328 c2 = 'n';
13329 break;
13330 case '\t':
13331 c2 = 't';
13332 break;
13333 case '\v':
13334 c2 = 'v';
13335 break;
13336 case '\r':
13337 c2 = 'r';
13338 break;
13339 case '\f':
13340 c2 = 'f';
13341 break;
13342 }
13343 if (c2) {
13344 rb_warnI("invalid character syntax; use ?\\%c", c2);
13345 }
13346 }
13347 ternary:
13348 pushback(c);
13349 lex_state = EXPR_VALUE;
13350 return '?';
13351 }
13352 newtok();
13353 enc = parser->enc;
13354 if (!parser_isascii()) {
13355 if (tokadd_mbchar(c) == -1) return 0;
13356 }
13357 else if ((rb_enc_isalnum(c, parser->enc) || c == '_') &&
13358 lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) {
13359 goto ternary;
13360 }
13361 else if (c == '\\') {
13362 if (peek('u')) {
13363 nextc();
13364 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0);
13365 if (0x80 <= c) {
13366 tokaddmbc(c, enc);
13367 }
13368 else {
13369 tokadd(c);
13370 }
13371 }
13372 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) {
13373 nextc();
13374 if (tokadd_mbchar(c) == -1) return 0;
13375 }
13376 else {
13377 c = read_escape(0, &enc);
13378 tokadd(c);
13379 }
13380 }
13381 else {
13382 tokadd(c);
13383 }
13384 tokfix();
13385 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0));
13386 lex_state = EXPR_END;
13387 return tCHAR;
13388
13389 case '&':
13390 if ((c = nextc()) == '&') {
13391 lex_state = EXPR_BEG;
13392 if ((c = nextc()) == '=') {
13393 set_yylval_id(tANDOP);
13394 lex_state = EXPR_BEG;
13395 return tOP_ASGN;
13396 }
13397 pushback(c);
13398 return tANDOP;
13399 }
13400 else if (c == '=') {
13401 set_yylval_id('&');
13402 lex_state = EXPR_BEG;
13403 return tOP_ASGN;
13404 }
13405 pushback(c);
13406 if (IS_SPCARG(c)) {
13407 rb_warning0("`&' interpreted as argument prefix");
13408 c = tAMPER;
13409 }
13410 else if (IS_BEG()) {
13411 c = tAMPER;
13412 }
13413 else {
13414 warn_balanced("&", "argument prefix");
13415 c = '&';
13416 }
13417 switch (lex_state) {
13418 case EXPR_FNAME: case EXPR_DOT:
13419 lex_state = EXPR_ARG; break;
13420 default:
13421 lex_state = EXPR_BEG;
13422 }
13423 return c;
13424
13425 case '|':
13426 if ((c = nextc()) == '|') {
13427 lex_state = EXPR_BEG;
13428 if ((c = nextc()) == '=') {
13429 set_yylval_id(tOROP);
13430 lex_state = EXPR_BEG;
13431 return tOP_ASGN;
13432 }
13433 pushback(c);
13434 return tOROP;
13435 }
13436 if (c == '=') {
13437 set_yylval_id('|');
13438 lex_state = EXPR_BEG;
13439 return tOP_ASGN;
13440 }
13441 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13442 lex_state = EXPR_ARG;
13443 }
13444 else {
13445 lex_state = EXPR_BEG;
13446 }
13447 pushback(c);
13448 return '|';
13449
13450 case '+':
13451 c = nextc();
13452 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13453 lex_state = EXPR_ARG;
13454 if (c == '@') {
13455 return tUPLUS;
13456 }
13457 pushback(c);
13458 return '+';
13459 }
13460 if (c == '=') {
13461 set_yylval_id('+');
13462 lex_state = EXPR_BEG;
13463 return tOP_ASGN;
13464 }
13465 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
13466 lex_state = EXPR_BEG;
13467 pushback(c);
13468 if (c != -1 && ISDIGIT(c)) {
13469 c = '+';
13470 goto start_num;
13471 }
13472 return tUPLUS;
13473 }
13474 lex_state = EXPR_BEG;
13475 pushback(c);
13476 warn_balanced("+", "unary operator");
13477 return '+';
13478
13479 case '-':
13480 c = nextc();
13481 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13482 lex_state = EXPR_ARG;
13483 if (c == '@') {
13484 return tUMINUS;
13485 }
13486 pushback(c);
13487 return '-';
13488 }
13489 if (c == '=') {
13490 set_yylval_id('-');
13491 lex_state = EXPR_BEG;
13492 return tOP_ASGN;
13493 }
13494 if (c == '>') {
13495 lex_state = EXPR_ARG;
13496 return tLAMBDA;
13497 }
13498 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
13499 lex_state = EXPR_BEG;
13500 pushback(c);
13501 if (c != -1 && ISDIGIT(c)) {
13502 return tUMINUS_NUM;
13503 }
13504 return tUMINUS;
13505 }
13506 lex_state = EXPR_BEG;
13507 pushback(c);
13508 warn_balanced("-", "unary operator");
13509 return '-';
13510
13511 case '.':
13512 lex_state = EXPR_BEG;
13513 if ((c = nextc()) == '.') {
13514 if ((c = nextc()) == '.') {
13515 return tDOT3;
13516 }
13517 pushback(c);
13518 return tDOT2;
13519 }
13520 pushback(c);
13521 if (c != -1 && ISDIGIT(c)) {
13522 yyerror("no .<digit> floating literal anymore; put 0 before dot");
13523 }
13524 lex_state = EXPR_DOT;
13525 return '.';
13526
13527 start_num:
13528 case '0': case '1': case '2': case '3': case '4':
13529 case '5': case '6': case '7': case '8': case '9':
13530 {
13531 int is_float, seen_point, seen_e, nondigit;
13532
13533 is_float = seen_point = seen_e = nondigit = 0;
13534 lex_state = EXPR_END;
13535 newtok();
13536 if (c == '-' || c == '+') {
13537 tokadd(c);
13538 c = nextc();
13539 }
13540 if (c == '0') {
13541 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0)
13542 int start = toklen();
13543 c = nextc();
13544 if (c == 'x' || c == 'X') {
13545
13546 c = nextc();
13547 if (c != -1 && ISXDIGIT(c)) {
13548 do {
13549 if (c == '_') {
13550 if (nondigit) break;
13551 nondigit = c;
13552 continue;
13553 }
13554 if (!ISXDIGIT(c)) break;
13555 nondigit = 0;
13556 tokadd(c);
13557 } while ((c = nextc()) != -1);
13558 }
13559 pushback(c);
13560 tokfix();
13561 if (toklen() == start) {
13562 no_digits();
13563 }
13564 else if (nondigit) goto trailing_uc;
13565 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE));
13566 return tINTEGER;
13567 }
13568 if (c == 'b' || c == 'B') {
13569
13570 c = nextc();
13571 if (c == '0' || c == '1') {
13572 do {
13573 if (c == '_') {
13574 if (nondigit) break;
13575 nondigit = c;
13576 continue;
13577 }
13578 if (c != '0' && c != '1') break;
13579 nondigit = 0;
13580 tokadd(c);
13581 } while ((c = nextc()) != -1);
13582 }
13583 pushback(c);
13584 tokfix();
13585 if (toklen() == start) {
13586 no_digits();
13587 }
13588 else if (nondigit) goto trailing_uc;
13589 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE));
13590 return tINTEGER;
13591 }
13592 if (c == 'd' || c == 'D') {
13593
13594 c = nextc();
13595 if (c != -1 && ISDIGIT(c)) {
13596 do {
13597 if (c == '_') {
13598 if (nondigit) break;
13599 nondigit = c;
13600 continue;
13601 }
13602 if (!ISDIGIT(c)) break;
13603 nondigit = 0;
13604 tokadd(c);
13605 } while ((c = nextc()) != -1);
13606 }
13607 pushback(c);
13608 tokfix();
13609 if (toklen() == start) {
13610 no_digits();
13611 }
13612 else if (nondigit) goto trailing_uc;
13613 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE));
13614 return tINTEGER;
13615 }
13616 if (c == '_') {
13617
13618 goto octal_number;
13619 }
13620 if (c == 'o' || c == 'O') {
13621
13622 c = nextc();
13623 if (c == -1 || c == '_' || !ISDIGIT(c)) {
13624 no_digits();
13625 }
13626 }
13627 if (c >= '0' && c <= '7') {
13628
13629 octal_number:
13630 do {
13631 if (c == '_') {
13632 if (nondigit) break;
13633 nondigit = c;
13634 continue;
13635 }
13636 if (c < '0' || c > '9') break;
13637 if (c > '7') goto invalid_octal;
13638 nondigit = 0;
13639 tokadd(c);
13640 } while ((c = nextc()) != -1);
13641 if (toklen() > start) {
13642 pushback(c);
13643 tokfix();
13644 if (nondigit) goto trailing_uc;
13645 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE));
13646 return tINTEGER;
13647 }
13648 if (nondigit) {
13649 pushback(c);
13650 goto trailing_uc;
13651 }
13652 }
13653 if (c > '7' && c <= '9') {
13654 invalid_octal:
13655 yyerror("Invalid octal digit");
13656 }
13657 else if (c == '.' || c == 'e' || c == 'E') {
13658 tokadd('0');
13659 }
13660 else {
13661 pushback(c);
13662 set_yylval_literal(INT2FIX(0));
13663 return tINTEGER;
13664 }
13665 }
13666
13667 for (;;) {
13668 switch (c) {
13669 case '0': case '1': case '2': case '3': case '4':
13670 case '5': case '6': case '7': case '8': case '9':
13671 nondigit = 0;
13672 tokadd(c);
13673 break;
13674
13675 case '.':
13676 if (nondigit) goto trailing_uc;
13677 if (seen_point || seen_e) {
13678 goto decode_num;
13679 }
13680 else {
13681 int c0 = nextc();
13682 if (c0 == -1 || !ISDIGIT(c0)) {
13683 pushback(c0);
13684 goto decode_num;
13685 }
13686 c = c0;
13687 }
13688 tokadd('.');
13689 tokadd(c);
13690 is_float++;
13691 seen_point++;
13692 nondigit = 0;
13693 break;
13694
13695 case 'e':
13696 case 'E':
13697 if (nondigit) {
13698 pushback(c);
13699 c = nondigit;
13700 goto decode_num;
13701 }
13702 if (seen_e) {
13703 goto decode_num;
13704 }
13705 tokadd(c);
13706 seen_e++;
13707 is_float++;
13708 nondigit = c;
13709 c = nextc();
13710 if (c != '-' && c != '+') continue;
13711 tokadd(c);
13712 nondigit = c;
13713 break;
13714
13715 case '_':
13716 if (nondigit) goto decode_num;
13717 nondigit = c;
13718 break;
13719
13720 default:
13721 goto decode_num;
13722 }
13723 c = nextc();
13724 }
13725
13726 decode_num:
13727 pushback(c);
13728 if (nondigit) {
13729 char tmp[30];
13730 trailing_uc:
13731 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit);
13732 yyerror(tmp);
13733 }
13734 tokfix();
13735 if (is_float) {
13736 double d = strtod(tok(), 0);
13737 if (errno == ERANGE) {
13738 rb_warningS("Float %s out of range", tok());
13739 errno = 0;
13740 }
13741 set_yylval_literal(DBL2NUM(d));
13742 return tFLOAT;
13743 }
13744 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE));
13745 return tINTEGER;
13746 }
13747
13748 case ')':
13749 case ']':
13750 paren_nest--;
13751 case '}':
13752 COND_LEXPOP();
13753 CMDARG_LEXPOP();
13754 if (c == ')')
13755 lex_state = EXPR_ENDFN;
13756 else
13757 lex_state = EXPR_ENDARG;
13758 return c;
13759
13760 case ':':
13761 c = nextc();
13762 if (c == ':') {
13763 if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) {
13764 lex_state = EXPR_BEG;
13765 return tCOLON3;
13766 }
13767 lex_state = EXPR_DOT;
13768 return tCOLON2;
13769 }
13770 if (IS_END() || ISSPACE(c)) {
13771 pushback(c);
13772 warn_balanced(":", "symbol literal");
13773 lex_state = EXPR_BEG;
13774 return ':';
13775 }
13776 switch (c) {
13777 case '\'':
13778 lex_strterm = NEW_STRTERM(str_ssym, c, 0);
13779 break;
13780 case '"':
13781 lex_strterm = NEW_STRTERM(str_dsym, c, 0);
13782 break;
13783 default:
13784 pushback(c);
13785 break;
13786 }
13787 lex_state = EXPR_FNAME;
13788 return tSYMBEG;
13789
13790 case '/':
13791 if (IS_BEG()) {
13792 lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
13793 return tREGEXP_BEG;
13794 }
13795 if ((c = nextc()) == '=') {
13796 set_yylval_id('/');
13797 lex_state = EXPR_BEG;
13798 return tOP_ASGN;
13799 }
13800 pushback(c);
13801 if (IS_SPCARG(c)) {
13802 (void)arg_ambiguous();
13803 lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
13804 return tREGEXP_BEG;
13805 }
13806 switch (lex_state) {
13807 case EXPR_FNAME: case EXPR_DOT:
13808 lex_state = EXPR_ARG; break;
13809 default:
13810 lex_state = EXPR_BEG; break;
13811 }
13812 warn_balanced("/", "regexp literal");
13813 return '/';
13814
13815 case '^':
13816 if ((c = nextc()) == '=') {
13817 set_yylval_id('^');
13818 lex_state = EXPR_BEG;
13819 return tOP_ASGN;
13820 }
13821 switch (lex_state) {
13822 case EXPR_FNAME: case EXPR_DOT:
13823 lex_state = EXPR_ARG; break;
13824 default:
13825 lex_state = EXPR_BEG; break;
13826 }
13827 pushback(c);
13828 return '^';
13829
13830 case ';':
13831 lex_state = EXPR_BEG;
13832 command_start = TRUE;
13833 return ';';
13834
13835 case ',':
13836 lex_state = EXPR_BEG;
13837 return ',';
13838
13839 case '~':
13840 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13841 if ((c = nextc()) != '@') {
13842 pushback(c);
13843 }
13844 lex_state = EXPR_ARG;
13845 }
13846 else {
13847 lex_state = EXPR_BEG;
13848 }
13849 return '~';
13850
13851 case '(':
13852 if (IS_BEG()) {
13853 c = tLPAREN;
13854 }
13855 else if (IS_SPCARG(-1)) {
13856 c = tLPAREN_ARG;
13857 }
13858 paren_nest++;
13859 COND_PUSH(0);
13860 CMDARG_PUSH(0);
13861 lex_state = EXPR_BEG;
13862 return c;
13863
13864 case '[':
13865 paren_nest++;
13866 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13867 lex_state = EXPR_ARG;
13868 if ((c = nextc()) == ']') {
13869 if ((c = nextc()) == '=') {
13870 return tASET;
13871 }
13872 pushback(c);
13873 return tAREF;
13874 }
13875 pushback(c);
13876 return '[';
13877 }
13878 else if (IS_BEG()) {
13879 c = tLBRACK;
13880 }
13881 else if (IS_ARG() && space_seen) {
13882 c = tLBRACK;
13883 }
13884 lex_state = EXPR_BEG;
13885 COND_PUSH(0);
13886 CMDARG_PUSH(0);
13887 return c;
13888
13889 case '{':
13890 if (lpar_beg && lpar_beg == paren_nest) {
13891 lex_state = EXPR_BEG;
13892 lpar_beg = 0;
13893 --paren_nest;
13894 COND_PUSH(0);
13895 CMDARG_PUSH(0);
13896 return tLAMBEG;
13897 }
13898 if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN)
13899 c = '{';
13900 else if (lex_state == EXPR_ENDARG)
13901 c = tLBRACE_ARG;
13902 else
13903 c = tLBRACE;
13904 COND_PUSH(0);
13905 CMDARG_PUSH(0);
13906 lex_state = EXPR_BEG;
13907 if (c != tLBRACE) command_start = TRUE;
13908 return c;
13909
13910 case '\\':
13911 c = nextc();
13912 if (c == '\n') {
13913 space_seen = 1;
13914 #ifdef RIPPER
13915 ripper_dispatch_scan_event(parser, tSP);
13916 #endif
13917 goto retry;
13918 }
13919 pushback(c);
13920 return '\\';
13921
13922 case '%':
13923 if (IS_BEG()) {
13924 int term;
13925 int paren;
13926
13927 c = nextc();
13928 quotation:
13929 if (c == -1 || !ISALNUM(c)) {
13930 term = c;
13931 c = 'Q';
13932 }
13933 else {
13934 term = nextc();
13935 if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) {
13936 yyerror("unknown type of %string");
13937 return 0;
13938 }
13939 }
13940 if (c == -1 || term == -1) {
13941 compile_error(PARSER_ARG "unterminated quoted string meets end of file");
13942 return 0;
13943 }
13944 paren = term;
13945 if (term == '(') term = ')';
13946 else if (term == '[') term = ']';
13947 else if (term == '{') term = '}';
13948 else if (term == '<') term = '>';
13949 else paren = 0;
13950
13951 switch (c) {
13952 case 'Q':
13953 lex_strterm = NEW_STRTERM(str_dquote, term, paren);
13954 return tSTRING_BEG;
13955
13956 case 'q':
13957 lex_strterm = NEW_STRTERM(str_squote, term, paren);
13958 return tSTRING_BEG;
13959
13960 case 'W':
13961 lex_strterm = NEW_STRTERM(str_dword, term, paren);
13962 do {c = nextc();} while (ISSPACE(c));
13963 pushback(c);
13964 return tWORDS_BEG;
13965
13966 case 'w':
13967 lex_strterm = NEW_STRTERM(str_sword, term, paren);
13968 do {c = nextc();} while (ISSPACE(c));
13969 pushback(c);
13970 return tQWORDS_BEG;
13971
13972 case 'x':
13973 lex_strterm = NEW_STRTERM(str_xquote, term, paren);
13974 return tXSTRING_BEG;
13975
13976 case 'r':
13977 lex_strterm = NEW_STRTERM(str_regexp, term, paren);
13978 return tREGEXP_BEG;
13979
13980 case 's':
13981 lex_strterm = NEW_STRTERM(str_ssym, term, paren);
13982 lex_state = EXPR_FNAME;
13983 return tSYMBEG;
13984
13985 default:
13986 yyerror("unknown type of %string");
13987 return 0;
13988 }
13989 }
13990 if ((c = nextc()) == '=') {
13991 set_yylval_id('%');
13992 lex_state = EXPR_BEG;
13993 return tOP_ASGN;
13994 }
13995 if (IS_SPCARG(c)) {
13996 goto quotation;
13997 }
13998 switch (lex_state) {
13999 case EXPR_FNAME: case EXPR_DOT:
14000 lex_state = EXPR_ARG; break;
14001 default:
14002 lex_state = EXPR_BEG; break;
14003 }
14004 pushback(c);
14005 warn_balanced("%%", "string literal");
14006 return '%';
14007
14008 case '$':
14009 lex_state = EXPR_END;
14010 newtok();
14011 c = nextc();
14012 switch (c) {
14013 case '_':
14014 c = nextc();
14015 if (parser_is_identchar()) {
14016 tokadd('$');
14017 tokadd('_');
14018 break;
14019 }
14020 pushback(c);
14021 c = '_';
14022
14023 case '~':
14024 case '*':
14025 case '$':
14026 case '?':
14027 case '!':
14028 case '@':
14029 case '/':
14030 case '\\':
14031 case ';':
14032 case ',':
14033 case '.':
14034 case '=':
14035 case ':':
14036 case '<':
14037 case '>':
14038 case '\"':
14039 tokadd('$');
14040 tokadd(c);
14041 tokfix();
14042 set_yylval_name(rb_intern(tok()));
14043 return tGVAR;
14044
14045 case '-':
14046 tokadd('$');
14047 tokadd(c);
14048 c = nextc();
14049 if (parser_is_identchar()) {
14050 if (tokadd_mbchar(c) == -1) return 0;
14051 }
14052 else {
14053 pushback(c);
14054 }
14055 gvar:
14056 tokfix();
14057 set_yylval_name(rb_intern(tok()));
14058 return tGVAR;
14059
14060 case '&':
14061 case '`':
14062 case '\'':
14063 case '+':
14064 if (last_state == EXPR_FNAME) {
14065 tokadd('$');
14066 tokadd(c);
14067 goto gvar;
14068 }
14069 set_yylval_node(NEW_BACK_REF(c));
14070 return tBACK_REF;
14071
14072 case '1': case '2': case '3':
14073 case '4': case '5': case '6':
14074 case '7': case '8': case '9':
14075 tokadd('$');
14076 do {
14077 tokadd(c);
14078 c = nextc();
14079 } while (c != -1 && ISDIGIT(c));
14080 pushback(c);
14081 if (last_state == EXPR_FNAME) goto gvar;
14082 tokfix();
14083 set_yylval_node(NEW_NTH_REF(atoi(tok()+1)));
14084 return tNTH_REF;
14085
14086 default:
14087 if (!parser_is_identchar()) {
14088 pushback(c);
14089 compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c);
14090 return 0;
14091 }
14092 case '0':
14093 tokadd('$');
14094 }
14095 break;
14096
14097 case '@':
14098 c = nextc();
14099 newtok();
14100 tokadd('@');
14101 if (c == '@') {
14102 tokadd('@');
14103 c = nextc();
14104 }
14105 if (c != -1 && (ISDIGIT(c) || !parser_is_identchar())) {
14106 pushback(c);
14107 if (tokidx == 1) {
14108 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c);
14109 }
14110 else {
14111 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c);
14112 }
14113 return 0;
14114 }
14115 break;
14116
14117 case '_':
14118 if (was_bol() && whole_match_p("__END__", 7, 0)) {
14119 ruby__end__seen = 1;
14120 parser->eofp = Qtrue;
14121 #ifndef RIPPER
14122 return -1;
14123 #else
14124 lex_goto_eol(parser);
14125 ripper_dispatch_scan_event(parser, k__END__);
14126 return 0;
14127 #endif
14128 }
14129 newtok();
14130 break;
14131
14132 default:
14133 if (!parser_is_identchar()) {
14134 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c);
14135 goto retry;
14136 }
14137
14138 newtok();
14139 break;
14140 }
14141
14142 mb = ENC_CODERANGE_7BIT;
14143 do {
14144 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
14145 if (tokadd_mbchar(c) == -1) return 0;
14146 c = nextc();
14147 } while (parser_is_identchar());
14148 switch (tok()[0]) {
14149 case '@': case '$':
14150 pushback(c);
14151 break;
14152 default:
14153 if ((c == '!' || c == '?') && !peek('=')) {
14154 tokadd(c);
14155 }
14156 else {
14157 pushback(c);
14158 }
14159 }
14160 tokfix();
14161
14162 {
14163 int result = 0;
14164
14165 last_state = lex_state;
14166 switch (tok()[0]) {
14167 case '$':
14168 lex_state = EXPR_END;
14169 result = tGVAR;
14170 break;
14171 case '@':
14172 lex_state = EXPR_END;
14173 if (tok()[1] == '@')
14174 result = tCVAR;
14175 else
14176 result = tIVAR;
14177 break;
14178
14179 default:
14180 if (toklast() == '!' || toklast() == '?') {
14181 result = tFID;
14182 }
14183 else {
14184 if (lex_state == EXPR_FNAME) {
14185 if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
14186 (!peek('=') || (peek_n('>', 1)))) {
14187 result = tIDENTIFIER;
14188 tokadd(c);
14189 tokfix();
14190 }
14191 else {
14192 pushback(c);
14193 }
14194 }
14195 if (result == 0 && ISUPPER(tok()[0])) {
14196 result = tCONSTANT;
14197 }
14198 else {
14199 result = tIDENTIFIER;
14200 }
14201 }
14202
14203 if (IS_LABEL_POSSIBLE()) {
14204 if (IS_LABEL_SUFFIX(0)) {
14205 lex_state = EXPR_BEG;
14206 nextc();
14207 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb)));
14208 return tLABEL;
14209 }
14210 }
14211 if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) {
14212 const struct kwtable *kw;
14213
14214
14215 kw = rb_reserved_word(tok(), toklen());
14216 if (kw) {
14217 enum lex_state_e state = lex_state;
14218 lex_state = kw->state;
14219 if (state == EXPR_FNAME) {
14220 set_yylval_name(rb_intern(kw->name));
14221 return kw->id[0];
14222 }
14223 if (kw->id[0] == keyword_do) {
14224 command_start = TRUE;
14225 if (lpar_beg && lpar_beg == paren_nest) {
14226 lpar_beg = 0;
14227 --paren_nest;
14228 return keyword_do_LAMBDA;
14229 }
14230 if (COND_P()) return keyword_do_cond;
14231 if (CMDARG_P() && state != EXPR_CMDARG)
14232 return keyword_do_block;
14233 if (state == EXPR_ENDARG || state == EXPR_BEG)
14234 return keyword_do_block;
14235 return keyword_do;
14236 }
14237 if (state == EXPR_BEG || state == EXPR_VALUE)
14238 return kw->id[0];
14239 else {
14240 if (kw->id[0] != kw->id[1])
14241 lex_state = EXPR_BEG;
14242 return kw->id[1];
14243 }
14244 }
14245 }
14246
14247 if (IS_BEG() ||
14248 lex_state == EXPR_DOT ||
14249 IS_ARG()) {
14250 if (cmd_state) {
14251 lex_state = EXPR_CMDARG;
14252 }
14253 else {
14254 lex_state = EXPR_ARG;
14255 }
14256 }
14257 else if (lex_state == EXPR_FNAME) {
14258 lex_state = EXPR_ENDFN;
14259 }
14260 else {
14261 lex_state = EXPR_END;
14262 }
14263 }
14264 {
14265 ID ident = TOK_INTERN(!ENC_SINGLE(mb));
14266
14267 set_yylval_name(ident);
14268 if (last_state != EXPR_DOT && last_state != EXPR_FNAME &&
14269 is_local_id(ident) && lvar_defined(ident)) {
14270 lex_state = EXPR_END;
14271 }
14272 }
14273 return result;
14274 }
14275 }
14276
14277 #if YYPURE
14278 static int
14279 yylex(void *lval, void *p)
14280 #else
14281 yylex(void *p)
14282 #endif
14283 {
14284 struct parser_params *parser = (struct parser_params*)p;
14285 int t;
14286
14287 #if YYPURE
14288 parser->parser_yylval = lval;
14289 parser->parser_yylval->val = Qundef;
14290 #endif
14291 t = parser_yylex(parser);
14292 #ifdef RIPPER
14293 if (!NIL_P(parser->delayed)) {
14294 ripper_dispatch_delayed_token(parser, t);
14295 return t;
14296 }
14297 if (t != 0)
14298 ripper_dispatch_scan_event(parser, t);
14299 #endif
14300
14301 return t;
14302 }
14303
14304 #ifndef RIPPER
14305 static NODE*
14306 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
14307 {
14308 NODE *n = (rb_node_newnode)(type, a0, a1, a2);
14309 nd_set_line(n, ruby_sourceline);
14310 return n;
14311 }
14312
14313 enum node_type
14314 nodetype(NODE *node)
14315 {
14316 return (enum node_type)nd_type(node);
14317 }
14318
14319 int
14320 nodeline(NODE *node)
14321 {
14322 return nd_line(node);
14323 }
14324
14325 static NODE*
14326 newline_node(NODE *node)
14327 {
14328 if (node) {
14329 node = remove_begin(node);
14330 node->flags |= NODE_FL_NEWLINE;
14331 }
14332 return node;
14333 }
14334
14335 static void
14336 fixpos(NODE *node, NODE *orig)
14337 {
14338 if (!node) return;
14339 if (!orig) return;
14340 if (orig == (NODE*)1) return;
14341 nd_set_line(node, nd_line(orig));
14342 }
14343
14344 static void
14345 parser_warning(struct parser_params *parser, NODE *node, const char *mesg)
14346 {
14347 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg);
14348 }
14349 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg))
14350
14351 static void
14352 parser_warn(struct parser_params *parser, NODE *node, const char *mesg)
14353 {
14354 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg);
14355 }
14356 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg))
14357
14358 static NODE*
14359 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail)
14360 {
14361 NODE *end, *h = head, *nd;
14362
14363 if (tail == 0) return head;
14364
14365 if (h == 0) return tail;
14366 switch (nd_type(h)) {
14367 case NODE_LIT:
14368 case NODE_STR:
14369 case NODE_SELF:
14370 case NODE_TRUE:
14371 case NODE_FALSE:
14372 case NODE_NIL:
14373 parser_warning(h, "unused literal ignored");
14374 return tail;
14375 default:
14376 h = end = NEW_BLOCK(head);
14377 end->nd_end = end;
14378 fixpos(end, head);
14379 head = end;
14380 break;
14381 case NODE_BLOCK:
14382 end = h->nd_end;
14383 break;
14384 }
14385
14386 nd = end->nd_head;
14387 switch (nd_type(nd)) {
14388 case NODE_RETURN:
14389 case NODE_BREAK:
14390 case NODE_NEXT:
14391 case NODE_REDO:
14392 case NODE_RETRY:
14393 if (RTEST(ruby_verbose)) {
14394 parser_warning(nd, "statement not reached");
14395 }
14396 break;
14397
14398 default:
14399 break;
14400 }
14401
14402 if (nd_type(tail) != NODE_BLOCK) {
14403 tail = NEW_BLOCK(tail);
14404 tail->nd_end = tail;
14405 }
14406 end->nd_next = tail;
14407 h->nd_end = tail->nd_end;
14408 return head;
14409 }
14410
14411
14412 static NODE*
14413 list_append_gen(struct parser_params *parser, NODE *list, NODE *item)
14414 {
14415 NODE *last;
14416
14417 if (list == 0) return NEW_LIST(item);
14418 if (list->nd_next) {
14419 last = list->nd_next->nd_end;
14420 }
14421 else {
14422 last = list;
14423 }
14424
14425 list->nd_alen += 1;
14426 last->nd_next = NEW_LIST(item);
14427 list->nd_next->nd_end = last->nd_next;
14428 return list;
14429 }
14430
14431
14432 static NODE*
14433 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
14434 {
14435 NODE *last;
14436
14437 if (head->nd_next) {
14438 last = head->nd_next->nd_end;
14439 }
14440 else {
14441 last = head;
14442 }
14443
14444 head->nd_alen += tail->nd_alen;
14445 last->nd_next = tail;
14446 if (tail->nd_next) {
14447 head->nd_next->nd_end = tail->nd_next->nd_end;
14448 }
14449 else {
14450 head->nd_next->nd_end = tail;
14451 }
14452
14453 return head;
14454 }
14455
14456 static int
14457 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail)
14458 {
14459 if (NIL_P(tail)) return 1;
14460 if (!rb_enc_compatible(head, tail)) {
14461 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)",
14462 rb_enc_name(rb_enc_get(head)),
14463 rb_enc_name(rb_enc_get(tail)));
14464 rb_str_resize(head, 0);
14465 rb_str_resize(tail, 0);
14466 return 0;
14467 }
14468 rb_str_buf_append(head, tail);
14469 return 1;
14470 }
14471
14472
14473 static NODE *
14474 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
14475 {
14476 enum node_type htype;
14477
14478 if (!head) return tail;
14479 if (!tail) return head;
14480
14481 htype = nd_type(head);
14482 if (htype == NODE_EVSTR) {
14483 NODE *node = NEW_DSTR(Qnil);
14484 head = list_append(node, head);
14485 }
14486 switch (nd_type(tail)) {
14487 case NODE_STR:
14488 if (htype == NODE_STR) {
14489 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) {
14490 error:
14491 rb_gc_force_recycle((VALUE)head);
14492 rb_gc_force_recycle((VALUE)tail);
14493 return 0;
14494 }
14495 rb_gc_force_recycle((VALUE)tail);
14496 }
14497 else {
14498 list_append(head, tail);
14499 }
14500 break;
14501
14502 case NODE_DSTR:
14503 if (htype == NODE_STR) {
14504 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit))
14505 goto error;
14506 tail->nd_lit = head->nd_lit;
14507 rb_gc_force_recycle((VALUE)head);
14508 head = tail;
14509 }
14510 else if (NIL_P(tail->nd_lit)) {
14511 head->nd_alen += tail->nd_alen - 1;
14512 head->nd_next->nd_end->nd_next = tail->nd_next;
14513 head->nd_next->nd_end = tail->nd_next->nd_end;
14514 rb_gc_force_recycle((VALUE)tail);
14515 }
14516 else {
14517 nd_set_type(tail, NODE_ARRAY);
14518 tail->nd_head = NEW_STR(tail->nd_lit);
14519 list_concat(head, tail);
14520 }
14521 break;
14522
14523 case NODE_EVSTR:
14524 if (htype == NODE_STR) {
14525 nd_set_type(head, NODE_DSTR);
14526 head->nd_alen = 1;
14527 }
14528 list_append(head, tail);
14529 break;
14530 }
14531 return head;
14532 }
14533
14534 static NODE *
14535 evstr2dstr_gen(struct parser_params *parser, NODE *node)
14536 {
14537 if (nd_type(node) == NODE_EVSTR) {
14538 node = list_append(NEW_DSTR(Qnil), node);
14539 }
14540 return node;
14541 }
14542
14543 static NODE *
14544 new_evstr_gen(struct parser_params *parser, NODE *node)
14545 {
14546 NODE *head = node;
14547
14548 if (node) {
14549 switch (nd_type(node)) {
14550 case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
14551 return node;
14552 }
14553 }
14554 return NEW_EVSTR(head);
14555 }
14556
14557 static NODE *
14558 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1)
14559 {
14560 value_expr(recv);
14561 value_expr(arg1);
14562 return NEW_CALL(recv, id, NEW_LIST(arg1));
14563 }
14564
14565 static NODE *
14566 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id)
14567 {
14568 value_expr(recv);
14569 return NEW_CALL(recv, id, 0);
14570 }
14571
14572 static NODE*
14573 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14574 {
14575 value_expr(node1);
14576 value_expr(node2);
14577 if (node1) {
14578 switch (nd_type(node1)) {
14579 case NODE_DREGX:
14580 case NODE_DREGX_ONCE:
14581 return NEW_MATCH2(node1, node2);
14582
14583 case NODE_LIT:
14584 if (TYPE(node1->nd_lit) == T_REGEXP) {
14585 return NEW_MATCH2(node1, node2);
14586 }
14587 }
14588 }
14589
14590 if (node2) {
14591 switch (nd_type(node2)) {
14592 case NODE_DREGX:
14593 case NODE_DREGX_ONCE:
14594 return NEW_MATCH3(node2, node1);
14595
14596 case NODE_LIT:
14597 if (TYPE(node2->nd_lit) == T_REGEXP) {
14598 return NEW_MATCH3(node2, node1);
14599 }
14600 }
14601 }
14602
14603 return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
14604 }
14605
14606 static NODE*
14607 gettable_gen(struct parser_params *parser, ID id)
14608 {
14609 if (id == keyword_self) {
14610 return NEW_SELF();
14611 }
14612 else if (id == keyword_nil) {
14613 return NEW_NIL();
14614 }
14615 else if (id == keyword_true) {
14616 return NEW_TRUE();
14617 }
14618 else if (id == keyword_false) {
14619 return NEW_FALSE();
14620 }
14621 else if (id == keyword__FILE__) {
14622 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile),
14623 rb_filesystem_encoding()));
14624 }
14625 else if (id == keyword__LINE__) {
14626 return NEW_LIT(INT2FIX(ruby_sourceline));
14627 }
14628 else if (id == keyword__ENCODING__) {
14629 return NEW_LIT(rb_enc_from_encoding(parser->enc));
14630 }
14631 else if (is_local_id(id)) {
14632 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id);
14633 if (local_id(id)) return NEW_LVAR(id);
14634
14635 return NEW_VCALL(id);
14636 }
14637 else if (is_global_id(id)) {
14638 return NEW_GVAR(id);
14639 }
14640 else if (is_instance_id(id)) {
14641 return NEW_IVAR(id);
14642 }
14643 else if (is_const_id(id)) {
14644 return NEW_CONST(id);
14645 }
14646 else if (is_class_id(id)) {
14647 return NEW_CVAR(id);
14648 }
14649 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
14650 return 0;
14651 }
14652 #else
14653 static int
14654 id_is_var_gen(struct parser_params *parser, ID id)
14655 {
14656 if (is_notop_id(id)) {
14657 switch (id & ID_SCOPE_MASK) {
14658 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
14659 return 1;
14660 case ID_LOCAL:
14661 if (dyna_in_block() && dvar_defined(id)) return 1;
14662 if (local_id(id)) return 1;
14663
14664 return 0;
14665 }
14666 }
14667 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
14668 return 0;
14669 }
14670 #endif
14671
14672 #ifdef RIPPER
14673 static VALUE
14674 assignable_gen(struct parser_params *parser, VALUE lhs)
14675 #else
14676 static NODE*
14677 assignable_gen(struct parser_params *parser, ID id, NODE *val)
14678 #endif
14679 {
14680 #ifdef RIPPER
14681 ID id = get_id(lhs);
14682 # define assignable_result(x) get_value(lhs)
14683 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs)
14684 #else
14685 # define assignable_result(x) (x)
14686 #endif
14687 if (!id) return assignable_result(0);
14688 if (id == keyword_self) {
14689 yyerror("Can't change the value of self");
14690 }
14691 else if (id == keyword_nil) {
14692 yyerror("Can't assign to nil");
14693 }
14694 else if (id == keyword_true) {
14695 yyerror("Can't assign to true");
14696 }
14697 else if (id == keyword_false) {
14698 yyerror("Can't assign to false");
14699 }
14700 else if (id == keyword__FILE__) {
14701 yyerror("Can't assign to __FILE__");
14702 }
14703 else if (id == keyword__LINE__) {
14704 yyerror("Can't assign to __LINE__");
14705 }
14706 else if (id == keyword__ENCODING__) {
14707 yyerror("Can't assign to __ENCODING__");
14708 }
14709 else if (is_local_id(id)) {
14710 if (dyna_in_block()) {
14711 if (dvar_curr(id)) {
14712 return assignable_result(NEW_DASGN_CURR(id, val));
14713 }
14714 else if (dvar_defined(id)) {
14715 return assignable_result(NEW_DASGN(id, val));
14716 }
14717 else if (local_id(id)) {
14718 return assignable_result(NEW_LASGN(id, val));
14719 }
14720 else {
14721 dyna_var(id);
14722 return assignable_result(NEW_DASGN_CURR(id, val));
14723 }
14724 }
14725 else {
14726 if (!local_id(id)) {
14727 local_var(id);
14728 }
14729 return assignable_result(NEW_LASGN(id, val));
14730 }
14731 }
14732 else if (is_global_id(id)) {
14733 return assignable_result(NEW_GASGN(id, val));
14734 }
14735 else if (is_instance_id(id)) {
14736 return assignable_result(NEW_IASGN(id, val));
14737 }
14738 else if (is_const_id(id)) {
14739 if (!in_def && !in_single)
14740 return assignable_result(NEW_CDECL(id, val, 0));
14741 yyerror("dynamic constant assignment");
14742 }
14743 else if (is_class_id(id)) {
14744 return assignable_result(NEW_CVASGN(id, val));
14745 }
14746 else {
14747 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id));
14748 }
14749 return assignable_result(0);
14750 #undef assignable_result
14751 #undef parser_yyerror
14752 }
14753
14754 #define LVAR_USED ((int)1 << (sizeof(int) * CHAR_BIT - 1))
14755
14756 static ID
14757 shadowing_lvar_gen(struct parser_params *parser, ID name)
14758 {
14759 if (idUScore == name) return name;
14760 if (dyna_in_block()) {
14761 if (dvar_curr(name)) {
14762 yyerror("duplicated argument name");
14763 }
14764 else if (dvar_defined_get(name) || local_id(name)) {
14765 rb_warningS("shadowing outer local variable - %s", rb_id2name(name));
14766 vtable_add(lvtbl->vars, name);
14767 if (lvtbl->used) {
14768 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED);
14769 }
14770 }
14771 }
14772 else {
14773 if (local_id(name)) {
14774 yyerror("duplicated argument name");
14775 }
14776 }
14777 return name;
14778 }
14779
14780 static void
14781 new_bv_gen(struct parser_params *parser, ID name)
14782 {
14783 if (!name) return;
14784 if (!is_local_id(name)) {
14785 compile_error(PARSER_ARG "invalid local variable - %s",
14786 rb_id2name(name));
14787 return;
14788 }
14789 shadowing_lvar(name);
14790 dyna_var(name);
14791 }
14792
14793 #ifndef RIPPER
14794 static NODE *
14795 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx)
14796 {
14797 if (recv && nd_type(recv) == NODE_SELF)
14798 recv = (NODE *)1;
14799 return NEW_ATTRASGN(recv, tASET, idx);
14800 }
14801
14802 static void
14803 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14804 {
14805 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
14806 compile_error(PARSER_ARG "both block arg and actual block given");
14807 }
14808 }
14809
14810 ID
14811 rb_id_attrset(ID id)
14812 {
14813 id &= ~ID_SCOPE_MASK;
14814 id |= ID_ATTRSET;
14815 return id;
14816 }
14817
14818 static NODE *
14819 attrset_gen(struct parser_params *parser, NODE *recv, ID id)
14820 {
14821 if (recv && nd_type(recv) == NODE_SELF)
14822 recv = (NODE *)1;
14823 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
14824 }
14825
14826 static void
14827 rb_backref_error_gen(struct parser_params *parser, NODE *node)
14828 {
14829 switch (nd_type(node)) {
14830 case NODE_NTH_REF:
14831 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth);
14832 break;
14833 case NODE_BACK_REF:
14834 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth);
14835 break;
14836 }
14837 }
14838
14839 static NODE *
14840 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14841 {
14842 if (!node2) return node1;
14843 switch (nd_type(node1)) {
14844 case NODE_BLOCK_PASS:
14845 if (node1->nd_head)
14846 node1->nd_head = arg_concat(node1->nd_head, node2);
14847 else
14848 node1->nd_head = NEW_LIST(node2);
14849 return node1;
14850 case NODE_ARGSPUSH:
14851 if (nd_type(node2) != NODE_ARRAY) break;
14852 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2);
14853 nd_set_type(node1, NODE_ARGSCAT);
14854 return node1;
14855 case NODE_ARGSCAT:
14856 if (nd_type(node2) != NODE_ARRAY ||
14857 nd_type(node1->nd_body) != NODE_ARRAY) break;
14858 node1->nd_body = list_concat(node1->nd_body, node2);
14859 return node1;
14860 }
14861 return NEW_ARGSCAT(node1, node2);
14862 }
14863
14864 static NODE *
14865 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14866 {
14867 if (!node1) return NEW_LIST(node2);
14868 switch (nd_type(node1)) {
14869 case NODE_ARRAY:
14870 return list_append(node1, node2);
14871 case NODE_BLOCK_PASS:
14872 node1->nd_head = arg_append(node1->nd_head, node2);
14873 return node1;
14874 case NODE_ARGSPUSH:
14875 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2);
14876 nd_set_type(node1, NODE_ARGSCAT);
14877 return node1;
14878 }
14879 return NEW_ARGSPUSH(node1, node2);
14880 }
14881
14882 static NODE *
14883 splat_array(NODE* node)
14884 {
14885 if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
14886 if (nd_type(node) == NODE_ARRAY) return node;
14887 return 0;
14888 }
14889
14890 static NODE *
14891 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs)
14892 {
14893 if (!lhs) return 0;
14894
14895 switch (nd_type(lhs)) {
14896 case NODE_GASGN:
14897 case NODE_IASGN:
14898 case NODE_IASGN2:
14899 case NODE_LASGN:
14900 case NODE_DASGN:
14901 case NODE_DASGN_CURR:
14902 case NODE_MASGN:
14903 case NODE_CDECL:
14904 case NODE_CVASGN:
14905 lhs->nd_value = rhs;
14906 break;
14907
14908 case NODE_ATTRASGN:
14909 case NODE_CALL:
14910 lhs->nd_args = arg_append(lhs->nd_args, rhs);
14911 break;
14912
14913 default:
14914
14915 break;
14916 }
14917
14918 return lhs;
14919 }
14920
14921 static int
14922 value_expr_gen(struct parser_params *parser, NODE *node)
14923 {
14924 int cond = 0;
14925
14926 if (!node) {
14927 rb_warning0("empty expression");
14928 }
14929 while (node) {
14930 switch (nd_type(node)) {
14931 case NODE_DEFN:
14932 case NODE_DEFS:
14933 parser_warning(node, "void value expression");
14934 return FALSE;
14935
14936 case NODE_RETURN:
14937 case NODE_BREAK:
14938 case NODE_NEXT:
14939 case NODE_REDO:
14940 case NODE_RETRY:
14941 if (!cond) yyerror("void value expression");
14942
14943 return FALSE;
14944
14945 case NODE_BLOCK:
14946 while (node->nd_next) {
14947 node = node->nd_next;
14948 }
14949 node = node->nd_head;
14950 break;
14951
14952 case NODE_BEGIN:
14953 node = node->nd_body;
14954 break;
14955
14956 case NODE_IF:
14957 if (!node->nd_body) {
14958 node = node->nd_else;
14959 break;
14960 }
14961 else if (!node->nd_else) {
14962 node = node->nd_body;
14963 break;
14964 }
14965 if (!value_expr(node->nd_body)) return FALSE;
14966 node = node->nd_else;
14967 break;
14968
14969 case NODE_AND:
14970 case NODE_OR:
14971 cond = 1;
14972 node = node->nd_2nd;
14973 break;
14974
14975 default:
14976 return TRUE;
14977 }
14978 }
14979
14980 return TRUE;
14981 }
14982
14983 static void
14984 void_expr_gen(struct parser_params *parser, NODE *node)
14985 {
14986 const char *useless = 0;
14987
14988 if (!RTEST(ruby_verbose)) return;
14989
14990 if (!node) return;
14991 switch (nd_type(node)) {
14992 case NODE_CALL:
14993 switch (node->nd_mid) {
14994 case '+':
14995 case '-':
14996 case '*':
14997 case '/':
14998 case '%':
14999 case tPOW:
15000 case tUPLUS:
15001 case tUMINUS:
15002 case '|':
15003 case '^':
15004 case '&':
15005 case tCMP:
15006 case '>':
15007 case tGEQ:
15008 case '<':
15009 case tLEQ:
15010 case tEQ:
15011 case tNEQ:
15012 useless = rb_id2name(node->nd_mid);
15013 break;
15014 }
15015 break;
15016
15017 case NODE_LVAR:
15018 case NODE_DVAR:
15019 case NODE_GVAR:
15020 case NODE_IVAR:
15021 case NODE_CVAR:
15022 case NODE_NTH_REF:
15023 case NODE_BACK_REF:
15024 useless = "a variable";
15025 break;
15026 case NODE_CONST:
15027 useless = "a constant";
15028 break;
15029 case NODE_LIT:
15030 case NODE_STR:
15031 case NODE_DSTR:
15032 case NODE_DREGX:
15033 case NODE_DREGX_ONCE:
15034 useless = "a literal";
15035 break;
15036 case NODE_COLON2:
15037 case NODE_COLON3:
15038 useless = "::";
15039 break;
15040 case NODE_DOT2:
15041 useless = "..";
15042 break;
15043 case NODE_DOT3:
15044 useless = "...";
15045 break;
15046 case NODE_SELF:
15047 useless = "self";
15048 break;
15049 case NODE_NIL:
15050 useless = "nil";
15051 break;
15052 case NODE_TRUE:
15053 useless = "true";
15054 break;
15055 case NODE_FALSE:
15056 useless = "false";
15057 break;
15058 case NODE_DEFINED:
15059 useless = "defined?";
15060 break;
15061 }
15062
15063 if (useless) {
15064 int line = ruby_sourceline;
15065
15066 ruby_sourceline = nd_line(node);
15067 rb_warnS("possibly useless use of %s in void context", useless);
15068 ruby_sourceline = line;
15069 }
15070 }
15071
15072 static void
15073 void_stmts_gen(struct parser_params *parser, NODE *node)
15074 {
15075 if (!RTEST(ruby_verbose)) return;
15076 if (!node) return;
15077 if (nd_type(node) != NODE_BLOCK) return;
15078
15079 for (;;) {
15080 if (!node->nd_next) return;
15081 void_expr0(node->nd_head);
15082 node = node->nd_next;
15083 }
15084 }
15085
15086 static NODE *
15087 remove_begin(NODE *node)
15088 {
15089 NODE **n = &node, *n1 = node;
15090 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
15091 *n = n1 = n1->nd_body;
15092 }
15093 return node;
15094 }
15095
15096 static void
15097 reduce_nodes_gen(struct parser_params *parser, NODE **body)
15098 {
15099 NODE *node = *body;
15100
15101 if (!node) {
15102 *body = NEW_NIL();
15103 return;
15104 }
15105 #define subnodes(n1, n2) \
15106 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
15107 (!node->n2) ? (body = &node->n1, 1) : \
15108 (reduce_nodes(&node->n1), body = &node->n2, 1))
15109
15110 while (node) {
15111 int newline = (int)(node->flags & NODE_FL_NEWLINE);
15112 switch (nd_type(node)) {
15113 end:
15114 case NODE_NIL:
15115 *body = 0;
15116 return;
15117 case NODE_RETURN:
15118 *body = node = node->nd_stts;
15119 if (newline && node) node->flags |= NODE_FL_NEWLINE;
15120 continue;
15121 case NODE_BEGIN:
15122 *body = node = node->nd_body;
15123 if (newline && node) node->flags |= NODE_FL_NEWLINE;
15124 continue;
15125 case NODE_BLOCK:
15126 body = &node->nd_end->nd_head;
15127 break;
15128 case NODE_IF:
15129 if (subnodes(nd_body, nd_else)) break;
15130 return;
15131 case NODE_CASE:
15132 body = &node->nd_body;
15133 break;
15134 case NODE_WHEN:
15135 if (!subnodes(nd_body, nd_next)) goto end;
15136 break;
15137 case NODE_ENSURE:
15138 if (!subnodes(nd_head, nd_resq)) goto end;
15139 break;
15140 case NODE_RESCUE:
15141 if (node->nd_else) {
15142 body = &node->nd_resq;
15143 break;
15144 }
15145 if (!subnodes(nd_head, nd_resq)) goto end;
15146 break;
15147 default:
15148 return;
15149 }
15150 node = *body;
15151 if (newline && node) node->flags |= NODE_FL_NEWLINE;
15152 }
15153
15154 #undef subnodes
15155 }
15156
15157 static int
15158 assign_in_cond(struct parser_params *parser, NODE *node)
15159 {
15160 switch (nd_type(node)) {
15161 case NODE_MASGN:
15162 yyerror("multiple assignment in conditional");
15163 return 1;
15164
15165 case NODE_LASGN:
15166 case NODE_DASGN:
15167 case NODE_DASGN_CURR:
15168 case NODE_GASGN:
15169 case NODE_IASGN:
15170 break;
15171
15172 default:
15173 return 0;
15174 }
15175
15176 if (!node->nd_value) return 1;
15177 switch (nd_type(node->nd_value)) {
15178 case NODE_LIT:
15179 case NODE_STR:
15180 case NODE_NIL:
15181 case NODE_TRUE:
15182 case NODE_FALSE:
15183
15184 parser_warn(node->nd_value, "found = in conditional, should be ==");
15185 return 1;
15186
15187 case NODE_DSTR:
15188 case NODE_XSTR:
15189 case NODE_DXSTR:
15190 case NODE_EVSTR:
15191 case NODE_DREGX:
15192 default:
15193 break;
15194 }
15195 return 1;
15196 }
15197
15198 static void
15199 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
15200 {
15201 if (!e_option_supplied(parser)) parser_warn(node, str);
15202 }
15203
15204 static void
15205 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
15206 {
15207 if (!e_option_supplied(parser)) parser_warning(node, str);
15208 }
15209
15210 static void
15211 fixup_nodes(NODE **rootnode)
15212 {
15213 NODE *node, *next, *head;
15214
15215 for (node = *rootnode; node; node = next) {
15216 enum node_type type;
15217 VALUE val;
15218
15219 next = node->nd_next;
15220 head = node->nd_head;
15221 rb_gc_force_recycle((VALUE)node);
15222 *rootnode = next;
15223 switch (type = nd_type(head)) {
15224 case NODE_DOT2:
15225 case NODE_DOT3:
15226 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit,
15227 type == NODE_DOT3);
15228 rb_gc_force_recycle((VALUE)head->nd_beg);
15229 rb_gc_force_recycle((VALUE)head->nd_end);
15230 nd_set_type(head, NODE_LIT);
15231 head->nd_lit = val;
15232 break;
15233 default:
15234 break;
15235 }
15236 }
15237 }
15238
15239 static NODE *cond0(struct parser_params*,NODE*);
15240
15241 static NODE*
15242 range_op(struct parser_params *parser, NODE *node)
15243 {
15244 enum node_type type;
15245
15246 if (node == 0) return 0;
15247
15248 type = nd_type(node);
15249 value_expr(node);
15250 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
15251 warn_unless_e_option(parser, node, "integer literal in conditional range");
15252 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."))));
15253 }
15254 return cond0(parser, node);
15255 }
15256
15257 static int
15258 literal_node(NODE *node)
15259 {
15260 if (!node) return 1;
15261 switch (nd_type(node)) {
15262 case NODE_LIT:
15263 case NODE_STR:
15264 case NODE_DSTR:
15265 case NODE_EVSTR:
15266 case NODE_DREGX:
15267 case NODE_DREGX_ONCE:
15268 case NODE_DSYM:
15269 return 2;
15270 case NODE_TRUE:
15271 case NODE_FALSE:
15272 case NODE_NIL:
15273 return 1;
15274 }
15275 return 0;
15276 }
15277
15278 static NODE*
15279 cond0(struct parser_params *parser, NODE *node)
15280 {
15281 if (node == 0) return 0;
15282 assign_in_cond(parser, node);
15283
15284 switch (nd_type(node)) {
15285 case NODE_DSTR:
15286 case NODE_EVSTR:
15287 case NODE_STR:
15288 rb_warn0("string literal in condition");
15289 break;
15290
15291 case NODE_DREGX:
15292 case NODE_DREGX_ONCE:
15293 warning_unless_e_option(parser, node, "regex literal in condition");
15294 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
15295
15296 case NODE_AND:
15297 case NODE_OR:
15298 node->nd_1st = cond0(parser, node->nd_1st);
15299 node->nd_2nd = cond0(parser, node->nd_2nd);
15300 break;
15301
15302 case NODE_DOT2:
15303 case NODE_DOT3:
15304 node->nd_beg = range_op(parser, node->nd_beg);
15305 node->nd_end = range_op(parser, node->nd_end);
15306 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
15307 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
15308 if (!e_option_supplied(parser)) {
15309 int b = literal_node(node->nd_beg);
15310 int e = literal_node(node->nd_end);
15311 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
15312 parser_warn(node, "range literal in condition");
15313 }
15314 }
15315 break;
15316
15317 case NODE_DSYM:
15318 parser_warning(node, "literal in condition");
15319 break;
15320
15321 case NODE_LIT:
15322 if (TYPE(node->nd_lit) == T_REGEXP) {
15323 warn_unless_e_option(parser, node, "regex literal in condition");
15324 nd_set_type(node, NODE_MATCH);
15325 }
15326 else {
15327 parser_warning(node, "literal in condition");
15328 }
15329 default:
15330 break;
15331 }
15332 return node;
15333 }
15334
15335 static NODE*
15336 cond_gen(struct parser_params *parser, NODE *node)
15337 {
15338 if (node == 0) return 0;
15339 return cond0(parser, node);
15340 }
15341
15342 static NODE*
15343 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right)
15344 {
15345 value_expr(left);
15346 if (left && (enum node_type)nd_type(left) == type) {
15347 NODE *node = left, *second;
15348 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
15349 node = second;
15350 }
15351 node->nd_2nd = NEW_NODE(type, second, right, 0);
15352 return left;
15353 }
15354 return NEW_NODE(type, left, right, 0);
15355 }
15356
15357 static void
15358 no_blockarg(struct parser_params *parser, NODE *node)
15359 {
15360 if (node && nd_type(node) == NODE_BLOCK_PASS) {
15361 compile_error(PARSER_ARG "block argument should not be given");
15362 }
15363 }
15364
15365 static NODE *
15366 ret_args_gen(struct parser_params *parser, NODE *node)
15367 {
15368 if (node) {
15369 no_blockarg(parser, node);
15370 if (nd_type(node) == NODE_ARRAY) {
15371 if (node->nd_next == 0) {
15372 node = node->nd_head;
15373 }
15374 else {
15375 nd_set_type(node, NODE_VALUES);
15376 }
15377 }
15378 }
15379 return node;
15380 }
15381
15382 static NODE *
15383 new_yield_gen(struct parser_params *parser, NODE *node)
15384 {
15385 long state = Qtrue;
15386
15387 if (node) {
15388 no_blockarg(parser, node);
15389 if (node && nd_type(node) == NODE_SPLAT) {
15390 state = Qtrue;
15391 }
15392 }
15393 else {
15394 state = Qfalse;
15395 }
15396 return NEW_YIELD(node, state);
15397 }
15398
15399 static NODE*
15400 negate_lit(NODE *node)
15401 {
15402 switch (TYPE(node->nd_lit)) {
15403 case T_FIXNUM:
15404 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
15405 break;
15406 case T_BIGNUM:
15407 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
15408 break;
15409 case T_FLOAT:
15410 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit);
15411 break;
15412 default:
15413 break;
15414 }
15415 return node;
15416 }
15417
15418 static NODE *
15419 arg_blk_pass(NODE *node1, NODE *node2)
15420 {
15421 if (node2) {
15422 node2->nd_head = node1;
15423 return node2;
15424 }
15425 return node1;
15426 }
15427
15428 static NODE*
15429 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b)
15430 {
15431 int saved_line = ruby_sourceline;
15432 NODE *node;
15433 NODE *i1, *i2 = 0;
15434
15435 node = NEW_ARGS(m ? m->nd_plen : 0, o);
15436 i1 = m ? m->nd_next : 0;
15437 node->nd_next = NEW_ARGS_AUX(r, b);
15438
15439 if (p) {
15440 i2 = p->nd_next;
15441 node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen);
15442 }
15443 else if (i1) {
15444 node->nd_next->nd_next = NEW_ARGS_AUX(0, 0);
15445 }
15446 if (i1 || i2) {
15447 node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0);
15448 }
15449 ruby_sourceline = saved_line;
15450 return node;
15451 }
15452 #endif
15453
15454 static void
15455 warn_unused_var(struct parser_params *parser, struct local_vars *local)
15456 {
15457 int i, cnt;
15458 ID *v, *u;
15459
15460 if (!local->used) return;
15461 v = local->vars->tbl;
15462 u = local->used->tbl;
15463 cnt = local->used->pos;
15464 if (cnt != local->vars->pos) {
15465 rb_bug("local->used->pos != local->vars->pos");
15466 }
15467 for (i = 0; i < cnt; ++i) {
15468 if (!v[i] || (u[i] & LVAR_USED)) continue;
15469 if (idUScore == v[i]) continue;
15470 rb_compile_warn(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i]));
15471 }
15472 }
15473
15474 static void
15475 local_push_gen(struct parser_params *parser, int inherit_dvars)
15476 {
15477 struct local_vars *local;
15478
15479 local = ALLOC(struct local_vars);
15480 local->prev = lvtbl;
15481 local->args = vtable_alloc(0);
15482 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
15483 local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0;
15484 local->cmdargs = cmdarg_stack;
15485 cmdarg_stack = 0;
15486 lvtbl = local;
15487 }
15488
15489 static void
15490 local_pop_gen(struct parser_params *parser)
15491 {
15492 struct local_vars *local = lvtbl->prev;
15493 if (lvtbl->used) {
15494 warn_unused_var(parser, lvtbl);
15495 vtable_free(lvtbl->used);
15496 }
15497 vtable_free(lvtbl->args);
15498 vtable_free(lvtbl->vars);
15499 cmdarg_stack = lvtbl->cmdargs;
15500 xfree(lvtbl);
15501 lvtbl = local;
15502 }
15503
15504 #ifndef RIPPER
15505 static ID*
15506 vtable_tblcpy(ID *buf, const struct vtable *src)
15507 {
15508 int i, cnt = vtable_size(src);
15509
15510 if (cnt > 0) {
15511 buf[0] = cnt;
15512 for (i = 0; i < cnt; i++) {
15513 buf[i] = src->tbl[i];
15514 }
15515 return buf;
15516 }
15517 return 0;
15518 }
15519
15520 static ID*
15521 local_tbl_gen(struct parser_params *parser)
15522 {
15523 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars);
15524 ID *buf;
15525
15526 if (cnt <= 0) return 0;
15527 buf = ALLOC_N(ID, cnt + 1);
15528 vtable_tblcpy(buf+1, lvtbl->args);
15529 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars);
15530 buf[0] = cnt;
15531 return buf;
15532 }
15533 #endif
15534
15535 static int
15536 arg_var_gen(struct parser_params *parser, ID id)
15537 {
15538 vtable_add(lvtbl->args, id);
15539 return vtable_size(lvtbl->args) - 1;
15540 }
15541
15542 static int
15543 local_var_gen(struct parser_params *parser, ID id)
15544 {
15545 vtable_add(lvtbl->vars, id);
15546 if (lvtbl->used) {
15547 vtable_add(lvtbl->used, (ID)ruby_sourceline);
15548 }
15549 return vtable_size(lvtbl->vars) - 1;
15550 }
15551
15552 static int
15553 local_id_gen(struct parser_params *parser, ID id)
15554 {
15555 struct vtable *vars, *args, *used;
15556
15557 vars = lvtbl->vars;
15558 args = lvtbl->args;
15559 used = lvtbl->used;
15560
15561 while (vars && POINTER_P(vars->prev)) {
15562 vars = vars->prev;
15563 args = args->prev;
15564 if (used) used = used->prev;
15565 }
15566
15567 if (vars && vars->prev == DVARS_INHERIT) {
15568 return rb_local_defined(id);
15569 }
15570 else if (vtable_included(args, id)) {
15571 return 1;
15572 }
15573 else {
15574 int i = vtable_included(vars, id);
15575 if (i && used) used->tbl[i-1] |= LVAR_USED;
15576 return i != 0;
15577 }
15578 }
15579
15580 static const struct vtable *
15581 dyna_push_gen(struct parser_params *parser)
15582 {
15583 lvtbl->args = vtable_alloc(lvtbl->args);
15584 lvtbl->vars = vtable_alloc(lvtbl->vars);
15585 if (lvtbl->used) {
15586 lvtbl->used = vtable_alloc(lvtbl->used);
15587 }
15588 return lvtbl->args;
15589 }
15590
15591 static void
15592 dyna_pop_1(struct parser_params *parser)
15593 {
15594 struct vtable *tmp;
15595
15596 if ((tmp = lvtbl->used) != 0) {
15597 warn_unused_var(parser, lvtbl);
15598 lvtbl->used = lvtbl->used->prev;
15599 vtable_free(tmp);
15600 }
15601 tmp = lvtbl->args;
15602 lvtbl->args = lvtbl->args->prev;
15603 vtable_free(tmp);
15604 tmp = lvtbl->vars;
15605 lvtbl->vars = lvtbl->vars->prev;
15606 vtable_free(tmp);
15607 }
15608
15609 static void
15610 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
15611 {
15612 while (lvtbl->args != lvargs) {
15613 dyna_pop_1(parser);
15614 if (!lvtbl->args) {
15615 struct local_vars *local = lvtbl->prev;
15616 xfree(lvtbl);
15617 lvtbl = local;
15618 }
15619 }
15620 dyna_pop_1(parser);
15621 }
15622
15623 static int
15624 dyna_in_block_gen(struct parser_params *parser)
15625 {
15626 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE;
15627 }
15628
15629 static int
15630 dvar_defined_gen(struct parser_params *parser, ID id, int get)
15631 {
15632 struct vtable *vars, *args, *used;
15633 int i;
15634
15635 args = lvtbl->args;
15636 vars = lvtbl->vars;
15637 used = lvtbl->used;
15638
15639 while (POINTER_P(vars)) {
15640 if (vtable_included(args, id)) {
15641 return 1;
15642 }
15643 if ((i = vtable_included(vars, id)) != 0) {
15644 if (used) used->tbl[i-1] |= LVAR_USED;
15645 return 1;
15646 }
15647 args = args->prev;
15648 vars = vars->prev;
15649 if (get) used = 0;
15650 if (used) used = used->prev;
15651 }
15652
15653 if (vars == DVARS_INHERIT) {
15654 return rb_dvar_defined(id);
15655 }
15656
15657 return 0;
15658 }
15659
15660 static int
15661 dvar_curr_gen(struct parser_params *parser, ID id)
15662 {
15663 return (vtable_included(lvtbl->args, id) ||
15664 vtable_included(lvtbl->vars, id));
15665 }
15666
15667 #ifndef RIPPER
15668 static void
15669 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options)
15670 {
15671 int c = RE_OPTION_ENCODING_IDX(options);
15672
15673 if (c) {
15674 int opt, idx;
15675 rb_char_to_option_kcode(c, &opt, &idx);
15676 if (idx != ENCODING_GET(str) &&
15677 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
15678 goto error;
15679 }
15680 ENCODING_SET(str, idx);
15681 }
15682 else if (RE_OPTION_ENCODING_NONE(options)) {
15683 if (!ENCODING_IS_ASCII8BIT(str) &&
15684 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
15685 c = 'n';
15686 goto error;
15687 }
15688 rb_enc_associate(str, rb_ascii8bit_encoding());
15689 }
15690 else if (parser->enc == rb_usascii_encoding()) {
15691 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
15692
15693 rb_enc_associate(str, rb_usascii_encoding());
15694 }
15695 else {
15696 rb_enc_associate(str, rb_ascii8bit_encoding());
15697 }
15698 }
15699 return;
15700
15701 error:
15702 compile_error(PARSER_ARG
15703 "regexp encoding option '%c' differs from source encoding '%s'",
15704 c, rb_enc_name(rb_enc_get(str)));
15705 }
15706
15707 static int
15708 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options)
15709 {
15710 VALUE err;
15711 reg_fragment_setenc(str, options);
15712 err = rb_reg_check_preprocess(str);
15713 if (err != Qnil) {
15714 err = rb_obj_as_string(err);
15715 compile_error(PARSER_ARG "%s", RSTRING_PTR(err));
15716 RB_GC_GUARD(err);
15717 return 0;
15718 }
15719 return 1;
15720 }
15721
15722 typedef struct {
15723 struct parser_params* parser;
15724 rb_encoding *enc;
15725 NODE *succ_block;
15726 NODE *fail_block;
15727 int num;
15728 } reg_named_capture_assign_t;
15729
15730 static int
15731 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
15732 int back_num, int *back_refs, OnigRegex regex, void *arg0)
15733 {
15734 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0;
15735 struct parser_params* parser = arg->parser;
15736 rb_encoding *enc = arg->enc;
15737 long len = name_end - name;
15738 const char *s = (const char *)name;
15739 ID var;
15740
15741 arg->num++;
15742
15743 if (arg->succ_block == 0) {
15744 arg->succ_block = NEW_BEGIN(0);
15745 arg->fail_block = NEW_BEGIN(0);
15746 }
15747
15748 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) ||
15749 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) ||
15750 !rb_enc_symname2_p(s, len, enc)) {
15751 return ST_CONTINUE;
15752 }
15753 var = rb_intern3(s, len, enc);
15754 if (dvar_defined(var) || local_id(var)) {
15755 rb_warningS("named capture conflicts a local variable - %s",
15756 rb_id2name(var));
15757 }
15758 arg->succ_block = block_append(arg->succ_block,
15759 newline_node(node_assign(assignable(var,0),
15760 NEW_CALL(
15761 gettable(rb_intern("$~")),
15762 idAREF,
15763 NEW_LIST(NEW_LIT(ID2SYM(var))))
15764 )));
15765 arg->fail_block = block_append(arg->fail_block,
15766 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil))));
15767 return ST_CONTINUE;
15768 }
15769
15770 static NODE *
15771 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match)
15772 {
15773 reg_named_capture_assign_t arg;
15774
15775 arg.parser = parser;
15776 arg.enc = rb_enc_get(regexp);
15777 arg.succ_block = 0;
15778 arg.fail_block = 0;
15779 arg.num = 0;
15780 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg);
15781
15782 if (arg.num == 0)
15783 return match;
15784
15785 return
15786 block_append(
15787 newline_node(match),
15788 NEW_IF(gettable(rb_intern("$~")),
15789 block_append(
15790 newline_node(arg.succ_block),
15791 newline_node(
15792 NEW_CALL(
15793 gettable(rb_intern("$~")),
15794 rb_intern("begin"),
15795 NEW_LIST(NEW_LIT(INT2FIX(0)))))),
15796 block_append(
15797 newline_node(arg.fail_block),
15798 newline_node(
15799 NEW_LIT(Qnil)))));
15800 }
15801
15802 static VALUE
15803 reg_compile_gen(struct parser_params* parser, VALUE str, int options)
15804 {
15805 VALUE re;
15806 VALUE err;
15807
15808 reg_fragment_setenc(str, options);
15809 err = rb_errinfo();
15810 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline);
15811 if (NIL_P(re)) {
15812 ID mesg = rb_intern("mesg");
15813 VALUE m = rb_attr_get(rb_errinfo(), mesg);
15814 rb_set_errinfo(err);
15815 if (!NIL_P(err)) {
15816 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m);
15817 }
15818 else {
15819 compile_error(PARSER_ARG "%s", RSTRING_PTR(m));
15820 }
15821 return Qnil;
15822 }
15823 return re;
15824 }
15825
15826 void
15827 rb_gc_mark_parser(void)
15828 {
15829 }
15830
15831 NODE*
15832 rb_parser_append_print(VALUE vparser, NODE *node)
15833 {
15834 NODE *prelude = 0;
15835 NODE *scope = node;
15836 struct parser_params *parser;
15837
15838 if (!node) return node;
15839
15840 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15841
15842 node = node->nd_body;
15843
15844 if (nd_type(node) == NODE_PRELUDE) {
15845 prelude = node;
15846 node = node->nd_body;
15847 }
15848
15849 node = block_append(node,
15850 NEW_FCALL(rb_intern("print"),
15851 NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
15852 if (prelude) {
15853 prelude->nd_body = node;
15854 scope->nd_body = prelude;
15855 }
15856 else {
15857 scope->nd_body = node;
15858 }
15859
15860 return scope;
15861 }
15862
15863 NODE *
15864 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split)
15865 {
15866 NODE *prelude = 0;
15867 NODE *scope = node;
15868 struct parser_params *parser;
15869
15870 if (!node) return node;
15871
15872 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15873
15874 node = node->nd_body;
15875
15876 if (nd_type(node) == NODE_PRELUDE) {
15877 prelude = node;
15878 node = node->nd_body;
15879 }
15880 if (split) {
15881 node = block_append(NEW_GASGN(rb_intern("$F"),
15882 NEW_CALL(NEW_GVAR(rb_intern("$_")),
15883 rb_intern("split"), 0)),
15884 node);
15885 }
15886 if (chop) {
15887 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
15888 rb_intern("chop!"), 0), node);
15889 }
15890
15891 node = NEW_OPT_N(node);
15892
15893 if (prelude) {
15894 prelude->nd_body = node;
15895 scope->nd_body = prelude;
15896 }
15897 else {
15898 scope->nd_body = node;
15899 }
15900
15901 return scope;
15902 }
15903
15904 static const struct {
15905 ID token;
15906 const char *name;
15907 } op_tbl[] = {
15908 {tDOT2, ".."},
15909 {tDOT3, "..."},
15910 {tPOW, "**"},
15911 {tUPLUS, "+@"},
15912 {tUMINUS, "-@"},
15913 {tCMP, "<=>"},
15914 {tGEQ, ">="},
15915 {tLEQ, "<="},
15916 {tEQ, "=="},
15917 {tEQQ, "==="},
15918 {tNEQ, "!="},
15919 {tMATCH, "=~"},
15920 {tNMATCH, "!~"},
15921 {tAREF, "[]"},
15922 {tASET, "[]="},
15923 {tLSHFT, "<<"},
15924 {tRSHFT, ">>"},
15925 {tCOLON2, "::"},
15926 };
15927
15928 #define op_tbl_count numberof(op_tbl)
15929
15930 #ifndef ENABLE_SELECTOR_NAMESPACE
15931 #define ENABLE_SELECTOR_NAMESPACE 0
15932 #endif
15933
15934 static struct symbols {
15935 ID last_id;
15936 st_table *sym_id;
15937 st_table *id_str;
15938 #if ENABLE_SELECTOR_NAMESPACE
15939 st_table *ivar2_id;
15940 st_table *id_ivar2;
15941 #endif
15942 VALUE op_sym[tLAST_TOKEN];
15943 } global_symbols = {tLAST_ID};
15944
15945 static const struct st_hash_type symhash = {
15946 rb_str_hash_cmp,
15947 rb_str_hash,
15948 };
15949
15950 #if ENABLE_SELECTOR_NAMESPACE
15951 struct ivar2_key {
15952 ID id;
15953 VALUE klass;
15954 };
15955
15956 static int
15957 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2)
15958 {
15959 if (key1->id == key2->id && key1->klass == key2->klass) {
15960 return 0;
15961 }
15962 return 1;
15963 }
15964
15965 static int
15966 ivar2_hash(struct ivar2_key *key)
15967 {
15968 return (key->id << 8) ^ (key->klass >> 2);
15969 }
15970
15971 static const struct st_hash_type ivar2_hash_type = {
15972 ivar2_cmp,
15973 ivar2_hash,
15974 };
15975 #endif
15976
15977 void
15978 Init_sym(void)
15979 {
15980 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000);
15981 global_symbols.id_str = st_init_numtable_with_size(1000);
15982 #if ENABLE_SELECTOR_NAMESPACE
15983 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000);
15984 global_symbols.id_ivar2 = st_init_numtable_with_size(1000);
15985 #endif
15986
15987 Init_id();
15988 }
15989
15990 void
15991 rb_gc_mark_symbols(void)
15992 {
15993 rb_mark_tbl(global_symbols.id_str);
15994 rb_gc_mark_locations(global_symbols.op_sym,
15995 global_symbols.op_sym + tLAST_TOKEN);
15996 }
15997 #endif
15998
15999 static ID
16000 internal_id_gen(struct parser_params *parser)
16001 {
16002 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars);
16003 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1;
16004 return ID_INTERNAL | (id << ID_SCOPE_SHIFT);
16005 }
16006
16007 #ifndef RIPPER
16008 static int
16009 is_special_global_name(const char *m, const char *e, rb_encoding *enc)
16010 {
16011 int mb = 0;
16012
16013 if (m >= e) return 0;
16014 if (is_global_name_punct(*m)) {
16015 ++m;
16016 }
16017 else if (*m == '-') {
16018 ++m;
16019 if (m < e && is_identchar(m, e, enc)) {
16020 if (!ISASCII(*m)) mb = 1;
16021 m += rb_enc_mbclen(m, e, enc);
16022 }
16023 }
16024 else {
16025 if (!rb_enc_isdigit(*m, enc)) return 0;
16026 do {
16027 if (!ISASCII(*m)) mb = 1;
16028 ++m;
16029 } while (m < e && rb_enc_isdigit(*m, enc));
16030 }
16031 return m == e ? mb + 1 : 0;
16032 }
16033
16034 int
16035 rb_symname_p(const char *name)
16036 {
16037 return rb_enc_symname_p(name, rb_ascii8bit_encoding());
16038 }
16039
16040 int
16041 rb_enc_symname_p(const char *name, rb_encoding *enc)
16042 {
16043 return rb_enc_symname2_p(name, strlen(name), enc);
16044 }
16045
16046 int
16047 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
16048 {
16049 const char *m = name;
16050 const char *e = m + len;
16051 int localid = FALSE;
16052
16053 if (!m || len <= 0) return FALSE;
16054 switch (*m) {
16055 case '\0':
16056 return FALSE;
16057
16058 case '$':
16059 if (is_special_global_name(++m, e, enc)) return TRUE;
16060 goto id;
16061
16062 case '@':
16063 if (*++m == '@') ++m;
16064 goto id;
16065
16066 case '<':
16067 switch (*++m) {
16068 case '<': ++m; break;
16069 case '=': if (*++m == '>') ++m; break;
16070 default: break;
16071 }
16072 break;
16073
16074 case '>':
16075 switch (*++m) {
16076 case '>': case '=': ++m; break;
16077 }
16078 break;
16079
16080 case '=':
16081 switch (*++m) {
16082 case '~': ++m; break;
16083 case '=': if (*++m == '=') ++m; break;
16084 default: return FALSE;
16085 }
16086 break;
16087
16088 case '*':
16089 if (*++m == '*') ++m;
16090 break;
16091
16092 case '+': case '-':
16093 if (*++m == '@') ++m;
16094 break;
16095
16096 case '|': case '^': case '&': case '/': case '%': case '~': case '`':
16097 ++m;
16098 break;
16099
16100 case '[':
16101 if (*++m != ']') return FALSE;
16102 if (*++m == '=') ++m;
16103 break;
16104
16105 case '!':
16106 if (len == 1) return TRUE;
16107 switch (*++m) {
16108 case '=': case '~': ++m; break;
16109 default: return FALSE;
16110 }
16111 break;
16112
16113 default:
16114 localid = !rb_enc_isupper(*m, enc);
16115 id:
16116 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m)))
16117 return FALSE;
16118 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc);
16119 if (localid) {
16120 switch (*m) {
16121 case '!': case '?': case '=': ++m;
16122 }
16123 }
16124 break;
16125 }
16126 return m == e;
16127 }
16128
16129 static ID
16130 register_symid(ID id, const char *name, long len, rb_encoding *enc)
16131 {
16132 VALUE str = rb_enc_str_new(name, len, enc);
16133 OBJ_FREEZE(str);
16134 st_add_direct(global_symbols.sym_id, (st_data_t)str, id);
16135 st_add_direct(global_symbols.id_str, id, (st_data_t)str);
16136 return id;
16137 }
16138
16139 ID
16140 rb_intern3(const char *name, long len, rb_encoding *enc)
16141 {
16142 const char *m = name;
16143 const char *e = m + len;
16144 unsigned char c;
16145 VALUE str;
16146 ID id;
16147 long last;
16148 int mb;
16149 st_data_t data;
16150 struct RString fake_str;
16151 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED;
16152 fake_str.basic.klass = rb_cString;
16153 fake_str.as.heap.len = len;
16154 fake_str.as.heap.ptr = (char *)name;
16155 fake_str.as.heap.aux.capa = len;
16156 str = (VALUE)&fake_str;
16157 rb_enc_associate(str, enc);
16158 OBJ_FREEZE(str);
16159
16160 if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) {
16161 rb_raise(rb_eEncodingError, "invalid encoding symbol");
16162 }
16163
16164 if (st_lookup(global_symbols.sym_id, str, &data))
16165 return (ID)data;
16166
16167 if (rb_cString && !rb_enc_asciicompat(enc)) {
16168 id = ID_JUNK;
16169 goto new_id;
16170 }
16171 last = len-1;
16172 id = 0;
16173 switch (*m) {
16174 case '$':
16175 id |= ID_GLOBAL;
16176 if ((mb = is_special_global_name(++m, e, enc)) != 0) {
16177 if (!--mb) enc = rb_ascii8bit_encoding();
16178 goto new_id;
16179 }
16180 break;
16181 case '@':
16182 if (m[1] == '@') {
16183 m++;
16184 id |= ID_CLASS;
16185 }
16186 else {
16187 id |= ID_INSTANCE;
16188 }
16189 m++;
16190 break;
16191 default:
16192 c = m[0];
16193 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) {
16194
16195 int i;
16196
16197 if (len == 1) {
16198 id = c;
16199 goto id_register;
16200 }
16201 for (i = 0; i < op_tbl_count; i++) {
16202 if (*op_tbl[i].name == *m &&
16203 strcmp(op_tbl[i].name, m) == 0) {
16204 id = op_tbl[i].token;
16205 goto id_register;
16206 }
16207 }
16208 }
16209
16210 if (m[last] == '=') {
16211
16212 id = rb_intern3(name, last, enc);
16213 if (id > tLAST_TOKEN && !is_attrset_id(id)) {
16214 enc = rb_enc_get(rb_id2str(id));
16215 id = rb_id_attrset(id);
16216 goto id_register;
16217 }
16218 id = ID_ATTRSET;
16219 }
16220 else if (rb_enc_isupper(m[0], enc)) {
16221 id = ID_CONST;
16222 }
16223 else {
16224 id = ID_LOCAL;
16225 }
16226 break;
16227 }
16228 mb = 0;
16229 if (!rb_enc_isdigit(*m, enc)) {
16230 while (m <= name + last && is_identchar(m, e, enc)) {
16231 if (ISASCII(*m)) {
16232 m++;
16233 }
16234 else {
16235 mb = 1;
16236 m += rb_enc_mbclen(m, e, enc);
16237 }
16238 }
16239 }
16240 if (m - name < len) id = ID_JUNK;
16241 if (enc != rb_usascii_encoding()) {
16242
16243
16244
16245
16246 if (!mb) {
16247 for (; m <= name + len; ++m) {
16248 if (!ISASCII(*m)) goto mbstr;
16249 }
16250 enc = rb_usascii_encoding();
16251 }
16252 mbstr:;
16253 }
16254 new_id:
16255 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) {
16256 if (len > 20) {
16257 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)",
16258 name);
16259 }
16260 else {
16261 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)",
16262 (int)len, name);
16263 }
16264 }
16265 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT;
16266 id_register:
16267 return register_symid(id, name, len, enc);
16268 }
16269
16270 ID
16271 rb_intern2(const char *name, long len)
16272 {
16273 return rb_intern3(name, len, rb_usascii_encoding());
16274 }
16275
16276 #undef rb_intern
16277 ID
16278 rb_intern(const char *name)
16279 {
16280 return rb_intern2(name, strlen(name));
16281 }
16282
16283 ID
16284 rb_intern_str(VALUE str)
16285 {
16286 rb_encoding *enc;
16287 ID id;
16288
16289 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) {
16290 enc = rb_usascii_encoding();
16291 }
16292 else {
16293 enc = rb_enc_get(str);
16294 }
16295 id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc);
16296 RB_GC_GUARD(str);
16297 return id;
16298 }
16299
16300 VALUE
16301 rb_id2str(ID id)
16302 {
16303 st_data_t data;
16304
16305 if (id < tLAST_TOKEN) {
16306 int i = 0;
16307
16308 if (id < INT_MAX && rb_ispunct((int)id)) {
16309 VALUE str = global_symbols.op_sym[i = (int)id];
16310 if (!str) {
16311 char name[2];
16312 name[0] = (char)id;
16313 name[1] = 0;
16314 str = rb_usascii_str_new(name, 1);
16315 OBJ_FREEZE(str);
16316 global_symbols.op_sym[i] = str;
16317 }
16318 return str;
16319 }
16320 for (i = 0; i < op_tbl_count; i++) {
16321 if (op_tbl[i].token == id) {
16322 VALUE str = global_symbols.op_sym[i];
16323 if (!str) {
16324 str = rb_usascii_str_new2(op_tbl[i].name);
16325 OBJ_FREEZE(str);
16326 global_symbols.op_sym[i] = str;
16327 }
16328 return str;
16329 }
16330 }
16331 }
16332
16333 if (st_lookup(global_symbols.id_str, id, &data)) {
16334 VALUE str = (VALUE)data;
16335 if (RBASIC(str)->klass == 0)
16336 RBASIC(str)->klass = rb_cString;
16337 return str;
16338 }
16339
16340 if (is_attrset_id(id)) {
16341 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
16342 VALUE str;
16343
16344 while (!(str = rb_id2str(id2))) {
16345 if (!is_local_id(id2)) return 0;
16346 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;
16347 }
16348 str = rb_str_dup(str);
16349 rb_str_cat(str, "=", 1);
16350 rb_intern_str(str);
16351 if (st_lookup(global_symbols.id_str, id, &data)) {
16352 VALUE str = (VALUE)data;
16353 if (RBASIC(str)->klass == 0)
16354 RBASIC(str)->klass = rb_cString;
16355 return str;
16356 }
16357 }
16358 return 0;
16359 }
16360
16361 const char *
16362 rb_id2name(ID id)
16363 {
16364 VALUE str = rb_id2str(id);
16365
16366 if (!str) return 0;
16367 return RSTRING_PTR(str);
16368 }
16369
16370 static int
16371 symbols_i(VALUE sym, ID value, VALUE ary)
16372 {
16373 rb_ary_push(ary, ID2SYM(value));
16374 return ST_CONTINUE;
16375 }
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393 VALUE
16394 rb_sym_all_symbols(void)
16395 {
16396 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries);
16397
16398 st_foreach(global_symbols.sym_id, symbols_i, ary);
16399 return ary;
16400 }
16401
16402 int
16403 rb_is_const_id(ID id)
16404 {
16405 return is_const_id(id);
16406 }
16407
16408 int
16409 rb_is_class_id(ID id)
16410 {
16411 return is_class_id(id);
16412 }
16413
16414 int
16415 rb_is_instance_id(ID id)
16416 {
16417 return is_instance_id(id);
16418 }
16419
16420 int
16421 rb_is_local_id(ID id)
16422 {
16423 return is_local_id(id);
16424 }
16425
16426 int
16427 rb_is_junk_id(ID id)
16428 {
16429 return is_junk_id(id);
16430 }
16431
16432 #endif
16433
16434 static void
16435 parser_initialize(struct parser_params *parser)
16436 {
16437 parser->eofp = Qfalse;
16438
16439 parser->parser_lex_strterm = 0;
16440 parser->parser_cond_stack = 0;
16441 parser->parser_cmdarg_stack = 0;
16442 parser->parser_class_nest = 0;
16443 parser->parser_paren_nest = 0;
16444 parser->parser_lpar_beg = 0;
16445 parser->parser_in_single = 0;
16446 parser->parser_in_def = 0;
16447 parser->parser_in_defined = 0;
16448 parser->parser_compile_for_eval = 0;
16449 parser->parser_cur_mid = 0;
16450 parser->parser_tokenbuf = NULL;
16451 parser->parser_tokidx = 0;
16452 parser->parser_toksiz = 0;
16453 parser->parser_heredoc_end = 0;
16454 parser->parser_command_start = TRUE;
16455 parser->parser_deferred_nodes = 0;
16456 parser->parser_lex_pbeg = 0;
16457 parser->parser_lex_p = 0;
16458 parser->parser_lex_pend = 0;
16459 parser->parser_lvtbl = 0;
16460 parser->parser_ruby__end__seen = 0;
16461 parser->parser_ruby_sourcefile = 0;
16462 #ifndef RIPPER
16463 parser->is_ripper = 0;
16464 parser->parser_eval_tree_begin = 0;
16465 parser->parser_eval_tree = 0;
16466 #else
16467 parser->is_ripper = 1;
16468 parser->parser_ruby_sourcefile_string = Qnil;
16469 parser->delayed = Qnil;
16470
16471 parser->result = Qnil;
16472 parser->parsing_thread = Qnil;
16473 parser->toplevel_p = TRUE;
16474 #endif
16475 #ifdef YYMALLOC
16476 parser->heap = NULL;
16477 #endif
16478 parser->enc = rb_usascii_encoding();
16479 }
16480
16481 #ifdef RIPPER
16482 #define parser_mark ripper_parser_mark
16483 #define parser_free ripper_parser_free
16484 #endif
16485
16486 static void
16487 parser_mark(void *ptr)
16488 {
16489 struct parser_params *p = (struct parser_params*)ptr;
16490
16491 rb_gc_mark((VALUE)p->parser_lex_strterm);
16492 rb_gc_mark((VALUE)p->parser_deferred_nodes);
16493 rb_gc_mark(p->parser_lex_input);
16494 rb_gc_mark(p->parser_lex_lastline);
16495 rb_gc_mark(p->parser_lex_nextline);
16496 #ifndef RIPPER
16497 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ;
16498 rb_gc_mark((VALUE)p->parser_eval_tree) ;
16499 rb_gc_mark(p->debug_lines);
16500 #else
16501 rb_gc_mark(p->parser_ruby_sourcefile_string);
16502 rb_gc_mark(p->delayed);
16503 rb_gc_mark(p->value);
16504 rb_gc_mark(p->result);
16505 rb_gc_mark(p->parsing_thread);
16506 #endif
16507 #ifdef YYMALLOC
16508 rb_gc_mark((VALUE)p->heap);
16509 #endif
16510 }
16511
16512 static void
16513 parser_free(void *ptr)
16514 {
16515 struct parser_params *p = (struct parser_params*)ptr;
16516 struct local_vars *local, *prev;
16517
16518 if (p->parser_tokenbuf) {
16519 xfree(p->parser_tokenbuf);
16520 }
16521 for (local = p->parser_lvtbl; local; local = prev) {
16522 if (local->vars) xfree(local->vars);
16523 prev = local->prev;
16524 xfree(local);
16525 }
16526 #ifndef RIPPER
16527 xfree(p->parser_ruby_sourcefile);
16528 #endif
16529 xfree(p);
16530 }
16531
16532 static size_t
16533 parser_memsize(const void *ptr)
16534 {
16535 struct parser_params *p = (struct parser_params*)ptr;
16536 struct local_vars *local;
16537 size_t size = sizeof(*p);
16538
16539 if (!ptr) return 0;
16540 size += p->parser_toksiz;
16541 for (local = p->parser_lvtbl; local; local = local->prev) {
16542 size += sizeof(*local);
16543 if (local->vars) size += local->vars->capa * sizeof(ID);
16544 }
16545 #ifndef RIPPER
16546 if (p->parser_ruby_sourcefile) {
16547 size += strlen(p->parser_ruby_sourcefile) + 1;
16548 }
16549 #endif
16550 return size;
16551 }
16552
16553 static
16554 #ifndef RIPPER
16555 const
16556 #endif
16557 rb_data_type_t parser_data_type = {
16558 "parser",
16559 {
16560 parser_mark,
16561 parser_free,
16562 parser_memsize,
16563 },
16564 };
16565
16566 #ifndef RIPPER
16567 #undef rb_reserved_word
16568
16569 const struct kwtable *
16570 rb_reserved_word(const char *str, unsigned int len)
16571 {
16572 return reserved_word(str, len);
16573 }
16574
16575 static struct parser_params *
16576 parser_new(void)
16577 {
16578 struct parser_params *p;
16579
16580 p = ALLOC_N(struct parser_params, 1);
16581 MEMZERO(p, struct parser_params, 1);
16582 parser_initialize(p);
16583 return p;
16584 }
16585
16586 VALUE
16587 rb_parser_new(void)
16588 {
16589 struct parser_params *p = parser_new();
16590
16591 return TypedData_Wrap_Struct(0, &parser_data_type, p);
16592 }
16593
16594
16595
16596
16597
16598
16599
16600 VALUE
16601 rb_parser_end_seen_p(VALUE vparser)
16602 {
16603 struct parser_params *parser;
16604
16605 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
16606 return ruby__end__seen ? Qtrue : Qfalse;
16607 }
16608
16609
16610
16611
16612
16613
16614
16615 VALUE
16616 rb_parser_encoding(VALUE vparser)
16617 {
16618 struct parser_params *parser;
16619
16620 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
16621 return rb_enc_from_encoding(parser->enc);
16622 }
16623
16624
16625
16626
16627
16628
16629
16630 VALUE
16631 rb_parser_get_yydebug(VALUE self)
16632 {
16633 struct parser_params *parser;
16634
16635 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16636 return yydebug ? Qtrue : Qfalse;
16637 }
16638
16639
16640
16641
16642
16643
16644
16645 VALUE
16646 rb_parser_set_yydebug(VALUE self, VALUE flag)
16647 {
16648 struct parser_params *parser;
16649
16650 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16651 yydebug = RTEST(flag);
16652 return flag;
16653 }
16654
16655 #ifdef YYMALLOC
16656 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
16657 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)
16658 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \
16659 (n)->u3.cnt = (c), (p))
16660
16661 void *
16662 rb_parser_malloc(struct parser_params *parser, size_t size)
16663 {
16664 size_t cnt = HEAPCNT(1, size);
16665 NODE *n = NEWHEAP();
16666 void *ptr = xmalloc(size);
16667
16668 return ADD2HEAP(n, cnt, ptr);
16669 }
16670
16671 void *
16672 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size)
16673 {
16674 size_t cnt = HEAPCNT(nelem, size);
16675 NODE *n = NEWHEAP();
16676 void *ptr = xcalloc(nelem, size);
16677
16678 return ADD2HEAP(n, cnt, ptr);
16679 }
16680
16681 void *
16682 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size)
16683 {
16684 NODE *n;
16685 size_t cnt = HEAPCNT(1, size);
16686
16687 if (ptr && (n = parser->heap) != NULL) {
16688 do {
16689 if (n->u1.node == ptr) {
16690 n->u1.node = ptr = xrealloc(ptr, size);
16691 if (n->u3.cnt) n->u3.cnt = cnt;
16692 return ptr;
16693 }
16694 } while ((n = n->u2.node) != NULL);
16695 }
16696 n = NEWHEAP();
16697 ptr = xrealloc(ptr, size);
16698 return ADD2HEAP(n, cnt, ptr);
16699 }
16700
16701 void
16702 rb_parser_free(struct parser_params *parser, void *ptr)
16703 {
16704 NODE **prev = &parser->heap, *n;
16705
16706 while ((n = *prev) != NULL) {
16707 if (n->u1.node == ptr) {
16708 *prev = n->u2.node;
16709 rb_gc_force_recycle((VALUE)n);
16710 break;
16711 }
16712 prev = &n->u2.node;
16713 }
16714 xfree(ptr);
16715 }
16716 #endif
16717 #endif
16718
16719 #ifdef RIPPER
16720 #ifdef RIPPER_DEBUG
16721 extern int rb_is_pointer_to_heap(VALUE);
16722
16723
16724 static VALUE
16725 ripper_validate_object(VALUE self, VALUE x)
16726 {
16727 if (x == Qfalse) return x;
16728 if (x == Qtrue) return x;
16729 if (x == Qnil) return x;
16730 if (x == Qundef)
16731 rb_raise(rb_eArgError, "Qundef given");
16732 if (FIXNUM_P(x)) return x;
16733 if (SYMBOL_P(x)) return x;
16734 if (!rb_is_pointer_to_heap(x))
16735 rb_raise(rb_eArgError, "invalid pointer: %p", x);
16736 switch (TYPE(x)) {
16737 case T_STRING:
16738 case T_OBJECT:
16739 case T_ARRAY:
16740 case T_BIGNUM:
16741 case T_FLOAT:
16742 return x;
16743 case T_NODE:
16744 if (nd_type(x) != NODE_LASGN) {
16745 rb_raise(rb_eArgError, "NODE given: %p", x);
16746 }
16747 return ((NODE *)x)->nd_rval;
16748 default:
16749 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
16750 x, rb_obj_classname(x));
16751 }
16752 return x;
16753 }
16754 #endif
16755
16756 #define validate(x) ((x) = get_value(x))
16757
16758 static VALUE
16759 ripper_dispatch0(struct parser_params *parser, ID mid)
16760 {
16761 return rb_funcall(parser->value, mid, 0);
16762 }
16763
16764 static VALUE
16765 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
16766 {
16767 validate(a);
16768 return rb_funcall(parser->value, mid, 1, a);
16769 }
16770
16771 static VALUE
16772 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
16773 {
16774 validate(a);
16775 validate(b);
16776 return rb_funcall(parser->value, mid, 2, a, b);
16777 }
16778
16779 static VALUE
16780 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
16781 {
16782 validate(a);
16783 validate(b);
16784 validate(c);
16785 return rb_funcall(parser->value, mid, 3, a, b, c);
16786 }
16787
16788 static VALUE
16789 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
16790 {
16791 validate(a);
16792 validate(b);
16793 validate(c);
16794 validate(d);
16795 return rb_funcall(parser->value, mid, 4, a, b, c, d);
16796 }
16797
16798 static VALUE
16799 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
16800 {
16801 validate(a);
16802 validate(b);
16803 validate(c);
16804 validate(d);
16805 validate(e);
16806 return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
16807 }
16808
16809 static const struct kw_assoc {
16810 ID id;
16811 const char *name;
16812 } keyword_to_name[] = {
16813 {keyword_class, "class"},
16814 {keyword_module, "module"},
16815 {keyword_def, "def"},
16816 {keyword_undef, "undef"},
16817 {keyword_begin, "begin"},
16818 {keyword_rescue, "rescue"},
16819 {keyword_ensure, "ensure"},
16820 {keyword_end, "end"},
16821 {keyword_if, "if"},
16822 {keyword_unless, "unless"},
16823 {keyword_then, "then"},
16824 {keyword_elsif, "elsif"},
16825 {keyword_else, "else"},
16826 {keyword_case, "case"},
16827 {keyword_when, "when"},
16828 {keyword_while, "while"},
16829 {keyword_until, "until"},
16830 {keyword_for, "for"},
16831 {keyword_break, "break"},
16832 {keyword_next, "next"},
16833 {keyword_redo, "redo"},
16834 {keyword_retry, "retry"},
16835 {keyword_in, "in"},
16836 {keyword_do, "do"},
16837 {keyword_do_cond, "do"},
16838 {keyword_do_block, "do"},
16839 {keyword_return, "return"},
16840 {keyword_yield, "yield"},
16841 {keyword_super, "super"},
16842 {keyword_self, "self"},
16843 {keyword_nil, "nil"},
16844 {keyword_true, "true"},
16845 {keyword_false, "false"},
16846 {keyword_and, "and"},
16847 {keyword_or, "or"},
16848 {keyword_not, "not"},
16849 {modifier_if, "if"},
16850 {modifier_unless, "unless"},
16851 {modifier_while, "while"},
16852 {modifier_until, "until"},
16853 {modifier_rescue, "rescue"},
16854 {keyword_alias, "alias"},
16855 {keyword_defined, "defined?"},
16856 {keyword_BEGIN, "BEGIN"},
16857 {keyword_END, "END"},
16858 {keyword__LINE__, "__LINE__"},
16859 {keyword__FILE__, "__FILE__"},
16860 {keyword__ENCODING__, "__ENCODING__"},
16861 {0, NULL}
16862 };
16863
16864 static const char*
16865 keyword_id_to_str(ID id)
16866 {
16867 const struct kw_assoc *a;
16868
16869 for (a = keyword_to_name; a->id; a++) {
16870 if (a->id == id)
16871 return a->name;
16872 }
16873 return NULL;
16874 }
16875
16876 #undef ripper_id2sym
16877 static VALUE
16878 ripper_id2sym(ID id)
16879 {
16880 const char *name;
16881 char buf[8];
16882
16883 if (id <= 256) {
16884 buf[0] = (char)id;
16885 buf[1] = '\0';
16886 return ID2SYM(rb_intern2(buf, 1));
16887 }
16888 if ((name = keyword_id_to_str(id))) {
16889 return ID2SYM(rb_intern(name));
16890 }
16891 switch (id) {
16892 case tOROP:
16893 name = "||";
16894 break;
16895 case tANDOP:
16896 name = "&&";
16897 break;
16898 default:
16899 name = rb_id2name(id);
16900 if (!name) {
16901 rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
16902 }
16903 return ID2SYM(id);
16904 }
16905 return ID2SYM(rb_intern(name));
16906 }
16907
16908 static ID
16909 ripper_get_id(VALUE v)
16910 {
16911 NODE *nd;
16912 if (!RB_TYPE_P(v, T_NODE)) return 0;
16913 nd = (NODE *)v;
16914 if (nd_type(nd) != NODE_LASGN) return 0;
16915 return nd->nd_vid;
16916 }
16917
16918 static VALUE
16919 ripper_get_value(VALUE v)
16920 {
16921 NODE *nd;
16922 if (v == Qundef) return Qnil;
16923 if (!RB_TYPE_P(v, T_NODE)) return v;
16924 nd = (NODE *)v;
16925 if (nd_type(nd) != NODE_LASGN) return Qnil;
16926 return nd->nd_rval;
16927 }
16928
16929 static void
16930 ripper_compile_error(struct parser_params *parser, const char *fmt, ...)
16931 {
16932 VALUE str;
16933 va_list args;
16934
16935 va_start(args, fmt);
16936 str = rb_vsprintf(fmt, args);
16937 va_end(args);
16938 rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
16939 }
16940
16941 static void
16942 ripper_warn0(struct parser_params *parser, const char *fmt)
16943 {
16944 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt));
16945 }
16946
16947 static void
16948 ripper_warnI(struct parser_params *parser, const char *fmt, int a)
16949 {
16950 rb_funcall(parser->value, rb_intern("warn"), 2,
16951 STR_NEW2(fmt), INT2NUM(a));
16952 }
16953
16954 #if 0
16955 static void
16956 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str)
16957 {
16958 rb_funcall(parser->value, rb_intern("warn"), 2,
16959 STR_NEW2(fmt), STR_NEW2(str));
16960 }
16961 #endif
16962
16963 static void
16964 ripper_warning0(struct parser_params *parser, const char *fmt)
16965 {
16966 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt));
16967 }
16968
16969 static void
16970 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str)
16971 {
16972 rb_funcall(parser->value, rb_intern("warning"), 2,
16973 STR_NEW2(fmt), STR_NEW2(str));
16974 }
16975
16976 static VALUE
16977 ripper_lex_get_generic(struct parser_params *parser, VALUE src)
16978 {
16979 return rb_funcall(src, ripper_id_gets, 0);
16980 }
16981
16982 static VALUE
16983 ripper_s_allocate(VALUE klass)
16984 {
16985 struct parser_params *p;
16986 VALUE self;
16987
16988 p = ALLOC_N(struct parser_params, 1);
16989 MEMZERO(p, struct parser_params, 1);
16990 self = TypedData_Wrap_Struct(klass, &parser_data_type, p);
16991 p->value = self;
16992 return self;
16993 }
16994
16995 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0)
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007 static VALUE
17008 ripper_initialize(int argc, VALUE *argv, VALUE self)
17009 {
17010 struct parser_params *parser;
17011 VALUE src, fname, lineno;
17012
17013 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17014 rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
17015 if (rb_obj_respond_to(src, ripper_id_gets, 0)) {
17016 parser->parser_lex_gets = ripper_lex_get_generic;
17017 }
17018 else {
17019 StringValue(src);
17020 parser->parser_lex_gets = lex_get_str;
17021 }
17022 parser->parser_lex_input = src;
17023 parser->eofp = Qfalse;
17024 if (NIL_P(fname)) {
17025 fname = STR_NEW2("(ripper)");
17026 }
17027 else {
17028 StringValue(fname);
17029 }
17030 parser_initialize(parser);
17031
17032 parser->parser_ruby_sourcefile_string = fname;
17033 parser->parser_ruby_sourcefile = RSTRING_PTR(fname);
17034 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
17035
17036 return Qnil;
17037 }
17038
17039 struct ripper_args {
17040 struct parser_params *parser;
17041 int argc;
17042 VALUE *argv;
17043 };
17044
17045 static VALUE
17046 ripper_parse0(VALUE parser_v)
17047 {
17048 struct parser_params *parser;
17049
17050 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
17051 parser_prepare(parser);
17052 ripper_yyparse((void*)parser);
17053 return parser->result;
17054 }
17055
17056 static VALUE
17057 ripper_ensure(VALUE parser_v)
17058 {
17059 struct parser_params *parser;
17060
17061 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
17062 parser->parsing_thread = Qnil;
17063 return Qnil;
17064 }
17065
17066
17067
17068
17069
17070
17071
17072 static VALUE
17073 ripper_parse(VALUE self)
17074 {
17075 struct parser_params *parser;
17076
17077 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17078 if (!ripper_initialized_p(parser)) {
17079 rb_raise(rb_eArgError, "method called for uninitialized object");
17080 }
17081 if (!NIL_P(parser->parsing_thread)) {
17082 if (parser->parsing_thread == rb_thread_current())
17083 rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
17084 else
17085 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
17086 }
17087 parser->parsing_thread = rb_thread_current();
17088 rb_ensure(ripper_parse0, self, ripper_ensure, self);
17089
17090 return parser->result;
17091 }
17092
17093
17094
17095
17096
17097
17098
17099
17100 static VALUE
17101 ripper_column(VALUE self)
17102 {
17103 struct parser_params *parser;
17104 long col;
17105
17106 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17107 if (!ripper_initialized_p(parser)) {
17108 rb_raise(rb_eArgError, "method called for uninitialized object");
17109 }
17110 if (NIL_P(parser->parsing_thread)) return Qnil;
17111 col = parser->tokp - parser->parser_lex_pbeg;
17112 return LONG2NUM(col);
17113 }
17114
17115
17116
17117
17118
17119
17120
17121 static VALUE
17122 ripper_filename(VALUE self)
17123 {
17124 struct parser_params *parser;
17125
17126 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17127 if (!ripper_initialized_p(parser)) {
17128 rb_raise(rb_eArgError, "method called for uninitialized object");
17129 }
17130 return parser->parser_ruby_sourcefile_string;
17131 }
17132
17133
17134
17135
17136
17137
17138
17139
17140 static VALUE
17141 ripper_lineno(VALUE self)
17142 {
17143 struct parser_params *parser;
17144
17145 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17146 if (!ripper_initialized_p(parser)) {
17147 rb_raise(rb_eArgError, "method called for uninitialized object");
17148 }
17149 if (NIL_P(parser->parsing_thread)) return Qnil;
17150 return INT2NUM(parser->parser_ruby_sourceline);
17151 }
17152
17153 #ifdef RIPPER_DEBUG
17154
17155 static VALUE
17156 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
17157 {
17158 StringValue(msg);
17159 if (obj == Qundef) {
17160 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg));
17161 }
17162 return Qnil;
17163 }
17164
17165
17166 static VALUE
17167 ripper_value(VALUE self, VALUE obj)
17168 {
17169 return ULONG2NUM(obj);
17170 }
17171 #endif
17172
17173
17174 void
17175 InitVM_ripper(void)
17176 {
17177 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new());
17178 }
17179
17180 void
17181 Init_ripper(void)
17182 {
17183 VALUE Ripper;
17184
17185 InitVM(ripper);
17186 Ripper = rb_define_class("Ripper", rb_cObject);
17187 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
17188 rb_define_alloc_func(Ripper, ripper_s_allocate);
17189 rb_define_method(Ripper, "initialize", ripper_initialize, -1);
17190 rb_define_method(Ripper, "parse", ripper_parse, 0);
17191 rb_define_method(Ripper, "column", ripper_column, 0);
17192 rb_define_method(Ripper, "filename", ripper_filename, 0);
17193 rb_define_method(Ripper, "lineno", ripper_lineno, 0);
17194 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
17195 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
17196 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
17197 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
17198 #ifdef RIPPER_DEBUG
17199 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
17200 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
17201 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
17202 #endif
17203
17204 ripper_id_gets = rb_intern("gets");
17205 ripper_init_eventids1(Ripper);
17206 ripper_init_eventids2(Ripper);
17207
17208 (void)rb_intern("||");
17209 (void)rb_intern("&&");
17210
17211 # if 0
17212
17213
17214
17215
17216
17217
17218
17219 rb_define_global_const("SCRIPT_LINES__", Qnil);
17220 #endif
17221
17222 }
17223 #endif
17224
17225