Ruby  1.9.3p484(2013-11-22revision43786)
parse.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 2.5. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "2.5"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 1
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
63 
64 
65 
66 /* Copy the first part of user declarations. */
67 
68 /* Line 268 of yacc.c */
69 #line 12 "parse.y"
70 
71 
72 #define YYDEBUG 1
73 #define YYERROR_VERBOSE 1
74 #define YYSTACK_USE_ALLOCA 0
75 
76 #include "ruby/ruby.h"
77 #include "ruby/st.h"
78 #include "ruby/encoding.h"
79 #include "internal.h"
80 #include "node.h"
81 #include "parse.h"
82 #include "id.h"
83 #include "regenc.h"
84 #include <stdio.h>
85 #include <errno.h>
86 #include <ctype.h>
87 
88 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
89 
90 #define YYMALLOC(size) rb_parser_malloc(parser, (size))
91 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size))
92 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size))
93 #define YYFREE(ptr) rb_parser_free(parser, (ptr))
94 #define malloc YYMALLOC
95 #define realloc YYREALLOC
96 #define calloc YYCALLOC
97 #define free YYFREE
98 
99 #ifndef RIPPER
100 static ID register_symid(ID, const char *, long, rb_encoding *);
101 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc)
102 #include "id.c"
103 #endif
104 
105 #define is_notop_id(id) ((id)>tLAST_TOKEN)
106 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
107 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
108 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
109 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
110 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
111 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
112 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
113 
114 #define is_asgn_or_id(id) ((is_notop_id(id)) && \
115  (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
116  ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
117  ((id)&ID_SCOPE_MASK) == ID_CLASS))
118 
120  EXPR_BEG, /* ignore newline, +/- is a sign. */
121  EXPR_END, /* newline significant, +/- is an operator. */
122  EXPR_ENDARG, /* ditto, and unbound braces. */
123  EXPR_ENDFN, /* ditto, and unbound braces. */
124  EXPR_ARG, /* newline significant, +/- is an operator. */
125  EXPR_CMDARG, /* newline significant, +/- is an operator. */
126  EXPR_MID, /* newline significant, +/- is an operator. */
127  EXPR_FNAME, /* ignore newline, no reserved words. */
128  EXPR_DOT, /* right after `.' or `::', no reserved words. */
129  EXPR_CLASS, /* immediate after `class', no here document. */
130  EXPR_VALUE, /* alike EXPR_BEG but label is disallowed. */
132 };
133 
135 
136 # define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1))
137 # define BITSTACK_POP(stack) ((stack) = (stack) >> 1)
138 # define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1))
139 # define BITSTACK_SET_P(stack) ((stack)&1)
140 
141 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
142 #define COND_POP() BITSTACK_POP(cond_stack)
143 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack)
144 #define COND_P() BITSTACK_SET_P(cond_stack)
145 
146 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
147 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
148 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack)
149 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
150 
151 struct vtable {
152  ID *tbl;
153  int pos;
154  int capa;
155  struct vtable *prev;
156 };
157 
158 struct local_vars {
159  struct vtable *args;
160  struct vtable *vars;
161  struct vtable *used;
162  struct local_vars *prev;
163 };
164 
165 #define DVARS_INHERIT ((void*)1)
166 #define DVARS_TOPSCOPE NULL
167 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl))
168 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3)
169 
170 static int
171 vtable_size(const struct vtable *tbl)
172 {
173  if (POINTER_P(tbl)) {
174  return tbl->pos;
175  }
176  else {
177  return 0;
178  }
179 }
180 
181 #define VTBL_DEBUG 0
182 
183 static struct vtable *
185 {
186  struct vtable *tbl = ALLOC(struct vtable);
187  tbl->pos = 0;
188  tbl->capa = 8;
189  tbl->tbl = ALLOC_N(ID, tbl->capa);
190  tbl->prev = prev;
191  if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl);
192  return tbl;
193 }
194 
195 static void
197 {
198  if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl);
199  if (POINTER_P(tbl)) {
200  if (tbl->tbl) {
201  xfree(tbl->tbl);
202  }
203  xfree(tbl);
204  }
205 }
206 
207 static void
208 vtable_add(struct vtable *tbl, ID id)
209 {
210  if (!POINTER_P(tbl)) {
211  rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl);
212  }
213  if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id));
214 
215  if (tbl->pos == tbl->capa) {
216  tbl->capa = tbl->capa * 2;
217  REALLOC_N(tbl->tbl, ID, tbl->capa);
218  }
219  tbl->tbl[tbl->pos++] = id;
220 }
221 
222 static int
223 vtable_included(const struct vtable * tbl, ID id)
224 {
225  int i;
226 
227  if (POINTER_P(tbl)) {
228  for (i = 0; i < tbl->pos; i++) {
229  if (tbl->tbl[i] == id) {
230  return i+1;
231  }
232  }
233  }
234  return 0;
235 }
236 
237 
238 #ifndef RIPPER
239 typedef struct token_info {
240  const char *token;
241  int linenum;
242  int column;
243  int nonspc;
244  struct token_info *next;
245 } token_info;
246 #endif
247 
248 /*
249  Structure of Lexer Buffer:
250 
251  lex_pbeg tokp lex_p lex_pend
252  | | | |
253  |-----------+--------------+------------|
254  |<------------>|
255  token
256 */
257 struct parser_params {
258  int is_ripper;
259  NODE *heap;
260 
262  VALUE eofp;
263 
268  int parser_class_nest;
269  int parser_paren_nest;
270  int parser_lpar_beg;
271  int parser_in_single;
272  int parser_in_def;
275  int parser_in_defined;
276  char *parser_tokenbuf;
277  int parser_tokidx;
278  int parser_toksiz;
282  const char *parser_lex_pbeg;
283  const char *parser_lex_p;
284  const char *parser_lex_pend;
285  int parser_heredoc_end;
288  long parser_lex_gets_ptr;
290  struct local_vars *parser_lvtbl;
292  int line_count;
293  int has_shebang;
294  char *parser_ruby_sourcefile; /* current source file */
295  int parser_ruby_sourceline; /* current line no. */
296  rb_encoding *enc;
297  rb_encoding *utf8;
298 
299  int parser_yydebug;
300 
301 #ifndef RIPPER
302  /* Ruby core only */
306  VALUE coverage;
307  int nerr;
308 
311 #else
312  /* Ripper only */
313  VALUE parser_ruby_sourcefile_string;
314  const char *tokp;
315  VALUE delayed;
316  int delayed_line;
317  int delayed_col;
318 
319  VALUE value;
320  VALUE result;
321  VALUE parsing_thread;
322  int toplevel_p;
323 #endif
324 };
325 
326 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \
327  (parser->utf8 = rb_utf8_encoding()))
328 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc)
329 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc)
330 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc)
331 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc)
332 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT)
333 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc)
334 
335 static int parser_yyerror(struct parser_params*, const char*);
336 #define yyerror(msg) parser_yyerror(parser, (msg))
337 
338 #define lex_strterm (parser->parser_lex_strterm)
339 #define lex_state (parser->parser_lex_state)
340 #define cond_stack (parser->parser_cond_stack)
341 #define cmdarg_stack (parser->parser_cmdarg_stack)
342 #define class_nest (parser->parser_class_nest)
343 #define paren_nest (parser->parser_paren_nest)
344 #define lpar_beg (parser->parser_lpar_beg)
345 #define in_single (parser->parser_in_single)
346 #define in_def (parser->parser_in_def)
347 #define compile_for_eval (parser->parser_compile_for_eval)
348 #define cur_mid (parser->parser_cur_mid)
349 #define in_defined (parser->parser_in_defined)
350 #define tokenbuf (parser->parser_tokenbuf)
351 #define tokidx (parser->parser_tokidx)
352 #define toksiz (parser->parser_toksiz)
353 #define lex_input (parser->parser_lex_input)
354 #define lex_lastline (parser->parser_lex_lastline)
355 #define lex_nextline (parser->parser_lex_nextline)
356 #define lex_pbeg (parser->parser_lex_pbeg)
357 #define lex_p (parser->parser_lex_p)
358 #define lex_pend (parser->parser_lex_pend)
359 #define heredoc_end (parser->parser_heredoc_end)
360 #define command_start (parser->parser_command_start)
361 #define deferred_nodes (parser->parser_deferred_nodes)
362 #define lex_gets_ptr (parser->parser_lex_gets_ptr)
363 #define lex_gets (parser->parser_lex_gets)
364 #define lvtbl (parser->parser_lvtbl)
365 #define ruby__end__seen (parser->parser_ruby__end__seen)
366 #define ruby_sourceline (parser->parser_ruby_sourceline)
367 #define ruby_sourcefile (parser->parser_ruby_sourcefile)
368 #define current_enc (parser->enc)
369 #define yydebug (parser->parser_yydebug)
370 #ifdef RIPPER
371 #else
372 #define ruby_eval_tree (parser->parser_eval_tree)
373 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin)
374 #define ruby_debug_lines (parser->debug_lines)
375 #define ruby_coverage (parser->coverage)
376 #endif
377 
378 #if YYPURE
379 static int yylex(void*, void*);
380 #else
381 static int yylex(void*);
382 #endif
383 
384 #ifndef RIPPER
385 #define yyparse ruby_yyparse
386 
387 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE);
388 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3))
389 
390 static NODE *cond_gen(struct parser_params*,NODE*);
391 #define cond(node) cond_gen(parser, (node))
392 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*);
393 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2))
394 
395 static NODE *newline_node(NODE*);
396 static void fixpos(NODE*,NODE*);
397 
398 static int value_expr_gen(struct parser_params*,NODE*);
399 static void void_expr_gen(struct parser_params*,NODE*);
400 static NODE *remove_begin(NODE*);
401 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
402 #define void_expr0(node) void_expr_gen(parser, (node))
403 #define void_expr(node) void_expr0((node) = remove_begin(node))
404 static void void_stmts_gen(struct parser_params*,NODE*);
405 #define void_stmts(node) void_stmts_gen(parser, (node))
406 static void reduce_nodes_gen(struct parser_params*,NODE**);
407 #define reduce_nodes(n) reduce_nodes_gen(parser,(n))
408 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*);
409 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2))
410 
411 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*);
412 #define block_append(h,t) block_append_gen(parser,(h),(t))
413 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*);
414 #define list_append(l,i) list_append_gen(parser,(l),(i))
415 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*);
416 #define list_concat(h,t) list_concat_gen(parser,(h),(t))
417 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*);
418 #define arg_append(h,t) arg_append_gen(parser,(h),(t))
419 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*);
420 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t))
421 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*);
422 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t))
423 static int literal_concat0(struct parser_params *, VALUE, VALUE);
424 static NODE *new_evstr_gen(struct parser_params*,NODE*);
425 #define new_evstr(n) new_evstr_gen(parser,(n))
426 static NODE *evstr2dstr_gen(struct parser_params*,NODE*);
427 #define evstr2dstr(n) evstr2dstr_gen(parser,(n))
428 static NODE *splat_array(NODE*);
429 
430 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*);
431 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1))
432 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID);
433 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id))
434 
435 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID);
436 #define new_args(f,o,r,p,b) new_args_gen(parser, (f),(o),(r),(p),(b))
437 
438 static NODE *negate_lit(NODE*);
439 static NODE *ret_args_gen(struct parser_params*,NODE*);
440 #define ret_args(node) ret_args_gen(parser, (node))
441 static NODE *arg_blk_pass(NODE*,NODE*);
442 static NODE *new_yield_gen(struct parser_params*,NODE*);
443 #define new_yield(node) new_yield_gen(parser, (node))
444 
445 static NODE *gettable_gen(struct parser_params*,ID);
446 #define gettable(id) gettable_gen(parser,(id))
447 static NODE *assignable_gen(struct parser_params*,ID,NODE*);
448 #define assignable(id,node) assignable_gen(parser, (id), (node))
449 
450 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*);
451 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2))
452 static NODE *attrset_gen(struct parser_params*,NODE*,ID);
453 #define attrset(node,id) attrset_gen(parser, (node), (id))
454 
455 static void rb_backref_error_gen(struct parser_params*,NODE*);
456 #define rb_backref_error(n) rb_backref_error_gen(parser,(n))
457 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*);
458 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2))
459 
460 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*);
461 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2))
462 
463 static ID *local_tbl_gen(struct parser_params*);
464 #define local_tbl() local_tbl_gen(parser)
465 
466 static void fixup_nodes(NODE **);
467 
468 static VALUE reg_compile_gen(struct parser_params*, VALUE, int);
469 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options))
470 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int);
471 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options))
472 static int reg_fragment_check_gen(struct parser_params*, VALUE, int);
473 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options))
474 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match);
475 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match))
476 
477 #define get_id(id) (id)
478 #define get_value(val) (val)
479 #else
480 #define remove_begin(node) (node)
481 #define rb_dvar_defined(id) 0
482 #define rb_local_defined(id) 0
483 static ID ripper_get_id(VALUE);
484 #define get_id(id) ripper_get_id(id)
485 static VALUE ripper_get_value(VALUE);
486 #define get_value(val) ripper_get_value(val)
487 static VALUE assignable_gen(struct parser_params*,VALUE);
488 #define assignable(lhs,node) assignable_gen(parser, (lhs))
489 static int id_is_var_gen(struct parser_params *parser, ID id);
490 #define id_is_var(id) id_is_var_gen(parser, (id))
491 #endif /* !RIPPER */
492 
493 static ID formal_argument_gen(struct parser_params*, ID);
494 #define formal_argument(id) formal_argument_gen(parser, (id))
495 static ID shadowing_lvar_gen(struct parser_params*,ID);
496 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name))
497 static void new_bv_gen(struct parser_params*,ID);
498 #define new_bv(id) new_bv_gen(parser, (id))
499 
500 static void local_push_gen(struct parser_params*,int);
501 #define local_push(top) local_push_gen(parser,(top))
502 static void local_pop_gen(struct parser_params*);
503 #define local_pop() local_pop_gen(parser)
504 static int local_var_gen(struct parser_params*, ID);
505 #define local_var(id) local_var_gen(parser, (id));
506 static int arg_var_gen(struct parser_params*, ID);
507 #define arg_var(id) arg_var_gen(parser, (id))
508 static int local_id_gen(struct parser_params*, ID);
509 #define local_id(id) local_id_gen(parser, (id))
510 static ID internal_id_gen(struct parser_params*);
511 #define internal_id() internal_id_gen(parser)
512 
513 static const struct vtable *dyna_push_gen(struct parser_params *);
514 #define dyna_push() dyna_push_gen(parser)
515 static void dyna_pop_gen(struct parser_params*, const struct vtable *);
516 #define dyna_pop(node) dyna_pop_gen(parser, (node))
517 static int dyna_in_block_gen(struct parser_params*);
518 #define dyna_in_block() dyna_in_block_gen(parser)
519 #define dyna_var(id) local_var(id)
520 static int dvar_defined_gen(struct parser_params*,ID,int);
521 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0)
522 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1)
523 static int dvar_curr_gen(struct parser_params*,ID);
524 #define dvar_curr(id) dvar_curr_gen(parser, (id))
525 
526 static int lvar_defined_gen(struct parser_params*, ID);
527 #define lvar_defined(id) lvar_defined_gen(parser, (id))
528 
529 #define RE_OPTION_ONCE (1<<16)
530 #define RE_OPTION_ENCODING_SHIFT 8
531 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
532 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
533 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
534 #define RE_OPTION_MASK 0xff
535 #define RE_OPTION_ARG_ENCODING_NONE 32
536 
537 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */
538 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */
539 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
540 #define nd_func u1.id
541 #if SIZEOF_SHORT == 2
542 #define nd_term(node) ((signed short)(node)->u2.id)
543 #else
544 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
545 #endif
546 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
547 #define nd_nest u3.cnt
548 
549 /****** Ripper *******/
550 
551 #ifdef RIPPER
552 #define RIPPER_VERSION "0.1.0"
553 
554 #include "eventids1.c"
555 #include "eventids2.c"
556 static ID ripper_id_gets;
557 
558 static VALUE ripper_dispatch0(struct parser_params*,ID);
559 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
560 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
561 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
562 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
563 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
564 
565 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
566 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a))
567 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b))
568 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
569 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
570 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
571 
572 #define yyparse ripper_yyparse
573 
574 #define ripper_intern(s) ID2SYM(rb_intern(s))
575 static VALUE ripper_id2sym(ID);
576 #ifdef __GNUC__
577 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \
578  ID2SYM(id) : ripper_id2sym(id))
579 #endif
580 
581 #define arg_new() dispatch0(args_new)
582 #define arg_add(l,a) dispatch2(args_add, (l), (a))
583 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a))
584 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b))
585 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b)))
586 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v))
587 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b))
588 
589 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a))
590 #define mrhs_new() dispatch0(mrhs_new)
591 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a))
592 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a))
593 
594 #define mlhs_new() dispatch0(mlhs_new)
595 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a))
596 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a))
597 
598 #define params_new(pars, opts, rest, pars2, blk) \
599  dispatch5(params, (pars), (opts), (rest), (pars2), (blk))
600 
601 #define blockvar_new(p,v) dispatch2(block_var, (p), (v))
602 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a))
603 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a))
604 
605 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a)))
606 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a))
607 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b))
608 
609 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
610 
611 #define FIXME 0
612 
613 #endif /* RIPPER */
614 
615 #ifndef RIPPER
616 # define ifndef_ripper(x) (x)
617 #else
618 # define ifndef_ripper(x)
619 #endif
620 
621 #ifndef RIPPER
622 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt))
623 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
624 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
625 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt))
626 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a))
627 #else
628 # define rb_warn0(fmt) ripper_warn0(parser, (fmt))
629 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a))
630 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a))
631 # define rb_warning0(fmt) ripper_warning0(parser, (fmt))
632 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a))
633 static void ripper_warn0(struct parser_params*, const char*);
634 static void ripper_warnI(struct parser_params*, const char*, int);
635 #if 0
636 static void ripper_warnS(struct parser_params*, const char*, const char*);
637 #endif
638 static void ripper_warning0(struct parser_params*, const char*);
639 static void ripper_warningS(struct parser_params*, const char*, const char*);
640 #endif
641 
642 #ifdef RIPPER
643 static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
644 # define rb_compile_error ripper_compile_error
645 # define compile_error ripper_compile_error
646 # define PARSER_ARG parser,
647 #else
648 # define rb_compile_error rb_compile_error_with_enc
649 # define compile_error parser->nerr++,rb_compile_error_with_enc
650 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc,
651 #endif
652 
653 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150,
654  for instance). This is too low for Ruby to parse some files, such as
655  date/format.rb, therefore bump the value up to at least Bison's default. */
656 #ifdef OLD_YACC
657 #ifndef YYMAXDEPTH
658 #define YYMAXDEPTH 10000
659 #endif
660 #endif
661 
662 #ifndef RIPPER
663 static void token_info_push(struct parser_params*, const char *token);
664 static void token_info_pop(struct parser_params*, const char *token);
665 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0)
666 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0)
667 #else
668 #define token_info_push(token) /* nothing */
669 #define token_info_pop(token) /* nothing */
670 #endif
671 
672 
673 /* Line 268 of yacc.c */
674 #line 675 "parse.c"
675 
676 /* Enabling traces. */
677 #ifndef YYDEBUG
678 # define YYDEBUG 0
679 #endif
680 
681 /* Enabling verbose error messages. */
682 #ifdef YYERROR_VERBOSE
683 # undef YYERROR_VERBOSE
684 # define YYERROR_VERBOSE 1
685 #else
686 # define YYERROR_VERBOSE 0
687 #endif
688 
689 /* Enabling the token table. */
690 #ifndef YYTOKEN_TABLE
691 # define YYTOKEN_TABLE 0
692 #endif
693 
694 
695 /* Tokens. */
696 #ifndef YYTOKENTYPE
697 # define YYTOKENTYPE
698  /* Put the tokens into the symbol table, so that GDB and other debuggers
699  know about them. */
700  enum yytokentype {
703  keyword_def = 260,
708  keyword_end = 265,
709  keyword_if = 266,
718  keyword_for = 275,
723  keyword_in = 280,
724  keyword_do = 281,
732  keyword_nil = 289,
735  keyword_and = 292,
736  keyword_or = 293,
737  keyword_not = 294,
738  modifier_if = 295,
746  keyword_END = 303,
750  tIDENTIFIER = 307,
751  tFID = 308,
752  tGVAR = 309,
753  tIVAR = 310,
754  tCONSTANT = 311,
755  tCVAR = 312,
756  tLABEL = 313,
757  tINTEGER = 314,
758  tFLOAT = 315,
760  tCHAR = 317,
761  tNTH_REF = 318,
762  tBACK_REF = 319,
763  tREGEXP_END = 320,
764  tUPLUS = 321,
765  tUMINUS = 322,
766  tPOW = 323,
767  tCMP = 324,
768  tEQ = 325,
769  tEQQ = 326,
770  tNEQ = 327,
771  tGEQ = 328,
772  tLEQ = 329,
773  tANDOP = 330,
774  tOROP = 331,
775  tMATCH = 332,
776  tNMATCH = 333,
777  tDOT2 = 334,
778  tDOT3 = 335,
779  tAREF = 336,
780  tASET = 337,
781  tLSHFT = 338,
782  tRSHFT = 339,
783  tCOLON2 = 340,
784  tCOLON3 = 341,
785  tOP_ASGN = 342,
786  tASSOC = 343,
787  tLPAREN = 344,
788  tLPAREN_ARG = 345,
789  tRPAREN = 346,
790  tLBRACK = 347,
791  tLBRACE = 348,
792  tLBRACE_ARG = 349,
793  tSTAR = 350,
794  tAMPER = 351,
795  tLAMBDA = 352,
796  tSYMBEG = 353,
797  tSTRING_BEG = 354,
799  tREGEXP_BEG = 356,
800  tWORDS_BEG = 357,
801  tQWORDS_BEG = 358,
804  tSTRING_END = 361,
805  tLAMBEG = 362,
806  tLOWEST = 363,
807  tUMINUS_NUM = 364,
808  idNULL = 365,
810  idIFUNC = 367,
811  idCFUNC = 368,
819  };
820 #endif
821 
822 
823 
824 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
825 typedef union YYSTYPE
826 {
827 
828 /* Line 293 of yacc.c */
829 #line 619 "parse.y"
830 
831  VALUE val;
832  NODE *node;
833  ID id;
834  int num;
835  const struct vtable *vars;
836 
837 
838 
839 /* Line 293 of yacc.c */
840 #line 841 "parse.c"
841 } YYSTYPE;
842 # define YYSTYPE_IS_TRIVIAL 1
843 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
844 # define YYSTYPE_IS_DECLARED 1
845 #endif
846 
847 
848 /* Copy the second part of user declarations. */
849 
850 
851 /* Line 343 of yacc.c */
852 #line 853 "parse.c"
853 
854 #ifdef short
855 # undef short
856 #endif
857 
858 #ifdef YYTYPE_UINT8
859 typedef YYTYPE_UINT8 yytype_uint8;
860 #else
861 typedef unsigned char yytype_uint8;
862 #endif
863 
864 #ifdef YYTYPE_INT8
865 typedef YYTYPE_INT8 yytype_int8;
866 #elif (defined __STDC__ || defined __C99__FUNC__ \
867  || defined __cplusplus || defined _MSC_VER)
868 typedef signed char yytype_int8;
869 #else
870 typedef short int yytype_int8;
871 #endif
872 
873 #ifdef YYTYPE_UINT16
874 typedef YYTYPE_UINT16 yytype_uint16;
875 #else
876 typedef unsigned short int yytype_uint16;
877 #endif
878 
879 #ifdef YYTYPE_INT16
880 typedef YYTYPE_INT16 yytype_int16;
881 #else
882 typedef short int yytype_int16;
883 #endif
884 
885 #ifndef YYSIZE_T
886 # ifdef __SIZE_TYPE__
887 # define YYSIZE_T __SIZE_TYPE__
888 # elif defined size_t
889 # define YYSIZE_T size_t
890 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
891  || defined __cplusplus || defined _MSC_VER)
892 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
893 # define YYSIZE_T size_t
894 # else
895 # define YYSIZE_T unsigned int
896 # endif
897 #endif
898 
899 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
900 
901 #ifndef YY_
902 # if defined YYENABLE_NLS && YYENABLE_NLS
903 # if ENABLE_NLS
904 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
905 # define YY_(msgid) dgettext ("bison-runtime", msgid)
906 # endif
907 # endif
908 # ifndef YY_
909 # define YY_(msgid) msgid
910 # endif
911 #endif
912 
913 /* Suppress unused-variable warnings by "using" E. */
914 #if ! defined lint || defined __GNUC__
915 # define YYUSE(e) ((void) (e))
916 #else
917 # define YYUSE(e) /* empty */
918 #endif
919 
920 /* Identity function, used to suppress warnings about constant conditions. */
921 #ifndef lint
922 # define YYID(n) (n)
923 #else
924 #if (defined __STDC__ || defined __C99__FUNC__ \
925  || defined __cplusplus || defined _MSC_VER)
926 static int
927 YYID (int yyi)
928 #else
929 static int
930 YYID (yyi)
931  int yyi;
932 #endif
933 {
934  return yyi;
935 }
936 #endif
937 
938 #if ! defined yyoverflow || YYERROR_VERBOSE
939 
940 /* The parser invokes alloca or malloc; define the necessary symbols. */
941 
942 # ifdef YYSTACK_USE_ALLOCA
943 # if YYSTACK_USE_ALLOCA
944 # ifdef __GNUC__
945 # define YYSTACK_ALLOC __builtin_alloca
946 # elif defined __BUILTIN_VA_ARG_INCR
947 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
948 # elif defined _AIX
949 # define YYSTACK_ALLOC __alloca
950 # elif defined _MSC_VER
951 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
952 # define alloca _alloca
953 # else
954 # define YYSTACK_ALLOC alloca
955 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
956  || defined __cplusplus || defined _MSC_VER)
957 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
958 # ifndef EXIT_SUCCESS
959 # define EXIT_SUCCESS 0
960 # endif
961 # endif
962 # endif
963 # endif
964 # endif
965 
966 # ifdef YYSTACK_ALLOC
967  /* Pacify GCC's `empty if-body' warning. */
968 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
969 # ifndef YYSTACK_ALLOC_MAXIMUM
970  /* The OS might guarantee only one guard page at the bottom of the stack,
971  and a page size can be as small as 4096 bytes. So we cannot safely
972  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
973  to allow for a few compiler-allocated temporary stack slots. */
974 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
975 # endif
976 # else
977 # define YYSTACK_ALLOC YYMALLOC
978 # define YYSTACK_FREE YYFREE
979 # ifndef YYSTACK_ALLOC_MAXIMUM
980 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
981 # endif
982 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
983  && ! ((defined YYMALLOC || defined malloc) \
984  && (defined YYFREE || defined free)))
985 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
986 # ifndef EXIT_SUCCESS
987 # define EXIT_SUCCESS 0
988 # endif
989 # endif
990 # ifndef YYMALLOC
991 # define YYMALLOC malloc
992 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
993  || defined __cplusplus || defined _MSC_VER)
994 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
995 # endif
996 # endif
997 # ifndef YYFREE
998 # define YYFREE free
999 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1000  || defined __cplusplus || defined _MSC_VER)
1001 void free (void *); /* INFRINGES ON USER NAME SPACE */
1002 # endif
1003 # endif
1004 # endif
1005 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1006 
1007 
1008 #if (! defined yyoverflow \
1009  && (! defined __cplusplus \
1010  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1011 
1012 /* A type that is properly aligned for any stack member. */
1013 union yyalloc
1014 {
1017 };
1018 
1019 /* The size of the maximum gap between one aligned stack and the next. */
1020 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1021 
1022 /* The size of an array large to enough to hold all stacks, each with
1023  N elements. */
1024 # define YYSTACK_BYTES(N) \
1025  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1026  + YYSTACK_GAP_MAXIMUM)
1027 
1028 # define YYCOPY_NEEDED 1
1029 
1030 /* Relocate STACK from its old location to the new one. The
1031  local variables YYSIZE and YYSTACKSIZE give the old and new number of
1032  elements in the stack, and YYPTR gives the new location of the
1033  stack. Advance YYPTR to a properly aligned location for the next
1034  stack. */
1035 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1036  do \
1037  { \
1038  YYSIZE_T yynewbytes; \
1039  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1040  Stack = &yyptr->Stack_alloc; \
1041  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1042  yyptr += yynewbytes / sizeof (*yyptr); \
1043  } \
1044  while (YYID (0))
1045 
1046 #endif
1047 
1048 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1049 /* Copy COUNT objects from FROM to TO. The source and destination do
1050  not overlap. */
1051 # ifndef YYCOPY
1052 # if defined __GNUC__ && 1 < __GNUC__
1053 # define YYCOPY(To, From, Count) \
1054  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1055 # else
1056 # define YYCOPY(To, From, Count) \
1057  do \
1058  { \
1059  YYSIZE_T yyi; \
1060  for (yyi = 0; yyi < (Count); yyi++) \
1061  (To)[yyi] = (From)[yyi]; \
1062  } \
1063  while (YYID (0))
1064 # endif
1065 # endif
1066 #endif /* !YYCOPY_NEEDED */
1067 
1068 /* YYFINAL -- State number of the termination state. */
1069 #define YYFINAL 3
1070 /* YYLAST -- Last index in YYTABLE. */
1071 #define YYLAST 10748
1072 
1073 /* YYNTOKENS -- Number of terminals. */
1074 #define YYNTOKENS 148
1075 /* YYNNTS -- Number of nonterminals. */
1076 #define YYNNTS 174
1077 /* YYNRULES -- Number of rules. */
1078 #define YYNRULES 573
1079 /* YYNRULES -- Number of states. */
1080 #define YYNSTATES 991
1081 
1082 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1083 #define YYUNDEFTOK 2
1084 #define YYMAXUTOK 375
1085 
1086 #define YYTRANSLATE(YYX) \
1087  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1088 
1089 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1090 static const yytype_uint8 yytranslate[] =
1091 {
1092  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1093  147, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1094  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1095  2, 2, 146, 123, 2, 2, 2, 121, 116, 2,
1096  142, 143, 119, 117, 140, 118, 139, 120, 2, 2,
1097  2, 2, 2, 2, 2, 2, 2, 2, 111, 145,
1098  113, 109, 112, 110, 2, 2, 2, 2, 2, 2,
1099  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1100  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1101  2, 138, 2, 144, 115, 2, 141, 2, 2, 2,
1102  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1103  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1104  2, 2, 2, 136, 114, 137, 124, 2, 2, 2,
1105  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1106  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1107  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1108  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1109  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1110  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1111  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1112  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1113  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1114  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1115  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1116  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1117  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1118  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1119  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1120  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1121  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1122  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1123  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1124  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1125  75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1126  85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1127  95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1128  105, 106, 107, 108, 122, 125, 126, 127, 128, 129,
1129  130, 131, 132, 133, 134, 135
1130 };
1131 
1132 #if YYDEBUG
1133 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1134  YYRHS. */
1135 static const yytype_uint16 yyprhs[] =
1136 {
1137  0, 0, 3, 4, 7, 10, 12, 14, 18, 21,
1138  23, 24, 30, 35, 38, 40, 42, 46, 49, 50,
1139  55, 59, 63, 67, 70, 74, 78, 82, 86, 90,
1140  95, 97, 101, 105, 112, 118, 124, 130, 136, 140,
1141  144, 148, 152, 154, 158, 162, 164, 168, 172, 176,
1142  179, 181, 183, 185, 187, 189, 194, 199, 200, 206,
1143  209, 213, 218, 224, 229, 235, 238, 241, 244, 247,
1144  250, 252, 256, 258, 262, 264, 267, 271, 277, 280,
1145  285, 288, 293, 295, 299, 301, 305, 308, 312, 314,
1146  318, 320, 322, 327, 331, 335, 339, 343, 346, 348,
1147  350, 352, 357, 361, 365, 369, 373, 376, 378, 380,
1148  382, 385, 387, 391, 393, 395, 397, 399, 401, 403,
1149  405, 407, 409, 411, 412, 417, 419, 421, 423, 425,
1150  427, 429, 431, 433, 435, 437, 439, 441, 443, 445,
1151  447, 449, 451, 453, 455, 457, 459, 461, 463, 465,
1152  467, 469, 471, 473, 475, 477, 479, 481, 483, 485,
1153  487, 489, 491, 493, 495, 497, 499, 501, 503, 505,
1154  507, 509, 511, 513, 515, 517, 519, 521, 523, 525,
1155  527, 529, 531, 533, 535, 537, 539, 541, 543, 545,
1156  547, 549, 551, 553, 555, 557, 561, 567, 571, 577,
1157  584, 590, 596, 602, 608, 613, 617, 621, 625, 629,
1158  633, 637, 641, 645, 649, 654, 659, 662, 665, 669,
1159  673, 677, 681, 685, 689, 693, 697, 701, 705, 709,
1160  713, 717, 720, 723, 727, 731, 735, 739, 740, 745,
1161  752, 754, 756, 758, 761, 766, 769, 773, 775, 777,
1162  779, 781, 784, 789, 792, 794, 797, 800, 805, 807,
1163  808, 811, 814, 817, 819, 821, 824, 828, 833, 837,
1164  842, 845, 847, 849, 851, 853, 855, 857, 859, 861,
1165  863, 864, 869, 870, 875, 879, 883, 886, 890, 894,
1166  896, 901, 905, 907, 908, 915, 920, 924, 927, 929,
1167  932, 935, 942, 949, 950, 951, 959, 960, 961, 969,
1168  975, 980, 981, 982, 992, 993, 1000, 1001, 1002, 1011,
1169  1012, 1018, 1019, 1026, 1027, 1028, 1038, 1040, 1042, 1044,
1170  1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064,
1171  1066, 1068, 1070, 1072, 1074, 1077, 1079, 1081, 1083, 1089,
1172  1091, 1094, 1096, 1098, 1100, 1104, 1106, 1110, 1112, 1117,
1173  1124, 1128, 1134, 1137, 1142, 1144, 1148, 1155, 1164, 1169,
1174  1176, 1181, 1184, 1191, 1194, 1199, 1206, 1209, 1214, 1217,
1175  1222, 1224, 1226, 1228, 1232, 1234, 1239, 1241, 1244, 1246,
1176  1250, 1252, 1254, 1255, 1256, 1261, 1266, 1268, 1272, 1276,
1177  1277, 1283, 1286, 1291, 1296, 1299, 1304, 1309, 1313, 1317,
1178  1321, 1324, 1326, 1331, 1332, 1338, 1339, 1345, 1351, 1353,
1179  1355, 1362, 1364, 1366, 1368, 1370, 1373, 1375, 1378, 1380,
1180  1382, 1384, 1386, 1388, 1390, 1392, 1395, 1399, 1403, 1407,
1181  1411, 1415, 1416, 1420, 1422, 1425, 1429, 1433, 1434, 1438,
1182  1439, 1442, 1443, 1446, 1447, 1450, 1452, 1453, 1457, 1458,
1183  1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1480, 1482,
1184  1484, 1488, 1490, 1492, 1495, 1498, 1500, 1502, 1504, 1506,
1185  1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526,
1186  1528, 1530, 1532, 1534, 1536, 1537, 1542, 1545, 1549, 1552,
1187  1559, 1568, 1573, 1580, 1585, 1592, 1595, 1600, 1607, 1610,
1188  1615, 1618, 1623, 1625, 1626, 1628, 1630, 1632, 1634, 1636,
1189  1638, 1640, 1644, 1646, 1650, 1654, 1658, 1660, 1664, 1666,
1190  1670, 1672, 1674, 1677, 1679, 1681, 1683, 1686, 1689, 1691,
1191  1693, 1694, 1699, 1701, 1704, 1706, 1710, 1714, 1717, 1719,
1192  1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739,
1193  1741, 1742, 1744, 1745, 1747, 1750, 1753, 1754, 1756, 1758,
1194  1760, 1762, 1764, 1767
1195 };
1196 
1197 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1198 static const yytype_int16 yyrhs[] =
1199 {
1200  149, 0, -1, -1, 150, 151, -1, 152, 314, -1,
1201  321, -1, 153, -1, 152, 320, 153, -1, 1, 153,
1202  -1, 158, -1, -1, 47, 154, 136, 151, 137, -1,
1203  156, 256, 231, 259, -1, 157, 314, -1, 321, -1,
1204  158, -1, 157, 320, 158, -1, 1, 158, -1, -1,
1205  45, 180, 159, 180, -1, 45, 54, 54, -1, 45,
1206  54, 64, -1, 45, 54, 63, -1, 6, 181, -1,
1207  158, 40, 162, -1, 158, 41, 162, -1, 158, 42,
1208  162, -1, 158, 43, 162, -1, 158, 44, 158, -1,
1209  48, 136, 156, 137, -1, 160, -1, 168, 109, 163,
1210  -1, 286, 87, 163, -1, 216, 138, 191, 317, 87,
1211  163, -1, 216, 139, 52, 87, 163, -1, 216, 139,
1212  56, 87, 163, -1, 216, 85, 56, 87, 163, -1,
1213  216, 85, 52, 87, 163, -1, 287, 87, 163, -1,
1214  175, 109, 198, -1, 168, 109, 187, -1, 168, 109,
1215  198, -1, 161, -1, 175, 109, 163, -1, 175, 109,
1216  160, -1, 163, -1, 161, 37, 161, -1, 161, 38,
1217  161, -1, 39, 315, 161, -1, 123, 163, -1, 185,
1218  -1, 161, -1, 167, -1, 164, -1, 249, -1, 249,
1219  139, 311, 193, -1, 249, 85, 311, 193, -1, -1,
1220  94, 166, 237, 156, 137, -1, 310, 193, -1, 310,
1221  193, 165, -1, 216, 139, 311, 193, -1, 216, 139,
1222  311, 193, 165, -1, 216, 85, 311, 193, -1, 216,
1223  85, 311, 193, 165, -1, 32, 193, -1, 31, 193,
1224  -1, 30, 192, -1, 21, 192, -1, 22, 192, -1,
1225  170, -1, 89, 169, 316, -1, 170, -1, 89, 169,
1226  316, -1, 172, -1, 172, 171, -1, 172, 95, 174,
1227  -1, 172, 95, 174, 140, 173, -1, 172, 95, -1,
1228  172, 95, 140, 173, -1, 95, 174, -1, 95, 174,
1229  140, 173, -1, 95, -1, 95, 140, 173, -1, 174,
1230  -1, 89, 169, 316, -1, 171, 140, -1, 172, 171,
1231  140, -1, 171, -1, 173, 140, 171, -1, 283, -1,
1232  284, -1, 216, 138, 191, 317, -1, 216, 139, 52,
1233  -1, 216, 85, 52, -1, 216, 139, 56, -1, 216,
1234  85, 56, -1, 86, 56, -1, 287, -1, 283, -1,
1235  284, -1, 216, 138, 191, 317, -1, 216, 139, 52,
1236  -1, 216, 85, 52, -1, 216, 139, 56, -1, 216,
1237  85, 56, -1, 86, 56, -1, 287, -1, 52, -1,
1238  56, -1, 86, 176, -1, 176, -1, 216, 85, 176,
1239  -1, 52, -1, 56, -1, 53, -1, 183, -1, 184,
1240  -1, 178, -1, 279, -1, 179, -1, 281, -1, 180,
1241  -1, -1, 181, 140, 182, 180, -1, 114, -1, 115,
1242  -1, 116, -1, 69, -1, 70, -1, 71, -1, 77,
1243  -1, 78, -1, 112, -1, 73, -1, 113, -1, 74,
1244  -1, 72, -1, 83, -1, 84, -1, 117, -1, 118,
1245  -1, 119, -1, 95, -1, 120, -1, 121, -1, 68,
1246  -1, 123, -1, 124, -1, 66, -1, 67, -1, 81,
1247  -1, 82, -1, 141, -1, 49, -1, 50, -1, 51,
1248  -1, 47, -1, 48, -1, 45, -1, 37, -1, 7,
1249  -1, 21, -1, 16, -1, 3, -1, 5, -1, 46,
1250  -1, 26, -1, 15, -1, 14, -1, 10, -1, 9,
1251  -1, 36, -1, 20, -1, 25, -1, 4, -1, 22,
1252  -1, 34, -1, 39, -1, 38, -1, 23, -1, 8,
1253  -1, 24, -1, 30, -1, 33, -1, 32, -1, 13,
1254  -1, 35, -1, 6, -1, 17, -1, 31, -1, 11,
1255  -1, 12, -1, 18, -1, 19, -1, 175, 109, 185,
1256  -1, 175, 109, 185, 44, 185, -1, 286, 87, 185,
1257  -1, 286, 87, 185, 44, 185, -1, 216, 138, 191,
1258  317, 87, 185, -1, 216, 139, 52, 87, 185, -1,
1259  216, 139, 56, 87, 185, -1, 216, 85, 52, 87,
1260  185, -1, 216, 85, 56, 87, 185, -1, 86, 56,
1261  87, 185, -1, 287, 87, 185, -1, 185, 79, 185,
1262  -1, 185, 80, 185, -1, 185, 117, 185, -1, 185,
1263  118, 185, -1, 185, 119, 185, -1, 185, 120, 185,
1264  -1, 185, 121, 185, -1, 185, 68, 185, -1, 122,
1265  59, 68, 185, -1, 122, 60, 68, 185, -1, 66,
1266  185, -1, 67, 185, -1, 185, 114, 185, -1, 185,
1267  115, 185, -1, 185, 116, 185, -1, 185, 69, 185,
1268  -1, 185, 112, 185, -1, 185, 73, 185, -1, 185,
1269  113, 185, -1, 185, 74, 185, -1, 185, 70, 185,
1270  -1, 185, 71, 185, -1, 185, 72, 185, -1, 185,
1271  77, 185, -1, 185, 78, 185, -1, 123, 185, -1,
1272  124, 185, -1, 185, 83, 185, -1, 185, 84, 185,
1273  -1, 185, 75, 185, -1, 185, 76, 185, -1, -1,
1274  46, 315, 186, 185, -1, 185, 110, 185, 315, 111,
1275  185, -1, 199, -1, 185, -1, 321, -1, 197, 318,
1276  -1, 197, 140, 308, 318, -1, 308, 318, -1, 142,
1277  191, 316, -1, 321, -1, 189, -1, 321, -1, 192,
1278  -1, 197, 140, -1, 197, 140, 308, 140, -1, 308,
1279  140, -1, 167, -1, 197, 196, -1, 308, 196, -1,
1280  197, 140, 308, 196, -1, 195, -1, -1, 194, 192,
1281  -1, 96, 187, -1, 140, 195, -1, 321, -1, 187,
1282  -1, 95, 187, -1, 197, 140, 187, -1, 197, 140,
1283  95, 187, -1, 197, 140, 187, -1, 197, 140, 95,
1284  187, -1, 95, 187, -1, 260, -1, 261, -1, 264,
1285  -1, 265, -1, 266, -1, 269, -1, 285, -1, 287,
1286  -1, 53, -1, -1, 217, 200, 155, 227, -1, -1,
1287  90, 161, 201, 316, -1, 89, 156, 143, -1, 216,
1288  85, 56, -1, 86, 56, -1, 92, 188, 144, -1,
1289  93, 307, 137, -1, 30, -1, 31, 142, 192, 316,
1290  -1, 31, 142, 316, -1, 31, -1, -1, 46, 315,
1291  142, 202, 161, 316, -1, 39, 142, 161, 316, -1,
1292  39, 142, 316, -1, 310, 251, -1, 250, -1, 250,
1293  251, -1, 97, 242, -1, 218, 162, 228, 156, 230,
1294  227, -1, 219, 162, 228, 156, 231, 227, -1, -1,
1295  -1, 220, 203, 162, 229, 204, 156, 227, -1, -1,
1296  -1, 221, 205, 162, 229, 206, 156, 227, -1, 222,
1297  162, 314, 254, 227, -1, 222, 314, 254, 227, -1,
1298  -1, -1, 223, 232, 25, 207, 162, 229, 208, 156,
1299  227, -1, -1, 224, 177, 288, 209, 155, 227, -1,
1300  -1, -1, 224, 83, 161, 210, 319, 211, 155, 227,
1301  -1, -1, 225, 177, 212, 155, 227, -1, -1, 226,
1302  178, 213, 290, 155, 227, -1, -1, -1, 226, 305,
1303  313, 214, 178, 215, 290, 155, 227, -1, 21, -1,
1304  22, -1, 23, -1, 24, -1, 199, -1, 7, -1,
1305  11, -1, 12, -1, 18, -1, 19, -1, 16, -1,
1306  20, -1, 3, -1, 4, -1, 5, -1, 10, -1,
1307  319, -1, 13, -1, 319, 13, -1, 319, -1, 27,
1308  -1, 231, -1, 14, 162, 228, 156, 230, -1, 321,
1309  -1, 15, 156, -1, 175, -1, 168, -1, 293, -1,
1310  89, 235, 316, -1, 233, -1, 234, 140, 233, -1,
1311  234, -1, 234, 140, 95, 293, -1, 234, 140, 95,
1312  293, 140, 234, -1, 234, 140, 95, -1, 234, 140,
1313  95, 140, 234, -1, 95, 293, -1, 95, 293, 140,
1314  234, -1, 95, -1, 95, 140, 234, -1, 295, 140,
1315  298, 140, 301, 304, -1, 295, 140, 298, 140, 301,
1316  140, 295, 304, -1, 295, 140, 298, 304, -1, 295,
1317  140, 298, 140, 295, 304, -1, 295, 140, 301, 304,
1318  -1, 295, 140, -1, 295, 140, 301, 140, 295, 304,
1319  -1, 295, 304, -1, 298, 140, 301, 304, -1, 298,
1320  140, 301, 140, 295, 304, -1, 298, 304, -1, 298,
1321  140, 295, 304, -1, 301, 304, -1, 301, 140, 295,
1322  304, -1, 303, -1, 321, -1, 238, -1, 114, 239,
1323  114, -1, 76, -1, 114, 236, 239, 114, -1, 321,
1324  -1, 145, 240, -1, 241, -1, 240, 140, 241, -1,
1325  52, -1, 292, -1, -1, -1, 243, 244, 245, 246,
1326  -1, 142, 291, 239, 316, -1, 291, -1, 107, 156,
1327  137, -1, 29, 156, 10, -1, -1, 28, 248, 237,
1328  156, 10, -1, 167, 247, -1, 249, 139, 311, 190,
1329  -1, 249, 85, 311, 190, -1, 310, 189, -1, 216,
1330  139, 311, 190, -1, 216, 85, 311, 189, -1, 216,
1331  85, 312, -1, 216, 139, 189, -1, 216, 85, 189,
1332  -1, 32, 189, -1, 32, -1, 216, 138, 191, 317,
1333  -1, -1, 136, 252, 237, 156, 137, -1, -1, 26,
1334  253, 237, 156, 10, -1, 17, 197, 228, 156, 255,
1335  -1, 231, -1, 254, -1, 8, 257, 258, 228, 156,
1336  256, -1, 321, -1, 187, -1, 198, -1, 321, -1,
1337  88, 175, -1, 321, -1, 9, 156, -1, 321, -1,
1338  282, -1, 279, -1, 281, -1, 262, -1, 62, -1,
1339  263, -1, 262, 263, -1, 99, 271, 106, -1, 100,
1340  272, 106, -1, 101, 273, 65, -1, 102, 146, 106,
1341  -1, 102, 267, 106, -1, -1, 267, 268, 146, -1,
1342  274, -1, 268, 274, -1, 103, 146, 106, -1, 103,
1343  270, 106, -1, -1, 270, 61, 146, -1, -1, 271,
1344  274, -1, -1, 272, 274, -1, -1, 273, 274, -1,
1345  61, -1, -1, 105, 275, 278, -1, -1, -1, 104,
1346  276, 277, 156, 137, -1, 54, -1, 55, -1, 57,
1347  -1, 287, -1, 98, 280, -1, 178, -1, 55, -1,
1348  54, -1, 57, -1, 98, 272, 106, -1, 59, -1,
1349  60, -1, 122, 59, -1, 122, 60, -1, 52, -1,
1350  55, -1, 54, -1, 56, -1, 57, -1, 34, -1,
1351  33, -1, 35, -1, 36, -1, 50, -1, 49, -1,
1352  51, -1, 283, -1, 284, -1, 283, -1, 284, -1,
1353  63, -1, 64, -1, 319, -1, -1, 113, 289, 162,
1354  319, -1, 1, 319, -1, 142, 291, 316, -1, 291,
1355  319, -1, 295, 140, 299, 140, 301, 304, -1, 295,
1356  140, 299, 140, 301, 140, 295, 304, -1, 295, 140,
1357  299, 304, -1, 295, 140, 299, 140, 295, 304, -1,
1358  295, 140, 301, 304, -1, 295, 140, 301, 140, 295,
1359  304, -1, 295, 304, -1, 299, 140, 301, 304, -1,
1360  299, 140, 301, 140, 295, 304, -1, 299, 304, -1,
1361  299, 140, 295, 304, -1, 301, 304, -1, 301, 140,
1362  295, 304, -1, 303, -1, -1, 56, -1, 55, -1,
1363  54, -1, 57, -1, 292, -1, 52, -1, 293, -1,
1364  89, 235, 316, -1, 294, -1, 295, 140, 294, -1,
1365  52, 109, 187, -1, 52, 109, 216, -1, 297, -1,
1366  298, 140, 297, -1, 296, -1, 299, 140, 296, -1,
1367  119, -1, 95, -1, 300, 52, -1, 300, -1, 116,
1368  -1, 96, -1, 302, 52, -1, 140, 303, -1, 321,
1369  -1, 285, -1, -1, 142, 306, 161, 316, -1, 321,
1370  -1, 308, 318, -1, 309, -1, 308, 140, 309, -1,
1371  187, 88, 187, -1, 58, 187, -1, 52, -1, 56,
1372  -1, 53, -1, 52, -1, 56, -1, 53, -1, 183,
1373  -1, 52, -1, 53, -1, 183, -1, 139, -1, 85,
1374  -1, -1, 320, -1, -1, 147, -1, 315, 143, -1,
1375  315, 144, -1, -1, 147, -1, 140, -1, 145, -1,
1376  147, -1, 319, -1, 320, 145, -1, -1
1377 };
1378 
1379 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1380 static const yytype_uint16 yyrline[] =
1381 {
1382  0, 785, 785, 785, 816, 827, 836, 844, 852, 858,
1383  860, 859, 883, 916, 927, 936, 944, 952, 958, 958,
1384  966, 974, 985, 995, 1003, 1012, 1021, 1034, 1047, 1056,
1385  1068, 1069, 1079, 1108, 1129, 1146, 1163, 1174, 1191, 1201,
1386  1210, 1219, 1228, 1231, 1240, 1252, 1253, 1261, 1269, 1277,
1387  1285, 1288, 1300, 1301, 1304, 1305, 1314, 1326, 1325, 1347,
1388  1356, 1368, 1377, 1389, 1398, 1410, 1419, 1428, 1436, 1444,
1389  1454, 1455, 1465, 1466, 1476, 1484, 1492, 1500, 1509, 1517,
1390  1526, 1534, 1543, 1551, 1562, 1563, 1573, 1581, 1591, 1599,
1391  1609, 1613, 1617, 1625, 1633, 1641, 1649, 1661, 1671, 1683,
1392  1692, 1701, 1709, 1717, 1725, 1733, 1746, 1759, 1770, 1778,
1393  1781, 1789, 1797, 1807, 1808, 1809, 1810, 1815, 1826, 1827,
1394  1830, 1838, 1841, 1849, 1849, 1859, 1860, 1861, 1862, 1863,
1395  1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873,
1396  1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883,
1397  1884, 1885, 1886, 1887, 1890, 1890, 1890, 1891, 1891, 1892,
1398  1892, 1892, 1893, 1893, 1893, 1893, 1894, 1894, 1894, 1894,
1399  1895, 1895, 1895, 1896, 1896, 1896, 1896, 1897, 1897, 1897,
1400  1897, 1898, 1898, 1898, 1898, 1899, 1899, 1899, 1899, 1900,
1401  1900, 1900, 1900, 1901, 1901, 1904, 1913, 1923, 1952, 1983,
1402  2009, 2026, 2043, 2060, 2071, 2082, 2093, 2107, 2121, 2129,
1403  2137, 2145, 2153, 2161, 2169, 2178, 2187, 2195, 2203, 2211,
1404  2219, 2227, 2235, 2243, 2251, 2259, 2267, 2275, 2283, 2291,
1405  2302, 2310, 2318, 2326, 2334, 2342, 2350, 2358, 2358, 2368,
1406  2378, 2384, 2396, 2397, 2401, 2409, 2419, 2429, 2430, 2433,
1407  2434, 2435, 2439, 2447, 2457, 2466, 2474, 2484, 2493, 2502,
1408  2502, 2514, 2524, 2528, 2534, 2542, 2550, 2564, 2580, 2594,
1409  2609, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627,
1410  2636, 2635, 2660, 2660, 2669, 2677, 2685, 2693, 2706, 2714,
1411  2722, 2730, 2738, 2746, 2746, 2756, 2764, 2772, 2783, 2784,
1412  2795, 2799, 2811, 2823, 2823, 2823, 2834, 2834, 2834, 2845,
1413  2856, 2865, 2867, 2864, 2931, 2930, 2952, 2957, 2951, 2976,
1414  2975, 2997, 2996, 3019, 3020, 3019, 3040, 3048, 3056, 3064,
1415  3074, 3086, 3092, 3098, 3104, 3110, 3116, 3122, 3128, 3134,
1416  3140, 3150, 3156, 3161, 3162, 3169, 3174, 3177, 3178, 3191,
1417  3192, 3202, 3203, 3206, 3214, 3224, 3232, 3242, 3250, 3259,
1418  3268, 3276, 3284, 3293, 3305, 3313, 3323, 3331, 3339, 3347,
1419  3355, 3363, 3372, 3380, 3388, 3396, 3404, 3412, 3420, 3428,
1420  3436, 3446, 3447, 3453, 3462, 3471, 3482, 3483, 3493, 3500,
1421  3509, 3517, 3523, 3526, 3523, 3544, 3552, 3562, 3566, 3573,
1422  3572, 3593, 3609, 3618, 3629, 3638, 3648, 3658, 3666, 3677,
1423  3688, 3696, 3704, 3719, 3718, 3738, 3737, 3758, 3770, 3771,
1424  3774, 3793, 3796, 3804, 3812, 3815, 3819, 3822, 3830, 3833,
1425  3834, 3842, 3845, 3862, 3863, 3864, 3874, 3884, 3911, 3976,
1426  3985, 3996, 4003, 4013, 4021, 4031, 4040, 4051, 4058, 4069,
1427  4076, 4087, 4094, 4105, 4112, 4141, 4143, 4142, 4159, 4165,
1428  4158, 4184, 4192, 4200, 4208, 4211, 4222, 4223, 4224, 4225,
1429  4228, 4258, 4259, 4260, 4268, 4278, 4279, 4280, 4281, 4282,
1430  4285, 4286, 4287, 4288, 4289, 4290, 4291, 4294, 4307, 4317,
1431  4325, 4335, 4336, 4339, 4348, 4347, 4355, 4367, 4377, 4385,
1432  4393, 4401, 4409, 4417, 4425, 4433, 4441, 4449, 4457, 4465,
1433  4473, 4481, 4489, 4498, 4507, 4516, 4525, 4534, 4545, 4546,
1434  4553, 4562, 4581, 4588, 4601, 4613, 4625, 4633, 4649, 4657,
1435  4673, 4674, 4677, 4690, 4701, 4702, 4705, 4722, 4726, 4736,
1436  4746, 4746, 4775, 4776, 4786, 4793, 4803, 4811, 4821, 4822,
1437  4823, 4826, 4827, 4828, 4829, 4832, 4833, 4834, 4837, 4842,
1438  4849, 4850, 4853, 4854, 4857, 4860, 4863, 4864, 4865, 4868,
1439  4869, 4872, 4873, 4877
1440 };
1441 #endif
1442 
1443 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1444 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1445  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1446 static const char *const yytname[] =
1447 {
1448  "$end", "error", "$undefined", "keyword_class", "keyword_module",
1449  "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue",
1450  "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless",
1451  "keyword_then", "keyword_elsif", "keyword_else", "keyword_case",
1452  "keyword_when", "keyword_while", "keyword_until", "keyword_for",
1453  "keyword_break", "keyword_next", "keyword_redo", "keyword_retry",
1454  "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block",
1455  "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super",
1456  "keyword_self", "keyword_nil", "keyword_true", "keyword_false",
1457  "keyword_and", "keyword_or", "keyword_not", "modifier_if",
1458  "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue",
1459  "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END",
1460  "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__",
1461  "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL",
1462  "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF",
1463  "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ",
1464  "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH",
1465  "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2",
1466  "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN",
1467  "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA",
1468  "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG",
1469  "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG",
1470  "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'",
1471  "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL",
1472  "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias",
1473  "id_core_set_variable_alias", "id_core_undef_method",
1474  "id_core_define_method", "id_core_define_singleton_method",
1475  "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','",
1476  "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
1477  "$@1", "top_compstmt", "top_stmts", "top_stmt", "$@2", "bodystmt",
1478  "compstmt", "stmts", "stmt", "$@3", "command_asgn", "expr", "expr_value",
1479  "command_call", "block_command", "cmd_brace_block", "@4", "command",
1480  "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head",
1481  "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym",
1482  "fitem", "undef_list", "$@5", "op", "reswords", "arg", "$@6",
1483  "arg_value", "aref_args", "paren_args", "opt_paren_args",
1484  "opt_call_args", "call_args", "command_args", "@7", "block_arg",
1485  "opt_block_arg", "args", "mrhs", "primary", "@8", "$@9", "$@10", "$@11",
1486  "$@12", "$@13", "$@14", "$@15", "$@16", "@17", "@18", "@19", "@20",
1487  "@21", "$@22", "$@23", "primary_value", "k_begin", "k_if", "k_unless",
1488  "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def",
1489  "k_end", "then", "do", "if_tail", "opt_else", "for_var", "f_marg",
1490  "f_marg_list", "f_margs", "block_param", "opt_block_param",
1491  "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@24",
1492  "@25", "f_larglist", "lambda_body", "do_block", "@26", "block_call",
1493  "method_call", "brace_block", "@27", "@28", "case_body", "cases",
1494  "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", "strings",
1495  "string", "string1", "xstring", "regexp", "words", "word_list", "word",
1496  "qwords", "qword_list", "string_contents", "xstring_contents",
1497  "regexp_contents", "string_content", "@29", "@30", "@31", "string_dvar",
1498  "symbol", "sym", "dsym", "numeric", "user_variable", "keyword_variable",
1499  "var_ref", "var_lhs", "backref", "superclass", "$@32", "f_arglist",
1500  "f_args", "f_bad_arg", "f_norm_arg", "f_arg_item", "f_arg", "f_opt",
1501  "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark",
1502  "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg",
1503  "singleton", "$@33", "assoc_list", "assocs", "assoc", "operation",
1504  "operation2", "operation3", "dot_or_colon", "opt_terms", "opt_nl",
1505  "rparen", "rbracket", "trailer", "term", "terms", "none", 0
1506 };
1507 #endif
1508 
1509 # ifdef YYPRINT
1510 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1511  token YYLEX-NUM. */
1512 static const yytype_uint16 yytoknum[] =
1513 {
1514  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1515  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1516  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1517  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1518  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1519  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1520  315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1521  325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1522  335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1523  345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1524  355, 356, 357, 358, 359, 360, 361, 362, 363, 61,
1525  63, 58, 62, 60, 124, 94, 38, 43, 45, 42,
1526  47, 37, 364, 33, 126, 365, 366, 367, 368, 369,
1527  370, 371, 372, 373, 374, 375, 123, 125, 91, 46,
1528  44, 96, 40, 41, 93, 59, 32, 10
1529 };
1530 # endif
1531 
1532 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1533 static const yytype_uint16 yyr1[] =
1534 {
1535  0, 148, 150, 149, 151, 152, 152, 152, 152, 153,
1536  154, 153, 155, 156, 157, 157, 157, 157, 159, 158,
1537  158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
1538  158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
1539  158, 158, 158, 160, 160, 161, 161, 161, 161, 161,
1540  161, 162, 163, 163, 164, 164, 164, 166, 165, 167,
1541  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
1542  168, 168, 169, 169, 170, 170, 170, 170, 170, 170,
1543  170, 170, 170, 170, 171, 171, 172, 172, 173, 173,
1544  174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
1545  175, 175, 175, 175, 175, 175, 175, 175, 176, 176,
1546  177, 177, 177, 178, 178, 178, 178, 178, 179, 179,
1547  180, 180, 181, 182, 181, 183, 183, 183, 183, 183,
1548  183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1549  183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1550  183, 183, 183, 183, 184, 184, 184, 184, 184, 184,
1551  184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
1552  184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
1553  184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
1554  184, 184, 184, 184, 184, 185, 185, 185, 185, 185,
1555  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1556  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1557  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1558  185, 185, 185, 185, 185, 185, 185, 186, 185, 185,
1559  185, 187, 188, 188, 188, 188, 189, 190, 190, 191,
1560  191, 191, 191, 191, 192, 192, 192, 192, 192, 194,
1561  193, 195, 196, 196, 197, 197, 197, 197, 198, 198,
1562  198, 199, 199, 199, 199, 199, 199, 199, 199, 199,
1563  200, 199, 201, 199, 199, 199, 199, 199, 199, 199,
1564  199, 199, 199, 202, 199, 199, 199, 199, 199, 199,
1565  199, 199, 199, 203, 204, 199, 205, 206, 199, 199,
1566  199, 207, 208, 199, 209, 199, 210, 211, 199, 212,
1567  199, 213, 199, 214, 215, 199, 199, 199, 199, 199,
1568  216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
1569  226, 227, 228, 228, 228, 229, 229, 230, 230, 231,
1570  231, 232, 232, 233, 233, 234, 234, 235, 235, 235,
1571  235, 235, 235, 235, 235, 235, 236, 236, 236, 236,
1572  236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1573  236, 237, 237, 238, 238, 238, 239, 239, 240, 240,
1574  241, 241, 243, 244, 242, 245, 245, 246, 246, 248,
1575  247, 249, 249, 249, 250, 250, 250, 250, 250, 250,
1576  250, 250, 250, 252, 251, 253, 251, 254, 255, 255,
1577  256, 256, 257, 257, 257, 258, 258, 259, 259, 260,
1578  260, 260, 261, 262, 262, 262, 263, 264, 265, 266,
1579  266, 267, 267, 268, 268, 269, 269, 270, 270, 271,
1580  271, 272, 272, 273, 273, 274, 275, 274, 276, 277,
1581  274, 278, 278, 278, 278, 279, 280, 280, 280, 280,
1582  281, 282, 282, 282, 282, 283, 283, 283, 283, 283,
1583  284, 284, 284, 284, 284, 284, 284, 285, 285, 286,
1584  286, 287, 287, 288, 289, 288, 288, 290, 290, 291,
1585  291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
1586  291, 291, 291, 291, 292, 292, 292, 292, 293, 293,
1587  294, 294, 295, 295, 296, 297, 298, 298, 299, 299,
1588  300, 300, 301, 301, 302, 302, 303, 304, 304, 305,
1589  306, 305, 307, 307, 308, 308, 309, 309, 310, 310,
1590  310, 311, 311, 311, 311, 312, 312, 312, 313, 313,
1591  314, 314, 315, 315, 316, 317, 318, 318, 318, 319,
1592  319, 320, 320, 321
1593 };
1594 
1595 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1596 static const yytype_uint8 yyr2[] =
1597 {
1598  0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
1599  0, 5, 4, 2, 1, 1, 3, 2, 0, 4,
1600  3, 3, 3, 2, 3, 3, 3, 3, 3, 4,
1601  1, 3, 3, 6, 5, 5, 5, 5, 3, 3,
1602  3, 3, 1, 3, 3, 1, 3, 3, 3, 2,
1603  1, 1, 1, 1, 1, 4, 4, 0, 5, 2,
1604  3, 4, 5, 4, 5, 2, 2, 2, 2, 2,
1605  1, 3, 1, 3, 1, 2, 3, 5, 2, 4,
1606  2, 4, 1, 3, 1, 3, 2, 3, 1, 3,
1607  1, 1, 4, 3, 3, 3, 3, 2, 1, 1,
1608  1, 4, 3, 3, 3, 3, 2, 1, 1, 1,
1609  2, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1610  1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
1611  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1612  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1613  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1614  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1615  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1616  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1617  1, 1, 1, 1, 1, 3, 5, 3, 5, 6,
1618  5, 5, 5, 5, 4, 3, 3, 3, 3, 3,
1619  3, 3, 3, 3, 4, 4, 2, 2, 3, 3,
1620  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1621  3, 2, 2, 3, 3, 3, 3, 0, 4, 6,
1622  1, 1, 1, 2, 4, 2, 3, 1, 1, 1,
1623  1, 2, 4, 2, 1, 2, 2, 4, 1, 0,
1624  2, 2, 2, 1, 1, 2, 3, 4, 3, 4,
1625  2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1626  0, 4, 0, 4, 3, 3, 2, 3, 3, 1,
1627  4, 3, 1, 0, 6, 4, 3, 2, 1, 2,
1628  2, 6, 6, 0, 0, 7, 0, 0, 7, 5,
1629  4, 0, 0, 9, 0, 6, 0, 0, 8, 0,
1630  5, 0, 6, 0, 0, 9, 1, 1, 1, 1,
1631  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1632  1, 1, 1, 1, 2, 1, 1, 1, 5, 1,
1633  2, 1, 1, 1, 3, 1, 3, 1, 4, 6,
1634  3, 5, 2, 4, 1, 3, 6, 8, 4, 6,
1635  4, 2, 6, 2, 4, 6, 2, 4, 2, 4,
1636  1, 1, 1, 3, 1, 4, 1, 2, 1, 3,
1637  1, 1, 0, 0, 4, 4, 1, 3, 3, 0,
1638  5, 2, 4, 4, 2, 4, 4, 3, 3, 3,
1639  2, 1, 4, 0, 5, 0, 5, 5, 1, 1,
1640  6, 1, 1, 1, 1, 2, 1, 2, 1, 1,
1641  1, 1, 1, 1, 1, 2, 3, 3, 3, 3,
1642  3, 0, 3, 1, 2, 3, 3, 0, 3, 0,
1643  2, 0, 2, 0, 2, 1, 0, 3, 0, 0,
1644  5, 1, 1, 1, 1, 2, 1, 1, 1, 1,
1645  3, 1, 1, 2, 2, 1, 1, 1, 1, 1,
1646  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1647  1, 1, 1, 1, 0, 4, 2, 3, 2, 6,
1648  8, 4, 6, 4, 6, 2, 4, 6, 2, 4,
1649  2, 4, 1, 0, 1, 1, 1, 1, 1, 1,
1650  1, 3, 1, 3, 3, 3, 1, 3, 1, 3,
1651  1, 1, 2, 1, 1, 1, 2, 2, 1, 1,
1652  0, 4, 1, 2, 1, 3, 3, 2, 1, 1,
1653  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1654  0, 1, 0, 1, 2, 2, 0, 1, 1, 1,
1655  1, 1, 2, 0
1656 };
1657 
1658 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1659  Performed when YYTABLE doesn't specify something else to do. Zero
1660  means the default is an error. */
1661 static const yytype_uint16 yydefact[] =
1662 {
1663  2, 0, 0, 1, 0, 338, 339, 340, 0, 331,
1664  332, 333, 336, 334, 335, 337, 326, 327, 328, 329,
1665  289, 259, 259, 481, 480, 482, 483, 562, 0, 562,
1666  10, 0, 485, 484, 486, 475, 550, 477, 476, 478,
1667  479, 471, 472, 433, 491, 492, 0, 0, 0, 0,
1668  0, 573, 573, 82, 392, 451, 449, 451, 453, 441,
1669  447, 0, 0, 0, 3, 560, 6, 9, 30, 42,
1670  45, 53, 52, 0, 70, 0, 74, 84, 0, 50,
1671  240, 0, 280, 0, 0, 303, 306, 560, 0, 0,
1672  0, 0, 54, 298, 271, 272, 432, 434, 273, 274,
1673  275, 276, 430, 431, 429, 487, 488, 277, 0, 278,
1674  259, 5, 8, 164, 175, 165, 188, 161, 181, 171,
1675  170, 191, 192, 186, 169, 168, 163, 189, 193, 194,
1676  173, 162, 176, 180, 182, 174, 167, 183, 190, 185,
1677  184, 177, 187, 172, 160, 179, 178, 159, 166, 157,
1678  158, 154, 155, 156, 113, 115, 114, 149, 150, 146,
1679  128, 129, 130, 137, 134, 136, 131, 132, 151, 152,
1680  138, 139, 143, 133, 135, 125, 126, 127, 140, 141,
1681  142, 144, 145, 147, 148, 153, 118, 120, 122, 23,
1682  116, 117, 119, 121, 0, 0, 0, 0, 0, 0,
1683  0, 254, 0, 241, 264, 68, 258, 573, 0, 487,
1684  488, 0, 278, 573, 544, 69, 67, 562, 66, 0,
1685  573, 410, 65, 562, 563, 0, 0, 18, 237, 0,
1686  0, 326, 327, 289, 292, 411, 216, 0, 0, 217,
1687  286, 0, 0, 0, 560, 15, 562, 72, 14, 282,
1688  0, 566, 566, 242, 0, 0, 566, 542, 562, 0,
1689  0, 0, 80, 330, 0, 90, 91, 98, 300, 393,
1690  468, 467, 469, 466, 0, 465, 0, 0, 0, 0,
1691  0, 0, 0, 473, 474, 49, 231, 232, 569, 570,
1692  4, 571, 561, 0, 0, 0, 0, 0, 0, 0,
1693  399, 401, 0, 86, 0, 78, 75, 0, 0, 0,
1694  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1695  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1696  0, 0, 0, 0, 0, 573, 0, 0, 51, 0,
1697  0, 0, 0, 560, 0, 561, 0, 352, 351, 0,
1698  0, 487, 488, 278, 108, 109, 0, 0, 111, 0,
1699  0, 487, 488, 278, 319, 184, 177, 187, 172, 154,
1700  155, 156, 113, 114, 540, 321, 539, 0, 0, 0,
1701  415, 413, 299, 435, 0, 0, 404, 59, 297, 123,
1702  547, 286, 265, 261, 0, 0, 0, 255, 263, 0,
1703  573, 0, 0, 0, 0, 256, 562, 0, 291, 260,
1704  562, 250, 573, 573, 249, 562, 296, 48, 20, 22,
1705  21, 0, 293, 0, 0, 0, 0, 0, 0, 17,
1706  562, 284, 13, 561, 71, 562, 287, 568, 567, 243,
1707  568, 245, 288, 543, 0, 97, 473, 474, 88, 83,
1708  0, 0, 573, 0, 513, 455, 458, 456, 470, 452,
1709  436, 450, 437, 438, 454, 439, 440, 0, 443, 445,
1710  0, 446, 0, 0, 572, 7, 24, 25, 26, 27,
1711  28, 46, 47, 573, 0, 31, 40, 0, 41, 562,
1712  0, 76, 87, 44, 43, 0, 195, 264, 39, 213,
1713  221, 226, 227, 228, 223, 225, 235, 236, 229, 230,
1714  206, 207, 233, 234, 562, 222, 224, 218, 219, 220,
1715  208, 209, 210, 211, 212, 551, 556, 552, 557, 409,
1716  259, 407, 562, 551, 553, 552, 554, 408, 259, 0,
1717  573, 343, 0, 342, 0, 0, 0, 0, 0, 0,
1718  286, 0, 573, 0, 311, 316, 108, 109, 110, 0,
1719  494, 314, 493, 0, 573, 0, 0, 0, 513, 559,
1720  558, 323, 551, 552, 259, 259, 573, 573, 32, 197,
1721  38, 205, 57, 60, 0, 195, 546, 0, 266, 262,
1722  573, 555, 552, 562, 551, 552, 545, 290, 564, 246,
1723  251, 253, 295, 19, 0, 238, 0, 29, 0, 573,
1724  204, 73, 16, 283, 566, 0, 81, 94, 96, 562,
1725  551, 552, 519, 516, 515, 514, 517, 0, 531, 535,
1726  534, 530, 513, 0, 396, 518, 520, 522, 573, 528,
1727  573, 533, 573, 0, 512, 459, 0, 442, 444, 448,
1728  214, 215, 384, 573, 0, 382, 381, 270, 0, 85,
1729  79, 0, 0, 0, 0, 0, 0, 406, 63, 0,
1730  412, 0, 0, 248, 405, 61, 247, 341, 281, 573,
1731  573, 421, 573, 344, 573, 346, 304, 345, 307, 0,
1732  0, 310, 555, 285, 562, 551, 552, 0, 0, 496,
1733  0, 0, 108, 109, 112, 562, 0, 562, 513, 0,
1734  0, 0, 403, 56, 402, 55, 0, 0, 0, 573,
1735  124, 267, 257, 0, 0, 412, 0, 0, 573, 562,
1736  11, 244, 89, 92, 0, 519, 0, 364, 355, 357,
1737  562, 353, 573, 0, 0, 394, 0, 505, 538, 0,
1738  508, 532, 0, 510, 536, 0, 461, 462, 463, 457,
1739  464, 519, 0, 573, 0, 573, 526, 573, 573, 380,
1740  386, 0, 0, 268, 77, 196, 0, 37, 202, 36,
1741  203, 64, 565, 0, 34, 200, 35, 201, 62, 422,
1742  423, 573, 424, 0, 573, 349, 0, 0, 347, 0,
1743  0, 0, 309, 0, 0, 412, 0, 317, 0, 0,
1744  412, 320, 541, 562, 0, 498, 324, 0, 0, 198,
1745  0, 0, 252, 294, 524, 562, 0, 362, 0, 521,
1746  562, 0, 0, 523, 573, 573, 537, 573, 529, 573,
1747  573, 0, 0, 390, 387, 388, 391, 0, 383, 371,
1748  373, 0, 376, 0, 378, 400, 269, 239, 33, 199,
1749  0, 0, 426, 350, 0, 12, 428, 0, 301, 302,
1750  0, 0, 266, 573, 312, 0, 495, 315, 497, 322,
1751  513, 416, 414, 0, 354, 365, 0, 360, 356, 395,
1752  398, 397, 0, 501, 0, 503, 0, 509, 0, 506,
1753  511, 460, 0, 525, 0, 385, 573, 573, 573, 527,
1754  573, 573, 0, 425, 0, 99, 100, 107, 0, 427,
1755  0, 305, 308, 418, 419, 417, 0, 0, 0, 58,
1756  0, 363, 0, 358, 573, 573, 573, 573, 286, 0,
1757  389, 0, 368, 0, 370, 377, 0, 374, 379, 106,
1758  0, 573, 0, 573, 573, 0, 318, 0, 361, 0,
1759  502, 0, 499, 504, 507, 555, 285, 573, 573, 573,
1760  573, 555, 105, 562, 551, 552, 420, 348, 313, 325,
1761  359, 573, 369, 0, 366, 372, 375, 412, 500, 573,
1762  367
1763 };
1764 
1765 /* YYDEFGOTO[NTERM-NUM]. */
1766 static const yytype_int16 yydefgoto[] =
1767 {
1768  -1, 1, 2, 64, 65, 66, 229, 539, 540, 244,
1769  245, 421, 68, 69, 339, 70, 71, 583, 719, 72,
1770  73, 246, 74, 75, 76, 449, 77, 202, 358, 359,
1771  186, 187, 188, 189, 584, 536, 191, 79, 423, 204,
1772  250, 529, 674, 410, 411, 218, 219, 206, 397, 412,
1773  488, 80, 337, 435, 604, 341, 800, 342, 801, 697,
1774  926, 701, 698, 875, 566, 568, 711, 880, 237, 82,
1775  83, 84, 85, 86, 87, 88, 89, 90, 91, 678,
1776  542, 686, 797, 798, 350, 738, 739, 740, 763, 654,
1777  655, 764, 844, 845, 268, 269, 454, 633, 745, 301,
1778  483, 92, 93, 388, 577, 576, 549, 925, 680, 791,
1779  861, 865, 94, 95, 96, 97, 98, 99, 100, 280,
1780  467, 101, 282, 276, 274, 278, 459, 646, 645, 755,
1781  759, 102, 275, 103, 104, 209, 210, 107, 211, 212,
1782  561, 700, 709, 710, 635, 636, 637, 638, 639, 766,
1783  767, 640, 641, 642, 643, 836, 747, 377, 567, 255,
1784  413, 214, 238, 608, 531, 571, 290, 407, 408, 670,
1785  439, 543, 345, 248
1786 };
1787 
1788 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1789  STATE-NUM. */
1790 #define YYPACT_NINF -747
1791 static const yytype_int16 yypact[] =
1792 {
1793  -747, 81, 2552, -747, 7102, -747, -747, -747, 6615, -747,
1794  -747, -747, -747, -747, -747, -747, 7320, 7320, -747, -747,
1795  7320, 3237, 2814, -747, -747, -747, -747, 100, 6476, -31,
1796  -747, -26, -747, -747, -747, 5715, 2955, -747, -747, 5842,
1797  -747, -747, -747, -747, -747, -747, 8519, 8519, 83, 4434,
1798  8628, 7538, 7865, 6878, -747, 6337, -747, -747, -747, -24,
1799  29, 252, 8737, 8519, -747, 193, -747, 1104, -747, 458,
1800  -747, -747, 129, 77, -747, 69, 8846, -747, 139, 2797,
1801  22, 41, -747, 8628, 8628, -747, -747, 5078, 8951, 9056,
1802  9161, 5588, 33, 46, -747, -747, 157, -747, -747, -747,
1803  -747, -747, -747, -747, -747, 25, 58, -747, 179, 613,
1804  51, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1805  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1806  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1807  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1808  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1809  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1810  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1811  -747, -747, -747, -747, -747, -747, -747, -747, -747, 134,
1812  -747, -747, -747, -747, 182, 8519, 279, 4564, 8519, 8519,
1813  8519, -747, 263, 2797, 260, -747, -747, 237, 207, 43,
1814  206, 298, 254, 265, -747, -747, -747, 4969, -747, 7320,
1815  7320, -747, -747, 5208, -747, 8628, 661, -747, 272, 287,
1816  4694, -747, -747, -747, 295, 307, -747, 304, 51, 416,
1817  619, 7211, 4434, 384, 193, 1104, -31, 399, -747, 458,
1818  419, 221, 300, -747, 260, 430, 300, -747, -31, 497,
1819  501, 9266, 442, -747, 351, 366, 383, 409, -747, -747,
1820  -747, -747, -747, -747, 644, -747, 754, 813, 605, 464,
1821  819, 478, 68, 530, 532, -747, -747, -747, -747, -747,
1822  -747, -747, 5317, 8628, 8628, 8628, 8628, 7211, 8628, 8628,
1823  -747, -747, 7974, -747, 4434, 6990, 470, 7974, 8519, 8519,
1824  8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519,
1825  8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519,
1826  8519, 8519, 8519, 8519, 9548, 7320, 9625, 3609, 458, 86,
1827  86, 8628, 8628, 193, 597, 480, 562, -747, -747, 454,
1828  601, 54, 76, 99, 331, 349, 8628, 481, -747, 45,
1829  473, -747, -747, -747, -747, 217, 286, 305, 318, 321,
1830  347, 363, 376, 381, -747, -747, -747, 391, 10549, 10549,
1831  -747, -747, -747, -747, 8737, 8737, -747, 535, -747, -747,
1832  -747, 388, -747, -747, 8519, 8519, 7429, -747, -747, 9702,
1833  7320, 9779, 8519, 8519, 7647, -747, -31, 492, -747, -747,
1834  -31, -747, 506, 539, -747, 106, -747, -747, -747, -747,
1835  -747, 6615, -747, 8519, 4029, 508, 9702, 9779, 8519, 1104,
1836  -31, -747, -747, 5445, 541, -31, -747, 7756, -747, -747,
1837  7865, -747, -747, -747, 272, 510, -747, -747, -747, 543,
1838  9266, 9856, 7320, 9933, 774, -747, -747, -747, -747, -747,
1839  -747, -747, -747, -747, -747, -747, -747, 313, -747, -747,
1840  491, -747, 8519, 8519, -747, -747, -747, -747, -747, -747,
1841  -747, -747, -747, 32, 8519, -747, 545, 546, -747, -31,
1842  9266, 551, -747, -747, -747, 566, 9473, -747, -747, 416,
1843  2184, 2184, 2184, 2184, 781, 781, 2273, 2938, 2184, 2184,
1844  1364, 1364, 662, 662, 2656, 781, 781, 927, 927, 768,
1845  397, 397, 416, 416, 416, 3378, 6083, 3464, 6197, -747,
1846  307, -747, -31, 647, -747, 660, -747, -747, 3096, 650,
1847  688, -747, 3754, 685, 4174, 56, 56, 597, 8083, 650,
1848  112, 10010, 7320, 10087, -747, 458, -747, 510, -747, 193,
1849  -747, -747, -747, 10164, 7320, 10241, 3609, 8628, 1131, -747,
1850  -747, -747, -747, -747, 1739, 1739, 32, 32, -747, 10608,
1851  -747, 2797, -747, -747, 6615, 10627, -747, 8519, 260, -747,
1852  265, 5969, 2673, -31, 490, 500, -747, -747, -747, -747,
1853  7429, 7647, -747, -747, 8628, 2797, 570, -747, 307, 307,
1854  2797, 213, 1104, -747, 300, 9266, 543, 505, 282, -31,
1855  38, 261, 603, -747, -747, -747, -747, 972, -747, -747,
1856  -747, -747, 1223, 66, -747, -747, -747, -747, 580, -747,
1857  583, 683, 589, 687, -747, -747, 893, -747, -747, -747,
1858  416, 416, -747, 576, 4839, -747, -747, 604, 8192, -747,
1859  543, 9266, 8737, 8519, 630, 8737, 8737, -747, 535, 608,
1860  677, 8737, 8737, -747, -747, 535, -747, -747, -747, 8301,
1861  740, -747, 588, -747, 740, -747, -747, -747, -747, 650,
1862  44, -747, 239, 257, -31, 141, 145, 8628, 193, -747,
1863  8628, 3609, 505, 282, -747, -31, 650, 106, 1223, 3609,
1864  193, 6754, -747, -747, -747, -747, 4839, 4694, 8519, 32,
1865  -747, -747, -747, 8519, 8519, 507, 8519, 8519, 636, 106,
1866  -747, -747, -747, 291, 8519, -747, 972, 457, -747, 651,
1867  -31, -747, 639, 4839, 4694, -747, 1223, -747, -747, 1223,
1868  -747, -747, 598, -747, -747, 4694, -747, -747, -747, -747,
1869  -747, 681, 1017, 639, 679, 654, -747, 656, 657, -747,
1870  -747, 789, 8519, 664, 543, 2797, 8519, -747, 2797, -747,
1871  2797, -747, -747, 8737, -747, 2797, -747, 2797, -747, 545,
1872  -747, 713, -747, 4304, 796, -747, 8628, 650, -747, 650,
1873  4839, 4839, -747, 8410, 3899, 189, 56, -747, 193, 650,
1874  -747, -747, -747, -31, 650, -747, -747, 799, 673, 2797,
1875  4694, 8519, 7647, -747, -747, -31, 884, 671, 1079, -747,
1876  -31, 803, 686, -747, 676, 678, -747, 684, -747, 694,
1877  684, 690, 9371, -747, 699, -747, -747, 711, -747, 1251,
1878  -747, 1251, -747, 598, -747, -747, 700, 2797, -747, 2797,
1879  9476, 86, -747, -747, 4839, -747, -747, 86, -747, -747,
1880  650, 650, -747, 365, -747, 3609, -747, -747, -747, -747,
1881  1131, -747, -747, 706, -747, 707, 884, 716, -747, -747,
1882  -747, -747, 1223, -747, 598, -747, 598, -747, 598, -747,
1883  -747, -747, 790, 520, 1017, -747, 708, 715, 684, -747,
1884  717, 684, 797, -747, 523, 366, 383, 409, 3609, -747,
1885  3754, -747, -747, -747, -747, -747, 4839, 650, 3609, -747,
1886  884, 707, 884, 721, 684, 727, 684, 684, -747, 10318,
1887  -747, 1251, -747, 598, -747, -747, 598, -747, -747, 510,
1888  10395, 7320, 10472, 688, 588, 650, -747, 650, 707, 884,
1889  -747, 598, -747, -747, -747, 730, 731, 684, 735, 684,
1890  684, 55, 282, -31, 128, 158, -747, -747, -747, -747,
1891  707, 684, -747, 598, -747, -747, -747, 163, -747, 684,
1892  -747
1893 };
1894 
1895 /* YYPGOTO[NTERM-NUM]. */
1896 static const yytype_int16 yypgoto[] =
1897 {
1898  -747, -747, -747, 452, -747, 28, -747, -545, 277, -747,
1899  39, -747, -293, 184, -58, 71, -747, -169, -747, -7,
1900  791, -142, -13, -37, -747, -396, -29, 1623, -312, 788,
1901  -54, -747, -25, -747, -747, 20, -747, 1066, -747, -45,
1902  -747, 11, 47, -324, 115, 5, -747, -322, -196, 53,
1903  -295, 8, -747, -747, -747, -747, -747, -747, -747, -747,
1904  -747, -747, -747, -747, -747, -747, -747, -747, 2, -747,
1905  -747, -747, -747, -747, -747, -747, -747, -747, -747, 205,
1906  -338, -516, -72, -618, -747, -722, -671, 147, -747, -489,
1907  -747, -600, -747, -12, -747, -747, -747, -747, -747, -747,
1908  -747, -747, -747, 798, -747, -747, -531, -747, -50, -747,
1909  -747, -747, -747, -747, -747, 811, -747, -747, -747, -747,
1910  -747, -747, -747, -747, 856, -747, -140, -747, -747, -747,
1911  -747, 7, -747, 12, -747, 1268, 1605, 823, 1289, 1575,
1912  -747, -747, 35, -387, -697, -568, -690, 273, -696, -746,
1913  72, 181, -747, -526, -747, -449, 270, -747, -747, -747,
1914  97, -360, 758, -276, -747, -747, -56, -4, 278, -585,
1915  -214, 6, -18, -2
1916 };
1917 
1918 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1919  positive, shift that token. If negative, reduce the rule which
1920  number is the opposite. If YYTABLE_NINF, syntax error. */
1921 #define YYTABLE_NINF -574
1922 static const yytype_int16 yytable[] =
1923 {
1924  111, 273, 544, 227, 81, 644, 81, 254, 725, 201,
1925  201, 532, 498, 201, 493, 192, 689, 405, 208, 208,
1926  193, 706, 208, 225, 262, 228, 340, 222, 190, 343,
1927  688, 344, 112, 221, 733, 192, 247, 375, 441, 306,
1928  193, 67, 443, 67, 596, 558, 559, 292, 190, 253,
1929  257, 81, 208, 838, 616, 264, 833, 541, 530, 741,
1930  538, 263, 794, -93, 208, 846, 799, 634, -103, 207,
1931  207, 291, 380, 207, 589, 190, 593, 380, 264, -99,
1932  596, 3, 589, 685, 263, 208, 208, 716, 717, 208,
1933  349, 360, 360, 291, 660, 743, 263, 263, 263, 541,
1934  430, -100, 574, 575, 251, 909, 888, -330, 652, 805,
1935  230, 190, -489, 213, 213, 387, 224, 213, 378, 644,
1936  810, 386, 279, 530, -107, 538, 334, 768, 619, 470,
1937  -489, 205, 215, 285, -99, 216, 461, -106, 464, 240,
1938  468, -102, 830, 298, 299, -490, 653, -93, 252, 256,
1939  390, 609, -99, 392, 393, 885, 809, 300, 560, 833,
1940  -330, -330, 489, 847, 814, -90, -102, -100, 741, 827,
1941  -104, -104, 379, 744, 471, 281, -101, 609, -93, 335,
1942  336, -93, 381, 644, 803, -93, 302, 381, 432, 288,
1943  288, 289, 289, 220, -90, 909, 838, -551, -91, 81,
1944  -103, 288, -103, 289, 769, 398, 833, 846, 888, 303,
1945  201, 398, 201, 201, -101, 931, -91, 405, 414, 208,
1946  835, 208, 208, 839, 448, 208, 433, 208, 694, 247,
1947  820, 288, 81, 289, 249, 476, 477, 478, 479, -98,
1948  705, 596, 223, 81, 81, 742, 221, 224, 307, 386,
1949  291, 704, -97, 224, 444, 923, 56, 486, 741, 644,
1950  741, 958, 497, 264, -103, 774, 384, 338, 338, 263,
1951  207, 338, 207, -102, 389, -102, 491, 609, 589, 589,
1952  429, -93, -105, 545, 546, -95, -95, 547, 980, 609,
1953  874, 247, 399, -490, 81, 208, 208, 208, 208, 81,
1954  208, 208, -481, -104, 208, -104, 81, 264, -101, 208,
1955  -101, 283, 284, 263, 213, -100, 213, -412, 741, 933,
1956  475, 813, -71, 907, 223, 910, 243, 648, 201, -92,
1957  927, 67, 406, 414, 409, 391, 480, 208, 288, 81,
1958  289, 403, 924, 208, 208, 400, 401, 537, 395, 291,
1959  586, 588, 804, -85, 528, 487, -481, -548, 208, 254,
1960  487, 437, 741, -107, 741, 562, 935, -285, 438, 493,
1961  -95, -480, 394, 485, 455, -549, -412, 396, 494, -94,
1962  793, -551, 548, 957, 790, 402, 208, 208, 987, 426,
1963  -482, 741, 588, 201, 722, 254, 603, -96, 414, -552,
1964  731, -95, 208, -483, -95, 404, -485, 415, -95, 417,
1965  398, 398, 537, 448, 422, 968, -475, 456, 457, 528,
1966  -285, -285, 111, 424, -552, -480, 81, -412, 192, -412,
1967  -412, 644, -484, 193, -478, 81, 451, 217, 537, 657,
1968  440, 190, 400, 427, -482, 201, 528, 438, -486, 220,
1969  414, -487, 264, 448, 208, 578, 580, -483, 263, 647,
1970  -485, -475, 596, 67, 537, 308, -478, -548, -488, -475,
1971  -475, 528, 612, -548, 243, 428, 569, 338, 338, 338,
1972  338, 656, 481, 482, 308, -549, -484, -478, -478, 452,
1973  453, -549, 264, 590, -278, 298, 299, -106, 263, 781,
1974  589, 416, -486, 497, -487, -487, 788, 425, -70, 735,
1975  664, 623, 624, 625, 626, -475, 331, 332, 333, 243,
1976  -478, -488, -488, 918, 434, 338, 338, 431, 669, 920,
1977  570, -555, 722, 556, 614, 668, 676, 557, 681, 551,
1978  555, 667, 721, 675, 81, 201, 81, -278, -278, 673,
1979  414, 687, 687, 445, 208, 588, 254, 201, 563, 720,
1980  446, 447, 414, 436, 537, 699, 208, 442, 81, 208,
1981  465, 528, 676, 676, 656, 656, 537, 726, 732, 713,
1982  715, 243, 450, 528, 469, 673, 673, 727, 398, 669,
1983  -555, 192, 552, 553, 821, -286, 193, 826, 472, -102,
1984  473, 690, 796, 793, 190, 939, 208, 676, 950, -104,
1985  492, 564, 565, 773, 548, 669, -101, 264, 550, 667,
1986  673, 712, 714, 263, 448, 474, 554, 973, 761, 582,
1987  623, 624, 625, 626, 789, 598, 748, 649, 748, 806,
1988  748, -555, 808, -555, -555, 607, 600, -551, -286, -286,
1989  735, 770, 623, 624, 625, 626, 81, 816, 564, 565,
1990  677, 951, 952, 264, 208, 627, 455, 208, 208, 263,
1991  463, 628, 629, 208, 208, 662, 609, 792, 795, 601,
1992  795, -85, 795, 615, 597, -264, 658, 627, 599, 824,
1993  669, 661, 630, 602, 629, 631, 679, 728, 683, 208,
1994  385, 669, 208, 81, 807, 455, 428, 730, 611, 456,
1995  457, 81, 734, 613, 630, 418, 815, 656, 81, 81,
1996  746, 762, -107, 749, 419, 420, 398, 856, -106, 752,
1997  308, 190, 487, 494, 671, 751, 777, 779, 867, 754,
1998  770, 776, 784, 786, -265, 81, 81, 672, 456, 457,
1999  458, 707, 782, -98, 691, 793, -102, 81, 872, -97,
2000  110, 770, 110, 748, 783, 748, 748, 659, 735, -104,
2001  623, 624, 625, 626, 110, 110, 822, 254, 110, 329,
2002  330, 331, 332, 333, 762, 208, -101, -93, 729, 862,
2003  842, 828, 866, 848, 849, 81, 851, 853, 208, 855,
2004  -95, 860, 81, 81, -266, 864, 81, 110, 110, 881,
2005  882, 886, 687, 890, 876, 455, 892, -92, 894, 682,
2006  110, 684, 81, 891, 896, 905, 622, 901, 623, 624,
2007  625, 626, 748, 748, 898, 748, 308, 748, 748, 904,
2008  -267, 110, 110, 929, 903, 110, 938, 930, 941, 308,
2009  263, 321, 322, 949, 858, 943, 932, 946, 456, 457,
2010  460, 959, 914, 627, 321, 322, 81, 961, 263, 628,
2011  629, 795, -551, -552, 455, 983, 606, 81, 364, 347,
2012  455, 338, 977, 825, 338, 329, 330, 331, 332, 333,
2013  630, 382, 940, 631, 802, 326, 327, 328, 329, 330,
2014  331, 332, 333, 976, 748, 748, 748, 383, 748, 748,
2015  750, 811, 753, 277, 376, 928, 632, 456, 457, 462,
2016  81, 906, 81, 456, 457, 466, 765, 834, 81, 0,
2017  81, 771, 748, 748, 748, 748, 735, 0, 623, 624,
2018  625, 626, 0, 0, 201, 0, 0, 756, 757, 414,
2019  758, 681, 795, 208, 0, 110, 44, 45, 0, 528,
2020  0, 0, 0, 537, 0, 748, 748, 748, 748, 669,
2021  528, 0, 0, 736, 0, 110, 0, 110, 110, 748,
2022  338, 110, 0, 110, 0, 812, 0, 748, 110, 0,
2023  0, 0, 0, 817, 818, 308, 0, 0, 0, 110,
2024  110, 0, 868, 0, 869, 0, 0, 823, 0, 0,
2025  321, 322, 0, 0, 877, 0, 0, 0, 829, 879,
2026  831, 832, 837, 0, 735, 840, 623, 624, 625, 626,
2027  0, 0, 841, 0, 0, 850, 0, 852, 854, 0,
2028  0, 0, 0, 328, 329, 330, 331, 332, 333, 0,
2029  110, 110, 110, 110, 110, 110, 110, 110, 0, 0,
2030  110, 736, 110, 0, 0, 110, 0, 737, 0, 843,
2031  863, 623, 624, 625, 626, 921, 922, 870, 871, 0,
2032  0, 873, 203, 203, 0, 0, 203, 0, 0, 0,
2033  0, 878, 0, 110, 0, 110, 0, 883, 0, 110,
2034  110, 0, 0, 884, 893, 895, 0, 897, 889, 899,
2035  900, 0, 236, 239, 110, 0, 0, 203, 203, 0,
2036  0, 0, 0, 0, 908, 0, 911, 0, 286, 287,
2037  0, 735, 956, 623, 624, 625, 626, 0, 0, 0,
2038  0, 919, 110, 110, 293, 294, 295, 296, 297, 0,
2039  0, 0, 0, 0, 0, 0, 0, 0, 110, 0,
2040  978, 0, 979, 0, 0, 934, 0, 936, 736, 0,
2041  0, 937, 0, 0, 887, 0, 942, 944, 945, 0,
2042  947, 948, 110, 622, 0, 623, 624, 625, 626, 0,
2043  0, 110, 0, 0, 0, 953, 0, 954, 0, 0,
2044  0, 0, 0, 955, 960, 962, 963, 964, 0, 0,
2045  110, 0, 0, 0, 967, 0, 969, 0, 0, 970,
2046  627, 0, 0, 0, 0, 0, 628, 629, 0, 0,
2047  0, 0, 0, 0, 981, 0, 0, 982, 984, 985,
2048  986, 0, 0, 0, 0, 0, 0, 630, 0, 0,
2049  631, 988, 0, 0, 0, 0, 989, 0, 0, 990,
2050  0, 203, 0, 0, 203, 203, 286, 0, 0, 0,
2051  105, 0, 105, 708, 0, 622, 0, 623, 624, 625,
2052  626, 0, 0, 203, 0, 203, 203, 0, 0, 0,
2053  0, 108, 0, 108, 0, 0, 0, 0, 0, 0,
2054  110, 0, 110, 761, 0, 623, 624, 625, 626, 0,
2055  110, 0, 627, 0, 0, 0, 0, 105, 628, 629,
2056  0, 265, 110, 0, 110, 110, 0, 0, 0, 0,
2057  0, 0, 0, 0, 0, 0, 0, 0, 108, 630,
2058  627, 0, 631, 0, 265, 0, 628, 629, 0, 0,
2059  0, 0, 0, 0, 0, 0, 351, 361, 361, 361,
2060  0, 0, 110, 0, 0, 0, 0, 630, 203, 0,
2061  631, 0, 0, 496, 499, 500, 501, 502, 503, 504,
2062  505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
2063  515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
2064  0, 203, 0, 0, 0, 0, 0, 0, 0, 0,
2065  0, 0, 110, 0, 0, 0, 0, 0, 0, 0,
2066  110, 0, 0, 110, 110, 0, 0, 0, 0, 110,
2067  110, 0, 308, 309, 310, 311, 312, 313, 314, 315,
2068  316, 317, 318, -574, -574, 0, 0, 321, 322, 0,
2069  579, 581, 0, 0, 0, 110, 0, 0, 110, 110,
2070  585, 203, 203, 0, 0, 105, 203, 110, 579, 581,
2071  203, 0, 0, 0, 110, 110, 324, 325, 326, 327,
2072  328, 329, 330, 331, 332, 333, 108, 0, 0, 605,
2073  0, 0, 0, 0, 610, 0, 0, 0, 105, 0,
2074  0, 110, 110, 203, 0, 0, 203, 0, 0, 105,
2075  105, 0, 0, 110, 0, 0, 0, 0, 203, 108,
2076  0, 0, 0, 0, 0, 0, 0, 0, 0, 265,
2077  108, 108, 0, 0, 0, 0, 0, 0, 650, 651,
2078  0, 110, 0, 0, 0, 0, 0, 0, 0, 0,
2079  203, 110, 0, 0, 110, 0, 0, 0, 110, 110,
2080  105, 0, 110, 0, 0, 105, 0, 0, 0, 0,
2081  0, 0, 105, 265, 0, 0, 0, 109, 110, 109,
2082  0, 108, 0, 0, 0, 0, 108, 0, 0, 0,
2083  0, 0, 0, 108, 0, 0, 0, 0, 0, 0,
2084  0, 0, 0, 0, 0, 105, 0, 106, 0, 106,
2085  0, 0, 0, 0, 203, 0, 0, 0, 203, 0,
2086  0, 0, 110, 0, 109, 78, 108, 78, 267, 0,
2087  203, 0, 0, 110, 0, 0, 0, 0, 0, 0,
2088  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2089  0, 267, 0, 203, 106, 0, 0, 0, 266, 0,
2090  0, 0, 0, 353, 363, 363, 203, 203, 0, 0,
2091  0, 0, 78, 0, 0, 0, 110, 0, 110, 0,
2092  0, 266, 0, 0, 110, 0, 110, 0, 0, 0,
2093  0, 0, 105, 352, 362, 362, 362, 0, 0, 0,
2094  0, 105, 0, 0, 0, 0, 0, 0, 0, 110,
2095  0, 348, 0, 108, 0, 0, 0, 0, 265, 0,
2096  0, 0, 108, 0, 203, 0, 0, 0, 585, 775,
2097  0, 778, 780, 0, 0, 0, 0, 785, 787, -573,
2098  0, 0, 0, 0, 0, 203, 0, -573, -573, -573,
2099  0, 0, -573, -573, -573, 0, -573, 0, 265, 0,
2100  0, 0, 0, 0, 0, 0, -573, 0, 0, 0,
2101  0, 0, 109, 0, 0, 0, -573, -573, 0, -573,
2102  -573, -573, -573, -573, 819, 0, 0, 0, 0, 778,
2103  780, 0, 785, 787, 0, 0, 0, 0, 0, 0,
2104  203, 0, 106, 0, 0, 109, 0, 0, 0, 0,
2105  105, 0, 105, 0, 0, 0, 109, 109, 0, 0,
2106  78, 0, 0, 0, -573, 0, 0, 0, 0, 0,
2107  0, 108, 0, 108, 105, 106, 267, 0, 203, 0,
2108  0, 0, 857, 0, 0, 0, 106, 106, 0, 859,
2109  0, 0, 0, 78, 0, 108, 0, 0, 0, 0,
2110  0, 0, 0, 0, 78, 78, 266, 109, 0, 203,
2111  0, 0, 109, 0, 0, 0, -573, 0, -573, 109,
2112  267, 220, -573, 265, -573, 0, -573, 859, 203, 0,
2113  0, 0, 0, 0, 0, 0, 0, 106, 0, 0,
2114  0, 0, 106, 0, 0, 0, 0, 0, 0, 106,
2115  266, 0, 109, 0, 0, 78, 0, 0, 0, 0,
2116  78, 0, 105, 0, 0, 0, 0, 78, 0, 265,
2117  495, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2118  0, 0, 106, 108, 0, 0, 0, 0, 0, 0,
2119  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2120  78, 0, 0, 0, 0, 0, 0, 0, 0, 105,
2121  0, 0, 0, 0, 0, 0, 0, 105, 0, 0,
2122  0, 0, 0, 0, 105, 105, 0, 0, 0, 0,
2123  108, 0, 0, 0, 0, 0, 0, 0, 108, 109,
2124  0, 0, 0, 0, 0, 108, 108, 0, 109, 0,
2125  0, 105, 105, 0, 0, 0, 0, 203, 0, 0,
2126  0, 0, 0, 105, 0, 267, 0, 0, 0, 106,
2127  0, 0, 108, 108, 0, 0, 0, 0, 106, 0,
2128  0, 0, 0, 0, 108, 0, 0, 78, 0, 0,
2129  0, 0, 0, 0, 0, 266, 78, 0, 0, 0,
2130  0, 105, 0, 0, 0, 267, 0, 0, 105, 105,
2131  0, 0, 105, 0, 0, 0, 0, 0, 0, 0,
2132  0, 0, 108, 0, 0, 0, 0, 0, 105, 108,
2133  108, 0, 0, 108, 0, 266, 0, 0, 0, 0,
2134  0, 0, 0, 0, 0, 0, 0, 0, 0, 108,
2135  361, 0, 0, 0, 0, 0, 0, 109, 0, 109,
2136  0, 0, 0, 0, 0, 0, 0, 0, 915, 0,
2137  0, 0, 105, 0, 0, 0, 0, 0, 0, 0,
2138  0, 109, 0, 105, 0, 0, 0, 106, 0, 106,
2139  0, 0, 0, 108, 0, 0, 0, 0, 0, 0,
2140  0, 0, 0, 0, 108, 78, 0, 78, 0, 0,
2141  0, 106, 0, 0, 0, 0, 0, 0, 0, 0,
2142  0, 0, 0, 0, 0, 0, 105, 0, 105, 78,
2143  267, 0, 0, 0, 105, 0, 105, 0, 0, 0,
2144  0, 0, 0, 0, 0, 0, 0, 108, 0, 108,
2145  0, 0, 0, 0, 0, 108, 0, 108, 0, 0,
2146  266, 760, 0, 0, 0, 0, 0, 0, 0, 109,
2147  0, 0, 0, 0, 0, 0, 267, 0, 0, 0,
2148  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2149  0, 0, 308, -574, -574, -574, -574, 313, 314, 106,
2150  0, -574, -574, 0, 0, 0, 266, 321, 322, 0,
2151  0, 0, 0, 0, 0, 0, 109, 78, 0, 0,
2152  0, 0, 0, 0, 109, 495, 0, 0, 0, 0,
2153  0, 109, 109, 0, 0, 0, 324, 325, 326, 327,
2154  328, 329, 330, 331, 332, 333, 106, 0, 0, 0,
2155  0, 0, 0, 0, 106, 0, 0, 0, 109, 109,
2156  0, 106, 106, 0, 78, 0, 0, 0, 0, 0,
2157  109, 0, 78, 0, 0, 0, 0, 0, 0, 78,
2158  78, 308, 309, 310, 311, 312, 313, 314, 106, 106,
2159  317, 318, 0, 0, 0, 0, 321, 322, 0, 0,
2160  106, 0, 0, 0, 0, 0, 78, 78, 109, 0,
2161  0, 0, 0, 0, 0, 109, 109, 0, 78, 109,
2162  0, 0, 0, 0, 0, 324, 325, 326, 327, 328,
2163  329, 330, 331, 332, 333, 109, 0, 0, 106, 0,
2164  0, 0, 0, 0, 0, 106, 106, 0, 0, 106,
2165  0, 0, 0, 0, 0, 0, 78, 363, 0, 0,
2166  0, 0, 0, 78, 78, 106, 0, 78, 0, 0,
2167  0, 0, 0, 0, 0, 917, 0, 0, 0, 109,
2168  0, 0, 0, 78, 0, 0, 0, 362, 0, 0,
2169  109, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2170  0, 0, 0, 0, 0, 916, 0, 0, 0, 106,
2171  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2172  106, 0, 0, 913, 0, 0, 0, 78, 0, 0,
2173  0, 0, 0, 109, 0, 109, 0, 0, 78, 0,
2174  0, 109, 0, 109, 0, 0, 0, 0, 0, 0,
2175  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2176  0, 0, 0, 106, 0, 106, 0, 0, 0, 0,
2177  0, 106, 0, 106, 0, 0, 0, 0, 0, 0,
2178  0, 78, 0, 78, 0, 0, 0, 0, 0, 78,
2179  0, 78, -573, 4, 0, 5, 6, 7, 8, 9,
2180  0, 0, 0, 10, 11, 0, 0, 0, 12, 0,
2181  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
2182  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2183  0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
2184  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2185  0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
2186  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2187  0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
2188  0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
2189  55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
2190  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2191  0, 0, 0, -285, 61, 62, 63, 0, 0, 0,
2192  0, -285, -285, -285, 0, 0, -285, -285, -285, 0,
2193  -285, 0, 0, 0, 0, 0, 0, -573, 0, -573,
2194  -285, -285, -285, 0, 0, 0, 0, 0, 0, 0,
2195  -285, -285, 0, -285, -285, -285, -285, -285, 0, 0,
2196  0, 0, 0, 0, 308, 309, 310, 311, 312, 313,
2197  314, 315, 316, 317, 318, 319, 320, 0, 0, 321,
2198  322, -285, -285, -285, -285, -285, -285, -285, -285, -285,
2199  -285, -285, -285, -285, 0, 0, -285, -285, -285, 0,
2200  724, -285, 0, 0, 0, 0, 323, -285, 324, 325,
2201  326, 327, 328, 329, 330, 331, 332, 333, 0, 0,
2202  -285, 0, -105, -285, -285, -285, -285, -285, -285, -285,
2203  -285, -285, -285, -285, -285, 0, 0, 0, 0, 0,
2204  0, 0, 0, 224, 0, 0, 0, 0, 0, 0,
2205  -285, -285, -285, -285, -411, 0, -285, -285, -285, 0,
2206  -285, 0, -411, -411, -411, 0, 0, -411, -411, -411,
2207  0, -411, 0, 0, 0, 0, 0, 0, 0, 0,
2208  -411, -411, -411, 0, 0, 0, 0, 0, 0, 0,
2209  0, -411, -411, 0, -411, -411, -411, -411, -411, 0,
2210  0, 0, 0, 0, 0, 308, 309, 310, 311, 312,
2211  313, 314, 315, 316, 317, 318, 319, 320, 0, 0,
2212  321, 322, -411, -411, -411, -411, -411, -411, -411, -411,
2213  -411, -411, -411, -411, -411, 0, 0, -411, -411, -411,
2214  0, 0, -411, 0, 0, 0, 0, 323, -411, 324,
2215  325, 326, 327, 328, 329, 330, 331, 332, 333, 0,
2216  0, 0, 0, 0, -411, 0, -411, -411, -411, -411,
2217  -411, -411, -411, -411, -411, -411, 0, 0, 0, 0,
2218  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2219  -411, -411, -411, -411, -411, -279, 220, -411, -411, -411,
2220  0, -411, 0, -279, -279, -279, 0, 0, -279, -279,
2221  -279, 0, -279, 0, 0, 0, 0, 0, 0, 0,
2222  0, 0, -279, -279, -279, 0, 0, 0, 0, 0,
2223  0, 0, -279, -279, 0, -279, -279, -279, -279, -279,
2224  0, 0, 0, 0, 0, 0, 308, 309, 310, 311,
2225  312, 313, 314, 315, 0, 317, 318, 0, 0, 0,
2226  0, 321, 322, -279, -279, -279, -279, -279, -279, -279,
2227  -279, -279, -279, -279, -279, -279, 0, 0, -279, -279,
2228  -279, 0, 0, -279, 0, 0, 0, 0, 0, -279,
2229  324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
2230  0, 0, -279, 0, 0, -279, -279, -279, -279, -279,
2231  -279, -279, -279, -279, -279, -279, -279, 0, 0, 0,
2232  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2233  0, 0, -279, -279, -279, -279, -573, 0, -279, -279,
2234  -279, 0, -279, 0, -573, -573, -573, 0, 0, -573,
2235  -573, -573, 0, -573, 0, 0, 0, 0, 0, 0,
2236  0, 0, -573, -573, -573, 0, 0, 0, 0, 0,
2237  0, 0, 0, -573, -573, 0, -573, -573, -573, -573,
2238  -573, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2239  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2240  0, 0, 0, 0, -573, -573, -573, -573, -573, -573,
2241  -573, -573, -573, -573, -573, -573, -573, 0, 0, -573,
2242  -573, -573, 0, 0, -573, 0, 0, 0, 0, 0,
2243  -573, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2244  0, 0, 0, 0, 0, 0, -573, 0, -573, -573,
2245  -573, -573, -573, -573, -573, -573, -573, -573, 0, 0,
2246  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2247  0, 0, -573, -573, -573, -573, -573, -292, 220, -573,
2248  -573, -573, 0, -573, 0, -292, -292, -292, 0, 0,
2249  -292, -292, -292, 0, -292, 0, 0, 0, 0, 0,
2250  0, 0, 0, 0, -292, -292, 0, 0, 0, 0,
2251  0, 0, 0, 0, -292, -292, 0, -292, -292, -292,
2252  -292, -292, 0, 0, 0, 0, 0, 0, 0, 0,
2253  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2254  0, 0, 0, 0, 0, -292, -292, -292, -292, -292,
2255  -292, -292, -292, -292, -292, -292, -292, -292, 0, 0,
2256  -292, -292, -292, 0, 0, -292, 0, 0, 0, 0,
2257  0, -292, 0, 0, 0, 0, 0, 0, 0, 0,
2258  0, 0, 0, 0, 0, 0, 0, -292, 0, -292,
2259  -292, -292, -292, -292, -292, -292, -292, -292, -292, 0,
2260  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2261  0, 0, 0, 0, -292, -292, -292, -292, -555, 217,
2262  -292, -292, -292, 0, -292, 0, -555, -555, -555, 0,
2263  0, 0, -555, -555, 0, -555, 0, 0, 0, 0,
2264  0, 0, 0, 0, -555, 0, 0, 0, 0, 0,
2265  0, 0, 0, 0, 0, -555, -555, 0, -555, -555,
2266  -555, -555, -555, 0, 0, 0, 0, 0, 0, 0,
2267  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2268  0, 0, 0, 0, 0, 0, -555, -555, -555, -555,
2269  -555, -555, -555, -555, -555, -555, -555, -555, -555, 0,
2270  0, -555, -555, -555, -285, 665, 0, 0, 0, 0,
2271  0, 0, -285, -285, -285, 0, 0, 0, -285, -285,
2272  0, -285, 0, 0, 0, 0, 0, -103, -555, 0,
2273  -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
2274  0, -285, -285, 0, -285, -285, -285, -285, -285, 0,
2275  0, 0, 0, 0, -555, -555, -555, -555, -94, 0,
2276  0, -555, 0, -555, 0, -555, 0, 0, 0, 0,
2277  0, 0, -285, -285, -285, -285, -285, -285, -285, -285,
2278  -285, -285, -285, -285, -285, 0, 0, -285, -285, -285,
2279  0, 666, 0, 0, 0, 0, 0, 0, 0, 0,
2280  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2281  0, 0, 0, -105, -285, 0, -285, -285, -285, -285,
2282  -285, -285, -285, -285, -285, -285, 0, 0, 0, 0,
2283  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2284  0, -285, -285, -285, -96, 0, 0, -285, 0, -285,
2285  241, -285, 5, 6, 7, 8, 9, -573, -573, -573,
2286  10, 11, 0, 0, -573, 12, 0, 13, 14, 15,
2287  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2288  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2289  0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
2290  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2291  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2292  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2293  0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
2294  0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
2295  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2296  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2297  0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
2298  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2299  0, 0, 0, 0, -573, 241, -573, 5, 6, 7,
2300  8, 9, 0, 0, -573, 10, 11, 0, -573, -573,
2301  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2302  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2303  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2304  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2305  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2306  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2307  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2308  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2309  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2310  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2311  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2312  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2313  0, 0, 0, 0, 0, 0, 0, 0, 0, -573,
2314  241, -573, 5, 6, 7, 8, 9, 0, 0, -573,
2315  10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
2316  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2317  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2318  0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
2319  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2320  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2321  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2322  0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
2323  0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
2324  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2325  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2326  0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
2327  4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
2328  10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
2329  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2330  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2331  0, 0, 0, 0, 28, 29, 30, 31, 32, 33,
2332  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2333  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2334  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2335  0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
2336  0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
2337  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2338  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2339  0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
2340  0, 0, 0, 0, 0, 0, -573, 0, 0, 0,
2341  0, 0, 0, 0, -573, 241, -573, 5, 6, 7,
2342  8, 9, 0, 0, -573, 10, 11, 0, 0, -573,
2343  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2344  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2345  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2346  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2347  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2348  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2349  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2350  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2351  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2352  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2353  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2354  0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
2355  8, 9, 0, -573, -573, 10, 11, 0, 0, -573,
2356  12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
2357  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2358  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2359  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2360  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2361  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2362  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2363  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2364  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2365  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2366  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2367  0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
2368  8, 9, 0, 0, 0, 10, 11, 0, 0, -573,
2369  12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
2370  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2371  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2372  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2373  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2374  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2375  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2376  48, 0, 0, 242, 50, 0, 51, 52, 0, 53,
2377  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2378  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2379  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2380  0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
2381  8, 9, 0, 0, 0, 10, 11, -573, 0, -573,
2382  12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
2383  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2384  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2385  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2386  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2387  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2388  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2389  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2390  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2391  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2392  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2393  0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
2394  8, 9, 0, 0, 0, 10, 11, -573, 0, -573,
2395  12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
2396  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2397  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2398  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2399  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2400  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2401  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2402  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2403  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2404  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2405  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2406  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2407  0, -573, 0, 0, 0, 0, 0, 0, 0, -573,
2408  241, -573, 5, 6, 7, 8, 9, 0, 0, -573,
2409  10, 11, 0, 0, 0, 12, 0, 13, 14, 15,
2410  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2411  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2412  0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
2413  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2414  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2415  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2416  0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
2417  0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
2418  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2419  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2420  0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
2421  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
2422  10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
2423  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2424  21, 22, 23, 24, 25, 26, 0, 0, 194, 0,
2425  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
2426  34, 35, 36, 37, 38, 39, 40, 195, 41, 42,
2427  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2428  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2429  0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
2430  0, 51, 52, 0, 198, 199, 54, 55, 56, 57,
2431  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2432  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2433  11, 61, 200, 63, 12, 0, 13, 14, 15, 16,
2434  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2435  22, 23, 24, 25, 26, 0, 224, 27, 0, 0,
2436  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2437  35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
2438  43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
2439  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2440  0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
2441  51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
2442  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2443  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2444  61, 62, 63, 0, 0, 0, 0, 0, 0, 0,
2445  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2446  11, 0, 0, 288, 12, 289, 13, 14, 15, 16,
2447  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2448  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2449  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2450  35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
2451  43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
2452  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2453  0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
2454  51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
2455  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2456  5, 6, 7, 8, 9, 0, 0, 0, 10, 11,
2457  61, 62, 63, 12, 0, 13, 14, 15, 16, 17,
2458  18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
2459  23, 24, 25, 26, 0, 224, 27, 0, 0, 0,
2460  0, 0, 28, 29, 30, 31, 32, 33, 34, 35,
2461  36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
2462  44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
2463  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2464  0, 0, 0, 48, 0, 0, 49, 50, 0, 51,
2465  52, 0, 53, 0, 54, 55, 56, 57, 58, 59,
2466  60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2467  0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
2468  62, 63, 0, 0, 0, 0, 0, 0, 5, 6,
2469  7, 8, 9, 0, 0, 0, 10, 11, 0, 0,
2470  0, 12, 474, 13, 14, 15, 16, 17, 18, 19,
2471  0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2472  25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2473  28, 29, 0, 31, 32, 33, 34, 35, 36, 37,
2474  38, 39, 40, 0, 41, 42, 0, 43, 44, 45,
2475  0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2476  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2477  0, 48, 0, 0, 49, 50, 0, 51, 52, 0,
2478  53, 0, 54, 55, 56, 57, 58, 59, 60, 0,
2479  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2480  0, 0, 0, 0, 0, 0, 0, 61, 62, 63,
2481  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2482  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2483  474, 113, 114, 115, 116, 117, 118, 119, 120, 121,
2484  122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
2485  132, 133, 134, 135, 136, 0, 0, 0, 137, 138,
2486  139, 365, 366, 367, 368, 144, 145, 146, 0, 0,
2487  0, 0, 0, 147, 148, 149, 150, 369, 370, 371,
2488  372, 155, 37, 38, 373, 40, 0, 0, 0, 0,
2489  0, 0, 0, 0, 157, 158, 159, 160, 161, 162,
2490  163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
2491  169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
2492  0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
2493  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2494  173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2495  0, 183, 184, 0, 0, 0, 0, 0, -548, -548,
2496  -548, 0, -548, 0, 0, 0, -548, -548, 0, 185,
2497  374, -548, 0, -548, -548, -548, -548, -548, -548, -548,
2498  0, -548, 0, 0, 0, -548, -548, -548, -548, -548,
2499  -548, -548, 0, 0, -548, 0, 0, 0, 0, 0,
2500  0, -548, 0, 0, -548, -548, -548, -548, -548, -548,
2501  -548, -548, -548, -548, -548, -548, 0, -548, -548, -548,
2502  0, -548, -548, 0, 0, 0, 0, 0, 0, 0,
2503  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2504  0, -548, 0, 0, -548, -548, 0, -548, -548, 0,
2505  -548, -548, -548, -548, -548, -548, -548, -548, -548, 0,
2506  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2507  0, 0, 0, 0, 0, 0, 0, -548, -548, -548,
2508  0, 0, 0, 0, 0, -549, -549, -549, 0, -549,
2509  0, -548, 0, -549, -549, 0, 0, -548, -549, 0,
2510  -549, -549, -549, -549, -549, -549, -549, 0, -549, 0,
2511  0, 0, -549, -549, -549, -549, -549, -549, -549, 0,
2512  0, -549, 0, 0, 0, 0, 0, 0, -549, 0,
2513  0, -549, -549, -549, -549, -549, -549, -549, -549, -549,
2514  -549, -549, -549, 0, -549, -549, -549, 0, -549, -549,
2515  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2516  0, 0, 0, 0, 0, 0, 0, 0, -549, 0,
2517  0, -549, -549, 0, -549, -549, 0, -549, -549, -549,
2518  -549, -549, -549, -549, -549, -549, 0, 0, 0, 0,
2519  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2520  0, 0, 0, 0, -549, -549, -549, 0, 0, 0,
2521  0, 0, -551, -551, -551, 0, -551, 0, -549, 0,
2522  -551, -551, 0, 0, -549, -551, 0, -551, -551, -551,
2523  -551, -551, -551, -551, 0, 0, 0, 0, 0, -551,
2524  -551, -551, -551, -551, -551, -551, 0, 0, -551, 0,
2525  0, 0, 0, 0, 0, -551, 0, 0, -551, -551,
2526  -551, -551, -551, -551, -551, -551, -551, -551, -551, -551,
2527  0, -551, -551, -551, 0, -551, -551, 0, 0, 0,
2528  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2529  0, 0, 0, 0, 0, -551, 723, 0, -551, -551,
2530  0, -551, -551, 0, -551, -551, -551, -551, -551, -551,
2531  -551, -551, -551, 0, 0, 0, 0, 0, -103, 0,
2532  0, 0, 0, 0, 0, 0, -553, -553, -553, 0,
2533  -553, -551, -551, -551, -553, -553, 0, 0, 0, -553,
2534  0, -553, -553, -553, -553, -553, -553, -553, 0, 0,
2535  0, -551, 0, -553, -553, -553, -553, -553, -553, -553,
2536  0, 0, -553, 0, 0, 0, 0, 0, 0, -553,
2537  0, 0, -553, -553, -553, -553, -553, -553, -553, -553,
2538  -553, -553, -553, -553, 0, -553, -553, -553, 0, -553,
2539  -553, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2540  0, 0, 0, 0, 0, 0, 0, 0, 0, -553,
2541  0, 0, -553, -553, 0, -553, -553, 0, -553, -553,
2542  -553, -553, -553, -553, -553, -553, -553, 0, 0, 0,
2543  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2544  -554, -554, -554, 0, -554, -553, -553, -553, -554, -554,
2545  0, 0, 0, -554, 0, -554, -554, -554, -554, -554,
2546  -554, -554, 0, 0, 0, -553, 0, -554, -554, -554,
2547  -554, -554, -554, -554, 0, 0, -554, 0, 0, 0,
2548  0, 0, 0, -554, 0, 0, -554, -554, -554, -554,
2549  -554, -554, -554, -554, -554, -554, -554, -554, 0, -554,
2550  -554, -554, 0, -554, -554, 0, 0, 0, 0, 0,
2551  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2552  0, 0, 0, -554, 0, 0, -554, -554, 0, -554,
2553  -554, 0, -554, -554, -554, -554, -554, -554, -554, -554,
2554  -554, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2555  0, 0, 0, 0, 0, 0, 0, 0, 0, -554,
2556  -554, -554, 0, 0, 0, 0, 0, 0, 0, 0,
2557  0, 0, 0, 0, 0, 0, 0, 0, 0, -554,
2558  113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
2559  123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
2560  133, 134, 135, 136, 0, 0, 0, 137, 138, 139,
2561  140, 141, 142, 143, 144, 145, 146, 0, 0, 0,
2562  0, 0, 147, 148, 149, 150, 151, 152, 153, 154,
2563  155, 270, 271, 156, 272, 0, 0, 0, 0, 0,
2564  0, 0, 0, 157, 158, 159, 160, 161, 162, 163,
2565  164, 165, 0, 0, 166, 167, 0, 0, 168, 169,
2566  170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
2567  0, 0, 172, 0, 0, 0, 0, 0, 0, 0,
2568  0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
2569  174, 175, 176, 177, 178, 179, 180, 181, 182, 0,
2570  183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
2571  0, 0, 0, 0, 0, 0, 0, 0, 185, 113,
2572  114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
2573  124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
2574  134, 135, 136, 0, 0, 0, 137, 138, 139, 140,
2575  141, 142, 143, 144, 145, 146, 0, 0, 0, 0,
2576  0, 147, 148, 149, 150, 151, 152, 153, 154, 155,
2577  226, 0, 156, 0, 0, 0, 0, 0, 0, 0,
2578  0, 0, 157, 158, 159, 160, 161, 162, 163, 164,
2579  165, 0, 0, 166, 167, 0, 0, 168, 169, 170,
2580  171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2581  0, 172, 0, 0, 55, 0, 0, 0, 0, 0,
2582  0, 0, 0, 0, 0, 0, 0, 0, 173, 174,
2583  175, 176, 177, 178, 179, 180, 181, 182, 0, 183,
2584  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2585  0, 0, 0, 0, 0, 0, 0, 185, 113, 114,
2586  115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
2587  125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
2588  135, 136, 0, 0, 0, 137, 138, 139, 140, 141,
2589  142, 143, 144, 145, 146, 0, 0, 0, 0, 0,
2590  147, 148, 149, 150, 151, 152, 153, 154, 155, 0,
2591  0, 156, 0, 0, 0, 0, 0, 0, 0, 0,
2592  0, 157, 158, 159, 160, 161, 162, 163, 164, 165,
2593  0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
2594  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2595  172, 0, 0, 55, 0, 0, 0, 0, 0, 0,
2596  0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
2597  176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
2598  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2599  0, 0, 0, 0, 0, 0, 185, 113, 114, 115,
2600  116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
2601  126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
2602  136, 0, 0, 0, 137, 138, 139, 140, 141, 142,
2603  143, 144, 145, 146, 0, 0, 0, 0, 0, 147,
2604  148, 149, 150, 151, 152, 153, 154, 155, 0, 0,
2605  156, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2606  157, 158, 159, 160, 161, 162, 163, 164, 165, 0,
2607  0, 166, 167, 0, 0, 168, 169, 170, 171, 0,
2608  0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
2609  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2610  0, 0, 0, 0, 0, 0, 173, 174, 175, 176,
2611  177, 178, 179, 180, 181, 182, 0, 183, 184, 0,
2612  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2613  11, 0, 0, 0, 12, 185, 13, 14, 15, 231,
2614  232, 18, 19, 0, 0, 0, 0, 0, 233, 234,
2615  235, 23, 24, 25, 26, 0, 0, 194, 0, 0,
2616  0, 0, 0, 0, 258, 0, 0, 32, 33, 34,
2617  35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
2618  43, 44, 45, 0, 0, 0, 0, 0, 0, 0,
2619  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2620  0, 0, 0, 0, 259, 0, 0, 197, 50, 0,
2621  51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
2622  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2623  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
2624  260, 10, 11, 0, 0, 0, 12, 0, 13, 14,
2625  15, 231, 232, 18, 19, 0, 0, 0, 261, 0,
2626  233, 234, 235, 23, 24, 25, 26, 0, 0, 194,
2627  0, 0, 0, 0, 0, 0, 258, 0, 0, 32,
2628  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2629  42, 0, 43, 44, 45, 0, 0, 0, 0, 0,
2630  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2631  0, 0, 0, 0, 0, 0, 259, 0, 0, 197,
2632  50, 0, 51, 52, 0, 0, 0, 54, 55, 56,
2633  57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
2634  0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
2635  0, 0, 260, 10, 11, 0, 0, 0, 12, 0,
2636  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
2637  490, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2638  0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
2639  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2640  0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
2641  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2642  0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
2643  0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
2644  55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
2645  0, 0, 0, 0, 5, 6, 7, 8, 9, 0,
2646  0, 0, 10, 11, 61, 62, 63, 12, 0, 13,
2647  14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
2648  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2649  27, 0, 0, 0, 0, 0, 28, 29, 0, 31,
2650  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2651  41, 42, 0, 43, 44, 45, 0, 46, 47, 0,
2652  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2653  0, 0, 0, 0, 0, 0, 0, 48, 0, 0,
2654  49, 50, 0, 51, 52, 0, 53, 0, 54, 55,
2655  56, 57, 58, 59, 60, 0, 0, 0, 0, 0,
2656  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
2657  0, 10, 11, 61, 62, 63, 12, 0, 13, 14,
2658  15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
2659  20, 21, 22, 23, 24, 25, 26, 0, 0, 194,
2660  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
2661  33, 34, 35, 36, 37, 38, 39, 40, 195, 41,
2662  42, 0, 43, 44, 45, 0, 46, 47, 0, 0,
2663  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2664  0, 0, 0, 0, 0, 0, 196, 0, 0, 197,
2665  50, 0, 51, 52, 0, 198, 199, 54, 55, 56,
2666  57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
2667  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
2668  10, 11, 61, 200, 63, 12, 0, 13, 14, 15,
2669  231, 232, 18, 19, 0, 0, 0, 0, 0, 233,
2670  234, 235, 23, 24, 25, 26, 0, 0, 194, 0,
2671  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
2672  34, 35, 36, 37, 38, 39, 40, 195, 41, 42,
2673  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2674  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2675  0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
2676  0, 51, 52, 0, 587, 199, 54, 55, 56, 57,
2677  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2678  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2679  11, 61, 200, 63, 12, 0, 13, 14, 15, 231,
2680  232, 18, 19, 0, 0, 0, 0, 0, 233, 234,
2681  235, 23, 24, 25, 26, 0, 0, 194, 0, 0,
2682  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2683  35, 36, 37, 38, 39, 40, 195, 41, 42, 0,
2684  43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
2685  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2686  0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
2687  51, 52, 0, 198, 0, 54, 55, 56, 57, 58,
2688  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2689  5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
2690  61, 200, 63, 12, 0, 13, 14, 15, 231, 232,
2691  18, 19, 0, 0, 0, 0, 0, 233, 234, 235,
2692  23, 24, 25, 26, 0, 0, 194, 0, 0, 0,
2693  0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
2694  36, 37, 38, 39, 40, 195, 41, 42, 0, 43,
2695  44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
2696  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2697  0, 0, 0, 196, 0, 0, 197, 50, 0, 51,
2698  52, 0, 0, 199, 54, 55, 56, 57, 58, 59,
2699  60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
2700  6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
2701  200, 63, 12, 0, 13, 14, 15, 231, 232, 18,
2702  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2703  24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
2704  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
2705  37, 38, 39, 40, 195, 41, 42, 0, 43, 44,
2706  45, 0, 46, 47, 0, 0, 0, 0, 0, 0,
2707  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2708  0, 0, 196, 0, 0, 197, 50, 0, 51, 52,
2709  0, 587, 0, 54, 55, 56, 57, 58, 59, 60,
2710  0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
2711  7, 0, 9, 0, 0, 0, 10, 11, 61, 200,
2712  63, 12, 0, 13, 14, 15, 231, 232, 18, 19,
2713  0, 0, 0, 0, 0, 233, 234, 235, 23, 24,
2714  25, 26, 0, 0, 194, 0, 0, 0, 0, 0,
2715  0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
2716  38, 39, 40, 195, 41, 42, 0, 43, 44, 45,
2717  0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2718  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2719  0, 196, 0, 0, 197, 50, 0, 51, 52, 0,
2720  0, 0, 54, 55, 56, 57, 58, 59, 60, 0,
2721  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
2722  0, 9, 0, 0, 0, 10, 11, 61, 200, 63,
2723  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2724  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2725  26, 0, 0, 194, 0, 0, 0, 0, 0, 0,
2726  29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
2727  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2728  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2729  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2730  196, 0, 0, 197, 50, 0, 51, 52, 0, 484,
2731  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2732  0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
2733  9, 0, 0, 0, 10, 11, 61, 200, 63, 12,
2734  0, 13, 14, 15, 231, 232, 18, 19, 0, 0,
2735  0, 0, 0, 233, 234, 235, 23, 24, 25, 26,
2736  0, 0, 194, 0, 0, 0, 0, 0, 0, 29,
2737  0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
2738  40, 0, 41, 42, 0, 43, 44, 45, 0, 46,
2739  47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2740  0, 0, 0, 0, 0, 0, 0, 0, 0, 196,
2741  0, 0, 197, 50, 0, 51, 52, 0, 198, 0,
2742  54, 55, 56, 57, 58, 59, 60, 0, 0, 0,
2743  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
2744  0, 0, 0, 10, 11, 61, 200, 63, 12, 0,
2745  13, 14, 15, 231, 232, 18, 19, 0, 0, 0,
2746  0, 0, 233, 234, 235, 23, 24, 25, 26, 0,
2747  0, 194, 0, 0, 0, 0, 0, 0, 29, 0,
2748  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2749  0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
2750  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2751  0, 0, 0, 0, 0, 0, 0, 0, 196, 0,
2752  0, 197, 50, 0, 51, 52, 0, 772, 0, 54,
2753  55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
2754  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2755  0, 0, 10, 11, 61, 200, 63, 12, 0, 13,
2756  14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
2757  0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
2758  194, 0, 0, 0, 0, 0, 0, 29, 0, 0,
2759  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2760  41, 42, 0, 43, 44, 45, 0, 46, 47, 0,
2761  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2762  0, 0, 0, 0, 0, 0, 0, 196, 0, 0,
2763  197, 50, 0, 51, 52, 0, 484, 0, 54, 55,
2764  56, 57, 58, 59, 60, 0, 0, 0, 0, 0,
2765  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
2766  0, 10, 11, 61, 200, 63, 12, 0, 13, 14,
2767  15, 231, 232, 18, 19, 0, 0, 0, 0, 0,
2768  233, 234, 235, 23, 24, 25, 26, 0, 0, 194,
2769  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
2770  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2771  42, 0, 43, 44, 45, 0, 46, 47, 0, 0,
2772  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2773  0, 0, 0, 0, 0, 0, 196, 0, 0, 197,
2774  50, 0, 51, 52, 0, 587, 0, 54, 55, 56,
2775  57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
2776  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
2777  10, 11, 61, 200, 63, 12, 0, 13, 14, 15,
2778  231, 232, 18, 19, 0, 0, 0, 0, 0, 233,
2779  234, 235, 23, 24, 25, 26, 0, 0, 194, 0,
2780  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
2781  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2782  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2783  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2784  0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
2785  0, 51, 52, 0, 0, 0, 54, 55, 56, 57,
2786  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2787  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2788  11, 61, 200, 63, 12, 0, 13, 14, 15, 16,
2789  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2790  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2791  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2792  35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
2793  43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
2794  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2795  0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
2796  51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
2797  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2798  5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
2799  61, 62, 63, 12, 0, 13, 14, 15, 16, 17,
2800  18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
2801  23, 24, 25, 26, 0, 0, 194, 0, 0, 0,
2802  0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
2803  36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
2804  44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
2805  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2806  0, 0, 0, 196, 0, 0, 197, 50, 0, 51,
2807  52, 0, 0, 0, 54, 55, 56, 57, 58, 59,
2808  60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
2809  6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
2810  200, 63, 12, 0, 13, 14, 15, 231, 232, 18,
2811  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2812  24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
2813  0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
2814  37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
2815  45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2816  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2817  0, 0, 259, 0, 0, 304, 50, 0, 51, 52,
2818  0, 305, 0, 54, 55, 56, 57, 58, 59, 60,
2819  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2820  0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
2821  14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
2822  0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
2823  194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
2824  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2825  41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
2826  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2827  0, 0, 0, 0, 0, 0, 0, 346, 0, 0,
2828  49, 50, 0, 51, 52, 0, 53, 0, 54, 55,
2829  56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
2830  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
2831  0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
2832  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2833  24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
2834  0, 0, 258, 0, 0, 32, 33, 34, 354, 36,
2835  37, 38, 355, 40, 0, 41, 42, 0, 43, 44,
2836  45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2837  0, 0, 0, 0, 0, 0, 0, 0, 0, 356,
2838  0, 0, 357, 0, 0, 197, 50, 0, 51, 52,
2839  0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
2840  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2841  0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
2842  14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
2843  0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
2844  194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
2845  32, 33, 34, 354, 36, 37, 38, 355, 40, 0,
2846  41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
2847  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2848  0, 0, 0, 0, 0, 0, 0, 357, 0, 0,
2849  197, 50, 0, 51, 52, 0, 0, 0, 54, 55,
2850  56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
2851  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
2852  0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
2853  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2854  24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
2855  0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
2856  37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
2857  45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2858  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2859  0, 0, 259, 0, 0, 304, 50, 0, 51, 52,
2860  0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
2861  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2862  0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
2863  14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
2864  0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
2865  194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
2866  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2867  41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
2868  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2869  0, 0, 0, 0, 0, 0, 0, 902, 0, 0,
2870  197, 50, 0, 51, 52, 0, 0, 0, 54, 55,
2871  56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
2872  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
2873  0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
2874  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2875  24, 25, 26, 0, 0, 194, 0, 663, 0, 0,
2876  0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
2877  37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
2878  45, 308, 309, 310, 311, 312, 313, 314, 315, 316,
2879  317, 318, 319, 320, 0, 0, 321, 322, 0, 0,
2880  0, 0, 912, 0, 0, 197, 50, 0, 51, 52,
2881  0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
2882  0, 0, 0, 323, 0, 324, 325, 326, 327, 328,
2883  329, 330, 331, 332, 333, 0, 0, 0, 260, 0,
2884  525, 526, 0, 0, 527, 0, 0, 0, 0, 0,
2885  0, 0, 0, -241, 157, 158, 159, 160, 161, 162,
2886  163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
2887  169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
2888  0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
2889  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2890  173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2891  0, 183, 184, 0, 0, 0, 0, 533, 534, 0,
2892  0, 535, 0, 0, 0, 0, 0, 0, 0, 185,
2893  220, 157, 158, 159, 160, 161, 162, 163, 164, 165,
2894  0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
2895  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2896  172, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2897  0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
2898  176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
2899  0, 0, 0, 0, 591, 526, 0, 0, 592, 0,
2900  0, 0, 0, 0, 0, 0, 185, 220, 157, 158,
2901  159, 160, 161, 162, 163, 164, 165, 0, 0, 166,
2902  167, 0, 0, 168, 169, 170, 171, 0, 0, 0,
2903  0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
2904  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2905  0, 0, 0, 0, 173, 174, 175, 176, 177, 178,
2906  179, 180, 181, 182, 0, 183, 184, 0, 0, 0,
2907  0, 594, 534, 0, 0, 595, 0, 0, 0, 0,
2908  0, 0, 0, 185, 220, 157, 158, 159, 160, 161,
2909  162, 163, 164, 165, 0, 0, 166, 167, 0, 0,
2910  168, 169, 170, 171, 0, 0, 0, 0, 0, 0,
2911  0, 0, 0, 0, 172, 0, 0, 0, 0, 0,
2912  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2913  0, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2914  182, 0, 183, 184, 0, 0, 0, 0, 617, 526,
2915  0, 0, 618, 0, 0, 0, 0, 0, 0, 0,
2916  185, 220, 157, 158, 159, 160, 161, 162, 163, 164,
2917  165, 0, 0, 166, 167, 0, 0, 168, 169, 170,
2918  171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2919  0, 172, 0, 0, 0, 0, 0, 0, 0, 0,
2920  0, 0, 0, 0, 0, 0, 0, 0, 173, 174,
2921  175, 176, 177, 178, 179, 180, 181, 182, 0, 183,
2922  184, 0, 0, 0, 0, 620, 534, 0, 0, 621,
2923  0, 0, 0, 0, 0, 0, 0, 185, 220, 157,
2924  158, 159, 160, 161, 162, 163, 164, 165, 0, 0,
2925  166, 167, 0, 0, 168, 169, 170, 171, 0, 0,
2926  0, 0, 0, 0, 0, 0, 0, 0, 172, 0,
2927  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2928  0, 0, 0, 0, 0, 173, 174, 175, 176, 177,
2929  178, 179, 180, 181, 182, 0, 183, 184, 0, 0,
2930  0, 0, 692, 526, 0, 0, 693, 0, 0, 0,
2931  0, 0, 0, 0, 185, 220, 157, 158, 159, 160,
2932  161, 162, 163, 164, 165, 0, 0, 166, 167, 0,
2933  0, 168, 169, 170, 171, 0, 0, 0, 0, 0,
2934  0, 0, 0, 0, 0, 172, 0, 0, 0, 0,
2935  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2936  0, 0, 173, 174, 175, 176, 177, 178, 179, 180,
2937  181, 182, 0, 183, 184, 0, 0, 0, 0, 695,
2938  534, 0, 0, 696, 0, 0, 0, 0, 0, 0,
2939  0, 185, 220, 157, 158, 159, 160, 161, 162, 163,
2940  164, 165, 0, 0, 166, 167, 0, 0, 168, 169,
2941  170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
2942  0, 0, 172, 0, 0, 0, 0, 0, 0, 0,
2943  0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
2944  174, 175, 176, 177, 178, 179, 180, 181, 182, 0,
2945  183, 184, 0, 0, 0, 0, 702, 526, 0, 0,
2946  703, 0, 0, 0, 0, 0, 0, 0, 185, 220,
2947  157, 158, 159, 160, 161, 162, 163, 164, 165, 0,
2948  0, 166, 167, 0, 0, 168, 169, 170, 171, 0,
2949  0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
2950  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2951  0, 0, 0, 0, 0, 0, 173, 174, 175, 176,
2952  177, 178, 179, 180, 181, 182, 0, 183, 184, 0,
2953  0, 0, 0, 572, 534, 0, 0, 573, 0, 0,
2954  0, 0, 0, 0, 0, 185, 220, 157, 158, 159,
2955  160, 161, 162, 163, 164, 165, 0, 0, 166, 167,
2956  0, 0, 168, 169, 170, 171, 0, 0, 0, 0,
2957  0, 0, 0, 0, 0, 0, 172, 0, 0, 0,
2958  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2959  0, 0, 0, 173, 174, 175, 176, 177, 178, 179,
2960  180, 181, 182, 0, 183, 184, 0, 0, 0, 0,
2961  965, 526, 0, 0, 966, 0, 0, 0, 0, 0,
2962  0, 0, 185, 220, 157, 158, 159, 160, 161, 162,
2963  163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
2964  169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
2965  0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
2966  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2967  173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2968  0, 183, 184, 0, 0, 0, 0, 971, 526, 0,
2969  0, 972, 0, 0, 0, 0, 0, 0, 0, 185,
2970  220, 157, 158, 159, 160, 161, 162, 163, 164, 165,
2971  0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
2972  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2973  172, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2974  0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
2975  176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
2976  0, 0, 0, 0, 974, 534, 0, 0, 975, 0,
2977  0, 0, 0, 0, 0, 0, 185, 220, 157, 158,
2978  159, 160, 161, 162, 163, 164, 165, 0, 0, 166,
2979  167, 0, 0, 168, 169, 170, 171, 0, 0, 0,
2980  0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
2981  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2982  0, 0, 0, 0, 173, 174, 175, 176, 177, 178,
2983  179, 180, 181, 182, 0, 183, 184, 0, 0, 0,
2984  0, 572, 534, 0, 0, 573, 0, 0, 0, 0,
2985  0, 0, 0, 185, 220, 157, 158, 159, 160, 161,
2986  162, 163, 164, 165, 0, 0, 166, 167, 0, 0,
2987  168, 169, 170, 171, 0, 0, 0, 0, 0, 0,
2988  0, 0, 0, 0, 172, 0, 0, 0, 0, 0,
2989  0, 0, 718, 0, 0, 0, 0, 0, 0, 0,
2990  0, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2991  182, 663, 183, 184, 0, 0, 308, 309, 310, 311,
2992  312, 313, 314, 315, 316, 317, 318, 319, 320, 0,
2993  185, 321, 322, 0, 0, 308, 309, 310, 311, 312,
2994  313, 314, 315, 316, 317, 318, 319, 320, 0, 0,
2995  321, 322, 0, 0, 0, 0, 0, 0, 323, 0,
2996  324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
2997  0, 0, 0, 0, 0, 0, 0, 323, 0, 324,
2998  325, 326, 327, 328, 329, 330, 331, 332, 333
2999 };
3000 
3001 #define yypact_value_is_default(yystate) \
3002  ((yystate) == (-747))
3003 
3004 #define yytable_value_is_error(yytable_value) \
3005  ((yytable_value) == (-574))
3006 
3007 static const yytype_int16 yycheck[] =
3008 {
3009  2, 55, 340, 28, 2, 454, 4, 52, 593, 16,
3010  17, 335, 307, 20, 307, 8, 547, 213, 16, 17,
3011  8, 566, 20, 27, 53, 29, 84, 22, 8, 87,
3012  546, 87, 4, 22, 619, 28, 49, 91, 252, 76,
3013  28, 2, 256, 4, 404, 357, 1, 65, 28, 51,
3014  52, 49, 50, 749, 450, 53, 746, 13, 334, 627,
3015  336, 53, 680, 25, 62, 762, 684, 454, 13, 16,
3016  17, 65, 26, 20, 396, 55, 400, 26, 76, 25,
3017  440, 0, 404, 27, 76, 83, 84, 576, 577, 87,
3018  88, 89, 90, 87, 490, 29, 88, 89, 90, 13,
3019  242, 25, 378, 379, 51, 851, 828, 85, 76, 694,
3020  136, 91, 87, 16, 17, 110, 147, 20, 85, 568,
3021  705, 110, 146, 399, 25, 401, 85, 653, 452, 61,
3022  87, 16, 17, 62, 109, 20, 276, 25, 278, 56,
3023  280, 13, 742, 37, 38, 87, 114, 109, 51, 52,
3024  195, 427, 109, 198, 199, 826, 701, 28, 113, 849,
3025  138, 139, 304, 763, 709, 140, 25, 109, 736, 737,
3026  25, 13, 139, 107, 106, 146, 13, 453, 140, 138,
3027  139, 143, 136, 632, 140, 147, 109, 136, 244, 145,
3028  145, 147, 147, 142, 140, 941, 892, 142, 140, 197,
3029  145, 145, 147, 147, 653, 207, 896, 904, 930, 140,
3030  217, 213, 219, 220, 25, 886, 140, 413, 220, 217,
3031  746, 219, 220, 749, 261, 223, 244, 225, 552, 242,
3032  719, 145, 230, 147, 50, 293, 294, 295, 296, 140,
3033  564, 601, 142, 241, 242, 632, 235, 147, 109, 238,
3034  244, 563, 140, 147, 258, 873, 99, 302, 826, 708,
3035  828, 932, 307, 261, 25, 661, 87, 83, 84, 261,
3036  217, 87, 219, 145, 140, 147, 305, 553, 600, 601,
3037  241, 140, 25, 341, 342, 140, 25, 343, 959, 565,
3038  806, 304, 85, 87, 292, 293, 294, 295, 296, 297,
3039  298, 299, 85, 145, 302, 147, 304, 305, 145, 307,
3040  147, 59, 60, 305, 217, 109, 219, 26, 886, 887,
3041  292, 708, 109, 849, 142, 851, 49, 467, 335, 140,
3042  875, 292, 217, 335, 219, 56, 297, 335, 145, 337,
3043  147, 87, 873, 341, 342, 138, 139, 336, 88, 343,
3044  395, 396, 690, 140, 334, 302, 139, 26, 356, 404,
3045  307, 140, 930, 109, 932, 359, 892, 85, 147, 662,
3046  109, 85, 109, 302, 61, 26, 85, 140, 307, 140,
3047  15, 142, 17, 928, 679, 87, 384, 385, 973, 85,
3048  85, 959, 437, 400, 590, 440, 421, 140, 400, 142,
3049  614, 140, 400, 85, 143, 140, 85, 223, 147, 225,
3050  412, 413, 401, 450, 142, 941, 85, 104, 105, 399,
3051  138, 139, 424, 136, 142, 139, 424, 136, 421, 138,
3052  139, 880, 85, 421, 85, 433, 85, 142, 427, 484,
3053  140, 421, 138, 139, 139, 452, 426, 147, 85, 142,
3054  452, 85, 450, 490, 452, 384, 385, 139, 450, 146,
3055  139, 85, 822, 424, 453, 68, 85, 136, 85, 138,
3056  139, 451, 433, 142, 197, 87, 85, 293, 294, 295,
3057  296, 483, 298, 299, 68, 136, 139, 138, 139, 138,
3058  139, 142, 490, 396, 85, 37, 38, 109, 490, 668,
3059  822, 223, 139, 548, 138, 139, 675, 230, 109, 52,
3060  514, 54, 55, 56, 57, 139, 119, 120, 121, 242,
3061  139, 138, 139, 861, 246, 341, 342, 143, 532, 867,
3062  139, 26, 728, 52, 437, 530, 538, 56, 540, 85,
3063  356, 530, 587, 538, 542, 552, 544, 138, 139, 538,
3064  552, 545, 546, 56, 552, 600, 601, 564, 85, 584,
3065  59, 60, 564, 144, 553, 559, 564, 137, 566, 567,
3066  106, 551, 574, 575, 576, 577, 565, 87, 615, 574,
3067  575, 304, 140, 563, 106, 574, 575, 87, 590, 593,
3068  85, 584, 138, 139, 87, 85, 584, 140, 68, 109,
3069  68, 548, 14, 15, 584, 85, 604, 609, 85, 109,
3070  140, 138, 139, 658, 17, 619, 109, 615, 56, 608,
3071  609, 574, 575, 615, 661, 145, 25, 951, 52, 94,
3072  54, 55, 56, 57, 679, 143, 638, 146, 640, 697,
3073  642, 136, 700, 138, 139, 137, 140, 142, 138, 139,
3074  52, 653, 54, 55, 56, 57, 654, 711, 138, 139,
3075  10, 138, 139, 661, 662, 89, 61, 665, 666, 661,
3076  65, 95, 96, 671, 672, 109, 952, 679, 680, 140,
3077  682, 140, 684, 140, 406, 140, 140, 89, 410, 734,
3078  694, 140, 116, 415, 96, 119, 8, 600, 13, 697,
3079  87, 705, 700, 701, 698, 61, 87, 137, 430, 104,
3080  105, 709, 109, 435, 116, 54, 710, 719, 716, 717,
3081  140, 145, 109, 140, 63, 64, 728, 772, 109, 140,
3082  68, 711, 679, 662, 87, 52, 665, 666, 796, 52,
3083  742, 111, 671, 672, 140, 743, 744, 87, 104, 105,
3084  106, 567, 144, 140, 549, 15, 109, 755, 803, 140,
3085  2, 763, 4, 765, 87, 767, 768, 489, 52, 109,
3086  54, 55, 56, 57, 16, 17, 140, 822, 20, 117,
3087  118, 119, 120, 121, 145, 783, 109, 140, 604, 791,
3088  109, 140, 794, 114, 140, 793, 140, 140, 796, 10,
3089  140, 88, 800, 801, 140, 9, 804, 49, 50, 10,
3090  137, 140, 806, 10, 808, 61, 140, 140, 140, 542,
3091  62, 544, 820, 137, 140, 114, 52, 137, 54, 55,
3092  56, 57, 834, 835, 140, 837, 68, 839, 840, 140,
3093  140, 83, 84, 137, 842, 87, 56, 140, 140, 68,
3094  842, 83, 84, 56, 783, 140, 140, 140, 104, 105,
3095  106, 140, 860, 89, 83, 84, 864, 140, 860, 95,
3096  96, 873, 142, 142, 61, 140, 424, 875, 90, 88,
3097  61, 697, 954, 736, 700, 117, 118, 119, 120, 121,
3098  116, 93, 904, 119, 689, 114, 115, 116, 117, 118,
3099  119, 120, 121, 953, 906, 907, 908, 96, 910, 911,
3100  640, 706, 642, 57, 91, 880, 142, 104, 105, 106,
3101  918, 849, 920, 104, 105, 106, 653, 746, 926, -1,
3102  928, 654, 934, 935, 936, 937, 52, -1, 54, 55,
3103  56, 57, -1, -1, 951, -1, -1, 54, 55, 951,
3104  57, 953, 954, 951, -1, 197, 63, 64, -1, 939,
3105  -1, -1, -1, 952, -1, 967, 968, 969, 970, 973,
3106  950, -1, -1, 89, -1, 217, -1, 219, 220, 981,
3107  796, 223, -1, 225, -1, 707, -1, 989, 230, -1,
3108  -1, -1, -1, 716, 717, 68, -1, -1, -1, 241,
3109  242, -1, 797, -1, 799, -1, -1, 729, -1, -1,
3110  83, 84, -1, -1, 809, -1, -1, -1, 740, 814,
3111  743, 744, 749, -1, 52, 752, 54, 55, 56, 57,
3112  -1, -1, 755, -1, -1, 765, -1, 767, 768, -1,
3113  -1, -1, -1, 116, 117, 118, 119, 120, 121, -1,
3114  292, 293, 294, 295, 296, 297, 298, 299, -1, -1,
3115  302, 89, 304, -1, -1, 307, -1, 95, -1, 52,
3116  793, 54, 55, 56, 57, 870, 871, 800, 801, -1,
3117  -1, 804, 16, 17, -1, -1, 20, -1, -1, -1,
3118  -1, 813, -1, 335, -1, 337, -1, 820, -1, 341,
3119  342, -1, -1, 825, 834, 835, -1, 837, 830, 839,
3120  840, -1, 46, 47, 356, -1, -1, 51, 52, -1,
3121  -1, -1, -1, -1, 851, -1, 853, -1, 62, 63,
3122  -1, 52, 927, 54, 55, 56, 57, -1, -1, -1,
3123  -1, 864, 384, 385, 40, 41, 42, 43, 44, -1,
3124  -1, -1, -1, -1, -1, -1, -1, -1, 400, -1,
3125  955, -1, 957, -1, -1, 892, -1, 894, 89, -1,
3126  -1, 898, -1, -1, 95, -1, 906, 907, 908, -1,
3127  910, 911, 424, 52, -1, 54, 55, 56, 57, -1,
3128  -1, 433, -1, -1, -1, 918, -1, 920, -1, -1,
3129  -1, -1, -1, 926, 934, 935, 936, 937, -1, -1,
3130  452, -1, -1, -1, 941, -1, 943, -1, -1, 946,
3131  89, -1, -1, -1, -1, -1, 95, 96, -1, -1,
3132  -1, -1, -1, -1, 961, -1, -1, 967, 968, 969,
3133  970, -1, -1, -1, -1, -1, -1, 116, -1, -1,
3134  119, 981, -1, -1, -1, -1, 983, -1, -1, 989,
3135  -1, 195, -1, -1, 198, 199, 200, -1, -1, -1,
3136  2, -1, 4, 142, -1, 52, -1, 54, 55, 56,
3137  57, -1, -1, 217, -1, 219, 220, -1, -1, -1,
3138  -1, 2, -1, 4, -1, -1, -1, -1, -1, -1,
3139  542, -1, 544, 52, -1, 54, 55, 56, 57, -1,
3140  552, -1, 89, -1, -1, -1, -1, 49, 95, 96,
3141  -1, 53, 564, -1, 566, 567, -1, -1, -1, -1,
3142  -1, -1, -1, -1, -1, -1, -1, -1, 49, 116,
3143  89, -1, 119, -1, 76, -1, 95, 96, -1, -1,
3144  -1, -1, -1, -1, -1, -1, 88, 89, 90, 91,
3145  -1, -1, 604, -1, -1, -1, -1, 116, 302, -1,
3146  119, -1, -1, 307, 308, 309, 310, 311, 312, 313,
3147  314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
3148  324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
3149  -1, 335, -1, -1, -1, -1, -1, -1, -1, -1,
3150  -1, -1, 654, -1, -1, -1, -1, -1, -1, -1,
3151  662, -1, -1, 665, 666, -1, -1, -1, -1, 671,
3152  672, -1, 68, 69, 70, 71, 72, 73, 74, 75,
3153  76, 77, 78, 79, 80, -1, -1, 83, 84, -1,
3154  384, 385, -1, -1, -1, 697, -1, -1, 700, 701,
3155  394, 395, 396, -1, -1, 197, 400, 709, 402, 403,
3156  404, -1, -1, -1, 716, 717, 112, 113, 114, 115,
3157  116, 117, 118, 119, 120, 121, 197, -1, -1, 423,
3158  -1, -1, -1, -1, 428, -1, -1, -1, 230, -1,
3159  -1, 743, 744, 437, -1, -1, 440, -1, -1, 241,
3160  242, -1, -1, 755, -1, -1, -1, -1, 452, 230,
3161  -1, -1, -1, -1, -1, -1, -1, -1, -1, 261,
3162  241, 242, -1, -1, -1, -1, -1, -1, 472, 473,
3163  -1, 783, -1, -1, -1, -1, -1, -1, -1, -1,
3164  484, 793, -1, -1, 796, -1, -1, -1, 800, 801,
3165  292, -1, 804, -1, -1, 297, -1, -1, -1, -1,
3166  -1, -1, 304, 305, -1, -1, -1, 2, 820, 4,
3167  -1, 292, -1, -1, -1, -1, 297, -1, -1, -1,
3168  -1, -1, -1, 304, -1, -1, -1, -1, -1, -1,
3169  -1, -1, -1, -1, -1, 337, -1, 2, -1, 4,
3170  -1, -1, -1, -1, 548, -1, -1, -1, 552, -1,
3171  -1, -1, 864, -1, 49, 2, 337, 4, 53, -1,
3172  564, -1, -1, 875, -1, -1, -1, -1, -1, -1,
3173  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3174  -1, 76, -1, 587, 49, -1, -1, -1, 53, -1,
3175  -1, -1, -1, 88, 89, 90, 600, 601, -1, -1,
3176  -1, -1, 49, -1, -1, -1, 918, -1, 920, -1,
3177  -1, 76, -1, -1, 926, -1, 928, -1, -1, -1,
3178  -1, -1, 424, 88, 89, 90, 91, -1, -1, -1,
3179  -1, 433, -1, -1, -1, -1, -1, -1, -1, 951,
3180  -1, 88, -1, 424, -1, -1, -1, -1, 450, -1,
3181  -1, -1, 433, -1, 658, -1, -1, -1, 662, 663,
3182  -1, 665, 666, -1, -1, -1, -1, 671, 672, 0,
3183  -1, -1, -1, -1, -1, 679, -1, 8, 9, 10,
3184  -1, -1, 13, 14, 15, -1, 17, -1, 490, -1,
3185  -1, -1, -1, -1, -1, -1, 27, -1, -1, -1,
3186  -1, -1, 197, -1, -1, -1, 37, 38, -1, 40,
3187  41, 42, 43, 44, 718, -1, -1, -1, -1, 723,
3188  724, -1, 726, 727, -1, -1, -1, -1, -1, -1,
3189  734, -1, 197, -1, -1, 230, -1, -1, -1, -1,
3190  542, -1, 544, -1, -1, -1, 241, 242, -1, -1,
3191  197, -1, -1, -1, 85, -1, -1, -1, -1, -1,
3192  -1, 542, -1, 544, 566, 230, 261, -1, 772, -1,
3193  -1, -1, 776, -1, -1, -1, 241, 242, -1, 783,
3194  -1, -1, -1, 230, -1, 566, -1, -1, -1, -1,
3195  -1, -1, -1, -1, 241, 242, 261, 292, -1, 803,
3196  -1, -1, 297, -1, -1, -1, 137, -1, 139, 304,
3197  305, 142, 143, 615, 145, -1, 147, 821, 822, -1,
3198  -1, -1, -1, -1, -1, -1, -1, 292, -1, -1,
3199  -1, -1, 297, -1, -1, -1, -1, -1, -1, 304,
3200  305, -1, 337, -1, -1, 292, -1, -1, -1, -1,
3201  297, -1, 654, -1, -1, -1, -1, 304, -1, 661,
3202  307, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3203  -1, -1, 337, 654, -1, -1, -1, -1, -1, -1,
3204  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3205  337, -1, -1, -1, -1, -1, -1, -1, -1, 701,
3206  -1, -1, -1, -1, -1, -1, -1, 709, -1, -1,
3207  -1, -1, -1, -1, 716, 717, -1, -1, -1, -1,
3208  701, -1, -1, -1, -1, -1, -1, -1, 709, 424,
3209  -1, -1, -1, -1, -1, 716, 717, -1, 433, -1,
3210  -1, 743, 744, -1, -1, -1, -1, 951, -1, -1,
3211  -1, -1, -1, 755, -1, 450, -1, -1, -1, 424,
3212  -1, -1, 743, 744, -1, -1, -1, -1, 433, -1,
3213  -1, -1, -1, -1, 755, -1, -1, 424, -1, -1,
3214  -1, -1, -1, -1, -1, 450, 433, -1, -1, -1,
3215  -1, 793, -1, -1, -1, 490, -1, -1, 800, 801,
3216  -1, -1, 804, -1, -1, -1, -1, -1, -1, -1,
3217  -1, -1, 793, -1, -1, -1, -1, -1, 820, 800,
3218  801, -1, -1, 804, -1, 490, -1, -1, -1, -1,
3219  -1, -1, -1, -1, -1, -1, -1, -1, -1, 820,
3220  842, -1, -1, -1, -1, -1, -1, 542, -1, 544,
3221  -1, -1, -1, -1, -1, -1, -1, -1, 860, -1,
3222  -1, -1, 864, -1, -1, -1, -1, -1, -1, -1,
3223  -1, 566, -1, 875, -1, -1, -1, 542, -1, 544,
3224  -1, -1, -1, 864, -1, -1, -1, -1, -1, -1,
3225  -1, -1, -1, -1, 875, 542, -1, 544, -1, -1,
3226  -1, 566, -1, -1, -1, -1, -1, -1, -1, -1,
3227  -1, -1, -1, -1, -1, -1, 918, -1, 920, 566,
3228  615, -1, -1, -1, 926, -1, 928, -1, -1, -1,
3229  -1, -1, -1, -1, -1, -1, -1, 918, -1, 920,
3230  -1, -1, -1, -1, -1, 926, -1, 928, -1, -1,
3231  615, 646, -1, -1, -1, -1, -1, -1, -1, 654,
3232  -1, -1, -1, -1, -1, -1, 661, -1, -1, -1,
3233  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3234  -1, -1, 68, 69, 70, 71, 72, 73, 74, 654,
3235  -1, 77, 78, -1, -1, -1, 661, 83, 84, -1,
3236  -1, -1, -1, -1, -1, -1, 701, 654, -1, -1,
3237  -1, -1, -1, -1, 709, 662, -1, -1, -1, -1,
3238  -1, 716, 717, -1, -1, -1, 112, 113, 114, 115,
3239  116, 117, 118, 119, 120, 121, 701, -1, -1, -1,
3240  -1, -1, -1, -1, 709, -1, -1, -1, 743, 744,
3241  -1, 716, 717, -1, 701, -1, -1, -1, -1, -1,
3242  755, -1, 709, -1, -1, -1, -1, -1, -1, 716,
3243  717, 68, 69, 70, 71, 72, 73, 74, 743, 744,
3244  77, 78, -1, -1, -1, -1, 83, 84, -1, -1,
3245  755, -1, -1, -1, -1, -1, 743, 744, 793, -1,
3246  -1, -1, -1, -1, -1, 800, 801, -1, 755, 804,
3247  -1, -1, -1, -1, -1, 112, 113, 114, 115, 116,
3248  117, 118, 119, 120, 121, 820, -1, -1, 793, -1,
3249  -1, -1, -1, -1, -1, 800, 801, -1, -1, 804,
3250  -1, -1, -1, -1, -1, -1, 793, 842, -1, -1,
3251  -1, -1, -1, 800, 801, 820, -1, 804, -1, -1,
3252  -1, -1, -1, -1, -1, 860, -1, -1, -1, 864,
3253  -1, -1, -1, 820, -1, -1, -1, 842, -1, -1,
3254  875, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3255  -1, -1, -1, -1, -1, 860, -1, -1, -1, 864,
3256  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3257  875, -1, -1, 860, -1, -1, -1, 864, -1, -1,
3258  -1, -1, -1, 918, -1, 920, -1, -1, 875, -1,
3259  -1, 926, -1, 928, -1, -1, -1, -1, -1, -1,
3260  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3261  -1, -1, -1, 918, -1, 920, -1, -1, -1, -1,
3262  -1, 926, -1, 928, -1, -1, -1, -1, -1, -1,
3263  -1, 918, -1, 920, -1, -1, -1, -1, -1, 926,
3264  -1, 928, 0, 1, -1, 3, 4, 5, 6, 7,
3265  -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
3266  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
3267  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3268  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
3269  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3270  -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
3271  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3272  -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
3273  -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
3274  98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
3275  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3276  -1, -1, -1, 0, 122, 123, 124, -1, -1, -1,
3277  -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
3278  17, -1, -1, -1, -1, -1, -1, 145, -1, 147,
3279  27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
3280  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
3281  -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
3282  74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
3283  84, 68, 69, 70, 71, 72, 73, 74, 75, 76,
3284  77, 78, 79, 80, -1, -1, 83, 84, 85, -1,
3285  87, 88, -1, -1, -1, -1, 110, 94, 112, 113,
3286  114, 115, 116, 117, 118, 119, 120, 121, -1, -1,
3287  107, -1, 109, 110, 111, 112, 113, 114, 115, 116,
3288  117, 118, 119, 120, 121, -1, -1, -1, -1, -1,
3289  -1, -1, -1, 147, -1, -1, -1, -1, -1, -1,
3290  137, 138, 139, 140, 0, -1, 143, 144, 145, -1,
3291  147, -1, 8, 9, 10, -1, -1, 13, 14, 15,
3292  -1, 17, -1, -1, -1, -1, -1, -1, -1, -1,
3293  26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
3294  -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
3295  -1, -1, -1, -1, -1, 68, 69, 70, 71, 72,
3296  73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
3297  83, 84, 68, 69, 70, 71, 72, 73, 74, 75,
3298  76, 77, 78, 79, 80, -1, -1, 83, 84, 85,
3299  -1, -1, 88, -1, -1, -1, -1, 110, 94, 112,
3300  113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
3301  -1, -1, -1, -1, 110, -1, 112, 113, 114, 115,
3302  116, 117, 118, 119, 120, 121, -1, -1, -1, -1,
3303  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3304  136, 137, 138, 139, 140, 0, 142, 143, 144, 145,
3305  -1, 147, -1, 8, 9, 10, -1, -1, 13, 14,
3306  15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
3307  -1, -1, 27, 28, 29, -1, -1, -1, -1, -1,
3308  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
3309  -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
3310  72, 73, 74, 75, -1, 77, 78, -1, -1, -1,
3311  -1, 83, 84, 68, 69, 70, 71, 72, 73, 74,
3312  75, 76, 77, 78, 79, 80, -1, -1, 83, 84,
3313  85, -1, -1, 88, -1, -1, -1, -1, -1, 94,
3314  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
3315  -1, -1, 107, -1, -1, 110, 111, 112, 113, 114,
3316  115, 116, 117, 118, 119, 120, 121, -1, -1, -1,
3317  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3318  -1, -1, 137, 138, 139, 140, 0, -1, 143, 144,
3319  145, -1, 147, -1, 8, 9, 10, -1, -1, 13,
3320  14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
3321  -1, -1, 26, 27, 28, -1, -1, -1, -1, -1,
3322  -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
3323  44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3324  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3325  -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
3326  74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
3327  84, 85, -1, -1, 88, -1, -1, -1, -1, -1,
3328  94, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3329  -1, -1, -1, -1, -1, -1, 110, -1, 112, 113,
3330  114, 115, 116, 117, 118, 119, 120, 121, -1, -1,
3331  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3332  -1, -1, 136, 137, 138, 139, 140, 0, 142, 143,
3333  144, 145, -1, 147, -1, 8, 9, 10, -1, -1,
3334  13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3335  -1, -1, -1, -1, 27, 28, -1, -1, -1, -1,
3336  -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
3337  43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
3338  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3339  -1, -1, -1, -1, -1, 68, 69, 70, 71, 72,
3340  73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
3341  83, 84, 85, -1, -1, 88, -1, -1, -1, -1,
3342  -1, 94, -1, -1, -1, -1, -1, -1, -1, -1,
3343  -1, -1, -1, -1, -1, -1, -1, 110, -1, 112,
3344  113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
3345  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3346  -1, -1, -1, -1, 137, 138, 139, 140, 0, 142,
3347  143, 144, 145, -1, 147, -1, 8, 9, 10, -1,
3348  -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
3349  -1, -1, -1, -1, 26, -1, -1, -1, -1, -1,
3350  -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
3351  42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
3352  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3353  -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
3354  72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
3355  -1, 83, 84, 85, 0, 87, -1, -1, -1, -1,
3356  -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
3357  -1, 17, -1, -1, -1, -1, -1, 109, 110, -1,
3358  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
3359  -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
3360  -1, -1, -1, -1, 136, 137, 138, 139, 140, -1,
3361  -1, 143, -1, 145, -1, 147, -1, -1, -1, -1,
3362  -1, -1, 68, 69, 70, 71, 72, 73, 74, 75,
3363  76, 77, 78, 79, 80, -1, -1, 83, 84, 85,
3364  -1, 87, -1, -1, -1, -1, -1, -1, -1, -1,
3365  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3366  -1, -1, -1, 109, 110, -1, 112, 113, 114, 115,
3367  116, 117, 118, 119, 120, 121, -1, -1, -1, -1,
3368  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3369  -1, 137, 138, 139, 140, -1, -1, 143, -1, 145,
3370  1, 147, 3, 4, 5, 6, 7, 8, 9, 10,
3371  11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
3372  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3373  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3374  -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
3375  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3376  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3377  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3378  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3379  -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
3380  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3381  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3382  -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
3383  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3384  -1, -1, -1, -1, 145, 1, 147, 3, 4, 5,
3385  6, 7, -1, -1, 10, 11, 12, -1, 14, 15,
3386  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3387  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3388  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3389  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3390  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3391  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3392  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3393  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3394  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3395  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3396  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3397  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3398  -1, -1, -1, -1, -1, -1, -1, -1, -1, 145,
3399  1, 147, 3, 4, 5, 6, 7, -1, -1, 10,
3400  11, 12, -1, -1, 15, 16, 17, 18, 19, 20,
3401  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3402  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3403  -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
3404  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3405  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3406  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3407  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3408  -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
3409  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3410  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3411  -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
3412  1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
3413  11, 12, -1, -1, 145, 16, 147, 18, 19, 20,
3414  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3415  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3416  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
3417  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3418  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3419  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3420  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3421  -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
3422  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3423  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3424  -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
3425  -1, -1, -1, -1, -1, -1, 137, -1, -1, -1,
3426  -1, -1, -1, -1, 145, 1, 147, 3, 4, 5,
3427  6, 7, -1, -1, 10, 11, 12, -1, -1, 15,
3428  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3429  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3430  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3431  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3432  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3433  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3434  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3435  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3436  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3437  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3438  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3439  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
3440  6, 7, -1, 9, 10, 11, 12, -1, -1, 145,
3441  16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
3442  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3443  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3444  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3445  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3446  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3447  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3448  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3449  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3450  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3451  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3452  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
3453  6, 7, -1, -1, -1, 11, 12, -1, -1, 145,
3454  16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
3455  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3456  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3457  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3458  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3459  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3460  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3461  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3462  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3463  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3464  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3465  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
3466  6, 7, -1, -1, -1, 11, 12, 143, -1, 145,
3467  16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
3468  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3469  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3470  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3471  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3472  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3473  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3474  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3475  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3476  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3477  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3478  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
3479  6, 7, -1, -1, -1, 11, 12, 143, -1, 145,
3480  16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
3481  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3482  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3483  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3484  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3485  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3486  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3487  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3488  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3489  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3490  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3491  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3492  -1, 137, -1, -1, -1, -1, -1, -1, -1, 145,
3493  1, 147, 3, 4, 5, 6, 7, -1, -1, 10,
3494  11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
3495  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3496  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3497  -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
3498  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3499  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3500  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3501  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3502  -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
3503  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3504  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3505  -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
3506  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
3507  11, 12, -1, -1, 145, 16, 147, 18, 19, 20,
3508  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3509  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3510  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
3511  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
3512  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3513  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3514  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3515  -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
3516  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3517  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3518  12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
3519  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3520  32, 33, 34, 35, 36, -1, 147, 39, -1, -1,
3521  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3522  52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
3523  62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
3524  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3525  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3526  92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
3527  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3528  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3529  122, 123, 124, -1, -1, -1, -1, -1, -1, -1,
3530  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3531  12, -1, -1, 145, 16, 147, 18, 19, 20, 21,
3532  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3533  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
3534  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3535  52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
3536  62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
3537  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3538  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3539  92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
3540  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3541  3, 4, 5, 6, 7, -1, -1, -1, 11, 12,
3542  122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
3543  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
3544  33, 34, 35, 36, -1, 147, 39, -1, -1, -1,
3545  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
3546  53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
3547  63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
3548  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3549  -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
3550  93, -1, 95, -1, 97, 98, 99, 100, 101, 102,
3551  103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3552  -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
3553  123, 124, -1, -1, -1, -1, -1, -1, 3, 4,
3554  5, 6, 7, -1, -1, -1, 11, 12, -1, -1,
3555  -1, 16, 145, 18, 19, 20, 21, 22, 23, 24,
3556  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
3557  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
3558  45, 46, -1, 48, 49, 50, 51, 52, 53, 54,
3559  55, 56, 57, -1, 59, 60, -1, 62, 63, 64,
3560  -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
3561  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3562  -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
3563  95, -1, 97, 98, 99, 100, 101, 102, 103, -1,
3564  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3565  -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
3566  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3567  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3568  145, 3, 4, 5, 6, 7, 8, 9, 10, 11,
3569  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
3570  22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
3571  32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
3572  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
3573  52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
3574  -1, -1, -1, -1, 66, 67, 68, 69, 70, 71,
3575  72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
3576  82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
3577  -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
3578  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3579  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
3580  -1, 123, 124, -1, -1, -1, -1, -1, 3, 4,
3581  5, -1, 7, -1, -1, -1, 11, 12, -1, 141,
3582  142, 16, -1, 18, 19, 20, 21, 22, 23, 24,
3583  -1, 26, -1, -1, -1, 30, 31, 32, 33, 34,
3584  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
3585  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
3586  55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
3587  -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
3588  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3589  -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
3590  95, 96, 97, 98, 99, 100, 101, 102, 103, -1,
3591  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3592  -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
3593  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
3594  -1, 136, -1, 11, 12, -1, -1, 142, 16, -1,
3595  18, 19, 20, 21, 22, 23, 24, -1, 26, -1,
3596  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3597  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
3598  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3599  58, 59, 60, -1, 62, 63, 64, -1, 66, 67,
3600  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3601  -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
3602  -1, 89, 90, -1, 92, 93, -1, 95, 96, 97,
3603  98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
3604  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3605  -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
3606  -1, -1, 3, 4, 5, -1, 7, -1, 136, -1,
3607  11, 12, -1, -1, 142, 16, -1, 18, 19, 20,
3608  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3609  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3610  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
3611  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
3612  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3613  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3614  -1, -1, -1, -1, -1, 86, 87, -1, 89, 90,
3615  -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
3616  101, 102, 103, -1, -1, -1, -1, -1, 109, -1,
3617  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
3618  7, 122, 123, 124, 11, 12, -1, -1, -1, 16,
3619  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3620  -1, 142, -1, 30, 31, 32, 33, 34, 35, 36,
3621  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
3622  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
3623  57, 58, 59, 60, -1, 62, 63, 64, -1, 66,
3624  67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3625  -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
3626  -1, -1, 89, 90, -1, 92, 93, -1, 95, 96,
3627  97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
3628  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3629  3, 4, 5, -1, 7, 122, 123, 124, 11, 12,
3630  -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
3631  23, 24, -1, -1, -1, 142, -1, 30, 31, 32,
3632  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
3633  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
3634  53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
3635  63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
3636  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3637  -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
3638  93, -1, 95, 96, 97, 98, 99, 100, 101, 102,
3639  103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3640  -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
3641  123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
3642  -1, -1, -1, -1, -1, -1, -1, -1, -1, 142,
3643  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
3644  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
3645  23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
3646  33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
3647  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
3648  53, 54, 55, 56, 57, -1, -1, -1, -1, -1,
3649  -1, -1, -1, 66, 67, 68, 69, 70, 71, 72,
3650  73, 74, -1, -1, 77, 78, -1, -1, 81, 82,
3651  83, 84, -1, -1, -1, -1, -1, -1, -1, -1,
3652  -1, -1, 95, -1, -1, -1, -1, -1, -1, -1,
3653  -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3654  113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
3655  123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
3656  -1, -1, -1, -1, -1, -1, -1, -1, 141, 3,
3657  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
3658  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
3659  24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
3660  34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
3661  -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
3662  54, -1, 56, -1, -1, -1, -1, -1, -1, -1,
3663  -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
3664  74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
3665  84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3666  -1, 95, -1, -1, 98, -1, -1, -1, -1, -1,
3667  -1, -1, -1, -1, -1, -1, -1, -1, 112, 113,
3668  114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
3669  124, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3670  -1, -1, -1, -1, -1, -1, -1, 141, 3, 4,
3671  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3672  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3673  25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
3674  35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
3675  45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
3676  -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
3677  -1, 66, 67, 68, 69, 70, 71, 72, 73, 74,
3678  -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
3679  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3680  95, -1, -1, 98, -1, -1, -1, -1, -1, -1,
3681  -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
3682  115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
3683  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3684  -1, -1, -1, -1, -1, -1, 141, 3, 4, 5,
3685  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
3686  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
3687  26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3688  36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
3689  46, 47, 48, 49, 50, 51, 52, 53, -1, -1,
3690  56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3691  66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
3692  -1, 77, 78, -1, -1, 81, 82, 83, 84, -1,
3693  -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
3694  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3695  -1, -1, -1, -1, -1, -1, 112, 113, 114, 115,
3696  116, 117, 118, 119, 120, 121, -1, 123, 124, -1,
3697  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3698  12, -1, -1, -1, 16, 141, 18, 19, 20, 21,
3699  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3700  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
3701  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3702  52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
3703  62, 63, 64, -1, -1, -1, -1, -1, -1, -1,
3704  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3705  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3706  92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
3707  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3708  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
3709  122, 11, 12, -1, -1, -1, 16, -1, 18, 19,
3710  20, 21, 22, 23, 24, -1, -1, -1, 140, -1,
3711  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
3712  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
3713  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
3714  60, -1, 62, 63, 64, -1, -1, -1, -1, -1,
3715  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3716  -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
3717  90, -1, 92, 93, -1, -1, -1, 97, 98, 99,
3718  100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
3719  -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
3720  -1, -1, 122, 11, 12, -1, -1, -1, 16, -1,
3721  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
3722  140, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3723  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
3724  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3725  -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
3726  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3727  -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
3728  -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
3729  98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
3730  -1, -1, -1, -1, 3, 4, 5, 6, 7, -1,
3731  -1, -1, 11, 12, 122, 123, 124, 16, -1, 18,
3732  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
3733  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3734  39, -1, -1, -1, -1, -1, 45, 46, -1, 48,
3735  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
3736  59, 60, -1, 62, 63, 64, -1, 66, 67, -1,
3737  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3738  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
3739  89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
3740  99, 100, 101, 102, 103, -1, -1, -1, -1, -1,
3741  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
3742  -1, 11, 12, 122, 123, 124, 16, -1, 18, 19,
3743  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
3744  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
3745  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
3746  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
3747  60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
3748  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3749  -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
3750  90, -1, 92, 93, -1, 95, 96, 97, 98, 99,
3751  100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
3752  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
3753  11, 12, 122, 123, 124, 16, -1, 18, 19, 20,
3754  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3755  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3756  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
3757  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
3758  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3759  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3760  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3761  -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
3762  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3763  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3764  12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
3765  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3766  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
3767  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3768  52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
3769  62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
3770  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3771  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3772  92, 93, -1, 95, -1, 97, 98, 99, 100, 101,
3773  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3774  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
3775  122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
3776  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
3777  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
3778  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
3779  53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
3780  63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
3781  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3782  -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
3783  93, -1, -1, 96, 97, 98, 99, 100, 101, 102,
3784  103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
3785  4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
3786  123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
3787  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
3788  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
3789  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
3790  54, 55, 56, 57, 58, 59, 60, -1, 62, 63,
3791  64, -1, 66, 67, -1, -1, -1, -1, -1, -1,
3792  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3793  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
3794  -1, 95, -1, 97, 98, 99, 100, 101, 102, 103,
3795  -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
3796  5, -1, 7, -1, -1, -1, 11, 12, 122, 123,
3797  124, 16, -1, 18, 19, 20, 21, 22, 23, 24,
3798  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
3799  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
3800  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
3801  55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
3802  -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
3803  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3804  -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
3805  -1, -1, 97, 98, 99, 100, 101, 102, 103, -1,
3806  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
3807  -1, 7, -1, -1, -1, 11, 12, 122, 123, 124,
3808  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3809  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3810  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
3811  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
3812  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3813  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3814  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3815  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3816  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3817  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
3818  7, -1, -1, -1, 11, 12, 122, 123, 124, 16,
3819  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3820  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
3821  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
3822  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
3823  57, -1, 59, 60, -1, 62, 63, 64, -1, 66,
3824  67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3825  -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
3826  -1, -1, 89, 90, -1, 92, 93, -1, 95, -1,
3827  97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
3828  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
3829  -1, -1, -1, 11, 12, 122, 123, 124, 16, -1,
3830  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
3831  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3832  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
3833  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3834  -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
3835  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3836  -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
3837  -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
3838  98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
3839  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
3840  -1, -1, 11, 12, 122, 123, 124, 16, -1, 18,
3841  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
3842  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3843  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
3844  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
3845  59, 60, -1, 62, 63, 64, -1, 66, 67, -1,
3846  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3847  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
3848  89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
3849  99, 100, 101, 102, 103, -1, -1, -1, -1, -1,
3850  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
3851  -1, 11, 12, 122, 123, 124, 16, -1, 18, 19,
3852  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
3853  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
3854  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
3855  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
3856  60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
3857  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3858  -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
3859  90, -1, 92, 93, -1, 95, -1, 97, 98, 99,
3860  100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
3861  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
3862  11, 12, 122, 123, 124, 16, -1, 18, 19, 20,
3863  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3864  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3865  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
3866  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3867  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3868  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3869  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3870  -1, 92, 93, -1, -1, -1, 97, 98, 99, 100,
3871  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3872  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3873  12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
3874  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3875  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
3876  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3877  52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
3878  62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
3879  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3880  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3881  92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
3882  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3883  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
3884  122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
3885  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
3886  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
3887  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
3888  53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
3889  63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
3890  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3891  -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
3892  93, -1, -1, -1, 97, 98, 99, 100, 101, 102,
3893  103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
3894  4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
3895  123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
3896  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
3897  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
3898  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
3899  54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
3900  64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3901  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3902  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
3903  -1, 95, -1, 97, 98, 99, 100, 101, 102, 103,
3904  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
3905  -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
3906  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
3907  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3908  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
3909  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
3910  59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
3911  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3912  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
3913  89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
3914  99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
3915  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
3916  -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
3917  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
3918  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
3919  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
3920  54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
3921  64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3922  -1, -1, -1, -1, -1, -1, -1, -1, -1, 83,
3923  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
3924  -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
3925  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
3926  -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
3927  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
3928  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3929  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
3930  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
3931  59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
3932  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3933  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
3934  89, 90, -1, 92, 93, -1, -1, -1, 97, 98,
3935  99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
3936  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
3937  -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
3938  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
3939  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
3940  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
3941  54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
3942  64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3943  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3944  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
3945  -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
3946  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
3947  -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
3948  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
3949  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3950  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
3951  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
3952  59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
3953  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3954  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
3955  89, 90, -1, 92, 93, -1, -1, -1, 97, 98,
3956  99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
3957  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
3958  -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
3959  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
3960  34, 35, 36, -1, -1, 39, -1, 44, -1, -1,
3961  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
3962  54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
3963  64, 68, 69, 70, 71, 72, 73, 74, 75, 76,
3964  77, 78, 79, 80, -1, -1, 83, 84, -1, -1,
3965  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
3966  -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
3967  -1, -1, -1, 110, -1, 112, 113, 114, 115, 116,
3968  117, 118, 119, 120, 121, -1, -1, -1, 122, -1,
3969  52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
3970  -1, -1, -1, 140, 66, 67, 68, 69, 70, 71,
3971  72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
3972  82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
3973  -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
3974  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3975  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
3976  -1, 123, 124, -1, -1, -1, -1, 52, 53, -1,
3977  -1, 56, -1, -1, -1, -1, -1, -1, -1, 141,
3978  142, 66, 67, 68, 69, 70, 71, 72, 73, 74,
3979  -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
3980  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3981  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3982  -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
3983  115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
3984  -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
3985  -1, -1, -1, -1, -1, -1, 141, 142, 66, 67,
3986  68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
3987  78, -1, -1, 81, 82, 83, 84, -1, -1, -1,
3988  -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
3989  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3990  -1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
3991  118, 119, 120, 121, -1, 123, 124, -1, -1, -1,
3992  -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
3993  -1, -1, -1, 141, 142, 66, 67, 68, 69, 70,
3994  71, 72, 73, 74, -1, -1, 77, 78, -1, -1,
3995  81, 82, 83, 84, -1, -1, -1, -1, -1, -1,
3996  -1, -1, -1, -1, 95, -1, -1, -1, -1, -1,
3997  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3998  -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
3999  121, -1, 123, 124, -1, -1, -1, -1, 52, 53,
4000  -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
4001  141, 142, 66, 67, 68, 69, 70, 71, 72, 73,
4002  74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
4003  84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4004  -1, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4005  -1, -1, -1, -1, -1, -1, -1, -1, 112, 113,
4006  114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
4007  124, -1, -1, -1, -1, 52, 53, -1, -1, 56,
4008  -1, -1, -1, -1, -1, -1, -1, 141, 142, 66,
4009  67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
4010  77, 78, -1, -1, 81, 82, 83, 84, -1, -1,
4011  -1, -1, -1, -1, -1, -1, -1, -1, 95, -1,
4012  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4013  -1, -1, -1, -1, -1, 112, 113, 114, 115, 116,
4014  117, 118, 119, 120, 121, -1, 123, 124, -1, -1,
4015  -1, -1, 52, 53, -1, -1, 56, -1, -1, -1,
4016  -1, -1, -1, -1, 141, 142, 66, 67, 68, 69,
4017  70, 71, 72, 73, 74, -1, -1, 77, 78, -1,
4018  -1, 81, 82, 83, 84, -1, -1, -1, -1, -1,
4019  -1, -1, -1, -1, -1, 95, -1, -1, -1, -1,
4020  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4021  -1, -1, 112, 113, 114, 115, 116, 117, 118, 119,
4022  120, 121, -1, 123, 124, -1, -1, -1, -1, 52,
4023  53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
4024  -1, 141, 142, 66, 67, 68, 69, 70, 71, 72,
4025  73, 74, -1, -1, 77, 78, -1, -1, 81, 82,
4026  83, 84, -1, -1, -1, -1, -1, -1, -1, -1,
4027  -1, -1, 95, -1, -1, -1, -1, -1, -1, -1,
4028  -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
4029  113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
4030  123, 124, -1, -1, -1, -1, 52, 53, -1, -1,
4031  56, -1, -1, -1, -1, -1, -1, -1, 141, 142,
4032  66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
4033  -1, 77, 78, -1, -1, 81, 82, 83, 84, -1,
4034  -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
4035  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4036  -1, -1, -1, -1, -1, -1, 112, 113, 114, 115,
4037  116, 117, 118, 119, 120, 121, -1, 123, 124, -1,
4038  -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
4039  -1, -1, -1, -1, -1, 141, 142, 66, 67, 68,
4040  69, 70, 71, 72, 73, 74, -1, -1, 77, 78,
4041  -1, -1, 81, 82, 83, 84, -1, -1, -1, -1,
4042  -1, -1, -1, -1, -1, -1, 95, -1, -1, -1,
4043  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4044  -1, -1, -1, 112, 113, 114, 115, 116, 117, 118,
4045  119, 120, 121, -1, 123, 124, -1, -1, -1, -1,
4046  52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
4047  -1, -1, 141, 142, 66, 67, 68, 69, 70, 71,
4048  72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
4049  82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
4050  -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
4051  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4052  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
4053  -1, 123, 124, -1, -1, -1, -1, 52, 53, -1,
4054  -1, 56, -1, -1, -1, -1, -1, -1, -1, 141,
4055  142, 66, 67, 68, 69, 70, 71, 72, 73, 74,
4056  -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
4057  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4058  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4059  -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
4060  115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
4061  -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
4062  -1, -1, -1, -1, -1, -1, 141, 142, 66, 67,
4063  68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
4064  78, -1, -1, 81, 82, 83, 84, -1, -1, -1,
4065  -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
4066  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4067  -1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
4068  118, 119, 120, 121, -1, 123, 124, -1, -1, -1,
4069  -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
4070  -1, -1, -1, 141, 142, 66, 67, 68, 69, 70,
4071  71, 72, 73, 74, -1, -1, 77, 78, -1, -1,
4072  81, 82, 83, 84, -1, -1, -1, -1, -1, -1,
4073  -1, -1, -1, -1, 95, -1, -1, -1, -1, -1,
4074  -1, -1, 44, -1, -1, -1, -1, -1, -1, -1,
4075  -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
4076  121, 44, 123, 124, -1, -1, 68, 69, 70, 71,
4077  72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
4078  141, 83, 84, -1, -1, 68, 69, 70, 71, 72,
4079  73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
4080  83, 84, -1, -1, -1, -1, -1, -1, 110, -1,
4081  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
4082  -1, -1, -1, -1, -1, -1, -1, 110, -1, 112,
4083  113, 114, 115, 116, 117, 118, 119, 120, 121
4084 };
4085 
4086 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4087  symbol of state STATE-NUM. */
4088 static const yytype_uint16 yystos[] =
4089 {
4090  0, 149, 150, 0, 1, 3, 4, 5, 6, 7,
4091  11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
4092  30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
4093  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4094  57, 59, 60, 62, 63, 64, 66, 67, 86, 89,
4095  90, 92, 93, 95, 97, 98, 99, 100, 101, 102,
4096  103, 122, 123, 124, 151, 152, 153, 158, 160, 161,
4097  163, 164, 167, 168, 170, 171, 172, 174, 175, 185,
4098  199, 216, 217, 218, 219, 220, 221, 222, 223, 224,
4099  225, 226, 249, 250, 260, 261, 262, 263, 264, 265,
4100  266, 269, 279, 281, 282, 283, 284, 285, 286, 287,
4101  310, 321, 153, 3, 4, 5, 6, 7, 8, 9,
4102  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4103  20, 21, 22, 23, 24, 25, 26, 30, 31, 32,
4104  33, 34, 35, 36, 37, 38, 39, 45, 46, 47,
4105  48, 49, 50, 51, 52, 53, 56, 66, 67, 68,
4106  69, 70, 71, 72, 73, 74, 77, 78, 81, 82,
4107  83, 84, 95, 112, 113, 114, 115, 116, 117, 118,
4108  119, 120, 121, 123, 124, 141, 178, 179, 180, 181,
4109  183, 184, 279, 281, 39, 58, 86, 89, 95, 96,
4110  123, 167, 175, 185, 187, 192, 195, 197, 216, 283,
4111  284, 286, 287, 308, 309, 192, 192, 142, 193, 194,
4112  142, 189, 193, 142, 147, 315, 54, 180, 315, 154,
4113  136, 21, 22, 30, 31, 32, 185, 216, 310, 185,
4114  56, 1, 89, 156, 157, 158, 169, 170, 321, 161,
4115  188, 197, 308, 321, 187, 307, 308, 321, 46, 86,
4116  122, 140, 174, 199, 216, 283, 284, 287, 242, 243,
4117  54, 55, 57, 178, 272, 280, 271, 272, 273, 146,
4118  267, 146, 270, 59, 60, 163, 185, 185, 145, 147,
4119  314, 319, 320, 40, 41, 42, 43, 44, 37, 38,
4120  28, 247, 109, 140, 89, 95, 171, 109, 68, 69,
4121  70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
4122  80, 83, 84, 110, 112, 113, 114, 115, 116, 117,
4123  118, 119, 120, 121, 85, 138, 139, 200, 161, 162,
4124  162, 203, 205, 162, 314, 320, 86, 168, 175, 216,
4125  232, 283, 284, 287, 52, 56, 83, 86, 176, 177,
4126  216, 283, 284, 287, 177, 33, 34, 35, 36, 49,
4127  50, 51, 52, 56, 142, 178, 285, 305, 85, 139,
4128  26, 136, 251, 263, 87, 87, 189, 193, 251, 140,
4129  187, 56, 187, 187, 109, 88, 140, 196, 321, 85,
4130  138, 139, 87, 87, 140, 196, 192, 315, 316, 192,
4131  191, 192, 197, 308, 321, 161, 316, 161, 54, 63,
4132  64, 159, 142, 186, 136, 156, 85, 139, 87, 158,
4133  169, 143, 314, 320, 316, 201, 144, 140, 147, 318,
4134  140, 318, 137, 318, 315, 56, 59, 60, 171, 173,
4135  140, 85, 138, 139, 244, 61, 104, 105, 106, 274,
4136  106, 274, 106, 65, 274, 106, 106, 268, 274, 106,
4137  61, 106, 68, 68, 145, 153, 162, 162, 162, 162,
4138  158, 161, 161, 248, 95, 163, 187, 197, 198, 169,
4139  140, 174, 140, 160, 163, 175, 185, 187, 198, 185,
4140  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
4141  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
4142  185, 185, 185, 185, 185, 52, 53, 56, 183, 189,
4143  311, 312, 191, 52, 53, 56, 183, 189, 311, 155,
4144  156, 13, 228, 319, 228, 162, 162, 314, 17, 254,
4145  56, 85, 138, 139, 25, 161, 52, 56, 176, 1,
4146  113, 288, 319, 85, 138, 139, 212, 306, 213, 85,
4147  139, 313, 52, 56, 311, 311, 253, 252, 163, 185,
4148  163, 185, 94, 165, 182, 185, 187, 95, 187, 195,
4149  308, 52, 56, 191, 52, 56, 309, 316, 143, 316,
4150  140, 140, 316, 180, 202, 185, 151, 137, 311, 311,
4151  185, 316, 158, 316, 308, 140, 173, 52, 56, 191,
4152  52, 56, 52, 54, 55, 56, 57, 89, 95, 96,
4153  116, 119, 142, 245, 291, 292, 293, 294, 295, 296,
4154  299, 300, 301, 302, 303, 276, 275, 146, 274, 146,
4155  185, 185, 76, 114, 237, 238, 321, 187, 140, 316,
4156  173, 140, 109, 44, 315, 87, 87, 189, 193, 315,
4157  317, 87, 87, 189, 190, 193, 321, 10, 227, 8,
4158  256, 321, 156, 13, 156, 27, 229, 319, 229, 254,
4159  197, 227, 52, 56, 191, 52, 56, 207, 210, 319,
4160  289, 209, 52, 56, 176, 191, 155, 161, 142, 290,
4161  291, 214, 190, 193, 190, 193, 237, 237, 44, 166,
4162  180, 187, 196, 87, 87, 317, 87, 87, 308, 161,
4163  137, 318, 171, 317, 109, 52, 89, 95, 233, 234,
4164  235, 293, 291, 29, 107, 246, 140, 304, 321, 140,
4165  304, 52, 140, 304, 52, 277, 54, 55, 57, 278,
4166  287, 52, 145, 236, 239, 295, 297, 298, 301, 303,
4167  321, 156, 95, 187, 173, 185, 111, 163, 185, 163,
4168  185, 165, 144, 87, 163, 185, 163, 185, 165, 187,
4169  198, 257, 321, 15, 231, 321, 14, 230, 231, 231,
4170  204, 206, 227, 140, 228, 317, 162, 319, 162, 155,
4171  317, 227, 316, 291, 155, 319, 178, 156, 156, 185,
4172  237, 87, 140, 316, 187, 235, 140, 293, 140, 316,
4173  239, 156, 156, 294, 299, 301, 303, 295, 296, 301,
4174  295, 156, 109, 52, 240, 241, 292, 239, 114, 140,
4175  304, 140, 304, 140, 304, 10, 187, 185, 163, 185,
4176  88, 258, 321, 156, 9, 259, 321, 162, 227, 227,
4177  156, 156, 187, 156, 229, 211, 319, 227, 316, 227,
4178  215, 10, 137, 156, 316, 234, 140, 95, 233, 316,
4179  10, 137, 140, 304, 140, 304, 140, 304, 140, 304,
4180  304, 137, 86, 216, 140, 114, 298, 301, 295, 297,
4181  301, 295, 86, 175, 216, 283, 284, 287, 228, 156,
4182  228, 227, 227, 231, 254, 255, 208, 155, 290, 137,
4183  140, 234, 140, 293, 295, 301, 295, 295, 56, 85,
4184  241, 140, 304, 140, 304, 304, 140, 304, 304, 56,
4185  85, 138, 139, 156, 156, 156, 227, 155, 234, 140,
4186  304, 140, 304, 304, 304, 52, 56, 295, 301, 295,
4187  295, 52, 56, 191, 52, 56, 256, 230, 227, 227,
4188  234, 295, 304, 140, 304, 304, 304, 317, 304, 295,
4189  304
4190 };
4191 
4192 #define yyerrok (yyerrstatus = 0)
4193 #define yyclearin (yychar = YYEMPTY)
4194 #define YYEMPTY (-2)
4195 #define YYEOF 0
4196 
4197 #define YYACCEPT goto yyacceptlab
4198 #define YYABORT goto yyabortlab
4199 #define YYERROR goto yyerrorlab
4200 
4201 
4202 /* Like YYERROR except do call yyerror. This remains here temporarily
4203  to ease the transition to the new meaning of YYERROR, for GCC.
4204  Once GCC version 2 has supplanted version 1, this can go. However,
4205  YYFAIL appears to be in use. Nevertheless, it is formally deprecated
4206  in Bison 2.4.2's NEWS entry, where a plan to phase it out is
4207  discussed. */
4208 
4209 #define YYFAIL goto yyerrlab
4210 #if defined YYFAIL
4211  /* This is here to suppress warnings from the GCC cpp's
4212  -Wunused-macros. Normally we don't worry about that warning, but
4213  some users do, and we want to make it easy for users to remove
4214  YYFAIL uses, which will produce warnings from Bison 2.5. */
4215 #endif
4216 
4217 #define YYRECOVERING() (!!yyerrstatus)
4218 
4219 #define YYBACKUP(Token, Value) \
4220 do \
4221  if (yychar == YYEMPTY && yylen == 1) \
4222  { \
4223  yychar = (Token); \
4224  yylval = (Value); \
4225  YYPOPSTACK (1); \
4226  goto yybackup; \
4227  } \
4228  else \
4229  { \
4230  parser_yyerror (parser, YY_("syntax error: cannot back up")); \
4231  YYERROR; \
4232  } \
4233 while (YYID (0))
4234 
4235 
4236 #define YYTERROR 1
4237 #define YYERRCODE 256
4238 
4239 
4240 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
4241  If N is 0, then set CURRENT to the empty location which ends
4242  the previous symbol: RHS[0] (always defined). */
4243 
4244 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
4245 #ifndef YYLLOC_DEFAULT
4246 # define YYLLOC_DEFAULT(Current, Rhs, N) \
4247  do \
4248  if (YYID (N)) \
4249  { \
4250  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
4251  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
4252  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
4253  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
4254  } \
4255  else \
4256  { \
4257  (Current).first_line = (Current).last_line = \
4258  YYRHSLOC (Rhs, 0).last_line; \
4259  (Current).first_column = (Current).last_column = \
4260  YYRHSLOC (Rhs, 0).last_column; \
4261  } \
4262  while (YYID (0))
4263 #endif
4264 
4265 
4266 /* This macro is provided for backward compatibility. */
4267 
4268 #ifndef YY_LOCATION_PRINT
4269 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
4270 #endif
4271 
4272 
4273 /* YYLEX -- calling `yylex' with the right arguments. */
4274 
4275 #ifdef YYLEX_PARAM
4276 # define YYLEX yylex (&yylval, YYLEX_PARAM)
4277 #else
4278 # define YYLEX yylex (&yylval, parser)
4279 #endif
4280 
4281 /* Enable debugging if requested. */
4282 #if YYDEBUG
4283 
4284 # ifndef YYFPRINTF
4285 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
4286 # define YYFPRINTF fprintf
4287 # endif
4288 
4289 # define YYDPRINTF(Args) \
4290 do { \
4291  if (yydebug) \
4292  YYFPRINTF Args; \
4293 } while (YYID (0))
4294 
4295 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
4296 do { \
4297  if (yydebug) \
4298  { \
4299  YYFPRINTF (stderr, "%s ", Title); \
4300  yy_symbol_print (stderr, \
4301  Type, Value, parser); \
4302  YYFPRINTF (stderr, "\n"); \
4303  } \
4304 } while (YYID (0))
4305 
4306 
4307 /*--------------------------------.
4308 | Print this symbol on YYOUTPUT. |
4309 `--------------------------------*/
4310 
4311 /*ARGSUSED*/
4312 #if (defined __STDC__ || defined __C99__FUNC__ \
4313  || defined __cplusplus || defined _MSC_VER)
4314 static void
4315 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser)
4316 #else
4317 static void
4318 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser)
4319  FILE *yyoutput;
4320  int yytype;
4321  YYSTYPE const * const yyvaluep;
4322  struct parser_params *parser;
4323 #endif
4324 {
4325  if (!yyvaluep)
4326  return;
4327  YYUSE (parser);
4328 # ifdef YYPRINT
4329  if (yytype < YYNTOKENS)
4330  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
4331 # else
4332  YYUSE (yyoutput);
4333 # endif
4334  switch (yytype)
4335  {
4336  default:
4337  break;
4338  }
4339 }
4340 
4341 
4342 /*--------------------------------.
4343 | Print this symbol on YYOUTPUT. |
4344 `--------------------------------*/
4345 
4346 #if (defined __STDC__ || defined __C99__FUNC__ \
4347  || defined __cplusplus || defined _MSC_VER)
4348 static void
4349 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser)
4350 #else
4351 static void
4352 yy_symbol_print (yyoutput, yytype, yyvaluep, parser)
4353  FILE *yyoutput;
4354  int yytype;
4355  YYSTYPE const * const yyvaluep;
4356  struct parser_params *parser;
4357 #endif
4358 {
4359  if (yytype < YYNTOKENS)
4360  YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
4361  else
4362  YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
4363 
4364  yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
4365  YYFPRINTF (yyoutput, ")");
4366 }
4367 
4368 /*------------------------------------------------------------------.
4369 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
4370 | TOP (included). |
4371 `------------------------------------------------------------------*/
4372 
4373 #if (defined __STDC__ || defined __C99__FUNC__ \
4374  || defined __cplusplus || defined _MSC_VER)
4375 static void
4376 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
4377 #else
4378 static void
4379 yy_stack_print (yybottom, yytop)
4380  yytype_int16 *yybottom;
4381  yytype_int16 *yytop;
4382 #endif
4383 {
4384  YYFPRINTF (stderr, "Stack now");
4385  for (; yybottom <= yytop; yybottom++)
4386  {
4387  int yybot = *yybottom;
4388  YYFPRINTF (stderr, " %d", yybot);
4389  }
4390  YYFPRINTF (stderr, "\n");
4391 }
4392 
4393 # define YY_STACK_PRINT(Bottom, Top) \
4394 do { \
4395  if (yydebug) \
4396  yy_stack_print ((Bottom), (Top)); \
4397 } while (YYID (0))
4398 
4399 
4400 /*------------------------------------------------.
4401 | Report that the YYRULE is going to be reduced. |
4402 `------------------------------------------------*/
4403 
4404 #if (defined __STDC__ || defined __C99__FUNC__ \
4405  || defined __cplusplus || defined _MSC_VER)
4406 static void
4407 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser)
4408 #else
4409 static void
4410 yy_reduce_print (yyvsp, yyrule, parser)
4411  YYSTYPE *yyvsp;
4412  int yyrule;
4413  struct parser_params *parser;
4414 #endif
4415 {
4416  int yynrhs = yyr2[yyrule];
4417  int yyi;
4418  unsigned long int yylno = yyrline[yyrule];
4419  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
4420  yyrule - 1, yylno);
4421  /* The symbols being reduced. */
4422  for (yyi = 0; yyi < yynrhs; yyi++)
4423  {
4424  YYFPRINTF (stderr, " $%d = ", yyi + 1);
4425  yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
4426  &(yyvsp[(yyi + 1) - (yynrhs)])
4427  , parser);
4428  YYFPRINTF (stderr, "\n");
4429  }
4430 }
4431 
4432 # define YY_REDUCE_PRINT(Rule) \
4433 do { \
4434  if (yydebug) \
4435  yy_reduce_print (yyvsp, Rule, parser); \
4436 } while (YYID (0))
4437 
4438 /* Nonzero means print parse trace. It is left uninitialized so that
4439  multiple parsers can coexist. */
4440 #ifndef yydebug
4441 int yydebug;
4442 #endif
4443 #else /* !YYDEBUG */
4444 # define YYDPRINTF(Args)
4445 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
4446 # define YY_STACK_PRINT(Bottom, Top)
4447 # define YY_REDUCE_PRINT(Rule)
4448 #endif /* !YYDEBUG */
4449 
4450 
4451 /* YYINITDEPTH -- initial size of the parser's stacks. */
4452 #ifndef YYINITDEPTH
4453 # define YYINITDEPTH 200
4454 #endif
4455 
4456 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
4457  if the built-in stack extension method is used).
4458 
4459  Do not make this value too large; the results are undefined if
4460  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
4461  evaluated with infinite-precision integer arithmetic. */
4462 
4463 #ifndef YYMAXDEPTH
4464 # define YYMAXDEPTH 10000
4465 #endif
4466 
4467 
4468 #if YYERROR_VERBOSE
4469 
4470 # ifndef yystrlen
4471 # if defined __GLIBC__ && defined _STRING_H
4472 # define yystrlen strlen
4473 # else
4474 /* Return the length of YYSTR. */
4475 #if (defined __STDC__ || defined __C99__FUNC__ \
4476  || defined __cplusplus || defined _MSC_VER)
4477 static YYSIZE_T
4478 yystrlen (const char *yystr)
4479 #else
4480 static YYSIZE_T
4481 yystrlen (yystr)
4482  const char *yystr;
4483 #endif
4484 {
4485  YYSIZE_T yylen;
4486  for (yylen = 0; yystr[yylen]; yylen++)
4487  continue;
4488  return yylen;
4489 }
4490 # endif
4491 # endif
4492 
4493 # ifndef yystpcpy
4494 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
4495 # define yystpcpy stpcpy
4496 # else
4497 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
4498  YYDEST. */
4499 #if (defined __STDC__ || defined __C99__FUNC__ \
4500  || defined __cplusplus || defined _MSC_VER)
4501 static char *
4502 yystpcpy (char *yydest, const char *yysrc)
4503 #else
4504 static char *
4505 yystpcpy (yydest, yysrc)
4506  char *yydest;
4507  const char *yysrc;
4508 #endif
4509 {
4510  char *yyd = yydest;
4511  const char *yys = yysrc;
4512 
4513  while ((*yyd++ = *yys++) != '\0')
4514  continue;
4515 
4516  return yyd - 1;
4517 }
4518 # endif
4519 # endif
4520 
4521 # ifndef yytnamerr
4522 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4523  quotes and backslashes, so that it's suitable for yyerror. The
4524  heuristic is that double-quoting is unnecessary unless the string
4525  contains an apostrophe, a comma, or backslash (other than
4526  backslash-backslash). YYSTR is taken from yytname. If YYRES is
4527  null, do not copy; instead, return the length of what the result
4528  would have been. */
4529 static YYSIZE_T
4530 yytnamerr (char *yyres, const char *yystr)
4531 {
4532  if (*yystr == '"')
4533  {
4534  YYSIZE_T yyn = 0;
4535  char const *yyp = yystr;
4536 
4537  for (;;)
4538  switch (*++yyp)
4539  {
4540  case '\'':
4541  case ',':
4542  goto do_not_strip_quotes;
4543 
4544  case '\\':
4545  if (*++yyp != '\\')
4546  goto do_not_strip_quotes;
4547  /* Fall through. */
4548  default:
4549  if (yyres)
4550  yyres[yyn] = *yyp;
4551  yyn++;
4552  break;
4553 
4554  case '"':
4555  if (yyres)
4556  yyres[yyn] = '\0';
4557  return yyn;
4558  }
4559  do_not_strip_quotes: ;
4560  }
4561 
4562  if (! yyres)
4563  return yystrlen (yystr);
4564 
4565  return yystpcpy (yyres, yystr) - yyres;
4566 }
4567 # endif
4568 
4569 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
4570  about the unexpected token YYTOKEN for the state stack whose top is
4571  YYSSP.
4572 
4573  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
4574  not large enough to hold the message. In that case, also set
4575  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
4576  required number of bytes is too large to store. */
4577 static int
4578 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
4579  yytype_int16 *yyssp, int yytoken)
4580 {
4581  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
4582  YYSIZE_T yysize = yysize0;
4583  YYSIZE_T yysize1;
4584  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4585  /* Internationalized format string. */
4586  const char *yyformat = 0;
4587  /* Arguments of yyformat. */
4588  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4589  /* Number of reported tokens (one for the "unexpected", one per
4590  "expected"). */
4591  int yycount = 0;
4592 
4593  /* There are many possibilities here to consider:
4594  - Assume YYFAIL is not used. It's too flawed to consider. See
4595  <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
4596  for details. YYERROR is fine as it does not invoke this
4597  function.
4598  - If this state is a consistent state with a default action, then
4599  the only way this function was invoked is if the default action
4600  is an error action. In that case, don't check for expected
4601  tokens because there are none.
4602  - The only way there can be no lookahead present (in yychar) is if
4603  this state is a consistent state with a default action. Thus,
4604  detecting the absence of a lookahead is sufficient to determine
4605  that there is no unexpected or expected token to report. In that
4606  case, just report a simple "syntax error".
4607  - Don't assume there isn't a lookahead just because this state is a
4608  consistent state with a default action. There might have been a
4609  previous inconsistent state, consistent state with a non-default
4610  action, or user semantic action that manipulated yychar.
4611  - Of course, the expected token list depends on states to have
4612  correct lookahead information, and it depends on the parser not
4613  to perform extra reductions after fetching a lookahead from the
4614  scanner and before detecting a syntax error. Thus, state merging
4615  (from LALR or IELR) and default reductions corrupt the expected
4616  token list. However, the list is correct for canonical LR with
4617  one exception: it will still contain any token that will not be
4618  accepted due to an error action in a later state.
4619  */
4620  if (yytoken != YYEMPTY)
4621  {
4622  int yyn = yypact[*yyssp];
4623  yyarg[yycount++] = yytname[yytoken];
4624  if (!yypact_value_is_default (yyn))
4625  {
4626  /* Start YYX at -YYN if negative to avoid negative indexes in
4627  YYCHECK. In other words, skip the first -YYN actions for
4628  this state because they are default actions. */
4629  int yyxbegin = yyn < 0 ? -yyn : 0;
4630  /* Stay within bounds of both yycheck and yytname. */
4631  int yychecklim = YYLAST - yyn + 1;
4632  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4633  int yyx;
4634 
4635  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4636  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
4637  && !yytable_value_is_error (yytable[yyx + yyn]))
4638  {
4639  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4640  {
4641  yycount = 1;
4642  yysize = yysize0;
4643  break;
4644  }
4645  yyarg[yycount++] = yytname[yyx];
4646  yysize1 = yysize + yytnamerr (0, yytname[yyx]);
4647  if (! (yysize <= yysize1
4648  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
4649  return 2;
4650  yysize = yysize1;
4651  }
4652  }
4653  }
4654 
4655  switch (yycount)
4656  {
4657 # define YYCASE_(N, S) \
4658  case N: \
4659  yyformat = S; \
4660  break
4661  YYCASE_(0, YY_("syntax error"));
4662  YYCASE_(1, YY_("syntax error, unexpected %s"));
4663  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
4664  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
4665  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
4666  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
4667 # undef YYCASE_
4668  }
4669 
4670  yysize1 = yysize + yystrlen (yyformat);
4671  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
4672  return 2;
4673  yysize = yysize1;
4674 
4675  if (*yymsg_alloc < yysize)
4676  {
4677  *yymsg_alloc = 2 * yysize;
4678  if (! (yysize <= *yymsg_alloc
4679  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
4680  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
4681  return 1;
4682  }
4683 
4684  /* Avoid sprintf, as that infringes on the user's name space.
4685  Don't have undefined behavior even if the translation
4686  produced a string with the wrong number of "%s"s. */
4687  {
4688  char *yyp = *yymsg;
4689  int yyi = 0;
4690  while ((*yyp = *yyformat) != '\0')
4691  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
4692  {
4693  yyp += yytnamerr (yyp, yyarg[yyi++]);
4694  yyformat += 2;
4695  }
4696  else
4697  {
4698  yyp++;
4699  yyformat++;
4700  }
4701  }
4702  return 0;
4703 }
4704 #endif /* YYERROR_VERBOSE */
4705 
4706 /*-----------------------------------------------.
4707 | Release the memory associated to this symbol. |
4708 `-----------------------------------------------*/
4709 
4710 /*ARGSUSED*/
4711 #if (defined __STDC__ || defined __C99__FUNC__ \
4712  || defined __cplusplus || defined _MSC_VER)
4713 static void
4714 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser)
4715 #else
4716 static void
4717 yydestruct (yymsg, yytype, yyvaluep, parser)
4718  const char *yymsg;
4719  int yytype;
4720  YYSTYPE *yyvaluep;
4721  struct parser_params *parser;
4722 #endif
4723 {
4724  YYUSE (yyvaluep);
4725  YYUSE (parser);
4726 
4727  if (!yymsg)
4728  yymsg = "Deleting";
4729  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4730 
4731  switch (yytype)
4732  {
4733 
4734  default:
4735  break;
4736  }
4737 }
4738 
4739 
4740 /* Prevent warnings from -Wmissing-prototypes. */
4741 #ifdef YYPARSE_PARAM
4742 #if defined __STDC__ || defined __cplusplus
4743 int yyparse (void *YYPARSE_PARAM);
4744 #else
4745 int yyparse ();
4746 #endif
4747 #else /* ! YYPARSE_PARAM */
4748 #if defined __STDC__ || defined __cplusplus
4749 int yyparse (struct parser_params *parser);
4750 #else
4751 int yyparse ();
4752 #endif
4753 #endif /* ! YYPARSE_PARAM */
4754 
4755 
4756 /*----------.
4757 | yyparse. |
4758 `----------*/
4759 
4760 #ifdef YYPARSE_PARAM
4761 #if (defined __STDC__ || defined __C99__FUNC__ \
4762  || defined __cplusplus || defined _MSC_VER)
4763 int
4764 yyparse (void *YYPARSE_PARAM)
4765 #else
4766 int
4767 yyparse (YYPARSE_PARAM)
4768  void *YYPARSE_PARAM;
4769 #endif
4770 #else /* ! YYPARSE_PARAM */
4771 #if (defined __STDC__ || defined __C99__FUNC__ \
4772  || defined __cplusplus || defined _MSC_VER)
4773 int
4774 yyparse (struct parser_params *parser)
4775 #else
4776 int
4777 yyparse (parser)
4778  struct parser_params *parser;
4779 #endif
4780 #endif
4781 {
4782 /* The lookahead symbol. */
4783 int yychar;
4784 
4785 /* The semantic value of the lookahead symbol. */
4786 YYSTYPE yylval;
4787 
4788  /* Number of syntax errors so far. */
4789  int yynerrs;
4790 
4791  int yystate;
4792  /* Number of tokens to shift before error messages enabled. */
4793  int yyerrstatus;
4794 
4795  /* The stacks and their tools:
4796  `yyss': related to states.
4797  `yyvs': related to semantic values.
4798 
4799  Refer to the stacks thru separate pointers, to allow yyoverflow
4800  to reallocate them elsewhere. */
4801 
4802  /* The state stack. */
4803  yytype_int16 yyssa[YYINITDEPTH];
4804  yytype_int16 *yyss;
4805  yytype_int16 *yyssp;
4806 
4807  /* The semantic value stack. */
4808  YYSTYPE yyvsa[YYINITDEPTH];
4809  YYSTYPE *yyvs;
4810  YYSTYPE *yyvsp;
4811 
4812  YYSIZE_T yystacksize;
4813 
4814  int yyn;
4815  int yyresult;
4816  /* Lookahead token as an internal (translated) token number. */
4817  int yytoken;
4818  /* The variables used to return semantic value and location from the
4819  action routines. */
4820  YYSTYPE yyval;
4821 
4822 #if YYERROR_VERBOSE
4823  /* Buffer for error messages, and its allocated size. */
4824  char yymsgbuf[128];
4825  char *yymsg = yymsgbuf;
4826  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4827 #endif
4828 
4829 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4830 
4831  /* The number of symbols on the RHS of the reduced rule.
4832  Keep to zero when no symbol should be popped. */
4833  int yylen = 0;
4834 
4835  yytoken = 0;
4836  yyss = yyssa;
4837  yyvs = yyvsa;
4838  yystacksize = YYINITDEPTH;
4839 
4840  YYDPRINTF ((stderr, "Starting parse\n"));
4841 
4842  yystate = 0;
4843  yyerrstatus = 0;
4844  yynerrs = 0;
4845  yychar = YYEMPTY; /* Cause a token to be read. */
4846 
4847  /* Initialize stack pointers.
4848  Waste one element of value and location stack
4849  so that they stay on the same level as the state stack.
4850  The wasted elements are never initialized. */
4851  yyssp = yyss;
4852  yyvsp = yyvs;
4853 
4854  goto yysetstate;
4855 
4856 /*------------------------------------------------------------.
4857 | yynewstate -- Push a new state, which is found in yystate. |
4858 `------------------------------------------------------------*/
4859  yynewstate:
4860  /* In all cases, when you get here, the value and location stacks
4861  have just been pushed. So pushing a state here evens the stacks. */
4862  yyssp++;
4863 
4864  yysetstate:
4865  *yyssp = yystate;
4866 
4867  if (yyss + yystacksize - 1 <= yyssp)
4868  {
4869  /* Get the current used size of the three stacks, in elements. */
4870  YYSIZE_T yysize = yyssp - yyss + 1;
4871 
4872 #ifdef yyoverflow
4873  {
4874  /* Give user a chance to reallocate the stack. Use copies of
4875  these so that the &'s don't force the real ones into
4876  memory. */
4877  YYSTYPE *yyvs1 = yyvs;
4878  yytype_int16 *yyss1 = yyss;
4879 
4880  /* Each stack pointer address is followed by the size of the
4881  data in use in that stack, in bytes. This used to be a
4882  conditional around just the two extra args, but that might
4883  be undefined if yyoverflow is a macro. */
4884  yyoverflow (YY_("memory exhausted"),
4885  &yyss1, yysize * sizeof (*yyssp),
4886  &yyvs1, yysize * sizeof (*yyvsp),
4887  &yystacksize);
4888 
4889  yyss = yyss1;
4890  yyvs = yyvs1;
4891  }
4892 #else /* no yyoverflow */
4893 # ifndef YYSTACK_RELOCATE
4894  goto yyexhaustedlab;
4895 # else
4896  /* Extend the stack our own way. */
4897  if (YYMAXDEPTH <= yystacksize)
4898  goto yyexhaustedlab;
4899  yystacksize *= 2;
4900  if (YYMAXDEPTH < yystacksize)
4901  yystacksize = YYMAXDEPTH;
4902 
4903  {
4904  yytype_int16 *yyss1 = yyss;
4905  union yyalloc *yyptr =
4906  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4907  if (! yyptr)
4908  goto yyexhaustedlab;
4909  YYSTACK_RELOCATE (yyss_alloc, yyss);
4910  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4911 # undef YYSTACK_RELOCATE
4912  if (yyss1 != yyssa)
4913  YYSTACK_FREE (yyss1);
4914  }
4915 # endif
4916 #endif /* no yyoverflow */
4917 
4918  yyssp = yyss + yysize - 1;
4919  yyvsp = yyvs + yysize - 1;
4920 
4921  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4922  (unsigned long int) yystacksize));
4923 
4924  if (yyss + yystacksize - 1 <= yyssp)
4925  YYABORT;
4926  }
4927 
4928  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4929 
4930  if (yystate == YYFINAL)
4931  YYACCEPT;
4932 
4933  goto yybackup;
4934 
4935 /*-----------.
4936 | yybackup. |
4937 `-----------*/
4938 yybackup:
4939 
4940  /* Do appropriate processing given the current state. Read a
4941  lookahead token if we need one and don't already have one. */
4942 
4943  /* First try to decide what to do without reference to lookahead token. */
4944  yyn = yypact[yystate];
4945  if (yypact_value_is_default (yyn))
4946  goto yydefault;
4947 
4948  /* Not known => get a lookahead token if don't already have one. */
4949 
4950  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4951  if (yychar == YYEMPTY)
4952  {
4953  YYDPRINTF ((stderr, "Reading a token: "));
4954  yychar = YYLEX;
4955  }
4956 
4957  if (yychar <= YYEOF)
4958  {
4959  yychar = yytoken = YYEOF;
4960  YYDPRINTF ((stderr, "Now at end of input.\n"));
4961  }
4962  else
4963  {
4964  yytoken = YYTRANSLATE (yychar);
4965  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4966  }
4967 
4968  /* If the proper action on seeing token YYTOKEN is to reduce or to
4969  detect an error, take that action. */
4970  yyn += yytoken;
4971  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4972  goto yydefault;
4973  yyn = yytable[yyn];
4974  if (yyn <= 0)
4975  {
4976  if (yytable_value_is_error (yyn))
4977  goto yyerrlab;
4978  yyn = -yyn;
4979  goto yyreduce;
4980  }
4981 
4982  /* Count tokens shifted since error; after three, turn off error
4983  status. */
4984  if (yyerrstatus)
4985  yyerrstatus--;
4986 
4987  /* Shift the lookahead token. */
4988  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4989 
4990  /* Discard the shifted token. */
4991  yychar = YYEMPTY;
4992 
4993  yystate = yyn;
4994  *++yyvsp = yylval;
4995 
4996  goto yynewstate;
4997 
4998 
4999 /*-----------------------------------------------------------.
5000 | yydefault -- do the default action for the current state. |
5001 `-----------------------------------------------------------*/
5002 yydefault:
5003  yyn = yydefact[yystate];
5004  if (yyn == 0)
5005  goto yyerrlab;
5006  goto yyreduce;
5007 
5008 
5009 /*-----------------------------.
5010 | yyreduce -- Do a reduction. |
5011 `-----------------------------*/
5012 yyreduce:
5013  /* yyn is the number of a rule to reduce with. */
5014  yylen = yyr2[yyn];
5015 
5016  /* If YYLEN is nonzero, implement the default value of the action:
5017  `$$ = $1'.
5018 
5019  Otherwise, the following line sets YYVAL to garbage.
5020  This behavior is undocumented and Bison
5021  users should not rely upon it. Assigning to YYVAL
5022  unconditionally makes the parser a bit smaller, and it avoids a
5023  GCC warning that YYVAL may be used uninitialized. */
5024  yyval = yyvsp[1-yylen];
5025 
5026 
5027  YY_REDUCE_PRINT (yyn);
5028  switch (yyn)
5029  {
5030  case 2:
5031 
5032 /* Line 1806 of yacc.c */
5033 #line 785 "parse.y"
5034  {
5035  lex_state = EXPR_BEG;
5036  /*%%%*/
5038  /*%
5039  local_push(0);
5040  %*/
5041  }
5042  break;
5043 
5044  case 3:
5045 
5046 /* Line 1806 of yacc.c */
5047 #line 794 "parse.y"
5048  {
5049  /*%%%*/
5050  if ((yyvsp[(2) - (2)].node) && !compile_for_eval) {
5051  /* last expression should not be void */
5052  if (nd_type((yyvsp[(2) - (2)].node)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].node));
5053  else {
5054  NODE *node = (yyvsp[(2) - (2)].node);
5055  while (node->nd_next) {
5056  node = node->nd_next;
5057  }
5058  void_expr(node->nd_head);
5059  }
5060  }
5061  ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].node)));
5062  /*%
5063  $$ = $2;
5064  parser->result = dispatch1(program, $$);
5065  %*/
5066  local_pop();
5067  }
5068  break;
5069 
5070  case 4:
5071 
5072 /* Line 1806 of yacc.c */
5073 #line 817 "parse.y"
5074  {
5075  /*%%%*/
5076  void_stmts((yyvsp[(1) - (2)].node));
5078  /*%
5079  %*/
5080  (yyval.node) = (yyvsp[(1) - (2)].node);
5081  }
5082  break;
5083 
5084  case 5:
5085 
5086 /* Line 1806 of yacc.c */
5087 #line 828 "parse.y"
5088  {
5089  /*%%%*/
5090  (yyval.node) = NEW_BEGIN(0);
5091  /*%
5092  $$ = dispatch2(stmts_add, dispatch0(stmts_new),
5093  dispatch0(void_stmt));
5094  %*/
5095  }
5096  break;
5097 
5098  case 6:
5099 
5100 /* Line 1806 of yacc.c */
5101 #line 837 "parse.y"
5102  {
5103  /*%%%*/
5104  (yyval.node) = newline_node((yyvsp[(1) - (1)].node));
5105  /*%
5106  $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
5107  %*/
5108  }
5109  break;
5110 
5111  case 7:
5112 
5113 /* Line 1806 of yacc.c */
5114 #line 845 "parse.y"
5115  {
5116  /*%%%*/
5117  (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node)));
5118  /*%
5119  $$ = dispatch2(stmts_add, $1, $3);
5120  %*/
5121  }
5122  break;
5123 
5124  case 8:
5125 
5126 /* Line 1806 of yacc.c */
5127 #line 853 "parse.y"
5128  {
5129  (yyval.node) = remove_begin((yyvsp[(2) - (2)].node));
5130  }
5131  break;
5132 
5133  case 10:
5134 
5135 /* Line 1806 of yacc.c */
5136 #line 860 "parse.y"
5137  {
5138  if (in_def || in_single) {
5139  yyerror("BEGIN in method");
5140  }
5141  /*%%%*/
5142  /* local_push(0); */
5143  /*%
5144  %*/
5145  }
5146  break;
5147 
5148  case 11:
5149 
5150 /* Line 1806 of yacc.c */
5151 #line 870 "parse.y"
5152  {
5153  /*%%%*/
5155  (yyvsp[(4) - (5)].node));
5156  /* NEW_PREEXE($4)); */
5157  /* local_pop(); */
5158  (yyval.node) = NEW_BEGIN(0);
5159  /*%
5160  $$ = dispatch1(BEGIN, $4);
5161  %*/
5162  }
5163  break;
5164 
5165  case 12:
5166 
5167 /* Line 1806 of yacc.c */
5168 #line 887 "parse.y"
5169  {
5170  /*%%%*/
5171  (yyval.node) = (yyvsp[(1) - (4)].node);
5172  if ((yyvsp[(2) - (4)].node)) {
5173  (yyval.node) = NEW_RESCUE((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node));
5174  }
5175  else if ((yyvsp[(3) - (4)].node)) {
5176  rb_warn0("else without rescue is useless");
5177  (yyval.node) = block_append((yyval.node), (yyvsp[(3) - (4)].node));
5178  }
5179  if ((yyvsp[(4) - (4)].node)) {
5180  if ((yyval.node)) {
5181  (yyval.node) = NEW_ENSURE((yyval.node), (yyvsp[(4) - (4)].node));
5182  }
5183  else {
5184  (yyval.node) = block_append((yyvsp[(4) - (4)].node), NEW_NIL());
5185  }
5186  }
5187  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
5188  /*%
5189  $$ = dispatch4(bodystmt,
5190  escape_Qundef($1),
5191  escape_Qundef($2),
5192  escape_Qundef($3),
5193  escape_Qundef($4));
5194  %*/
5195  }
5196  break;
5197 
5198  case 13:
5199 
5200 /* Line 1806 of yacc.c */
5201 #line 917 "parse.y"
5202  {
5203  /*%%%*/
5204  void_stmts((yyvsp[(1) - (2)].node));
5206  /*%
5207  %*/
5208  (yyval.node) = (yyvsp[(1) - (2)].node);
5209  }
5210  break;
5211 
5212  case 14:
5213 
5214 /* Line 1806 of yacc.c */
5215 #line 928 "parse.y"
5216  {
5217  /*%%%*/
5218  (yyval.node) = NEW_BEGIN(0);
5219  /*%
5220  $$ = dispatch2(stmts_add, dispatch0(stmts_new),
5221  dispatch0(void_stmt));
5222  %*/
5223  }
5224  break;
5225 
5226  case 15:
5227 
5228 /* Line 1806 of yacc.c */
5229 #line 937 "parse.y"
5230  {
5231  /*%%%*/
5232  (yyval.node) = newline_node((yyvsp[(1) - (1)].node));
5233  /*%
5234  $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
5235  %*/
5236  }
5237  break;
5238 
5239  case 16:
5240 
5241 /* Line 1806 of yacc.c */
5242 #line 945 "parse.y"
5243  {
5244  /*%%%*/
5245  (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node)));
5246  /*%
5247  $$ = dispatch2(stmts_add, $1, $3);
5248  %*/
5249  }
5250  break;
5251 
5252  case 17:
5253 
5254 /* Line 1806 of yacc.c */
5255 #line 953 "parse.y"
5256  {
5257  (yyval.node) = remove_begin((yyvsp[(2) - (2)].node));
5258  }
5259  break;
5260 
5261  case 18:
5262 
5263 /* Line 1806 of yacc.c */
5264 #line 958 "parse.y"
5265  {lex_state = EXPR_FNAME;}
5266  break;
5267 
5268  case 19:
5269 
5270 /* Line 1806 of yacc.c */
5271 #line 959 "parse.y"
5272  {
5273  /*%%%*/
5274  (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node));
5275  /*%
5276  $$ = dispatch2(alias, $2, $4);
5277  %*/
5278  }
5279  break;
5280 
5281  case 20:
5282 
5283 /* Line 1806 of yacc.c */
5284 #line 967 "parse.y"
5285  {
5286  /*%%%*/
5287  (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id));
5288  /*%
5289  $$ = dispatch2(var_alias, $2, $3);
5290  %*/
5291  }
5292  break;
5293 
5294  case 21:
5295 
5296 /* Line 1806 of yacc.c */
5297 #line 975 "parse.y"
5298  {
5299  /*%%%*/
5300  char buf[2];
5301  buf[0] = '$';
5302  buf[1] = (char)(yyvsp[(3) - (3)].node)->nd_nth;
5303  (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), rb_intern2(buf, 2));
5304  /*%
5305  $$ = dispatch2(var_alias, $2, $3);
5306  %*/
5307  }
5308  break;
5309 
5310  case 22:
5311 
5312 /* Line 1806 of yacc.c */
5313 #line 986 "parse.y"
5314  {
5315  /*%%%*/
5316  yyerror("can't make alias for the number variables");
5317  (yyval.node) = NEW_BEGIN(0);
5318  /*%
5319  $$ = dispatch2(var_alias, $2, $3);
5320  $$ = dispatch1(alias_error, $$);
5321  %*/
5322  }
5323  break;
5324 
5325  case 23:
5326 
5327 /* Line 1806 of yacc.c */
5328 #line 996 "parse.y"
5329  {
5330  /*%%%*/
5331  (yyval.node) = (yyvsp[(2) - (2)].node);
5332  /*%
5333  $$ = dispatch1(undef, $2);
5334  %*/
5335  }
5336  break;
5337 
5338  case 24:
5339 
5340 /* Line 1806 of yacc.c */
5341 #line 1004 "parse.y"
5342  {
5343  /*%%%*/
5344  (yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0);
5345  fixpos((yyval.node), (yyvsp[(3) - (3)].node));
5346  /*%
5347  $$ = dispatch2(if_mod, $3, $1);
5348  %*/
5349  }
5350  break;
5351 
5352  case 25:
5353 
5354 /* Line 1806 of yacc.c */
5355 #line 1013 "parse.y"
5356  {
5357  /*%%%*/
5358  (yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0);
5359  fixpos((yyval.node), (yyvsp[(3) - (3)].node));
5360  /*%
5361  $$ = dispatch2(unless_mod, $3, $1);
5362  %*/
5363  }
5364  break;
5365 
5366  case 26:
5367 
5368 /* Line 1806 of yacc.c */
5369 #line 1022 "parse.y"
5370  {
5371  /*%%%*/
5372  if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) {
5373  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0);
5374  }
5375  else {
5376  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1);
5377  }
5378  /*%
5379  $$ = dispatch2(while_mod, $3, $1);
5380  %*/
5381  }
5382  break;
5383 
5384  case 27:
5385 
5386 /* Line 1806 of yacc.c */
5387 #line 1035 "parse.y"
5388  {
5389  /*%%%*/
5390  if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) {
5391  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0);
5392  }
5393  else {
5394  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1);
5395  }
5396  /*%
5397  $$ = dispatch2(until_mod, $3, $1);
5398  %*/
5399  }
5400  break;
5401 
5402  case 28:
5403 
5404 /* Line 1806 of yacc.c */
5405 #line 1048 "parse.y"
5406  {
5407  /*%%%*/
5408  NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node)), 0);
5409  (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].node)), resq, 0);
5410  /*%
5411  $$ = dispatch2(rescue_mod, $1, $3);
5412  %*/
5413  }
5414  break;
5415 
5416  case 29:
5417 
5418 /* Line 1806 of yacc.c */
5419 #line 1057 "parse.y"
5420  {
5421  if (in_def || in_single) {
5422  rb_warn0("END in method; use at_exit");
5423  }
5424  /*%%%*/
5425  (yyval.node) = NEW_POSTEXE(NEW_NODE(
5426  NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].node) /* body */, 0 /* args */));
5427  /*%
5428  $$ = dispatch1(END, $3);
5429  %*/
5430  }
5431  break;
5432 
5433  case 31:
5434 
5435 /* Line 1806 of yacc.c */
5436 #line 1070 "parse.y"
5437  {
5438  /*%%%*/
5439  value_expr((yyvsp[(3) - (3)].node));
5440  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5441  (yyval.node) = (yyvsp[(1) - (3)].node);
5442  /*%
5443  $$ = dispatch2(massign, $1, $3);
5444  %*/
5445  }
5446  break;
5447 
5448  case 32:
5449 
5450 /* Line 1806 of yacc.c */
5451 #line 1080 "parse.y"
5452  {
5453  /*%%%*/
5454  value_expr((yyvsp[(3) - (3)].node));
5455  if ((yyvsp[(1) - (3)].node)) {
5456  ID vid = (yyvsp[(1) - (3)].node)->nd_vid;
5457  if ((yyvsp[(2) - (3)].id) == tOROP) {
5458  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5459  (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node));
5460  if (is_asgn_or_id(vid)) {
5461  (yyval.node)->nd_aid = vid;
5462  }
5463  }
5464  else if ((yyvsp[(2) - (3)].id) == tANDOP) {
5465  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5466  (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node));
5467  }
5468  else {
5469  (yyval.node) = (yyvsp[(1) - (3)].node);
5470  (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node)));
5471  }
5472  }
5473  else {
5474  (yyval.node) = NEW_BEGIN(0);
5475  }
5476  /*%
5477  $$ = dispatch3(opassign, $1, $2, $3);
5478  %*/
5479  }
5480  break;
5481 
5482  case 33:
5483 
5484 /* Line 1806 of yacc.c */
5485 #line 1109 "parse.y"
5486  {
5487  /*%%%*/
5488  NODE *args;
5489 
5490  value_expr((yyvsp[(6) - (6)].node));
5491  if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY();
5492  args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
5493  if ((yyvsp[(5) - (6)].id) == tOROP) {
5494  (yyvsp[(5) - (6)].id) = 0;
5495  }
5496  else if ((yyvsp[(5) - (6)].id) == tANDOP) {
5497  (yyvsp[(5) - (6)].id) = 1;
5498  }
5499  (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args);
5500  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
5501  /*%
5502  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
5503  $$ = dispatch3(opassign, $$, $5, $6);
5504  %*/
5505  }
5506  break;
5507 
5508  case 34:
5509 
5510 /* Line 1806 of yacc.c */
5511 #line 1130 "parse.y"
5512  {
5513  /*%%%*/
5514  value_expr((yyvsp[(5) - (5)].node));
5515  if ((yyvsp[(4) - (5)].id) == tOROP) {
5516  (yyvsp[(4) - (5)].id) = 0;
5517  }
5518  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
5519  (yyvsp[(4) - (5)].id) = 1;
5520  }
5521  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
5522  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5523  /*%
5524  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
5525  $$ = dispatch3(opassign, $$, $4, $5);
5526  %*/
5527  }
5528  break;
5529 
5530  case 35:
5531 
5532 /* Line 1806 of yacc.c */
5533 #line 1147 "parse.y"
5534  {
5535  /*%%%*/
5536  value_expr((yyvsp[(5) - (5)].node));
5537  if ((yyvsp[(4) - (5)].id) == tOROP) {
5538  (yyvsp[(4) - (5)].id) = 0;
5539  }
5540  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
5541  (yyvsp[(4) - (5)].id) = 1;
5542  }
5543  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
5544  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5545  /*%
5546  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
5547  $$ = dispatch3(opassign, $$, $4, $5);
5548  %*/
5549  }
5550  break;
5551 
5552  case 36:
5553 
5554 /* Line 1806 of yacc.c */
5555 #line 1164 "parse.y"
5556  {
5557  /*%%%*/
5558  yyerror("constant re-assignment");
5559  (yyval.node) = 0;
5560  /*%
5561  $$ = dispatch2(const_path_field, $1, $3);
5562  $$ = dispatch3(opassign, $$, $4, $5);
5563  $$ = dispatch1(assign_error, $$);
5564  %*/
5565  }
5566  break;
5567 
5568  case 37:
5569 
5570 /* Line 1806 of yacc.c */
5571 #line 1175 "parse.y"
5572  {
5573  /*%%%*/
5574  value_expr((yyvsp[(5) - (5)].node));
5575  if ((yyvsp[(4) - (5)].id) == tOROP) {
5576  (yyvsp[(4) - (5)].id) = 0;
5577  }
5578  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
5579  (yyvsp[(4) - (5)].id) = 1;
5580  }
5581  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
5582  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5583  /*%
5584  $$ = dispatch3(field, $1, ripper_intern("::"), $3);
5585  $$ = dispatch3(opassign, $$, $4, $5);
5586  %*/
5587  }
5588  break;
5589 
5590  case 38:
5591 
5592 /* Line 1806 of yacc.c */
5593 #line 1192 "parse.y"
5594  {
5595  /*%%%*/
5596  rb_backref_error((yyvsp[(1) - (3)].node));
5597  (yyval.node) = NEW_BEGIN(0);
5598  /*%
5599  $$ = dispatch2(assign, dispatch1(var_field, $1), $3);
5600  $$ = dispatch1(assign_error, $$);
5601  %*/
5602  }
5603  break;
5604 
5605  case 39:
5606 
5607 /* Line 1806 of yacc.c */
5608 #line 1202 "parse.y"
5609  {
5610  /*%%%*/
5611  value_expr((yyvsp[(3) - (3)].node));
5612  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5613  /*%
5614  $$ = dispatch2(assign, $1, $3);
5615  %*/
5616  }
5617  break;
5618 
5619  case 40:
5620 
5621 /* Line 1806 of yacc.c */
5622 #line 1211 "parse.y"
5623  {
5624  /*%%%*/
5625  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5626  (yyval.node) = (yyvsp[(1) - (3)].node);
5627  /*%
5628  $$ = dispatch2(massign, $1, $3);
5629  %*/
5630  }
5631  break;
5632 
5633  case 41:
5634 
5635 /* Line 1806 of yacc.c */
5636 #line 1220 "parse.y"
5637  {
5638  /*%%%*/
5639  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5640  (yyval.node) = (yyvsp[(1) - (3)].node);
5641  /*%
5642  $$ = dispatch2(massign, $1, $3);
5643  %*/
5644  }
5645  break;
5646 
5647  case 43:
5648 
5649 /* Line 1806 of yacc.c */
5650 #line 1232 "parse.y"
5651  {
5652  /*%%%*/
5653  value_expr((yyvsp[(3) - (3)].node));
5654  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5655  /*%
5656  $$ = dispatch2(assign, $1, $3);
5657  %*/
5658  }
5659  break;
5660 
5661  case 44:
5662 
5663 /* Line 1806 of yacc.c */
5664 #line 1241 "parse.y"
5665  {
5666  /*%%%*/
5667  value_expr((yyvsp[(3) - (3)].node));
5668  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5669  /*%
5670  $$ = dispatch2(assign, $1, $3);
5671  %*/
5672  }
5673  break;
5674 
5675  case 46:
5676 
5677 /* Line 1806 of yacc.c */
5678 #line 1254 "parse.y"
5679  {
5680  /*%%%*/
5681  (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5682  /*%
5683  $$ = dispatch3(binary, $1, ripper_intern("and"), $3);
5684  %*/
5685  }
5686  break;
5687 
5688  case 47:
5689 
5690 /* Line 1806 of yacc.c */
5691 #line 1262 "parse.y"
5692  {
5693  /*%%%*/
5694  (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5695  /*%
5696  $$ = dispatch3(binary, $1, ripper_intern("or"), $3);
5697  %*/
5698  }
5699  break;
5700 
5701  case 48:
5702 
5703 /* Line 1806 of yacc.c */
5704 #line 1270 "parse.y"
5705  {
5706  /*%%%*/
5707  (yyval.node) = call_uni_op(cond((yyvsp[(3) - (3)].node)), '!');
5708  /*%
5709  $$ = dispatch2(unary, ripper_intern("not"), $3);
5710  %*/
5711  }
5712  break;
5713 
5714  case 49:
5715 
5716 /* Line 1806 of yacc.c */
5717 #line 1278 "parse.y"
5718  {
5719  /*%%%*/
5720  (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!');
5721  /*%
5722  $$ = dispatch2(unary, ripper_id2sym('!'), $2);
5723  %*/
5724  }
5725  break;
5726 
5727  case 51:
5728 
5729 /* Line 1806 of yacc.c */
5730 #line 1289 "parse.y"
5731  {
5732  /*%%%*/
5733  value_expr((yyvsp[(1) - (1)].node));
5734  (yyval.node) = (yyvsp[(1) - (1)].node);
5735  if (!(yyval.node)) (yyval.node) = NEW_NIL();
5736  /*%
5737  $$ = $1;
5738  %*/
5739  }
5740  break;
5741 
5742  case 55:
5743 
5744 /* Line 1806 of yacc.c */
5745 #line 1306 "parse.y"
5746  {
5747  /*%%%*/
5748  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
5749  /*%
5750  $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
5751  $$ = method_arg($$, $4);
5752  %*/
5753  }
5754  break;
5755 
5756  case 56:
5757 
5758 /* Line 1806 of yacc.c */
5759 #line 1315 "parse.y"
5760  {
5761  /*%%%*/
5762  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
5763  /*%
5764  $$ = dispatch3(call, $1, ripper_intern("::"), $3);
5765  $$ = method_arg($$, $4);
5766  %*/
5767  }
5768  break;
5769 
5770  case 57:
5771 
5772 /* Line 1806 of yacc.c */
5773 #line 1326 "parse.y"
5774  {
5775  (yyvsp[(1) - (1)].vars) = dyna_push();
5776  /*%%%*/
5777  (yyval.num) = ruby_sourceline;
5778  /*%
5779  %*/
5780  }
5781  break;
5782 
5783  case 58:
5784 
5785 /* Line 1806 of yacc.c */
5786 #line 1336 "parse.y"
5787  {
5788  /*%%%*/
5789  (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node));
5790  nd_set_line((yyval.node), (yyvsp[(2) - (5)].num));
5791  /*%
5792  $$ = dispatch2(brace_block, escape_Qundef($3), $4);
5793  %*/
5794  dyna_pop((yyvsp[(1) - (5)].vars));
5795  }
5796  break;
5797 
5798  case 59:
5799 
5800 /* Line 1806 of yacc.c */
5801 #line 1348 "parse.y"
5802  {
5803  /*%%%*/
5804  (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node));
5805  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
5806  /*%
5807  $$ = dispatch2(command, $1, $2);
5808  %*/
5809  }
5810  break;
5811 
5812  case 60:
5813 
5814 /* Line 1806 of yacc.c */
5815 #line 1357 "parse.y"
5816  {
5817  /*%%%*/
5818  block_dup_check((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node));
5819  (yyvsp[(3) - (3)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].node));
5820  (yyval.node) = (yyvsp[(3) - (3)].node);
5821  fixpos((yyval.node), (yyvsp[(2) - (3)].node));
5822  /*%
5823  $$ = dispatch2(command, $1, $2);
5824  $$ = method_add_block($$, $3);
5825  %*/
5826  }
5827  break;
5828 
5829  case 61:
5830 
5831 /* Line 1806 of yacc.c */
5832 #line 1369 "parse.y"
5833  {
5834  /*%%%*/
5835  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
5836  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
5837  /*%
5838  $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
5839  %*/
5840  }
5841  break;
5842 
5843  case 62:
5844 
5845 /* Line 1806 of yacc.c */
5846 #line 1378 "parse.y"
5847  {
5848  /*%%%*/
5849  block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node));
5850  (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node));
5851  (yyval.node) = (yyvsp[(5) - (5)].node);
5852  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5853  /*%
5854  $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
5855  $$ = method_add_block($$, $5);
5856  %*/
5857  }
5858  break;
5859 
5860  case 63:
5861 
5862 /* Line 1806 of yacc.c */
5863 #line 1390 "parse.y"
5864  {
5865  /*%%%*/
5866  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
5867  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
5868  /*%
5869  $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4);
5870  %*/
5871  }
5872  break;
5873 
5874  case 64:
5875 
5876 /* Line 1806 of yacc.c */
5877 #line 1399 "parse.y"
5878  {
5879  /*%%%*/
5880  block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node));
5881  (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node));
5882  (yyval.node) = (yyvsp[(5) - (5)].node);
5883  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5884  /*%
5885  $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4);
5886  $$ = method_add_block($$, $5);
5887  %*/
5888  }
5889  break;
5890 
5891  case 65:
5892 
5893 /* Line 1806 of yacc.c */
5894 #line 1411 "parse.y"
5895  {
5896  /*%%%*/
5897  (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node));
5898  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
5899  /*%
5900  $$ = dispatch1(super, $2);
5901  %*/
5902  }
5903  break;
5904 
5905  case 66:
5906 
5907 /* Line 1806 of yacc.c */
5908 #line 1420 "parse.y"
5909  {
5910  /*%%%*/
5911  (yyval.node) = new_yield((yyvsp[(2) - (2)].node));
5912  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
5913  /*%
5914  $$ = dispatch1(yield, $2);
5915  %*/
5916  }
5917  break;
5918 
5919  case 67:
5920 
5921 /* Line 1806 of yacc.c */
5922 #line 1429 "parse.y"
5923  {
5924  /*%%%*/
5925  (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node)));
5926  /*%
5927  $$ = dispatch1(return, $2);
5928  %*/
5929  }
5930  break;
5931 
5932  case 68:
5933 
5934 /* Line 1806 of yacc.c */
5935 #line 1437 "parse.y"
5936  {
5937  /*%%%*/
5938  (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node)));
5939  /*%
5940  $$ = dispatch1(break, $2);
5941  %*/
5942  }
5943  break;
5944 
5945  case 69:
5946 
5947 /* Line 1806 of yacc.c */
5948 #line 1445 "parse.y"
5949  {
5950  /*%%%*/
5951  (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node)));
5952  /*%
5953  $$ = dispatch1(next, $2);
5954  %*/
5955  }
5956  break;
5957 
5958  case 71:
5959 
5960 /* Line 1806 of yacc.c */
5961 #line 1456 "parse.y"
5962  {
5963  /*%%%*/
5964  (yyval.node) = (yyvsp[(2) - (3)].node);
5965  /*%
5966  $$ = dispatch1(mlhs_paren, $2);
5967  %*/
5968  }
5969  break;
5970 
5971  case 73:
5972 
5973 /* Line 1806 of yacc.c */
5974 #line 1467 "parse.y"
5975  {
5976  /*%%%*/
5977  (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0);
5978  /*%
5979  $$ = dispatch1(mlhs_paren, $2);
5980  %*/
5981  }
5982  break;
5983 
5984  case 74:
5985 
5986 /* Line 1806 of yacc.c */
5987 #line 1477 "parse.y"
5988  {
5989  /*%%%*/
5990  (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0);
5991  /*%
5992  $$ = $1;
5993  %*/
5994  }
5995  break;
5996 
5997  case 75:
5998 
5999 /* Line 1806 of yacc.c */
6000 #line 1485 "parse.y"
6001  {
6002  /*%%%*/
6003  (yyval.node) = NEW_MASGN(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0);
6004  /*%
6005  $$ = mlhs_add($1, $2);
6006  %*/
6007  }
6008  break;
6009 
6010  case 76:
6011 
6012 /* Line 1806 of yacc.c */
6013 #line 1493 "parse.y"
6014  {
6015  /*%%%*/
6016  (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6017  /*%
6018  $$ = mlhs_add_star($1, $3);
6019  %*/
6020  }
6021  break;
6022 
6023  case 77:
6024 
6025 /* Line 1806 of yacc.c */
6026 #line 1501 "parse.y"
6027  {
6028  /*%%%*/
6029  (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG((yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node)));
6030  /*%
6031  $1 = mlhs_add_star($1, $3);
6032  $$ = mlhs_add($1, $5);
6033  %*/
6034  }
6035  break;
6036 
6037  case 78:
6038 
6039 /* Line 1806 of yacc.c */
6040 #line 1510 "parse.y"
6041  {
6042  /*%%%*/
6043  (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1);
6044  /*%
6045  $$ = mlhs_add_star($1, Qnil);
6046  %*/
6047  }
6048  break;
6049 
6050  case 79:
6051 
6052 /* Line 1806 of yacc.c */
6053 #line 1518 "parse.y"
6054  {
6055  /*%%%*/
6056  (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), NEW_POSTARG(-1, (yyvsp[(4) - (4)].node)));
6057  /*%
6058  $1 = mlhs_add_star($1, Qnil);
6059  $$ = mlhs_add($1, $4);
6060  %*/
6061  }
6062  break;
6063 
6064  case 80:
6065 
6066 /* Line 1806 of yacc.c */
6067 #line 1527 "parse.y"
6068  {
6069  /*%%%*/
6070  (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node));
6071  /*%
6072  $$ = mlhs_add_star(mlhs_new(), $2);
6073  %*/
6074  }
6075  break;
6076 
6077  case 81:
6078 
6079 /* Line 1806 of yacc.c */
6080 #line 1535 "parse.y"
6081  {
6082  /*%%%*/
6083  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node)));
6084  /*%
6085  $2 = mlhs_add_star(mlhs_new(), $2);
6086  $$ = mlhs_add($2, $4);
6087  %*/
6088  }
6089  break;
6090 
6091  case 82:
6092 
6093 /* Line 1806 of yacc.c */
6094 #line 1544 "parse.y"
6095  {
6096  /*%%%*/
6097  (yyval.node) = NEW_MASGN(0, -1);
6098  /*%
6099  $$ = mlhs_add_star(mlhs_new(), Qnil);
6100  %*/
6101  }
6102  break;
6103 
6104  case 83:
6105 
6106 /* Line 1806 of yacc.c */
6107 #line 1552 "parse.y"
6108  {
6109  /*%%%*/
6110  (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node)));
6111  /*%
6112  $$ = mlhs_add_star(mlhs_new(), Qnil);
6113  $$ = mlhs_add($$, $3);
6114  %*/
6115  }
6116  break;
6117 
6118  case 85:
6119 
6120 /* Line 1806 of yacc.c */
6121 #line 1564 "parse.y"
6122  {
6123  /*%%%*/
6124  (yyval.node) = (yyvsp[(2) - (3)].node);
6125  /*%
6126  $$ = dispatch1(mlhs_paren, $2);
6127  %*/
6128  }
6129  break;
6130 
6131  case 86:
6132 
6133 /* Line 1806 of yacc.c */
6134 #line 1574 "parse.y"
6135  {
6136  /*%%%*/
6137  (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node));
6138  /*%
6139  $$ = mlhs_add(mlhs_new(), $1);
6140  %*/
6141  }
6142  break;
6143 
6144  case 87:
6145 
6146 /* Line 1806 of yacc.c */
6147 #line 1582 "parse.y"
6148  {
6149  /*%%%*/
6150  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node));
6151  /*%
6152  $$ = mlhs_add($1, $2);
6153  %*/
6154  }
6155  break;
6156 
6157  case 88:
6158 
6159 /* Line 1806 of yacc.c */
6160 #line 1592 "parse.y"
6161  {
6162  /*%%%*/
6163  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
6164  /*%
6165  $$ = mlhs_add(mlhs_new(), $1);
6166  %*/
6167  }
6168  break;
6169 
6170  case 89:
6171 
6172 /* Line 1806 of yacc.c */
6173 #line 1600 "parse.y"
6174  {
6175  /*%%%*/
6176  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6177  /*%
6178  $$ = mlhs_add($1, $3);
6179  %*/
6180  }
6181  break;
6182 
6183  case 90:
6184 
6185 /* Line 1806 of yacc.c */
6186 #line 1610 "parse.y"
6187  {
6188  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
6189  }
6190  break;
6191 
6192  case 91:
6193 
6194 /* Line 1806 of yacc.c */
6195 #line 1614 "parse.y"
6196  {
6197  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
6198  }
6199  break;
6200 
6201  case 92:
6202 
6203 /* Line 1806 of yacc.c */
6204 #line 1618 "parse.y"
6205  {
6206  /*%%%*/
6207  (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
6208  /*%
6209  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
6210  %*/
6211  }
6212  break;
6213 
6214  case 93:
6215 
6216 /* Line 1806 of yacc.c */
6217 #line 1626 "parse.y"
6218  {
6219  /*%%%*/
6220  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6221  /*%
6222  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
6223  %*/
6224  }
6225  break;
6226 
6227  case 94:
6228 
6229 /* Line 1806 of yacc.c */
6230 #line 1634 "parse.y"
6231  {
6232  /*%%%*/
6233  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6234  /*%
6235  $$ = dispatch2(const_path_field, $1, $3);
6236  %*/
6237  }
6238  break;
6239 
6240  case 95:
6241 
6242 /* Line 1806 of yacc.c */
6243 #line 1642 "parse.y"
6244  {
6245  /*%%%*/
6246  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6247  /*%
6248  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
6249  %*/
6250  }
6251  break;
6252 
6253  case 96:
6254 
6255 /* Line 1806 of yacc.c */
6256 #line 1650 "parse.y"
6257  {
6258  /*%%%*/
6259  if (in_def || in_single)
6260  yyerror("dynamic constant assignment");
6261  (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)));
6262  /*%
6263  if (in_def || in_single)
6264  yyerror("dynamic constant assignment");
6265  $$ = dispatch2(const_path_field, $1, $3);
6266  %*/
6267  }
6268  break;
6269 
6270  case 97:
6271 
6272 /* Line 1806 of yacc.c */
6273 #line 1662 "parse.y"
6274  {
6275  /*%%%*/
6276  if (in_def || in_single)
6277  yyerror("dynamic constant assignment");
6278  (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id)));
6279  /*%
6280  $$ = dispatch1(top_const_field, $2);
6281  %*/
6282  }
6283  break;
6284 
6285  case 98:
6286 
6287 /* Line 1806 of yacc.c */
6288 #line 1672 "parse.y"
6289  {
6290  /*%%%*/
6291  rb_backref_error((yyvsp[(1) - (1)].node));
6292  (yyval.node) = NEW_BEGIN(0);
6293  /*%
6294  $$ = dispatch1(var_field, $1);
6295  $$ = dispatch1(assign_error, $$);
6296  %*/
6297  }
6298  break;
6299 
6300  case 99:
6301 
6302 /* Line 1806 of yacc.c */
6303 #line 1684 "parse.y"
6304  {
6305  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
6306  /*%%%*/
6307  if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0);
6308  /*%
6309  $$ = dispatch1(var_field, $$);
6310  %*/
6311  }
6312  break;
6313 
6314  case 100:
6315 
6316 /* Line 1806 of yacc.c */
6317 #line 1693 "parse.y"
6318  {
6319  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
6320  /*%%%*/
6321  if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0);
6322  /*%
6323  $$ = dispatch1(var_field, $$);
6324  %*/
6325  }
6326  break;
6327 
6328  case 101:
6329 
6330 /* Line 1806 of yacc.c */
6331 #line 1702 "parse.y"
6332  {
6333  /*%%%*/
6334  (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
6335  /*%
6336  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
6337  %*/
6338  }
6339  break;
6340 
6341  case 102:
6342 
6343 /* Line 1806 of yacc.c */
6344 #line 1710 "parse.y"
6345  {
6346  /*%%%*/
6347  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6348  /*%
6349  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
6350  %*/
6351  }
6352  break;
6353 
6354  case 103:
6355 
6356 /* Line 1806 of yacc.c */
6357 #line 1718 "parse.y"
6358  {
6359  /*%%%*/
6360  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6361  /*%
6362  $$ = dispatch3(field, $1, ripper_intern("::"), $3);
6363  %*/
6364  }
6365  break;
6366 
6367  case 104:
6368 
6369 /* Line 1806 of yacc.c */
6370 #line 1726 "parse.y"
6371  {
6372  /*%%%*/
6373  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6374  /*%
6375  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
6376  %*/
6377  }
6378  break;
6379 
6380  case 105:
6381 
6382 /* Line 1806 of yacc.c */
6383 #line 1734 "parse.y"
6384  {
6385  /*%%%*/
6386  if (in_def || in_single)
6387  yyerror("dynamic constant assignment");
6388  (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)));
6389  /*%
6390  $$ = dispatch2(const_path_field, $1, $3);
6391  if (in_def || in_single) {
6392  $$ = dispatch1(assign_error, $$);
6393  }
6394  %*/
6395  }
6396  break;
6397 
6398  case 106:
6399 
6400 /* Line 1806 of yacc.c */
6401 #line 1747 "parse.y"
6402  {
6403  /*%%%*/
6404  if (in_def || in_single)
6405  yyerror("dynamic constant assignment");
6406  (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id)));
6407  /*%
6408  $$ = dispatch1(top_const_field, $2);
6409  if (in_def || in_single) {
6410  $$ = dispatch1(assign_error, $$);
6411  }
6412  %*/
6413  }
6414  break;
6415 
6416  case 107:
6417 
6418 /* Line 1806 of yacc.c */
6419 #line 1760 "parse.y"
6420  {
6421  /*%%%*/
6422  rb_backref_error((yyvsp[(1) - (1)].node));
6423  (yyval.node) = NEW_BEGIN(0);
6424  /*%
6425  $$ = dispatch1(assign_error, $1);
6426  %*/
6427  }
6428  break;
6429 
6430  case 108:
6431 
6432 /* Line 1806 of yacc.c */
6433 #line 1771 "parse.y"
6434  {
6435  /*%%%*/
6436  yyerror("class/module name must be CONSTANT");
6437  /*%
6438  $$ = dispatch1(class_name_error, $1);
6439  %*/
6440  }
6441  break;
6442 
6443  case 110:
6444 
6445 /* Line 1806 of yacc.c */
6446 #line 1782 "parse.y"
6447  {
6448  /*%%%*/
6449  (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id));
6450  /*%
6451  $$ = dispatch1(top_const_ref, $2);
6452  %*/
6453  }
6454  break;
6455 
6456  case 111:
6457 
6458 /* Line 1806 of yacc.c */
6459 #line 1790 "parse.y"
6460  {
6461  /*%%%*/
6462  (yyval.node) = NEW_COLON2(0, (yyval.node));
6463  /*%
6464  $$ = dispatch1(const_ref, $1);
6465  %*/
6466  }
6467  break;
6468 
6469  case 112:
6470 
6471 /* Line 1806 of yacc.c */
6472 #line 1798 "parse.y"
6473  {
6474  /*%%%*/
6475  (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6476  /*%
6477  $$ = dispatch2(const_path_ref, $1, $3);
6478  %*/
6479  }
6480  break;
6481 
6482  case 116:
6483 
6484 /* Line 1806 of yacc.c */
6485 #line 1811 "parse.y"
6486  {
6488  (yyval.id) = (yyvsp[(1) - (1)].id);
6489  }
6490  break;
6491 
6492  case 117:
6493 
6494 /* Line 1806 of yacc.c */
6495 #line 1816 "parse.y"
6496  {
6498  /*%%%*/
6499  (yyval.id) = (yyvsp[(1) - (1)].id);
6500  /*%
6501  $$ = $1;
6502  %*/
6503  }
6504  break;
6505 
6506  case 120:
6507 
6508 /* Line 1806 of yacc.c */
6509 #line 1831 "parse.y"
6510  {
6511  /*%%%*/
6512  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id)));
6513  /*%
6514  $$ = dispatch1(symbol_literal, $1);
6515  %*/
6516  }
6517  break;
6518 
6519  case 122:
6520 
6521 /* Line 1806 of yacc.c */
6522 #line 1842 "parse.y"
6523  {
6524  /*%%%*/
6525  (yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node));
6526  /*%
6527  $$ = rb_ary_new3(1, $1);
6528  %*/
6529  }
6530  break;
6531 
6532  case 123:
6533 
6534 /* Line 1806 of yacc.c */
6535 #line 1849 "parse.y"
6536  {lex_state = EXPR_FNAME;}
6537  break;
6538 
6539  case 124:
6540 
6541 /* Line 1806 of yacc.c */
6542 #line 1850 "parse.y"
6543  {
6544  /*%%%*/
6545  (yyval.node) = block_append((yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node)));
6546  /*%
6547  rb_ary_push($1, $4);
6548  %*/
6549  }
6550  break;
6551 
6552  case 125:
6553 
6554 /* Line 1806 of yacc.c */
6555 #line 1859 "parse.y"
6556  { ifndef_ripper((yyval.id) = '|'); }
6557  break;
6558 
6559  case 126:
6560 
6561 /* Line 1806 of yacc.c */
6562 #line 1860 "parse.y"
6563  { ifndef_ripper((yyval.id) = '^'); }
6564  break;
6565 
6566  case 127:
6567 
6568 /* Line 1806 of yacc.c */
6569 #line 1861 "parse.y"
6570  { ifndef_ripper((yyval.id) = '&'); }
6571  break;
6572 
6573  case 128:
6574 
6575 /* Line 1806 of yacc.c */
6576 #line 1862 "parse.y"
6577  { ifndef_ripper((yyval.id) = tCMP); }
6578  break;
6579 
6580  case 129:
6581 
6582 /* Line 1806 of yacc.c */
6583 #line 1863 "parse.y"
6584  { ifndef_ripper((yyval.id) = tEQ); }
6585  break;
6586 
6587  case 130:
6588 
6589 /* Line 1806 of yacc.c */
6590 #line 1864 "parse.y"
6591  { ifndef_ripper((yyval.id) = tEQQ); }
6592  break;
6593 
6594  case 131:
6595 
6596 /* Line 1806 of yacc.c */
6597 #line 1865 "parse.y"
6598  { ifndef_ripper((yyval.id) = tMATCH); }
6599  break;
6600 
6601  case 132:
6602 
6603 /* Line 1806 of yacc.c */
6604 #line 1866 "parse.y"
6605  { ifndef_ripper((yyval.id) = tNMATCH); }
6606  break;
6607 
6608  case 133:
6609 
6610 /* Line 1806 of yacc.c */
6611 #line 1867 "parse.y"
6612  { ifndef_ripper((yyval.id) = '>'); }
6613  break;
6614 
6615  case 134:
6616 
6617 /* Line 1806 of yacc.c */
6618 #line 1868 "parse.y"
6619  { ifndef_ripper((yyval.id) = tGEQ); }
6620  break;
6621 
6622  case 135:
6623 
6624 /* Line 1806 of yacc.c */
6625 #line 1869 "parse.y"
6626  { ifndef_ripper((yyval.id) = '<'); }
6627  break;
6628 
6629  case 136:
6630 
6631 /* Line 1806 of yacc.c */
6632 #line 1870 "parse.y"
6633  { ifndef_ripper((yyval.id) = tLEQ); }
6634  break;
6635 
6636  case 137:
6637 
6638 /* Line 1806 of yacc.c */
6639 #line 1871 "parse.y"
6640  { ifndef_ripper((yyval.id) = tNEQ); }
6641  break;
6642 
6643  case 138:
6644 
6645 /* Line 1806 of yacc.c */
6646 #line 1872 "parse.y"
6647  { ifndef_ripper((yyval.id) = tLSHFT); }
6648  break;
6649 
6650  case 139:
6651 
6652 /* Line 1806 of yacc.c */
6653 #line 1873 "parse.y"
6654  { ifndef_ripper((yyval.id) = tRSHFT); }
6655  break;
6656 
6657  case 140:
6658 
6659 /* Line 1806 of yacc.c */
6660 #line 1874 "parse.y"
6661  { ifndef_ripper((yyval.id) = '+'); }
6662  break;
6663 
6664  case 141:
6665 
6666 /* Line 1806 of yacc.c */
6667 #line 1875 "parse.y"
6668  { ifndef_ripper((yyval.id) = '-'); }
6669  break;
6670 
6671  case 142:
6672 
6673 /* Line 1806 of yacc.c */
6674 #line 1876 "parse.y"
6675  { ifndef_ripper((yyval.id) = '*'); }
6676  break;
6677 
6678  case 143:
6679 
6680 /* Line 1806 of yacc.c */
6681 #line 1877 "parse.y"
6682  { ifndef_ripper((yyval.id) = '*'); }
6683  break;
6684 
6685  case 144:
6686 
6687 /* Line 1806 of yacc.c */
6688 #line 1878 "parse.y"
6689  { ifndef_ripper((yyval.id) = '/'); }
6690  break;
6691 
6692  case 145:
6693 
6694 /* Line 1806 of yacc.c */
6695 #line 1879 "parse.y"
6696  { ifndef_ripper((yyval.id) = '%'); }
6697  break;
6698 
6699  case 146:
6700 
6701 /* Line 1806 of yacc.c */
6702 #line 1880 "parse.y"
6703  { ifndef_ripper((yyval.id) = tPOW); }
6704  break;
6705 
6706  case 147:
6707 
6708 /* Line 1806 of yacc.c */
6709 #line 1881 "parse.y"
6710  { ifndef_ripper((yyval.id) = '!'); }
6711  break;
6712 
6713  case 148:
6714 
6715 /* Line 1806 of yacc.c */
6716 #line 1882 "parse.y"
6717  { ifndef_ripper((yyval.id) = '~'); }
6718  break;
6719 
6720  case 149:
6721 
6722 /* Line 1806 of yacc.c */
6723 #line 1883 "parse.y"
6724  { ifndef_ripper((yyval.id) = tUPLUS); }
6725  break;
6726 
6727  case 150:
6728 
6729 /* Line 1806 of yacc.c */
6730 #line 1884 "parse.y"
6731  { ifndef_ripper((yyval.id) = tUMINUS); }
6732  break;
6733 
6734  case 151:
6735 
6736 /* Line 1806 of yacc.c */
6737 #line 1885 "parse.y"
6738  { ifndef_ripper((yyval.id) = tAREF); }
6739  break;
6740 
6741  case 152:
6742 
6743 /* Line 1806 of yacc.c */
6744 #line 1886 "parse.y"
6745  { ifndef_ripper((yyval.id) = tASET); }
6746  break;
6747 
6748  case 153:
6749 
6750 /* Line 1806 of yacc.c */
6751 #line 1887 "parse.y"
6752  { ifndef_ripper((yyval.id) = '`'); }
6753  break;
6754 
6755  case 195:
6756 
6757 /* Line 1806 of yacc.c */
6758 #line 1905 "parse.y"
6759  {
6760  /*%%%*/
6761  value_expr((yyvsp[(3) - (3)].node));
6762  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6763  /*%
6764  $$ = dispatch2(assign, $1, $3);
6765  %*/
6766  }
6767  break;
6768 
6769  case 196:
6770 
6771 /* Line 1806 of yacc.c */
6772 #line 1914 "parse.y"
6773  {
6774  /*%%%*/
6775  value_expr((yyvsp[(3) - (5)].node));
6776  (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0);
6777  (yyval.node) = node_assign((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node));
6778  /*%
6779  $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5));
6780  %*/
6781  }
6782  break;
6783 
6784  case 197:
6785 
6786 /* Line 1806 of yacc.c */
6787 #line 1924 "parse.y"
6788  {
6789  /*%%%*/
6790  value_expr((yyvsp[(3) - (3)].node));
6791  if ((yyvsp[(1) - (3)].node)) {
6792  ID vid = (yyvsp[(1) - (3)].node)->nd_vid;
6793  if ((yyvsp[(2) - (3)].id) == tOROP) {
6794  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
6795  (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node));
6796  if (is_asgn_or_id(vid)) {
6797  (yyval.node)->nd_aid = vid;
6798  }
6799  }
6800  else if ((yyvsp[(2) - (3)].id) == tANDOP) {
6801  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
6802  (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node));
6803  }
6804  else {
6805  (yyval.node) = (yyvsp[(1) - (3)].node);
6806  (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node)));
6807  }
6808  }
6809  else {
6810  (yyval.node) = NEW_BEGIN(0);
6811  }
6812  /*%
6813  $$ = dispatch3(opassign, $1, $2, $3);
6814  %*/
6815  }
6816  break;
6817 
6818  case 198:
6819 
6820 /* Line 1806 of yacc.c */
6821 #line 1953 "parse.y"
6822  {
6823  /*%%%*/
6824  value_expr((yyvsp[(3) - (5)].node));
6825  (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0);
6826  if ((yyvsp[(1) - (5)].node)) {
6827  ID vid = (yyvsp[(1) - (5)].node)->nd_vid;
6828  if ((yyvsp[(2) - (5)].id) == tOROP) {
6829  (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node);
6830  (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].node));
6831  if (is_asgn_or_id(vid)) {
6832  (yyval.node)->nd_aid = vid;
6833  }
6834  }
6835  else if ((yyvsp[(2) - (5)].id) == tANDOP) {
6836  (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node);
6837  (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].node));
6838  }
6839  else {
6840  (yyval.node) = (yyvsp[(1) - (5)].node);
6841  (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].id), NEW_LIST((yyvsp[(3) - (5)].node)));
6842  }
6843  }
6844  else {
6845  (yyval.node) = NEW_BEGIN(0);
6846  }
6847  /*%
6848  $3 = dispatch2(rescue_mod, $3, $5);
6849  $$ = dispatch3(opassign, $1, $2, $3);
6850  %*/
6851  }
6852  break;
6853 
6854  case 199:
6855 
6856 /* Line 1806 of yacc.c */
6857 #line 1984 "parse.y"
6858  {
6859  /*%%%*/
6860  NODE *args;
6861 
6862  value_expr((yyvsp[(6) - (6)].node));
6863  if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY();
6864  if (nd_type((yyvsp[(3) - (6)].node)) == NODE_BLOCK_PASS) {
6865  args = NEW_ARGSCAT((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
6866  }
6867  else {
6868  args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
6869  }
6870  if ((yyvsp[(5) - (6)].id) == tOROP) {
6871  (yyvsp[(5) - (6)].id) = 0;
6872  }
6873  else if ((yyvsp[(5) - (6)].id) == tANDOP) {
6874  (yyvsp[(5) - (6)].id) = 1;
6875  }
6876  (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args);
6877  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
6878  /*%
6879  $1 = dispatch2(aref_field, $1, escape_Qundef($3));
6880  $$ = dispatch3(opassign, $1, $5, $6);
6881  %*/
6882  }
6883  break;
6884 
6885  case 200:
6886 
6887 /* Line 1806 of yacc.c */
6888 #line 2010 "parse.y"
6889  {
6890  /*%%%*/
6891  value_expr((yyvsp[(5) - (5)].node));
6892  if ((yyvsp[(4) - (5)].id) == tOROP) {
6893  (yyvsp[(4) - (5)].id) = 0;
6894  }
6895  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
6896  (yyvsp[(4) - (5)].id) = 1;
6897  }
6898  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
6899  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
6900  /*%
6901  $1 = dispatch3(field, $1, ripper_id2sym('.'), $3);
6902  $$ = dispatch3(opassign, $1, $4, $5);
6903  %*/
6904  }
6905  break;
6906 
6907  case 201:
6908 
6909 /* Line 1806 of yacc.c */
6910 #line 2027 "parse.y"
6911  {
6912  /*%%%*/
6913  value_expr((yyvsp[(5) - (5)].node));
6914  if ((yyvsp[(4) - (5)].id) == tOROP) {
6915  (yyvsp[(4) - (5)].id) = 0;
6916  }
6917  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
6918  (yyvsp[(4) - (5)].id) = 1;
6919  }
6920  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
6921  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
6922  /*%
6923  $1 = dispatch3(field, $1, ripper_id2sym('.'), $3);
6924  $$ = dispatch3(opassign, $1, $4, $5);
6925  %*/
6926  }
6927  break;
6928 
6929  case 202:
6930 
6931 /* Line 1806 of yacc.c */
6932 #line 2044 "parse.y"
6933  {
6934  /*%%%*/
6935  value_expr((yyvsp[(5) - (5)].node));
6936  if ((yyvsp[(4) - (5)].id) == tOROP) {
6937  (yyvsp[(4) - (5)].id) = 0;
6938  }
6939  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
6940  (yyvsp[(4) - (5)].id) = 1;
6941  }
6942  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
6943  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
6944  /*%
6945  $1 = dispatch3(field, $1, ripper_intern("::"), $3);
6946  $$ = dispatch3(opassign, $1, $4, $5);
6947  %*/
6948  }
6949  break;
6950 
6951  case 203:
6952 
6953 /* Line 1806 of yacc.c */
6954 #line 2061 "parse.y"
6955  {
6956  /*%%%*/
6957  yyerror("constant re-assignment");
6958  (yyval.node) = NEW_BEGIN(0);
6959  /*%
6960  $$ = dispatch2(const_path_field, $1, $3);
6961  $$ = dispatch3(opassign, $$, $4, $5);
6962  $$ = dispatch1(assign_error, $$);
6963  %*/
6964  }
6965  break;
6966 
6967  case 204:
6968 
6969 /* Line 1806 of yacc.c */
6970 #line 2072 "parse.y"
6971  {
6972  /*%%%*/
6973  yyerror("constant re-assignment");
6974  (yyval.node) = NEW_BEGIN(0);
6975  /*%
6976  $$ = dispatch1(top_const_field, $2);
6977  $$ = dispatch3(opassign, $$, $3, $4);
6978  $$ = dispatch1(assign_error, $$);
6979  %*/
6980  }
6981  break;
6982 
6983  case 205:
6984 
6985 /* Line 1806 of yacc.c */
6986 #line 2083 "parse.y"
6987  {
6988  /*%%%*/
6989  rb_backref_error((yyvsp[(1) - (3)].node));
6990  (yyval.node) = NEW_BEGIN(0);
6991  /*%
6992  $$ = dispatch1(var_field, $1);
6993  $$ = dispatch3(opassign, $$, $2, $3);
6994  $$ = dispatch1(assign_error, $$);
6995  %*/
6996  }
6997  break;
6998 
6999  case 206:
7000 
7001 /* Line 1806 of yacc.c */
7002 #line 2094 "parse.y"
7003  {
7004  /*%%%*/
7005  value_expr((yyvsp[(1) - (3)].node));
7006  value_expr((yyvsp[(3) - (3)].node));
7007  (yyval.node) = NEW_DOT2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7008  if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) &&
7009  nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) {
7011  }
7012  /*%
7013  $$ = dispatch2(dot2, $1, $3);
7014  %*/
7015  }
7016  break;
7017 
7018  case 207:
7019 
7020 /* Line 1806 of yacc.c */
7021 #line 2108 "parse.y"
7022  {
7023  /*%%%*/
7024  value_expr((yyvsp[(1) - (3)].node));
7025  value_expr((yyvsp[(3) - (3)].node));
7026  (yyval.node) = NEW_DOT3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7027  if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) &&
7028  nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) {
7030  }
7031  /*%
7032  $$ = dispatch2(dot3, $1, $3);
7033  %*/
7034  }
7035  break;
7036 
7037  case 208:
7038 
7039 /* Line 1806 of yacc.c */
7040 #line 2122 "parse.y"
7041  {
7042  /*%%%*/
7043  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '+', (yyvsp[(3) - (3)].node));
7044  /*%
7045  $$ = dispatch3(binary, $1, ID2SYM('+'), $3);
7046  %*/
7047  }
7048  break;
7049 
7050  case 209:
7051 
7052 /* Line 1806 of yacc.c */
7053 #line 2130 "parse.y"
7054  {
7055  /*%%%*/
7056  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '-', (yyvsp[(3) - (3)].node));
7057  /*%
7058  $$ = dispatch3(binary, $1, ID2SYM('-'), $3);
7059  %*/
7060  }
7061  break;
7062 
7063  case 210:
7064 
7065 /* Line 1806 of yacc.c */
7066 #line 2138 "parse.y"
7067  {
7068  /*%%%*/
7069  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '*', (yyvsp[(3) - (3)].node));
7070  /*%
7071  $$ = dispatch3(binary, $1, ID2SYM('*'), $3);
7072  %*/
7073  }
7074  break;
7075 
7076  case 211:
7077 
7078 /* Line 1806 of yacc.c */
7079 #line 2146 "parse.y"
7080  {
7081  /*%%%*/
7082  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '/', (yyvsp[(3) - (3)].node));
7083  /*%
7084  $$ = dispatch3(binary, $1, ID2SYM('/'), $3);
7085  %*/
7086  }
7087  break;
7088 
7089  case 212:
7090 
7091 /* Line 1806 of yacc.c */
7092 #line 2154 "parse.y"
7093  {
7094  /*%%%*/
7095  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '%', (yyvsp[(3) - (3)].node));
7096  /*%
7097  $$ = dispatch3(binary, $1, ID2SYM('%'), $3);
7098  %*/
7099  }
7100  break;
7101 
7102  case 213:
7103 
7104 /* Line 1806 of yacc.c */
7105 #line 2162 "parse.y"
7106  {
7107  /*%%%*/
7108  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tPOW, (yyvsp[(3) - (3)].node));
7109  /*%
7110  $$ = dispatch3(binary, $1, ripper_intern("**"), $3);
7111  %*/
7112  }
7113  break;
7114 
7115  case 214:
7116 
7117 /* Line 1806 of yacc.c */
7118 #line 2170 "parse.y"
7119  {
7120  /*%%%*/
7121  (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0);
7122  /*%
7123  $$ = dispatch3(binary, $2, ripper_intern("**"), $4);
7124  $$ = dispatch2(unary, ripper_intern("-@"), $$);
7125  %*/
7126  }
7127  break;
7128 
7129  case 215:
7130 
7131 /* Line 1806 of yacc.c */
7132 #line 2179 "parse.y"
7133  {
7134  /*%%%*/
7135  (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0);
7136  /*%
7137  $$ = dispatch3(binary, $2, ripper_intern("**"), $4);
7138  $$ = dispatch2(unary, ripper_intern("-@"), $$);
7139  %*/
7140  }
7141  break;
7142 
7143  case 216:
7144 
7145 /* Line 1806 of yacc.c */
7146 #line 2188 "parse.y"
7147  {
7148  /*%%%*/
7149  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUPLUS);
7150  /*%
7151  $$ = dispatch2(unary, ripper_intern("+@"), $2);
7152  %*/
7153  }
7154  break;
7155 
7156  case 217:
7157 
7158 /* Line 1806 of yacc.c */
7159 #line 2196 "parse.y"
7160  {
7161  /*%%%*/
7162  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUMINUS);
7163  /*%
7164  $$ = dispatch2(unary, ripper_intern("-@"), $2);
7165  %*/
7166  }
7167  break;
7168 
7169  case 218:
7170 
7171 /* Line 1806 of yacc.c */
7172 #line 2204 "parse.y"
7173  {
7174  /*%%%*/
7175  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '|', (yyvsp[(3) - (3)].node));
7176  /*%
7177  $$ = dispatch3(binary, $1, ID2SYM('|'), $3);
7178  %*/
7179  }
7180  break;
7181 
7182  case 219:
7183 
7184 /* Line 1806 of yacc.c */
7185 #line 2212 "parse.y"
7186  {
7187  /*%%%*/
7188  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '^', (yyvsp[(3) - (3)].node));
7189  /*%
7190  $$ = dispatch3(binary, $1, ID2SYM('^'), $3);
7191  %*/
7192  }
7193  break;
7194 
7195  case 220:
7196 
7197 /* Line 1806 of yacc.c */
7198 #line 2220 "parse.y"
7199  {
7200  /*%%%*/
7201  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '&', (yyvsp[(3) - (3)].node));
7202  /*%
7203  $$ = dispatch3(binary, $1, ID2SYM('&'), $3);
7204  %*/
7205  }
7206  break;
7207 
7208  case 221:
7209 
7210 /* Line 1806 of yacc.c */
7211 #line 2228 "parse.y"
7212  {
7213  /*%%%*/
7214  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tCMP, (yyvsp[(3) - (3)].node));
7215  /*%
7216  $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3);
7217  %*/
7218  }
7219  break;
7220 
7221  case 222:
7222 
7223 /* Line 1806 of yacc.c */
7224 #line 2236 "parse.y"
7225  {
7226  /*%%%*/
7227  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '>', (yyvsp[(3) - (3)].node));
7228  /*%
7229  $$ = dispatch3(binary, $1, ID2SYM('>'), $3);
7230  %*/
7231  }
7232  break;
7233 
7234  case 223:
7235 
7236 /* Line 1806 of yacc.c */
7237 #line 2244 "parse.y"
7238  {
7239  /*%%%*/
7240  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tGEQ, (yyvsp[(3) - (3)].node));
7241  /*%
7242  $$ = dispatch3(binary, $1, ripper_intern(">="), $3);
7243  %*/
7244  }
7245  break;
7246 
7247  case 224:
7248 
7249 /* Line 1806 of yacc.c */
7250 #line 2252 "parse.y"
7251  {
7252  /*%%%*/
7253  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '<', (yyvsp[(3) - (3)].node));
7254  /*%
7255  $$ = dispatch3(binary, $1, ID2SYM('<'), $3);
7256  %*/
7257  }
7258  break;
7259 
7260  case 225:
7261 
7262 /* Line 1806 of yacc.c */
7263 #line 2260 "parse.y"
7264  {
7265  /*%%%*/
7266  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLEQ, (yyvsp[(3) - (3)].node));
7267  /*%
7268  $$ = dispatch3(binary, $1, ripper_intern("<="), $3);
7269  %*/
7270  }
7271  break;
7272 
7273  case 226:
7274 
7275 /* Line 1806 of yacc.c */
7276 #line 2268 "parse.y"
7277  {
7278  /*%%%*/
7279  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQ, (yyvsp[(3) - (3)].node));
7280  /*%
7281  $$ = dispatch3(binary, $1, ripper_intern("=="), $3);
7282  %*/
7283  }
7284  break;
7285 
7286  case 227:
7287 
7288 /* Line 1806 of yacc.c */
7289 #line 2276 "parse.y"
7290  {
7291  /*%%%*/
7292  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQQ, (yyvsp[(3) - (3)].node));
7293  /*%
7294  $$ = dispatch3(binary, $1, ripper_intern("==="), $3);
7295  %*/
7296  }
7297  break;
7298 
7299  case 228:
7300 
7301 /* Line 1806 of yacc.c */
7302 #line 2284 "parse.y"
7303  {
7304  /*%%%*/
7305  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNEQ, (yyvsp[(3) - (3)].node));
7306  /*%
7307  $$ = dispatch3(binary, $1, ripper_intern("!="), $3);
7308  %*/
7309  }
7310  break;
7311 
7312  case 229:
7313 
7314 /* Line 1806 of yacc.c */
7315 #line 2292 "parse.y"
7316  {
7317  /*%%%*/
7318  (yyval.node) = match_op((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7319  if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].node)->nd_lit) == T_REGEXP) {
7320  (yyval.node) = reg_named_capture_assign((yyvsp[(1) - (3)].node)->nd_lit, (yyval.node));
7321  }
7322  /*%
7323  $$ = dispatch3(binary, $1, ripper_intern("=~"), $3);
7324  %*/
7325  }
7326  break;
7327 
7328  case 230:
7329 
7330 /* Line 1806 of yacc.c */
7331 #line 2303 "parse.y"
7332  {
7333  /*%%%*/
7334  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNMATCH, (yyvsp[(3) - (3)].node));
7335  /*%
7336  $$ = dispatch3(binary, $1, ripper_intern("!~"), $3);
7337  %*/
7338  }
7339  break;
7340 
7341  case 231:
7342 
7343 /* Line 1806 of yacc.c */
7344 #line 2311 "parse.y"
7345  {
7346  /*%%%*/
7347  (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!');
7348  /*%
7349  $$ = dispatch2(unary, ID2SYM('!'), $2);
7350  %*/
7351  }
7352  break;
7353 
7354  case 232:
7355 
7356 /* Line 1806 of yacc.c */
7357 #line 2319 "parse.y"
7358  {
7359  /*%%%*/
7360  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), '~');
7361  /*%
7362  $$ = dispatch2(unary, ID2SYM('~'), $2);
7363  %*/
7364  }
7365  break;
7366 
7367  case 233:
7368 
7369 /* Line 1806 of yacc.c */
7370 #line 2327 "parse.y"
7371  {
7372  /*%%%*/
7373  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLSHFT, (yyvsp[(3) - (3)].node));
7374  /*%
7375  $$ = dispatch3(binary, $1, ripper_intern("<<"), $3);
7376  %*/
7377  }
7378  break;
7379 
7380  case 234:
7381 
7382 /* Line 1806 of yacc.c */
7383 #line 2335 "parse.y"
7384  {
7385  /*%%%*/
7386  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tRSHFT, (yyvsp[(3) - (3)].node));
7387  /*%
7388  $$ = dispatch3(binary, $1, ripper_intern(">>"), $3);
7389  %*/
7390  }
7391  break;
7392 
7393  case 235:
7394 
7395 /* Line 1806 of yacc.c */
7396 #line 2343 "parse.y"
7397  {
7398  /*%%%*/
7399  (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7400  /*%
7401  $$ = dispatch3(binary, $1, ripper_intern("&&"), $3);
7402  %*/
7403  }
7404  break;
7405 
7406  case 236:
7407 
7408 /* Line 1806 of yacc.c */
7409 #line 2351 "parse.y"
7410  {
7411  /*%%%*/
7412  (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7413  /*%
7414  $$ = dispatch3(binary, $1, ripper_intern("||"), $3);
7415  %*/
7416  }
7417  break;
7418 
7419  case 237:
7420 
7421 /* Line 1806 of yacc.c */
7422 #line 2358 "parse.y"
7423  {in_defined = 1;}
7424  break;
7425 
7426  case 238:
7427 
7428 /* Line 1806 of yacc.c */
7429 #line 2359 "parse.y"
7430  {
7431  /*%%%*/
7432  in_defined = 0;
7433  (yyval.node) = NEW_DEFINED((yyvsp[(4) - (4)].node));
7434  /*%
7435  in_defined = 0;
7436  $$ = dispatch1(defined, $4);
7437  %*/
7438  }
7439  break;
7440 
7441  case 239:
7442 
7443 /* Line 1806 of yacc.c */
7444 #line 2369 "parse.y"
7445  {
7446  /*%%%*/
7447  value_expr((yyvsp[(1) - (6)].node));
7448  (yyval.node) = NEW_IF(cond((yyvsp[(1) - (6)].node)), (yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
7449  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
7450  /*%
7451  $$ = dispatch3(ifop, $1, $3, $6);
7452  %*/
7453  }
7454  break;
7455 
7456  case 240:
7457 
7458 /* Line 1806 of yacc.c */
7459 #line 2379 "parse.y"
7460  {
7461  (yyval.node) = (yyvsp[(1) - (1)].node);
7462  }
7463  break;
7464 
7465  case 241:
7466 
7467 /* Line 1806 of yacc.c */
7468 #line 2385 "parse.y"
7469  {
7470  /*%%%*/
7471  value_expr((yyvsp[(1) - (1)].node));
7472  (yyval.node) = (yyvsp[(1) - (1)].node);
7473  if (!(yyval.node)) (yyval.node) = NEW_NIL();
7474  /*%
7475  $$ = $1;
7476  %*/
7477  }
7478  break;
7479 
7480  case 243:
7481 
7482 /* Line 1806 of yacc.c */
7483 #line 2398 "parse.y"
7484  {
7485  (yyval.node) = (yyvsp[(1) - (2)].node);
7486  }
7487  break;
7488 
7489  case 244:
7490 
7491 /* Line 1806 of yacc.c */
7492 #line 2402 "parse.y"
7493  {
7494  /*%%%*/
7495  (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node)));
7496  /*%
7497  $$ = arg_add_assocs($1, $3);
7498  %*/
7499  }
7500  break;
7501 
7502  case 245:
7503 
7504 /* Line 1806 of yacc.c */
7505 #line 2410 "parse.y"
7506  {
7507  /*%%%*/
7508  (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
7509  /*%
7510  $$ = arg_add_assocs(arg_new(), $1);
7511  %*/
7512  }
7513  break;
7514 
7515  case 246:
7516 
7517 /* Line 1806 of yacc.c */
7518 #line 2420 "parse.y"
7519  {
7520  /*%%%*/
7521  (yyval.node) = (yyvsp[(2) - (3)].node);
7522  /*%
7523  $$ = dispatch1(arg_paren, escape_Qundef($2));
7524  %*/
7525  }
7526  break;
7527 
7528  case 251:
7529 
7530 /* Line 1806 of yacc.c */
7531 #line 2436 "parse.y"
7532  {
7533  (yyval.node) = (yyvsp[(1) - (2)].node);
7534  }
7535  break;
7536 
7537  case 252:
7538 
7539 /* Line 1806 of yacc.c */
7540 #line 2440 "parse.y"
7541  {
7542  /*%%%*/
7543  (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node)));
7544  /*%
7545  $$ = arg_add_assocs($1, $3);
7546  %*/
7547  }
7548  break;
7549 
7550  case 253:
7551 
7552 /* Line 1806 of yacc.c */
7553 #line 2448 "parse.y"
7554  {
7555  /*%%%*/
7556  (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
7557  /*%
7558  $$ = arg_add_assocs(arg_new(), $1);
7559  %*/
7560  }
7561  break;
7562 
7563  case 254:
7564 
7565 /* Line 1806 of yacc.c */
7566 #line 2458 "parse.y"
7567  {
7568  /*%%%*/
7569  value_expr((yyvsp[(1) - (1)].node));
7570  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
7571  /*%
7572  $$ = arg_add(arg_new(), $1);
7573  %*/
7574  }
7575  break;
7576 
7577  case 255:
7578 
7579 /* Line 1806 of yacc.c */
7580 #line 2467 "parse.y"
7581  {
7582  /*%%%*/
7583  (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
7584  /*%
7585  $$ = arg_add_optblock($1, $2);
7586  %*/
7587  }
7588  break;
7589 
7590  case 256:
7591 
7592 /* Line 1806 of yacc.c */
7593 #line 2475 "parse.y"
7594  {
7595  /*%%%*/
7596  (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
7597  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node));
7598  /*%
7599  $$ = arg_add_assocs(arg_new(), $1);
7600  $$ = arg_add_optblock($$, $2);
7601  %*/
7602  }
7603  break;
7604 
7605  case 257:
7606 
7607 /* Line 1806 of yacc.c */
7608 #line 2485 "parse.y"
7609  {
7610  /*%%%*/
7611  (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node)));
7612  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node));
7613  /*%
7614  $$ = arg_add_optblock(arg_add_assocs($1, $3), $4);
7615  %*/
7616  }
7617  break;
7618 
7619  case 259:
7620 
7621 /* Line 1806 of yacc.c */
7622 #line 2502 "parse.y"
7623  {
7624  (yyval.val) = cmdarg_stack;
7625  CMDARG_PUSH(1);
7626  }
7627  break;
7628 
7629  case 260:
7630 
7631 /* Line 1806 of yacc.c */
7632 #line 2507 "parse.y"
7633  {
7634  /* CMDARG_POP() */
7635  cmdarg_stack = (yyvsp[(1) - (2)].val);
7636  (yyval.node) = (yyvsp[(2) - (2)].node);
7637  }
7638  break;
7639 
7640  case 261:
7641 
7642 /* Line 1806 of yacc.c */
7643 #line 2515 "parse.y"
7644  {
7645  /*%%%*/
7646  (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node));
7647  /*%
7648  $$ = $2;
7649  %*/
7650  }
7651  break;
7652 
7653  case 262:
7654 
7655 /* Line 1806 of yacc.c */
7656 #line 2525 "parse.y"
7657  {
7658  (yyval.node) = (yyvsp[(2) - (2)].node);
7659  }
7660  break;
7661 
7662  case 263:
7663 
7664 /* Line 1806 of yacc.c */
7665 #line 2529 "parse.y"
7666  {
7667  (yyval.node) = 0;
7668  }
7669  break;
7670 
7671  case 264:
7672 
7673 /* Line 1806 of yacc.c */
7674 #line 2535 "parse.y"
7675  {
7676  /*%%%*/
7677  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
7678  /*%
7679  $$ = arg_add(arg_new(), $1);
7680  %*/
7681  }
7682  break;
7683 
7684  case 265:
7685 
7686 /* Line 1806 of yacc.c */
7687 #line 2543 "parse.y"
7688  {
7689  /*%%%*/
7690  (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node));
7691  /*%
7692  $$ = arg_add_star(arg_new(), $2);
7693  %*/
7694  }
7695  break;
7696 
7697  case 266:
7698 
7699 /* Line 1806 of yacc.c */
7700 #line 2551 "parse.y"
7701  {
7702  /*%%%*/
7703  NODE *n1;
7704  if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) {
7705  (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node));
7706  }
7707  else {
7708  (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7709  }
7710  /*%
7711  $$ = arg_add($1, $3);
7712  %*/
7713  }
7714  break;
7715 
7716  case 267:
7717 
7718 /* Line 1806 of yacc.c */
7719 #line 2565 "parse.y"
7720  {
7721  /*%%%*/
7722  NODE *n1;
7723  if ((nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) {
7724  (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node));
7725  }
7726  else {
7727  (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node));
7728  }
7729  /*%
7730  $$ = arg_add_star($1, $4);
7731  %*/
7732  }
7733  break;
7734 
7735  case 268:
7736 
7737 /* Line 1806 of yacc.c */
7738 #line 2581 "parse.y"
7739  {
7740  /*%%%*/
7741  NODE *n1;
7742  if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) {
7743  (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node));
7744  }
7745  else {
7746  (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7747  }
7748  /*%
7749  $$ = mrhs_add(args2mrhs($1), $3);
7750  %*/
7751  }
7752  break;
7753 
7754  case 269:
7755 
7756 /* Line 1806 of yacc.c */
7757 #line 2595 "parse.y"
7758  {
7759  /*%%%*/
7760  NODE *n1;
7761  if (nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY &&
7762  (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) {
7763  (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node));
7764  }
7765  else {
7766  (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node));
7767  }
7768  /*%
7769  $$ = mrhs_add_star(args2mrhs($1), $4);
7770  %*/
7771  }
7772  break;
7773 
7774  case 270:
7775 
7776 /* Line 1806 of yacc.c */
7777 #line 2610 "parse.y"
7778  {
7779  /*%%%*/
7780  (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node));
7781  /*%
7782  $$ = mrhs_add_star(mrhs_new(), $2);
7783  %*/
7784  }
7785  break;
7786 
7787  case 279:
7788 
7789 /* Line 1806 of yacc.c */
7790 #line 2628 "parse.y"
7791  {
7792  /*%%%*/
7793  (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0);
7794  /*%
7795  $$ = method_arg(dispatch1(fcall, $1), arg_new());
7796  %*/
7797  }
7798  break;
7799 
7800  case 280:
7801 
7802 /* Line 1806 of yacc.c */
7803 #line 2636 "parse.y"
7804  {
7805  /*%%%*/
7806  (yyval.num) = ruby_sourceline;
7807  /*%
7808  %*/
7809  }
7810  break;
7811 
7812  case 281:
7813 
7814 /* Line 1806 of yacc.c */
7815 #line 2644 "parse.y"
7816  {
7817  /*%%%*/
7818  if ((yyvsp[(3) - (4)].node) == NULL) {
7819  (yyval.node) = NEW_NIL();
7820  }
7821  else {
7822  if (nd_type((yyvsp[(3) - (4)].node)) == NODE_RESCUE ||
7823  nd_type((yyvsp[(3) - (4)].node)) == NODE_ENSURE)
7824  nd_set_line((yyvsp[(3) - (4)].node), (yyvsp[(2) - (4)].num));
7825  (yyval.node) = NEW_BEGIN((yyvsp[(3) - (4)].node));
7826  }
7827  nd_set_line((yyval.node), (yyvsp[(2) - (4)].num));
7828  /*%
7829  $$ = dispatch1(begin, $3);
7830  %*/
7831  }
7832  break;
7833 
7834  case 282:
7835 
7836 /* Line 1806 of yacc.c */
7837 #line 2660 "parse.y"
7838  {lex_state = EXPR_ENDARG;}
7839  break;
7840 
7841  case 283:
7842 
7843 /* Line 1806 of yacc.c */
7844 #line 2661 "parse.y"
7845  {
7846  rb_warning0("(...) interpreted as grouped expression");
7847  /*%%%*/
7848  (yyval.node) = (yyvsp[(2) - (4)].node);
7849  /*%
7850  $$ = dispatch1(paren, $2);
7851  %*/
7852  }
7853  break;
7854 
7855  case 284:
7856 
7857 /* Line 1806 of yacc.c */
7858 #line 2670 "parse.y"
7859  {
7860  /*%%%*/
7861  (yyval.node) = (yyvsp[(2) - (3)].node);
7862  /*%
7863  $$ = dispatch1(paren, $2);
7864  %*/
7865  }
7866  break;
7867 
7868  case 285:
7869 
7870 /* Line 1806 of yacc.c */
7871 #line 2678 "parse.y"
7872  {
7873  /*%%%*/
7874  (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
7875  /*%
7876  $$ = dispatch2(const_path_ref, $1, $3);
7877  %*/
7878  }
7879  break;
7880 
7881  case 286:
7882 
7883 /* Line 1806 of yacc.c */
7884 #line 2686 "parse.y"
7885  {
7886  /*%%%*/
7887  (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id));
7888  /*%
7889  $$ = dispatch1(top_const_ref, $2);
7890  %*/
7891  }
7892  break;
7893 
7894  case 287:
7895 
7896 /* Line 1806 of yacc.c */
7897 #line 2694 "parse.y"
7898  {
7899  /*%%%*/
7900  if ((yyvsp[(2) - (3)].node) == 0) {
7901  (yyval.node) = NEW_ZARRAY(); /* zero length array*/
7902  }
7903  else {
7904  (yyval.node) = (yyvsp[(2) - (3)].node);
7905  }
7906  /*%
7907  $$ = dispatch1(array, escape_Qundef($2));
7908  %*/
7909  }
7910  break;
7911 
7912  case 288:
7913 
7914 /* Line 1806 of yacc.c */
7915 #line 2707 "parse.y"
7916  {
7917  /*%%%*/
7918  (yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node));
7919  /*%
7920  $$ = dispatch1(hash, escape_Qundef($2));
7921  %*/
7922  }
7923  break;
7924 
7925  case 289:
7926 
7927 /* Line 1806 of yacc.c */
7928 #line 2715 "parse.y"
7929  {
7930  /*%%%*/
7931  (yyval.node) = NEW_RETURN(0);
7932  /*%
7933  $$ = dispatch0(return0);
7934  %*/
7935  }
7936  break;
7937 
7938  case 290:
7939 
7940 /* Line 1806 of yacc.c */
7941 #line 2723 "parse.y"
7942  {
7943  /*%%%*/
7944  (yyval.node) = new_yield((yyvsp[(3) - (4)].node));
7945  /*%
7946  $$ = dispatch1(yield, dispatch1(paren, $3));
7947  %*/
7948  }
7949  break;
7950 
7951  case 291:
7952 
7953 /* Line 1806 of yacc.c */
7954 #line 2731 "parse.y"
7955  {
7956  /*%%%*/
7957  (yyval.node) = NEW_YIELD(0, Qfalse);
7958  /*%
7959  $$ = dispatch1(yield, dispatch1(paren, arg_new()));
7960  %*/
7961  }
7962  break;
7963 
7964  case 292:
7965 
7966 /* Line 1806 of yacc.c */
7967 #line 2739 "parse.y"
7968  {
7969  /*%%%*/
7970  (yyval.node) = NEW_YIELD(0, Qfalse);
7971  /*%
7972  $$ = dispatch0(yield0);
7973  %*/
7974  }
7975  break;
7976 
7977  case 293:
7978 
7979 /* Line 1806 of yacc.c */
7980 #line 2746 "parse.y"
7981  {in_defined = 1;}
7982  break;
7983 
7984  case 294:
7985 
7986 /* Line 1806 of yacc.c */
7987 #line 2747 "parse.y"
7988  {
7989  /*%%%*/
7990  in_defined = 0;
7991  (yyval.node) = NEW_DEFINED((yyvsp[(5) - (6)].node));
7992  /*%
7993  in_defined = 0;
7994  $$ = dispatch1(defined, $5);
7995  %*/
7996  }
7997  break;
7998 
7999  case 295:
8000 
8001 /* Line 1806 of yacc.c */
8002 #line 2757 "parse.y"
8003  {
8004  /*%%%*/
8005  (yyval.node) = call_uni_op(cond((yyvsp[(3) - (4)].node)), '!');
8006  /*%
8007  $$ = dispatch2(unary, ripper_intern("not"), $3);
8008  %*/
8009  }
8010  break;
8011 
8012  case 296:
8013 
8014 /* Line 1806 of yacc.c */
8015 #line 2765 "parse.y"
8016  {
8017  /*%%%*/
8018  (yyval.node) = call_uni_op(cond(NEW_NIL()), '!');
8019  /*%
8020  $$ = dispatch2(unary, ripper_intern("not"), Qnil);
8021  %*/
8022  }
8023  break;
8024 
8025  case 297:
8026 
8027 /* Line 1806 of yacc.c */
8028 #line 2773 "parse.y"
8029  {
8030  /*%%%*/
8031  (yyvsp[(2) - (2)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].id), 0);
8032  (yyval.node) = (yyvsp[(2) - (2)].node);
8033  fixpos((yyvsp[(2) - (2)].node)->nd_iter, (yyvsp[(2) - (2)].node));
8034  /*%
8035  $$ = method_arg(dispatch1(fcall, $1), arg_new());
8036  $$ = method_add_block($$, $2);
8037  %*/
8038  }
8039  break;
8040 
8041  case 299:
8042 
8043 /* Line 1806 of yacc.c */
8044 #line 2785 "parse.y"
8045  {
8046  /*%%%*/
8047  block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node));
8048  (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node);
8049  (yyval.node) = (yyvsp[(2) - (2)].node);
8050  fixpos((yyval.node), (yyvsp[(1) - (2)].node));
8051  /*%
8052  $$ = method_add_block($1, $2);
8053  %*/
8054  }
8055  break;
8056 
8057  case 300:
8058 
8059 /* Line 1806 of yacc.c */
8060 #line 2796 "parse.y"
8061  {
8062  (yyval.node) = (yyvsp[(2) - (2)].node);
8063  }
8064  break;
8065 
8066  case 301:
8067 
8068 /* Line 1806 of yacc.c */
8069 #line 2803 "parse.y"
8070  {
8071  /*%%%*/
8072  (yyval.node) = NEW_IF(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node));
8073  fixpos((yyval.node), (yyvsp[(2) - (6)].node));
8074  /*%
8075  $$ = dispatch3(if, $2, $4, escape_Qundef($5));
8076  %*/
8077  }
8078  break;
8079 
8080  case 302:
8081 
8082 /* Line 1806 of yacc.c */
8083 #line 2815 "parse.y"
8084  {
8085  /*%%%*/
8086  (yyval.node) = NEW_UNLESS(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node));
8087  fixpos((yyval.node), (yyvsp[(2) - (6)].node));
8088  /*%
8089  $$ = dispatch3(unless, $2, $4, escape_Qundef($5));
8090  %*/
8091  }
8092  break;
8093 
8094  case 303:
8095 
8096 /* Line 1806 of yacc.c */
8097 #line 2823 "parse.y"
8098  {COND_PUSH(1);}
8099  break;
8100 
8101  case 304:
8102 
8103 /* Line 1806 of yacc.c */
8104 #line 2823 "parse.y"
8105  {COND_POP();}
8106  break;
8107 
8108  case 305:
8109 
8110 /* Line 1806 of yacc.c */
8111 #line 2826 "parse.y"
8112  {
8113  /*%%%*/
8114  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1);
8115  fixpos((yyval.node), (yyvsp[(3) - (7)].node));
8116  /*%
8117  $$ = dispatch2(while, $3, $6);
8118  %*/
8119  }
8120  break;
8121 
8122  case 306:
8123 
8124 /* Line 1806 of yacc.c */
8125 #line 2834 "parse.y"
8126  {COND_PUSH(1);}
8127  break;
8128 
8129  case 307:
8130 
8131 /* Line 1806 of yacc.c */
8132 #line 2834 "parse.y"
8133  {COND_POP();}
8134  break;
8135 
8136  case 308:
8137 
8138 /* Line 1806 of yacc.c */
8139 #line 2837 "parse.y"
8140  {
8141  /*%%%*/
8142  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1);
8143  fixpos((yyval.node), (yyvsp[(3) - (7)].node));
8144  /*%
8145  $$ = dispatch2(until, $3, $6);
8146  %*/
8147  }
8148  break;
8149 
8150  case 309:
8151 
8152 /* Line 1806 of yacc.c */
8153 #line 2848 "parse.y"
8154  {
8155  /*%%%*/
8156  (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node));
8157  fixpos((yyval.node), (yyvsp[(2) - (5)].node));
8158  /*%
8159  $$ = dispatch2(case, $2, $4);
8160  %*/
8161  }
8162  break;
8163 
8164  case 310:
8165 
8166 /* Line 1806 of yacc.c */
8167 #line 2857 "parse.y"
8168  {
8169  /*%%%*/
8170  (yyval.node) = NEW_CASE(0, (yyvsp[(3) - (4)].node));
8171  /*%
8172  $$ = dispatch2(case, Qnil, $3);
8173  %*/
8174  }
8175  break;
8176 
8177  case 311:
8178 
8179 /* Line 1806 of yacc.c */
8180 #line 2865 "parse.y"
8181  {COND_PUSH(1);}
8182  break;
8183 
8184  case 312:
8185 
8186 /* Line 1806 of yacc.c */
8187 #line 2867 "parse.y"
8188  {COND_POP();}
8189  break;
8190 
8191  case 313:
8192 
8193 /* Line 1806 of yacc.c */
8194 #line 2870 "parse.y"
8195  {
8196  /*%%%*/
8197  /*
8198  * for a, b, c in e
8199  * #=>
8200  * e.each{|*x| a, b, c = x
8201  *
8202  * for a in e
8203  * #=>
8204  * e.each{|x| a, = x}
8205  */
8206  ID id = internal_id();
8207  ID *tbl = ALLOC_N(ID, 2);
8208  NODE *m = NEW_ARGS_AUX(0, 0);
8209  NODE *args, *scope;
8210 
8211  if (nd_type((yyvsp[(2) - (9)].node)) == NODE_MASGN) {
8212  /* if args.length == 1 && args[0].kind_of?(Array)
8213  * args = args[0]
8214  * end
8215  */
8216  NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1)));
8217  NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0)));
8218  m->nd_next = block_append(
8219  NEW_IF(
8221  NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0),
8222  rb_intern("=="), one),
8223  NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero),
8224  rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))),
8225  0),
8226  NEW_DASGN_CURR(id,
8227  NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)),
8228  0),
8229  node_assign((yyvsp[(2) - (9)].node), NEW_DVAR(id)));
8230 
8231  args = new_args(m, 0, id, 0, 0);
8232  }
8233  else {
8234  if (nd_type((yyvsp[(2) - (9)].node)) == NODE_LASGN ||
8235  nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN ||
8236  nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN_CURR) {
8237  (yyvsp[(2) - (9)].node)->nd_value = NEW_DVAR(id);
8238  m->nd_plen = 1;
8239  m->nd_next = (yyvsp[(2) - (9)].node);
8240  args = new_args(m, 0, 0, 0, 0);
8241  }
8242  else {
8243  m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].node)), 0), NEW_DVAR(id));
8244  args = new_args(m, 0, id, 0, 0);
8245  }
8246  }
8247  scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].node), args);
8248  tbl[0] = 1; tbl[1] = id;
8249  (yyval.node) = NEW_FOR(0, (yyvsp[(5) - (9)].node), scope);
8250  fixpos((yyval.node), (yyvsp[(2) - (9)].node));
8251  /*%
8252  $$ = dispatch3(for, $2, $5, $8);
8253  %*/
8254  }
8255  break;
8256 
8257  case 314:
8258 
8259 /* Line 1806 of yacc.c */
8260 #line 2931 "parse.y"
8261  {
8262  if (in_def || in_single)
8263  yyerror("class definition in method body");
8264  local_push(0);
8265  /*%%%*/
8266  (yyval.num) = ruby_sourceline;
8267  /*%
8268  %*/
8269  }
8270  break;
8271 
8272  case 315:
8273 
8274 /* Line 1806 of yacc.c */
8275 #line 2942 "parse.y"
8276  {
8277  /*%%%*/
8278  (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node));
8279  nd_set_line((yyval.node), (yyvsp[(4) - (6)].num));
8280  /*%
8281  $$ = dispatch3(class, $2, $3, $5);
8282  %*/
8283  local_pop();
8284  }
8285  break;
8286 
8287  case 316:
8288 
8289 /* Line 1806 of yacc.c */
8290 #line 2952 "parse.y"
8291  {
8292  (yyval.num) = in_def;
8293  in_def = 0;
8294  }
8295  break;
8296 
8297  case 317:
8298 
8299 /* Line 1806 of yacc.c */
8300 #line 2957 "parse.y"
8301  {
8302  (yyval.num) = in_single;
8303  in_single = 0;
8304  local_push(0);
8305  }
8306  break;
8307 
8308  case 318:
8309 
8310 /* Line 1806 of yacc.c */
8311 #line 2964 "parse.y"
8312  {
8313  /*%%%*/
8314  (yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node));
8315  fixpos((yyval.node), (yyvsp[(3) - (8)].node));
8316  /*%
8317  $$ = dispatch2(sclass, $3, $7);
8318  %*/
8319  local_pop();
8320  in_def = (yyvsp[(4) - (8)].num);
8321  in_single = (yyvsp[(6) - (8)].num);
8322  }
8323  break;
8324 
8325  case 319:
8326 
8327 /* Line 1806 of yacc.c */
8328 #line 2976 "parse.y"
8329  {
8330  if (in_def || in_single)
8331  yyerror("module definition in method body");
8332  local_push(0);
8333  /*%%%*/
8334  (yyval.num) = ruby_sourceline;
8335  /*%
8336  %*/
8337  }
8338  break;
8339 
8340  case 320:
8341 
8342 /* Line 1806 of yacc.c */
8343 #line 2987 "parse.y"
8344  {
8345  /*%%%*/
8346  (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node));
8347  nd_set_line((yyval.node), (yyvsp[(3) - (5)].num));
8348  /*%
8349  $$ = dispatch2(module, $2, $4);
8350  %*/
8351  local_pop();
8352  }
8353  break;
8354 
8355  case 321:
8356 
8357 /* Line 1806 of yacc.c */
8358 #line 2997 "parse.y"
8359  {
8360  (yyval.id) = cur_mid;
8361  cur_mid = (yyvsp[(2) - (2)].id);
8362  in_def++;
8363  local_push(0);
8364  }
8365  break;
8366 
8367  case 322:
8368 
8369 /* Line 1806 of yacc.c */
8370 #line 3006 "parse.y"
8371  {
8372  /*%%%*/
8373  NODE *body = remove_begin((yyvsp[(5) - (6)].node));
8374  reduce_nodes(&body);
8375  (yyval.node) = NEW_DEFN((yyvsp[(2) - (6)].id), (yyvsp[(4) - (6)].node), body, NOEX_PRIVATE);
8376  nd_set_line((yyval.node), (yyvsp[(1) - (6)].num));
8377  /*%
8378  $$ = dispatch3(def, $2, $4, $5);
8379  %*/
8380  local_pop();
8381  in_def--;
8382  cur_mid = (yyvsp[(3) - (6)].id);
8383  }
8384  break;
8385 
8386  case 323:
8387 
8388 /* Line 1806 of yacc.c */
8389 #line 3019 "parse.y"
8390  {lex_state = EXPR_FNAME;}
8391  break;
8392 
8393  case 324:
8394 
8395 /* Line 1806 of yacc.c */
8396 #line 3020 "parse.y"
8397  {
8398  in_single++;
8399  lex_state = EXPR_ENDFN; /* force for args */
8400  local_push(0);
8401  }
8402  break;
8403 
8404  case 325:
8405 
8406 /* Line 1806 of yacc.c */
8407 #line 3028 "parse.y"
8408  {
8409  /*%%%*/
8410  NODE *body = remove_begin((yyvsp[(8) - (9)].node));
8411  reduce_nodes(&body);
8412  (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), body);
8413  nd_set_line((yyval.node), (yyvsp[(1) - (9)].num));
8414  /*%
8415  $$ = dispatch5(defs, $2, $3, $5, $7, $8);
8416  %*/
8417  local_pop();
8418  in_single--;
8419  }
8420  break;
8421 
8422  case 326:
8423 
8424 /* Line 1806 of yacc.c */
8425 #line 3041 "parse.y"
8426  {
8427  /*%%%*/
8428  (yyval.node) = NEW_BREAK(0);
8429  /*%
8430  $$ = dispatch1(break, arg_new());
8431  %*/
8432  }
8433  break;
8434 
8435  case 327:
8436 
8437 /* Line 1806 of yacc.c */
8438 #line 3049 "parse.y"
8439  {
8440  /*%%%*/
8441  (yyval.node) = NEW_NEXT(0);
8442  /*%
8443  $$ = dispatch1(next, arg_new());
8444  %*/
8445  }
8446  break;
8447 
8448  case 328:
8449 
8450 /* Line 1806 of yacc.c */
8451 #line 3057 "parse.y"
8452  {
8453  /*%%%*/
8454  (yyval.node) = NEW_REDO();
8455  /*%
8456  $$ = dispatch0(redo);
8457  %*/
8458  }
8459  break;
8460 
8461  case 329:
8462 
8463 /* Line 1806 of yacc.c */
8464 #line 3065 "parse.y"
8465  {
8466  /*%%%*/
8467  (yyval.node) = NEW_RETRY();
8468  /*%
8469  $$ = dispatch0(retry);
8470  %*/
8471  }
8472  break;
8473 
8474  case 330:
8475 
8476 /* Line 1806 of yacc.c */
8477 #line 3075 "parse.y"
8478  {
8479  /*%%%*/
8480  value_expr((yyvsp[(1) - (1)].node));
8481  (yyval.node) = (yyvsp[(1) - (1)].node);
8482  if (!(yyval.node)) (yyval.node) = NEW_NIL();
8483  /*%
8484  $$ = $1;
8485  %*/
8486  }
8487  break;
8488 
8489  case 331:
8490 
8491 /* Line 1806 of yacc.c */
8492 #line 3087 "parse.y"
8493  {
8494  token_info_push("begin");
8495  }
8496  break;
8497 
8498  case 332:
8499 
8500 /* Line 1806 of yacc.c */
8501 #line 3093 "parse.y"
8502  {
8503  token_info_push("if");
8504  }
8505  break;
8506 
8507  case 333:
8508 
8509 /* Line 1806 of yacc.c */
8510 #line 3099 "parse.y"
8511  {
8512  token_info_push("unless");
8513  }
8514  break;
8515 
8516  case 334:
8517 
8518 /* Line 1806 of yacc.c */
8519 #line 3105 "parse.y"
8520  {
8521  token_info_push("while");
8522  }
8523  break;
8524 
8525  case 335:
8526 
8527 /* Line 1806 of yacc.c */
8528 #line 3111 "parse.y"
8529  {
8530  token_info_push("until");
8531  }
8532  break;
8533 
8534  case 336:
8535 
8536 /* Line 1806 of yacc.c */
8537 #line 3117 "parse.y"
8538  {
8539  token_info_push("case");
8540  }
8541  break;
8542 
8543  case 337:
8544 
8545 /* Line 1806 of yacc.c */
8546 #line 3123 "parse.y"
8547  {
8548  token_info_push("for");
8549  }
8550  break;
8551 
8552  case 338:
8553 
8554 /* Line 1806 of yacc.c */
8555 #line 3129 "parse.y"
8556  {
8557  token_info_push("class");
8558  }
8559  break;
8560 
8561  case 339:
8562 
8563 /* Line 1806 of yacc.c */
8564 #line 3135 "parse.y"
8565  {
8566  token_info_push("module");
8567  }
8568  break;
8569 
8570  case 340:
8571 
8572 /* Line 1806 of yacc.c */
8573 #line 3141 "parse.y"
8574  {
8575  token_info_push("def");
8576  /*%%%*/
8577  (yyval.num) = ruby_sourceline;
8578  /*%
8579  %*/
8580  }
8581  break;
8582 
8583  case 341:
8584 
8585 /* Line 1806 of yacc.c */
8586 #line 3151 "parse.y"
8587  {
8588  token_info_pop("end");
8589  }
8590  break;
8591 
8592  case 348:
8593 
8594 /* Line 1806 of yacc.c */
8595 #line 3181 "parse.y"
8596  {
8597  /*%%%*/
8598  (yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node)), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
8599  fixpos((yyval.node), (yyvsp[(2) - (5)].node));
8600  /*%
8601  $$ = dispatch3(elsif, $2, $4, escape_Qundef($5));
8602  %*/
8603  }
8604  break;
8605 
8606  case 350:
8607 
8608 /* Line 1806 of yacc.c */
8609 #line 3193 "parse.y"
8610  {
8611  /*%%%*/
8612  (yyval.node) = (yyvsp[(2) - (2)].node);
8613  /*%
8614  $$ = dispatch1(else, $2);
8615  %*/
8616  }
8617  break;
8618 
8619  case 353:
8620 
8621 /* Line 1806 of yacc.c */
8622 #line 3207 "parse.y"
8623  {
8624  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
8625  /*%%%*/
8626  /*%
8627  $$ = dispatch1(mlhs_paren, $$);
8628  %*/
8629  }
8630  break;
8631 
8632  case 354:
8633 
8634 /* Line 1806 of yacc.c */
8635 #line 3215 "parse.y"
8636  {
8637  /*%%%*/
8638  (yyval.node) = (yyvsp[(2) - (3)].node);
8639  /*%
8640  $$ = dispatch1(mlhs_paren, $2);
8641  %*/
8642  }
8643  break;
8644 
8645  case 355:
8646 
8647 /* Line 1806 of yacc.c */
8648 #line 3225 "parse.y"
8649  {
8650  /*%%%*/
8651  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
8652  /*%
8653  $$ = mlhs_add(mlhs_new(), $1);
8654  %*/
8655  }
8656  break;
8657 
8658  case 356:
8659 
8660 /* Line 1806 of yacc.c */
8661 #line 3233 "parse.y"
8662  {
8663  /*%%%*/
8664  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
8665  /*%
8666  $$ = mlhs_add($1, $3);
8667  %*/
8668  }
8669  break;
8670 
8671  case 357:
8672 
8673 /* Line 1806 of yacc.c */
8674 #line 3243 "parse.y"
8675  {
8676  /*%%%*/
8677  (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0);
8678  /*%
8679  $$ = $1;
8680  %*/
8681  }
8682  break;
8683 
8684  case 358:
8685 
8686 /* Line 1806 of yacc.c */
8687 #line 3251 "parse.y"
8688  {
8689  (yyval.node) = assignable((yyvsp[(4) - (4)].id), 0);
8690  /*%%%*/
8691  (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), (yyval.node));
8692  /*%
8693  $$ = mlhs_add_star($1, $$);
8694  %*/
8695  }
8696  break;
8697 
8698  case 359:
8699 
8700 /* Line 1806 of yacc.c */
8701 #line 3260 "parse.y"
8702  {
8703  (yyval.node) = assignable((yyvsp[(4) - (6)].id), 0);
8704  /*%%%*/
8705  (yyval.node) = NEW_MASGN((yyvsp[(1) - (6)].node), NEW_POSTARG((yyval.node), (yyvsp[(6) - (6)].node)));
8706  /*%
8707  $$ = mlhs_add_star($1, $$);
8708  %*/
8709  }
8710  break;
8711 
8712  case 360:
8713 
8714 /* Line 1806 of yacc.c */
8715 #line 3269 "parse.y"
8716  {
8717  /*%%%*/
8718  (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1);
8719  /*%
8720  $$ = mlhs_add_star($1, Qnil);
8721  %*/
8722  }
8723  break;
8724 
8725  case 361:
8726 
8727 /* Line 1806 of yacc.c */
8728 #line 3277 "parse.y"
8729  {
8730  /*%%%*/
8731  (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG(-1, (yyvsp[(5) - (5)].node)));
8732  /*%
8733  $$ = mlhs_add_star($1, $5);
8734  %*/
8735  }
8736  break;
8737 
8738  case 362:
8739 
8740 /* Line 1806 of yacc.c */
8741 #line 3285 "parse.y"
8742  {
8743  (yyval.node) = assignable((yyvsp[(2) - (2)].id), 0);
8744  /*%%%*/
8745  (yyval.node) = NEW_MASGN(0, (yyval.node));
8746  /*%
8747  $$ = mlhs_add_star(mlhs_new(), $$);
8748  %*/
8749  }
8750  break;
8751 
8752  case 363:
8753 
8754 /* Line 1806 of yacc.c */
8755 #line 3294 "parse.y"
8756  {
8757  (yyval.node) = assignable((yyvsp[(2) - (4)].id), 0);
8758  /*%%%*/
8759  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyval.node), (yyvsp[(4) - (4)].node)));
8760  /*%
8761  #if 0
8762  TODO: Check me
8763  #endif
8764  $$ = mlhs_add_star($$, $4);
8765  %*/
8766  }
8767  break;
8768 
8769  case 364:
8770 
8771 /* Line 1806 of yacc.c */
8772 #line 3306 "parse.y"
8773  {
8774  /*%%%*/
8775  (yyval.node) = NEW_MASGN(0, -1);
8776  /*%
8777  $$ = mlhs_add_star(mlhs_new(), Qnil);
8778  %*/
8779  }
8780  break;
8781 
8782  case 365:
8783 
8784 /* Line 1806 of yacc.c */
8785 #line 3314 "parse.y"
8786  {
8787  /*%%%*/
8788  (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node)));
8789  /*%
8790  $$ = mlhs_add_star(mlhs_new(), Qnil);
8791  %*/
8792  }
8793  break;
8794 
8795  case 366:
8796 
8797 /* Line 1806 of yacc.c */
8798 #line 3324 "parse.y"
8799  {
8800  /*%%%*/
8801  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id));
8802  /*%
8803  $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6));
8804  %*/
8805  }
8806  break;
8807 
8808  case 367:
8809 
8810 /* Line 1806 of yacc.c */
8811 #line 3332 "parse.y"
8812  {
8813  /*%%%*/
8814  (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id));
8815  /*%
8816  $$ = params_new($1, $3, $5, $7, escape_Qundef($8));
8817  %*/
8818  }
8819  break;
8820 
8821  case 368:
8822 
8823 /* Line 1806 of yacc.c */
8824 #line 3340 "parse.y"
8825  {
8826  /*%%%*/
8827  (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id));
8828  /*%
8829  $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4));
8830  %*/
8831  }
8832  break;
8833 
8834  case 369:
8835 
8836 /* Line 1806 of yacc.c */
8837 #line 3348 "parse.y"
8838  {
8839  /*%%%*/
8840  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
8841  /*%
8842  $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6));
8843  %*/
8844  }
8845  break;
8846 
8847  case 370:
8848 
8849 /* Line 1806 of yacc.c */
8850 #line 3356 "parse.y"
8851  {
8852  /*%%%*/
8853  (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id));
8854  /*%
8855  $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4));
8856  %*/
8857  }
8858  break;
8859 
8860  case 371:
8861 
8862 /* Line 1806 of yacc.c */
8863 #line 3364 "parse.y"
8864  {
8865  /*%%%*/
8866  (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 1, 0, 0);
8867  /*%
8868  $$ = params_new($1, Qnil, Qnil, Qnil, Qnil);
8869  dispatch1(excessed_comma, $$);
8870  %*/
8871  }
8872  break;
8873 
8874  case 372:
8875 
8876 /* Line 1806 of yacc.c */
8877 #line 3373 "parse.y"
8878  {
8879  /*%%%*/
8880  (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
8881  /*%
8882  $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6));
8883  %*/
8884  }
8885  break;
8886 
8887  case 373:
8888 
8889 /* Line 1806 of yacc.c */
8890 #line 3381 "parse.y"
8891  {
8892  /*%%%*/
8893  (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id));
8894  /*%
8895  $$ = params_new($1, Qnil,Qnil, Qnil, escape_Qundef($2));
8896  %*/
8897  }
8898  break;
8899 
8900  case 374:
8901 
8902 /* Line 1806 of yacc.c */
8903 #line 3389 "parse.y"
8904  {
8905  /*%%%*/
8906  (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id));
8907  /*%
8908  $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4));
8909  %*/
8910  }
8911  break;
8912 
8913  case 375:
8914 
8915 /* Line 1806 of yacc.c */
8916 #line 3397 "parse.y"
8917  {
8918  /*%%%*/
8919  (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
8920  /*%
8921  $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6));
8922  %*/
8923  }
8924  break;
8925 
8926  case 376:
8927 
8928 /* Line 1806 of yacc.c */
8929 #line 3405 "parse.y"
8930  {
8931  /*%%%*/
8932  (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id));
8933  /*%
8934  $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2));
8935  %*/
8936  }
8937  break;
8938 
8939  case 377:
8940 
8941 /* Line 1806 of yacc.c */
8942 #line 3413 "parse.y"
8943  {
8944  /*%%%*/
8945  (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id));
8946  /*%
8947  $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4));
8948  %*/
8949  }
8950  break;
8951 
8952  case 378:
8953 
8954 /* Line 1806 of yacc.c */
8955 #line 3421 "parse.y"
8956  {
8957  /*%%%*/
8958  (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id));
8959  /*%
8960  $$ = params_new(Qnil, Qnil, $1, Qnil, escape_Qundef($2));
8961  %*/
8962  }
8963  break;
8964 
8965  case 379:
8966 
8967 /* Line 1806 of yacc.c */
8968 #line 3429 "parse.y"
8969  {
8970  /*%%%*/
8971  (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id));
8972  /*%
8973  $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4));
8974  %*/
8975  }
8976  break;
8977 
8978  case 380:
8979 
8980 /* Line 1806 of yacc.c */
8981 #line 3437 "parse.y"
8982  {
8983  /*%%%*/
8984  (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id));
8985  /*%
8986  $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1);
8987  %*/
8988  }
8989  break;
8990 
8991  case 382:
8992 
8993 /* Line 1806 of yacc.c */
8994 #line 3448 "parse.y"
8995  {
8996  command_start = TRUE;
8997  }
8998  break;
8999 
9000  case 383:
9001 
9002 /* Line 1806 of yacc.c */
9003 #line 3454 "parse.y"
9004  {
9005  /*%%%*/
9006  (yyval.node) = 0;
9007  /*%
9008  $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
9009  escape_Qundef($2));
9010  %*/
9011  }
9012  break;
9013 
9014  case 384:
9015 
9016 /* Line 1806 of yacc.c */
9017 #line 3463 "parse.y"
9018  {
9019  /*%%%*/
9020  (yyval.node) = 0;
9021  /*%
9022  $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
9023  Qnil);
9024  %*/
9025  }
9026  break;
9027 
9028  case 385:
9029 
9030 /* Line 1806 of yacc.c */
9031 #line 3472 "parse.y"
9032  {
9033  /*%%%*/
9034  (yyval.node) = (yyvsp[(2) - (4)].node);
9035  /*%
9036  $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3));
9037  %*/
9038  }
9039  break;
9040 
9041  case 387:
9042 
9043 /* Line 1806 of yacc.c */
9044 #line 3484 "parse.y"
9045  {
9046  /*%%%*/
9047  (yyval.node) = 0;
9048  /*%
9049  $$ = $2;
9050  %*/
9051  }
9052  break;
9053 
9054  case 390:
9055 
9056 /* Line 1806 of yacc.c */
9057 #line 3510 "parse.y"
9058  {
9059  new_bv(get_id((yyvsp[(1) - (1)].id)));
9060  /*%%%*/
9061  /*%
9062  $$ = get_value($1);
9063  %*/
9064  }
9065  break;
9066 
9067  case 391:
9068 
9069 /* Line 1806 of yacc.c */
9070 #line 3518 "parse.y"
9071  {
9072  (yyval.node) = 0;
9073  }
9074  break;
9075 
9076  case 392:
9077 
9078 /* Line 1806 of yacc.c */
9079 #line 3523 "parse.y"
9080  {
9081  (yyval.vars) = dyna_push();
9082  }
9083  break;
9084 
9085  case 393:
9086 
9087 /* Line 1806 of yacc.c */
9088 #line 3526 "parse.y"
9089  {
9090  (yyval.num) = lpar_beg;
9091  lpar_beg = ++paren_nest;
9092  }
9093  break;
9094 
9095  case 394:
9096 
9097 /* Line 1806 of yacc.c */
9098 #line 3532 "parse.y"
9099  {
9100  lpar_beg = (yyvsp[(2) - (4)].num);
9101  /*%%%*/
9102  (yyval.node) = (yyvsp[(3) - (4)].node);
9103  (yyval.node)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].node)->nd_head, (yyvsp[(4) - (4)].node));
9104  /*%
9105  $$ = dispatch2(lambda, $3, $4);
9106  %*/
9107  dyna_pop((yyvsp[(1) - (4)].vars));
9108  }
9109  break;
9110 
9111  case 395:
9112 
9113 /* Line 1806 of yacc.c */
9114 #line 3545 "parse.y"
9115  {
9116  /*%%%*/
9117  (yyval.node) = NEW_LAMBDA((yyvsp[(2) - (4)].node));
9118  /*%
9119  $$ = dispatch1(paren, $2);
9120  %*/
9121  }
9122  break;
9123 
9124  case 396:
9125 
9126 /* Line 1806 of yacc.c */
9127 #line 3553 "parse.y"
9128  {
9129  /*%%%*/
9130  (yyval.node) = NEW_LAMBDA((yyvsp[(1) - (1)].node));
9131  /*%
9132  $$ = $1;
9133  %*/
9134  }
9135  break;
9136 
9137  case 397:
9138 
9139 /* Line 1806 of yacc.c */
9140 #line 3563 "parse.y"
9141  {
9142  (yyval.node) = (yyvsp[(2) - (3)].node);
9143  }
9144  break;
9145 
9146  case 398:
9147 
9148 /* Line 1806 of yacc.c */
9149 #line 3567 "parse.y"
9150  {
9151  (yyval.node) = (yyvsp[(2) - (3)].node);
9152  }
9153  break;
9154 
9155  case 399:
9156 
9157 /* Line 1806 of yacc.c */
9158 #line 3573 "parse.y"
9159  {
9160  (yyvsp[(1) - (1)].vars) = dyna_push();
9161  /*%%%*/
9162  (yyval.num) = ruby_sourceline;
9163  /*% %*/
9164  }
9165  break;
9166 
9167  case 400:
9168 
9169 /* Line 1806 of yacc.c */
9170 #line 3582 "parse.y"
9171  {
9172  /*%%%*/
9173  (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node));
9174  nd_set_line((yyval.node), (yyvsp[(2) - (5)].num));
9175  /*%
9176  $$ = dispatch2(do_block, escape_Qundef($3), $4);
9177  %*/
9178  dyna_pop((yyvsp[(1) - (5)].vars));
9179  }
9180  break;
9181 
9182  case 401:
9183 
9184 /* Line 1806 of yacc.c */
9185 #line 3594 "parse.y"
9186  {
9187  /*%%%*/
9188  if (nd_type((yyvsp[(1) - (2)].node)) == NODE_YIELD) {
9189  compile_error(PARSER_ARG "block given to yield");
9190  }
9191  else {
9192  block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node));
9193  }
9194  (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node);
9195  (yyval.node) = (yyvsp[(2) - (2)].node);
9196  fixpos((yyval.node), (yyvsp[(1) - (2)].node));
9197  /*%
9198  $$ = method_add_block($1, $2);
9199  %*/
9200  }
9201  break;
9202 
9203  case 402:
9204 
9205 /* Line 1806 of yacc.c */
9206 #line 3610 "parse.y"
9207  {
9208  /*%%%*/
9209  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
9210  /*%
9211  $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
9212  $$ = method_optarg($$, $4);
9213  %*/
9214  }
9215  break;
9216 
9217  case 403:
9218 
9219 /* Line 1806 of yacc.c */
9220 #line 3619 "parse.y"
9221  {
9222  /*%%%*/
9223  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
9224  /*%
9225  $$ = dispatch3(call, $1, ripper_intern("::"), $3);
9226  $$ = method_optarg($$, $4);
9227  %*/
9228  }
9229  break;
9230 
9231  case 404:
9232 
9233 /* Line 1806 of yacc.c */
9234 #line 3630 "parse.y"
9235  {
9236  /*%%%*/
9237  (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node));
9238  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
9239  /*%
9240  $$ = method_arg(dispatch1(fcall, $1), $2);
9241  %*/
9242  }
9243  break;
9244 
9245  case 405:
9246 
9247 /* Line 1806 of yacc.c */
9248 #line 3639 "parse.y"
9249  {
9250  /*%%%*/
9251  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
9252  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
9253  /*%
9254  $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
9255  $$ = method_optarg($$, $4);
9256  %*/
9257  }
9258  break;
9259 
9260  case 406:
9261 
9262 /* Line 1806 of yacc.c */
9263 #line 3649 "parse.y"
9264  {
9265  /*%%%*/
9266  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
9267  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
9268  /*%
9269  $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
9270  $$ = method_optarg($$, $4);
9271  %*/
9272  }
9273  break;
9274 
9275  case 407:
9276 
9277 /* Line 1806 of yacc.c */
9278 #line 3659 "parse.y"
9279  {
9280  /*%%%*/
9281  (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0);
9282  /*%
9283  $$ = dispatch3(call, $1, ripper_intern("::"), $3);
9284  %*/
9285  }
9286  break;
9287 
9288  case 408:
9289 
9290 /* Line 1806 of yacc.c */
9291 #line 3667 "parse.y"
9292  {
9293  /*%%%*/
9294  (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node));
9295  fixpos((yyval.node), (yyvsp[(1) - (3)].node));
9296  /*%
9297  $$ = dispatch3(call, $1, ripper_id2sym('.'),
9298  ripper_intern("call"));
9299  $$ = method_optarg($$, $3);
9300  %*/
9301  }
9302  break;
9303 
9304  case 409:
9305 
9306 /* Line 1806 of yacc.c */
9307 #line 3678 "parse.y"
9308  {
9309  /*%%%*/
9310  (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node));
9311  fixpos((yyval.node), (yyvsp[(1) - (3)].node));
9312  /*%
9313  $$ = dispatch3(call, $1, ripper_intern("::"),
9314  ripper_intern("call"));
9315  $$ = method_optarg($$, $3);
9316  %*/
9317  }
9318  break;
9319 
9320  case 410:
9321 
9322 /* Line 1806 of yacc.c */
9323 #line 3689 "parse.y"
9324  {
9325  /*%%%*/
9326  (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node));
9327  /*%
9328  $$ = dispatch1(super, $2);
9329  %*/
9330  }
9331  break;
9332 
9333  case 411:
9334 
9335 /* Line 1806 of yacc.c */
9336 #line 3697 "parse.y"
9337  {
9338  /*%%%*/
9339  (yyval.node) = NEW_ZSUPER();
9340  /*%
9341  $$ = dispatch0(zsuper);
9342  %*/
9343  }
9344  break;
9345 
9346  case 412:
9347 
9348 /* Line 1806 of yacc.c */
9349 #line 3705 "parse.y"
9350  {
9351  /*%%%*/
9352  if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF)
9353  (yyval.node) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].node));
9354  else
9355  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), tAREF, (yyvsp[(3) - (4)].node));
9356  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
9357  /*%
9358  $$ = dispatch2(aref, $1, escape_Qundef($3));
9359  %*/
9360  }
9361  break;
9362 
9363  case 413:
9364 
9365 /* Line 1806 of yacc.c */
9366 #line 3719 "parse.y"
9367  {
9368  (yyvsp[(1) - (1)].vars) = dyna_push();
9369  /*%%%*/
9370  (yyval.num) = ruby_sourceline;
9371  /*%
9372  %*/
9373  }
9374  break;
9375 
9376  case 414:
9377 
9378 /* Line 1806 of yacc.c */
9379 #line 3728 "parse.y"
9380  {
9381  /*%%%*/
9382  (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node));
9383  nd_set_line((yyval.node), (yyvsp[(2) - (5)].num));
9384  /*%
9385  $$ = dispatch2(brace_block, escape_Qundef($3), $4);
9386  %*/
9387  dyna_pop((yyvsp[(1) - (5)].vars));
9388  }
9389  break;
9390 
9391  case 415:
9392 
9393 /* Line 1806 of yacc.c */
9394 #line 3738 "parse.y"
9395  {
9396  (yyvsp[(1) - (1)].vars) = dyna_push();
9397  /*%%%*/
9398  (yyval.num) = ruby_sourceline;
9399  /*%
9400  %*/
9401  }
9402  break;
9403 
9404  case 416:
9405 
9406 /* Line 1806 of yacc.c */
9407 #line 3747 "parse.y"
9408  {
9409  /*%%%*/
9410  (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node));
9411  nd_set_line((yyval.node), (yyvsp[(2) - (5)].num));
9412  /*%
9413  $$ = dispatch2(do_block, escape_Qundef($3), $4);
9414  %*/
9415  dyna_pop((yyvsp[(1) - (5)].vars));
9416  }
9417  break;
9418 
9419  case 417:
9420 
9421 /* Line 1806 of yacc.c */
9422 #line 3761 "parse.y"
9423  {
9424  /*%%%*/
9425  (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
9426  /*%
9427  $$ = dispatch3(when, $2, $4, escape_Qundef($5));
9428  %*/
9429  }
9430  break;
9431 
9432  case 420:
9433 
9434 /* Line 1806 of yacc.c */
9435 #line 3777 "parse.y"
9436  {
9437  /*%%%*/
9438  if ((yyvsp[(3) - (6)].node)) {
9439  (yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), NEW_ERRINFO());
9440  (yyvsp[(5) - (6)].node) = block_append((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node));
9441  }
9442  (yyval.node) = NEW_RESBODY((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node));
9443  fixpos((yyval.node), (yyvsp[(2) - (6)].node)?(yyvsp[(2) - (6)].node):(yyvsp[(5) - (6)].node));
9444  /*%
9445  $$ = dispatch4(rescue,
9446  escape_Qundef($2),
9447  escape_Qundef($3),
9448  escape_Qundef($5),
9449  escape_Qundef($6));
9450  %*/
9451  }
9452  break;
9453 
9454  case 422:
9455 
9456 /* Line 1806 of yacc.c */
9457 #line 3797 "parse.y"
9458  {
9459  /*%%%*/
9460  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
9461  /*%
9462  $$ = rb_ary_new3(1, $1);
9463  %*/
9464  }
9465  break;
9466 
9467  case 423:
9468 
9469 /* Line 1806 of yacc.c */
9470 #line 3805 "parse.y"
9471  {
9472  /*%%%*/
9473  if (!((yyval.node) = splat_array((yyvsp[(1) - (1)].node)))) (yyval.node) = (yyvsp[(1) - (1)].node);
9474  /*%
9475  $$ = $1;
9476  %*/
9477  }
9478  break;
9479 
9480  case 425:
9481 
9482 /* Line 1806 of yacc.c */
9483 #line 3816 "parse.y"
9484  {
9485  (yyval.node) = (yyvsp[(2) - (2)].node);
9486  }
9487  break;
9488 
9489  case 427:
9490 
9491 /* Line 1806 of yacc.c */
9492 #line 3823 "parse.y"
9493  {
9494  /*%%%*/
9495  (yyval.node) = (yyvsp[(2) - (2)].node);
9496  /*%
9497  $$ = dispatch1(ensure, $2);
9498  %*/
9499  }
9500  break;
9501 
9502  case 430:
9503 
9504 /* Line 1806 of yacc.c */
9505 #line 3835 "parse.y"
9506  {
9507  /*%%%*/
9508  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id)));
9509  /*%
9510  $$ = dispatch1(symbol_literal, $1);
9511  %*/
9512  }
9513  break;
9514 
9515  case 432:
9516 
9517 /* Line 1806 of yacc.c */
9518 #line 3846 "parse.y"
9519  {
9520  /*%%%*/
9521  NODE *node = (yyvsp[(1) - (1)].node);
9522  if (!node) {
9523  node = NEW_STR(STR_NEW0());
9524  }
9525  else {
9526  node = evstr2dstr(node);
9527  }
9528  (yyval.node) = node;
9529  /*%
9530  $$ = $1;
9531  %*/
9532  }
9533  break;
9534 
9535  case 435:
9536 
9537 /* Line 1806 of yacc.c */
9538 #line 3865 "parse.y"
9539  {
9540  /*%%%*/
9541  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
9542  /*%
9543  $$ = dispatch2(string_concat, $1, $2);
9544  %*/
9545  }
9546  break;
9547 
9548  case 436:
9549 
9550 /* Line 1806 of yacc.c */
9551 #line 3875 "parse.y"
9552  {
9553  /*%%%*/
9554  (yyval.node) = (yyvsp[(2) - (3)].node);
9555  /*%
9556  $$ = dispatch1(string_literal, $2);
9557  %*/
9558  }
9559  break;
9560 
9561  case 437:
9562 
9563 /* Line 1806 of yacc.c */
9564 #line 3885 "parse.y"
9565  {
9566  /*%%%*/
9567  NODE *node = (yyvsp[(2) - (3)].node);
9568  if (!node) {
9569  node = NEW_XSTR(STR_NEW0());
9570  }
9571  else {
9572  switch (nd_type(node)) {
9573  case NODE_STR:
9574  nd_set_type(node, NODE_XSTR);
9575  break;
9576  case NODE_DSTR:
9577  nd_set_type(node, NODE_DXSTR);
9578  break;
9579  default:
9580  node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node));
9581  break;
9582  }
9583  }
9584  (yyval.node) = node;
9585  /*%
9586  $$ = dispatch1(xstring_literal, $2);
9587  %*/
9588  }
9589  break;
9590 
9591  case 438:
9592 
9593 /* Line 1806 of yacc.c */
9594 #line 3912 "parse.y"
9595  {
9596  /*%%%*/
9597  int options = (yyvsp[(3) - (3)].num);
9598  NODE *node = (yyvsp[(2) - (3)].node);
9599  NODE *list, *prev;
9600  if (!node) {
9601  node = NEW_LIT(reg_compile(STR_NEW0(), options));
9602  }
9603  else switch (nd_type(node)) {
9604  case NODE_STR:
9605  {
9606  VALUE src = node->nd_lit;
9607  nd_set_type(node, NODE_LIT);
9608  node->nd_lit = reg_compile(src, options);
9609  }
9610  break;
9611  default:
9612  node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node));
9613  case NODE_DSTR:
9614  if (options & RE_OPTION_ONCE) {
9616  }
9617  else {
9618  nd_set_type(node, NODE_DREGX);
9619  }
9620  node->nd_cflag = options & RE_OPTION_MASK;
9621  if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options);
9622  for (list = (prev = node)->nd_next; list; list = list->nd_next) {
9623  if (nd_type(list->nd_head) == NODE_STR) {
9624  VALUE tail = list->nd_head->nd_lit;
9625  if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) {
9626  VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
9627  if (!literal_concat0(parser, lit, tail)) {
9628  node = 0;
9629  break;
9630  }
9631  rb_str_resize(tail, 0);
9632  prev->nd_next = list->nd_next;
9633  rb_gc_force_recycle((VALUE)list->nd_head);
9634  rb_gc_force_recycle((VALUE)list);
9635  list = prev;
9636  }
9637  else {
9638  prev = list;
9639  }
9640  }
9641  else {
9642  prev = 0;
9643  }
9644  }
9645  if (!node->nd_next) {
9646  VALUE src = node->nd_lit;
9647  nd_set_type(node, NODE_LIT);
9648  node->nd_lit = reg_compile(src, options);
9649  }
9650  break;
9651  }
9652  (yyval.node) = node;
9653  /*%
9654  $$ = dispatch2(regexp_literal, $2, $3);
9655  %*/
9656  }
9657  break;
9658 
9659  case 439:
9660 
9661 /* Line 1806 of yacc.c */
9662 #line 3977 "parse.y"
9663  {
9664  /*%%%*/
9665  (yyval.node) = NEW_ZARRAY();
9666  /*%
9667  $$ = dispatch0(words_new);
9668  $$ = dispatch1(array, $$);
9669  %*/
9670  }
9671  break;
9672 
9673  case 440:
9674 
9675 /* Line 1806 of yacc.c */
9676 #line 3986 "parse.y"
9677  {
9678  /*%%%*/
9679  (yyval.node) = (yyvsp[(2) - (3)].node);
9680  /*%
9681  $$ = dispatch1(array, $2);
9682  %*/
9683  }
9684  break;
9685 
9686  case 441:
9687 
9688 /* Line 1806 of yacc.c */
9689 #line 3996 "parse.y"
9690  {
9691  /*%%%*/
9692  (yyval.node) = 0;
9693  /*%
9694  $$ = dispatch0(words_new);
9695  %*/
9696  }
9697  break;
9698 
9699  case 442:
9700 
9701 /* Line 1806 of yacc.c */
9702 #line 4004 "parse.y"
9703  {
9704  /*%%%*/
9705  (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node)));
9706  /*%
9707  $$ = dispatch2(words_add, $1, $2);
9708  %*/
9709  }
9710  break;
9711 
9712  case 444:
9713 
9714 /* Line 1806 of yacc.c */
9715 #line 4022 "parse.y"
9716  {
9717  /*%%%*/
9718  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
9719  /*%
9720  $$ = dispatch2(word_add, $1, $2);
9721  %*/
9722  }
9723  break;
9724 
9725  case 445:
9726 
9727 /* Line 1806 of yacc.c */
9728 #line 4032 "parse.y"
9729  {
9730  /*%%%*/
9731  (yyval.node) = NEW_ZARRAY();
9732  /*%
9733  $$ = dispatch0(qwords_new);
9734  $$ = dispatch1(array, $$);
9735  %*/
9736  }
9737  break;
9738 
9739  case 446:
9740 
9741 /* Line 1806 of yacc.c */
9742 #line 4041 "parse.y"
9743  {
9744  /*%%%*/
9745  (yyval.node) = (yyvsp[(2) - (3)].node);
9746  /*%
9747  $$ = dispatch1(array, $2);
9748  %*/
9749  }
9750  break;
9751 
9752  case 447:
9753 
9754 /* Line 1806 of yacc.c */
9755 #line 4051 "parse.y"
9756  {
9757  /*%%%*/
9758  (yyval.node) = 0;
9759  /*%
9760  $$ = dispatch0(qwords_new);
9761  %*/
9762  }
9763  break;
9764 
9765  case 448:
9766 
9767 /* Line 1806 of yacc.c */
9768 #line 4059 "parse.y"
9769  {
9770  /*%%%*/
9771  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node));
9772  /*%
9773  $$ = dispatch2(qwords_add, $1, $2);
9774  %*/
9775  }
9776  break;
9777 
9778  case 449:
9779 
9780 /* Line 1806 of yacc.c */
9781 #line 4069 "parse.y"
9782  {
9783  /*%%%*/
9784  (yyval.node) = 0;
9785  /*%
9786  $$ = dispatch0(string_content);
9787  %*/
9788  }
9789  break;
9790 
9791  case 450:
9792 
9793 /* Line 1806 of yacc.c */
9794 #line 4077 "parse.y"
9795  {
9796  /*%%%*/
9797  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
9798  /*%
9799  $$ = dispatch2(string_add, $1, $2);
9800  %*/
9801  }
9802  break;
9803 
9804  case 451:
9805 
9806 /* Line 1806 of yacc.c */
9807 #line 4087 "parse.y"
9808  {
9809  /*%%%*/
9810  (yyval.node) = 0;
9811  /*%
9812  $$ = dispatch0(xstring_new);
9813  %*/
9814  }
9815  break;
9816 
9817  case 452:
9818 
9819 /* Line 1806 of yacc.c */
9820 #line 4095 "parse.y"
9821  {
9822  /*%%%*/
9823  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
9824  /*%
9825  $$ = dispatch2(xstring_add, $1, $2);
9826  %*/
9827  }
9828  break;
9829 
9830  case 453:
9831 
9832 /* Line 1806 of yacc.c */
9833 #line 4105 "parse.y"
9834  {
9835  /*%%%*/
9836  (yyval.node) = 0;
9837  /*%
9838  $$ = dispatch0(regexp_new);
9839  %*/
9840  }
9841  break;
9842 
9843  case 454:
9844 
9845 /* Line 1806 of yacc.c */
9846 #line 4113 "parse.y"
9847  {
9848  /*%%%*/
9849  NODE *head = (yyvsp[(1) - (2)].node), *tail = (yyvsp[(2) - (2)].node);
9850  if (!head) {
9851  (yyval.node) = tail;
9852  }
9853  else if (!tail) {
9854  (yyval.node) = head;
9855  }
9856  else {
9857  switch (nd_type(head)) {
9858  case NODE_STR:
9859  nd_set_type(head, NODE_DSTR);
9860  break;
9861  case NODE_DSTR:
9862  break;
9863  default:
9864  head = list_append(NEW_DSTR(Qnil), head);
9865  break;
9866  }
9867  (yyval.node) = list_append(head, tail);
9868  }
9869  /*%
9870  $$ = dispatch2(regexp_add, $1, $2);
9871  %*/
9872  }
9873  break;
9874 
9875  case 456:
9876 
9877 /* Line 1806 of yacc.c */
9878 #line 4143 "parse.y"
9879  {
9880  (yyval.node) = lex_strterm;
9881  lex_strterm = 0;
9882  lex_state = EXPR_BEG;
9883  }
9884  break;
9885 
9886  case 457:
9887 
9888 /* Line 1806 of yacc.c */
9889 #line 4149 "parse.y"
9890  {
9891  /*%%%*/
9892  lex_strterm = (yyvsp[(2) - (3)].node);
9893  (yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node));
9894  /*%
9895  lex_strterm = $<node>2;
9896  $$ = dispatch1(string_dvar, $3);
9897  %*/
9898  }
9899  break;
9900 
9901  case 458:
9902 
9903 /* Line 1806 of yacc.c */
9904 #line 4159 "parse.y"
9905  {
9906  (yyvsp[(1) - (1)].val) = cond_stack;
9907  (yyval.val) = cmdarg_stack;
9908  cond_stack = 0;
9909  cmdarg_stack = 0;
9910  }
9911  break;
9912 
9913  case 459:
9914 
9915 /* Line 1806 of yacc.c */
9916 #line 4165 "parse.y"
9917  {
9918  (yyval.node) = lex_strterm;
9919  lex_strterm = 0;
9920  lex_state = EXPR_BEG;
9921  }
9922  break;
9923 
9924  case 460:
9925 
9926 /* Line 1806 of yacc.c */
9927 #line 4171 "parse.y"
9928  {
9929  cond_stack = (yyvsp[(1) - (5)].val);
9930  cmdarg_stack = (yyvsp[(2) - (5)].val);
9931  lex_strterm = (yyvsp[(3) - (5)].node);
9932  /*%%%*/
9933  if ((yyvsp[(4) - (5)].node)) (yyvsp[(4) - (5)].node)->flags &= ~NODE_FL_NEWLINE;
9934  (yyval.node) = new_evstr((yyvsp[(4) - (5)].node));
9935  /*%
9936  $$ = dispatch1(string_embexpr, $4);
9937  %*/
9938  }
9939  break;
9940 
9941  case 461:
9942 
9943 /* Line 1806 of yacc.c */
9944 #line 4185 "parse.y"
9945  {
9946  /*%%%*/
9947  (yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id));
9948  /*%
9949  $$ = dispatch1(var_ref, $1);
9950  %*/
9951  }
9952  break;
9953 
9954  case 462:
9955 
9956 /* Line 1806 of yacc.c */
9957 #line 4193 "parse.y"
9958  {
9959  /*%%%*/
9960  (yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id));
9961  /*%
9962  $$ = dispatch1(var_ref, $1);
9963  %*/
9964  }
9965  break;
9966 
9967  case 463:
9968 
9969 /* Line 1806 of yacc.c */
9970 #line 4201 "parse.y"
9971  {
9972  /*%%%*/
9973  (yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id));
9974  /*%
9975  $$ = dispatch1(var_ref, $1);
9976  %*/
9977  }
9978  break;
9979 
9980  case 465:
9981 
9982 /* Line 1806 of yacc.c */
9983 #line 4212 "parse.y"
9984  {
9985  lex_state = EXPR_END;
9986  /*%%%*/
9987  (yyval.id) = (yyvsp[(2) - (2)].id);
9988  /*%
9989  $$ = dispatch1(symbol, $2);
9990  %*/
9991  }
9992  break;
9993 
9994  case 470:
9995 
9996 /* Line 1806 of yacc.c */
9997 #line 4229 "parse.y"
9998  {
9999  lex_state = EXPR_END;
10000  /*%%%*/
10001  if (!((yyval.node) = (yyvsp[(2) - (3)].node))) {
10002  (yyval.node) = NEW_LIT(ID2SYM(rb_intern("")));
10003  }
10004  else {
10005  VALUE lit;
10006 
10007  switch (nd_type((yyval.node))) {
10008  case NODE_DSTR:
10009  nd_set_type((yyval.node), NODE_DSYM);
10010  break;
10011  case NODE_STR:
10012  lit = (yyval.node)->nd_lit;
10013  (yyval.node)->nd_lit = ID2SYM(rb_intern_str(lit));
10014  nd_set_type((yyval.node), NODE_LIT);
10015  break;
10016  default:
10017  (yyval.node) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.node)));
10018  break;
10019  }
10020  }
10021  /*%
10022  $$ = dispatch1(dyna_symbol, $2);
10023  %*/
10024  }
10025  break;
10026 
10027  case 473:
10028 
10029 /* Line 1806 of yacc.c */
10030 #line 4261 "parse.y"
10031  {
10032  /*%%%*/
10033  (yyval.node) = negate_lit((yyvsp[(2) - (2)].node));
10034  /*%
10035  $$ = dispatch2(unary, ripper_intern("-@"), $2);
10036  %*/
10037  }
10038  break;
10039 
10040  case 474:
10041 
10042 /* Line 1806 of yacc.c */
10043 #line 4269 "parse.y"
10044  {
10045  /*%%%*/
10046  (yyval.node) = negate_lit((yyvsp[(2) - (2)].node));
10047  /*%
10048  $$ = dispatch2(unary, ripper_intern("-@"), $2);
10049  %*/
10050  }
10051  break;
10052 
10053  case 480:
10054 
10055 /* Line 1806 of yacc.c */
10056 #line 4285 "parse.y"
10057  {ifndef_ripper((yyval.id) = keyword_nil);}
10058  break;
10059 
10060  case 481:
10061 
10062 /* Line 1806 of yacc.c */
10063 #line 4286 "parse.y"
10064  {ifndef_ripper((yyval.id) = keyword_self);}
10065  break;
10066 
10067  case 482:
10068 
10069 /* Line 1806 of yacc.c */
10070 #line 4287 "parse.y"
10071  {ifndef_ripper((yyval.id) = keyword_true);}
10072  break;
10073 
10074  case 483:
10075 
10076 /* Line 1806 of yacc.c */
10077 #line 4288 "parse.y"
10078  {ifndef_ripper((yyval.id) = keyword_false);}
10079  break;
10080 
10081  case 484:
10082 
10083 /* Line 1806 of yacc.c */
10084 #line 4289 "parse.y"
10085  {ifndef_ripper((yyval.id) = keyword__FILE__);}
10086  break;
10087 
10088  case 485:
10089 
10090 /* Line 1806 of yacc.c */
10091 #line 4290 "parse.y"
10092  {ifndef_ripper((yyval.id) = keyword__LINE__);}
10093  break;
10094 
10095  case 486:
10096 
10097 /* Line 1806 of yacc.c */
10098 #line 4291 "parse.y"
10099  {ifndef_ripper((yyval.id) = keyword__ENCODING__);}
10100  break;
10101 
10102  case 487:
10103 
10104 /* Line 1806 of yacc.c */
10105 #line 4295 "parse.y"
10106  {
10107  /*%%%*/
10108  if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0);
10109  /*%
10110  if (id_is_var(get_id($1))) {
10111  $$ = dispatch1(var_ref, $1);
10112  }
10113  else {
10114  $$ = dispatch1(vcall, $1);
10115  }
10116  %*/
10117  }
10118  break;
10119 
10120  case 488:
10121 
10122 /* Line 1806 of yacc.c */
10123 #line 4308 "parse.y"
10124  {
10125  /*%%%*/
10126  if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0);
10127  /*%
10128  $$ = dispatch1(var_ref, $1);
10129  %*/
10130  }
10131  break;
10132 
10133  case 489:
10134 
10135 /* Line 1806 of yacc.c */
10136 #line 4318 "parse.y"
10137  {
10138  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
10139  /*%%%*/
10140  /*%
10141  $$ = dispatch1(var_field, $$);
10142  %*/
10143  }
10144  break;
10145 
10146  case 490:
10147 
10148 /* Line 1806 of yacc.c */
10149 #line 4326 "parse.y"
10150  {
10151  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
10152  /*%%%*/
10153  /*%
10154  $$ = dispatch1(var_field, $$);
10155  %*/
10156  }
10157  break;
10158 
10159  case 493:
10160 
10161 /* Line 1806 of yacc.c */
10162 #line 4340 "parse.y"
10163  {
10164  /*%%%*/
10165  (yyval.node) = 0;
10166  /*%
10167  $$ = Qnil;
10168  %*/
10169  }
10170  break;
10171 
10172  case 494:
10173 
10174 /* Line 1806 of yacc.c */
10175 #line 4348 "parse.y"
10176  {
10177  lex_state = EXPR_BEG;
10178  }
10179  break;
10180 
10181  case 495:
10182 
10183 /* Line 1806 of yacc.c */
10184 #line 4352 "parse.y"
10185  {
10186  (yyval.node) = (yyvsp[(3) - (4)].node);
10187  }
10188  break;
10189 
10190  case 496:
10191 
10192 /* Line 1806 of yacc.c */
10193 #line 4356 "parse.y"
10194  {
10195  /*%%%*/
10196  yyerrok;
10197  (yyval.node) = 0;
10198  /*%
10199  yyerrok;
10200  $$ = Qnil;
10201  %*/
10202  }
10203  break;
10204 
10205  case 497:
10206 
10207 /* Line 1806 of yacc.c */
10208 #line 4368 "parse.y"
10209  {
10210  /*%%%*/
10211  (yyval.node) = (yyvsp[(2) - (3)].node);
10212  /*%
10213  $$ = dispatch1(paren, $2);
10214  %*/
10215  lex_state = EXPR_BEG;
10216  command_start = TRUE;
10217  }
10218  break;
10219 
10220  case 498:
10221 
10222 /* Line 1806 of yacc.c */
10223 #line 4378 "parse.y"
10224  {
10225  (yyval.node) = (yyvsp[(1) - (2)].node);
10226  lex_state = EXPR_BEG;
10227  command_start = TRUE;
10228  }
10229  break;
10230 
10231  case 499:
10232 
10233 /* Line 1806 of yacc.c */
10234 #line 4386 "parse.y"
10235  {
10236  /*%%%*/
10237  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id));
10238  /*%
10239  $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6));
10240  %*/
10241  }
10242  break;
10243 
10244  case 500:
10245 
10246 /* Line 1806 of yacc.c */
10247 #line 4394 "parse.y"
10248  {
10249  /*%%%*/
10250  (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id));
10251  /*%
10252  $$ = params_new($1, $3, $5, $7, escape_Qundef($8));
10253  %*/
10254  }
10255  break;
10256 
10257  case 501:
10258 
10259 /* Line 1806 of yacc.c */
10260 #line 4402 "parse.y"
10261  {
10262  /*%%%*/
10263  (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id));
10264  /*%
10265  $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4));
10266  %*/
10267  }
10268  break;
10269 
10270  case 502:
10271 
10272 /* Line 1806 of yacc.c */
10273 #line 4410 "parse.y"
10274  {
10275  /*%%%*/
10276  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
10277  /*%
10278  $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6));
10279  %*/
10280  }
10281  break;
10282 
10283  case 503:
10284 
10285 /* Line 1806 of yacc.c */
10286 #line 4418 "parse.y"
10287  {
10288  /*%%%*/
10289  (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id));
10290  /*%
10291  $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4));
10292  %*/
10293  }
10294  break;
10295 
10296  case 504:
10297 
10298 /* Line 1806 of yacc.c */
10299 #line 4426 "parse.y"
10300  {
10301  /*%%%*/
10302  (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
10303  /*%
10304  $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6));
10305  %*/
10306  }
10307  break;
10308 
10309  case 505:
10310 
10311 /* Line 1806 of yacc.c */
10312 #line 4434 "parse.y"
10313  {
10314  /*%%%*/
10315  (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id));
10316  /*%
10317  $$ = params_new($1, Qnil, Qnil, Qnil,escape_Qundef($2));
10318  %*/
10319  }
10320  break;
10321 
10322  case 506:
10323 
10324 /* Line 1806 of yacc.c */
10325 #line 4442 "parse.y"
10326  {
10327  /*%%%*/
10328  (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id));
10329  /*%
10330  $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4));
10331  %*/
10332  }
10333  break;
10334 
10335  case 507:
10336 
10337 /* Line 1806 of yacc.c */
10338 #line 4450 "parse.y"
10339  {
10340  /*%%%*/
10341  (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
10342  /*%
10343  $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6));
10344  %*/
10345  }
10346  break;
10347 
10348  case 508:
10349 
10350 /* Line 1806 of yacc.c */
10351 #line 4458 "parse.y"
10352  {
10353  /*%%%*/
10354  (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id));
10355  /*%
10356  $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2));
10357  %*/
10358  }
10359  break;
10360 
10361  case 509:
10362 
10363 /* Line 1806 of yacc.c */
10364 #line 4466 "parse.y"
10365  {
10366  /*%%%*/
10367  (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id));
10368  /*%
10369  $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4));
10370  %*/
10371  }
10372  break;
10373 
10374  case 510:
10375 
10376 /* Line 1806 of yacc.c */
10377 #line 4474 "parse.y"
10378  {
10379  /*%%%*/
10380  (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id));
10381  /*%
10382  $$ = params_new(Qnil, Qnil, $1, Qnil,escape_Qundef($2));
10383  %*/
10384  }
10385  break;
10386 
10387  case 511:
10388 
10389 /* Line 1806 of yacc.c */
10390 #line 4482 "parse.y"
10391  {
10392  /*%%%*/
10393  (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id));
10394  /*%
10395  $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4));
10396  %*/
10397  }
10398  break;
10399 
10400  case 512:
10401 
10402 /* Line 1806 of yacc.c */
10403 #line 4490 "parse.y"
10404  {
10405  /*%%%*/
10406  (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id));
10407  /*%
10408  $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1);
10409  %*/
10410  }
10411  break;
10412 
10413  case 513:
10414 
10415 /* Line 1806 of yacc.c */
10416 #line 4498 "parse.y"
10417  {
10418  /*%%%*/
10419  (yyval.node) = new_args(0, 0, 0, 0, 0);
10420  /*%
10421  $$ = params_new(Qnil, Qnil, Qnil, Qnil, Qnil);
10422  %*/
10423  }
10424  break;
10425 
10426  case 514:
10427 
10428 /* Line 1806 of yacc.c */
10429 #line 4508 "parse.y"
10430  {
10431  /*%%%*/
10432  yyerror("formal argument cannot be a constant");
10433  (yyval.id) = 0;
10434  /*%
10435  $$ = dispatch1(param_error, $1);
10436  %*/
10437  }
10438  break;
10439 
10440  case 515:
10441 
10442 /* Line 1806 of yacc.c */
10443 #line 4517 "parse.y"
10444  {
10445  /*%%%*/
10446  yyerror("formal argument cannot be an instance variable");
10447  (yyval.id) = 0;
10448  /*%
10449  $$ = dispatch1(param_error, $1);
10450  %*/
10451  }
10452  break;
10453 
10454  case 516:
10455 
10456 /* Line 1806 of yacc.c */
10457 #line 4526 "parse.y"
10458  {
10459  /*%%%*/
10460  yyerror("formal argument cannot be a global variable");
10461  (yyval.id) = 0;
10462  /*%
10463  $$ = dispatch1(param_error, $1);
10464  %*/
10465  }
10466  break;
10467 
10468  case 517:
10469 
10470 /* Line 1806 of yacc.c */
10471 #line 4535 "parse.y"
10472  {
10473  /*%%%*/
10474  yyerror("formal argument cannot be a class variable");
10475  (yyval.id) = 0;
10476  /*%
10477  $$ = dispatch1(param_error, $1);
10478  %*/
10479  }
10480  break;
10481 
10482  case 519:
10483 
10484 /* Line 1806 of yacc.c */
10485 #line 4547 "parse.y"
10486  {
10487  formal_argument(get_id((yyvsp[(1) - (1)].id)));
10488  (yyval.id) = (yyvsp[(1) - (1)].id);
10489  }
10490  break;
10491 
10492  case 520:
10493 
10494 /* Line 1806 of yacc.c */
10495 #line 4554 "parse.y"
10496  {
10497  arg_var(get_id((yyvsp[(1) - (1)].id)));
10498  /*%%%*/
10499  (yyval.node) = NEW_ARGS_AUX((yyvsp[(1) - (1)].id), 1);
10500  /*%
10501  $$ = get_value($1);
10502  %*/
10503  }
10504  break;
10505 
10506  case 521:
10507 
10508 /* Line 1806 of yacc.c */
10509 #line 4563 "parse.y"
10510  {
10511  ID tid = internal_id();
10512  arg_var(tid);
10513  /*%%%*/
10514  if (dyna_in_block()) {
10515  (yyvsp[(2) - (3)].node)->nd_value = NEW_DVAR(tid);
10516  }
10517  else {
10518  (yyvsp[(2) - (3)].node)->nd_value = NEW_LVAR(tid);
10519  }
10520  (yyval.node) = NEW_ARGS_AUX(tid, 1);
10521  (yyval.node)->nd_next = (yyvsp[(2) - (3)].node);
10522  /*%
10523  $$ = dispatch1(mlhs_paren, $2);
10524  %*/
10525  }
10526  break;
10527 
10528  case 523:
10529 
10530 /* Line 1806 of yacc.c */
10531 #line 4589 "parse.y"
10532  {
10533  /*%%%*/
10534  (yyval.node) = (yyvsp[(1) - (3)].node);
10535  (yyval.node)->nd_plen++;
10536  (yyval.node)->nd_next = block_append((yyval.node)->nd_next, (yyvsp[(3) - (3)].node)->nd_next);
10537  rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].node));
10538  /*%
10539  $$ = rb_ary_push($1, $3);
10540  %*/
10541  }
10542  break;
10543 
10544  case 524:
10545 
10546 /* Line 1806 of yacc.c */
10547 #line 4602 "parse.y"
10548  {
10549  arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id))));
10550  (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node));
10551  /*%%%*/
10552  (yyval.node) = NEW_OPT_ARG(0, (yyval.node));
10553  /*%
10554  $$ = rb_assoc_new($$, $3);
10555  %*/
10556  }
10557  break;
10558 
10559  case 525:
10560 
10561 /* Line 1806 of yacc.c */
10562 #line 4614 "parse.y"
10563  {
10564  arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id))));
10565  (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node));
10566  /*%%%*/
10567  (yyval.node) = NEW_OPT_ARG(0, (yyval.node));
10568  /*%
10569  $$ = rb_assoc_new($$, $3);
10570  %*/
10571  }
10572  break;
10573 
10574  case 526:
10575 
10576 /* Line 1806 of yacc.c */
10577 #line 4626 "parse.y"
10578  {
10579  /*%%%*/
10580  (yyval.node) = (yyvsp[(1) - (1)].node);
10581  /*%
10582  $$ = rb_ary_new3(1, $1);
10583  %*/
10584  }
10585  break;
10586 
10587  case 527:
10588 
10589 /* Line 1806 of yacc.c */
10590 #line 4634 "parse.y"
10591  {
10592  /*%%%*/
10593  NODE *opts = (yyvsp[(1) - (3)].node);
10594 
10595  while (opts->nd_next) {
10596  opts = opts->nd_next;
10597  }
10598  opts->nd_next = (yyvsp[(3) - (3)].node);
10599  (yyval.node) = (yyvsp[(1) - (3)].node);
10600  /*%
10601  $$ = rb_ary_push($1, $3);
10602  %*/
10603  }
10604  break;
10605 
10606  case 528:
10607 
10608 /* Line 1806 of yacc.c */
10609 #line 4650 "parse.y"
10610  {
10611  /*%%%*/
10612  (yyval.node) = (yyvsp[(1) - (1)].node);
10613  /*%
10614  $$ = rb_ary_new3(1, $1);
10615  %*/
10616  }
10617  break;
10618 
10619  case 529:
10620 
10621 /* Line 1806 of yacc.c */
10622 #line 4658 "parse.y"
10623  {
10624  /*%%%*/
10625  NODE *opts = (yyvsp[(1) - (3)].node);
10626 
10627  while (opts->nd_next) {
10628  opts = opts->nd_next;
10629  }
10630  opts->nd_next = (yyvsp[(3) - (3)].node);
10631  (yyval.node) = (yyvsp[(1) - (3)].node);
10632  /*%
10633  $$ = rb_ary_push($1, $3);
10634  %*/
10635  }
10636  break;
10637 
10638  case 532:
10639 
10640 /* Line 1806 of yacc.c */
10641 #line 4678 "parse.y"
10642  {
10643  /*%%%*/
10644  if (!is_local_id((yyvsp[(2) - (2)].id)))
10645  yyerror("rest argument must be local variable");
10646  /*% %*/
10647  arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id))));
10648  /*%%%*/
10649  (yyval.id) = (yyvsp[(2) - (2)].id);
10650  /*%
10651  $$ = dispatch1(rest_param, $2);
10652  %*/
10653  }
10654  break;
10655 
10656  case 533:
10657 
10658 /* Line 1806 of yacc.c */
10659 #line 4691 "parse.y"
10660  {
10661  /*%%%*/
10662  (yyval.id) = internal_id();
10663  arg_var((yyval.id));
10664  /*%
10665  $$ = dispatch1(rest_param, Qnil);
10666  %*/
10667  }
10668  break;
10669 
10670  case 536:
10671 
10672 /* Line 1806 of yacc.c */
10673 #line 4706 "parse.y"
10674  {
10675  /*%%%*/
10676  if (!is_local_id((yyvsp[(2) - (2)].id)))
10677  yyerror("block argument must be local variable");
10678  else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].id)))
10679  yyerror("duplicated block argument name");
10680  /*% %*/
10681  arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id))));
10682  /*%%%*/
10683  (yyval.id) = (yyvsp[(2) - (2)].id);
10684  /*%
10685  $$ = dispatch1(blockarg, $2);
10686  %*/
10687  }
10688  break;
10689 
10690  case 537:
10691 
10692 /* Line 1806 of yacc.c */
10693 #line 4723 "parse.y"
10694  {
10695  (yyval.id) = (yyvsp[(2) - (2)].id);
10696  }
10697  break;
10698 
10699  case 538:
10700 
10701 /* Line 1806 of yacc.c */
10702 #line 4727 "parse.y"
10703  {
10704  /*%%%*/
10705  (yyval.id) = 0;
10706  /*%
10707  $$ = Qundef;
10708  %*/
10709  }
10710  break;
10711 
10712  case 539:
10713 
10714 /* Line 1806 of yacc.c */
10715 #line 4737 "parse.y"
10716  {
10717  /*%%%*/
10718  value_expr((yyvsp[(1) - (1)].node));
10719  (yyval.node) = (yyvsp[(1) - (1)].node);
10720  if (!(yyval.node)) (yyval.node) = NEW_NIL();
10721  /*%
10722  $$ = $1;
10723  %*/
10724  }
10725  break;
10726 
10727  case 540:
10728 
10729 /* Line 1806 of yacc.c */
10730 #line 4746 "parse.y"
10731  {lex_state = EXPR_BEG;}
10732  break;
10733 
10734  case 541:
10735 
10736 /* Line 1806 of yacc.c */
10737 #line 4747 "parse.y"
10738  {
10739  /*%%%*/
10740  if ((yyvsp[(3) - (4)].node) == 0) {
10741  yyerror("can't define singleton method for ().");
10742  }
10743  else {
10744  switch (nd_type((yyvsp[(3) - (4)].node))) {
10745  case NODE_STR:
10746  case NODE_DSTR:
10747  case NODE_XSTR:
10748  case NODE_DXSTR:
10749  case NODE_DREGX:
10750  case NODE_LIT:
10751  case NODE_ARRAY:
10752  case NODE_ZARRAY:
10753  yyerror("can't define singleton method for literals");
10754  default:
10755  value_expr((yyvsp[(3) - (4)].node));
10756  break;
10757  }
10758  }
10759  (yyval.node) = (yyvsp[(3) - (4)].node);
10760  /*%
10761  $$ = dispatch1(paren, $3);
10762  %*/
10763  }
10764  break;
10765 
10766  case 543:
10767 
10768 /* Line 1806 of yacc.c */
10769 #line 4777 "parse.y"
10770  {
10771  /*%%%*/
10772  (yyval.node) = (yyvsp[(1) - (2)].node);
10773  /*%
10774  $$ = dispatch1(assoclist_from_args, $1);
10775  %*/
10776  }
10777  break;
10778 
10779  case 545:
10780 
10781 /* Line 1806 of yacc.c */
10782 #line 4794 "parse.y"
10783  {
10784  /*%%%*/
10785  (yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
10786  /*%
10787  $$ = rb_ary_push($1, $3);
10788  %*/
10789  }
10790  break;
10791 
10792  case 546:
10793 
10794 /* Line 1806 of yacc.c */
10795 #line 4804 "parse.y"
10796  {
10797  /*%%%*/
10798  (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node));
10799  /*%
10800  $$ = dispatch2(assoc_new, $1, $3);
10801  %*/
10802  }
10803  break;
10804 
10805  case 547:
10806 
10807 /* Line 1806 of yacc.c */
10808 #line 4812 "parse.y"
10809  {
10810  /*%%%*/
10811  (yyval.node) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].id)))), (yyvsp[(2) - (2)].node));
10812  /*%
10813  $$ = dispatch2(assoc_new, $1, $2);
10814  %*/
10815  }
10816  break;
10817 
10818  case 569:
10819 
10820 /* Line 1806 of yacc.c */
10821 #line 4868 "parse.y"
10822  {yyerrok;}
10823  break;
10824 
10825  case 572:
10826 
10827 /* Line 1806 of yacc.c */
10828 #line 4873 "parse.y"
10829  {yyerrok;}
10830  break;
10831 
10832  case 573:
10833 
10834 /* Line 1806 of yacc.c */
10835 #line 4877 "parse.y"
10836  {
10837  /*%%%*/
10838  (yyval.node) = 0;
10839  /*%
10840  $$ = Qundef;
10841  %*/
10842  }
10843  break;
10844 
10845 
10846 
10847 /* Line 1806 of yacc.c */
10848 #line 10847 "parse.c"
10849  default: break;
10850  }
10851  /* User semantic actions sometimes alter yychar, and that requires
10852  that yytoken be updated with the new translation. We take the
10853  approach of translating immediately before every use of yytoken.
10854  One alternative is translating here after every semantic action,
10855  but that translation would be missed if the semantic action invokes
10856  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
10857  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
10858  incorrect destructor might then be invoked immediately. In the
10859  case of YYERROR or YYBACKUP, subsequent parser actions might lead
10860  to an incorrect destructor call or verbose syntax error message
10861  before the lookahead is translated. */
10862  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
10863 
10864  YYPOPSTACK (yylen);
10865  yylen = 0;
10866  YY_STACK_PRINT (yyss, yyssp);
10867 
10868  *++yyvsp = yyval;
10869 
10870  /* Now `shift' the result of the reduction. Determine what state
10871  that goes to, based on the state we popped back to and the rule
10872  number reduced by. */
10873 
10874  yyn = yyr1[yyn];
10875 
10876  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
10877  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
10878  yystate = yytable[yystate];
10879  else
10880  yystate = yydefgoto[yyn - YYNTOKENS];
10881 
10882  goto yynewstate;
10883 
10884 
10885 /*------------------------------------.
10886 | yyerrlab -- here on detecting error |
10887 `------------------------------------*/
10888 yyerrlab:
10889  /* Make sure we have latest lookahead translation. See comments at
10890  user semantic actions for why this is necessary. */
10891  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
10892 
10893  /* If not already recovering from an error, report this error. */
10894  if (!yyerrstatus)
10895  {
10896  ++yynerrs;
10897 #if ! YYERROR_VERBOSE
10898  parser_yyerror (parser, YY_("syntax error"));
10899 #else
10900 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
10901  yyssp, yytoken)
10902  {
10903  char const *yymsgp = YY_("syntax error");
10904  int yysyntax_error_status;
10905  yysyntax_error_status = YYSYNTAX_ERROR;
10906  if (yysyntax_error_status == 0)
10907  yymsgp = yymsg;
10908  else if (yysyntax_error_status == 1)
10909  {
10910  if (yymsg != yymsgbuf)
10911  YYSTACK_FREE (yymsg);
10912  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
10913  if (!yymsg)
10914  {
10915  yymsg = yymsgbuf;
10916  yymsg_alloc = sizeof yymsgbuf;
10917  yysyntax_error_status = 2;
10918  }
10919  else
10920  {
10921  yysyntax_error_status = YYSYNTAX_ERROR;
10922  yymsgp = yymsg;
10923  }
10924  }
10925  parser_yyerror (parser, yymsgp);
10926  if (yysyntax_error_status == 2)
10927  goto yyexhaustedlab;
10928  }
10929 # undef YYSYNTAX_ERROR
10930 #endif
10931  }
10932 
10933 
10934 
10935  if (yyerrstatus == 3)
10936  {
10937  /* If just tried and failed to reuse lookahead token after an
10938  error, discard it. */
10939 
10940  if (yychar <= YYEOF)
10941  {
10942  /* Return failure if at end of input. */
10943  if (yychar == YYEOF)
10944  YYABORT;
10945  }
10946  else
10947  {
10948  yydestruct ("Error: discarding",
10949  yytoken, &yylval, parser);
10950  yychar = YYEMPTY;
10951  }
10952  }
10953 
10954  /* Else will try to reuse lookahead token after shifting the error
10955  token. */
10956  goto yyerrlab1;
10957 
10958 
10959 /*---------------------------------------------------.
10960 | yyerrorlab -- error raised explicitly by YYERROR. |
10961 `---------------------------------------------------*/
10962 yyerrorlab:
10963 
10964  /* Pacify compilers like GCC when the user code never invokes
10965  YYERROR and the label yyerrorlab therefore never appears in user
10966  code. */
10967  if (/*CONSTCOND*/ 0)
10968  goto yyerrorlab;
10969 
10970  /* Do not reclaim the symbols of the rule which action triggered
10971  this YYERROR. */
10972  YYPOPSTACK (yylen);
10973  yylen = 0;
10974  YY_STACK_PRINT (yyss, yyssp);
10975  yystate = *yyssp;
10976  goto yyerrlab1;
10977 
10978 
10979 /*-------------------------------------------------------------.
10980 | yyerrlab1 -- common code for both syntax error and YYERROR. |
10981 `-------------------------------------------------------------*/
10982 yyerrlab1:
10983  yyerrstatus = 3; /* Each real token shifted decrements this. */
10984 
10985  for (;;)
10986  {
10987  yyn = yypact[yystate];
10988  if (!yypact_value_is_default (yyn))
10989  {
10990  yyn += YYTERROR;
10991  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
10992  {
10993  yyn = yytable[yyn];
10994  if (0 < yyn)
10995  break;
10996  }
10997  }
10998 
10999  /* Pop the current state because it cannot handle the error token. */
11000  if (yyssp == yyss)
11001  YYABORT;
11002 
11003 
11004  yydestruct ("Error: popping",
11005  yystos[yystate], yyvsp, parser);
11006  YYPOPSTACK (1);
11007  yystate = *yyssp;
11008  YY_STACK_PRINT (yyss, yyssp);
11009  }
11010 
11011  *++yyvsp = yylval;
11012 
11013 
11014  /* Shift the error token. */
11015  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
11016 
11017  yystate = yyn;
11018  goto yynewstate;
11019 
11020 
11021 /*-------------------------------------.
11022 | yyacceptlab -- YYACCEPT comes here. |
11023 `-------------------------------------*/
11024 yyacceptlab:
11025  yyresult = 0;
11026  goto yyreturn;
11027 
11028 /*-----------------------------------.
11029 | yyabortlab -- YYABORT comes here. |
11030 `-----------------------------------*/
11031 yyabortlab:
11032  yyresult = 1;
11033  goto yyreturn;
11034 
11035 #if !defined(yyoverflow) || YYERROR_VERBOSE
11036 /*-------------------------------------------------.
11037 | yyexhaustedlab -- memory exhaustion comes here. |
11038 `-------------------------------------------------*/
11039 yyexhaustedlab:
11040  parser_yyerror (parser, YY_("memory exhausted"));
11041  yyresult = 2;
11042  /* Fall through. */
11043 #endif
11044 
11045 yyreturn:
11046  if (yychar != YYEMPTY)
11047  {
11048  /* Make sure we have latest lookahead translation. See comments at
11049  user semantic actions for why this is necessary. */
11050  yytoken = YYTRANSLATE (yychar);
11051  yydestruct ("Cleanup: discarding lookahead",
11052  yytoken, &yylval, parser);
11053  }
11054  /* Do not reclaim the symbols of the rule which action triggered
11055  this YYABORT or YYACCEPT. */
11056  YYPOPSTACK (yylen);
11057  YY_STACK_PRINT (yyss, yyssp);
11058  while (yyssp != yyss)
11059  {
11060  yydestruct ("Cleanup: popping",
11061  yystos[*yyssp], yyvsp, parser);
11062  YYPOPSTACK (1);
11063  }
11064 #ifndef yyoverflow
11065  if (yyss != yyssa)
11066  YYSTACK_FREE (yyss);
11067 #endif
11068 #if YYERROR_VERBOSE
11069  if (yymsg != yymsgbuf)
11070  YYSTACK_FREE (yymsg);
11071 #endif
11072  /* Make sure YYID is used. */
11073  return YYID (yyresult);
11074 }
11075 
11076 
11077 
11078 /* Line 2067 of yacc.c */
11079 #line 4885 "parse.y"
11080 
11081 # undef parser
11082 # undef yylex
11083 # undef yylval
11084 # define yylval (*((YYSTYPE*)(parser->parser_yylval)))
11085 
11086 static int parser_regx_options(struct parser_params*);
11087 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**);
11088 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc);
11089 static int parser_parse_string(struct parser_params*,NODE*);
11090 static int parser_here_document(struct parser_params*,NODE*);
11091 
11092 
11093 # define nextc() parser_nextc(parser)
11094 # define pushback(c) parser_pushback(parser, (c))
11095 # define newtok() parser_newtok(parser)
11096 # define tokspace(n) parser_tokspace(parser, (n))
11097 # define tokadd(c) parser_tokadd(parser, (c))
11098 # define tok_hex(numlen) parser_tok_hex(parser, (numlen))
11099 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e))
11100 # define tokadd_escape(e) parser_tokadd_escape(parser, (e))
11101 # define regx_options() parser_regx_options(parser)
11102 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e))
11103 # define parse_string(n) parser_parse_string(parser,(n))
11104 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc))
11105 # define here_document(n) parser_here_document(parser,(n))
11106 # define heredoc_identifier() parser_heredoc_identifier(parser)
11107 # define heredoc_restore(n) parser_heredoc_restore(parser,(n))
11108 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i))
11109 
11110 #ifndef RIPPER
11111 # define set_yylval_str(x) (yylval.node = NEW_STR(x))
11112 # define set_yylval_num(x) (yylval.num = (x))
11113 # define set_yylval_id(x) (yylval.id = (x))
11114 # define set_yylval_name(x) (yylval.id = (x))
11115 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x))
11116 # define set_yylval_node(x) (yylval.node = (x))
11117 # define yylval_id() (yylval.id)
11118 #else
11119 static inline VALUE
11120 ripper_yylval_id(ID x)
11121 {
11122  return (VALUE)NEW_LASGN(x, ID2SYM(x));
11123 }
11124 # define set_yylval_str(x) (void)(x)
11125 # define set_yylval_num(x) (void)(x)
11126 # define set_yylval_id(x) (void)(x)
11127 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x))
11128 # define set_yylval_literal(x) (void)(x)
11129 # define set_yylval_node(x) (void)(x)
11130 # define yylval_id() yylval.id
11131 #endif
11132 
11133 #ifndef RIPPER
11134 #define ripper_flush(p) (void)(p)
11135 #else
11136 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p)
11137 
11138 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
11139 
11140 static int
11141 ripper_has_scan_event(struct parser_params *parser)
11142 {
11143 
11144  if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
11145  return lex_p > parser->tokp;
11146 }
11147 
11148 static VALUE
11149 ripper_scan_event_val(struct parser_params *parser, int t)
11150 {
11151  VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp);
11152  VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str);
11153  ripper_flush(parser);
11154  return rval;
11155 }
11156 
11157 static void
11158 ripper_dispatch_scan_event(struct parser_params *parser, int t)
11159 {
11160  if (!ripper_has_scan_event(parser)) return;
11161  yylval_rval = ripper_scan_event_val(parser, t);
11162 }
11163 
11164 static void
11165 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t)
11166 {
11167  if (!ripper_has_scan_event(parser)) return;
11168  (void)ripper_scan_event_val(parser, t);
11169 }
11170 
11171 static void
11172 ripper_dispatch_delayed_token(struct parser_params *parser, int t)
11173 {
11174  int saved_line = ruby_sourceline;
11175  const char *saved_tokp = parser->tokp;
11176 
11177  ruby_sourceline = parser->delayed_line;
11178  parser->tokp = lex_pbeg + parser->delayed_col;
11179  yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
11180  parser->delayed = Qnil;
11181  ruby_sourceline = saved_line;
11182  parser->tokp = saved_tokp;
11183 }
11184 #endif /* RIPPER */
11185 
11186 #include "ruby/regex.h"
11187 #include "ruby/util.h"
11188 
11189 /* We remove any previous definition of `SIGN_EXTEND_CHAR',
11190  since ours (we hope) works properly with all combinations of
11191  machines, compilers, `char' and `unsigned char' argument types.
11192  (Per Bothner suggested the basic approach.) */
11193 #undef SIGN_EXTEND_CHAR
11194 #if __STDC__
11195 # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
11196 #else /* not __STDC__ */
11197 /* As in Harbison and Steele. */
11198 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
11199 #endif
11200 
11201 #define parser_encoding_name() (parser->enc->name)
11202 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc)
11203 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc)
11204 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))
11205 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc))
11206 
11207 #define parser_isascii() ISASCII(*(lex_p-1))
11208 
11209 #ifndef RIPPER
11210 static int
11211 token_info_get_column(struct parser_params *parser, const char *token)
11212 {
11213  int column = 1;
11214  const char *p, *pend = lex_p - strlen(token);
11215  for (p = lex_pbeg; p < pend; p++) {
11216  if (*p == '\t') {
11217  column = (((column - 1) / 8) + 1) * 8;
11218  }
11219  column++;
11220  }
11221  return column;
11222 }
11223 
11224 static int
11225 token_info_has_nonspaces(struct parser_params *parser, const char *token)
11226 {
11227  const char *p, *pend = lex_p - strlen(token);
11228  for (p = lex_pbeg; p < pend; p++) {
11229  if (*p != ' ' && *p != '\t') {
11230  return 1;
11231  }
11232  }
11233  return 0;
11234 }
11235 
11236 #undef token_info_push
11237 static void
11238 token_info_push(struct parser_params *parser, const char *token)
11239 {
11240  token_info *ptinfo;
11241 
11242  if (!parser->parser_token_info_enabled) return;
11243  ptinfo = ALLOC(token_info);
11244  ptinfo->token = token;
11245  ptinfo->linenum = ruby_sourceline;
11246  ptinfo->column = token_info_get_column(parser, token);
11247  ptinfo->nonspc = token_info_has_nonspaces(parser, token);
11248  ptinfo->next = parser->parser_token_info;
11249 
11250  parser->parser_token_info = ptinfo;
11251 }
11252 
11253 #undef token_info_pop
11254 static void
11255 token_info_pop(struct parser_params *parser, const char *token)
11256 {
11257  int linenum;
11258  token_info *ptinfo = parser->parser_token_info;
11259 
11260  if (!ptinfo) return;
11261  parser->parser_token_info = ptinfo->next;
11262  if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */
11263  goto finish;
11264  }
11265  linenum = ruby_sourceline;
11266  if (linenum == ptinfo->linenum) { /* SKIP */
11267  goto finish;
11268  }
11269  if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */
11270  goto finish;
11271  }
11272  if (parser->parser_token_info_enabled) {
11274  "mismatched indentations at '%s' with '%s' at %d",
11275  token, ptinfo->token, ptinfo->linenum);
11276  }
11277 
11278  finish:
11279  xfree(ptinfo);
11280 }
11281 #endif /* RIPPER */
11282 
11283 static int
11284 parser_yyerror(struct parser_params *parser, const char *msg)
11285 {
11286 #ifndef RIPPER
11287  const int max_line_margin = 30;
11288  const char *p, *pe;
11289  char *buf;
11290  long len;
11291  int i;
11292 
11293  compile_error(PARSER_ARG "%s", msg);
11294  p = lex_p;
11295  while (lex_pbeg <= p) {
11296  if (*p == '\n') break;
11297  p--;
11298  }
11299  p++;
11300 
11301  pe = lex_p;
11302  while (pe < lex_pend) {
11303  if (*pe == '\n') break;
11304  pe++;
11305  }
11306 
11307  len = pe - p;
11308  if (len > 4) {
11309  char *p2;
11310  const char *pre = "", *post = "";
11311 
11312  if (len > max_line_margin * 2 + 10) {
11313  if (lex_p - p > max_line_margin) {
11314  p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline));
11315  pre = "...";
11316  }
11317  if (pe - lex_p > max_line_margin) {
11318  pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline));
11319  post = "...";
11320  }
11321  len = pe - p;
11322  }
11323  buf = ALLOCA_N(char, len+2);
11324  MEMCPY(buf, p, char, len);
11325  buf[len] = '\0';
11326  rb_compile_error_append("%s%s%s", pre, buf, post);
11327 
11328  i = (int)(lex_p - p);
11329  p2 = buf; pe = buf + len;
11330 
11331  while (p2 < pe) {
11332  if (*p2 != '\t') *p2 = ' ';
11333  p2++;
11334  }
11335  buf[i] = '^';
11336  buf[i+1] = '\0';
11337  rb_compile_error_append("%s%s", pre, buf);
11338  }
11339 #else
11340  dispatch1(parse_error, STR_NEW2(msg));
11341 #endif /* !RIPPER */
11342  return 0;
11343 }
11344 
11345 static void parser_prepare(struct parser_params *parser);
11346 
11347 #ifndef RIPPER
11348 static VALUE
11349 debug_lines(const char *f)
11350 {
11351  ID script_lines;
11352  CONST_ID(script_lines, "SCRIPT_LINES__");
11353  if (rb_const_defined_at(rb_cObject, script_lines)) {
11354  VALUE hash = rb_const_get_at(rb_cObject, script_lines);
11355  if (TYPE(hash) == T_HASH) {
11357  VALUE lines = rb_ary_new();
11358  rb_hash_aset(hash, fname, lines);
11359  return lines;
11360  }
11361  }
11362  return 0;
11363 }
11364 
11365 static VALUE
11366 coverage(const char *f, int n)
11367 {
11368  VALUE coverages = rb_get_coverages();
11369  if (RTEST(coverages) && RBASIC(coverages)->klass == 0) {
11371  VALUE lines = rb_ary_new2(n);
11372  int i;
11373  RBASIC(lines)->klass = 0;
11374  for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil;
11375  RARRAY(lines)->as.heap.len = n;
11376  rb_hash_aset(coverages, fname, lines);
11377  return lines;
11378  }
11379  return 0;
11380 }
11381 
11382 static int
11384 {
11385  return strcmp(ruby_sourcefile, "-e") == 0;
11386 }
11387 
11388 static VALUE
11389 yycompile0(VALUE arg, int tracing)
11390 {
11391  int n;
11392  NODE *tree;
11393  struct parser_params *parser = (struct parser_params *)arg;
11394 
11395  if (!compile_for_eval && rb_safe_level() == 0) {
11397  if (ruby_debug_lines && ruby_sourceline > 0) {
11398  VALUE str = STR_NEW0();
11399  n = ruby_sourceline;
11400  do {
11402  } while (--n);
11403  }
11404 
11405  if (!e_option_supplied(parser)) {
11407  }
11408  }
11409 
11410  parser_prepare(parser);
11411  deferred_nodes = 0;
11412 #ifndef RIPPER
11414 #endif
11415  n = yyparse((void*)parser);
11416  ruby_debug_lines = 0;
11417  ruby_coverage = 0;
11418  compile_for_eval = 0;
11419 
11420  lex_strterm = 0;
11421  lex_p = lex_pbeg = lex_pend = 0;
11422  lex_lastline = lex_nextline = 0;
11423  if (parser->nerr) {
11424  return 0;
11425  }
11426  tree = ruby_eval_tree;
11427  if (!tree) {
11428  tree = NEW_NIL();
11429  }
11430  else if (ruby_eval_tree_begin) {
11431  tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body);
11432  }
11433  return (VALUE)tree;
11434 }
11435 
11436 static NODE*
11437 yycompile(struct parser_params *parser, const char *f, int line)
11438 {
11440  ruby_sourceline = line - 1;
11441  return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE);
11442 }
11443 #endif /* !RIPPER */
11444 
11445 static rb_encoding *
11447 {
11448  rb_encoding *enc = rb_enc_get(s);
11449  if (!rb_enc_asciicompat(enc)) {
11450  rb_raise(rb_eArgError, "invalid source encoding");
11451  }
11452  return enc;
11453 }
11454 
11455 static VALUE
11456 lex_get_str(struct parser_params *parser, VALUE s)
11457 {
11458  char *beg, *end, *pend;
11460 
11461  beg = RSTRING_PTR(s);
11462  if (lex_gets_ptr) {
11463  if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil;
11464  beg += lex_gets_ptr;
11465  }
11466  pend = RSTRING_PTR(s) + RSTRING_LEN(s);
11467  end = beg;
11468  while (end < pend) {
11469  if (*end++ == '\n') break;
11470  }
11471  lex_gets_ptr = end - RSTRING_PTR(s);
11472  return rb_enc_str_new(beg, end - beg, enc);
11473 }
11474 
11475 static VALUE
11477 {
11478  VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
11479  if (NIL_P(line)) return line;
11481 #ifndef RIPPER
11482  if (ruby_debug_lines) {
11483  rb_enc_associate(line, parser->enc);
11485  }
11486  if (ruby_coverage) {
11488  }
11489 #endif
11490  return line;
11491 }
11492 
11493 #ifdef RIPPER
11495 #else
11497 
11498 static NODE*
11499 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
11500 {
11501  struct parser_params *parser;
11502  NODE *node;
11503  volatile VALUE tmp;
11504 
11505  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
11507  lex_gets_ptr = 0;
11508  lex_input = s;
11509  lex_pbeg = lex_p = lex_pend = 0;
11511 
11512  node = yycompile(parser, f, line);
11513  tmp = vparser; /* prohibit tail call optimization */
11514 
11515  return node;
11516 }
11517 
11518 NODE*
11519 rb_compile_string(const char *f, VALUE s, int line)
11520 {
11522  return parser_compile_string(rb_parser_new(), f, s, line);
11523 }
11524 
11525 NODE*
11526 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
11527 {
11529  return parser_compile_string(vparser, f, s, line);
11530 }
11531 
11532 NODE*
11533 rb_compile_cstr(const char *f, const char *s, int len, int line)
11534 {
11535  VALUE str = rb_str_new(s, len);
11536  return parser_compile_string(rb_parser_new(), f, str, line);
11537 }
11538 
11539 NODE*
11540 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line)
11541 {
11542  VALUE str = rb_str_new(s, len);
11543  return parser_compile_string(vparser, f, str, line);
11544 }
11545 
11546 static VALUE
11547 lex_io_gets(struct parser_params *parser, VALUE io)
11548 {
11549  return rb_io_gets(io);
11550 }
11551 
11552 NODE*
11553 rb_compile_file(const char *f, VALUE file, int start)
11554 {
11555  VALUE volatile vparser = rb_parser_new();
11556 
11557  return rb_parser_compile_file(vparser, f, file, start);
11558 }
11559 
11560 NODE*
11561 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start)
11562 {
11563  struct parser_params *parser;
11564  volatile VALUE tmp;
11565  NODE *node;
11566 
11567  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
11569  lex_input = file;
11570  lex_pbeg = lex_p = lex_pend = 0;
11572 
11573  node = yycompile(parser, f, start);
11574  tmp = vparser; /* prohibit tail call optimization */
11575 
11576  return node;
11577 }
11578 #endif /* !RIPPER */
11579 
11580 #define STR_FUNC_ESCAPE 0x01
11581 #define STR_FUNC_EXPAND 0x02
11582 #define STR_FUNC_REGEXP 0x04
11583 #define STR_FUNC_QWORDS 0x08
11584 #define STR_FUNC_SYMBOL 0x10
11585 #define STR_FUNC_INDENT 0x20
11586 
11588  str_squote = (0),
11596 };
11597 
11598 static VALUE
11599 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0)
11600 {
11601  VALUE str;
11602 
11603  str = rb_enc_str_new(p, n, enc);
11604  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
11606  }
11607  else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
11609  }
11610  }
11611 
11612  return str;
11613 }
11614 
11615 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend)
11616 #define lex_eol_p() (lex_p >= lex_pend)
11617 #define peek(c) peek_n((c), 0)
11618 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n])
11619 
11620 static inline int
11622 {
11623  int c;
11624 
11625  if (lex_p == lex_pend) {
11626  VALUE v = lex_nextline;
11627  lex_nextline = 0;
11628  if (!v) {
11629  if (parser->eofp)
11630  return -1;
11631 
11632  if (!lex_input || NIL_P(v = lex_getline(parser))) {
11633  parser->eofp = Qtrue;
11634  lex_goto_eol(parser);
11635  return -1;
11636  }
11637  }
11638  {
11639 #ifdef RIPPER
11640  if (parser->tokp < lex_pend) {
11641  if (NIL_P(parser->delayed)) {
11642  parser->delayed = rb_str_buf_new(1024);
11643  rb_enc_associate(parser->delayed, parser->enc);
11644  rb_str_buf_cat(parser->delayed,
11645  parser->tokp, lex_pend - parser->tokp);
11646  parser->delayed_line = ruby_sourceline;
11647  parser->delayed_col = (int)(parser->tokp - lex_pbeg);
11648  }
11649  else {
11650  rb_str_buf_cat(parser->delayed,
11651  parser->tokp, lex_pend - parser->tokp);
11652  }
11653  }
11654 #endif
11655  if (heredoc_end > 0) {
11657  heredoc_end = 0;
11658  }
11659  ruby_sourceline++;
11660  parser->line_count++;
11661  lex_pbeg = lex_p = RSTRING_PTR(v);
11662  lex_pend = lex_p + RSTRING_LEN(v);
11663  ripper_flush(parser);
11664  lex_lastline = v;
11665  }
11666  }
11667  c = (unsigned char)*lex_p++;
11668  if (c == '\r' && peek('\n')) {
11669  lex_p++;
11670  c = '\n';
11671  }
11672 
11673  return c;
11674 }
11675 
11676 static void
11677 parser_pushback(struct parser_params *parser, int c)
11678 {
11679  if (c == -1) return;
11680  lex_p--;
11681  if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
11682  lex_p--;
11683  }
11684 }
11685 
11686 #define was_bol() (lex_p == lex_pbeg + 1)
11687 
11688 #define tokfix() (tokenbuf[tokidx]='\0')
11689 #define tok() tokenbuf
11690 #define toklen() tokidx
11691 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
11692 
11693 static char*
11695 {
11696  tokidx = 0;
11697  if (!tokenbuf) {
11698  toksiz = 60;
11699  tokenbuf = ALLOC_N(char, 60);
11700  }
11701  if (toksiz > 4096) {
11702  toksiz = 60;
11703  REALLOC_N(tokenbuf, char, 60);
11704  }
11705  return tokenbuf;
11706 }
11707 
11708 static char *
11709 parser_tokspace(struct parser_params *parser, int n)
11710 {
11711  tokidx += n;
11712 
11713  if (tokidx >= toksiz) {
11714  do {toksiz *= 2;} while (toksiz < tokidx);
11715  REALLOC_N(tokenbuf, char, toksiz);
11716  }
11717  return &tokenbuf[tokidx-n];
11718 }
11719 
11720 static void
11721 parser_tokadd(struct parser_params *parser, int c)
11722 {
11723  tokenbuf[tokidx++] = (char)c;
11724  if (tokidx >= toksiz) {
11725  toksiz *= 2;
11726  REALLOC_N(tokenbuf, char, toksiz);
11727  }
11728 }
11729 
11730 static int
11731 parser_tok_hex(struct parser_params *parser, size_t *numlen)
11732 {
11733  int c;
11734 
11735  c = scan_hex(lex_p, 2, numlen);
11736  if (!*numlen) {
11737  yyerror("invalid hex escape");
11738  return 0;
11739  }
11740  lex_p += *numlen;
11741  return c;
11742 }
11743 
11744 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n))
11745 
11746 static int
11748  int string_literal, int symbol_literal, int regexp_literal)
11749 {
11750  /*
11751  * If string_literal is true, then we allow multiple codepoints
11752  * in \u{}, and add the codepoints to the current token.
11753  * Otherwise we're parsing a character literal and return a single
11754  * codepoint without adding it
11755  */
11756 
11757  int codepoint;
11758  size_t numlen;
11759 
11760  if (regexp_literal) { tokadd('\\'); tokadd('u'); }
11761 
11762  if (peek('{')) { /* handle \u{...} form */
11763  do {
11764  if (regexp_literal) { tokadd(*lex_p); }
11765  nextc();
11766  codepoint = scan_hex(lex_p, 6, &numlen);
11767  if (numlen == 0) {
11768  yyerror("invalid Unicode escape");
11769  return 0;
11770  }
11771  if (codepoint > 0x10ffff) {
11772  yyerror("invalid Unicode codepoint (too large)");
11773  return 0;
11774  }
11775  lex_p += numlen;
11776  if (regexp_literal) {
11777  tokcopy((int)numlen);
11778  }
11779  else if (codepoint >= 0x80) {
11780  *encp = UTF8_ENC();
11781  if (string_literal) tokaddmbc(codepoint, *encp);
11782  }
11783  else if (string_literal) {
11784  tokadd(codepoint);
11785  }
11786  } while (string_literal && (peek(' ') || peek('\t')));
11787 
11788  if (!peek('}')) {
11789  yyerror("unterminated Unicode escape");
11790  return 0;
11791  }
11792 
11793  if (regexp_literal) { tokadd('}'); }
11794  nextc();
11795  }
11796  else { /* handle \uxxxx form */
11797  codepoint = scan_hex(lex_p, 4, &numlen);
11798  if (numlen < 4) {
11799  yyerror("invalid Unicode escape");
11800  return 0;
11801  }
11802  lex_p += 4;
11803  if (regexp_literal) {
11804  tokcopy(4);
11805  }
11806  else if (codepoint >= 0x80) {
11807  *encp = UTF8_ENC();
11808  if (string_literal) tokaddmbc(codepoint, *encp);
11809  }
11810  else if (string_literal) {
11811  tokadd(codepoint);
11812  }
11813  }
11814 
11815  return codepoint;
11816 }
11817 
11818 #define ESCAPE_CONTROL 1
11819 #define ESCAPE_META 2
11820 
11821 static int
11822 parser_read_escape(struct parser_params *parser, int flags,
11823  rb_encoding **encp)
11824 {
11825  int c;
11826  size_t numlen;
11827 
11828  switch (c = nextc()) {
11829  case '\\': /* Backslash */
11830  return c;
11831 
11832  case 'n': /* newline */
11833  return '\n';
11834 
11835  case 't': /* horizontal tab */
11836  return '\t';
11837 
11838  case 'r': /* carriage-return */
11839  return '\r';
11840 
11841  case 'f': /* form-feed */
11842  return '\f';
11843 
11844  case 'v': /* vertical tab */
11845  return '\13';
11846 
11847  case 'a': /* alarm(bell) */
11848  return '\007';
11849 
11850  case 'e': /* escape */
11851  return 033;
11852 
11853  case '0': case '1': case '2': case '3': /* octal constant */
11854  case '4': case '5': case '6': case '7':
11855  pushback(c);
11856  c = scan_oct(lex_p, 3, &numlen);
11857  lex_p += numlen;
11858  return c;
11859 
11860  case 'x': /* hex constant */
11861  c = tok_hex(&numlen);
11862  if (numlen == 0) return 0;
11863  return c;
11864 
11865  case 'b': /* backspace */
11866  return '\010';
11867 
11868  case 's': /* space */
11869  return ' ';
11870 
11871  case 'M':
11872  if (flags & ESCAPE_META) goto eof;
11873  if ((c = nextc()) != '-') {
11874  pushback(c);
11875  goto eof;
11876  }
11877  if ((c = nextc()) == '\\') {
11878  if (peek('u')) goto eof;
11879  return read_escape(flags|ESCAPE_META, encp) | 0x80;
11880  }
11881  else if (c == -1 || !ISASCII(c)) goto eof;
11882  else {
11883  return ((c & 0xff) | 0x80);
11884  }
11885 
11886  case 'C':
11887  if ((c = nextc()) != '-') {
11888  pushback(c);
11889  goto eof;
11890  }
11891  case 'c':
11892  if (flags & ESCAPE_CONTROL) goto eof;
11893  if ((c = nextc())== '\\') {
11894  if (peek('u')) goto eof;
11895  c = read_escape(flags|ESCAPE_CONTROL, encp);
11896  }
11897  else if (c == '?')
11898  return 0177;
11899  else if (c == -1 || !ISASCII(c)) goto eof;
11900  return c & 0x9f;
11901 
11902  eof:
11903  case -1:
11904  yyerror("Invalid escape character syntax");
11905  return '\0';
11906 
11907  default:
11908  return c;
11909  }
11910 }
11911 
11912 static void
11914 {
11915  int len = rb_enc_codelen(c, enc);
11916  rb_enc_mbcput(c, tokspace(len), enc);
11917 }
11918 
11919 static int
11921 {
11922  int c;
11923  int flags = 0;
11924  size_t numlen;
11925 
11926  first:
11927  switch (c = nextc()) {
11928  case '\n':
11929  return 0; /* just ignore */
11930 
11931  case '0': case '1': case '2': case '3': /* octal constant */
11932  case '4': case '5': case '6': case '7':
11933  {
11934  ruby_scan_oct(--lex_p, 3, &numlen);
11935  if (numlen == 0) goto eof;
11936  lex_p += numlen;
11937  tokcopy((int)numlen + 1);
11938  }
11939  return 0;
11940 
11941  case 'x': /* hex constant */
11942  {
11943  tok_hex(&numlen);
11944  if (numlen == 0) return -1;
11945  tokcopy((int)numlen + 2);
11946  }
11947  return 0;
11948 
11949  case 'M':
11950  if (flags & ESCAPE_META) goto eof;
11951  if ((c = nextc()) != '-') {
11952  pushback(c);
11953  goto eof;
11954  }
11955  tokcopy(3);
11956  flags |= ESCAPE_META;
11957  goto escaped;
11958 
11959  case 'C':
11960  if (flags & ESCAPE_CONTROL) goto eof;
11961  if ((c = nextc()) != '-') {
11962  pushback(c);
11963  goto eof;
11964  }
11965  tokcopy(3);
11966  goto escaped;
11967 
11968  case 'c':
11969  if (flags & ESCAPE_CONTROL) goto eof;
11970  tokcopy(2);
11971  flags |= ESCAPE_CONTROL;
11972  escaped:
11973  if ((c = nextc()) == '\\') {
11974  goto first;
11975  }
11976  else if (c == -1) goto eof;
11977  tokadd(c);
11978  return 0;
11979 
11980  eof:
11981  case -1:
11982  yyerror("Invalid escape character syntax");
11983  return -1;
11984 
11985  default:
11986  tokadd('\\');
11987  tokadd(c);
11988  }
11989  return 0;
11990 }
11991 
11992 static int
11994 {
11995  int kcode = 0;
11996  int kopt = 0;
11997  int options = 0;
11998  int c, opt, kc;
11999 
12000  newtok();
12001  while (c = nextc(), ISALPHA(c)) {
12002  if (c == 'o') {
12003  options |= RE_OPTION_ONCE;
12004  }
12005  else if (rb_char_to_option_kcode(c, &opt, &kc)) {
12006  if (kc >= 0) {
12007  if (kc != rb_ascii8bit_encindex()) kcode = c;
12008  kopt = opt;
12009  }
12010  else {
12011  options |= opt;
12012  }
12013  }
12014  else {
12015  tokadd(c);
12016  }
12017  }
12018  options |= kopt;
12019  pushback(c);
12020  if (toklen()) {
12021  tokfix();
12022  compile_error(PARSER_ARG "unknown regexp option%s - %s",
12023  toklen() > 1 ? "s" : "", tok());
12024  }
12025  return options | RE_OPTION_ENCODING(kcode);
12026 }
12027 
12028 static void
12030 {
12031  /* TODO: should use another API? */
12032  if (RBASIC(str)->flags & RSTRING_NOEMBED)
12033  xfree(RSTRING_PTR(str));
12034  rb_gc_force_recycle(str);
12035 }
12036 
12037 static int
12038 parser_tokadd_mbchar(struct parser_params *parser, int c)
12039 {
12040  int len = parser_precise_mbclen();
12041  if (!MBCLEN_CHARFOUND_P(len)) {
12042  compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name());
12043  return -1;
12044  }
12045  tokadd(c);
12046  lex_p += --len;
12047  if (len > 0) tokcopy(len);
12048  return c;
12049 }
12050 
12051 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c))
12052 
12053 static int
12055  int func, int term, int paren, long *nest,
12056  rb_encoding **encp)
12057 {
12058  int c;
12059  int has_nonascii = 0;
12060  rb_encoding *enc = *encp;
12061  char *errbuf = 0;
12062  static const char mixed_msg[] = "%s mixed within %s source";
12063 
12064 #define mixed_error(enc1, enc2) if (!errbuf) { \
12065  size_t len = sizeof(mixed_msg) - 4; \
12066  len += strlen(rb_enc_name(enc1)); \
12067  len += strlen(rb_enc_name(enc2)); \
12068  errbuf = ALLOCA_N(char, len); \
12069  snprintf(errbuf, len, mixed_msg, \
12070  rb_enc_name(enc1), \
12071  rb_enc_name(enc2)); \
12072  yyerror(errbuf); \
12073  }
12074 #define mixed_escape(beg, enc1, enc2) do { \
12075  const char *pos = lex_p; \
12076  lex_p = (beg); \
12077  mixed_error((enc1), (enc2)); \
12078  lex_p = pos; \
12079  } while (0)
12080 
12081  while ((c = nextc()) != -1) {
12082  if (paren && c == paren) {
12083  ++*nest;
12084  }
12085  else if (c == term) {
12086  if (!nest || !*nest) {
12087  pushback(c);
12088  break;
12089  }
12090  --*nest;
12091  }
12092  else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
12093  int c2 = *lex_p;
12094  if (c2 == '$' || c2 == '@' || c2 == '{') {
12095  pushback(c);
12096  break;
12097  }
12098  }
12099  else if (c == '\\') {
12100  const char *beg = lex_p - 1;
12101  c = nextc();
12102  switch (c) {
12103  case '\n':
12104  if (func & STR_FUNC_QWORDS) break;
12105  if (func & STR_FUNC_EXPAND) continue;
12106  tokadd('\\');
12107  break;
12108 
12109  case '\\':
12110  if (func & STR_FUNC_ESCAPE) tokadd(c);
12111  break;
12112 
12113  case 'u':
12114  if ((func & STR_FUNC_EXPAND) == 0) {
12115  tokadd('\\');
12116  break;
12117  }
12118  parser_tokadd_utf8(parser, &enc, 1,
12119  func & STR_FUNC_SYMBOL,
12120  func & STR_FUNC_REGEXP);
12121  if (has_nonascii && enc != *encp) {
12122  mixed_escape(beg, enc, *encp);
12123  }
12124  continue;
12125 
12126  default:
12127  if (c == -1) return -1;
12128  if (!ISASCII(c)) {
12129  if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\');
12130  goto non_ascii;
12131  }
12132  if (func & STR_FUNC_REGEXP) {
12133  pushback(c);
12134  if ((c = tokadd_escape(&enc)) < 0)
12135  return -1;
12136  if (has_nonascii && enc != *encp) {
12137  mixed_escape(beg, enc, *encp);
12138  }
12139  continue;
12140  }
12141  else if (func & STR_FUNC_EXPAND) {
12142  pushback(c);
12143  if (func & STR_FUNC_ESCAPE) tokadd('\\');
12144  c = read_escape(0, &enc);
12145  }
12146  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12147  /* ignore backslashed spaces in %w */
12148  }
12149  else if (c != term && !(paren && c == paren)) {
12150  tokadd('\\');
12151  pushback(c);
12152  continue;
12153  }
12154  }
12155  }
12156  else if (!parser_isascii()) {
12157  non_ascii:
12158  has_nonascii = 1;
12159  if (enc != *encp) {
12160  mixed_error(enc, *encp);
12161  continue;
12162  }
12163  if (tokadd_mbchar(c) == -1) return -1;
12164  continue;
12165  }
12166  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12167  pushback(c);
12168  break;
12169  }
12170  if (c & 0x80) {
12171  has_nonascii = 1;
12172  if (enc != *encp) {
12173  mixed_error(enc, *encp);
12174  continue;
12175  }
12176  }
12177  tokadd(c);
12178  }
12179  *encp = enc;
12180  return c;
12181 }
12182 
12183 #define NEW_STRTERM(func, term, paren) \
12184  rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
12185 
12186 #ifdef RIPPER
12187 static void
12188 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc)
12189 {
12190  if (!NIL_P(parser->delayed)) {
12191  ptrdiff_t len = lex_p - parser->tokp;
12192  if (len > 0) {
12193  rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);
12194  }
12195  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
12196  parser->tokp = lex_p;
12197  }
12198 }
12199 
12200 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc))
12201 #else
12202 #define flush_string_content(enc) ((void)(enc))
12203 #endif
12204 
12205 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
12206 /* this can be shared with ripper, since it's independent from struct
12207  * parser_params. */
12208 #ifndef RIPPER
12209 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
12210 #define SPECIAL_PUNCT(idx) ( \
12211  BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
12212  BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
12213  BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
12214  BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
12215  BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
12216  BIT('0', idx))
12217 const unsigned int ruby_global_name_punct_bits[] = {
12218  SPECIAL_PUNCT(0),
12219  SPECIAL_PUNCT(1),
12220  SPECIAL_PUNCT(2),
12221 };
12222 #undef BIT
12223 #undef SPECIAL_PUNCT
12224 #endif
12225 
12226 static inline int
12228 {
12229  if (c <= 0x20 || 0x7e < c) return 0;
12230  return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1;
12231 }
12232 
12233 static int
12235 {
12236  int c;
12237  const char *p = lex_p;
12238 
12239  if (p + 1 >= lex_pend) return 0;
12240  c = *p++;
12241  switch (c) {
12242  case '$':
12243  if ((c = *p) == '-') {
12244  if (++p >= lex_pend) return 0;
12245  c = *p;
12246  }
12247  else if (is_global_name_punct(c) || ISDIGIT(c)) {
12248  return tSTRING_DVAR;
12249  }
12250  break;
12251  case '@':
12252  if ((c = *p) == '@') {
12253  if (++p >= lex_pend) return 0;
12254  c = *p;
12255  }
12256  break;
12257  case '{':
12258  lex_p = p;
12259  command_start = TRUE;
12260  return tSTRING_DBEG;
12261  default:
12262  return 0;
12263  }
12264  if (!ISASCII(c) || c == '_' || ISALPHA(c))
12265  return tSTRING_DVAR;
12266  return 0;
12267 }
12268 
12269 static int
12270 parser_parse_string(struct parser_params *parser, NODE *quote)
12271 {
12272  int func = (int)quote->nd_func;
12273  int term = nd_term(quote);
12274  int paren = nd_paren(quote);
12275  int c, space = 0;
12276  rb_encoding *enc = parser->enc;
12277 
12278  if (func == -1) return tSTRING_END;
12279  c = nextc();
12280  if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12281  do {c = nextc();} while (ISSPACE(c));
12282  space = 1;
12283  }
12284  if (c == term && !quote->nd_nest) {
12285  if (func & STR_FUNC_QWORDS) {
12286  quote->nd_func = -1;
12287  return ' ';
12288  }
12289  if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
12291  return tREGEXP_END;
12292  }
12293  if (space) {
12294  pushback(c);
12295  return ' ';
12296  }
12297  newtok();
12298  if ((func & STR_FUNC_EXPAND) && c == '#') {
12299  int t = parser_peek_variable_name(parser);
12300  if (t) return t;
12301  tokadd('#');
12302  c = nextc();
12303  }
12304  pushback(c);
12305  if (tokadd_string(func, term, paren, &quote->nd_nest,
12306  &enc) == -1) {
12307  ruby_sourceline = nd_line(quote);
12308  if (func & STR_FUNC_REGEXP) {
12309  if (parser->eofp)
12310  compile_error(PARSER_ARG "unterminated regexp meets end of file");
12311  return tREGEXP_END;
12312  }
12313  else {
12314  if (parser->eofp)
12315  compile_error(PARSER_ARG "unterminated string meets end of file");
12316  return tSTRING_END;
12317  }
12318  }
12319 
12320  tokfix();
12321  set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
12322  flush_string_content(enc);
12323 
12324  return tSTRING_CONTENT;
12325 }
12326 
12327 static int
12329 {
12330  int c = nextc(), term, func = 0;
12331  long len;
12332 
12333  if (c == '-') {
12334  c = nextc();
12335  func = STR_FUNC_INDENT;
12336  }
12337  switch (c) {
12338  case '\'':
12339  func |= str_squote; goto quoted;
12340  case '"':
12341  func |= str_dquote; goto quoted;
12342  case '`':
12343  func |= str_xquote;
12344  quoted:
12345  newtok();
12346  tokadd(func);
12347  term = c;
12348  while ((c = nextc()) != -1 && c != term) {
12349  if (tokadd_mbchar(c) == -1) return 0;
12350  }
12351  if (c == -1) {
12352  compile_error(PARSER_ARG "unterminated here document identifier");
12353  return 0;
12354  }
12355  break;
12356 
12357  default:
12358  if (!parser_is_identchar()) {
12359  pushback(c);
12360  if (func & STR_FUNC_INDENT) {
12361  pushback('-');
12362  }
12363  return 0;
12364  }
12365  newtok();
12366  term = '"';
12367  tokadd(func |= str_dquote);
12368  do {
12369  if (tokadd_mbchar(c) == -1) return 0;
12370  } while ((c = nextc()) != -1 && parser_is_identchar());
12371  pushback(c);
12372  break;
12373  }
12374 
12375  tokfix();
12376 #ifdef RIPPER
12377  ripper_dispatch_scan_event(parser, tHEREDOC_BEG);
12378 #endif
12379  len = lex_p - lex_pbeg;
12380  lex_goto_eol(parser);
12382  STR_NEW(tok(), toklen()), /* nd_lit */
12383  len, /* nd_nth */
12384  lex_lastline); /* nd_orig */
12386  ripper_flush(parser);
12387  return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
12388 }
12389 
12390 static void
12392 {
12393  VALUE line;
12394 
12395  line = here->nd_orig;
12396  lex_lastline = line;
12397  lex_pbeg = RSTRING_PTR(line);
12398  lex_pend = lex_pbeg + RSTRING_LEN(line);
12399  lex_p = lex_pbeg + here->nd_nth;
12401  ruby_sourceline = nd_line(here);
12402  dispose_string(here->nd_lit);
12403  rb_gc_force_recycle((VALUE)here);
12404  ripper_flush(parser);
12405 }
12406 
12407 static int
12409  const char *eos, long len, int indent)
12410 {
12411  const char *p = lex_pbeg;
12412  long n;
12413 
12414  if (indent) {
12415  while (*p && ISSPACE(*p)) p++;
12416  }
12417  n = lex_pend - (p + len);
12418  if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE;
12419  return strncmp(eos, p, len) == 0;
12420 }
12421 
12422 #ifdef RIPPER
12423 static void
12424 ripper_dispatch_heredoc_end(struct parser_params *parser)
12425 {
12426  if (!NIL_P(parser->delayed))
12427  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
12428  lex_goto_eol(parser);
12429  ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END);
12430 }
12431 
12432 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser)
12433 #else
12434 #define dispatch_heredoc_end() ((void)0)
12435 #endif
12436 
12437 static int
12439 {
12440  int c, func, indent = 0;
12441  const char *eos, *p, *pend;
12442  long len;
12443  VALUE str = 0;
12444  rb_encoding *enc = parser->enc;
12445 
12446  eos = RSTRING_PTR(here->nd_lit);
12447  len = RSTRING_LEN(here->nd_lit) - 1;
12448  indent = (func = *eos++) & STR_FUNC_INDENT;
12449 
12450  if ((c = nextc()) == -1) {
12451  error:
12452  compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos);
12453 #ifdef RIPPER
12454  if (NIL_P(parser->delayed)) {
12455  ripper_dispatch_scan_event(parser, tSTRING_CONTENT);
12456  }
12457  else {
12458  if (str ||
12459  ((len = lex_p - parser->tokp) > 0 &&
12460  (str = STR_NEW3(parser->tokp, len, enc, func), 1))) {
12461  rb_str_append(parser->delayed, str);
12462  }
12463  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
12464  }
12465  lex_goto_eol(parser);
12466 #endif
12467  restore:
12469  lex_strterm = 0;
12470  return 0;
12471  }
12472  if (was_bol() && whole_match_p(eos, len, indent)) {
12475  return tSTRING_END;
12476  }
12477 
12478  if (!(func & STR_FUNC_EXPAND)) {
12479  do {
12481  pend = lex_pend;
12482  if (pend > p) {
12483  switch (pend[-1]) {
12484  case '\n':
12485  if (--pend == p || pend[-1] != '\r') {
12486  pend++;
12487  break;
12488  }
12489  case '\r':
12490  --pend;
12491  }
12492  }
12493  if (str)
12494  rb_str_cat(str, p, pend - p);
12495  else
12496  str = STR_NEW(p, pend - p);
12497  if (pend < lex_pend) rb_str_cat(str, "\n", 1);
12498  lex_goto_eol(parser);
12499  if (nextc() == -1) {
12500  if (str) dispose_string(str);
12501  goto error;
12502  }
12503  } while (!whole_match_p(eos, len, indent));
12504  }
12505  else {
12506  /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
12507  newtok();
12508  if (c == '#') {
12509  int t = parser_peek_variable_name(parser);
12510  if (t) return t;
12511  tokadd('#');
12512  c = nextc();
12513  }
12514  do {
12515  pushback(c);
12516  if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) {
12517  if (parser->eofp) goto error;
12518  goto restore;
12519  }
12520  if (c != '\n') {
12521  set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
12522  flush_string_content(enc);
12523  return tSTRING_CONTENT;
12524  }
12525  tokadd(nextc());
12526  /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
12527  if ((c = nextc()) == -1) goto error;
12528  } while (!whole_match_p(eos, len, indent));
12529  str = STR_NEW3(tok(), toklen(), enc, func);
12530  }
12533  lex_strterm = NEW_STRTERM(-1, 0, 0);
12534  set_yylval_str(str);
12535  return tSTRING_CONTENT;
12536 }
12537 
12538 #include "lex.c"
12539 
12540 static void
12542 {
12543 #ifndef RIPPER
12544  rb_warning0("ambiguous first argument; put parentheses or even spaces");
12545 #else
12547 #endif
12548 }
12549 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1)
12550 
12551 static ID
12553 {
12554 #ifndef RIPPER
12555  if (!is_local_id(lhs))
12556  yyerror("formal argument must be local variable");
12557 #endif
12558  shadowing_lvar(lhs);
12559  return lhs;
12560 }
12561 
12562 static int
12563 lvar_defined_gen(struct parser_params *parser, ID id)
12564 {
12565  return (dyna_in_block() && dvar_defined_get(id)) || local_id(id);
12566 }
12567 
12568 /* emacsen -*- hack */
12569 static long
12570 parser_encode_length(struct parser_params *parser, const char *name, long len)
12571 {
12572  long nlen;
12573 
12574  if (len > 5 && name[nlen = len - 5] == '-') {
12575  if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
12576  return nlen;
12577  }
12578  if (len > 4 && name[nlen = len - 4] == '-') {
12579  if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
12580  return nlen;
12581  if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
12582  !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
12583  /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
12584  return nlen;
12585  }
12586  return len;
12587 }
12588 
12589 static void
12590 parser_set_encode(struct parser_params *parser, const char *name)
12591 {
12592  int idx = rb_enc_find_index(name);
12593  rb_encoding *enc;
12594  VALUE excargs[3];
12595 
12596  if (idx < 0) {
12597  excargs[1] = rb_sprintf("unknown encoding name: %s", name);
12598  error:
12599  excargs[0] = rb_eArgError;
12600  excargs[2] = rb_make_backtrace();
12601  rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline));
12602  rb_exc_raise(rb_make_exception(3, excargs));
12603  }
12604  enc = rb_enc_from_index(idx);
12605  if (!rb_enc_asciicompat(enc)) {
12606  excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
12607  goto error;
12608  }
12609  parser->enc = enc;
12610 #ifndef RIPPER
12611  if (ruby_debug_lines) {
12612  long i, n = RARRAY_LEN(ruby_debug_lines);
12613  const VALUE *p = RARRAY_PTR(ruby_debug_lines);
12614  for (i = 0; i < n; ++i) {
12615  rb_enc_associate_index(*p, idx);
12616  }
12617  }
12618 #endif
12619 }
12620 
12621 static int
12623 {
12624  const char *p = lex_pbeg, *pend = lex_p - 1;
12625  if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0;
12626  while (p < pend) {
12627  if (!ISSPACE(*p)) return 0;
12628  p++;
12629  }
12630  return 1;
12631 }
12632 
12633 #ifndef RIPPER
12634 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len);
12635 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val);
12636 
12637 static void
12638 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val)
12639 {
12640  if (!comment_at_top(parser)) {
12641  return;
12642  }
12643  parser_set_encode(parser, val);
12644 }
12645 
12646 static void
12647 parser_set_token_info(struct parser_params *parser, const char *name, const char *val)
12648 {
12649  int *p = &parser->parser_token_info_enabled;
12650 
12651  switch (*val) {
12652  case 't': case 'T':
12653  if (strcasecmp(val, "true") == 0) {
12654  *p = TRUE;
12655  return;
12656  }
12657  break;
12658  case 'f': case 'F':
12659  if (strcasecmp(val, "false") == 0) {
12660  *p = FALSE;
12661  return;
12662  }
12663  break;
12664  }
12665  rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val);
12666 }
12667 
12668 struct magic_comment {
12669  const char *name;
12672 };
12673 
12674 static const struct magic_comment magic_comments[] = {
12677  {"warn_indent", parser_set_token_info},
12678 };
12679 #endif
12680 
12681 static const char *
12682 magic_comment_marker(const char *str, long len)
12683 {
12684  long i = 2;
12685 
12686  while (i < len) {
12687  switch (str[i]) {
12688  case '-':
12689  if (str[i-1] == '*' && str[i-2] == '-') {
12690  return str + i + 1;
12691  }
12692  i += 2;
12693  break;
12694  case '*':
12695  if (i + 1 >= len) return 0;
12696  if (str[i+1] != '-') {
12697  i += 4;
12698  }
12699  else if (str[i-1] != '-') {
12700  i += 2;
12701  }
12702  else {
12703  return str + i + 2;
12704  }
12705  break;
12706  default:
12707  i += 3;
12708  break;
12709  }
12710  }
12711  return 0;
12712 }
12713 
12714 static int
12715 parser_magic_comment(struct parser_params *parser, const char *str, long len)
12716 {
12717  VALUE name = 0, val = 0;
12718  const char *beg, *end, *vbeg, *vend;
12719 #define str_copy(_s, _p, _n) ((_s) \
12720  ? (void)(rb_str_resize((_s), (_n)), \
12721  MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
12722  : (void)((_s) = STR_NEW((_p), (_n))))
12723 
12724  if (len <= 7) return FALSE;
12725  if (!(beg = magic_comment_marker(str, len))) return FALSE;
12726  if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE;
12727  str = beg;
12728  len = end - beg - 3;
12729 
12730  /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
12731  while (len > 0) {
12732 #ifndef RIPPER
12733  const struct magic_comment *p = magic_comments;
12734 #endif
12735  char *s;
12736  int i;
12737  long n = 0;
12738 
12739  for (; len > 0 && *str; str++, --len) {
12740  switch (*str) {
12741  case '\'': case '"': case ':': case ';':
12742  continue;
12743  }
12744  if (!ISSPACE(*str)) break;
12745  }
12746  for (beg = str; len > 0; str++, --len) {
12747  switch (*str) {
12748  case '\'': case '"': case ':': case ';':
12749  break;
12750  default:
12751  if (ISSPACE(*str)) break;
12752  continue;
12753  }
12754  break;
12755  }
12756  for (end = str; len > 0 && ISSPACE(*str); str++, --len);
12757  if (!len) break;
12758  if (*str != ':') continue;
12759 
12760  do str++; while (--len > 0 && ISSPACE(*str));
12761  if (!len) break;
12762  if (*str == '"') {
12763  for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
12764  if (*str == '\\') {
12765  --len;
12766  ++str;
12767  }
12768  }
12769  vend = str;
12770  if (len) {
12771  --len;
12772  ++str;
12773  }
12774  }
12775  else {
12776  for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
12777  vend = str;
12778  }
12779  while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
12780 
12781  n = end - beg;
12782  str_copy(name, beg, n);
12783  s = RSTRING_PTR(name);
12784  for (i = 0; i < n; ++i) {
12785  if (s[i] == '-') s[i] = '_';
12786  }
12787 #ifndef RIPPER
12788  do {
12789  if (STRNCASECMP(p->name, s, n) == 0) {
12790  n = vend - vbeg;
12791  if (p->length) {
12792  n = (*p->length)(parser, vbeg, n);
12793  }
12794  str_copy(val, vbeg, n);
12795  (*p->func)(parser, s, RSTRING_PTR(val));
12796  break;
12797  }
12798  } while (++p < magic_comments + numberof(magic_comments));
12799 #else
12800  str_copy(val, vbeg, vend - vbeg);
12801  dispatch2(magic_comment, name, val);
12802 #endif
12803  }
12804 
12805  return TRUE;
12806 }
12807 
12808 static void
12809 set_file_encoding(struct parser_params *parser, const char *str, const char *send)
12810 {
12811  int sep = 0;
12812  const char *beg = str;
12813  VALUE s;
12814 
12815  for (;;) {
12816  if (send - str <= 6) return;
12817  switch (str[6]) {
12818  case 'C': case 'c': str += 6; continue;
12819  case 'O': case 'o': str += 5; continue;
12820  case 'D': case 'd': str += 4; continue;
12821  case 'I': case 'i': str += 3; continue;
12822  case 'N': case 'n': str += 2; continue;
12823  case 'G': case 'g': str += 1; continue;
12824  case '=': case ':':
12825  sep = 1;
12826  str += 6;
12827  break;
12828  default:
12829  str += 6;
12830  if (ISSPACE(*str)) break;
12831  continue;
12832  }
12833  if (STRNCASECMP(str-6, "coding", 6) == 0) break;
12834  }
12835  for (;;) {
12836  do {
12837  if (++str >= send) return;
12838  } while (ISSPACE(*str));
12839  if (sep) break;
12840  if (*str != '=' && *str != ':') return;
12841  sep = 1;
12842  str++;
12843  }
12844  beg = str;
12845  while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
12846  s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg));
12847  parser_set_encode(parser, RSTRING_PTR(s));
12848  rb_str_resize(s, 0);
12849 }
12850 
12851 static void
12853 {
12854  int c = nextc();
12855  switch (c) {
12856  case '#':
12857  if (peek('!')) parser->has_shebang = 1;
12858  break;
12859  case 0xef: /* UTF-8 BOM marker */
12860  if (lex_pend - lex_p >= 2 &&
12861  (unsigned char)lex_p[0] == 0xbb &&
12862  (unsigned char)lex_p[1] == 0xbf) {
12863  parser->enc = rb_utf8_encoding();
12864  lex_p += 2;
12865  lex_pbeg = lex_p;
12866  return;
12867  }
12868  break;
12869  case EOF:
12870  return;
12871  }
12872  pushback(c);
12873  parser->enc = rb_enc_get(lex_lastline);
12874 }
12875 
12876 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
12877 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN)
12878 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)
12879 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
12880 #define IS_LABEL_POSSIBLE() ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG())
12881 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1))
12882 
12883 #ifndef RIPPER
12884 #define ambiguous_operator(op, syn) ( \
12885  rb_warning0("`"op"' after local variable is interpreted as binary operator"), \
12886  rb_warning0("even though it seems like "syn""))
12887 #else
12888 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn))
12889 #endif
12890 #define warn_balanced(op, syn) ((void) \
12891  (last_state != EXPR_CLASS && last_state != EXPR_DOT && \
12892  last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
12893  last_state != EXPR_ENDARG && \
12894  space_seen && !ISSPACE(c) && \
12895  (ambiguous_operator(op, syn), 0)))
12896 
12897 static int
12899 {
12900  register int c;
12901  int space_seen = 0;
12902  int cmd_state;
12903  enum lex_state_e last_state;
12904  rb_encoding *enc;
12905  int mb;
12906 #ifdef RIPPER
12907  int fallthru = FALSE;
12908 #endif
12909 
12910  if (lex_strterm) {
12911  int token;
12912  if (nd_type(lex_strterm) == NODE_HEREDOC) {
12913  token = here_document(lex_strterm);
12914  if (token == tSTRING_END) {
12915  lex_strterm = 0;
12916  lex_state = EXPR_END;
12917  }
12918  }
12919  else {
12920  token = parse_string(lex_strterm);
12921  if (token == tSTRING_END || token == tREGEXP_END) {
12923  lex_strterm = 0;
12924  lex_state = EXPR_END;
12925  }
12926  }
12927  return token;
12928  }
12929  cmd_state = command_start;
12930  command_start = FALSE;
12931  retry:
12932  last_state = lex_state;
12933  switch (c = nextc()) {
12934  case '\0': /* NUL */
12935  case '\004': /* ^D */
12936  case '\032': /* ^Z */
12937  case -1: /* end of script. */
12938  return 0;
12939 
12940  /* white spaces */
12941  case ' ': case '\t': case '\f': case '\r':
12942  case '\13': /* '\v' */
12943  space_seen = 1;
12944 #ifdef RIPPER
12945  while ((c = nextc())) {
12946  switch (c) {
12947  case ' ': case '\t': case '\f': case '\r':
12948  case '\13': /* '\v' */
12949  break;
12950  default:
12951  goto outofloop;
12952  }
12953  }
12954  outofloop:
12955  pushback(c);
12956  ripper_dispatch_scan_event(parser, tSP);
12957 #endif
12958  goto retry;
12959 
12960  case '#': /* it's a comment */
12961  /* no magic_comment in shebang line */
12962  if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) {
12963  if (comment_at_top(parser)) {
12964  set_file_encoding(parser, lex_p, lex_pend);
12965  }
12966  }
12967  lex_p = lex_pend;
12968 #ifdef RIPPER
12969  ripper_dispatch_scan_event(parser, tCOMMENT);
12970  fallthru = TRUE;
12971 #endif
12972  /* fall through */
12973  case '\n':
12974  switch (lex_state) {
12975  case EXPR_BEG:
12976  case EXPR_FNAME:
12977  case EXPR_DOT:
12978  case EXPR_CLASS:
12979  case EXPR_VALUE:
12980 #ifdef RIPPER
12981  if (!fallthru) {
12982  ripper_dispatch_scan_event(parser, tIGNORED_NL);
12983  }
12984  fallthru = FALSE;
12985 #endif
12986  goto retry;
12987  default:
12988  break;
12989  }
12990  while ((c = nextc())) {
12991  switch (c) {
12992  case ' ': case '\t': case '\f': case '\r':
12993  case '\13': /* '\v' */
12994  space_seen = 1;
12995  break;
12996  case '.': {
12997  if ((c = nextc()) != '.') {
12998  pushback(c);
12999  pushback('.');
13000  goto retry;
13001  }
13002  }
13003  default:
13004  --ruby_sourceline;
13006  case -1: /* EOF no decrement*/
13007  lex_goto_eol(parser);
13008 #ifdef RIPPER
13009  if (c != -1) {
13010  parser->tokp = lex_p;
13011  }
13012 #endif
13013  goto normal_newline;
13014  }
13015  }
13016  normal_newline:
13017  command_start = TRUE;
13018  lex_state = EXPR_BEG;
13019  return '\n';
13020 
13021  case '*':
13022  if ((c = nextc()) == '*') {
13023  if ((c = nextc()) == '=') {
13025  lex_state = EXPR_BEG;
13026  return tOP_ASGN;
13027  }
13028  pushback(c);
13029  c = tPOW;
13030  }
13031  else {
13032  if (c == '=') {
13033  set_yylval_id('*');
13034  lex_state = EXPR_BEG;
13035  return tOP_ASGN;
13036  }
13037  pushback(c);
13038  if (IS_SPCARG(c)) {
13039  rb_warning0("`*' interpreted as argument prefix");
13040  c = tSTAR;
13041  }
13042  else if (IS_BEG()) {
13043  c = tSTAR;
13044  }
13045  else {
13046  warn_balanced("*", "argument prefix");
13047  c = '*';
13048  }
13049  }
13050  switch (lex_state) {
13051  case EXPR_FNAME: case EXPR_DOT:
13052  lex_state = EXPR_ARG; break;
13053  default:
13054  lex_state = EXPR_BEG; break;
13055  }
13056  return c;
13057 
13058  case '!':
13059  c = nextc();
13060  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13061  lex_state = EXPR_ARG;
13062  if (c == '@') {
13063  return '!';
13064  }
13065  }
13066  else {
13067  lex_state = EXPR_BEG;
13068  }
13069  if (c == '=') {
13070  return tNEQ;
13071  }
13072  if (c == '~') {
13073  return tNMATCH;
13074  }
13075  pushback(c);
13076  return '!';
13077 
13078  case '=':
13079  if (was_bol()) {
13080  /* skip embedded rd document */
13081  if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
13082 #ifdef RIPPER
13083  int first_p = TRUE;
13084 
13085  lex_goto_eol(parser);
13086  ripper_dispatch_scan_event(parser, tEMBDOC_BEG);
13087 #endif
13088  for (;;) {
13089  lex_goto_eol(parser);
13090 #ifdef RIPPER
13091  if (!first_p) {
13092  ripper_dispatch_scan_event(parser, tEMBDOC);
13093  }
13094  first_p = FALSE;
13095 #endif
13096  c = nextc();
13097  if (c == -1) {
13098  compile_error(PARSER_ARG "embedded document meets end of file");
13099  return 0;
13100  }
13101  if (c != '=') continue;
13102  if (strncmp(lex_p, "end", 3) == 0 &&
13103  (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
13104  break;
13105  }
13106  }
13107  lex_goto_eol(parser);
13108 #ifdef RIPPER
13109  ripper_dispatch_scan_event(parser, tEMBDOC_END);
13110 #endif
13111  goto retry;
13112  }
13113  }
13114 
13115  switch (lex_state) {
13116  case EXPR_FNAME: case EXPR_DOT:
13117  lex_state = EXPR_ARG; break;
13118  default:
13119  lex_state = EXPR_BEG; break;
13120  }
13121  if ((c = nextc()) == '=') {
13122  if ((c = nextc()) == '=') {
13123  return tEQQ;
13124  }
13125  pushback(c);
13126  return tEQ;
13127  }
13128  if (c == '~') {
13129  return tMATCH;
13130  }
13131  else if (c == '>') {
13132  return tASSOC;
13133  }
13134  pushback(c);
13135  return '=';
13136 
13137  case '<':
13138  last_state = lex_state;
13139  c = nextc();
13140  if (c == '<' &&
13141  lex_state != EXPR_DOT &&
13142  lex_state != EXPR_CLASS &&
13143  !IS_END() &&
13144  (!IS_ARG() || space_seen)) {
13145  int token = heredoc_identifier();
13146  if (token) return token;
13147  }
13148  switch (lex_state) {
13149  case EXPR_FNAME: case EXPR_DOT:
13150  lex_state = EXPR_ARG; break;
13151  default:
13152  lex_state = EXPR_BEG; break;
13153  }
13154  if (c == '=') {
13155  if ((c = nextc()) == '>') {
13156  return tCMP;
13157  }
13158  pushback(c);
13159  return tLEQ;
13160  }
13161  if (c == '<') {
13162  if ((c = nextc()) == '=') {
13164  lex_state = EXPR_BEG;
13165  return tOP_ASGN;
13166  }
13167  pushback(c);
13168  warn_balanced("<<", "here document");
13169  return tLSHFT;
13170  }
13171  pushback(c);
13172  return '<';
13173 
13174  case '>':
13175  switch (lex_state) {
13176  case EXPR_FNAME: case EXPR_DOT:
13177  lex_state = EXPR_ARG; break;
13178  default:
13179  lex_state = EXPR_BEG; break;
13180  }
13181  if ((c = nextc()) == '=') {
13182  return tGEQ;
13183  }
13184  if (c == '>') {
13185  if ((c = nextc()) == '=') {
13187  lex_state = EXPR_BEG;
13188  return tOP_ASGN;
13189  }
13190  pushback(c);
13191  return tRSHFT;
13192  }
13193  pushback(c);
13194  return '>';
13195 
13196  case '"':
13197  lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
13198  return tSTRING_BEG;
13199 
13200  case '`':
13201  if (lex_state == EXPR_FNAME) {
13203  return c;
13204  }
13205  if (lex_state == EXPR_DOT) {
13206  if (cmd_state)
13208  else
13209  lex_state = EXPR_ARG;
13210  return c;
13211  }
13212  lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
13213  return tXSTRING_BEG;
13214 
13215  case '\'':
13216  lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
13217  return tSTRING_BEG;
13218 
13219  case '?':
13220  if (IS_END()) {
13222  return '?';
13223  }
13224  c = nextc();
13225  if (c == -1) {
13226  compile_error(PARSER_ARG "incomplete character syntax");
13227  return 0;
13228  }
13229  if (rb_enc_isspace(c, parser->enc)) {
13230  if (!IS_ARG()) {
13231  int c2 = 0;
13232  switch (c) {
13233  case ' ':
13234  c2 = 's';
13235  break;
13236  case '\n':
13237  c2 = 'n';
13238  break;
13239  case '\t':
13240  c2 = 't';
13241  break;
13242  case '\v':
13243  c2 = 'v';
13244  break;
13245  case '\r':
13246  c2 = 'r';
13247  break;
13248  case '\f':
13249  c2 = 'f';
13250  break;
13251  }
13252  if (c2) {
13253  rb_warnI("invalid character syntax; use ?\\%c", c2);
13254  }
13255  }
13256  ternary:
13257  pushback(c);
13259  return '?';
13260  }
13261  newtok();
13262  enc = parser->enc;
13263  if (!parser_isascii()) {
13264  if (tokadd_mbchar(c) == -1) return 0;
13265  }
13266  else if ((rb_enc_isalnum(c, parser->enc) || c == '_') &&
13267  lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) {
13268  goto ternary;
13269  }
13270  else if (c == '\\') {
13271  if (peek('u')) {
13272  nextc();
13273  c = parser_tokadd_utf8(parser, &enc, 0, 0, 0);
13274  if (0x80 <= c) {
13275  tokaddmbc(c, enc);
13276  }
13277  else {
13278  tokadd(c);
13279  }
13280  }
13281  else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) {
13282  nextc();
13283  if (tokadd_mbchar(c) == -1) return 0;
13284  }
13285  else {
13286  c = read_escape(0, &enc);
13287  tokadd(c);
13288  }
13289  }
13290  else {
13291  tokadd(c);
13292  }
13293  tokfix();
13294  set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0));
13295  lex_state = EXPR_END;
13296  return tCHAR;
13297 
13298  case '&':
13299  if ((c = nextc()) == '&') {
13300  lex_state = EXPR_BEG;
13301  if ((c = nextc()) == '=') {
13303  lex_state = EXPR_BEG;
13304  return tOP_ASGN;
13305  }
13306  pushback(c);
13307  return tANDOP;
13308  }
13309  else if (c == '=') {
13310  set_yylval_id('&');
13311  lex_state = EXPR_BEG;
13312  return tOP_ASGN;
13313  }
13314  pushback(c);
13315  if (IS_SPCARG(c)) {
13316  rb_warning0("`&' interpreted as argument prefix");
13317  c = tAMPER;
13318  }
13319  else if (IS_BEG()) {
13320  c = tAMPER;
13321  }
13322  else {
13323  warn_balanced("&", "argument prefix");
13324  c = '&';
13325  }
13326  switch (lex_state) {
13327  case EXPR_FNAME: case EXPR_DOT:
13328  lex_state = EXPR_ARG; break;
13329  default:
13330  lex_state = EXPR_BEG;
13331  }
13332  return c;
13333 
13334  case '|':
13335  if ((c = nextc()) == '|') {
13336  lex_state = EXPR_BEG;
13337  if ((c = nextc()) == '=') {
13339  lex_state = EXPR_BEG;
13340  return tOP_ASGN;
13341  }
13342  pushback(c);
13343  return tOROP;
13344  }
13345  if (c == '=') {
13346  set_yylval_id('|');
13347  lex_state = EXPR_BEG;
13348  return tOP_ASGN;
13349  }
13350  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13351  lex_state = EXPR_ARG;
13352  }
13353  else {
13354  lex_state = EXPR_BEG;
13355  }
13356  pushback(c);
13357  return '|';
13358 
13359  case '+':
13360  c = nextc();
13361  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13362  lex_state = EXPR_ARG;
13363  if (c == '@') {
13364  return tUPLUS;
13365  }
13366  pushback(c);
13367  return '+';
13368  }
13369  if (c == '=') {
13370  set_yylval_id('+');
13371  lex_state = EXPR_BEG;
13372  return tOP_ASGN;
13373  }
13374  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
13375  lex_state = EXPR_BEG;
13376  pushback(c);
13377  if (c != -1 && ISDIGIT(c)) {
13378  c = '+';
13379  goto start_num;
13380  }
13381  return tUPLUS;
13382  }
13383  lex_state = EXPR_BEG;
13384  pushback(c);
13385  warn_balanced("+", "unary operator");
13386  return '+';
13387 
13388  case '-':
13389  c = nextc();
13390  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13391  lex_state = EXPR_ARG;
13392  if (c == '@') {
13393  return tUMINUS;
13394  }
13395  pushback(c);
13396  return '-';
13397  }
13398  if (c == '=') {
13399  set_yylval_id('-');
13400  lex_state = EXPR_BEG;
13401  return tOP_ASGN;
13402  }
13403  if (c == '>') {
13404  lex_state = EXPR_ARG;
13405  return tLAMBDA;
13406  }
13407  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
13408  lex_state = EXPR_BEG;
13409  pushback(c);
13410  if (c != -1 && ISDIGIT(c)) {
13411  return tUMINUS_NUM;
13412  }
13413  return tUMINUS;
13414  }
13415  lex_state = EXPR_BEG;
13416  pushback(c);
13417  warn_balanced("-", "unary operator");
13418  return '-';
13419 
13420  case '.':
13421  lex_state = EXPR_BEG;
13422  if ((c = nextc()) == '.') {
13423  if ((c = nextc()) == '.') {
13424  return tDOT3;
13425  }
13426  pushback(c);
13427  return tDOT2;
13428  }
13429  pushback(c);
13430  if (c != -1 && ISDIGIT(c)) {
13431  yyerror("no .<digit> floating literal anymore; put 0 before dot");
13432  }
13433  lex_state = EXPR_DOT;
13434  return '.';
13435 
13436  start_num:
13437  case '0': case '1': case '2': case '3': case '4':
13438  case '5': case '6': case '7': case '8': case '9':
13439  {
13440  int is_float, seen_point, seen_e, nondigit;
13441 
13442  is_float = seen_point = seen_e = nondigit = 0;
13443  lex_state = EXPR_END;
13444  newtok();
13445  if (c == '-' || c == '+') {
13446  tokadd(c);
13447  c = nextc();
13448  }
13449  if (c == '0') {
13450 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0)
13451  int start = toklen();
13452  c = nextc();
13453  if (c == 'x' || c == 'X') {
13454  /* hexadecimal */
13455  c = nextc();
13456  if (c != -1 && ISXDIGIT(c)) {
13457  do {
13458  if (c == '_') {
13459  if (nondigit) break;
13460  nondigit = c;
13461  continue;
13462  }
13463  if (!ISXDIGIT(c)) break;
13464  nondigit = 0;
13465  tokadd(c);
13466  } while ((c = nextc()) != -1);
13467  }
13468  pushback(c);
13469  tokfix();
13470  if (toklen() == start) {
13471  no_digits();
13472  }
13473  else if (nondigit) goto trailing_uc;
13475  return tINTEGER;
13476  }
13477  if (c == 'b' || c == 'B') {
13478  /* binary */
13479  c = nextc();
13480  if (c == '0' || c == '1') {
13481  do {
13482  if (c == '_') {
13483  if (nondigit) break;
13484  nondigit = c;
13485  continue;
13486  }
13487  if (c != '0' && c != '1') break;
13488  nondigit = 0;
13489  tokadd(c);
13490  } while ((c = nextc()) != -1);
13491  }
13492  pushback(c);
13493  tokfix();
13494  if (toklen() == start) {
13495  no_digits();
13496  }
13497  else if (nondigit) goto trailing_uc;
13499  return tINTEGER;
13500  }
13501  if (c == 'd' || c == 'D') {
13502  /* decimal */
13503  c = nextc();
13504  if (c != -1 && ISDIGIT(c)) {
13505  do {
13506  if (c == '_') {
13507  if (nondigit) break;
13508  nondigit = c;
13509  continue;
13510  }
13511  if (!ISDIGIT(c)) break;
13512  nondigit = 0;
13513  tokadd(c);
13514  } while ((c = nextc()) != -1);
13515  }
13516  pushback(c);
13517  tokfix();
13518  if (toklen() == start) {
13519  no_digits();
13520  }
13521  else if (nondigit) goto trailing_uc;
13523  return tINTEGER;
13524  }
13525  if (c == '_') {
13526  /* 0_0 */
13527  goto octal_number;
13528  }
13529  if (c == 'o' || c == 'O') {
13530  /* prefixed octal */
13531  c = nextc();
13532  if (c == -1 || c == '_' || !ISDIGIT(c)) {
13533  no_digits();
13534  }
13535  }
13536  if (c >= '0' && c <= '7') {
13537  /* octal */
13538  octal_number:
13539  do {
13540  if (c == '_') {
13541  if (nondigit) break;
13542  nondigit = c;
13543  continue;
13544  }
13545  if (c < '0' || c > '9') break;
13546  if (c > '7') goto invalid_octal;
13547  nondigit = 0;
13548  tokadd(c);
13549  } while ((c = nextc()) != -1);
13550  if (toklen() > start) {
13551  pushback(c);
13552  tokfix();
13553  if (nondigit) goto trailing_uc;
13555  return tINTEGER;
13556  }
13557  if (nondigit) {
13558  pushback(c);
13559  goto trailing_uc;
13560  }
13561  }
13562  if (c > '7' && c <= '9') {
13563  invalid_octal:
13564  yyerror("Invalid octal digit");
13565  }
13566  else if (c == '.' || c == 'e' || c == 'E') {
13567  tokadd('0');
13568  }
13569  else {
13570  pushback(c);
13572  return tINTEGER;
13573  }
13574  }
13575 
13576  for (;;) {
13577  switch (c) {
13578  case '0': case '1': case '2': case '3': case '4':
13579  case '5': case '6': case '7': case '8': case '9':
13580  nondigit = 0;
13581  tokadd(c);
13582  break;
13583 
13584  case '.':
13585  if (nondigit) goto trailing_uc;
13586  if (seen_point || seen_e) {
13587  goto decode_num;
13588  }
13589  else {
13590  int c0 = nextc();
13591  if (c0 == -1 || !ISDIGIT(c0)) {
13592  pushback(c0);
13593  goto decode_num;
13594  }
13595  c = c0;
13596  }
13597  tokadd('.');
13598  tokadd(c);
13599  is_float++;
13600  seen_point++;
13601  nondigit = 0;
13602  break;
13603 
13604  case 'e':
13605  case 'E':
13606  if (nondigit) {
13607  pushback(c);
13608  c = nondigit;
13609  goto decode_num;
13610  }
13611  if (seen_e) {
13612  goto decode_num;
13613  }
13614  tokadd(c);
13615  seen_e++;
13616  is_float++;
13617  nondigit = c;
13618  c = nextc();
13619  if (c != '-' && c != '+') continue;
13620  tokadd(c);
13621  nondigit = c;
13622  break;
13623 
13624  case '_': /* `_' in number just ignored */
13625  if (nondigit) goto decode_num;
13626  nondigit = c;
13627  break;
13628 
13629  default:
13630  goto decode_num;
13631  }
13632  c = nextc();
13633  }
13634 
13635  decode_num:
13636  pushback(c);
13637  if (nondigit) {
13638  char tmp[30];
13639  trailing_uc:
13640  snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit);
13641  yyerror(tmp);
13642  }
13643  tokfix();
13644  if (is_float) {
13645  double d = strtod(tok(), 0);
13646  if (errno == ERANGE) {
13647  rb_warningS("Float %s out of range", tok());
13648  errno = 0;
13649  }
13651  return tFLOAT;
13652  }
13654  return tINTEGER;
13655  }
13656 
13657  case ')':
13658  case ']':
13659  paren_nest--;
13660  case '}':
13661  COND_LEXPOP();
13662  CMDARG_LEXPOP();
13663  if (c == ')')
13665  else
13667  return c;
13668 
13669  case ':':
13670  c = nextc();
13671  if (c == ':') {
13672  if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) {
13673  lex_state = EXPR_BEG;
13674  return tCOLON3;
13675  }
13676  lex_state = EXPR_DOT;
13677  return tCOLON2;
13678  }
13679  if (IS_END() || ISSPACE(c)) {
13680  pushback(c);
13681  warn_balanced(":", "symbol literal");
13682  lex_state = EXPR_BEG;
13683  return ':';
13684  }
13685  switch (c) {
13686  case '\'':
13687  lex_strterm = NEW_STRTERM(str_ssym, c, 0);
13688  break;
13689  case '"':
13690  lex_strterm = NEW_STRTERM(str_dsym, c, 0);
13691  break;
13692  default:
13693  pushback(c);
13694  break;
13695  }
13697  return tSYMBEG;
13698 
13699  case '/':
13700  if (IS_BEG()) {
13701  lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
13702  return tREGEXP_BEG;
13703  }
13704  if ((c = nextc()) == '=') {
13705  set_yylval_id('/');
13706  lex_state = EXPR_BEG;
13707  return tOP_ASGN;
13708  }
13709  pushback(c);
13710  if (IS_SPCARG(c)) {
13711  (void)arg_ambiguous();
13712  lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
13713  return tREGEXP_BEG;
13714  }
13715  switch (lex_state) {
13716  case EXPR_FNAME: case EXPR_DOT:
13717  lex_state = EXPR_ARG; break;
13718  default:
13719  lex_state = EXPR_BEG; break;
13720  }
13721  warn_balanced("/", "regexp literal");
13722  return '/';
13723 
13724  case '^':
13725  if ((c = nextc()) == '=') {
13726  set_yylval_id('^');
13727  lex_state = EXPR_BEG;
13728  return tOP_ASGN;
13729  }
13730  switch (lex_state) {
13731  case EXPR_FNAME: case EXPR_DOT:
13732  lex_state = EXPR_ARG; break;
13733  default:
13734  lex_state = EXPR_BEG; break;
13735  }
13736  pushback(c);
13737  return '^';
13738 
13739  case ';':
13740  lex_state = EXPR_BEG;
13741  command_start = TRUE;
13742  return ';';
13743 
13744  case ',':
13745  lex_state = EXPR_BEG;
13746  return ',';
13747 
13748  case '~':
13749  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13750  if ((c = nextc()) != '@') {
13751  pushback(c);
13752  }
13753  lex_state = EXPR_ARG;
13754  }
13755  else {
13756  lex_state = EXPR_BEG;
13757  }
13758  return '~';
13759 
13760  case '(':
13761  if (IS_BEG()) {
13762  c = tLPAREN;
13763  }
13764  else if (IS_SPCARG(-1)) {
13765  c = tLPAREN_ARG;
13766  }
13767  paren_nest++;
13768  COND_PUSH(0);
13769  CMDARG_PUSH(0);
13770  lex_state = EXPR_BEG;
13771  return c;
13772 
13773  case '[':
13774  paren_nest++;
13775  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13776  lex_state = EXPR_ARG;
13777  if ((c = nextc()) == ']') {
13778  if ((c = nextc()) == '=') {
13779  return tASET;
13780  }
13781  pushback(c);
13782  return tAREF;
13783  }
13784  pushback(c);
13785  return '[';
13786  }
13787  else if (IS_BEG()) {
13788  c = tLBRACK;
13789  }
13790  else if (IS_ARG() && space_seen) {
13791  c = tLBRACK;
13792  }
13793  lex_state = EXPR_BEG;
13794  COND_PUSH(0);
13795  CMDARG_PUSH(0);
13796  return c;
13797 
13798  case '{':
13799  if (lpar_beg && lpar_beg == paren_nest) {
13800  lex_state = EXPR_BEG;
13801  lpar_beg = 0;
13802  --paren_nest;
13803  COND_PUSH(0);
13804  CMDARG_PUSH(0);
13805  return tLAMBEG;
13806  }
13807  if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN)
13808  c = '{'; /* block (primary) */
13809  else if (lex_state == EXPR_ENDARG)
13810  c = tLBRACE_ARG; /* block (expr) */
13811  else
13812  c = tLBRACE; /* hash */
13813  COND_PUSH(0);
13814  CMDARG_PUSH(0);
13815  lex_state = EXPR_BEG;
13816  if (c != tLBRACE) command_start = TRUE;
13817  return c;
13818 
13819  case '\\':
13820  c = nextc();
13821  if (c == '\n') {
13822  space_seen = 1;
13823 #ifdef RIPPER
13824  ripper_dispatch_scan_event(parser, tSP);
13825 #endif
13826  goto retry; /* skip \\n */
13827  }
13828  pushback(c);
13829  return '\\';
13830 
13831  case '%':
13832  if (IS_BEG()) {
13833  int term;
13834  int paren;
13835 
13836  c = nextc();
13837  quotation:
13838  if (c == -1 || !ISALNUM(c)) {
13839  term = c;
13840  c = 'Q';
13841  }
13842  else {
13843  term = nextc();
13844  if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) {
13845  yyerror("unknown type of %string");
13846  return 0;
13847  }
13848  }
13849  if (c == -1 || term == -1) {
13850  compile_error(PARSER_ARG "unterminated quoted string meets end of file");
13851  return 0;
13852  }
13853  paren = term;
13854  if (term == '(') term = ')';
13855  else if (term == '[') term = ']';
13856  else if (term == '{') term = '}';
13857  else if (term == '<') term = '>';
13858  else paren = 0;
13859 
13860  switch (c) {
13861  case 'Q':
13862  lex_strterm = NEW_STRTERM(str_dquote, term, paren);
13863  return tSTRING_BEG;
13864 
13865  case 'q':
13866  lex_strterm = NEW_STRTERM(str_squote, term, paren);
13867  return tSTRING_BEG;
13868 
13869  case 'W':
13870  lex_strterm = NEW_STRTERM(str_dword, term, paren);
13871  do {c = nextc();} while (ISSPACE(c));
13872  pushback(c);
13873  return tWORDS_BEG;
13874 
13875  case 'w':
13876  lex_strterm = NEW_STRTERM(str_sword, term, paren);
13877  do {c = nextc();} while (ISSPACE(c));
13878  pushback(c);
13879  return tQWORDS_BEG;
13880 
13881  case 'x':
13882  lex_strterm = NEW_STRTERM(str_xquote, term, paren);
13883  return tXSTRING_BEG;
13884 
13885  case 'r':
13886  lex_strterm = NEW_STRTERM(str_regexp, term, paren);
13887  return tREGEXP_BEG;
13888 
13889  case 's':
13890  lex_strterm = NEW_STRTERM(str_ssym, term, paren);
13892  return tSYMBEG;
13893 
13894  default:
13895  yyerror("unknown type of %string");
13896  return 0;
13897  }
13898  }
13899  if ((c = nextc()) == '=') {
13900  set_yylval_id('%');
13901  lex_state = EXPR_BEG;
13902  return tOP_ASGN;
13903  }
13904  if (IS_SPCARG(c)) {
13905  goto quotation;
13906  }
13907  switch (lex_state) {
13908  case EXPR_FNAME: case EXPR_DOT:
13909  lex_state = EXPR_ARG; break;
13910  default:
13911  lex_state = EXPR_BEG; break;
13912  }
13913  pushback(c);
13914  warn_balanced("%%", "string literal");
13915  return '%';
13916 
13917  case '$':
13918  lex_state = EXPR_END;
13919  newtok();
13920  c = nextc();
13921  switch (c) {
13922  case '_': /* $_: last read line string */
13923  c = nextc();
13924  if (parser_is_identchar()) {
13925  tokadd('$');
13926  tokadd('_');
13927  break;
13928  }
13929  pushback(c);
13930  c = '_';
13931  /* fall through */
13932  case '~': /* $~: match-data */
13933  case '*': /* $*: argv */
13934  case '$': /* $$: pid */
13935  case '?': /* $?: last status */
13936  case '!': /* $!: error string */
13937  case '@': /* $@: error position */
13938  case '/': /* $/: input record separator */
13939  case '\\': /* $\: output record separator */
13940  case ';': /* $;: field separator */
13941  case ',': /* $,: output field separator */
13942  case '.': /* $.: last read line number */
13943  case '=': /* $=: ignorecase */
13944  case ':': /* $:: load path */
13945  case '<': /* $<: reading filename */
13946  case '>': /* $>: default output handle */
13947  case '\"': /* $": already loaded files */
13948  tokadd('$');
13949  tokadd(c);
13950  tokfix();
13952  return tGVAR;
13953 
13954  case '-':
13955  tokadd('$');
13956  tokadd(c);
13957  c = nextc();
13958  if (parser_is_identchar()) {
13959  if (tokadd_mbchar(c) == -1) return 0;
13960  }
13961  else {
13962  pushback(c);
13963  }
13964  gvar:
13965  tokfix();
13967  return tGVAR;
13968 
13969  case '&': /* $&: last match */
13970  case '`': /* $`: string before last match */
13971  case '\'': /* $': string after last match */
13972  case '+': /* $+: string matches last paren. */
13973  if (last_state == EXPR_FNAME) {
13974  tokadd('$');
13975  tokadd(c);
13976  goto gvar;
13977  }
13979  return tBACK_REF;
13980 
13981  case '1': case '2': case '3':
13982  case '4': case '5': case '6':
13983  case '7': case '8': case '9':
13984  tokadd('$');
13985  do {
13986  tokadd(c);
13987  c = nextc();
13988  } while (c != -1 && ISDIGIT(c));
13989  pushback(c);
13990  if (last_state == EXPR_FNAME) goto gvar;
13991  tokfix();
13992  set_yylval_node(NEW_NTH_REF(atoi(tok()+1)));
13993  return tNTH_REF;
13994 
13995  default:
13996  if (!parser_is_identchar()) {
13997  pushback(c);
13998  compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c);
13999  return 0;
14000  }
14001  case '0':
14002  tokadd('$');
14003  }
14004  break;
14005 
14006  case '@':
14007  c = nextc();
14008  newtok();
14009  tokadd('@');
14010  if (c == '@') {
14011  tokadd('@');
14012  c = nextc();
14013  }
14014  if (c != -1 && (ISDIGIT(c) || !parser_is_identchar())) {
14015  pushback(c);
14016  if (tokidx == 1) {
14017  compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c);
14018  }
14019  else {
14020  compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c);
14021  }
14022  return 0;
14023  }
14024  break;
14025 
14026  case '_':
14027  if (was_bol() && whole_match_p("__END__", 7, 0)) {
14028  ruby__end__seen = 1;
14029  parser->eofp = Qtrue;
14030 #ifndef RIPPER
14031  return -1;
14032 #else
14033  lex_goto_eol(parser);
14034  ripper_dispatch_scan_event(parser, k__END__);
14035  return 0;
14036 #endif
14037  }
14038  newtok();
14039  break;
14040 
14041  default:
14042  if (!parser_is_identchar()) {
14043  rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c);
14044  goto retry;
14045  }
14046 
14047  newtok();
14048  break;
14049  }
14050 
14051  mb = ENC_CODERANGE_7BIT;
14052  do {
14053  if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
14054  if (tokadd_mbchar(c) == -1) return 0;
14055  c = nextc();
14056  } while (parser_is_identchar());
14057  switch (tok()[0]) {
14058  case '@': case '$':
14059  pushback(c);
14060  break;
14061  default:
14062  if ((c == '!' || c == '?') && !peek('=')) {
14063  tokadd(c);
14064  }
14065  else {
14066  pushback(c);
14067  }
14068  }
14069  tokfix();
14070 
14071  {
14072  int result = 0;
14073 
14074  last_state = lex_state;
14075  switch (tok()[0]) {
14076  case '$':
14077  lex_state = EXPR_END;
14078  result = tGVAR;
14079  break;
14080  case '@':
14081  lex_state = EXPR_END;
14082  if (tok()[1] == '@')
14083  result = tCVAR;
14084  else
14085  result = tIVAR;
14086  break;
14087 
14088  default:
14089  if (toklast() == '!' || toklast() == '?') {
14090  result = tFID;
14091  }
14092  else {
14093  if (lex_state == EXPR_FNAME) {
14094  if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
14095  (!peek('=') || (peek_n('>', 1)))) {
14096  result = tIDENTIFIER;
14097  tokadd(c);
14098  tokfix();
14099  }
14100  else {
14101  pushback(c);
14102  }
14103  }
14104  if (result == 0 && ISUPPER(tok()[0])) {
14105  result = tCONSTANT;
14106  }
14107  else {
14108  result = tIDENTIFIER;
14109  }
14110  }
14111 
14112  if (IS_LABEL_POSSIBLE()) {
14113  if (IS_LABEL_SUFFIX(0)) {
14114  lex_state = EXPR_BEG;
14115  nextc();
14117  return tLABEL;
14118  }
14119  }
14120  if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) {
14121  const struct kwtable *kw;
14122 
14123  /* See if it is a reserved word. */
14124  kw = rb_reserved_word(tok(), toklen());
14125  if (kw) {
14126  enum lex_state_e state = lex_state;
14127  lex_state = kw->state;
14128  if (state == EXPR_FNAME) {
14130  return kw->id[0];
14131  }
14132  if (kw->id[0] == keyword_do) {
14133  command_start = TRUE;
14134  if (lpar_beg && lpar_beg == paren_nest) {
14135  lpar_beg = 0;
14136  --paren_nest;
14137  return keyword_do_LAMBDA;
14138  }
14139  if (COND_P()) return keyword_do_cond;
14140  if (CMDARG_P() && state != EXPR_CMDARG)
14141  return keyword_do_block;
14142  if (state == EXPR_ENDARG || state == EXPR_BEG)
14143  return keyword_do_block;
14144  return keyword_do;
14145  }
14146  if (state == EXPR_BEG || state == EXPR_VALUE)
14147  return kw->id[0];
14148  else {
14149  if (kw->id[0] != kw->id[1])
14150  lex_state = EXPR_BEG;
14151  return kw->id[1];
14152  }
14153  }
14154  }
14155 
14156  if (IS_BEG() ||
14157  lex_state == EXPR_DOT ||
14158  IS_ARG()) {
14159  if (cmd_state) {
14161  }
14162  else {
14163  lex_state = EXPR_ARG;
14164  }
14165  }
14166  else if (lex_state == EXPR_FNAME) {
14168  }
14169  else {
14170  lex_state = EXPR_END;
14171  }
14172  }
14173  {
14174  ID ident = TOK_INTERN(!ENC_SINGLE(mb));
14175 
14176  set_yylval_name(ident);
14177  if (last_state != EXPR_DOT && last_state != EXPR_FNAME &&
14178  is_local_id(ident) && lvar_defined(ident)) {
14179  lex_state = EXPR_END;
14180  }
14181  }
14182  return result;
14183  }
14184 }
14185 
14186 #if YYPURE
14187 static int
14188 yylex(void *lval, void *p)
14189 #else
14190 yylex(void *p)
14191 #endif
14192 {
14193  struct parser_params *parser = (struct parser_params*)p;
14194  int t;
14195 
14196 #if YYPURE
14197  parser->parser_yylval = lval;
14198  parser->parser_yylval->val = Qundef;
14199 #endif
14200  t = parser_yylex(parser);
14201 #ifdef RIPPER
14202  if (!NIL_P(parser->delayed)) {
14203  ripper_dispatch_delayed_token(parser, t);
14204  return t;
14205  }
14206  if (t != 0)
14207  ripper_dispatch_scan_event(parser, t);
14208 #endif
14209 
14210  return t;
14211 }
14212 
14213 #ifndef RIPPER
14214 static NODE*
14215 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
14216 {
14217  NODE *n = (rb_node_newnode)(type, a0, a1, a2);
14219  return n;
14220 }
14221 
14222 enum node_type
14223 nodetype(NODE *node) /* for debug */
14224 {
14225  return (enum node_type)nd_type(node);
14226 }
14227 
14228 int
14230 {
14231  return nd_line(node);
14232 }
14233 
14234 static NODE*
14236 {
14237  if (node) {
14238  node = remove_begin(node);
14239  node->flags |= NODE_FL_NEWLINE;
14240  }
14241  return node;
14242 }
14243 
14244 static void
14245 fixpos(NODE *node, NODE *orig)
14246 {
14247  if (!node) return;
14248  if (!orig) return;
14249  if (orig == (NODE*)1) return;
14250  nd_set_line(node, nd_line(orig));
14251 }
14252 
14253 static void
14254 parser_warning(struct parser_params *parser, NODE *node, const char *mesg)
14255 {
14256  rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg);
14257 }
14258 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg))
14259 
14260 static void
14261 parser_warn(struct parser_params *parser, NODE *node, const char *mesg)
14262 {
14263  rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg);
14264 }
14265 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg))
14266 
14267 static NODE*
14268 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail)
14269 {
14270  NODE *end, *h = head, *nd;
14271 
14272  if (tail == 0) return head;
14273 
14274  if (h == 0) return tail;
14275  switch (nd_type(h)) {
14276  case NODE_LIT:
14277  case NODE_STR:
14278  case NODE_SELF:
14279  case NODE_TRUE:
14280  case NODE_FALSE:
14281  case NODE_NIL:
14282  parser_warning(h, "unused literal ignored");
14283  return tail;
14284  default:
14285  h = end = NEW_BLOCK(head);
14286  end->nd_end = end;
14287  fixpos(end, head);
14288  head = end;
14289  break;
14290  case NODE_BLOCK:
14291  end = h->nd_end;
14292  break;
14293  }
14294 
14295  nd = end->nd_head;
14296  switch (nd_type(nd)) {
14297  case NODE_RETURN:
14298  case NODE_BREAK:
14299  case NODE_NEXT:
14300  case NODE_REDO:
14301  case NODE_RETRY:
14302  if (RTEST(ruby_verbose)) {
14303  parser_warning(nd, "statement not reached");
14304  }
14305  break;
14306 
14307  default:
14308  break;
14309  }
14310 
14311  if (nd_type(tail) != NODE_BLOCK) {
14312  tail = NEW_BLOCK(tail);
14313  tail->nd_end = tail;
14314  }
14315  end->nd_next = tail;
14316  h->nd_end = tail->nd_end;
14317  return head;
14318 }
14319 
14320 /* append item to the list */
14321 static NODE*
14322 list_append_gen(struct parser_params *parser, NODE *list, NODE *item)
14323 {
14324  NODE *last;
14325 
14326  if (list == 0) return NEW_LIST(item);
14327  if (list->nd_next) {
14328  last = list->nd_next->nd_end;
14329  }
14330  else {
14331  last = list;
14332  }
14333 
14334  list->nd_alen += 1;
14335  last->nd_next = NEW_LIST(item);
14336  list->nd_next->nd_end = last->nd_next;
14337  return list;
14338 }
14339 
14340 /* concat two lists */
14341 static NODE*
14342 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
14343 {
14344  NODE *last;
14345 
14346  if (head->nd_next) {
14347  last = head->nd_next->nd_end;
14348  }
14349  else {
14350  last = head;
14351  }
14352 
14353  head->nd_alen += tail->nd_alen;
14354  last->nd_next = tail;
14355  if (tail->nd_next) {
14356  head->nd_next->nd_end = tail->nd_next->nd_end;
14357  }
14358  else {
14359  head->nd_next->nd_end = tail;
14360  }
14361 
14362  return head;
14363 }
14364 
14365 static int
14366 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail)
14367 {
14368  if (NIL_P(tail)) return 1;
14369  if (!rb_enc_compatible(head, tail)) {
14370  compile_error(PARSER_ARG "string literal encodings differ (%s / %s)",
14371  rb_enc_name(rb_enc_get(head)),
14372  rb_enc_name(rb_enc_get(tail)));
14373  rb_str_resize(head, 0);
14374  rb_str_resize(tail, 0);
14375  return 0;
14376  }
14377  rb_str_buf_append(head, tail);
14378  return 1;
14379 }
14380 
14381 /* concat two string literals */
14382 static NODE *
14383 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
14384 {
14385  enum node_type htype;
14386 
14387  if (!head) return tail;
14388  if (!tail) return head;
14389 
14390  htype = nd_type(head);
14391  if (htype == NODE_EVSTR) {
14392  NODE *node = NEW_DSTR(Qnil);
14393  head = list_append(node, head);
14394  }
14395  switch (nd_type(tail)) {
14396  case NODE_STR:
14397  if (htype == NODE_STR) {
14398  if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) {
14399  error:
14400  rb_gc_force_recycle((VALUE)head);
14401  rb_gc_force_recycle((VALUE)tail);
14402  return 0;
14403  }
14404  rb_gc_force_recycle((VALUE)tail);
14405  }
14406  else {
14407  list_append(head, tail);
14408  }
14409  break;
14410 
14411  case NODE_DSTR:
14412  if (htype == NODE_STR) {
14413  if (!literal_concat0(parser, head->nd_lit, tail->nd_lit))
14414  goto error;
14415  tail->nd_lit = head->nd_lit;
14416  rb_gc_force_recycle((VALUE)head);
14417  head = tail;
14418  }
14419  else if (NIL_P(tail->nd_lit)) {
14420  head->nd_alen += tail->nd_alen - 1;
14421  head->nd_next->nd_end->nd_next = tail->nd_next;
14422  head->nd_next->nd_end = tail->nd_next->nd_end;
14423  rb_gc_force_recycle((VALUE)tail);
14424  }
14425  else {
14426  nd_set_type(tail, NODE_ARRAY);
14427  tail->nd_head = NEW_STR(tail->nd_lit);
14428  list_concat(head, tail);
14429  }
14430  break;
14431 
14432  case NODE_EVSTR:
14433  if (htype == NODE_STR) {
14434  nd_set_type(head, NODE_DSTR);
14435  head->nd_alen = 1;
14436  }
14437  list_append(head, tail);
14438  break;
14439  }
14440  return head;
14441 }
14442 
14443 static NODE *
14444 evstr2dstr_gen(struct parser_params *parser, NODE *node)
14445 {
14446  if (nd_type(node) == NODE_EVSTR) {
14447  node = list_append(NEW_DSTR(Qnil), node);
14448  }
14449  return node;
14450 }
14451 
14452 static NODE *
14453 new_evstr_gen(struct parser_params *parser, NODE *node)
14454 {
14455  NODE *head = node;
14456 
14457  if (node) {
14458  switch (nd_type(node)) {
14459  case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
14460  return node;
14461  }
14462  }
14463  return NEW_EVSTR(head);
14464 }
14465 
14466 static NODE *
14467 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1)
14468 {
14469  value_expr(recv);
14470  value_expr(arg1);
14471  return NEW_CALL(recv, id, NEW_LIST(arg1));
14472 }
14473 
14474 static NODE *
14475 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id)
14476 {
14477  value_expr(recv);
14478  return NEW_CALL(recv, id, 0);
14479 }
14480 
14481 static NODE*
14482 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14483 {
14484  value_expr(node1);
14485  value_expr(node2);
14486  if (node1) {
14487  switch (nd_type(node1)) {
14488  case NODE_DREGX:
14489  case NODE_DREGX_ONCE:
14490  return NEW_MATCH2(node1, node2);
14491 
14492  case NODE_LIT:
14493  if (TYPE(node1->nd_lit) == T_REGEXP) {
14494  return NEW_MATCH2(node1, node2);
14495  }
14496  }
14497  }
14498 
14499  if (node2) {
14500  switch (nd_type(node2)) {
14501  case NODE_DREGX:
14502  case NODE_DREGX_ONCE:
14503  return NEW_MATCH3(node2, node1);
14504 
14505  case NODE_LIT:
14506  if (TYPE(node2->nd_lit) == T_REGEXP) {
14507  return NEW_MATCH3(node2, node1);
14508  }
14509  }
14510  }
14511 
14512  return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
14513 }
14514 
14515 static NODE*
14516 gettable_gen(struct parser_params *parser, ID id)
14517 {
14518  if (id == keyword_self) {
14519  return NEW_SELF();
14520  }
14521  else if (id == keyword_nil) {
14522  return NEW_NIL();
14523  }
14524  else if (id == keyword_true) {
14525  return NEW_TRUE();
14526  }
14527  else if (id == keyword_false) {
14528  return NEW_FALSE();
14529  }
14530  else if (id == keyword__FILE__) {
14533  }
14534  else if (id == keyword__LINE__) {
14535  return NEW_LIT(INT2FIX(ruby_sourceline));
14536  }
14537  else if (id == keyword__ENCODING__) {
14538  return NEW_LIT(rb_enc_from_encoding(parser->enc));
14539  }
14540  else if (is_local_id(id)) {
14541  if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id);
14542  if (local_id(id)) return NEW_LVAR(id);
14543  /* method call without arguments */
14544  return NEW_VCALL(id);
14545  }
14546  else if (is_global_id(id)) {
14547  return NEW_GVAR(id);
14548  }
14549  else if (is_instance_id(id)) {
14550  return NEW_IVAR(id);
14551  }
14552  else if (is_const_id(id)) {
14553  return NEW_CONST(id);
14554  }
14555  else if (is_class_id(id)) {
14556  return NEW_CVAR(id);
14557  }
14558  compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
14559  return 0;
14560 }
14561 #else /* !RIPPER */
14562 static int
14563 id_is_var_gen(struct parser_params *parser, ID id)
14564 {
14565  if (is_notop_id(id)) {
14566  switch (id & ID_SCOPE_MASK) {
14567  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
14568  return 1;
14569  case ID_LOCAL:
14570  if (dyna_in_block() && dvar_defined(id)) return 1;
14571  if (local_id(id)) return 1;
14572  /* method call without arguments */
14573  return 0;
14574  }
14575  }
14576  compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
14577  return 0;
14578 }
14579 #endif /* !RIPPER */
14580 
14581 #ifdef RIPPER
14582 static VALUE
14583 assignable_gen(struct parser_params *parser, VALUE lhs)
14584 #else
14585 static NODE*
14586 assignable_gen(struct parser_params *parser, ID id, NODE *val)
14587 #endif
14588 {
14589 #ifdef RIPPER
14590  ID id = get_id(lhs);
14591 # define assignable_result(x) get_value(lhs)
14592 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs)
14593 #else
14594 # define assignable_result(x) (x)
14595 #endif
14596  if (!id) return assignable_result(0);
14597  if (id == keyword_self) {
14598  yyerror("Can't change the value of self");
14599  }
14600  else if (id == keyword_nil) {
14601  yyerror("Can't assign to nil");
14602  }
14603  else if (id == keyword_true) {
14604  yyerror("Can't assign to true");
14605  }
14606  else if (id == keyword_false) {
14607  yyerror("Can't assign to false");
14608  }
14609  else if (id == keyword__FILE__) {
14610  yyerror("Can't assign to __FILE__");
14611  }
14612  else if (id == keyword__LINE__) {
14613  yyerror("Can't assign to __LINE__");
14614  }
14615  else if (id == keyword__ENCODING__) {
14616  yyerror("Can't assign to __ENCODING__");
14617  }
14618  else if (is_local_id(id)) {
14619  if (dyna_in_block()) {
14620  if (dvar_curr(id)) {
14621  return assignable_result(NEW_DASGN_CURR(id, val));
14622  }
14623  else if (dvar_defined(id)) {
14624  return assignable_result(NEW_DASGN(id, val));
14625  }
14626  else if (local_id(id)) {
14627  return assignable_result(NEW_LASGN(id, val));
14628  }
14629  else {
14630  dyna_var(id);
14631  return assignable_result(NEW_DASGN_CURR(id, val));
14632  }
14633  }
14634  else {
14635  if (!local_id(id)) {
14636  local_var(id);
14637  }
14638  return assignable_result(NEW_LASGN(id, val));
14639  }
14640  }
14641  else if (is_global_id(id)) {
14642  return assignable_result(NEW_GASGN(id, val));
14643  }
14644  else if (is_instance_id(id)) {
14645  return assignable_result(NEW_IASGN(id, val));
14646  }
14647  else if (is_const_id(id)) {
14648  if (!in_def && !in_single)
14649  return assignable_result(NEW_CDECL(id, val, 0));
14650  yyerror("dynamic constant assignment");
14651  }
14652  else if (is_class_id(id)) {
14653  return assignable_result(NEW_CVASGN(id, val));
14654  }
14655  else {
14656  compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id));
14657  }
14658  return assignable_result(0);
14659 #undef assignable_result
14660 #undef parser_yyerror
14661 }
14662 
14663 #define LVAR_USED ((int)1 << (sizeof(int) * CHAR_BIT - 1))
14664 
14665 static ID
14666 shadowing_lvar_gen(struct parser_params *parser, ID name)
14667 {
14668  if (idUScore == name) return name;
14669  if (dyna_in_block()) {
14670  if (dvar_curr(name)) {
14671  yyerror("duplicated argument name");
14672  }
14673  else if (dvar_defined_get(name) || local_id(name)) {
14674  rb_warningS("shadowing outer local variable - %s", rb_id2name(name));
14675  vtable_add(lvtbl->vars, name);
14676  if (lvtbl->used) {
14678  }
14679  }
14680  }
14681  else {
14682  if (local_id(name)) {
14683  yyerror("duplicated argument name");
14684  }
14685  }
14686  return name;
14687 }
14688 
14689 static void
14690 new_bv_gen(struct parser_params *parser, ID name)
14691 {
14692  if (!name) return;
14693  if (!is_local_id(name)) {
14694  compile_error(PARSER_ARG "invalid local variable - %s",
14695  rb_id2name(name));
14696  return;
14697  }
14698  shadowing_lvar(name);
14699  dyna_var(name);
14700 }
14701 
14702 #ifndef RIPPER
14703 static NODE *
14704 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx)
14705 {
14706  if (recv && nd_type(recv) == NODE_SELF)
14707  recv = (NODE *)1;
14708  return NEW_ATTRASGN(recv, tASET, idx);
14709 }
14710 
14711 static void
14712 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14713 {
14714  if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
14715  compile_error(PARSER_ARG "both block arg and actual block given");
14716  }
14717 }
14718 
14719 ID
14721 {
14722  id &= ~ID_SCOPE_MASK;
14723  id |= ID_ATTRSET;
14724  return id;
14725 }
14726 
14727 static NODE *
14728 attrset_gen(struct parser_params *parser, NODE *recv, ID id)
14729 {
14730  if (recv && nd_type(recv) == NODE_SELF)
14731  recv = (NODE *)1;
14732  return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
14733 }
14734 
14735 static void
14737 {
14738  switch (nd_type(node)) {
14739  case NODE_NTH_REF:
14740  compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth);
14741  break;
14742  case NODE_BACK_REF:
14743  compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth);
14744  break;
14745  }
14746 }
14747 
14748 static NODE *
14749 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14750 {
14751  if (!node2) return node1;
14752  switch (nd_type(node1)) {
14753  case NODE_BLOCK_PASS:
14754  if (node1->nd_head)
14755  node1->nd_head = arg_concat(node1->nd_head, node2);
14756  else
14757  node1->nd_head = NEW_LIST(node2);
14758  return node1;
14759  case NODE_ARGSPUSH:
14760  if (nd_type(node2) != NODE_ARRAY) break;
14761  node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2);
14762  nd_set_type(node1, NODE_ARGSCAT);
14763  return node1;
14764  case NODE_ARGSCAT:
14765  if (nd_type(node2) != NODE_ARRAY ||
14766  nd_type(node1->nd_body) != NODE_ARRAY) break;
14767  node1->nd_body = list_concat(node1->nd_body, node2);
14768  return node1;
14769  }
14770  return NEW_ARGSCAT(node1, node2);
14771 }
14772 
14773 static NODE *
14774 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14775 {
14776  if (!node1) return NEW_LIST(node2);
14777  switch (nd_type(node1)) {
14778  case NODE_ARRAY:
14779  return list_append(node1, node2);
14780  case NODE_BLOCK_PASS:
14781  node1->nd_head = arg_append(node1->nd_head, node2);
14782  return node1;
14783  case NODE_ARGSPUSH:
14784  node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2);
14785  nd_set_type(node1, NODE_ARGSCAT);
14786  return node1;
14787  }
14788  return NEW_ARGSPUSH(node1, node2);
14789 }
14790 
14791 static NODE *
14793 {
14794  if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
14795  if (nd_type(node) == NODE_ARRAY) return node;
14796  return 0;
14797 }
14798 
14799 static NODE *
14800 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs)
14801 {
14802  if (!lhs) return 0;
14803 
14804  switch (nd_type(lhs)) {
14805  case NODE_GASGN:
14806  case NODE_IASGN:
14807  case NODE_IASGN2:
14808  case NODE_LASGN:
14809  case NODE_DASGN:
14810  case NODE_DASGN_CURR:
14811  case NODE_MASGN:
14812  case NODE_CDECL:
14813  case NODE_CVASGN:
14814  lhs->nd_value = rhs;
14815  break;
14816 
14817  case NODE_ATTRASGN:
14818  case NODE_CALL:
14819  lhs->nd_args = arg_append(lhs->nd_args, rhs);
14820  break;
14821 
14822  default:
14823  /* should not happen */
14824  break;
14825  }
14826 
14827  return lhs;
14828 }
14829 
14830 static int
14831 value_expr_gen(struct parser_params *parser, NODE *node)
14832 {
14833  int cond = 0;
14834 
14835  if (!node) {
14836  rb_warning0("empty expression");
14837  }
14838  while (node) {
14839  switch (nd_type(node)) {
14840  case NODE_DEFN:
14841  case NODE_DEFS:
14842  parser_warning(node, "void value expression");
14843  return FALSE;
14844 
14845  case NODE_RETURN:
14846  case NODE_BREAK:
14847  case NODE_NEXT:
14848  case NODE_REDO:
14849  case NODE_RETRY:
14850  if (!cond) yyerror("void value expression");
14851  /* or "control never reach"? */
14852  return FALSE;
14853 
14854  case NODE_BLOCK:
14855  while (node->nd_next) {
14856  node = node->nd_next;
14857  }
14858  node = node->nd_head;
14859  break;
14860 
14861  case NODE_BEGIN:
14862  node = node->nd_body;
14863  break;
14864 
14865  case NODE_IF:
14866  if (!node->nd_body) {
14867  node = node->nd_else;
14868  break;
14869  }
14870  else if (!node->nd_else) {
14871  node = node->nd_body;
14872  break;
14873  }
14874  if (!value_expr(node->nd_body)) return FALSE;
14875  node = node->nd_else;
14876  break;
14877 
14878  case NODE_AND:
14879  case NODE_OR:
14880  cond = 1;
14881  node = node->nd_2nd;
14882  break;
14883 
14884  default:
14885  return TRUE;
14886  }
14887  }
14888 
14889  return TRUE;
14890 }
14891 
14892 static void
14893 void_expr_gen(struct parser_params *parser, NODE *node)
14894 {
14895  const char *useless = 0;
14896 
14897  if (!RTEST(ruby_verbose)) return;
14898 
14899  if (!node) return;
14900  switch (nd_type(node)) {
14901  case NODE_CALL:
14902  switch (node->nd_mid) {
14903  case '+':
14904  case '-':
14905  case '*':
14906  case '/':
14907  case '%':
14908  case tPOW:
14909  case tUPLUS:
14910  case tUMINUS:
14911  case '|':
14912  case '^':
14913  case '&':
14914  case tCMP:
14915  case '>':
14916  case tGEQ:
14917  case '<':
14918  case tLEQ:
14919  case tEQ:
14920  case tNEQ:
14921  useless = rb_id2name(node->nd_mid);
14922  break;
14923  }
14924  break;
14925 
14926  case NODE_LVAR:
14927  case NODE_DVAR:
14928  case NODE_GVAR:
14929  case NODE_IVAR:
14930  case NODE_CVAR:
14931  case NODE_NTH_REF:
14932  case NODE_BACK_REF:
14933  useless = "a variable";
14934  break;
14935  case NODE_CONST:
14936  useless = "a constant";
14937  break;
14938  case NODE_LIT:
14939  case NODE_STR:
14940  case NODE_DSTR:
14941  case NODE_DREGX:
14942  case NODE_DREGX_ONCE:
14943  useless = "a literal";
14944  break;
14945  case NODE_COLON2:
14946  case NODE_COLON3:
14947  useless = "::";
14948  break;
14949  case NODE_DOT2:
14950  useless = "..";
14951  break;
14952  case NODE_DOT3:
14953  useless = "...";
14954  break;
14955  case NODE_SELF:
14956  useless = "self";
14957  break;
14958  case NODE_NIL:
14959  useless = "nil";
14960  break;
14961  case NODE_TRUE:
14962  useless = "true";
14963  break;
14964  case NODE_FALSE:
14965  useless = "false";
14966  break;
14967  case NODE_DEFINED:
14968  useless = "defined?";
14969  break;
14970  }
14971 
14972  if (useless) {
14973  int line = ruby_sourceline;
14974 
14975  ruby_sourceline = nd_line(node);
14976  rb_warnS("possibly useless use of %s in void context", useless);
14977  ruby_sourceline = line;
14978  }
14979 }
14980 
14981 static void
14982 void_stmts_gen(struct parser_params *parser, NODE *node)
14983 {
14984  if (!RTEST(ruby_verbose)) return;
14985  if (!node) return;
14986  if (nd_type(node) != NODE_BLOCK) return;
14987 
14988  for (;;) {
14989  if (!node->nd_next) return;
14990  void_expr0(node->nd_head);
14991  node = node->nd_next;
14992  }
14993 }
14994 
14995 static NODE *
14997 {
14998  NODE **n = &node, *n1 = node;
14999  while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
15000  *n = n1 = n1->nd_body;
15001  }
15002  return node;
15003 }
15004 
15005 static void
15006 reduce_nodes_gen(struct parser_params *parser, NODE **body)
15007 {
15008  NODE *node = *body;
15009 
15010  if (!node) {
15011  *body = NEW_NIL();
15012  return;
15013  }
15014 #define subnodes(n1, n2) \
15015  ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
15016  (!node->n2) ? (body = &node->n1, 1) : \
15017  (reduce_nodes(&node->n1), body = &node->n2, 1))
15018 
15019  while (node) {
15020  int newline = (int)(node->flags & NODE_FL_NEWLINE);
15021  switch (nd_type(node)) {
15022  end:
15023  case NODE_NIL:
15024  *body = 0;
15025  return;
15026  case NODE_RETURN:
15027  *body = node = node->nd_stts;
15028  if (newline && node) node->flags |= NODE_FL_NEWLINE;
15029  continue;
15030  case NODE_BEGIN:
15031  *body = node = node->nd_body;
15032  if (newline && node) node->flags |= NODE_FL_NEWLINE;
15033  continue;
15034  case NODE_BLOCK:
15035  body = &node->nd_end->nd_head;
15036  break;
15037  case NODE_IF:
15038  if (subnodes(nd_body, nd_else)) break;
15039  return;
15040  case NODE_CASE:
15041  body = &node->nd_body;
15042  break;
15043  case NODE_WHEN:
15044  if (!subnodes(nd_body, nd_next)) goto end;
15045  break;
15046  case NODE_ENSURE:
15047  if (!subnodes(nd_head, nd_resq)) goto end;
15048  break;
15049  case NODE_RESCUE:
15050  if (node->nd_else) {
15051  body = &node->nd_resq;
15052  break;
15053  }
15054  if (!subnodes(nd_head, nd_resq)) goto end;
15055  break;
15056  default:
15057  return;
15058  }
15059  node = *body;
15060  if (newline && node) node->flags |= NODE_FL_NEWLINE;
15061  }
15062 
15063 #undef subnodes
15064 }
15065 
15066 static int
15067 assign_in_cond(struct parser_params *parser, NODE *node)
15068 {
15069  switch (nd_type(node)) {
15070  case NODE_MASGN:
15071  yyerror("multiple assignment in conditional");
15072  return 1;
15073 
15074  case NODE_LASGN:
15075  case NODE_DASGN:
15076  case NODE_DASGN_CURR:
15077  case NODE_GASGN:
15078  case NODE_IASGN:
15079  break;
15080 
15081  default:
15082  return 0;
15083  }
15084 
15085  if (!node->nd_value) return 1;
15086  switch (nd_type(node->nd_value)) {
15087  case NODE_LIT:
15088  case NODE_STR:
15089  case NODE_NIL:
15090  case NODE_TRUE:
15091  case NODE_FALSE:
15092  /* reports always */
15093  parser_warn(node->nd_value, "found = in conditional, should be ==");
15094  return 1;
15095 
15096  case NODE_DSTR:
15097  case NODE_XSTR:
15098  case NODE_DXSTR:
15099  case NODE_EVSTR:
15100  case NODE_DREGX:
15101  default:
15102  break;
15103  }
15104  return 1;
15105 }
15106 
15107 static void
15108 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
15109 {
15110  if (!e_option_supplied(parser)) parser_warn(node, str);
15111 }
15112 
15113 static void
15114 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
15115 {
15116  if (!e_option_supplied(parser)) parser_warning(node, str);
15117 }
15118 
15119 static void
15120 fixup_nodes(NODE **rootnode)
15121 {
15122  NODE *node, *next, *head;
15123 
15124  for (node = *rootnode; node; node = next) {
15125  enum node_type type;
15126  VALUE val;
15127 
15128  next = node->nd_next;
15129  head = node->nd_head;
15130  rb_gc_force_recycle((VALUE)node);
15131  *rootnode = next;
15132  switch (type = nd_type(head)) {
15133  case NODE_DOT2:
15134  case NODE_DOT3:
15135  val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit,
15136  type == NODE_DOT3);
15137  rb_gc_force_recycle((VALUE)head->nd_beg);
15138  rb_gc_force_recycle((VALUE)head->nd_end);
15139  nd_set_type(head, NODE_LIT);
15140  head->nd_lit = val;
15141  break;
15142  default:
15143  break;
15144  }
15145  }
15146 }
15147 
15148 static NODE *cond0(struct parser_params*,NODE*);
15149 
15150 static NODE*
15151 range_op(struct parser_params *parser, NODE *node)
15152 {
15153  enum node_type type;
15154 
15155  if (node == 0) return 0;
15156 
15157  type = nd_type(node);
15158  value_expr(node);
15159  if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
15160  warn_unless_e_option(parser, node, "integer literal in conditional range");
15161  return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."))));
15162  }
15163  return cond0(parser, node);
15164 }
15165 
15166 static int
15168 {
15169  if (!node) return 1; /* same as NODE_NIL */
15170  switch (nd_type(node)) {
15171  case NODE_LIT:
15172  case NODE_STR:
15173  case NODE_DSTR:
15174  case NODE_EVSTR:
15175  case NODE_DREGX:
15176  case NODE_DREGX_ONCE:
15177  case NODE_DSYM:
15178  return 2;
15179  case NODE_TRUE:
15180  case NODE_FALSE:
15181  case NODE_NIL:
15182  return 1;
15183  }
15184  return 0;
15185 }
15186 
15187 static NODE*
15188 cond0(struct parser_params *parser, NODE *node)
15189 {
15190  if (node == 0) return 0;
15191  assign_in_cond(parser, node);
15192 
15193  switch (nd_type(node)) {
15194  case NODE_DSTR:
15195  case NODE_EVSTR:
15196  case NODE_STR:
15197  rb_warn0("string literal in condition");
15198  break;
15199 
15200  case NODE_DREGX:
15201  case NODE_DREGX_ONCE:
15202  warning_unless_e_option(parser, node, "regex literal in condition");
15203  return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
15204 
15205  case NODE_AND:
15206  case NODE_OR:
15207  node->nd_1st = cond0(parser, node->nd_1st);
15208  node->nd_2nd = cond0(parser, node->nd_2nd);
15209  break;
15210 
15211  case NODE_DOT2:
15212  case NODE_DOT3:
15213  node->nd_beg = range_op(parser, node->nd_beg);
15214  node->nd_end = range_op(parser, node->nd_end);
15215  if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
15216  else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
15217  if (!e_option_supplied(parser)) {
15218  int b = literal_node(node->nd_beg);
15219  int e = literal_node(node->nd_end);
15220  if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
15221  parser_warn(node, "range literal in condition");
15222  }
15223  }
15224  break;
15225 
15226  case NODE_DSYM:
15227  parser_warning(node, "literal in condition");
15228  break;
15229 
15230  case NODE_LIT:
15231  if (TYPE(node->nd_lit) == T_REGEXP) {
15232  warn_unless_e_option(parser, node, "regex literal in condition");
15233  nd_set_type(node, NODE_MATCH);
15234  }
15235  else {
15236  parser_warning(node, "literal in condition");
15237  }
15238  default:
15239  break;
15240  }
15241  return node;
15242 }
15243 
15244 static NODE*
15245 cond_gen(struct parser_params *parser, NODE *node)
15246 {
15247  if (node == 0) return 0;
15248  return cond0(parser, node);
15249 }
15250 
15251 static NODE*
15252 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right)
15253 {
15254  value_expr(left);
15255  if (left && (enum node_type)nd_type(left) == type) {
15256  NODE *node = left, *second;
15257  while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
15258  node = second;
15259  }
15260  node->nd_2nd = NEW_NODE(type, second, right, 0);
15261  return left;
15262  }
15263  return NEW_NODE(type, left, right, 0);
15264 }
15265 
15266 static void
15267 no_blockarg(struct parser_params *parser, NODE *node)
15268 {
15269  if (node && nd_type(node) == NODE_BLOCK_PASS) {
15270  compile_error(PARSER_ARG "block argument should not be given");
15271  }
15272 }
15273 
15274 static NODE *
15275 ret_args_gen(struct parser_params *parser, NODE *node)
15276 {
15277  if (node) {
15278  no_blockarg(parser, node);
15279  if (nd_type(node) == NODE_ARRAY) {
15280  if (node->nd_next == 0) {
15281  node = node->nd_head;
15282  }
15283  else {
15284  nd_set_type(node, NODE_VALUES);
15285  }
15286  }
15287  }
15288  return node;
15289 }
15290 
15291 static NODE *
15292 new_yield_gen(struct parser_params *parser, NODE *node)
15293 {
15294  long state = Qtrue;
15295 
15296  if (node) {
15297  no_blockarg(parser, node);
15298  if (node && nd_type(node) == NODE_SPLAT) {
15299  state = Qtrue;
15300  }
15301  }
15302  else {
15303  state = Qfalse;
15304  }
15305  return NEW_YIELD(node, state);
15306 }
15307 
15308 static NODE*
15310 {
15311  switch (TYPE(node->nd_lit)) {
15312  case T_FIXNUM:
15313  node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
15314  break;
15315  case T_BIGNUM:
15316  node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
15317  break;
15318  case T_FLOAT:
15319  RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit);
15320  break;
15321  default:
15322  break;
15323  }
15324  return node;
15325 }
15326 
15327 static NODE *
15328 arg_blk_pass(NODE *node1, NODE *node2)
15329 {
15330  if (node2) {
15331  node2->nd_head = node1;
15332  return node2;
15333  }
15334  return node1;
15335 }
15336 
15337 static NODE*
15338 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b)
15339 {
15340  int saved_line = ruby_sourceline;
15341  NODE *node;
15342  NODE *i1, *i2 = 0;
15343 
15344  node = NEW_ARGS(m ? m->nd_plen : 0, o);
15345  i1 = m ? m->nd_next : 0;
15346  node->nd_next = NEW_ARGS_AUX(r, b);
15347 
15348  if (p) {
15349  i2 = p->nd_next;
15350  node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen);
15351  }
15352  else if (i1) {
15353  node->nd_next->nd_next = NEW_ARGS_AUX(0, 0);
15354  }
15355  if (i1 || i2) {
15356  node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0);
15357  }
15358  ruby_sourceline = saved_line;
15359  return node;
15360 }
15361 #endif /* !RIPPER */
15362 
15363 static void
15364 warn_unused_var(struct parser_params *parser, struct local_vars *local)
15365 {
15366  int i, cnt;
15367  ID *v, *u;
15368 
15369  if (!local->used) return;
15370  v = local->vars->tbl;
15371  u = local->used->tbl;
15372  cnt = local->used->pos;
15373  if (cnt != local->vars->pos) {
15374  rb_bug("local->used->pos != local->vars->pos");
15375  }
15376  for (i = 0; i < cnt; ++i) {
15377  if (!v[i] || (u[i] & LVAR_USED)) continue;
15378  if (idUScore == v[i]) continue;
15379  rb_compile_warn(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i]));
15380  }
15381 }
15382 
15383 static void
15384 local_push_gen(struct parser_params *parser, int inherit_dvars)
15385 {
15386  struct local_vars *local;
15387 
15388  local = ALLOC(struct local_vars);
15389  local->prev = lvtbl;
15390  local->args = vtable_alloc(0);
15391  local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
15392  local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0;
15393  lvtbl = local;
15394 }
15395 
15396 static void
15398 {
15399  struct local_vars *local = lvtbl->prev;
15400  if (lvtbl->used) {
15401  warn_unused_var(parser, lvtbl);
15402  vtable_free(lvtbl->used);
15403  }
15404  vtable_free(lvtbl->args);
15405  vtable_free(lvtbl->vars);
15406  xfree(lvtbl);
15407  lvtbl = local;
15408 }
15409 
15410 #ifndef RIPPER
15411 static ID*
15412 vtable_tblcpy(ID *buf, const struct vtable *src)
15413 {
15414  int i, cnt = vtable_size(src);
15415 
15416  if (cnt > 0) {
15417  buf[0] = cnt;
15418  for (i = 0; i < cnt; i++) {
15419  buf[i] = src->tbl[i];
15420  }
15421  return buf;
15422  }
15423  return 0;
15424 }
15425 
15426 static ID*
15428 {
15429  int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars);
15430  ID *buf;
15431 
15432  if (cnt <= 0) return 0;
15433  buf = ALLOC_N(ID, cnt + 1);
15434  vtable_tblcpy(buf+1, lvtbl->args);
15435  vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars);
15436  buf[0] = cnt;
15437  return buf;
15438 }
15439 #endif
15440 
15441 static int
15442 arg_var_gen(struct parser_params *parser, ID id)
15443 {
15444  vtable_add(lvtbl->args, id);
15445  return vtable_size(lvtbl->args) - 1;
15446 }
15447 
15448 static int
15449 local_var_gen(struct parser_params *parser, ID id)
15450 {
15451  vtable_add(lvtbl->vars, id);
15452  if (lvtbl->used) {
15454  }
15455  return vtable_size(lvtbl->vars) - 1;
15456 }
15457 
15458 static int
15459 local_id_gen(struct parser_params *parser, ID id)
15460 {
15461  struct vtable *vars, *args, *used;
15462 
15463  vars = lvtbl->vars;
15464  args = lvtbl->args;
15465  used = lvtbl->used;
15466 
15467  while (vars && POINTER_P(vars->prev)) {
15468  vars = vars->prev;
15469  args = args->prev;
15470  if (used) used = used->prev;
15471  }
15472 
15473  if (vars && vars->prev == DVARS_INHERIT) {
15474  return rb_local_defined(id);
15475  }
15476  else if (vtable_included(args, id)) {
15477  return 1;
15478  }
15479  else {
15480  int i = vtable_included(vars, id);
15481  if (i && used) used->tbl[i-1] |= LVAR_USED;
15482  return i != 0;
15483  }
15484 }
15485 
15486 static const struct vtable *
15488 {
15489  lvtbl->args = vtable_alloc(lvtbl->args);
15490  lvtbl->vars = vtable_alloc(lvtbl->vars);
15491  if (lvtbl->used) {
15492  lvtbl->used = vtable_alloc(lvtbl->used);
15493  }
15494  return lvtbl->args;
15495 }
15496 
15497 static void
15498 dyna_pop_1(struct parser_params *parser)
15499 {
15500  struct vtable *tmp;
15501 
15502  if ((tmp = lvtbl->used) != 0) {
15503  warn_unused_var(parser, lvtbl);
15504  lvtbl->used = lvtbl->used->prev;
15505  vtable_free(tmp);
15506  }
15507  tmp = lvtbl->args;
15508  lvtbl->args = lvtbl->args->prev;
15509  vtable_free(tmp);
15510  tmp = lvtbl->vars;
15511  lvtbl->vars = lvtbl->vars->prev;
15512  vtable_free(tmp);
15513 }
15514 
15515 static void
15516 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
15517 {
15518  while (lvtbl->args != lvargs) {
15519  dyna_pop_1(parser);
15520  if (!lvtbl->args) {
15521  struct local_vars *local = lvtbl->prev;
15522  xfree(lvtbl);
15523  lvtbl = local;
15524  }
15525  }
15526  dyna_pop_1(parser);
15527 }
15528 
15529 static int
15531 {
15532  return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE;
15533 }
15534 
15535 static int
15536 dvar_defined_gen(struct parser_params *parser, ID id, int get)
15537 {
15538  struct vtable *vars, *args, *used;
15539  int i;
15540 
15541  args = lvtbl->args;
15542  vars = lvtbl->vars;
15543  used = lvtbl->used;
15544 
15545  while (POINTER_P(vars)) {
15546  if (vtable_included(args, id)) {
15547  return 1;
15548  }
15549  if ((i = vtable_included(vars, id)) != 0) {
15550  if (used) used->tbl[i-1] |= LVAR_USED;
15551  return 1;
15552  }
15553  args = args->prev;
15554  vars = vars->prev;
15555  if (get) used = 0;
15556  if (used) used = used->prev;
15557  }
15558 
15559  if (vars == DVARS_INHERIT) {
15560  return rb_dvar_defined(id);
15561  }
15562 
15563  return 0;
15564 }
15565 
15566 static int
15567 dvar_curr_gen(struct parser_params *parser, ID id)
15568 {
15569  return (vtable_included(lvtbl->args, id) ||
15570  vtable_included(lvtbl->vars, id));
15571 }
15572 
15573 #ifndef RIPPER
15574 static void
15576 {
15577  int c = RE_OPTION_ENCODING_IDX(options);
15578 
15579  if (c) {
15580  int opt, idx;
15581  rb_char_to_option_kcode(c, &opt, &idx);
15582  if (idx != ENCODING_GET(str) &&
15584  goto error;
15585  }
15586  ENCODING_SET(str, idx);
15587  }
15588  else if (RE_OPTION_ENCODING_NONE(options)) {
15589  if (!ENCODING_IS_ASCII8BIT(str) &&
15591  c = 'n';
15592  goto error;
15593  }
15595  }
15596  else if (parser->enc == rb_usascii_encoding()) {
15598  /* raise in re.c */
15600  }
15601  else {
15603  }
15604  }
15605  return;
15606 
15607  error:
15609  "regexp encoding option '%c' differs from source encoding '%s'",
15610  c, rb_enc_name(rb_enc_get(str)));
15611 }
15612 
15613 static int
15615 {
15616  VALUE err;
15617  reg_fragment_setenc(str, options);
15618  err = rb_reg_check_preprocess(str);
15619  if (err != Qnil) {
15620  err = rb_obj_as_string(err);
15621  compile_error(PARSER_ARG "%s", RSTRING_PTR(err));
15622  RB_GC_GUARD(err);
15623  return 0;
15624  }
15625  return 1;
15626 }
15627 
15628 typedef struct {
15629  struct parser_params* parser;
15630  rb_encoding *enc;
15631  NODE *succ_block;
15632  NODE *fail_block;
15633  int num;
15635 
15636 static int
15638  int back_num, int *back_refs, OnigRegex regex, void *arg0)
15639 {
15641  struct parser_params* parser = arg->parser;
15642  rb_encoding *enc = arg->enc;
15643  long len = name_end - name;
15644  const char *s = (const char *)name;
15645  ID var;
15646 
15647  arg->num++;
15648 
15649  if (arg->succ_block == 0) {
15650  arg->succ_block = NEW_BEGIN(0);
15651  arg->fail_block = NEW_BEGIN(0);
15652  }
15653 
15654  if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) ||
15655  (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) ||
15656  !rb_enc_symname2_p(s, len, enc)) {
15657  return ST_CONTINUE;
15658  }
15659  var = rb_intern3(s, len, enc);
15660  if (dvar_defined(var) || local_id(var)) {
15661  rb_warningS("named capture conflicts a local variable - %s",
15662  rb_id2name(var));
15663  }
15664  arg->succ_block = block_append(arg->succ_block,
15666  NEW_CALL(
15667  gettable(rb_intern("$~")),
15668  idAREF,
15669  NEW_LIST(NEW_LIT(ID2SYM(var))))
15670  )));
15671  arg->fail_block = block_append(arg->fail_block,
15673  return ST_CONTINUE;
15674 }
15675 
15676 static NODE *
15678 {
15680 
15681  arg.parser = parser;
15682  arg.enc = rb_enc_get(regexp);
15683  arg.succ_block = 0;
15684  arg.fail_block = 0;
15685  arg.num = 0;
15686  onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg);
15687 
15688  if (arg.num == 0)
15689  return match;
15690 
15691  return
15692  block_append(
15693  newline_node(match),
15694  NEW_IF(gettable(rb_intern("$~")),
15695  block_append(
15696  newline_node(arg.succ_block),
15697  newline_node(
15698  NEW_CALL(
15699  gettable(rb_intern("$~")),
15700  rb_intern("begin"),
15701  NEW_LIST(NEW_LIT(INT2FIX(0)))))),
15702  block_append(
15703  newline_node(arg.fail_block),
15704  newline_node(
15705  NEW_LIT(Qnil)))));
15706 }
15707 
15708 static VALUE
15709 reg_compile_gen(struct parser_params* parser, VALUE str, int options)
15710 {
15711  VALUE re;
15712  VALUE err;
15713 
15714  reg_fragment_setenc(str, options);
15715  err = rb_errinfo();
15717  if (NIL_P(re)) {
15718  ID mesg = rb_intern("mesg");
15719  VALUE m = rb_attr_get(rb_errinfo(), mesg);
15720  rb_set_errinfo(err);
15721  if (!NIL_P(err)) {
15722  rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m);
15723  }
15724  else {
15726  }
15727  return Qnil;
15728  }
15729  return re;
15730 }
15731 
15732 void
15734 {
15735 }
15736 
15737 NODE*
15739 {
15740  NODE *prelude = 0;
15741  NODE *scope = node;
15742  struct parser_params *parser;
15743 
15744  if (!node) return node;
15745 
15746  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15747 
15748  node = node->nd_body;
15749 
15750  if (nd_type(node) == NODE_PRELUDE) {
15751  prelude = node;
15752  node = node->nd_body;
15753  }
15754 
15755  node = block_append(node,
15756  NEW_FCALL(rb_intern("print"),
15757  NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
15758  if (prelude) {
15759  prelude->nd_body = node;
15760  scope->nd_body = prelude;
15761  }
15762  else {
15763  scope->nd_body = node;
15764  }
15765 
15766  return scope;
15767 }
15768 
15769 NODE *
15770 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split)
15771 {
15772  NODE *prelude = 0;
15773  NODE *scope = node;
15774  struct parser_params *parser;
15775 
15776  if (!node) return node;
15777 
15778  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15779 
15780  node = node->nd_body;
15781 
15782  if (nd_type(node) == NODE_PRELUDE) {
15783  prelude = node;
15784  node = node->nd_body;
15785  }
15786  if (split) {
15787  node = block_append(NEW_GASGN(rb_intern("$F"),
15788  NEW_CALL(NEW_GVAR(rb_intern("$_")),
15789  rb_intern("split"), 0)),
15790  node);
15791  }
15792  if (chop) {
15793  node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
15794  rb_intern("chop!"), 0), node);
15795  }
15796 
15797  node = NEW_OPT_N(node);
15798 
15799  if (prelude) {
15800  prelude->nd_body = node;
15801  scope->nd_body = prelude;
15802  }
15803  else {
15804  scope->nd_body = node;
15805  }
15806 
15807  return scope;
15808 }
15809 
15810 static const struct {
15812  const char *name;
15813 } op_tbl[] = {
15814  {tDOT2, ".."},
15815  {tDOT3, "..."},
15816  {tPOW, "**"},
15817  {tUPLUS, "+@"},
15818  {tUMINUS, "-@"},
15819  {tCMP, "<=>"},
15820  {tGEQ, ">="},
15821  {tLEQ, "<="},
15822  {tEQ, "=="},
15823  {tEQQ, "==="},
15824  {tNEQ, "!="},
15825  {tMATCH, "=~"},
15826  {tNMATCH, "!~"},
15827  {tAREF, "[]"},
15828  {tASET, "[]="},
15829  {tLSHFT, "<<"},
15830  {tRSHFT, ">>"},
15831  {tCOLON2, "::"},
15832 };
15833 
15834 #define op_tbl_count numberof(op_tbl)
15835 
15836 #ifndef ENABLE_SELECTOR_NAMESPACE
15837 #define ENABLE_SELECTOR_NAMESPACE 0
15838 #endif
15839 
15840 static struct symbols {
15841  ID last_id;
15842  st_table *sym_id;
15843  st_table *id_str;
15844 #if ENABLE_SELECTOR_NAMESPACE
15845  st_table *ivar2_id;
15846  st_table *id_ivar2;
15847 #endif
15849 } global_symbols = {tLAST_ID};
15850 
15851 static const struct st_hash_type symhash = {
15853  rb_str_hash,
15854 };
15855 
15856 #if ENABLE_SELECTOR_NAMESPACE
15857 struct ivar2_key {
15858  ID id;
15859  VALUE klass;
15860 };
15861 
15862 static int
15863 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2)
15864 {
15865  if (key1->id == key2->id && key1->klass == key2->klass) {
15866  return 0;
15867  }
15868  return 1;
15869 }
15870 
15871 static int
15872 ivar2_hash(struct ivar2_key *key)
15873 {
15874  return (key->id << 8) ^ (key->klass >> 2);
15875 }
15876 
15877 static const struct st_hash_type ivar2_hash_type = {
15878  ivar2_cmp,
15879  ivar2_hash,
15880 };
15881 #endif
15882 
15883 void
15885 {
15886  global_symbols.sym_id = st_init_table_with_size(&symhash, 1000);
15888 #if ENABLE_SELECTOR_NAMESPACE
15889  global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000);
15890  global_symbols.id_ivar2 = st_init_numtable_with_size(1000);
15891 #endif
15892 
15893  Init_id();
15894 }
15895 
15896 void
15898 {
15902 }
15903 #endif /* !RIPPER */
15904 
15905 static ID
15907 {
15908  ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars);
15909  id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1;
15910  return ID_INTERNAL | (id << ID_SCOPE_SHIFT);
15911 }
15912 
15913 #ifndef RIPPER
15914 static int
15915 is_special_global_name(const char *m, const char *e, rb_encoding *enc)
15916 {
15917  int mb = 0;
15918 
15919  if (m >= e) return 0;
15920  if (is_global_name_punct(*m)) {
15921  ++m;
15922  }
15923  else if (*m == '-') {
15924  ++m;
15925  if (m < e && is_identchar(m, e, enc)) {
15926  if (!ISASCII(*m)) mb = 1;
15927  m += rb_enc_mbclen(m, e, enc);
15928  }
15929  }
15930  else {
15931  if (!rb_enc_isdigit(*m, enc)) return 0;
15932  do {
15933  if (!ISASCII(*m)) mb = 1;
15934  ++m;
15935  } while (m < e && rb_enc_isdigit(*m, enc));
15936  }
15937  return m == e ? mb + 1 : 0;
15938 }
15939 
15940 int
15941 rb_symname_p(const char *name)
15942 {
15943  return rb_enc_symname_p(name, rb_ascii8bit_encoding());
15944 }
15945 
15946 int
15947 rb_enc_symname_p(const char *name, rb_encoding *enc)
15948 {
15949  return rb_enc_symname2_p(name, strlen(name), enc);
15950 }
15951 
15952 int
15953 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
15954 {
15955  const char *m = name;
15956  const char *e = m + len;
15957  int localid = FALSE;
15958 
15959  if (!m || len <= 0) return FALSE;
15960  switch (*m) {
15961  case '\0':
15962  return FALSE;
15963 
15964  case '$':
15965  if (is_special_global_name(++m, e, enc)) return TRUE;
15966  goto id;
15967 
15968  case '@':
15969  if (*++m == '@') ++m;
15970  goto id;
15971 
15972  case '<':
15973  switch (*++m) {
15974  case '<': ++m; break;
15975  case '=': if (*++m == '>') ++m; break;
15976  default: break;
15977  }
15978  break;
15979 
15980  case '>':
15981  switch (*++m) {
15982  case '>': case '=': ++m; break;
15983  }
15984  break;
15985 
15986  case '=':
15987  switch (*++m) {
15988  case '~': ++m; break;
15989  case '=': if (*++m == '=') ++m; break;
15990  default: return FALSE;
15991  }
15992  break;
15993 
15994  case '*':
15995  if (*++m == '*') ++m;
15996  break;
15997 
15998  case '+': case '-':
15999  if (*++m == '@') ++m;
16000  break;
16001 
16002  case '|': case '^': case '&': case '/': case '%': case '~': case '`':
16003  ++m;
16004  break;
16005 
16006  case '[':
16007  if (*++m != ']') return FALSE;
16008  if (*++m == '=') ++m;
16009  break;
16010 
16011  case '!':
16012  if (len == 1) return TRUE;
16013  switch (*++m) {
16014  case '=': case '~': ++m; break;
16015  default: return FALSE;
16016  }
16017  break;
16018 
16019  default:
16020  localid = !rb_enc_isupper(*m, enc);
16021  id:
16022  if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m)))
16023  return FALSE;
16024  while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc);
16025  if (localid) {
16026  switch (*m) {
16027  case '!': case '?': case '=': ++m;
16028  }
16029  }
16030  break;
16031  }
16032  return m == e;
16033 }
16034 
16035 static ID
16036 register_symid(ID id, const char *name, long len, rb_encoding *enc)
16037 {
16038  VALUE str = rb_enc_str_new(name, len, enc);
16039  OBJ_FREEZE(str);
16042  return id;
16043 }
16044 
16045 ID
16046 rb_intern3(const char *name, long len, rb_encoding *enc)
16047 {
16048  const char *m = name;
16049  const char *e = m + len;
16050  unsigned char c;
16051  VALUE str;
16052  ID id;
16053  long last;
16054  int mb;
16055  st_data_t data;
16056  struct RString fake_str;
16057  fake_str.basic.flags = T_STRING|RSTRING_NOEMBED;
16058  fake_str.basic.klass = rb_cString;
16059  fake_str.as.heap.len = len;
16060  fake_str.as.heap.ptr = (char *)name;
16061  fake_str.as.heap.aux.capa = len;
16062  str = (VALUE)&fake_str;
16063  rb_enc_associate(str, enc);
16064  OBJ_FREEZE(str);
16065 
16067  rb_raise(rb_eEncodingError, "invalid encoding symbol");
16068  }
16069 
16070  if (st_lookup(global_symbols.sym_id, str, &data))
16071  return (ID)data;
16072 
16073  if (rb_cString && !rb_enc_asciicompat(enc)) {
16074  id = ID_JUNK;
16075  goto new_id;
16076  }
16077  last = len-1;
16078  id = 0;
16079  switch (*m) {
16080  case '$':
16081  id |= ID_GLOBAL;
16082  if ((mb = is_special_global_name(++m, e, enc)) != 0) {
16083  if (!--mb) enc = rb_ascii8bit_encoding();
16084  goto new_id;
16085  }
16086  break;
16087  case '@':
16088  if (m[1] == '@') {
16089  m++;
16090  id |= ID_CLASS;
16091  }
16092  else {
16093  id |= ID_INSTANCE;
16094  }
16095  m++;
16096  break;
16097  default:
16098  c = m[0];
16099  if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) {
16100  /* operators */
16101  int i;
16102 
16103  if (len == 1) {
16104  id = c;
16105  goto id_register;
16106  }
16107  for (i = 0; i < op_tbl_count; i++) {
16108  if (*op_tbl[i].name == *m &&
16109  strcmp(op_tbl[i].name, m) == 0) {
16110  id = op_tbl[i].token;
16111  goto id_register;
16112  }
16113  }
16114  }
16115 
16116  if (m[last] == '=') {
16117  /* attribute assignment */
16118  id = rb_intern3(name, last, enc);
16119  if (id > tLAST_TOKEN && !is_attrset_id(id)) {
16120  enc = rb_enc_get(rb_id2str(id));
16121  id = rb_id_attrset(id);
16122  goto id_register;
16123  }
16124  id = ID_ATTRSET;
16125  }
16126  else if (rb_enc_isupper(m[0], enc)) {
16127  id = ID_CONST;
16128  }
16129  else {
16130  id = ID_LOCAL;
16131  }
16132  break;
16133  }
16134  mb = 0;
16135  if (!rb_enc_isdigit(*m, enc)) {
16136  while (m <= name + last && is_identchar(m, e, enc)) {
16137  if (ISASCII(*m)) {
16138  m++;
16139  }
16140  else {
16141  mb = 1;
16142  m += rb_enc_mbclen(m, e, enc);
16143  }
16144  }
16145  }
16146  if (m - name < len) id = ID_JUNK;
16147  if (enc != rb_usascii_encoding()) {
16148  /*
16149  * this clause makes sense only when called from other than
16150  * rb_intern_str() taking care of code-range.
16151  */
16152  if (!mb) {
16153  for (; m <= name + len; ++m) {
16154  if (!ISASCII(*m)) goto mbstr;
16155  }
16156  enc = rb_usascii_encoding();
16157  }
16158  mbstr:;
16159  }
16160  new_id:
16162  if (len > 20) {
16163  rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)",
16164  name);
16165  }
16166  else {
16167  rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)",
16168  (int)len, name);
16169  }
16170  }
16172  id_register:
16173  return register_symid(id, name, len, enc);
16174 }
16175 
16176 ID
16177 rb_intern2(const char *name, long len)
16178 {
16179  return rb_intern3(name, len, rb_usascii_encoding());
16180 }
16181 
16182 #undef rb_intern
16183 ID
16184 rb_intern(const char *name)
16185 {
16186  return rb_intern2(name, strlen(name));
16187 }
16188 
16189 ID
16191 {
16192  rb_encoding *enc;
16193  ID id;
16194 
16196  enc = rb_usascii_encoding();
16197  }
16198  else {
16199  enc = rb_enc_get(str);
16200  }
16201  id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc);
16202  RB_GC_GUARD(str);
16203  return id;
16204 }
16205 
16206 VALUE
16208 {
16209  st_data_t data;
16210 
16211  if (id < tLAST_TOKEN) {
16212  int i = 0;
16213 
16214  if (id < INT_MAX && rb_ispunct((int)id)) {
16215  VALUE str = global_symbols.op_sym[i = (int)id];
16216  if (!str) {
16217  char name[2];
16218  name[0] = (char)id;
16219  name[1] = 0;
16220  str = rb_usascii_str_new(name, 1);
16221  OBJ_FREEZE(str);
16222  global_symbols.op_sym[i] = str;
16223  }
16224  return str;
16225  }
16226  for (i = 0; i < op_tbl_count; i++) {
16227  if (op_tbl[i].token == id) {
16228  VALUE str = global_symbols.op_sym[i];
16229  if (!str) {
16230  str = rb_usascii_str_new2(op_tbl[i].name);
16231  OBJ_FREEZE(str);
16232  global_symbols.op_sym[i] = str;
16233  }
16234  return str;
16235  }
16236  }
16237  }
16238 
16239  if (st_lookup(global_symbols.id_str, id, &data)) {
16240  VALUE str = (VALUE)data;
16241  if (RBASIC(str)->klass == 0)
16242  RBASIC(str)->klass = rb_cString;
16243  return str;
16244  }
16245 
16246  if (is_attrset_id(id)) {
16247  ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
16248  VALUE str;
16249 
16250  while (!(str = rb_id2str(id2))) {
16251  if (!is_local_id(id2)) return 0;
16252  id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;
16253  }
16254  str = rb_str_dup(str);
16255  rb_str_cat(str, "=", 1);
16256  rb_intern_str(str);
16257  if (st_lookup(global_symbols.id_str, id, &data)) {
16258  VALUE str = (VALUE)data;
16259  if (RBASIC(str)->klass == 0)
16260  RBASIC(str)->klass = rb_cString;
16261  return str;
16262  }
16263  }
16264  return 0;
16265 }
16266 
16267 const char *
16269 {
16270  VALUE str = rb_id2str(id);
16271 
16272  if (!str) return 0;
16273  return RSTRING_PTR(str);
16274 }
16275 
16276 static int
16278 {
16279  rb_ary_push(ary, ID2SYM(value));
16280  return ST_CONTINUE;
16281 }
16282 
16283 /*
16284  * call-seq:
16285  * Symbol.all_symbols => array
16286  *
16287  * Returns an array of all the symbols currently in Ruby's symbol
16288  * table.
16289  *
16290  * Symbol.all_symbols.size #=> 903
16291  * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink,
16292  * :chown, :EOFError, :$;, :String,
16293  * :LOCK_SH, :"setuid?", :$<,
16294  * :default_proc, :compact, :extend,
16295  * :Tms, :getwd, :$=, :ThreadGroup,
16296  * :wait2, :$>]
16297  */
16298 
16299 VALUE
16301 {
16303 
16305  return ary;
16306 }
16307 
16308 int
16310 {
16311  return is_const_id(id);
16312 }
16313 
16314 int
16316 {
16317  return is_class_id(id);
16318 }
16319 
16320 int
16322 {
16323  return is_instance_id(id);
16324 }
16325 
16326 int
16328 {
16329  return is_local_id(id);
16330 }
16331 
16332 int
16334 {
16335  return is_junk_id(id);
16336 }
16337 
16338 #endif /* !RIPPER */
16339 
16340 static void
16342 {
16343  parser->eofp = Qfalse;
16344 
16345  parser->parser_lex_strterm = 0;
16346  parser->parser_cond_stack = 0;
16347  parser->parser_cmdarg_stack = 0;
16348  parser->parser_class_nest = 0;
16349  parser->parser_paren_nest = 0;
16350  parser->parser_lpar_beg = 0;
16351  parser->parser_in_single = 0;
16352  parser->parser_in_def = 0;
16353  parser->parser_in_defined = 0;
16354  parser->parser_compile_for_eval = 0;
16355  parser->parser_cur_mid = 0;
16356  parser->parser_tokenbuf = NULL;
16357  parser->parser_tokidx = 0;
16358  parser->parser_toksiz = 0;
16359  parser->parser_heredoc_end = 0;
16360  parser->parser_command_start = TRUE;
16361  parser->parser_deferred_nodes = 0;
16362  parser->parser_lex_pbeg = 0;
16363  parser->parser_lex_p = 0;
16364  parser->parser_lex_pend = 0;
16365  parser->parser_lvtbl = 0;
16366  parser->parser_ruby__end__seen = 0;
16367  parser->parser_ruby_sourcefile = 0;
16368 #ifndef RIPPER
16369  parser->is_ripper = 0;
16370  parser->parser_eval_tree_begin = 0;
16371  parser->parser_eval_tree = 0;
16372 #else
16373  parser->is_ripper = 1;
16374  parser->parser_ruby_sourcefile_string = Qnil;
16375  parser->delayed = Qnil;
16376 
16377  parser->result = Qnil;
16378  parser->parsing_thread = Qnil;
16379  parser->toplevel_p = TRUE;
16380 #endif
16381 #ifdef YYMALLOC
16382  parser->heap = NULL;
16383 #endif
16384  parser->enc = rb_usascii_encoding();
16385 }
16386 
16387 #ifdef RIPPER
16388 #define parser_mark ripper_parser_mark
16389 #define parser_free ripper_parser_free
16390 #endif
16391 
16392 static void
16394 {
16395  struct parser_params *p = (struct parser_params*)ptr;
16396 
16402 #ifndef RIPPER
16405  rb_gc_mark(p->debug_lines);
16406 #else
16407  rb_gc_mark(p->parser_ruby_sourcefile_string);
16408  rb_gc_mark(p->delayed);
16409  rb_gc_mark(p->value);
16410  rb_gc_mark(p->result);
16411  rb_gc_mark(p->parsing_thread);
16412 #endif
16413 #ifdef YYMALLOC
16414  rb_gc_mark((VALUE)p->heap);
16415 #endif
16416 }
16417 
16418 static void
16419 parser_free(void *ptr)
16420 {
16421  struct parser_params *p = (struct parser_params*)ptr;
16422  struct local_vars *local, *prev;
16423 
16424  if (p->parser_tokenbuf) {
16425  xfree(p->parser_tokenbuf);
16426  }
16427  for (local = p->parser_lvtbl; local; local = prev) {
16428  if (local->vars) xfree(local->vars);
16429  prev = local->prev;
16430  xfree(local);
16431  }
16432 #ifndef RIPPER
16434 #endif
16435  xfree(p);
16436 }
16437 
16438 static size_t
16439 parser_memsize(const void *ptr)
16440 {
16441  struct parser_params *p = (struct parser_params*)ptr;
16442  struct local_vars *local;
16443  size_t size = sizeof(*p);
16444 
16445  if (!ptr) return 0;
16446  size += p->parser_toksiz;
16447  for (local = p->parser_lvtbl; local; local = local->prev) {
16448  size += sizeof(*local);
16449  if (local->vars) size += local->vars->capa * sizeof(ID);
16450  }
16451 #ifndef RIPPER
16452  if (p->parser_ruby_sourcefile) {
16453  size += strlen(p->parser_ruby_sourcefile) + 1;
16454  }
16455 #endif
16456  return size;
16457 }
16458 
16459 static
16460 #ifndef RIPPER
16461 const
16462 #endif
16463 rb_data_type_t parser_data_type = {
16464  "parser",
16465  {
16466  parser_mark,
16467  parser_free,
16469  },
16470 };
16471 
16472 #ifndef RIPPER
16473 #undef rb_reserved_word
16474 
16475 const struct kwtable *
16476 rb_reserved_word(const char *str, unsigned int len)
16477 {
16478  return reserved_word(str, len);
16479 }
16480 
16481 static struct parser_params *
16483 {
16484  struct parser_params *p;
16485 
16486  p = ALLOC_N(struct parser_params, 1);
16487  MEMZERO(p, struct parser_params, 1);
16488  parser_initialize(p);
16489  return p;
16490 }
16491 
16492 VALUE
16494 {
16495  struct parser_params *p = parser_new();
16496 
16497  return TypedData_Wrap_Struct(0, &parser_data_type, p);
16498 }
16499 
16500 /*
16501  * call-seq:
16502  * ripper#end_seen? -> Boolean
16503  *
16504  * Return true if parsed source ended by +\_\_END\_\_+.
16505  */
16506 VALUE
16508 {
16509  struct parser_params *parser;
16510 
16511  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
16512  return ruby__end__seen ? Qtrue : Qfalse;
16513 }
16514 
16515 /*
16516  * call-seq:
16517  * ripper#encoding -> encoding
16518  *
16519  * Return encoding of the source.
16520  */
16521 VALUE
16523 {
16524  struct parser_params *parser;
16525 
16526  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
16527  return rb_enc_from_encoding(parser->enc);
16528 }
16529 
16530 /*
16531  * call-seq:
16532  * ripper.yydebug -> true or false
16533  *
16534  * Get yydebug.
16535  */
16536 VALUE
16538 {
16539  struct parser_params *parser;
16540 
16541  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16542  return yydebug ? Qtrue : Qfalse;
16543 }
16544 
16545 /*
16546  * call-seq:
16547  * ripper.yydebug = flag
16548  *
16549  * Set yydebug.
16550  */
16551 VALUE
16553 {
16554  struct parser_params *parser;
16555 
16556  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16557  yydebug = RTEST(flag);
16558  return flag;
16559 }
16560 
16561 #ifdef YYMALLOC
16562 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
16563 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)
16564 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \
16565  (n)->u3.cnt = (c), (p))
16566 
16567 void *
16568 rb_parser_malloc(struct parser_params *parser, size_t size)
16569 {
16570  size_t cnt = HEAPCNT(1, size);
16571  NODE *n = NEWHEAP();
16572  void *ptr = xmalloc(size);
16573 
16574  return ADD2HEAP(n, cnt, ptr);
16575 }
16576 
16577 void *
16578 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size)
16579 {
16580  size_t cnt = HEAPCNT(nelem, size);
16581  NODE *n = NEWHEAP();
16582  void *ptr = xcalloc(nelem, size);
16583 
16584  return ADD2HEAP(n, cnt, ptr);
16585 }
16586 
16587 void *
16588 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size)
16589 {
16590  NODE *n;
16591  size_t cnt = HEAPCNT(1, size);
16592 
16593  if (ptr && (n = parser->heap) != NULL) {
16594  do {
16595  if (n->u1.node == ptr) {
16596  n->u1.node = ptr = xrealloc(ptr, size);
16597  if (n->u3.cnt) n->u3.cnt = cnt;
16598  return ptr;
16599  }
16600  } while ((n = n->u2.node) != NULL);
16601  }
16602  n = NEWHEAP();
16603  ptr = xrealloc(ptr, size);
16604  return ADD2HEAP(n, cnt, ptr);
16605 }
16606 
16607 void
16608 rb_parser_free(struct parser_params *parser, void *ptr)
16609 {
16610  NODE **prev = &parser->heap, *n;
16611 
16612  while ((n = *prev) != NULL) {
16613  if (n->u1.node == ptr) {
16614  *prev = n->u2.node;
16616  break;
16617  }
16618  prev = &n->u2.node;
16619  }
16620  xfree(ptr);
16621 }
16622 #endif
16623 #endif
16624 
16625 #ifdef RIPPER
16626 #ifdef RIPPER_DEBUG
16627 extern int rb_is_pointer_to_heap(VALUE);
16628 
16629 /* :nodoc: */
16630 static VALUE
16631 ripper_validate_object(VALUE self, VALUE x)
16632 {
16633  if (x == Qfalse) return x;
16634  if (x == Qtrue) return x;
16635  if (x == Qnil) return x;
16636  if (x == Qundef)
16637  rb_raise(rb_eArgError, "Qundef given");
16638  if (FIXNUM_P(x)) return x;
16639  if (SYMBOL_P(x)) return x;
16640  if (!rb_is_pointer_to_heap(x))
16641  rb_raise(rb_eArgError, "invalid pointer: %p", x);
16642  switch (TYPE(x)) {
16643  case T_STRING:
16644  case T_OBJECT:
16645  case T_ARRAY:
16646  case T_BIGNUM:
16647  case T_FLOAT:
16648  return x;
16649  case T_NODE:
16650  if (nd_type(x) != NODE_LASGN) {
16651  rb_raise(rb_eArgError, "NODE given: %p", x);
16652  }
16653  return ((NODE *)x)->nd_rval;
16654  default:
16655  rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
16656  x, rb_obj_classname(x));
16657  }
16658  return x;
16659 }
16660 #endif
16661 
16662 #define validate(x) ((x) = get_value(x))
16663 
16664 static VALUE
16665 ripper_dispatch0(struct parser_params *parser, ID mid)
16666 {
16667  return rb_funcall(parser->value, mid, 0);
16668 }
16669 
16670 static VALUE
16671 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
16672 {
16673  validate(a);
16674  return rb_funcall(parser->value, mid, 1, a);
16675 }
16676 
16677 static VALUE
16678 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
16679 {
16680  validate(a);
16681  validate(b);
16682  return rb_funcall(parser->value, mid, 2, a, b);
16683 }
16684 
16685 static VALUE
16686 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
16687 {
16688  validate(a);
16689  validate(b);
16690  validate(c);
16691  return rb_funcall(parser->value, mid, 3, a, b, c);
16692 }
16693 
16694 static VALUE
16695 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
16696 {
16697  validate(a);
16698  validate(b);
16699  validate(c);
16700  validate(d);
16701  return rb_funcall(parser->value, mid, 4, a, b, c, d);
16702 }
16703 
16704 static VALUE
16705 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
16706 {
16707  validate(a);
16708  validate(b);
16709  validate(c);
16710  validate(d);
16711  validate(e);
16712  return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
16713 }
16714 
16715 static const struct kw_assoc {
16716  ID id;
16717  const char *name;
16718 } keyword_to_name[] = {
16719  {keyword_class, "class"},
16720  {keyword_module, "module"},
16721  {keyword_def, "def"},
16722  {keyword_undef, "undef"},
16723  {keyword_begin, "begin"},
16724  {keyword_rescue, "rescue"},
16725  {keyword_ensure, "ensure"},
16726  {keyword_end, "end"},
16727  {keyword_if, "if"},
16728  {keyword_unless, "unless"},
16729  {keyword_then, "then"},
16730  {keyword_elsif, "elsif"},
16731  {keyword_else, "else"},
16732  {keyword_case, "case"},
16733  {keyword_when, "when"},
16734  {keyword_while, "while"},
16735  {keyword_until, "until"},
16736  {keyword_for, "for"},
16737  {keyword_break, "break"},
16738  {keyword_next, "next"},
16739  {keyword_redo, "redo"},
16740  {keyword_retry, "retry"},
16741  {keyword_in, "in"},
16742  {keyword_do, "do"},
16743  {keyword_do_cond, "do"},
16744  {keyword_do_block, "do"},
16745  {keyword_return, "return"},
16746  {keyword_yield, "yield"},
16747  {keyword_super, "super"},
16748  {keyword_self, "self"},
16749  {keyword_nil, "nil"},
16750  {keyword_true, "true"},
16751  {keyword_false, "false"},
16752  {keyword_and, "and"},
16753  {keyword_or, "or"},
16754  {keyword_not, "not"},
16755  {modifier_if, "if"},
16756  {modifier_unless, "unless"},
16757  {modifier_while, "while"},
16758  {modifier_until, "until"},
16759  {modifier_rescue, "rescue"},
16760  {keyword_alias, "alias"},
16761  {keyword_defined, "defined?"},
16762  {keyword_BEGIN, "BEGIN"},
16763  {keyword_END, "END"},
16764  {keyword__LINE__, "__LINE__"},
16765  {keyword__FILE__, "__FILE__"},
16766  {keyword__ENCODING__, "__ENCODING__"},
16767  {0, NULL}
16768 };
16769 
16770 static const char*
16771 keyword_id_to_str(ID id)
16772 {
16773  const struct kw_assoc *a;
16774 
16775  for (a = keyword_to_name; a->id; a++) {
16776  if (a->id == id)
16777  return a->name;
16778  }
16779  return NULL;
16780 }
16781 
16782 #undef ripper_id2sym
16783 static VALUE
16784 ripper_id2sym(ID id)
16785 {
16786  const char *name;
16787  char buf[8];
16788 
16789  if (id <= 256) {
16790  buf[0] = (char)id;
16791  buf[1] = '\0';
16792  return ID2SYM(rb_intern2(buf, 1));
16793  }
16794  if ((name = keyword_id_to_str(id))) {
16795  return ID2SYM(rb_intern(name));
16796  }
16797  switch (id) {
16798  case tOROP:
16799  name = "||";
16800  break;
16801  case tANDOP:
16802  name = "&&";
16803  break;
16804  default:
16805  name = rb_id2name(id);
16806  if (!name) {
16807  rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
16808  }
16809  return ID2SYM(id);
16810  }
16811  return ID2SYM(rb_intern(name));
16812 }
16813 
16814 static ID
16815 ripper_get_id(VALUE v)
16816 {
16817  NODE *nd;
16818  if (!RB_TYPE_P(v, T_NODE)) return 0;
16819  nd = (NODE *)v;
16820  if (nd_type(nd) != NODE_LASGN) return 0;
16821  return nd->nd_vid;
16822 }
16823 
16824 static VALUE
16825 ripper_get_value(VALUE v)
16826 {
16827  NODE *nd;
16828  if (v == Qundef) return Qnil;
16829  if (!RB_TYPE_P(v, T_NODE)) return v;
16830  nd = (NODE *)v;
16831  if (nd_type(nd) != NODE_LASGN) return Qnil;
16832  return nd->nd_rval;
16833 }
16834 
16835 static void
16836 ripper_compile_error(struct parser_params *parser, const char *fmt, ...)
16837 {
16838  VALUE str;
16839  va_list args;
16840 
16841  va_start(args, fmt);
16842  str = rb_vsprintf(fmt, args);
16843  va_end(args);
16844  rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
16845 }
16846 
16847 static void
16848 ripper_warn0(struct parser_params *parser, const char *fmt)
16849 {
16850  rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt));
16851 }
16852 
16853 static void
16854 ripper_warnI(struct parser_params *parser, const char *fmt, int a)
16855 {
16856  rb_funcall(parser->value, rb_intern("warn"), 2,
16857  STR_NEW2(fmt), INT2NUM(a));
16858 }
16859 
16860 #if 0
16861 static void
16862 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str)
16863 {
16864  rb_funcall(parser->value, rb_intern("warn"), 2,
16865  STR_NEW2(fmt), STR_NEW2(str));
16866 }
16867 #endif
16868 
16869 static void
16870 ripper_warning0(struct parser_params *parser, const char *fmt)
16871 {
16872  rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt));
16873 }
16874 
16875 static void
16876 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str)
16877 {
16878  rb_funcall(parser->value, rb_intern("warning"), 2,
16879  STR_NEW2(fmt), STR_NEW2(str));
16880 }
16881 
16882 static VALUE
16883 ripper_lex_get_generic(struct parser_params *parser, VALUE src)
16884 {
16885  return rb_funcall(src, ripper_id_gets, 0);
16886 }
16887 
16888 static VALUE
16889 ripper_s_allocate(VALUE klass)
16890 {
16891  struct parser_params *p;
16892  VALUE self;
16893 
16894  p = ALLOC_N(struct parser_params, 1);
16895  MEMZERO(p, struct parser_params, 1);
16896  self = TypedData_Wrap_Struct(klass, &parser_data_type, p);
16897  p->value = self;
16898  return self;
16899 }
16900 
16901 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0)
16902 
16903 /*
16904  * call-seq:
16905  * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
16906  *
16907  * Create a new Ripper object.
16908  * _src_ must be a String, an IO, or an Object which has #gets method.
16909  *
16910  * This method does not starts parsing.
16911  * See also Ripper#parse and Ripper.parse.
16912  */
16913 static VALUE
16914 ripper_initialize(int argc, VALUE *argv, VALUE self)
16915 {
16916  struct parser_params *parser;
16917  VALUE src, fname, lineno;
16918 
16919  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16920  rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
16921  if (rb_obj_respond_to(src, ripper_id_gets, 0)) {
16922  parser->parser_lex_gets = ripper_lex_get_generic;
16923  }
16924  else {
16925  StringValue(src);
16926  parser->parser_lex_gets = lex_get_str;
16927  }
16928  parser->parser_lex_input = src;
16929  parser->eofp = Qfalse;
16930  if (NIL_P(fname)) {
16931  fname = STR_NEW2("(ripper)");
16932  }
16933  else {
16934  StringValue(fname);
16935  }
16936  parser_initialize(parser);
16937 
16938  parser->parser_ruby_sourcefile_string = fname;
16939  parser->parser_ruby_sourcefile = RSTRING_PTR(fname);
16940  parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
16941 
16942  return Qnil;
16943 }
16944 
16945 struct ripper_args {
16946  struct parser_params *parser;
16947  int argc;
16948  VALUE *argv;
16949 };
16950 
16951 static VALUE
16952 ripper_parse0(VALUE parser_v)
16953 {
16954  struct parser_params *parser;
16955 
16956  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
16957  parser_prepare(parser);
16958  ripper_yyparse((void*)parser);
16959  return parser->result;
16960 }
16961 
16962 static VALUE
16963 ripper_ensure(VALUE parser_v)
16964 {
16965  struct parser_params *parser;
16966 
16967  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
16968  parser->parsing_thread = Qnil;
16969  return Qnil;
16970 }
16971 
16972 /*
16973  * call-seq:
16974  * ripper#parse
16975  *
16976  * Start parsing and returns the value of the root action.
16977  */
16978 static VALUE
16979 ripper_parse(VALUE self)
16980 {
16981  struct parser_params *parser;
16982 
16983  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16984  if (!ripper_initialized_p(parser)) {
16985  rb_raise(rb_eArgError, "method called for uninitialized object");
16986  }
16987  if (!NIL_P(parser->parsing_thread)) {
16988  if (parser->parsing_thread == rb_thread_current())
16989  rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
16990  else
16991  rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
16992  }
16993  parser->parsing_thread = rb_thread_current();
16994  rb_ensure(ripper_parse0, self, ripper_ensure, self);
16995 
16996  return parser->result;
16997 }
16998 
16999 /*
17000  * call-seq:
17001  * ripper#column -> Integer
17002  *
17003  * Return column number of current parsing line.
17004  * This number starts from 0.
17005  */
17006 static VALUE
17007 ripper_column(VALUE self)
17008 {
17009  struct parser_params *parser;
17010  long col;
17011 
17012  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17013  if (!ripper_initialized_p(parser)) {
17014  rb_raise(rb_eArgError, "method called for uninitialized object");
17015  }
17016  if (NIL_P(parser->parsing_thread)) return Qnil;
17017  col = parser->tokp - parser->parser_lex_pbeg;
17018  return LONG2NUM(col);
17019 }
17020 
17021 /*
17022  * call-seq:
17023  * ripper#filename -> String
17024  *
17025  * Return current parsing filename.
17026  */
17027 static VALUE
17028 ripper_filename(VALUE self)
17029 {
17030  struct parser_params *parser;
17031 
17032  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17033  if (!ripper_initialized_p(parser)) {
17034  rb_raise(rb_eArgError, "method called for uninitialized object");
17035  }
17036  return parser->parser_ruby_sourcefile_string;
17037 }
17038 
17039 /*
17040  * call-seq:
17041  * ripper#lineno -> Integer
17042  *
17043  * Return line number of current parsing line.
17044  * This number starts from 1.
17045  */
17046 static VALUE
17047 ripper_lineno(VALUE self)
17048 {
17049  struct parser_params *parser;
17050 
17051  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17052  if (!ripper_initialized_p(parser)) {
17053  rb_raise(rb_eArgError, "method called for uninitialized object");
17054  }
17055  if (NIL_P(parser->parsing_thread)) return Qnil;
17056  return INT2NUM(parser->parser_ruby_sourceline);
17057 }
17058 
17059 #ifdef RIPPER_DEBUG
17060 /* :nodoc: */
17061 static VALUE
17062 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
17063 {
17064  StringValue(msg);
17065  if (obj == Qundef) {
17066  rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg));
17067  }
17068  return Qnil;
17069 }
17070 
17071 /* :nodoc: */
17072 static VALUE
17073 ripper_value(VALUE self, VALUE obj)
17074 {
17075  return ULONG2NUM(obj);
17076 }
17077 #endif
17078 
17079 
17080 void
17081 InitVM_ripper(void)
17082 {
17083  parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new());
17084 }
17085 
17086 void
17087 Init_ripper(void)
17088 {
17089  VALUE Ripper;
17090 
17091  InitVM(ripper);
17092  Ripper = rb_define_class("Ripper", rb_cObject);
17093  rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
17094  rb_define_alloc_func(Ripper, ripper_s_allocate);
17095  rb_define_method(Ripper, "initialize", ripper_initialize, -1);
17096  rb_define_method(Ripper, "parse", ripper_parse, 0);
17097  rb_define_method(Ripper, "column", ripper_column, 0);
17098  rb_define_method(Ripper, "filename", ripper_filename, 0);
17099  rb_define_method(Ripper, "lineno", ripper_lineno, 0);
17100  rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
17101  rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
17102  rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
17103  rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
17104 #ifdef RIPPER_DEBUG
17105  rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
17106  rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
17107  rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
17108 #endif
17109 
17110  ripper_id_gets = rb_intern("gets");
17111  ripper_init_eventids1(Ripper);
17112  ripper_init_eventids2(Ripper);
17113  /* ensure existing in symbol table */
17114  (void)rb_intern("||");
17115  (void)rb_intern("&&");
17116 
17117 # if 0
17118  /* Hack to let RDoc document SCRIPT_LINES__ */
17119 
17120  /*
17121  * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
17122  * after the assignment will be added as an Array of lines with the file
17123  * name as the key.
17124  */
17125  rb_define_global_const("SCRIPT_LINES__", Qnil);
17126 #endif
17127 
17128 }
17129 #endif /* RIPPER */
17130 
17131