Ruby  1.9.3p392(2013-02-22revision39386)
ripper.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 2.3. */
2 
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6  Free Software Foundation, Inc.
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2, or (at your option)
11  any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA. */
22 
23 /* As a special exception, you may create a larger work that contains
24  part or all of the Bison parser skeleton and distribute that work
25  under terms of your choice, so long as that work isn't itself a
26  parser generator using the skeleton or a modified version thereof
27  as a parser skeleton. Alternatively, if you modify or redistribute
28  the parser skeleton itself, you may (at your option) remove this
29  special exception, which will cause the skeleton and the resulting
30  Bison output files to be licensed under the GNU General Public
31  License without this special exception.
32 
33  This special exception was added by the Free Software Foundation in
34  version 2.2 of Bison. */
35 
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37  simplifying the original so-called "semantic" parser. */
38 
39 /* All symbols defined below should begin with yy or YY, to avoid
40  infringing on user name space. This should be done even for local
41  variables, as they might otherwise be expanded by user macros.
42  There are some unavoidable exceptions within include files to
43  define necessary library symbols; they are noted "INFRINGES ON
44  USER NAME SPACE" below. */
45 
46 /* Identify Bison output. */
47 #define YYBISON 1
48 
49 /* Bison version. */
50 #define YYBISON_VERSION "2.3"
51 
52 /* Skeleton name. */
53 #define YYSKELETON_NAME "yacc.c"
54 
55 /* Pure parsers. */
56 #define YYPURE 1
57 
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
60 
61 
62 
63 /* Tokens. */
64 #ifndef YYTOKENTYPE
65 # define YYTOKENTYPE
66  /* Put the tokens into the symbol table, so that GDB and other debuggers
67  know about them. */
68  enum yytokentype {
71  keyword_def = 260,
76  keyword_end = 265,
77  keyword_if = 266,
79  keyword_then = 268,
81  keyword_else = 270,
82  keyword_case = 271,
83  keyword_when = 272,
86  keyword_for = 275,
88  keyword_next = 277,
89  keyword_redo = 278,
91  keyword_in = 280,
92  keyword_do = 281,
99  keyword_self = 288,
100  keyword_nil = 289,
103  keyword_and = 292,
104  keyword_or = 293,
105  keyword_not = 294,
106  modifier_if = 295,
114  keyword_END = 303,
118  tIDENTIFIER = 307,
119  tFID = 308,
120  tGVAR = 309,
121  tIVAR = 310,
122  tCONSTANT = 311,
123  tCVAR = 312,
124  tLABEL = 313,
125  tINTEGER = 314,
126  tFLOAT = 315,
128  tCHAR = 317,
129  tNTH_REF = 318,
130  tBACK_REF = 319,
131  tREGEXP_END = 320,
132  tUPLUS = 321,
133  tUMINUS = 322,
134  tPOW = 323,
135  tCMP = 324,
136  tEQ = 325,
137  tEQQ = 326,
138  tNEQ = 327,
139  tGEQ = 328,
140  tLEQ = 329,
141  tANDOP = 330,
142  tOROP = 331,
143  tMATCH = 332,
144  tNMATCH = 333,
145  tDOT2 = 334,
146  tDOT3 = 335,
147  tAREF = 336,
148  tASET = 337,
149  tLSHFT = 338,
150  tRSHFT = 339,
151  tCOLON2 = 340,
152  tCOLON3 = 341,
153  tOP_ASGN = 342,
154  tASSOC = 343,
155  tLPAREN = 344,
156  tLPAREN_ARG = 345,
157  tRPAREN = 346,
158  tLBRACK = 347,
159  tLBRACE = 348,
160  tLBRACE_ARG = 349,
161  tSTAR = 350,
162  tAMPER = 351,
163  tLAMBDA = 352,
164  tSYMBEG = 353,
165  tSTRING_BEG = 354,
167  tREGEXP_BEG = 356,
168  tWORDS_BEG = 357,
169  tQWORDS_BEG = 358,
172  tSTRING_END = 361,
173  tLAMBEG = 362,
174  tLOWEST = 363,
175  tUMINUS_NUM = 364,
176  idNULL = 365,
178  idIFUNC = 367,
179  idCFUNC = 368,
187  };
188 #endif
189 /* Tokens. */
190 #define keyword_class 258
191 #define keyword_module 259
192 #define keyword_def 260
193 #define keyword_undef 261
194 #define keyword_begin 262
195 #define keyword_rescue 263
196 #define keyword_ensure 264
197 #define keyword_end 265
198 #define keyword_if 266
199 #define keyword_unless 267
200 #define keyword_then 268
201 #define keyword_elsif 269
202 #define keyword_else 270
203 #define keyword_case 271
204 #define keyword_when 272
205 #define keyword_while 273
206 #define keyword_until 274
207 #define keyword_for 275
208 #define keyword_break 276
209 #define keyword_next 277
210 #define keyword_redo 278
211 #define keyword_retry 279
212 #define keyword_in 280
213 #define keyword_do 281
214 #define keyword_do_cond 282
215 #define keyword_do_block 283
216 #define keyword_do_LAMBDA 284
217 #define keyword_return 285
218 #define keyword_yield 286
219 #define keyword_super 287
220 #define keyword_self 288
221 #define keyword_nil 289
222 #define keyword_true 290
223 #define keyword_false 291
224 #define keyword_and 292
225 #define keyword_or 293
226 #define keyword_not 294
227 #define modifier_if 295
228 #define modifier_unless 296
229 #define modifier_while 297
230 #define modifier_until 298
231 #define modifier_rescue 299
232 #define keyword_alias 300
233 #define keyword_defined 301
234 #define keyword_BEGIN 302
235 #define keyword_END 303
236 #define keyword__LINE__ 304
237 #define keyword__FILE__ 305
238 #define keyword__ENCODING__ 306
239 #define tIDENTIFIER 307
240 #define tFID 308
241 #define tGVAR 309
242 #define tIVAR 310
243 #define tCONSTANT 311
244 #define tCVAR 312
245 #define tLABEL 313
246 #define tINTEGER 314
247 #define tFLOAT 315
248 #define tSTRING_CONTENT 316
249 #define tCHAR 317
250 #define tNTH_REF 318
251 #define tBACK_REF 319
252 #define tREGEXP_END 320
253 #define tUPLUS 321
254 #define tUMINUS 322
255 #define tPOW 323
256 #define tCMP 324
257 #define tEQ 325
258 #define tEQQ 326
259 #define tNEQ 327
260 #define tGEQ 328
261 #define tLEQ 329
262 #define tANDOP 330
263 #define tOROP 331
264 #define tMATCH 332
265 #define tNMATCH 333
266 #define tDOT2 334
267 #define tDOT3 335
268 #define tAREF 336
269 #define tASET 337
270 #define tLSHFT 338
271 #define tRSHFT 339
272 #define tCOLON2 340
273 #define tCOLON3 341
274 #define tOP_ASGN 342
275 #define tASSOC 343
276 #define tLPAREN 344
277 #define tLPAREN_ARG 345
278 #define tRPAREN 346
279 #define tLBRACK 347
280 #define tLBRACE 348
281 #define tLBRACE_ARG 349
282 #define tSTAR 350
283 #define tAMPER 351
284 #define tLAMBDA 352
285 #define tSYMBEG 353
286 #define tSTRING_BEG 354
287 #define tXSTRING_BEG 355
288 #define tREGEXP_BEG 356
289 #define tWORDS_BEG 357
290 #define tQWORDS_BEG 358
291 #define tSTRING_DBEG 359
292 #define tSTRING_DVAR 360
293 #define tSTRING_END 361
294 #define tLAMBEG 362
295 #define tLOWEST 363
296 #define tUMINUS_NUM 364
297 #define idNULL 365
298 #define idRespond_to 366
299 #define idIFUNC 367
300 #define idCFUNC 368
301 #define id_core_set_method_alias 369
302 #define id_core_set_variable_alias 370
303 #define id_core_undef_method 371
304 #define id_core_define_method 372
305 #define id_core_define_singleton_method 373
306 #define id_core_set_postexe 374
307 #define tLAST_TOKEN 375
308 
309 
310 
311 
312 /* Copy the first part of user declarations. */
313 #line 12 "ripper.y"
314 
315 
316 #define YYDEBUG 1
317 #define YYERROR_VERBOSE 1
318 #define YYSTACK_USE_ALLOCA 0
319 
320 #include "ruby/ruby.h"
321 #include "ruby/st.h"
322 #include "ruby/encoding.h"
323 #include "internal.h"
324 #include "node.h"
325 #include "parse.h"
326 #include "id.h"
327 #include "regenc.h"
328 #include <stdio.h>
329 #include <errno.h>
330 #include <ctype.h>
331 
332 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
333 
334 #define YYMALLOC(size) rb_parser_malloc(parser, (size))
335 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size))
336 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size))
337 #define YYFREE(ptr) rb_parser_free(parser, (ptr))
338 #define malloc YYMALLOC
339 #define realloc YYREALLOC
340 #define calloc YYCALLOC
341 #define free YYFREE
342 
343 #ifndef RIPPER
344 static ID register_symid(ID, const char *, long, rb_encoding *);
345 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc)
346 #include "id.c"
347 #endif
348 
349 #define is_notop_id(id) ((id)>tLAST_TOKEN)
350 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
351 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
352 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
353 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
354 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
355 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
356 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
357 
358 #define is_asgn_or_id(id) ((is_notop_id(id)) && \
359  (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
360  ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
361  ((id)&ID_SCOPE_MASK) == ID_CLASS))
362 
364  EXPR_BEG, /* ignore newline, +/- is a sign. */
365  EXPR_END, /* newline significant, +/- is an operator. */
366  EXPR_ENDARG, /* ditto, and unbound braces. */
367  EXPR_ENDFN, /* ditto, and unbound braces. */
368  EXPR_ARG, /* newline significant, +/- is an operator. */
369  EXPR_CMDARG, /* newline significant, +/- is an operator. */
370  EXPR_MID, /* newline significant, +/- is an operator. */
371  EXPR_FNAME, /* ignore newline, no reserved words. */
372  EXPR_DOT, /* right after `.' or `::', no reserved words. */
373  EXPR_CLASS, /* immediate after `class', no here document. */
374  EXPR_VALUE, /* alike EXPR_BEG but label is disallowed. */
376 };
377 
379 
380 # define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1))
381 # define BITSTACK_POP(stack) ((stack) = (stack) >> 1)
382 # define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1))
383 # define BITSTACK_SET_P(stack) ((stack)&1)
384 
385 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
386 #define COND_POP() BITSTACK_POP(cond_stack)
387 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack)
388 #define COND_P() BITSTACK_SET_P(cond_stack)
389 
390 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
391 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
392 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack)
393 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
394 
395 struct vtable {
396  ID *tbl;
397  int pos;
398  int capa;
399  struct vtable *prev;
400 };
401 
402 struct local_vars {
403  struct vtable *args;
404  struct vtable *vars;
405  struct vtable *used;
406  struct local_vars *prev;
407 };
408 
409 #define DVARS_INHERIT ((void*)1)
410 #define DVARS_TOPSCOPE NULL
411 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl))
412 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3)
413 
414 static int
415 vtable_size(const struct vtable *tbl)
416 {
417  if (POINTER_P(tbl)) {
418  return tbl->pos;
419  }
420  else {
421  return 0;
422  }
423 }
424 
425 #define VTBL_DEBUG 0
426 
427 static struct vtable *
429 {
430  struct vtable *tbl = ALLOC(struct vtable);
431  tbl->pos = 0;
432  tbl->capa = 8;
433  tbl->tbl = ALLOC_N(ID, tbl->capa);
434  tbl->prev = prev;
435  if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl);
436  return tbl;
437 }
438 
439 static void
441 {
442  if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl);
443  if (POINTER_P(tbl)) {
444  if (tbl->tbl) {
445  xfree(tbl->tbl);
446  }
447  xfree(tbl);
448  }
449 }
450 
451 static void
452 vtable_add(struct vtable *tbl, ID id)
453 {
454  if (!POINTER_P(tbl)) {
455  rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl);
456  }
457  if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id));
458 
459  if (tbl->pos == tbl->capa) {
460  tbl->capa = tbl->capa * 2;
461  REALLOC_N(tbl->tbl, ID, tbl->capa);
462  }
463  tbl->tbl[tbl->pos++] = id;
464 }
465 
466 static int
467 vtable_included(const struct vtable * tbl, ID id)
468 {
469  int i;
470 
471  if (POINTER_P(tbl)) {
472  for (i = 0; i < tbl->pos; i++) {
473  if (tbl->tbl[i] == id) {
474  return i+1;
475  }
476  }
477  }
478  return 0;
479 }
480 
481 
482 #ifndef RIPPER
483 typedef struct token_info {
484  const char *token;
485  int linenum;
486  int column;
487  int nonspc;
488  struct token_info *next;
489 } token_info;
490 #endif
491 
492 /*
493  Structure of Lexer Buffer:
494 
495  lex_pbeg tokp lex_p lex_pend
496  | | | |
497  |-----------+--------------+------------|
498  |<------------>|
499  token
500 */
504 
507 
526  const char *parser_lex_pbeg;
527  const char *parser_lex_p;
528  const char *parser_lex_pend;
538  char *parser_ruby_sourcefile; /* current source file */
539  int parser_ruby_sourceline; /* current line no. */
542 
544 
545 #ifndef RIPPER
546  /* Ruby core only */
551  int nerr;
552 
555 #else
556  /* Ripper only */
557  VALUE parser_ruby_sourcefile_string;
558  const char *tokp;
559  VALUE delayed;
560  int delayed_line;
561  int delayed_col;
562 
563  VALUE value;
564  VALUE result;
565  VALUE parsing_thread;
566  int toplevel_p;
567 #endif
568 };
569 
570 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \
571  (parser->utf8 = rb_utf8_encoding()))
572 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc)
573 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc)
574 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc)
575 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc)
576 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT)
577 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc)
578 
579 static int parser_yyerror(struct parser_params*, const char*);
580 #define yyerror(msg) parser_yyerror(parser, (msg))
581 
582 #define YYLEX_PARAM parser
583 
584 #define lex_strterm (parser->parser_lex_strterm)
585 #define lex_state (parser->parser_lex_state)
586 #define cond_stack (parser->parser_cond_stack)
587 #define cmdarg_stack (parser->parser_cmdarg_stack)
588 #define class_nest (parser->parser_class_nest)
589 #define paren_nest (parser->parser_paren_nest)
590 #define lpar_beg (parser->parser_lpar_beg)
591 #define in_single (parser->parser_in_single)
592 #define in_def (parser->parser_in_def)
593 #define compile_for_eval (parser->parser_compile_for_eval)
594 #define cur_mid (parser->parser_cur_mid)
595 #define in_defined (parser->parser_in_defined)
596 #define tokenbuf (parser->parser_tokenbuf)
597 #define tokidx (parser->parser_tokidx)
598 #define toksiz (parser->parser_toksiz)
599 #define lex_input (parser->parser_lex_input)
600 #define lex_lastline (parser->parser_lex_lastline)
601 #define lex_nextline (parser->parser_lex_nextline)
602 #define lex_pbeg (parser->parser_lex_pbeg)
603 #define lex_p (parser->parser_lex_p)
604 #define lex_pend (parser->parser_lex_pend)
605 #define heredoc_end (parser->parser_heredoc_end)
606 #define command_start (parser->parser_command_start)
607 #define deferred_nodes (parser->parser_deferred_nodes)
608 #define lex_gets_ptr (parser->parser_lex_gets_ptr)
609 #define lex_gets (parser->parser_lex_gets)
610 #define lvtbl (parser->parser_lvtbl)
611 #define ruby__end__seen (parser->parser_ruby__end__seen)
612 #define ruby_sourceline (parser->parser_ruby_sourceline)
613 #define ruby_sourcefile (parser->parser_ruby_sourcefile)
614 #define current_enc (parser->enc)
615 #define yydebug (parser->parser_yydebug)
616 #ifdef RIPPER
617 #else
618 #define ruby_eval_tree (parser->parser_eval_tree)
619 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin)
620 #define ruby_debug_lines (parser->debug_lines)
621 #define ruby_coverage (parser->coverage)
622 #endif
623 
624 static int yylex(void*, void*);
625 
626 #ifndef RIPPER
627 #define yyparse ruby_yyparse
628 
629 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE);
630 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3))
631 
632 static NODE *cond_gen(struct parser_params*,NODE*);
633 #define cond(node) cond_gen(parser, (node))
634 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*);
635 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2))
636 
637 static NODE *newline_node(NODE*);
638 static void fixpos(NODE*,NODE*);
639 
640 static int value_expr_gen(struct parser_params*,NODE*);
641 static void void_expr_gen(struct parser_params*,NODE*);
642 static NODE *remove_begin(NODE*);
643 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
644 #define void_expr0(node) void_expr_gen(parser, (node))
645 #define void_expr(node) void_expr0((node) = remove_begin(node))
646 static void void_stmts_gen(struct parser_params*,NODE*);
647 #define void_stmts(node) void_stmts_gen(parser, (node))
648 static void reduce_nodes_gen(struct parser_params*,NODE**);
649 #define reduce_nodes(n) reduce_nodes_gen(parser,(n))
650 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*);
651 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2))
652 
653 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*);
654 #define block_append(h,t) block_append_gen(parser,(h),(t))
655 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*);
656 #define list_append(l,i) list_append_gen(parser,(l),(i))
657 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*);
658 #define list_concat(h,t) list_concat_gen(parser,(h),(t))
659 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*);
660 #define arg_append(h,t) arg_append_gen(parser,(h),(t))
661 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*);
662 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t))
663 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*);
664 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t))
665 static int literal_concat0(struct parser_params *, VALUE, VALUE);
666 static NODE *new_evstr_gen(struct parser_params*,NODE*);
667 #define new_evstr(n) new_evstr_gen(parser,(n))
668 static NODE *evstr2dstr_gen(struct parser_params*,NODE*);
669 #define evstr2dstr(n) evstr2dstr_gen(parser,(n))
670 static NODE *splat_array(NODE*);
671 
672 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*);
673 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1))
674 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID);
675 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id))
676 
677 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID);
678 #define new_args(f,o,r,p,b) new_args_gen(parser, (f),(o),(r),(p),(b))
679 
680 static NODE *negate_lit(NODE*);
681 static NODE *ret_args_gen(struct parser_params*,NODE*);
682 #define ret_args(node) ret_args_gen(parser, (node))
683 static NODE *arg_blk_pass(NODE*,NODE*);
684 static NODE *new_yield_gen(struct parser_params*,NODE*);
685 #define new_yield(node) new_yield_gen(parser, (node))
686 
687 static NODE *gettable_gen(struct parser_params*,ID);
688 #define gettable(id) gettable_gen(parser,(id))
689 static NODE *assignable_gen(struct parser_params*,ID,NODE*);
690 #define assignable(id,node) assignable_gen(parser, (id), (node))
691 
692 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*);
693 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2))
694 static NODE *attrset_gen(struct parser_params*,NODE*,ID);
695 #define attrset(node,id) attrset_gen(parser, (node), (id))
696 
697 static void rb_backref_error_gen(struct parser_params*,NODE*);
698 #define rb_backref_error(n) rb_backref_error_gen(parser,(n))
699 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*);
700 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2))
701 
702 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*);
703 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2))
704 
705 static ID *local_tbl_gen(struct parser_params*);
706 #define local_tbl() local_tbl_gen(parser)
707 
708 static void fixup_nodes(NODE **);
709 
710 static VALUE reg_compile_gen(struct parser_params*, VALUE, int);
711 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options))
712 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int);
713 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options))
714 static int reg_fragment_check_gen(struct parser_params*, VALUE, int);
715 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options))
716 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match);
717 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match))
718 
719 #define get_id(id) (id)
720 #define get_value(val) (val)
721 #else
722 #define remove_begin(node) (node)
723 #define rb_dvar_defined(id) 0
724 #define rb_local_defined(id) 0
725 static ID ripper_get_id(VALUE);
726 #define get_id(id) ripper_get_id(id)
727 static VALUE ripper_get_value(VALUE);
728 #define get_value(val) ripper_get_value(val)
729 static VALUE assignable_gen(struct parser_params*,VALUE);
730 #define assignable(lhs,node) assignable_gen(parser, (lhs))
731 static int id_is_var_gen(struct parser_params *parser, ID id);
732 #define id_is_var(id) id_is_var_gen(parser, (id))
733 #endif /* !RIPPER */
734 
735 static ID formal_argument_gen(struct parser_params*, ID);
736 #define formal_argument(id) formal_argument_gen(parser, (id))
737 static ID shadowing_lvar_gen(struct parser_params*,ID);
738 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name))
739 static void new_bv_gen(struct parser_params*,ID);
740 #define new_bv(id) new_bv_gen(parser, (id))
741 
742 static void local_push_gen(struct parser_params*,int);
743 #define local_push(top) local_push_gen(parser,(top))
744 static void local_pop_gen(struct parser_params*);
745 #define local_pop() local_pop_gen(parser)
746 static int local_var_gen(struct parser_params*, ID);
747 #define local_var(id) local_var_gen(parser, (id));
748 static int arg_var_gen(struct parser_params*, ID);
749 #define arg_var(id) arg_var_gen(parser, (id))
750 static int local_id_gen(struct parser_params*, ID);
751 #define local_id(id) local_id_gen(parser, (id))
752 static ID internal_id_gen(struct parser_params*);
753 #define internal_id() internal_id_gen(parser)
754 
755 static const struct vtable *dyna_push_gen(struct parser_params *);
756 #define dyna_push() dyna_push_gen(parser)
757 static void dyna_pop_gen(struct parser_params*, const struct vtable *);
758 #define dyna_pop(node) dyna_pop_gen(parser, (node))
759 static int dyna_in_block_gen(struct parser_params*);
760 #define dyna_in_block() dyna_in_block_gen(parser)
761 #define dyna_var(id) local_var(id)
762 static int dvar_defined_gen(struct parser_params*,ID,int);
763 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0)
764 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1)
765 static int dvar_curr_gen(struct parser_params*,ID);
766 #define dvar_curr(id) dvar_curr_gen(parser, (id))
767 
768 static int lvar_defined_gen(struct parser_params*, ID);
769 #define lvar_defined(id) lvar_defined_gen(parser, (id))
770 
771 #define RE_OPTION_ONCE (1<<16)
772 #define RE_OPTION_ENCODING_SHIFT 8
773 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
774 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
775 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
776 #define RE_OPTION_MASK 0xff
777 #define RE_OPTION_ARG_ENCODING_NONE 32
778 
779 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */
780 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */
781 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
782 #define nd_func u1.id
783 #if SIZEOF_SHORT == 2
784 #define nd_term(node) ((signed short)(node)->u2.id)
785 #else
786 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
787 #endif
788 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
789 #define nd_nest u3.cnt
790 
791 /****** Ripper *******/
792 
793 #ifdef RIPPER
794 #define RIPPER_VERSION "0.1.0"
795 
796 #include "eventids1.c"
797 #include "eventids2.c"
798 static ID ripper_id_gets;
799 
800 static VALUE ripper_dispatch0(struct parser_params*,ID);
801 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
802 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
803 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
804 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
805 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
806 
807 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
808 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a))
809 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b))
810 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
811 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
812 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
813 
814 #define yyparse ripper_yyparse
815 
816 #define ripper_intern(s) ID2SYM(rb_intern(s))
817 static VALUE ripper_id2sym(ID);
818 #ifdef __GNUC__
819 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \
820  ID2SYM(id) : ripper_id2sym(id))
821 #endif
822 
823 #define arg_new() dispatch0(args_new)
824 #define arg_add(l,a) dispatch2(args_add, (l), (a))
825 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a))
826 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b))
827 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b)))
828 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v))
829 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b))
830 
831 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a))
832 #define mrhs_new() dispatch0(mrhs_new)
833 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a))
834 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a))
835 
836 #define mlhs_new() dispatch0(mlhs_new)
837 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a))
838 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a))
839 
840 #define params_new(pars, opts, rest, pars2, blk) \
841  dispatch5(params, (pars), (opts), (rest), (pars2), (blk))
842 
843 #define blockvar_new(p,v) dispatch2(block_var, (p), (v))
844 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a))
845 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a))
846 
847 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a)))
848 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a))
849 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b))
850 
851 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
852 
853 #define FIXME 0
854 
855 #endif /* RIPPER */
856 
857 #ifndef RIPPER
858 # define ifndef_ripper(x) (x)
859 #else
860 # define ifndef_ripper(x)
861 #endif
862 
863 #ifndef RIPPER
864 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt))
865 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
866 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
867 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt))
868 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a))
869 #else
870 # define rb_warn0(fmt) ripper_warn0(parser, (fmt))
871 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a))
872 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a))
873 # define rb_warning0(fmt) ripper_warning0(parser, (fmt))
874 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a))
875 static void ripper_warn0(struct parser_params*, const char*);
876 static void ripper_warnI(struct parser_params*, const char*, int);
877 #if 0
878 static void ripper_warnS(struct parser_params*, const char*, const char*);
879 #endif
880 static void ripper_warning0(struct parser_params*, const char*);
881 static void ripper_warningS(struct parser_params*, const char*, const char*);
882 #endif
883 
884 #ifdef RIPPER
885 static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
886 # define rb_compile_error ripper_compile_error
887 # define compile_error ripper_compile_error
888 # define PARSER_ARG parser,
889 #else
890 # define rb_compile_error rb_compile_error_with_enc
891 # define compile_error parser->nerr++,rb_compile_error_with_enc
892 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc,
893 #endif
894 
895 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150,
896  for instance). This is too low for Ruby to parse some files, such as
897  date/format.rb, therefore bump the value up to at least Bison's default. */
898 #ifdef OLD_YACC
899 #ifndef YYMAXDEPTH
900 #define YYMAXDEPTH 10000
901 #endif
902 #endif
903 
904 #ifndef RIPPER
905 static void token_info_push(struct parser_params*, const char *token);
906 static void token_info_pop(struct parser_params*, const char *token);
907 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0)
908 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0)
909 #else
910 #define token_info_push(token) /* nothing */
911 #define token_info_pop(token) /* nothing */
912 #endif
913 
914 
915 /* Enabling traces. */
916 #ifndef YYDEBUG
917 # define YYDEBUG 1
918 #endif
919 
920 /* Enabling verbose error messages. */
921 #ifdef YYERROR_VERBOSE
922 # undef YYERROR_VERBOSE
923 # define YYERROR_VERBOSE 1
924 #else
925 # define YYERROR_VERBOSE 0
926 #endif
927 
928 /* Enabling the token table. */
929 #ifndef YYTOKEN_TABLE
930 # define YYTOKEN_TABLE 0
931 #endif
932 
933 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
934 typedef union YYSTYPE
935 #line 616 "ripper.y"
936 {
937  VALUE val;
938  NODE *node;
939  ID id;
940  int num;
941  const struct vtable *vars;
942 }
943 /* Line 187 of yacc.c. */
944 #line 945 "parse.c"
945  YYSTYPE;
946 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
947 # define YYSTYPE_IS_DECLARED 1
948 # define YYSTYPE_IS_TRIVIAL 1
949 #endif
950 
951 
952 
953 /* Copy the second part of user declarations. */
954 
955 
956 /* Line 216 of yacc.c. */
957 #line 958 "parse.c"
958 
959 #ifdef short
960 # undef short
961 #endif
962 
963 #ifdef YYTYPE_UINT8
964 typedef YYTYPE_UINT8 yytype_uint8;
965 #else
966 typedef unsigned char yytype_uint8;
967 #endif
968 
969 #ifdef YYTYPE_INT8
970 typedef YYTYPE_INT8 yytype_int8;
971 #elif (defined __STDC__ || defined __C99__FUNC__ \
972  || defined __cplusplus || defined _MSC_VER)
973 typedef signed char yytype_int8;
974 #else
975 typedef short int yytype_int8;
976 #endif
977 
978 #ifdef YYTYPE_UINT16
979 typedef YYTYPE_UINT16 yytype_uint16;
980 #else
981 typedef unsigned short int yytype_uint16;
982 #endif
983 
984 #ifdef YYTYPE_INT16
985 typedef YYTYPE_INT16 yytype_int16;
986 #else
987 typedef short int yytype_int16;
988 #endif
989 
990 #ifndef YYSIZE_T
991 # ifdef __SIZE_TYPE__
992 # define YYSIZE_T __SIZE_TYPE__
993 # elif defined size_t
994 # define YYSIZE_T size_t
995 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
996  || defined __cplusplus || defined _MSC_VER)
997 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
998 # define YYSIZE_T size_t
999 # else
1000 # define YYSIZE_T unsigned int
1001 # endif
1002 #endif
1003 
1004 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1005 
1006 #ifndef YY_
1007 # if YYENABLE_NLS
1008 # if ENABLE_NLS
1009 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1010 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1011 # endif
1012 # endif
1013 # ifndef YY_
1014 # define YY_(msgid) msgid
1015 # endif
1016 #endif
1017 
1018 /* Suppress unused-variable warnings by "using" E. */
1019 #if ! defined lint || defined __GNUC__
1020 # define YYUSE(e) ((void) (e))
1021 #else
1022 # define YYUSE(e) /* empty */
1023 #endif
1024 
1025 /* Identity function, used to suppress warnings about constant conditions. */
1026 #ifndef lint
1027 # define YYID(n) (n)
1028 #else
1029 #if (defined __STDC__ || defined __C99__FUNC__ \
1030  || defined __cplusplus || defined _MSC_VER)
1031 static int
1032 YYID (int i)
1033 #else
1034 static int
1035 YYID (i)
1036  int i;
1037 #endif
1038 {
1039  return i;
1040 }
1041 #endif
1042 
1043 #if ! defined yyoverflow || YYERROR_VERBOSE
1044 
1045 /* The parser invokes alloca or malloc; define the necessary symbols. */
1046 
1047 # ifdef YYSTACK_USE_ALLOCA
1048 # if YYSTACK_USE_ALLOCA
1049 # ifdef __GNUC__
1050 # define YYSTACK_ALLOC __builtin_alloca
1051 # elif defined __BUILTIN_VA_ARG_INCR
1052 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1053 # elif defined _AIX
1054 # define YYSTACK_ALLOC __alloca
1055 # elif defined _MSC_VER
1056 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1057 # define alloca _alloca
1058 # else
1059 # define YYSTACK_ALLOC alloca
1060 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1061  || defined __cplusplus || defined _MSC_VER)
1062 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1063 # ifndef _STDLIB_H
1064 # define _STDLIB_H 1
1065 # endif
1066 # endif
1067 # endif
1068 # endif
1069 # endif
1070 
1071 # ifdef YYSTACK_ALLOC
1072  /* Pacify GCC's `empty if-body' warning. */
1073 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1074 # ifndef YYSTACK_ALLOC_MAXIMUM
1075  /* The OS might guarantee only one guard page at the bottom of the stack,
1076  and a page size can be as small as 4096 bytes. So we cannot safely
1077  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1078  to allow for a few compiler-allocated temporary stack slots. */
1079 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1080 # endif
1081 # else
1082 # define YYSTACK_ALLOC YYMALLOC
1083 # define YYSTACK_FREE YYFREE
1084 # ifndef YYSTACK_ALLOC_MAXIMUM
1085 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1086 # endif
1087 # if (defined __cplusplus && ! defined _STDLIB_H \
1088  && ! ((defined YYMALLOC || defined malloc) \
1089  && (defined YYFREE || defined free)))
1090 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1091 # ifndef _STDLIB_H
1092 # define _STDLIB_H 1
1093 # endif
1094 # endif
1095 # ifndef YYMALLOC
1096 # define YYMALLOC malloc
1097 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1098  || defined __cplusplus || defined _MSC_VER)
1099 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1100 # endif
1101 # endif
1102 # ifndef YYFREE
1103 # define YYFREE free
1104 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1105  || defined __cplusplus || defined _MSC_VER)
1106 void free (void *); /* INFRINGES ON USER NAME SPACE */
1107 # endif
1108 # endif
1109 # endif
1110 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1111 
1112 
1113 #if (! defined yyoverflow \
1114  && (! defined __cplusplus \
1115  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1116 
1117 /* A type that is properly aligned for any stack member. */
1118 union yyalloc
1119 {
1122  };
1123 
1124 /* The size of the maximum gap between one aligned stack and the next. */
1125 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1126 
1127 /* The size of an array large to enough to hold all stacks, each with
1128  N elements. */
1129 # define YYSTACK_BYTES(N) \
1130  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1131  + YYSTACK_GAP_MAXIMUM)
1132 
1133 /* Copy COUNT objects from FROM to TO. The source and destination do
1134  not overlap. */
1135 # ifndef YYCOPY
1136 # if defined __GNUC__ && 1 < __GNUC__
1137 # define YYCOPY(To, From, Count) \
1138  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1139 # else
1140 # define YYCOPY(To, From, Count) \
1141  do \
1142  { \
1143  YYSIZE_T yyi; \
1144  for (yyi = 0; yyi < (Count); yyi++) \
1145  (To)[yyi] = (From)[yyi]; \
1146  } \
1147  while (YYID (0))
1148 # endif
1149 # endif
1150 
1151 /* Relocate STACK from its old location to the new one. The
1152  local variables YYSIZE and YYSTACKSIZE give the old and new number of
1153  elements in the stack, and YYPTR gives the new location of the
1154  stack. Advance YYPTR to a properly aligned location for the next
1155  stack. */
1156 # define YYSTACK_RELOCATE(Stack) \
1157  do \
1158  { \
1159  YYSIZE_T yynewbytes; \
1160  YYCOPY (&yyptr->Stack, Stack, yysize); \
1161  Stack = &yyptr->Stack; \
1162  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1163  yyptr += yynewbytes / sizeof (*yyptr); \
1164  } \
1165  while (YYID (0))
1166 
1167 #endif
1168 
1169 /* YYFINAL -- State number of the termination state. */
1170 #define YYFINAL 3
1171 /* YYLAST -- Last index in YYTABLE. */
1172 #define YYLAST 10748
1173 
1174 /* YYNTOKENS -- Number of terminals. */
1175 #define YYNTOKENS 148
1176 /* YYNNTS -- Number of nonterminals. */
1177 #define YYNNTS 174
1178 /* YYNRULES -- Number of rules. */
1179 #define YYNRULES 573
1180 /* YYNRULES -- Number of states. */
1181 #define YYNSTATES 991
1182 
1183 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1184 #define YYUNDEFTOK 2
1185 #define YYMAXUTOK 375
1186 
1187 #define YYTRANSLATE(YYX) \
1188  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1189 
1190 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1191 static const yytype_uint8 yytranslate[] =
1192 {
1193  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1194  147, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1195  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1196  2, 2, 146, 123, 2, 2, 2, 121, 116, 2,
1197  142, 143, 119, 117, 140, 118, 139, 120, 2, 2,
1198  2, 2, 2, 2, 2, 2, 2, 2, 111, 145,
1199  113, 109, 112, 110, 2, 2, 2, 2, 2, 2,
1200  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1201  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1202  2, 138, 2, 144, 115, 2, 141, 2, 2, 2,
1203  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1204  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1205  2, 2, 2, 136, 114, 137, 124, 2, 2, 2,
1206  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1207  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1208  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1209  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1210  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1211  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1212  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1213  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1214  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1215  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1216  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1217  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1218  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1219  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1220  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1221  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1222  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1223  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1224  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1225  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1226  75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1227  85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1228  95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1229  105, 106, 107, 108, 122, 125, 126, 127, 128, 129,
1230  130, 131, 132, 133, 134, 135
1231 };
1232 
1233 #if YYDEBUG
1234 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1235  YYRHS. */
1236 static const yytype_uint16 yyprhs[] =
1237 {
1238  0, 0, 3, 4, 7, 10, 12, 14, 18, 21,
1239  23, 24, 30, 35, 38, 40, 42, 46, 49, 50,
1240  55, 59, 63, 67, 70, 74, 78, 82, 86, 90,
1241  95, 97, 101, 105, 112, 118, 124, 130, 136, 140,
1242  144, 148, 152, 154, 158, 162, 164, 168, 172, 176,
1243  179, 181, 183, 185, 187, 189, 194, 199, 200, 206,
1244  209, 213, 218, 224, 229, 235, 238, 241, 244, 247,
1245  250, 252, 256, 258, 262, 264, 267, 271, 277, 280,
1246  285, 288, 293, 295, 299, 301, 305, 308, 312, 314,
1247  318, 320, 322, 327, 331, 335, 339, 343, 346, 348,
1248  350, 352, 357, 361, 365, 369, 373, 376, 378, 380,
1249  382, 385, 387, 391, 393, 395, 397, 399, 401, 403,
1250  405, 407, 409, 411, 412, 417, 419, 421, 423, 425,
1251  427, 429, 431, 433, 435, 437, 439, 441, 443, 445,
1252  447, 449, 451, 453, 455, 457, 459, 461, 463, 465,
1253  467, 469, 471, 473, 475, 477, 479, 481, 483, 485,
1254  487, 489, 491, 493, 495, 497, 499, 501, 503, 505,
1255  507, 509, 511, 513, 515, 517, 519, 521, 523, 525,
1256  527, 529, 531, 533, 535, 537, 539, 541, 543, 545,
1257  547, 549, 551, 553, 555, 557, 561, 567, 571, 577,
1258  584, 590, 596, 602, 608, 613, 617, 621, 625, 629,
1259  633, 637, 641, 645, 649, 654, 659, 662, 665, 669,
1260  673, 677, 681, 685, 689, 693, 697, 701, 705, 709,
1261  713, 717, 720, 723, 727, 731, 735, 739, 740, 745,
1262  752, 754, 756, 758, 761, 766, 769, 773, 775, 777,
1263  779, 781, 784, 789, 792, 794, 797, 800, 805, 807,
1264  808, 811, 814, 817, 819, 821, 824, 828, 833, 837,
1265  842, 845, 847, 849, 851, 853, 855, 857, 859, 861,
1266  863, 864, 869, 870, 875, 879, 883, 886, 890, 894,
1267  896, 901, 905, 907, 908, 915, 920, 924, 927, 929,
1268  932, 935, 942, 949, 950, 951, 959, 960, 961, 969,
1269  975, 980, 981, 982, 992, 993, 1000, 1001, 1002, 1011,
1270  1012, 1018, 1019, 1026, 1027, 1028, 1038, 1040, 1042, 1044,
1271  1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064,
1272  1066, 1068, 1070, 1072, 1074, 1077, 1079, 1081, 1083, 1089,
1273  1091, 1094, 1096, 1098, 1100, 1104, 1106, 1110, 1112, 1117,
1274  1124, 1128, 1134, 1137, 1142, 1144, 1148, 1155, 1164, 1169,
1275  1176, 1181, 1184, 1191, 1194, 1199, 1206, 1209, 1214, 1217,
1276  1222, 1224, 1226, 1228, 1232, 1234, 1239, 1241, 1244, 1246,
1277  1250, 1252, 1254, 1255, 1256, 1261, 1266, 1268, 1272, 1276,
1278  1277, 1283, 1286, 1291, 1296, 1299, 1304, 1309, 1313, 1317,
1279  1321, 1324, 1326, 1331, 1332, 1338, 1339, 1345, 1351, 1353,
1280  1355, 1362, 1364, 1366, 1368, 1370, 1373, 1375, 1378, 1380,
1281  1382, 1384, 1386, 1388, 1390, 1392, 1395, 1399, 1403, 1407,
1282  1411, 1415, 1416, 1420, 1422, 1425, 1429, 1433, 1434, 1438,
1283  1439, 1442, 1443, 1446, 1447, 1450, 1452, 1453, 1457, 1458,
1284  1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1480, 1482,
1285  1484, 1488, 1490, 1492, 1495, 1498, 1500, 1502, 1504, 1506,
1286  1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526,
1287  1528, 1530, 1532, 1534, 1536, 1537, 1542, 1545, 1549, 1552,
1288  1559, 1568, 1573, 1580, 1585, 1592, 1595, 1600, 1607, 1610,
1289  1615, 1618, 1623, 1625, 1626, 1628, 1630, 1632, 1634, 1636,
1290  1638, 1640, 1644, 1646, 1650, 1654, 1658, 1660, 1664, 1666,
1291  1670, 1672, 1674, 1677, 1679, 1681, 1683, 1686, 1689, 1691,
1292  1693, 1694, 1699, 1701, 1704, 1706, 1710, 1714, 1717, 1719,
1293  1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739,
1294  1741, 1742, 1744, 1745, 1747, 1750, 1753, 1754, 1756, 1758,
1295  1760, 1762, 1764, 1767
1296 };
1297 
1298 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1299 static const yytype_int16 yyrhs[] =
1300 {
1301  149, 0, -1, -1, 150, 151, -1, 152, 314, -1,
1302  321, -1, 153, -1, 152, 320, 153, -1, 1, 153,
1303  -1, 158, -1, -1, 47, 154, 136, 151, 137, -1,
1304  156, 256, 231, 259, -1, 157, 314, -1, 321, -1,
1305  158, -1, 157, 320, 158, -1, 1, 158, -1, -1,
1306  45, 180, 159, 180, -1, 45, 54, 54, -1, 45,
1307  54, 64, -1, 45, 54, 63, -1, 6, 181, -1,
1308  158, 40, 162, -1, 158, 41, 162, -1, 158, 42,
1309  162, -1, 158, 43, 162, -1, 158, 44, 158, -1,
1310  48, 136, 156, 137, -1, 160, -1, 168, 109, 163,
1311  -1, 286, 87, 163, -1, 216, 138, 191, 317, 87,
1312  163, -1, 216, 139, 52, 87, 163, -1, 216, 139,
1313  56, 87, 163, -1, 216, 85, 56, 87, 163, -1,
1314  216, 85, 52, 87, 163, -1, 287, 87, 163, -1,
1315  175, 109, 198, -1, 168, 109, 187, -1, 168, 109,
1316  198, -1, 161, -1, 175, 109, 163, -1, 175, 109,
1317  160, -1, 163, -1, 161, 37, 161, -1, 161, 38,
1318  161, -1, 39, 315, 161, -1, 123, 163, -1, 185,
1319  -1, 161, -1, 167, -1, 164, -1, 249, -1, 249,
1320  139, 311, 193, -1, 249, 85, 311, 193, -1, -1,
1321  94, 166, 237, 156, 137, -1, 310, 193, -1, 310,
1322  193, 165, -1, 216, 139, 311, 193, -1, 216, 139,
1323  311, 193, 165, -1, 216, 85, 311, 193, -1, 216,
1324  85, 311, 193, 165, -1, 32, 193, -1, 31, 193,
1325  -1, 30, 192, -1, 21, 192, -1, 22, 192, -1,
1326  170, -1, 89, 169, 316, -1, 170, -1, 89, 169,
1327  316, -1, 172, -1, 172, 171, -1, 172, 95, 174,
1328  -1, 172, 95, 174, 140, 173, -1, 172, 95, -1,
1329  172, 95, 140, 173, -1, 95, 174, -1, 95, 174,
1330  140, 173, -1, 95, -1, 95, 140, 173, -1, 174,
1331  -1, 89, 169, 316, -1, 171, 140, -1, 172, 171,
1332  140, -1, 171, -1, 173, 140, 171, -1, 283, -1,
1333  284, -1, 216, 138, 191, 317, -1, 216, 139, 52,
1334  -1, 216, 85, 52, -1, 216, 139, 56, -1, 216,
1335  85, 56, -1, 86, 56, -1, 287, -1, 283, -1,
1336  284, -1, 216, 138, 191, 317, -1, 216, 139, 52,
1337  -1, 216, 85, 52, -1, 216, 139, 56, -1, 216,
1338  85, 56, -1, 86, 56, -1, 287, -1, 52, -1,
1339  56, -1, 86, 176, -1, 176, -1, 216, 85, 176,
1340  -1, 52, -1, 56, -1, 53, -1, 183, -1, 184,
1341  -1, 178, -1, 279, -1, 179, -1, 281, -1, 180,
1342  -1, -1, 181, 140, 182, 180, -1, 114, -1, 115,
1343  -1, 116, -1, 69, -1, 70, -1, 71, -1, 77,
1344  -1, 78, -1, 112, -1, 73, -1, 113, -1, 74,
1345  -1, 72, -1, 83, -1, 84, -1, 117, -1, 118,
1346  -1, 119, -1, 95, -1, 120, -1, 121, -1, 68,
1347  -1, 123, -1, 124, -1, 66, -1, 67, -1, 81,
1348  -1, 82, -1, 141, -1, 49, -1, 50, -1, 51,
1349  -1, 47, -1, 48, -1, 45, -1, 37, -1, 7,
1350  -1, 21, -1, 16, -1, 3, -1, 5, -1, 46,
1351  -1, 26, -1, 15, -1, 14, -1, 10, -1, 9,
1352  -1, 36, -1, 20, -1, 25, -1, 4, -1, 22,
1353  -1, 34, -1, 39, -1, 38, -1, 23, -1, 8,
1354  -1, 24, -1, 30, -1, 33, -1, 32, -1, 13,
1355  -1, 35, -1, 6, -1, 17, -1, 31, -1, 11,
1356  -1, 12, -1, 18, -1, 19, -1, 175, 109, 185,
1357  -1, 175, 109, 185, 44, 185, -1, 286, 87, 185,
1358  -1, 286, 87, 185, 44, 185, -1, 216, 138, 191,
1359  317, 87, 185, -1, 216, 139, 52, 87, 185, -1,
1360  216, 139, 56, 87, 185, -1, 216, 85, 52, 87,
1361  185, -1, 216, 85, 56, 87, 185, -1, 86, 56,
1362  87, 185, -1, 287, 87, 185, -1, 185, 79, 185,
1363  -1, 185, 80, 185, -1, 185, 117, 185, -1, 185,
1364  118, 185, -1, 185, 119, 185, -1, 185, 120, 185,
1365  -1, 185, 121, 185, -1, 185, 68, 185, -1, 122,
1366  59, 68, 185, -1, 122, 60, 68, 185, -1, 66,
1367  185, -1, 67, 185, -1, 185, 114, 185, -1, 185,
1368  115, 185, -1, 185, 116, 185, -1, 185, 69, 185,
1369  -1, 185, 112, 185, -1, 185, 73, 185, -1, 185,
1370  113, 185, -1, 185, 74, 185, -1, 185, 70, 185,
1371  -1, 185, 71, 185, -1, 185, 72, 185, -1, 185,
1372  77, 185, -1, 185, 78, 185, -1, 123, 185, -1,
1373  124, 185, -1, 185, 83, 185, -1, 185, 84, 185,
1374  -1, 185, 75, 185, -1, 185, 76, 185, -1, -1,
1375  46, 315, 186, 185, -1, 185, 110, 185, 315, 111,
1376  185, -1, 199, -1, 185, -1, 321, -1, 197, 318,
1377  -1, 197, 140, 308, 318, -1, 308, 318, -1, 142,
1378  191, 316, -1, 321, -1, 189, -1, 321, -1, 192,
1379  -1, 197, 140, -1, 197, 140, 308, 140, -1, 308,
1380  140, -1, 167, -1, 197, 196, -1, 308, 196, -1,
1381  197, 140, 308, 196, -1, 195, -1, -1, 194, 192,
1382  -1, 96, 187, -1, 140, 195, -1, 321, -1, 187,
1383  -1, 95, 187, -1, 197, 140, 187, -1, 197, 140,
1384  95, 187, -1, 197, 140, 187, -1, 197, 140, 95,
1385  187, -1, 95, 187, -1, 260, -1, 261, -1, 264,
1386  -1, 265, -1, 266, -1, 269, -1, 285, -1, 287,
1387  -1, 53, -1, -1, 217, 200, 155, 227, -1, -1,
1388  90, 161, 201, 316, -1, 89, 156, 143, -1, 216,
1389  85, 56, -1, 86, 56, -1, 92, 188, 144, -1,
1390  93, 307, 137, -1, 30, -1, 31, 142, 192, 316,
1391  -1, 31, 142, 316, -1, 31, -1, -1, 46, 315,
1392  142, 202, 161, 316, -1, 39, 142, 161, 316, -1,
1393  39, 142, 316, -1, 310, 251, -1, 250, -1, 250,
1394  251, -1, 97, 242, -1, 218, 162, 228, 156, 230,
1395  227, -1, 219, 162, 228, 156, 231, 227, -1, -1,
1396  -1, 220, 203, 162, 229, 204, 156, 227, -1, -1,
1397  -1, 221, 205, 162, 229, 206, 156, 227, -1, 222,
1398  162, 314, 254, 227, -1, 222, 314, 254, 227, -1,
1399  -1, -1, 223, 232, 25, 207, 162, 229, 208, 156,
1400  227, -1, -1, 224, 177, 288, 209, 155, 227, -1,
1401  -1, -1, 224, 83, 161, 210, 319, 211, 155, 227,
1402  -1, -1, 225, 177, 212, 155, 227, -1, -1, 226,
1403  178, 213, 290, 155, 227, -1, -1, -1, 226, 305,
1404  313, 214, 178, 215, 290, 155, 227, -1, 21, -1,
1405  22, -1, 23, -1, 24, -1, 199, -1, 7, -1,
1406  11, -1, 12, -1, 18, -1, 19, -1, 16, -1,
1407  20, -1, 3, -1, 4, -1, 5, -1, 10, -1,
1408  319, -1, 13, -1, 319, 13, -1, 319, -1, 27,
1409  -1, 231, -1, 14, 162, 228, 156, 230, -1, 321,
1410  -1, 15, 156, -1, 175, -1, 168, -1, 293, -1,
1411  89, 235, 316, -1, 233, -1, 234, 140, 233, -1,
1412  234, -1, 234, 140, 95, 293, -1, 234, 140, 95,
1413  293, 140, 234, -1, 234, 140, 95, -1, 234, 140,
1414  95, 140, 234, -1, 95, 293, -1, 95, 293, 140,
1415  234, -1, 95, -1, 95, 140, 234, -1, 295, 140,
1416  298, 140, 301, 304, -1, 295, 140, 298, 140, 301,
1417  140, 295, 304, -1, 295, 140, 298, 304, -1, 295,
1418  140, 298, 140, 295, 304, -1, 295, 140, 301, 304,
1419  -1, 295, 140, -1, 295, 140, 301, 140, 295, 304,
1420  -1, 295, 304, -1, 298, 140, 301, 304, -1, 298,
1421  140, 301, 140, 295, 304, -1, 298, 304, -1, 298,
1422  140, 295, 304, -1, 301, 304, -1, 301, 140, 295,
1423  304, -1, 303, -1, 321, -1, 238, -1, 114, 239,
1424  114, -1, 76, -1, 114, 236, 239, 114, -1, 321,
1425  -1, 145, 240, -1, 241, -1, 240, 140, 241, -1,
1426  52, -1, 292, -1, -1, -1, 243, 244, 245, 246,
1427  -1, 142, 291, 239, 316, -1, 291, -1, 107, 156,
1428  137, -1, 29, 156, 10, -1, -1, 28, 248, 237,
1429  156, 10, -1, 167, 247, -1, 249, 139, 311, 190,
1430  -1, 249, 85, 311, 190, -1, 310, 189, -1, 216,
1431  139, 311, 190, -1, 216, 85, 311, 189, -1, 216,
1432  85, 312, -1, 216, 139, 189, -1, 216, 85, 189,
1433  -1, 32, 189, -1, 32, -1, 216, 138, 191, 317,
1434  -1, -1, 136, 252, 237, 156, 137, -1, -1, 26,
1435  253, 237, 156, 10, -1, 17, 197, 228, 156, 255,
1436  -1, 231, -1, 254, -1, 8, 257, 258, 228, 156,
1437  256, -1, 321, -1, 187, -1, 198, -1, 321, -1,
1438  88, 175, -1, 321, -1, 9, 156, -1, 321, -1,
1439  282, -1, 279, -1, 281, -1, 262, -1, 62, -1,
1440  263, -1, 262, 263, -1, 99, 271, 106, -1, 100,
1441  272, 106, -1, 101, 273, 65, -1, 102, 146, 106,
1442  -1, 102, 267, 106, -1, -1, 267, 268, 146, -1,
1443  274, -1, 268, 274, -1, 103, 146, 106, -1, 103,
1444  270, 106, -1, -1, 270, 61, 146, -1, -1, 271,
1445  274, -1, -1, 272, 274, -1, -1, 273, 274, -1,
1446  61, -1, -1, 105, 275, 278, -1, -1, -1, 104,
1447  276, 277, 156, 137, -1, 54, -1, 55, -1, 57,
1448  -1, 287, -1, 98, 280, -1, 178, -1, 55, -1,
1449  54, -1, 57, -1, 98, 272, 106, -1, 59, -1,
1450  60, -1, 122, 59, -1, 122, 60, -1, 52, -1,
1451  55, -1, 54, -1, 56, -1, 57, -1, 34, -1,
1452  33, -1, 35, -1, 36, -1, 50, -1, 49, -1,
1453  51, -1, 283, -1, 284, -1, 283, -1, 284, -1,
1454  63, -1, 64, -1, 319, -1, -1, 113, 289, 162,
1455  319, -1, 1, 319, -1, 142, 291, 316, -1, 291,
1456  319, -1, 295, 140, 299, 140, 301, 304, -1, 295,
1457  140, 299, 140, 301, 140, 295, 304, -1, 295, 140,
1458  299, 304, -1, 295, 140, 299, 140, 295, 304, -1,
1459  295, 140, 301, 304, -1, 295, 140, 301, 140, 295,
1460  304, -1, 295, 304, -1, 299, 140, 301, 304, -1,
1461  299, 140, 301, 140, 295, 304, -1, 299, 304, -1,
1462  299, 140, 295, 304, -1, 301, 304, -1, 301, 140,
1463  295, 304, -1, 303, -1, -1, 56, -1, 55, -1,
1464  54, -1, 57, -1, 292, -1, 52, -1, 293, -1,
1465  89, 235, 316, -1, 294, -1, 295, 140, 294, -1,
1466  52, 109, 187, -1, 52, 109, 216, -1, 297, -1,
1467  298, 140, 297, -1, 296, -1, 299, 140, 296, -1,
1468  119, -1, 95, -1, 300, 52, -1, 300, -1, 116,
1469  -1, 96, -1, 302, 52, -1, 140, 303, -1, 321,
1470  -1, 285, -1, -1, 142, 306, 161, 316, -1, 321,
1471  -1, 308, 318, -1, 309, -1, 308, 140, 309, -1,
1472  187, 88, 187, -1, 58, 187, -1, 52, -1, 56,
1473  -1, 53, -1, 52, -1, 56, -1, 53, -1, 183,
1474  -1, 52, -1, 53, -1, 183, -1, 139, -1, 85,
1475  -1, -1, 320, -1, -1, 147, -1, 315, 143, -1,
1476  315, 144, -1, -1, 147, -1, 140, -1, 145, -1,
1477  147, -1, 319, -1, 320, 145, -1, -1
1478 };
1479 
1480 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1481 static const yytype_uint16 yyrline[] =
1482 {
1483  0, 782, 782, 782, 813, 824, 833, 841, 849, 855,
1484  857, 856, 880, 913, 924, 933, 941, 949, 955, 955,
1485  963, 971, 982, 992, 1000, 1009, 1018, 1031, 1044, 1053,
1486  1065, 1066, 1076, 1105, 1126, 1143, 1160, 1171, 1188, 1198,
1487  1207, 1216, 1225, 1228, 1237, 1249, 1250, 1258, 1266, 1274,
1488  1282, 1285, 1297, 1298, 1301, 1302, 1311, 1323, 1322, 1344,
1489  1353, 1365, 1374, 1386, 1395, 1407, 1416, 1425, 1433, 1441,
1490  1451, 1452, 1462, 1463, 1473, 1481, 1489, 1497, 1506, 1514,
1491  1523, 1531, 1540, 1548, 1559, 1560, 1570, 1578, 1588, 1596,
1492  1606, 1610, 1614, 1622, 1630, 1638, 1646, 1658, 1668, 1680,
1493  1689, 1698, 1706, 1714, 1722, 1730, 1743, 1756, 1767, 1775,
1494  1778, 1786, 1794, 1804, 1805, 1806, 1807, 1812, 1823, 1824,
1495  1827, 1835, 1838, 1846, 1846, 1856, 1857, 1858, 1859, 1860,
1496  1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870,
1497  1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880,
1498  1881, 1882, 1883, 1884, 1887, 1887, 1887, 1888, 1888, 1889,
1499  1889, 1889, 1890, 1890, 1890, 1890, 1891, 1891, 1891, 1891,
1500  1892, 1892, 1892, 1893, 1893, 1893, 1893, 1894, 1894, 1894,
1501  1894, 1895, 1895, 1895, 1895, 1896, 1896, 1896, 1896, 1897,
1502  1897, 1897, 1897, 1898, 1898, 1901, 1910, 1920, 1949, 1980,
1503  2006, 2023, 2040, 2057, 2068, 2079, 2090, 2104, 2118, 2126,
1504  2134, 2142, 2150, 2158, 2166, 2175, 2184, 2192, 2200, 2208,
1505  2216, 2224, 2232, 2240, 2248, 2256, 2264, 2272, 2280, 2288,
1506  2299, 2307, 2315, 2323, 2331, 2339, 2347, 2355, 2355, 2365,
1507  2375, 2381, 2393, 2394, 2398, 2406, 2416, 2426, 2427, 2430,
1508  2431, 2432, 2436, 2444, 2454, 2463, 2471, 2481, 2490, 2499,
1509  2499, 2511, 2521, 2525, 2531, 2539, 2547, 2561, 2577, 2591,
1510  2606, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624,
1511  2633, 2632, 2657, 2657, 2666, 2674, 2682, 2690, 2703, 2711,
1512  2719, 2727, 2735, 2743, 2743, 2753, 2761, 2769, 2780, 2781,
1513  2792, 2796, 2808, 2820, 2820, 2820, 2831, 2831, 2831, 2842,
1514  2853, 2862, 2864, 2861, 2928, 2927, 2949, 2954, 2948, 2973,
1515  2972, 2994, 2993, 3016, 3017, 3016, 3037, 3045, 3053, 3061,
1516  3071, 3083, 3089, 3095, 3101, 3107, 3113, 3119, 3125, 3131,
1517  3137, 3147, 3153, 3158, 3159, 3166, 3171, 3174, 3175, 3188,
1518  3189, 3199, 3200, 3203, 3211, 3221, 3229, 3239, 3247, 3256,
1519  3265, 3273, 3281, 3290, 3302, 3310, 3320, 3328, 3336, 3344,
1520  3352, 3360, 3369, 3377, 3385, 3393, 3401, 3409, 3417, 3425,
1521  3433, 3443, 3444, 3450, 3459, 3468, 3479, 3480, 3490, 3497,
1522  3506, 3514, 3520, 3523, 3520, 3541, 3549, 3559, 3563, 3570,
1523  3569, 3590, 3606, 3615, 3626, 3635, 3645, 3655, 3663, 3674,
1524  3685, 3693, 3701, 3716, 3715, 3735, 3734, 3755, 3767, 3768,
1525  3771, 3790, 3793, 3801, 3809, 3812, 3816, 3819, 3827, 3830,
1526  3831, 3839, 3842, 3859, 3860, 3861, 3871, 3881, 3908, 3973,
1527  3982, 3993, 4000, 4010, 4018, 4028, 4037, 4048, 4055, 4066,
1528  4073, 4084, 4091, 4102, 4109, 4138, 4140, 4139, 4156, 4162,
1529  4155, 4181, 4189, 4197, 4205, 4208, 4219, 4220, 4221, 4222,
1530  4225, 4255, 4256, 4257, 4265, 4275, 4276, 4277, 4278, 4279,
1531  4282, 4283, 4284, 4285, 4286, 4287, 4288, 4291, 4304, 4314,
1532  4322, 4332, 4333, 4336, 4345, 4344, 4352, 4364, 4374, 4382,
1533  4390, 4398, 4406, 4414, 4422, 4430, 4438, 4446, 4454, 4462,
1534  4470, 4478, 4486, 4495, 4504, 4513, 4522, 4531, 4542, 4543,
1535  4550, 4559, 4578, 4585, 4598, 4610, 4622, 4630, 4646, 4654,
1536  4670, 4671, 4674, 4687, 4698, 4699, 4702, 4719, 4723, 4733,
1537  4743, 4743, 4772, 4773, 4783, 4790, 4800, 4808, 4818, 4819,
1538  4820, 4823, 4824, 4825, 4826, 4829, 4830, 4831, 4834, 4839,
1539  4846, 4847, 4850, 4851, 4854, 4857, 4860, 4861, 4862, 4865,
1540  4866, 4869, 4870, 4874
1541 };
1542 #endif
1543 
1544 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1545 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1546  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1547 static const char *const yytname[] =
1548 {
1549  "$end", "error", "$undefined", "keyword_class", "keyword_module",
1550  "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue",
1551  "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless",
1552  "keyword_then", "keyword_elsif", "keyword_else", "keyword_case",
1553  "keyword_when", "keyword_while", "keyword_until", "keyword_for",
1554  "keyword_break", "keyword_next", "keyword_redo", "keyword_retry",
1555  "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block",
1556  "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super",
1557  "keyword_self", "keyword_nil", "keyword_true", "keyword_false",
1558  "keyword_and", "keyword_or", "keyword_not", "modifier_if",
1559  "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue",
1560  "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END",
1561  "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__",
1562  "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL",
1563  "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF",
1564  "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ",
1565  "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH",
1566  "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2",
1567  "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN",
1568  "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA",
1569  "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG",
1570  "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG",
1571  "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'",
1572  "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL",
1573  "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias",
1574  "id_core_set_variable_alias", "id_core_undef_method",
1575  "id_core_define_method", "id_core_define_singleton_method",
1576  "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','",
1577  "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
1578  "@1", "top_compstmt", "top_stmts", "top_stmt", "@2", "bodystmt",
1579  "compstmt", "stmts", "stmt", "@3", "command_asgn", "expr", "expr_value",
1580  "command_call", "block_command", "cmd_brace_block", "@4", "command",
1581  "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head",
1582  "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym",
1583  "fitem", "undef_list", "@5", "op", "reswords", "arg", "@6", "arg_value",
1584  "aref_args", "paren_args", "opt_paren_args", "opt_call_args",
1585  "call_args", "command_args", "@7", "block_arg", "opt_block_arg", "args",
1586  "mrhs", "primary", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15",
1587  "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "primary_value",
1588  "k_begin", "k_if", "k_unless", "k_while", "k_until", "k_case", "k_for",
1589  "k_class", "k_module", "k_def", "k_end", "then", "do", "if_tail",
1590  "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs", "block_param",
1591  "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar",
1592  "lambda", "@24", "@25", "f_larglist", "lambda_body", "do_block", "@26",
1593  "block_call", "method_call", "brace_block", "@27", "@28", "case_body",
1594  "cases", "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal",
1595  "strings", "string", "string1", "xstring", "regexp", "words",
1596  "word_list", "word", "qwords", "qword_list", "string_contents",
1597  "xstring_contents", "regexp_contents", "string_content", "@29", "@30",
1598  "@31", "string_dvar", "symbol", "sym", "dsym", "numeric",
1599  "user_variable", "keyword_variable", "var_ref", "var_lhs", "backref",
1600  "superclass", "@32", "f_arglist", "f_args", "f_bad_arg", "f_norm_arg",
1601  "f_arg_item", "f_arg", "f_opt", "f_block_opt", "f_block_optarg",
1602  "f_optarg", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
1603  "opt_f_block_arg", "singleton", "@33", "assoc_list", "assocs", "assoc",
1604  "operation", "operation2", "operation3", "dot_or_colon", "opt_terms",
1605  "opt_nl", "rparen", "rbracket", "trailer", "term", "terms", "none", 0
1606 };
1607 #endif
1608 
1609 # ifdef YYPRINT
1610 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1611  token YYLEX-NUM. */
1612 static const yytype_uint16 yytoknum[] =
1613 {
1614  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1615  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1616  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1617  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1618  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1619  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1620  315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1621  325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1622  335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1623  345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1624  355, 356, 357, 358, 359, 360, 361, 362, 363, 61,
1625  63, 58, 62, 60, 124, 94, 38, 43, 45, 42,
1626  47, 37, 364, 33, 126, 365, 366, 367, 368, 369,
1627  370, 371, 372, 373, 374, 375, 123, 125, 91, 46,
1628  44, 96, 40, 41, 93, 59, 32, 10
1629 };
1630 # endif
1631 
1632 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1633 static const yytype_uint16 yyr1[] =
1634 {
1635  0, 148, 150, 149, 151, 152, 152, 152, 152, 153,
1636  154, 153, 155, 156, 157, 157, 157, 157, 159, 158,
1637  158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
1638  158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
1639  158, 158, 158, 160, 160, 161, 161, 161, 161, 161,
1640  161, 162, 163, 163, 164, 164, 164, 166, 165, 167,
1641  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
1642  168, 168, 169, 169, 170, 170, 170, 170, 170, 170,
1643  170, 170, 170, 170, 171, 171, 172, 172, 173, 173,
1644  174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
1645  175, 175, 175, 175, 175, 175, 175, 175, 176, 176,
1646  177, 177, 177, 178, 178, 178, 178, 178, 179, 179,
1647  180, 180, 181, 182, 181, 183, 183, 183, 183, 183,
1648  183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1649  183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1650  183, 183, 183, 183, 184, 184, 184, 184, 184, 184,
1651  184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
1652  184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
1653  184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
1654  184, 184, 184, 184, 184, 185, 185, 185, 185, 185,
1655  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1656  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1657  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1658  185, 185, 185, 185, 185, 185, 185, 186, 185, 185,
1659  185, 187, 188, 188, 188, 188, 189, 190, 190, 191,
1660  191, 191, 191, 191, 192, 192, 192, 192, 192, 194,
1661  193, 195, 196, 196, 197, 197, 197, 197, 198, 198,
1662  198, 199, 199, 199, 199, 199, 199, 199, 199, 199,
1663  200, 199, 201, 199, 199, 199, 199, 199, 199, 199,
1664  199, 199, 199, 202, 199, 199, 199, 199, 199, 199,
1665  199, 199, 199, 203, 204, 199, 205, 206, 199, 199,
1666  199, 207, 208, 199, 209, 199, 210, 211, 199, 212,
1667  199, 213, 199, 214, 215, 199, 199, 199, 199, 199,
1668  216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
1669  226, 227, 228, 228, 228, 229, 229, 230, 230, 231,
1670  231, 232, 232, 233, 233, 234, 234, 235, 235, 235,
1671  235, 235, 235, 235, 235, 235, 236, 236, 236, 236,
1672  236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1673  236, 237, 237, 238, 238, 238, 239, 239, 240, 240,
1674  241, 241, 243, 244, 242, 245, 245, 246, 246, 248,
1675  247, 249, 249, 249, 250, 250, 250, 250, 250, 250,
1676  250, 250, 250, 252, 251, 253, 251, 254, 255, 255,
1677  256, 256, 257, 257, 257, 258, 258, 259, 259, 260,
1678  260, 260, 261, 262, 262, 262, 263, 264, 265, 266,
1679  266, 267, 267, 268, 268, 269, 269, 270, 270, 271,
1680  271, 272, 272, 273, 273, 274, 275, 274, 276, 277,
1681  274, 278, 278, 278, 278, 279, 280, 280, 280, 280,
1682  281, 282, 282, 282, 282, 283, 283, 283, 283, 283,
1683  284, 284, 284, 284, 284, 284, 284, 285, 285, 286,
1684  286, 287, 287, 288, 289, 288, 288, 290, 290, 291,
1685  291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
1686  291, 291, 291, 291, 292, 292, 292, 292, 293, 293,
1687  294, 294, 295, 295, 296, 297, 298, 298, 299, 299,
1688  300, 300, 301, 301, 302, 302, 303, 304, 304, 305,
1689  306, 305, 307, 307, 308, 308, 309, 309, 310, 310,
1690  310, 311, 311, 311, 311, 312, 312, 312, 313, 313,
1691  314, 314, 315, 315, 316, 317, 318, 318, 318, 319,
1692  319, 320, 320, 321
1693 };
1694 
1695 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1696 static const yytype_uint8 yyr2[] =
1697 {
1698  0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
1699  0, 5, 4, 2, 1, 1, 3, 2, 0, 4,
1700  3, 3, 3, 2, 3, 3, 3, 3, 3, 4,
1701  1, 3, 3, 6, 5, 5, 5, 5, 3, 3,
1702  3, 3, 1, 3, 3, 1, 3, 3, 3, 2,
1703  1, 1, 1, 1, 1, 4, 4, 0, 5, 2,
1704  3, 4, 5, 4, 5, 2, 2, 2, 2, 2,
1705  1, 3, 1, 3, 1, 2, 3, 5, 2, 4,
1706  2, 4, 1, 3, 1, 3, 2, 3, 1, 3,
1707  1, 1, 4, 3, 3, 3, 3, 2, 1, 1,
1708  1, 4, 3, 3, 3, 3, 2, 1, 1, 1,
1709  2, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1710  1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
1711  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1712  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1713  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1714  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1715  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1716  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1717  1, 1, 1, 1, 1, 3, 5, 3, 5, 6,
1718  5, 5, 5, 5, 4, 3, 3, 3, 3, 3,
1719  3, 3, 3, 3, 4, 4, 2, 2, 3, 3,
1720  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1721  3, 2, 2, 3, 3, 3, 3, 0, 4, 6,
1722  1, 1, 1, 2, 4, 2, 3, 1, 1, 1,
1723  1, 2, 4, 2, 1, 2, 2, 4, 1, 0,
1724  2, 2, 2, 1, 1, 2, 3, 4, 3, 4,
1725  2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1726  0, 4, 0, 4, 3, 3, 2, 3, 3, 1,
1727  4, 3, 1, 0, 6, 4, 3, 2, 1, 2,
1728  2, 6, 6, 0, 0, 7, 0, 0, 7, 5,
1729  4, 0, 0, 9, 0, 6, 0, 0, 8, 0,
1730  5, 0, 6, 0, 0, 9, 1, 1, 1, 1,
1731  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1732  1, 1, 1, 1, 2, 1, 1, 1, 5, 1,
1733  2, 1, 1, 1, 3, 1, 3, 1, 4, 6,
1734  3, 5, 2, 4, 1, 3, 6, 8, 4, 6,
1735  4, 2, 6, 2, 4, 6, 2, 4, 2, 4,
1736  1, 1, 1, 3, 1, 4, 1, 2, 1, 3,
1737  1, 1, 0, 0, 4, 4, 1, 3, 3, 0,
1738  5, 2, 4, 4, 2, 4, 4, 3, 3, 3,
1739  2, 1, 4, 0, 5, 0, 5, 5, 1, 1,
1740  6, 1, 1, 1, 1, 2, 1, 2, 1, 1,
1741  1, 1, 1, 1, 1, 2, 3, 3, 3, 3,
1742  3, 0, 3, 1, 2, 3, 3, 0, 3, 0,
1743  2, 0, 2, 0, 2, 1, 0, 3, 0, 0,
1744  5, 1, 1, 1, 1, 2, 1, 1, 1, 1,
1745  3, 1, 1, 2, 2, 1, 1, 1, 1, 1,
1746  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1747  1, 1, 1, 1, 0, 4, 2, 3, 2, 6,
1748  8, 4, 6, 4, 6, 2, 4, 6, 2, 4,
1749  2, 4, 1, 0, 1, 1, 1, 1, 1, 1,
1750  1, 3, 1, 3, 3, 3, 1, 3, 1, 3,
1751  1, 1, 2, 1, 1, 1, 2, 2, 1, 1,
1752  0, 4, 1, 2, 1, 3, 3, 2, 1, 1,
1753  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1754  0, 1, 0, 1, 2, 2, 0, 1, 1, 1,
1755  1, 1, 2, 0
1756 };
1757 
1758 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1759  STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1760  means the default is an error. */
1761 static const yytype_uint16 yydefact[] =
1762 {
1763  2, 0, 0, 1, 0, 338, 339, 340, 0, 331,
1764  332, 333, 336, 334, 335, 337, 326, 327, 328, 329,
1765  289, 259, 259, 481, 480, 482, 483, 562, 0, 562,
1766  10, 0, 485, 484, 486, 475, 550, 477, 476, 478,
1767  479, 471, 472, 433, 491, 492, 0, 0, 0, 0,
1768  0, 573, 573, 82, 392, 451, 449, 451, 453, 441,
1769  447, 0, 0, 0, 3, 560, 6, 9, 30, 42,
1770  45, 53, 52, 0, 70, 0, 74, 84, 0, 50,
1771  240, 0, 280, 0, 0, 303, 306, 560, 0, 0,
1772  0, 0, 54, 298, 271, 272, 432, 434, 273, 274,
1773  275, 276, 430, 431, 429, 487, 488, 277, 0, 278,
1774  259, 5, 8, 164, 175, 165, 188, 161, 181, 171,
1775  170, 191, 192, 186, 169, 168, 163, 189, 193, 194,
1776  173, 162, 176, 180, 182, 174, 167, 183, 190, 185,
1777  184, 177, 187, 172, 160, 179, 178, 159, 166, 157,
1778  158, 154, 155, 156, 113, 115, 114, 149, 150, 146,
1779  128, 129, 130, 137, 134, 136, 131, 132, 151, 152,
1780  138, 139, 143, 133, 135, 125, 126, 127, 140, 141,
1781  142, 144, 145, 147, 148, 153, 118, 120, 122, 23,
1782  116, 117, 119, 121, 0, 0, 0, 0, 0, 0,
1783  0, 254, 0, 241, 264, 68, 258, 573, 0, 487,
1784  488, 0, 278, 573, 544, 69, 67, 562, 66, 0,
1785  573, 410, 65, 562, 563, 0, 0, 18, 237, 0,
1786  0, 326, 327, 289, 292, 411, 216, 0, 0, 217,
1787  286, 0, 0, 0, 560, 15, 562, 72, 14, 282,
1788  0, 566, 566, 242, 0, 0, 566, 542, 562, 0,
1789  0, 0, 80, 330, 0, 90, 91, 98, 300, 393,
1790  468, 467, 469, 466, 0, 465, 0, 0, 0, 0,
1791  0, 0, 0, 473, 474, 49, 231, 232, 569, 570,
1792  4, 571, 561, 0, 0, 0, 0, 0, 0, 0,
1793  399, 401, 0, 86, 0, 78, 75, 0, 0, 0,
1794  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1795  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1796  0, 0, 0, 0, 0, 573, 0, 0, 51, 0,
1797  0, 0, 0, 560, 0, 561, 0, 352, 351, 0,
1798  0, 487, 488, 278, 108, 109, 0, 0, 111, 0,
1799  0, 487, 488, 278, 319, 184, 177, 187, 172, 154,
1800  155, 156, 113, 114, 540, 321, 539, 0, 0, 0,
1801  415, 413, 299, 435, 0, 0, 404, 59, 297, 123,
1802  547, 286, 265, 261, 0, 0, 0, 255, 263, 0,
1803  573, 0, 0, 0, 0, 256, 562, 0, 291, 260,
1804  562, 250, 573, 573, 249, 562, 296, 48, 20, 22,
1805  21, 0, 293, 0, 0, 0, 0, 0, 0, 17,
1806  562, 284, 13, 561, 71, 562, 287, 568, 567, 243,
1807  568, 245, 288, 543, 0, 97, 473, 474, 88, 83,
1808  0, 0, 573, 0, 513, 455, 458, 456, 470, 452,
1809  436, 450, 437, 438, 454, 439, 440, 0, 443, 445,
1810  0, 446, 0, 0, 572, 7, 24, 25, 26, 27,
1811  28, 46, 47, 573, 0, 31, 40, 0, 41, 562,
1812  0, 76, 87, 44, 43, 0, 195, 264, 39, 213,
1813  221, 226, 227, 228, 223, 225, 235, 236, 229, 230,
1814  206, 207, 233, 234, 562, 222, 224, 218, 219, 220,
1815  208, 209, 210, 211, 212, 551, 556, 552, 557, 409,
1816  259, 407, 562, 551, 553, 552, 554, 408, 259, 0,
1817  573, 343, 0, 342, 0, 0, 0, 0, 0, 0,
1818  286, 0, 573, 0, 311, 316, 108, 109, 110, 0,
1819  494, 314, 493, 0, 573, 0, 0, 0, 513, 559,
1820  558, 323, 551, 552, 259, 259, 573, 573, 32, 197,
1821  38, 205, 57, 60, 0, 195, 546, 0, 266, 262,
1822  573, 555, 552, 562, 551, 552, 545, 290, 564, 246,
1823  251, 253, 295, 19, 0, 238, 0, 29, 0, 573,
1824  204, 73, 16, 283, 566, 0, 81, 94, 96, 562,
1825  551, 552, 519, 516, 515, 514, 517, 0, 531, 535,
1826  534, 530, 513, 0, 396, 518, 520, 522, 573, 528,
1827  573, 533, 573, 0, 512, 459, 0, 442, 444, 448,
1828  214, 215, 384, 573, 0, 382, 381, 270, 0, 85,
1829  79, 0, 0, 0, 0, 0, 0, 406, 63, 0,
1830  412, 0, 0, 248, 405, 61, 247, 341, 281, 573,
1831  573, 421, 573, 344, 573, 346, 304, 345, 307, 0,
1832  0, 310, 555, 285, 562, 551, 552, 0, 0, 496,
1833  0, 0, 108, 109, 112, 562, 0, 562, 513, 0,
1834  0, 0, 403, 56, 402, 55, 0, 0, 0, 573,
1835  124, 267, 257, 0, 0, 412, 0, 0, 573, 562,
1836  11, 244, 89, 92, 0, 519, 0, 364, 355, 357,
1837  562, 353, 573, 0, 0, 394, 0, 505, 538, 0,
1838  508, 532, 0, 510, 536, 0, 461, 462, 463, 457,
1839  464, 519, 0, 573, 0, 573, 526, 573, 573, 380,
1840  386, 0, 0, 268, 77, 196, 0, 37, 202, 36,
1841  203, 64, 565, 0, 34, 200, 35, 201, 62, 422,
1842  423, 573, 424, 0, 573, 349, 0, 0, 347, 0,
1843  0, 0, 309, 0, 0, 412, 0, 317, 0, 0,
1844  412, 320, 541, 562, 0, 498, 324, 0, 0, 198,
1845  0, 0, 252, 294, 524, 562, 0, 362, 0, 521,
1846  562, 0, 0, 523, 573, 573, 537, 573, 529, 573,
1847  573, 0, 0, 390, 387, 388, 391, 0, 383, 371,
1848  373, 0, 376, 0, 378, 400, 269, 239, 33, 199,
1849  0, 0, 426, 350, 0, 12, 428, 0, 301, 302,
1850  0, 0, 266, 573, 312, 0, 495, 315, 497, 322,
1851  513, 416, 414, 0, 354, 365, 0, 360, 356, 395,
1852  398, 397, 0, 501, 0, 503, 0, 509, 0, 506,
1853  511, 460, 0, 525, 0, 385, 573, 573, 573, 527,
1854  573, 573, 0, 425, 0, 99, 100, 107, 0, 427,
1855  0, 305, 308, 418, 419, 417, 0, 0, 0, 58,
1856  0, 363, 0, 358, 573, 573, 573, 573, 286, 0,
1857  389, 0, 368, 0, 370, 377, 0, 374, 379, 106,
1858  0, 573, 0, 573, 573, 0, 318, 0, 361, 0,
1859  502, 0, 499, 504, 507, 555, 285, 573, 573, 573,
1860  573, 555, 105, 562, 551, 552, 420, 348, 313, 325,
1861  359, 573, 369, 0, 366, 372, 375, 412, 500, 573,
1862  367
1863 };
1864 
1865 /* YYDEFGOTO[NTERM-NUM]. */
1866 static const yytype_int16 yydefgoto[] =
1867 {
1868  -1, 1, 2, 64, 65, 66, 229, 539, 540, 244,
1869  245, 421, 68, 69, 339, 70, 71, 583, 719, 72,
1870  73, 246, 74, 75, 76, 449, 77, 202, 358, 359,
1871  186, 187, 188, 189, 584, 536, 191, 79, 423, 204,
1872  250, 529, 674, 410, 411, 218, 219, 206, 397, 412,
1873  488, 80, 337, 435, 604, 341, 800, 342, 801, 697,
1874  926, 701, 698, 875, 566, 568, 711, 880, 237, 82,
1875  83, 84, 85, 86, 87, 88, 89, 90, 91, 678,
1876  542, 686, 797, 798, 350, 738, 739, 740, 763, 654,
1877  655, 764, 844, 845, 268, 269, 454, 633, 745, 301,
1878  483, 92, 93, 388, 577, 576, 549, 925, 680, 791,
1879  861, 865, 94, 95, 96, 97, 98, 99, 100, 280,
1880  467, 101, 282, 276, 274, 278, 459, 646, 645, 755,
1881  759, 102, 275, 103, 104, 209, 210, 107, 211, 212,
1882  561, 700, 709, 710, 635, 636, 637, 638, 639, 766,
1883  767, 640, 641, 642, 643, 836, 747, 377, 567, 255,
1884  413, 214, 238, 608, 531, 571, 290, 407, 408, 670,
1885  439, 543, 345, 248
1886 };
1887 
1888 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1889  STATE-NUM. */
1890 #define YYPACT_NINF -747
1891 static const yytype_int16 yypact[] =
1892 {
1893  -747, 81, 2552, -747, 7102, -747, -747, -747, 6615, -747,
1894  -747, -747, -747, -747, -747, -747, 7320, 7320, -747, -747,
1895  7320, 3237, 2814, -747, -747, -747, -747, 100, 6476, -31,
1896  -747, -26, -747, -747, -747, 5715, 2955, -747, -747, 5842,
1897  -747, -747, -747, -747, -747, -747, 8519, 8519, 83, 4434,
1898  8628, 7538, 7865, 6878, -747, 6337, -747, -747, -747, -24,
1899  29, 252, 8737, 8519, -747, 193, -747, 1104, -747, 458,
1900  -747, -747, 129, 77, -747, 69, 8846, -747, 139, 2797,
1901  22, 41, -747, 8628, 8628, -747, -747, 5078, 8951, 9056,
1902  9161, 5588, 33, 46, -747, -747, 157, -747, -747, -747,
1903  -747, -747, -747, -747, -747, 25, 58, -747, 179, 613,
1904  51, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1905  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1906  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1907  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1908  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1909  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1910  -747, -747, -747, -747, -747, -747, -747, -747, -747, -747,
1911  -747, -747, -747, -747, -747, -747, -747, -747, -747, 134,
1912  -747, -747, -747, -747, 182, 8519, 279, 4564, 8519, 8519,
1913  8519, -747, 263, 2797, 260, -747, -747, 237, 207, 43,
1914  206, 298, 254, 265, -747, -747, -747, 4969, -747, 7320,
1915  7320, -747, -747, 5208, -747, 8628, 661, -747, 272, 287,
1916  4694, -747, -747, -747, 295, 307, -747, 304, 51, 416,
1917  619, 7211, 4434, 384, 193, 1104, -31, 399, -747, 458,
1918  419, 221, 300, -747, 260, 430, 300, -747, -31, 497,
1919  501, 9266, 442, -747, 351, 366, 383, 409, -747, -747,
1920  -747, -747, -747, -747, 644, -747, 754, 813, 605, 464,
1921  819, 478, 68, 530, 532, -747, -747, -747, -747, -747,
1922  -747, -747, 5317, 8628, 8628, 8628, 8628, 7211, 8628, 8628,
1923  -747, -747, 7974, -747, 4434, 6990, 470, 7974, 8519, 8519,
1924  8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519,
1925  8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519,
1926  8519, 8519, 8519, 8519, 9548, 7320, 9625, 3609, 458, 86,
1927  86, 8628, 8628, 193, 597, 480, 562, -747, -747, 454,
1928  601, 54, 76, 99, 331, 349, 8628, 481, -747, 45,
1929  473, -747, -747, -747, -747, 217, 286, 305, 318, 321,
1930  347, 363, 376, 381, -747, -747, -747, 391, 10549, 10549,
1931  -747, -747, -747, -747, 8737, 8737, -747, 535, -747, -747,
1932  -747, 388, -747, -747, 8519, 8519, 7429, -747, -747, 9702,
1933  7320, 9779, 8519, 8519, 7647, -747, -31, 492, -747, -747,
1934  -31, -747, 506, 539, -747, 106, -747, -747, -747, -747,
1935  -747, 6615, -747, 8519, 4029, 508, 9702, 9779, 8519, 1104,
1936  -31, -747, -747, 5445, 541, -31, -747, 7756, -747, -747,
1937  7865, -747, -747, -747, 272, 510, -747, -747, -747, 543,
1938  9266, 9856, 7320, 9933, 774, -747, -747, -747, -747, -747,
1939  -747, -747, -747, -747, -747, -747, -747, 313, -747, -747,
1940  491, -747, 8519, 8519, -747, -747, -747, -747, -747, -747,
1941  -747, -747, -747, 32, 8519, -747, 545, 546, -747, -31,
1942  9266, 551, -747, -747, -747, 566, 9473, -747, -747, 416,
1943  2184, 2184, 2184, 2184, 781, 781, 2273, 2938, 2184, 2184,
1944  1364, 1364, 662, 662, 2656, 781, 781, 927, 927, 768,
1945  397, 397, 416, 416, 416, 3378, 6083, 3464, 6197, -747,
1946  307, -747, -31, 647, -747, 660, -747, -747, 3096, 650,
1947  688, -747, 3754, 685, 4174, 56, 56, 597, 8083, 650,
1948  112, 10010, 7320, 10087, -747, 458, -747, 510, -747, 193,
1949  -747, -747, -747, 10164, 7320, 10241, 3609, 8628, 1131, -747,
1950  -747, -747, -747, -747, 1739, 1739, 32, 32, -747, 10608,
1951  -747, 2797, -747, -747, 6615, 10627, -747, 8519, 260, -747,
1952  265, 5969, 2673, -31, 490, 500, -747, -747, -747, -747,
1953  7429, 7647, -747, -747, 8628, 2797, 570, -747, 307, 307,
1954  2797, 213, 1104, -747, 300, 9266, 543, 505, 282, -31,
1955  38, 261, 603, -747, -747, -747, -747, 972, -747, -747,
1956  -747, -747, 1223, 66, -747, -747, -747, -747, 580, -747,
1957  583, 683, 589, 687, -747, -747, 893, -747, -747, -747,
1958  416, 416, -747, 576, 4839, -747, -747, 604, 8192, -747,
1959  543, 9266, 8737, 8519, 630, 8737, 8737, -747, 535, 608,
1960  677, 8737, 8737, -747, -747, 535, -747, -747, -747, 8301,
1961  740, -747, 588, -747, 740, -747, -747, -747, -747, 650,
1962  44, -747, 239, 257, -31, 141, 145, 8628, 193, -747,
1963  8628, 3609, 505, 282, -747, -31, 650, 106, 1223, 3609,
1964  193, 6754, -747, -747, -747, -747, 4839, 4694, 8519, 32,
1965  -747, -747, -747, 8519, 8519, 507, 8519, 8519, 636, 106,
1966  -747, -747, -747, 291, 8519, -747, 972, 457, -747, 651,
1967  -31, -747, 639, 4839, 4694, -747, 1223, -747, -747, 1223,
1968  -747, -747, 598, -747, -747, 4694, -747, -747, -747, -747,
1969  -747, 681, 1017, 639, 679, 654, -747, 656, 657, -747,
1970  -747, 789, 8519, 664, 543, 2797, 8519, -747, 2797, -747,
1971  2797, -747, -747, 8737, -747, 2797, -747, 2797, -747, 545,
1972  -747, 713, -747, 4304, 796, -747, 8628, 650, -747, 650,
1973  4839, 4839, -747, 8410, 3899, 189, 56, -747, 193, 650,
1974  -747, -747, -747, -31, 650, -747, -747, 799, 673, 2797,
1975  4694, 8519, 7647, -747, -747, -31, 884, 671, 1079, -747,
1976  -31, 803, 686, -747, 676, 678, -747, 684, -747, 694,
1977  684, 690, 9371, -747, 699, -747, -747, 711, -747, 1251,
1978  -747, 1251, -747, 598, -747, -747, 700, 2797, -747, 2797,
1979  9476, 86, -747, -747, 4839, -747, -747, 86, -747, -747,
1980  650, 650, -747, 365, -747, 3609, -747, -747, -747, -747,
1981  1131, -747, -747, 706, -747, 707, 884, 716, -747, -747,
1982  -747, -747, 1223, -747, 598, -747, 598, -747, 598, -747,
1983  -747, -747, 790, 520, 1017, -747, 708, 715, 684, -747,
1984  717, 684, 797, -747, 523, 366, 383, 409, 3609, -747,
1985  3754, -747, -747, -747, -747, -747, 4839, 650, 3609, -747,
1986  884, 707, 884, 721, 684, 727, 684, 684, -747, 10318,
1987  -747, 1251, -747, 598, -747, -747, 598, -747, -747, 510,
1988  10395, 7320, 10472, 688, 588, 650, -747, 650, 707, 884,
1989  -747, 598, -747, -747, -747, 730, 731, 684, 735, 684,
1990  684, 55, 282, -31, 128, 158, -747, -747, -747, -747,
1991  707, 684, -747, 598, -747, -747, -747, 163, -747, 684,
1992  -747
1993 };
1994 
1995 /* YYPGOTO[NTERM-NUM]. */
1996 static const yytype_int16 yypgoto[] =
1997 {
1998  -747, -747, -747, 452, -747, 28, -747, -545, 277, -747,
1999  39, -747, -293, 184, -58, 71, -747, -169, -747, -7,
2000  791, -142, -13, -37, -747, -396, -29, 1623, -312, 788,
2001  -54, -747, -25, -747, -747, 20, -747, 1066, -747, -45,
2002  -747, 11, 47, -324, 115, 5, -747, -322, -196, 53,
2003  -295, 8, -747, -747, -747, -747, -747, -747, -747, -747,
2004  -747, -747, -747, -747, -747, -747, -747, -747, 2, -747,
2005  -747, -747, -747, -747, -747, -747, -747, -747, -747, 205,
2006  -338, -516, -72, -618, -747, -722, -671, 147, -747, -489,
2007  -747, -600, -747, -12, -747, -747, -747, -747, -747, -747,
2008  -747, -747, -747, 798, -747, -747, -531, -747, -50, -747,
2009  -747, -747, -747, -747, -747, 811, -747, -747, -747, -747,
2010  -747, -747, -747, -747, 856, -747, -140, -747, -747, -747,
2011  -747, 7, -747, 12, -747, 1268, 1605, 823, 1289, 1575,
2012  -747, -747, 35, -387, -697, -568, -690, 273, -696, -746,
2013  72, 181, -747, -526, -747, -449, 270, -747, -747, -747,
2014  97, -360, 758, -276, -747, -747, -56, -4, 278, -585,
2015  -214, 6, -18, -2
2016 };
2017 
2018 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2019  positive, shift that token. If negative, reduce the rule which
2020  number is the opposite. If zero, do what YYDEFACT says.
2021  If YYTABLE_NINF, syntax error. */
2022 #define YYTABLE_NINF -574
2023 static const yytype_int16 yytable[] =
2024 {
2025  111, 273, 544, 227, 81, 644, 81, 254, 725, 201,
2026  201, 532, 498, 201, 493, 192, 689, 405, 208, 208,
2027  193, 706, 208, 225, 262, 228, 340, 222, 190, 343,
2028  688, 344, 112, 221, 733, 192, 247, 375, 441, 306,
2029  193, 67, 443, 67, 596, 558, 559, 292, 190, 253,
2030  257, 81, 208, 838, 616, 264, 833, 541, 530, 741,
2031  538, 263, 794, -93, 208, 846, 799, 634, -103, 207,
2032  207, 291, 380, 207, 589, 190, 593, 380, 264, -99,
2033  596, 3, 589, 685, 263, 208, 208, 716, 717, 208,
2034  349, 360, 360, 291, 660, 743, 263, 263, 263, 541,
2035  430, -100, 574, 575, 251, 909, 888, -330, 652, 805,
2036  230, 190, -489, 213, 213, 387, 224, 213, 378, 644,
2037  810, 386, 279, 530, -107, 538, 334, 768, 619, 470,
2038  -489, 205, 215, 285, -99, 216, 461, -106, 464, 240,
2039  468, -102, 830, 298, 299, -490, 653, -93, 252, 256,
2040  390, 609, -99, 392, 393, 885, 809, 300, 560, 833,
2041  -330, -330, 489, 847, 814, -90, -102, -100, 741, 827,
2042  -104, -104, 379, 744, 471, 281, -101, 609, -93, 335,
2043  336, -93, 381, 644, 803, -93, 302, 381, 432, 288,
2044  288, 289, 289, 220, -90, 909, 838, -551, -91, 81,
2045  -103, 288, -103, 289, 769, 398, 833, 846, 888, 303,
2046  201, 398, 201, 201, -101, 931, -91, 405, 414, 208,
2047  835, 208, 208, 839, 448, 208, 433, 208, 694, 247,
2048  820, 288, 81, 289, 249, 476, 477, 478, 479, -98,
2049  705, 596, 223, 81, 81, 742, 221, 224, 307, 386,
2050  291, 704, -97, 224, 444, 923, 56, 486, 741, 644,
2051  741, 958, 497, 264, -103, 774, 384, 338, 338, 263,
2052  207, 338, 207, -102, 389, -102, 491, 609, 589, 589,
2053  429, -93, -105, 545, 546, -95, -95, 547, 980, 609,
2054  874, 247, 399, -490, 81, 208, 208, 208, 208, 81,
2055  208, 208, -481, -104, 208, -104, 81, 264, -101, 208,
2056  -101, 283, 284, 263, 213, -100, 213, -412, 741, 933,
2057  475, 813, -71, 907, 223, 910, 243, 648, 201, -92,
2058  927, 67, 406, 414, 409, 391, 480, 208, 288, 81,
2059  289, 403, 924, 208, 208, 400, 401, 537, 395, 291,
2060  586, 588, 804, -85, 528, 487, -481, -548, 208, 254,
2061  487, 437, 741, -107, 741, 562, 935, -285, 438, 493,
2062  -95, -480, 394, 485, 455, -549, -412, 396, 494, -94,
2063  793, -551, 548, 957, 790, 402, 208, 208, 987, 426,
2064  -482, 741, 588, 201, 722, 254, 603, -96, 414, -552,
2065  731, -95, 208, -483, -95, 404, -485, 415, -95, 417,
2066  398, 398, 537, 448, 422, 968, -475, 456, 457, 528,
2067  -285, -285, 111, 424, -552, -480, 81, -412, 192, -412,
2068  -412, 644, -484, 193, -478, 81, 451, 217, 537, 657,
2069  440, 190, 400, 427, -482, 201, 528, 438, -486, 220,
2070  414, -487, 264, 448, 208, 578, 580, -483, 263, 647,
2071  -485, -475, 596, 67, 537, 308, -478, -548, -488, -475,
2072  -475, 528, 612, -548, 243, 428, 569, 338, 338, 338,
2073  338, 656, 481, 482, 308, -549, -484, -478, -478, 452,
2074  453, -549, 264, 590, -278, 298, 299, -106, 263, 781,
2075  589, 416, -486, 497, -487, -487, 788, 425, -70, 735,
2076  664, 623, 624, 625, 626, -475, 331, 332, 333, 243,
2077  -478, -488, -488, 918, 434, 338, 338, 431, 669, 920,
2078  570, -555, 722, 556, 614, 668, 676, 557, 681, 551,
2079  555, 667, 721, 675, 81, 201, 81, -278, -278, 673,
2080  414, 687, 687, 445, 208, 588, 254, 201, 563, 720,
2081  446, 447, 414, 436, 537, 699, 208, 442, 81, 208,
2082  465, 528, 676, 676, 656, 656, 537, 726, 732, 713,
2083  715, 243, 450, 528, 469, 673, 673, 727, 398, 669,
2084  -555, 192, 552, 553, 821, -286, 193, 826, 472, -102,
2085  473, 690, 796, 793, 190, 939, 208, 676, 950, -104,
2086  492, 564, 565, 773, 548, 669, -101, 264, 550, 667,
2087  673, 712, 714, 263, 448, 474, 554, 973, 761, 582,
2088  623, 624, 625, 626, 789, 598, 748, 649, 748, 806,
2089  748, -555, 808, -555, -555, 607, 600, -551, -286, -286,
2090  735, 770, 623, 624, 625, 626, 81, 816, 564, 565,
2091  677, 951, 952, 264, 208, 627, 455, 208, 208, 263,
2092  463, 628, 629, 208, 208, 662, 609, 792, 795, 601,
2093  795, -85, 795, 615, 597, -264, 658, 627, 599, 824,
2094  669, 661, 630, 602, 629, 631, 679, 728, 683, 208,
2095  385, 669, 208, 81, 807, 455, 428, 730, 611, 456,
2096  457, 81, 734, 613, 630, 418, 815, 656, 81, 81,
2097  746, 762, -107, 749, 419, 420, 398, 856, -106, 752,
2098  308, 190, 487, 494, 671, 751, 777, 779, 867, 754,
2099  770, 776, 784, 786, -265, 81, 81, 672, 456, 457,
2100  458, 707, 782, -98, 691, 793, -102, 81, 872, -97,
2101  110, 770, 110, 748, 783, 748, 748, 659, 735, -104,
2102  623, 624, 625, 626, 110, 110, 822, 254, 110, 329,
2103  330, 331, 332, 333, 762, 208, -101, -93, 729, 862,
2104  842, 828, 866, 848, 849, 81, 851, 853, 208, 855,
2105  -95, 860, 81, 81, -266, 864, 81, 110, 110, 881,
2106  882, 886, 687, 890, 876, 455, 892, -92, 894, 682,
2107  110, 684, 81, 891, 896, 905, 622, 901, 623, 624,
2108  625, 626, 748, 748, 898, 748, 308, 748, 748, 904,
2109  -267, 110, 110, 929, 903, 110, 938, 930, 941, 308,
2110  263, 321, 322, 949, 858, 943, 932, 946, 456, 457,
2111  460, 959, 914, 627, 321, 322, 81, 961, 263, 628,
2112  629, 795, -551, -552, 455, 983, 606, 81, 364, 347,
2113  455, 338, 977, 825, 338, 329, 330, 331, 332, 333,
2114  630, 382, 940, 631, 802, 326, 327, 328, 329, 330,
2115  331, 332, 333, 976, 748, 748, 748, 383, 748, 748,
2116  750, 811, 753, 277, 376, 928, 632, 456, 457, 462,
2117  81, 906, 81, 456, 457, 466, 765, 834, 81, 0,
2118  81, 771, 748, 748, 748, 748, 735, 0, 623, 624,
2119  625, 626, 0, 0, 201, 0, 0, 756, 757, 414,
2120  758, 681, 795, 208, 0, 110, 44, 45, 0, 528,
2121  0, 0, 0, 537, 0, 748, 748, 748, 748, 669,
2122  528, 0, 0, 736, 0, 110, 0, 110, 110, 748,
2123  338, 110, 0, 110, 0, 812, 0, 748, 110, 0,
2124  0, 0, 0, 817, 818, 308, 0, 0, 0, 110,
2125  110, 0, 868, 0, 869, 0, 0, 823, 0, 0,
2126  321, 322, 0, 0, 877, 0, 0, 0, 829, 879,
2127  831, 832, 837, 0, 735, 840, 623, 624, 625, 626,
2128  0, 0, 841, 0, 0, 850, 0, 852, 854, 0,
2129  0, 0, 0, 328, 329, 330, 331, 332, 333, 0,
2130  110, 110, 110, 110, 110, 110, 110, 110, 0, 0,
2131  110, 736, 110, 0, 0, 110, 0, 737, 0, 843,
2132  863, 623, 624, 625, 626, 921, 922, 870, 871, 0,
2133  0, 873, 203, 203, 0, 0, 203, 0, 0, 0,
2134  0, 878, 0, 110, 0, 110, 0, 883, 0, 110,
2135  110, 0, 0, 884, 893, 895, 0, 897, 889, 899,
2136  900, 0, 236, 239, 110, 0, 0, 203, 203, 0,
2137  0, 0, 0, 0, 908, 0, 911, 0, 286, 287,
2138  0, 735, 956, 623, 624, 625, 626, 0, 0, 0,
2139  0, 919, 110, 110, 293, 294, 295, 296, 297, 0,
2140  0, 0, 0, 0, 0, 0, 0, 0, 110, 0,
2141  978, 0, 979, 0, 0, 934, 0, 936, 736, 0,
2142  0, 937, 0, 0, 887, 0, 942, 944, 945, 0,
2143  947, 948, 110, 622, 0, 623, 624, 625, 626, 0,
2144  0, 110, 0, 0, 0, 953, 0, 954, 0, 0,
2145  0, 0, 0, 955, 960, 962, 963, 964, 0, 0,
2146  110, 0, 0, 0, 967, 0, 969, 0, 0, 970,
2147  627, 0, 0, 0, 0, 0, 628, 629, 0, 0,
2148  0, 0, 0, 0, 981, 0, 0, 982, 984, 985,
2149  986, 0, 0, 0, 0, 0, 0, 630, 0, 0,
2150  631, 988, 0, 0, 0, 0, 989, 0, 0, 990,
2151  0, 203, 0, 0, 203, 203, 286, 0, 0, 0,
2152  105, 0, 105, 708, 0, 622, 0, 623, 624, 625,
2153  626, 0, 0, 203, 0, 203, 203, 0, 0, 0,
2154  0, 108, 0, 108, 0, 0, 0, 0, 0, 0,
2155  110, 0, 110, 761, 0, 623, 624, 625, 626, 0,
2156  110, 0, 627, 0, 0, 0, 0, 105, 628, 629,
2157  0, 265, 110, 0, 110, 110, 0, 0, 0, 0,
2158  0, 0, 0, 0, 0, 0, 0, 0, 108, 630,
2159  627, 0, 631, 0, 265, 0, 628, 629, 0, 0,
2160  0, 0, 0, 0, 0, 0, 351, 361, 361, 361,
2161  0, 0, 110, 0, 0, 0, 0, 630, 203, 0,
2162  631, 0, 0, 496, 499, 500, 501, 502, 503, 504,
2163  505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
2164  515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
2165  0, 203, 0, 0, 0, 0, 0, 0, 0, 0,
2166  0, 0, 110, 0, 0, 0, 0, 0, 0, 0,
2167  110, 0, 0, 110, 110, 0, 0, 0, 0, 110,
2168  110, 0, 308, 309, 310, 311, 312, 313, 314, 315,
2169  316, 317, 318, -574, -574, 0, 0, 321, 322, 0,
2170  579, 581, 0, 0, 0, 110, 0, 0, 110, 110,
2171  585, 203, 203, 0, 0, 105, 203, 110, 579, 581,
2172  203, 0, 0, 0, 110, 110, 324, 325, 326, 327,
2173  328, 329, 330, 331, 332, 333, 108, 0, 0, 605,
2174  0, 0, 0, 0, 610, 0, 0, 0, 105, 0,
2175  0, 110, 110, 203, 0, 0, 203, 0, 0, 105,
2176  105, 0, 0, 110, 0, 0, 0, 0, 203, 108,
2177  0, 0, 0, 0, 0, 0, 0, 0, 0, 265,
2178  108, 108, 0, 0, 0, 0, 0, 0, 650, 651,
2179  0, 110, 0, 0, 0, 0, 0, 0, 0, 0,
2180  203, 110, 0, 0, 110, 0, 0, 0, 110, 110,
2181  105, 0, 110, 0, 0, 105, 0, 0, 0, 0,
2182  0, 0, 105, 265, 0, 0, 0, 109, 110, 109,
2183  0, 108, 0, 0, 0, 0, 108, 0, 0, 0,
2184  0, 0, 0, 108, 0, 0, 0, 0, 0, 0,
2185  0, 0, 0, 0, 0, 105, 0, 106, 0, 106,
2186  0, 0, 0, 0, 203, 0, 0, 0, 203, 0,
2187  0, 0, 110, 0, 109, 78, 108, 78, 267, 0,
2188  203, 0, 0, 110, 0, 0, 0, 0, 0, 0,
2189  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2190  0, 267, 0, 203, 106, 0, 0, 0, 266, 0,
2191  0, 0, 0, 353, 363, 363, 203, 203, 0, 0,
2192  0, 0, 78, 0, 0, 0, 110, 0, 110, 0,
2193  0, 266, 0, 0, 110, 0, 110, 0, 0, 0,
2194  0, 0, 105, 352, 362, 362, 362, 0, 0, 0,
2195  0, 105, 0, 0, 0, 0, 0, 0, 0, 110,
2196  0, 348, 0, 108, 0, 0, 0, 0, 265, 0,
2197  0, 0, 108, 0, 203, 0, 0, 0, 585, 775,
2198  0, 778, 780, 0, 0, 0, 0, 785, 787, -573,
2199  0, 0, 0, 0, 0, 203, 0, -573, -573, -573,
2200  0, 0, -573, -573, -573, 0, -573, 0, 265, 0,
2201  0, 0, 0, 0, 0, 0, -573, 0, 0, 0,
2202  0, 0, 109, 0, 0, 0, -573, -573, 0, -573,
2203  -573, -573, -573, -573, 819, 0, 0, 0, 0, 778,
2204  780, 0, 785, 787, 0, 0, 0, 0, 0, 0,
2205  203, 0, 106, 0, 0, 109, 0, 0, 0, 0,
2206  105, 0, 105, 0, 0, 0, 109, 109, 0, 0,
2207  78, 0, 0, 0, -573, 0, 0, 0, 0, 0,
2208  0, 108, 0, 108, 105, 106, 267, 0, 203, 0,
2209  0, 0, 857, 0, 0, 0, 106, 106, 0, 859,
2210  0, 0, 0, 78, 0, 108, 0, 0, 0, 0,
2211  0, 0, 0, 0, 78, 78, 266, 109, 0, 203,
2212  0, 0, 109, 0, 0, 0, -573, 0, -573, 109,
2213  267, 220, -573, 265, -573, 0, -573, 859, 203, 0,
2214  0, 0, 0, 0, 0, 0, 0, 106, 0, 0,
2215  0, 0, 106, 0, 0, 0, 0, 0, 0, 106,
2216  266, 0, 109, 0, 0, 78, 0, 0, 0, 0,
2217  78, 0, 105, 0, 0, 0, 0, 78, 0, 265,
2218  495, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2219  0, 0, 106, 108, 0, 0, 0, 0, 0, 0,
2220  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2221  78, 0, 0, 0, 0, 0, 0, 0, 0, 105,
2222  0, 0, 0, 0, 0, 0, 0, 105, 0, 0,
2223  0, 0, 0, 0, 105, 105, 0, 0, 0, 0,
2224  108, 0, 0, 0, 0, 0, 0, 0, 108, 109,
2225  0, 0, 0, 0, 0, 108, 108, 0, 109, 0,
2226  0, 105, 105, 0, 0, 0, 0, 203, 0, 0,
2227  0, 0, 0, 105, 0, 267, 0, 0, 0, 106,
2228  0, 0, 108, 108, 0, 0, 0, 0, 106, 0,
2229  0, 0, 0, 0, 108, 0, 0, 78, 0, 0,
2230  0, 0, 0, 0, 0, 266, 78, 0, 0, 0,
2231  0, 105, 0, 0, 0, 267, 0, 0, 105, 105,
2232  0, 0, 105, 0, 0, 0, 0, 0, 0, 0,
2233  0, 0, 108, 0, 0, 0, 0, 0, 105, 108,
2234  108, 0, 0, 108, 0, 266, 0, 0, 0, 0,
2235  0, 0, 0, 0, 0, 0, 0, 0, 0, 108,
2236  361, 0, 0, 0, 0, 0, 0, 109, 0, 109,
2237  0, 0, 0, 0, 0, 0, 0, 0, 915, 0,
2238  0, 0, 105, 0, 0, 0, 0, 0, 0, 0,
2239  0, 109, 0, 105, 0, 0, 0, 106, 0, 106,
2240  0, 0, 0, 108, 0, 0, 0, 0, 0, 0,
2241  0, 0, 0, 0, 108, 78, 0, 78, 0, 0,
2242  0, 106, 0, 0, 0, 0, 0, 0, 0, 0,
2243  0, 0, 0, 0, 0, 0, 105, 0, 105, 78,
2244  267, 0, 0, 0, 105, 0, 105, 0, 0, 0,
2245  0, 0, 0, 0, 0, 0, 0, 108, 0, 108,
2246  0, 0, 0, 0, 0, 108, 0, 108, 0, 0,
2247  266, 760, 0, 0, 0, 0, 0, 0, 0, 109,
2248  0, 0, 0, 0, 0, 0, 267, 0, 0, 0,
2249  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2250  0, 0, 308, -574, -574, -574, -574, 313, 314, 106,
2251  0, -574, -574, 0, 0, 0, 266, 321, 322, 0,
2252  0, 0, 0, 0, 0, 0, 109, 78, 0, 0,
2253  0, 0, 0, 0, 109, 495, 0, 0, 0, 0,
2254  0, 109, 109, 0, 0, 0, 324, 325, 326, 327,
2255  328, 329, 330, 331, 332, 333, 106, 0, 0, 0,
2256  0, 0, 0, 0, 106, 0, 0, 0, 109, 109,
2257  0, 106, 106, 0, 78, 0, 0, 0, 0, 0,
2258  109, 0, 78, 0, 0, 0, 0, 0, 0, 78,
2259  78, 308, 309, 310, 311, 312, 313, 314, 106, 106,
2260  317, 318, 0, 0, 0, 0, 321, 322, 0, 0,
2261  106, 0, 0, 0, 0, 0, 78, 78, 109, 0,
2262  0, 0, 0, 0, 0, 109, 109, 0, 78, 109,
2263  0, 0, 0, 0, 0, 324, 325, 326, 327, 328,
2264  329, 330, 331, 332, 333, 109, 0, 0, 106, 0,
2265  0, 0, 0, 0, 0, 106, 106, 0, 0, 106,
2266  0, 0, 0, 0, 0, 0, 78, 363, 0, 0,
2267  0, 0, 0, 78, 78, 106, 0, 78, 0, 0,
2268  0, 0, 0, 0, 0, 917, 0, 0, 0, 109,
2269  0, 0, 0, 78, 0, 0, 0, 362, 0, 0,
2270  109, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2271  0, 0, 0, 0, 0, 916, 0, 0, 0, 106,
2272  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2273  106, 0, 0, 913, 0, 0, 0, 78, 0, 0,
2274  0, 0, 0, 109, 0, 109, 0, 0, 78, 0,
2275  0, 109, 0, 109, 0, 0, 0, 0, 0, 0,
2276  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2277  0, 0, 0, 106, 0, 106, 0, 0, 0, 0,
2278  0, 106, 0, 106, 0, 0, 0, 0, 0, 0,
2279  0, 78, 0, 78, 0, 0, 0, 0, 0, 78,
2280  0, 78, -573, 4, 0, 5, 6, 7, 8, 9,
2281  0, 0, 0, 10, 11, 0, 0, 0, 12, 0,
2282  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
2283  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2284  0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
2285  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2286  0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
2287  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2288  0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
2289  0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
2290  55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
2291  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2292  0, 0, 0, -285, 61, 62, 63, 0, 0, 0,
2293  0, -285, -285, -285, 0, 0, -285, -285, -285, 0,
2294  -285, 0, 0, 0, 0, 0, 0, -573, 0, -573,
2295  -285, -285, -285, 0, 0, 0, 0, 0, 0, 0,
2296  -285, -285, 0, -285, -285, -285, -285, -285, 0, 0,
2297  0, 0, 0, 0, 308, 309, 310, 311, 312, 313,
2298  314, 315, 316, 317, 318, 319, 320, 0, 0, 321,
2299  322, -285, -285, -285, -285, -285, -285, -285, -285, -285,
2300  -285, -285, -285, -285, 0, 0, -285, -285, -285, 0,
2301  724, -285, 0, 0, 0, 0, 323, -285, 324, 325,
2302  326, 327, 328, 329, 330, 331, 332, 333, 0, 0,
2303  -285, 0, -105, -285, -285, -285, -285, -285, -285, -285,
2304  -285, -285, -285, -285, -285, 0, 0, 0, 0, 0,
2305  0, 0, 0, 224, 0, 0, 0, 0, 0, 0,
2306  -285, -285, -285, -285, -411, 0, -285, -285, -285, 0,
2307  -285, 0, -411, -411, -411, 0, 0, -411, -411, -411,
2308  0, -411, 0, 0, 0, 0, 0, 0, 0, 0,
2309  -411, -411, -411, 0, 0, 0, 0, 0, 0, 0,
2310  0, -411, -411, 0, -411, -411, -411, -411, -411, 0,
2311  0, 0, 0, 0, 0, 308, 309, 310, 311, 312,
2312  313, 314, 315, 316, 317, 318, 319, 320, 0, 0,
2313  321, 322, -411, -411, -411, -411, -411, -411, -411, -411,
2314  -411, -411, -411, -411, -411, 0, 0, -411, -411, -411,
2315  0, 0, -411, 0, 0, 0, 0, 323, -411, 324,
2316  325, 326, 327, 328, 329, 330, 331, 332, 333, 0,
2317  0, 0, 0, 0, -411, 0, -411, -411, -411, -411,
2318  -411, -411, -411, -411, -411, -411, 0, 0, 0, 0,
2319  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2320  -411, -411, -411, -411, -411, -279, 220, -411, -411, -411,
2321  0, -411, 0, -279, -279, -279, 0, 0, -279, -279,
2322  -279, 0, -279, 0, 0, 0, 0, 0, 0, 0,
2323  0, 0, -279, -279, -279, 0, 0, 0, 0, 0,
2324  0, 0, -279, -279, 0, -279, -279, -279, -279, -279,
2325  0, 0, 0, 0, 0, 0, 308, 309, 310, 311,
2326  312, 313, 314, 315, 0, 317, 318, 0, 0, 0,
2327  0, 321, 322, -279, -279, -279, -279, -279, -279, -279,
2328  -279, -279, -279, -279, -279, -279, 0, 0, -279, -279,
2329  -279, 0, 0, -279, 0, 0, 0, 0, 0, -279,
2330  324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
2331  0, 0, -279, 0, 0, -279, -279, -279, -279, -279,
2332  -279, -279, -279, -279, -279, -279, -279, 0, 0, 0,
2333  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2334  0, 0, -279, -279, -279, -279, -573, 0, -279, -279,
2335  -279, 0, -279, 0, -573, -573, -573, 0, 0, -573,
2336  -573, -573, 0, -573, 0, 0, 0, 0, 0, 0,
2337  0, 0, -573, -573, -573, 0, 0, 0, 0, 0,
2338  0, 0, 0, -573, -573, 0, -573, -573, -573, -573,
2339  -573, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2340  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2341  0, 0, 0, 0, -573, -573, -573, -573, -573, -573,
2342  -573, -573, -573, -573, -573, -573, -573, 0, 0, -573,
2343  -573, -573, 0, 0, -573, 0, 0, 0, 0, 0,
2344  -573, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2345  0, 0, 0, 0, 0, 0, -573, 0, -573, -573,
2346  -573, -573, -573, -573, -573, -573, -573, -573, 0, 0,
2347  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2348  0, 0, -573, -573, -573, -573, -573, -292, 220, -573,
2349  -573, -573, 0, -573, 0, -292, -292, -292, 0, 0,
2350  -292, -292, -292, 0, -292, 0, 0, 0, 0, 0,
2351  0, 0, 0, 0, -292, -292, 0, 0, 0, 0,
2352  0, 0, 0, 0, -292, -292, 0, -292, -292, -292,
2353  -292, -292, 0, 0, 0, 0, 0, 0, 0, 0,
2354  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2355  0, 0, 0, 0, 0, -292, -292, -292, -292, -292,
2356  -292, -292, -292, -292, -292, -292, -292, -292, 0, 0,
2357  -292, -292, -292, 0, 0, -292, 0, 0, 0, 0,
2358  0, -292, 0, 0, 0, 0, 0, 0, 0, 0,
2359  0, 0, 0, 0, 0, 0, 0, -292, 0, -292,
2360  -292, -292, -292, -292, -292, -292, -292, -292, -292, 0,
2361  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2362  0, 0, 0, 0, -292, -292, -292, -292, -555, 217,
2363  -292, -292, -292, 0, -292, 0, -555, -555, -555, 0,
2364  0, 0, -555, -555, 0, -555, 0, 0, 0, 0,
2365  0, 0, 0, 0, -555, 0, 0, 0, 0, 0,
2366  0, 0, 0, 0, 0, -555, -555, 0, -555, -555,
2367  -555, -555, -555, 0, 0, 0, 0, 0, 0, 0,
2368  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2369  0, 0, 0, 0, 0, 0, -555, -555, -555, -555,
2370  -555, -555, -555, -555, -555, -555, -555, -555, -555, 0,
2371  0, -555, -555, -555, -285, 665, 0, 0, 0, 0,
2372  0, 0, -285, -285, -285, 0, 0, 0, -285, -285,
2373  0, -285, 0, 0, 0, 0, 0, -103, -555, 0,
2374  -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
2375  0, -285, -285, 0, -285, -285, -285, -285, -285, 0,
2376  0, 0, 0, 0, -555, -555, -555, -555, -94, 0,
2377  0, -555, 0, -555, 0, -555, 0, 0, 0, 0,
2378  0, 0, -285, -285, -285, -285, -285, -285, -285, -285,
2379  -285, -285, -285, -285, -285, 0, 0, -285, -285, -285,
2380  0, 666, 0, 0, 0, 0, 0, 0, 0, 0,
2381  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2382  0, 0, 0, -105, -285, 0, -285, -285, -285, -285,
2383  -285, -285, -285, -285, -285, -285, 0, 0, 0, 0,
2384  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2385  0, -285, -285, -285, -96, 0, 0, -285, 0, -285,
2386  241, -285, 5, 6, 7, 8, 9, -573, -573, -573,
2387  10, 11, 0, 0, -573, 12, 0, 13, 14, 15,
2388  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2389  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2390  0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
2391  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2392  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2393  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2394  0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
2395  0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
2396  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2397  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2398  0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
2399  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2400  0, 0, 0, 0, -573, 241, -573, 5, 6, 7,
2401  8, 9, 0, 0, -573, 10, 11, 0, -573, -573,
2402  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2403  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2404  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2405  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2406  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2407  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2408  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2409  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2410  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2411  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2412  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2413  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2414  0, 0, 0, 0, 0, 0, 0, 0, 0, -573,
2415  241, -573, 5, 6, 7, 8, 9, 0, 0, -573,
2416  10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
2417  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2418  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2419  0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
2420  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2421  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2422  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2423  0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
2424  0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
2425  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2426  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2427  0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
2428  4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
2429  10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
2430  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2431  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2432  0, 0, 0, 0, 28, 29, 30, 31, 32, 33,
2433  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2434  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2435  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2436  0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
2437  0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
2438  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2439  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2440  0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
2441  0, 0, 0, 0, 0, 0, -573, 0, 0, 0,
2442  0, 0, 0, 0, -573, 241, -573, 5, 6, 7,
2443  8, 9, 0, 0, -573, 10, 11, 0, 0, -573,
2444  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2445  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2446  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2447  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2448  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2449  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2450  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2451  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2452  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2453  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2454  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2455  0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
2456  8, 9, 0, -573, -573, 10, 11, 0, 0, -573,
2457  12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
2458  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2459  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2460  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2461  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2462  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2463  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2464  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2465  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2466  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2467  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2468  0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
2469  8, 9, 0, 0, 0, 10, 11, 0, 0, -573,
2470  12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
2471  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2472  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2473  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2474  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2475  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2476  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2477  48, 0, 0, 242, 50, 0, 51, 52, 0, 53,
2478  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2479  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2480  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2481  0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
2482  8, 9, 0, 0, 0, 10, 11, -573, 0, -573,
2483  12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
2484  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2485  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2486  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2487  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2488  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2489  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2490  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2491  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2492  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2493  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2494  0, 0, 0, 0, 0, 241, 0, 5, 6, 7,
2495  8, 9, 0, 0, 0, 10, 11, -573, 0, -573,
2496  12, -573, 13, 14, 15, 16, 17, 18, 19, 0,
2497  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2498  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2499  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
2500  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2501  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2502  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2503  48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
2504  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2505  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2506  0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
2507  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2508  0, -573, 0, 0, 0, 0, 0, 0, 0, -573,
2509  241, -573, 5, 6, 7, 8, 9, 0, 0, -573,
2510  10, 11, 0, 0, 0, 12, 0, 13, 14, 15,
2511  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2512  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2513  0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
2514  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2515  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2516  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2517  0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
2518  0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
2519  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2520  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2521  0, 61, 62, 63, 0, 0, 0, 0, 0, 0,
2522  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
2523  10, 11, 0, 0, -573, 12, -573, 13, 14, 15,
2524  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2525  21, 22, 23, 24, 25, 26, 0, 0, 194, 0,
2526  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
2527  34, 35, 36, 37, 38, 39, 40, 195, 41, 42,
2528  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2529  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2530  0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
2531  0, 51, 52, 0, 198, 199, 54, 55, 56, 57,
2532  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2533  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2534  11, 61, 200, 63, 12, 0, 13, 14, 15, 16,
2535  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2536  22, 23, 24, 25, 26, 0, 224, 27, 0, 0,
2537  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2538  35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
2539  43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
2540  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2541  0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
2542  51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
2543  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2544  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2545  61, 62, 63, 0, 0, 0, 0, 0, 0, 0,
2546  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2547  11, 0, 0, 288, 12, 289, 13, 14, 15, 16,
2548  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2549  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2550  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2551  35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
2552  43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
2553  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2554  0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
2555  51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
2556  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2557  5, 6, 7, 8, 9, 0, 0, 0, 10, 11,
2558  61, 62, 63, 12, 0, 13, 14, 15, 16, 17,
2559  18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
2560  23, 24, 25, 26, 0, 224, 27, 0, 0, 0,
2561  0, 0, 28, 29, 30, 31, 32, 33, 34, 35,
2562  36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
2563  44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
2564  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2565  0, 0, 0, 48, 0, 0, 49, 50, 0, 51,
2566  52, 0, 53, 0, 54, 55, 56, 57, 58, 59,
2567  60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2568  0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
2569  62, 63, 0, 0, 0, 0, 0, 0, 5, 6,
2570  7, 8, 9, 0, 0, 0, 10, 11, 0, 0,
2571  0, 12, 474, 13, 14, 15, 16, 17, 18, 19,
2572  0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2573  25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2574  28, 29, 0, 31, 32, 33, 34, 35, 36, 37,
2575  38, 39, 40, 0, 41, 42, 0, 43, 44, 45,
2576  0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2577  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2578  0, 48, 0, 0, 49, 50, 0, 51, 52, 0,
2579  53, 0, 54, 55, 56, 57, 58, 59, 60, 0,
2580  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2581  0, 0, 0, 0, 0, 0, 0, 61, 62, 63,
2582  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2583  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2584  474, 113, 114, 115, 116, 117, 118, 119, 120, 121,
2585  122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
2586  132, 133, 134, 135, 136, 0, 0, 0, 137, 138,
2587  139, 365, 366, 367, 368, 144, 145, 146, 0, 0,
2588  0, 0, 0, 147, 148, 149, 150, 369, 370, 371,
2589  372, 155, 37, 38, 373, 40, 0, 0, 0, 0,
2590  0, 0, 0, 0, 157, 158, 159, 160, 161, 162,
2591  163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
2592  169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
2593  0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
2594  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2595  173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2596  0, 183, 184, 0, 0, 0, 0, 0, -548, -548,
2597  -548, 0, -548, 0, 0, 0, -548, -548, 0, 185,
2598  374, -548, 0, -548, -548, -548, -548, -548, -548, -548,
2599  0, -548, 0, 0, 0, -548, -548, -548, -548, -548,
2600  -548, -548, 0, 0, -548, 0, 0, 0, 0, 0,
2601  0, -548, 0, 0, -548, -548, -548, -548, -548, -548,
2602  -548, -548, -548, -548, -548, -548, 0, -548, -548, -548,
2603  0, -548, -548, 0, 0, 0, 0, 0, 0, 0,
2604  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2605  0, -548, 0, 0, -548, -548, 0, -548, -548, 0,
2606  -548, -548, -548, -548, -548, -548, -548, -548, -548, 0,
2607  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2608  0, 0, 0, 0, 0, 0, 0, -548, -548, -548,
2609  0, 0, 0, 0, 0, -549, -549, -549, 0, -549,
2610  0, -548, 0, -549, -549, 0, 0, -548, -549, 0,
2611  -549, -549, -549, -549, -549, -549, -549, 0, -549, 0,
2612  0, 0, -549, -549, -549, -549, -549, -549, -549, 0,
2613  0, -549, 0, 0, 0, 0, 0, 0, -549, 0,
2614  0, -549, -549, -549, -549, -549, -549, -549, -549, -549,
2615  -549, -549, -549, 0, -549, -549, -549, 0, -549, -549,
2616  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2617  0, 0, 0, 0, 0, 0, 0, 0, -549, 0,
2618  0, -549, -549, 0, -549, -549, 0, -549, -549, -549,
2619  -549, -549, -549, -549, -549, -549, 0, 0, 0, 0,
2620  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2621  0, 0, 0, 0, -549, -549, -549, 0, 0, 0,
2622  0, 0, -551, -551, -551, 0, -551, 0, -549, 0,
2623  -551, -551, 0, 0, -549, -551, 0, -551, -551, -551,
2624  -551, -551, -551, -551, 0, 0, 0, 0, 0, -551,
2625  -551, -551, -551, -551, -551, -551, 0, 0, -551, 0,
2626  0, 0, 0, 0, 0, -551, 0, 0, -551, -551,
2627  -551, -551, -551, -551, -551, -551, -551, -551, -551, -551,
2628  0, -551, -551, -551, 0, -551, -551, 0, 0, 0,
2629  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2630  0, 0, 0, 0, 0, -551, 723, 0, -551, -551,
2631  0, -551, -551, 0, -551, -551, -551, -551, -551, -551,
2632  -551, -551, -551, 0, 0, 0, 0, 0, -103, 0,
2633  0, 0, 0, 0, 0, 0, -553, -553, -553, 0,
2634  -553, -551, -551, -551, -553, -553, 0, 0, 0, -553,
2635  0, -553, -553, -553, -553, -553, -553, -553, 0, 0,
2636  0, -551, 0, -553, -553, -553, -553, -553, -553, -553,
2637  0, 0, -553, 0, 0, 0, 0, 0, 0, -553,
2638  0, 0, -553, -553, -553, -553, -553, -553, -553, -553,
2639  -553, -553, -553, -553, 0, -553, -553, -553, 0, -553,
2640  -553, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2641  0, 0, 0, 0, 0, 0, 0, 0, 0, -553,
2642  0, 0, -553, -553, 0, -553, -553, 0, -553, -553,
2643  -553, -553, -553, -553, -553, -553, -553, 0, 0, 0,
2644  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2645  -554, -554, -554, 0, -554, -553, -553, -553, -554, -554,
2646  0, 0, 0, -554, 0, -554, -554, -554, -554, -554,
2647  -554, -554, 0, 0, 0, -553, 0, -554, -554, -554,
2648  -554, -554, -554, -554, 0, 0, -554, 0, 0, 0,
2649  0, 0, 0, -554, 0, 0, -554, -554, -554, -554,
2650  -554, -554, -554, -554, -554, -554, -554, -554, 0, -554,
2651  -554, -554, 0, -554, -554, 0, 0, 0, 0, 0,
2652  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2653  0, 0, 0, -554, 0, 0, -554, -554, 0, -554,
2654  -554, 0, -554, -554, -554, -554, -554, -554, -554, -554,
2655  -554, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2656  0, 0, 0, 0, 0, 0, 0, 0, 0, -554,
2657  -554, -554, 0, 0, 0, 0, 0, 0, 0, 0,
2658  0, 0, 0, 0, 0, 0, 0, 0, 0, -554,
2659  113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
2660  123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
2661  133, 134, 135, 136, 0, 0, 0, 137, 138, 139,
2662  140, 141, 142, 143, 144, 145, 146, 0, 0, 0,
2663  0, 0, 147, 148, 149, 150, 151, 152, 153, 154,
2664  155, 270, 271, 156, 272, 0, 0, 0, 0, 0,
2665  0, 0, 0, 157, 158, 159, 160, 161, 162, 163,
2666  164, 165, 0, 0, 166, 167, 0, 0, 168, 169,
2667  170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
2668  0, 0, 172, 0, 0, 0, 0, 0, 0, 0,
2669  0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
2670  174, 175, 176, 177, 178, 179, 180, 181, 182, 0,
2671  183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
2672  0, 0, 0, 0, 0, 0, 0, 0, 185, 113,
2673  114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
2674  124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
2675  134, 135, 136, 0, 0, 0, 137, 138, 139, 140,
2676  141, 142, 143, 144, 145, 146, 0, 0, 0, 0,
2677  0, 147, 148, 149, 150, 151, 152, 153, 154, 155,
2678  226, 0, 156, 0, 0, 0, 0, 0, 0, 0,
2679  0, 0, 157, 158, 159, 160, 161, 162, 163, 164,
2680  165, 0, 0, 166, 167, 0, 0, 168, 169, 170,
2681  171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2682  0, 172, 0, 0, 55, 0, 0, 0, 0, 0,
2683  0, 0, 0, 0, 0, 0, 0, 0, 173, 174,
2684  175, 176, 177, 178, 179, 180, 181, 182, 0, 183,
2685  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2686  0, 0, 0, 0, 0, 0, 0, 185, 113, 114,
2687  115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
2688  125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
2689  135, 136, 0, 0, 0, 137, 138, 139, 140, 141,
2690  142, 143, 144, 145, 146, 0, 0, 0, 0, 0,
2691  147, 148, 149, 150, 151, 152, 153, 154, 155, 0,
2692  0, 156, 0, 0, 0, 0, 0, 0, 0, 0,
2693  0, 157, 158, 159, 160, 161, 162, 163, 164, 165,
2694  0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
2695  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2696  172, 0, 0, 55, 0, 0, 0, 0, 0, 0,
2697  0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
2698  176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
2699  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2700  0, 0, 0, 0, 0, 0, 185, 113, 114, 115,
2701  116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
2702  126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
2703  136, 0, 0, 0, 137, 138, 139, 140, 141, 142,
2704  143, 144, 145, 146, 0, 0, 0, 0, 0, 147,
2705  148, 149, 150, 151, 152, 153, 154, 155, 0, 0,
2706  156, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2707  157, 158, 159, 160, 161, 162, 163, 164, 165, 0,
2708  0, 166, 167, 0, 0, 168, 169, 170, 171, 0,
2709  0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
2710  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2711  0, 0, 0, 0, 0, 0, 173, 174, 175, 176,
2712  177, 178, 179, 180, 181, 182, 0, 183, 184, 0,
2713  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2714  11, 0, 0, 0, 12, 185, 13, 14, 15, 231,
2715  232, 18, 19, 0, 0, 0, 0, 0, 233, 234,
2716  235, 23, 24, 25, 26, 0, 0, 194, 0, 0,
2717  0, 0, 0, 0, 258, 0, 0, 32, 33, 34,
2718  35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
2719  43, 44, 45, 0, 0, 0, 0, 0, 0, 0,
2720  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2721  0, 0, 0, 0, 259, 0, 0, 197, 50, 0,
2722  51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
2723  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2724  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
2725  260, 10, 11, 0, 0, 0, 12, 0, 13, 14,
2726  15, 231, 232, 18, 19, 0, 0, 0, 261, 0,
2727  233, 234, 235, 23, 24, 25, 26, 0, 0, 194,
2728  0, 0, 0, 0, 0, 0, 258, 0, 0, 32,
2729  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2730  42, 0, 43, 44, 45, 0, 0, 0, 0, 0,
2731  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2732  0, 0, 0, 0, 0, 0, 259, 0, 0, 197,
2733  50, 0, 51, 52, 0, 0, 0, 54, 55, 56,
2734  57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
2735  0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
2736  0, 0, 260, 10, 11, 0, 0, 0, 12, 0,
2737  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
2738  490, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2739  0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
2740  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2741  0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
2742  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2743  0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
2744  0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
2745  55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
2746  0, 0, 0, 0, 5, 6, 7, 8, 9, 0,
2747  0, 0, 10, 11, 61, 62, 63, 12, 0, 13,
2748  14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
2749  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2750  27, 0, 0, 0, 0, 0, 28, 29, 0, 31,
2751  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2752  41, 42, 0, 43, 44, 45, 0, 46, 47, 0,
2753  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2754  0, 0, 0, 0, 0, 0, 0, 48, 0, 0,
2755  49, 50, 0, 51, 52, 0, 53, 0, 54, 55,
2756  56, 57, 58, 59, 60, 0, 0, 0, 0, 0,
2757  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
2758  0, 10, 11, 61, 62, 63, 12, 0, 13, 14,
2759  15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
2760  20, 21, 22, 23, 24, 25, 26, 0, 0, 194,
2761  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
2762  33, 34, 35, 36, 37, 38, 39, 40, 195, 41,
2763  42, 0, 43, 44, 45, 0, 46, 47, 0, 0,
2764  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2765  0, 0, 0, 0, 0, 0, 196, 0, 0, 197,
2766  50, 0, 51, 52, 0, 198, 199, 54, 55, 56,
2767  57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
2768  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
2769  10, 11, 61, 200, 63, 12, 0, 13, 14, 15,
2770  231, 232, 18, 19, 0, 0, 0, 0, 0, 233,
2771  234, 235, 23, 24, 25, 26, 0, 0, 194, 0,
2772  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
2773  34, 35, 36, 37, 38, 39, 40, 195, 41, 42,
2774  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2775  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2776  0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
2777  0, 51, 52, 0, 587, 199, 54, 55, 56, 57,
2778  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2779  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2780  11, 61, 200, 63, 12, 0, 13, 14, 15, 231,
2781  232, 18, 19, 0, 0, 0, 0, 0, 233, 234,
2782  235, 23, 24, 25, 26, 0, 0, 194, 0, 0,
2783  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2784  35, 36, 37, 38, 39, 40, 195, 41, 42, 0,
2785  43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
2786  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2787  0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
2788  51, 52, 0, 198, 0, 54, 55, 56, 57, 58,
2789  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2790  5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
2791  61, 200, 63, 12, 0, 13, 14, 15, 231, 232,
2792  18, 19, 0, 0, 0, 0, 0, 233, 234, 235,
2793  23, 24, 25, 26, 0, 0, 194, 0, 0, 0,
2794  0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
2795  36, 37, 38, 39, 40, 195, 41, 42, 0, 43,
2796  44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
2797  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2798  0, 0, 0, 196, 0, 0, 197, 50, 0, 51,
2799  52, 0, 0, 199, 54, 55, 56, 57, 58, 59,
2800  60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
2801  6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
2802  200, 63, 12, 0, 13, 14, 15, 231, 232, 18,
2803  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2804  24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
2805  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
2806  37, 38, 39, 40, 195, 41, 42, 0, 43, 44,
2807  45, 0, 46, 47, 0, 0, 0, 0, 0, 0,
2808  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2809  0, 0, 196, 0, 0, 197, 50, 0, 51, 52,
2810  0, 587, 0, 54, 55, 56, 57, 58, 59, 60,
2811  0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
2812  7, 0, 9, 0, 0, 0, 10, 11, 61, 200,
2813  63, 12, 0, 13, 14, 15, 231, 232, 18, 19,
2814  0, 0, 0, 0, 0, 233, 234, 235, 23, 24,
2815  25, 26, 0, 0, 194, 0, 0, 0, 0, 0,
2816  0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
2817  38, 39, 40, 195, 41, 42, 0, 43, 44, 45,
2818  0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2819  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2820  0, 196, 0, 0, 197, 50, 0, 51, 52, 0,
2821  0, 0, 54, 55, 56, 57, 58, 59, 60, 0,
2822  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
2823  0, 9, 0, 0, 0, 10, 11, 61, 200, 63,
2824  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2825  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2826  26, 0, 0, 194, 0, 0, 0, 0, 0, 0,
2827  29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
2828  39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
2829  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2830  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2831  196, 0, 0, 197, 50, 0, 51, 52, 0, 484,
2832  0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
2833  0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
2834  9, 0, 0, 0, 10, 11, 61, 200, 63, 12,
2835  0, 13, 14, 15, 231, 232, 18, 19, 0, 0,
2836  0, 0, 0, 233, 234, 235, 23, 24, 25, 26,
2837  0, 0, 194, 0, 0, 0, 0, 0, 0, 29,
2838  0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
2839  40, 0, 41, 42, 0, 43, 44, 45, 0, 46,
2840  47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2841  0, 0, 0, 0, 0, 0, 0, 0, 0, 196,
2842  0, 0, 197, 50, 0, 51, 52, 0, 198, 0,
2843  54, 55, 56, 57, 58, 59, 60, 0, 0, 0,
2844  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
2845  0, 0, 0, 10, 11, 61, 200, 63, 12, 0,
2846  13, 14, 15, 231, 232, 18, 19, 0, 0, 0,
2847  0, 0, 233, 234, 235, 23, 24, 25, 26, 0,
2848  0, 194, 0, 0, 0, 0, 0, 0, 29, 0,
2849  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2850  0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
2851  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2852  0, 0, 0, 0, 0, 0, 0, 0, 196, 0,
2853  0, 197, 50, 0, 51, 52, 0, 772, 0, 54,
2854  55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
2855  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2856  0, 0, 10, 11, 61, 200, 63, 12, 0, 13,
2857  14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
2858  0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
2859  194, 0, 0, 0, 0, 0, 0, 29, 0, 0,
2860  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2861  41, 42, 0, 43, 44, 45, 0, 46, 47, 0,
2862  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2863  0, 0, 0, 0, 0, 0, 0, 196, 0, 0,
2864  197, 50, 0, 51, 52, 0, 484, 0, 54, 55,
2865  56, 57, 58, 59, 60, 0, 0, 0, 0, 0,
2866  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
2867  0, 10, 11, 61, 200, 63, 12, 0, 13, 14,
2868  15, 231, 232, 18, 19, 0, 0, 0, 0, 0,
2869  233, 234, 235, 23, 24, 25, 26, 0, 0, 194,
2870  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
2871  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2872  42, 0, 43, 44, 45, 0, 46, 47, 0, 0,
2873  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2874  0, 0, 0, 0, 0, 0, 196, 0, 0, 197,
2875  50, 0, 51, 52, 0, 587, 0, 54, 55, 56,
2876  57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
2877  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
2878  10, 11, 61, 200, 63, 12, 0, 13, 14, 15,
2879  231, 232, 18, 19, 0, 0, 0, 0, 0, 233,
2880  234, 235, 23, 24, 25, 26, 0, 0, 194, 0,
2881  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
2882  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2883  0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
2884  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2885  0, 0, 0, 0, 0, 196, 0, 0, 197, 50,
2886  0, 51, 52, 0, 0, 0, 54, 55, 56, 57,
2887  58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
2888  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2889  11, 61, 200, 63, 12, 0, 13, 14, 15, 16,
2890  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2891  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2892  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2893  35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
2894  43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
2895  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2896  0, 0, 0, 0, 196, 0, 0, 197, 50, 0,
2897  51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
2898  59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
2899  5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
2900  61, 62, 63, 12, 0, 13, 14, 15, 16, 17,
2901  18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
2902  23, 24, 25, 26, 0, 0, 194, 0, 0, 0,
2903  0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
2904  36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
2905  44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
2906  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2907  0, 0, 0, 196, 0, 0, 197, 50, 0, 51,
2908  52, 0, 0, 0, 54, 55, 56, 57, 58, 59,
2909  60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
2910  6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
2911  200, 63, 12, 0, 13, 14, 15, 231, 232, 18,
2912  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2913  24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
2914  0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
2915  37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
2916  45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2917  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2918  0, 0, 259, 0, 0, 304, 50, 0, 51, 52,
2919  0, 305, 0, 54, 55, 56, 57, 58, 59, 60,
2920  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2921  0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
2922  14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
2923  0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
2924  194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
2925  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2926  41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
2927  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2928  0, 0, 0, 0, 0, 0, 0, 346, 0, 0,
2929  49, 50, 0, 51, 52, 0, 53, 0, 54, 55,
2930  56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
2931  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
2932  0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
2933  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2934  24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
2935  0, 0, 258, 0, 0, 32, 33, 34, 354, 36,
2936  37, 38, 355, 40, 0, 41, 42, 0, 43, 44,
2937  45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2938  0, 0, 0, 0, 0, 0, 0, 0, 0, 356,
2939  0, 0, 357, 0, 0, 197, 50, 0, 51, 52,
2940  0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
2941  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2942  0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
2943  14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
2944  0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
2945  194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
2946  32, 33, 34, 354, 36, 37, 38, 355, 40, 0,
2947  41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
2948  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2949  0, 0, 0, 0, 0, 0, 0, 357, 0, 0,
2950  197, 50, 0, 51, 52, 0, 0, 0, 54, 55,
2951  56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
2952  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
2953  0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
2954  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2955  24, 25, 26, 0, 0, 194, 0, 0, 0, 0,
2956  0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
2957  37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
2958  45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2959  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2960  0, 0, 259, 0, 0, 304, 50, 0, 51, 52,
2961  0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
2962  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2963  0, 0, 10, 11, 0, 0, 0, 12, 260, 13,
2964  14, 15, 231, 232, 18, 19, 0, 0, 0, 0,
2965  0, 233, 234, 235, 23, 24, 25, 26, 0, 0,
2966  194, 0, 0, 0, 0, 0, 0, 258, 0, 0,
2967  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2968  41, 42, 0, 43, 44, 45, 0, 0, 0, 0,
2969  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2970  0, 0, 0, 0, 0, 0, 0, 902, 0, 0,
2971  197, 50, 0, 51, 52, 0, 0, 0, 54, 55,
2972  56, 57, 58, 59, 60, 0, 0, 0, 0, 5,
2973  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
2974  0, 0, 12, 260, 13, 14, 15, 231, 232, 18,
2975  19, 0, 0, 0, 0, 0, 233, 234, 235, 23,
2976  24, 25, 26, 0, 0, 194, 0, 663, 0, 0,
2977  0, 0, 258, 0, 0, 32, 33, 34, 35, 36,
2978  37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
2979  45, 308, 309, 310, 311, 312, 313, 314, 315, 316,
2980  317, 318, 319, 320, 0, 0, 321, 322, 0, 0,
2981  0, 0, 912, 0, 0, 197, 50, 0, 51, 52,
2982  0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
2983  0, 0, 0, 323, 0, 324, 325, 326, 327, 328,
2984  329, 330, 331, 332, 333, 0, 0, 0, 260, 0,
2985  525, 526, 0, 0, 527, 0, 0, 0, 0, 0,
2986  0, 0, 0, -241, 157, 158, 159, 160, 161, 162,
2987  163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
2988  169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
2989  0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
2990  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2991  173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2992  0, 183, 184, 0, 0, 0, 0, 533, 534, 0,
2993  0, 535, 0, 0, 0, 0, 0, 0, 0, 185,
2994  220, 157, 158, 159, 160, 161, 162, 163, 164, 165,
2995  0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
2996  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2997  172, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2998  0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
2999  176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
3000  0, 0, 0, 0, 591, 526, 0, 0, 592, 0,
3001  0, 0, 0, 0, 0, 0, 185, 220, 157, 158,
3002  159, 160, 161, 162, 163, 164, 165, 0, 0, 166,
3003  167, 0, 0, 168, 169, 170, 171, 0, 0, 0,
3004  0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
3005  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3006  0, 0, 0, 0, 173, 174, 175, 176, 177, 178,
3007  179, 180, 181, 182, 0, 183, 184, 0, 0, 0,
3008  0, 594, 534, 0, 0, 595, 0, 0, 0, 0,
3009  0, 0, 0, 185, 220, 157, 158, 159, 160, 161,
3010  162, 163, 164, 165, 0, 0, 166, 167, 0, 0,
3011  168, 169, 170, 171, 0, 0, 0, 0, 0, 0,
3012  0, 0, 0, 0, 172, 0, 0, 0, 0, 0,
3013  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3014  0, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3015  182, 0, 183, 184, 0, 0, 0, 0, 617, 526,
3016  0, 0, 618, 0, 0, 0, 0, 0, 0, 0,
3017  185, 220, 157, 158, 159, 160, 161, 162, 163, 164,
3018  165, 0, 0, 166, 167, 0, 0, 168, 169, 170,
3019  171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3020  0, 172, 0, 0, 0, 0, 0, 0, 0, 0,
3021  0, 0, 0, 0, 0, 0, 0, 0, 173, 174,
3022  175, 176, 177, 178, 179, 180, 181, 182, 0, 183,
3023  184, 0, 0, 0, 0, 620, 534, 0, 0, 621,
3024  0, 0, 0, 0, 0, 0, 0, 185, 220, 157,
3025  158, 159, 160, 161, 162, 163, 164, 165, 0, 0,
3026  166, 167, 0, 0, 168, 169, 170, 171, 0, 0,
3027  0, 0, 0, 0, 0, 0, 0, 0, 172, 0,
3028  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3029  0, 0, 0, 0, 0, 173, 174, 175, 176, 177,
3030  178, 179, 180, 181, 182, 0, 183, 184, 0, 0,
3031  0, 0, 692, 526, 0, 0, 693, 0, 0, 0,
3032  0, 0, 0, 0, 185, 220, 157, 158, 159, 160,
3033  161, 162, 163, 164, 165, 0, 0, 166, 167, 0,
3034  0, 168, 169, 170, 171, 0, 0, 0, 0, 0,
3035  0, 0, 0, 0, 0, 172, 0, 0, 0, 0,
3036  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3037  0, 0, 173, 174, 175, 176, 177, 178, 179, 180,
3038  181, 182, 0, 183, 184, 0, 0, 0, 0, 695,
3039  534, 0, 0, 696, 0, 0, 0, 0, 0, 0,
3040  0, 185, 220, 157, 158, 159, 160, 161, 162, 163,
3041  164, 165, 0, 0, 166, 167, 0, 0, 168, 169,
3042  170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
3043  0, 0, 172, 0, 0, 0, 0, 0, 0, 0,
3044  0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
3045  174, 175, 176, 177, 178, 179, 180, 181, 182, 0,
3046  183, 184, 0, 0, 0, 0, 702, 526, 0, 0,
3047  703, 0, 0, 0, 0, 0, 0, 0, 185, 220,
3048  157, 158, 159, 160, 161, 162, 163, 164, 165, 0,
3049  0, 166, 167, 0, 0, 168, 169, 170, 171, 0,
3050  0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
3051  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3052  0, 0, 0, 0, 0, 0, 173, 174, 175, 176,
3053  177, 178, 179, 180, 181, 182, 0, 183, 184, 0,
3054  0, 0, 0, 572, 534, 0, 0, 573, 0, 0,
3055  0, 0, 0, 0, 0, 185, 220, 157, 158, 159,
3056  160, 161, 162, 163, 164, 165, 0, 0, 166, 167,
3057  0, 0, 168, 169, 170, 171, 0, 0, 0, 0,
3058  0, 0, 0, 0, 0, 0, 172, 0, 0, 0,
3059  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3060  0, 0, 0, 173, 174, 175, 176, 177, 178, 179,
3061  180, 181, 182, 0, 183, 184, 0, 0, 0, 0,
3062  965, 526, 0, 0, 966, 0, 0, 0, 0, 0,
3063  0, 0, 185, 220, 157, 158, 159, 160, 161, 162,
3064  163, 164, 165, 0, 0, 166, 167, 0, 0, 168,
3065  169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
3066  0, 0, 0, 172, 0, 0, 0, 0, 0, 0,
3067  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3068  173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3069  0, 183, 184, 0, 0, 0, 0, 971, 526, 0,
3070  0, 972, 0, 0, 0, 0, 0, 0, 0, 185,
3071  220, 157, 158, 159, 160, 161, 162, 163, 164, 165,
3072  0, 0, 166, 167, 0, 0, 168, 169, 170, 171,
3073  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3074  172, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3075  0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
3076  176, 177, 178, 179, 180, 181, 182, 0, 183, 184,
3077  0, 0, 0, 0, 974, 534, 0, 0, 975, 0,
3078  0, 0, 0, 0, 0, 0, 185, 220, 157, 158,
3079  159, 160, 161, 162, 163, 164, 165, 0, 0, 166,
3080  167, 0, 0, 168, 169, 170, 171, 0, 0, 0,
3081  0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
3082  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3083  0, 0, 0, 0, 173, 174, 175, 176, 177, 178,
3084  179, 180, 181, 182, 0, 183, 184, 0, 0, 0,
3085  0, 572, 534, 0, 0, 573, 0, 0, 0, 0,
3086  0, 0, 0, 185, 220, 157, 158, 159, 160, 161,
3087  162, 163, 164, 165, 0, 0, 166, 167, 0, 0,
3088  168, 169, 170, 171, 0, 0, 0, 0, 0, 0,
3089  0, 0, 0, 0, 172, 0, 0, 0, 0, 0,
3090  0, 0, 718, 0, 0, 0, 0, 0, 0, 0,
3091  0, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3092  182, 663, 183, 184, 0, 0, 308, 309, 310, 311,
3093  312, 313, 314, 315, 316, 317, 318, 319, 320, 0,
3094  185, 321, 322, 0, 0, 308, 309, 310, 311, 312,
3095  313, 314, 315, 316, 317, 318, 319, 320, 0, 0,
3096  321, 322, 0, 0, 0, 0, 0, 0, 323, 0,
3097  324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
3098  0, 0, 0, 0, 0, 0, 0, 323, 0, 324,
3099  325, 326, 327, 328, 329, 330, 331, 332, 333
3100 };
3101 
3102 static const yytype_int16 yycheck[] =
3103 {
3104  2, 55, 340, 28, 2, 454, 4, 52, 593, 16,
3105  17, 335, 307, 20, 307, 8, 547, 213, 16, 17,
3106  8, 566, 20, 27, 53, 29, 84, 22, 8, 87,
3107  546, 87, 4, 22, 619, 28, 49, 91, 252, 76,
3108  28, 2, 256, 4, 404, 357, 1, 65, 28, 51,
3109  52, 49, 50, 749, 450, 53, 746, 13, 334, 627,
3110  336, 53, 680, 25, 62, 762, 684, 454, 13, 16,
3111  17, 65, 26, 20, 396, 55, 400, 26, 76, 25,
3112  440, 0, 404, 27, 76, 83, 84, 576, 577, 87,
3113  88, 89, 90, 87, 490, 29, 88, 89, 90, 13,
3114  242, 25, 378, 379, 51, 851, 828, 85, 76, 694,
3115  136, 91, 87, 16, 17, 110, 147, 20, 85, 568,
3116  705, 110, 146, 399, 25, 401, 85, 653, 452, 61,
3117  87, 16, 17, 62, 109, 20, 276, 25, 278, 56,
3118  280, 13, 742, 37, 38, 87, 114, 109, 51, 52,
3119  195, 427, 109, 198, 199, 826, 701, 28, 113, 849,
3120  138, 139, 304, 763, 709, 140, 25, 109, 736, 737,
3121  25, 13, 139, 107, 106, 146, 13, 453, 140, 138,
3122  139, 143, 136, 632, 140, 147, 109, 136, 244, 145,
3123  145, 147, 147, 142, 140, 941, 892, 142, 140, 197,
3124  145, 145, 147, 147, 653, 207, 896, 904, 930, 140,
3125  217, 213, 219, 220, 25, 886, 140, 413, 220, 217,
3126  746, 219, 220, 749, 261, 223, 244, 225, 552, 242,
3127  719, 145, 230, 147, 50, 293, 294, 295, 296, 140,
3128  564, 601, 142, 241, 242, 632, 235, 147, 109, 238,
3129  244, 563, 140, 147, 258, 873, 99, 302, 826, 708,
3130  828, 932, 307, 261, 25, 661, 87, 83, 84, 261,
3131  217, 87, 219, 145, 140, 147, 305, 553, 600, 601,
3132  241, 140, 25, 341, 342, 140, 25, 343, 959, 565,
3133  806, 304, 85, 87, 292, 293, 294, 295, 296, 297,
3134  298, 299, 85, 145, 302, 147, 304, 305, 145, 307,
3135  147, 59, 60, 305, 217, 109, 219, 26, 886, 887,
3136  292, 708, 109, 849, 142, 851, 49, 467, 335, 140,
3137  875, 292, 217, 335, 219, 56, 297, 335, 145, 337,
3138  147, 87, 873, 341, 342, 138, 139, 336, 88, 343,
3139  395, 396, 690, 140, 334, 302, 139, 26, 356, 404,
3140  307, 140, 930, 109, 932, 359, 892, 85, 147, 662,
3141  109, 85, 109, 302, 61, 26, 85, 140, 307, 140,
3142  15, 142, 17, 928, 679, 87, 384, 385, 973, 85,
3143  85, 959, 437, 400, 590, 440, 421, 140, 400, 142,
3144  614, 140, 400, 85, 143, 140, 85, 223, 147, 225,
3145  412, 413, 401, 450, 142, 941, 85, 104, 105, 399,
3146  138, 139, 424, 136, 142, 139, 424, 136, 421, 138,
3147  139, 880, 85, 421, 85, 433, 85, 142, 427, 484,
3148  140, 421, 138, 139, 139, 452, 426, 147, 85, 142,
3149  452, 85, 450, 490, 452, 384, 385, 139, 450, 146,
3150  139, 85, 822, 424, 453, 68, 85, 136, 85, 138,
3151  139, 451, 433, 142, 197, 87, 85, 293, 294, 295,
3152  296, 483, 298, 299, 68, 136, 139, 138, 139, 138,
3153  139, 142, 490, 396, 85, 37, 38, 109, 490, 668,
3154  822, 223, 139, 548, 138, 139, 675, 230, 109, 52,
3155  514, 54, 55, 56, 57, 139, 119, 120, 121, 242,
3156  139, 138, 139, 861, 246, 341, 342, 143, 532, 867,
3157  139, 26, 728, 52, 437, 530, 538, 56, 540, 85,
3158  356, 530, 587, 538, 542, 552, 544, 138, 139, 538,
3159  552, 545, 546, 56, 552, 600, 601, 564, 85, 584,
3160  59, 60, 564, 144, 553, 559, 564, 137, 566, 567,
3161  106, 551, 574, 575, 576, 577, 565, 87, 615, 574,
3162  575, 304, 140, 563, 106, 574, 575, 87, 590, 593,
3163  85, 584, 138, 139, 87, 85, 584, 140, 68, 109,
3164  68, 548, 14, 15, 584, 85, 604, 609, 85, 109,
3165  140, 138, 139, 658, 17, 619, 109, 615, 56, 608,
3166  609, 574, 575, 615, 661, 145, 25, 951, 52, 94,
3167  54, 55, 56, 57, 679, 143, 638, 146, 640, 697,
3168  642, 136, 700, 138, 139, 137, 140, 142, 138, 139,
3169  52, 653, 54, 55, 56, 57, 654, 711, 138, 139,
3170  10, 138, 139, 661, 662, 89, 61, 665, 666, 661,
3171  65, 95, 96, 671, 672, 109, 952, 679, 680, 140,
3172  682, 140, 684, 140, 406, 140, 140, 89, 410, 734,
3173  694, 140, 116, 415, 96, 119, 8, 600, 13, 697,
3174  87, 705, 700, 701, 698, 61, 87, 137, 430, 104,
3175  105, 709, 109, 435, 116, 54, 710, 719, 716, 717,
3176  140, 145, 109, 140, 63, 64, 728, 772, 109, 140,
3177  68, 711, 679, 662, 87, 52, 665, 666, 796, 52,
3178  742, 111, 671, 672, 140, 743, 744, 87, 104, 105,
3179  106, 567, 144, 140, 549, 15, 109, 755, 803, 140,
3180  2, 763, 4, 765, 87, 767, 768, 489, 52, 109,
3181  54, 55, 56, 57, 16, 17, 140, 822, 20, 117,
3182  118, 119, 120, 121, 145, 783, 109, 140, 604, 791,
3183  109, 140, 794, 114, 140, 793, 140, 140, 796, 10,
3184  140, 88, 800, 801, 140, 9, 804, 49, 50, 10,
3185  137, 140, 806, 10, 808, 61, 140, 140, 140, 542,
3186  62, 544, 820, 137, 140, 114, 52, 137, 54, 55,
3187  56, 57, 834, 835, 140, 837, 68, 839, 840, 140,
3188  140, 83, 84, 137, 842, 87, 56, 140, 140, 68,
3189  842, 83, 84, 56, 783, 140, 140, 140, 104, 105,
3190  106, 140, 860, 89, 83, 84, 864, 140, 860, 95,
3191  96, 873, 142, 142, 61, 140, 424, 875, 90, 88,
3192  61, 697, 954, 736, 700, 117, 118, 119, 120, 121,
3193  116, 93, 904, 119, 689, 114, 115, 116, 117, 118,
3194  119, 120, 121, 953, 906, 907, 908, 96, 910, 911,
3195  640, 706, 642, 57, 91, 880, 142, 104, 105, 106,
3196  918, 849, 920, 104, 105, 106, 653, 746, 926, -1,
3197  928, 654, 934, 935, 936, 937, 52, -1, 54, 55,
3198  56, 57, -1, -1, 951, -1, -1, 54, 55, 951,
3199  57, 953, 954, 951, -1, 197, 63, 64, -1, 939,
3200  -1, -1, -1, 952, -1, 967, 968, 969, 970, 973,
3201  950, -1, -1, 89, -1, 217, -1, 219, 220, 981,
3202  796, 223, -1, 225, -1, 707, -1, 989, 230, -1,
3203  -1, -1, -1, 716, 717, 68, -1, -1, -1, 241,
3204  242, -1, 797, -1, 799, -1, -1, 729, -1, -1,
3205  83, 84, -1, -1, 809, -1, -1, -1, 740, 814,
3206  743, 744, 749, -1, 52, 752, 54, 55, 56, 57,
3207  -1, -1, 755, -1, -1, 765, -1, 767, 768, -1,
3208  -1, -1, -1, 116, 117, 118, 119, 120, 121, -1,
3209  292, 293, 294, 295, 296, 297, 298, 299, -1, -1,
3210  302, 89, 304, -1, -1, 307, -1, 95, -1, 52,
3211  793, 54, 55, 56, 57, 870, 871, 800, 801, -1,
3212  -1, 804, 16, 17, -1, -1, 20, -1, -1, -1,
3213  -1, 813, -1, 335, -1, 337, -1, 820, -1, 341,
3214  342, -1, -1, 825, 834, 835, -1, 837, 830, 839,
3215  840, -1, 46, 47, 356, -1, -1, 51, 52, -1,
3216  -1, -1, -1, -1, 851, -1, 853, -1, 62, 63,
3217  -1, 52, 927, 54, 55, 56, 57, -1, -1, -1,
3218  -1, 864, 384, 385, 40, 41, 42, 43, 44, -1,
3219  -1, -1, -1, -1, -1, -1, -1, -1, 400, -1,
3220  955, -1, 957, -1, -1, 892, -1, 894, 89, -1,
3221  -1, 898, -1, -1, 95, -1, 906, 907, 908, -1,
3222  910, 911, 424, 52, -1, 54, 55, 56, 57, -1,
3223  -1, 433, -1, -1, -1, 918, -1, 920, -1, -1,
3224  -1, -1, -1, 926, 934, 935, 936, 937, -1, -1,
3225  452, -1, -1, -1, 941, -1, 943, -1, -1, 946,
3226  89, -1, -1, -1, -1, -1, 95, 96, -1, -1,
3227  -1, -1, -1, -1, 961, -1, -1, 967, 968, 969,
3228  970, -1, -1, -1, -1, -1, -1, 116, -1, -1,
3229  119, 981, -1, -1, -1, -1, 983, -1, -1, 989,
3230  -1, 195, -1, -1, 198, 199, 200, -1, -1, -1,
3231  2, -1, 4, 142, -1, 52, -1, 54, 55, 56,
3232  57, -1, -1, 217, -1, 219, 220, -1, -1, -1,
3233  -1, 2, -1, 4, -1, -1, -1, -1, -1, -1,
3234  542, -1, 544, 52, -1, 54, 55, 56, 57, -1,
3235  552, -1, 89, -1, -1, -1, -1, 49, 95, 96,
3236  -1, 53, 564, -1, 566, 567, -1, -1, -1, -1,
3237  -1, -1, -1, -1, -1, -1, -1, -1, 49, 116,
3238  89, -1, 119, -1, 76, -1, 95, 96, -1, -1,
3239  -1, -1, -1, -1, -1, -1, 88, 89, 90, 91,
3240  -1, -1, 604, -1, -1, -1, -1, 116, 302, -1,
3241  119, -1, -1, 307, 308, 309, 310, 311, 312, 313,
3242  314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
3243  324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
3244  -1, 335, -1, -1, -1, -1, -1, -1, -1, -1,
3245  -1, -1, 654, -1, -1, -1, -1, -1, -1, -1,
3246  662, -1, -1, 665, 666, -1, -1, -1, -1, 671,
3247  672, -1, 68, 69, 70, 71, 72, 73, 74, 75,
3248  76, 77, 78, 79, 80, -1, -1, 83, 84, -1,
3249  384, 385, -1, -1, -1, 697, -1, -1, 700, 701,
3250  394, 395, 396, -1, -1, 197, 400, 709, 402, 403,
3251  404, -1, -1, -1, 716, 717, 112, 113, 114, 115,
3252  116, 117, 118, 119, 120, 121, 197, -1, -1, 423,
3253  -1, -1, -1, -1, 428, -1, -1, -1, 230, -1,
3254  -1, 743, 744, 437, -1, -1, 440, -1, -1, 241,
3255  242, -1, -1, 755, -1, -1, -1, -1, 452, 230,
3256  -1, -1, -1, -1, -1, -1, -1, -1, -1, 261,
3257  241, 242, -1, -1, -1, -1, -1, -1, 472, 473,
3258  -1, 783, -1, -1, -1, -1, -1, -1, -1, -1,
3259  484, 793, -1, -1, 796, -1, -1, -1, 800, 801,
3260  292, -1, 804, -1, -1, 297, -1, -1, -1, -1,
3261  -1, -1, 304, 305, -1, -1, -1, 2, 820, 4,
3262  -1, 292, -1, -1, -1, -1, 297, -1, -1, -1,
3263  -1, -1, -1, 304, -1, -1, -1, -1, -1, -1,
3264  -1, -1, -1, -1, -1, 337, -1, 2, -1, 4,
3265  -1, -1, -1, -1, 548, -1, -1, -1, 552, -1,
3266  -1, -1, 864, -1, 49, 2, 337, 4, 53, -1,
3267  564, -1, -1, 875, -1, -1, -1, -1, -1, -1,
3268  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3269  -1, 76, -1, 587, 49, -1, -1, -1, 53, -1,
3270  -1, -1, -1, 88, 89, 90, 600, 601, -1, -1,
3271  -1, -1, 49, -1, -1, -1, 918, -1, 920, -1,
3272  -1, 76, -1, -1, 926, -1, 928, -1, -1, -1,
3273  -1, -1, 424, 88, 89, 90, 91, -1, -1, -1,
3274  -1, 433, -1, -1, -1, -1, -1, -1, -1, 951,
3275  -1, 88, -1, 424, -1, -1, -1, -1, 450, -1,
3276  -1, -1, 433, -1, 658, -1, -1, -1, 662, 663,
3277  -1, 665, 666, -1, -1, -1, -1, 671, 672, 0,
3278  -1, -1, -1, -1, -1, 679, -1, 8, 9, 10,
3279  -1, -1, 13, 14, 15, -1, 17, -1, 490, -1,
3280  -1, -1, -1, -1, -1, -1, 27, -1, -1, -1,
3281  -1, -1, 197, -1, -1, -1, 37, 38, -1, 40,
3282  41, 42, 43, 44, 718, -1, -1, -1, -1, 723,
3283  724, -1, 726, 727, -1, -1, -1, -1, -1, -1,
3284  734, -1, 197, -1, -1, 230, -1, -1, -1, -1,
3285  542, -1, 544, -1, -1, -1, 241, 242, -1, -1,
3286  197, -1, -1, -1, 85, -1, -1, -1, -1, -1,
3287  -1, 542, -1, 544, 566, 230, 261, -1, 772, -1,
3288  -1, -1, 776, -1, -1, -1, 241, 242, -1, 783,
3289  -1, -1, -1, 230, -1, 566, -1, -1, -1, -1,
3290  -1, -1, -1, -1, 241, 242, 261, 292, -1, 803,
3291  -1, -1, 297, -1, -1, -1, 137, -1, 139, 304,
3292  305, 142, 143, 615, 145, -1, 147, 821, 822, -1,
3293  -1, -1, -1, -1, -1, -1, -1, 292, -1, -1,
3294  -1, -1, 297, -1, -1, -1, -1, -1, -1, 304,
3295  305, -1, 337, -1, -1, 292, -1, -1, -1, -1,
3296  297, -1, 654, -1, -1, -1, -1, 304, -1, 661,
3297  307, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3298  -1, -1, 337, 654, -1, -1, -1, -1, -1, -1,
3299  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3300  337, -1, -1, -1, -1, -1, -1, -1, -1, 701,
3301  -1, -1, -1, -1, -1, -1, -1, 709, -1, -1,
3302  -1, -1, -1, -1, 716, 717, -1, -1, -1, -1,
3303  701, -1, -1, -1, -1, -1, -1, -1, 709, 424,
3304  -1, -1, -1, -1, -1, 716, 717, -1, 433, -1,
3305  -1, 743, 744, -1, -1, -1, -1, 951, -1, -1,
3306  -1, -1, -1, 755, -1, 450, -1, -1, -1, 424,
3307  -1, -1, 743, 744, -1, -1, -1, -1, 433, -1,
3308  -1, -1, -1, -1, 755, -1, -1, 424, -1, -1,
3309  -1, -1, -1, -1, -1, 450, 433, -1, -1, -1,
3310  -1, 793, -1, -1, -1, 490, -1, -1, 800, 801,
3311  -1, -1, 804, -1, -1, -1, -1, -1, -1, -1,
3312  -1, -1, 793, -1, -1, -1, -1, -1, 820, 800,
3313  801, -1, -1, 804, -1, 490, -1, -1, -1, -1,
3314  -1, -1, -1, -1, -1, -1, -1, -1, -1, 820,
3315  842, -1, -1, -1, -1, -1, -1, 542, -1, 544,
3316  -1, -1, -1, -1, -1, -1, -1, -1, 860, -1,
3317  -1, -1, 864, -1, -1, -1, -1, -1, -1, -1,
3318  -1, 566, -1, 875, -1, -1, -1, 542, -1, 544,
3319  -1, -1, -1, 864, -1, -1, -1, -1, -1, -1,
3320  -1, -1, -1, -1, 875, 542, -1, 544, -1, -1,
3321  -1, 566, -1, -1, -1, -1, -1, -1, -1, -1,
3322  -1, -1, -1, -1, -1, -1, 918, -1, 920, 566,
3323  615, -1, -1, -1, 926, -1, 928, -1, -1, -1,
3324  -1, -1, -1, -1, -1, -1, -1, 918, -1, 920,
3325  -1, -1, -1, -1, -1, 926, -1, 928, -1, -1,
3326  615, 646, -1, -1, -1, -1, -1, -1, -1, 654,
3327  -1, -1, -1, -1, -1, -1, 661, -1, -1, -1,
3328  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3329  -1, -1, 68, 69, 70, 71, 72, 73, 74, 654,
3330  -1, 77, 78, -1, -1, -1, 661, 83, 84, -1,
3331  -1, -1, -1, -1, -1, -1, 701, 654, -1, -1,
3332  -1, -1, -1, -1, 709, 662, -1, -1, -1, -1,
3333  -1, 716, 717, -1, -1, -1, 112, 113, 114, 115,
3334  116, 117, 118, 119, 120, 121, 701, -1, -1, -1,
3335  -1, -1, -1, -1, 709, -1, -1, -1, 743, 744,
3336  -1, 716, 717, -1, 701, -1, -1, -1, -1, -1,
3337  755, -1, 709, -1, -1, -1, -1, -1, -1, 716,
3338  717, 68, 69, 70, 71, 72, 73, 74, 743, 744,
3339  77, 78, -1, -1, -1, -1, 83, 84, -1, -1,
3340  755, -1, -1, -1, -1, -1, 743, 744, 793, -1,
3341  -1, -1, -1, -1, -1, 800, 801, -1, 755, 804,
3342  -1, -1, -1, -1, -1, 112, 113, 114, 115, 116,
3343  117, 118, 119, 120, 121, 820, -1, -1, 793, -1,
3344  -1, -1, -1, -1, -1, 800, 801, -1, -1, 804,
3345  -1, -1, -1, -1, -1, -1, 793, 842, -1, -1,
3346  -1, -1, -1, 800, 801, 820, -1, 804, -1, -1,
3347  -1, -1, -1, -1, -1, 860, -1, -1, -1, 864,
3348  -1, -1, -1, 820, -1, -1, -1, 842, -1, -1,
3349  875, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3350  -1, -1, -1, -1, -1, 860, -1, -1, -1, 864,
3351  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3352  875, -1, -1, 860, -1, -1, -1, 864, -1, -1,
3353  -1, -1, -1, 918, -1, 920, -1, -1, 875, -1,
3354  -1, 926, -1, 928, -1, -1, -1, -1, -1, -1,
3355  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3356  -1, -1, -1, 918, -1, 920, -1, -1, -1, -1,
3357  -1, 926, -1, 928, -1, -1, -1, -1, -1, -1,
3358  -1, 918, -1, 920, -1, -1, -1, -1, -1, 926,
3359  -1, 928, 0, 1, -1, 3, 4, 5, 6, 7,
3360  -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
3361  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
3362  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3363  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
3364  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3365  -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
3366  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3367  -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
3368  -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
3369  98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
3370  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3371  -1, -1, -1, 0, 122, 123, 124, -1, -1, -1,
3372  -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
3373  17, -1, -1, -1, -1, -1, -1, 145, -1, 147,
3374  27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
3375  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
3376  -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
3377  74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
3378  84, 68, 69, 70, 71, 72, 73, 74, 75, 76,
3379  77, 78, 79, 80, -1, -1, 83, 84, 85, -1,
3380  87, 88, -1, -1, -1, -1, 110, 94, 112, 113,
3381  114, 115, 116, 117, 118, 119, 120, 121, -1, -1,
3382  107, -1, 109, 110, 111, 112, 113, 114, 115, 116,
3383  117, 118, 119, 120, 121, -1, -1, -1, -1, -1,
3384  -1, -1, -1, 147, -1, -1, -1, -1, -1, -1,
3385  137, 138, 139, 140, 0, -1, 143, 144, 145, -1,
3386  147, -1, 8, 9, 10, -1, -1, 13, 14, 15,
3387  -1, 17, -1, -1, -1, -1, -1, -1, -1, -1,
3388  26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
3389  -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
3390  -1, -1, -1, -1, -1, 68, 69, 70, 71, 72,
3391  73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
3392  83, 84, 68, 69, 70, 71, 72, 73, 74, 75,
3393  76, 77, 78, 79, 80, -1, -1, 83, 84, 85,
3394  -1, -1, 88, -1, -1, -1, -1, 110, 94, 112,
3395  113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
3396  -1, -1, -1, -1, 110, -1, 112, 113, 114, 115,
3397  116, 117, 118, 119, 120, 121, -1, -1, -1, -1,
3398  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3399  136, 137, 138, 139, 140, 0, 142, 143, 144, 145,
3400  -1, 147, -1, 8, 9, 10, -1, -1, 13, 14,
3401  15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
3402  -1, -1, 27, 28, 29, -1, -1, -1, -1, -1,
3403  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
3404  -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
3405  72, 73, 74, 75, -1, 77, 78, -1, -1, -1,
3406  -1, 83, 84, 68, 69, 70, 71, 72, 73, 74,
3407  75, 76, 77, 78, 79, 80, -1, -1, 83, 84,
3408  85, -1, -1, 88, -1, -1, -1, -1, -1, 94,
3409  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
3410  -1, -1, 107, -1, -1, 110, 111, 112, 113, 114,
3411  115, 116, 117, 118, 119, 120, 121, -1, -1, -1,
3412  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3413  -1, -1, 137, 138, 139, 140, 0, -1, 143, 144,
3414  145, -1, 147, -1, 8, 9, 10, -1, -1, 13,
3415  14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
3416  -1, -1, 26, 27, 28, -1, -1, -1, -1, -1,
3417  -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
3418  44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3419  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3420  -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
3421  74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
3422  84, 85, -1, -1, 88, -1, -1, -1, -1, -1,
3423  94, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3424  -1, -1, -1, -1, -1, -1, 110, -1, 112, 113,
3425  114, 115, 116, 117, 118, 119, 120, 121, -1, -1,
3426  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3427  -1, -1, 136, 137, 138, 139, 140, 0, 142, 143,
3428  144, 145, -1, 147, -1, 8, 9, 10, -1, -1,
3429  13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3430  -1, -1, -1, -1, 27, 28, -1, -1, -1, -1,
3431  -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
3432  43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
3433  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3434  -1, -1, -1, -1, -1, 68, 69, 70, 71, 72,
3435  73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
3436  83, 84, 85, -1, -1, 88, -1, -1, -1, -1,
3437  -1, 94, -1, -1, -1, -1, -1, -1, -1, -1,
3438  -1, -1, -1, -1, -1, -1, -1, 110, -1, 112,
3439  113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
3440  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3441  -1, -1, -1, -1, 137, 138, 139, 140, 0, 142,
3442  143, 144, 145, -1, 147, -1, 8, 9, 10, -1,
3443  -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
3444  -1, -1, -1, -1, 26, -1, -1, -1, -1, -1,
3445  -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
3446  42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
3447  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3448  -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
3449  72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
3450  -1, 83, 84, 85, 0, 87, -1, -1, -1, -1,
3451  -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
3452  -1, 17, -1, -1, -1, -1, -1, 109, 110, -1,
3453  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
3454  -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
3455  -1, -1, -1, -1, 136, 137, 138, 139, 140, -1,
3456  -1, 143, -1, 145, -1, 147, -1, -1, -1, -1,
3457  -1, -1, 68, 69, 70, 71, 72, 73, 74, 75,
3458  76, 77, 78, 79, 80, -1, -1, 83, 84, 85,
3459  -1, 87, -1, -1, -1, -1, -1, -1, -1, -1,
3460  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3461  -1, -1, -1, 109, 110, -1, 112, 113, 114, 115,
3462  116, 117, 118, 119, 120, 121, -1, -1, -1, -1,
3463  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3464  -1, 137, 138, 139, 140, -1, -1, 143, -1, 145,
3465  1, 147, 3, 4, 5, 6, 7, 8, 9, 10,
3466  11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
3467  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3468  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3469  -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
3470  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3471  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3472  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3473  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3474  -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
3475  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3476  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3477  -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
3478  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3479  -1, -1, -1, -1, 145, 1, 147, 3, 4, 5,
3480  6, 7, -1, -1, 10, 11, 12, -1, 14, 15,
3481  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3482  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3483  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3484  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3485  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3486  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3487  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3488  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3489  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3490  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3491  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3492  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3493  -1, -1, -1, -1, -1, -1, -1, -1, -1, 145,
3494  1, 147, 3, 4, 5, 6, 7, -1, -1, 10,
3495  11, 12, -1, -1, 15, 16, 17, 18, 19, 20,
3496  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3497  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3498  -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
3499  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3500  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3501  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3502  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3503  -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
3504  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3505  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3506  -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
3507  1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
3508  11, 12, -1, -1, 145, 16, 147, 18, 19, 20,
3509  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3510  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3511  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
3512  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3513  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3514  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3515  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3516  -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
3517  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3518  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3519  -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
3520  -1, -1, -1, -1, -1, -1, 137, -1, -1, -1,
3521  -1, -1, -1, -1, 145, 1, 147, 3, 4, 5,
3522  6, 7, -1, -1, 10, 11, 12, -1, -1, 15,
3523  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3524  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3525  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3526  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3527  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3528  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3529  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3530  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3531  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3532  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3533  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3534  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
3535  6, 7, -1, 9, 10, 11, 12, -1, -1, 145,
3536  16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
3537  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3538  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3539  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3540  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3541  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3542  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3543  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3544  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3545  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3546  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3547  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
3548  6, 7, -1, -1, -1, 11, 12, -1, -1, 145,
3549  16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
3550  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3551  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3552  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3553  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3554  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3555  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3556  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3557  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3558  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3559  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3560  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
3561  6, 7, -1, -1, -1, 11, 12, 143, -1, 145,
3562  16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
3563  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3564  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3565  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3566  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3567  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3568  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3569  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3570  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3571  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3572  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3573  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
3574  6, 7, -1, -1, -1, 11, 12, 143, -1, 145,
3575  16, 147, 18, 19, 20, 21, 22, 23, 24, -1,
3576  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3577  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
3578  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
3579  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3580  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3581  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3582  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3583  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3584  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3585  -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
3586  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3587  -1, 137, -1, -1, -1, -1, -1, -1, -1, 145,
3588  1, 147, 3, 4, 5, 6, 7, -1, -1, 10,
3589  11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
3590  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3591  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3592  -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
3593  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3594  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3595  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3596  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3597  -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
3598  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3599  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3600  -1, 122, 123, 124, -1, -1, -1, -1, -1, -1,
3601  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
3602  11, 12, -1, -1, 145, 16, 147, 18, 19, 20,
3603  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3604  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3605  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
3606  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
3607  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3608  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3609  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3610  -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
3611  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3612  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3613  12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
3614  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3615  32, 33, 34, 35, 36, -1, 147, 39, -1, -1,
3616  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3617  52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
3618  62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
3619  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3620  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3621  92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
3622  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3623  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3624  122, 123, 124, -1, -1, -1, -1, -1, -1, -1,
3625  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3626  12, -1, -1, 145, 16, 147, 18, 19, 20, 21,
3627  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3628  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
3629  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3630  52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
3631  62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
3632  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3633  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3634  92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
3635  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3636  3, 4, 5, 6, 7, -1, -1, -1, 11, 12,
3637  122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
3638  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
3639  33, 34, 35, 36, -1, 147, 39, -1, -1, -1,
3640  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
3641  53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
3642  63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
3643  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3644  -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
3645  93, -1, 95, -1, 97, 98, 99, 100, 101, 102,
3646  103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3647  -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
3648  123, 124, -1, -1, -1, -1, -1, -1, 3, 4,
3649  5, 6, 7, -1, -1, -1, 11, 12, -1, -1,
3650  -1, 16, 145, 18, 19, 20, 21, 22, 23, 24,
3651  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
3652  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
3653  45, 46, -1, 48, 49, 50, 51, 52, 53, 54,
3654  55, 56, 57, -1, 59, 60, -1, 62, 63, 64,
3655  -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
3656  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3657  -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
3658  95, -1, 97, 98, 99, 100, 101, 102, 103, -1,
3659  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3660  -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
3661  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3662  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3663  145, 3, 4, 5, 6, 7, 8, 9, 10, 11,
3664  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
3665  22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
3666  32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
3667  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
3668  52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
3669  -1, -1, -1, -1, 66, 67, 68, 69, 70, 71,
3670  72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
3671  82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
3672  -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
3673  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3674  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
3675  -1, 123, 124, -1, -1, -1, -1, -1, 3, 4,
3676  5, -1, 7, -1, -1, -1, 11, 12, -1, 141,
3677  142, 16, -1, 18, 19, 20, 21, 22, 23, 24,
3678  -1, 26, -1, -1, -1, 30, 31, 32, 33, 34,
3679  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
3680  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
3681  55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
3682  -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
3683  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3684  -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
3685  95, 96, 97, 98, 99, 100, 101, 102, 103, -1,
3686  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3687  -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
3688  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
3689  -1, 136, -1, 11, 12, -1, -1, 142, 16, -1,
3690  18, 19, 20, 21, 22, 23, 24, -1, 26, -1,
3691  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3692  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
3693  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3694  58, 59, 60, -1, 62, 63, 64, -1, 66, 67,
3695  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3696  -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
3697  -1, 89, 90, -1, 92, 93, -1, 95, 96, 97,
3698  98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
3699  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3700  -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
3701  -1, -1, 3, 4, 5, -1, 7, -1, 136, -1,
3702  11, 12, -1, -1, 142, 16, -1, 18, 19, 20,
3703  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3704  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3705  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
3706  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
3707  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3708  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3709  -1, -1, -1, -1, -1, 86, 87, -1, 89, 90,
3710  -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
3711  101, 102, 103, -1, -1, -1, -1, -1, 109, -1,
3712  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
3713  7, 122, 123, 124, 11, 12, -1, -1, -1, 16,
3714  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3715  -1, 142, -1, 30, 31, 32, 33, 34, 35, 36,
3716  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
3717  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
3718  57, 58, 59, 60, -1, 62, 63, 64, -1, 66,
3719  67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3720  -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
3721  -1, -1, 89, 90, -1, 92, 93, -1, 95, 96,
3722  97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
3723  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3724  3, 4, 5, -1, 7, 122, 123, 124, 11, 12,
3725  -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
3726  23, 24, -1, -1, -1, 142, -1, 30, 31, 32,
3727  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
3728  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
3729  53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
3730  63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
3731  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3732  -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
3733  93, -1, 95, 96, 97, 98, 99, 100, 101, 102,
3734  103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3735  -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
3736  123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
3737  -1, -1, -1, -1, -1, -1, -1, -1, -1, 142,
3738  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
3739  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
3740  23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
3741  33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
3742  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
3743  53, 54, 55, 56, 57, -1, -1, -1, -1, -1,
3744  -1, -1, -1, 66, 67, 68, 69, 70, 71, 72,
3745  73, 74, -1, -1, 77, 78, -1, -1, 81, 82,
3746  83, 84, -1, -1, -1, -1, -1, -1, -1, -1,
3747  -1, -1, 95, -1, -1, -1, -1, -1, -1, -1,
3748  -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3749  113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
3750  123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
3751  -1, -1, -1, -1, -1, -1, -1, -1, 141, 3,
3752  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
3753  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
3754  24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
3755  34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
3756  -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
3757  54, -1, 56, -1, -1, -1, -1, -1, -1, -1,
3758  -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
3759  74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
3760  84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3761  -1, 95, -1, -1, 98, -1, -1, -1, -1, -1,
3762  -1, -1, -1, -1, -1, -1, -1, -1, 112, 113,
3763  114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
3764  124, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3765  -1, -1, -1, -1, -1, -1, -1, 141, 3, 4,
3766  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3767  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3768  25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
3769  35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
3770  45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
3771  -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
3772  -1, 66, 67, 68, 69, 70, 71, 72, 73, 74,
3773  -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
3774  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3775  95, -1, -1, 98, -1, -1, -1, -1, -1, -1,
3776  -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
3777  115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
3778  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3779  -1, -1, -1, -1, -1, -1, 141, 3, 4, 5,
3780  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
3781  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
3782  26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3783  36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
3784  46, 47, 48, 49, 50, 51, 52, 53, -1, -1,
3785  56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3786  66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
3787  -1, 77, 78, -1, -1, 81, 82, 83, 84, -1,
3788  -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
3789  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3790  -1, -1, -1, -1, -1, -1, 112, 113, 114, 115,
3791  116, 117, 118, 119, 120, 121, -1, 123, 124, -1,
3792  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3793  12, -1, -1, -1, 16, 141, 18, 19, 20, 21,
3794  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3795  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
3796  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3797  52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
3798  62, 63, 64, -1, -1, -1, -1, -1, -1, -1,
3799  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3800  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3801  92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
3802  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3803  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
3804  122, 11, 12, -1, -1, -1, 16, -1, 18, 19,
3805  20, 21, 22, 23, 24, -1, -1, -1, 140, -1,
3806  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
3807  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
3808  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
3809  60, -1, 62, 63, 64, -1, -1, -1, -1, -1,
3810  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3811  -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
3812  90, -1, 92, 93, -1, -1, -1, 97, 98, 99,
3813  100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
3814  -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
3815  -1, -1, 122, 11, 12, -1, -1, -1, 16, -1,
3816  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
3817  140, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3818  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
3819  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3820  -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
3821  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3822  -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
3823  -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
3824  98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
3825  -1, -1, -1, -1, 3, 4, 5, 6, 7, -1,
3826  -1, -1, 11, 12, 122, 123, 124, 16, -1, 18,
3827  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
3828  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3829  39, -1, -1, -1, -1, -1, 45, 46, -1, 48,
3830  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
3831  59, 60, -1, 62, 63, 64, -1, 66, 67, -1,
3832  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3833  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
3834  89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
3835  99, 100, 101, 102, 103, -1, -1, -1, -1, -1,
3836  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
3837  -1, 11, 12, 122, 123, 124, 16, -1, 18, 19,
3838  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
3839  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
3840  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
3841  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
3842  60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
3843  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3844  -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
3845  90, -1, 92, 93, -1, 95, 96, 97, 98, 99,
3846  100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
3847  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
3848  11, 12, 122, 123, 124, 16, -1, 18, 19, 20,
3849  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3850  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3851  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
3852  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
3853  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3854  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3855  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3856  -1, 92, 93, -1, 95, 96, 97, 98, 99, 100,
3857  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3858  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3859  12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
3860  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3861  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
3862  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3863  52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
3864  62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
3865  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3866  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3867  92, 93, -1, 95, -1, 97, 98, 99, 100, 101,
3868  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3869  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
3870  122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
3871  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
3872  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
3873  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
3874  53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
3875  63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
3876  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3877  -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
3878  93, -1, -1, 96, 97, 98, 99, 100, 101, 102,
3879  103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
3880  4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
3881  123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
3882  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
3883  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
3884  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
3885  54, 55, 56, 57, 58, 59, 60, -1, 62, 63,
3886  64, -1, 66, 67, -1, -1, -1, -1, -1, -1,
3887  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3888  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
3889  -1, 95, -1, 97, 98, 99, 100, 101, 102, 103,
3890  -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
3891  5, -1, 7, -1, -1, -1, 11, 12, 122, 123,
3892  124, 16, -1, 18, 19, 20, 21, 22, 23, 24,
3893  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
3894  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
3895  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
3896  55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
3897  -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
3898  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3899  -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
3900  -1, -1, 97, 98, 99, 100, 101, 102, 103, -1,
3901  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
3902  -1, 7, -1, -1, -1, 11, 12, 122, 123, 124,
3903  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3904  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
3905  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
3906  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
3907  56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
3908  66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
3909  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3910  86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
3911  -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
3912  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
3913  7, -1, -1, -1, 11, 12, 122, 123, 124, 16,
3914  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3915  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
3916  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
3917  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
3918  57, -1, 59, 60, -1, 62, 63, 64, -1, 66,
3919  67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3920  -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
3921  -1, -1, 89, 90, -1, 92, 93, -1, 95, -1,
3922  97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
3923  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
3924  -1, -1, -1, 11, 12, 122, 123, 124, 16, -1,
3925  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
3926  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3927  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
3928  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3929  -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
3930  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3931  -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
3932  -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
3933  98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
3934  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
3935  -1, -1, 11, 12, 122, 123, 124, 16, -1, 18,
3936  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
3937  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3938  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
3939  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
3940  59, 60, -1, 62, 63, 64, -1, 66, 67, -1,
3941  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3942  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
3943  89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
3944  99, 100, 101, 102, 103, -1, -1, -1, -1, -1,
3945  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
3946  -1, 11, 12, 122, 123, 124, 16, -1, 18, 19,
3947  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
3948  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
3949  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
3950  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
3951  60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
3952  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3953  -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
3954  90, -1, 92, 93, -1, 95, -1, 97, 98, 99,
3955  100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
3956  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
3957  11, 12, 122, 123, 124, 16, -1, 18, 19, 20,
3958  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
3959  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
3960  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
3961  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
3962  -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
3963  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3964  -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3965  -1, 92, 93, -1, -1, -1, 97, 98, 99, 100,
3966  101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
3967  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
3968  12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
3969  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
3970  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
3971  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
3972  52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
3973  62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
3974  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3975  -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3976  92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
3977  102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
3978  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
3979  122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
3980  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
3981  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
3982  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
3983  53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
3984  63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
3985  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3986  -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
3987  93, -1, -1, -1, 97, 98, 99, 100, 101, 102,
3988  103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
3989  4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
3990  123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
3991  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
3992  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
3993  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
3994  54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
3995  64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3996  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3997  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
3998  -1, 95, -1, 97, 98, 99, 100, 101, 102, 103,
3999  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4000  -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
4001  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4002  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4003  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4004  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4005  59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
4006  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4007  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
4008  89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
4009  99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
4010  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
4011  -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
4012  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4013  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4014  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4015  54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
4016  64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4017  -1, -1, -1, -1, -1, -1, -1, -1, -1, 83,
4018  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
4019  -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
4020  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4021  -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
4022  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4023  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4024  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4025  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4026  59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
4027  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4028  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
4029  89, 90, -1, 92, 93, -1, -1, -1, 97, 98,
4030  99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
4031  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
4032  -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
4033  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4034  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4035  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4036  54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
4037  64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4038  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4039  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
4040  -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
4041  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4042  -1, -1, 11, 12, -1, -1, -1, 16, 122, 18,
4043  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4044  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4045  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4046  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4047  59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
4048  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4049  -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
4050  89, 90, -1, 92, 93, -1, -1, -1, 97, 98,
4051  99, 100, 101, 102, 103, -1, -1, -1, -1, 3,
4052  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
4053  -1, -1, 16, 122, 18, 19, 20, 21, 22, 23,
4054  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4055  34, 35, 36, -1, -1, 39, -1, 44, -1, -1,
4056  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4057  54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
4058  64, 68, 69, 70, 71, 72, 73, 74, 75, 76,
4059  77, 78, 79, 80, -1, -1, 83, 84, -1, -1,
4060  -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
4061  -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
4062  -1, -1, -1, 110, -1, 112, 113, 114, 115, 116,
4063  117, 118, 119, 120, 121, -1, -1, -1, 122, -1,
4064  52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
4065  -1, -1, -1, 140, 66, 67, 68, 69, 70, 71,
4066  72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
4067  82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
4068  -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
4069  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4070  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
4071  -1, 123, 124, -1, -1, -1, -1, 52, 53, -1,
4072  -1, 56, -1, -1, -1, -1, -1, -1, -1, 141,
4073  142, 66, 67, 68, 69, 70, 71, 72, 73, 74,
4074  -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
4075  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4076  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4077  -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
4078  115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
4079  -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
4080  -1, -1, -1, -1, -1, -1, 141, 142, 66, 67,
4081  68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
4082  78, -1, -1, 81, 82, 83, 84, -1, -1, -1,
4083  -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
4084  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4085  -1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
4086  118, 119, 120, 121, -1, 123, 124, -1, -1, -1,
4087  -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
4088  -1, -1, -1, 141, 142, 66, 67, 68, 69, 70,
4089  71, 72, 73, 74, -1, -1, 77, 78, -1, -1,
4090  81, 82, 83, 84, -1, -1, -1, -1, -1, -1,
4091  -1, -1, -1, -1, 95, -1, -1, -1, -1, -1,
4092  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4093  -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
4094  121, -1, 123, 124, -1, -1, -1, -1, 52, 53,
4095  -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
4096  141, 142, 66, 67, 68, 69, 70, 71, 72, 73,
4097  74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
4098  84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4099  -1, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4100  -1, -1, -1, -1, -1, -1, -1, -1, 112, 113,
4101  114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
4102  124, -1, -1, -1, -1, 52, 53, -1, -1, 56,
4103  -1, -1, -1, -1, -1, -1, -1, 141, 142, 66,
4104  67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
4105  77, 78, -1, -1, 81, 82, 83, 84, -1, -1,
4106  -1, -1, -1, -1, -1, -1, -1, -1, 95, -1,
4107  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4108  -1, -1, -1, -1, -1, 112, 113, 114, 115, 116,
4109  117, 118, 119, 120, 121, -1, 123, 124, -1, -1,
4110  -1, -1, 52, 53, -1, -1, 56, -1, -1, -1,
4111  -1, -1, -1, -1, 141, 142, 66, 67, 68, 69,
4112  70, 71, 72, 73, 74, -1, -1, 77, 78, -1,
4113  -1, 81, 82, 83, 84, -1, -1, -1, -1, -1,
4114  -1, -1, -1, -1, -1, 95, -1, -1, -1, -1,
4115  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4116  -1, -1, 112, 113, 114, 115, 116, 117, 118, 119,
4117  120, 121, -1, 123, 124, -1, -1, -1, -1, 52,
4118  53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
4119  -1, 141, 142, 66, 67, 68, 69, 70, 71, 72,
4120  73, 74, -1, -1, 77, 78, -1, -1, 81, 82,
4121  83, 84, -1, -1, -1, -1, -1, -1, -1, -1,
4122  -1, -1, 95, -1, -1, -1, -1, -1, -1, -1,
4123  -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
4124  113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
4125  123, 124, -1, -1, -1, -1, 52, 53, -1, -1,
4126  56, -1, -1, -1, -1, -1, -1, -1, 141, 142,
4127  66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
4128  -1, 77, 78, -1, -1, 81, 82, 83, 84, -1,
4129  -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
4130  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4131  -1, -1, -1, -1, -1, -1, 112, 113, 114, 115,
4132  116, 117, 118, 119, 120, 121, -1, 123, 124, -1,
4133  -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
4134  -1, -1, -1, -1, -1, 141, 142, 66, 67, 68,
4135  69, 70, 71, 72, 73, 74, -1, -1, 77, 78,
4136  -1, -1, 81, 82, 83, 84, -1, -1, -1, -1,
4137  -1, -1, -1, -1, -1, -1, 95, -1, -1, -1,
4138  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4139  -1, -1, -1, 112, 113, 114, 115, 116, 117, 118,
4140  119, 120, 121, -1, 123, 124, -1, -1, -1, -1,
4141  52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
4142  -1, -1, 141, 142, 66, 67, 68, 69, 70, 71,
4143  72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
4144  82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
4145  -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
4146  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4147  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
4148  -1, 123, 124, -1, -1, -1, -1, 52, 53, -1,
4149  -1, 56, -1, -1, -1, -1, -1, -1, -1, 141,
4150  142, 66, 67, 68, 69, 70, 71, 72, 73, 74,
4151  -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
4152  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4153  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4154  -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
4155  115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
4156  -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
4157  -1, -1, -1, -1, -1, -1, 141, 142, 66, 67,
4158  68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
4159  78, -1, -1, 81, 82, 83, 84, -1, -1, -1,
4160  -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
4161  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4162  -1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
4163  118, 119, 120, 121, -1, 123, 124, -1, -1, -1,
4164  -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
4165  -1, -1, -1, 141, 142, 66, 67, 68, 69, 70,
4166  71, 72, 73, 74, -1, -1, 77, 78, -1, -1,
4167  81, 82, 83, 84, -1, -1, -1, -1, -1, -1,
4168  -1, -1, -1, -1, 95, -1, -1, -1, -1, -1,
4169  -1, -1, 44, -1, -1, -1, -1, -1, -1, -1,
4170  -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
4171  121, 44, 123, 124, -1, -1, 68, 69, 70, 71,
4172  72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
4173  141, 83, 84, -1, -1, 68, 69, 70, 71, 72,
4174  73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
4175  83, 84, -1, -1, -1, -1, -1, -1, 110, -1,
4176  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
4177  -1, -1, -1, -1, -1, -1, -1, 110, -1, 112,
4178  113, 114, 115, 116, 117, 118, 119, 120, 121
4179 };
4180 
4181 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4182  symbol of state STATE-NUM. */
4183 static const yytype_uint16 yystos[] =
4184 {
4185  0, 149, 150, 0, 1, 3, 4, 5, 6, 7,
4186  11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
4187  30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
4188  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4189  57, 59, 60, 62, 63, 64, 66, 67, 86, 89,
4190  90, 92, 93, 95, 97, 98, 99, 100, 101, 102,
4191  103, 122, 123, 124, 151, 152, 153, 158, 160, 161,
4192  163, 164, 167, 168, 170, 171, 172, 174, 175, 185,
4193  199, 216, 217, 218, 219, 220, 221, 222, 223, 224,
4194  225, 226, 249, 250, 260, 261, 262, 263, 264, 265,
4195  266, 269, 279, 281, 282, 283, 284, 285, 286, 287,
4196  310, 321, 153, 3, 4, 5, 6, 7, 8, 9,
4197  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4198  20, 21, 22, 23, 24, 25, 26, 30, 31, 32,
4199  33, 34, 35, 36, 37, 38, 39, 45, 46, 47,
4200  48, 49, 50, 51, 52, 53, 56, 66, 67, 68,
4201  69, 70, 71, 72, 73, 74, 77, 78, 81, 82,
4202  83, 84, 95, 112, 113, 114, 115, 116, 117, 118,
4203  119, 120, 121, 123, 124, 141, 178, 179, 180, 181,
4204  183, 184, 279, 281, 39, 58, 86, 89, 95, 96,
4205  123, 167, 175, 185, 187, 192, 195, 197, 216, 283,
4206  284, 286, 287, 308, 309, 192, 192, 142, 193, 194,
4207  142, 189, 193, 142, 147, 315, 54, 180, 315, 154,
4208  136, 21, 22, 30, 31, 32, 185, 216, 310, 185,
4209  56, 1, 89, 156, 157, 158, 169, 170, 321, 161,
4210  188, 197, 308, 321, 187, 307, 308, 321, 46, 86,
4211  122, 140, 174, 199, 216, 283, 284, 287, 242, 243,
4212  54, 55, 57, 178, 272, 280, 271, 272, 273, 146,
4213  267, 146, 270, 59, 60, 163, 185, 185, 145, 147,
4214  314, 319, 320, 40, 41, 42, 43, 44, 37, 38,
4215  28, 247, 109, 140, 89, 95, 171, 109, 68, 69,
4216  70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
4217  80, 83, 84, 110, 112, 113, 114, 115, 116, 117,
4218  118, 119, 120, 121, 85, 138, 139, 200, 161, 162,
4219  162, 203, 205, 162, 314, 320, 86, 168, 175, 216,
4220  232, 283, 284, 287, 52, 56, 83, 86, 176, 177,
4221  216, 283, 284, 287, 177, 33, 34, 35, 36, 49,
4222  50, 51, 52, 56, 142, 178, 285, 305, 85, 139,
4223  26, 136, 251, 263, 87, 87, 189, 193, 251, 140,
4224  187, 56, 187, 187, 109, 88, 140, 196, 321, 85,
4225  138, 139, 87, 87, 140, 196, 192, 315, 316, 192,
4226  191, 192, 197, 308, 321, 161, 316, 161, 54, 63,
4227  64, 159, 142, 186, 136, 156, 85, 139, 87, 158,
4228  169, 143, 314, 320, 316, 201, 144, 140, 147, 318,
4229  140, 318, 137, 318, 315, 56, 59, 60, 171, 173,
4230  140, 85, 138, 139, 244, 61, 104, 105, 106, 274,
4231  106, 274, 106, 65, 274, 106, 106, 268, 274, 106,
4232  61, 106, 68, 68, 145, 153, 162, 162, 162, 162,
4233  158, 161, 161, 248, 95, 163, 187, 197, 198, 169,
4234  140, 174, 140, 160, 163, 175, 185, 187, 198, 185,
4235  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
4236  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
4237  185, 185, 185, 185, 185, 52, 53, 56, 183, 189,
4238  311, 312, 191, 52, 53, 56, 183, 189, 311, 155,
4239  156, 13, 228, 319, 228, 162, 162, 314, 17, 254,
4240  56, 85, 138, 139, 25, 161, 52, 56, 176, 1,
4241  113, 288, 319, 85, 138, 139, 212, 306, 213, 85,
4242  139, 313, 52, 56, 311, 311, 253, 252, 163, 185,
4243  163, 185, 94, 165, 182, 185, 187, 95, 187, 195,
4244  308, 52, 56, 191, 52, 56, 309, 316, 143, 316,
4245  140, 140, 316, 180, 202, 185, 151, 137, 311, 311,
4246  185, 316, 158, 316, 308, 140, 173, 52, 56, 191,
4247  52, 56, 52, 54, 55, 56, 57, 89, 95, 96,
4248  116, 119, 142, 245, 291, 292, 293, 294, 295, 296,
4249  299, 300, 301, 302, 303, 276, 275, 146, 274, 146,
4250  185, 185, 76, 114, 237, 238, 321, 187, 140, 316,
4251  173, 140, 109, 44, 315, 87, 87, 189, 193, 315,
4252  317, 87, 87, 189, 190, 193, 321, 10, 227, 8,
4253  256, 321, 156, 13, 156, 27, 229, 319, 229, 254,
4254  197, 227, 52, 56, 191, 52, 56, 207, 210, 319,
4255  289, 209, 52, 56, 176, 191, 155, 161, 142, 290,
4256  291, 214, 190, 193, 190, 193, 237, 237, 44, 166,
4257  180, 187, 196, 87, 87, 317, 87, 87, 308, 161,
4258  137, 318, 171, 317, 109, 52, 89, 95, 233, 234,
4259  235, 293, 291, 29, 107, 246, 140, 304, 321, 140,
4260  304, 52, 140, 304, 52, 277, 54, 55, 57, 278,
4261  287, 52, 145, 236, 239, 295, 297, 298, 301, 303,
4262  321, 156, 95, 187, 173, 185, 111, 163, 185, 163,
4263  185, 165, 144, 87, 163, 185, 163, 185, 165, 187,
4264  198, 257, 321, 15, 231, 321, 14, 230, 231, 231,
4265  204, 206, 227, 140, 228, 317, 162, 319, 162, 155,
4266  317, 227, 316, 291, 155, 319, 178, 156, 156, 185,
4267  237, 87, 140, 316, 187, 235, 140, 293, 140, 316,
4268  239, 156, 156, 294, 299, 301, 303, 295, 296, 301,
4269  295, 156, 109, 52, 240, 241, 292, 239, 114, 140,
4270  304, 140, 304, 140, 304, 10, 187, 185, 163, 185,
4271  88, 258, 321, 156, 9, 259, 321, 162, 227, 227,
4272  156, 156, 187, 156, 229, 211, 319, 227, 316, 227,
4273  215, 10, 137, 156, 316, 234, 140, 95, 233, 316,
4274  10, 137, 140, 304, 140, 304, 140, 304, 140, 304,
4275  304, 137, 86, 216, 140, 114, 298, 301, 295, 297,
4276  301, 295, 86, 175, 216, 283, 284, 287, 228, 156,
4277  228, 227, 227, 231, 254, 255, 208, 155, 290, 137,
4278  140, 234, 140, 293, 295, 301, 295, 295, 56, 85,
4279  241, 140, 304, 140, 304, 304, 140, 304, 304, 56,
4280  85, 138, 139, 156, 156, 156, 227, 155, 234, 140,
4281  304, 140, 304, 304, 304, 52, 56, 295, 301, 295,
4282  295, 52, 56, 191, 52, 56, 256, 230, 227, 227,
4283  234, 295, 304, 140, 304, 304, 304, 317, 304, 295,
4284  304
4285 };
4286 
4287 #define yyerrok (yyerrstatus = 0)
4288 #define yyclearin (yychar = YYEMPTY)
4289 #define YYEMPTY (-2)
4290 #define YYEOF 0
4291 
4292 #define YYACCEPT goto yyacceptlab
4293 #define YYABORT goto yyabortlab
4294 #define YYERROR goto yyerrorlab
4295 
4296 
4297 /* Like YYERROR except do call yyerror. This remains here temporarily
4298  to ease the transition to the new meaning of YYERROR, for GCC.
4299  Once GCC version 2 has supplanted version 1, this can go. */
4300 
4301 #define YYFAIL goto yyerrlab
4302 
4303 #define YYRECOVERING() (!!yyerrstatus)
4304 
4305 #define YYBACKUP(Token, Value) \
4306 do \
4307  if (yychar == YYEMPTY && yylen == 1) \
4308  { \
4309  yychar = (Token); \
4310  yylval = (Value); \
4311  yytoken = YYTRANSLATE (yychar); \
4312  YYPOPSTACK (1); \
4313  goto yybackup; \
4314  } \
4315  else \
4316  { \
4317  parser_yyerror (parser, YY_("syntax error: cannot back up")); \
4318  YYERROR; \
4319  } \
4320 while (YYID (0))
4321 
4322 
4323 #define YYTERROR 1
4324 #define YYERRCODE 256
4325 
4326 
4327 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
4328  If N is 0, then set CURRENT to the empty location which ends
4329  the previous symbol: RHS[0] (always defined). */
4330 
4331 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
4332 #ifndef YYLLOC_DEFAULT
4333 # define YYLLOC_DEFAULT(Current, Rhs, N) \
4334  do \
4335  if (YYID (N)) \
4336  { \
4337  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
4338  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
4339  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
4340  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
4341  } \
4342  else \
4343  { \
4344  (Current).first_line = (Current).last_line = \
4345  YYRHSLOC (Rhs, 0).last_line; \
4346  (Current).first_column = (Current).last_column = \
4347  YYRHSLOC (Rhs, 0).last_column; \
4348  } \
4349  while (YYID (0))
4350 #endif
4351 
4352 
4353 /* YY_LOCATION_PRINT -- Print the location on the stream.
4354  This macro was not mandated originally: define only if we know
4355  we won't break user code: when these are the locations we know. */
4356 
4357 #ifndef YY_LOCATION_PRINT
4358 # if YYLTYPE_IS_TRIVIAL
4359 # define YY_LOCATION_PRINT(File, Loc) \
4360  fprintf (File, "%d.%d-%d.%d", \
4361  (Loc).first_line, (Loc).first_column, \
4362  (Loc).last_line, (Loc).last_column)
4363 # else
4364 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
4365 # endif
4366 #endif
4367 
4368 
4369 /* YYLEX -- calling `yylex' with the right arguments. */
4370 
4371 #ifdef YYLEX_PARAM
4372 # define YYLEX yylex (&yylval, YYLEX_PARAM)
4373 #else
4374 # define YYLEX yylex (&yylval)
4375 #endif
4376 
4377 /* Enable debugging if requested. */
4378 #if YYDEBUG
4379 
4380 # ifndef YYFPRINTF
4381 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
4382 # define YYFPRINTF fprintf
4383 # endif
4384 
4385 # define YYDPRINTF(Args) \
4386 do { \
4387  if (yydebug) \
4388  YYFPRINTF Args; \
4389 } while (YYID (0))
4390 
4391 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
4392 do { \
4393  if (yydebug) \
4394  { \
4395  YYFPRINTF (stderr, "%s ", Title); \
4396  yy_symbol_print (stderr, \
4397  Type, Value, parser); \
4398  YYFPRINTF (stderr, "\n"); \
4399  } \
4400 } while (YYID (0))
4401 
4402 
4403 /*--------------------------------.
4404 | Print this symbol on YYOUTPUT. |
4405 `--------------------------------*/
4406 
4407 /*ARGSUSED*/
4408 #if (defined __STDC__ || defined __C99__FUNC__ \
4409  || defined __cplusplus || defined _MSC_VER)
4410 static void
4411 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser)
4412 #else
4413 static void
4414 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser)
4415  FILE *yyoutput;
4416  int yytype;
4417  YYSTYPE const * const yyvaluep;
4418  struct parser_params *parser;
4419 #endif
4420 {
4421  if (!yyvaluep)
4422  return;
4423  YYUSE (parser);
4424 # ifdef YYPRINT
4425  if (yytype < YYNTOKENS)
4426  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
4427 # else
4428  YYUSE (yyoutput);
4429 # endif
4430  switch (yytype)
4431  {
4432  default:
4433  break;
4434  }
4435 }
4436 
4437 
4438 /*--------------------------------.
4439 | Print this symbol on YYOUTPUT. |
4440 `--------------------------------*/
4441 
4442 #if (defined __STDC__ || defined __C99__FUNC__ \
4443  || defined __cplusplus || defined _MSC_VER)
4444 static void
4445 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser)
4446 #else
4447 static void
4448 yy_symbol_print (yyoutput, yytype, yyvaluep, parser)
4449  FILE *yyoutput;
4450  int yytype;
4451  YYSTYPE const * const yyvaluep;
4452  struct parser_params *parser;
4453 #endif
4454 {
4455  if (yytype < YYNTOKENS)
4456  YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
4457  else
4458  YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
4459 
4460  yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
4461  YYFPRINTF (yyoutput, ")");
4462 }
4463 
4464 /*------------------------------------------------------------------.
4465 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
4466 | TOP (included). |
4467 `------------------------------------------------------------------*/
4468 
4469 #if (defined __STDC__ || defined __C99__FUNC__ \
4470  || defined __cplusplus || defined _MSC_VER)
4471 static void
4473 #else
4474 static void
4475 yy_stack_print (bottom, top)
4476  yytype_int16 *bottom;
4477  yytype_int16 *top;
4478 #endif
4479 {
4480  YYFPRINTF (stderr, "Stack now");
4481  for (; bottom <= top; ++bottom)
4482  YYFPRINTF (stderr, " %d", *bottom);
4483  YYFPRINTF (stderr, "\n");
4484 }
4485 
4486 # define YY_STACK_PRINT(Bottom, Top) \
4487 do { \
4488  if (yydebug) \
4489  yy_stack_print ((Bottom), (Top)); \
4490 } while (YYID (0))
4491 
4492 
4493 /*------------------------------------------------.
4494 | Report that the YYRULE is going to be reduced. |
4495 `------------------------------------------------*/
4496 
4497 #if (defined __STDC__ || defined __C99__FUNC__ \
4498  || defined __cplusplus || defined _MSC_VER)
4499 static void
4500 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser)
4501 #else
4502 static void
4503 yy_reduce_print (yyvsp, yyrule, parser)
4504  YYSTYPE *yyvsp;
4505  int yyrule;
4506  struct parser_params *parser;
4507 #endif
4508 {
4509  int yynrhs = yyr2[yyrule];
4510  int yyi;
4511  unsigned long int yylno = yyrline[yyrule];
4512  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
4513  yyrule - 1, yylno);
4514  /* The symbols being reduced. */
4515  for (yyi = 0; yyi < yynrhs; yyi++)
4516  {
4517  fprintf (stderr, " $%d = ", yyi + 1);
4518  yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
4519  &(yyvsp[(yyi + 1) - (yynrhs)])
4520  , parser);
4521  fprintf (stderr, "\n");
4522  }
4523 }
4524 
4525 # define YY_REDUCE_PRINT(Rule) \
4526 do { \
4527  if (yydebug) \
4528  yy_reduce_print (yyvsp, Rule, parser); \
4529 } while (YYID (0))
4530 
4531 /* Nonzero means print parse trace. It is left uninitialized so that
4532  multiple parsers can coexist. */
4533 #ifndef yydebug
4534 int yydebug;
4535 #endif
4536 #else /* !YYDEBUG */
4537 # define YYDPRINTF(Args)
4538 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
4539 # define YY_STACK_PRINT(Bottom, Top)
4540 # define YY_REDUCE_PRINT(Rule)
4541 #endif /* !YYDEBUG */
4542 
4543 
4544 /* YYINITDEPTH -- initial size of the parser's stacks. */
4545 #ifndef YYINITDEPTH
4546 # define YYINITDEPTH 200
4547 #endif
4548 
4549 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
4550  if the built-in stack extension method is used).
4551 
4552  Do not make this value too large; the results are undefined if
4553  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
4554  evaluated with infinite-precision integer arithmetic. */
4555 
4556 #ifndef YYMAXDEPTH
4557 # define YYMAXDEPTH 10000
4558 #endif
4559 
4560 
4561 
4562 #if YYERROR_VERBOSE
4563 
4564 # ifndef yystrlen
4565 # if defined __GLIBC__ && defined _STRING_H
4566 # define yystrlen strlen
4567 # else
4568 /* Return the length of YYSTR. */
4569 #if (defined __STDC__ || defined __C99__FUNC__ \
4570  || defined __cplusplus || defined _MSC_VER)
4571 static YYSIZE_T
4572 yystrlen (const char *yystr)
4573 #else
4574 static YYSIZE_T
4575 yystrlen (yystr)
4576  const char *yystr;
4577 #endif
4578 {
4579  YYSIZE_T yylen;
4580  for (yylen = 0; yystr[yylen]; yylen++)
4581  continue;
4582  return yylen;
4583 }
4584 # endif
4585 # endif
4586 
4587 # ifndef yystpcpy
4588 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
4589 # define yystpcpy stpcpy
4590 # else
4591 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
4592  YYDEST. */
4593 #if (defined __STDC__ || defined __C99__FUNC__ \
4594  || defined __cplusplus || defined _MSC_VER)
4595 static char *
4596 yystpcpy (char *yydest, const char *yysrc)
4597 #else
4598 static char *
4599 yystpcpy (yydest, yysrc)
4600  char *yydest;
4601  const char *yysrc;
4602 #endif
4603 {
4604  char *yyd = yydest;
4605  const char *yys = yysrc;
4606 
4607  while ((*yyd++ = *yys++) != '\0')
4608  continue;
4609 
4610  return yyd - 1;
4611 }
4612 # endif
4613 # endif
4614 
4615 # ifndef yytnamerr
4616 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4617  quotes and backslashes, so that it's suitable for yyerror. The
4618  heuristic is that double-quoting is unnecessary unless the string
4619  contains an apostrophe, a comma, or backslash (other than
4620  backslash-backslash). YYSTR is taken from yytname. If YYRES is
4621  null, do not copy; instead, return the length of what the result
4622  would have been. */
4623 static YYSIZE_T
4624 yytnamerr (char *yyres, const char *yystr)
4625 {
4626  if (*yystr == '"')
4627  {
4628  YYSIZE_T yyn = 0;
4629  char const *yyp = yystr;
4630 
4631  for (;;)
4632  switch (*++yyp)
4633  {
4634  case '\'':
4635  case ',':
4636  goto do_not_strip_quotes;
4637 
4638  case '\\':
4639  if (*++yyp != '\\')
4640  goto do_not_strip_quotes;
4641  /* Fall through. */
4642  default:
4643  if (yyres)
4644  yyres[yyn] = *yyp;
4645  yyn++;
4646  break;
4647 
4648  case '"':
4649  if (yyres)
4650  yyres[yyn] = '\0';
4651  return yyn;
4652  }
4653  do_not_strip_quotes: ;
4654  }
4655 
4656  if (! yyres)
4657  return yystrlen (yystr);
4658 
4659  return yystpcpy (yyres, yystr) - yyres;
4660 }
4661 # endif
4662 
4663 /* Copy into YYRESULT an error message about the unexpected token
4664  YYCHAR while in state YYSTATE. Return the number of bytes copied,
4665  including the terminating null byte. If YYRESULT is null, do not
4666  copy anything; just return the number of bytes that would be
4667  copied. As a special case, return 0 if an ordinary "syntax error"
4668  message will do. Return YYSIZE_MAXIMUM if overflow occurs during
4669  size calculation. */
4670 static YYSIZE_T
4671 yysyntax_error (char *yyresult, int yystate, int yychar)
4672 {
4673  int yyn = yypact[yystate];
4674 
4675  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
4676  return 0;
4677  else
4678  {
4679  int yytype = YYTRANSLATE (yychar);
4680  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
4681  YYSIZE_T yysize = yysize0;
4682  YYSIZE_T yysize1;
4683  int yysize_overflow = 0;
4684  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4685  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4686  int yyx;
4687 
4688 # if 0
4689  /* This is so xgettext sees the translatable formats that are
4690  constructed on the fly. */
4691  YY_("syntax error, unexpected %s");
4692  YY_("syntax error, unexpected %s, expecting %s");
4693  YY_("syntax error, unexpected %s, expecting %s or %s");
4694  YY_("syntax error, unexpected %s, expecting %s or %s or %s");
4695  YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
4696 # endif
4697  char *yyfmt;
4698  char const *yyf;
4699  static char const yyunexpected[] = "syntax error, unexpected %s";
4700  static char const yyexpecting[] = ", expecting %s";
4701  static char const yyor[] = " or %s";
4702  char yyformat[sizeof yyunexpected
4703  + sizeof yyexpecting - 1
4704  + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
4705  * (sizeof yyor - 1))];
4706  char const *yyprefix = yyexpecting;
4707 
4708  /* Start YYX at -YYN if negative to avoid negative indexes in
4709  YYCHECK. */
4710  int yyxbegin = yyn < 0 ? -yyn : 0;
4711 
4712  /* Stay within bounds of both yycheck and yytname. */
4713  int yychecklim = YYLAST - yyn + 1;
4714  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4715  int yycount = 1;
4716 
4717  yyarg[0] = yytname[yytype];
4718  yyfmt = yystpcpy (yyformat, yyunexpected);
4719 
4720  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4721  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4722  {
4723  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4724  {
4725  yycount = 1;
4726  yysize = yysize0;
4727  yyformat[sizeof yyunexpected - 1] = '\0';
4728  break;
4729  }
4730  yyarg[yycount++] = yytname[yyx];
4731  yysize1 = yysize + yytnamerr (0, yytname[yyx]);
4732  yysize_overflow |= (yysize1 < yysize);
4733  yysize = yysize1;
4734  yyfmt = yystpcpy (yyfmt, yyprefix);
4735  yyprefix = yyor;
4736  }
4737 
4738  yyf = YY_(yyformat);
4739  yysize1 = yysize + yystrlen (yyf);
4740  yysize_overflow |= (yysize1 < yysize);
4741  yysize = yysize1;
4742 
4743  if (yysize_overflow)
4744  return YYSIZE_MAXIMUM;
4745 
4746  if (yyresult)
4747  {
4748  /* Avoid sprintf, as that infringes on the user's name space.
4749  Don't have undefined behavior even if the translation
4750  produced a string with the wrong number of "%s"s. */
4751  char *yyp = yyresult;
4752  int yyi = 0;
4753  while ((*yyp = *yyf) != '\0')
4754  {
4755  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4756  {
4757  yyp += yytnamerr (yyp, yyarg[yyi++]);
4758  yyf += 2;
4759  }
4760  else
4761  {
4762  yyp++;
4763  yyf++;
4764  }
4765  }
4766  }
4767  return yysize;
4768  }
4769 }
4770 #endif /* YYERROR_VERBOSE */
4771 
4772 
4773 /*-----------------------------------------------.
4774 | Release the memory associated to this symbol. |
4775 `-----------------------------------------------*/
4776 
4777 /*ARGSUSED*/
4778 #if (defined __STDC__ || defined __C99__FUNC__ \
4779  || defined __cplusplus || defined _MSC_VER)
4780 static void
4781 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser)
4782 #else
4783 static void
4784 yydestruct (yymsg, yytype, yyvaluep, parser)
4785  const char *yymsg;
4786  int yytype;
4787  YYSTYPE *yyvaluep;
4788  struct parser_params *parser;
4789 #endif
4790 {
4791  YYUSE (yyvaluep);
4792  YYUSE (parser);
4793 
4794  if (!yymsg)
4795  yymsg = "Deleting";
4796  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4797 
4798  switch (yytype)
4799  {
4800 
4801  default:
4802  break;
4803  }
4804 }
4805 
4806 
4807 /* Prevent warnings from -Wmissing-prototypes. */
4808 
4809 #ifdef YYPARSE_PARAM
4810 #if defined __STDC__ || defined __cplusplus
4811 int yyparse (void *YYPARSE_PARAM);
4812 #else
4813 int yyparse ();
4814 #endif
4815 #else /* ! YYPARSE_PARAM */
4816 #if defined __STDC__ || defined __cplusplus
4817 int yyparse (struct parser_params *parser);
4818 #else
4819 int yyparse ();
4820 #endif
4821 #endif /* ! YYPARSE_PARAM */
4822 
4823 
4824 
4825 
4826 
4827 
4828 /*----------.
4829 | yyparse. |
4830 `----------*/
4831 
4832 #ifdef YYPARSE_PARAM
4833 #if (defined __STDC__ || defined __C99__FUNC__ \
4834  || defined __cplusplus || defined _MSC_VER)
4835 int
4836 yyparse (void *YYPARSE_PARAM)
4837 #else
4838 int
4839 yyparse (YYPARSE_PARAM)
4840  void *YYPARSE_PARAM;
4841 #endif
4842 #else /* ! YYPARSE_PARAM */
4843 #if (defined __STDC__ || defined __C99__FUNC__ \
4844  || defined __cplusplus || defined _MSC_VER)
4845 int
4846 yyparse (struct parser_params *parser)
4847 #else
4848 int
4849 yyparse (parser)
4850  struct parser_params *parser;
4851 #endif
4852 #endif
4853 {
4854  /* The look-ahead symbol. */
4855 int yychar;
4856 
4857 /* The semantic value of the look-ahead symbol. */
4858 YYSTYPE yylval;
4859 
4860 /* Number of syntax errors so far. */
4861 int yynerrs;
4862 
4863  int yystate;
4864  int yyn;
4865  int yyresult;
4866  /* Number of tokens to shift before error messages enabled. */
4867  int yyerrstatus;
4868  /* Look-ahead token as an internal (translated) token number. */
4869  int yytoken = 0;
4870 #if YYERROR_VERBOSE
4871  /* Buffer for error messages, and its allocated size. */
4872  char yymsgbuf[128];
4873  char *yymsg = yymsgbuf;
4874  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4875 #endif
4876 
4877  /* Three stacks and their tools:
4878  `yyss': related to states,
4879  `yyvs': related to semantic values,
4880  `yyls': related to locations.
4881 
4882  Refer to the stacks thru separate pointers, to allow yyoverflow
4883  to reallocate them elsewhere. */
4884 
4885  /* The state stack. */
4886  yytype_int16 yyssa[YYINITDEPTH];
4887  yytype_int16 *yyss = yyssa;
4888  yytype_int16 *yyssp;
4889 
4890  /* The semantic value stack. */
4891  YYSTYPE yyvsa[YYINITDEPTH];
4892  YYSTYPE *yyvs = yyvsa;
4893  YYSTYPE *yyvsp;
4894 
4895 
4896 
4897 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4898 
4899  YYSIZE_T yystacksize = YYINITDEPTH;
4900 
4901  /* The variables used to return semantic value and location from the
4902  action routines. */
4903  YYSTYPE yyval;
4904 
4905 
4906  /* The number of symbols on the RHS of the reduced rule.
4907  Keep to zero when no symbol should be popped. */
4908  int yylen = 0;
4909 
4910  YYDPRINTF ((stderr, "Starting parse\n"));
4911 
4912  yystate = 0;
4913  yyerrstatus = 0;
4914  yynerrs = 0;
4915  yychar = YYEMPTY; /* Cause a token to be read. */
4916 
4917  /* Initialize stack pointers.
4918  Waste one element of value and location stack
4919  so that they stay on the same level as the state stack.
4920  The wasted elements are never initialized. */
4921 
4922  yyssp = yyss;
4923  yyvsp = yyvs;
4924 
4925  goto yysetstate;
4926 
4927 /*------------------------------------------------------------.
4928 | yynewstate -- Push a new state, which is found in yystate. |
4929 `------------------------------------------------------------*/
4930  yynewstate:
4931  /* In all cases, when you get here, the value and location stacks
4932  have just been pushed. So pushing a state here evens the stacks. */
4933  yyssp++;
4934 
4935  yysetstate:
4936  *yyssp = yystate;
4937 
4938  if (yyss + yystacksize - 1 <= yyssp)
4939  {
4940  /* Get the current used size of the three stacks, in elements. */
4941  YYSIZE_T yysize = yyssp - yyss + 1;
4942 
4943 #ifdef yyoverflow
4944  {
4945  /* Give user a chance to reallocate the stack. Use copies of
4946  these so that the &'s don't force the real ones into
4947  memory. */
4948  YYSTYPE *yyvs1 = yyvs;
4949  yytype_int16 *yyss1 = yyss;
4950 
4951 
4952  /* Each stack pointer address is followed by the size of the
4953  data in use in that stack, in bytes. This used to be a
4954  conditional around just the two extra args, but that might
4955  be undefined if yyoverflow is a macro. */
4956  yyoverflow (YY_("memory exhausted"),
4957  &yyss1, yysize * sizeof (*yyssp),
4958  &yyvs1, yysize * sizeof (*yyvsp),
4959 
4960  &yystacksize);
4961 
4962  yyss = yyss1;
4963  yyvs = yyvs1;
4964  }
4965 #else /* no yyoverflow */
4966 # ifndef YYSTACK_RELOCATE
4967  goto yyexhaustedlab;
4968 # else
4969  /* Extend the stack our own way. */
4970  if (YYMAXDEPTH <= yystacksize)
4971  goto yyexhaustedlab;
4972  yystacksize *= 2;
4973  if (YYMAXDEPTH < yystacksize)
4974  yystacksize = YYMAXDEPTH;
4975 
4976  {
4977  yytype_int16 *yyss1 = yyss;
4978  union yyalloc *yyptr =
4979  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4980  if (! yyptr)
4981  goto yyexhaustedlab;
4982  YYSTACK_RELOCATE (yyss);
4983  YYSTACK_RELOCATE (yyvs);
4984 
4985 # undef YYSTACK_RELOCATE
4986  if (yyss1 != yyssa)
4987  YYSTACK_FREE (yyss1);
4988  }
4989 # endif
4990 #endif /* no yyoverflow */
4991 
4992  yyssp = yyss + yysize - 1;
4993  yyvsp = yyvs + yysize - 1;
4994 
4995 
4996  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4997  (unsigned long int) yystacksize));
4998 
4999  if (yyss + yystacksize - 1 <= yyssp)
5000  YYABORT;
5001  }
5002 
5003  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
5004 
5005  goto yybackup;
5006 
5007 /*-----------.
5008 | yybackup. |
5009 `-----------*/
5010 yybackup:
5011 
5012  /* Do appropriate processing given the current state. Read a
5013  look-ahead token if we need one and don't already have one. */
5014 
5015  /* First try to decide what to do without reference to look-ahead token. */
5016  yyn = yypact[yystate];
5017  if (yyn == YYPACT_NINF)
5018  goto yydefault;
5019 
5020  /* Not known => get a look-ahead token if don't already have one. */
5021 
5022  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
5023  if (yychar == YYEMPTY)
5024  {
5025  YYDPRINTF ((stderr, "Reading a token: "));
5026  yychar = YYLEX;
5027  }
5028 
5029  if (yychar <= YYEOF)
5030  {
5031  yychar = yytoken = YYEOF;
5032  YYDPRINTF ((stderr, "Now at end of input.\n"));
5033  }
5034  else
5035  {
5036  yytoken = YYTRANSLATE (yychar);
5037  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
5038  }
5039 
5040  /* If the proper action on seeing token YYTOKEN is to reduce or to
5041  detect an error, take that action. */
5042  yyn += yytoken;
5043  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
5044  goto yydefault;
5045  yyn = yytable[yyn];
5046  if (yyn <= 0)
5047  {
5048  if (yyn == 0 || yyn == YYTABLE_NINF)
5049  goto yyerrlab;
5050  yyn = -yyn;
5051  goto yyreduce;
5052  }
5053 
5054  if (yyn == YYFINAL)
5055  YYACCEPT;
5056 
5057  /* Count tokens shifted since error; after three, turn off error
5058  status. */
5059  if (yyerrstatus)
5060  yyerrstatus--;
5061 
5062  /* Shift the look-ahead token. */
5063  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
5064 
5065  /* Discard the shifted token unless it is eof. */
5066  if (yychar != YYEOF)
5067  yychar = YYEMPTY;
5068 
5069  yystate = yyn;
5070  *++yyvsp = yylval;
5071 
5072  goto yynewstate;
5073 
5074 
5075 /*-----------------------------------------------------------.
5076 | yydefault -- do the default action for the current state. |
5077 `-----------------------------------------------------------*/
5078 yydefault:
5079  yyn = yydefact[yystate];
5080  if (yyn == 0)
5081  goto yyerrlab;
5082  goto yyreduce;
5083 
5084 
5085 /*-----------------------------.
5086 | yyreduce -- Do a reduction. |
5087 `-----------------------------*/
5088 yyreduce:
5089  /* yyn is the number of a rule to reduce with. */
5090  yylen = yyr2[yyn];
5091 
5092  /* If YYLEN is nonzero, implement the default value of the action:
5093  `$$ = $1'.
5094 
5095  Otherwise, the following line sets YYVAL to garbage.
5096  This behavior is undocumented and Bison
5097  users should not rely upon it. Assigning to YYVAL
5098  unconditionally makes the parser a bit smaller, and it avoids a
5099  GCC warning that YYVAL may be used uninitialized. */
5100  yyval = yyvsp[1-yylen];
5101 
5102 
5103  YY_REDUCE_PRINT (yyn);
5104  switch (yyn)
5105  {
5106  case 2:
5107 #line 782 "ripper.y"
5108  {
5109  lex_state = EXPR_BEG;
5110 #if 0
5112 #endif
5113  local_push(0);
5114 
5115  ;}
5116  break;
5117 
5118  case 3:
5119 #line 791 "ripper.y"
5120  {
5121 #if 0
5122  if ((yyvsp[(2) - (2)].val) && !compile_for_eval) {
5123  /* last expression should not be void */
5124  if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val));
5125  else {
5126  NODE *node = (yyvsp[(2) - (2)].val);
5127  while (node->nd_next) {
5128  node = node->nd_next;
5129  }
5130  void_expr(node->nd_head);
5131  }
5132  }
5133  ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val)));
5134 #endif
5135  (yyval.val) = (yyvsp[(2) - (2)].val);
5136  parser->result = dispatch1(program, (yyval.val));
5137 
5138  local_pop();
5139  ;}
5140  break;
5141 
5142  case 4:
5143 #line 814 "ripper.y"
5144  {
5145 #if 0
5146  void_stmts((yyvsp[(1) - (2)].val));
5148 #endif
5149 
5150  (yyval.val) = (yyvsp[(1) - (2)].val);
5151  ;}
5152  break;
5153 
5154  case 5:
5155 #line 825 "ripper.y"
5156  {
5157 #if 0
5158  (yyval.val) = NEW_BEGIN(0);
5159 #endif
5160  (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new),
5161  dispatch0(void_stmt));
5162 
5163  ;}
5164  break;
5165 
5166  case 6:
5167 #line 834 "ripper.y"
5168  {
5169 #if 0
5170  (yyval.val) = newline_node((yyvsp[(1) - (1)].val));
5171 #endif
5172  (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val));
5173 
5174  ;}
5175  break;
5176 
5177  case 7:
5178 #line 842 "ripper.y"
5179  {
5180 #if 0
5181  (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val)));
5182 #endif
5183  (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5184 
5185  ;}
5186  break;
5187 
5188  case 8:
5189 #line 850 "ripper.y"
5190  {
5191  (yyval.val) = remove_begin((yyvsp[(2) - (2)].val));
5192  ;}
5193  break;
5194 
5195  case 10:
5196 #line 857 "ripper.y"
5197  {
5198  if (in_def || in_single) {
5199  yyerror("BEGIN in method");
5200  }
5201 #if 0
5202  /* local_push(0); */
5203 #endif
5204 
5205  ;}
5206  break;
5207 
5208  case 11:
5209 #line 867 "ripper.y"
5210  {
5211 #if 0
5213  (yyvsp[(4) - (5)].val));
5214  /* NEW_PREEXE($4)); */
5215  /* local_pop(); */
5216  (yyval.val) = NEW_BEGIN(0);
5217 #endif
5218  (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val));
5219 
5220  ;}
5221  break;
5222 
5223  case 12:
5224 #line 884 "ripper.y"
5225  {
5226 #if 0
5227  (yyval.val) = (yyvsp[(1) - (4)].val);
5228  if ((yyvsp[(2) - (4)].val)) {
5229  (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val));
5230  }
5231  else if ((yyvsp[(3) - (4)].val)) {
5232  rb_warn0("else without rescue is useless");
5233  (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val));
5234  }
5235  if ((yyvsp[(4) - (4)].val)) {
5236  if ((yyval.val)) {
5237  (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val));
5238  }
5239  else {
5240  (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL());
5241  }
5242  }
5243  fixpos((yyval.val), (yyvsp[(1) - (4)].val));
5244 #endif
5245  (yyval.val) = dispatch4(bodystmt,
5246  escape_Qundef((yyvsp[(1) - (4)].val)),
5247  escape_Qundef((yyvsp[(2) - (4)].val)),
5248  escape_Qundef((yyvsp[(3) - (4)].val)),
5249  escape_Qundef((yyvsp[(4) - (4)].val)));
5250 
5251  ;}
5252  break;
5253 
5254  case 13:
5255 #line 914 "ripper.y"
5256  {
5257 #if 0
5258  void_stmts((yyvsp[(1) - (2)].val));
5260 #endif
5261 
5262  (yyval.val) = (yyvsp[(1) - (2)].val);
5263  ;}
5264  break;
5265 
5266  case 14:
5267 #line 925 "ripper.y"
5268  {
5269 #if 0
5270  (yyval.val) = NEW_BEGIN(0);
5271 #endif
5272  (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new),
5273  dispatch0(void_stmt));
5274 
5275  ;}
5276  break;
5277 
5278  case 15:
5279 #line 934 "ripper.y"
5280  {
5281 #if 0
5282  (yyval.val) = newline_node((yyvsp[(1) - (1)].val));
5283 #endif
5284  (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val));
5285 
5286  ;}
5287  break;
5288 
5289  case 16:
5290 #line 942 "ripper.y"
5291  {
5292 #if 0
5293  (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val)));
5294 #endif
5295  (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5296 
5297  ;}
5298  break;
5299 
5300  case 17:
5301 #line 950 "ripper.y"
5302  {
5303  (yyval.val) = remove_begin((yyvsp[(2) - (2)].val));
5304  ;}
5305  break;
5306 
5307  case 18:
5308 #line 955 "ripper.y"
5309  {lex_state = EXPR_FNAME;;}
5310  break;
5311 
5312  case 19:
5313 #line 956 "ripper.y"
5314  {
5315 #if 0
5316  (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val));
5317 #endif
5318  (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val));
5319 
5320  ;}
5321  break;
5322 
5323  case 20:
5324 #line 964 "ripper.y"
5325  {
5326 #if 0
5327  (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
5328 #endif
5329  (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
5330 
5331  ;}
5332  break;
5333 
5334  case 21:
5335 #line 972 "ripper.y"
5336  {
5337 #if 0
5338  char buf[2];
5339  buf[0] = '$';
5340  buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth;
5341  (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2));
5342 #endif
5343  (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
5344 
5345  ;}
5346  break;
5347 
5348  case 22:
5349 #line 983 "ripper.y"
5350  {
5351 #if 0
5352  yyerror("can't make alias for the number variables");
5353  (yyval.val) = NEW_BEGIN(0);
5354 #endif
5355  (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
5356  (yyval.val) = dispatch1(alias_error, (yyval.val));
5357 
5358  ;}
5359  break;
5360 
5361  case 23:
5362 #line 993 "ripper.y"
5363  {
5364 #if 0
5365  (yyval.val) = (yyvsp[(2) - (2)].val);
5366 #endif
5367  (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val));
5368 
5369  ;}
5370  break;
5371 
5372  case 24:
5373 #line 1001 "ripper.y"
5374  {
5375 #if 0
5376  (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0);
5377  fixpos((yyval.val), (yyvsp[(3) - (3)].val));
5378 #endif
5379  (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
5380 
5381  ;}
5382  break;
5383 
5384  case 25:
5385 #line 1010 "ripper.y"
5386  {
5387 #if 0
5388  (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0);
5389  fixpos((yyval.val), (yyvsp[(3) - (3)].val));
5390 #endif
5391  (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
5392 
5393  ;}
5394  break;
5395 
5396  case 26:
5397 #line 1019 "ripper.y"
5398  {
5399 #if 0
5400  if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) {
5401  (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0);
5402  }
5403  else {
5404  (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1);
5405  }
5406 #endif
5407  (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
5408 
5409  ;}
5410  break;
5411 
5412  case 27:
5413 #line 1032 "ripper.y"
5414  {
5415 #if 0
5416  if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) {
5417  (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0);
5418  }
5419  else {
5420  (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1);
5421  }
5422 #endif
5423  (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
5424 
5425  ;}
5426  break;
5427 
5428  case 28:
5429 #line 1045 "ripper.y"
5430  {
5431 #if 0
5432  NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0);
5433  (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0);
5434 #endif
5435  (yyval.val) = dispatch2(rescue_mod, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5436 
5437  ;}
5438  break;
5439 
5440  case 29:
5441 #line 1054 "ripper.y"
5442  {
5443  if (in_def || in_single) {
5444  rb_warn0("END in method; use at_exit");
5445  }
5446 #if 0
5447  (yyval.val) = NEW_POSTEXE(NEW_NODE(
5448  NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].val) /* body */, 0 /* args */));
5449 #endif
5450  (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val));
5451 
5452  ;}
5453  break;
5454 
5455  case 31:
5456 #line 1067 "ripper.y"
5457  {
5458 #if 0
5459  value_expr((yyvsp[(3) - (3)].val));
5460  (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
5461  (yyval.val) = (yyvsp[(1) - (3)].val);
5462 #endif
5463  (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5464 
5465  ;}
5466  break;
5467 
5468  case 32:
5469 #line 1077 "ripper.y"
5470  {
5471 #if 0
5472  value_expr((yyvsp[(3) - (3)].val));
5473  if ((yyvsp[(1) - (3)].val)) {
5474  ID vid = (yyvsp[(1) - (3)].val)->nd_vid;
5475  if ((yyvsp[(2) - (3)].val) == tOROP) {
5476  (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
5477  (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val));
5478  if (is_asgn_or_id(vid)) {
5479  (yyval.val)->nd_aid = vid;
5480  }
5481  }
5482  else if ((yyvsp[(2) - (3)].val) == tANDOP) {
5483  (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
5484  (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val));
5485  }
5486  else {
5487  (yyval.val) = (yyvsp[(1) - (3)].val);
5488  (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val)));
5489  }
5490  }
5491  else {
5492  (yyval.val) = NEW_BEGIN(0);
5493  }
5494 #endif
5495  (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
5496 
5497  ;}
5498  break;
5499 
5500  case 33:
5501 #line 1106 "ripper.y"
5502  {
5503 #if 0
5504  NODE *args;
5505 
5506  value_expr((yyvsp[(6) - (6)].val));
5507  if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY();
5508  args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
5509  if ((yyvsp[(5) - (6)].val) == tOROP) {
5510  (yyvsp[(5) - (6)].val) = 0;
5511  }
5512  else if ((yyvsp[(5) - (6)].val) == tANDOP) {
5513  (yyvsp[(5) - (6)].val) = 1;
5514  }
5515  (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args);
5516  fixpos((yyval.val), (yyvsp[(1) - (6)].val));
5517 #endif
5518  (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val)));
5519  (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
5520 
5521  ;}
5522  break;
5523 
5524  case 34:
5525 #line 1127 "ripper.y"
5526  {
5527 #if 0
5528  value_expr((yyvsp[(5) - (5)].val));
5529  if ((yyvsp[(4) - (5)].val) == tOROP) {
5530  (yyvsp[(4) - (5)].val) = 0;
5531  }
5532  else if ((yyvsp[(4) - (5)].val) == tANDOP) {
5533  (yyvsp[(4) - (5)].val) = 1;
5534  }
5535  (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
5536  fixpos((yyval.val), (yyvsp[(1) - (5)].val));
5537 #endif
5538  (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
5539  (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
5540 
5541  ;}
5542  break;
5543 
5544  case 35:
5545 #line 1144 "ripper.y"
5546  {
5547 #if 0
5548  value_expr((yyvsp[(5) - (5)].val));
5549  if ((yyvsp[(4) - (5)].val) == tOROP) {
5550  (yyvsp[(4) - (5)].val) = 0;
5551  }
5552  else if ((yyvsp[(4) - (5)].val) == tANDOP) {
5553  (yyvsp[(4) - (5)].val) = 1;
5554  }
5555  (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
5556  fixpos((yyval.val), (yyvsp[(1) - (5)].val));
5557 #endif
5558  (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
5559  (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
5560 
5561  ;}
5562  break;
5563 
5564  case 36:
5565 #line 1161 "ripper.y"
5566  {
5567 #if 0
5568  yyerror("constant re-assignment");
5569  (yyval.val) = 0;
5570 #endif
5571  (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
5572  (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
5573  (yyval.val) = dispatch1(assign_error, (yyval.val));
5574 
5575  ;}
5576  break;
5577 
5578  case 37:
5579 #line 1172 "ripper.y"
5580  {
5581 #if 0
5582  value_expr((yyvsp[(5) - (5)].val));
5583  if ((yyvsp[(4) - (5)].val) == tOROP) {
5584  (yyvsp[(4) - (5)].val) = 0;
5585  }
5586  else if ((yyvsp[(4) - (5)].val) == tANDOP) {
5587  (yyvsp[(4) - (5)].val) = 1;
5588  }
5589  (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
5590  fixpos((yyval.val), (yyvsp[(1) - (5)].val));
5591 #endif
5592  (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val));
5593  (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
5594 
5595  ;}
5596  break;
5597 
5598  case 38:
5599 #line 1189 "ripper.y"
5600  {
5601 #if 0
5602  rb_backref_error((yyvsp[(1) - (3)].val));
5603  (yyval.val) = NEW_BEGIN(0);
5604 #endif
5605  (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
5606  (yyval.val) = dispatch1(assign_error, (yyval.val));
5607 
5608  ;}
5609  break;
5610 
5611  case 39:
5612 #line 1199 "ripper.y"
5613  {
5614 #if 0
5615  value_expr((yyvsp[(3) - (3)].val));
5616  (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5617 #endif
5618  (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5619 
5620  ;}
5621  break;
5622 
5623  case 40:
5624 #line 1208 "ripper.y"
5625  {
5626 #if 0
5627  (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
5628  (yyval.val) = (yyvsp[(1) - (3)].val);
5629 #endif
5630  (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5631 
5632  ;}
5633  break;
5634 
5635  case 41:
5636 #line 1217 "ripper.y"
5637  {
5638 #if 0
5639  (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
5640  (yyval.val) = (yyvsp[(1) - (3)].val);
5641 #endif
5642  (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5643 
5644  ;}
5645  break;
5646 
5647  case 43:
5648 #line 1229 "ripper.y"
5649  {
5650 #if 0
5651  value_expr((yyvsp[(3) - (3)].val));
5652  (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5653 #endif
5654  (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5655 
5656  ;}
5657  break;
5658 
5659  case 44:
5660 #line 1238 "ripper.y"
5661  {
5662 #if 0
5663  value_expr((yyvsp[(3) - (3)].val));
5664  (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5665 #endif
5666  (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5667 
5668  ;}
5669  break;
5670 
5671  case 46:
5672 #line 1251 "ripper.y"
5673  {
5674 #if 0
5675  (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5676 #endif
5677  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val));
5678 
5679  ;}
5680  break;
5681 
5682  case 47:
5683 #line 1259 "ripper.y"
5684  {
5685 #if 0
5686  (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5687 #endif
5688  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val));
5689 
5690  ;}
5691  break;
5692 
5693  case 48:
5694 #line 1267 "ripper.y"
5695  {
5696 #if 0
5697  (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!');
5698 #endif
5699  (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val));
5700 
5701  ;}
5702  break;
5703 
5704  case 49:
5705 #line 1275 "ripper.y"
5706  {
5707 #if 0
5708  (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!');
5709 #endif
5710  (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val));
5711 
5712  ;}
5713  break;
5714 
5715  case 51:
5716 #line 1286 "ripper.y"
5717  {
5718 #if 0
5719  value_expr((yyvsp[(1) - (1)].val));
5720  (yyval.val) = (yyvsp[(1) - (1)].val);
5721  if (!(yyval.val)) (yyval.val) = NEW_NIL();
5722 #endif
5723  (yyval.val) = (yyvsp[(1) - (1)].val);
5724 
5725  ;}
5726  break;
5727 
5728  case 55:
5729 #line 1303 "ripper.y"
5730  {
5731 #if 0
5732  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
5733 #endif
5734  (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
5735  (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val));
5736 
5737  ;}
5738  break;
5739 
5740  case 56:
5741 #line 1312 "ripper.y"
5742  {
5743 #if 0
5744  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
5745 #endif
5746  (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val));
5747  (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val));
5748 
5749  ;}
5750  break;
5751 
5752  case 57:
5753 #line 1323 "ripper.y"
5754  {
5755  (yyvsp[(1) - (1)].vars) = dyna_push();
5756 #if 0
5757  (yyval.num) = ruby_sourceline;
5758 #endif
5759 
5760  ;}
5761  break;
5762 
5763  case 58:
5764 #line 1333 "ripper.y"
5765  {
5766 #if 0
5767  (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
5768  nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
5769 #endif
5770  (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
5771 
5772  dyna_pop((yyvsp[(1) - (5)].vars));
5773  ;}
5774  break;
5775 
5776  case 59:
5777 #line 1345 "ripper.y"
5778  {
5779 #if 0
5780  (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
5781  fixpos((yyval.val), (yyvsp[(2) - (2)].val));
5782 #endif
5783  (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
5784 
5785  ;}
5786  break;
5787 
5788  case 60:
5789 #line 1354 "ripper.y"
5790  {
5791 #if 0
5792  block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val));
5793  (yyvsp[(3) - (3)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
5794  (yyval.val) = (yyvsp[(3) - (3)].val);
5795  fixpos((yyval.val), (yyvsp[(2) - (3)].val));
5796 #endif
5797  (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
5798  (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val));
5799 
5800  ;}
5801  break;
5802 
5803  case 61:
5804 #line 1366 "ripper.y"
5805  {
5806 #if 0
5807  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
5808  fixpos((yyval.val), (yyvsp[(1) - (4)].val));
5809 #endif
5810  (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
5811 
5812  ;}
5813  break;
5814 
5815  case 62:
5816 #line 1375 "ripper.y"
5817  {
5818 #if 0
5819  block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val));
5820  (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
5821  (yyval.val) = (yyvsp[(5) - (5)].val);
5822  fixpos((yyval.val), (yyvsp[(1) - (5)].val));
5823 #endif
5824  (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
5825  (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val));
5826 
5827  ;}
5828  break;
5829 
5830  case 63:
5831 #line 1387 "ripper.y"
5832  {
5833 #if 0
5834  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
5835  fixpos((yyval.val), (yyvsp[(1) - (4)].val));
5836 #endif
5837  (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
5838 
5839  ;}
5840  break;
5841 
5842  case 64:
5843 #line 1396 "ripper.y"
5844  {
5845 #if 0
5846  block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val));
5847  (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
5848  (yyval.val) = (yyvsp[(5) - (5)].val);
5849  fixpos((yyval.val), (yyvsp[(1) - (5)].val));
5850 #endif
5851  (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
5852  (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val));
5853 
5854  ;}
5855  break;
5856 
5857  case 65:
5858 #line 1408 "ripper.y"
5859  {
5860 #if 0
5861  (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val));
5862  fixpos((yyval.val), (yyvsp[(2) - (2)].val));
5863 #endif
5864  (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val));
5865 
5866  ;}
5867  break;
5868 
5869  case 66:
5870 #line 1417 "ripper.y"
5871  {
5872 #if 0
5873  (yyval.val) = new_yield((yyvsp[(2) - (2)].val));
5874  fixpos((yyval.val), (yyvsp[(2) - (2)].val));
5875 #endif
5876  (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val));
5877 
5878  ;}
5879  break;
5880 
5881  case 67:
5882 #line 1426 "ripper.y"
5883  {
5884 #if 0
5885  (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val)));
5886 #endif
5887  (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val));
5888 
5889  ;}
5890  break;
5891 
5892  case 68:
5893 #line 1434 "ripper.y"
5894  {
5895 #if 0
5896  (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val)));
5897 #endif
5898  (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val));
5899 
5900  ;}
5901  break;
5902 
5903  case 69:
5904 #line 1442 "ripper.y"
5905  {
5906 #if 0
5907  (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val)));
5908 #endif
5909  (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val));
5910 
5911  ;}
5912  break;
5913 
5914  case 71:
5915 #line 1453 "ripper.y"
5916  {
5917 #if 0
5918  (yyval.val) = (yyvsp[(2) - (3)].val);
5919 #endif
5920  (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
5921 
5922  ;}
5923  break;
5924 
5925  case 73:
5926 #line 1464 "ripper.y"
5927  {
5928 #if 0
5929  (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0);
5930 #endif
5931  (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
5932 
5933  ;}
5934  break;
5935 
5936  case 74:
5937 #line 1474 "ripper.y"
5938  {
5939 #if 0
5940  (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0);
5941 #endif
5942  (yyval.val) = (yyvsp[(1) - (1)].val);
5943 
5944  ;}
5945  break;
5946 
5947  case 75:
5948 #line 1482 "ripper.y"
5949  {
5950 #if 0
5951  (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0);
5952 #endif
5953  (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
5954 
5955  ;}
5956  break;
5957 
5958  case 76:
5959 #line 1490 "ripper.y"
5960  {
5961 #if 0
5962  (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5963 #endif
5964  (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
5965 
5966  ;}
5967  break;
5968 
5969  case 77:
5970 #line 1498 "ripper.y"
5971  {
5972 #if 0
5973  (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val)));
5974 #endif
5975  (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
5976  (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val));
5977 
5978  ;}
5979  break;
5980 
5981  case 78:
5982 #line 1507 "ripper.y"
5983  {
5984 #if 0
5985  (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1);
5986 #endif
5987  (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil);
5988 
5989  ;}
5990  break;
5991 
5992  case 79:
5993 #line 1515 "ripper.y"
5994  {
5995 #if 0
5996  (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val)));
5997 #endif
5998  (yyvsp[(1) - (4)].val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil);
5999  (yyval.val) = mlhs_add((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
6000 
6001  ;}
6002  break;
6003 
6004  case 80:
6005 #line 1524 "ripper.y"
6006  {
6007 #if 0
6008  (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val));
6009 #endif
6010  (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val));
6011 
6012  ;}
6013  break;
6014 
6015  case 81:
6016 #line 1532 "ripper.y"
6017  {
6018 #if 0
6019  (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val)));
6020 #endif
6021  (yyvsp[(2) - (4)].val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val));
6022  (yyval.val) = mlhs_add((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val));
6023 
6024  ;}
6025  break;
6026 
6027  case 82:
6028 #line 1541 "ripper.y"
6029  {
6030 #if 0
6031  (yyval.val) = NEW_MASGN(0, -1);
6032 #endif
6033  (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
6034 
6035  ;}
6036  break;
6037 
6038  case 83:
6039 #line 1549 "ripper.y"
6040  {
6041 #if 0
6042  (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val)));
6043 #endif
6044  (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
6045  (yyval.val) = mlhs_add((yyval.val), (yyvsp[(3) - (3)].val));
6046 
6047  ;}
6048  break;
6049 
6050  case 85:
6051 #line 1561 "ripper.y"
6052  {
6053 #if 0
6054  (yyval.val) = (yyvsp[(2) - (3)].val);
6055 #endif
6056  (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
6057 
6058  ;}
6059  break;
6060 
6061  case 86:
6062 #line 1571 "ripper.y"
6063  {
6064 #if 0
6065  (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val));
6066 #endif
6067  (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val));
6068 
6069  ;}
6070  break;
6071 
6072  case 87:
6073 #line 1579 "ripper.y"
6074  {
6075 #if 0
6076  (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
6077 #endif
6078  (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
6079 
6080  ;}
6081  break;
6082 
6083  case 88:
6084 #line 1589 "ripper.y"
6085  {
6086 #if 0
6087  (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
6088 #endif
6089  (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val));
6090 
6091  ;}
6092  break;
6093 
6094  case 89:
6095 #line 1597 "ripper.y"
6096  {
6097 #if 0
6098  (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6099 #endif
6100  (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6101 
6102  ;}
6103  break;
6104 
6105  case 90:
6106 #line 1607 "ripper.y"
6107  {
6108  (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
6109  ;}
6110  break;
6111 
6112  case 91:
6113 #line 1611 "ripper.y"
6114  {
6115  (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
6116  ;}
6117  break;
6118 
6119  case 92:
6120 #line 1615 "ripper.y"
6121  {
6122 #if 0
6123  (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
6124 #endif
6125  (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
6126 
6127  ;}
6128  break;
6129 
6130  case 93:
6131 #line 1623 "ripper.y"
6132  {
6133 #if 0
6134  (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6135 #endif
6136  (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
6137 
6138  ;}
6139  break;
6140 
6141  case 94:
6142 #line 1631 "ripper.y"
6143  {
6144 #if 0
6145  (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6146 #endif
6147  (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6148 
6149  ;}
6150  break;
6151 
6152  case 95:
6153 #line 1639 "ripper.y"
6154  {
6155 #if 0
6156  (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6157 #endif
6158  (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
6159 
6160  ;}
6161  break;
6162 
6163  case 96:
6164 #line 1647 "ripper.y"
6165  {
6166 #if 0
6167  if (in_def || in_single)
6168  yyerror("dynamic constant assignment");
6169  (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)));
6170 #endif
6171  if (in_def || in_single)
6172  yyerror("dynamic constant assignment");
6173  (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6174 
6175  ;}
6176  break;
6177 
6178  case 97:
6179 #line 1659 "ripper.y"
6180  {
6181 #if 0
6182  if (in_def || in_single)
6183  yyerror("dynamic constant assignment");
6184  (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val)));
6185 #endif
6186  (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val));
6187 
6188  ;}
6189  break;
6190 
6191  case 98:
6192 #line 1669 "ripper.y"
6193  {
6194 #if 0
6195  rb_backref_error((yyvsp[(1) - (1)].val));
6196  (yyval.val) = NEW_BEGIN(0);
6197 #endif
6198  (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val));
6199  (yyval.val) = dispatch1(assign_error, (yyval.val));
6200 
6201  ;}
6202  break;
6203 
6204  case 99:
6205 #line 1681 "ripper.y"
6206  {
6207  (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
6208 #if 0
6209  if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0);
6210 #endif
6211  (yyval.val) = dispatch1(var_field, (yyval.val));
6212 
6213  ;}
6214  break;
6215 
6216  case 100:
6217 #line 1690 "ripper.y"
6218  {
6219  (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
6220 #if 0
6221  if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0);
6222 #endif
6223  (yyval.val) = dispatch1(var_field, (yyval.val));
6224 
6225  ;}
6226  break;
6227 
6228  case 101:
6229 #line 1699 "ripper.y"
6230  {
6231 #if 0
6232  (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
6233 #endif
6234  (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
6235 
6236  ;}
6237  break;
6238 
6239  case 102:
6240 #line 1707 "ripper.y"
6241  {
6242 #if 0
6243  (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6244 #endif
6245  (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
6246 
6247  ;}
6248  break;
6249 
6250  case 103:
6251 #line 1715 "ripper.y"
6252  {
6253 #if 0
6254  (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6255 #endif
6256  (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val));
6257 
6258  ;}
6259  break;
6260 
6261  case 104:
6262 #line 1723 "ripper.y"
6263  {
6264 #if 0
6265  (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6266 #endif
6267  (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
6268 
6269  ;}
6270  break;
6271 
6272  case 105:
6273 #line 1731 "ripper.y"
6274  {
6275 #if 0
6276  if (in_def || in_single)
6277  yyerror("dynamic constant assignment");
6278  (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)));
6279 #endif
6280  (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6281  if (in_def || in_single) {
6282  (yyval.val) = dispatch1(assign_error, (yyval.val));
6283  }
6284 
6285  ;}
6286  break;
6287 
6288  case 106:
6289 #line 1744 "ripper.y"
6290  {
6291 #if 0
6292  if (in_def || in_single)
6293  yyerror("dynamic constant assignment");
6294  (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val)));
6295 #endif
6296  (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val));
6297  if (in_def || in_single) {
6298  (yyval.val) = dispatch1(assign_error, (yyval.val));
6299  }
6300 
6301  ;}
6302  break;
6303 
6304  case 107:
6305 #line 1757 "ripper.y"
6306  {
6307 #if 0
6308  rb_backref_error((yyvsp[(1) - (1)].val));
6309  (yyval.val) = NEW_BEGIN(0);
6310 #endif
6311  (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val));
6312 
6313  ;}
6314  break;
6315 
6316  case 108:
6317 #line 1768 "ripper.y"
6318  {
6319 #if 0
6320  yyerror("class/module name must be CONSTANT");
6321 #endif
6322  (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val));
6323 
6324  ;}
6325  break;
6326 
6327  case 110:
6328 #line 1779 "ripper.y"
6329  {
6330 #if 0
6331  (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val));
6332 #endif
6333  (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val));
6334 
6335  ;}
6336  break;
6337 
6338  case 111:
6339 #line 1787 "ripper.y"
6340  {
6341 #if 0
6342  (yyval.val) = NEW_COLON2(0, (yyval.val));
6343 #endif
6344  (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val));
6345 
6346  ;}
6347  break;
6348 
6349  case 112:
6350 #line 1795 "ripper.y"
6351  {
6352 #if 0
6353  (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6354 #endif
6355  (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6356 
6357  ;}
6358  break;
6359 
6360  case 116:
6361 #line 1808 "ripper.y"
6362  {
6364  (yyval.val) = (yyvsp[(1) - (1)].val);
6365  ;}
6366  break;
6367 
6368  case 117:
6369 #line 1813 "ripper.y"
6370  {
6372 #if 0
6373  (yyval.val) = (yyvsp[(1) - (1)].id);
6374 #endif
6375  (yyval.val) = (yyvsp[(1) - (1)].val);
6376 
6377  ;}
6378  break;
6379 
6380  case 120:
6381 #line 1828 "ripper.y"
6382  {
6383 #if 0
6384  (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val)));
6385 #endif
6386  (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val));
6387 
6388  ;}
6389  break;
6390 
6391  case 122:
6392 #line 1839 "ripper.y"
6393  {
6394 #if 0
6395  (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val));
6396 #endif
6397  (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
6398 
6399  ;}
6400  break;
6401 
6402  case 123:
6403 #line 1846 "ripper.y"
6404  {lex_state = EXPR_FNAME;;}
6405  break;
6406 
6407  case 124:
6408 #line 1847 "ripper.y"
6409  {
6410 #if 0
6411  (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val)));
6412 #endif
6413  rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
6414 
6415  ;}
6416  break;
6417 
6418  case 125:
6419 #line 1856 "ripper.y"
6420  { ifndef_ripper((yyval.val) = '|'); ;}
6421  break;
6422 
6423  case 126:
6424 #line 1857 "ripper.y"
6425  { ifndef_ripper((yyval.val) = '^'); ;}
6426  break;
6427 
6428  case 127:
6429 #line 1858 "ripper.y"
6430  { ifndef_ripper((yyval.val) = '&'); ;}
6431  break;
6432 
6433  case 128:
6434 #line 1859 "ripper.y"
6435  { ifndef_ripper((yyval.val) = tCMP); ;}
6436  break;
6437 
6438  case 129:
6439 #line 1860 "ripper.y"
6440  { ifndef_ripper((yyval.val) = tEQ); ;}
6441  break;
6442 
6443  case 130:
6444 #line 1861 "ripper.y"
6445  { ifndef_ripper((yyval.val) = tEQQ); ;}
6446  break;
6447 
6448  case 131:
6449 #line 1862 "ripper.y"
6450  { ifndef_ripper((yyval.val) = tMATCH); ;}
6451  break;
6452 
6453  case 132:
6454 #line 1863 "ripper.y"
6455  { ifndef_ripper((yyval.val) = tNMATCH); ;}
6456  break;
6457 
6458  case 133:
6459 #line 1864 "ripper.y"
6460  { ifndef_ripper((yyval.val) = '>'); ;}
6461  break;
6462 
6463  case 134:
6464 #line 1865 "ripper.y"
6465  { ifndef_ripper((yyval.val) = tGEQ); ;}
6466  break;
6467 
6468  case 135:
6469 #line 1866 "ripper.y"
6470  { ifndef_ripper((yyval.val) = '<'); ;}
6471  break;
6472 
6473  case 136:
6474 #line 1867 "ripper.y"
6475  { ifndef_ripper((yyval.val) = tLEQ); ;}
6476  break;
6477 
6478  case 137:
6479 #line 1868 "ripper.y"
6480  { ifndef_ripper((yyval.val) = tNEQ); ;}
6481  break;
6482 
6483  case 138:
6484 #line 1869 "ripper.y"
6485  { ifndef_ripper((yyval.val) = tLSHFT); ;}
6486  break;
6487 
6488  case 139:
6489 #line 1870 "ripper.y"
6490  { ifndef_ripper((yyval.val) = tRSHFT); ;}
6491  break;
6492 
6493  case 140:
6494 #line 1871 "ripper.y"
6495  { ifndef_ripper((yyval.val) = '+'); ;}
6496  break;
6497 
6498  case 141:
6499 #line 1872 "ripper.y"
6500  { ifndef_ripper((yyval.val) = '-'); ;}
6501  break;
6502 
6503  case 142:
6504 #line 1873 "ripper.y"
6505  { ifndef_ripper((yyval.val) = '*'); ;}
6506  break;
6507 
6508  case 143:
6509 #line 1874 "ripper.y"
6510  { ifndef_ripper((yyval.val) = '*'); ;}
6511  break;
6512 
6513  case 144:
6514 #line 1875 "ripper.y"
6515  { ifndef_ripper((yyval.val) = '/'); ;}
6516  break;
6517 
6518  case 145:
6519 #line 1876 "ripper.y"
6520  { ifndef_ripper((yyval.val) = '%'); ;}
6521  break;
6522 
6523  case 146:
6524 #line 1877 "ripper.y"
6525  { ifndef_ripper((yyval.val) = tPOW); ;}
6526  break;
6527 
6528  case 147:
6529 #line 1878 "ripper.y"
6530  { ifndef_ripper((yyval.val) = '!'); ;}
6531  break;
6532 
6533  case 148:
6534 #line 1879 "ripper.y"
6535  { ifndef_ripper((yyval.val) = '~'); ;}
6536  break;
6537 
6538  case 149:
6539 #line 1880 "ripper.y"
6540  { ifndef_ripper((yyval.val) = tUPLUS); ;}
6541  break;
6542 
6543  case 150:
6544 #line 1881 "ripper.y"
6545  { ifndef_ripper((yyval.val) = tUMINUS); ;}
6546  break;
6547 
6548  case 151:
6549 #line 1882 "ripper.y"
6550  { ifndef_ripper((yyval.val) = tAREF); ;}
6551  break;
6552 
6553  case 152:
6554 #line 1883 "ripper.y"
6555  { ifndef_ripper((yyval.val) = tASET); ;}
6556  break;
6557 
6558  case 153:
6559 #line 1884 "ripper.y"
6560  { ifndef_ripper((yyval.val) = '`'); ;}
6561  break;
6562 
6563  case 195:
6564 #line 1902 "ripper.y"
6565  {
6566 #if 0
6567  value_expr((yyvsp[(3) - (3)].val));
6568  (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6569 #endif
6570  (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6571 
6572  ;}
6573  break;
6574 
6575  case 196:
6576 #line 1911 "ripper.y"
6577  {
6578 #if 0
6579  value_expr((yyvsp[(3) - (5)].val));
6580  (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0);
6581  (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
6582 #endif
6583  (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)));
6584 
6585  ;}
6586  break;
6587 
6588  case 197:
6589 #line 1921 "ripper.y"
6590  {
6591 #if 0
6592  value_expr((yyvsp[(3) - (3)].val));
6593  if ((yyvsp[(1) - (3)].val)) {
6594  ID vid = (yyvsp[(1) - (3)].val)->nd_vid;
6595  if ((yyvsp[(2) - (3)].val) == tOROP) {
6596  (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
6597  (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val));
6598  if (is_asgn_or_id(vid)) {
6599  (yyval.val)->nd_aid = vid;
6600  }
6601  }
6602  else if ((yyvsp[(2) - (3)].val) == tANDOP) {
6603  (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
6604  (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val));
6605  }
6606  else {
6607  (yyval.val) = (yyvsp[(1) - (3)].val);
6608  (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val)));
6609  }
6610  }
6611  else {
6612  (yyval.val) = NEW_BEGIN(0);
6613  }
6614 #endif
6615  (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
6616 
6617  ;}
6618  break;
6619 
6620  case 198:
6621 #line 1950 "ripper.y"
6622  {
6623 #if 0
6624  value_expr((yyvsp[(3) - (5)].val));
6625  (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0);
6626  if ((yyvsp[(1) - (5)].val)) {
6627  ID vid = (yyvsp[(1) - (5)].val)->nd_vid;
6628  if ((yyvsp[(2) - (5)].val) == tOROP) {
6629  (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val);
6630  (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].val));
6631  if (is_asgn_or_id(vid)) {
6632  (yyval.val)->nd_aid = vid;
6633  }
6634  }
6635  else if ((yyvsp[(2) - (5)].val) == tANDOP) {
6636  (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val);
6637  (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].val));
6638  }
6639  else {
6640  (yyval.val) = (yyvsp[(1) - (5)].val);
6641  (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].val), NEW_LIST((yyvsp[(3) - (5)].val)));
6642  }
6643  }
6644  else {
6645  (yyval.val) = NEW_BEGIN(0);
6646  }
6647 #endif
6648  (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val));
6649  (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val));
6650 
6651  ;}
6652  break;
6653 
6654  case 199:
6655 #line 1981 "ripper.y"
6656  {
6657 #if 0
6658  NODE *args;
6659 
6660  value_expr((yyvsp[(6) - (6)].val));
6661  if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY();
6662  if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) {
6663  args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
6664  }
6665  else {
6666  args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
6667  }
6668  if ((yyvsp[(5) - (6)].val) == tOROP) {
6669  (yyvsp[(5) - (6)].val) = 0;
6670  }
6671  else if ((yyvsp[(5) - (6)].val) == tANDOP) {
6672  (yyvsp[(5) - (6)].val) = 1;
6673  }
6674  (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args);
6675  fixpos((yyval.val), (yyvsp[(1) - (6)].val));
6676 #endif
6677  (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val)));
6678  (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
6679 
6680  ;}
6681  break;
6682 
6683  case 200:
6684 #line 2007 "ripper.y"
6685  {
6686 #if 0
6687  value_expr((yyvsp[(5) - (5)].val));
6688  if ((yyvsp[(4) - (5)].val) == tOROP) {
6689  (yyvsp[(4) - (5)].val) = 0;
6690  }
6691  else if ((yyvsp[(4) - (5)].val) == tANDOP) {
6692  (yyvsp[(4) - (5)].val) = 1;
6693  }
6694  (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
6695  fixpos((yyval.val), (yyvsp[(1) - (5)].val));
6696 #endif
6697  (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
6698  (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
6699 
6700  ;}
6701  break;
6702 
6703  case 201:
6704 #line 2024 "ripper.y"
6705  {
6706 #if 0
6707  value_expr((yyvsp[(5) - (5)].val));
6708  if ((yyvsp[(4) - (5)].val) == tOROP) {
6709  (yyvsp[(4) - (5)].val) = 0;
6710  }
6711  else if ((yyvsp[(4) - (5)].val) == tANDOP) {
6712  (yyvsp[(4) - (5)].val) = 1;
6713  }
6714  (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
6715  fixpos((yyval.val), (yyvsp[(1) - (5)].val));
6716 #endif
6717  (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
6718  (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
6719 
6720  ;}
6721  break;
6722 
6723  case 202:
6724 #line 2041 "ripper.y"
6725  {
6726 #if 0
6727  value_expr((yyvsp[(5) - (5)].val));
6728  if ((yyvsp[(4) - (5)].val) == tOROP) {
6729  (yyvsp[(4) - (5)].val) = 0;
6730  }
6731  else if ((yyvsp[(4) - (5)].val) == tANDOP) {
6732  (yyvsp[(4) - (5)].val) = 1;
6733  }
6734  (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
6735  fixpos((yyval.val), (yyvsp[(1) - (5)].val));
6736 #endif
6737  (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val));
6738  (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
6739 
6740  ;}
6741  break;
6742 
6743  case 203:
6744 #line 2058 "ripper.y"
6745  {
6746 #if 0
6747  yyerror("constant re-assignment");
6748  (yyval.val) = NEW_BEGIN(0);
6749 #endif
6750  (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
6751  (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
6752  (yyval.val) = dispatch1(assign_error, (yyval.val));
6753 
6754  ;}
6755  break;
6756 
6757  case 204:
6758 #line 2069 "ripper.y"
6759  {
6760 #if 0
6761  yyerror("constant re-assignment");
6762  (yyval.val) = NEW_BEGIN(0);
6763 #endif
6764  (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val));
6765  (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
6766  (yyval.val) = dispatch1(assign_error, (yyval.val));
6767 
6768  ;}
6769  break;
6770 
6771  case 205:
6772 #line 2080 "ripper.y"
6773  {
6774 #if 0
6775  rb_backref_error((yyvsp[(1) - (3)].val));
6776  (yyval.val) = NEW_BEGIN(0);
6777 #endif
6778  (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val));
6779  (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
6780  (yyval.val) = dispatch1(assign_error, (yyval.val));
6781 
6782  ;}
6783  break;
6784 
6785  case 206:
6786 #line 2091 "ripper.y"
6787  {
6788 #if 0
6789  value_expr((yyvsp[(1) - (3)].val));
6790  value_expr((yyvsp[(3) - (3)].val));
6791  (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6792  if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) &&
6793  nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) {
6795  }
6796 #endif
6797  (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6798 
6799  ;}
6800  break;
6801 
6802  case 207:
6803 #line 2105 "ripper.y"
6804  {
6805 #if 0
6806  value_expr((yyvsp[(1) - (3)].val));
6807  value_expr((yyvsp[(3) - (3)].val));
6808  (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6809  if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) &&
6810  nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) {
6812  }
6813 #endif
6814  (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
6815 
6816  ;}
6817  break;
6818 
6819  case 208:
6820 #line 2119 "ripper.y"
6821  {
6822 #if 0
6823  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val));
6824 #endif
6825  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val));
6826 
6827  ;}
6828  break;
6829 
6830  case 209:
6831 #line 2127 "ripper.y"
6832  {
6833 #if 0
6834  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val));
6835 #endif
6836  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val));
6837 
6838  ;}
6839  break;
6840 
6841  case 210:
6842 #line 2135 "ripper.y"
6843  {
6844 #if 0
6845  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val));
6846 #endif
6847  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val));
6848 
6849  ;}
6850  break;
6851 
6852  case 211:
6853 #line 2143 "ripper.y"
6854  {
6855 #if 0
6856  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val));
6857 #endif
6858  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val));
6859 
6860  ;}
6861  break;
6862 
6863  case 212:
6864 #line 2151 "ripper.y"
6865  {
6866 #if 0
6867  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val));
6868 #endif
6869  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val));
6870 
6871  ;}
6872  break;
6873 
6874  case 213:
6875 #line 2159 "ripper.y"
6876  {
6877 #if 0
6878  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val));
6879 #endif
6880  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val));
6881 
6882  ;}
6883  break;
6884 
6885  case 214:
6886 #line 2167 "ripper.y"
6887  {
6888 #if 0
6889  (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0);
6890 #endif
6891  (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val));
6892  (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val));
6893 
6894  ;}
6895  break;
6896 
6897  case 215:
6898 #line 2176 "ripper.y"
6899  {
6900 #if 0
6901  (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0);
6902 #endif
6903  (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val));
6904  (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val));
6905 
6906  ;}
6907  break;
6908 
6909  case 216:
6910 #line 2185 "ripper.y"
6911  {
6912 #if 0
6913  (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS);
6914 #endif
6915  (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val));
6916 
6917  ;}
6918  break;
6919 
6920  case 217:
6921 #line 2193 "ripper.y"
6922  {
6923 #if 0
6924  (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS);
6925 #endif
6926  (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
6927 
6928  ;}
6929  break;
6930 
6931  case 218:
6932 #line 2201 "ripper.y"
6933  {
6934 #if 0
6935  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val));
6936 #endif
6937  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val));
6938 
6939  ;}
6940  break;
6941 
6942  case 219:
6943 #line 2209 "ripper.y"
6944  {
6945 #if 0
6946  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val));
6947 #endif
6948  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val));
6949 
6950  ;}
6951  break;
6952 
6953  case 220:
6954 #line 2217 "ripper.y"
6955  {
6956 #if 0
6957  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val));
6958 #endif
6959  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val));
6960 
6961  ;}
6962  break;
6963 
6964  case 221:
6965 #line 2225 "ripper.y"
6966  {
6967 #if 0
6968  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val));
6969 #endif
6970  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val));
6971 
6972  ;}
6973  break;
6974 
6975  case 222:
6976 #line 2233 "ripper.y"
6977  {
6978 #if 0
6979  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val));
6980 #endif
6981  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val));
6982 
6983  ;}
6984  break;
6985 
6986  case 223:
6987 #line 2241 "ripper.y"
6988  {
6989 #if 0
6990  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val));
6991 #endif
6992  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val));
6993 
6994  ;}
6995  break;
6996 
6997  case 224:
6998 #line 2249 "ripper.y"
6999  {
7000 #if 0
7001  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val));
7002 #endif
7003  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val));
7004 
7005  ;}
7006  break;
7007 
7008  case 225:
7009 #line 2257 "ripper.y"
7010  {
7011 #if 0
7012  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val));
7013 #endif
7014  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val));
7015 
7016  ;}
7017  break;
7018 
7019  case 226:
7020 #line 2265 "ripper.y"
7021  {
7022 #if 0
7023  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val));
7024 #endif
7025  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val));
7026 
7027  ;}
7028  break;
7029 
7030  case 227:
7031 #line 2273 "ripper.y"
7032  {
7033 #if 0
7034  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val));
7035 #endif
7036  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val));
7037 
7038  ;}
7039  break;
7040 
7041  case 228:
7042 #line 2281 "ripper.y"
7043  {
7044 #if 0
7045  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val));
7046 #endif
7047  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val));
7048 
7049  ;}
7050  break;
7051 
7052  case 229:
7053 #line 2289 "ripper.y"
7054  {
7055 #if 0
7056  (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
7057  if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].val)->nd_lit) == T_REGEXP) {
7058  (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val));
7059  }
7060 #endif
7061  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val));
7062 
7063  ;}
7064  break;
7065 
7066  case 230:
7067 #line 2300 "ripper.y"
7068  {
7069 #if 0
7070  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val));
7071 #endif
7072  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val));
7073 
7074  ;}
7075  break;
7076 
7077  case 231:
7078 #line 2308 "ripper.y"
7079  {
7080 #if 0
7081  (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!');
7082 #endif
7083  (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val));
7084 
7085  ;}
7086  break;
7087 
7088  case 232:
7089 #line 2316 "ripper.y"
7090  {
7091 #if 0
7092  (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~');
7093 #endif
7094  (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val));
7095 
7096  ;}
7097  break;
7098 
7099  case 233:
7100 #line 2324 "ripper.y"
7101  {
7102 #if 0
7103  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val));
7104 #endif
7105  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val));
7106 
7107  ;}
7108  break;
7109 
7110  case 234:
7111 #line 2332 "ripper.y"
7112  {
7113 #if 0
7114  (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val));
7115 #endif
7116  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val));
7117 
7118  ;}
7119  break;
7120 
7121  case 235:
7122 #line 2340 "ripper.y"
7123  {
7124 #if 0
7125  (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
7126 #endif
7127  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val));
7128 
7129  ;}
7130  break;
7131 
7132  case 236:
7133 #line 2348 "ripper.y"
7134  {
7135 #if 0
7136  (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
7137 #endif
7138  (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val));
7139 
7140  ;}
7141  break;
7142 
7143  case 237:
7144 #line 2355 "ripper.y"
7145  {in_defined = 1;;}
7146  break;
7147 
7148  case 238:
7149 #line 2356 "ripper.y"
7150  {
7151 #if 0
7152  in_defined = 0;
7153  (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val));
7154 #endif
7155  in_defined = 0;
7156  (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val));
7157 
7158  ;}
7159  break;
7160 
7161  case 239:
7162 #line 2366 "ripper.y"
7163  {
7164 #if 0
7165  value_expr((yyvsp[(1) - (6)].val));
7166  (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
7167  fixpos((yyval.val), (yyvsp[(1) - (6)].val));
7168 #endif
7169  (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
7170 
7171  ;}
7172  break;
7173 
7174  case 240:
7175 #line 2376 "ripper.y"
7176  {
7177  (yyval.val) = (yyvsp[(1) - (1)].val);
7178  ;}
7179  break;
7180 
7181  case 241:
7182 #line 2382 "ripper.y"
7183  {
7184 #if 0
7185  value_expr((yyvsp[(1) - (1)].val));
7186  (yyval.val) = (yyvsp[(1) - (1)].val);
7187  if (!(yyval.val)) (yyval.val) = NEW_NIL();
7188 #endif
7189  (yyval.val) = (yyvsp[(1) - (1)].val);
7190 
7191  ;}
7192  break;
7193 
7194  case 243:
7195 #line 2395 "ripper.y"
7196  {
7197  (yyval.val) = (yyvsp[(1) - (2)].val);
7198  ;}
7199  break;
7200 
7201  case 244:
7202 #line 2399 "ripper.y"
7203  {
7204 #if 0
7205  (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val)));
7206 #endif
7207  (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
7208 
7209  ;}
7210  break;
7211 
7212  case 245:
7213 #line 2407 "ripper.y"
7214  {
7215 #if 0
7216  (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val)));
7217 #endif
7218  (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val));
7219 
7220  ;}
7221  break;
7222 
7223  case 246:
7224 #line 2417 "ripper.y"
7225  {
7226 #if 0
7227  (yyval.val) = (yyvsp[(2) - (3)].val);
7228 #endif
7229  (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val)));
7230 
7231  ;}
7232  break;
7233 
7234  case 251:
7235 #line 2433 "ripper.y"
7236  {
7237  (yyval.val) = (yyvsp[(1) - (2)].val);
7238  ;}
7239  break;
7240 
7241  case 252:
7242 #line 2437 "ripper.y"
7243  {
7244 #if 0
7245  (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val)));
7246 #endif
7247  (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
7248 
7249  ;}
7250  break;
7251 
7252  case 253:
7253 #line 2445 "ripper.y"
7254  {
7255 #if 0
7256  (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val)));
7257 #endif
7258  (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val));
7259 
7260  ;}
7261  break;
7262 
7263  case 254:
7264 #line 2455 "ripper.y"
7265  {
7266 #if 0
7267  value_expr((yyvsp[(1) - (1)].val));
7268  (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
7269 #endif
7270  (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val));
7271 
7272  ;}
7273  break;
7274 
7275  case 255:
7276 #line 2464 "ripper.y"
7277  {
7278 #if 0
7279  (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
7280 #endif
7281  (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
7282 
7283  ;}
7284  break;
7285 
7286  case 256:
7287 #line 2472 "ripper.y"
7288  {
7289 #if 0
7290  (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val)));
7291  (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val));
7292 #endif
7293  (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val));
7294  (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val));
7295 
7296  ;}
7297  break;
7298 
7299  case 257:
7300 #line 2482 "ripper.y"
7301  {
7302 #if 0
7303  (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val)));
7304  (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val));
7305 #endif
7306  (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val));
7307 
7308  ;}
7309  break;
7310 
7311  case 258:
7312 #line 2493 "ripper.y"
7313  {
7314  (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val));
7315  ;}
7316  break;
7317 
7318  case 259:
7319 #line 2499 "ripper.y"
7320  {
7321  (yyval.val) = cmdarg_stack;
7322  CMDARG_PUSH(1);
7323  ;}
7324  break;
7325 
7326  case 260:
7327 #line 2504 "ripper.y"
7328  {
7329  /* CMDARG_POP() */
7330  cmdarg_stack = (yyvsp[(1) - (2)].val);
7331  (yyval.val) = (yyvsp[(2) - (2)].val);
7332  ;}
7333  break;
7334 
7335  case 261:
7336 #line 2512 "ripper.y"
7337  {
7338 #if 0
7339  (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val));
7340 #endif
7341  (yyval.val) = (yyvsp[(2) - (2)].val);
7342 
7343  ;}
7344  break;
7345 
7346  case 262:
7347 #line 2522 "ripper.y"
7348  {
7349  (yyval.val) = (yyvsp[(2) - (2)].val);
7350  ;}
7351  break;
7352 
7353  case 263:
7354 #line 2526 "ripper.y"
7355  {
7356  (yyval.val) = 0;
7357  ;}
7358  break;
7359 
7360  case 264:
7361 #line 2532 "ripper.y"
7362  {
7363 #if 0
7364  (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
7365 #endif
7366  (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val));
7367 
7368  ;}
7369  break;
7370 
7371  case 265:
7372 #line 2540 "ripper.y"
7373  {
7374 #if 0
7375  (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val));
7376 #endif
7377  (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val));
7378 
7379  ;}
7380  break;
7381 
7382  case 266:
7383 #line 2548 "ripper.y"
7384  {
7385 #if 0
7386  NODE *n1;
7387  if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) {
7388  (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val));
7389  }
7390  else {
7391  (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
7392  }
7393 #endif
7394  (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
7395 
7396  ;}
7397  break;
7398 
7399  case 267:
7400 #line 2562 "ripper.y"
7401  {
7402 #if 0
7403  NODE *n1;
7404  if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) {
7405  (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val));
7406  }
7407  else {
7408  (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
7409  }
7410 #endif
7411  (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
7412 
7413  ;}
7414  break;
7415 
7416  case 268:
7417 #line 2578 "ripper.y"
7418  {
7419 #if 0
7420  NODE *n1;
7421  if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) {
7422  (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val));
7423  }
7424  else {
7425  (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
7426  }
7427 #endif
7428  (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
7429 
7430  ;}
7431  break;
7432 
7433  case 269:
7434 #line 2592 "ripper.y"
7435  {
7436 #if 0
7437  NODE *n1;
7438  if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY &&
7439  (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) {
7440  (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val));
7441  }
7442  else {
7443  (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
7444  }
7445 #endif
7446  (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val));
7447 
7448  ;}
7449  break;
7450 
7451  case 270:
7452 #line 2607 "ripper.y"
7453  {
7454 #if 0
7455  (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val));
7456 #endif
7457  (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val));
7458 
7459  ;}
7460  break;
7461 
7462  case 279:
7463 #line 2625 "ripper.y"
7464  {
7465 #if 0
7466  (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0);
7467 #endif
7468  (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new());
7469 
7470  ;}
7471  break;
7472 
7473  case 280:
7474 #line 2633 "ripper.y"
7475  {
7476 #if 0
7477  (yyval.num) = ruby_sourceline;
7478 #endif
7479 
7480  ;}
7481  break;
7482 
7483  case 281:
7484 #line 2641 "ripper.y"
7485  {
7486 #if 0
7487  if ((yyvsp[(3) - (4)].val) == NULL) {
7488  (yyval.val) = NEW_NIL();
7489  }
7490  else {
7491  if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE ||
7492  nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE)
7493  nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num));
7494  (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val));
7495  }
7496  nd_set_line((yyval.val), (yyvsp[(2) - (4)].num));
7497 #endif
7498  (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val));
7499 
7500  ;}
7501  break;
7502 
7503  case 282:
7504 #line 2657 "ripper.y"
7505  {lex_state = EXPR_ENDARG;;}
7506  break;
7507 
7508  case 283:
7509 #line 2658 "ripper.y"
7510  {
7511  rb_warning0("(...) interpreted as grouped expression");
7512 #if 0
7513  (yyval.val) = (yyvsp[(2) - (4)].val);
7514 #endif
7515  (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val));
7516 
7517  ;}
7518  break;
7519 
7520  case 284:
7521 #line 2667 "ripper.y"
7522  {
7523 #if 0
7524  (yyval.val) = (yyvsp[(2) - (3)].val);
7525 #endif
7526  (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val));
7527 
7528  ;}
7529  break;
7530 
7531  case 285:
7532 #line 2675 "ripper.y"
7533  {
7534 #if 0
7535  (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
7536 #endif
7537  (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
7538 
7539  ;}
7540  break;
7541 
7542  case 286:
7543 #line 2683 "ripper.y"
7544  {
7545 #if 0
7546  (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val));
7547 #endif
7548  (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val));
7549 
7550  ;}
7551  break;
7552 
7553  case 287:
7554 #line 2691 "ripper.y"
7555  {
7556 #if 0
7557  if ((yyvsp[(2) - (3)].val) == 0) {
7558  (yyval.val) = NEW_ZARRAY(); /* zero length array*/
7559  }
7560  else {
7561  (yyval.val) = (yyvsp[(2) - (3)].val);
7562  }
7563 #endif
7564  (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val)));
7565 
7566  ;}
7567  break;
7568 
7569  case 288:
7570 #line 2704 "ripper.y"
7571  {
7572 #if 0
7573  (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val));
7574 #endif
7575  (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val)));
7576 
7577  ;}
7578  break;
7579 
7580  case 289:
7581 #line 2712 "ripper.y"
7582  {
7583 #if 0
7584  (yyval.val) = NEW_RETURN(0);
7585 #endif
7586  (yyval.val) = dispatch0(return0);
7587 
7588  ;}
7589  break;
7590 
7591  case 290:
7592 #line 2720 "ripper.y"
7593  {
7594 #if 0
7595  (yyval.val) = new_yield((yyvsp[(3) - (4)].val));
7596 #endif
7597  (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val)));
7598 
7599  ;}
7600  break;
7601 
7602  case 291:
7603 #line 2728 "ripper.y"
7604  {
7605 #if 0
7606  (yyval.val) = NEW_YIELD(0, Qfalse);
7607 #endif
7608  (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new()));
7609 
7610  ;}
7611  break;
7612 
7613  case 292:
7614 #line 2736 "ripper.y"
7615  {
7616 #if 0
7617  (yyval.val) = NEW_YIELD(0, Qfalse);
7618 #endif
7619  (yyval.val) = dispatch0(yield0);
7620 
7621  ;}
7622  break;
7623 
7624  case 293:
7625 #line 2743 "ripper.y"
7626  {in_defined = 1;;}
7627  break;
7628 
7629  case 294:
7630 #line 2744 "ripper.y"
7631  {
7632 #if 0
7633  in_defined = 0;
7634  (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val));
7635 #endif
7636  in_defined = 0;
7637  (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val));
7638 
7639  ;}
7640  break;
7641 
7642  case 295:
7643 #line 2754 "ripper.y"
7644  {
7645 #if 0
7646  (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!');
7647 #endif
7648  (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val));
7649 
7650  ;}
7651  break;
7652 
7653  case 296:
7654 #line 2762 "ripper.y"
7655  {
7656 #if 0
7657  (yyval.val) = call_uni_op(cond(NEW_NIL()), '!');
7658 #endif
7659  (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil);
7660 
7661  ;}
7662  break;
7663 
7664  case 297:
7665 #line 2770 "ripper.y"
7666  {
7667 #if 0
7668  (yyvsp[(2) - (2)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].val), 0);
7669  (yyval.val) = (yyvsp[(2) - (2)].val);
7670  fixpos((yyvsp[(2) - (2)].val)->nd_iter, (yyvsp[(2) - (2)].val));
7671 #endif
7672  (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new());
7673  (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val));
7674 
7675  ;}
7676  break;
7677 
7678  case 299:
7679 #line 2782 "ripper.y"
7680  {
7681 #if 0
7682  block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val));
7683  (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val);
7684  (yyval.val) = (yyvsp[(2) - (2)].val);
7685  fixpos((yyval.val), (yyvsp[(1) - (2)].val));
7686 #endif
7687  (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
7688 
7689  ;}
7690  break;
7691 
7692  case 300:
7693 #line 2793 "ripper.y"
7694  {
7695  (yyval.val) = (yyvsp[(2) - (2)].val);
7696  ;}
7697  break;
7698 
7699  case 301:
7700 #line 2800 "ripper.y"
7701  {
7702 #if 0
7703  (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
7704  fixpos((yyval.val), (yyvsp[(2) - (6)].val));
7705 #endif
7706  (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val)));
7707 
7708  ;}
7709  break;
7710 
7711  case 302:
7712 #line 2812 "ripper.y"
7713  {
7714 #if 0
7715  (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
7716  fixpos((yyval.val), (yyvsp[(2) - (6)].val));
7717 #endif
7718  (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val)));
7719 
7720  ;}
7721  break;
7722 
7723  case 303:
7724 #line 2820 "ripper.y"
7725  {COND_PUSH(1);;}
7726  break;
7727 
7728  case 304:
7729 #line 2820 "ripper.y"
7730  {COND_POP();;}
7731  break;
7732 
7733  case 305:
7734 #line 2823 "ripper.y"
7735  {
7736 #if 0
7737  (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1);
7738  fixpos((yyval.val), (yyvsp[(3) - (7)].val));
7739 #endif
7740  (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val));
7741 
7742  ;}
7743  break;
7744 
7745  case 306:
7746 #line 2831 "ripper.y"
7747  {COND_PUSH(1);;}
7748  break;
7749 
7750  case 307:
7751 #line 2831 "ripper.y"
7752  {COND_POP();;}
7753  break;
7754 
7755  case 308:
7756 #line 2834 "ripper.y"
7757  {
7758 #if 0
7759  (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1);
7760  fixpos((yyval.val), (yyvsp[(3) - (7)].val));
7761 #endif
7762  (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val));
7763 
7764  ;}
7765  break;
7766 
7767  case 309:
7768 #line 2845 "ripper.y"
7769  {
7770 #if 0
7771  (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
7772  fixpos((yyval.val), (yyvsp[(2) - (5)].val));
7773 #endif
7774  (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
7775 
7776  ;}
7777  break;
7778 
7779  case 310:
7780 #line 2854 "ripper.y"
7781  {
7782 #if 0
7783  (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val));
7784 #endif
7785  (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val));
7786 
7787  ;}
7788  break;
7789 
7790  case 311:
7791 #line 2862 "ripper.y"
7792  {COND_PUSH(1);;}
7793  break;
7794 
7795  case 312:
7796 #line 2864 "ripper.y"
7797  {COND_POP();;}
7798  break;
7799 
7800  case 313:
7801 #line 2867 "ripper.y"
7802  {
7803 #if 0
7804  /*
7805  * for a, b, c in e
7806  * #=>
7807  * e.each{|*x| a, b, c = x
7808  *
7809  * for a in e
7810  * #=>
7811  * e.each{|x| a, = x}
7812  */
7813  ID id = internal_id();
7814  ID *tbl = ALLOC_N(ID, 2);
7815  NODE *m = NEW_ARGS_AUX(0, 0);
7816  NODE *args, *scope;
7817 
7818  if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) {
7819  /* if args.length == 1 && args[0].kind_of?(Array)
7820  * args = args[0]
7821  * end
7822  */
7823  NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1)));
7824  NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0)));
7825  m->nd_next = block_append(
7826  NEW_IF(
7828  NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0),
7829  rb_intern("=="), one),
7830  NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero),
7831  rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))),
7832  0),
7833  NEW_DASGN_CURR(id,
7834  NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)),
7835  0),
7836  node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id)));
7837 
7838  args = new_args(m, 0, id, 0, 0);
7839  }
7840  else {
7841  if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN ||
7842  nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN ||
7843  nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) {
7844  (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id);
7845  m->nd_plen = 1;
7846  m->nd_next = (yyvsp[(2) - (9)].val);
7847  args = new_args(m, 0, 0, 0, 0);
7848  }
7849  else {
7850  m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id));
7851  args = new_args(m, 0, id, 0, 0);
7852  }
7853  }
7854  scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args);
7855  tbl[0] = 1; tbl[1] = id;
7856  (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope);
7857  fixpos((yyval.val), (yyvsp[(2) - (9)].val));
7858 #endif
7859  (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val));
7860 
7861  ;}
7862  break;
7863 
7864  case 314:
7865 #line 2928 "ripper.y"
7866  {
7867  if (in_def || in_single)
7868  yyerror("class definition in method body");
7869  local_push(0);
7870 #if 0
7871  (yyval.num) = ruby_sourceline;
7872 #endif
7873 
7874  ;}
7875  break;
7876 
7877  case 315:
7878 #line 2939 "ripper.y"
7879  {
7880 #if 0
7881  (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val));
7882  nd_set_line((yyval.val), (yyvsp[(4) - (6)].num));
7883 #endif
7884  (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val));
7885 
7886  local_pop();
7887  ;}
7888  break;
7889 
7890  case 316:
7891 #line 2949 "ripper.y"
7892  {
7893  (yyval.num) = in_def;
7894  in_def = 0;
7895  ;}
7896  break;
7897 
7898  case 317:
7899 #line 2954 "ripper.y"
7900  {
7901  (yyval.num) = in_single;
7902  in_single = 0;
7903  local_push(0);
7904  ;}
7905  break;
7906 
7907  case 318:
7908 #line 2961 "ripper.y"
7909  {
7910 #if 0
7911  (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val));
7912  fixpos((yyval.val), (yyvsp[(3) - (8)].val));
7913 #endif
7914  (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val));
7915 
7916  local_pop();
7917  in_def = (yyvsp[(4) - (8)].num);
7918  in_single = (yyvsp[(6) - (8)].num);
7919  ;}
7920  break;
7921 
7922  case 319:
7923 #line 2973 "ripper.y"
7924  {
7925  if (in_def || in_single)
7926  yyerror("module definition in method body");
7927  local_push(0);
7928 #if 0
7929  (yyval.num) = ruby_sourceline;
7930 #endif
7931 
7932  ;}
7933  break;
7934 
7935  case 320:
7936 #line 2984 "ripper.y"
7937  {
7938 #if 0
7939  (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
7940  nd_set_line((yyval.val), (yyvsp[(3) - (5)].num));
7941 #endif
7942  (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
7943 
7944  local_pop();
7945  ;}
7946  break;
7947 
7948  case 321:
7949 #line 2994 "ripper.y"
7950  {
7951  (yyval.id) = cur_mid;
7952  cur_mid = (yyvsp[(2) - (2)].val);
7953  in_def++;
7954  local_push(0);
7955  ;}
7956  break;
7957 
7958  case 322:
7959 #line 3003 "ripper.y"
7960  {
7961 #if 0
7962  NODE *body = remove_begin((yyvsp[(5) - (6)].val));
7963  reduce_nodes(&body);
7964  (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE);
7965  nd_set_line((yyval.val), (yyvsp[(1) - (6)].num));
7966 #endif
7967  (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
7968 
7969  local_pop();
7970  in_def--;
7971  cur_mid = (yyvsp[(3) - (6)].id);
7972  ;}
7973  break;
7974 
7975  case 323:
7976 #line 3016 "ripper.y"
7977  {lex_state = EXPR_FNAME;;}
7978  break;
7979 
7980  case 324:
7981 #line 3017 "ripper.y"
7982  {
7983  in_single++;
7984  lex_state = EXPR_ENDFN; /* force for args */
7985  local_push(0);
7986  ;}
7987  break;
7988 
7989  case 325:
7990 #line 3025 "ripper.y"
7991  {
7992 #if 0
7993  NODE *body = remove_begin((yyvsp[(8) - (9)].val));
7994  reduce_nodes(&body);
7995  (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body);
7996  nd_set_line((yyval.val), (yyvsp[(1) - (9)].num));
7997 #endif
7998  (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val));
7999 
8000  local_pop();
8001  in_single--;
8002  ;}
8003  break;
8004 
8005  case 326:
8006 #line 3038 "ripper.y"
8007  {
8008 #if 0
8009  (yyval.val) = NEW_BREAK(0);
8010 #endif
8011  (yyval.val) = dispatch1(break, arg_new());
8012 
8013  ;}
8014  break;
8015 
8016  case 327:
8017 #line 3046 "ripper.y"
8018  {
8019 #if 0
8020  (yyval.val) = NEW_NEXT(0);
8021 #endif
8022  (yyval.val) = dispatch1(next, arg_new());
8023 
8024  ;}
8025  break;
8026 
8027  case 328:
8028 #line 3054 "ripper.y"
8029  {
8030 #if 0
8031  (yyval.val) = NEW_REDO();
8032 #endif
8033  (yyval.val) = dispatch0(redo);
8034 
8035  ;}
8036  break;
8037 
8038  case 329:
8039 #line 3062 "ripper.y"
8040  {
8041 #if 0
8042  (yyval.val) = NEW_RETRY();
8043 #endif
8044  (yyval.val) = dispatch0(retry);
8045 
8046  ;}
8047  break;
8048 
8049  case 330:
8050 #line 3072 "ripper.y"
8051  {
8052 #if 0
8053  value_expr((yyvsp[(1) - (1)].val));
8054  (yyval.val) = (yyvsp[(1) - (1)].val);
8055  if (!(yyval.val)) (yyval.val) = NEW_NIL();
8056 #endif
8057  (yyval.val) = (yyvsp[(1) - (1)].val);
8058 
8059  ;}
8060  break;
8061 
8062  case 331:
8063 #line 3084 "ripper.y"
8064  {
8065  token_info_push("begin");
8066  ;}
8067  break;
8068 
8069  case 332:
8070 #line 3090 "ripper.y"
8071  {
8072  token_info_push("if");
8073  ;}
8074  break;
8075 
8076  case 333:
8077 #line 3096 "ripper.y"
8078  {
8079  token_info_push("unless");
8080  ;}
8081  break;
8082 
8083  case 334:
8084 #line 3102 "ripper.y"
8085  {
8086  token_info_push("while");
8087  ;}
8088  break;
8089 
8090  case 335:
8091 #line 3108 "ripper.y"
8092  {
8093  token_info_push("until");
8094  ;}
8095  break;
8096 
8097  case 336:
8098 #line 3114 "ripper.y"
8099  {
8100  token_info_push("case");
8101  ;}
8102  break;
8103 
8104  case 337:
8105 #line 3120 "ripper.y"
8106  {
8107  token_info_push("for");
8108  ;}
8109  break;
8110 
8111  case 338:
8112 #line 3126 "ripper.y"
8113  {
8114  token_info_push("class");
8115  ;}
8116  break;
8117 
8118  case 339:
8119 #line 3132 "ripper.y"
8120  {
8121  token_info_push("module");
8122  ;}
8123  break;
8124 
8125  case 340:
8126 #line 3138 "ripper.y"
8127  {
8128  token_info_push("def");
8129 #if 0
8130  (yyval.num) = ruby_sourceline;
8131 #endif
8132 
8133  ;}
8134  break;
8135 
8136  case 341:
8137 #line 3148 "ripper.y"
8138  {
8139  token_info_pop("end");
8140  ;}
8141  break;
8142 
8143  case 342:
8144 #line 3156 "ripper.y"
8145  { (yyval.val) = Qnil; ;}
8146  break;
8147 
8148  case 344:
8149 #line 3162 "ripper.y"
8150  { (yyval.val) = (yyvsp[(2) - (2)].val); ;}
8151  break;
8152 
8153  case 345:
8154 #line 3169 "ripper.y"
8155  { (yyval.val) = Qnil; ;}
8156  break;
8157 
8158  case 348:
8159 #line 3178 "ripper.y"
8160  {
8161 #if 0
8162  (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
8163  fixpos((yyval.val), (yyvsp[(2) - (5)].val));
8164 #endif
8165  (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val)));
8166 
8167  ;}
8168  break;
8169 
8170  case 350:
8171 #line 3190 "ripper.y"
8172  {
8173 #if 0
8174  (yyval.val) = (yyvsp[(2) - (2)].val);
8175 #endif
8176  (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val));
8177 
8178  ;}
8179  break;
8180 
8181  case 353:
8182 #line 3204 "ripper.y"
8183  {
8184  (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
8185 #if 0
8186 #endif
8187  (yyval.val) = dispatch1(mlhs_paren, (yyval.val));
8188 
8189  ;}
8190  break;
8191 
8192  case 354:
8193 #line 3212 "ripper.y"
8194  {
8195 #if 0
8196  (yyval.val) = (yyvsp[(2) - (3)].val);
8197 #endif
8198  (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
8199 
8200  ;}
8201  break;
8202 
8203  case 355:
8204 #line 3222 "ripper.y"
8205  {
8206 #if 0
8207  (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
8208 #endif
8209  (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val));
8210 
8211  ;}
8212  break;
8213 
8214  case 356:
8215 #line 3230 "ripper.y"
8216  {
8217 #if 0
8218  (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
8219 #endif
8220  (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
8221 
8222  ;}
8223  break;
8224 
8225  case 357:
8226 #line 3240 "ripper.y"
8227  {
8228 #if 0
8229  (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0);
8230 #endif
8231  (yyval.val) = (yyvsp[(1) - (1)].val);
8232 
8233  ;}
8234  break;
8235 
8236  case 358:
8237 #line 3248 "ripper.y"
8238  {
8239  (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0);
8240 #if 0
8241  (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val));
8242 #endif
8243  (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val));
8244 
8245  ;}
8246  break;
8247 
8248  case 359:
8249 #line 3257 "ripper.y"
8250  {
8251  (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0);
8252 #if 0
8253  (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val)));
8254 #endif
8255  (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val));
8256 
8257  ;}
8258  break;
8259 
8260  case 360:
8261 #line 3266 "ripper.y"
8262  {
8263 #if 0
8264  (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1);
8265 #endif
8266  (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil);
8267 
8268  ;}
8269  break;
8270 
8271  case 361:
8272 #line 3274 "ripper.y"
8273  {
8274 #if 0
8275  (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val)));
8276 #endif
8277  (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val));
8278 
8279  ;}
8280  break;
8281 
8282  case 362:
8283 #line 3282 "ripper.y"
8284  {
8285  (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0);
8286 #if 0
8287  (yyval.val) = NEW_MASGN(0, (yyval.val));
8288 #endif
8289  (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val));
8290 
8291  ;}
8292  break;
8293 
8294  case 363:
8295 #line 3291 "ripper.y"
8296  {
8297  (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0);
8298 #if 0
8299  (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val)));
8300 #endif
8301  #if 0
8302  TODO: Check me
8303  #endif
8304  (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val));
8305 
8306  ;}
8307  break;
8308 
8309  case 364:
8310 #line 3303 "ripper.y"
8311  {
8312 #if 0
8313  (yyval.val) = NEW_MASGN(0, -1);
8314 #endif
8315  (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
8316 
8317  ;}
8318  break;
8319 
8320  case 365:
8321 #line 3311 "ripper.y"
8322  {
8323 #if 0
8324  (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val)));
8325 #endif
8326  (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
8327 
8328  ;}
8329  break;
8330 
8331  case 366:
8332 #line 3321 "ripper.y"
8333  {
8334 #if 0
8335  (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val));
8336 #endif
8337  (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val)));
8338 
8339  ;}
8340  break;
8341 
8342  case 367:
8343 #line 3329 "ripper.y"
8344  {
8345 #if 0
8346  (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val));
8347 #endif
8348  (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val)));
8349 
8350  ;}
8351  break;
8352 
8353  case 368:
8354 #line 3337 "ripper.y"
8355  {
8356 #if 0
8357  (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val));
8358 #endif
8359  (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
8360 
8361  ;}
8362  break;
8363 
8364  case 369:
8365 #line 3345 "ripper.y"
8366  {
8367 #if 0
8368  (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
8369 #endif
8370  (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
8371 
8372  ;}
8373  break;
8374 
8375  case 370:
8376 #line 3353 "ripper.y"
8377  {
8378 #if 0
8379  (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
8380 #endif
8381  (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
8382 
8383  ;}
8384  break;
8385 
8386  case 371:
8387 #line 3361 "ripper.y"
8388  {
8389 #if 0
8390  (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 1, 0, 0);
8391 #endif
8392  (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil, Qnil);
8393  dispatch1(excessed_comma, (yyval.val));
8394 
8395  ;}
8396  break;
8397 
8398  case 372:
8399 #line 3370 "ripper.y"
8400  {
8401 #if 0
8402  (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
8403 #endif
8404  (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
8405 
8406  ;}
8407  break;
8408 
8409  case 373:
8410 #line 3378 "ripper.y"
8411  {
8412 #if 0
8413  (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val));
8414 #endif
8415  (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil,Qnil, Qnil, escape_Qundef((yyvsp[(2) - (2)].val)));
8416 
8417  ;}
8418  break;
8419 
8420  case 374:
8421 #line 3386 "ripper.y"
8422  {
8423 #if 0
8424  (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
8425 #endif
8426  (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
8427 
8428  ;}
8429  break;
8430 
8431  case 375:
8432 #line 3394 "ripper.y"
8433  {
8434 #if 0
8435  (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
8436 #endif
8437  (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
8438 
8439  ;}
8440  break;
8441 
8442  case 376:
8443 #line 3402 "ripper.y"
8444  {
8445 #if 0
8446  (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val));
8447 #endif
8448  (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
8449 
8450  ;}
8451  break;
8452 
8453  case 377:
8454 #line 3410 "ripper.y"
8455  {
8456 #if 0
8457  (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
8458 #endif
8459  (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
8460 
8461  ;}
8462  break;
8463 
8464  case 378:
8465 #line 3418 "ripper.y"
8466  {
8467 #if 0
8468  (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val));
8469 #endif
8470  (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil, escape_Qundef((yyvsp[(2) - (2)].val)));
8471 
8472  ;}
8473  break;
8474 
8475  case 379:
8476 #line 3426 "ripper.y"
8477  {
8478 #if 0
8479  (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
8480 #endif
8481  (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
8482 
8483  ;}
8484  break;
8485 
8486  case 380:
8487 #line 3434 "ripper.y"
8488  {
8489 #if 0
8490  (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val));
8491 #endif
8492  (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val));
8493 
8494  ;}
8495  break;
8496 
8497  case 382:
8498 #line 3445 "ripper.y"
8499  {
8500  command_start = TRUE;
8501  ;}
8502  break;
8503 
8504  case 383:
8505 #line 3451 "ripper.y"
8506  {
8507 #if 0
8508  (yyval.val) = 0;
8509 #endif
8510  (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
8511  escape_Qundef((yyvsp[(2) - (3)].val)));
8512 
8513  ;}
8514  break;
8515 
8516  case 384:
8517 #line 3460 "ripper.y"
8518  {
8519 #if 0
8520  (yyval.val) = 0;
8521 #endif
8522  (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
8523  Qnil);
8524 
8525  ;}
8526  break;
8527 
8528  case 385:
8529 #line 3469 "ripper.y"
8530  {
8531 #if 0
8532  (yyval.val) = (yyvsp[(2) - (4)].val);
8533 #endif
8534  (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val)));
8535 
8536  ;}
8537  break;
8538 
8539  case 387:
8540 #line 3481 "ripper.y"
8541  {
8542 #if 0
8543  (yyval.val) = 0;
8544 #endif
8545  (yyval.val) = (yyvsp[(2) - (2)].val);
8546 
8547  ;}
8548  break;
8549 
8550  case 388:
8551 #line 3493 "ripper.y"
8552  {
8553  (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
8554  ;}
8555  break;
8556 
8557  case 389:
8558 #line 3500 "ripper.y"
8559  {
8560  rb_ary_push((yyval.val), (yyvsp[(3) - (3)].val));
8561  ;}
8562  break;
8563 
8564  case 390:
8565 #line 3507 "ripper.y"
8566  {
8567  new_bv(get_id((yyvsp[(1) - (1)].val)));
8568 #if 0
8569 #endif
8570  (yyval.val) = get_value((yyvsp[(1) - (1)].val));
8571 
8572  ;}
8573  break;
8574 
8575  case 391:
8576 #line 3515 "ripper.y"
8577  {
8578  (yyval.val) = 0;
8579  ;}
8580  break;
8581 
8582  case 392:
8583 #line 3520 "ripper.y"
8584  {
8585  (yyval.vars) = dyna_push();
8586  ;}
8587  break;
8588 
8589  case 393:
8590 #line 3523 "ripper.y"
8591  {
8592  (yyval.num) = lpar_beg;
8593  lpar_beg = ++paren_nest;
8594  ;}
8595  break;
8596 
8597  case 394:
8598 #line 3529 "ripper.y"
8599  {
8600  lpar_beg = (yyvsp[(2) - (4)].num);
8601 #if 0
8602  (yyval.val) = (yyvsp[(3) - (4)].val);
8603  (yyval.val)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].val)->nd_head, (yyvsp[(4) - (4)].val));
8604 #endif
8605  (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
8606 
8607  dyna_pop((yyvsp[(1) - (4)].vars));
8608  ;}
8609  break;
8610 
8611  case 395:
8612 #line 3542 "ripper.y"
8613  {
8614 #if 0
8615  (yyval.val) = NEW_LAMBDA((yyvsp[(2) - (4)].val));
8616 #endif
8617  (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val));
8618 
8619  ;}
8620  break;
8621 
8622  case 396:
8623 #line 3550 "ripper.y"
8624  {
8625 #if 0
8626  (yyval.val) = NEW_LAMBDA((yyvsp[(1) - (1)].val));
8627 #endif
8628  (yyval.val) = (yyvsp[(1) - (1)].val);
8629 
8630  ;}
8631  break;
8632 
8633  case 397:
8634 #line 3560 "ripper.y"
8635  {
8636  (yyval.val) = (yyvsp[(2) - (3)].val);
8637  ;}
8638  break;
8639 
8640  case 398:
8641 #line 3564 "ripper.y"
8642  {
8643  (yyval.val) = (yyvsp[(2) - (3)].val);
8644  ;}
8645  break;
8646 
8647  case 399:
8648 #line 3570 "ripper.y"
8649  {
8650  (yyvsp[(1) - (1)].vars) = dyna_push();
8651 #if 0
8652  (yyval.num) = ruby_sourceline;
8653 #endif
8654  ;}
8655  break;
8656 
8657  case 400:
8658 #line 3579 "ripper.y"
8659  {
8660 #if 0
8661  (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
8662  nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
8663 #endif
8664  (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
8665 
8666  dyna_pop((yyvsp[(1) - (5)].vars));
8667  ;}
8668  break;
8669 
8670  case 401:
8671 #line 3591 "ripper.y"
8672  {
8673 #if 0
8674  if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) {
8675  compile_error(PARSER_ARG "block given to yield");
8676  }
8677  else {
8678  block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val));
8679  }
8680  (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val);
8681  (yyval.val) = (yyvsp[(2) - (2)].val);
8682  fixpos((yyval.val), (yyvsp[(1) - (2)].val));
8683 #endif
8684  (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
8685 
8686  ;}
8687  break;
8688 
8689  case 402:
8690 #line 3607 "ripper.y"
8691  {
8692 #if 0
8693  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
8694 #endif
8695  (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
8696  (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
8697 
8698  ;}
8699  break;
8700 
8701  case 403:
8702 #line 3616 "ripper.y"
8703  {
8704 #if 0
8705  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
8706 #endif
8707  (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val));
8708  (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
8709 
8710  ;}
8711  break;
8712 
8713  case 404:
8714 #line 3627 "ripper.y"
8715  {
8716 #if 0
8717  (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
8718  fixpos((yyval.val), (yyvsp[(2) - (2)].val));
8719 #endif
8720  (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val));
8721 
8722  ;}
8723  break;
8724 
8725  case 405:
8726 #line 3636 "ripper.y"
8727  {
8728 #if 0
8729  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
8730  fixpos((yyval.val), (yyvsp[(1) - (4)].val));
8731 #endif
8732  (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
8733  (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
8734 
8735  ;}
8736  break;
8737 
8738  case 406:
8739 #line 3646 "ripper.y"
8740  {
8741 #if 0
8742  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
8743  fixpos((yyval.val), (yyvsp[(1) - (4)].val));
8744 #endif
8745  (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
8746  (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
8747 
8748  ;}
8749  break;
8750 
8751  case 407:
8752 #line 3656 "ripper.y"
8753  {
8754 #if 0
8755  (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0);
8756 #endif
8757  (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val));
8758 
8759  ;}
8760  break;
8761 
8762  case 408:
8763 #line 3664 "ripper.y"
8764  {
8765 #if 0
8766  (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val));
8767  fixpos((yyval.val), (yyvsp[(1) - (3)].val));
8768 #endif
8769  (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_id2sym('.'),
8770  ripper_intern("call"));
8771  (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val));
8772 
8773  ;}
8774  break;
8775 
8776  case 409:
8777 #line 3675 "ripper.y"
8778  {
8779 #if 0
8780  (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val));
8781  fixpos((yyval.val), (yyvsp[(1) - (3)].val));
8782 #endif
8783  (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"),
8784  ripper_intern("call"));
8785  (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val));
8786 
8787  ;}
8788  break;
8789 
8790  case 410:
8791 #line 3686 "ripper.y"
8792  {
8793 #if 0
8794  (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val));
8795 #endif
8796  (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val));
8797 
8798  ;}
8799  break;
8800 
8801  case 411:
8802 #line 3694 "ripper.y"
8803  {
8804 #if 0
8805  (yyval.val) = NEW_ZSUPER();
8806 #endif
8807  (yyval.val) = dispatch0(zsuper);
8808 
8809  ;}
8810  break;
8811 
8812  case 412:
8813 #line 3702 "ripper.y"
8814  {
8815 #if 0
8816  if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF)
8817  (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val));
8818  else
8819  (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val));
8820  fixpos((yyval.val), (yyvsp[(1) - (4)].val));
8821 #endif
8822  (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
8823 
8824  ;}
8825  break;
8826 
8827  case 413:
8828 #line 3716 "ripper.y"
8829  {
8830  (yyvsp[(1) - (1)].vars) = dyna_push();
8831 #if 0
8832  (yyval.num) = ruby_sourceline;
8833 #endif
8834 
8835  ;}
8836  break;
8837 
8838  case 414:
8839 #line 3725 "ripper.y"
8840  {
8841 #if 0
8842  (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
8843  nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
8844 #endif
8845  (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
8846 
8847  dyna_pop((yyvsp[(1) - (5)].vars));
8848  ;}
8849  break;
8850 
8851  case 415:
8852 #line 3735 "ripper.y"
8853  {
8854  (yyvsp[(1) - (1)].vars) = dyna_push();
8855 #if 0
8856  (yyval.num) = ruby_sourceline;
8857 #endif
8858 
8859  ;}
8860  break;
8861 
8862  case 416:
8863 #line 3744 "ripper.y"
8864  {
8865 #if 0
8866  (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
8867  nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
8868 #endif
8869  (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
8870 
8871  dyna_pop((yyvsp[(1) - (5)].vars));
8872  ;}
8873  break;
8874 
8875  case 417:
8876 #line 3758 "ripper.y"
8877  {
8878 #if 0
8879  (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
8880 #endif
8881  (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val)));
8882 
8883  ;}
8884  break;
8885 
8886  case 420:
8887 #line 3774 "ripper.y"
8888  {
8889 #if 0
8890  if ((yyvsp[(3) - (6)].val)) {
8891  (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO());
8892  (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val));
8893  }
8894  (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
8895  fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val));
8896 #endif
8897  (yyval.val) = dispatch4(rescue,
8898  escape_Qundef((yyvsp[(2) - (6)].val)),
8899  escape_Qundef((yyvsp[(3) - (6)].val)),
8900  escape_Qundef((yyvsp[(5) - (6)].val)),
8901  escape_Qundef((yyvsp[(6) - (6)].val)));
8902 
8903  ;}
8904  break;
8905 
8906  case 422:
8907 #line 3794 "ripper.y"
8908  {
8909 #if 0
8910  (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
8911 #endif
8912  (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
8913 
8914  ;}
8915  break;
8916 
8917  case 423:
8918 #line 3802 "ripper.y"
8919  {
8920 #if 0
8921  if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val);
8922 #endif
8923  (yyval.val) = (yyvsp[(1) - (1)].val);
8924 
8925  ;}
8926  break;
8927 
8928  case 425:
8929 #line 3813 "ripper.y"
8930  {
8931  (yyval.val) = (yyvsp[(2) - (2)].val);
8932  ;}
8933  break;
8934 
8935  case 427:
8936 #line 3820 "ripper.y"
8937  {
8938 #if 0
8939  (yyval.val) = (yyvsp[(2) - (2)].val);
8940 #endif
8941  (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val));
8942 
8943  ;}
8944  break;
8945 
8946  case 430:
8947 #line 3832 "ripper.y"
8948  {
8949 #if 0
8950  (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val)));
8951 #endif
8952  (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val));
8953 
8954  ;}
8955  break;
8956 
8957  case 432:
8958 #line 3843 "ripper.y"
8959  {
8960 #if 0
8961  NODE *node = (yyvsp[(1) - (1)].val);
8962  if (!node) {
8963  node = NEW_STR(STR_NEW0());
8964  }
8965  else {
8966  node = evstr2dstr(node);
8967  }
8968  (yyval.val) = node;
8969 #endif
8970  (yyval.val) = (yyvsp[(1) - (1)].val);
8971 
8972  ;}
8973  break;
8974 
8975  case 435:
8976 #line 3862 "ripper.y"
8977  {
8978 #if 0
8979  (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
8980 #endif
8981  (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
8982 
8983  ;}
8984  break;
8985 
8986  case 436:
8987 #line 3872 "ripper.y"
8988  {
8989 #if 0
8990  (yyval.val) = (yyvsp[(2) - (3)].val);
8991 #endif
8992  (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val));
8993 
8994  ;}
8995  break;
8996 
8997  case 437:
8998 #line 3882 "ripper.y"
8999  {
9000 #if 0
9001  NODE *node = (yyvsp[(2) - (3)].val);
9002  if (!node) {
9003  node = NEW_XSTR(STR_NEW0());
9004  }
9005  else {
9006  switch (nd_type(node)) {
9007  case NODE_STR:
9008  nd_set_type(node, NODE_XSTR);
9009  break;
9010  case NODE_DSTR:
9011  nd_set_type(node, NODE_DXSTR);
9012  break;
9013  default:
9014  node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node));
9015  break;
9016  }
9017  }
9018  (yyval.val) = node;
9019 #endif
9020  (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val));
9021 
9022  ;}
9023  break;
9024 
9025  case 438:
9026 #line 3909 "ripper.y"
9027  {
9028 #if 0
9029  int options = (yyvsp[(3) - (3)].val);
9030  NODE *node = (yyvsp[(2) - (3)].val);
9031  NODE *list, *prev;
9032  if (!node) {
9033  node = NEW_LIT(reg_compile(STR_NEW0(), options));
9034  }
9035  else switch (nd_type(node)) {
9036  case NODE_STR:
9037  {
9038  VALUE src = node->nd_lit;
9039  nd_set_type(node, NODE_LIT);
9040  node->nd_lit = reg_compile(src, options);
9041  }
9042  break;
9043  default:
9044  node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node));
9045  case NODE_DSTR:
9046  if (options & RE_OPTION_ONCE) {
9048  }
9049  else {
9050  nd_set_type(node, NODE_DREGX);
9051  }
9052  node->nd_cflag = options & RE_OPTION_MASK;
9053  if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options);
9054  for (list = (prev = node)->nd_next; list; list = list->nd_next) {
9055  if (nd_type(list->nd_head) == NODE_STR) {
9056  VALUE tail = list->nd_head->nd_lit;
9057  if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) {
9058  VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
9059  if (!literal_concat0(parser, lit, tail)) {
9060  node = 0;
9061  break;
9062  }
9063  rb_str_resize(tail, 0);
9064  prev->nd_next = list->nd_next;
9065  rb_gc_force_recycle((VALUE)list->nd_head);
9066  rb_gc_force_recycle((VALUE)list);
9067  list = prev;
9068  }
9069  else {
9070  prev = list;
9071  }
9072  }
9073  else {
9074  prev = 0;
9075  }
9076  }
9077  if (!node->nd_next) {
9078  VALUE src = node->nd_lit;
9079  nd_set_type(node, NODE_LIT);
9080  node->nd_lit = reg_compile(src, options);
9081  }
9082  break;
9083  }
9084  (yyval.val) = node;
9085 #endif
9086  (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
9087 
9088  ;}
9089  break;
9090 
9091  case 439:
9092 #line 3974 "ripper.y"
9093  {
9094 #if 0
9095  (yyval.val) = NEW_ZARRAY();
9096 #endif
9097  (yyval.val) = dispatch0(words_new);
9098  (yyval.val) = dispatch1(array, (yyval.val));
9099 
9100  ;}
9101  break;
9102 
9103  case 440:
9104 #line 3983 "ripper.y"
9105  {
9106 #if 0
9107  (yyval.val) = (yyvsp[(2) - (3)].val);
9108 #endif
9109  (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val));
9110 
9111  ;}
9112  break;
9113 
9114  case 441:
9115 #line 3993 "ripper.y"
9116  {
9117 #if 0
9118  (yyval.val) = 0;
9119 #endif
9120  (yyval.val) = dispatch0(words_new);
9121 
9122  ;}
9123  break;
9124 
9125  case 442:
9126 #line 4001 "ripper.y"
9127  {
9128 #if 0
9129  (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val)));
9130 #endif
9131  (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
9132 
9133  ;}
9134  break;
9135 
9136  case 443:
9137 #line 4013 "ripper.y"
9138  {
9139  (yyval.val) = dispatch0(word_new);
9140  (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val));
9141  ;}
9142  break;
9143 
9144  case 444:
9145 #line 4019 "ripper.y"
9146  {
9147 #if 0
9148  (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
9149 #endif
9150  (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
9151 
9152  ;}
9153  break;
9154 
9155  case 445:
9156 #line 4029 "ripper.y"
9157  {
9158 #if 0
9159  (yyval.val) = NEW_ZARRAY();
9160 #endif
9161  (yyval.val) = dispatch0(qwords_new);
9162  (yyval.val) = dispatch1(array, (yyval.val));
9163 
9164  ;}
9165  break;
9166 
9167  case 446:
9168 #line 4038 "ripper.y"
9169  {
9170 #if 0
9171  (yyval.val) = (yyvsp[(2) - (3)].val);
9172 #endif
9173  (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val));
9174 
9175  ;}
9176  break;
9177 
9178  case 447:
9179 #line 4048 "ripper.y"
9180  {
9181 #if 0
9182  (yyval.val) = 0;
9183 #endif
9184  (yyval.val) = dispatch0(qwords_new);
9185 
9186  ;}
9187  break;
9188 
9189  case 448:
9190 #line 4056 "ripper.y"
9191  {
9192 #if 0
9193  (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
9194 #endif
9195  (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
9196 
9197  ;}
9198  break;
9199 
9200  case 449:
9201 #line 4066 "ripper.y"
9202  {
9203 #if 0
9204  (yyval.val) = 0;
9205 #endif
9206  (yyval.val) = dispatch0(string_content);
9207 
9208  ;}
9209  break;
9210 
9211  case 450:
9212 #line 4074 "ripper.y"
9213  {
9214 #if 0
9215  (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
9216 #endif
9217  (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
9218 
9219  ;}
9220  break;
9221 
9222  case 451:
9223 #line 4084 "ripper.y"
9224  {
9225 #if 0
9226  (yyval.val) = 0;
9227 #endif
9228  (yyval.val) = dispatch0(xstring_new);
9229 
9230  ;}
9231  break;
9232 
9233  case 452:
9234 #line 4092 "ripper.y"
9235  {
9236 #if 0
9237  (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
9238 #endif
9239  (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
9240 
9241  ;}
9242  break;
9243 
9244  case 453:
9245 #line 4102 "ripper.y"
9246  {
9247 #if 0
9248  (yyval.val) = 0;
9249 #endif
9250  (yyval.val) = dispatch0(regexp_new);
9251 
9252  ;}
9253  break;
9254 
9255  case 454:
9256 #line 4110 "ripper.y"
9257  {
9258 #if 0
9259  NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val);
9260  if (!head) {
9261  (yyval.val) = tail;
9262  }
9263  else if (!tail) {
9264  (yyval.val) = head;
9265  }
9266  else {
9267  switch (nd_type(head)) {
9268  case NODE_STR:
9269  nd_set_type(head, NODE_DSTR);
9270  break;
9271  case NODE_DSTR:
9272  break;
9273  default:
9274  head = list_append(NEW_DSTR(Qnil), head);
9275  break;
9276  }
9277  (yyval.val) = list_append(head, tail);
9278  }
9279 #endif
9280  (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
9281 
9282  ;}
9283  break;
9284 
9285  case 456:
9286 #line 4140 "ripper.y"
9287  {
9288  (yyval.node) = lex_strterm;
9289  lex_strterm = 0;
9290  lex_state = EXPR_BEG;
9291  ;}
9292  break;
9293 
9294  case 457:
9295 #line 4146 "ripper.y"
9296  {
9297 #if 0
9298  lex_strterm = (yyvsp[(2) - (3)].node);
9299  (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val));
9300 #endif
9301  lex_strterm = (yyvsp[(2) - (3)].node);
9302  (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val));
9303 
9304  ;}
9305  break;
9306 
9307  case 458:
9308 #line 4156 "ripper.y"
9309  {
9310  (yyvsp[(1) - (1)].val) = cond_stack;
9311  (yyval.val) = cmdarg_stack;
9312  cond_stack = 0;
9313  cmdarg_stack = 0;
9314  ;}
9315  break;
9316 
9317  case 459:
9318 #line 4162 "ripper.y"
9319  {
9320  (yyval.node) = lex_strterm;
9321  lex_strterm = 0;
9322  lex_state = EXPR_BEG;
9323  ;}
9324  break;
9325 
9326  case 460:
9327 #line 4168 "ripper.y"
9328  {
9329  cond_stack = (yyvsp[(1) - (5)].val);
9330  cmdarg_stack = (yyvsp[(2) - (5)].val);
9331  lex_strterm = (yyvsp[(3) - (5)].node);
9332 #if 0
9333  if ((yyvsp[(4) - (5)].val)) (yyvsp[(4) - (5)].val)->flags &= ~NODE_FL_NEWLINE;
9334  (yyval.val) = new_evstr((yyvsp[(4) - (5)].val));
9335 #endif
9336  (yyval.val) = dispatch1(string_embexpr, (yyvsp[(4) - (5)].val));
9337 
9338  ;}
9339  break;
9340 
9341  case 461:
9342 #line 4182 "ripper.y"
9343  {
9344 #if 0
9345  (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val));
9346 #endif
9347  (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
9348 
9349  ;}
9350  break;
9351 
9352  case 462:
9353 #line 4190 "ripper.y"
9354  {
9355 #if 0
9356  (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val));
9357 #endif
9358  (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
9359 
9360  ;}
9361  break;
9362 
9363  case 463:
9364 #line 4198 "ripper.y"
9365  {
9366 #if 0
9367  (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val));
9368 #endif
9369  (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
9370 
9371  ;}
9372  break;
9373 
9374  case 465:
9375 #line 4209 "ripper.y"
9376  {
9377  lex_state = EXPR_END;
9378 #if 0
9379  (yyval.val) = (yyvsp[(2) - (2)].val);
9380 #endif
9381  (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val));
9382 
9383  ;}
9384  break;
9385 
9386  case 470:
9387 #line 4226 "ripper.y"
9388  {
9389  lex_state = EXPR_END;
9390 #if 0
9391  if (!((yyval.val) = (yyvsp[(2) - (3)].val))) {
9392  (yyval.val) = NEW_LIT(ID2SYM(rb_intern("")));
9393  }
9394  else {
9395  VALUE lit;
9396 
9397  switch (nd_type((yyval.val))) {
9398  case NODE_DSTR:
9399  nd_set_type((yyval.val), NODE_DSYM);
9400  break;
9401  case NODE_STR:
9402  lit = (yyval.val)->nd_lit;
9403  (yyval.val)->nd_lit = ID2SYM(rb_intern_str(lit));
9404  nd_set_type((yyval.val), NODE_LIT);
9405  break;
9406  default:
9407  (yyval.val) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.val)));
9408  break;
9409  }
9410  }
9411 #endif
9412  (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val));
9413 
9414  ;}
9415  break;
9416 
9417  case 473:
9418 #line 4258 "ripper.y"
9419  {
9420 #if 0
9421  (yyval.val) = negate_lit((yyvsp[(2) - (2)].val));
9422 #endif
9423  (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
9424 
9425  ;}
9426  break;
9427 
9428  case 474:
9429 #line 4266 "ripper.y"
9430  {
9431 #if 0
9432  (yyval.val) = negate_lit((yyvsp[(2) - (2)].val));
9433 #endif
9434  (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
9435 
9436  ;}
9437  break;
9438 
9439  case 480:
9440 #line 4282 "ripper.y"
9441  {ifndef_ripper((yyval.val) = keyword_nil);;}
9442  break;
9443 
9444  case 481:
9445 #line 4283 "ripper.y"
9446  {ifndef_ripper((yyval.val) = keyword_self);;}
9447  break;
9448 
9449  case 482:
9450 #line 4284 "ripper.y"
9451  {ifndef_ripper((yyval.val) = keyword_true);;}
9452  break;
9453 
9454  case 483:
9455 #line 4285 "ripper.y"
9456  {ifndef_ripper((yyval.val) = keyword_false);;}
9457  break;
9458 
9459  case 484:
9460 #line 4286 "ripper.y"
9461  {ifndef_ripper((yyval.val) = keyword__FILE__);;}
9462  break;
9463 
9464  case 485:
9465 #line 4287 "ripper.y"
9466  {ifndef_ripper((yyval.val) = keyword__LINE__);;}
9467  break;
9468 
9469  case 486:
9470 #line 4288 "ripper.y"
9471  {ifndef_ripper((yyval.val) = keyword__ENCODING__);;}
9472  break;
9473 
9474  case 487:
9475 #line 4292 "ripper.y"
9476  {
9477 #if 0
9478  if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0);
9479 #endif
9480  if (id_is_var(get_id((yyvsp[(1) - (1)].val)))) {
9481  (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
9482  }
9483  else {
9484  (yyval.val) = dispatch1(vcall, (yyvsp[(1) - (1)].val));
9485  }
9486 
9487  ;}
9488  break;
9489 
9490  case 488:
9491 #line 4305 "ripper.y"
9492  {
9493 #if 0
9494  if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0);
9495 #endif
9496  (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
9497 
9498  ;}
9499  break;
9500 
9501  case 489:
9502 #line 4315 "ripper.y"
9503  {
9504  (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
9505 #if 0
9506 #endif
9507  (yyval.val) = dispatch1(var_field, (yyval.val));
9508 
9509  ;}
9510  break;
9511 
9512  case 490:
9513 #line 4323 "ripper.y"
9514  {
9515  (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
9516 #if 0
9517 #endif
9518  (yyval.val) = dispatch1(var_field, (yyval.val));
9519 
9520  ;}
9521  break;
9522 
9523  case 493:
9524 #line 4337 "ripper.y"
9525  {
9526 #if 0
9527  (yyval.val) = 0;
9528 #endif
9529  (yyval.val) = Qnil;
9530 
9531  ;}
9532  break;
9533 
9534  case 494:
9535 #line 4345 "ripper.y"
9536  {
9537  lex_state = EXPR_BEG;
9538  ;}
9539  break;
9540 
9541  case 495:
9542 #line 4349 "ripper.y"
9543  {
9544  (yyval.val) = (yyvsp[(3) - (4)].val);
9545  ;}
9546  break;
9547 
9548  case 496:
9549 #line 4353 "ripper.y"
9550  {
9551 #if 0
9552  yyerrok;
9553  (yyval.val) = 0;
9554 #endif
9555  yyerrok;
9556  (yyval.val) = Qnil;
9557 
9558  ;}
9559  break;
9560 
9561  case 497:
9562 #line 4365 "ripper.y"
9563  {
9564 #if 0
9565  (yyval.val) = (yyvsp[(2) - (3)].val);
9566 #endif
9567  (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val));
9568 
9569  lex_state = EXPR_BEG;
9570  command_start = TRUE;
9571  ;}
9572  break;
9573 
9574  case 498:
9575 #line 4375 "ripper.y"
9576  {
9577  (yyval.val) = (yyvsp[(1) - (2)].val);
9578  lex_state = EXPR_BEG;
9579  command_start = TRUE;
9580  ;}
9581  break;
9582 
9583  case 499:
9584 #line 4383 "ripper.y"
9585  {
9586 #if 0
9587  (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val));
9588 #endif
9589  (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val)));
9590 
9591  ;}
9592  break;
9593 
9594  case 500:
9595 #line 4391 "ripper.y"
9596  {
9597 #if 0
9598  (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val));
9599 #endif
9600  (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val)));
9601 
9602  ;}
9603  break;
9604 
9605  case 501:
9606 #line 4399 "ripper.y"
9607  {
9608 #if 0
9609  (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val));
9610 #endif
9611  (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
9612 
9613  ;}
9614  break;
9615 
9616  case 502:
9617 #line 4407 "ripper.y"
9618  {
9619 #if 0
9620  (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
9621 #endif
9622  (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
9623 
9624  ;}
9625  break;
9626 
9627  case 503:
9628 #line 4415 "ripper.y"
9629  {
9630 #if 0
9631  (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
9632 #endif
9633  (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
9634 
9635  ;}
9636  break;
9637 
9638  case 504:
9639 #line 4423 "ripper.y"
9640  {
9641 #if 0
9642  (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
9643 #endif
9644  (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
9645 
9646  ;}
9647  break;
9648 
9649  case 505:
9650 #line 4431 "ripper.y"
9651  {
9652 #if 0
9653  (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val));
9654 #endif
9655  (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
9656 
9657  ;}
9658  break;
9659 
9660  case 506:
9661 #line 4439 "ripper.y"
9662  {
9663 #if 0
9664  (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
9665 #endif
9666  (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
9667 
9668  ;}
9669  break;
9670 
9671  case 507:
9672 #line 4447 "ripper.y"
9673  {
9674 #if 0
9675  (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
9676 #endif
9677  (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
9678 
9679  ;}
9680  break;
9681 
9682  case 508:
9683 #line 4455 "ripper.y"
9684  {
9685 #if 0
9686  (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val));
9687 #endif
9688  (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
9689 
9690  ;}
9691  break;
9692 
9693  case 509:
9694 #line 4463 "ripper.y"
9695  {
9696 #if 0
9697  (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
9698 #endif
9699  (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
9700 
9701  ;}
9702  break;
9703 
9704  case 510:
9705 #line 4471 "ripper.y"
9706  {
9707 #if 0
9708  (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val));
9709 #endif
9710  (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
9711 
9712  ;}
9713  break;
9714 
9715  case 511:
9716 #line 4479 "ripper.y"
9717  {
9718 #if 0
9719  (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
9720 #endif
9721  (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
9722 
9723  ;}
9724  break;
9725 
9726  case 512:
9727 #line 4487 "ripper.y"
9728  {
9729 #if 0
9730  (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val));
9731 #endif
9732  (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val));
9733 
9734  ;}
9735  break;
9736 
9737  case 513:
9738 #line 4495 "ripper.y"
9739  {
9740 #if 0
9741  (yyval.val) = new_args(0, 0, 0, 0, 0);
9742 #endif
9743  (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, Qnil);
9744 
9745  ;}
9746  break;
9747 
9748  case 514:
9749 #line 4505 "ripper.y"
9750  {
9751 #if 0
9752  yyerror("formal argument cannot be a constant");
9753  (yyval.val) = 0;
9754 #endif
9755  (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
9756 
9757  ;}
9758  break;
9759 
9760  case 515:
9761 #line 4514 "ripper.y"
9762  {
9763 #if 0
9764  yyerror("formal argument cannot be an instance variable");
9765  (yyval.val) = 0;
9766 #endif
9767  (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
9768 
9769  ;}
9770  break;
9771 
9772  case 516:
9773 #line 4523 "ripper.y"
9774  {
9775 #if 0
9776  yyerror("formal argument cannot be a global variable");
9777  (yyval.val) = 0;
9778 #endif
9779  (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
9780 
9781  ;}
9782  break;
9783 
9784  case 517:
9785 #line 4532 "ripper.y"
9786  {
9787 #if 0
9788  yyerror("formal argument cannot be a class variable");
9789  (yyval.val) = 0;
9790 #endif
9791  (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
9792 
9793  ;}
9794  break;
9795 
9796  case 519:
9797 #line 4544 "ripper.y"
9798  {
9799  formal_argument(get_id((yyvsp[(1) - (1)].val)));
9800  (yyval.val) = (yyvsp[(1) - (1)].val);
9801  ;}
9802  break;
9803 
9804  case 520:
9805 #line 4551 "ripper.y"
9806  {
9807  arg_var(get_id((yyvsp[(1) - (1)].val)));
9808 #if 0
9809  (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1);
9810 #endif
9811  (yyval.val) = get_value((yyvsp[(1) - (1)].val));
9812 
9813  ;}
9814  break;
9815 
9816  case 521:
9817 #line 4560 "ripper.y"
9818  {
9819  ID tid = internal_id();
9820  arg_var(tid);
9821 #if 0
9822  if (dyna_in_block()) {
9823  (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid);
9824  }
9825  else {
9826  (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid);
9827  }
9828  (yyval.val) = NEW_ARGS_AUX(tid, 1);
9829  (yyval.val)->nd_next = (yyvsp[(2) - (3)].val);
9830 #endif
9831  (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
9832 
9833  ;}
9834  break;
9835 
9836  case 522:
9837 #line 4581 "ripper.y"
9838  {
9839  (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
9840  ;}
9841  break;
9842 
9843  case 523:
9844 #line 4586 "ripper.y"
9845  {
9846 #if 0
9847  (yyval.val) = (yyvsp[(1) - (3)].val);
9848  (yyval.val)->nd_plen++;
9849  (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next);
9850  rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val));
9851 #endif
9852  (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
9853 
9854  ;}
9855  break;
9856 
9857  case 524:
9858 #line 4599 "ripper.y"
9859  {
9860  arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val))));
9861  (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
9862 #if 0
9863  (yyval.val) = NEW_OPT_ARG(0, (yyval.val));
9864 #endif
9865  (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val));
9866 
9867  ;}
9868  break;
9869 
9870  case 525:
9871 #line 4611 "ripper.y"
9872  {
9873  arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val))));
9874  (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
9875 #if 0
9876  (yyval.val) = NEW_OPT_ARG(0, (yyval.val));
9877 #endif
9878  (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val));
9879 
9880  ;}
9881  break;
9882 
9883  case 526:
9884 #line 4623 "ripper.y"
9885  {
9886 #if 0
9887  (yyval.val) = (yyvsp[(1) - (1)].val);
9888 #endif
9889  (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
9890 
9891  ;}
9892  break;
9893 
9894  case 527:
9895 #line 4631 "ripper.y"
9896  {
9897 #if 0
9898  NODE *opts = (yyvsp[(1) - (3)].val);
9899 
9900  while (opts->nd_next) {
9901  opts = opts->nd_next;
9902  }
9903  opts->nd_next = (yyvsp[(3) - (3)].val);
9904  (yyval.val) = (yyvsp[(1) - (3)].val);
9905 #endif
9906  (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
9907 
9908  ;}
9909  break;
9910 
9911  case 528:
9912 #line 4647 "ripper.y"
9913  {
9914 #if 0
9915  (yyval.val) = (yyvsp[(1) - (1)].val);
9916 #endif
9917  (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
9918 
9919  ;}
9920  break;
9921 
9922  case 529:
9923 #line 4655 "ripper.y"
9924  {
9925 #if 0
9926  NODE *opts = (yyvsp[(1) - (3)].val);
9927 
9928  while (opts->nd_next) {
9929  opts = opts->nd_next;
9930  }
9931  opts->nd_next = (yyvsp[(3) - (3)].val);
9932  (yyval.val) = (yyvsp[(1) - (3)].val);
9933 #endif
9934  (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
9935 
9936  ;}
9937  break;
9938 
9939  case 532:
9940 #line 4675 "ripper.y"
9941  {
9942 #if 0
9943  if (!is_local_id((yyvsp[(2) - (2)].val)))
9944  yyerror("rest argument must be local variable");
9945 #endif
9946  arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val))));
9947 #if 0
9948  (yyval.val) = (yyvsp[(2) - (2)].val);
9949 #endif
9950  (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val));
9951 
9952  ;}
9953  break;
9954 
9955  case 533:
9956 #line 4688 "ripper.y"
9957  {
9958 #if 0
9959  (yyval.val) = internal_id();
9960  arg_var((yyval.val));
9961 #endif
9962  (yyval.val) = dispatch1(rest_param, Qnil);
9963 
9964  ;}
9965  break;
9966 
9967  case 536:
9968 #line 4703 "ripper.y"
9969  {
9970 #if 0
9971  if (!is_local_id((yyvsp[(2) - (2)].val)))
9972  yyerror("block argument must be local variable");
9973  else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val)))
9974  yyerror("duplicated block argument name");
9975 #endif
9976  arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val))));
9977 #if 0
9978  (yyval.val) = (yyvsp[(2) - (2)].val);
9979 #endif
9980  (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val));
9981 
9982  ;}
9983  break;
9984 
9985  case 537:
9986 #line 4720 "ripper.y"
9987  {
9988  (yyval.val) = (yyvsp[(2) - (2)].val);
9989  ;}
9990  break;
9991 
9992  case 538:
9993 #line 4724 "ripper.y"
9994  {
9995 #if 0
9996  (yyval.val) = 0;
9997 #endif
9998  (yyval.val) = Qundef;
9999 
10000  ;}
10001  break;
10002 
10003  case 539:
10004 #line 4734 "ripper.y"
10005  {
10006 #if 0
10007  value_expr((yyvsp[(1) - (1)].val));
10008  (yyval.val) = (yyvsp[(1) - (1)].val);
10009  if (!(yyval.val)) (yyval.val) = NEW_NIL();
10010 #endif
10011  (yyval.val) = (yyvsp[(1) - (1)].val);
10012 
10013  ;}
10014  break;
10015 
10016  case 540:
10017 #line 4743 "ripper.y"
10018  {lex_state = EXPR_BEG;;}
10019  break;
10020 
10021  case 541:
10022 #line 4744 "ripper.y"
10023  {
10024 #if 0
10025  if ((yyvsp[(3) - (4)].val) == 0) {
10026  yyerror("can't define singleton method for ().");
10027  }
10028  else {
10029  switch (nd_type((yyvsp[(3) - (4)].val))) {
10030  case NODE_STR:
10031  case NODE_DSTR:
10032  case NODE_XSTR:
10033  case NODE_DXSTR:
10034  case NODE_DREGX:
10035  case NODE_LIT:
10036  case NODE_ARRAY:
10037  case NODE_ZARRAY:
10038  yyerror("can't define singleton method for literals");
10039  default:
10040  value_expr((yyvsp[(3) - (4)].val));
10041  break;
10042  }
10043  }
10044  (yyval.val) = (yyvsp[(3) - (4)].val);
10045 #endif
10046  (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val));
10047 
10048  ;}
10049  break;
10050 
10051  case 543:
10052 #line 4774 "ripper.y"
10053  {
10054 #if 0
10055  (yyval.val) = (yyvsp[(1) - (2)].val);
10056 #endif
10057  (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val));
10058 
10059  ;}
10060  break;
10061 
10062  case 544:
10063 #line 4786 "ripper.y"
10064  {
10065  (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10066  ;}
10067  break;
10068 
10069  case 545:
10070 #line 4791 "ripper.y"
10071  {
10072 #if 0
10073  (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10074 #endif
10075  (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10076 
10077  ;}
10078  break;
10079 
10080  case 546:
10081 #line 4801 "ripper.y"
10082  {
10083 #if 0
10084  (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
10085 #endif
10086  (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10087 
10088  ;}
10089  break;
10090 
10091  case 547:
10092 #line 4809 "ripper.y"
10093  {
10094 #if 0
10095  (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val));
10096 #endif
10097  (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
10098 
10099  ;}
10100  break;
10101 
10102  case 558:
10103 #line 4837 "ripper.y"
10104  { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
10105  break;
10106 
10107  case 559:
10108 #line 4842 "ripper.y"
10109  { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
10110  break;
10111 
10112  case 569:
10113 #line 4865 "ripper.y"
10114  {yyerrok;;}
10115  break;
10116 
10117  case 572:
10118 #line 4870 "ripper.y"
10119  {yyerrok;;}
10120  break;
10121 
10122  case 573:
10123 #line 4874 "ripper.y"
10124  {
10125 #if 0
10126  (yyval.val) = 0;
10127 #endif
10128  (yyval.val) = Qundef;
10129 
10130  ;}
10131  break;
10132 
10133 
10134 /* Line 1267 of yacc.c. */
10135 #line 10134 "parse.c"
10136  default: break;
10137  }
10138  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
10139 
10140  YYPOPSTACK (yylen);
10141  yylen = 0;
10142  YY_STACK_PRINT (yyss, yyssp);
10143 
10144  *++yyvsp = yyval;
10145 
10146 
10147  /* Now `shift' the result of the reduction. Determine what state
10148  that goes to, based on the state we popped back to and the rule
10149  number reduced by. */
10150 
10151  yyn = yyr1[yyn];
10152 
10153  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
10154  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
10155  yystate = yytable[yystate];
10156  else
10157  yystate = yydefgoto[yyn - YYNTOKENS];
10158 
10159  goto yynewstate;
10160 
10161 
10162 /*------------------------------------.
10163 | yyerrlab -- here on detecting error |
10164 `------------------------------------*/
10165 yyerrlab:
10166  /* If not already recovering from an error, report this error. */
10167  if (!yyerrstatus)
10168  {
10169  ++yynerrs;
10170 #if ! YYERROR_VERBOSE
10171  parser_yyerror (parser, YY_("syntax error"));
10172 #else
10173  {
10174  YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
10175  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
10176  {
10177  YYSIZE_T yyalloc = 2 * yysize;
10178  if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
10179  yyalloc = YYSTACK_ALLOC_MAXIMUM;
10180  if (yymsg != yymsgbuf)
10181  YYSTACK_FREE (yymsg);
10182  yymsg = (char *) YYSTACK_ALLOC (yyalloc);
10183  if (yymsg)
10184  yymsg_alloc = yyalloc;
10185  else
10186  {
10187  yymsg = yymsgbuf;
10188  yymsg_alloc = sizeof yymsgbuf;
10189  }
10190  }
10191 
10192  if (0 < yysize && yysize <= yymsg_alloc)
10193  {
10194  (void) yysyntax_error (yymsg, yystate, yychar);
10195  parser_yyerror (parser, yymsg);
10196  }
10197  else
10198  {
10199  parser_yyerror (parser, YY_("syntax error"));
10200  if (yysize != 0)
10201  goto yyexhaustedlab;
10202  }
10203  }
10204 #endif
10205  }
10206 
10207 
10208 
10209  if (yyerrstatus == 3)
10210  {
10211  /* If just tried and failed to reuse look-ahead token after an
10212  error, discard it. */
10213 
10214  if (yychar <= YYEOF)
10215  {
10216  /* Return failure if at end of input. */
10217  if (yychar == YYEOF)
10218  YYABORT;
10219  }
10220  else
10221  {
10222  yydestruct ("Error: discarding",
10223  yytoken, &yylval, parser);
10224  yychar = YYEMPTY;
10225  }
10226  }
10227 
10228  /* Else will try to reuse look-ahead token after shifting the error
10229  token. */
10230  goto yyerrlab1;
10231 
10232 
10233 /*---------------------------------------------------.
10234 | yyerrorlab -- error raised explicitly by YYERROR. |
10235 `---------------------------------------------------*/
10236 yyerrorlab:
10237 
10238  /* Pacify compilers like GCC when the user code never invokes
10239  YYERROR and the label yyerrorlab therefore never appears in user
10240  code. */
10241  if (/*CONSTCOND*/ 0)
10242  goto yyerrorlab;
10243 
10244  /* Do not reclaim the symbols of the rule which action triggered
10245  this YYERROR. */
10246  YYPOPSTACK (yylen);
10247  yylen = 0;
10248  YY_STACK_PRINT (yyss, yyssp);
10249  yystate = *yyssp;
10250  goto yyerrlab1;
10251 
10252 
10253 /*-------------------------------------------------------------.
10254 | yyerrlab1 -- common code for both syntax error and YYERROR. |
10255 `-------------------------------------------------------------*/
10256 yyerrlab1:
10257  yyerrstatus = 3; /* Each real token shifted decrements this. */
10258 
10259  for (;;)
10260  {
10261  yyn = yypact[yystate];
10262  if (yyn != YYPACT_NINF)
10263  {
10264  yyn += YYTERROR;
10265  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
10266  {
10267  yyn = yytable[yyn];
10268  if (0 < yyn)
10269  break;
10270  }
10271  }
10272 
10273  /* Pop the current state because it cannot handle the error token. */
10274  if (yyssp == yyss)
10275  YYABORT;
10276 
10277 
10278  yydestruct ("Error: popping",
10279  yystos[yystate], yyvsp, parser);
10280  YYPOPSTACK (1);
10281  yystate = *yyssp;
10282  YY_STACK_PRINT (yyss, yyssp);
10283  }
10284 
10285  if (yyn == YYFINAL)
10286  YYACCEPT;
10287 
10288  *++yyvsp = yylval;
10289 
10290 
10291  /* Shift the error token. */
10292  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
10293 
10294  yystate = yyn;
10295  goto yynewstate;
10296 
10297 
10298 /*-------------------------------------.
10299 | yyacceptlab -- YYACCEPT comes here. |
10300 `-------------------------------------*/
10301 yyacceptlab:
10302  yyresult = 0;
10303  goto yyreturn;
10304 
10305 /*-----------------------------------.
10306 | yyabortlab -- YYABORT comes here. |
10307 `-----------------------------------*/
10308 yyabortlab:
10309  yyresult = 1;
10310  goto yyreturn;
10311 
10312 #ifndef yyoverflow
10313 /*-------------------------------------------------.
10314 | yyexhaustedlab -- memory exhaustion comes here. |
10315 `-------------------------------------------------*/
10316 yyexhaustedlab:
10317  parser_yyerror (parser, YY_("memory exhausted"));
10318  yyresult = 2;
10319  /* Fall through. */
10320 #endif
10321 
10322 yyreturn:
10323  if (yychar != YYEOF && yychar != YYEMPTY)
10324  yydestruct ("Cleanup: discarding lookahead",
10325  yytoken, &yylval, parser);
10326  /* Do not reclaim the symbols of the rule which action triggered
10327  this YYABORT or YYACCEPT. */
10328  YYPOPSTACK (yylen);
10329  YY_STACK_PRINT (yyss, yyssp);
10330  while (yyssp != yyss)
10331  {
10332  yydestruct ("Cleanup: popping",
10333  yystos[*yyssp], yyvsp, parser);
10334  YYPOPSTACK (1);
10335  }
10336 #ifndef yyoverflow
10337  if (yyss != yyssa)
10338  YYSTACK_FREE (yyss);
10339 #endif
10340 #if YYERROR_VERBOSE
10341  if (yymsg != yymsgbuf)
10342  YYSTACK_FREE (yymsg);
10343 #endif
10344  /* Make sure YYID is used. */
10345  return YYID (yyresult);
10346 }
10347 
10348 
10349 #line 4882 "ripper.y"
10350 
10351 # undef parser
10352 # undef yylex
10353 # undef yylval
10354 # define yylval (*((YYSTYPE*)(parser->parser_yylval)))
10355 
10356 static int parser_regx_options(struct parser_params*);
10357 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**);
10358 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc);
10359 static int parser_parse_string(struct parser_params*,NODE*);
10360 static int parser_here_document(struct parser_params*,NODE*);
10361 
10362 
10363 # define nextc() parser_nextc(parser)
10364 # define pushback(c) parser_pushback(parser, (c))
10365 # define newtok() parser_newtok(parser)
10366 # define tokspace(n) parser_tokspace(parser, (n))
10367 # define tokadd(c) parser_tokadd(parser, (c))
10368 # define tok_hex(numlen) parser_tok_hex(parser, (numlen))
10369 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e))
10370 # define tokadd_escape(e) parser_tokadd_escape(parser, (e))
10371 # define regx_options() parser_regx_options(parser)
10372 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e))
10373 # define parse_string(n) parser_parse_string(parser,(n))
10374 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc))
10375 # define here_document(n) parser_here_document(parser,(n))
10376 # define heredoc_identifier() parser_heredoc_identifier(parser)
10377 # define heredoc_restore(n) parser_heredoc_restore(parser,(n))
10378 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i))
10379 
10380 #ifndef RIPPER
10381 # define set_yylval_str(x) (yylval.node = NEW_STR(x))
10382 # define set_yylval_num(x) (yylval.num = (x))
10383 # define set_yylval_id(x) (yylval.id = (x))
10384 # define set_yylval_name(x) (yylval.id = (x))
10385 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x))
10386 # define set_yylval_node(x) (yylval.node = (x))
10387 # define yylval_id() (yylval.id)
10388 #else
10389 static inline VALUE
10390 ripper_yylval_id(ID x)
10391 {
10392  return (VALUE)NEW_LASGN(x, ID2SYM(x));
10393 }
10394 # define set_yylval_str(x) (void)(x)
10395 # define set_yylval_num(x) (void)(x)
10396 # define set_yylval_id(x) (void)(x)
10397 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x))
10398 # define set_yylval_literal(x) (void)(x)
10399 # define set_yylval_node(x) (void)(x)
10400 # define yylval_id() yylval.id
10401 #endif
10402 
10403 #ifndef RIPPER
10404 #define ripper_flush(p) (void)(p)
10405 #else
10406 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p)
10407 
10408 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
10409 
10410 static int
10411 ripper_has_scan_event(struct parser_params *parser)
10412 {
10413 
10414  if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
10415  return lex_p > parser->tokp;
10416 }
10417 
10418 static VALUE
10419 ripper_scan_event_val(struct parser_params *parser, int t)
10420 {
10421  VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp);
10422  VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str);
10423  ripper_flush(parser);
10424  return rval;
10425 }
10426 
10427 static void
10428 ripper_dispatch_scan_event(struct parser_params *parser, int t)
10429 {
10430  if (!ripper_has_scan_event(parser)) return;
10431  yylval_rval = ripper_scan_event_val(parser, t);
10432 }
10433 
10434 static void
10435 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t)
10436 {
10437  if (!ripper_has_scan_event(parser)) return;
10438  (void)ripper_scan_event_val(parser, t);
10439 }
10440 
10441 static void
10442 ripper_dispatch_delayed_token(struct parser_params *parser, int t)
10443 {
10444  int saved_line = ruby_sourceline;
10445  const char *saved_tokp = parser->tokp;
10446 
10447  ruby_sourceline = parser->delayed_line;
10448  parser->tokp = lex_pbeg + parser->delayed_col;
10449  yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
10450  parser->delayed = Qnil;
10451  ruby_sourceline = saved_line;
10452  parser->tokp = saved_tokp;
10453 }
10454 #endif /* RIPPER */
10455 
10456 #include "ruby/regex.h"
10457 #include "ruby/util.h"
10458 
10459 /* We remove any previous definition of `SIGN_EXTEND_CHAR',
10460  since ours (we hope) works properly with all combinations of
10461  machines, compilers, `char' and `unsigned char' argument types.
10462  (Per Bothner suggested the basic approach.) */
10463 #undef SIGN_EXTEND_CHAR
10464 #if __STDC__
10465 # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
10466 #else /* not __STDC__ */
10467 /* As in Harbison and Steele. */
10468 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
10469 #endif
10470 
10471 #define parser_encoding_name() (parser->enc->name)
10472 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc)
10473 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc)
10474 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))
10475 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc))
10476 
10477 #define parser_isascii() ISASCII(*(lex_p-1))
10478 
10479 #ifndef RIPPER
10480 static int
10481 token_info_get_column(struct parser_params *parser, const char *token)
10482 {
10483  int column = 1;
10484  const char *p, *pend = lex_p - strlen(token);
10485  for (p = lex_pbeg; p < pend; p++) {
10486  if (*p == '\t') {
10487  column = (((column - 1) / 8) + 1) * 8;
10488  }
10489  column++;
10490  }
10491  return column;
10492 }
10493 
10494 static int
10495 token_info_has_nonspaces(struct parser_params *parser, const char *token)
10496 {
10497  const char *p, *pend = lex_p - strlen(token);
10498  for (p = lex_pbeg; p < pend; p++) {
10499  if (*p != ' ' && *p != '\t') {
10500  return 1;
10501  }
10502  }
10503  return 0;
10504 }
10505 
10506 #undef token_info_push
10507 static void
10508 token_info_push(struct parser_params *parser, const char *token)
10509 {
10510  token_info *ptinfo;
10511 
10512  if (!parser->parser_token_info_enabled) return;
10513  ptinfo = ALLOC(token_info);
10514  ptinfo->token = token;
10515  ptinfo->linenum = ruby_sourceline;
10516  ptinfo->column = token_info_get_column(parser, token);
10517  ptinfo->nonspc = token_info_has_nonspaces(parser, token);
10518  ptinfo->next = parser->parser_token_info;
10519 
10520  parser->parser_token_info = ptinfo;
10521 }
10522 
10523 #undef token_info_pop
10524 static void
10525 token_info_pop(struct parser_params *parser, const char *token)
10526 {
10527  int linenum;
10528  token_info *ptinfo = parser->parser_token_info;
10529 
10530  if (!ptinfo) return;
10531  parser->parser_token_info = ptinfo->next;
10532  if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */
10533  goto finish;
10534  }
10535  linenum = ruby_sourceline;
10536  if (linenum == ptinfo->linenum) { /* SKIP */
10537  goto finish;
10538  }
10539  if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */
10540  goto finish;
10541  }
10542  if (parser->parser_token_info_enabled) {
10544  "mismatched indentations at '%s' with '%s' at %d",
10545  token, ptinfo->token, ptinfo->linenum);
10546  }
10547 
10548  finish:
10549  xfree(ptinfo);
10550 }
10551 #endif /* RIPPER */
10552 
10553 static int
10554 parser_yyerror(struct parser_params *parser, const char *msg)
10555 {
10556 #ifndef RIPPER
10557  const int max_line_margin = 30;
10558  const char *p, *pe;
10559  char *buf;
10560  long len;
10561  int i;
10562 
10563  compile_error(PARSER_ARG "%s", msg);
10564  p = lex_p;
10565  while (lex_pbeg <= p) {
10566  if (*p == '\n') break;
10567  p--;
10568  }
10569  p++;
10570 
10571  pe = lex_p;
10572  while (pe < lex_pend) {
10573  if (*pe == '\n') break;
10574  pe++;
10575  }
10576 
10577  len = pe - p;
10578  if (len > 4) {
10579  char *p2;
10580  const char *pre = "", *post = "";
10581 
10582  if (len > max_line_margin * 2 + 10) {
10583  if (lex_p - p > max_line_margin) {
10584  p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline));
10585  pre = "...";
10586  }
10587  if (pe - lex_p > max_line_margin) {
10588  pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline));
10589  post = "...";
10590  }
10591  len = pe - p;
10592  }
10593  buf = ALLOCA_N(char, len+2);
10594  MEMCPY(buf, p, char, len);
10595  buf[len] = '\0';
10596  rb_compile_error_append("%s%s%s", pre, buf, post);
10597 
10598  i = (int)(lex_p - p);
10599  p2 = buf; pe = buf + len;
10600 
10601  while (p2 < pe) {
10602  if (*p2 != '\t') *p2 = ' ';
10603  p2++;
10604  }
10605  buf[i] = '^';
10606  buf[i+1] = '\0';
10607  rb_compile_error_append("%s%s", pre, buf);
10608  }
10609 #else
10610  dispatch1(parse_error, STR_NEW2(msg));
10611 #endif /* !RIPPER */
10612  return 0;
10613 }
10614 
10615 static void parser_prepare(struct parser_params *parser);
10616 
10617 #ifndef RIPPER
10618 static VALUE
10619 debug_lines(const char *f)
10620 {
10621  ID script_lines;
10622  CONST_ID(script_lines, "SCRIPT_LINES__");
10623  if (rb_const_defined_at(rb_cObject, script_lines)) {
10624  VALUE hash = rb_const_get_at(rb_cObject, script_lines);
10625  if (TYPE(hash) == T_HASH) {
10627  VALUE lines = rb_ary_new();
10628  rb_hash_aset(hash, fname, lines);
10629  return lines;
10630  }
10631  }
10632  return 0;
10633 }
10634 
10635 static VALUE
10636 coverage(const char *f, int n)
10637 {
10638  VALUE coverages = rb_get_coverages();
10639  if (RTEST(coverages) && RBASIC(coverages)->klass == 0) {
10641  VALUE lines = rb_ary_new2(n);
10642  int i;
10643  RBASIC(lines)->klass = 0;
10644  for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil;
10645  RARRAY(lines)->as.heap.len = n;
10646  rb_hash_aset(coverages, fname, lines);
10647  return lines;
10648  }
10649  return 0;
10650 }
10651 
10652 static int
10654 {
10655  return strcmp(ruby_sourcefile, "-e") == 0;
10656 }
10657 
10658 static VALUE
10659 yycompile0(VALUE arg, int tracing)
10660 {
10661  int n;
10662  NODE *tree;
10663  struct parser_params *parser = (struct parser_params *)arg;
10664 
10665  if (!compile_for_eval && rb_safe_level() == 0) {
10667  if (ruby_debug_lines && ruby_sourceline > 0) {
10668  VALUE str = STR_NEW0();
10669  n = ruby_sourceline;
10670  do {
10672  } while (--n);
10673  }
10674 
10675  if (!e_option_supplied(parser)) {
10677  }
10678  }
10679 
10680  parser_prepare(parser);
10681  deferred_nodes = 0;
10682 #ifndef RIPPER
10684 #endif
10685  n = yyparse((void*)parser);
10686  ruby_debug_lines = 0;
10687  ruby_coverage = 0;
10688  compile_for_eval = 0;
10689 
10690  lex_strterm = 0;
10691  lex_p = lex_pbeg = lex_pend = 0;
10692  lex_lastline = lex_nextline = 0;
10693  if (parser->nerr) {
10694  return 0;
10695  }
10696  tree = ruby_eval_tree;
10697  if (!tree) {
10698  tree = NEW_NIL();
10699  }
10700  else if (ruby_eval_tree_begin) {
10701  tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body);
10702  }
10703  return (VALUE)tree;
10704 }
10705 
10706 static NODE*
10707 yycompile(struct parser_params *parser, const char *f, int line)
10708 {
10710  ruby_sourceline = line - 1;
10711  return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE);
10712 }
10713 #endif /* !RIPPER */
10714 
10715 static rb_encoding *
10717 {
10718  rb_encoding *enc = rb_enc_get(s);
10719  if (!rb_enc_asciicompat(enc)) {
10720  rb_raise(rb_eArgError, "invalid source encoding");
10721  }
10722  return enc;
10723 }
10724 
10725 static VALUE
10726 lex_get_str(struct parser_params *parser, VALUE s)
10727 {
10728  char *beg, *end, *pend;
10730 
10731  beg = RSTRING_PTR(s);
10732  if (lex_gets_ptr) {
10733  if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil;
10734  beg += lex_gets_ptr;
10735  }
10736  pend = RSTRING_PTR(s) + RSTRING_LEN(s);
10737  end = beg;
10738  while (end < pend) {
10739  if (*end++ == '\n') break;
10740  }
10741  lex_gets_ptr = end - RSTRING_PTR(s);
10742  return rb_enc_str_new(beg, end - beg, enc);
10743 }
10744 
10745 static VALUE
10747 {
10748  VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
10749  if (NIL_P(line)) return line;
10751 #ifndef RIPPER
10752  if (ruby_debug_lines) {
10753  rb_enc_associate(line, parser->enc);
10755  }
10756  if (ruby_coverage) {
10758  }
10759 #endif
10760  return line;
10761 }
10762 
10763 #ifdef RIPPER
10765 #else
10767 
10768 static NODE*
10769 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
10770 {
10771  struct parser_params *parser;
10772  NODE *node;
10773  volatile VALUE tmp;
10774 
10775  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
10777  lex_gets_ptr = 0;
10778  lex_input = s;
10779  lex_pbeg = lex_p = lex_pend = 0;
10781 
10782  node = yycompile(parser, f, line);
10783  tmp = vparser; /* prohibit tail call optimization */
10784 
10785  return node;
10786 }
10787 
10788 NODE*
10789 rb_compile_string(const char *f, VALUE s, int line)
10790 {
10792  return parser_compile_string(rb_parser_new(), f, s, line);
10793 }
10794 
10795 NODE*
10796 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
10797 {
10799  return parser_compile_string(vparser, f, s, line);
10800 }
10801 
10802 NODE*
10803 rb_compile_cstr(const char *f, const char *s, int len, int line)
10804 {
10805  VALUE str = rb_str_new(s, len);
10806  return parser_compile_string(rb_parser_new(), f, str, line);
10807 }
10808 
10809 NODE*
10810 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line)
10811 {
10812  VALUE str = rb_str_new(s, len);
10813  return parser_compile_string(vparser, f, str, line);
10814 }
10815 
10816 static VALUE
10817 lex_io_gets(struct parser_params *parser, VALUE io)
10818 {
10819  return rb_io_gets(io);
10820 }
10821 
10822 NODE*
10823 rb_compile_file(const char *f, VALUE file, int start)
10824 {
10825  VALUE volatile vparser = rb_parser_new();
10826 
10827  return rb_parser_compile_file(vparser, f, file, start);
10828 }
10829 
10830 NODE*
10831 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start)
10832 {
10833  struct parser_params *parser;
10834  volatile VALUE tmp;
10835  NODE *node;
10836 
10837  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
10839  lex_input = file;
10840  lex_pbeg = lex_p = lex_pend = 0;
10842 
10843  node = yycompile(parser, f, start);
10844  tmp = vparser; /* prohibit tail call optimization */
10845 
10846  return node;
10847 }
10848 #endif /* !RIPPER */
10849 
10850 #define STR_FUNC_ESCAPE 0x01
10851 #define STR_FUNC_EXPAND 0x02
10852 #define STR_FUNC_REGEXP 0x04
10853 #define STR_FUNC_QWORDS 0x08
10854 #define STR_FUNC_SYMBOL 0x10
10855 #define STR_FUNC_INDENT 0x20
10856 
10858  str_squote = (0),
10866 };
10867 
10868 static VALUE
10869 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0)
10870 {
10871  VALUE str;
10872 
10873  str = rb_enc_str_new(p, n, enc);
10874  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
10876  }
10877  else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
10879  }
10880  }
10881 
10882  return str;
10883 }
10884 
10885 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend)
10886 #define lex_eol_p() (lex_p >= lex_pend)
10887 #define peek(c) peek_n((c), 0)
10888 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n])
10889 
10890 static inline int
10892 {
10893  int c;
10894 
10895  if (lex_p == lex_pend) {
10896  VALUE v = lex_nextline;
10897  lex_nextline = 0;
10898  if (!v) {
10899  if (parser->eofp)
10900  return -1;
10901 
10902  if (!lex_input || NIL_P(v = lex_getline(parser))) {
10903  parser->eofp = Qtrue;
10904  lex_goto_eol(parser);
10905  return -1;
10906  }
10907  }
10908  {
10909 #ifdef RIPPER
10910  if (parser->tokp < lex_pend) {
10911  if (NIL_P(parser->delayed)) {
10912  parser->delayed = rb_str_buf_new(1024);
10913  rb_enc_associate(parser->delayed, parser->enc);
10914  rb_str_buf_cat(parser->delayed,
10915  parser->tokp, lex_pend - parser->tokp);
10916  parser->delayed_line = ruby_sourceline;
10917  parser->delayed_col = (int)(parser->tokp - lex_pbeg);
10918  }
10919  else {
10920  rb_str_buf_cat(parser->delayed,
10921  parser->tokp, lex_pend - parser->tokp);
10922  }
10923  }
10924 #endif
10925  if (heredoc_end > 0) {
10927  heredoc_end = 0;
10928  }
10929  ruby_sourceline++;
10930  parser->line_count++;
10931  lex_pbeg = lex_p = RSTRING_PTR(v);
10932  lex_pend = lex_p + RSTRING_LEN(v);
10933  ripper_flush(parser);
10934  lex_lastline = v;
10935  }
10936  }
10937  c = (unsigned char)*lex_p++;
10938  if (c == '\r' && peek('\n')) {
10939  lex_p++;
10940  c = '\n';
10941  }
10942 
10943  return c;
10944 }
10945 
10946 static void
10947 parser_pushback(struct parser_params *parser, int c)
10948 {
10949  if (c == -1) return;
10950  lex_p--;
10951  if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
10952  lex_p--;
10953  }
10954 }
10955 
10956 #define was_bol() (lex_p == lex_pbeg + 1)
10957 
10958 #define tokfix() (tokenbuf[tokidx]='\0')
10959 #define tok() tokenbuf
10960 #define toklen() tokidx
10961 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
10962 
10963 static char*
10965 {
10966  tokidx = 0;
10967  if (!tokenbuf) {
10968  toksiz = 60;
10969  tokenbuf = ALLOC_N(char, 60);
10970  }
10971  if (toksiz > 4096) {
10972  toksiz = 60;
10973  REALLOC_N(tokenbuf, char, 60);
10974  }
10975  return tokenbuf;
10976 }
10977 
10978 static char *
10979 parser_tokspace(struct parser_params *parser, int n)
10980 {
10981  tokidx += n;
10982 
10983  if (tokidx >= toksiz) {
10984  do {toksiz *= 2;} while (toksiz < tokidx);
10985  REALLOC_N(tokenbuf, char, toksiz);
10986  }
10987  return &tokenbuf[tokidx-n];
10988 }
10989 
10990 static void
10991 parser_tokadd(struct parser_params *parser, int c)
10992 {
10993  tokenbuf[tokidx++] = (char)c;
10994  if (tokidx >= toksiz) {
10995  toksiz *= 2;
10996  REALLOC_N(tokenbuf, char, toksiz);
10997  }
10998 }
10999 
11000 static int
11001 parser_tok_hex(struct parser_params *parser, size_t *numlen)
11002 {
11003  int c;
11004 
11005  c = scan_hex(lex_p, 2, numlen);
11006  if (!*numlen) {
11007  yyerror("invalid hex escape");
11008  return 0;
11009  }
11010  lex_p += *numlen;
11011  return c;
11012 }
11013 
11014 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n))
11015 
11016 static int
11018  int string_literal, int symbol_literal, int regexp_literal)
11019 {
11020  /*
11021  * If string_literal is true, then we allow multiple codepoints
11022  * in \u{}, and add the codepoints to the current token.
11023  * Otherwise we're parsing a character literal and return a single
11024  * codepoint without adding it
11025  */
11026 
11027  int codepoint;
11028  size_t numlen;
11029 
11030  if (regexp_literal) { tokadd('\\'); tokadd('u'); }
11031 
11032  if (peek('{')) { /* handle \u{...} form */
11033  do {
11034  if (regexp_literal) { tokadd(*lex_p); }
11035  nextc();
11036  codepoint = scan_hex(lex_p, 6, &numlen);
11037  if (numlen == 0) {
11038  yyerror("invalid Unicode escape");
11039  return 0;
11040  }
11041  if (codepoint > 0x10ffff) {
11042  yyerror("invalid Unicode codepoint (too large)");
11043  return 0;
11044  }
11045  lex_p += numlen;
11046  if (regexp_literal) {
11047  tokcopy((int)numlen);
11048  }
11049  else if (codepoint >= 0x80) {
11050  *encp = UTF8_ENC();
11051  if (string_literal) tokaddmbc(codepoint, *encp);
11052  }
11053  else if (string_literal) {
11054  tokadd(codepoint);
11055  }
11056  } while (string_literal && (peek(' ') || peek('\t')));
11057 
11058  if (!peek('}')) {
11059  yyerror("unterminated Unicode escape");
11060  return 0;
11061  }
11062 
11063  if (regexp_literal) { tokadd('}'); }
11064  nextc();
11065  }
11066  else { /* handle \uxxxx form */
11067  codepoint = scan_hex(lex_p, 4, &numlen);
11068  if (numlen < 4) {
11069  yyerror("invalid Unicode escape");
11070  return 0;
11071  }
11072  lex_p += 4;
11073  if (regexp_literal) {
11074  tokcopy(4);
11075  }
11076  else if (codepoint >= 0x80) {
11077  *encp = UTF8_ENC();
11078  if (string_literal) tokaddmbc(codepoint, *encp);
11079  }
11080  else if (string_literal) {
11081  tokadd(codepoint);
11082  }
11083  }
11084 
11085  return codepoint;
11086 }
11087 
11088 #define ESCAPE_CONTROL 1
11089 #define ESCAPE_META 2
11090 
11091 static int
11092 parser_read_escape(struct parser_params *parser, int flags,
11093  rb_encoding **encp)
11094 {
11095  int c;
11096  size_t numlen;
11097 
11098  switch (c = nextc()) {
11099  case '\\': /* Backslash */
11100  return c;
11101 
11102  case 'n': /* newline */
11103  return '\n';
11104 
11105  case 't': /* horizontal tab */
11106  return '\t';
11107 
11108  case 'r': /* carriage-return */
11109  return '\r';
11110 
11111  case 'f': /* form-feed */
11112  return '\f';
11113 
11114  case 'v': /* vertical tab */
11115  return '\13';
11116 
11117  case 'a': /* alarm(bell) */
11118  return '\007';
11119 
11120  case 'e': /* escape */
11121  return 033;
11122 
11123  case '0': case '1': case '2': case '3': /* octal constant */
11124  case '4': case '5': case '6': case '7':
11125  pushback(c);
11126  c = scan_oct(lex_p, 3, &numlen);
11127  lex_p += numlen;
11128  return c;
11129 
11130  case 'x': /* hex constant */
11131  c = tok_hex(&numlen);
11132  if (numlen == 0) return 0;
11133  return c;
11134 
11135  case 'b': /* backspace */
11136  return '\010';
11137 
11138  case 's': /* space */
11139  return ' ';
11140 
11141  case 'M':
11142  if (flags & ESCAPE_META) goto eof;
11143  if ((c = nextc()) != '-') {
11144  pushback(c);
11145  goto eof;
11146  }
11147  if ((c = nextc()) == '\\') {
11148  if (peek('u')) goto eof;
11149  return read_escape(flags|ESCAPE_META, encp) | 0x80;
11150  }
11151  else if (c == -1 || !ISASCII(c)) goto eof;
11152  else {
11153  return ((c & 0xff) | 0x80);
11154  }
11155 
11156  case 'C':
11157  if ((c = nextc()) != '-') {
11158  pushback(c);
11159  goto eof;
11160  }
11161  case 'c':
11162  if (flags & ESCAPE_CONTROL) goto eof;
11163  if ((c = nextc())== '\\') {
11164  if (peek('u')) goto eof;
11165  c = read_escape(flags|ESCAPE_CONTROL, encp);
11166  }
11167  else if (c == '?')
11168  return 0177;
11169  else if (c == -1 || !ISASCII(c)) goto eof;
11170  return c & 0x9f;
11171 
11172  eof:
11173  case -1:
11174  yyerror("Invalid escape character syntax");
11175  return '\0';
11176 
11177  default:
11178  return c;
11179  }
11180 }
11181 
11182 static void
11184 {
11185  int len = rb_enc_codelen(c, enc);
11186  rb_enc_mbcput(c, tokspace(len), enc);
11187 }
11188 
11189 static int
11191 {
11192  int c;
11193  int flags = 0;
11194  size_t numlen;
11195 
11196  first:
11197  switch (c = nextc()) {
11198  case '\n':
11199  return 0; /* just ignore */
11200 
11201  case '0': case '1': case '2': case '3': /* octal constant */
11202  case '4': case '5': case '6': case '7':
11203  {
11204  ruby_scan_oct(--lex_p, 3, &numlen);
11205  if (numlen == 0) goto eof;
11206  lex_p += numlen;
11207  tokcopy((int)numlen + 1);
11208  }
11209  return 0;
11210 
11211  case 'x': /* hex constant */
11212  {
11213  tok_hex(&numlen);
11214  if (numlen == 0) return -1;
11215  tokcopy((int)numlen + 2);
11216  }
11217  return 0;
11218 
11219  case 'M':
11220  if (flags & ESCAPE_META) goto eof;
11221  if ((c = nextc()) != '-') {
11222  pushback(c);
11223  goto eof;
11224  }
11225  tokcopy(3);
11226  flags |= ESCAPE_META;
11227  goto escaped;
11228 
11229  case 'C':
11230  if (flags & ESCAPE_CONTROL) goto eof;
11231  if ((c = nextc()) != '-') {
11232  pushback(c);
11233  goto eof;
11234  }
11235  tokcopy(3);
11236  goto escaped;
11237 
11238  case 'c':
11239  if (flags & ESCAPE_CONTROL) goto eof;
11240  tokcopy(2);
11241  flags |= ESCAPE_CONTROL;
11242  escaped:
11243  if ((c = nextc()) == '\\') {
11244  goto first;
11245  }
11246  else if (c == -1) goto eof;
11247  tokadd(c);
11248  return 0;
11249 
11250  eof:
11251  case -1:
11252  yyerror("Invalid escape character syntax");
11253  return -1;
11254 
11255  default:
11256  tokadd('\\');
11257  tokadd(c);
11258  }
11259  return 0;
11260 }
11261 
11262 static int
11264 {
11265  int kcode = 0;
11266  int kopt = 0;
11267  int options = 0;
11268  int c, opt, kc;
11269 
11270  newtok();
11271  while (c = nextc(), ISALPHA(c)) {
11272  if (c == 'o') {
11273  options |= RE_OPTION_ONCE;
11274  }
11275  else if (rb_char_to_option_kcode(c, &opt, &kc)) {
11276  if (kc >= 0) {
11277  if (kc != rb_ascii8bit_encindex()) kcode = c;
11278  kopt = opt;
11279  }
11280  else {
11281  options |= opt;
11282  }
11283  }
11284  else {
11285  tokadd(c);
11286  }
11287  }
11288  options |= kopt;
11289  pushback(c);
11290  if (toklen()) {
11291  tokfix();
11292  compile_error(PARSER_ARG "unknown regexp option%s - %s",
11293  toklen() > 1 ? "s" : "", tok());
11294  }
11295  return options | RE_OPTION_ENCODING(kcode);
11296 }
11297 
11298 static void
11300 {
11301  /* TODO: should use another API? */
11302  if (RBASIC(str)->flags & RSTRING_NOEMBED)
11303  xfree(RSTRING_PTR(str));
11304  rb_gc_force_recycle(str);
11305 }
11306 
11307 static int
11308 parser_tokadd_mbchar(struct parser_params *parser, int c)
11309 {
11310  int len = parser_precise_mbclen();
11311  if (!MBCLEN_CHARFOUND_P(len)) {
11312  compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name());
11313  return -1;
11314  }
11315  tokadd(c);
11316  lex_p += --len;
11317  if (len > 0) tokcopy(len);
11318  return c;
11319 }
11320 
11321 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c))
11322 
11323 static int
11325  int func, int term, int paren, long *nest,
11326  rb_encoding **encp)
11327 {
11328  int c;
11329  int has_nonascii = 0;
11330  rb_encoding *enc = *encp;
11331  char *errbuf = 0;
11332  static const char mixed_msg[] = "%s mixed within %s source";
11333 
11334 #define mixed_error(enc1, enc2) if (!errbuf) { \
11335  size_t len = sizeof(mixed_msg) - 4; \
11336  len += strlen(rb_enc_name(enc1)); \
11337  len += strlen(rb_enc_name(enc2)); \
11338  errbuf = ALLOCA_N(char, len); \
11339  snprintf(errbuf, len, mixed_msg, \
11340  rb_enc_name(enc1), \
11341  rb_enc_name(enc2)); \
11342  yyerror(errbuf); \
11343  }
11344 #define mixed_escape(beg, enc1, enc2) do { \
11345  const char *pos = lex_p; \
11346  lex_p = (beg); \
11347  mixed_error((enc1), (enc2)); \
11348  lex_p = pos; \
11349  } while (0)
11350 
11351  while ((c = nextc()) != -1) {
11352  if (paren && c == paren) {
11353  ++*nest;
11354  }
11355  else if (c == term) {
11356  if (!nest || !*nest) {
11357  pushback(c);
11358  break;
11359  }
11360  --*nest;
11361  }
11362  else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
11363  int c2 = *lex_p;
11364  if (c2 == '$' || c2 == '@' || c2 == '{') {
11365  pushback(c);
11366  break;
11367  }
11368  }
11369  else if (c == '\\') {
11370  const char *beg = lex_p - 1;
11371  c = nextc();
11372  switch (c) {
11373  case '\n':
11374  if (func & STR_FUNC_QWORDS) break;
11375  if (func & STR_FUNC_EXPAND) continue;
11376  tokadd('\\');
11377  break;
11378 
11379  case '\\':
11380  if (func & STR_FUNC_ESCAPE) tokadd(c);
11381  break;
11382 
11383  case 'u':
11384  if ((func & STR_FUNC_EXPAND) == 0) {
11385  tokadd('\\');
11386  break;
11387  }
11388  parser_tokadd_utf8(parser, &enc, 1,
11389  func & STR_FUNC_SYMBOL,
11390  func & STR_FUNC_REGEXP);
11391  if (has_nonascii && enc != *encp) {
11392  mixed_escape(beg, enc, *encp);
11393  }
11394  continue;
11395 
11396  default:
11397  if (c == -1) return -1;
11398  if (!ISASCII(c)) {
11399  if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\');
11400  goto non_ascii;
11401  }
11402  if (func & STR_FUNC_REGEXP) {
11403  pushback(c);
11404  if ((c = tokadd_escape(&enc)) < 0)
11405  return -1;
11406  if (has_nonascii && enc != *encp) {
11407  mixed_escape(beg, enc, *encp);
11408  }
11409  continue;
11410  }
11411  else if (func & STR_FUNC_EXPAND) {
11412  pushback(c);
11413  if (func & STR_FUNC_ESCAPE) tokadd('\\');
11414  c = read_escape(0, &enc);
11415  }
11416  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
11417  /* ignore backslashed spaces in %w */
11418  }
11419  else if (c != term && !(paren && c == paren)) {
11420  tokadd('\\');
11421  pushback(c);
11422  continue;
11423  }
11424  }
11425  }
11426  else if (!parser_isascii()) {
11427  non_ascii:
11428  has_nonascii = 1;
11429  if (enc != *encp) {
11430  mixed_error(enc, *encp);
11431  continue;
11432  }
11433  if (tokadd_mbchar(c) == -1) return -1;
11434  continue;
11435  }
11436  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
11437  pushback(c);
11438  break;
11439  }
11440  if (c & 0x80) {
11441  has_nonascii = 1;
11442  if (enc != *encp) {
11443  mixed_error(enc, *encp);
11444  continue;
11445  }
11446  }
11447  tokadd(c);
11448  }
11449  *encp = enc;
11450  return c;
11451 }
11452 
11453 #define NEW_STRTERM(func, term, paren) \
11454  rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
11455 
11456 #ifdef RIPPER
11457 static void
11458 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc)
11459 {
11460  if (!NIL_P(parser->delayed)) {
11461  ptrdiff_t len = lex_p - parser->tokp;
11462  if (len > 0) {
11463  rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);
11464  }
11465  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
11466  parser->tokp = lex_p;
11467  }
11468 }
11469 
11470 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc))
11471 #else
11472 #define flush_string_content(enc) ((void)(enc))
11473 #endif
11474 
11475 static int
11476 parser_parse_string(struct parser_params *parser, NODE *quote)
11477 {
11478  int func = (int)quote->nd_func;
11479  int term = nd_term(quote);
11480  int paren = nd_paren(quote);
11481  int c, space = 0;
11482  rb_encoding *enc = parser->enc;
11483 
11484  if (func == -1) return tSTRING_END;
11485  c = nextc();
11486  if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
11487  do {c = nextc();} while (ISSPACE(c));
11488  space = 1;
11489  }
11490  if (c == term && !quote->nd_nest) {
11491  if (func & STR_FUNC_QWORDS) {
11492  quote->nd_func = -1;
11493  return ' ';
11494  }
11495  if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
11497  return tREGEXP_END;
11498  }
11499  if (space) {
11500  pushback(c);
11501  return ' ';
11502  }
11503  newtok();
11504  if ((func & STR_FUNC_EXPAND) && c == '#') {
11505  switch (c = nextc()) {
11506  case '$':
11507  case '@':
11508  pushback(c);
11509  return tSTRING_DVAR;
11510  case '{':
11511  return tSTRING_DBEG;
11512  }
11513  tokadd('#');
11514  }
11515  pushback(c);
11516  if (tokadd_string(func, term, paren, &quote->nd_nest,
11517  &enc) == -1) {
11518  ruby_sourceline = nd_line(quote);
11519  if (func & STR_FUNC_REGEXP) {
11520  if (parser->eofp)
11521  compile_error(PARSER_ARG "unterminated regexp meets end of file");
11522  return tREGEXP_END;
11523  }
11524  else {
11525  if (parser->eofp)
11526  compile_error(PARSER_ARG "unterminated string meets end of file");
11527  return tSTRING_END;
11528  }
11529  }
11530 
11531  tokfix();
11532  set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
11533  flush_string_content(enc);
11534 
11535  return tSTRING_CONTENT;
11536 }
11537 
11538 static int
11540 {
11541  int c = nextc(), term, func = 0;
11542  long len;
11543 
11544  if (c == '-') {
11545  c = nextc();
11546  func = STR_FUNC_INDENT;
11547  }
11548  switch (c) {
11549  case '\'':
11550  func |= str_squote; goto quoted;
11551  case '"':
11552  func |= str_dquote; goto quoted;
11553  case '`':
11554  func |= str_xquote;
11555  quoted:
11556  newtok();
11557  tokadd(func);
11558  term = c;
11559  while ((c = nextc()) != -1 && c != term) {
11560  if (tokadd_mbchar(c) == -1) return 0;
11561  }
11562  if (c == -1) {
11563  compile_error(PARSER_ARG "unterminated here document identifier");
11564  return 0;
11565  }
11566  break;
11567 
11568  default:
11569  if (!parser_is_identchar()) {
11570  pushback(c);
11571  if (func & STR_FUNC_INDENT) {
11572  pushback('-');
11573  }
11574  return 0;
11575  }
11576  newtok();
11577  term = '"';
11578  tokadd(func |= str_dquote);
11579  do {
11580  if (tokadd_mbchar(c) == -1) return 0;
11581  } while ((c = nextc()) != -1 && parser_is_identchar());
11582  pushback(c);
11583  break;
11584  }
11585 
11586  tokfix();
11587 #ifdef RIPPER
11588  ripper_dispatch_scan_event(parser, tHEREDOC_BEG);
11589 #endif
11590  len = lex_p - lex_pbeg;
11591  lex_goto_eol(parser);
11593  STR_NEW(tok(), toklen()), /* nd_lit */
11594  len, /* nd_nth */
11595  lex_lastline); /* nd_orig */
11597  ripper_flush(parser);
11598  return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
11599 }
11600 
11601 static void
11603 {
11604  VALUE line;
11605 
11606  line = here->nd_orig;
11607  lex_lastline = line;
11608  lex_pbeg = RSTRING_PTR(line);
11609  lex_pend = lex_pbeg + RSTRING_LEN(line);
11610  lex_p = lex_pbeg + here->nd_nth;
11612  ruby_sourceline = nd_line(here);
11613  dispose_string(here->nd_lit);
11614  rb_gc_force_recycle((VALUE)here);
11615  ripper_flush(parser);
11616 }
11617 
11618 static int
11620  const char *eos, long len, int indent)
11621 {
11622  const char *p = lex_pbeg;
11623  long n;
11624 
11625  if (indent) {
11626  while (*p && ISSPACE(*p)) p++;
11627  }
11628  n = lex_pend - (p + len);
11629  if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE;
11630  return strncmp(eos, p, len) == 0;
11631 }
11632 
11633 #ifdef RIPPER
11634 static void
11635 ripper_dispatch_heredoc_end(struct parser_params *parser)
11636 {
11637  if (!NIL_P(parser->delayed))
11638  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
11639  lex_goto_eol(parser);
11640  ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END);
11641 }
11642 
11643 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser)
11644 #else
11645 #define dispatch_heredoc_end() ((void)0)
11646 #endif
11647 
11648 static int
11650 {
11651  int c, func, indent = 0;
11652  const char *eos, *p, *pend;
11653  long len;
11654  VALUE str = 0;
11655  rb_encoding *enc = parser->enc;
11656 
11657  eos = RSTRING_PTR(here->nd_lit);
11658  len = RSTRING_LEN(here->nd_lit) - 1;
11659  indent = (func = *eos++) & STR_FUNC_INDENT;
11660 
11661  if ((c = nextc()) == -1) {
11662  error:
11663  compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos);
11664 #ifdef RIPPER
11665  if (NIL_P(parser->delayed)) {
11666  ripper_dispatch_scan_event(parser, tSTRING_CONTENT);
11667  }
11668  else {
11669  if (str ||
11670  ((len = lex_p - parser->tokp) > 0 &&
11671  (str = STR_NEW3(parser->tokp, len, enc, func), 1))) {
11672  rb_str_append(parser->delayed, str);
11673  }
11674  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
11675  }
11676  lex_goto_eol(parser);
11677 #endif
11678  restore:
11680  lex_strterm = 0;
11681  return 0;
11682  }
11683  if (was_bol() && whole_match_p(eos, len, indent)) {
11686  return tSTRING_END;
11687  }
11688 
11689  if (!(func & STR_FUNC_EXPAND)) {
11690  do {
11692  pend = lex_pend;
11693  if (pend > p) {
11694  switch (pend[-1]) {
11695  case '\n':
11696  if (--pend == p || pend[-1] != '\r') {
11697  pend++;
11698  break;
11699  }
11700  case '\r':
11701  --pend;
11702  }
11703  }
11704  if (str)
11705  rb_str_cat(str, p, pend - p);
11706  else
11707  str = STR_NEW(p, pend - p);
11708  if (pend < lex_pend) rb_str_cat(str, "\n", 1);
11709  lex_goto_eol(parser);
11710  if (nextc() == -1) {
11711  if (str) dispose_string(str);
11712  goto error;
11713  }
11714  } while (!whole_match_p(eos, len, indent));
11715  }
11716  else {
11717  /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
11718  newtok();
11719  if (c == '#') {
11720  switch (c = nextc()) {
11721  case '$':
11722  case '@':
11723  pushback(c);
11724  return tSTRING_DVAR;
11725  case '{':
11726  return tSTRING_DBEG;
11727  }
11728  tokadd('#');
11729  }
11730  do {
11731  pushback(c);
11732  if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) {
11733  if (parser->eofp) goto error;
11734  goto restore;
11735  }
11736  if (c != '\n') {
11737  set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
11738  flush_string_content(enc);
11739  return tSTRING_CONTENT;
11740  }
11741  tokadd(nextc());
11742  /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
11743  if ((c = nextc()) == -1) goto error;
11744  } while (!whole_match_p(eos, len, indent));
11745  str = STR_NEW3(tok(), toklen(), enc, func);
11746  }
11749  lex_strterm = NEW_STRTERM(-1, 0, 0);
11750  set_yylval_str(str);
11751  return tSTRING_CONTENT;
11752 }
11753 
11754 #include "lex.c"
11755 
11756 static void
11758 {
11759 #ifndef RIPPER
11760  rb_warning0("ambiguous first argument; put parentheses or even spaces");
11761 #else
11763 #endif
11764 }
11765 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1)
11766 
11767 static ID
11769 {
11770 #ifndef RIPPER
11771  if (!is_local_id(lhs))
11772  yyerror("formal argument must be local variable");
11773 #endif
11774  shadowing_lvar(lhs);
11775  return lhs;
11776 }
11777 
11778 static int
11779 lvar_defined_gen(struct parser_params *parser, ID id)
11780 {
11781  return (dyna_in_block() && dvar_defined_get(id)) || local_id(id);
11782 }
11783 
11784 /* emacsen -*- hack */
11785 static long
11786 parser_encode_length(struct parser_params *parser, const char *name, long len)
11787 {
11788  long nlen;
11789 
11790  if (len > 5 && name[nlen = len - 5] == '-') {
11791  if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
11792  return nlen;
11793  }
11794  if (len > 4 && name[nlen = len - 4] == '-') {
11795  if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
11796  return nlen;
11797  if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
11798  !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
11799  /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
11800  return nlen;
11801  }
11802  return len;
11803 }
11804 
11805 static void
11806 parser_set_encode(struct parser_params *parser, const char *name)
11807 {
11808  int idx = rb_enc_find_index(name);
11809  rb_encoding *enc;
11810  VALUE excargs[3];
11811 
11812  if (idx < 0) {
11813  excargs[1] = rb_sprintf("unknown encoding name: %s", name);
11814  error:
11815  excargs[0] = rb_eArgError;
11816  excargs[2] = rb_make_backtrace();
11817  rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline));
11818  rb_exc_raise(rb_make_exception(3, excargs));
11819  }
11820  enc = rb_enc_from_index(idx);
11821  if (!rb_enc_asciicompat(enc)) {
11822  excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
11823  goto error;
11824  }
11825  parser->enc = enc;
11826 #ifndef RIPPER
11827  if (ruby_debug_lines) {
11828  long i, n = RARRAY_LEN(ruby_debug_lines);
11829  const VALUE *p = RARRAY_PTR(ruby_debug_lines);
11830  for (i = 0; i < n; ++i) {
11831  rb_enc_associate_index(*p, idx);
11832  }
11833  }
11834 #endif
11835 }
11836 
11837 static int
11839 {
11840  const char *p = lex_pbeg, *pend = lex_p - 1;
11841  if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0;
11842  while (p < pend) {
11843  if (!ISSPACE(*p)) return 0;
11844  p++;
11845  }
11846  return 1;
11847 }
11848 
11849 #ifndef RIPPER
11850 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len);
11851 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val);
11852 
11853 static void
11854 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val)
11855 {
11856  if (!comment_at_top(parser)) {
11857  return;
11858  }
11859  parser_set_encode(parser, val);
11860 }
11861 
11862 static void
11863 parser_set_token_info(struct parser_params *parser, const char *name, const char *val)
11864 {
11865  int *p = &parser->parser_token_info_enabled;
11866 
11867  switch (*val) {
11868  case 't': case 'T':
11869  if (strcasecmp(val, "true") == 0) {
11870  *p = TRUE;
11871  return;
11872  }
11873  break;
11874  case 'f': case 'F':
11875  if (strcasecmp(val, "false") == 0) {
11876  *p = FALSE;
11877  return;
11878  }
11879  break;
11880  }
11881  rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val);
11882 }
11883 
11885  const char *name;
11888 };
11889 
11890 static const struct magic_comment magic_comments[] = {
11893  {"warn_indent", parser_set_token_info},
11894 };
11895 #endif
11896 
11897 static const char *
11898 magic_comment_marker(const char *str, long len)
11899 {
11900  long i = 2;
11901 
11902  while (i < len) {
11903  switch (str[i]) {
11904  case '-':
11905  if (str[i-1] == '*' && str[i-2] == '-') {
11906  return str + i + 1;
11907  }
11908  i += 2;
11909  break;
11910  case '*':
11911  if (i + 1 >= len) return 0;
11912  if (str[i+1] != '-') {
11913  i += 4;
11914  }
11915  else if (str[i-1] != '-') {
11916  i += 2;
11917  }
11918  else {
11919  return str + i + 2;
11920  }
11921  break;
11922  default:
11923  i += 3;
11924  break;
11925  }
11926  }
11927  return 0;
11928 }
11929 
11930 static int
11931 parser_magic_comment(struct parser_params *parser, const char *str, long len)
11932 {
11933  VALUE name = 0, val = 0;
11934  const char *beg, *end, *vbeg, *vend;
11935 #define str_copy(_s, _p, _n) ((_s) \
11936  ? (void)(rb_str_resize((_s), (_n)), \
11937  MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
11938  : (void)((_s) = STR_NEW((_p), (_n))))
11939 
11940  if (len <= 7) return FALSE;
11941  if (!(beg = magic_comment_marker(str, len))) return FALSE;
11942  if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE;
11943  str = beg;
11944  len = end - beg - 3;
11945 
11946  /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
11947  while (len > 0) {
11948 #ifndef RIPPER
11949  const struct magic_comment *p = magic_comments;
11950 #endif
11951  char *s;
11952  int i;
11953  long n = 0;
11954 
11955  for (; len > 0 && *str; str++, --len) {
11956  switch (*str) {
11957  case '\'': case '"': case ':': case ';':
11958  continue;
11959  }
11960  if (!ISSPACE(*str)) break;
11961  }
11962  for (beg = str; len > 0; str++, --len) {
11963  switch (*str) {
11964  case '\'': case '"': case ':': case ';':
11965  break;
11966  default:
11967  if (ISSPACE(*str)) break;
11968  continue;
11969  }
11970  break;
11971  }
11972  for (end = str; len > 0 && ISSPACE(*str); str++, --len);
11973  if (!len) break;
11974  if (*str != ':') continue;
11975 
11976  do str++; while (--len > 0 && ISSPACE(*str));
11977  if (!len) break;
11978  if (*str == '"') {
11979  for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
11980  if (*str == '\\') {
11981  --len;
11982  ++str;
11983  }
11984  }
11985  vend = str;
11986  if (len) {
11987  --len;
11988  ++str;
11989  }
11990  }
11991  else {
11992  for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
11993  vend = str;
11994  }
11995  while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
11996 
11997  n = end - beg;
11998  str_copy(name, beg, n);
11999  s = RSTRING_PTR(name);
12000  for (i = 0; i < n; ++i) {
12001  if (s[i] == '-') s[i] = '_';
12002  }
12003 #ifndef RIPPER
12004  do {
12005  if (STRNCASECMP(p->name, s, n) == 0) {
12006  n = vend - vbeg;
12007  if (p->length) {
12008  n = (*p->length)(parser, vbeg, n);
12009  }
12010  str_copy(val, vbeg, n);
12011  (*p->func)(parser, s, RSTRING_PTR(val));
12012  break;
12013  }
12014  } while (++p < magic_comments + numberof(magic_comments));
12015 #else
12016  dispatch2(magic_comment, name, val);
12017 #endif
12018  }
12019 
12020  return TRUE;
12021 }
12022 
12023 static void
12024 set_file_encoding(struct parser_params *parser, const char *str, const char *send)
12025 {
12026  int sep = 0;
12027  const char *beg = str;
12028  VALUE s;
12029 
12030  for (;;) {
12031  if (send - str <= 6) return;
12032  switch (str[6]) {
12033  case 'C': case 'c': str += 6; continue;
12034  case 'O': case 'o': str += 5; continue;
12035  case 'D': case 'd': str += 4; continue;
12036  case 'I': case 'i': str += 3; continue;
12037  case 'N': case 'n': str += 2; continue;
12038  case 'G': case 'g': str += 1; continue;
12039  case '=': case ':':
12040  sep = 1;
12041  str += 6;
12042  break;
12043  default:
12044  str += 6;
12045  if (ISSPACE(*str)) break;
12046  continue;
12047  }
12048  if (STRNCASECMP(str-6, "coding", 6) == 0) break;
12049  }
12050  for (;;) {
12051  do {
12052  if (++str >= send) return;
12053  } while (ISSPACE(*str));
12054  if (sep) break;
12055  if (*str != '=' && *str != ':') return;
12056  sep = 1;
12057  str++;
12058  }
12059  beg = str;
12060  while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
12061  s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg));
12062  parser_set_encode(parser, RSTRING_PTR(s));
12063  rb_str_resize(s, 0);
12064 }
12065 
12066 static void
12068 {
12069  int c = nextc();
12070  switch (c) {
12071  case '#':
12072  if (peek('!')) parser->has_shebang = 1;
12073  break;
12074  case 0xef: /* UTF-8 BOM marker */
12075  if (lex_pend - lex_p >= 2 &&
12076  (unsigned char)lex_p[0] == 0xbb &&
12077  (unsigned char)lex_p[1] == 0xbf) {
12078  parser->enc = rb_utf8_encoding();
12079  lex_p += 2;
12080  lex_pbeg = lex_p;
12081  return;
12082  }
12083  break;
12084  case EOF:
12085  return;
12086  }
12087  pushback(c);
12088  parser->enc = rb_enc_get(lex_lastline);
12089 }
12090 
12091 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
12092 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN)
12093 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)
12094 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
12095 #define IS_LABEL_POSSIBLE() ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG())
12096 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1))
12097 
12098 #ifndef RIPPER
12099 #define ambiguous_operator(op, syn) ( \
12100  rb_warning0("`"op"' after local variable is interpreted as binary operator"), \
12101  rb_warning0("even though it seems like "syn""))
12102 #else
12103 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn))
12104 #endif
12105 #define warn_balanced(op, syn) ((void) \
12106  (last_state != EXPR_CLASS && last_state != EXPR_DOT && \
12107  last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
12108  last_state != EXPR_ENDARG && \
12109  space_seen && !ISSPACE(c) && \
12110  (ambiguous_operator(op, syn), 0)))
12111 
12112 static int
12114 {
12115  register int c;
12116  int space_seen = 0;
12117  int cmd_state;
12118  enum lex_state_e last_state;
12119  rb_encoding *enc;
12120  int mb;
12121 #ifdef RIPPER
12122  int fallthru = FALSE;
12123 #endif
12124 
12125  if (lex_strterm) {
12126  int token;
12127  if (nd_type(lex_strterm) == NODE_HEREDOC) {
12128  token = here_document(lex_strterm);
12129  if (token == tSTRING_END) {
12130  lex_strterm = 0;
12131  lex_state = EXPR_END;
12132  }
12133  }
12134  else {
12135  token = parse_string(lex_strterm);
12136  if (token == tSTRING_END || token == tREGEXP_END) {
12138  lex_strterm = 0;
12139  lex_state = EXPR_END;
12140  }
12141  }
12142  return token;
12143  }
12144  cmd_state = command_start;
12145  command_start = FALSE;
12146  retry:
12147  last_state = lex_state;
12148  switch (c = nextc()) {
12149  case '\0': /* NUL */
12150  case '\004': /* ^D */
12151  case '\032': /* ^Z */
12152  case -1: /* end of script. */
12153  return 0;
12154 
12155  /* white spaces */
12156  case ' ': case '\t': case '\f': case '\r':
12157  case '\13': /* '\v' */
12158  space_seen = 1;
12159 #ifdef RIPPER
12160  while ((c = nextc())) {
12161  switch (c) {
12162  case ' ': case '\t': case '\f': case '\r':
12163  case '\13': /* '\v' */
12164  break;
12165  default:
12166  goto outofloop;
12167  }
12168  }
12169  outofloop:
12170  pushback(c);
12171  ripper_dispatch_scan_event(parser, tSP);
12172 #endif
12173  goto retry;
12174 
12175  case '#': /* it's a comment */
12176  /* no magic_comment in shebang line */
12177  if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) {
12178  if (comment_at_top(parser)) {
12179  set_file_encoding(parser, lex_p, lex_pend);
12180  }
12181  }
12182  lex_p = lex_pend;
12183 #ifdef RIPPER
12184  ripper_dispatch_scan_event(parser, tCOMMENT);
12185  fallthru = TRUE;
12186 #endif
12187  /* fall through */
12188  case '\n':
12189  switch (lex_state) {
12190  case EXPR_BEG:
12191  case EXPR_FNAME:
12192  case EXPR_DOT:
12193  case EXPR_CLASS:
12194  case EXPR_VALUE:
12195 #ifdef RIPPER
12196  if (!fallthru) {
12197  ripper_dispatch_scan_event(parser, tIGNORED_NL);
12198  }
12199  fallthru = FALSE;
12200 #endif
12201  goto retry;
12202  default:
12203  break;
12204  }
12205  while ((c = nextc())) {
12206  switch (c) {
12207  case ' ': case '\t': case '\f': case '\r':
12208  case '\13': /* '\v' */
12209  space_seen = 1;
12210  break;
12211  case '.': {
12212  if ((c = nextc()) != '.') {
12213  pushback(c);
12214  pushback('.');
12215  goto retry;
12216  }
12217  }
12218  default:
12219  --ruby_sourceline;
12221  case -1: /* EOF no decrement*/
12222  lex_goto_eol(parser);
12223 #ifdef RIPPER
12224  if (c != -1) {
12225  parser->tokp = lex_p;
12226  }
12227 #endif
12228  goto normal_newline;
12229  }
12230  }
12231  normal_newline:
12232  command_start = TRUE;
12233  lex_state = EXPR_BEG;
12234  return '\n';
12235 
12236  case '*':
12237  if ((c = nextc()) == '*') {
12238  if ((c = nextc()) == '=') {
12240  lex_state = EXPR_BEG;
12241  return tOP_ASGN;
12242  }
12243  pushback(c);
12244  c = tPOW;
12245  }
12246  else {
12247  if (c == '=') {
12248  set_yylval_id('*');
12249  lex_state = EXPR_BEG;
12250  return tOP_ASGN;
12251  }
12252  pushback(c);
12253  if (IS_SPCARG(c)) {
12254  rb_warning0("`*' interpreted as argument prefix");
12255  c = tSTAR;
12256  }
12257  else if (IS_BEG()) {
12258  c = tSTAR;
12259  }
12260  else {
12261  warn_balanced("*", "argument prefix");
12262  c = '*';
12263  }
12264  }
12265  switch (lex_state) {
12266  case EXPR_FNAME: case EXPR_DOT:
12267  lex_state = EXPR_ARG; break;
12268  default:
12269  lex_state = EXPR_BEG; break;
12270  }
12271  return c;
12272 
12273  case '!':
12274  c = nextc();
12275  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12276  lex_state = EXPR_ARG;
12277  if (c == '@') {
12278  return '!';
12279  }
12280  }
12281  else {
12282  lex_state = EXPR_BEG;
12283  }
12284  if (c == '=') {
12285  return tNEQ;
12286  }
12287  if (c == '~') {
12288  return tNMATCH;
12289  }
12290  pushback(c);
12291  return '!';
12292 
12293  case '=':
12294  if (was_bol()) {
12295  /* skip embedded rd document */
12296  if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
12297 #ifdef RIPPER
12298  int first_p = TRUE;
12299 
12300  lex_goto_eol(parser);
12301  ripper_dispatch_scan_event(parser, tEMBDOC_BEG);
12302 #endif
12303  for (;;) {
12304  lex_goto_eol(parser);
12305 #ifdef RIPPER
12306  if (!first_p) {
12307  ripper_dispatch_scan_event(parser, tEMBDOC);
12308  }
12309  first_p = FALSE;
12310 #endif
12311  c = nextc();
12312  if (c == -1) {
12313  compile_error(PARSER_ARG "embedded document meets end of file");
12314  return 0;
12315  }
12316  if (c != '=') continue;
12317  if (strncmp(lex_p, "end", 3) == 0 &&
12318  (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
12319  break;
12320  }
12321  }
12322  lex_goto_eol(parser);
12323 #ifdef RIPPER
12324  ripper_dispatch_scan_event(parser, tEMBDOC_END);
12325 #endif
12326  goto retry;
12327  }
12328  }
12329 
12330  switch (lex_state) {
12331  case EXPR_FNAME: case EXPR_DOT:
12332  lex_state = EXPR_ARG; break;
12333  default:
12334  lex_state = EXPR_BEG; break;
12335  }
12336  if ((c = nextc()) == '=') {
12337  if ((c = nextc()) == '=') {
12338  return tEQQ;
12339  }
12340  pushback(c);
12341  return tEQ;
12342  }
12343  if (c == '~') {
12344  return tMATCH;
12345  }
12346  else if (c == '>') {
12347  return tASSOC;
12348  }
12349  pushback(c);
12350  return '=';
12351 
12352  case '<':
12353  last_state = lex_state;
12354  c = nextc();
12355  if (c == '<' &&
12356  lex_state != EXPR_DOT &&
12357  lex_state != EXPR_CLASS &&
12358  !IS_END() &&
12359  (!IS_ARG() || space_seen)) {
12360  int token = heredoc_identifier();
12361  if (token) return token;
12362  }
12363  switch (lex_state) {
12364  case EXPR_FNAME: case EXPR_DOT:
12365  lex_state = EXPR_ARG; break;
12366  default:
12367  lex_state = EXPR_BEG; break;
12368  }
12369  if (c == '=') {
12370  if ((c = nextc()) == '>') {
12371  return tCMP;
12372  }
12373  pushback(c);
12374  return tLEQ;
12375  }
12376  if (c == '<') {
12377  if ((c = nextc()) == '=') {
12379  lex_state = EXPR_BEG;
12380  return tOP_ASGN;
12381  }
12382  pushback(c);
12383  warn_balanced("<<", "here document");
12384  return tLSHFT;
12385  }
12386  pushback(c);
12387  return '<';
12388 
12389  case '>':
12390  switch (lex_state) {
12391  case EXPR_FNAME: case EXPR_DOT:
12392  lex_state = EXPR_ARG; break;
12393  default:
12394  lex_state = EXPR_BEG; break;
12395  }
12396  if ((c = nextc()) == '=') {
12397  return tGEQ;
12398  }
12399  if (c == '>') {
12400  if ((c = nextc()) == '=') {
12402  lex_state = EXPR_BEG;
12403  return tOP_ASGN;
12404  }
12405  pushback(c);
12406  return tRSHFT;
12407  }
12408  pushback(c);
12409  return '>';
12410 
12411  case '"':
12412  lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
12413  return tSTRING_BEG;
12414 
12415  case '`':
12416  if (lex_state == EXPR_FNAME) {
12418  return c;
12419  }
12420  if (lex_state == EXPR_DOT) {
12421  if (cmd_state)
12423  else
12424  lex_state = EXPR_ARG;
12425  return c;
12426  }
12427  lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
12428  return tXSTRING_BEG;
12429 
12430  case '\'':
12431  lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
12432  return tSTRING_BEG;
12433 
12434  case '?':
12435  if (IS_END()) {
12437  return '?';
12438  }
12439  c = nextc();
12440  if (c == -1) {
12441  compile_error(PARSER_ARG "incomplete character syntax");
12442  return 0;
12443  }
12444  if (rb_enc_isspace(c, parser->enc)) {
12445  if (!IS_ARG()) {
12446  int c2 = 0;
12447  switch (c) {
12448  case ' ':
12449  c2 = 's';
12450  break;
12451  case '\n':
12452  c2 = 'n';
12453  break;
12454  case '\t':
12455  c2 = 't';
12456  break;
12457  case '\v':
12458  c2 = 'v';
12459  break;
12460  case '\r':
12461  c2 = 'r';
12462  break;
12463  case '\f':
12464  c2 = 'f';
12465  break;
12466  }
12467  if (c2) {
12468  rb_warnI("invalid character syntax; use ?\\%c", c2);
12469  }
12470  }
12471  ternary:
12472  pushback(c);
12474  return '?';
12475  }
12476  newtok();
12477  enc = parser->enc;
12478  if (!parser_isascii()) {
12479  if (tokadd_mbchar(c) == -1) return 0;
12480  }
12481  else if ((rb_enc_isalnum(c, parser->enc) || c == '_') &&
12482  lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) {
12483  goto ternary;
12484  }
12485  else if (c == '\\') {
12486  if (peek('u')) {
12487  nextc();
12488  c = parser_tokadd_utf8(parser, &enc, 0, 0, 0);
12489  if (0x80 <= c) {
12490  tokaddmbc(c, enc);
12491  }
12492  else {
12493  tokadd(c);
12494  }
12495  }
12496  else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) {
12497  nextc();
12498  if (tokadd_mbchar(c) == -1) return 0;
12499  }
12500  else {
12501  c = read_escape(0, &enc);
12502  tokadd(c);
12503  }
12504  }
12505  else {
12506  tokadd(c);
12507  }
12508  tokfix();
12509  set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0));
12510  lex_state = EXPR_END;
12511  return tCHAR;
12512 
12513  case '&':
12514  if ((c = nextc()) == '&') {
12515  lex_state = EXPR_BEG;
12516  if ((c = nextc()) == '=') {
12518  lex_state = EXPR_BEG;
12519  return tOP_ASGN;
12520  }
12521  pushback(c);
12522  return tANDOP;
12523  }
12524  else if (c == '=') {
12525  set_yylval_id('&');
12526  lex_state = EXPR_BEG;
12527  return tOP_ASGN;
12528  }
12529  pushback(c);
12530  if (IS_SPCARG(c)) {
12531  rb_warning0("`&' interpreted as argument prefix");
12532  c = tAMPER;
12533  }
12534  else if (IS_BEG()) {
12535  c = tAMPER;
12536  }
12537  else {
12538  warn_balanced("&", "argument prefix");
12539  c = '&';
12540  }
12541  switch (lex_state) {
12542  case EXPR_FNAME: case EXPR_DOT:
12543  lex_state = EXPR_ARG; break;
12544  default:
12545  lex_state = EXPR_BEG;
12546  }
12547  return c;
12548 
12549  case '|':
12550  if ((c = nextc()) == '|') {
12551  lex_state = EXPR_BEG;
12552  if ((c = nextc()) == '=') {
12554  lex_state = EXPR_BEG;
12555  return tOP_ASGN;
12556  }
12557  pushback(c);
12558  return tOROP;
12559  }
12560  if (c == '=') {
12561  set_yylval_id('|');
12562  lex_state = EXPR_BEG;
12563  return tOP_ASGN;
12564  }
12565  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12566  lex_state = EXPR_ARG;
12567  }
12568  else {
12569  lex_state = EXPR_BEG;
12570  }
12571  pushback(c);
12572  return '|';
12573 
12574  case '+':
12575  c = nextc();
12576  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12577  lex_state = EXPR_ARG;
12578  if (c == '@') {
12579  return tUPLUS;
12580  }
12581  pushback(c);
12582  return '+';
12583  }
12584  if (c == '=') {
12585  set_yylval_id('+');
12586  lex_state = EXPR_BEG;
12587  return tOP_ASGN;
12588  }
12589  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
12590  lex_state = EXPR_BEG;
12591  pushback(c);
12592  if (c != -1 && ISDIGIT(c)) {
12593  c = '+';
12594  goto start_num;
12595  }
12596  return tUPLUS;
12597  }
12598  lex_state = EXPR_BEG;
12599  pushback(c);
12600  warn_balanced("+", "unary operator");
12601  return '+';
12602 
12603  case '-':
12604  c = nextc();
12605  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12606  lex_state = EXPR_ARG;
12607  if (c == '@') {
12608  return tUMINUS;
12609  }
12610  pushback(c);
12611  return '-';
12612  }
12613  if (c == '=') {
12614  set_yylval_id('-');
12615  lex_state = EXPR_BEG;
12616  return tOP_ASGN;
12617  }
12618  if (c == '>') {
12619  lex_state = EXPR_ARG;
12620  return tLAMBDA;
12621  }
12622  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
12623  lex_state = EXPR_BEG;
12624  pushback(c);
12625  if (c != -1 && ISDIGIT(c)) {
12626  return tUMINUS_NUM;
12627  }
12628  return tUMINUS;
12629  }
12630  lex_state = EXPR_BEG;
12631  pushback(c);
12632  warn_balanced("-", "unary operator");
12633  return '-';
12634 
12635  case '.':
12636  lex_state = EXPR_BEG;
12637  if ((c = nextc()) == '.') {
12638  if ((c = nextc()) == '.') {
12639  return tDOT3;
12640  }
12641  pushback(c);
12642  return tDOT2;
12643  }
12644  pushback(c);
12645  if (c != -1 && ISDIGIT(c)) {
12646  yyerror("no .<digit> floating literal anymore; put 0 before dot");
12647  }
12648  lex_state = EXPR_DOT;
12649  return '.';
12650 
12651  start_num:
12652  case '0': case '1': case '2': case '3': case '4':
12653  case '5': case '6': case '7': case '8': case '9':
12654  {
12655  int is_float, seen_point, seen_e, nondigit;
12656 
12657  is_float = seen_point = seen_e = nondigit = 0;
12658  lex_state = EXPR_END;
12659  newtok();
12660  if (c == '-' || c == '+') {
12661  tokadd(c);
12662  c = nextc();
12663  }
12664  if (c == '0') {
12665 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0)
12666  int start = toklen();
12667  c = nextc();
12668  if (c == 'x' || c == 'X') {
12669  /* hexadecimal */
12670  c = nextc();
12671  if (c != -1 && ISXDIGIT(c)) {
12672  do {
12673  if (c == '_') {
12674  if (nondigit) break;
12675  nondigit = c;
12676  continue;
12677  }
12678  if (!ISXDIGIT(c)) break;
12679  nondigit = 0;
12680  tokadd(c);
12681  } while ((c = nextc()) != -1);
12682  }
12683  pushback(c);
12684  tokfix();
12685  if (toklen() == start) {
12686  no_digits();
12687  }
12688  else if (nondigit) goto trailing_uc;
12690  return tINTEGER;
12691  }
12692  if (c == 'b' || c == 'B') {
12693  /* binary */
12694  c = nextc();
12695  if (c == '0' || c == '1') {
12696  do {
12697  if (c == '_') {
12698  if (nondigit) break;
12699  nondigit = c;
12700  continue;
12701  }
12702  if (c != '0' && c != '1') break;
12703  nondigit = 0;
12704  tokadd(c);
12705  } while ((c = nextc()) != -1);
12706  }
12707  pushback(c);
12708  tokfix();
12709  if (toklen() == start) {
12710  no_digits();
12711  }
12712  else if (nondigit) goto trailing_uc;
12714  return tINTEGER;
12715  }
12716  if (c == 'd' || c == 'D') {
12717  /* decimal */
12718  c = nextc();
12719  if (c != -1 && ISDIGIT(c)) {
12720  do {
12721  if (c == '_') {
12722  if (nondigit) break;
12723  nondigit = c;
12724  continue;
12725  }
12726  if (!ISDIGIT(c)) break;
12727  nondigit = 0;
12728  tokadd(c);
12729  } while ((c = nextc()) != -1);
12730  }
12731  pushback(c);
12732  tokfix();
12733  if (toklen() == start) {
12734  no_digits();
12735  }
12736  else if (nondigit) goto trailing_uc;
12738  return tINTEGER;
12739  }
12740  if (c == '_') {
12741  /* 0_0 */
12742  goto octal_number;
12743  }
12744  if (c == 'o' || c == 'O') {
12745  /* prefixed octal */
12746  c = nextc();
12747  if (c == -1 || c == '_' || !ISDIGIT(c)) {
12748  no_digits();
12749  }
12750  }
12751  if (c >= '0' && c <= '7') {
12752  /* octal */
12753  octal_number:
12754  do {
12755  if (c == '_') {
12756  if (nondigit) break;
12757  nondigit = c;
12758  continue;
12759  }
12760  if (c < '0' || c > '9') break;
12761  if (c > '7') goto invalid_octal;
12762  nondigit = 0;
12763  tokadd(c);
12764  } while ((c = nextc()) != -1);
12765  if (toklen() > start) {
12766  pushback(c);
12767  tokfix();
12768  if (nondigit) goto trailing_uc;
12770  return tINTEGER;
12771  }
12772  if (nondigit) {
12773  pushback(c);
12774  goto trailing_uc;
12775  }
12776  }
12777  if (c > '7' && c <= '9') {
12778  invalid_octal:
12779  yyerror("Invalid octal digit");
12780  }
12781  else if (c == '.' || c == 'e' || c == 'E') {
12782  tokadd('0');
12783  }
12784  else {
12785  pushback(c);
12787  return tINTEGER;
12788  }
12789  }
12790 
12791  for (;;) {
12792  switch (c) {
12793  case '0': case '1': case '2': case '3': case '4':
12794  case '5': case '6': case '7': case '8': case '9':
12795  nondigit = 0;
12796  tokadd(c);
12797  break;
12798 
12799  case '.':
12800  if (nondigit) goto trailing_uc;
12801  if (seen_point || seen_e) {
12802  goto decode_num;
12803  }
12804  else {
12805  int c0 = nextc();
12806  if (c0 == -1 || !ISDIGIT(c0)) {
12807  pushback(c0);
12808  goto decode_num;
12809  }
12810  c = c0;
12811  }
12812  tokadd('.');
12813  tokadd(c);
12814  is_float++;
12815  seen_point++;
12816  nondigit = 0;
12817  break;
12818 
12819  case 'e':
12820  case 'E':
12821  if (nondigit) {
12822  pushback(c);
12823  c = nondigit;
12824  goto decode_num;
12825  }
12826  if (seen_e) {
12827  goto decode_num;
12828  }
12829  tokadd(c);
12830  seen_e++;
12831  is_float++;
12832  nondigit = c;
12833  c = nextc();
12834  if (c != '-' && c != '+') continue;
12835  tokadd(c);
12836  nondigit = c;
12837  break;
12838 
12839  case '_': /* `_' in number just ignored */
12840  if (nondigit) goto decode_num;
12841  nondigit = c;
12842  break;
12843 
12844  default:
12845  goto decode_num;
12846  }
12847  c = nextc();
12848  }
12849 
12850  decode_num:
12851  pushback(c);
12852  if (nondigit) {
12853  char tmp[30];
12854  trailing_uc:
12855  snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit);
12856  yyerror(tmp);
12857  }
12858  tokfix();
12859  if (is_float) {
12860  double d = strtod(tok(), 0);
12861  if (errno == ERANGE) {
12862  rb_warningS("Float %s out of range", tok());
12863  errno = 0;
12864  }
12866  return tFLOAT;
12867  }
12869  return tINTEGER;
12870  }
12871 
12872  case ')':
12873  case ']':
12874  paren_nest--;
12875  case '}':
12876  COND_LEXPOP();
12877  CMDARG_LEXPOP();
12878  if (c == ')')
12880  else
12882  return c;
12883 
12884  case ':':
12885  c = nextc();
12886  if (c == ':') {
12887  if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) {
12888  lex_state = EXPR_BEG;
12889  return tCOLON3;
12890  }
12891  lex_state = EXPR_DOT;
12892  return tCOLON2;
12893  }
12894  if (IS_END() || ISSPACE(c)) {
12895  pushback(c);
12896  warn_balanced(":", "symbol literal");
12897  lex_state = EXPR_BEG;
12898  return ':';
12899  }
12900  switch (c) {
12901  case '\'':
12902  lex_strterm = NEW_STRTERM(str_ssym, c, 0);
12903  break;
12904  case '"':
12905  lex_strterm = NEW_STRTERM(str_dsym, c, 0);
12906  break;
12907  default:
12908  pushback(c);
12909  break;
12910  }
12912  return tSYMBEG;
12913 
12914  case '/':
12915  if (IS_BEG()) {
12916  lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
12917  return tREGEXP_BEG;
12918  }
12919  if ((c = nextc()) == '=') {
12920  set_yylval_id('/');
12921  lex_state = EXPR_BEG;
12922  return tOP_ASGN;
12923  }
12924  pushback(c);
12925  if (IS_SPCARG(c)) {
12926  (void)arg_ambiguous();
12927  lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
12928  return tREGEXP_BEG;
12929  }
12930  switch (lex_state) {
12931  case EXPR_FNAME: case EXPR_DOT:
12932  lex_state = EXPR_ARG; break;
12933  default:
12934  lex_state = EXPR_BEG; break;
12935  }
12936  warn_balanced("/", "regexp literal");
12937  return '/';
12938 
12939  case '^':
12940  if ((c = nextc()) == '=') {
12941  set_yylval_id('^');
12942  lex_state = EXPR_BEG;
12943  return tOP_ASGN;
12944  }
12945  switch (lex_state) {
12946  case EXPR_FNAME: case EXPR_DOT:
12947  lex_state = EXPR_ARG; break;
12948  default:
12949  lex_state = EXPR_BEG; break;
12950  }
12951  pushback(c);
12952  return '^';
12953 
12954  case ';':
12955  lex_state = EXPR_BEG;
12956  command_start = TRUE;
12957  return ';';
12958 
12959  case ',':
12960  lex_state = EXPR_BEG;
12961  return ',';
12962 
12963  case '~':
12964  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12965  if ((c = nextc()) != '@') {
12966  pushback(c);
12967  }
12968  lex_state = EXPR_ARG;
12969  }
12970  else {
12971  lex_state = EXPR_BEG;
12972  }
12973  return '~';
12974 
12975  case '(':
12976  if (IS_BEG()) {
12977  c = tLPAREN;
12978  }
12979  else if (IS_SPCARG(-1)) {
12980  c = tLPAREN_ARG;
12981  }
12982  paren_nest++;
12983  COND_PUSH(0);
12984  CMDARG_PUSH(0);
12985  lex_state = EXPR_BEG;
12986  return c;
12987 
12988  case '[':
12989  paren_nest++;
12990  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12991  lex_state = EXPR_ARG;
12992  if ((c = nextc()) == ']') {
12993  if ((c = nextc()) == '=') {
12994  return tASET;
12995  }
12996  pushback(c);
12997  return tAREF;
12998  }
12999  pushback(c);
13000  return '[';
13001  }
13002  else if (IS_BEG()) {
13003  c = tLBRACK;
13004  }
13005  else if (IS_ARG() && space_seen) {
13006  c = tLBRACK;
13007  }
13008  lex_state = EXPR_BEG;
13009  COND_PUSH(0);
13010  CMDARG_PUSH(0);
13011  return c;
13012 
13013  case '{':
13014  if (lpar_beg && lpar_beg == paren_nest) {
13015  lex_state = EXPR_BEG;
13016  lpar_beg = 0;
13017  --paren_nest;
13018  COND_PUSH(0);
13019  CMDARG_PUSH(0);
13020  return tLAMBEG;
13021  }
13022  if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN)
13023  c = '{'; /* block (primary) */
13024  else if (lex_state == EXPR_ENDARG)
13025  c = tLBRACE_ARG; /* block (expr) */
13026  else
13027  c = tLBRACE; /* hash */
13028  COND_PUSH(0);
13029  CMDARG_PUSH(0);
13030  lex_state = EXPR_BEG;
13031  if (c != tLBRACE) command_start = TRUE;
13032  return c;
13033 
13034  case '\\':
13035  c = nextc();
13036  if (c == '\n') {
13037  space_seen = 1;
13038 #ifdef RIPPER
13039  ripper_dispatch_scan_event(parser, tSP);
13040 #endif
13041  goto retry; /* skip \\n */
13042  }
13043  pushback(c);
13044  return '\\';
13045 
13046  case '%':
13047  if (IS_BEG()) {
13048  int term;
13049  int paren;
13050 
13051  c = nextc();
13052  quotation:
13053  if (c == -1 || !ISALNUM(c)) {
13054  term = c;
13055  c = 'Q';
13056  }
13057  else {
13058  term = nextc();
13059  if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) {
13060  yyerror("unknown type of %string");
13061  return 0;
13062  }
13063  }
13064  if (c == -1 || term == -1) {
13065  compile_error(PARSER_ARG "unterminated quoted string meets end of file");
13066  return 0;
13067  }
13068  paren = term;
13069  if (term == '(') term = ')';
13070  else if (term == '[') term = ']';
13071  else if (term == '{') term = '}';
13072  else if (term == '<') term = '>';
13073  else paren = 0;
13074 
13075  switch (c) {
13076  case 'Q':
13077  lex_strterm = NEW_STRTERM(str_dquote, term, paren);
13078  return tSTRING_BEG;
13079 
13080  case 'q':
13081  lex_strterm = NEW_STRTERM(str_squote, term, paren);
13082  return tSTRING_BEG;
13083 
13084  case 'W':
13085  lex_strterm = NEW_STRTERM(str_dword, term, paren);
13086  do {c = nextc();} while (ISSPACE(c));
13087  pushback(c);
13088  return tWORDS_BEG;
13089 
13090  case 'w':
13091  lex_strterm = NEW_STRTERM(str_sword, term, paren);
13092  do {c = nextc();} while (ISSPACE(c));
13093  pushback(c);
13094  return tQWORDS_BEG;
13095 
13096  case 'x':
13097  lex_strterm = NEW_STRTERM(str_xquote, term, paren);
13098  return tXSTRING_BEG;
13099 
13100  case 'r':
13101  lex_strterm = NEW_STRTERM(str_regexp, term, paren);
13102  return tREGEXP_BEG;
13103 
13104  case 's':
13105  lex_strterm = NEW_STRTERM(str_ssym, term, paren);
13107  return tSYMBEG;
13108 
13109  default:
13110  yyerror("unknown type of %string");
13111  return 0;
13112  }
13113  }
13114  if ((c = nextc()) == '=') {
13115  set_yylval_id('%');
13116  lex_state = EXPR_BEG;
13117  return tOP_ASGN;
13118  }
13119  if (IS_SPCARG(c)) {
13120  goto quotation;
13121  }
13122  switch (lex_state) {
13123  case EXPR_FNAME: case EXPR_DOT:
13124  lex_state = EXPR_ARG; break;
13125  default:
13126  lex_state = EXPR_BEG; break;
13127  }
13128  pushback(c);
13129  warn_balanced("%%", "string literal");
13130  return '%';
13131 
13132  case '$':
13133  lex_state = EXPR_END;
13134  newtok();
13135  c = nextc();
13136  switch (c) {
13137  case '_': /* $_: last read line string */
13138  c = nextc();
13139  if (parser_is_identchar()) {
13140  tokadd('$');
13141  tokadd('_');
13142  break;
13143  }
13144  pushback(c);
13145  c = '_';
13146  /* fall through */
13147  case '~': /* $~: match-data */
13148  case '*': /* $*: argv */
13149  case '$': /* $$: pid */
13150  case '?': /* $?: last status */
13151  case '!': /* $!: error string */
13152  case '@': /* $@: error position */
13153  case '/': /* $/: input record separator */
13154  case '\\': /* $\: output record separator */
13155  case ';': /* $;: field separator */
13156  case ',': /* $,: output field separator */
13157  case '.': /* $.: last read line number */
13158  case '=': /* $=: ignorecase */
13159  case ':': /* $:: load path */
13160  case '<': /* $<: reading filename */
13161  case '>': /* $>: default output handle */
13162  case '\"': /* $": already loaded files */
13163  tokadd('$');
13164  tokadd(c);
13165  tokfix();
13167  return tGVAR;
13168 
13169  case '-':
13170  tokadd('$');
13171  tokadd(c);
13172  c = nextc();
13173  if (parser_is_identchar()) {
13174  if (tokadd_mbchar(c) == -1) return 0;
13175  }
13176  else {
13177  pushback(c);
13178  }
13179  gvar:
13180  tokfix();
13182  return tGVAR;
13183 
13184  case '&': /* $&: last match */
13185  case '`': /* $`: string before last match */
13186  case '\'': /* $': string after last match */
13187  case '+': /* $+: string matches last paren. */
13188  if (last_state == EXPR_FNAME) {
13189  tokadd('$');
13190  tokadd(c);
13191  goto gvar;
13192  }
13194  return tBACK_REF;
13195 
13196  case '1': case '2': case '3':
13197  case '4': case '5': case '6':
13198  case '7': case '8': case '9':
13199  tokadd('$');
13200  do {
13201  tokadd(c);
13202  c = nextc();
13203  } while (c != -1 && ISDIGIT(c));
13204  pushback(c);
13205  if (last_state == EXPR_FNAME) goto gvar;
13206  tokfix();
13207  set_yylval_node(NEW_NTH_REF(atoi(tok()+1)));
13208  return tNTH_REF;
13209 
13210  default:
13211  if (!parser_is_identchar()) {
13212  pushback(c);
13213  return '$';
13214  }
13215  case '0':
13216  tokadd('$');
13217  }
13218  break;
13219 
13220  case '@':
13221  c = nextc();
13222  newtok();
13223  tokadd('@');
13224  if (c == '@') {
13225  tokadd('@');
13226  c = nextc();
13227  }
13228  if (c != -1 && ISDIGIT(c)) {
13229  if (tokidx == 1) {
13230  compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c);
13231  }
13232  else {
13233  compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c);
13234  }
13235  return 0;
13236  }
13237  if (!parser_is_identchar()) {
13238  pushback(c);
13239  return '@';
13240  }
13241  break;
13242 
13243  case '_':
13244  if (was_bol() && whole_match_p("__END__", 7, 0)) {
13245  ruby__end__seen = 1;
13246  parser->eofp = Qtrue;
13247 #ifndef RIPPER
13248  return -1;
13249 #else
13250  lex_goto_eol(parser);
13251  ripper_dispatch_scan_event(parser, k__END__);
13252  return 0;
13253 #endif
13254  }
13255  newtok();
13256  break;
13257 
13258  default:
13259  if (!parser_is_identchar()) {
13260  rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c);
13261  goto retry;
13262  }
13263 
13264  newtok();
13265  break;
13266  }
13267 
13268  mb = ENC_CODERANGE_7BIT;
13269  do {
13270  if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
13271  if (tokadd_mbchar(c) == -1) return 0;
13272  c = nextc();
13273  } while (parser_is_identchar());
13274  switch (tok()[0]) {
13275  case '@': case '$':
13276  pushback(c);
13277  break;
13278  default:
13279  if ((c == '!' || c == '?') && !peek('=')) {
13280  tokadd(c);
13281  }
13282  else {
13283  pushback(c);
13284  }
13285  }
13286  tokfix();
13287 
13288  {
13289  int result = 0;
13290 
13291  last_state = lex_state;
13292  switch (tok()[0]) {
13293  case '$':
13294  lex_state = EXPR_END;
13295  result = tGVAR;
13296  break;
13297  case '@':
13298  lex_state = EXPR_END;
13299  if (tok()[1] == '@')
13300  result = tCVAR;
13301  else
13302  result = tIVAR;
13303  break;
13304 
13305  default:
13306  if (toklast() == '!' || toklast() == '?') {
13307  result = tFID;
13308  }
13309  else {
13310  if (lex_state == EXPR_FNAME) {
13311  if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
13312  (!peek('=') || (peek_n('>', 1)))) {
13313  result = tIDENTIFIER;
13314  tokadd(c);
13315  tokfix();
13316  }
13317  else {
13318  pushback(c);
13319  }
13320  }
13321  if (result == 0 && ISUPPER(tok()[0])) {
13322  result = tCONSTANT;
13323  }
13324  else {
13325  result = tIDENTIFIER;
13326  }
13327  }
13328 
13329  if (IS_LABEL_POSSIBLE()) {
13330  if (IS_LABEL_SUFFIX(0)) {
13331  lex_state = EXPR_BEG;
13332  nextc();
13334  return tLABEL;
13335  }
13336  }
13337  if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) {
13338  const struct kwtable *kw;
13339 
13340  /* See if it is a reserved word. */
13341  kw = rb_reserved_word(tok(), toklen());
13342  if (kw) {
13343  enum lex_state_e state = lex_state;
13344  lex_state = kw->state;
13345  if (state == EXPR_FNAME) {
13347  return kw->id[0];
13348  }
13349  if (kw->id[0] == keyword_do) {
13350  command_start = TRUE;
13351  if (lpar_beg && lpar_beg == paren_nest) {
13352  lpar_beg = 0;
13353  --paren_nest;
13354  return keyword_do_LAMBDA;
13355  }
13356  if (COND_P()) return keyword_do_cond;
13357  if (CMDARG_P() && state != EXPR_CMDARG)
13358  return keyword_do_block;
13359  if (state == EXPR_ENDARG || state == EXPR_BEG)
13360  return keyword_do_block;
13361  return keyword_do;
13362  }
13363  if (state == EXPR_BEG || state == EXPR_VALUE)
13364  return kw->id[0];
13365  else {
13366  if (kw->id[0] != kw->id[1])
13367  lex_state = EXPR_BEG;
13368  return kw->id[1];
13369  }
13370  }
13371  }
13372 
13373  if (IS_BEG() ||
13374  lex_state == EXPR_DOT ||
13375  IS_ARG()) {
13376  if (cmd_state) {
13378  }
13379  else {
13380  lex_state = EXPR_ARG;
13381  }
13382  }
13383  else if (lex_state == EXPR_FNAME) {
13385  }
13386  else {
13387  lex_state = EXPR_END;
13388  }
13389  }
13390  {
13391  ID ident = TOK_INTERN(!ENC_SINGLE(mb));
13392 
13393  set_yylval_name(ident);
13394  if (last_state != EXPR_DOT && last_state != EXPR_FNAME &&
13395  is_local_id(ident) && lvar_defined(ident)) {
13396  lex_state = EXPR_END;
13397  }
13398  }
13399  return result;
13400  }
13401 }
13402 
13403 #if YYPURE
13404 static int
13405 yylex(void *lval, void *p)
13406 #else
13407 yylex(void *p)
13408 #endif
13409 {
13410  struct parser_params *parser = (struct parser_params*)p;
13411  int t;
13412 
13413 #if YYPURE
13414  parser->parser_yylval = lval;
13415  parser->parser_yylval->val = Qundef;
13416 #endif
13417  t = parser_yylex(parser);
13418 #ifdef RIPPER
13419  if (!NIL_P(parser->delayed)) {
13420  ripper_dispatch_delayed_token(parser, t);
13421  return t;
13422  }
13423  if (t != 0)
13424  ripper_dispatch_scan_event(parser, t);
13425 #endif
13426 
13427  return t;
13428 }
13429 
13430 #ifndef RIPPER
13431 static NODE*
13432 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
13433 {
13434  NODE *n = (rb_node_newnode)(type, a0, a1, a2);
13436  return n;
13437 }
13438 
13439 enum node_type
13440 nodetype(NODE *node) /* for debug */
13441 {
13442  return (enum node_type)nd_type(node);
13443 }
13444 
13445 int
13447 {
13448  return nd_line(node);
13449 }
13450 
13451 static NODE*
13453 {
13454  if (node) {
13455  node = remove_begin(node);
13456  node->flags |= NODE_FL_NEWLINE;
13457  }
13458  return node;
13459 }
13460 
13461 static void
13462 fixpos(NODE *node, NODE *orig)
13463 {
13464  if (!node) return;
13465  if (!orig) return;
13466  if (orig == (NODE*)1) return;
13467  nd_set_line(node, nd_line(orig));
13468 }
13469 
13470 static void
13471 parser_warning(struct parser_params *parser, NODE *node, const char *mesg)
13472 {
13473  rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg);
13474 }
13475 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg))
13476 
13477 static void
13478 parser_warn(struct parser_params *parser, NODE *node, const char *mesg)
13479 {
13480  rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg);
13481 }
13482 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg))
13483 
13484 static NODE*
13485 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail)
13486 {
13487  NODE *end, *h = head, *nd;
13488 
13489  if (tail == 0) return head;
13490 
13491  if (h == 0) return tail;
13492  switch (nd_type(h)) {
13493  case NODE_LIT:
13494  case NODE_STR:
13495  case NODE_SELF:
13496  case NODE_TRUE:
13497  case NODE_FALSE:
13498  case NODE_NIL:
13499  parser_warning(h, "unused literal ignored");
13500  return tail;
13501  default:
13502  h = end = NEW_BLOCK(head);
13503  end->nd_end = end;
13504  fixpos(end, head);
13505  head = end;
13506  break;
13507  case NODE_BLOCK:
13508  end = h->nd_end;
13509  break;
13510  }
13511 
13512  nd = end->nd_head;
13513  switch (nd_type(nd)) {
13514  case NODE_RETURN:
13515  case NODE_BREAK:
13516  case NODE_NEXT:
13517  case NODE_REDO:
13518  case NODE_RETRY:
13519  if (RTEST(ruby_verbose)) {
13520  parser_warning(nd, "statement not reached");
13521  }
13522  break;
13523 
13524  default:
13525  break;
13526  }
13527 
13528  if (nd_type(tail) != NODE_BLOCK) {
13529  tail = NEW_BLOCK(tail);
13530  tail->nd_end = tail;
13531  }
13532  end->nd_next = tail;
13533  h->nd_end = tail->nd_end;
13534  return head;
13535 }
13536 
13537 /* append item to the list */
13538 static NODE*
13539 list_append_gen(struct parser_params *parser, NODE *list, NODE *item)
13540 {
13541  NODE *last;
13542 
13543  if (list == 0) return NEW_LIST(item);
13544  if (list->nd_next) {
13545  last = list->nd_next->nd_end;
13546  }
13547  else {
13548  last = list;
13549  }
13550 
13551  list->nd_alen += 1;
13552  last->nd_next = NEW_LIST(item);
13553  list->nd_next->nd_end = last->nd_next;
13554  return list;
13555 }
13556 
13557 /* concat two lists */
13558 static NODE*
13559 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
13560 {
13561  NODE *last;
13562 
13563  if (head->nd_next) {
13564  last = head->nd_next->nd_end;
13565  }
13566  else {
13567  last = head;
13568  }
13569 
13570  head->nd_alen += tail->nd_alen;
13571  last->nd_next = tail;
13572  if (tail->nd_next) {
13573  head->nd_next->nd_end = tail->nd_next->nd_end;
13574  }
13575  else {
13576  head->nd_next->nd_end = tail;
13577  }
13578 
13579  return head;
13580 }
13581 
13582 static int
13583 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail)
13584 {
13585  if (NIL_P(tail)) return 1;
13586  if (!rb_enc_compatible(head, tail)) {
13587  compile_error(PARSER_ARG "string literal encodings differ (%s / %s)",
13588  rb_enc_name(rb_enc_get(head)),
13589  rb_enc_name(rb_enc_get(tail)));
13590  rb_str_resize(head, 0);
13591  rb_str_resize(tail, 0);
13592  return 0;
13593  }
13594  rb_str_buf_append(head, tail);
13595  return 1;
13596 }
13597 
13598 /* concat two string literals */
13599 static NODE *
13600 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
13601 {
13602  enum node_type htype;
13603 
13604  if (!head) return tail;
13605  if (!tail) return head;
13606 
13607  htype = nd_type(head);
13608  if (htype == NODE_EVSTR) {
13609  NODE *node = NEW_DSTR(Qnil);
13610  head = list_append(node, head);
13611  }
13612  switch (nd_type(tail)) {
13613  case NODE_STR:
13614  if (htype == NODE_STR) {
13615  if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) {
13616  error:
13617  rb_gc_force_recycle((VALUE)head);
13618  rb_gc_force_recycle((VALUE)tail);
13619  return 0;
13620  }
13621  rb_gc_force_recycle((VALUE)tail);
13622  }
13623  else {
13624  list_append(head, tail);
13625  }
13626  break;
13627 
13628  case NODE_DSTR:
13629  if (htype == NODE_STR) {
13630  if (!literal_concat0(parser, head->nd_lit, tail->nd_lit))
13631  goto error;
13632  tail->nd_lit = head->nd_lit;
13633  rb_gc_force_recycle((VALUE)head);
13634  head = tail;
13635  }
13636  else if (NIL_P(tail->nd_lit)) {
13637  head->nd_alen += tail->nd_alen - 1;
13638  head->nd_next->nd_end->nd_next = tail->nd_next;
13639  head->nd_next->nd_end = tail->nd_next->nd_end;
13640  rb_gc_force_recycle((VALUE)tail);
13641  }
13642  else {
13643  nd_set_type(tail, NODE_ARRAY);
13644  tail->nd_head = NEW_STR(tail->nd_lit);
13645  list_concat(head, tail);
13646  }
13647  break;
13648 
13649  case NODE_EVSTR:
13650  if (htype == NODE_STR) {
13651  nd_set_type(head, NODE_DSTR);
13652  head->nd_alen = 1;
13653  }
13654  list_append(head, tail);
13655  break;
13656  }
13657  return head;
13658 }
13659 
13660 static NODE *
13661 evstr2dstr_gen(struct parser_params *parser, NODE *node)
13662 {
13663  if (nd_type(node) == NODE_EVSTR) {
13664  node = list_append(NEW_DSTR(Qnil), node);
13665  }
13666  return node;
13667 }
13668 
13669 static NODE *
13670 new_evstr_gen(struct parser_params *parser, NODE *node)
13671 {
13672  NODE *head = node;
13673 
13674  if (node) {
13675  switch (nd_type(node)) {
13676  case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
13677  return node;
13678  }
13679  }
13680  return NEW_EVSTR(head);
13681 }
13682 
13683 static NODE *
13684 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1)
13685 {
13686  value_expr(recv);
13687  value_expr(arg1);
13688  return NEW_CALL(recv, id, NEW_LIST(arg1));
13689 }
13690 
13691 static NODE *
13692 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id)
13693 {
13694  value_expr(recv);
13695  return NEW_CALL(recv, id, 0);
13696 }
13697 
13698 static NODE*
13699 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2)
13700 {
13701  value_expr(node1);
13702  value_expr(node2);
13703  if (node1) {
13704  switch (nd_type(node1)) {
13705  case NODE_DREGX:
13706  case NODE_DREGX_ONCE:
13707  return NEW_MATCH2(node1, node2);
13708 
13709  case NODE_LIT:
13710  if (TYPE(node1->nd_lit) == T_REGEXP) {
13711  return NEW_MATCH2(node1, node2);
13712  }
13713  }
13714  }
13715 
13716  if (node2) {
13717  switch (nd_type(node2)) {
13718  case NODE_DREGX:
13719  case NODE_DREGX_ONCE:
13720  return NEW_MATCH3(node2, node1);
13721 
13722  case NODE_LIT:
13723  if (TYPE(node2->nd_lit) == T_REGEXP) {
13724  return NEW_MATCH3(node2, node1);
13725  }
13726  }
13727  }
13728 
13729  return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
13730 }
13731 
13732 static NODE*
13733 gettable_gen(struct parser_params *parser, ID id)
13734 {
13735  if (id == keyword_self) {
13736  return NEW_SELF();
13737  }
13738  else if (id == keyword_nil) {
13739  return NEW_NIL();
13740  }
13741  else if (id == keyword_true) {
13742  return NEW_TRUE();
13743  }
13744  else if (id == keyword_false) {
13745  return NEW_FALSE();
13746  }
13747  else if (id == keyword__FILE__) {
13750  }
13751  else if (id == keyword__LINE__) {
13752  return NEW_LIT(INT2FIX(ruby_sourceline));
13753  }
13754  else if (id == keyword__ENCODING__) {
13755  return NEW_LIT(rb_enc_from_encoding(parser->enc));
13756  }
13757  else if (is_local_id(id)) {
13758  if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id);
13759  if (local_id(id)) return NEW_LVAR(id);
13760  /* method call without arguments */
13761  return NEW_VCALL(id);
13762  }
13763  else if (is_global_id(id)) {
13764  return NEW_GVAR(id);
13765  }
13766  else if (is_instance_id(id)) {
13767  return NEW_IVAR(id);
13768  }
13769  else if (is_const_id(id)) {
13770  return NEW_CONST(id);
13771  }
13772  else if (is_class_id(id)) {
13773  return NEW_CVAR(id);
13774  }
13775  compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
13776  return 0;
13777 }
13778 #else /* !RIPPER */
13779 static int
13780 id_is_var_gen(struct parser_params *parser, ID id)
13781 {
13782  if (is_notop_id(id)) {
13783  switch (id & ID_SCOPE_MASK) {
13784  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
13785  return 1;
13786  case ID_LOCAL:
13787  if (dyna_in_block() && dvar_defined(id)) return 1;
13788  if (local_id(id)) return 1;
13789  /* method call without arguments */
13790  return 0;
13791  }
13792  }
13793  compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
13794  return 0;
13795 }
13796 #endif /* !RIPPER */
13797 
13798 #ifdef RIPPER
13799 static VALUE
13800 assignable_gen(struct parser_params *parser, VALUE lhs)
13801 #else
13802 static NODE*
13803 assignable_gen(struct parser_params *parser, ID id, NODE *val)
13804 #endif
13805 {
13806 #ifdef RIPPER
13807  ID id = get_id(lhs);
13808 # define assignable_result(x) get_value(lhs)
13809 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs)
13810 #else
13811 # define assignable_result(x) (x)
13812 #endif
13813  if (!id) return assignable_result(0);
13814  if (id == keyword_self) {
13815  yyerror("Can't change the value of self");
13816  }
13817  else if (id == keyword_nil) {
13818  yyerror("Can't assign to nil");
13819  }
13820  else if (id == keyword_true) {
13821  yyerror("Can't assign to true");
13822  }
13823  else if (id == keyword_false) {
13824  yyerror("Can't assign to false");
13825  }
13826  else if (id == keyword__FILE__) {
13827  yyerror("Can't assign to __FILE__");
13828  }
13829  else if (id == keyword__LINE__) {
13830  yyerror("Can't assign to __LINE__");
13831  }
13832  else if (id == keyword__ENCODING__) {
13833  yyerror("Can't assign to __ENCODING__");
13834  }
13835  else if (is_local_id(id)) {
13836  if (dyna_in_block()) {
13837  if (dvar_curr(id)) {
13838  return assignable_result(NEW_DASGN_CURR(id, val));
13839  }
13840  else if (dvar_defined(id)) {
13841  return assignable_result(NEW_DASGN(id, val));
13842  }
13843  else if (local_id(id)) {
13844  return assignable_result(NEW_LASGN(id, val));
13845  }
13846  else {
13847  dyna_var(id);
13848  return assignable_result(NEW_DASGN_CURR(id, val));
13849  }
13850  }
13851  else {
13852  if (!local_id(id)) {
13853  local_var(id);
13854  }
13855  return assignable_result(NEW_LASGN(id, val));
13856  }
13857  }
13858  else if (is_global_id(id)) {
13859  return assignable_result(NEW_GASGN(id, val));
13860  }
13861  else if (is_instance_id(id)) {
13862  return assignable_result(NEW_IASGN(id, val));
13863  }
13864  else if (is_const_id(id)) {
13865  if (!in_def && !in_single)
13866  return assignable_result(NEW_CDECL(id, val, 0));
13867  yyerror("dynamic constant assignment");
13868  }
13869  else if (is_class_id(id)) {
13870  return assignable_result(NEW_CVASGN(id, val));
13871  }
13872  else {
13873  compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id));
13874  }
13875  return assignable_result(0);
13876 #undef assignable_result
13877 #undef parser_yyerror
13878 }
13879 
13880 #define LVAR_USED ((int)1 << (sizeof(int) * CHAR_BIT - 1))
13881 
13882 static ID
13883 shadowing_lvar_gen(struct parser_params *parser, ID name)
13884 {
13885  if (idUScore == name) return name;
13886  if (dyna_in_block()) {
13887  if (dvar_curr(name)) {
13888  yyerror("duplicated argument name");
13889  }
13890  else if (dvar_defined_get(name) || local_id(name)) {
13891  rb_warningS("shadowing outer local variable - %s", rb_id2name(name));
13892  vtable_add(lvtbl->vars, name);
13893  if (lvtbl->used) {
13895  }
13896  }
13897  }
13898  else {
13899  if (local_id(name)) {
13900  yyerror("duplicated argument name");
13901  }
13902  }
13903  return name;
13904 }
13905 
13906 static void
13907 new_bv_gen(struct parser_params *parser, ID name)
13908 {
13909  if (!name) return;
13910  if (!is_local_id(name)) {
13911  compile_error(PARSER_ARG "invalid local variable - %s",
13912  rb_id2name(name));
13913  return;
13914  }
13915  shadowing_lvar(name);
13916  dyna_var(name);
13917 }
13918 
13919 #ifndef RIPPER
13920 static NODE *
13921 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx)
13922 {
13923  if (recv && nd_type(recv) == NODE_SELF)
13924  recv = (NODE *)1;
13925  return NEW_ATTRASGN(recv, tASET, idx);
13926 }
13927 
13928 static void
13929 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2)
13930 {
13931  if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
13932  compile_error(PARSER_ARG "both block arg and actual block given");
13933  }
13934 }
13935 
13936 ID
13938 {
13939  id &= ~ID_SCOPE_MASK;
13940  id |= ID_ATTRSET;
13941  return id;
13942 }
13943 
13944 static NODE *
13945 attrset_gen(struct parser_params *parser, NODE *recv, ID id)
13946 {
13947  if (recv && nd_type(recv) == NODE_SELF)
13948  recv = (NODE *)1;
13949  return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
13950 }
13951 
13952 static void
13954 {
13955  switch (nd_type(node)) {
13956  case NODE_NTH_REF:
13957  compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth);
13958  break;
13959  case NODE_BACK_REF:
13960  compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth);
13961  break;
13962  }
13963 }
13964 
13965 static NODE *
13966 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2)
13967 {
13968  if (!node2) return node1;
13969  switch (nd_type(node1)) {
13970  case NODE_BLOCK_PASS:
13971  if (node1->nd_head)
13972  node1->nd_head = arg_concat(node1->nd_head, node2);
13973  else
13974  node1->nd_head = NEW_LIST(node2);
13975  return node1;
13976  case NODE_ARGSPUSH:
13977  if (nd_type(node2) != NODE_ARRAY) break;
13978  node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2);
13979  nd_set_type(node1, NODE_ARGSCAT);
13980  return node1;
13981  case NODE_ARGSCAT:
13982  if (nd_type(node2) != NODE_ARRAY ||
13983  nd_type(node1->nd_body) != NODE_ARRAY) break;
13984  node1->nd_body = list_concat(node1->nd_body, node2);
13985  return node1;
13986  }
13987  return NEW_ARGSCAT(node1, node2);
13988 }
13989 
13990 static NODE *
13991 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2)
13992 {
13993  if (!node1) return NEW_LIST(node2);
13994  switch (nd_type(node1)) {
13995  case NODE_ARRAY:
13996  return list_append(node1, node2);
13997  case NODE_BLOCK_PASS:
13998  node1->nd_head = arg_append(node1->nd_head, node2);
13999  return node1;
14000  case NODE_ARGSPUSH:
14001  node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2);
14002  nd_set_type(node1, NODE_ARGSCAT);
14003  return node1;
14004  }
14005  return NEW_ARGSPUSH(node1, node2);
14006 }
14007 
14008 static NODE *
14010 {
14011  if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
14012  if (nd_type(node) == NODE_ARRAY) return node;
14013  return 0;
14014 }
14015 
14016 static NODE *
14017 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs)
14018 {
14019  if (!lhs) return 0;
14020 
14021  switch (nd_type(lhs)) {
14022  case NODE_GASGN:
14023  case NODE_IASGN:
14024  case NODE_IASGN2:
14025  case NODE_LASGN:
14026  case NODE_DASGN:
14027  case NODE_DASGN_CURR:
14028  case NODE_MASGN:
14029  case NODE_CDECL:
14030  case NODE_CVASGN:
14031  lhs->nd_value = rhs;
14032  break;
14033 
14034  case NODE_ATTRASGN:
14035  case NODE_CALL:
14036  lhs->nd_args = arg_append(lhs->nd_args, rhs);
14037  break;
14038 
14039  default:
14040  /* should not happen */
14041  break;
14042  }
14043 
14044  return lhs;
14045 }
14046 
14047 static int
14048 value_expr_gen(struct parser_params *parser, NODE *node)
14049 {
14050  int cond = 0;
14051 
14052  if (!node) {
14053  rb_warning0("empty expression");
14054  }
14055  while (node) {
14056  switch (nd_type(node)) {
14057  case NODE_DEFN:
14058  case NODE_DEFS:
14059  parser_warning(node, "void value expression");
14060  return FALSE;
14061 
14062  case NODE_RETURN:
14063  case NODE_BREAK:
14064  case NODE_NEXT:
14065  case NODE_REDO:
14066  case NODE_RETRY:
14067  if (!cond) yyerror("void value expression");
14068  /* or "control never reach"? */
14069  return FALSE;
14070 
14071  case NODE_BLOCK:
14072  while (node->nd_next) {
14073  node = node->nd_next;
14074  }
14075  node = node->nd_head;
14076  break;
14077 
14078  case NODE_BEGIN:
14079  node = node->nd_body;
14080  break;
14081 
14082  case NODE_IF:
14083  if (!node->nd_body) {
14084  node = node->nd_else;
14085  break;
14086  }
14087  else if (!node->nd_else) {
14088  node = node->nd_body;
14089  break;
14090  }
14091  if (!value_expr(node->nd_body)) return FALSE;
14092  node = node->nd_else;
14093  break;
14094 
14095  case NODE_AND:
14096  case NODE_OR:
14097  cond = 1;
14098  node = node->nd_2nd;
14099  break;
14100 
14101  default:
14102  return TRUE;
14103  }
14104  }
14105 
14106  return TRUE;
14107 }
14108 
14109 static void
14110 void_expr_gen(struct parser_params *parser, NODE *node)
14111 {
14112  const char *useless = 0;
14113 
14114  if (!RTEST(ruby_verbose)) return;
14115 
14116  if (!node) return;
14117  switch (nd_type(node)) {
14118  case NODE_CALL:
14119  switch (node->nd_mid) {
14120  case '+':
14121  case '-':
14122  case '*':
14123  case '/':
14124  case '%':
14125  case tPOW:
14126  case tUPLUS:
14127  case tUMINUS:
14128  case '|':
14129  case '^':
14130  case '&':
14131  case tCMP:
14132  case '>':
14133  case tGEQ:
14134  case '<':
14135  case tLEQ:
14136  case tEQ:
14137  case tNEQ:
14138  useless = rb_id2name(node->nd_mid);
14139  break;
14140  }
14141  break;
14142 
14143  case NODE_LVAR:
14144  case NODE_DVAR:
14145  case NODE_GVAR:
14146  case NODE_IVAR:
14147  case NODE_CVAR:
14148  case NODE_NTH_REF:
14149  case NODE_BACK_REF:
14150  useless = "a variable";
14151  break;
14152  case NODE_CONST:
14153  useless = "a constant";
14154  break;
14155  case NODE_LIT:
14156  case NODE_STR:
14157  case NODE_DSTR:
14158  case NODE_DREGX:
14159  case NODE_DREGX_ONCE:
14160  useless = "a literal";
14161  break;
14162  case NODE_COLON2:
14163  case NODE_COLON3:
14164  useless = "::";
14165  break;
14166  case NODE_DOT2:
14167  useless = "..";
14168  break;
14169  case NODE_DOT3:
14170  useless = "...";
14171  break;
14172  case NODE_SELF:
14173  useless = "self";
14174  break;
14175  case NODE_NIL:
14176  useless = "nil";
14177  break;
14178  case NODE_TRUE:
14179  useless = "true";
14180  break;
14181  case NODE_FALSE:
14182  useless = "false";
14183  break;
14184  case NODE_DEFINED:
14185  useless = "defined?";
14186  break;
14187  }
14188 
14189  if (useless) {
14190  int line = ruby_sourceline;
14191 
14192  ruby_sourceline = nd_line(node);
14193  rb_warnS("possibly useless use of %s in void context", useless);
14194  ruby_sourceline = line;
14195  }
14196 }
14197 
14198 static void
14199 void_stmts_gen(struct parser_params *parser, NODE *node)
14200 {
14201  if (!RTEST(ruby_verbose)) return;
14202  if (!node) return;
14203  if (nd_type(node) != NODE_BLOCK) return;
14204 
14205  for (;;) {
14206  if (!node->nd_next) return;
14207  void_expr0(node->nd_head);
14208  node = node->nd_next;
14209  }
14210 }
14211 
14212 static NODE *
14214 {
14215  NODE **n = &node, *n1 = node;
14216  while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
14217  *n = n1 = n1->nd_body;
14218  }
14219  return node;
14220 }
14221 
14222 static void
14223 reduce_nodes_gen(struct parser_params *parser, NODE **body)
14224 {
14225  NODE *node = *body;
14226 
14227  if (!node) {
14228  *body = NEW_NIL();
14229  return;
14230  }
14231 #define subnodes(n1, n2) \
14232  ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
14233  (!node->n2) ? (body = &node->n1, 1) : \
14234  (reduce_nodes(&node->n1), body = &node->n2, 1))
14235 
14236  while (node) {
14237  int newline = (int)(node->flags & NODE_FL_NEWLINE);
14238  switch (nd_type(node)) {
14239  end:
14240  case NODE_NIL:
14241  *body = 0;
14242  return;
14243  case NODE_RETURN:
14244  *body = node = node->nd_stts;
14245  if (newline && node) node->flags |= NODE_FL_NEWLINE;
14246  continue;
14247  case NODE_BEGIN:
14248  *body = node = node->nd_body;
14249  if (newline && node) node->flags |= NODE_FL_NEWLINE;
14250  continue;
14251  case NODE_BLOCK:
14252  body = &node->nd_end->nd_head;
14253  break;
14254  case NODE_IF:
14255  if (subnodes(nd_body, nd_else)) break;
14256  return;
14257  case NODE_CASE:
14258  body = &node->nd_body;
14259  break;
14260  case NODE_WHEN:
14261  if (!subnodes(nd_body, nd_next)) goto end;
14262  break;
14263  case NODE_ENSURE:
14264  if (!subnodes(nd_head, nd_resq)) goto end;
14265  break;
14266  case NODE_RESCUE:
14267  if (node->nd_else) {
14268  body = &node->nd_resq;
14269  break;
14270  }
14271  if (!subnodes(nd_head, nd_resq)) goto end;
14272  break;
14273  default:
14274  return;
14275  }
14276  node = *body;
14277  if (newline && node) node->flags |= NODE_FL_NEWLINE;
14278  }
14279 
14280 #undef subnodes
14281 }
14282 
14283 static int
14284 assign_in_cond(struct parser_params *parser, NODE *node)
14285 {
14286  switch (nd_type(node)) {
14287  case NODE_MASGN:
14288  yyerror("multiple assignment in conditional");
14289  return 1;
14290 
14291  case NODE_LASGN:
14292  case NODE_DASGN:
14293  case NODE_DASGN_CURR:
14294  case NODE_GASGN:
14295  case NODE_IASGN:
14296  break;
14297 
14298  default:
14299  return 0;
14300  }
14301 
14302  if (!node->nd_value) return 1;
14303  switch (nd_type(node->nd_value)) {
14304  case NODE_LIT:
14305  case NODE_STR:
14306  case NODE_NIL:
14307  case NODE_TRUE:
14308  case NODE_FALSE:
14309  /* reports always */
14310  parser_warn(node->nd_value, "found = in conditional, should be ==");
14311  return 1;
14312 
14313  case NODE_DSTR:
14314  case NODE_XSTR:
14315  case NODE_DXSTR:
14316  case NODE_EVSTR:
14317  case NODE_DREGX:
14318  default:
14319  break;
14320  }
14321  return 1;
14322 }
14323 
14324 static void
14325 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
14326 {
14327  if (!e_option_supplied(parser)) parser_warn(node, str);
14328 }
14329 
14330 static void
14331 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
14332 {
14333  if (!e_option_supplied(parser)) parser_warning(node, str);
14334 }
14335 
14336 static void
14337 fixup_nodes(NODE **rootnode)
14338 {
14339  NODE *node, *next, *head;
14340 
14341  for (node = *rootnode; node; node = next) {
14342  enum node_type type;
14343  VALUE val;
14344 
14345  next = node->nd_next;
14346  head = node->nd_head;
14347  rb_gc_force_recycle((VALUE)node);
14348  *rootnode = next;
14349  switch (type = nd_type(head)) {
14350  case NODE_DOT2:
14351  case NODE_DOT3:
14352  val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit,
14353  type == NODE_DOT3);
14354  rb_gc_force_recycle((VALUE)head->nd_beg);
14355  rb_gc_force_recycle((VALUE)head->nd_end);
14356  nd_set_type(head, NODE_LIT);
14357  head->nd_lit = val;
14358  break;
14359  default:
14360  break;
14361  }
14362  }
14363 }
14364 
14365 static NODE *cond0(struct parser_params*,NODE*);
14366 
14367 static NODE*
14368 range_op(struct parser_params *parser, NODE *node)
14369 {
14370  enum node_type type;
14371 
14372  if (node == 0) return 0;
14373 
14374  type = nd_type(node);
14375  value_expr(node);
14376  if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
14377  warn_unless_e_option(parser, node, "integer literal in conditional range");
14378  return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."))));
14379  }
14380  return cond0(parser, node);
14381 }
14382 
14383 static int
14385 {
14386  if (!node) return 1; /* same as NODE_NIL */
14387  switch (nd_type(node)) {
14388  case NODE_LIT:
14389  case NODE_STR:
14390  case NODE_DSTR:
14391  case NODE_EVSTR:
14392  case NODE_DREGX:
14393  case NODE_DREGX_ONCE:
14394  case NODE_DSYM:
14395  return 2;
14396  case NODE_TRUE:
14397  case NODE_FALSE:
14398  case NODE_NIL:
14399  return 1;
14400  }
14401  return 0;
14402 }
14403 
14404 static NODE*
14405 cond0(struct parser_params *parser, NODE *node)
14406 {
14407  if (node == 0) return 0;
14408  assign_in_cond(parser, node);
14409 
14410  switch (nd_type(node)) {
14411  case NODE_DSTR:
14412  case NODE_EVSTR:
14413  case NODE_STR:
14414  rb_warn0("string literal in condition");
14415  break;
14416 
14417  case NODE_DREGX:
14418  case NODE_DREGX_ONCE:
14419  warning_unless_e_option(parser, node, "regex literal in condition");
14420  return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
14421 
14422  case NODE_AND:
14423  case NODE_OR:
14424  node->nd_1st = cond0(parser, node->nd_1st);
14425  node->nd_2nd = cond0(parser, node->nd_2nd);
14426  break;
14427 
14428  case NODE_DOT2:
14429  case NODE_DOT3:
14430  node->nd_beg = range_op(parser, node->nd_beg);
14431  node->nd_end = range_op(parser, node->nd_end);
14432  if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
14433  else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
14434  if (!e_option_supplied(parser)) {
14435  int b = literal_node(node->nd_beg);
14436  int e = literal_node(node->nd_end);
14437  if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
14438  parser_warn(node, "range literal in condition");
14439  }
14440  }
14441  break;
14442 
14443  case NODE_DSYM:
14444  parser_warning(node, "literal in condition");
14445  break;
14446 
14447  case NODE_LIT:
14448  if (TYPE(node->nd_lit) == T_REGEXP) {
14449  warn_unless_e_option(parser, node, "regex literal in condition");
14450  nd_set_type(node, NODE_MATCH);
14451  }
14452  else {
14453  parser_warning(node, "literal in condition");
14454  }
14455  default:
14456  break;
14457  }
14458  return node;
14459 }
14460 
14461 static NODE*
14462 cond_gen(struct parser_params *parser, NODE *node)
14463 {
14464  if (node == 0) return 0;
14465  return cond0(parser, node);
14466 }
14467 
14468 static NODE*
14469 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right)
14470 {
14471  value_expr(left);
14472  if (left && (enum node_type)nd_type(left) == type) {
14473  NODE *node = left, *second;
14474  while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
14475  node = second;
14476  }
14477  node->nd_2nd = NEW_NODE(type, second, right, 0);
14478  return left;
14479  }
14480  return NEW_NODE(type, left, right, 0);
14481 }
14482 
14483 static void
14484 no_blockarg(struct parser_params *parser, NODE *node)
14485 {
14486  if (node && nd_type(node) == NODE_BLOCK_PASS) {
14487  compile_error(PARSER_ARG "block argument should not be given");
14488  }
14489 }
14490 
14491 static NODE *
14492 ret_args_gen(struct parser_params *parser, NODE *node)
14493 {
14494  if (node) {
14495  no_blockarg(parser, node);
14496  if (nd_type(node) == NODE_ARRAY) {
14497  if (node->nd_next == 0) {
14498  node = node->nd_head;
14499  }
14500  else {
14501  nd_set_type(node, NODE_VALUES);
14502  }
14503  }
14504  }
14505  return node;
14506 }
14507 
14508 static NODE *
14509 new_yield_gen(struct parser_params *parser, NODE *node)
14510 {
14511  long state = Qtrue;
14512 
14513  if (node) {
14514  no_blockarg(parser, node);
14515  if (node && nd_type(node) == NODE_SPLAT) {
14516  state = Qtrue;
14517  }
14518  }
14519  else {
14520  state = Qfalse;
14521  }
14522  return NEW_YIELD(node, state);
14523 }
14524 
14525 static NODE*
14527 {
14528  switch (TYPE(node->nd_lit)) {
14529  case T_FIXNUM:
14530  node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
14531  break;
14532  case T_BIGNUM:
14533  node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
14534  break;
14535  case T_FLOAT:
14536  RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit);
14537  break;
14538  default:
14539  break;
14540  }
14541  return node;
14542 }
14543 
14544 static NODE *
14545 arg_blk_pass(NODE *node1, NODE *node2)
14546 {
14547  if (node2) {
14548  node2->nd_head = node1;
14549  return node2;
14550  }
14551  return node1;
14552 }
14553 
14554 static NODE*
14555 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b)
14556 {
14557  int saved_line = ruby_sourceline;
14558  NODE *node;
14559  NODE *i1, *i2 = 0;
14560 
14561  node = NEW_ARGS(m ? m->nd_plen : 0, o);
14562  i1 = m ? m->nd_next : 0;
14563  node->nd_next = NEW_ARGS_AUX(r, b);
14564 
14565  if (p) {
14566  i2 = p->nd_next;
14567  node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen);
14568  }
14569  else if (i1) {
14570  node->nd_next->nd_next = NEW_ARGS_AUX(0, 0);
14571  }
14572  if (i1 || i2) {
14573  node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0);
14574  }
14575  ruby_sourceline = saved_line;
14576  return node;
14577 }
14578 #endif /* !RIPPER */
14579 
14580 static void
14581 warn_unused_var(struct parser_params *parser, struct local_vars *local)
14582 {
14583  int i, cnt;
14584  ID *v, *u;
14585 
14586  if (!local->used) return;
14587  v = local->vars->tbl;
14588  u = local->used->tbl;
14589  cnt = local->used->pos;
14590  if (cnt != local->vars->pos) {
14591  rb_bug("local->used->pos != local->vars->pos");
14592  }
14593  for (i = 0; i < cnt; ++i) {
14594  if (!v[i] || (u[i] & LVAR_USED)) continue;
14595  if (idUScore == v[i]) continue;
14596  rb_compile_warn(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i]));
14597  }
14598 }
14599 
14600 static void
14601 local_push_gen(struct parser_params *parser, int inherit_dvars)
14602 {
14603  struct local_vars *local;
14604 
14605  local = ALLOC(struct local_vars);
14606  local->prev = lvtbl;
14607  local->args = vtable_alloc(0);
14608  local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
14609  local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0;
14610  lvtbl = local;
14611 }
14612 
14613 static void
14615 {
14616  struct local_vars *local = lvtbl->prev;
14617  if (lvtbl->used) {
14618  warn_unused_var(parser, lvtbl);
14619  vtable_free(lvtbl->used);
14620  }
14621  vtable_free(lvtbl->args);
14622  vtable_free(lvtbl->vars);
14623  xfree(lvtbl);
14624  lvtbl = local;
14625 }
14626 
14627 #ifndef RIPPER
14628 static ID*
14629 vtable_tblcpy(ID *buf, const struct vtable *src)
14630 {
14631  int i, cnt = vtable_size(src);
14632 
14633  if (cnt > 0) {
14634  buf[0] = cnt;
14635  for (i = 0; i < cnt; i++) {
14636  buf[i] = src->tbl[i];
14637  }
14638  return buf;
14639  }
14640  return 0;
14641 }
14642 
14643 static ID*
14645 {
14646  int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars);
14647  ID *buf;
14648 
14649  if (cnt <= 0) return 0;
14650  buf = ALLOC_N(ID, cnt + 1);
14651  vtable_tblcpy(buf+1, lvtbl->args);
14652  vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars);
14653  buf[0] = cnt;
14654  return buf;
14655 }
14656 #endif
14657 
14658 static int
14659 arg_var_gen(struct parser_params *parser, ID id)
14660 {
14661  vtable_add(lvtbl->args, id);
14662  return vtable_size(lvtbl->args) - 1;
14663 }
14664 
14665 static int
14666 local_var_gen(struct parser_params *parser, ID id)
14667 {
14668  vtable_add(lvtbl->vars, id);
14669  if (lvtbl->used) {
14671  }
14672  return vtable_size(lvtbl->vars) - 1;
14673 }
14674 
14675 static int
14676 local_id_gen(struct parser_params *parser, ID id)
14677 {
14678  struct vtable *vars, *args, *used;
14679 
14680  vars = lvtbl->vars;
14681  args = lvtbl->args;
14682  used = lvtbl->used;
14683 
14684  while (vars && POINTER_P(vars->prev)) {
14685  vars = vars->prev;
14686  args = args->prev;
14687  if (used) used = used->prev;
14688  }
14689 
14690  if (vars && vars->prev == DVARS_INHERIT) {
14691  return rb_local_defined(id);
14692  }
14693  else if (vtable_included(args, id)) {
14694  return 1;
14695  }
14696  else {
14697  int i = vtable_included(vars, id);
14698  if (i && used) used->tbl[i-1] |= LVAR_USED;
14699  return i != 0;
14700  }
14701 }
14702 
14703 static const struct vtable *
14705 {
14706  lvtbl->args = vtable_alloc(lvtbl->args);
14707  lvtbl->vars = vtable_alloc(lvtbl->vars);
14708  if (lvtbl->used) {
14709  lvtbl->used = vtable_alloc(lvtbl->used);
14710  }
14711  return lvtbl->args;
14712 }
14713 
14714 static void
14715 dyna_pop_1(struct parser_params *parser)
14716 {
14717  struct vtable *tmp;
14718 
14719  if ((tmp = lvtbl->used) != 0) {
14720  warn_unused_var(parser, lvtbl);
14721  lvtbl->used = lvtbl->used->prev;
14722  vtable_free(tmp);
14723  }
14724  tmp = lvtbl->args;
14725  lvtbl->args = lvtbl->args->prev;
14726  vtable_free(tmp);
14727  tmp = lvtbl->vars;
14728  lvtbl->vars = lvtbl->vars->prev;
14729  vtable_free(tmp);
14730 }
14731 
14732 static void
14733 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
14734 {
14735  while (lvtbl->args != lvargs) {
14736  dyna_pop_1(parser);
14737  if (!lvtbl->args) {
14738  struct local_vars *local = lvtbl->prev;
14739  xfree(lvtbl);
14740  lvtbl = local;
14741  }
14742  }
14743  dyna_pop_1(parser);
14744 }
14745 
14746 static int
14748 {
14749  return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE;
14750 }
14751 
14752 static int
14753 dvar_defined_gen(struct parser_params *parser, ID id, int get)
14754 {
14755  struct vtable *vars, *args, *used;
14756  int i;
14757 
14758  args = lvtbl->args;
14759  vars = lvtbl->vars;
14760  used = lvtbl->used;
14761 
14762  while (POINTER_P(vars)) {
14763  if (vtable_included(args, id)) {
14764  return 1;
14765  }
14766  if ((i = vtable_included(vars, id)) != 0) {
14767  if (used) used->tbl[i-1] |= LVAR_USED;
14768  return 1;
14769  }
14770  args = args->prev;
14771  vars = vars->prev;
14772  if (get) used = 0;
14773  if (used) used = used->prev;
14774  }
14775 
14776  if (vars == DVARS_INHERIT) {
14777  return rb_dvar_defined(id);
14778  }
14779 
14780  return 0;
14781 }
14782 
14783 static int
14784 dvar_curr_gen(struct parser_params *parser, ID id)
14785 {
14786  return (vtable_included(lvtbl->args, id) ||
14787  vtable_included(lvtbl->vars, id));
14788 }
14789 
14790 #ifndef RIPPER
14791 static void
14793 {
14794  int c = RE_OPTION_ENCODING_IDX(options);
14795 
14796  if (c) {
14797  int opt, idx;
14798  rb_char_to_option_kcode(c, &opt, &idx);
14799  if (idx != ENCODING_GET(str) &&
14801  goto error;
14802  }
14803  ENCODING_SET(str, idx);
14804  }
14805  else if (RE_OPTION_ENCODING_NONE(options)) {
14806  if (!ENCODING_IS_ASCII8BIT(str) &&
14808  c = 'n';
14809  goto error;
14810  }
14812  }
14813  else if (parser->enc == rb_usascii_encoding()) {
14815  /* raise in re.c */
14817  }
14818  else {
14820  }
14821  }
14822  return;
14823 
14824  error:
14826  "regexp encoding option '%c' differs from source encoding '%s'",
14827  c, rb_enc_name(rb_enc_get(str)));
14828 }
14829 
14830 static int
14832 {
14833  VALUE err;
14834  reg_fragment_setenc(str, options);
14835  err = rb_reg_check_preprocess(str);
14836  if (err != Qnil) {
14837  err = rb_obj_as_string(err);
14838  compile_error(PARSER_ARG "%s", RSTRING_PTR(err));
14839  RB_GC_GUARD(err);
14840  return 0;
14841  }
14842  return 1;
14843 }
14844 
14845 typedef struct {
14850  int num;
14852 
14853 static int
14855  int back_num, int *back_refs, OnigRegex regex, void *arg0)
14856 {
14858  struct parser_params* parser = arg->parser;
14859  rb_encoding *enc = arg->enc;
14860  long len = name_end - name;
14861  const char *s = (const char *)name;
14862  ID var;
14863 
14864  arg->num++;
14865 
14866  if (arg->succ_block == 0) {
14867  arg->succ_block = NEW_BEGIN(0);
14868  arg->fail_block = NEW_BEGIN(0);
14869  }
14870 
14871  if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) ||
14872  (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) ||
14873  !rb_enc_symname2_p(s, len, enc)) {
14874  return ST_CONTINUE;
14875  }
14876  var = rb_intern3(s, len, enc);
14877  if (dvar_defined(var) || local_id(var)) {
14878  rb_warningS("named capture conflicts a local variable - %s",
14879  rb_id2name(var));
14880  }
14881  arg->succ_block = block_append(arg->succ_block,
14883  NEW_CALL(
14884  gettable(rb_intern("$~")),
14885  idAREF,
14886  NEW_LIST(NEW_LIT(ID2SYM(var))))
14887  )));
14888  arg->fail_block = block_append(arg->fail_block,
14890  return ST_CONTINUE;
14891 }
14892 
14893 static NODE *
14895 {
14897 
14898  arg.parser = parser;
14899  arg.enc = rb_enc_get(regexp);
14900  arg.succ_block = 0;
14901  arg.fail_block = 0;
14902  arg.num = 0;
14903  onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg);
14904 
14905  if (arg.num == 0)
14906  return match;
14907 
14908  return
14909  block_append(
14910  newline_node(match),
14911  NEW_IF(gettable(rb_intern("$~")),
14912  block_append(
14913  newline_node(arg.succ_block),
14914  newline_node(
14915  NEW_CALL(
14916  gettable(rb_intern("$~")),
14917  rb_intern("begin"),
14918  NEW_LIST(NEW_LIT(INT2FIX(0)))))),
14919  block_append(
14920  newline_node(arg.fail_block),
14921  newline_node(
14922  NEW_LIT(Qnil)))));
14923 }
14924 
14925 static VALUE
14926 reg_compile_gen(struct parser_params* parser, VALUE str, int options)
14927 {
14928  VALUE re;
14929  VALUE err;
14930 
14931  reg_fragment_setenc(str, options);
14932  err = rb_errinfo();
14934  if (NIL_P(re)) {
14935  ID mesg = rb_intern("mesg");
14936  VALUE m = rb_attr_get(rb_errinfo(), mesg);
14937  rb_set_errinfo(err);
14938  if (!NIL_P(err)) {
14939  rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m);
14940  }
14941  else {
14943  }
14944  return Qnil;
14945  }
14946  return re;
14947 }
14948 
14949 void
14951 {
14952 }
14953 
14954 NODE*
14956 {
14957  NODE *prelude = 0;
14958  NODE *scope = node;
14959  struct parser_params *parser;
14960 
14961  if (!node) return node;
14962 
14963  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
14964 
14965  node = node->nd_body;
14966 
14967  if (nd_type(node) == NODE_PRELUDE) {
14968  prelude = node;
14969  node = node->nd_body;
14970  }
14971 
14972  node = block_append(node,
14973  NEW_FCALL(rb_intern("print"),
14974  NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
14975  if (prelude) {
14976  prelude->nd_body = node;
14977  scope->nd_body = prelude;
14978  }
14979  else {
14980  scope->nd_body = node;
14981  }
14982 
14983  return scope;
14984 }
14985 
14986 NODE *
14987 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split)
14988 {
14989  NODE *prelude = 0;
14990  NODE *scope = node;
14991  struct parser_params *parser;
14992 
14993  if (!node) return node;
14994 
14995  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
14996 
14997  node = node->nd_body;
14998 
14999  if (nd_type(node) == NODE_PRELUDE) {
15000  prelude = node;
15001  node = node->nd_body;
15002  }
15003  if (split) {
15004  node = block_append(NEW_GASGN(rb_intern("$F"),
15005  NEW_CALL(NEW_GVAR(rb_intern("$_")),
15006  rb_intern("split"), 0)),
15007  node);
15008  }
15009  if (chop) {
15010  node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
15011  rb_intern("chop!"), 0), node);
15012  }
15013 
15014  node = NEW_OPT_N(node);
15015 
15016  if (prelude) {
15017  prelude->nd_body = node;
15018  scope->nd_body = prelude;
15019  }
15020  else {
15021  scope->nd_body = node;
15022  }
15023 
15024  return scope;
15025 }
15026 
15027 static const struct {
15029  const char *name;
15030 } op_tbl[] = {
15031  {tDOT2, ".."},
15032  {tDOT3, "..."},
15033  {'+', "+(binary)"},
15034  {'-', "-(binary)"},
15035  {tPOW, "**"},
15036  {tUPLUS, "+@"},
15037  {tUMINUS, "-@"},
15038  {tCMP, "<=>"},
15039  {tGEQ, ">="},
15040  {tLEQ, "<="},
15041  {tEQ, "=="},
15042  {tEQQ, "==="},
15043  {tNEQ, "!="},
15044  {tMATCH, "=~"},
15045  {tNMATCH, "!~"},
15046  {tAREF, "[]"},
15047  {tASET, "[]="},
15048  {tLSHFT, "<<"},
15049  {tRSHFT, ">>"},
15050  {tCOLON2, "::"},
15051 };
15052 
15053 #define op_tbl_count numberof(op_tbl)
15054 
15055 #ifndef ENABLE_SELECTOR_NAMESPACE
15056 #define ENABLE_SELECTOR_NAMESPACE 0
15057 #endif
15058 
15059 static struct symbols {
15063 #if ENABLE_SELECTOR_NAMESPACE
15064  st_table *ivar2_id;
15065  st_table *id_ivar2;
15066 #endif
15068 } global_symbols = {tLAST_ID};
15069 
15070 static const struct st_hash_type symhash = {
15072  rb_str_hash,
15073 };
15074 
15075 #if ENABLE_SELECTOR_NAMESPACE
15076 struct ivar2_key {
15077  ID id;
15078  VALUE klass;
15079 };
15080 
15081 static int
15082 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2)
15083 {
15084  if (key1->id == key2->id && key1->klass == key2->klass) {
15085  return 0;
15086  }
15087  return 1;
15088 }
15089 
15090 static int
15091 ivar2_hash(struct ivar2_key *key)
15092 {
15093  return (key->id << 8) ^ (key->klass >> 2);
15094 }
15095 
15096 static const struct st_hash_type ivar2_hash_type = {
15097  ivar2_cmp,
15098  ivar2_hash,
15099 };
15100 #endif
15101 
15102 void
15104 {
15105  global_symbols.sym_id = st_init_table_with_size(&symhash, 1000);
15107 #if ENABLE_SELECTOR_NAMESPACE
15108  global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000);
15109  global_symbols.id_ivar2 = st_init_numtable_with_size(1000);
15110 #endif
15111 
15112  Init_id();
15113 }
15114 
15115 void
15117 {
15121 }
15122 #endif /* !RIPPER */
15123 
15124 static ID
15126 {
15127  ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars);
15128  id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1;
15129  return ID_INTERNAL | (id << ID_SCOPE_SHIFT);
15130 }
15131 
15132 #ifndef RIPPER
15133 static int
15134 is_special_global_name(const char *m, const char *e, rb_encoding *enc)
15135 {
15136  int mb = 0;
15137 
15138  if (m >= e) return 0;
15139  switch (*m) {
15140  case '~': case '*': case '$': case '?': case '!': case '@':
15141  case '/': case '\\': case ';': case ',': case '.': case '=':
15142  case ':': case '<': case '>': case '\"':
15143  case '&': case '`': case '\'': case '+':
15144  case '0':
15145  ++m;
15146  break;
15147  case '-':
15148  ++m;
15149  if (m < e && is_identchar(m, e, enc)) {
15150  if (!ISASCII(*m)) mb = 1;
15151  m += rb_enc_mbclen(m, e, enc);
15152  }
15153  break;
15154  default:
15155  if (!rb_enc_isdigit(*m, enc)) return 0;
15156  do {
15157  if (!ISASCII(*m)) mb = 1;
15158  ++m;
15159  } while (m < e && rb_enc_isdigit(*m, enc));
15160  }
15161  return m == e ? mb + 1 : 0;
15162 }
15163 
15164 int
15165 rb_symname_p(const char *name)
15166 {
15167  return rb_enc_symname_p(name, rb_ascii8bit_encoding());
15168 }
15169 
15170 int
15171 rb_enc_symname_p(const char *name, rb_encoding *enc)
15172 {
15173  return rb_enc_symname2_p(name, strlen(name), enc);
15174 }
15175 
15176 int
15177 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
15178 {
15179  const char *m = name;
15180  const char *e = m + len;
15181  int localid = FALSE;
15182 
15183  if (!m || len <= 0) return FALSE;
15184  switch (*m) {
15185  case '\0':
15186  return FALSE;
15187 
15188  case '$':
15189  if (is_special_global_name(++m, e, enc)) return TRUE;
15190  goto id;
15191 
15192  case '@':
15193  if (*++m == '@') ++m;
15194  goto id;
15195 
15196  case '<':
15197  switch (*++m) {
15198  case '<': ++m; break;
15199  case '=': if (*++m == '>') ++m; break;
15200  default: break;
15201  }
15202  break;
15203 
15204  case '>':
15205  switch (*++m) {
15206  case '>': case '=': ++m; break;
15207  }
15208  break;
15209 
15210  case '=':
15211  switch (*++m) {
15212  case '~': ++m; break;
15213  case '=': if (*++m == '=') ++m; break;
15214  default: return FALSE;
15215  }
15216  break;
15217 
15218  case '*':
15219  if (*++m == '*') ++m;
15220  break;
15221 
15222  case '+': case '-':
15223  if (*++m == '@') ++m;
15224  break;
15225 
15226  case '|': case '^': case '&': case '/': case '%': case '~': case '`':
15227  ++m;
15228  break;
15229 
15230  case '[':
15231  if (*++m != ']') return FALSE;
15232  if (*++m == '=') ++m;
15233  break;
15234 
15235  case '!':
15236  if (len == 1) return TRUE;
15237  switch (*++m) {
15238  case '=': case '~': ++m; break;
15239  default: return FALSE;
15240  }
15241  break;
15242 
15243  default:
15244  localid = !rb_enc_isupper(*m, enc);
15245  id:
15246  if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m)))
15247  return FALSE;
15248  while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc);
15249  if (localid) {
15250  switch (*m) {
15251  case '!': case '?': case '=': ++m;
15252  }
15253  }
15254  break;
15255  }
15256  return m == e;
15257 }
15258 
15259 static ID
15260 register_symid(ID id, const char *name, long len, rb_encoding *enc)
15261 {
15262  VALUE str = rb_enc_str_new(name, len, enc);
15263  OBJ_FREEZE(str);
15266  return id;
15267 }
15268 
15269 ID
15270 rb_intern3(const char *name, long len, rb_encoding *enc)
15271 {
15272  const char *m = name;
15273  const char *e = m + len;
15274  unsigned char c;
15275  VALUE str;
15276  ID id;
15277  long last;
15278  int mb;
15279  st_data_t data;
15280  struct RString fake_str;
15281  fake_str.basic.flags = T_STRING|RSTRING_NOEMBED;
15282  fake_str.basic.klass = rb_cString;
15283  fake_str.as.heap.len = len;
15284  fake_str.as.heap.ptr = (char *)name;
15285  fake_str.as.heap.aux.capa = len;
15286  str = (VALUE)&fake_str;
15287  rb_enc_associate(str, enc);
15288  OBJ_FREEZE(str);
15289 
15291  rb_raise(rb_eEncodingError, "invalid encoding symbol");
15292  }
15293 
15294  if (st_lookup(global_symbols.sym_id, str, &data))
15295  return (ID)data;
15296 
15297  if (rb_cString && !rb_enc_asciicompat(enc)) {
15298  id = ID_JUNK;
15299  goto new_id;
15300  }
15301  last = len-1;
15302  id = 0;
15303  switch (*m) {
15304  case '$':
15305  id |= ID_GLOBAL;
15306  if ((mb = is_special_global_name(++m, e, enc)) != 0) {
15307  if (!--mb) enc = rb_ascii8bit_encoding();
15308  goto new_id;
15309  }
15310  break;
15311  case '@':
15312  if (m[1] == '@') {
15313  m++;
15314  id |= ID_CLASS;
15315  }
15316  else {
15317  id |= ID_INSTANCE;
15318  }
15319  m++;
15320  break;
15321  default:
15322  c = m[0];
15323  if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) {
15324  /* operators */
15325  int i;
15326 
15327  if (len == 1) {
15328  id = c;
15329  goto id_register;
15330  }
15331  for (i = 0; i < op_tbl_count; i++) {
15332  if (*op_tbl[i].name == *m &&
15333  strcmp(op_tbl[i].name, m) == 0) {
15334  id = op_tbl[i].token;
15335  goto id_register;
15336  }
15337  }
15338  }
15339 
15340  if (m[last] == '=') {
15341  /* attribute assignment */
15342  id = rb_intern3(name, last, enc);
15343  if (id > tLAST_TOKEN && !is_attrset_id(id)) {
15344  enc = rb_enc_get(rb_id2str(id));
15345  id = rb_id_attrset(id);
15346  goto id_register;
15347  }
15348  id = ID_ATTRSET;
15349  }
15350  else if (rb_enc_isupper(m[0], enc)) {
15351  id = ID_CONST;
15352  }
15353  else {
15354  id = ID_LOCAL;
15355  }
15356  break;
15357  }
15358  mb = 0;
15359  if (!rb_enc_isdigit(*m, enc)) {
15360  while (m <= name + last && is_identchar(m, e, enc)) {
15361  if (ISASCII(*m)) {
15362  m++;
15363  }
15364  else {
15365  mb = 1;
15366  m += rb_enc_mbclen(m, e, enc);
15367  }
15368  }
15369  }
15370  if (m - name < len) id = ID_JUNK;
15371  if (enc != rb_usascii_encoding()) {
15372  /*
15373  * this clause makes sense only when called from other than
15374  * rb_intern_str() taking care of code-range.
15375  */
15376  if (!mb) {
15377  for (; m <= name + len; ++m) {
15378  if (!ISASCII(*m)) goto mbstr;
15379  }
15380  enc = rb_usascii_encoding();
15381  }
15382  mbstr:;
15383  }
15384  new_id:
15386  if (len > 20) {
15387  rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)",
15388  name);
15389  }
15390  else {
15391  rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)",
15392  (int)len, name);
15393  }
15394  }
15396  id_register:
15397  return register_symid(id, name, len, enc);
15398 }
15399 
15400 ID
15401 rb_intern2(const char *name, long len)
15402 {
15403  return rb_intern3(name, len, rb_usascii_encoding());
15404 }
15405 
15406 #undef rb_intern
15407 ID
15408 rb_intern(const char *name)
15409 {
15410  return rb_intern2(name, strlen(name));
15411 }
15412 
15413 ID
15415 {
15416  rb_encoding *enc;
15417  ID id;
15418 
15420  enc = rb_usascii_encoding();
15421  }
15422  else {
15423  enc = rb_enc_get(str);
15424  }
15425  id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc);
15426  RB_GC_GUARD(str);
15427  return id;
15428 }
15429 
15430 VALUE
15432 {
15433  st_data_t data;
15434 
15435  if (id < tLAST_TOKEN) {
15436  int i = 0;
15437 
15438  if (id < INT_MAX && rb_ispunct((int)id)) {
15439  VALUE str = global_symbols.op_sym[i = (int)id];
15440  if (!str) {
15441  char name[2];
15442  name[0] = (char)id;
15443  name[1] = 0;
15444  str = rb_usascii_str_new(name, 1);
15445  OBJ_FREEZE(str);
15446  global_symbols.op_sym[i] = str;
15447  }
15448  return str;
15449  }
15450  for (i = 0; i < op_tbl_count; i++) {
15451  if (op_tbl[i].token == id) {
15452  VALUE str = global_symbols.op_sym[i];
15453  if (!str) {
15454  str = rb_usascii_str_new2(op_tbl[i].name);
15455  OBJ_FREEZE(str);
15456  global_symbols.op_sym[i] = str;
15457  }
15458  return str;
15459  }
15460  }
15461  }
15462 
15463  if (st_lookup(global_symbols.id_str, id, &data)) {
15464  VALUE str = (VALUE)data;
15465  if (RBASIC(str)->klass == 0)
15466  RBASIC(str)->klass = rb_cString;
15467  return str;
15468  }
15469 
15470  if (is_attrset_id(id)) {
15471  ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
15472  VALUE str;
15473 
15474  while (!(str = rb_id2str(id2))) {
15475  if (!is_local_id(id2)) return 0;
15476  id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;
15477  }
15478  str = rb_str_dup(str);
15479  rb_str_cat(str, "=", 1);
15480  rb_intern_str(str);
15481  if (st_lookup(global_symbols.id_str, id, &data)) {
15482  VALUE str = (VALUE)data;
15483  if (RBASIC(str)->klass == 0)
15484  RBASIC(str)->klass = rb_cString;
15485  return str;
15486  }
15487  }
15488  return 0;
15489 }
15490 
15491 const char *
15493 {
15494  VALUE str = rb_id2str(id);
15495 
15496  if (!str) return 0;
15497  return RSTRING_PTR(str);
15498 }
15499 
15500 static int
15502 {
15503  rb_ary_push(ary, ID2SYM(value));
15504  return ST_CONTINUE;
15505 }
15506 
15507 /*
15508  * call-seq:
15509  * Symbol.all_symbols => array
15510  *
15511  * Returns an array of all the symbols currently in Ruby's symbol
15512  * table.
15513  *
15514  * Symbol.all_symbols.size #=> 903
15515  * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink,
15516  * :chown, :EOFError, :$;, :String,
15517  * :LOCK_SH, :"setuid?", :$<,
15518  * :default_proc, :compact, :extend,
15519  * :Tms, :getwd, :$=, :ThreadGroup,
15520  * :wait2, :$>]
15521  */
15522 
15523 VALUE
15525 {
15527 
15529  return ary;
15530 }
15531 
15532 int
15534 {
15535  return is_const_id(id);
15536 }
15537 
15538 int
15540 {
15541  return is_class_id(id);
15542 }
15543 
15544 int
15546 {
15547  return is_instance_id(id);
15548 }
15549 
15550 int
15552 {
15553  return is_local_id(id);
15554 }
15555 
15556 int
15558 {
15559  return is_junk_id(id);
15560 }
15561 
15562 #endif /* !RIPPER */
15563 
15564 static void
15566 {
15567  parser->eofp = Qfalse;
15568 
15569  parser->parser_lex_strterm = 0;
15570  parser->parser_cond_stack = 0;
15571  parser->parser_cmdarg_stack = 0;
15572  parser->parser_class_nest = 0;
15573  parser->parser_paren_nest = 0;
15574  parser->parser_lpar_beg = 0;
15575  parser->parser_in_single = 0;
15576  parser->parser_in_def = 0;
15577  parser->parser_in_defined = 0;
15578  parser->parser_compile_for_eval = 0;
15579  parser->parser_cur_mid = 0;
15580  parser->parser_tokenbuf = NULL;
15581  parser->parser_tokidx = 0;
15582  parser->parser_toksiz = 0;
15583  parser->parser_heredoc_end = 0;
15584  parser->parser_command_start = TRUE;
15585  parser->parser_deferred_nodes = 0;
15586  parser->parser_lex_pbeg = 0;
15587  parser->parser_lex_p = 0;
15588  parser->parser_lex_pend = 0;
15589  parser->parser_lvtbl = 0;
15590  parser->parser_ruby__end__seen = 0;
15591  parser->parser_ruby_sourcefile = 0;
15592 #ifndef RIPPER
15593  parser->is_ripper = 0;
15594  parser->parser_eval_tree_begin = 0;
15595  parser->parser_eval_tree = 0;
15596 #else
15597  parser->is_ripper = 1;
15598  parser->parser_ruby_sourcefile_string = Qnil;
15599  parser->delayed = Qnil;
15600 
15601  parser->result = Qnil;
15602  parser->parsing_thread = Qnil;
15603  parser->toplevel_p = TRUE;
15604 #endif
15605 #ifdef YYMALLOC
15606  parser->heap = NULL;
15607 #endif
15608  parser->enc = rb_usascii_encoding();
15609 }
15610 
15611 #ifdef RIPPER
15612 #define parser_mark ripper_parser_mark
15613 #define parser_free ripper_parser_free
15614 #endif
15615 
15616 static void
15618 {
15619  struct parser_params *p = (struct parser_params*)ptr;
15620 
15626 #ifndef RIPPER
15629  rb_gc_mark(p->debug_lines);
15630 #else
15631  rb_gc_mark(p->parser_ruby_sourcefile_string);
15632  rb_gc_mark(p->delayed);
15633  rb_gc_mark(p->value);
15634  rb_gc_mark(p->result);
15635  rb_gc_mark(p->parsing_thread);
15636 #endif
15637 #ifdef YYMALLOC
15638  rb_gc_mark((VALUE)p->heap);
15639 #endif
15640 }
15641 
15642 static void
15643 parser_free(void *ptr)
15644 {
15645  struct parser_params *p = (struct parser_params*)ptr;
15646  struct local_vars *local, *prev;
15647 
15648  if (p->parser_tokenbuf) {
15649  xfree(p->parser_tokenbuf);
15650  }
15651  for (local = p->parser_lvtbl; local; local = prev) {
15652  if (local->vars) xfree(local->vars);
15653  prev = local->prev;
15654  xfree(local);
15655  }
15656 #ifndef RIPPER
15658 #endif
15659  xfree(p);
15660 }
15661 
15662 static size_t
15663 parser_memsize(const void *ptr)
15664 {
15665  struct parser_params *p = (struct parser_params*)ptr;
15666  struct local_vars *local;
15667  size_t size = sizeof(*p);
15668 
15669  if (!ptr) return 0;
15670  size += p->parser_toksiz;
15671  for (local = p->parser_lvtbl; local; local = local->prev) {
15672  size += sizeof(*local);
15673  if (local->vars) size += local->vars->capa * sizeof(ID);
15674  }
15675 #ifndef RIPPER
15676  if (p->parser_ruby_sourcefile) {
15677  size += strlen(p->parser_ruby_sourcefile) + 1;
15678  }
15679 #endif
15680  return size;
15681 }
15682 
15683 static
15684 #ifndef RIPPER
15685 const
15686 #endif
15687 rb_data_type_t parser_data_type = {
15688  "parser",
15689  {
15690  parser_mark,
15691  parser_free,
15693  },
15694 };
15695 
15696 #ifndef RIPPER
15697 #undef rb_reserved_word
15698 
15699 const struct kwtable *
15700 rb_reserved_word(const char *str, unsigned int len)
15701 {
15702  return reserved_word(str, len);
15703 }
15704 
15705 static struct parser_params *
15707 {
15708  struct parser_params *p;
15709 
15710  p = ALLOC_N(struct parser_params, 1);
15711  MEMZERO(p, struct parser_params, 1);
15712  parser_initialize(p);
15713  return p;
15714 }
15715 
15716 VALUE
15718 {
15719  struct parser_params *p = parser_new();
15720 
15721  return TypedData_Wrap_Struct(0, &parser_data_type, p);
15722 }
15723 
15724 /*
15725  * call-seq:
15726  * ripper#end_seen? -> Boolean
15727  *
15728  * Return true if parsed source ended by +\_\_END\_\_+.
15729  */
15730 VALUE
15732 {
15733  struct parser_params *parser;
15734 
15735  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15736  return ruby__end__seen ? Qtrue : Qfalse;
15737 }
15738 
15739 /*
15740  * call-seq:
15741  * ripper#encoding -> encoding
15742  *
15743  * Return encoding of the source.
15744  */
15745 VALUE
15747 {
15748  struct parser_params *parser;
15749 
15750  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15751  return rb_enc_from_encoding(parser->enc);
15752 }
15753 
15754 /*
15755  * call-seq:
15756  * ripper.yydebug -> true or false
15757  *
15758  * Get yydebug.
15759  */
15760 VALUE
15762 {
15763  struct parser_params *parser;
15764 
15765  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
15766  return yydebug ? Qtrue : Qfalse;
15767 }
15768 
15769 /*
15770  * call-seq:
15771  * ripper.yydebug = flag
15772  *
15773  * Set yydebug.
15774  */
15775 VALUE
15777 {
15778  struct parser_params *parser;
15779 
15780  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
15781  yydebug = RTEST(flag);
15782  return flag;
15783 }
15784 
15785 #ifdef YYMALLOC
15786 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
15787 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)
15788 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \
15789  (n)->u3.cnt = (c), (p))
15790 
15791 void *
15792 rb_parser_malloc(struct parser_params *parser, size_t size)
15793 {
15794  size_t cnt = HEAPCNT(1, size);
15795  NODE *n = NEWHEAP();
15796  void *ptr = xmalloc(size);
15797 
15798  return ADD2HEAP(n, cnt, ptr);
15799 }
15800 
15801 void *
15802 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size)
15803 {
15804  size_t cnt = HEAPCNT(nelem, size);
15805  NODE *n = NEWHEAP();
15806  void *ptr = xcalloc(nelem, size);
15807 
15808  return ADD2HEAP(n, cnt, ptr);
15809 }
15810 
15811 void *
15812 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size)
15813 {
15814  NODE *n;
15815  size_t cnt = HEAPCNT(1, size);
15816 
15817  if (ptr && (n = parser->heap) != NULL) {
15818  do {
15819  if (n->u1.node == ptr) {
15820  n->u1.node = ptr = xrealloc(ptr, size);
15821  if (n->u3.cnt) n->u3.cnt = cnt;
15822  return ptr;
15823  }
15824  } while ((n = n->u2.node) != NULL);
15825  }
15826  n = NEWHEAP();
15827  ptr = xrealloc(ptr, size);
15828  return ADD2HEAP(n, cnt, ptr);
15829 }
15830 
15831 void
15832 rb_parser_free(struct parser_params *parser, void *ptr)
15833 {
15834  NODE **prev = &parser->heap, *n;
15835 
15836  while ((n = *prev) != NULL) {
15837  if (n->u1.node == ptr) {
15838  *prev = n->u2.node;
15840  break;
15841  }
15842  prev = &n->u2.node;
15843  }
15844  xfree(ptr);
15845 }
15846 #endif
15847 #endif
15848 
15849 #ifdef RIPPER
15850 #ifdef RIPPER_DEBUG
15851 extern int rb_is_pointer_to_heap(VALUE);
15852 
15853 /* :nodoc: */
15854 static VALUE
15855 ripper_validate_object(VALUE self, VALUE x)
15856 {
15857  if (x == Qfalse) return x;
15858  if (x == Qtrue) return x;
15859  if (x == Qnil) return x;
15860  if (x == Qundef)
15861  rb_raise(rb_eArgError, "Qundef given");
15862  if (FIXNUM_P(x)) return x;
15863  if (SYMBOL_P(x)) return x;
15864  if (!rb_is_pointer_to_heap(x))
15865  rb_raise(rb_eArgError, "invalid pointer: %p", x);
15866  switch (TYPE(x)) {
15867  case T_STRING:
15868  case T_OBJECT:
15869  case T_ARRAY:
15870  case T_BIGNUM:
15871  case T_FLOAT:
15872  return x;
15873  case T_NODE:
15874  if (nd_type(x) != NODE_LASGN) {
15875  rb_raise(rb_eArgError, "NODE given: %p", x);
15876  }
15877  return ((NODE *)x)->nd_rval;
15878  default:
15879  rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
15880  x, rb_obj_classname(x));
15881  }
15882  return x;
15883 }
15884 #endif
15885 
15886 #define validate(x) ((x) = get_value(x))
15887 
15888 static VALUE
15889 ripper_dispatch0(struct parser_params *parser, ID mid)
15890 {
15891  return rb_funcall(parser->value, mid, 0);
15892 }
15893 
15894 static VALUE
15895 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
15896 {
15897  validate(a);
15898  return rb_funcall(parser->value, mid, 1, a);
15899 }
15900 
15901 static VALUE
15902 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
15903 {
15904  validate(a);
15905  validate(b);
15906  return rb_funcall(parser->value, mid, 2, a, b);
15907 }
15908 
15909 static VALUE
15910 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
15911 {
15912  validate(a);
15913  validate(b);
15914  validate(c);
15915  return rb_funcall(parser->value, mid, 3, a, b, c);
15916 }
15917 
15918 static VALUE
15919 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
15920 {
15921  validate(a);
15922  validate(b);
15923  validate(c);
15924  validate(d);
15925  return rb_funcall(parser->value, mid, 4, a, b, c, d);
15926 }
15927 
15928 static VALUE
15929 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
15930 {
15931  validate(a);
15932  validate(b);
15933  validate(c);
15934  validate(d);
15935  validate(e);
15936  return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
15937 }
15938 
15939 static const struct kw_assoc {
15940  ID id;
15941  const char *name;
15942 } keyword_to_name[] = {
15943  {keyword_class, "class"},
15944  {keyword_module, "module"},
15945  {keyword_def, "def"},
15946  {keyword_undef, "undef"},
15947  {keyword_begin, "begin"},
15948  {keyword_rescue, "rescue"},
15949  {keyword_ensure, "ensure"},
15950  {keyword_end, "end"},
15951  {keyword_if, "if"},
15952  {keyword_unless, "unless"},
15953  {keyword_then, "then"},
15954  {keyword_elsif, "elsif"},
15955  {keyword_else, "else"},
15956  {keyword_case, "case"},
15957  {keyword_when, "when"},
15958  {keyword_while, "while"},
15959  {keyword_until, "until"},
15960  {keyword_for, "for"},
15961  {keyword_break, "break"},
15962  {keyword_next, "next"},
15963  {keyword_redo, "redo"},
15964  {keyword_retry, "retry"},
15965  {keyword_in, "in"},
15966  {keyword_do, "do"},
15967  {keyword_do_cond, "do"},
15968  {keyword_do_block, "do"},
15969  {keyword_return, "return"},
15970  {keyword_yield, "yield"},
15971  {keyword_super, "super"},
15972  {keyword_self, "self"},
15973  {keyword_nil, "nil"},
15974  {keyword_true, "true"},
15975  {keyword_false, "false"},
15976  {keyword_and, "and"},
15977  {keyword_or, "or"},
15978  {keyword_not, "not"},
15979  {modifier_if, "if"},
15980  {modifier_unless, "unless"},
15981  {modifier_while, "while"},
15982  {modifier_until, "until"},
15983  {modifier_rescue, "rescue"},
15984  {keyword_alias, "alias"},
15985  {keyword_defined, "defined?"},
15986  {keyword_BEGIN, "BEGIN"},
15987  {keyword_END, "END"},
15988  {keyword__LINE__, "__LINE__"},
15989  {keyword__FILE__, "__FILE__"},
15990  {keyword__ENCODING__, "__ENCODING__"},
15991  {0, NULL}
15992 };
15993 
15994 static const char*
15995 keyword_id_to_str(ID id)
15996 {
15997  const struct kw_assoc *a;
15998 
15999  for (a = keyword_to_name; a->id; a++) {
16000  if (a->id == id)
16001  return a->name;
16002  }
16003  return NULL;
16004 }
16005 
16006 #undef ripper_id2sym
16007 static VALUE
16008 ripper_id2sym(ID id)
16009 {
16010  const char *name;
16011  char buf[8];
16012 
16013  if (id <= 256) {
16014  buf[0] = (char)id;
16015  buf[1] = '\0';
16016  return ID2SYM(rb_intern2(buf, 1));
16017  }
16018  if ((name = keyword_id_to_str(id))) {
16019  return ID2SYM(rb_intern(name));
16020  }
16021  switch (id) {
16022  case tOROP:
16023  name = "||";
16024  break;
16025  case tANDOP:
16026  name = "&&";
16027  break;
16028  default:
16029  name = rb_id2name(id);
16030  if (!name) {
16031  rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
16032  }
16033  return ID2SYM(id);
16034  }
16035  return ID2SYM(rb_intern(name));
16036 }
16037 
16038 static ID
16039 ripper_get_id(VALUE v)
16040 {
16041  NODE *nd;
16042  if (!RB_TYPE_P(v, T_NODE)) return 0;
16043  nd = (NODE *)v;
16044  if (nd_type(nd) != NODE_LASGN) return 0;
16045  return nd->nd_vid;
16046 }
16047 
16048 static VALUE
16049 ripper_get_value(VALUE v)
16050 {
16051  NODE *nd;
16052  if (v == Qundef) return Qnil;
16053  if (!RB_TYPE_P(v, T_NODE)) return v;
16054  nd = (NODE *)v;
16055  if (nd_type(nd) != NODE_LASGN) return Qnil;
16056  return nd->nd_rval;
16057 }
16058 
16059 static void
16060 ripper_compile_error(struct parser_params *parser, const char *fmt, ...)
16061 {
16062  VALUE str;
16063  va_list args;
16064 
16065  va_start(args, fmt);
16066  str = rb_vsprintf(fmt, args);
16067  va_end(args);
16068  rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
16069 }
16070 
16071 static void
16072 ripper_warn0(struct parser_params *parser, const char *fmt)
16073 {
16074  rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt));
16075 }
16076 
16077 static void
16078 ripper_warnI(struct parser_params *parser, const char *fmt, int a)
16079 {
16080  rb_funcall(parser->value, rb_intern("warn"), 2,
16081  STR_NEW2(fmt), INT2NUM(a));
16082 }
16083 
16084 #if 0
16085 static void
16086 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str)
16087 {
16088  rb_funcall(parser->value, rb_intern("warn"), 2,
16089  STR_NEW2(fmt), STR_NEW2(str));
16090 }
16091 #endif
16092 
16093 static void
16094 ripper_warning0(struct parser_params *parser, const char *fmt)
16095 {
16096  rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt));
16097 }
16098 
16099 static void
16100 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str)
16101 {
16102  rb_funcall(parser->value, rb_intern("warning"), 2,
16103  STR_NEW2(fmt), STR_NEW2(str));
16104 }
16105 
16106 static VALUE
16107 ripper_lex_get_generic(struct parser_params *parser, VALUE src)
16108 {
16109  return rb_funcall(src, ripper_id_gets, 0);
16110 }
16111 
16112 static VALUE
16113 ripper_s_allocate(VALUE klass)
16114 {
16115  struct parser_params *p;
16116  VALUE self;
16117 
16118  p = ALLOC_N(struct parser_params, 1);
16119  MEMZERO(p, struct parser_params, 1);
16120  self = TypedData_Wrap_Struct(klass, &parser_data_type, p);
16121  p->value = self;
16122  return self;
16123 }
16124 
16125 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0)
16126 
16127 /*
16128  * call-seq:
16129  * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
16130  *
16131  * Create a new Ripper object.
16132  * _src_ must be a String, an IO, or an Object which has #gets method.
16133  *
16134  * This method does not starts parsing.
16135  * See also Ripper#parse and Ripper.parse.
16136  */
16137 static VALUE
16138 ripper_initialize(int argc, VALUE *argv, VALUE self)
16139 {
16140  struct parser_params *parser;
16141  VALUE src, fname, lineno;
16142 
16143  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16144  rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
16145  if (rb_obj_respond_to(src, ripper_id_gets, 0)) {
16146  parser->parser_lex_gets = ripper_lex_get_generic;
16147  }
16148  else {
16149  StringValue(src);
16150  parser->parser_lex_gets = lex_get_str;
16151  }
16152  parser->parser_lex_input = src;
16153  parser->eofp = Qfalse;
16154  if (NIL_P(fname)) {
16155  fname = STR_NEW2("(ripper)");
16156  }
16157  else {
16158  StringValue(fname);
16159  }
16160  parser_initialize(parser);
16161 
16162  parser->parser_ruby_sourcefile_string = fname;
16163  parser->parser_ruby_sourcefile = RSTRING_PTR(fname);
16164  parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
16165 
16166  return Qnil;
16167 }
16168 
16169 struct ripper_args {
16170  struct parser_params *parser;
16171  int argc;
16172  VALUE *argv;
16173 };
16174 
16175 static VALUE
16176 ripper_parse0(VALUE parser_v)
16177 {
16178  struct parser_params *parser;
16179 
16180  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
16181  parser_prepare(parser);
16182  ripper_yyparse((void*)parser);
16183  return parser->result;
16184 }
16185 
16186 static VALUE
16187 ripper_ensure(VALUE parser_v)
16188 {
16189  struct parser_params *parser;
16190 
16191  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
16192  parser->parsing_thread = Qnil;
16193  return Qnil;
16194 }
16195 
16196 /*
16197  * call-seq:
16198  * ripper#parse
16199  *
16200  * Start parsing and returns the value of the root action.
16201  */
16202 static VALUE
16203 ripper_parse(VALUE self)
16204 {
16205  struct parser_params *parser;
16206 
16207  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16208  if (!ripper_initialized_p(parser)) {
16209  rb_raise(rb_eArgError, "method called for uninitialized object");
16210  }
16211  if (!NIL_P(parser->parsing_thread)) {
16212  if (parser->parsing_thread == rb_thread_current())
16213  rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
16214  else
16215  rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
16216  }
16217  parser->parsing_thread = rb_thread_current();
16218  rb_ensure(ripper_parse0, self, ripper_ensure, self);
16219 
16220  return parser->result;
16221 }
16222 
16223 /*
16224  * call-seq:
16225  * ripper#column -> Integer
16226  *
16227  * Return column number of current parsing line.
16228  * This number starts from 0.
16229  */
16230 static VALUE
16231 ripper_column(VALUE self)
16232 {
16233  struct parser_params *parser;
16234  long col;
16235 
16236  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16237  if (!ripper_initialized_p(parser)) {
16238  rb_raise(rb_eArgError, "method called for uninitialized object");
16239  }
16240  if (NIL_P(parser->parsing_thread)) return Qnil;
16241  col = parser->tokp - parser->parser_lex_pbeg;
16242  return LONG2NUM(col);
16243 }
16244 
16245 /*
16246  * call-seq:
16247  * ripper#filename -> String
16248  *
16249  * Return current parsing filename.
16250  */
16251 static VALUE
16252 ripper_filename(VALUE self)
16253 {
16254  struct parser_params *parser;
16255 
16256  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16257  if (!ripper_initialized_p(parser)) {
16258  rb_raise(rb_eArgError, "method called for uninitialized object");
16259  }
16260  return parser->parser_ruby_sourcefile_string;
16261 }
16262 
16263 /*
16264  * call-seq:
16265  * ripper#lineno -> Integer
16266  *
16267  * Return line number of current parsing line.
16268  * This number starts from 1.
16269  */
16270 static VALUE
16271 ripper_lineno(VALUE self)
16272 {
16273  struct parser_params *parser;
16274 
16275  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16276  if (!ripper_initialized_p(parser)) {
16277  rb_raise(rb_eArgError, "method called for uninitialized object");
16278  }
16279  if (NIL_P(parser->parsing_thread)) return Qnil;
16280  return INT2NUM(parser->parser_ruby_sourceline);
16281 }
16282 
16283 #ifdef RIPPER_DEBUG
16284 /* :nodoc: */
16285 static VALUE
16286 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
16287 {
16288  StringValue(msg);
16289  if (obj == Qundef) {
16290  rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg));
16291  }
16292  return Qnil;
16293 }
16294 
16295 /* :nodoc: */
16296 static VALUE
16297 ripper_value(VALUE self, VALUE obj)
16298 {
16299  return ULONG2NUM(obj);
16300 }
16301 #endif
16302 
16303 
16304 void
16305 InitVM_ripper(void)
16306 {
16307  parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new());
16308 }
16309 
16310 void
16311 Init_ripper(void)
16312 {
16313  VALUE Ripper;
16314 
16315  InitVM(ripper);
16316  Ripper = rb_define_class("Ripper", rb_cObject);
16317  rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
16318  rb_define_alloc_func(Ripper, ripper_s_allocate);
16319  rb_define_method(Ripper, "initialize", ripper_initialize, -1);
16320  rb_define_method(Ripper, "parse", ripper_parse, 0);
16321  rb_define_method(Ripper, "column", ripper_column, 0);
16322  rb_define_method(Ripper, "filename", ripper_filename, 0);
16323  rb_define_method(Ripper, "lineno", ripper_lineno, 0);
16324  rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
16325  rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
16326  rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
16327  rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
16328 #ifdef RIPPER_DEBUG
16329  rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
16330  rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
16331  rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
16332 #endif
16333 
16334  ripper_id_gets = rb_intern("gets");
16335  ripper_init_eventids1(Ripper);
16336  ripper_init_eventids2(Ripper);
16337  /* ensure existing in symbol table */
16338  (void)rb_intern("||");
16339  (void)rb_intern("&&");
16340 
16341 # if 0
16342  /* Hack to let RDoc document SCRIPT_LINES__ */
16343 
16344  /*
16345  * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
16346  * after the assignment will be added as an Array of lines with the file
16347  * name as the key.
16348  */
16349  rb_define_global_const("SCRIPT_LINES__", Qnil);
16350 #endif
16351 
16352 }
16353 #endif /* RIPPER */
16354 
16355