Ruby  1.9.3p392(2013-02-22revision39386)
parse.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 "parse.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 */
501 struct parser_params {
502  int is_ripper;
503  NODE *heap;
504 
506  VALUE eofp;
507 
512  int parser_class_nest;
513  int parser_paren_nest;
514  int parser_lpar_beg;
515  int parser_in_single;
516  int parser_in_def;
519  int parser_in_defined;
520  char *parser_tokenbuf;
521  int parser_tokidx;
522  int parser_toksiz;
526  const char *parser_lex_pbeg;
527  const char *parser_lex_p;
528  const char *parser_lex_pend;
529  int parser_heredoc_end;
532  long parser_lex_gets_ptr;
534  struct local_vars *parser_lvtbl;
536  int line_count;
537  int has_shebang;
538  char *parser_ruby_sourcefile; /* current source file */
539  int parser_ruby_sourceline; /* current line no. */
540  rb_encoding *enc;
541  rb_encoding *utf8;
542 
543  int parser_yydebug;
544 
545 #ifndef RIPPER
546  /* Ruby core only */
550  VALUE coverage;
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 0
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 "parse.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 {
1121  YYSTYPE yyvs;
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 "parse.y"
5108  {
5109  lex_state = EXPR_BEG;
5110  /*%%%*/
5112  /*%
5113  local_push(0);
5114  %*/
5115  ;}
5116  break;
5117 
5118  case 3:
5119 #line 791 "parse.y"
5120  {
5121  /*%%%*/
5122  if ((yyvsp[(2) - (2)].node) && !compile_for_eval) {
5123  /* last expression should not be void */
5124  if (nd_type((yyvsp[(2) - (2)].node)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].node));
5125  else {
5126  NODE *node = (yyvsp[(2) - (2)].node);
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)].node)));
5134  /*%
5135  $$ = $2;
5136  parser->result = dispatch1(program, $$);
5137  %*/
5138  local_pop();
5139  ;}
5140  break;
5141 
5142  case 4:
5143 #line 814 "parse.y"
5144  {
5145  /*%%%*/
5146  void_stmts((yyvsp[(1) - (2)].node));
5148  /*%
5149  %*/
5150  (yyval.node) = (yyvsp[(1) - (2)].node);
5151  ;}
5152  break;
5153 
5154  case 5:
5155 #line 825 "parse.y"
5156  {
5157  /*%%%*/
5158  (yyval.node) = NEW_BEGIN(0);
5159  /*%
5160  $$ = dispatch2(stmts_add, dispatch0(stmts_new),
5161  dispatch0(void_stmt));
5162  %*/
5163  ;}
5164  break;
5165 
5166  case 6:
5167 #line 834 "parse.y"
5168  {
5169  /*%%%*/
5170  (yyval.node) = newline_node((yyvsp[(1) - (1)].node));
5171  /*%
5172  $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
5173  %*/
5174  ;}
5175  break;
5176 
5177  case 7:
5178 #line 842 "parse.y"
5179  {
5180  /*%%%*/
5181  (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node)));
5182  /*%
5183  $$ = dispatch2(stmts_add, $1, $3);
5184  %*/
5185  ;}
5186  break;
5187 
5188  case 8:
5189 #line 850 "parse.y"
5190  {
5191  (yyval.node) = remove_begin((yyvsp[(2) - (2)].node));
5192  ;}
5193  break;
5194 
5195  case 10:
5196 #line 857 "parse.y"
5197  {
5198  if (in_def || in_single) {
5199  yyerror("BEGIN in method");
5200  }
5201  /*%%%*/
5202  /* local_push(0); */
5203  /*%
5204  %*/
5205  ;}
5206  break;
5207 
5208  case 11:
5209 #line 867 "parse.y"
5210  {
5211  /*%%%*/
5213  (yyvsp[(4) - (5)].node));
5214  /* NEW_PREEXE($4)); */
5215  /* local_pop(); */
5216  (yyval.node) = NEW_BEGIN(0);
5217  /*%
5218  $$ = dispatch1(BEGIN, $4);
5219  %*/
5220  ;}
5221  break;
5222 
5223  case 12:
5224 #line 884 "parse.y"
5225  {
5226  /*%%%*/
5227  (yyval.node) = (yyvsp[(1) - (4)].node);
5228  if ((yyvsp[(2) - (4)].node)) {
5229  (yyval.node) = NEW_RESCUE((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node));
5230  }
5231  else if ((yyvsp[(3) - (4)].node)) {
5232  rb_warn0("else without rescue is useless");
5233  (yyval.node) = block_append((yyval.node), (yyvsp[(3) - (4)].node));
5234  }
5235  if ((yyvsp[(4) - (4)].node)) {
5236  if ((yyval.node)) {
5237  (yyval.node) = NEW_ENSURE((yyval.node), (yyvsp[(4) - (4)].node));
5238  }
5239  else {
5240  (yyval.node) = block_append((yyvsp[(4) - (4)].node), NEW_NIL());
5241  }
5242  }
5243  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
5244  /*%
5245  $$ = dispatch4(bodystmt,
5246  escape_Qundef($1),
5247  escape_Qundef($2),
5248  escape_Qundef($3),
5249  escape_Qundef($4));
5250  %*/
5251  ;}
5252  break;
5253 
5254  case 13:
5255 #line 914 "parse.y"
5256  {
5257  /*%%%*/
5258  void_stmts((yyvsp[(1) - (2)].node));
5260  /*%
5261  %*/
5262  (yyval.node) = (yyvsp[(1) - (2)].node);
5263  ;}
5264  break;
5265 
5266  case 14:
5267 #line 925 "parse.y"
5268  {
5269  /*%%%*/
5270  (yyval.node) = NEW_BEGIN(0);
5271  /*%
5272  $$ = dispatch2(stmts_add, dispatch0(stmts_new),
5273  dispatch0(void_stmt));
5274  %*/
5275  ;}
5276  break;
5277 
5278  case 15:
5279 #line 934 "parse.y"
5280  {
5281  /*%%%*/
5282  (yyval.node) = newline_node((yyvsp[(1) - (1)].node));
5283  /*%
5284  $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
5285  %*/
5286  ;}
5287  break;
5288 
5289  case 16:
5290 #line 942 "parse.y"
5291  {
5292  /*%%%*/
5293  (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node)));
5294  /*%
5295  $$ = dispatch2(stmts_add, $1, $3);
5296  %*/
5297  ;}
5298  break;
5299 
5300  case 17:
5301 #line 950 "parse.y"
5302  {
5303  (yyval.node) = remove_begin((yyvsp[(2) - (2)].node));
5304  ;}
5305  break;
5306 
5307  case 18:
5308 #line 955 "parse.y"
5309  {lex_state = EXPR_FNAME;;}
5310  break;
5311 
5312  case 19:
5313 #line 956 "parse.y"
5314  {
5315  /*%%%*/
5316  (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node));
5317  /*%
5318  $$ = dispatch2(alias, $2, $4);
5319  %*/
5320  ;}
5321  break;
5322 
5323  case 20:
5324 #line 964 "parse.y"
5325  {
5326  /*%%%*/
5327  (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id));
5328  /*%
5329  $$ = dispatch2(var_alias, $2, $3);
5330  %*/
5331  ;}
5332  break;
5333 
5334  case 21:
5335 #line 972 "parse.y"
5336  {
5337  /*%%%*/
5338  char buf[2];
5339  buf[0] = '$';
5340  buf[1] = (char)(yyvsp[(3) - (3)].node)->nd_nth;
5341  (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), rb_intern2(buf, 2));
5342  /*%
5343  $$ = dispatch2(var_alias, $2, $3);
5344  %*/
5345  ;}
5346  break;
5347 
5348  case 22:
5349 #line 983 "parse.y"
5350  {
5351  /*%%%*/
5352  yyerror("can't make alias for the number variables");
5353  (yyval.node) = NEW_BEGIN(0);
5354  /*%
5355  $$ = dispatch2(var_alias, $2, $3);
5356  $$ = dispatch1(alias_error, $$);
5357  %*/
5358  ;}
5359  break;
5360 
5361  case 23:
5362 #line 993 "parse.y"
5363  {
5364  /*%%%*/
5365  (yyval.node) = (yyvsp[(2) - (2)].node);
5366  /*%
5367  $$ = dispatch1(undef, $2);
5368  %*/
5369  ;}
5370  break;
5371 
5372  case 24:
5373 #line 1001 "parse.y"
5374  {
5375  /*%%%*/
5376  (yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0);
5377  fixpos((yyval.node), (yyvsp[(3) - (3)].node));
5378  /*%
5379  $$ = dispatch2(if_mod, $3, $1);
5380  %*/
5381  ;}
5382  break;
5383 
5384  case 25:
5385 #line 1010 "parse.y"
5386  {
5387  /*%%%*/
5388  (yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0);
5389  fixpos((yyval.node), (yyvsp[(3) - (3)].node));
5390  /*%
5391  $$ = dispatch2(unless_mod, $3, $1);
5392  %*/
5393  ;}
5394  break;
5395 
5396  case 26:
5397 #line 1019 "parse.y"
5398  {
5399  /*%%%*/
5400  if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) {
5401  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0);
5402  }
5403  else {
5404  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1);
5405  }
5406  /*%
5407  $$ = dispatch2(while_mod, $3, $1);
5408  %*/
5409  ;}
5410  break;
5411 
5412  case 27:
5413 #line 1032 "parse.y"
5414  {
5415  /*%%%*/
5416  if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) {
5417  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0);
5418  }
5419  else {
5420  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1);
5421  }
5422  /*%
5423  $$ = dispatch2(until_mod, $3, $1);
5424  %*/
5425  ;}
5426  break;
5427 
5428  case 28:
5429 #line 1045 "parse.y"
5430  {
5431  /*%%%*/
5432  NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node)), 0);
5433  (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].node)), resq, 0);
5434  /*%
5435  $$ = dispatch2(rescue_mod, $1, $3);
5436  %*/
5437  ;}
5438  break;
5439 
5440  case 29:
5441 #line 1054 "parse.y"
5442  {
5443  if (in_def || in_single) {
5444  rb_warn0("END in method; use at_exit");
5445  }
5446  /*%%%*/
5447  (yyval.node) = NEW_POSTEXE(NEW_NODE(
5448  NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].node) /* body */, 0 /* args */));
5449  /*%
5450  $$ = dispatch1(END, $3);
5451  %*/
5452  ;}
5453  break;
5454 
5455  case 31:
5456 #line 1067 "parse.y"
5457  {
5458  /*%%%*/
5459  value_expr((yyvsp[(3) - (3)].node));
5460  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5461  (yyval.node) = (yyvsp[(1) - (3)].node);
5462  /*%
5463  $$ = dispatch2(massign, $1, $3);
5464  %*/
5465  ;}
5466  break;
5467 
5468  case 32:
5469 #line 1077 "parse.y"
5470  {
5471  /*%%%*/
5472  value_expr((yyvsp[(3) - (3)].node));
5473  if ((yyvsp[(1) - (3)].node)) {
5474  ID vid = (yyvsp[(1) - (3)].node)->nd_vid;
5475  if ((yyvsp[(2) - (3)].id) == tOROP) {
5476  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5477  (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node));
5478  if (is_asgn_or_id(vid)) {
5479  (yyval.node)->nd_aid = vid;
5480  }
5481  }
5482  else if ((yyvsp[(2) - (3)].id) == tANDOP) {
5483  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5484  (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node));
5485  }
5486  else {
5487  (yyval.node) = (yyvsp[(1) - (3)].node);
5488  (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node)));
5489  }
5490  }
5491  else {
5492  (yyval.node) = NEW_BEGIN(0);
5493  }
5494  /*%
5495  $$ = dispatch3(opassign, $1, $2, $3);
5496  %*/
5497  ;}
5498  break;
5499 
5500  case 33:
5501 #line 1106 "parse.y"
5502  {
5503  /*%%%*/
5504  NODE *args;
5505 
5506  value_expr((yyvsp[(6) - (6)].node));
5507  if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY();
5508  args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
5509  if ((yyvsp[(5) - (6)].id) == tOROP) {
5510  (yyvsp[(5) - (6)].id) = 0;
5511  }
5512  else if ((yyvsp[(5) - (6)].id) == tANDOP) {
5513  (yyvsp[(5) - (6)].id) = 1;
5514  }
5515  (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args);
5516  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
5517  /*%
5518  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
5519  $$ = dispatch3(opassign, $$, $5, $6);
5520  %*/
5521  ;}
5522  break;
5523 
5524  case 34:
5525 #line 1127 "parse.y"
5526  {
5527  /*%%%*/
5528  value_expr((yyvsp[(5) - (5)].node));
5529  if ((yyvsp[(4) - (5)].id) == tOROP) {
5530  (yyvsp[(4) - (5)].id) = 0;
5531  }
5532  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
5533  (yyvsp[(4) - (5)].id) = 1;
5534  }
5535  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
5536  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5537  /*%
5538  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
5539  $$ = dispatch3(opassign, $$, $4, $5);
5540  %*/
5541  ;}
5542  break;
5543 
5544  case 35:
5545 #line 1144 "parse.y"
5546  {
5547  /*%%%*/
5548  value_expr((yyvsp[(5) - (5)].node));
5549  if ((yyvsp[(4) - (5)].id) == tOROP) {
5550  (yyvsp[(4) - (5)].id) = 0;
5551  }
5552  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
5553  (yyvsp[(4) - (5)].id) = 1;
5554  }
5555  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
5556  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5557  /*%
5558  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
5559  $$ = dispatch3(opassign, $$, $4, $5);
5560  %*/
5561  ;}
5562  break;
5563 
5564  case 36:
5565 #line 1161 "parse.y"
5566  {
5567  /*%%%*/
5568  yyerror("constant re-assignment");
5569  (yyval.node) = 0;
5570  /*%
5571  $$ = dispatch2(const_path_field, $1, $3);
5572  $$ = dispatch3(opassign, $$, $4, $5);
5573  $$ = dispatch1(assign_error, $$);
5574  %*/
5575  ;}
5576  break;
5577 
5578  case 37:
5579 #line 1172 "parse.y"
5580  {
5581  /*%%%*/
5582  value_expr((yyvsp[(5) - (5)].node));
5583  if ((yyvsp[(4) - (5)].id) == tOROP) {
5584  (yyvsp[(4) - (5)].id) = 0;
5585  }
5586  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
5587  (yyvsp[(4) - (5)].id) = 1;
5588  }
5589  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
5590  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5591  /*%
5592  $$ = dispatch3(field, $1, ripper_intern("::"), $3);
5593  $$ = dispatch3(opassign, $$, $4, $5);
5594  %*/
5595  ;}
5596  break;
5597 
5598  case 38:
5599 #line 1189 "parse.y"
5600  {
5601  /*%%%*/
5602  rb_backref_error((yyvsp[(1) - (3)].node));
5603  (yyval.node) = NEW_BEGIN(0);
5604  /*%
5605  $$ = dispatch2(assign, dispatch1(var_field, $1), $3);
5606  $$ = dispatch1(assign_error, $$);
5607  %*/
5608  ;}
5609  break;
5610 
5611  case 39:
5612 #line 1199 "parse.y"
5613  {
5614  /*%%%*/
5615  value_expr((yyvsp[(3) - (3)].node));
5616  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5617  /*%
5618  $$ = dispatch2(assign, $1, $3);
5619  %*/
5620  ;}
5621  break;
5622 
5623  case 40:
5624 #line 1208 "parse.y"
5625  {
5626  /*%%%*/
5627  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5628  (yyval.node) = (yyvsp[(1) - (3)].node);
5629  /*%
5630  $$ = dispatch2(massign, $1, $3);
5631  %*/
5632  ;}
5633  break;
5634 
5635  case 41:
5636 #line 1217 "parse.y"
5637  {
5638  /*%%%*/
5639  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
5640  (yyval.node) = (yyvsp[(1) - (3)].node);
5641  /*%
5642  $$ = dispatch2(massign, $1, $3);
5643  %*/
5644  ;}
5645  break;
5646 
5647  case 43:
5648 #line 1229 "parse.y"
5649  {
5650  /*%%%*/
5651  value_expr((yyvsp[(3) - (3)].node));
5652  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5653  /*%
5654  $$ = dispatch2(assign, $1, $3);
5655  %*/
5656  ;}
5657  break;
5658 
5659  case 44:
5660 #line 1238 "parse.y"
5661  {
5662  /*%%%*/
5663  value_expr((yyvsp[(3) - (3)].node));
5664  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5665  /*%
5666  $$ = dispatch2(assign, $1, $3);
5667  %*/
5668  ;}
5669  break;
5670 
5671  case 46:
5672 #line 1251 "parse.y"
5673  {
5674  /*%%%*/
5675  (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5676  /*%
5677  $$ = dispatch3(binary, $1, ripper_intern("and"), $3);
5678  %*/
5679  ;}
5680  break;
5681 
5682  case 47:
5683 #line 1259 "parse.y"
5684  {
5685  /*%%%*/
5686  (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5687  /*%
5688  $$ = dispatch3(binary, $1, ripper_intern("or"), $3);
5689  %*/
5690  ;}
5691  break;
5692 
5693  case 48:
5694 #line 1267 "parse.y"
5695  {
5696  /*%%%*/
5697  (yyval.node) = call_uni_op(cond((yyvsp[(3) - (3)].node)), '!');
5698  /*%
5699  $$ = dispatch2(unary, ripper_intern("not"), $3);
5700  %*/
5701  ;}
5702  break;
5703 
5704  case 49:
5705 #line 1275 "parse.y"
5706  {
5707  /*%%%*/
5708  (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!');
5709  /*%
5710  $$ = dispatch2(unary, ripper_id2sym('!'), $2);
5711  %*/
5712  ;}
5713  break;
5714 
5715  case 51:
5716 #line 1286 "parse.y"
5717  {
5718  /*%%%*/
5719  value_expr((yyvsp[(1) - (1)].node));
5720  (yyval.node) = (yyvsp[(1) - (1)].node);
5721  if (!(yyval.node)) (yyval.node) = NEW_NIL();
5722  /*%
5723  $$ = $1;
5724  %*/
5725  ;}
5726  break;
5727 
5728  case 55:
5729 #line 1303 "parse.y"
5730  {
5731  /*%%%*/
5732  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
5733  /*%
5734  $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
5735  $$ = method_arg($$, $4);
5736  %*/
5737  ;}
5738  break;
5739 
5740  case 56:
5741 #line 1312 "parse.y"
5742  {
5743  /*%%%*/
5744  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
5745  /*%
5746  $$ = dispatch3(call, $1, ripper_intern("::"), $3);
5747  $$ = method_arg($$, $4);
5748  %*/
5749  ;}
5750  break;
5751 
5752  case 57:
5753 #line 1323 "parse.y"
5754  {
5755  (yyvsp[(1) - (1)].vars) = dyna_push();
5756  /*%%%*/
5757  (yyval.num) = ruby_sourceline;
5758  /*%
5759  %*/
5760  ;}
5761  break;
5762 
5763  case 58:
5764 #line 1333 "parse.y"
5765  {
5766  /*%%%*/
5767  (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node));
5768  nd_set_line((yyval.node), (yyvsp[(2) - (5)].num));
5769  /*%
5770  $$ = dispatch2(brace_block, escape_Qundef($3), $4);
5771  %*/
5772  dyna_pop((yyvsp[(1) - (5)].vars));
5773  ;}
5774  break;
5775 
5776  case 59:
5777 #line 1345 "parse.y"
5778  {
5779  /*%%%*/
5780  (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node));
5781  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
5782  /*%
5783  $$ = dispatch2(command, $1, $2);
5784  %*/
5785  ;}
5786  break;
5787 
5788  case 60:
5789 #line 1354 "parse.y"
5790  {
5791  /*%%%*/
5792  block_dup_check((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node));
5793  (yyvsp[(3) - (3)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].node));
5794  (yyval.node) = (yyvsp[(3) - (3)].node);
5795  fixpos((yyval.node), (yyvsp[(2) - (3)].node));
5796  /*%
5797  $$ = dispatch2(command, $1, $2);
5798  $$ = method_add_block($$, $3);
5799  %*/
5800  ;}
5801  break;
5802 
5803  case 61:
5804 #line 1366 "parse.y"
5805  {
5806  /*%%%*/
5807  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
5808  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
5809  /*%
5810  $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
5811  %*/
5812  ;}
5813  break;
5814 
5815  case 62:
5816 #line 1375 "parse.y"
5817  {
5818  /*%%%*/
5819  block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node));
5820  (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node));
5821  (yyval.node) = (yyvsp[(5) - (5)].node);
5822  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5823  /*%
5824  $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
5825  $$ = method_add_block($$, $5);
5826  %*/
5827  ;}
5828  break;
5829 
5830  case 63:
5831 #line 1387 "parse.y"
5832  {
5833  /*%%%*/
5834  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
5835  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
5836  /*%
5837  $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4);
5838  %*/
5839  ;}
5840  break;
5841 
5842  case 64:
5843 #line 1396 "parse.y"
5844  {
5845  /*%%%*/
5846  block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node));
5847  (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node));
5848  (yyval.node) = (yyvsp[(5) - (5)].node);
5849  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
5850  /*%
5851  $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4);
5852  $$ = method_add_block($$, $5);
5853  %*/
5854  ;}
5855  break;
5856 
5857  case 65:
5858 #line 1408 "parse.y"
5859  {
5860  /*%%%*/
5861  (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node));
5862  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
5863  /*%
5864  $$ = dispatch1(super, $2);
5865  %*/
5866  ;}
5867  break;
5868 
5869  case 66:
5870 #line 1417 "parse.y"
5871  {
5872  /*%%%*/
5873  (yyval.node) = new_yield((yyvsp[(2) - (2)].node));
5874  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
5875  /*%
5876  $$ = dispatch1(yield, $2);
5877  %*/
5878  ;}
5879  break;
5880 
5881  case 67:
5882 #line 1426 "parse.y"
5883  {
5884  /*%%%*/
5885  (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node)));
5886  /*%
5887  $$ = dispatch1(return, $2);
5888  %*/
5889  ;}
5890  break;
5891 
5892  case 68:
5893 #line 1434 "parse.y"
5894  {
5895  /*%%%*/
5896  (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node)));
5897  /*%
5898  $$ = dispatch1(break, $2);
5899  %*/
5900  ;}
5901  break;
5902 
5903  case 69:
5904 #line 1442 "parse.y"
5905  {
5906  /*%%%*/
5907  (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node)));
5908  /*%
5909  $$ = dispatch1(next, $2);
5910  %*/
5911  ;}
5912  break;
5913 
5914  case 71:
5915 #line 1453 "parse.y"
5916  {
5917  /*%%%*/
5918  (yyval.node) = (yyvsp[(2) - (3)].node);
5919  /*%
5920  $$ = dispatch1(mlhs_paren, $2);
5921  %*/
5922  ;}
5923  break;
5924 
5925  case 73:
5926 #line 1464 "parse.y"
5927  {
5928  /*%%%*/
5929  (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0);
5930  /*%
5931  $$ = dispatch1(mlhs_paren, $2);
5932  %*/
5933  ;}
5934  break;
5935 
5936  case 74:
5937 #line 1474 "parse.y"
5938  {
5939  /*%%%*/
5940  (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0);
5941  /*%
5942  $$ = $1;
5943  %*/
5944  ;}
5945  break;
5946 
5947  case 75:
5948 #line 1482 "parse.y"
5949  {
5950  /*%%%*/
5951  (yyval.node) = NEW_MASGN(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0);
5952  /*%
5953  $$ = mlhs_add($1, $2);
5954  %*/
5955  ;}
5956  break;
5957 
5958  case 76:
5959 #line 1490 "parse.y"
5960  {
5961  /*%%%*/
5962  (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
5963  /*%
5964  $$ = mlhs_add_star($1, $3);
5965  %*/
5966  ;}
5967  break;
5968 
5969  case 77:
5970 #line 1498 "parse.y"
5971  {
5972  /*%%%*/
5973  (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG((yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node)));
5974  /*%
5975  $1 = mlhs_add_star($1, $3);
5976  $$ = mlhs_add($1, $5);
5977  %*/
5978  ;}
5979  break;
5980 
5981  case 78:
5982 #line 1507 "parse.y"
5983  {
5984  /*%%%*/
5985  (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1);
5986  /*%
5987  $$ = mlhs_add_star($1, Qnil);
5988  %*/
5989  ;}
5990  break;
5991 
5992  case 79:
5993 #line 1515 "parse.y"
5994  {
5995  /*%%%*/
5996  (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), NEW_POSTARG(-1, (yyvsp[(4) - (4)].node)));
5997  /*%
5998  $1 = mlhs_add_star($1, Qnil);
5999  $$ = mlhs_add($1, $4);
6000  %*/
6001  ;}
6002  break;
6003 
6004  case 80:
6005 #line 1524 "parse.y"
6006  {
6007  /*%%%*/
6008  (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node));
6009  /*%
6010  $$ = mlhs_add_star(mlhs_new(), $2);
6011  %*/
6012  ;}
6013  break;
6014 
6015  case 81:
6016 #line 1532 "parse.y"
6017  {
6018  /*%%%*/
6019  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node)));
6020  /*%
6021  $2 = mlhs_add_star(mlhs_new(), $2);
6022  $$ = mlhs_add($2, $4);
6023  %*/
6024  ;}
6025  break;
6026 
6027  case 82:
6028 #line 1541 "parse.y"
6029  {
6030  /*%%%*/
6031  (yyval.node) = NEW_MASGN(0, -1);
6032  /*%
6033  $$ = mlhs_add_star(mlhs_new(), Qnil);
6034  %*/
6035  ;}
6036  break;
6037 
6038  case 83:
6039 #line 1549 "parse.y"
6040  {
6041  /*%%%*/
6042  (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node)));
6043  /*%
6044  $$ = mlhs_add_star(mlhs_new(), Qnil);
6045  $$ = mlhs_add($$, $3);
6046  %*/
6047  ;}
6048  break;
6049 
6050  case 85:
6051 #line 1561 "parse.y"
6052  {
6053  /*%%%*/
6054  (yyval.node) = (yyvsp[(2) - (3)].node);
6055  /*%
6056  $$ = dispatch1(mlhs_paren, $2);
6057  %*/
6058  ;}
6059  break;
6060 
6061  case 86:
6062 #line 1571 "parse.y"
6063  {
6064  /*%%%*/
6065  (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node));
6066  /*%
6067  $$ = mlhs_add(mlhs_new(), $1);
6068  %*/
6069  ;}
6070  break;
6071 
6072  case 87:
6073 #line 1579 "parse.y"
6074  {
6075  /*%%%*/
6076  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node));
6077  /*%
6078  $$ = mlhs_add($1, $2);
6079  %*/
6080  ;}
6081  break;
6082 
6083  case 88:
6084 #line 1589 "parse.y"
6085  {
6086  /*%%%*/
6087  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
6088  /*%
6089  $$ = mlhs_add(mlhs_new(), $1);
6090  %*/
6091  ;}
6092  break;
6093 
6094  case 89:
6095 #line 1597 "parse.y"
6096  {
6097  /*%%%*/
6098  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6099  /*%
6100  $$ = mlhs_add($1, $3);
6101  %*/
6102  ;}
6103  break;
6104 
6105  case 90:
6106 #line 1607 "parse.y"
6107  {
6108  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
6109  ;}
6110  break;
6111 
6112  case 91:
6113 #line 1611 "parse.y"
6114  {
6115  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
6116  ;}
6117  break;
6118 
6119  case 92:
6120 #line 1615 "parse.y"
6121  {
6122  /*%%%*/
6123  (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
6124  /*%
6125  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
6126  %*/
6127  ;}
6128  break;
6129 
6130  case 93:
6131 #line 1623 "parse.y"
6132  {
6133  /*%%%*/
6134  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6135  /*%
6136  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
6137  %*/
6138  ;}
6139  break;
6140 
6141  case 94:
6142 #line 1631 "parse.y"
6143  {
6144  /*%%%*/
6145  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6146  /*%
6147  $$ = dispatch2(const_path_field, $1, $3);
6148  %*/
6149  ;}
6150  break;
6151 
6152  case 95:
6153 #line 1639 "parse.y"
6154  {
6155  /*%%%*/
6156  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6157  /*%
6158  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
6159  %*/
6160  ;}
6161  break;
6162 
6163  case 96:
6164 #line 1647 "parse.y"
6165  {
6166  /*%%%*/
6167  if (in_def || in_single)
6168  yyerror("dynamic constant assignment");
6169  (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)));
6170  /*%
6171  if (in_def || in_single)
6172  yyerror("dynamic constant assignment");
6173  $$ = dispatch2(const_path_field, $1, $3);
6174  %*/
6175  ;}
6176  break;
6177 
6178  case 97:
6179 #line 1659 "parse.y"
6180  {
6181  /*%%%*/
6182  if (in_def || in_single)
6183  yyerror("dynamic constant assignment");
6184  (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id)));
6185  /*%
6186  $$ = dispatch1(top_const_field, $2);
6187  %*/
6188  ;}
6189  break;
6190 
6191  case 98:
6192 #line 1669 "parse.y"
6193  {
6194  /*%%%*/
6195  rb_backref_error((yyvsp[(1) - (1)].node));
6196  (yyval.node) = NEW_BEGIN(0);
6197  /*%
6198  $$ = dispatch1(var_field, $1);
6199  $$ = dispatch1(assign_error, $$);
6200  %*/
6201  ;}
6202  break;
6203 
6204  case 99:
6205 #line 1681 "parse.y"
6206  {
6207  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
6208  /*%%%*/
6209  if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0);
6210  /*%
6211  $$ = dispatch1(var_field, $$);
6212  %*/
6213  ;}
6214  break;
6215 
6216  case 100:
6217 #line 1690 "parse.y"
6218  {
6219  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
6220  /*%%%*/
6221  if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0);
6222  /*%
6223  $$ = dispatch1(var_field, $$);
6224  %*/
6225  ;}
6226  break;
6227 
6228  case 101:
6229 #line 1699 "parse.y"
6230  {
6231  /*%%%*/
6232  (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
6233  /*%
6234  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
6235  %*/
6236  ;}
6237  break;
6238 
6239  case 102:
6240 #line 1707 "parse.y"
6241  {
6242  /*%%%*/
6243  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6244  /*%
6245  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
6246  %*/
6247  ;}
6248  break;
6249 
6250  case 103:
6251 #line 1715 "parse.y"
6252  {
6253  /*%%%*/
6254  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6255  /*%
6256  $$ = dispatch3(field, $1, ripper_intern("::"), $3);
6257  %*/
6258  ;}
6259  break;
6260 
6261  case 104:
6262 #line 1723 "parse.y"
6263  {
6264  /*%%%*/
6265  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6266  /*%
6267  $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
6268  %*/
6269  ;}
6270  break;
6271 
6272  case 105:
6273 #line 1731 "parse.y"
6274  {
6275  /*%%%*/
6276  if (in_def || in_single)
6277  yyerror("dynamic constant assignment");
6278  (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)));
6279  /*%
6280  $$ = dispatch2(const_path_field, $1, $3);
6281  if (in_def || in_single) {
6282  $$ = dispatch1(assign_error, $$);
6283  }
6284  %*/
6285  ;}
6286  break;
6287 
6288  case 106:
6289 #line 1744 "parse.y"
6290  {
6291  /*%%%*/
6292  if (in_def || in_single)
6293  yyerror("dynamic constant assignment");
6294  (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id)));
6295  /*%
6296  $$ = dispatch1(top_const_field, $2);
6297  if (in_def || in_single) {
6298  $$ = dispatch1(assign_error, $$);
6299  }
6300  %*/
6301  ;}
6302  break;
6303 
6304  case 107:
6305 #line 1757 "parse.y"
6306  {
6307  /*%%%*/
6308  rb_backref_error((yyvsp[(1) - (1)].node));
6309  (yyval.node) = NEW_BEGIN(0);
6310  /*%
6311  $$ = dispatch1(assign_error, $1);
6312  %*/
6313  ;}
6314  break;
6315 
6316  case 108:
6317 #line 1768 "parse.y"
6318  {
6319  /*%%%*/
6320  yyerror("class/module name must be CONSTANT");
6321  /*%
6322  $$ = dispatch1(class_name_error, $1);
6323  %*/
6324  ;}
6325  break;
6326 
6327  case 110:
6328 #line 1779 "parse.y"
6329  {
6330  /*%%%*/
6331  (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id));
6332  /*%
6333  $$ = dispatch1(top_const_ref, $2);
6334  %*/
6335  ;}
6336  break;
6337 
6338  case 111:
6339 #line 1787 "parse.y"
6340  {
6341  /*%%%*/
6342  (yyval.node) = NEW_COLON2(0, (yyval.node));
6343  /*%
6344  $$ = dispatch1(const_ref, $1);
6345  %*/
6346  ;}
6347  break;
6348 
6349  case 112:
6350 #line 1795 "parse.y"
6351  {
6352  /*%%%*/
6353  (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6354  /*%
6355  $$ = dispatch2(const_path_ref, $1, $3);
6356  %*/
6357  ;}
6358  break;
6359 
6360  case 116:
6361 #line 1808 "parse.y"
6362  {
6364  (yyval.id) = (yyvsp[(1) - (1)].id);
6365  ;}
6366  break;
6367 
6368  case 117:
6369 #line 1813 "parse.y"
6370  {
6372  /*%%%*/
6373  (yyval.id) = (yyvsp[(1) - (1)].id);
6374  /*%
6375  $$ = $1;
6376  %*/
6377  ;}
6378  break;
6379 
6380  case 120:
6381 #line 1828 "parse.y"
6382  {
6383  /*%%%*/
6384  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id)));
6385  /*%
6386  $$ = dispatch1(symbol_literal, $1);
6387  %*/
6388  ;}
6389  break;
6390 
6391  case 122:
6392 #line 1839 "parse.y"
6393  {
6394  /*%%%*/
6395  (yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node));
6396  /*%
6397  $$ = rb_ary_new3(1, $1);
6398  %*/
6399  ;}
6400  break;
6401 
6402  case 123:
6403 #line 1846 "parse.y"
6404  {lex_state = EXPR_FNAME;;}
6405  break;
6406 
6407  case 124:
6408 #line 1847 "parse.y"
6409  {
6410  /*%%%*/
6411  (yyval.node) = block_append((yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node)));
6412  /*%
6413  rb_ary_push($1, $4);
6414  %*/
6415  ;}
6416  break;
6417 
6418  case 125:
6419 #line 1856 "parse.y"
6420  { ifndef_ripper((yyval.id) = '|'); ;}
6421  break;
6422 
6423  case 126:
6424 #line 1857 "parse.y"
6425  { ifndef_ripper((yyval.id) = '^'); ;}
6426  break;
6427 
6428  case 127:
6429 #line 1858 "parse.y"
6430  { ifndef_ripper((yyval.id) = '&'); ;}
6431  break;
6432 
6433  case 128:
6434 #line 1859 "parse.y"
6435  { ifndef_ripper((yyval.id) = tCMP); ;}
6436  break;
6437 
6438  case 129:
6439 #line 1860 "parse.y"
6440  { ifndef_ripper((yyval.id) = tEQ); ;}
6441  break;
6442 
6443  case 130:
6444 #line 1861 "parse.y"
6445  { ifndef_ripper((yyval.id) = tEQQ); ;}
6446  break;
6447 
6448  case 131:
6449 #line 1862 "parse.y"
6450  { ifndef_ripper((yyval.id) = tMATCH); ;}
6451  break;
6452 
6453  case 132:
6454 #line 1863 "parse.y"
6455  { ifndef_ripper((yyval.id) = tNMATCH); ;}
6456  break;
6457 
6458  case 133:
6459 #line 1864 "parse.y"
6460  { ifndef_ripper((yyval.id) = '>'); ;}
6461  break;
6462 
6463  case 134:
6464 #line 1865 "parse.y"
6465  { ifndef_ripper((yyval.id) = tGEQ); ;}
6466  break;
6467 
6468  case 135:
6469 #line 1866 "parse.y"
6470  { ifndef_ripper((yyval.id) = '<'); ;}
6471  break;
6472 
6473  case 136:
6474 #line 1867 "parse.y"
6475  { ifndef_ripper((yyval.id) = tLEQ); ;}
6476  break;
6477 
6478  case 137:
6479 #line 1868 "parse.y"
6480  { ifndef_ripper((yyval.id) = tNEQ); ;}
6481  break;
6482 
6483  case 138:
6484 #line 1869 "parse.y"
6485  { ifndef_ripper((yyval.id) = tLSHFT); ;}
6486  break;
6487 
6488  case 139:
6489 #line 1870 "parse.y"
6490  { ifndef_ripper((yyval.id) = tRSHFT); ;}
6491  break;
6492 
6493  case 140:
6494 #line 1871 "parse.y"
6495  { ifndef_ripper((yyval.id) = '+'); ;}
6496  break;
6497 
6498  case 141:
6499 #line 1872 "parse.y"
6500  { ifndef_ripper((yyval.id) = '-'); ;}
6501  break;
6502 
6503  case 142:
6504 #line 1873 "parse.y"
6505  { ifndef_ripper((yyval.id) = '*'); ;}
6506  break;
6507 
6508  case 143:
6509 #line 1874 "parse.y"
6510  { ifndef_ripper((yyval.id) = '*'); ;}
6511  break;
6512 
6513  case 144:
6514 #line 1875 "parse.y"
6515  { ifndef_ripper((yyval.id) = '/'); ;}
6516  break;
6517 
6518  case 145:
6519 #line 1876 "parse.y"
6520  { ifndef_ripper((yyval.id) = '%'); ;}
6521  break;
6522 
6523  case 146:
6524 #line 1877 "parse.y"
6525  { ifndef_ripper((yyval.id) = tPOW); ;}
6526  break;
6527 
6528  case 147:
6529 #line 1878 "parse.y"
6530  { ifndef_ripper((yyval.id) = '!'); ;}
6531  break;
6532 
6533  case 148:
6534 #line 1879 "parse.y"
6535  { ifndef_ripper((yyval.id) = '~'); ;}
6536  break;
6537 
6538  case 149:
6539 #line 1880 "parse.y"
6540  { ifndef_ripper((yyval.id) = tUPLUS); ;}
6541  break;
6542 
6543  case 150:
6544 #line 1881 "parse.y"
6545  { ifndef_ripper((yyval.id) = tUMINUS); ;}
6546  break;
6547 
6548  case 151:
6549 #line 1882 "parse.y"
6550  { ifndef_ripper((yyval.id) = tAREF); ;}
6551  break;
6552 
6553  case 152:
6554 #line 1883 "parse.y"
6555  { ifndef_ripper((yyval.id) = tASET); ;}
6556  break;
6557 
6558  case 153:
6559 #line 1884 "parse.y"
6560  { ifndef_ripper((yyval.id) = '`'); ;}
6561  break;
6562 
6563  case 195:
6564 #line 1902 "parse.y"
6565  {
6566  /*%%%*/
6567  value_expr((yyvsp[(3) - (3)].node));
6568  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6569  /*%
6570  $$ = dispatch2(assign, $1, $3);
6571  %*/
6572  ;}
6573  break;
6574 
6575  case 196:
6576 #line 1911 "parse.y"
6577  {
6578  /*%%%*/
6579  value_expr((yyvsp[(3) - (5)].node));
6580  (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0);
6581  (yyval.node) = node_assign((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node));
6582  /*%
6583  $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5));
6584  %*/
6585  ;}
6586  break;
6587 
6588  case 197:
6589 #line 1921 "parse.y"
6590  {
6591  /*%%%*/
6592  value_expr((yyvsp[(3) - (3)].node));
6593  if ((yyvsp[(1) - (3)].node)) {
6594  ID vid = (yyvsp[(1) - (3)].node)->nd_vid;
6595  if ((yyvsp[(2) - (3)].id) == tOROP) {
6596  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
6597  (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node));
6598  if (is_asgn_or_id(vid)) {
6599  (yyval.node)->nd_aid = vid;
6600  }
6601  }
6602  else if ((yyvsp[(2) - (3)].id) == tANDOP) {
6603  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
6604  (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node));
6605  }
6606  else {
6607  (yyval.node) = (yyvsp[(1) - (3)].node);
6608  (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node)));
6609  }
6610  }
6611  else {
6612  (yyval.node) = NEW_BEGIN(0);
6613  }
6614  /*%
6615  $$ = dispatch3(opassign, $1, $2, $3);
6616  %*/
6617  ;}
6618  break;
6619 
6620  case 198:
6621 #line 1950 "parse.y"
6622  {
6623  /*%%%*/
6624  value_expr((yyvsp[(3) - (5)].node));
6625  (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0);
6626  if ((yyvsp[(1) - (5)].node)) {
6627  ID vid = (yyvsp[(1) - (5)].node)->nd_vid;
6628  if ((yyvsp[(2) - (5)].id) == tOROP) {
6629  (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node);
6630  (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].node));
6631  if (is_asgn_or_id(vid)) {
6632  (yyval.node)->nd_aid = vid;
6633  }
6634  }
6635  else if ((yyvsp[(2) - (5)].id) == tANDOP) {
6636  (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node);
6637  (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].node));
6638  }
6639  else {
6640  (yyval.node) = (yyvsp[(1) - (5)].node);
6641  (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].id), NEW_LIST((yyvsp[(3) - (5)].node)));
6642  }
6643  }
6644  else {
6645  (yyval.node) = NEW_BEGIN(0);
6646  }
6647  /*%
6648  $3 = dispatch2(rescue_mod, $3, $5);
6649  $$ = dispatch3(opassign, $1, $2, $3);
6650  %*/
6651  ;}
6652  break;
6653 
6654  case 199:
6655 #line 1981 "parse.y"
6656  {
6657  /*%%%*/
6658  NODE *args;
6659 
6660  value_expr((yyvsp[(6) - (6)].node));
6661  if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY();
6662  if (nd_type((yyvsp[(3) - (6)].node)) == NODE_BLOCK_PASS) {
6663  args = NEW_ARGSCAT((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
6664  }
6665  else {
6666  args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
6667  }
6668  if ((yyvsp[(5) - (6)].id) == tOROP) {
6669  (yyvsp[(5) - (6)].id) = 0;
6670  }
6671  else if ((yyvsp[(5) - (6)].id) == tANDOP) {
6672  (yyvsp[(5) - (6)].id) = 1;
6673  }
6674  (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args);
6675  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
6676  /*%
6677  $1 = dispatch2(aref_field, $1, escape_Qundef($3));
6678  $$ = dispatch3(opassign, $1, $5, $6);
6679  %*/
6680  ;}
6681  break;
6682 
6683  case 200:
6684 #line 2007 "parse.y"
6685  {
6686  /*%%%*/
6687  value_expr((yyvsp[(5) - (5)].node));
6688  if ((yyvsp[(4) - (5)].id) == tOROP) {
6689  (yyvsp[(4) - (5)].id) = 0;
6690  }
6691  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
6692  (yyvsp[(4) - (5)].id) = 1;
6693  }
6694  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
6695  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
6696  /*%
6697  $1 = dispatch3(field, $1, ripper_id2sym('.'), $3);
6698  $$ = dispatch3(opassign, $1, $4, $5);
6699  %*/
6700  ;}
6701  break;
6702 
6703  case 201:
6704 #line 2024 "parse.y"
6705  {
6706  /*%%%*/
6707  value_expr((yyvsp[(5) - (5)].node));
6708  if ((yyvsp[(4) - (5)].id) == tOROP) {
6709  (yyvsp[(4) - (5)].id) = 0;
6710  }
6711  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
6712  (yyvsp[(4) - (5)].id) = 1;
6713  }
6714  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
6715  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
6716  /*%
6717  $1 = dispatch3(field, $1, ripper_id2sym('.'), $3);
6718  $$ = dispatch3(opassign, $1, $4, $5);
6719  %*/
6720  ;}
6721  break;
6722 
6723  case 202:
6724 #line 2041 "parse.y"
6725  {
6726  /*%%%*/
6727  value_expr((yyvsp[(5) - (5)].node));
6728  if ((yyvsp[(4) - (5)].id) == tOROP) {
6729  (yyvsp[(4) - (5)].id) = 0;
6730  }
6731  else if ((yyvsp[(4) - (5)].id) == tANDOP) {
6732  (yyvsp[(4) - (5)].id) = 1;
6733  }
6734  (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node));
6735  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
6736  /*%
6737  $1 = dispatch3(field, $1, ripper_intern("::"), $3);
6738  $$ = dispatch3(opassign, $1, $4, $5);
6739  %*/
6740  ;}
6741  break;
6742 
6743  case 203:
6744 #line 2058 "parse.y"
6745  {
6746  /*%%%*/
6747  yyerror("constant re-assignment");
6748  (yyval.node) = NEW_BEGIN(0);
6749  /*%
6750  $$ = dispatch2(const_path_field, $1, $3);
6751  $$ = dispatch3(opassign, $$, $4, $5);
6752  $$ = dispatch1(assign_error, $$);
6753  %*/
6754  ;}
6755  break;
6756 
6757  case 204:
6758 #line 2069 "parse.y"
6759  {
6760  /*%%%*/
6761  yyerror("constant re-assignment");
6762  (yyval.node) = NEW_BEGIN(0);
6763  /*%
6764  $$ = dispatch1(top_const_field, $2);
6765  $$ = dispatch3(opassign, $$, $3, $4);
6766  $$ = dispatch1(assign_error, $$);
6767  %*/
6768  ;}
6769  break;
6770 
6771  case 205:
6772 #line 2080 "parse.y"
6773  {
6774  /*%%%*/
6775  rb_backref_error((yyvsp[(1) - (3)].node));
6776  (yyval.node) = NEW_BEGIN(0);
6777  /*%
6778  $$ = dispatch1(var_field, $1);
6779  $$ = dispatch3(opassign, $$, $2, $3);
6780  $$ = dispatch1(assign_error, $$);
6781  %*/
6782  ;}
6783  break;
6784 
6785  case 206:
6786 #line 2091 "parse.y"
6787  {
6788  /*%%%*/
6789  value_expr((yyvsp[(1) - (3)].node));
6790  value_expr((yyvsp[(3) - (3)].node));
6791  (yyval.node) = NEW_DOT2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6792  if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) &&
6793  nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) {
6795  }
6796  /*%
6797  $$ = dispatch2(dot2, $1, $3);
6798  %*/
6799  ;}
6800  break;
6801 
6802  case 207:
6803 #line 2105 "parse.y"
6804  {
6805  /*%%%*/
6806  value_expr((yyvsp[(1) - (3)].node));
6807  value_expr((yyvsp[(3) - (3)].node));
6808  (yyval.node) = NEW_DOT3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6809  if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) &&
6810  nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) {
6812  }
6813  /*%
6814  $$ = dispatch2(dot3, $1, $3);
6815  %*/
6816  ;}
6817  break;
6818 
6819  case 208:
6820 #line 2119 "parse.y"
6821  {
6822  /*%%%*/
6823  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '+', (yyvsp[(3) - (3)].node));
6824  /*%
6825  $$ = dispatch3(binary, $1, ID2SYM('+'), $3);
6826  %*/
6827  ;}
6828  break;
6829 
6830  case 209:
6831 #line 2127 "parse.y"
6832  {
6833  /*%%%*/
6834  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '-', (yyvsp[(3) - (3)].node));
6835  /*%
6836  $$ = dispatch3(binary, $1, ID2SYM('-'), $3);
6837  %*/
6838  ;}
6839  break;
6840 
6841  case 210:
6842 #line 2135 "parse.y"
6843  {
6844  /*%%%*/
6845  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '*', (yyvsp[(3) - (3)].node));
6846  /*%
6847  $$ = dispatch3(binary, $1, ID2SYM('*'), $3);
6848  %*/
6849  ;}
6850  break;
6851 
6852  case 211:
6853 #line 2143 "parse.y"
6854  {
6855  /*%%%*/
6856  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '/', (yyvsp[(3) - (3)].node));
6857  /*%
6858  $$ = dispatch3(binary, $1, ID2SYM('/'), $3);
6859  %*/
6860  ;}
6861  break;
6862 
6863  case 212:
6864 #line 2151 "parse.y"
6865  {
6866  /*%%%*/
6867  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '%', (yyvsp[(3) - (3)].node));
6868  /*%
6869  $$ = dispatch3(binary, $1, ID2SYM('%'), $3);
6870  %*/
6871  ;}
6872  break;
6873 
6874  case 213:
6875 #line 2159 "parse.y"
6876  {
6877  /*%%%*/
6878  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tPOW, (yyvsp[(3) - (3)].node));
6879  /*%
6880  $$ = dispatch3(binary, $1, ripper_intern("**"), $3);
6881  %*/
6882  ;}
6883  break;
6884 
6885  case 214:
6886 #line 2167 "parse.y"
6887  {
6888  /*%%%*/
6889  (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0);
6890  /*%
6891  $$ = dispatch3(binary, $2, ripper_intern("**"), $4);
6892  $$ = dispatch2(unary, ripper_intern("-@"), $$);
6893  %*/
6894  ;}
6895  break;
6896 
6897  case 215:
6898 #line 2176 "parse.y"
6899  {
6900  /*%%%*/
6901  (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0);
6902  /*%
6903  $$ = dispatch3(binary, $2, ripper_intern("**"), $4);
6904  $$ = dispatch2(unary, ripper_intern("-@"), $$);
6905  %*/
6906  ;}
6907  break;
6908 
6909  case 216:
6910 #line 2185 "parse.y"
6911  {
6912  /*%%%*/
6913  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUPLUS);
6914  /*%
6915  $$ = dispatch2(unary, ripper_intern("+@"), $2);
6916  %*/
6917  ;}
6918  break;
6919 
6920  case 217:
6921 #line 2193 "parse.y"
6922  {
6923  /*%%%*/
6924  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUMINUS);
6925  /*%
6926  $$ = dispatch2(unary, ripper_intern("-@"), $2);
6927  %*/
6928  ;}
6929  break;
6930 
6931  case 218:
6932 #line 2201 "parse.y"
6933  {
6934  /*%%%*/
6935  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '|', (yyvsp[(3) - (3)].node));
6936  /*%
6937  $$ = dispatch3(binary, $1, ID2SYM('|'), $3);
6938  %*/
6939  ;}
6940  break;
6941 
6942  case 219:
6943 #line 2209 "parse.y"
6944  {
6945  /*%%%*/
6946  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '^', (yyvsp[(3) - (3)].node));
6947  /*%
6948  $$ = dispatch3(binary, $1, ID2SYM('^'), $3);
6949  %*/
6950  ;}
6951  break;
6952 
6953  case 220:
6954 #line 2217 "parse.y"
6955  {
6956  /*%%%*/
6957  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '&', (yyvsp[(3) - (3)].node));
6958  /*%
6959  $$ = dispatch3(binary, $1, ID2SYM('&'), $3);
6960  %*/
6961  ;}
6962  break;
6963 
6964  case 221:
6965 #line 2225 "parse.y"
6966  {
6967  /*%%%*/
6968  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tCMP, (yyvsp[(3) - (3)].node));
6969  /*%
6970  $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3);
6971  %*/
6972  ;}
6973  break;
6974 
6975  case 222:
6976 #line 2233 "parse.y"
6977  {
6978  /*%%%*/
6979  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '>', (yyvsp[(3) - (3)].node));
6980  /*%
6981  $$ = dispatch3(binary, $1, ID2SYM('>'), $3);
6982  %*/
6983  ;}
6984  break;
6985 
6986  case 223:
6987 #line 2241 "parse.y"
6988  {
6989  /*%%%*/
6990  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tGEQ, (yyvsp[(3) - (3)].node));
6991  /*%
6992  $$ = dispatch3(binary, $1, ripper_intern(">="), $3);
6993  %*/
6994  ;}
6995  break;
6996 
6997  case 224:
6998 #line 2249 "parse.y"
6999  {
7000  /*%%%*/
7001  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '<', (yyvsp[(3) - (3)].node));
7002  /*%
7003  $$ = dispatch3(binary, $1, ID2SYM('<'), $3);
7004  %*/
7005  ;}
7006  break;
7007 
7008  case 225:
7009 #line 2257 "parse.y"
7010  {
7011  /*%%%*/
7012  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLEQ, (yyvsp[(3) - (3)].node));
7013  /*%
7014  $$ = dispatch3(binary, $1, ripper_intern("<="), $3);
7015  %*/
7016  ;}
7017  break;
7018 
7019  case 226:
7020 #line 2265 "parse.y"
7021  {
7022  /*%%%*/
7023  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQ, (yyvsp[(3) - (3)].node));
7024  /*%
7025  $$ = dispatch3(binary, $1, ripper_intern("=="), $3);
7026  %*/
7027  ;}
7028  break;
7029 
7030  case 227:
7031 #line 2273 "parse.y"
7032  {
7033  /*%%%*/
7034  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQQ, (yyvsp[(3) - (3)].node));
7035  /*%
7036  $$ = dispatch3(binary, $1, ripper_intern("==="), $3);
7037  %*/
7038  ;}
7039  break;
7040 
7041  case 228:
7042 #line 2281 "parse.y"
7043  {
7044  /*%%%*/
7045  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNEQ, (yyvsp[(3) - (3)].node));
7046  /*%
7047  $$ = dispatch3(binary, $1, ripper_intern("!="), $3);
7048  %*/
7049  ;}
7050  break;
7051 
7052  case 229:
7053 #line 2289 "parse.y"
7054  {
7055  /*%%%*/
7056  (yyval.node) = match_op((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7057  if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].node)->nd_lit) == T_REGEXP) {
7058  (yyval.node) = reg_named_capture_assign((yyvsp[(1) - (3)].node)->nd_lit, (yyval.node));
7059  }
7060  /*%
7061  $$ = dispatch3(binary, $1, ripper_intern("=~"), $3);
7062  %*/
7063  ;}
7064  break;
7065 
7066  case 230:
7067 #line 2300 "parse.y"
7068  {
7069  /*%%%*/
7070  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNMATCH, (yyvsp[(3) - (3)].node));
7071  /*%
7072  $$ = dispatch3(binary, $1, ripper_intern("!~"), $3);
7073  %*/
7074  ;}
7075  break;
7076 
7077  case 231:
7078 #line 2308 "parse.y"
7079  {
7080  /*%%%*/
7081  (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!');
7082  /*%
7083  $$ = dispatch2(unary, ID2SYM('!'), $2);
7084  %*/
7085  ;}
7086  break;
7087 
7088  case 232:
7089 #line 2316 "parse.y"
7090  {
7091  /*%%%*/
7092  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), '~');
7093  /*%
7094  $$ = dispatch2(unary, ID2SYM('~'), $2);
7095  %*/
7096  ;}
7097  break;
7098 
7099  case 233:
7100 #line 2324 "parse.y"
7101  {
7102  /*%%%*/
7103  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLSHFT, (yyvsp[(3) - (3)].node));
7104  /*%
7105  $$ = dispatch3(binary, $1, ripper_intern("<<"), $3);
7106  %*/
7107  ;}
7108  break;
7109 
7110  case 234:
7111 #line 2332 "parse.y"
7112  {
7113  /*%%%*/
7114  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tRSHFT, (yyvsp[(3) - (3)].node));
7115  /*%
7116  $$ = dispatch3(binary, $1, ripper_intern(">>"), $3);
7117  %*/
7118  ;}
7119  break;
7120 
7121  case 235:
7122 #line 2340 "parse.y"
7123  {
7124  /*%%%*/
7125  (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7126  /*%
7127  $$ = dispatch3(binary, $1, ripper_intern("&&"), $3);
7128  %*/
7129  ;}
7130  break;
7131 
7132  case 236:
7133 #line 2348 "parse.y"
7134  {
7135  /*%%%*/
7136  (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7137  /*%
7138  $$ = dispatch3(binary, $1, ripper_intern("||"), $3);
7139  %*/
7140  ;}
7141  break;
7142 
7143  case 237:
7144 #line 2355 "parse.y"
7145  {in_defined = 1;;}
7146  break;
7147 
7148  case 238:
7149 #line 2356 "parse.y"
7150  {
7151  /*%%%*/
7152  in_defined = 0;
7153  (yyval.node) = NEW_DEFINED((yyvsp[(4) - (4)].node));
7154  /*%
7155  in_defined = 0;
7156  $$ = dispatch1(defined, $4);
7157  %*/
7158  ;}
7159  break;
7160 
7161  case 239:
7162 #line 2366 "parse.y"
7163  {
7164  /*%%%*/
7165  value_expr((yyvsp[(1) - (6)].node));
7166  (yyval.node) = NEW_IF(cond((yyvsp[(1) - (6)].node)), (yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
7167  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
7168  /*%
7169  $$ = dispatch3(ifop, $1, $3, $6);
7170  %*/
7171  ;}
7172  break;
7173 
7174  case 240:
7175 #line 2376 "parse.y"
7176  {
7177  (yyval.node) = (yyvsp[(1) - (1)].node);
7178  ;}
7179  break;
7180 
7181  case 241:
7182 #line 2382 "parse.y"
7183  {
7184  /*%%%*/
7185  value_expr((yyvsp[(1) - (1)].node));
7186  (yyval.node) = (yyvsp[(1) - (1)].node);
7187  if (!(yyval.node)) (yyval.node) = NEW_NIL();
7188  /*%
7189  $$ = $1;
7190  %*/
7191  ;}
7192  break;
7193 
7194  case 243:
7195 #line 2395 "parse.y"
7196  {
7197  (yyval.node) = (yyvsp[(1) - (2)].node);
7198  ;}
7199  break;
7200 
7201  case 244:
7202 #line 2399 "parse.y"
7203  {
7204  /*%%%*/
7205  (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node)));
7206  /*%
7207  $$ = arg_add_assocs($1, $3);
7208  %*/
7209  ;}
7210  break;
7211 
7212  case 245:
7213 #line 2407 "parse.y"
7214  {
7215  /*%%%*/
7216  (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
7217  /*%
7218  $$ = arg_add_assocs(arg_new(), $1);
7219  %*/
7220  ;}
7221  break;
7222 
7223  case 246:
7224 #line 2417 "parse.y"
7225  {
7226  /*%%%*/
7227  (yyval.node) = (yyvsp[(2) - (3)].node);
7228  /*%
7229  $$ = dispatch1(arg_paren, escape_Qundef($2));
7230  %*/
7231  ;}
7232  break;
7233 
7234  case 251:
7235 #line 2433 "parse.y"
7236  {
7237  (yyval.node) = (yyvsp[(1) - (2)].node);
7238  ;}
7239  break;
7240 
7241  case 252:
7242 #line 2437 "parse.y"
7243  {
7244  /*%%%*/
7245  (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node)));
7246  /*%
7247  $$ = arg_add_assocs($1, $3);
7248  %*/
7249  ;}
7250  break;
7251 
7252  case 253:
7253 #line 2445 "parse.y"
7254  {
7255  /*%%%*/
7256  (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
7257  /*%
7258  $$ = arg_add_assocs(arg_new(), $1);
7259  %*/
7260  ;}
7261  break;
7262 
7263  case 254:
7264 #line 2455 "parse.y"
7265  {
7266  /*%%%*/
7267  value_expr((yyvsp[(1) - (1)].node));
7268  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
7269  /*%
7270  $$ = arg_add(arg_new(), $1);
7271  %*/
7272  ;}
7273  break;
7274 
7275  case 255:
7276 #line 2464 "parse.y"
7277  {
7278  /*%%%*/
7279  (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
7280  /*%
7281  $$ = arg_add_optblock($1, $2);
7282  %*/
7283  ;}
7284  break;
7285 
7286  case 256:
7287 #line 2472 "parse.y"
7288  {
7289  /*%%%*/
7290  (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
7291  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node));
7292  /*%
7293  $$ = arg_add_assocs(arg_new(), $1);
7294  $$ = arg_add_optblock($$, $2);
7295  %*/
7296  ;}
7297  break;
7298 
7299  case 257:
7300 #line 2482 "parse.y"
7301  {
7302  /*%%%*/
7303  (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node)));
7304  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node));
7305  /*%
7306  $$ = arg_add_optblock(arg_add_assocs($1, $3), $4);
7307  %*/
7308  ;}
7309  break;
7310 
7311  case 259:
7312 #line 2499 "parse.y"
7313  {
7314  (yyval.val) = cmdarg_stack;
7315  CMDARG_PUSH(1);
7316  ;}
7317  break;
7318 
7319  case 260:
7320 #line 2504 "parse.y"
7321  {
7322  /* CMDARG_POP() */
7323  cmdarg_stack = (yyvsp[(1) - (2)].val);
7324  (yyval.node) = (yyvsp[(2) - (2)].node);
7325  ;}
7326  break;
7327 
7328  case 261:
7329 #line 2512 "parse.y"
7330  {
7331  /*%%%*/
7332  (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node));
7333  /*%
7334  $$ = $2;
7335  %*/
7336  ;}
7337  break;
7338 
7339  case 262:
7340 #line 2522 "parse.y"
7341  {
7342  (yyval.node) = (yyvsp[(2) - (2)].node);
7343  ;}
7344  break;
7345 
7346  case 263:
7347 #line 2526 "parse.y"
7348  {
7349  (yyval.node) = 0;
7350  ;}
7351  break;
7352 
7353  case 264:
7354 #line 2532 "parse.y"
7355  {
7356  /*%%%*/
7357  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
7358  /*%
7359  $$ = arg_add(arg_new(), $1);
7360  %*/
7361  ;}
7362  break;
7363 
7364  case 265:
7365 #line 2540 "parse.y"
7366  {
7367  /*%%%*/
7368  (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node));
7369  /*%
7370  $$ = arg_add_star(arg_new(), $2);
7371  %*/
7372  ;}
7373  break;
7374 
7375  case 266:
7376 #line 2548 "parse.y"
7377  {
7378  /*%%%*/
7379  NODE *n1;
7380  if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) {
7381  (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node));
7382  }
7383  else {
7384  (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7385  }
7386  /*%
7387  $$ = arg_add($1, $3);
7388  %*/
7389  ;}
7390  break;
7391 
7392  case 267:
7393 #line 2562 "parse.y"
7394  {
7395  /*%%%*/
7396  NODE *n1;
7397  if ((nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) {
7398  (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node));
7399  }
7400  else {
7401  (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node));
7402  }
7403  /*%
7404  $$ = arg_add_star($1, $4);
7405  %*/
7406  ;}
7407  break;
7408 
7409  case 268:
7410 #line 2578 "parse.y"
7411  {
7412  /*%%%*/
7413  NODE *n1;
7414  if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) {
7415  (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node));
7416  }
7417  else {
7418  (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7419  }
7420  /*%
7421  $$ = mrhs_add(args2mrhs($1), $3);
7422  %*/
7423  ;}
7424  break;
7425 
7426  case 269:
7427 #line 2592 "parse.y"
7428  {
7429  /*%%%*/
7430  NODE *n1;
7431  if (nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY &&
7432  (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) {
7433  (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node));
7434  }
7435  else {
7436  (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node));
7437  }
7438  /*%
7439  $$ = mrhs_add_star(args2mrhs($1), $4);
7440  %*/
7441  ;}
7442  break;
7443 
7444  case 270:
7445 #line 2607 "parse.y"
7446  {
7447  /*%%%*/
7448  (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node));
7449  /*%
7450  $$ = mrhs_add_star(mrhs_new(), $2);
7451  %*/
7452  ;}
7453  break;
7454 
7455  case 279:
7456 #line 2625 "parse.y"
7457  {
7458  /*%%%*/
7459  (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0);
7460  /*%
7461  $$ = method_arg(dispatch1(fcall, $1), arg_new());
7462  %*/
7463  ;}
7464  break;
7465 
7466  case 280:
7467 #line 2633 "parse.y"
7468  {
7469  /*%%%*/
7470  (yyval.num) = ruby_sourceline;
7471  /*%
7472  %*/
7473  ;}
7474  break;
7475 
7476  case 281:
7477 #line 2641 "parse.y"
7478  {
7479  /*%%%*/
7480  if ((yyvsp[(3) - (4)].node) == NULL) {
7481  (yyval.node) = NEW_NIL();
7482  }
7483  else {
7484  if (nd_type((yyvsp[(3) - (4)].node)) == NODE_RESCUE ||
7485  nd_type((yyvsp[(3) - (4)].node)) == NODE_ENSURE)
7486  nd_set_line((yyvsp[(3) - (4)].node), (yyvsp[(2) - (4)].num));
7487  (yyval.node) = NEW_BEGIN((yyvsp[(3) - (4)].node));
7488  }
7489  nd_set_line((yyval.node), (yyvsp[(2) - (4)].num));
7490  /*%
7491  $$ = dispatch1(begin, $3);
7492  %*/
7493  ;}
7494  break;
7495 
7496  case 282:
7497 #line 2657 "parse.y"
7498  {lex_state = EXPR_ENDARG;;}
7499  break;
7500 
7501  case 283:
7502 #line 2658 "parse.y"
7503  {
7504  rb_warning0("(...) interpreted as grouped expression");
7505  /*%%%*/
7506  (yyval.node) = (yyvsp[(2) - (4)].node);
7507  /*%
7508  $$ = dispatch1(paren, $2);
7509  %*/
7510  ;}
7511  break;
7512 
7513  case 284:
7514 #line 2667 "parse.y"
7515  {
7516  /*%%%*/
7517  (yyval.node) = (yyvsp[(2) - (3)].node);
7518  /*%
7519  $$ = dispatch1(paren, $2);
7520  %*/
7521  ;}
7522  break;
7523 
7524  case 285:
7525 #line 2675 "parse.y"
7526  {
7527  /*%%%*/
7528  (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
7529  /*%
7530  $$ = dispatch2(const_path_ref, $1, $3);
7531  %*/
7532  ;}
7533  break;
7534 
7535  case 286:
7536 #line 2683 "parse.y"
7537  {
7538  /*%%%*/
7539  (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id));
7540  /*%
7541  $$ = dispatch1(top_const_ref, $2);
7542  %*/
7543  ;}
7544  break;
7545 
7546  case 287:
7547 #line 2691 "parse.y"
7548  {
7549  /*%%%*/
7550  if ((yyvsp[(2) - (3)].node) == 0) {
7551  (yyval.node) = NEW_ZARRAY(); /* zero length array*/
7552  }
7553  else {
7554  (yyval.node) = (yyvsp[(2) - (3)].node);
7555  }
7556  /*%
7557  $$ = dispatch1(array, escape_Qundef($2));
7558  %*/
7559  ;}
7560  break;
7561 
7562  case 288:
7563 #line 2704 "parse.y"
7564  {
7565  /*%%%*/
7566  (yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node));
7567  /*%
7568  $$ = dispatch1(hash, escape_Qundef($2));
7569  %*/
7570  ;}
7571  break;
7572 
7573  case 289:
7574 #line 2712 "parse.y"
7575  {
7576  /*%%%*/
7577  (yyval.node) = NEW_RETURN(0);
7578  /*%
7579  $$ = dispatch0(return0);
7580  %*/
7581  ;}
7582  break;
7583 
7584  case 290:
7585 #line 2720 "parse.y"
7586  {
7587  /*%%%*/
7588  (yyval.node) = new_yield((yyvsp[(3) - (4)].node));
7589  /*%
7590  $$ = dispatch1(yield, dispatch1(paren, $3));
7591  %*/
7592  ;}
7593  break;
7594 
7595  case 291:
7596 #line 2728 "parse.y"
7597  {
7598  /*%%%*/
7599  (yyval.node) = NEW_YIELD(0, Qfalse);
7600  /*%
7601  $$ = dispatch1(yield, dispatch1(paren, arg_new()));
7602  %*/
7603  ;}
7604  break;
7605 
7606  case 292:
7607 #line 2736 "parse.y"
7608  {
7609  /*%%%*/
7610  (yyval.node) = NEW_YIELD(0, Qfalse);
7611  /*%
7612  $$ = dispatch0(yield0);
7613  %*/
7614  ;}
7615  break;
7616 
7617  case 293:
7618 #line 2743 "parse.y"
7619  {in_defined = 1;;}
7620  break;
7621 
7622  case 294:
7623 #line 2744 "parse.y"
7624  {
7625  /*%%%*/
7626  in_defined = 0;
7627  (yyval.node) = NEW_DEFINED((yyvsp[(5) - (6)].node));
7628  /*%
7629  in_defined = 0;
7630  $$ = dispatch1(defined, $5);
7631  %*/
7632  ;}
7633  break;
7634 
7635  case 295:
7636 #line 2754 "parse.y"
7637  {
7638  /*%%%*/
7639  (yyval.node) = call_uni_op(cond((yyvsp[(3) - (4)].node)), '!');
7640  /*%
7641  $$ = dispatch2(unary, ripper_intern("not"), $3);
7642  %*/
7643  ;}
7644  break;
7645 
7646  case 296:
7647 #line 2762 "parse.y"
7648  {
7649  /*%%%*/
7650  (yyval.node) = call_uni_op(cond(NEW_NIL()), '!');
7651  /*%
7652  $$ = dispatch2(unary, ripper_intern("not"), Qnil);
7653  %*/
7654  ;}
7655  break;
7656 
7657  case 297:
7658 #line 2770 "parse.y"
7659  {
7660  /*%%%*/
7661  (yyvsp[(2) - (2)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].id), 0);
7662  (yyval.node) = (yyvsp[(2) - (2)].node);
7663  fixpos((yyvsp[(2) - (2)].node)->nd_iter, (yyvsp[(2) - (2)].node));
7664  /*%
7665  $$ = method_arg(dispatch1(fcall, $1), arg_new());
7666  $$ = method_add_block($$, $2);
7667  %*/
7668  ;}
7669  break;
7670 
7671  case 299:
7672 #line 2782 "parse.y"
7673  {
7674  /*%%%*/
7675  block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node));
7676  (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node);
7677  (yyval.node) = (yyvsp[(2) - (2)].node);
7678  fixpos((yyval.node), (yyvsp[(1) - (2)].node));
7679  /*%
7680  $$ = method_add_block($1, $2);
7681  %*/
7682  ;}
7683  break;
7684 
7685  case 300:
7686 #line 2793 "parse.y"
7687  {
7688  (yyval.node) = (yyvsp[(2) - (2)].node);
7689  ;}
7690  break;
7691 
7692  case 301:
7693 #line 2800 "parse.y"
7694  {
7695  /*%%%*/
7696  (yyval.node) = NEW_IF(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node));
7697  fixpos((yyval.node), (yyvsp[(2) - (6)].node));
7698  /*%
7699  $$ = dispatch3(if, $2, $4, escape_Qundef($5));
7700  %*/
7701  ;}
7702  break;
7703 
7704  case 302:
7705 #line 2812 "parse.y"
7706  {
7707  /*%%%*/
7708  (yyval.node) = NEW_UNLESS(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node));
7709  fixpos((yyval.node), (yyvsp[(2) - (6)].node));
7710  /*%
7711  $$ = dispatch3(unless, $2, $4, escape_Qundef($5));
7712  %*/
7713  ;}
7714  break;
7715 
7716  case 303:
7717 #line 2820 "parse.y"
7718  {COND_PUSH(1);;}
7719  break;
7720 
7721  case 304:
7722 #line 2820 "parse.y"
7723  {COND_POP();;}
7724  break;
7725 
7726  case 305:
7727 #line 2823 "parse.y"
7728  {
7729  /*%%%*/
7730  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1);
7731  fixpos((yyval.node), (yyvsp[(3) - (7)].node));
7732  /*%
7733  $$ = dispatch2(while, $3, $6);
7734  %*/
7735  ;}
7736  break;
7737 
7738  case 306:
7739 #line 2831 "parse.y"
7740  {COND_PUSH(1);;}
7741  break;
7742 
7743  case 307:
7744 #line 2831 "parse.y"
7745  {COND_POP();;}
7746  break;
7747 
7748  case 308:
7749 #line 2834 "parse.y"
7750  {
7751  /*%%%*/
7752  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1);
7753  fixpos((yyval.node), (yyvsp[(3) - (7)].node));
7754  /*%
7755  $$ = dispatch2(until, $3, $6);
7756  %*/
7757  ;}
7758  break;
7759 
7760  case 309:
7761 #line 2845 "parse.y"
7762  {
7763  /*%%%*/
7764  (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node));
7765  fixpos((yyval.node), (yyvsp[(2) - (5)].node));
7766  /*%
7767  $$ = dispatch2(case, $2, $4);
7768  %*/
7769  ;}
7770  break;
7771 
7772  case 310:
7773 #line 2854 "parse.y"
7774  {
7775  /*%%%*/
7776  (yyval.node) = NEW_CASE(0, (yyvsp[(3) - (4)].node));
7777  /*%
7778  $$ = dispatch2(case, Qnil, $3);
7779  %*/
7780  ;}
7781  break;
7782 
7783  case 311:
7784 #line 2862 "parse.y"
7785  {COND_PUSH(1);;}
7786  break;
7787 
7788  case 312:
7789 #line 2864 "parse.y"
7790  {COND_POP();;}
7791  break;
7792 
7793  case 313:
7794 #line 2867 "parse.y"
7795  {
7796  /*%%%*/
7797  /*
7798  * for a, b, c in e
7799  * #=>
7800  * e.each{|*x| a, b, c = x
7801  *
7802  * for a in e
7803  * #=>
7804  * e.each{|x| a, = x}
7805  */
7806  ID id = internal_id();
7807  ID *tbl = ALLOC_N(ID, 2);
7808  NODE *m = NEW_ARGS_AUX(0, 0);
7809  NODE *args, *scope;
7810 
7811  if (nd_type((yyvsp[(2) - (9)].node)) == NODE_MASGN) {
7812  /* if args.length == 1 && args[0].kind_of?(Array)
7813  * args = args[0]
7814  * end
7815  */
7816  NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1)));
7817  NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0)));
7818  m->nd_next = block_append(
7819  NEW_IF(
7821  NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0),
7822  rb_intern("=="), one),
7823  NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero),
7824  rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))),
7825  0),
7826  NEW_DASGN_CURR(id,
7827  NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)),
7828  0),
7829  node_assign((yyvsp[(2) - (9)].node), NEW_DVAR(id)));
7830 
7831  args = new_args(m, 0, id, 0, 0);
7832  }
7833  else {
7834  if (nd_type((yyvsp[(2) - (9)].node)) == NODE_LASGN ||
7835  nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN ||
7836  nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN_CURR) {
7837  (yyvsp[(2) - (9)].node)->nd_value = NEW_DVAR(id);
7838  m->nd_plen = 1;
7839  m->nd_next = (yyvsp[(2) - (9)].node);
7840  args = new_args(m, 0, 0, 0, 0);
7841  }
7842  else {
7843  m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].node)), 0), NEW_DVAR(id));
7844  args = new_args(m, 0, id, 0, 0);
7845  }
7846  }
7847  scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].node), args);
7848  tbl[0] = 1; tbl[1] = id;
7849  (yyval.node) = NEW_FOR(0, (yyvsp[(5) - (9)].node), scope);
7850  fixpos((yyval.node), (yyvsp[(2) - (9)].node));
7851  /*%
7852  $$ = dispatch3(for, $2, $5, $8);
7853  %*/
7854  ;}
7855  break;
7856 
7857  case 314:
7858 #line 2928 "parse.y"
7859  {
7860  if (in_def || in_single)
7861  yyerror("class definition in method body");
7862  local_push(0);
7863  /*%%%*/
7864  (yyval.num) = ruby_sourceline;
7865  /*%
7866  %*/
7867  ;}
7868  break;
7869 
7870  case 315:
7871 #line 2939 "parse.y"
7872  {
7873  /*%%%*/
7874  (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node));
7875  nd_set_line((yyval.node), (yyvsp[(4) - (6)].num));
7876  /*%
7877  $$ = dispatch3(class, $2, $3, $5);
7878  %*/
7879  local_pop();
7880  ;}
7881  break;
7882 
7883  case 316:
7884 #line 2949 "parse.y"
7885  {
7886  (yyval.num) = in_def;
7887  in_def = 0;
7888  ;}
7889  break;
7890 
7891  case 317:
7892 #line 2954 "parse.y"
7893  {
7894  (yyval.num) = in_single;
7895  in_single = 0;
7896  local_push(0);
7897  ;}
7898  break;
7899 
7900  case 318:
7901 #line 2961 "parse.y"
7902  {
7903  /*%%%*/
7904  (yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node));
7905  fixpos((yyval.node), (yyvsp[(3) - (8)].node));
7906  /*%
7907  $$ = dispatch2(sclass, $3, $7);
7908  %*/
7909  local_pop();
7910  in_def = (yyvsp[(4) - (8)].num);
7911  in_single = (yyvsp[(6) - (8)].num);
7912  ;}
7913  break;
7914 
7915  case 319:
7916 #line 2973 "parse.y"
7917  {
7918  if (in_def || in_single)
7919  yyerror("module definition in method body");
7920  local_push(0);
7921  /*%%%*/
7922  (yyval.num) = ruby_sourceline;
7923  /*%
7924  %*/
7925  ;}
7926  break;
7927 
7928  case 320:
7929 #line 2984 "parse.y"
7930  {
7931  /*%%%*/
7932  (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node));
7933  nd_set_line((yyval.node), (yyvsp[(3) - (5)].num));
7934  /*%
7935  $$ = dispatch2(module, $2, $4);
7936  %*/
7937  local_pop();
7938  ;}
7939  break;
7940 
7941  case 321:
7942 #line 2994 "parse.y"
7943  {
7944  (yyval.id) = cur_mid;
7945  cur_mid = (yyvsp[(2) - (2)].id);
7946  in_def++;
7947  local_push(0);
7948  ;}
7949  break;
7950 
7951  case 322:
7952 #line 3003 "parse.y"
7953  {
7954  /*%%%*/
7955  NODE *body = remove_begin((yyvsp[(5) - (6)].node));
7956  reduce_nodes(&body);
7957  (yyval.node) = NEW_DEFN((yyvsp[(2) - (6)].id), (yyvsp[(4) - (6)].node), body, NOEX_PRIVATE);
7958  nd_set_line((yyval.node), (yyvsp[(1) - (6)].num));
7959  /*%
7960  $$ = dispatch3(def, $2, $4, $5);
7961  %*/
7962  local_pop();
7963  in_def--;
7964  cur_mid = (yyvsp[(3) - (6)].id);
7965  ;}
7966  break;
7967 
7968  case 323:
7969 #line 3016 "parse.y"
7970  {lex_state = EXPR_FNAME;;}
7971  break;
7972 
7973  case 324:
7974 #line 3017 "parse.y"
7975  {
7976  in_single++;
7977  lex_state = EXPR_ENDFN; /* force for args */
7978  local_push(0);
7979  ;}
7980  break;
7981 
7982  case 325:
7983 #line 3025 "parse.y"
7984  {
7985  /*%%%*/
7986  NODE *body = remove_begin((yyvsp[(8) - (9)].node));
7987  reduce_nodes(&body);
7988  (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), body);
7989  nd_set_line((yyval.node), (yyvsp[(1) - (9)].num));
7990  /*%
7991  $$ = dispatch5(defs, $2, $3, $5, $7, $8);
7992  %*/
7993  local_pop();
7994  in_single--;
7995  ;}
7996  break;
7997 
7998  case 326:
7999 #line 3038 "parse.y"
8000  {
8001  /*%%%*/
8002  (yyval.node) = NEW_BREAK(0);
8003  /*%
8004  $$ = dispatch1(break, arg_new());
8005  %*/
8006  ;}
8007  break;
8008 
8009  case 327:
8010 #line 3046 "parse.y"
8011  {
8012  /*%%%*/
8013  (yyval.node) = NEW_NEXT(0);
8014  /*%
8015  $$ = dispatch1(next, arg_new());
8016  %*/
8017  ;}
8018  break;
8019 
8020  case 328:
8021 #line 3054 "parse.y"
8022  {
8023  /*%%%*/
8024  (yyval.node) = NEW_REDO();
8025  /*%
8026  $$ = dispatch0(redo);
8027  %*/
8028  ;}
8029  break;
8030 
8031  case 329:
8032 #line 3062 "parse.y"
8033  {
8034  /*%%%*/
8035  (yyval.node) = NEW_RETRY();
8036  /*%
8037  $$ = dispatch0(retry);
8038  %*/
8039  ;}
8040  break;
8041 
8042  case 330:
8043 #line 3072 "parse.y"
8044  {
8045  /*%%%*/
8046  value_expr((yyvsp[(1) - (1)].node));
8047  (yyval.node) = (yyvsp[(1) - (1)].node);
8048  if (!(yyval.node)) (yyval.node) = NEW_NIL();
8049  /*%
8050  $$ = $1;
8051  %*/
8052  ;}
8053  break;
8054 
8055  case 331:
8056 #line 3084 "parse.y"
8057  {
8058  token_info_push("begin");
8059  ;}
8060  break;
8061 
8062  case 332:
8063 #line 3090 "parse.y"
8064  {
8065  token_info_push("if");
8066  ;}
8067  break;
8068 
8069  case 333:
8070 #line 3096 "parse.y"
8071  {
8072  token_info_push("unless");
8073  ;}
8074  break;
8075 
8076  case 334:
8077 #line 3102 "parse.y"
8078  {
8079  token_info_push("while");
8080  ;}
8081  break;
8082 
8083  case 335:
8084 #line 3108 "parse.y"
8085  {
8086  token_info_push("until");
8087  ;}
8088  break;
8089 
8090  case 336:
8091 #line 3114 "parse.y"
8092  {
8093  token_info_push("case");
8094  ;}
8095  break;
8096 
8097  case 337:
8098 #line 3120 "parse.y"
8099  {
8100  token_info_push("for");
8101  ;}
8102  break;
8103 
8104  case 338:
8105 #line 3126 "parse.y"
8106  {
8107  token_info_push("class");
8108  ;}
8109  break;
8110 
8111  case 339:
8112 #line 3132 "parse.y"
8113  {
8114  token_info_push("module");
8115  ;}
8116  break;
8117 
8118  case 340:
8119 #line 3138 "parse.y"
8120  {
8121  token_info_push("def");
8122  /*%%%*/
8123  (yyval.num) = ruby_sourceline;
8124  /*%
8125  %*/
8126  ;}
8127  break;
8128 
8129  case 341:
8130 #line 3148 "parse.y"
8131  {
8132  token_info_pop("end");
8133  ;}
8134  break;
8135 
8136  case 348:
8137 #line 3178 "parse.y"
8138  {
8139  /*%%%*/
8140  (yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node)), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
8141  fixpos((yyval.node), (yyvsp[(2) - (5)].node));
8142  /*%
8143  $$ = dispatch3(elsif, $2, $4, escape_Qundef($5));
8144  %*/
8145  ;}
8146  break;
8147 
8148  case 350:
8149 #line 3190 "parse.y"
8150  {
8151  /*%%%*/
8152  (yyval.node) = (yyvsp[(2) - (2)].node);
8153  /*%
8154  $$ = dispatch1(else, $2);
8155  %*/
8156  ;}
8157  break;
8158 
8159  case 353:
8160 #line 3204 "parse.y"
8161  {
8162  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
8163  /*%%%*/
8164  /*%
8165  $$ = dispatch1(mlhs_paren, $$);
8166  %*/
8167  ;}
8168  break;
8169 
8170  case 354:
8171 #line 3212 "parse.y"
8172  {
8173  /*%%%*/
8174  (yyval.node) = (yyvsp[(2) - (3)].node);
8175  /*%
8176  $$ = dispatch1(mlhs_paren, $2);
8177  %*/
8178  ;}
8179  break;
8180 
8181  case 355:
8182 #line 3222 "parse.y"
8183  {
8184  /*%%%*/
8185  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
8186  /*%
8187  $$ = mlhs_add(mlhs_new(), $1);
8188  %*/
8189  ;}
8190  break;
8191 
8192  case 356:
8193 #line 3230 "parse.y"
8194  {
8195  /*%%%*/
8196  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
8197  /*%
8198  $$ = mlhs_add($1, $3);
8199  %*/
8200  ;}
8201  break;
8202 
8203  case 357:
8204 #line 3240 "parse.y"
8205  {
8206  /*%%%*/
8207  (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0);
8208  /*%
8209  $$ = $1;
8210  %*/
8211  ;}
8212  break;
8213 
8214  case 358:
8215 #line 3248 "parse.y"
8216  {
8217  (yyval.node) = assignable((yyvsp[(4) - (4)].id), 0);
8218  /*%%%*/
8219  (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), (yyval.node));
8220  /*%
8221  $$ = mlhs_add_star($1, $$);
8222  %*/
8223  ;}
8224  break;
8225 
8226  case 359:
8227 #line 3257 "parse.y"
8228  {
8229  (yyval.node) = assignable((yyvsp[(4) - (6)].id), 0);
8230  /*%%%*/
8231  (yyval.node) = NEW_MASGN((yyvsp[(1) - (6)].node), NEW_POSTARG((yyval.node), (yyvsp[(6) - (6)].node)));
8232  /*%
8233  $$ = mlhs_add_star($1, $$);
8234  %*/
8235  ;}
8236  break;
8237 
8238  case 360:
8239 #line 3266 "parse.y"
8240  {
8241  /*%%%*/
8242  (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1);
8243  /*%
8244  $$ = mlhs_add_star($1, Qnil);
8245  %*/
8246  ;}
8247  break;
8248 
8249  case 361:
8250 #line 3274 "parse.y"
8251  {
8252  /*%%%*/
8253  (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG(-1, (yyvsp[(5) - (5)].node)));
8254  /*%
8255  $$ = mlhs_add_star($1, $5);
8256  %*/
8257  ;}
8258  break;
8259 
8260  case 362:
8261 #line 3282 "parse.y"
8262  {
8263  (yyval.node) = assignable((yyvsp[(2) - (2)].id), 0);
8264  /*%%%*/
8265  (yyval.node) = NEW_MASGN(0, (yyval.node));
8266  /*%
8267  $$ = mlhs_add_star(mlhs_new(), $$);
8268  %*/
8269  ;}
8270  break;
8271 
8272  case 363:
8273 #line 3291 "parse.y"
8274  {
8275  (yyval.node) = assignable((yyvsp[(2) - (4)].id), 0);
8276  /*%%%*/
8277  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyval.node), (yyvsp[(4) - (4)].node)));
8278  /*%
8279  #if 0
8280  TODO: Check me
8281  #endif
8282  $$ = mlhs_add_star($$, $4);
8283  %*/
8284  ;}
8285  break;
8286 
8287  case 364:
8288 #line 3303 "parse.y"
8289  {
8290  /*%%%*/
8291  (yyval.node) = NEW_MASGN(0, -1);
8292  /*%
8293  $$ = mlhs_add_star(mlhs_new(), Qnil);
8294  %*/
8295  ;}
8296  break;
8297 
8298  case 365:
8299 #line 3311 "parse.y"
8300  {
8301  /*%%%*/
8302  (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node)));
8303  /*%
8304  $$ = mlhs_add_star(mlhs_new(), Qnil);
8305  %*/
8306  ;}
8307  break;
8308 
8309  case 366:
8310 #line 3321 "parse.y"
8311  {
8312  /*%%%*/
8313  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id));
8314  /*%
8315  $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6));
8316  %*/
8317  ;}
8318  break;
8319 
8320  case 367:
8321 #line 3329 "parse.y"
8322  {
8323  /*%%%*/
8324  (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id));
8325  /*%
8326  $$ = params_new($1, $3, $5, $7, escape_Qundef($8));
8327  %*/
8328  ;}
8329  break;
8330 
8331  case 368:
8332 #line 3337 "parse.y"
8333  {
8334  /*%%%*/
8335  (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id));
8336  /*%
8337  $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4));
8338  %*/
8339  ;}
8340  break;
8341 
8342  case 369:
8343 #line 3345 "parse.y"
8344  {
8345  /*%%%*/
8346  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
8347  /*%
8348  $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6));
8349  %*/
8350  ;}
8351  break;
8352 
8353  case 370:
8354 #line 3353 "parse.y"
8355  {
8356  /*%%%*/
8357  (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id));
8358  /*%
8359  $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4));
8360  %*/
8361  ;}
8362  break;
8363 
8364  case 371:
8365 #line 3361 "parse.y"
8366  {
8367  /*%%%*/
8368  (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 1, 0, 0);
8369  /*%
8370  $$ = params_new($1, Qnil, Qnil, Qnil, Qnil);
8371  dispatch1(excessed_comma, $$);
8372  %*/
8373  ;}
8374  break;
8375 
8376  case 372:
8377 #line 3370 "parse.y"
8378  {
8379  /*%%%*/
8380  (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
8381  /*%
8382  $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6));
8383  %*/
8384  ;}
8385  break;
8386 
8387  case 373:
8388 #line 3378 "parse.y"
8389  {
8390  /*%%%*/
8391  (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id));
8392  /*%
8393  $$ = params_new($1, Qnil,Qnil, Qnil, escape_Qundef($2));
8394  %*/
8395  ;}
8396  break;
8397 
8398  case 374:
8399 #line 3386 "parse.y"
8400  {
8401  /*%%%*/
8402  (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id));
8403  /*%
8404  $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4));
8405  %*/
8406  ;}
8407  break;
8408 
8409  case 375:
8410 #line 3394 "parse.y"
8411  {
8412  /*%%%*/
8413  (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
8414  /*%
8415  $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6));
8416  %*/
8417  ;}
8418  break;
8419 
8420  case 376:
8421 #line 3402 "parse.y"
8422  {
8423  /*%%%*/
8424  (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id));
8425  /*%
8426  $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2));
8427  %*/
8428  ;}
8429  break;
8430 
8431  case 377:
8432 #line 3410 "parse.y"
8433  {
8434  /*%%%*/
8435  (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id));
8436  /*%
8437  $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4));
8438  %*/
8439  ;}
8440  break;
8441 
8442  case 378:
8443 #line 3418 "parse.y"
8444  {
8445  /*%%%*/
8446  (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id));
8447  /*%
8448  $$ = params_new(Qnil, Qnil, $1, Qnil, escape_Qundef($2));
8449  %*/
8450  ;}
8451  break;
8452 
8453  case 379:
8454 #line 3426 "parse.y"
8455  {
8456  /*%%%*/
8457  (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id));
8458  /*%
8459  $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4));
8460  %*/
8461  ;}
8462  break;
8463 
8464  case 380:
8465 #line 3434 "parse.y"
8466  {
8467  /*%%%*/
8468  (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id));
8469  /*%
8470  $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1);
8471  %*/
8472  ;}
8473  break;
8474 
8475  case 382:
8476 #line 3445 "parse.y"
8477  {
8478  command_start = TRUE;
8479  ;}
8480  break;
8481 
8482  case 383:
8483 #line 3451 "parse.y"
8484  {
8485  /*%%%*/
8486  (yyval.node) = 0;
8487  /*%
8488  $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
8489  escape_Qundef($2));
8490  %*/
8491  ;}
8492  break;
8493 
8494  case 384:
8495 #line 3460 "parse.y"
8496  {
8497  /*%%%*/
8498  (yyval.node) = 0;
8499  /*%
8500  $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
8501  Qnil);
8502  %*/
8503  ;}
8504  break;
8505 
8506  case 385:
8507 #line 3469 "parse.y"
8508  {
8509  /*%%%*/
8510  (yyval.node) = (yyvsp[(2) - (4)].node);
8511  /*%
8512  $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3));
8513  %*/
8514  ;}
8515  break;
8516 
8517  case 387:
8518 #line 3481 "parse.y"
8519  {
8520  /*%%%*/
8521  (yyval.node) = 0;
8522  /*%
8523  $$ = $2;
8524  %*/
8525  ;}
8526  break;
8527 
8528  case 390:
8529 #line 3507 "parse.y"
8530  {
8531  new_bv(get_id((yyvsp[(1) - (1)].id)));
8532  /*%%%*/
8533  /*%
8534  $$ = get_value($1);
8535  %*/
8536  ;}
8537  break;
8538 
8539  case 391:
8540 #line 3515 "parse.y"
8541  {
8542  (yyval.node) = 0;
8543  ;}
8544  break;
8545 
8546  case 392:
8547 #line 3520 "parse.y"
8548  {
8549  (yyval.vars) = dyna_push();
8550  ;}
8551  break;
8552 
8553  case 393:
8554 #line 3523 "parse.y"
8555  {
8556  (yyval.num) = lpar_beg;
8557  lpar_beg = ++paren_nest;
8558  ;}
8559  break;
8560 
8561  case 394:
8562 #line 3529 "parse.y"
8563  {
8564  lpar_beg = (yyvsp[(2) - (4)].num);
8565  /*%%%*/
8566  (yyval.node) = (yyvsp[(3) - (4)].node);
8567  (yyval.node)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].node)->nd_head, (yyvsp[(4) - (4)].node));
8568  /*%
8569  $$ = dispatch2(lambda, $3, $4);
8570  %*/
8571  dyna_pop((yyvsp[(1) - (4)].vars));
8572  ;}
8573  break;
8574 
8575  case 395:
8576 #line 3542 "parse.y"
8577  {
8578  /*%%%*/
8579  (yyval.node) = NEW_LAMBDA((yyvsp[(2) - (4)].node));
8580  /*%
8581  $$ = dispatch1(paren, $2);
8582  %*/
8583  ;}
8584  break;
8585 
8586  case 396:
8587 #line 3550 "parse.y"
8588  {
8589  /*%%%*/
8590  (yyval.node) = NEW_LAMBDA((yyvsp[(1) - (1)].node));
8591  /*%
8592  $$ = $1;
8593  %*/
8594  ;}
8595  break;
8596 
8597  case 397:
8598 #line 3560 "parse.y"
8599  {
8600  (yyval.node) = (yyvsp[(2) - (3)].node);
8601  ;}
8602  break;
8603 
8604  case 398:
8605 #line 3564 "parse.y"
8606  {
8607  (yyval.node) = (yyvsp[(2) - (3)].node);
8608  ;}
8609  break;
8610 
8611  case 399:
8612 #line 3570 "parse.y"
8613  {
8614  (yyvsp[(1) - (1)].vars) = dyna_push();
8615  /*%%%*/
8616  (yyval.num) = ruby_sourceline;
8617  /*% %*/
8618  ;}
8619  break;
8620 
8621  case 400:
8622 #line 3579 "parse.y"
8623  {
8624  /*%%%*/
8625  (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node));
8626  nd_set_line((yyval.node), (yyvsp[(2) - (5)].num));
8627  /*%
8628  $$ = dispatch2(do_block, escape_Qundef($3), $4);
8629  %*/
8630  dyna_pop((yyvsp[(1) - (5)].vars));
8631  ;}
8632  break;
8633 
8634  case 401:
8635 #line 3591 "parse.y"
8636  {
8637  /*%%%*/
8638  if (nd_type((yyvsp[(1) - (2)].node)) == NODE_YIELD) {
8639  compile_error(PARSER_ARG "block given to yield");
8640  }
8641  else {
8642  block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node));
8643  }
8644  (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node);
8645  (yyval.node) = (yyvsp[(2) - (2)].node);
8646  fixpos((yyval.node), (yyvsp[(1) - (2)].node));
8647  /*%
8648  $$ = method_add_block($1, $2);
8649  %*/
8650  ;}
8651  break;
8652 
8653  case 402:
8654 #line 3607 "parse.y"
8655  {
8656  /*%%%*/
8657  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
8658  /*%
8659  $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
8660  $$ = method_optarg($$, $4);
8661  %*/
8662  ;}
8663  break;
8664 
8665  case 403:
8666 #line 3616 "parse.y"
8667  {
8668  /*%%%*/
8669  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
8670  /*%
8671  $$ = dispatch3(call, $1, ripper_intern("::"), $3);
8672  $$ = method_optarg($$, $4);
8673  %*/
8674  ;}
8675  break;
8676 
8677  case 404:
8678 #line 3627 "parse.y"
8679  {
8680  /*%%%*/
8681  (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node));
8682  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
8683  /*%
8684  $$ = method_arg(dispatch1(fcall, $1), $2);
8685  %*/
8686  ;}
8687  break;
8688 
8689  case 405:
8690 #line 3636 "parse.y"
8691  {
8692  /*%%%*/
8693  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
8694  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
8695  /*%
8696  $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
8697  $$ = method_optarg($$, $4);
8698  %*/
8699  ;}
8700  break;
8701 
8702  case 406:
8703 #line 3646 "parse.y"
8704  {
8705  /*%%%*/
8706  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
8707  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
8708  /*%
8709  $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
8710  $$ = method_optarg($$, $4);
8711  %*/
8712  ;}
8713  break;
8714 
8715  case 407:
8716 #line 3656 "parse.y"
8717  {
8718  /*%%%*/
8719  (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0);
8720  /*%
8721  $$ = dispatch3(call, $1, ripper_intern("::"), $3);
8722  %*/
8723  ;}
8724  break;
8725 
8726  case 408:
8727 #line 3664 "parse.y"
8728  {
8729  /*%%%*/
8730  (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node));
8731  fixpos((yyval.node), (yyvsp[(1) - (3)].node));
8732  /*%
8733  $$ = dispatch3(call, $1, ripper_id2sym('.'),
8734  ripper_intern("call"));
8735  $$ = method_optarg($$, $3);
8736  %*/
8737  ;}
8738  break;
8739 
8740  case 409:
8741 #line 3675 "parse.y"
8742  {
8743  /*%%%*/
8744  (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node));
8745  fixpos((yyval.node), (yyvsp[(1) - (3)].node));
8746  /*%
8747  $$ = dispatch3(call, $1, ripper_intern("::"),
8748  ripper_intern("call"));
8749  $$ = method_optarg($$, $3);
8750  %*/
8751  ;}
8752  break;
8753 
8754  case 410:
8755 #line 3686 "parse.y"
8756  {
8757  /*%%%*/
8758  (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node));
8759  /*%
8760  $$ = dispatch1(super, $2);
8761  %*/
8762  ;}
8763  break;
8764 
8765  case 411:
8766 #line 3694 "parse.y"
8767  {
8768  /*%%%*/
8769  (yyval.node) = NEW_ZSUPER();
8770  /*%
8771  $$ = dispatch0(zsuper);
8772  %*/
8773  ;}
8774  break;
8775 
8776  case 412:
8777 #line 3702 "parse.y"
8778  {
8779  /*%%%*/
8780  if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF)
8781  (yyval.node) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].node));
8782  else
8783  (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), tAREF, (yyvsp[(3) - (4)].node));
8784  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
8785  /*%
8786  $$ = dispatch2(aref, $1, escape_Qundef($3));
8787  %*/
8788  ;}
8789  break;
8790 
8791  case 413:
8792 #line 3716 "parse.y"
8793  {
8794  (yyvsp[(1) - (1)].vars) = dyna_push();
8795  /*%%%*/
8796  (yyval.num) = ruby_sourceline;
8797  /*%
8798  %*/
8799  ;}
8800  break;
8801 
8802  case 414:
8803 #line 3725 "parse.y"
8804  {
8805  /*%%%*/
8806  (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node));
8807  nd_set_line((yyval.node), (yyvsp[(2) - (5)].num));
8808  /*%
8809  $$ = dispatch2(brace_block, escape_Qundef($3), $4);
8810  %*/
8811  dyna_pop((yyvsp[(1) - (5)].vars));
8812  ;}
8813  break;
8814 
8815  case 415:
8816 #line 3735 "parse.y"
8817  {
8818  (yyvsp[(1) - (1)].vars) = dyna_push();
8819  /*%%%*/
8820  (yyval.num) = ruby_sourceline;
8821  /*%
8822  %*/
8823  ;}
8824  break;
8825 
8826  case 416:
8827 #line 3744 "parse.y"
8828  {
8829  /*%%%*/
8830  (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node));
8831  nd_set_line((yyval.node), (yyvsp[(2) - (5)].num));
8832  /*%
8833  $$ = dispatch2(do_block, escape_Qundef($3), $4);
8834  %*/
8835  dyna_pop((yyvsp[(1) - (5)].vars));
8836  ;}
8837  break;
8838 
8839  case 417:
8840 #line 3758 "parse.y"
8841  {
8842  /*%%%*/
8843  (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
8844  /*%
8845  $$ = dispatch3(when, $2, $4, escape_Qundef($5));
8846  %*/
8847  ;}
8848  break;
8849 
8850  case 420:
8851 #line 3774 "parse.y"
8852  {
8853  /*%%%*/
8854  if ((yyvsp[(3) - (6)].node)) {
8855  (yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), NEW_ERRINFO());
8856  (yyvsp[(5) - (6)].node) = block_append((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node));
8857  }
8858  (yyval.node) = NEW_RESBODY((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node));
8859  fixpos((yyval.node), (yyvsp[(2) - (6)].node)?(yyvsp[(2) - (6)].node):(yyvsp[(5) - (6)].node));
8860  /*%
8861  $$ = dispatch4(rescue,
8862  escape_Qundef($2),
8863  escape_Qundef($3),
8864  escape_Qundef($5),
8865  escape_Qundef($6));
8866  %*/
8867  ;}
8868  break;
8869 
8870  case 422:
8871 #line 3794 "parse.y"
8872  {
8873  /*%%%*/
8874  (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
8875  /*%
8876  $$ = rb_ary_new3(1, $1);
8877  %*/
8878  ;}
8879  break;
8880 
8881  case 423:
8882 #line 3802 "parse.y"
8883  {
8884  /*%%%*/
8885  if (!((yyval.node) = splat_array((yyvsp[(1) - (1)].node)))) (yyval.node) = (yyvsp[(1) - (1)].node);
8886  /*%
8887  $$ = $1;
8888  %*/
8889  ;}
8890  break;
8891 
8892  case 425:
8893 #line 3813 "parse.y"
8894  {
8895  (yyval.node) = (yyvsp[(2) - (2)].node);
8896  ;}
8897  break;
8898 
8899  case 427:
8900 #line 3820 "parse.y"
8901  {
8902  /*%%%*/
8903  (yyval.node) = (yyvsp[(2) - (2)].node);
8904  /*%
8905  $$ = dispatch1(ensure, $2);
8906  %*/
8907  ;}
8908  break;
8909 
8910  case 430:
8911 #line 3832 "parse.y"
8912  {
8913  /*%%%*/
8914  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id)));
8915  /*%
8916  $$ = dispatch1(symbol_literal, $1);
8917  %*/
8918  ;}
8919  break;
8920 
8921  case 432:
8922 #line 3843 "parse.y"
8923  {
8924  /*%%%*/
8925  NODE *node = (yyvsp[(1) - (1)].node);
8926  if (!node) {
8927  node = NEW_STR(STR_NEW0());
8928  }
8929  else {
8930  node = evstr2dstr(node);
8931  }
8932  (yyval.node) = node;
8933  /*%
8934  $$ = $1;
8935  %*/
8936  ;}
8937  break;
8938 
8939  case 435:
8940 #line 3862 "parse.y"
8941  {
8942  /*%%%*/
8943  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
8944  /*%
8945  $$ = dispatch2(string_concat, $1, $2);
8946  %*/
8947  ;}
8948  break;
8949 
8950  case 436:
8951 #line 3872 "parse.y"
8952  {
8953  /*%%%*/
8954  (yyval.node) = (yyvsp[(2) - (3)].node);
8955  /*%
8956  $$ = dispatch1(string_literal, $2);
8957  %*/
8958  ;}
8959  break;
8960 
8961  case 437:
8962 #line 3882 "parse.y"
8963  {
8964  /*%%%*/
8965  NODE *node = (yyvsp[(2) - (3)].node);
8966  if (!node) {
8967  node = NEW_XSTR(STR_NEW0());
8968  }
8969  else {
8970  switch (nd_type(node)) {
8971  case NODE_STR:
8972  nd_set_type(node, NODE_XSTR);
8973  break;
8974  case NODE_DSTR:
8975  nd_set_type(node, NODE_DXSTR);
8976  break;
8977  default:
8978  node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node));
8979  break;
8980  }
8981  }
8982  (yyval.node) = node;
8983  /*%
8984  $$ = dispatch1(xstring_literal, $2);
8985  %*/
8986  ;}
8987  break;
8988 
8989  case 438:
8990 #line 3909 "parse.y"
8991  {
8992  /*%%%*/
8993  int options = (yyvsp[(3) - (3)].num);
8994  NODE *node = (yyvsp[(2) - (3)].node);
8995  NODE *list, *prev;
8996  if (!node) {
8997  node = NEW_LIT(reg_compile(STR_NEW0(), options));
8998  }
8999  else switch (nd_type(node)) {
9000  case NODE_STR:
9001  {
9002  VALUE src = node->nd_lit;
9003  nd_set_type(node, NODE_LIT);
9004  node->nd_lit = reg_compile(src, options);
9005  }
9006  break;
9007  default:
9008  node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node));
9009  case NODE_DSTR:
9010  if (options & RE_OPTION_ONCE) {
9012  }
9013  else {
9014  nd_set_type(node, NODE_DREGX);
9015  }
9016  node->nd_cflag = options & RE_OPTION_MASK;
9017  if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options);
9018  for (list = (prev = node)->nd_next; list; list = list->nd_next) {
9019  if (nd_type(list->nd_head) == NODE_STR) {
9020  VALUE tail = list->nd_head->nd_lit;
9021  if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) {
9022  VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
9023  if (!literal_concat0(parser, lit, tail)) {
9024  node = 0;
9025  break;
9026  }
9027  rb_str_resize(tail, 0);
9028  prev->nd_next = list->nd_next;
9029  rb_gc_force_recycle((VALUE)list->nd_head);
9030  rb_gc_force_recycle((VALUE)list);
9031  list = prev;
9032  }
9033  else {
9034  prev = list;
9035  }
9036  }
9037  else {
9038  prev = 0;
9039  }
9040  }
9041  if (!node->nd_next) {
9042  VALUE src = node->nd_lit;
9043  nd_set_type(node, NODE_LIT);
9044  node->nd_lit = reg_compile(src, options);
9045  }
9046  break;
9047  }
9048  (yyval.node) = node;
9049  /*%
9050  $$ = dispatch2(regexp_literal, $2, $3);
9051  %*/
9052  ;}
9053  break;
9054 
9055  case 439:
9056 #line 3974 "parse.y"
9057  {
9058  /*%%%*/
9059  (yyval.node) = NEW_ZARRAY();
9060  /*%
9061  $$ = dispatch0(words_new);
9062  $$ = dispatch1(array, $$);
9063  %*/
9064  ;}
9065  break;
9066 
9067  case 440:
9068 #line 3983 "parse.y"
9069  {
9070  /*%%%*/
9071  (yyval.node) = (yyvsp[(2) - (3)].node);
9072  /*%
9073  $$ = dispatch1(array, $2);
9074  %*/
9075  ;}
9076  break;
9077 
9078  case 441:
9079 #line 3993 "parse.y"
9080  {
9081  /*%%%*/
9082  (yyval.node) = 0;
9083  /*%
9084  $$ = dispatch0(words_new);
9085  %*/
9086  ;}
9087  break;
9088 
9089  case 442:
9090 #line 4001 "parse.y"
9091  {
9092  /*%%%*/
9093  (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node)));
9094  /*%
9095  $$ = dispatch2(words_add, $1, $2);
9096  %*/
9097  ;}
9098  break;
9099 
9100  case 444:
9101 #line 4019 "parse.y"
9102  {
9103  /*%%%*/
9104  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
9105  /*%
9106  $$ = dispatch2(word_add, $1, $2);
9107  %*/
9108  ;}
9109  break;
9110 
9111  case 445:
9112 #line 4029 "parse.y"
9113  {
9114  /*%%%*/
9115  (yyval.node) = NEW_ZARRAY();
9116  /*%
9117  $$ = dispatch0(qwords_new);
9118  $$ = dispatch1(array, $$);
9119  %*/
9120  ;}
9121  break;
9122 
9123  case 446:
9124 #line 4038 "parse.y"
9125  {
9126  /*%%%*/
9127  (yyval.node) = (yyvsp[(2) - (3)].node);
9128  /*%
9129  $$ = dispatch1(array, $2);
9130  %*/
9131  ;}
9132  break;
9133 
9134  case 447:
9135 #line 4048 "parse.y"
9136  {
9137  /*%%%*/
9138  (yyval.node) = 0;
9139  /*%
9140  $$ = dispatch0(qwords_new);
9141  %*/
9142  ;}
9143  break;
9144 
9145  case 448:
9146 #line 4056 "parse.y"
9147  {
9148  /*%%%*/
9149  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node));
9150  /*%
9151  $$ = dispatch2(qwords_add, $1, $2);
9152  %*/
9153  ;}
9154  break;
9155 
9156  case 449:
9157 #line 4066 "parse.y"
9158  {
9159  /*%%%*/
9160  (yyval.node) = 0;
9161  /*%
9162  $$ = dispatch0(string_content);
9163  %*/
9164  ;}
9165  break;
9166 
9167  case 450:
9168 #line 4074 "parse.y"
9169  {
9170  /*%%%*/
9171  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
9172  /*%
9173  $$ = dispatch2(string_add, $1, $2);
9174  %*/
9175  ;}
9176  break;
9177 
9178  case 451:
9179 #line 4084 "parse.y"
9180  {
9181  /*%%%*/
9182  (yyval.node) = 0;
9183  /*%
9184  $$ = dispatch0(xstring_new);
9185  %*/
9186  ;}
9187  break;
9188 
9189  case 452:
9190 #line 4092 "parse.y"
9191  {
9192  /*%%%*/
9193  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
9194  /*%
9195  $$ = dispatch2(xstring_add, $1, $2);
9196  %*/
9197  ;}
9198  break;
9199 
9200  case 453:
9201 #line 4102 "parse.y"
9202  {
9203  /*%%%*/
9204  (yyval.node) = 0;
9205  /*%
9206  $$ = dispatch0(regexp_new);
9207  %*/
9208  ;}
9209  break;
9210 
9211  case 454:
9212 #line 4110 "parse.y"
9213  {
9214  /*%%%*/
9215  NODE *head = (yyvsp[(1) - (2)].node), *tail = (yyvsp[(2) - (2)].node);
9216  if (!head) {
9217  (yyval.node) = tail;
9218  }
9219  else if (!tail) {
9220  (yyval.node) = head;
9221  }
9222  else {
9223  switch (nd_type(head)) {
9224  case NODE_STR:
9225  nd_set_type(head, NODE_DSTR);
9226  break;
9227  case NODE_DSTR:
9228  break;
9229  default:
9230  head = list_append(NEW_DSTR(Qnil), head);
9231  break;
9232  }
9233  (yyval.node) = list_append(head, tail);
9234  }
9235  /*%
9236  $$ = dispatch2(regexp_add, $1, $2);
9237  %*/
9238  ;}
9239  break;
9240 
9241  case 456:
9242 #line 4140 "parse.y"
9243  {
9244  (yyval.node) = lex_strterm;
9245  lex_strterm = 0;
9246  lex_state = EXPR_BEG;
9247  ;}
9248  break;
9249 
9250  case 457:
9251 #line 4146 "parse.y"
9252  {
9253  /*%%%*/
9254  lex_strterm = (yyvsp[(2) - (3)].node);
9255  (yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node));
9256  /*%
9257  lex_strterm = $<node>2;
9258  $$ = dispatch1(string_dvar, $3);
9259  %*/
9260  ;}
9261  break;
9262 
9263  case 458:
9264 #line 4156 "parse.y"
9265  {
9266  (yyvsp[(1) - (1)].val) = cond_stack;
9267  (yyval.val) = cmdarg_stack;
9268  cond_stack = 0;
9269  cmdarg_stack = 0;
9270  ;}
9271  break;
9272 
9273  case 459:
9274 #line 4162 "parse.y"
9275  {
9276  (yyval.node) = lex_strterm;
9277  lex_strterm = 0;
9278  lex_state = EXPR_BEG;
9279  ;}
9280  break;
9281 
9282  case 460:
9283 #line 4168 "parse.y"
9284  {
9285  cond_stack = (yyvsp[(1) - (5)].val);
9286  cmdarg_stack = (yyvsp[(2) - (5)].val);
9287  lex_strterm = (yyvsp[(3) - (5)].node);
9288  /*%%%*/
9289  if ((yyvsp[(4) - (5)].node)) (yyvsp[(4) - (5)].node)->flags &= ~NODE_FL_NEWLINE;
9290  (yyval.node) = new_evstr((yyvsp[(4) - (5)].node));
9291  /*%
9292  $$ = dispatch1(string_embexpr, $4);
9293  %*/
9294  ;}
9295  break;
9296 
9297  case 461:
9298 #line 4182 "parse.y"
9299  {
9300  /*%%%*/
9301  (yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id));
9302  /*%
9303  $$ = dispatch1(var_ref, $1);
9304  %*/
9305  ;}
9306  break;
9307 
9308  case 462:
9309 #line 4190 "parse.y"
9310  {
9311  /*%%%*/
9312  (yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id));
9313  /*%
9314  $$ = dispatch1(var_ref, $1);
9315  %*/
9316  ;}
9317  break;
9318 
9319  case 463:
9320 #line 4198 "parse.y"
9321  {
9322  /*%%%*/
9323  (yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id));
9324  /*%
9325  $$ = dispatch1(var_ref, $1);
9326  %*/
9327  ;}
9328  break;
9329 
9330  case 465:
9331 #line 4209 "parse.y"
9332  {
9333  lex_state = EXPR_END;
9334  /*%%%*/
9335  (yyval.id) = (yyvsp[(2) - (2)].id);
9336  /*%
9337  $$ = dispatch1(symbol, $2);
9338  %*/
9339  ;}
9340  break;
9341 
9342  case 470:
9343 #line 4226 "parse.y"
9344  {
9345  lex_state = EXPR_END;
9346  /*%%%*/
9347  if (!((yyval.node) = (yyvsp[(2) - (3)].node))) {
9348  (yyval.node) = NEW_LIT(ID2SYM(rb_intern("")));
9349  }
9350  else {
9351  VALUE lit;
9352 
9353  switch (nd_type((yyval.node))) {
9354  case NODE_DSTR:
9355  nd_set_type((yyval.node), NODE_DSYM);
9356  break;
9357  case NODE_STR:
9358  lit = (yyval.node)->nd_lit;
9359  (yyval.node)->nd_lit = ID2SYM(rb_intern_str(lit));
9360  nd_set_type((yyval.node), NODE_LIT);
9361  break;
9362  default:
9363  (yyval.node) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.node)));
9364  break;
9365  }
9366  }
9367  /*%
9368  $$ = dispatch1(dyna_symbol, $2);
9369  %*/
9370  ;}
9371  break;
9372 
9373  case 473:
9374 #line 4258 "parse.y"
9375  {
9376  /*%%%*/
9377  (yyval.node) = negate_lit((yyvsp[(2) - (2)].node));
9378  /*%
9379  $$ = dispatch2(unary, ripper_intern("-@"), $2);
9380  %*/
9381  ;}
9382  break;
9383 
9384  case 474:
9385 #line 4266 "parse.y"
9386  {
9387  /*%%%*/
9388  (yyval.node) = negate_lit((yyvsp[(2) - (2)].node));
9389  /*%
9390  $$ = dispatch2(unary, ripper_intern("-@"), $2);
9391  %*/
9392  ;}
9393  break;
9394 
9395  case 480:
9396 #line 4282 "parse.y"
9397  {ifndef_ripper((yyval.id) = keyword_nil);;}
9398  break;
9399 
9400  case 481:
9401 #line 4283 "parse.y"
9402  {ifndef_ripper((yyval.id) = keyword_self);;}
9403  break;
9404 
9405  case 482:
9406 #line 4284 "parse.y"
9407  {ifndef_ripper((yyval.id) = keyword_true);;}
9408  break;
9409 
9410  case 483:
9411 #line 4285 "parse.y"
9412  {ifndef_ripper((yyval.id) = keyword_false);;}
9413  break;
9414 
9415  case 484:
9416 #line 4286 "parse.y"
9417  {ifndef_ripper((yyval.id) = keyword__FILE__);;}
9418  break;
9419 
9420  case 485:
9421 #line 4287 "parse.y"
9422  {ifndef_ripper((yyval.id) = keyword__LINE__);;}
9423  break;
9424 
9425  case 486:
9426 #line 4288 "parse.y"
9427  {ifndef_ripper((yyval.id) = keyword__ENCODING__);;}
9428  break;
9429 
9430  case 487:
9431 #line 4292 "parse.y"
9432  {
9433  /*%%%*/
9434  if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0);
9435  /*%
9436  if (id_is_var(get_id($1))) {
9437  $$ = dispatch1(var_ref, $1);
9438  }
9439  else {
9440  $$ = dispatch1(vcall, $1);
9441  }
9442  %*/
9443  ;}
9444  break;
9445 
9446  case 488:
9447 #line 4305 "parse.y"
9448  {
9449  /*%%%*/
9450  if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0);
9451  /*%
9452  $$ = dispatch1(var_ref, $1);
9453  %*/
9454  ;}
9455  break;
9456 
9457  case 489:
9458 #line 4315 "parse.y"
9459  {
9460  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
9461  /*%%%*/
9462  /*%
9463  $$ = dispatch1(var_field, $$);
9464  %*/
9465  ;}
9466  break;
9467 
9468  case 490:
9469 #line 4323 "parse.y"
9470  {
9471  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0);
9472  /*%%%*/
9473  /*%
9474  $$ = dispatch1(var_field, $$);
9475  %*/
9476  ;}
9477  break;
9478 
9479  case 493:
9480 #line 4337 "parse.y"
9481  {
9482  /*%%%*/
9483  (yyval.node) = 0;
9484  /*%
9485  $$ = Qnil;
9486  %*/
9487  ;}
9488  break;
9489 
9490  case 494:
9491 #line 4345 "parse.y"
9492  {
9493  lex_state = EXPR_BEG;
9494  ;}
9495  break;
9496 
9497  case 495:
9498 #line 4349 "parse.y"
9499  {
9500  (yyval.node) = (yyvsp[(3) - (4)].node);
9501  ;}
9502  break;
9503 
9504  case 496:
9505 #line 4353 "parse.y"
9506  {
9507  /*%%%*/
9508  yyerrok;
9509  (yyval.node) = 0;
9510  /*%
9511  yyerrok;
9512  $$ = Qnil;
9513  %*/
9514  ;}
9515  break;
9516 
9517  case 497:
9518 #line 4365 "parse.y"
9519  {
9520  /*%%%*/
9521  (yyval.node) = (yyvsp[(2) - (3)].node);
9522  /*%
9523  $$ = dispatch1(paren, $2);
9524  %*/
9525  lex_state = EXPR_BEG;
9526  command_start = TRUE;
9527  ;}
9528  break;
9529 
9530  case 498:
9531 #line 4375 "parse.y"
9532  {
9533  (yyval.node) = (yyvsp[(1) - (2)].node);
9534  lex_state = EXPR_BEG;
9535  command_start = TRUE;
9536  ;}
9537  break;
9538 
9539  case 499:
9540 #line 4383 "parse.y"
9541  {
9542  /*%%%*/
9543  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id));
9544  /*%
9545  $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6));
9546  %*/
9547  ;}
9548  break;
9549 
9550  case 500:
9551 #line 4391 "parse.y"
9552  {
9553  /*%%%*/
9554  (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id));
9555  /*%
9556  $$ = params_new($1, $3, $5, $7, escape_Qundef($8));
9557  %*/
9558  ;}
9559  break;
9560 
9561  case 501:
9562 #line 4399 "parse.y"
9563  {
9564  /*%%%*/
9565  (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id));
9566  /*%
9567  $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4));
9568  %*/
9569  ;}
9570  break;
9571 
9572  case 502:
9573 #line 4407 "parse.y"
9574  {
9575  /*%%%*/
9576  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
9577  /*%
9578  $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6));
9579  %*/
9580  ;}
9581  break;
9582 
9583  case 503:
9584 #line 4415 "parse.y"
9585  {
9586  /*%%%*/
9587  (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id));
9588  /*%
9589  $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4));
9590  %*/
9591  ;}
9592  break;
9593 
9594  case 504:
9595 #line 4423 "parse.y"
9596  {
9597  /*%%%*/
9598  (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
9599  /*%
9600  $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6));
9601  %*/
9602  ;}
9603  break;
9604 
9605  case 505:
9606 #line 4431 "parse.y"
9607  {
9608  /*%%%*/
9609  (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id));
9610  /*%
9611  $$ = params_new($1, Qnil, Qnil, Qnil,escape_Qundef($2));
9612  %*/
9613  ;}
9614  break;
9615 
9616  case 506:
9617 #line 4439 "parse.y"
9618  {
9619  /*%%%*/
9620  (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id));
9621  /*%
9622  $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4));
9623  %*/
9624  ;}
9625  break;
9626 
9627  case 507:
9628 #line 4447 "parse.y"
9629  {
9630  /*%%%*/
9631  (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id));
9632  /*%
9633  $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6));
9634  %*/
9635  ;}
9636  break;
9637 
9638  case 508:
9639 #line 4455 "parse.y"
9640  {
9641  /*%%%*/
9642  (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id));
9643  /*%
9644  $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2));
9645  %*/
9646  ;}
9647  break;
9648 
9649  case 509:
9650 #line 4463 "parse.y"
9651  {
9652  /*%%%*/
9653  (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id));
9654  /*%
9655  $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4));
9656  %*/
9657  ;}
9658  break;
9659 
9660  case 510:
9661 #line 4471 "parse.y"
9662  {
9663  /*%%%*/
9664  (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id));
9665  /*%
9666  $$ = params_new(Qnil, Qnil, $1, Qnil,escape_Qundef($2));
9667  %*/
9668  ;}
9669  break;
9670 
9671  case 511:
9672 #line 4479 "parse.y"
9673  {
9674  /*%%%*/
9675  (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id));
9676  /*%
9677  $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4));
9678  %*/
9679  ;}
9680  break;
9681 
9682  case 512:
9683 #line 4487 "parse.y"
9684  {
9685  /*%%%*/
9686  (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id));
9687  /*%
9688  $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1);
9689  %*/
9690  ;}
9691  break;
9692 
9693  case 513:
9694 #line 4495 "parse.y"
9695  {
9696  /*%%%*/
9697  (yyval.node) = new_args(0, 0, 0, 0, 0);
9698  /*%
9699  $$ = params_new(Qnil, Qnil, Qnil, Qnil, Qnil);
9700  %*/
9701  ;}
9702  break;
9703 
9704  case 514:
9705 #line 4505 "parse.y"
9706  {
9707  /*%%%*/
9708  yyerror("formal argument cannot be a constant");
9709  (yyval.id) = 0;
9710  /*%
9711  $$ = dispatch1(param_error, $1);
9712  %*/
9713  ;}
9714  break;
9715 
9716  case 515:
9717 #line 4514 "parse.y"
9718  {
9719  /*%%%*/
9720  yyerror("formal argument cannot be an instance variable");
9721  (yyval.id) = 0;
9722  /*%
9723  $$ = dispatch1(param_error, $1);
9724  %*/
9725  ;}
9726  break;
9727 
9728  case 516:
9729 #line 4523 "parse.y"
9730  {
9731  /*%%%*/
9732  yyerror("formal argument cannot be a global variable");
9733  (yyval.id) = 0;
9734  /*%
9735  $$ = dispatch1(param_error, $1);
9736  %*/
9737  ;}
9738  break;
9739 
9740  case 517:
9741 #line 4532 "parse.y"
9742  {
9743  /*%%%*/
9744  yyerror("formal argument cannot be a class variable");
9745  (yyval.id) = 0;
9746  /*%
9747  $$ = dispatch1(param_error, $1);
9748  %*/
9749  ;}
9750  break;
9751 
9752  case 519:
9753 #line 4544 "parse.y"
9754  {
9755  formal_argument(get_id((yyvsp[(1) - (1)].id)));
9756  (yyval.id) = (yyvsp[(1) - (1)].id);
9757  ;}
9758  break;
9759 
9760  case 520:
9761 #line 4551 "parse.y"
9762  {
9763  arg_var(get_id((yyvsp[(1) - (1)].id)));
9764  /*%%%*/
9765  (yyval.node) = NEW_ARGS_AUX((yyvsp[(1) - (1)].id), 1);
9766  /*%
9767  $$ = get_value($1);
9768  %*/
9769  ;}
9770  break;
9771 
9772  case 521:
9773 #line 4560 "parse.y"
9774  {
9775  ID tid = internal_id();
9776  arg_var(tid);
9777  /*%%%*/
9778  if (dyna_in_block()) {
9779  (yyvsp[(2) - (3)].node)->nd_value = NEW_DVAR(tid);
9780  }
9781  else {
9782  (yyvsp[(2) - (3)].node)->nd_value = NEW_LVAR(tid);
9783  }
9784  (yyval.node) = NEW_ARGS_AUX(tid, 1);
9785  (yyval.node)->nd_next = (yyvsp[(2) - (3)].node);
9786  /*%
9787  $$ = dispatch1(mlhs_paren, $2);
9788  %*/
9789  ;}
9790  break;
9791 
9792  case 523:
9793 #line 4586 "parse.y"
9794  {
9795  /*%%%*/
9796  (yyval.node) = (yyvsp[(1) - (3)].node);
9797  (yyval.node)->nd_plen++;
9798  (yyval.node)->nd_next = block_append((yyval.node)->nd_next, (yyvsp[(3) - (3)].node)->nd_next);
9799  rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].node));
9800  /*%
9801  $$ = rb_ary_push($1, $3);
9802  %*/
9803  ;}
9804  break;
9805 
9806  case 524:
9807 #line 4599 "parse.y"
9808  {
9809  arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id))));
9810  (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node));
9811  /*%%%*/
9812  (yyval.node) = NEW_OPT_ARG(0, (yyval.node));
9813  /*%
9814  $$ = rb_assoc_new($$, $3);
9815  %*/
9816  ;}
9817  break;
9818 
9819  case 525:
9820 #line 4611 "parse.y"
9821  {
9822  arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id))));
9823  (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node));
9824  /*%%%*/
9825  (yyval.node) = NEW_OPT_ARG(0, (yyval.node));
9826  /*%
9827  $$ = rb_assoc_new($$, $3);
9828  %*/
9829  ;}
9830  break;
9831 
9832  case 526:
9833 #line 4623 "parse.y"
9834  {
9835  /*%%%*/
9836  (yyval.node) = (yyvsp[(1) - (1)].node);
9837  /*%
9838  $$ = rb_ary_new3(1, $1);
9839  %*/
9840  ;}
9841  break;
9842 
9843  case 527:
9844 #line 4631 "parse.y"
9845  {
9846  /*%%%*/
9847  NODE *opts = (yyvsp[(1) - (3)].node);
9848 
9849  while (opts->nd_next) {
9850  opts = opts->nd_next;
9851  }
9852  opts->nd_next = (yyvsp[(3) - (3)].node);
9853  (yyval.node) = (yyvsp[(1) - (3)].node);
9854  /*%
9855  $$ = rb_ary_push($1, $3);
9856  %*/
9857  ;}
9858  break;
9859 
9860  case 528:
9861 #line 4647 "parse.y"
9862  {
9863  /*%%%*/
9864  (yyval.node) = (yyvsp[(1) - (1)].node);
9865  /*%
9866  $$ = rb_ary_new3(1, $1);
9867  %*/
9868  ;}
9869  break;
9870 
9871  case 529:
9872 #line 4655 "parse.y"
9873  {
9874  /*%%%*/
9875  NODE *opts = (yyvsp[(1) - (3)].node);
9876 
9877  while (opts->nd_next) {
9878  opts = opts->nd_next;
9879  }
9880  opts->nd_next = (yyvsp[(3) - (3)].node);
9881  (yyval.node) = (yyvsp[(1) - (3)].node);
9882  /*%
9883  $$ = rb_ary_push($1, $3);
9884  %*/
9885  ;}
9886  break;
9887 
9888  case 532:
9889 #line 4675 "parse.y"
9890  {
9891  /*%%%*/
9892  if (!is_local_id((yyvsp[(2) - (2)].id)))
9893  yyerror("rest argument must be local variable");
9894  /*% %*/
9895  arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id))));
9896  /*%%%*/
9897  (yyval.id) = (yyvsp[(2) - (2)].id);
9898  /*%
9899  $$ = dispatch1(rest_param, $2);
9900  %*/
9901  ;}
9902  break;
9903 
9904  case 533:
9905 #line 4688 "parse.y"
9906  {
9907  /*%%%*/
9908  (yyval.id) = internal_id();
9909  arg_var((yyval.id));
9910  /*%
9911  $$ = dispatch1(rest_param, Qnil);
9912  %*/
9913  ;}
9914  break;
9915 
9916  case 536:
9917 #line 4703 "parse.y"
9918  {
9919  /*%%%*/
9920  if (!is_local_id((yyvsp[(2) - (2)].id)))
9921  yyerror("block argument must be local variable");
9922  else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].id)))
9923  yyerror("duplicated block argument name");
9924  /*% %*/
9925  arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id))));
9926  /*%%%*/
9927  (yyval.id) = (yyvsp[(2) - (2)].id);
9928  /*%
9929  $$ = dispatch1(blockarg, $2);
9930  %*/
9931  ;}
9932  break;
9933 
9934  case 537:
9935 #line 4720 "parse.y"
9936  {
9937  (yyval.id) = (yyvsp[(2) - (2)].id);
9938  ;}
9939  break;
9940 
9941  case 538:
9942 #line 4724 "parse.y"
9943  {
9944  /*%%%*/
9945  (yyval.id) = 0;
9946  /*%
9947  $$ = Qundef;
9948  %*/
9949  ;}
9950  break;
9951 
9952  case 539:
9953 #line 4734 "parse.y"
9954  {
9955  /*%%%*/
9956  value_expr((yyvsp[(1) - (1)].node));
9957  (yyval.node) = (yyvsp[(1) - (1)].node);
9958  if (!(yyval.node)) (yyval.node) = NEW_NIL();
9959  /*%
9960  $$ = $1;
9961  %*/
9962  ;}
9963  break;
9964 
9965  case 540:
9966 #line 4743 "parse.y"
9967  {lex_state = EXPR_BEG;;}
9968  break;
9969 
9970  case 541:
9971 #line 4744 "parse.y"
9972  {
9973  /*%%%*/
9974  if ((yyvsp[(3) - (4)].node) == 0) {
9975  yyerror("can't define singleton method for ().");
9976  }
9977  else {
9978  switch (nd_type((yyvsp[(3) - (4)].node))) {
9979  case NODE_STR:
9980  case NODE_DSTR:
9981  case NODE_XSTR:
9982  case NODE_DXSTR:
9983  case NODE_DREGX:
9984  case NODE_LIT:
9985  case NODE_ARRAY:
9986  case NODE_ZARRAY:
9987  yyerror("can't define singleton method for literals");
9988  default:
9989  value_expr((yyvsp[(3) - (4)].node));
9990  break;
9991  }
9992  }
9993  (yyval.node) = (yyvsp[(3) - (4)].node);
9994  /*%
9995  $$ = dispatch1(paren, $3);
9996  %*/
9997  ;}
9998  break;
9999 
10000  case 543:
10001 #line 4774 "parse.y"
10002  {
10003  /*%%%*/
10004  (yyval.node) = (yyvsp[(1) - (2)].node);
10005  /*%
10006  $$ = dispatch1(assoclist_from_args, $1);
10007  %*/
10008  ;}
10009  break;
10010 
10011  case 545:
10012 #line 4791 "parse.y"
10013  {
10014  /*%%%*/
10015  (yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
10016  /*%
10017  $$ = rb_ary_push($1, $3);
10018  %*/
10019  ;}
10020  break;
10021 
10022  case 546:
10023 #line 4801 "parse.y"
10024  {
10025  /*%%%*/
10026  (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node));
10027  /*%
10028  $$ = dispatch2(assoc_new, $1, $3);
10029  %*/
10030  ;}
10031  break;
10032 
10033  case 547:
10034 #line 4809 "parse.y"
10035  {
10036  /*%%%*/
10037  (yyval.node) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].id)))), (yyvsp[(2) - (2)].node));
10038  /*%
10039  $$ = dispatch2(assoc_new, $1, $2);
10040  %*/
10041  ;}
10042  break;
10043 
10044  case 569:
10045 #line 4865 "parse.y"
10046  {yyerrok;;}
10047  break;
10048 
10049  case 572:
10050 #line 4870 "parse.y"
10051  {yyerrok;;}
10052  break;
10053 
10054  case 573:
10055 #line 4874 "parse.y"
10056  {
10057  /*%%%*/
10058  (yyval.node) = 0;
10059  /*%
10060  $$ = Qundef;
10061  %*/
10062  ;}
10063  break;
10064 
10065 
10066 /* Line 1267 of yacc.c. */
10067 #line 10066 "parse.c"
10068  default: break;
10069  }
10070  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
10071 
10072  YYPOPSTACK (yylen);
10073  yylen = 0;
10074  YY_STACK_PRINT (yyss, yyssp);
10075 
10076  *++yyvsp = yyval;
10077 
10078 
10079  /* Now `shift' the result of the reduction. Determine what state
10080  that goes to, based on the state we popped back to and the rule
10081  number reduced by. */
10082 
10083  yyn = yyr1[yyn];
10084 
10085  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
10086  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
10087  yystate = yytable[yystate];
10088  else
10089  yystate = yydefgoto[yyn - YYNTOKENS];
10090 
10091  goto yynewstate;
10092 
10093 
10094 /*------------------------------------.
10095 | yyerrlab -- here on detecting error |
10096 `------------------------------------*/
10097 yyerrlab:
10098  /* If not already recovering from an error, report this error. */
10099  if (!yyerrstatus)
10100  {
10101  ++yynerrs;
10102 #if ! YYERROR_VERBOSE
10103  parser_yyerror (parser, YY_("syntax error"));
10104 #else
10105  {
10106  YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
10107  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
10108  {
10109  YYSIZE_T yyalloc = 2 * yysize;
10110  if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
10111  yyalloc = YYSTACK_ALLOC_MAXIMUM;
10112  if (yymsg != yymsgbuf)
10113  YYSTACK_FREE (yymsg);
10114  yymsg = (char *) YYSTACK_ALLOC (yyalloc);
10115  if (yymsg)
10116  yymsg_alloc = yyalloc;
10117  else
10118  {
10119  yymsg = yymsgbuf;
10120  yymsg_alloc = sizeof yymsgbuf;
10121  }
10122  }
10123 
10124  if (0 < yysize && yysize <= yymsg_alloc)
10125  {
10126  (void) yysyntax_error (yymsg, yystate, yychar);
10127  parser_yyerror (parser, yymsg);
10128  }
10129  else
10130  {
10131  parser_yyerror (parser, YY_("syntax error"));
10132  if (yysize != 0)
10133  goto yyexhaustedlab;
10134  }
10135  }
10136 #endif
10137  }
10138 
10139 
10140 
10141  if (yyerrstatus == 3)
10142  {
10143  /* If just tried and failed to reuse look-ahead token after an
10144  error, discard it. */
10145 
10146  if (yychar <= YYEOF)
10147  {
10148  /* Return failure if at end of input. */
10149  if (yychar == YYEOF)
10150  YYABORT;
10151  }
10152  else
10153  {
10154  yydestruct ("Error: discarding",
10155  yytoken, &yylval, parser);
10156  yychar = YYEMPTY;
10157  }
10158  }
10159 
10160  /* Else will try to reuse look-ahead token after shifting the error
10161  token. */
10162  goto yyerrlab1;
10163 
10164 
10165 /*---------------------------------------------------.
10166 | yyerrorlab -- error raised explicitly by YYERROR. |
10167 `---------------------------------------------------*/
10168 yyerrorlab:
10169 
10170  /* Pacify compilers like GCC when the user code never invokes
10171  YYERROR and the label yyerrorlab therefore never appears in user
10172  code. */
10173  if (/*CONSTCOND*/ 0)
10174  goto yyerrorlab;
10175 
10176  /* Do not reclaim the symbols of the rule which action triggered
10177  this YYERROR. */
10178  YYPOPSTACK (yylen);
10179  yylen = 0;
10180  YY_STACK_PRINT (yyss, yyssp);
10181  yystate = *yyssp;
10182  goto yyerrlab1;
10183 
10184 
10185 /*-------------------------------------------------------------.
10186 | yyerrlab1 -- common code for both syntax error and YYERROR. |
10187 `-------------------------------------------------------------*/
10188 yyerrlab1:
10189  yyerrstatus = 3; /* Each real token shifted decrements this. */
10190 
10191  for (;;)
10192  {
10193  yyn = yypact[yystate];
10194  if (yyn != YYPACT_NINF)
10195  {
10196  yyn += YYTERROR;
10197  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
10198  {
10199  yyn = yytable[yyn];
10200  if (0 < yyn)
10201  break;
10202  }
10203  }
10204 
10205  /* Pop the current state because it cannot handle the error token. */
10206  if (yyssp == yyss)
10207  YYABORT;
10208 
10209 
10210  yydestruct ("Error: popping",
10211  yystos[yystate], yyvsp, parser);
10212  YYPOPSTACK (1);
10213  yystate = *yyssp;
10214  YY_STACK_PRINT (yyss, yyssp);
10215  }
10216 
10217  if (yyn == YYFINAL)
10218  YYACCEPT;
10219 
10220  *++yyvsp = yylval;
10221 
10222 
10223  /* Shift the error token. */
10224  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
10225 
10226  yystate = yyn;
10227  goto yynewstate;
10228 
10229 
10230 /*-------------------------------------.
10231 | yyacceptlab -- YYACCEPT comes here. |
10232 `-------------------------------------*/
10233 yyacceptlab:
10234  yyresult = 0;
10235  goto yyreturn;
10236 
10237 /*-----------------------------------.
10238 | yyabortlab -- YYABORT comes here. |
10239 `-----------------------------------*/
10240 yyabortlab:
10241  yyresult = 1;
10242  goto yyreturn;
10243 
10244 #ifndef yyoverflow
10245 /*-------------------------------------------------.
10246 | yyexhaustedlab -- memory exhaustion comes here. |
10247 `-------------------------------------------------*/
10248 yyexhaustedlab:
10249  parser_yyerror (parser, YY_("memory exhausted"));
10250  yyresult = 2;
10251  /* Fall through. */
10252 #endif
10253 
10254 yyreturn:
10255  if (yychar != YYEOF && yychar != YYEMPTY)
10256  yydestruct ("Cleanup: discarding lookahead",
10257  yytoken, &yylval, parser);
10258  /* Do not reclaim the symbols of the rule which action triggered
10259  this YYABORT or YYACCEPT. */
10260  YYPOPSTACK (yylen);
10261  YY_STACK_PRINT (yyss, yyssp);
10262  while (yyssp != yyss)
10263  {
10264  yydestruct ("Cleanup: popping",
10265  yystos[*yyssp], yyvsp, parser);
10266  YYPOPSTACK (1);
10267  }
10268 #ifndef yyoverflow
10269  if (yyss != yyssa)
10270  YYSTACK_FREE (yyss);
10271 #endif
10272 #if YYERROR_VERBOSE
10273  if (yymsg != yymsgbuf)
10274  YYSTACK_FREE (yymsg);
10275 #endif
10276  /* Make sure YYID is used. */
10277  return YYID (yyresult);
10278 }
10279 
10280 
10281 #line 4882 "parse.y"
10282 
10283 # undef parser
10284 # undef yylex
10285 # undef yylval
10286 # define yylval (*((YYSTYPE*)(parser->parser_yylval)))
10287 
10288 static int parser_regx_options(struct parser_params*);
10289 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**);
10290 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc);
10291 static int parser_parse_string(struct parser_params*,NODE*);
10292 static int parser_here_document(struct parser_params*,NODE*);
10293 
10294 
10295 # define nextc() parser_nextc(parser)
10296 # define pushback(c) parser_pushback(parser, (c))
10297 # define newtok() parser_newtok(parser)
10298 # define tokspace(n) parser_tokspace(parser, (n))
10299 # define tokadd(c) parser_tokadd(parser, (c))
10300 # define tok_hex(numlen) parser_tok_hex(parser, (numlen))
10301 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e))
10302 # define tokadd_escape(e) parser_tokadd_escape(parser, (e))
10303 # define regx_options() parser_regx_options(parser)
10304 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e))
10305 # define parse_string(n) parser_parse_string(parser,(n))
10306 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc))
10307 # define here_document(n) parser_here_document(parser,(n))
10308 # define heredoc_identifier() parser_heredoc_identifier(parser)
10309 # define heredoc_restore(n) parser_heredoc_restore(parser,(n))
10310 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i))
10311 
10312 #ifndef RIPPER
10313 # define set_yylval_str(x) (yylval.node = NEW_STR(x))
10314 # define set_yylval_num(x) (yylval.num = (x))
10315 # define set_yylval_id(x) (yylval.id = (x))
10316 # define set_yylval_name(x) (yylval.id = (x))
10317 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x))
10318 # define set_yylval_node(x) (yylval.node = (x))
10319 # define yylval_id() (yylval.id)
10320 #else
10321 static inline VALUE
10322 ripper_yylval_id(ID x)
10323 {
10324  return (VALUE)NEW_LASGN(x, ID2SYM(x));
10325 }
10326 # define set_yylval_str(x) (void)(x)
10327 # define set_yylval_num(x) (void)(x)
10328 # define set_yylval_id(x) (void)(x)
10329 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x))
10330 # define set_yylval_literal(x) (void)(x)
10331 # define set_yylval_node(x) (void)(x)
10332 # define yylval_id() yylval.id
10333 #endif
10334 
10335 #ifndef RIPPER
10336 #define ripper_flush(p) (void)(p)
10337 #else
10338 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p)
10339 
10340 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
10341 
10342 static int
10343 ripper_has_scan_event(struct parser_params *parser)
10344 {
10345 
10346  if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
10347  return lex_p > parser->tokp;
10348 }
10349 
10350 static VALUE
10351 ripper_scan_event_val(struct parser_params *parser, int t)
10352 {
10353  VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp);
10354  VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str);
10355  ripper_flush(parser);
10356  return rval;
10357 }
10358 
10359 static void
10360 ripper_dispatch_scan_event(struct parser_params *parser, int t)
10361 {
10362  if (!ripper_has_scan_event(parser)) return;
10363  yylval_rval = ripper_scan_event_val(parser, t);
10364 }
10365 
10366 static void
10367 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t)
10368 {
10369  if (!ripper_has_scan_event(parser)) return;
10370  (void)ripper_scan_event_val(parser, t);
10371 }
10372 
10373 static void
10374 ripper_dispatch_delayed_token(struct parser_params *parser, int t)
10375 {
10376  int saved_line = ruby_sourceline;
10377  const char *saved_tokp = parser->tokp;
10378 
10379  ruby_sourceline = parser->delayed_line;
10380  parser->tokp = lex_pbeg + parser->delayed_col;
10381  yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
10382  parser->delayed = Qnil;
10383  ruby_sourceline = saved_line;
10384  parser->tokp = saved_tokp;
10385 }
10386 #endif /* RIPPER */
10387 
10388 #include "ruby/regex.h"
10389 #include "ruby/util.h"
10390 
10391 /* We remove any previous definition of `SIGN_EXTEND_CHAR',
10392  since ours (we hope) works properly with all combinations of
10393  machines, compilers, `char' and `unsigned char' argument types.
10394  (Per Bothner suggested the basic approach.) */
10395 #undef SIGN_EXTEND_CHAR
10396 #if __STDC__
10397 # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
10398 #else /* not __STDC__ */
10399 /* As in Harbison and Steele. */
10400 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
10401 #endif
10402 
10403 #define parser_encoding_name() (parser->enc->name)
10404 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc)
10405 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc)
10406 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))
10407 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc))
10408 
10409 #define parser_isascii() ISASCII(*(lex_p-1))
10410 
10411 #ifndef RIPPER
10412 static int
10413 token_info_get_column(struct parser_params *parser, const char *token)
10414 {
10415  int column = 1;
10416  const char *p, *pend = lex_p - strlen(token);
10417  for (p = lex_pbeg; p < pend; p++) {
10418  if (*p == '\t') {
10419  column = (((column - 1) / 8) + 1) * 8;
10420  }
10421  column++;
10422  }
10423  return column;
10424 }
10425 
10426 static int
10427 token_info_has_nonspaces(struct parser_params *parser, const char *token)
10428 {
10429  const char *p, *pend = lex_p - strlen(token);
10430  for (p = lex_pbeg; p < pend; p++) {
10431  if (*p != ' ' && *p != '\t') {
10432  return 1;
10433  }
10434  }
10435  return 0;
10436 }
10437 
10438 #undef token_info_push
10439 static void
10440 token_info_push(struct parser_params *parser, const char *token)
10441 {
10442  token_info *ptinfo;
10443 
10444  if (!parser->parser_token_info_enabled) return;
10445  ptinfo = ALLOC(token_info);
10446  ptinfo->token = token;
10447  ptinfo->linenum = ruby_sourceline;
10448  ptinfo->column = token_info_get_column(parser, token);
10449  ptinfo->nonspc = token_info_has_nonspaces(parser, token);
10450  ptinfo->next = parser->parser_token_info;
10451 
10452  parser->parser_token_info = ptinfo;
10453 }
10454 
10455 #undef token_info_pop
10456 static void
10457 token_info_pop(struct parser_params *parser, const char *token)
10458 {
10459  int linenum;
10460  token_info *ptinfo = parser->parser_token_info;
10461 
10462  if (!ptinfo) return;
10463  parser->parser_token_info = ptinfo->next;
10464  if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */
10465  goto finish;
10466  }
10467  linenum = ruby_sourceline;
10468  if (linenum == ptinfo->linenum) { /* SKIP */
10469  goto finish;
10470  }
10471  if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */
10472  goto finish;
10473  }
10474  if (parser->parser_token_info_enabled) {
10476  "mismatched indentations at '%s' with '%s' at %d",
10477  token, ptinfo->token, ptinfo->linenum);
10478  }
10479 
10480  finish:
10481  xfree(ptinfo);
10482 }
10483 #endif /* RIPPER */
10484 
10485 static int
10486 parser_yyerror(struct parser_params *parser, const char *msg)
10487 {
10488 #ifndef RIPPER
10489  const int max_line_margin = 30;
10490  const char *p, *pe;
10491  char *buf;
10492  long len;
10493  int i;
10494 
10495  compile_error(PARSER_ARG "%s", msg);
10496  p = lex_p;
10497  while (lex_pbeg <= p) {
10498  if (*p == '\n') break;
10499  p--;
10500  }
10501  p++;
10502 
10503  pe = lex_p;
10504  while (pe < lex_pend) {
10505  if (*pe == '\n') break;
10506  pe++;
10507  }
10508 
10509  len = pe - p;
10510  if (len > 4) {
10511  char *p2;
10512  const char *pre = "", *post = "";
10513 
10514  if (len > max_line_margin * 2 + 10) {
10515  if (lex_p - p > max_line_margin) {
10516  p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline));
10517  pre = "...";
10518  }
10519  if (pe - lex_p > max_line_margin) {
10520  pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline));
10521  post = "...";
10522  }
10523  len = pe - p;
10524  }
10525  buf = ALLOCA_N(char, len+2);
10526  MEMCPY(buf, p, char, len);
10527  buf[len] = '\0';
10528  rb_compile_error_append("%s%s%s", pre, buf, post);
10529 
10530  i = (int)(lex_p - p);
10531  p2 = buf; pe = buf + len;
10532 
10533  while (p2 < pe) {
10534  if (*p2 != '\t') *p2 = ' ';
10535  p2++;
10536  }
10537  buf[i] = '^';
10538  buf[i+1] = '\0';
10539  rb_compile_error_append("%s%s", pre, buf);
10540  }
10541 #else
10542  dispatch1(parse_error, STR_NEW2(msg));
10543 #endif /* !RIPPER */
10544  return 0;
10545 }
10546 
10547 static void parser_prepare(struct parser_params *parser);
10548 
10549 #ifndef RIPPER
10550 static VALUE
10551 debug_lines(const char *f)
10552 {
10553  ID script_lines;
10554  CONST_ID(script_lines, "SCRIPT_LINES__");
10555  if (rb_const_defined_at(rb_cObject, script_lines)) {
10556  VALUE hash = rb_const_get_at(rb_cObject, script_lines);
10557  if (TYPE(hash) == T_HASH) {
10559  VALUE lines = rb_ary_new();
10560  rb_hash_aset(hash, fname, lines);
10561  return lines;
10562  }
10563  }
10564  return 0;
10565 }
10566 
10567 static VALUE
10568 coverage(const char *f, int n)
10569 {
10570  VALUE coverages = rb_get_coverages();
10571  if (RTEST(coverages) && RBASIC(coverages)->klass == 0) {
10573  VALUE lines = rb_ary_new2(n);
10574  int i;
10575  RBASIC(lines)->klass = 0;
10576  for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil;
10577  RARRAY(lines)->as.heap.len = n;
10578  rb_hash_aset(coverages, fname, lines);
10579  return lines;
10580  }
10581  return 0;
10582 }
10583 
10584 static int
10586 {
10587  return strcmp(ruby_sourcefile, "-e") == 0;
10588 }
10589 
10590 static VALUE
10591 yycompile0(VALUE arg, int tracing)
10592 {
10593  int n;
10594  NODE *tree;
10595  struct parser_params *parser = (struct parser_params *)arg;
10596 
10597  if (!compile_for_eval && rb_safe_level() == 0) {
10599  if (ruby_debug_lines && ruby_sourceline > 0) {
10600  VALUE str = STR_NEW0();
10601  n = ruby_sourceline;
10602  do {
10604  } while (--n);
10605  }
10606 
10607  if (!e_option_supplied(parser)) {
10609  }
10610  }
10611 
10612  parser_prepare(parser);
10613  deferred_nodes = 0;
10614 #ifndef RIPPER
10616 #endif
10617  n = yyparse((void*)parser);
10618  ruby_debug_lines = 0;
10619  ruby_coverage = 0;
10620  compile_for_eval = 0;
10621 
10622  lex_strterm = 0;
10623  lex_p = lex_pbeg = lex_pend = 0;
10624  lex_lastline = lex_nextline = 0;
10625  if (parser->nerr) {
10626  return 0;
10627  }
10628  tree = ruby_eval_tree;
10629  if (!tree) {
10630  tree = NEW_NIL();
10631  }
10632  else if (ruby_eval_tree_begin) {
10633  tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body);
10634  }
10635  return (VALUE)tree;
10636 }
10637 
10638 static NODE*
10639 yycompile(struct parser_params *parser, const char *f, int line)
10640 {
10642  ruby_sourceline = line - 1;
10643  return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE);
10644 }
10645 #endif /* !RIPPER */
10646 
10647 static rb_encoding *
10649 {
10650  rb_encoding *enc = rb_enc_get(s);
10651  if (!rb_enc_asciicompat(enc)) {
10652  rb_raise(rb_eArgError, "invalid source encoding");
10653  }
10654  return enc;
10655 }
10656 
10657 static VALUE
10658 lex_get_str(struct parser_params *parser, VALUE s)
10659 {
10660  char *beg, *end, *pend;
10662 
10663  beg = RSTRING_PTR(s);
10664  if (lex_gets_ptr) {
10665  if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil;
10666  beg += lex_gets_ptr;
10667  }
10668  pend = RSTRING_PTR(s) + RSTRING_LEN(s);
10669  end = beg;
10670  while (end < pend) {
10671  if (*end++ == '\n') break;
10672  }
10673  lex_gets_ptr = end - RSTRING_PTR(s);
10674  return rb_enc_str_new(beg, end - beg, enc);
10675 }
10676 
10677 static VALUE
10679 {
10680  VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
10681  if (NIL_P(line)) return line;
10683 #ifndef RIPPER
10684  if (ruby_debug_lines) {
10685  rb_enc_associate(line, parser->enc);
10687  }
10688  if (ruby_coverage) {
10690  }
10691 #endif
10692  return line;
10693 }
10694 
10695 #ifdef RIPPER
10697 #else
10699 
10700 static NODE*
10701 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
10702 {
10703  struct parser_params *parser;
10704  NODE *node;
10705  volatile VALUE tmp;
10706 
10707  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
10709  lex_gets_ptr = 0;
10710  lex_input = s;
10711  lex_pbeg = lex_p = lex_pend = 0;
10713 
10714  node = yycompile(parser, f, line);
10715  tmp = vparser; /* prohibit tail call optimization */
10716 
10717  return node;
10718 }
10719 
10720 NODE*
10721 rb_compile_string(const char *f, VALUE s, int line)
10722 {
10724  return parser_compile_string(rb_parser_new(), f, s, line);
10725 }
10726 
10727 NODE*
10728 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
10729 {
10731  return parser_compile_string(vparser, f, s, line);
10732 }
10733 
10734 NODE*
10735 rb_compile_cstr(const char *f, const char *s, int len, int line)
10736 {
10737  VALUE str = rb_str_new(s, len);
10738  return parser_compile_string(rb_parser_new(), f, str, line);
10739 }
10740 
10741 NODE*
10742 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line)
10743 {
10744  VALUE str = rb_str_new(s, len);
10745  return parser_compile_string(vparser, f, str, line);
10746 }
10747 
10748 static VALUE
10749 lex_io_gets(struct parser_params *parser, VALUE io)
10750 {
10751  return rb_io_gets(io);
10752 }
10753 
10754 NODE*
10755 rb_compile_file(const char *f, VALUE file, int start)
10756 {
10757  VALUE volatile vparser = rb_parser_new();
10758 
10759  return rb_parser_compile_file(vparser, f, file, start);
10760 }
10761 
10762 NODE*
10763 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start)
10764 {
10765  struct parser_params *parser;
10766  volatile VALUE tmp;
10767  NODE *node;
10768 
10769  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
10771  lex_input = file;
10772  lex_pbeg = lex_p = lex_pend = 0;
10774 
10775  node = yycompile(parser, f, start);
10776  tmp = vparser; /* prohibit tail call optimization */
10777 
10778  return node;
10779 }
10780 #endif /* !RIPPER */
10781 
10782 #define STR_FUNC_ESCAPE 0x01
10783 #define STR_FUNC_EXPAND 0x02
10784 #define STR_FUNC_REGEXP 0x04
10785 #define STR_FUNC_QWORDS 0x08
10786 #define STR_FUNC_SYMBOL 0x10
10787 #define STR_FUNC_INDENT 0x20
10788 
10790  str_squote = (0),
10798 };
10799 
10800 static VALUE
10801 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0)
10802 {
10803  VALUE str;
10804 
10805  str = rb_enc_str_new(p, n, enc);
10806  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
10808  }
10809  else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
10811  }
10812  }
10813 
10814  return str;
10815 }
10816 
10817 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend)
10818 #define lex_eol_p() (lex_p >= lex_pend)
10819 #define peek(c) peek_n((c), 0)
10820 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n])
10821 
10822 static inline int
10824 {
10825  int c;
10826 
10827  if (lex_p == lex_pend) {
10828  VALUE v = lex_nextline;
10829  lex_nextline = 0;
10830  if (!v) {
10831  if (parser->eofp)
10832  return -1;
10833 
10834  if (!lex_input || NIL_P(v = lex_getline(parser))) {
10835  parser->eofp = Qtrue;
10836  lex_goto_eol(parser);
10837  return -1;
10838  }
10839  }
10840  {
10841 #ifdef RIPPER
10842  if (parser->tokp < lex_pend) {
10843  if (NIL_P(parser->delayed)) {
10844  parser->delayed = rb_str_buf_new(1024);
10845  rb_enc_associate(parser->delayed, parser->enc);
10846  rb_str_buf_cat(parser->delayed,
10847  parser->tokp, lex_pend - parser->tokp);
10848  parser->delayed_line = ruby_sourceline;
10849  parser->delayed_col = (int)(parser->tokp - lex_pbeg);
10850  }
10851  else {
10852  rb_str_buf_cat(parser->delayed,
10853  parser->tokp, lex_pend - parser->tokp);
10854  }
10855  }
10856 #endif
10857  if (heredoc_end > 0) {
10859  heredoc_end = 0;
10860  }
10861  ruby_sourceline++;
10862  parser->line_count++;
10863  lex_pbeg = lex_p = RSTRING_PTR(v);
10864  lex_pend = lex_p + RSTRING_LEN(v);
10865  ripper_flush(parser);
10866  lex_lastline = v;
10867  }
10868  }
10869  c = (unsigned char)*lex_p++;
10870  if (c == '\r' && peek('\n')) {
10871  lex_p++;
10872  c = '\n';
10873  }
10874 
10875  return c;
10876 }
10877 
10878 static void
10879 parser_pushback(struct parser_params *parser, int c)
10880 {
10881  if (c == -1) return;
10882  lex_p--;
10883  if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
10884  lex_p--;
10885  }
10886 }
10887 
10888 #define was_bol() (lex_p == lex_pbeg + 1)
10889 
10890 #define tokfix() (tokenbuf[tokidx]='\0')
10891 #define tok() tokenbuf
10892 #define toklen() tokidx
10893 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
10894 
10895 static char*
10897 {
10898  tokidx = 0;
10899  if (!tokenbuf) {
10900  toksiz = 60;
10901  tokenbuf = ALLOC_N(char, 60);
10902  }
10903  if (toksiz > 4096) {
10904  toksiz = 60;
10905  REALLOC_N(tokenbuf, char, 60);
10906  }
10907  return tokenbuf;
10908 }
10909 
10910 static char *
10911 parser_tokspace(struct parser_params *parser, int n)
10912 {
10913  tokidx += n;
10914 
10915  if (tokidx >= toksiz) {
10916  do {toksiz *= 2;} while (toksiz < tokidx);
10917  REALLOC_N(tokenbuf, char, toksiz);
10918  }
10919  return &tokenbuf[tokidx-n];
10920 }
10921 
10922 static void
10923 parser_tokadd(struct parser_params *parser, int c)
10924 {
10925  tokenbuf[tokidx++] = (char)c;
10926  if (tokidx >= toksiz) {
10927  toksiz *= 2;
10928  REALLOC_N(tokenbuf, char, toksiz);
10929  }
10930 }
10931 
10932 static int
10933 parser_tok_hex(struct parser_params *parser, size_t *numlen)
10934 {
10935  int c;
10936 
10937  c = scan_hex(lex_p, 2, numlen);
10938  if (!*numlen) {
10939  yyerror("invalid hex escape");
10940  return 0;
10941  }
10942  lex_p += *numlen;
10943  return c;
10944 }
10945 
10946 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n))
10947 
10948 static int
10950  int string_literal, int symbol_literal, int regexp_literal)
10951 {
10952  /*
10953  * If string_literal is true, then we allow multiple codepoints
10954  * in \u{}, and add the codepoints to the current token.
10955  * Otherwise we're parsing a character literal and return a single
10956  * codepoint without adding it
10957  */
10958 
10959  int codepoint;
10960  size_t numlen;
10961 
10962  if (regexp_literal) { tokadd('\\'); tokadd('u'); }
10963 
10964  if (peek('{')) { /* handle \u{...} form */
10965  do {
10966  if (regexp_literal) { tokadd(*lex_p); }
10967  nextc();
10968  codepoint = scan_hex(lex_p, 6, &numlen);
10969  if (numlen == 0) {
10970  yyerror("invalid Unicode escape");
10971  return 0;
10972  }
10973  if (codepoint > 0x10ffff) {
10974  yyerror("invalid Unicode codepoint (too large)");
10975  return 0;
10976  }
10977  lex_p += numlen;
10978  if (regexp_literal) {
10979  tokcopy((int)numlen);
10980  }
10981  else if (codepoint >= 0x80) {
10982  *encp = UTF8_ENC();
10983  if (string_literal) tokaddmbc(codepoint, *encp);
10984  }
10985  else if (string_literal) {
10986  tokadd(codepoint);
10987  }
10988  } while (string_literal && (peek(' ') || peek('\t')));
10989 
10990  if (!peek('}')) {
10991  yyerror("unterminated Unicode escape");
10992  return 0;
10993  }
10994 
10995  if (regexp_literal) { tokadd('}'); }
10996  nextc();
10997  }
10998  else { /* handle \uxxxx form */
10999  codepoint = scan_hex(lex_p, 4, &numlen);
11000  if (numlen < 4) {
11001  yyerror("invalid Unicode escape");
11002  return 0;
11003  }
11004  lex_p += 4;
11005  if (regexp_literal) {
11006  tokcopy(4);
11007  }
11008  else if (codepoint >= 0x80) {
11009  *encp = UTF8_ENC();
11010  if (string_literal) tokaddmbc(codepoint, *encp);
11011  }
11012  else if (string_literal) {
11013  tokadd(codepoint);
11014  }
11015  }
11016 
11017  return codepoint;
11018 }
11019 
11020 #define ESCAPE_CONTROL 1
11021 #define ESCAPE_META 2
11022 
11023 static int
11024 parser_read_escape(struct parser_params *parser, int flags,
11025  rb_encoding **encp)
11026 {
11027  int c;
11028  size_t numlen;
11029 
11030  switch (c = nextc()) {
11031  case '\\': /* Backslash */
11032  return c;
11033 
11034  case 'n': /* newline */
11035  return '\n';
11036 
11037  case 't': /* horizontal tab */
11038  return '\t';
11039 
11040  case 'r': /* carriage-return */
11041  return '\r';
11042 
11043  case 'f': /* form-feed */
11044  return '\f';
11045 
11046  case 'v': /* vertical tab */
11047  return '\13';
11048 
11049  case 'a': /* alarm(bell) */
11050  return '\007';
11051 
11052  case 'e': /* escape */
11053  return 033;
11054 
11055  case '0': case '1': case '2': case '3': /* octal constant */
11056  case '4': case '5': case '6': case '7':
11057  pushback(c);
11058  c = scan_oct(lex_p, 3, &numlen);
11059  lex_p += numlen;
11060  return c;
11061 
11062  case 'x': /* hex constant */
11063  c = tok_hex(&numlen);
11064  if (numlen == 0) return 0;
11065  return c;
11066 
11067  case 'b': /* backspace */
11068  return '\010';
11069 
11070  case 's': /* space */
11071  return ' ';
11072 
11073  case 'M':
11074  if (flags & ESCAPE_META) goto eof;
11075  if ((c = nextc()) != '-') {
11076  pushback(c);
11077  goto eof;
11078  }
11079  if ((c = nextc()) == '\\') {
11080  if (peek('u')) goto eof;
11081  return read_escape(flags|ESCAPE_META, encp) | 0x80;
11082  }
11083  else if (c == -1 || !ISASCII(c)) goto eof;
11084  else {
11085  return ((c & 0xff) | 0x80);
11086  }
11087 
11088  case 'C':
11089  if ((c = nextc()) != '-') {
11090  pushback(c);
11091  goto eof;
11092  }
11093  case 'c':
11094  if (flags & ESCAPE_CONTROL) goto eof;
11095  if ((c = nextc())== '\\') {
11096  if (peek('u')) goto eof;
11097  c = read_escape(flags|ESCAPE_CONTROL, encp);
11098  }
11099  else if (c == '?')
11100  return 0177;
11101  else if (c == -1 || !ISASCII(c)) goto eof;
11102  return c & 0x9f;
11103 
11104  eof:
11105  case -1:
11106  yyerror("Invalid escape character syntax");
11107  return '\0';
11108 
11109  default:
11110  return c;
11111  }
11112 }
11113 
11114 static void
11116 {
11117  int len = rb_enc_codelen(c, enc);
11118  rb_enc_mbcput(c, tokspace(len), enc);
11119 }
11120 
11121 static int
11123 {
11124  int c;
11125  int flags = 0;
11126  size_t numlen;
11127 
11128  first:
11129  switch (c = nextc()) {
11130  case '\n':
11131  return 0; /* just ignore */
11132 
11133  case '0': case '1': case '2': case '3': /* octal constant */
11134  case '4': case '5': case '6': case '7':
11135  {
11136  ruby_scan_oct(--lex_p, 3, &numlen);
11137  if (numlen == 0) goto eof;
11138  lex_p += numlen;
11139  tokcopy((int)numlen + 1);
11140  }
11141  return 0;
11142 
11143  case 'x': /* hex constant */
11144  {
11145  tok_hex(&numlen);
11146  if (numlen == 0) return -1;
11147  tokcopy((int)numlen + 2);
11148  }
11149  return 0;
11150 
11151  case 'M':
11152  if (flags & ESCAPE_META) goto eof;
11153  if ((c = nextc()) != '-') {
11154  pushback(c);
11155  goto eof;
11156  }
11157  tokcopy(3);
11158  flags |= ESCAPE_META;
11159  goto escaped;
11160 
11161  case 'C':
11162  if (flags & ESCAPE_CONTROL) goto eof;
11163  if ((c = nextc()) != '-') {
11164  pushback(c);
11165  goto eof;
11166  }
11167  tokcopy(3);
11168  goto escaped;
11169 
11170  case 'c':
11171  if (flags & ESCAPE_CONTROL) goto eof;
11172  tokcopy(2);
11173  flags |= ESCAPE_CONTROL;
11174  escaped:
11175  if ((c = nextc()) == '\\') {
11176  goto first;
11177  }
11178  else if (c == -1) goto eof;
11179  tokadd(c);
11180  return 0;
11181 
11182  eof:
11183  case -1:
11184  yyerror("Invalid escape character syntax");
11185  return -1;
11186 
11187  default:
11188  tokadd('\\');
11189  tokadd(c);
11190  }
11191  return 0;
11192 }
11193 
11194 static int
11196 {
11197  int kcode = 0;
11198  int kopt = 0;
11199  int options = 0;
11200  int c, opt, kc;
11201 
11202  newtok();
11203  while (c = nextc(), ISALPHA(c)) {
11204  if (c == 'o') {
11205  options |= RE_OPTION_ONCE;
11206  }
11207  else if (rb_char_to_option_kcode(c, &opt, &kc)) {
11208  if (kc >= 0) {
11209  if (kc != rb_ascii8bit_encindex()) kcode = c;
11210  kopt = opt;
11211  }
11212  else {
11213  options |= opt;
11214  }
11215  }
11216  else {
11217  tokadd(c);
11218  }
11219  }
11220  options |= kopt;
11221  pushback(c);
11222  if (toklen()) {
11223  tokfix();
11224  compile_error(PARSER_ARG "unknown regexp option%s - %s",
11225  toklen() > 1 ? "s" : "", tok());
11226  }
11227  return options | RE_OPTION_ENCODING(kcode);
11228 }
11229 
11230 static void
11232 {
11233  /* TODO: should use another API? */
11234  if (RBASIC(str)->flags & RSTRING_NOEMBED)
11235  xfree(RSTRING_PTR(str));
11236  rb_gc_force_recycle(str);
11237 }
11238 
11239 static int
11240 parser_tokadd_mbchar(struct parser_params *parser, int c)
11241 {
11242  int len = parser_precise_mbclen();
11243  if (!MBCLEN_CHARFOUND_P(len)) {
11244  compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name());
11245  return -1;
11246  }
11247  tokadd(c);
11248  lex_p += --len;
11249  if (len > 0) tokcopy(len);
11250  return c;
11251 }
11252 
11253 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c))
11254 
11255 static int
11257  int func, int term, int paren, long *nest,
11258  rb_encoding **encp)
11259 {
11260  int c;
11261  int has_nonascii = 0;
11262  rb_encoding *enc = *encp;
11263  char *errbuf = 0;
11264  static const char mixed_msg[] = "%s mixed within %s source";
11265 
11266 #define mixed_error(enc1, enc2) if (!errbuf) { \
11267  size_t len = sizeof(mixed_msg) - 4; \
11268  len += strlen(rb_enc_name(enc1)); \
11269  len += strlen(rb_enc_name(enc2)); \
11270  errbuf = ALLOCA_N(char, len); \
11271  snprintf(errbuf, len, mixed_msg, \
11272  rb_enc_name(enc1), \
11273  rb_enc_name(enc2)); \
11274  yyerror(errbuf); \
11275  }
11276 #define mixed_escape(beg, enc1, enc2) do { \
11277  const char *pos = lex_p; \
11278  lex_p = (beg); \
11279  mixed_error((enc1), (enc2)); \
11280  lex_p = pos; \
11281  } while (0)
11282 
11283  while ((c = nextc()) != -1) {
11284  if (paren && c == paren) {
11285  ++*nest;
11286  }
11287  else if (c == term) {
11288  if (!nest || !*nest) {
11289  pushback(c);
11290  break;
11291  }
11292  --*nest;
11293  }
11294  else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
11295  int c2 = *lex_p;
11296  if (c2 == '$' || c2 == '@' || c2 == '{') {
11297  pushback(c);
11298  break;
11299  }
11300  }
11301  else if (c == '\\') {
11302  const char *beg = lex_p - 1;
11303  c = nextc();
11304  switch (c) {
11305  case '\n':
11306  if (func & STR_FUNC_QWORDS) break;
11307  if (func & STR_FUNC_EXPAND) continue;
11308  tokadd('\\');
11309  break;
11310 
11311  case '\\':
11312  if (func & STR_FUNC_ESCAPE) tokadd(c);
11313  break;
11314 
11315  case 'u':
11316  if ((func & STR_FUNC_EXPAND) == 0) {
11317  tokadd('\\');
11318  break;
11319  }
11320  parser_tokadd_utf8(parser, &enc, 1,
11321  func & STR_FUNC_SYMBOL,
11322  func & STR_FUNC_REGEXP);
11323  if (has_nonascii && enc != *encp) {
11324  mixed_escape(beg, enc, *encp);
11325  }
11326  continue;
11327 
11328  default:
11329  if (c == -1) return -1;
11330  if (!ISASCII(c)) {
11331  if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\');
11332  goto non_ascii;
11333  }
11334  if (func & STR_FUNC_REGEXP) {
11335  pushback(c);
11336  if ((c = tokadd_escape(&enc)) < 0)
11337  return -1;
11338  if (has_nonascii && enc != *encp) {
11339  mixed_escape(beg, enc, *encp);
11340  }
11341  continue;
11342  }
11343  else if (func & STR_FUNC_EXPAND) {
11344  pushback(c);
11345  if (func & STR_FUNC_ESCAPE) tokadd('\\');
11346  c = read_escape(0, &enc);
11347  }
11348  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
11349  /* ignore backslashed spaces in %w */
11350  }
11351  else if (c != term && !(paren && c == paren)) {
11352  tokadd('\\');
11353  pushback(c);
11354  continue;
11355  }
11356  }
11357  }
11358  else if (!parser_isascii()) {
11359  non_ascii:
11360  has_nonascii = 1;
11361  if (enc != *encp) {
11362  mixed_error(enc, *encp);
11363  continue;
11364  }
11365  if (tokadd_mbchar(c) == -1) return -1;
11366  continue;
11367  }
11368  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
11369  pushback(c);
11370  break;
11371  }
11372  if (c & 0x80) {
11373  has_nonascii = 1;
11374  if (enc != *encp) {
11375  mixed_error(enc, *encp);
11376  continue;
11377  }
11378  }
11379  tokadd(c);
11380  }
11381  *encp = enc;
11382  return c;
11383 }
11384 
11385 #define NEW_STRTERM(func, term, paren) \
11386  rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
11387 
11388 #ifdef RIPPER
11389 static void
11390 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc)
11391 {
11392  if (!NIL_P(parser->delayed)) {
11393  ptrdiff_t len = lex_p - parser->tokp;
11394  if (len > 0) {
11395  rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);
11396  }
11397  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
11398  parser->tokp = lex_p;
11399  }
11400 }
11401 
11402 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc))
11403 #else
11404 #define flush_string_content(enc) ((void)(enc))
11405 #endif
11406 
11407 static int
11408 parser_parse_string(struct parser_params *parser, NODE *quote)
11409 {
11410  int func = (int)quote->nd_func;
11411  int term = nd_term(quote);
11412  int paren = nd_paren(quote);
11413  int c, space = 0;
11414  rb_encoding *enc = parser->enc;
11415 
11416  if (func == -1) return tSTRING_END;
11417  c = nextc();
11418  if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
11419  do {c = nextc();} while (ISSPACE(c));
11420  space = 1;
11421  }
11422  if (c == term && !quote->nd_nest) {
11423  if (func & STR_FUNC_QWORDS) {
11424  quote->nd_func = -1;
11425  return ' ';
11426  }
11427  if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
11429  return tREGEXP_END;
11430  }
11431  if (space) {
11432  pushback(c);
11433  return ' ';
11434  }
11435  newtok();
11436  if ((func & STR_FUNC_EXPAND) && c == '#') {
11437  switch (c = nextc()) {
11438  case '$':
11439  case '@':
11440  pushback(c);
11441  return tSTRING_DVAR;
11442  case '{':
11443  return tSTRING_DBEG;
11444  }
11445  tokadd('#');
11446  }
11447  pushback(c);
11448  if (tokadd_string(func, term, paren, &quote->nd_nest,
11449  &enc) == -1) {
11450  ruby_sourceline = nd_line(quote);
11451  if (func & STR_FUNC_REGEXP) {
11452  if (parser->eofp)
11453  compile_error(PARSER_ARG "unterminated regexp meets end of file");
11454  return tREGEXP_END;
11455  }
11456  else {
11457  if (parser->eofp)
11458  compile_error(PARSER_ARG "unterminated string meets end of file");
11459  return tSTRING_END;
11460  }
11461  }
11462 
11463  tokfix();
11464  set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
11465  flush_string_content(enc);
11466 
11467  return tSTRING_CONTENT;
11468 }
11469 
11470 static int
11472 {
11473  int c = nextc(), term, func = 0;
11474  long len;
11475 
11476  if (c == '-') {
11477  c = nextc();
11478  func = STR_FUNC_INDENT;
11479  }
11480  switch (c) {
11481  case '\'':
11482  func |= str_squote; goto quoted;
11483  case '"':
11484  func |= str_dquote; goto quoted;
11485  case '`':
11486  func |= str_xquote;
11487  quoted:
11488  newtok();
11489  tokadd(func);
11490  term = c;
11491  while ((c = nextc()) != -1 && c != term) {
11492  if (tokadd_mbchar(c) == -1) return 0;
11493  }
11494  if (c == -1) {
11495  compile_error(PARSER_ARG "unterminated here document identifier");
11496  return 0;
11497  }
11498  break;
11499 
11500  default:
11501  if (!parser_is_identchar()) {
11502  pushback(c);
11503  if (func & STR_FUNC_INDENT) {
11504  pushback('-');
11505  }
11506  return 0;
11507  }
11508  newtok();
11509  term = '"';
11510  tokadd(func |= str_dquote);
11511  do {
11512  if (tokadd_mbchar(c) == -1) return 0;
11513  } while ((c = nextc()) != -1 && parser_is_identchar());
11514  pushback(c);
11515  break;
11516  }
11517 
11518  tokfix();
11519 #ifdef RIPPER
11520  ripper_dispatch_scan_event(parser, tHEREDOC_BEG);
11521 #endif
11522  len = lex_p - lex_pbeg;
11523  lex_goto_eol(parser);
11525  STR_NEW(tok(), toklen()), /* nd_lit */
11526  len, /* nd_nth */
11527  lex_lastline); /* nd_orig */
11529  ripper_flush(parser);
11530  return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
11531 }
11532 
11533 static void
11535 {
11536  VALUE line;
11537 
11538  line = here->nd_orig;
11539  lex_lastline = line;
11540  lex_pbeg = RSTRING_PTR(line);
11541  lex_pend = lex_pbeg + RSTRING_LEN(line);
11542  lex_p = lex_pbeg + here->nd_nth;
11544  ruby_sourceline = nd_line(here);
11545  dispose_string(here->nd_lit);
11546  rb_gc_force_recycle((VALUE)here);
11547  ripper_flush(parser);
11548 }
11549 
11550 static int
11552  const char *eos, long len, int indent)
11553 {
11554  const char *p = lex_pbeg;
11555  long n;
11556 
11557  if (indent) {
11558  while (*p && ISSPACE(*p)) p++;
11559  }
11560  n = lex_pend - (p + len);
11561  if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE;
11562  return strncmp(eos, p, len) == 0;
11563 }
11564 
11565 #ifdef RIPPER
11566 static void
11567 ripper_dispatch_heredoc_end(struct parser_params *parser)
11568 {
11569  if (!NIL_P(parser->delayed))
11570  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
11571  lex_goto_eol(parser);
11572  ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END);
11573 }
11574 
11575 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser)
11576 #else
11577 #define dispatch_heredoc_end() ((void)0)
11578 #endif
11579 
11580 static int
11582 {
11583  int c, func, indent = 0;
11584  const char *eos, *p, *pend;
11585  long len;
11586  VALUE str = 0;
11587  rb_encoding *enc = parser->enc;
11588 
11589  eos = RSTRING_PTR(here->nd_lit);
11590  len = RSTRING_LEN(here->nd_lit) - 1;
11591  indent = (func = *eos++) & STR_FUNC_INDENT;
11592 
11593  if ((c = nextc()) == -1) {
11594  error:
11595  compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos);
11596 #ifdef RIPPER
11597  if (NIL_P(parser->delayed)) {
11598  ripper_dispatch_scan_event(parser, tSTRING_CONTENT);
11599  }
11600  else {
11601  if (str ||
11602  ((len = lex_p - parser->tokp) > 0 &&
11603  (str = STR_NEW3(parser->tokp, len, enc, func), 1))) {
11604  rb_str_append(parser->delayed, str);
11605  }
11606  ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
11607  }
11608  lex_goto_eol(parser);
11609 #endif
11610  restore:
11612  lex_strterm = 0;
11613  return 0;
11614  }
11615  if (was_bol() && whole_match_p(eos, len, indent)) {
11618  return tSTRING_END;
11619  }
11620 
11621  if (!(func & STR_FUNC_EXPAND)) {
11622  do {
11624  pend = lex_pend;
11625  if (pend > p) {
11626  switch (pend[-1]) {
11627  case '\n':
11628  if (--pend == p || pend[-1] != '\r') {
11629  pend++;
11630  break;
11631  }
11632  case '\r':
11633  --pend;
11634  }
11635  }
11636  if (str)
11637  rb_str_cat(str, p, pend - p);
11638  else
11639  str = STR_NEW(p, pend - p);
11640  if (pend < lex_pend) rb_str_cat(str, "\n", 1);
11641  lex_goto_eol(parser);
11642  if (nextc() == -1) {
11643  if (str) dispose_string(str);
11644  goto error;
11645  }
11646  } while (!whole_match_p(eos, len, indent));
11647  }
11648  else {
11649  /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
11650  newtok();
11651  if (c == '#') {
11652  switch (c = nextc()) {
11653  case '$':
11654  case '@':
11655  pushback(c);
11656  return tSTRING_DVAR;
11657  case '{':
11658  return tSTRING_DBEG;
11659  }
11660  tokadd('#');
11661  }
11662  do {
11663  pushback(c);
11664  if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) {
11665  if (parser->eofp) goto error;
11666  goto restore;
11667  }
11668  if (c != '\n') {
11669  set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
11670  flush_string_content(enc);
11671  return tSTRING_CONTENT;
11672  }
11673  tokadd(nextc());
11674  /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
11675  if ((c = nextc()) == -1) goto error;
11676  } while (!whole_match_p(eos, len, indent));
11677  str = STR_NEW3(tok(), toklen(), enc, func);
11678  }
11681  lex_strterm = NEW_STRTERM(-1, 0, 0);
11682  set_yylval_str(str);
11683  return tSTRING_CONTENT;
11684 }
11685 
11686 #include "lex.c"
11687 
11688 static void
11690 {
11691 #ifndef RIPPER
11692  rb_warning0("ambiguous first argument; put parentheses or even spaces");
11693 #else
11695 #endif
11696 }
11697 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1)
11698 
11699 static ID
11701 {
11702 #ifndef RIPPER
11703  if (!is_local_id(lhs))
11704  yyerror("formal argument must be local variable");
11705 #endif
11706  shadowing_lvar(lhs);
11707  return lhs;
11708 }
11709 
11710 static int
11711 lvar_defined_gen(struct parser_params *parser, ID id)
11712 {
11713  return (dyna_in_block() && dvar_defined_get(id)) || local_id(id);
11714 }
11715 
11716 /* emacsen -*- hack */
11717 static long
11718 parser_encode_length(struct parser_params *parser, const char *name, long len)
11719 {
11720  long nlen;
11721 
11722  if (len > 5 && name[nlen = len - 5] == '-') {
11723  if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
11724  return nlen;
11725  }
11726  if (len > 4 && name[nlen = len - 4] == '-') {
11727  if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
11728  return nlen;
11729  if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
11730  !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
11731  /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
11732  return nlen;
11733  }
11734  return len;
11735 }
11736 
11737 static void
11738 parser_set_encode(struct parser_params *parser, const char *name)
11739 {
11740  int idx = rb_enc_find_index(name);
11741  rb_encoding *enc;
11742  VALUE excargs[3];
11743 
11744  if (idx < 0) {
11745  excargs[1] = rb_sprintf("unknown encoding name: %s", name);
11746  error:
11747  excargs[0] = rb_eArgError;
11748  excargs[2] = rb_make_backtrace();
11749  rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline));
11750  rb_exc_raise(rb_make_exception(3, excargs));
11751  }
11752  enc = rb_enc_from_index(idx);
11753  if (!rb_enc_asciicompat(enc)) {
11754  excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
11755  goto error;
11756  }
11757  parser->enc = enc;
11758 #ifndef RIPPER
11759  if (ruby_debug_lines) {
11760  long i, n = RARRAY_LEN(ruby_debug_lines);
11761  const VALUE *p = RARRAY_PTR(ruby_debug_lines);
11762  for (i = 0; i < n; ++i) {
11763  rb_enc_associate_index(*p, idx);
11764  }
11765  }
11766 #endif
11767 }
11768 
11769 static int
11771 {
11772  const char *p = lex_pbeg, *pend = lex_p - 1;
11773  if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0;
11774  while (p < pend) {
11775  if (!ISSPACE(*p)) return 0;
11776  p++;
11777  }
11778  return 1;
11779 }
11780 
11781 #ifndef RIPPER
11782 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len);
11783 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val);
11784 
11785 static void
11786 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val)
11787 {
11788  if (!comment_at_top(parser)) {
11789  return;
11790  }
11791  parser_set_encode(parser, val);
11792 }
11793 
11794 static void
11795 parser_set_token_info(struct parser_params *parser, const char *name, const char *val)
11796 {
11797  int *p = &parser->parser_token_info_enabled;
11798 
11799  switch (*val) {
11800  case 't': case 'T':
11801  if (strcasecmp(val, "true") == 0) {
11802  *p = TRUE;
11803  return;
11804  }
11805  break;
11806  case 'f': case 'F':
11807  if (strcasecmp(val, "false") == 0) {
11808  *p = FALSE;
11809  return;
11810  }
11811  break;
11812  }
11813  rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val);
11814 }
11815 
11816 struct magic_comment {
11817  const char *name;
11820 };
11821 
11822 static const struct magic_comment magic_comments[] = {
11825  {"warn_indent", parser_set_token_info},
11826 };
11827 #endif
11828 
11829 static const char *
11830 magic_comment_marker(const char *str, long len)
11831 {
11832  long i = 2;
11833 
11834  while (i < len) {
11835  switch (str[i]) {
11836  case '-':
11837  if (str[i-1] == '*' && str[i-2] == '-') {
11838  return str + i + 1;
11839  }
11840  i += 2;
11841  break;
11842  case '*':
11843  if (i + 1 >= len) return 0;
11844  if (str[i+1] != '-') {
11845  i += 4;
11846  }
11847  else if (str[i-1] != '-') {
11848  i += 2;
11849  }
11850  else {
11851  return str + i + 2;
11852  }
11853  break;
11854  default:
11855  i += 3;
11856  break;
11857  }
11858  }
11859  return 0;
11860 }
11861 
11862 static int
11863 parser_magic_comment(struct parser_params *parser, const char *str, long len)
11864 {
11865  VALUE name = 0, val = 0;
11866  const char *beg, *end, *vbeg, *vend;
11867 #define str_copy(_s, _p, _n) ((_s) \
11868  ? (void)(rb_str_resize((_s), (_n)), \
11869  MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
11870  : (void)((_s) = STR_NEW((_p), (_n))))
11871 
11872  if (len <= 7) return FALSE;
11873  if (!(beg = magic_comment_marker(str, len))) return FALSE;
11874  if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE;
11875  str = beg;
11876  len = end - beg - 3;
11877 
11878  /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
11879  while (len > 0) {
11880 #ifndef RIPPER
11881  const struct magic_comment *p = magic_comments;
11882 #endif
11883  char *s;
11884  int i;
11885  long n = 0;
11886 
11887  for (; len > 0 && *str; str++, --len) {
11888  switch (*str) {
11889  case '\'': case '"': case ':': case ';':
11890  continue;
11891  }
11892  if (!ISSPACE(*str)) break;
11893  }
11894  for (beg = str; len > 0; str++, --len) {
11895  switch (*str) {
11896  case '\'': case '"': case ':': case ';':
11897  break;
11898  default:
11899  if (ISSPACE(*str)) break;
11900  continue;
11901  }
11902  break;
11903  }
11904  for (end = str; len > 0 && ISSPACE(*str); str++, --len);
11905  if (!len) break;
11906  if (*str != ':') continue;
11907 
11908  do str++; while (--len > 0 && ISSPACE(*str));
11909  if (!len) break;
11910  if (*str == '"') {
11911  for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
11912  if (*str == '\\') {
11913  --len;
11914  ++str;
11915  }
11916  }
11917  vend = str;
11918  if (len) {
11919  --len;
11920  ++str;
11921  }
11922  }
11923  else {
11924  for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
11925  vend = str;
11926  }
11927  while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
11928 
11929  n = end - beg;
11930  str_copy(name, beg, n);
11931  s = RSTRING_PTR(name);
11932  for (i = 0; i < n; ++i) {
11933  if (s[i] == '-') s[i] = '_';
11934  }
11935 #ifndef RIPPER
11936  do {
11937  if (STRNCASECMP(p->name, s, n) == 0) {
11938  n = vend - vbeg;
11939  if (p->length) {
11940  n = (*p->length)(parser, vbeg, n);
11941  }
11942  str_copy(val, vbeg, n);
11943  (*p->func)(parser, s, RSTRING_PTR(val));
11944  break;
11945  }
11946  } while (++p < magic_comments + numberof(magic_comments));
11947 #else
11948  dispatch2(magic_comment, name, val);
11949 #endif
11950  }
11951 
11952  return TRUE;
11953 }
11954 
11955 static void
11956 set_file_encoding(struct parser_params *parser, const char *str, const char *send)
11957 {
11958  int sep = 0;
11959  const char *beg = str;
11960  VALUE s;
11961 
11962  for (;;) {
11963  if (send - str <= 6) return;
11964  switch (str[6]) {
11965  case 'C': case 'c': str += 6; continue;
11966  case 'O': case 'o': str += 5; continue;
11967  case 'D': case 'd': str += 4; continue;
11968  case 'I': case 'i': str += 3; continue;
11969  case 'N': case 'n': str += 2; continue;
11970  case 'G': case 'g': str += 1; continue;
11971  case '=': case ':':
11972  sep = 1;
11973  str += 6;
11974  break;
11975  default:
11976  str += 6;
11977  if (ISSPACE(*str)) break;
11978  continue;
11979  }
11980  if (STRNCASECMP(str-6, "coding", 6) == 0) break;
11981  }
11982  for (;;) {
11983  do {
11984  if (++str >= send) return;
11985  } while (ISSPACE(*str));
11986  if (sep) break;
11987  if (*str != '=' && *str != ':') return;
11988  sep = 1;
11989  str++;
11990  }
11991  beg = str;
11992  while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
11993  s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg));
11994  parser_set_encode(parser, RSTRING_PTR(s));
11995  rb_str_resize(s, 0);
11996 }
11997 
11998 static void
12000 {
12001  int c = nextc();
12002  switch (c) {
12003  case '#':
12004  if (peek('!')) parser->has_shebang = 1;
12005  break;
12006  case 0xef: /* UTF-8 BOM marker */
12007  if (lex_pend - lex_p >= 2 &&
12008  (unsigned char)lex_p[0] == 0xbb &&
12009  (unsigned char)lex_p[1] == 0xbf) {
12010  parser->enc = rb_utf8_encoding();
12011  lex_p += 2;
12012  lex_pbeg = lex_p;
12013  return;
12014  }
12015  break;
12016  case EOF:
12017  return;
12018  }
12019  pushback(c);
12020  parser->enc = rb_enc_get(lex_lastline);
12021 }
12022 
12023 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
12024 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN)
12025 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)
12026 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
12027 #define IS_LABEL_POSSIBLE() ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG())
12028 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1))
12029 
12030 #ifndef RIPPER
12031 #define ambiguous_operator(op, syn) ( \
12032  rb_warning0("`"op"' after local variable is interpreted as binary operator"), \
12033  rb_warning0("even though it seems like "syn""))
12034 #else
12035 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn))
12036 #endif
12037 #define warn_balanced(op, syn) ((void) \
12038  (last_state != EXPR_CLASS && last_state != EXPR_DOT && \
12039  last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
12040  last_state != EXPR_ENDARG && \
12041  space_seen && !ISSPACE(c) && \
12042  (ambiguous_operator(op, syn), 0)))
12043 
12044 static int
12046 {
12047  register int c;
12048  int space_seen = 0;
12049  int cmd_state;
12050  enum lex_state_e last_state;
12051  rb_encoding *enc;
12052  int mb;
12053 #ifdef RIPPER
12054  int fallthru = FALSE;
12055 #endif
12056 
12057  if (lex_strterm) {
12058  int token;
12059  if (nd_type(lex_strterm) == NODE_HEREDOC) {
12060  token = here_document(lex_strterm);
12061  if (token == tSTRING_END) {
12062  lex_strterm = 0;
12063  lex_state = EXPR_END;
12064  }
12065  }
12066  else {
12067  token = parse_string(lex_strterm);
12068  if (token == tSTRING_END || token == tREGEXP_END) {
12070  lex_strterm = 0;
12071  lex_state = EXPR_END;
12072  }
12073  }
12074  return token;
12075  }
12076  cmd_state = command_start;
12077  command_start = FALSE;
12078  retry:
12079  last_state = lex_state;
12080  switch (c = nextc()) {
12081  case '\0': /* NUL */
12082  case '\004': /* ^D */
12083  case '\032': /* ^Z */
12084  case -1: /* end of script. */
12085  return 0;
12086 
12087  /* white spaces */
12088  case ' ': case '\t': case '\f': case '\r':
12089  case '\13': /* '\v' */
12090  space_seen = 1;
12091 #ifdef RIPPER
12092  while ((c = nextc())) {
12093  switch (c) {
12094  case ' ': case '\t': case '\f': case '\r':
12095  case '\13': /* '\v' */
12096  break;
12097  default:
12098  goto outofloop;
12099  }
12100  }
12101  outofloop:
12102  pushback(c);
12103  ripper_dispatch_scan_event(parser, tSP);
12104 #endif
12105  goto retry;
12106 
12107  case '#': /* it's a comment */
12108  /* no magic_comment in shebang line */
12109  if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) {
12110  if (comment_at_top(parser)) {
12111  set_file_encoding(parser, lex_p, lex_pend);
12112  }
12113  }
12114  lex_p = lex_pend;
12115 #ifdef RIPPER
12116  ripper_dispatch_scan_event(parser, tCOMMENT);
12117  fallthru = TRUE;
12118 #endif
12119  /* fall through */
12120  case '\n':
12121  switch (lex_state) {
12122  case EXPR_BEG:
12123  case EXPR_FNAME:
12124  case EXPR_DOT:
12125  case EXPR_CLASS:
12126  case EXPR_VALUE:
12127 #ifdef RIPPER
12128  if (!fallthru) {
12129  ripper_dispatch_scan_event(parser, tIGNORED_NL);
12130  }
12131  fallthru = FALSE;
12132 #endif
12133  goto retry;
12134  default:
12135  break;
12136  }
12137  while ((c = nextc())) {
12138  switch (c) {
12139  case ' ': case '\t': case '\f': case '\r':
12140  case '\13': /* '\v' */
12141  space_seen = 1;
12142  break;
12143  case '.': {
12144  if ((c = nextc()) != '.') {
12145  pushback(c);
12146  pushback('.');
12147  goto retry;
12148  }
12149  }
12150  default:
12151  --ruby_sourceline;
12153  case -1: /* EOF no decrement*/
12154  lex_goto_eol(parser);
12155 #ifdef RIPPER
12156  if (c != -1) {
12157  parser->tokp = lex_p;
12158  }
12159 #endif
12160  goto normal_newline;
12161  }
12162  }
12163  normal_newline:
12164  command_start = TRUE;
12165  lex_state = EXPR_BEG;
12166  return '\n';
12167 
12168  case '*':
12169  if ((c = nextc()) == '*') {
12170  if ((c = nextc()) == '=') {
12172  lex_state = EXPR_BEG;
12173  return tOP_ASGN;
12174  }
12175  pushback(c);
12176  c = tPOW;
12177  }
12178  else {
12179  if (c == '=') {
12180  set_yylval_id('*');
12181  lex_state = EXPR_BEG;
12182  return tOP_ASGN;
12183  }
12184  pushback(c);
12185  if (IS_SPCARG(c)) {
12186  rb_warning0("`*' interpreted as argument prefix");
12187  c = tSTAR;
12188  }
12189  else if (IS_BEG()) {
12190  c = tSTAR;
12191  }
12192  else {
12193  warn_balanced("*", "argument prefix");
12194  c = '*';
12195  }
12196  }
12197  switch (lex_state) {
12198  case EXPR_FNAME: case EXPR_DOT:
12199  lex_state = EXPR_ARG; break;
12200  default:
12201  lex_state = EXPR_BEG; break;
12202  }
12203  return c;
12204 
12205  case '!':
12206  c = nextc();
12207  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12208  lex_state = EXPR_ARG;
12209  if (c == '@') {
12210  return '!';
12211  }
12212  }
12213  else {
12214  lex_state = EXPR_BEG;
12215  }
12216  if (c == '=') {
12217  return tNEQ;
12218  }
12219  if (c == '~') {
12220  return tNMATCH;
12221  }
12222  pushback(c);
12223  return '!';
12224 
12225  case '=':
12226  if (was_bol()) {
12227  /* skip embedded rd document */
12228  if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
12229 #ifdef RIPPER
12230  int first_p = TRUE;
12231 
12232  lex_goto_eol(parser);
12233  ripper_dispatch_scan_event(parser, tEMBDOC_BEG);
12234 #endif
12235  for (;;) {
12236  lex_goto_eol(parser);
12237 #ifdef RIPPER
12238  if (!first_p) {
12239  ripper_dispatch_scan_event(parser, tEMBDOC);
12240  }
12241  first_p = FALSE;
12242 #endif
12243  c = nextc();
12244  if (c == -1) {
12245  compile_error(PARSER_ARG "embedded document meets end of file");
12246  return 0;
12247  }
12248  if (c != '=') continue;
12249  if (strncmp(lex_p, "end", 3) == 0 &&
12250  (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
12251  break;
12252  }
12253  }
12254  lex_goto_eol(parser);
12255 #ifdef RIPPER
12256  ripper_dispatch_scan_event(parser, tEMBDOC_END);
12257 #endif
12258  goto retry;
12259  }
12260  }
12261 
12262  switch (lex_state) {
12263  case EXPR_FNAME: case EXPR_DOT:
12264  lex_state = EXPR_ARG; break;
12265  default:
12266  lex_state = EXPR_BEG; break;
12267  }
12268  if ((c = nextc()) == '=') {
12269  if ((c = nextc()) == '=') {
12270  return tEQQ;
12271  }
12272  pushback(c);
12273  return tEQ;
12274  }
12275  if (c == '~') {
12276  return tMATCH;
12277  }
12278  else if (c == '>') {
12279  return tASSOC;
12280  }
12281  pushback(c);
12282  return '=';
12283 
12284  case '<':
12285  last_state = lex_state;
12286  c = nextc();
12287  if (c == '<' &&
12288  lex_state != EXPR_DOT &&
12289  lex_state != EXPR_CLASS &&
12290  !IS_END() &&
12291  (!IS_ARG() || space_seen)) {
12292  int token = heredoc_identifier();
12293  if (token) return token;
12294  }
12295  switch (lex_state) {
12296  case EXPR_FNAME: case EXPR_DOT:
12297  lex_state = EXPR_ARG; break;
12298  default:
12299  lex_state = EXPR_BEG; break;
12300  }
12301  if (c == '=') {
12302  if ((c = nextc()) == '>') {
12303  return tCMP;
12304  }
12305  pushback(c);
12306  return tLEQ;
12307  }
12308  if (c == '<') {
12309  if ((c = nextc()) == '=') {
12311  lex_state = EXPR_BEG;
12312  return tOP_ASGN;
12313  }
12314  pushback(c);
12315  warn_balanced("<<", "here document");
12316  return tLSHFT;
12317  }
12318  pushback(c);
12319  return '<';
12320 
12321  case '>':
12322  switch (lex_state) {
12323  case EXPR_FNAME: case EXPR_DOT:
12324  lex_state = EXPR_ARG; break;
12325  default:
12326  lex_state = EXPR_BEG; break;
12327  }
12328  if ((c = nextc()) == '=') {
12329  return tGEQ;
12330  }
12331  if (c == '>') {
12332  if ((c = nextc()) == '=') {
12334  lex_state = EXPR_BEG;
12335  return tOP_ASGN;
12336  }
12337  pushback(c);
12338  return tRSHFT;
12339  }
12340  pushback(c);
12341  return '>';
12342 
12343  case '"':
12344  lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
12345  return tSTRING_BEG;
12346 
12347  case '`':
12348  if (lex_state == EXPR_FNAME) {
12350  return c;
12351  }
12352  if (lex_state == EXPR_DOT) {
12353  if (cmd_state)
12355  else
12356  lex_state = EXPR_ARG;
12357  return c;
12358  }
12359  lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
12360  return tXSTRING_BEG;
12361 
12362  case '\'':
12363  lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
12364  return tSTRING_BEG;
12365 
12366  case '?':
12367  if (IS_END()) {
12369  return '?';
12370  }
12371  c = nextc();
12372  if (c == -1) {
12373  compile_error(PARSER_ARG "incomplete character syntax");
12374  return 0;
12375  }
12376  if (rb_enc_isspace(c, parser->enc)) {
12377  if (!IS_ARG()) {
12378  int c2 = 0;
12379  switch (c) {
12380  case ' ':
12381  c2 = 's';
12382  break;
12383  case '\n':
12384  c2 = 'n';
12385  break;
12386  case '\t':
12387  c2 = 't';
12388  break;
12389  case '\v':
12390  c2 = 'v';
12391  break;
12392  case '\r':
12393  c2 = 'r';
12394  break;
12395  case '\f':
12396  c2 = 'f';
12397  break;
12398  }
12399  if (c2) {
12400  rb_warnI("invalid character syntax; use ?\\%c", c2);
12401  }
12402  }
12403  ternary:
12404  pushback(c);
12406  return '?';
12407  }
12408  newtok();
12409  enc = parser->enc;
12410  if (!parser_isascii()) {
12411  if (tokadd_mbchar(c) == -1) return 0;
12412  }
12413  else if ((rb_enc_isalnum(c, parser->enc) || c == '_') &&
12414  lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) {
12415  goto ternary;
12416  }
12417  else if (c == '\\') {
12418  if (peek('u')) {
12419  nextc();
12420  c = parser_tokadd_utf8(parser, &enc, 0, 0, 0);
12421  if (0x80 <= c) {
12422  tokaddmbc(c, enc);
12423  }
12424  else {
12425  tokadd(c);
12426  }
12427  }
12428  else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) {
12429  nextc();
12430  if (tokadd_mbchar(c) == -1) return 0;
12431  }
12432  else {
12433  c = read_escape(0, &enc);
12434  tokadd(c);
12435  }
12436  }
12437  else {
12438  tokadd(c);
12439  }
12440  tokfix();
12441  set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0));
12442  lex_state = EXPR_END;
12443  return tCHAR;
12444 
12445  case '&':
12446  if ((c = nextc()) == '&') {
12447  lex_state = EXPR_BEG;
12448  if ((c = nextc()) == '=') {
12450  lex_state = EXPR_BEG;
12451  return tOP_ASGN;
12452  }
12453  pushback(c);
12454  return tANDOP;
12455  }
12456  else if (c == '=') {
12457  set_yylval_id('&');
12458  lex_state = EXPR_BEG;
12459  return tOP_ASGN;
12460  }
12461  pushback(c);
12462  if (IS_SPCARG(c)) {
12463  rb_warning0("`&' interpreted as argument prefix");
12464  c = tAMPER;
12465  }
12466  else if (IS_BEG()) {
12467  c = tAMPER;
12468  }
12469  else {
12470  warn_balanced("&", "argument prefix");
12471  c = '&';
12472  }
12473  switch (lex_state) {
12474  case EXPR_FNAME: case EXPR_DOT:
12475  lex_state = EXPR_ARG; break;
12476  default:
12477  lex_state = EXPR_BEG;
12478  }
12479  return c;
12480 
12481  case '|':
12482  if ((c = nextc()) == '|') {
12483  lex_state = EXPR_BEG;
12484  if ((c = nextc()) == '=') {
12486  lex_state = EXPR_BEG;
12487  return tOP_ASGN;
12488  }
12489  pushback(c);
12490  return tOROP;
12491  }
12492  if (c == '=') {
12493  set_yylval_id('|');
12494  lex_state = EXPR_BEG;
12495  return tOP_ASGN;
12496  }
12497  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12498  lex_state = EXPR_ARG;
12499  }
12500  else {
12501  lex_state = EXPR_BEG;
12502  }
12503  pushback(c);
12504  return '|';
12505 
12506  case '+':
12507  c = nextc();
12508  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12509  lex_state = EXPR_ARG;
12510  if (c == '@') {
12511  return tUPLUS;
12512  }
12513  pushback(c);
12514  return '+';
12515  }
12516  if (c == '=') {
12517  set_yylval_id('+');
12518  lex_state = EXPR_BEG;
12519  return tOP_ASGN;
12520  }
12521  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
12522  lex_state = EXPR_BEG;
12523  pushback(c);
12524  if (c != -1 && ISDIGIT(c)) {
12525  c = '+';
12526  goto start_num;
12527  }
12528  return tUPLUS;
12529  }
12530  lex_state = EXPR_BEG;
12531  pushback(c);
12532  warn_balanced("+", "unary operator");
12533  return '+';
12534 
12535  case '-':
12536  c = nextc();
12537  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12538  lex_state = EXPR_ARG;
12539  if (c == '@') {
12540  return tUMINUS;
12541  }
12542  pushback(c);
12543  return '-';
12544  }
12545  if (c == '=') {
12546  set_yylval_id('-');
12547  lex_state = EXPR_BEG;
12548  return tOP_ASGN;
12549  }
12550  if (c == '>') {
12551  lex_state = EXPR_ARG;
12552  return tLAMBDA;
12553  }
12554  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
12555  lex_state = EXPR_BEG;
12556  pushback(c);
12557  if (c != -1 && ISDIGIT(c)) {
12558  return tUMINUS_NUM;
12559  }
12560  return tUMINUS;
12561  }
12562  lex_state = EXPR_BEG;
12563  pushback(c);
12564  warn_balanced("-", "unary operator");
12565  return '-';
12566 
12567  case '.':
12568  lex_state = EXPR_BEG;
12569  if ((c = nextc()) == '.') {
12570  if ((c = nextc()) == '.') {
12571  return tDOT3;
12572  }
12573  pushback(c);
12574  return tDOT2;
12575  }
12576  pushback(c);
12577  if (c != -1 && ISDIGIT(c)) {
12578  yyerror("no .<digit> floating literal anymore; put 0 before dot");
12579  }
12580  lex_state = EXPR_DOT;
12581  return '.';
12582 
12583  start_num:
12584  case '0': case '1': case '2': case '3': case '4':
12585  case '5': case '6': case '7': case '8': case '9':
12586  {
12587  int is_float, seen_point, seen_e, nondigit;
12588 
12589  is_float = seen_point = seen_e = nondigit = 0;
12590  lex_state = EXPR_END;
12591  newtok();
12592  if (c == '-' || c == '+') {
12593  tokadd(c);
12594  c = nextc();
12595  }
12596  if (c == '0') {
12597 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0)
12598  int start = toklen();
12599  c = nextc();
12600  if (c == 'x' || c == 'X') {
12601  /* hexadecimal */
12602  c = nextc();
12603  if (c != -1 && ISXDIGIT(c)) {
12604  do {
12605  if (c == '_') {
12606  if (nondigit) break;
12607  nondigit = c;
12608  continue;
12609  }
12610  if (!ISXDIGIT(c)) break;
12611  nondigit = 0;
12612  tokadd(c);
12613  } while ((c = nextc()) != -1);
12614  }
12615  pushback(c);
12616  tokfix();
12617  if (toklen() == start) {
12618  no_digits();
12619  }
12620  else if (nondigit) goto trailing_uc;
12622  return tINTEGER;
12623  }
12624  if (c == 'b' || c == 'B') {
12625  /* binary */
12626  c = nextc();
12627  if (c == '0' || c == '1') {
12628  do {
12629  if (c == '_') {
12630  if (nondigit) break;
12631  nondigit = c;
12632  continue;
12633  }
12634  if (c != '0' && c != '1') break;
12635  nondigit = 0;
12636  tokadd(c);
12637  } while ((c = nextc()) != -1);
12638  }
12639  pushback(c);
12640  tokfix();
12641  if (toklen() == start) {
12642  no_digits();
12643  }
12644  else if (nondigit) goto trailing_uc;
12646  return tINTEGER;
12647  }
12648  if (c == 'd' || c == 'D') {
12649  /* decimal */
12650  c = nextc();
12651  if (c != -1 && ISDIGIT(c)) {
12652  do {
12653  if (c == '_') {
12654  if (nondigit) break;
12655  nondigit = c;
12656  continue;
12657  }
12658  if (!ISDIGIT(c)) break;
12659  nondigit = 0;
12660  tokadd(c);
12661  } while ((c = nextc()) != -1);
12662  }
12663  pushback(c);
12664  tokfix();
12665  if (toklen() == start) {
12666  no_digits();
12667  }
12668  else if (nondigit) goto trailing_uc;
12670  return tINTEGER;
12671  }
12672  if (c == '_') {
12673  /* 0_0 */
12674  goto octal_number;
12675  }
12676  if (c == 'o' || c == 'O') {
12677  /* prefixed octal */
12678  c = nextc();
12679  if (c == -1 || c == '_' || !ISDIGIT(c)) {
12680  no_digits();
12681  }
12682  }
12683  if (c >= '0' && c <= '7') {
12684  /* octal */
12685  octal_number:
12686  do {
12687  if (c == '_') {
12688  if (nondigit) break;
12689  nondigit = c;
12690  continue;
12691  }
12692  if (c < '0' || c > '9') break;
12693  if (c > '7') goto invalid_octal;
12694  nondigit = 0;
12695  tokadd(c);
12696  } while ((c = nextc()) != -1);
12697  if (toklen() > start) {
12698  pushback(c);
12699  tokfix();
12700  if (nondigit) goto trailing_uc;
12702  return tINTEGER;
12703  }
12704  if (nondigit) {
12705  pushback(c);
12706  goto trailing_uc;
12707  }
12708  }
12709  if (c > '7' && c <= '9') {
12710  invalid_octal:
12711  yyerror("Invalid octal digit");
12712  }
12713  else if (c == '.' || c == 'e' || c == 'E') {
12714  tokadd('0');
12715  }
12716  else {
12717  pushback(c);
12719  return tINTEGER;
12720  }
12721  }
12722 
12723  for (;;) {
12724  switch (c) {
12725  case '0': case '1': case '2': case '3': case '4':
12726  case '5': case '6': case '7': case '8': case '9':
12727  nondigit = 0;
12728  tokadd(c);
12729  break;
12730 
12731  case '.':
12732  if (nondigit) goto trailing_uc;
12733  if (seen_point || seen_e) {
12734  goto decode_num;
12735  }
12736  else {
12737  int c0 = nextc();
12738  if (c0 == -1 || !ISDIGIT(c0)) {
12739  pushback(c0);
12740  goto decode_num;
12741  }
12742  c = c0;
12743  }
12744  tokadd('.');
12745  tokadd(c);
12746  is_float++;
12747  seen_point++;
12748  nondigit = 0;
12749  break;
12750 
12751  case 'e':
12752  case 'E':
12753  if (nondigit) {
12754  pushback(c);
12755  c = nondigit;
12756  goto decode_num;
12757  }
12758  if (seen_e) {
12759  goto decode_num;
12760  }
12761  tokadd(c);
12762  seen_e++;
12763  is_float++;
12764  nondigit = c;
12765  c = nextc();
12766  if (c != '-' && c != '+') continue;
12767  tokadd(c);
12768  nondigit = c;
12769  break;
12770 
12771  case '_': /* `_' in number just ignored */
12772  if (nondigit) goto decode_num;
12773  nondigit = c;
12774  break;
12775 
12776  default:
12777  goto decode_num;
12778  }
12779  c = nextc();
12780  }
12781 
12782  decode_num:
12783  pushback(c);
12784  if (nondigit) {
12785  char tmp[30];
12786  trailing_uc:
12787  snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit);
12788  yyerror(tmp);
12789  }
12790  tokfix();
12791  if (is_float) {
12792  double d = strtod(tok(), 0);
12793  if (errno == ERANGE) {
12794  rb_warningS("Float %s out of range", tok());
12795  errno = 0;
12796  }
12798  return tFLOAT;
12799  }
12801  return tINTEGER;
12802  }
12803 
12804  case ')':
12805  case ']':
12806  paren_nest--;
12807  case '}':
12808  COND_LEXPOP();
12809  CMDARG_LEXPOP();
12810  if (c == ')')
12812  else
12814  return c;
12815 
12816  case ':':
12817  c = nextc();
12818  if (c == ':') {
12819  if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) {
12820  lex_state = EXPR_BEG;
12821  return tCOLON3;
12822  }
12823  lex_state = EXPR_DOT;
12824  return tCOLON2;
12825  }
12826  if (IS_END() || ISSPACE(c)) {
12827  pushback(c);
12828  warn_balanced(":", "symbol literal");
12829  lex_state = EXPR_BEG;
12830  return ':';
12831  }
12832  switch (c) {
12833  case '\'':
12834  lex_strterm = NEW_STRTERM(str_ssym, c, 0);
12835  break;
12836  case '"':
12837  lex_strterm = NEW_STRTERM(str_dsym, c, 0);
12838  break;
12839  default:
12840  pushback(c);
12841  break;
12842  }
12844  return tSYMBEG;
12845 
12846  case '/':
12847  if (IS_BEG()) {
12848  lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
12849  return tREGEXP_BEG;
12850  }
12851  if ((c = nextc()) == '=') {
12852  set_yylval_id('/');
12853  lex_state = EXPR_BEG;
12854  return tOP_ASGN;
12855  }
12856  pushback(c);
12857  if (IS_SPCARG(c)) {
12858  (void)arg_ambiguous();
12859  lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
12860  return tREGEXP_BEG;
12861  }
12862  switch (lex_state) {
12863  case EXPR_FNAME: case EXPR_DOT:
12864  lex_state = EXPR_ARG; break;
12865  default:
12866  lex_state = EXPR_BEG; break;
12867  }
12868  warn_balanced("/", "regexp literal");
12869  return '/';
12870 
12871  case '^':
12872  if ((c = nextc()) == '=') {
12873  set_yylval_id('^');
12874  lex_state = EXPR_BEG;
12875  return tOP_ASGN;
12876  }
12877  switch (lex_state) {
12878  case EXPR_FNAME: case EXPR_DOT:
12879  lex_state = EXPR_ARG; break;
12880  default:
12881  lex_state = EXPR_BEG; break;
12882  }
12883  pushback(c);
12884  return '^';
12885 
12886  case ';':
12887  lex_state = EXPR_BEG;
12888  command_start = TRUE;
12889  return ';';
12890 
12891  case ',':
12892  lex_state = EXPR_BEG;
12893  return ',';
12894 
12895  case '~':
12896  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12897  if ((c = nextc()) != '@') {
12898  pushback(c);
12899  }
12900  lex_state = EXPR_ARG;
12901  }
12902  else {
12903  lex_state = EXPR_BEG;
12904  }
12905  return '~';
12906 
12907  case '(':
12908  if (IS_BEG()) {
12909  c = tLPAREN;
12910  }
12911  else if (IS_SPCARG(-1)) {
12912  c = tLPAREN_ARG;
12913  }
12914  paren_nest++;
12915  COND_PUSH(0);
12916  CMDARG_PUSH(0);
12917  lex_state = EXPR_BEG;
12918  return c;
12919 
12920  case '[':
12921  paren_nest++;
12922  if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12923  lex_state = EXPR_ARG;
12924  if ((c = nextc()) == ']') {
12925  if ((c = nextc()) == '=') {
12926  return tASET;
12927  }
12928  pushback(c);
12929  return tAREF;
12930  }
12931  pushback(c);
12932  return '[';
12933  }
12934  else if (IS_BEG()) {
12935  c = tLBRACK;
12936  }
12937  else if (IS_ARG() && space_seen) {
12938  c = tLBRACK;
12939  }
12940  lex_state = EXPR_BEG;
12941  COND_PUSH(0);
12942  CMDARG_PUSH(0);
12943  return c;
12944 
12945  case '{':
12946  if (lpar_beg && lpar_beg == paren_nest) {
12947  lex_state = EXPR_BEG;
12948  lpar_beg = 0;
12949  --paren_nest;
12950  COND_PUSH(0);
12951  CMDARG_PUSH(0);
12952  return tLAMBEG;
12953  }
12954  if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN)
12955  c = '{'; /* block (primary) */
12956  else if (lex_state == EXPR_ENDARG)
12957  c = tLBRACE_ARG; /* block (expr) */
12958  else
12959  c = tLBRACE; /* hash */
12960  COND_PUSH(0);
12961  CMDARG_PUSH(0);
12962  lex_state = EXPR_BEG;
12963  if (c != tLBRACE) command_start = TRUE;
12964  return c;
12965 
12966  case '\\':
12967  c = nextc();
12968  if (c == '\n') {
12969  space_seen = 1;
12970 #ifdef RIPPER
12971  ripper_dispatch_scan_event(parser, tSP);
12972 #endif
12973  goto retry; /* skip \\n */
12974  }
12975  pushback(c);
12976  return '\\';
12977 
12978  case '%':
12979  if (IS_BEG()) {
12980  int term;
12981  int paren;
12982 
12983  c = nextc();
12984  quotation:
12985  if (c == -1 || !ISALNUM(c)) {
12986  term = c;
12987  c = 'Q';
12988  }
12989  else {
12990  term = nextc();
12991  if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) {
12992  yyerror("unknown type of %string");
12993  return 0;
12994  }
12995  }
12996  if (c == -1 || term == -1) {
12997  compile_error(PARSER_ARG "unterminated quoted string meets end of file");
12998  return 0;
12999  }
13000  paren = term;
13001  if (term == '(') term = ')';
13002  else if (term == '[') term = ']';
13003  else if (term == '{') term = '}';
13004  else if (term == '<') term = '>';
13005  else paren = 0;
13006 
13007  switch (c) {
13008  case 'Q':
13009  lex_strterm = NEW_STRTERM(str_dquote, term, paren);
13010  return tSTRING_BEG;
13011 
13012  case 'q':
13013  lex_strterm = NEW_STRTERM(str_squote, term, paren);
13014  return tSTRING_BEG;
13015 
13016  case 'W':
13017  lex_strterm = NEW_STRTERM(str_dword, term, paren);
13018  do {c = nextc();} while (ISSPACE(c));
13019  pushback(c);
13020  return tWORDS_BEG;
13021 
13022  case 'w':
13023  lex_strterm = NEW_STRTERM(str_sword, term, paren);
13024  do {c = nextc();} while (ISSPACE(c));
13025  pushback(c);
13026  return tQWORDS_BEG;
13027 
13028  case 'x':
13029  lex_strterm = NEW_STRTERM(str_xquote, term, paren);
13030  return tXSTRING_BEG;
13031 
13032  case 'r':
13033  lex_strterm = NEW_STRTERM(str_regexp, term, paren);
13034  return tREGEXP_BEG;
13035 
13036  case 's':
13037  lex_strterm = NEW_STRTERM(str_ssym, term, paren);
13039  return tSYMBEG;
13040 
13041  default:
13042  yyerror("unknown type of %string");
13043  return 0;
13044  }
13045  }
13046  if ((c = nextc()) == '=') {
13047  set_yylval_id('%');
13048  lex_state = EXPR_BEG;
13049  return tOP_ASGN;
13050  }
13051  if (IS_SPCARG(c)) {
13052  goto quotation;
13053  }
13054  switch (lex_state) {
13055  case EXPR_FNAME: case EXPR_DOT:
13056  lex_state = EXPR_ARG; break;
13057  default:
13058  lex_state = EXPR_BEG; break;
13059  }
13060  pushback(c);
13061  warn_balanced("%%", "string literal");
13062  return '%';
13063 
13064  case '$':
13065  lex_state = EXPR_END;
13066  newtok();
13067  c = nextc();
13068  switch (c) {
13069  case '_': /* $_: last read line string */
13070  c = nextc();
13071  if (parser_is_identchar()) {
13072  tokadd('$');
13073  tokadd('_');
13074  break;
13075  }
13076  pushback(c);
13077  c = '_';
13078  /* fall through */
13079  case '~': /* $~: match-data */
13080  case '*': /* $*: argv */
13081  case '$': /* $$: pid */
13082  case '?': /* $?: last status */
13083  case '!': /* $!: error string */
13084  case '@': /* $@: error position */
13085  case '/': /* $/: input record separator */
13086  case '\\': /* $\: output record separator */
13087  case ';': /* $;: field separator */
13088  case ',': /* $,: output field separator */
13089  case '.': /* $.: last read line number */
13090  case '=': /* $=: ignorecase */
13091  case ':': /* $:: load path */
13092  case '<': /* $<: reading filename */
13093  case '>': /* $>: default output handle */
13094  case '\"': /* $": already loaded files */
13095  tokadd('$');
13096  tokadd(c);
13097  tokfix();
13099  return tGVAR;
13100 
13101  case '-':
13102  tokadd('$');
13103  tokadd(c);
13104  c = nextc();
13105  if (parser_is_identchar()) {
13106  if (tokadd_mbchar(c) == -1) return 0;
13107  }
13108  else {
13109  pushback(c);
13110  }
13111  gvar:
13112  tokfix();
13114  return tGVAR;
13115 
13116  case '&': /* $&: last match */
13117  case '`': /* $`: string before last match */
13118  case '\'': /* $': string after last match */
13119  case '+': /* $+: string matches last paren. */
13120  if (last_state == EXPR_FNAME) {
13121  tokadd('$');
13122  tokadd(c);
13123  goto gvar;
13124  }
13126  return tBACK_REF;
13127 
13128  case '1': case '2': case '3':
13129  case '4': case '5': case '6':
13130  case '7': case '8': case '9':
13131  tokadd('$');
13132  do {
13133  tokadd(c);
13134  c = nextc();
13135  } while (c != -1 && ISDIGIT(c));
13136  pushback(c);
13137  if (last_state == EXPR_FNAME) goto gvar;
13138  tokfix();
13139  set_yylval_node(NEW_NTH_REF(atoi(tok()+1)));
13140  return tNTH_REF;
13141 
13142  default:
13143  if (!parser_is_identchar()) {
13144  pushback(c);
13145  return '$';
13146  }
13147  case '0':
13148  tokadd('$');
13149  }
13150  break;
13151 
13152  case '@':
13153  c = nextc();
13154  newtok();
13155  tokadd('@');
13156  if (c == '@') {
13157  tokadd('@');
13158  c = nextc();
13159  }
13160  if (c != -1 && ISDIGIT(c)) {
13161  if (tokidx == 1) {
13162  compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c);
13163  }
13164  else {
13165  compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c);
13166  }
13167  return 0;
13168  }
13169  if (!parser_is_identchar()) {
13170  pushback(c);
13171  return '@';
13172  }
13173  break;
13174 
13175  case '_':
13176  if (was_bol() && whole_match_p("__END__", 7, 0)) {
13177  ruby__end__seen = 1;
13178  parser->eofp = Qtrue;
13179 #ifndef RIPPER
13180  return -1;
13181 #else
13182  lex_goto_eol(parser);
13183  ripper_dispatch_scan_event(parser, k__END__);
13184  return 0;
13185 #endif
13186  }
13187  newtok();
13188  break;
13189 
13190  default:
13191  if (!parser_is_identchar()) {
13192  rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c);
13193  goto retry;
13194  }
13195 
13196  newtok();
13197  break;
13198  }
13199 
13200  mb = ENC_CODERANGE_7BIT;
13201  do {
13202  if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
13203  if (tokadd_mbchar(c) == -1) return 0;
13204  c = nextc();
13205  } while (parser_is_identchar());
13206  switch (tok()[0]) {
13207  case '@': case '$':
13208  pushback(c);
13209  break;
13210  default:
13211  if ((c == '!' || c == '?') && !peek('=')) {
13212  tokadd(c);
13213  }
13214  else {
13215  pushback(c);
13216  }
13217  }
13218  tokfix();
13219 
13220  {
13221  int result = 0;
13222 
13223  last_state = lex_state;
13224  switch (tok()[0]) {
13225  case '$':
13226  lex_state = EXPR_END;
13227  result = tGVAR;
13228  break;
13229  case '@':
13230  lex_state = EXPR_END;
13231  if (tok()[1] == '@')
13232  result = tCVAR;
13233  else
13234  result = tIVAR;
13235  break;
13236 
13237  default:
13238  if (toklast() == '!' || toklast() == '?') {
13239  result = tFID;
13240  }
13241  else {
13242  if (lex_state == EXPR_FNAME) {
13243  if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
13244  (!peek('=') || (peek_n('>', 1)))) {
13245  result = tIDENTIFIER;
13246  tokadd(c);
13247  tokfix();
13248  }
13249  else {
13250  pushback(c);
13251  }
13252  }
13253  if (result == 0 && ISUPPER(tok()[0])) {
13254  result = tCONSTANT;
13255  }
13256  else {
13257  result = tIDENTIFIER;
13258  }
13259  }
13260 
13261  if (IS_LABEL_POSSIBLE()) {
13262  if (IS_LABEL_SUFFIX(0)) {
13263  lex_state = EXPR_BEG;
13264  nextc();
13266  return tLABEL;
13267  }
13268  }
13269  if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) {
13270  const struct kwtable *kw;
13271 
13272  /* See if it is a reserved word. */
13273  kw = rb_reserved_word(tok(), toklen());
13274  if (kw) {
13275  enum lex_state_e state = lex_state;
13276  lex_state = kw->state;
13277  if (state == EXPR_FNAME) {
13279  return kw->id[0];
13280  }
13281  if (kw->id[0] == keyword_do) {
13282  command_start = TRUE;
13283  if (lpar_beg && lpar_beg == paren_nest) {
13284  lpar_beg = 0;
13285  --paren_nest;
13286  return keyword_do_LAMBDA;
13287  }
13288  if (COND_P()) return keyword_do_cond;
13289  if (CMDARG_P() && state != EXPR_CMDARG)
13290  return keyword_do_block;
13291  if (state == EXPR_ENDARG || state == EXPR_BEG)
13292  return keyword_do_block;
13293  return keyword_do;
13294  }
13295  if (state == EXPR_BEG || state == EXPR_VALUE)
13296  return kw->id[0];
13297  else {
13298  if (kw->id[0] != kw->id[1])
13299  lex_state = EXPR_BEG;
13300  return kw->id[1];
13301  }
13302  }
13303  }
13304 
13305  if (IS_BEG() ||
13306  lex_state == EXPR_DOT ||
13307  IS_ARG()) {
13308  if (cmd_state) {
13310  }
13311  else {
13312  lex_state = EXPR_ARG;
13313  }
13314  }
13315  else if (lex_state == EXPR_FNAME) {
13317  }
13318  else {
13319  lex_state = EXPR_END;
13320  }
13321  }
13322  {
13323  ID ident = TOK_INTERN(!ENC_SINGLE(mb));
13324 
13325  set_yylval_name(ident);
13326  if (last_state != EXPR_DOT && last_state != EXPR_FNAME &&
13327  is_local_id(ident) && lvar_defined(ident)) {
13328  lex_state = EXPR_END;
13329  }
13330  }
13331  return result;
13332  }
13333 }
13334 
13335 #if YYPURE
13336 static int
13337 yylex(void *lval, void *p)
13338 #else
13339 yylex(void *p)
13340 #endif
13341 {
13342  struct parser_params *parser = (struct parser_params*)p;
13343  int t;
13344 
13345 #if YYPURE
13346  parser->parser_yylval = lval;
13347  parser->parser_yylval->val = Qundef;
13348 #endif
13349  t = parser_yylex(parser);
13350 #ifdef RIPPER
13351  if (!NIL_P(parser->delayed)) {
13352  ripper_dispatch_delayed_token(parser, t);
13353  return t;
13354  }
13355  if (t != 0)
13356  ripper_dispatch_scan_event(parser, t);
13357 #endif
13358 
13359  return t;
13360 }
13361 
13362 #ifndef RIPPER
13363 static NODE*
13364 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
13365 {
13366  NODE *n = (rb_node_newnode)(type, a0, a1, a2);
13368  return n;
13369 }
13370 
13371 enum node_type
13372 nodetype(NODE *node) /* for debug */
13373 {
13374  return (enum node_type)nd_type(node);
13375 }
13376 
13377 int
13379 {
13380  return nd_line(node);
13381 }
13382 
13383 static NODE*
13385 {
13386  if (node) {
13387  node = remove_begin(node);
13388  node->flags |= NODE_FL_NEWLINE;
13389  }
13390  return node;
13391 }
13392 
13393 static void
13394 fixpos(NODE *node, NODE *orig)
13395 {
13396  if (!node) return;
13397  if (!orig) return;
13398  if (orig == (NODE*)1) return;
13399  nd_set_line(node, nd_line(orig));
13400 }
13401 
13402 static void
13403 parser_warning(struct parser_params *parser, NODE *node, const char *mesg)
13404 {
13405  rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg);
13406 }
13407 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg))
13408 
13409 static void
13410 parser_warn(struct parser_params *parser, NODE *node, const char *mesg)
13411 {
13412  rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg);
13413 }
13414 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg))
13415 
13416 static NODE*
13417 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail)
13418 {
13419  NODE *end, *h = head, *nd;
13420 
13421  if (tail == 0) return head;
13422 
13423  if (h == 0) return tail;
13424  switch (nd_type(h)) {
13425  case NODE_LIT:
13426  case NODE_STR:
13427  case NODE_SELF:
13428  case NODE_TRUE:
13429  case NODE_FALSE:
13430  case NODE_NIL:
13431  parser_warning(h, "unused literal ignored");
13432  return tail;
13433  default:
13434  h = end = NEW_BLOCK(head);
13435  end->nd_end = end;
13436  fixpos(end, head);
13437  head = end;
13438  break;
13439  case NODE_BLOCK:
13440  end = h->nd_end;
13441  break;
13442  }
13443 
13444  nd = end->nd_head;
13445  switch (nd_type(nd)) {
13446  case NODE_RETURN:
13447  case NODE_BREAK:
13448  case NODE_NEXT:
13449  case NODE_REDO:
13450  case NODE_RETRY:
13451  if (RTEST(ruby_verbose)) {
13452  parser_warning(nd, "statement not reached");
13453  }
13454  break;
13455 
13456  default:
13457  break;
13458  }
13459 
13460  if (nd_type(tail) != NODE_BLOCK) {
13461  tail = NEW_BLOCK(tail);
13462  tail->nd_end = tail;
13463  }
13464  end->nd_next = tail;
13465  h->nd_end = tail->nd_end;
13466  return head;
13467 }
13468 
13469 /* append item to the list */
13470 static NODE*
13471 list_append_gen(struct parser_params *parser, NODE *list, NODE *item)
13472 {
13473  NODE *last;
13474 
13475  if (list == 0) return NEW_LIST(item);
13476  if (list->nd_next) {
13477  last = list->nd_next->nd_end;
13478  }
13479  else {
13480  last = list;
13481  }
13482 
13483  list->nd_alen += 1;
13484  last->nd_next = NEW_LIST(item);
13485  list->nd_next->nd_end = last->nd_next;
13486  return list;
13487 }
13488 
13489 /* concat two lists */
13490 static NODE*
13491 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
13492 {
13493  NODE *last;
13494 
13495  if (head->nd_next) {
13496  last = head->nd_next->nd_end;
13497  }
13498  else {
13499  last = head;
13500  }
13501 
13502  head->nd_alen += tail->nd_alen;
13503  last->nd_next = tail;
13504  if (tail->nd_next) {
13505  head->nd_next->nd_end = tail->nd_next->nd_end;
13506  }
13507  else {
13508  head->nd_next->nd_end = tail;
13509  }
13510 
13511  return head;
13512 }
13513 
13514 static int
13515 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail)
13516 {
13517  if (NIL_P(tail)) return 1;
13518  if (!rb_enc_compatible(head, tail)) {
13519  compile_error(PARSER_ARG "string literal encodings differ (%s / %s)",
13520  rb_enc_name(rb_enc_get(head)),
13521  rb_enc_name(rb_enc_get(tail)));
13522  rb_str_resize(head, 0);
13523  rb_str_resize(tail, 0);
13524  return 0;
13525  }
13526  rb_str_buf_append(head, tail);
13527  return 1;
13528 }
13529 
13530 /* concat two string literals */
13531 static NODE *
13532 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
13533 {
13534  enum node_type htype;
13535 
13536  if (!head) return tail;
13537  if (!tail) return head;
13538 
13539  htype = nd_type(head);
13540  if (htype == NODE_EVSTR) {
13541  NODE *node = NEW_DSTR(Qnil);
13542  head = list_append(node, head);
13543  }
13544  switch (nd_type(tail)) {
13545  case NODE_STR:
13546  if (htype == NODE_STR) {
13547  if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) {
13548  error:
13549  rb_gc_force_recycle((VALUE)head);
13550  rb_gc_force_recycle((VALUE)tail);
13551  return 0;
13552  }
13553  rb_gc_force_recycle((VALUE)tail);
13554  }
13555  else {
13556  list_append(head, tail);
13557  }
13558  break;
13559 
13560  case NODE_DSTR:
13561  if (htype == NODE_STR) {
13562  if (!literal_concat0(parser, head->nd_lit, tail->nd_lit))
13563  goto error;
13564  tail->nd_lit = head->nd_lit;
13565  rb_gc_force_recycle((VALUE)head);
13566  head = tail;
13567  }
13568  else if (NIL_P(tail->nd_lit)) {
13569  head->nd_alen += tail->nd_alen - 1;
13570  head->nd_next->nd_end->nd_next = tail->nd_next;
13571  head->nd_next->nd_end = tail->nd_next->nd_end;
13572  rb_gc_force_recycle((VALUE)tail);
13573  }
13574  else {
13575  nd_set_type(tail, NODE_ARRAY);
13576  tail->nd_head = NEW_STR(tail->nd_lit);
13577  list_concat(head, tail);
13578  }
13579  break;
13580 
13581  case NODE_EVSTR:
13582  if (htype == NODE_STR) {
13583  nd_set_type(head, NODE_DSTR);
13584  head->nd_alen = 1;
13585  }
13586  list_append(head, tail);
13587  break;
13588  }
13589  return head;
13590 }
13591 
13592 static NODE *
13593 evstr2dstr_gen(struct parser_params *parser, NODE *node)
13594 {
13595  if (nd_type(node) == NODE_EVSTR) {
13596  node = list_append(NEW_DSTR(Qnil), node);
13597  }
13598  return node;
13599 }
13600 
13601 static NODE *
13602 new_evstr_gen(struct parser_params *parser, NODE *node)
13603 {
13604  NODE *head = node;
13605 
13606  if (node) {
13607  switch (nd_type(node)) {
13608  case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
13609  return node;
13610  }
13611  }
13612  return NEW_EVSTR(head);
13613 }
13614 
13615 static NODE *
13616 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1)
13617 {
13618  value_expr(recv);
13619  value_expr(arg1);
13620  return NEW_CALL(recv, id, NEW_LIST(arg1));
13621 }
13622 
13623 static NODE *
13624 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id)
13625 {
13626  value_expr(recv);
13627  return NEW_CALL(recv, id, 0);
13628 }
13629 
13630 static NODE*
13631 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2)
13632 {
13633  value_expr(node1);
13634  value_expr(node2);
13635  if (node1) {
13636  switch (nd_type(node1)) {
13637  case NODE_DREGX:
13638  case NODE_DREGX_ONCE:
13639  return NEW_MATCH2(node1, node2);
13640 
13641  case NODE_LIT:
13642  if (TYPE(node1->nd_lit) == T_REGEXP) {
13643  return NEW_MATCH2(node1, node2);
13644  }
13645  }
13646  }
13647 
13648  if (node2) {
13649  switch (nd_type(node2)) {
13650  case NODE_DREGX:
13651  case NODE_DREGX_ONCE:
13652  return NEW_MATCH3(node2, node1);
13653 
13654  case NODE_LIT:
13655  if (TYPE(node2->nd_lit) == T_REGEXP) {
13656  return NEW_MATCH3(node2, node1);
13657  }
13658  }
13659  }
13660 
13661  return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
13662 }
13663 
13664 static NODE*
13665 gettable_gen(struct parser_params *parser, ID id)
13666 {
13667  if (id == keyword_self) {
13668  return NEW_SELF();
13669  }
13670  else if (id == keyword_nil) {
13671  return NEW_NIL();
13672  }
13673  else if (id == keyword_true) {
13674  return NEW_TRUE();
13675  }
13676  else if (id == keyword_false) {
13677  return NEW_FALSE();
13678  }
13679  else if (id == keyword__FILE__) {
13682  }
13683  else if (id == keyword__LINE__) {
13684  return NEW_LIT(INT2FIX(ruby_sourceline));
13685  }
13686  else if (id == keyword__ENCODING__) {
13687  return NEW_LIT(rb_enc_from_encoding(parser->enc));
13688  }
13689  else if (is_local_id(id)) {
13690  if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id);
13691  if (local_id(id)) return NEW_LVAR(id);
13692  /* method call without arguments */
13693  return NEW_VCALL(id);
13694  }
13695  else if (is_global_id(id)) {
13696  return NEW_GVAR(id);
13697  }
13698  else if (is_instance_id(id)) {
13699  return NEW_IVAR(id);
13700  }
13701  else if (is_const_id(id)) {
13702  return NEW_CONST(id);
13703  }
13704  else if (is_class_id(id)) {
13705  return NEW_CVAR(id);
13706  }
13707  compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
13708  return 0;
13709 }
13710 #else /* !RIPPER */
13711 static int
13712 id_is_var_gen(struct parser_params *parser, ID id)
13713 {
13714  if (is_notop_id(id)) {
13715  switch (id & ID_SCOPE_MASK) {
13716  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
13717  return 1;
13718  case ID_LOCAL:
13719  if (dyna_in_block() && dvar_defined(id)) return 1;
13720  if (local_id(id)) return 1;
13721  /* method call without arguments */
13722  return 0;
13723  }
13724  }
13725  compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
13726  return 0;
13727 }
13728 #endif /* !RIPPER */
13729 
13730 #ifdef RIPPER
13731 static VALUE
13732 assignable_gen(struct parser_params *parser, VALUE lhs)
13733 #else
13734 static NODE*
13735 assignable_gen(struct parser_params *parser, ID id, NODE *val)
13736 #endif
13737 {
13738 #ifdef RIPPER
13739  ID id = get_id(lhs);
13740 # define assignable_result(x) get_value(lhs)
13741 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs)
13742 #else
13743 # define assignable_result(x) (x)
13744 #endif
13745  if (!id) return assignable_result(0);
13746  if (id == keyword_self) {
13747  yyerror("Can't change the value of self");
13748  }
13749  else if (id == keyword_nil) {
13750  yyerror("Can't assign to nil");
13751  }
13752  else if (id == keyword_true) {
13753  yyerror("Can't assign to true");
13754  }
13755  else if (id == keyword_false) {
13756  yyerror("Can't assign to false");
13757  }
13758  else if (id == keyword__FILE__) {
13759  yyerror("Can't assign to __FILE__");
13760  }
13761  else if (id == keyword__LINE__) {
13762  yyerror("Can't assign to __LINE__");
13763  }
13764  else if (id == keyword__ENCODING__) {
13765  yyerror("Can't assign to __ENCODING__");
13766  }
13767  else if (is_local_id(id)) {
13768  if (dyna_in_block()) {
13769  if (dvar_curr(id)) {
13770  return assignable_result(NEW_DASGN_CURR(id, val));
13771  }
13772  else if (dvar_defined(id)) {
13773  return assignable_result(NEW_DASGN(id, val));
13774  }
13775  else if (local_id(id)) {
13776  return assignable_result(NEW_LASGN(id, val));
13777  }
13778  else {
13779  dyna_var(id);
13780  return assignable_result(NEW_DASGN_CURR(id, val));
13781  }
13782  }
13783  else {
13784  if (!local_id(id)) {
13785  local_var(id);
13786  }
13787  return assignable_result(NEW_LASGN(id, val));
13788  }
13789  }
13790  else if (is_global_id(id)) {
13791  return assignable_result(NEW_GASGN(id, val));
13792  }
13793  else if (is_instance_id(id)) {
13794  return assignable_result(NEW_IASGN(id, val));
13795  }
13796  else if (is_const_id(id)) {
13797  if (!in_def && !in_single)
13798  return assignable_result(NEW_CDECL(id, val, 0));
13799  yyerror("dynamic constant assignment");
13800  }
13801  else if (is_class_id(id)) {
13802  return assignable_result(NEW_CVASGN(id, val));
13803  }
13804  else {
13805  compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id));
13806  }
13807  return assignable_result(0);
13808 #undef assignable_result
13809 #undef parser_yyerror
13810 }
13811 
13812 #define LVAR_USED ((int)1 << (sizeof(int) * CHAR_BIT - 1))
13813 
13814 static ID
13815 shadowing_lvar_gen(struct parser_params *parser, ID name)
13816 {
13817  if (idUScore == name) return name;
13818  if (dyna_in_block()) {
13819  if (dvar_curr(name)) {
13820  yyerror("duplicated argument name");
13821  }
13822  else if (dvar_defined_get(name) || local_id(name)) {
13823  rb_warningS("shadowing outer local variable - %s", rb_id2name(name));
13824  vtable_add(lvtbl->vars, name);
13825  if (lvtbl->used) {
13827  }
13828  }
13829  }
13830  else {
13831  if (local_id(name)) {
13832  yyerror("duplicated argument name");
13833  }
13834  }
13835  return name;
13836 }
13837 
13838 static void
13839 new_bv_gen(struct parser_params *parser, ID name)
13840 {
13841  if (!name) return;
13842  if (!is_local_id(name)) {
13843  compile_error(PARSER_ARG "invalid local variable - %s",
13844  rb_id2name(name));
13845  return;
13846  }
13847  shadowing_lvar(name);
13848  dyna_var(name);
13849 }
13850 
13851 #ifndef RIPPER
13852 static NODE *
13853 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx)
13854 {
13855  if (recv && nd_type(recv) == NODE_SELF)
13856  recv = (NODE *)1;
13857  return NEW_ATTRASGN(recv, tASET, idx);
13858 }
13859 
13860 static void
13861 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2)
13862 {
13863  if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
13864  compile_error(PARSER_ARG "both block arg and actual block given");
13865  }
13866 }
13867 
13868 ID
13870 {
13871  id &= ~ID_SCOPE_MASK;
13872  id |= ID_ATTRSET;
13873  return id;
13874 }
13875 
13876 static NODE *
13877 attrset_gen(struct parser_params *parser, NODE *recv, ID id)
13878 {
13879  if (recv && nd_type(recv) == NODE_SELF)
13880  recv = (NODE *)1;
13881  return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
13882 }
13883 
13884 static void
13886 {
13887  switch (nd_type(node)) {
13888  case NODE_NTH_REF:
13889  compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth);
13890  break;
13891  case NODE_BACK_REF:
13892  compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth);
13893  break;
13894  }
13895 }
13896 
13897 static NODE *
13898 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2)
13899 {
13900  if (!node2) return node1;
13901  switch (nd_type(node1)) {
13902  case NODE_BLOCK_PASS:
13903  if (node1->nd_head)
13904  node1->nd_head = arg_concat(node1->nd_head, node2);
13905  else
13906  node1->nd_head = NEW_LIST(node2);
13907  return node1;
13908  case NODE_ARGSPUSH:
13909  if (nd_type(node2) != NODE_ARRAY) break;
13910  node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2);
13911  nd_set_type(node1, NODE_ARGSCAT);
13912  return node1;
13913  case NODE_ARGSCAT:
13914  if (nd_type(node2) != NODE_ARRAY ||
13915  nd_type(node1->nd_body) != NODE_ARRAY) break;
13916  node1->nd_body = list_concat(node1->nd_body, node2);
13917  return node1;
13918  }
13919  return NEW_ARGSCAT(node1, node2);
13920 }
13921 
13922 static NODE *
13923 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2)
13924 {
13925  if (!node1) return NEW_LIST(node2);
13926  switch (nd_type(node1)) {
13927  case NODE_ARRAY:
13928  return list_append(node1, node2);
13929  case NODE_BLOCK_PASS:
13930  node1->nd_head = arg_append(node1->nd_head, node2);
13931  return node1;
13932  case NODE_ARGSPUSH:
13933  node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2);
13934  nd_set_type(node1, NODE_ARGSCAT);
13935  return node1;
13936  }
13937  return NEW_ARGSPUSH(node1, node2);
13938 }
13939 
13940 static NODE *
13942 {
13943  if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
13944  if (nd_type(node) == NODE_ARRAY) return node;
13945  return 0;
13946 }
13947 
13948 static NODE *
13949 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs)
13950 {
13951  if (!lhs) return 0;
13952 
13953  switch (nd_type(lhs)) {
13954  case NODE_GASGN:
13955  case NODE_IASGN:
13956  case NODE_IASGN2:
13957  case NODE_LASGN:
13958  case NODE_DASGN:
13959  case NODE_DASGN_CURR:
13960  case NODE_MASGN:
13961  case NODE_CDECL:
13962  case NODE_CVASGN:
13963  lhs->nd_value = rhs;
13964  break;
13965 
13966  case NODE_ATTRASGN:
13967  case NODE_CALL:
13968  lhs->nd_args = arg_append(lhs->nd_args, rhs);
13969  break;
13970 
13971  default:
13972  /* should not happen */
13973  break;
13974  }
13975 
13976  return lhs;
13977 }
13978 
13979 static int
13980 value_expr_gen(struct parser_params *parser, NODE *node)
13981 {
13982  int cond = 0;
13983 
13984  if (!node) {
13985  rb_warning0("empty expression");
13986  }
13987  while (node) {
13988  switch (nd_type(node)) {
13989  case NODE_DEFN:
13990  case NODE_DEFS:
13991  parser_warning(node, "void value expression");
13992  return FALSE;
13993 
13994  case NODE_RETURN:
13995  case NODE_BREAK:
13996  case NODE_NEXT:
13997  case NODE_REDO:
13998  case NODE_RETRY:
13999  if (!cond) yyerror("void value expression");
14000  /* or "control never reach"? */
14001  return FALSE;
14002 
14003  case NODE_BLOCK:
14004  while (node->nd_next) {
14005  node = node->nd_next;
14006  }
14007  node = node->nd_head;
14008  break;
14009 
14010  case NODE_BEGIN:
14011  node = node->nd_body;
14012  break;
14013 
14014  case NODE_IF:
14015  if (!node->nd_body) {
14016  node = node->nd_else;
14017  break;
14018  }
14019  else if (!node->nd_else) {
14020  node = node->nd_body;
14021  break;
14022  }
14023  if (!value_expr(node->nd_body)) return FALSE;
14024  node = node->nd_else;
14025  break;
14026 
14027  case NODE_AND:
14028  case NODE_OR:
14029  cond = 1;
14030  node = node->nd_2nd;
14031  break;
14032 
14033  default:
14034  return TRUE;
14035  }
14036  }
14037 
14038  return TRUE;
14039 }
14040 
14041 static void
14042 void_expr_gen(struct parser_params *parser, NODE *node)
14043 {
14044  const char *useless = 0;
14045 
14046  if (!RTEST(ruby_verbose)) return;
14047 
14048  if (!node) return;
14049  switch (nd_type(node)) {
14050  case NODE_CALL:
14051  switch (node->nd_mid) {
14052  case '+':
14053  case '-':
14054  case '*':
14055  case '/':
14056  case '%':
14057  case tPOW:
14058  case tUPLUS:
14059  case tUMINUS:
14060  case '|':
14061  case '^':
14062  case '&':
14063  case tCMP:
14064  case '>':
14065  case tGEQ:
14066  case '<':
14067  case tLEQ:
14068  case tEQ:
14069  case tNEQ:
14070  useless = rb_id2name(node->nd_mid);
14071  break;
14072  }
14073  break;
14074 
14075  case NODE_LVAR:
14076  case NODE_DVAR:
14077  case NODE_GVAR:
14078  case NODE_IVAR:
14079  case NODE_CVAR:
14080  case NODE_NTH_REF:
14081  case NODE_BACK_REF:
14082  useless = "a variable";
14083  break;
14084  case NODE_CONST:
14085  useless = "a constant";
14086  break;
14087  case NODE_LIT:
14088  case NODE_STR:
14089  case NODE_DSTR:
14090  case NODE_DREGX:
14091  case NODE_DREGX_ONCE:
14092  useless = "a literal";
14093  break;
14094  case NODE_COLON2:
14095  case NODE_COLON3:
14096  useless = "::";
14097  break;
14098  case NODE_DOT2:
14099  useless = "..";
14100  break;
14101  case NODE_DOT3:
14102  useless = "...";
14103  break;
14104  case NODE_SELF:
14105  useless = "self";
14106  break;
14107  case NODE_NIL:
14108  useless = "nil";
14109  break;
14110  case NODE_TRUE:
14111  useless = "true";
14112  break;
14113  case NODE_FALSE:
14114  useless = "false";
14115  break;
14116  case NODE_DEFINED:
14117  useless = "defined?";
14118  break;
14119  }
14120 
14121  if (useless) {
14122  int line = ruby_sourceline;
14123 
14124  ruby_sourceline = nd_line(node);
14125  rb_warnS("possibly useless use of %s in void context", useless);
14126  ruby_sourceline = line;
14127  }
14128 }
14129 
14130 static void
14131 void_stmts_gen(struct parser_params *parser, NODE *node)
14132 {
14133  if (!RTEST(ruby_verbose)) return;
14134  if (!node) return;
14135  if (nd_type(node) != NODE_BLOCK) return;
14136 
14137  for (;;) {
14138  if (!node->nd_next) return;
14139  void_expr0(node->nd_head);
14140  node = node->nd_next;
14141  }
14142 }
14143 
14144 static NODE *
14146 {
14147  NODE **n = &node, *n1 = node;
14148  while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
14149  *n = n1 = n1->nd_body;
14150  }
14151  return node;
14152 }
14153 
14154 static void
14155 reduce_nodes_gen(struct parser_params *parser, NODE **body)
14156 {
14157  NODE *node = *body;
14158 
14159  if (!node) {
14160  *body = NEW_NIL();
14161  return;
14162  }
14163 #define subnodes(n1, n2) \
14164  ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
14165  (!node->n2) ? (body = &node->n1, 1) : \
14166  (reduce_nodes(&node->n1), body = &node->n2, 1))
14167 
14168  while (node) {
14169  int newline = (int)(node->flags & NODE_FL_NEWLINE);
14170  switch (nd_type(node)) {
14171  end:
14172  case NODE_NIL:
14173  *body = 0;
14174  return;
14175  case NODE_RETURN:
14176  *body = node = node->nd_stts;
14177  if (newline && node) node->flags |= NODE_FL_NEWLINE;
14178  continue;
14179  case NODE_BEGIN:
14180  *body = node = node->nd_body;
14181  if (newline && node) node->flags |= NODE_FL_NEWLINE;
14182  continue;
14183  case NODE_BLOCK:
14184  body = &node->nd_end->nd_head;
14185  break;
14186  case NODE_IF:
14187  if (subnodes(nd_body, nd_else)) break;
14188  return;
14189  case NODE_CASE:
14190  body = &node->nd_body;
14191  break;
14192  case NODE_WHEN:
14193  if (!subnodes(nd_body, nd_next)) goto end;
14194  break;
14195  case NODE_ENSURE:
14196  if (!subnodes(nd_head, nd_resq)) goto end;
14197  break;
14198  case NODE_RESCUE:
14199  if (node->nd_else) {
14200  body = &node->nd_resq;
14201  break;
14202  }
14203  if (!subnodes(nd_head, nd_resq)) goto end;
14204  break;
14205  default:
14206  return;
14207  }
14208  node = *body;
14209  if (newline && node) node->flags |= NODE_FL_NEWLINE;
14210  }
14211 
14212 #undef subnodes
14213 }
14214 
14215 static int
14216 assign_in_cond(struct parser_params *parser, NODE *node)
14217 {
14218  switch (nd_type(node)) {
14219  case NODE_MASGN:
14220  yyerror("multiple assignment in conditional");
14221  return 1;
14222 
14223  case NODE_LASGN:
14224  case NODE_DASGN:
14225  case NODE_DASGN_CURR:
14226  case NODE_GASGN:
14227  case NODE_IASGN:
14228  break;
14229 
14230  default:
14231  return 0;
14232  }
14233 
14234  if (!node->nd_value) return 1;
14235  switch (nd_type(node->nd_value)) {
14236  case NODE_LIT:
14237  case NODE_STR:
14238  case NODE_NIL:
14239  case NODE_TRUE:
14240  case NODE_FALSE:
14241  /* reports always */
14242  parser_warn(node->nd_value, "found = in conditional, should be ==");
14243  return 1;
14244 
14245  case NODE_DSTR:
14246  case NODE_XSTR:
14247  case NODE_DXSTR:
14248  case NODE_EVSTR:
14249  case NODE_DREGX:
14250  default:
14251  break;
14252  }
14253  return 1;
14254 }
14255 
14256 static void
14257 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
14258 {
14259  if (!e_option_supplied(parser)) parser_warn(node, str);
14260 }
14261 
14262 static void
14263 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
14264 {
14265  if (!e_option_supplied(parser)) parser_warning(node, str);
14266 }
14267 
14268 static void
14269 fixup_nodes(NODE **rootnode)
14270 {
14271  NODE *node, *next, *head;
14272 
14273  for (node = *rootnode; node; node = next) {
14274  enum node_type type;
14275  VALUE val;
14276 
14277  next = node->nd_next;
14278  head = node->nd_head;
14279  rb_gc_force_recycle((VALUE)node);
14280  *rootnode = next;
14281  switch (type = nd_type(head)) {
14282  case NODE_DOT2:
14283  case NODE_DOT3:
14284  val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit,
14285  type == NODE_DOT3);
14286  rb_gc_force_recycle((VALUE)head->nd_beg);
14287  rb_gc_force_recycle((VALUE)head->nd_end);
14288  nd_set_type(head, NODE_LIT);
14289  head->nd_lit = val;
14290  break;
14291  default:
14292  break;
14293  }
14294  }
14295 }
14296 
14297 static NODE *cond0(struct parser_params*,NODE*);
14298 
14299 static NODE*
14300 range_op(struct parser_params *parser, NODE *node)
14301 {
14302  enum node_type type;
14303 
14304  if (node == 0) return 0;
14305 
14306  type = nd_type(node);
14307  value_expr(node);
14308  if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
14309  warn_unless_e_option(parser, node, "integer literal in conditional range");
14310  return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."))));
14311  }
14312  return cond0(parser, node);
14313 }
14314 
14315 static int
14317 {
14318  if (!node) return 1; /* same as NODE_NIL */
14319  switch (nd_type(node)) {
14320  case NODE_LIT:
14321  case NODE_STR:
14322  case NODE_DSTR:
14323  case NODE_EVSTR:
14324  case NODE_DREGX:
14325  case NODE_DREGX_ONCE:
14326  case NODE_DSYM:
14327  return 2;
14328  case NODE_TRUE:
14329  case NODE_FALSE:
14330  case NODE_NIL:
14331  return 1;
14332  }
14333  return 0;
14334 }
14335 
14336 static NODE*
14337 cond0(struct parser_params *parser, NODE *node)
14338 {
14339  if (node == 0) return 0;
14340  assign_in_cond(parser, node);
14341 
14342  switch (nd_type(node)) {
14343  case NODE_DSTR:
14344  case NODE_EVSTR:
14345  case NODE_STR:
14346  rb_warn0("string literal in condition");
14347  break;
14348 
14349  case NODE_DREGX:
14350  case NODE_DREGX_ONCE:
14351  warning_unless_e_option(parser, node, "regex literal in condition");
14352  return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
14353 
14354  case NODE_AND:
14355  case NODE_OR:
14356  node->nd_1st = cond0(parser, node->nd_1st);
14357  node->nd_2nd = cond0(parser, node->nd_2nd);
14358  break;
14359 
14360  case NODE_DOT2:
14361  case NODE_DOT3:
14362  node->nd_beg = range_op(parser, node->nd_beg);
14363  node->nd_end = range_op(parser, node->nd_end);
14364  if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
14365  else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
14366  if (!e_option_supplied(parser)) {
14367  int b = literal_node(node->nd_beg);
14368  int e = literal_node(node->nd_end);
14369  if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
14370  parser_warn(node, "range literal in condition");
14371  }
14372  }
14373  break;
14374 
14375  case NODE_DSYM:
14376  parser_warning(node, "literal in condition");
14377  break;
14378 
14379  case NODE_LIT:
14380  if (TYPE(node->nd_lit) == T_REGEXP) {
14381  warn_unless_e_option(parser, node, "regex literal in condition");
14382  nd_set_type(node, NODE_MATCH);
14383  }
14384  else {
14385  parser_warning(node, "literal in condition");
14386  }
14387  default:
14388  break;
14389  }
14390  return node;
14391 }
14392 
14393 static NODE*
14394 cond_gen(struct parser_params *parser, NODE *node)
14395 {
14396  if (node == 0) return 0;
14397  return cond0(parser, node);
14398 }
14399 
14400 static NODE*
14401 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right)
14402 {
14403  value_expr(left);
14404  if (left && (enum node_type)nd_type(left) == type) {
14405  NODE *node = left, *second;
14406  while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
14407  node = second;
14408  }
14409  node->nd_2nd = NEW_NODE(type, second, right, 0);
14410  return left;
14411  }
14412  return NEW_NODE(type, left, right, 0);
14413 }
14414 
14415 static void
14416 no_blockarg(struct parser_params *parser, NODE *node)
14417 {
14418  if (node && nd_type(node) == NODE_BLOCK_PASS) {
14419  compile_error(PARSER_ARG "block argument should not be given");
14420  }
14421 }
14422 
14423 static NODE *
14424 ret_args_gen(struct parser_params *parser, NODE *node)
14425 {
14426  if (node) {
14427  no_blockarg(parser, node);
14428  if (nd_type(node) == NODE_ARRAY) {
14429  if (node->nd_next == 0) {
14430  node = node->nd_head;
14431  }
14432  else {
14433  nd_set_type(node, NODE_VALUES);
14434  }
14435  }
14436  }
14437  return node;
14438 }
14439 
14440 static NODE *
14441 new_yield_gen(struct parser_params *parser, NODE *node)
14442 {
14443  long state = Qtrue;
14444 
14445  if (node) {
14446  no_blockarg(parser, node);
14447  if (node && nd_type(node) == NODE_SPLAT) {
14448  state = Qtrue;
14449  }
14450  }
14451  else {
14452  state = Qfalse;
14453  }
14454  return NEW_YIELD(node, state);
14455 }
14456 
14457 static NODE*
14459 {
14460  switch (TYPE(node->nd_lit)) {
14461  case T_FIXNUM:
14462  node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
14463  break;
14464  case T_BIGNUM:
14465  node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
14466  break;
14467  case T_FLOAT:
14468  RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit);
14469  break;
14470  default:
14471  break;
14472  }
14473  return node;
14474 }
14475 
14476 static NODE *
14477 arg_blk_pass(NODE *node1, NODE *node2)
14478 {
14479  if (node2) {
14480  node2->nd_head = node1;
14481  return node2;
14482  }
14483  return node1;
14484 }
14485 
14486 static NODE*
14487 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b)
14488 {
14489  int saved_line = ruby_sourceline;
14490  NODE *node;
14491  NODE *i1, *i2 = 0;
14492 
14493  node = NEW_ARGS(m ? m->nd_plen : 0, o);
14494  i1 = m ? m->nd_next : 0;
14495  node->nd_next = NEW_ARGS_AUX(r, b);
14496 
14497  if (p) {
14498  i2 = p->nd_next;
14499  node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen);
14500  }
14501  else if (i1) {
14502  node->nd_next->nd_next = NEW_ARGS_AUX(0, 0);
14503  }
14504  if (i1 || i2) {
14505  node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0);
14506  }
14507  ruby_sourceline = saved_line;
14508  return node;
14509 }
14510 #endif /* !RIPPER */
14511 
14512 static void
14513 warn_unused_var(struct parser_params *parser, struct local_vars *local)
14514 {
14515  int i, cnt;
14516  ID *v, *u;
14517 
14518  if (!local->used) return;
14519  v = local->vars->tbl;
14520  u = local->used->tbl;
14521  cnt = local->used->pos;
14522  if (cnt != local->vars->pos) {
14523  rb_bug("local->used->pos != local->vars->pos");
14524  }
14525  for (i = 0; i < cnt; ++i) {
14526  if (!v[i] || (u[i] & LVAR_USED)) continue;
14527  if (idUScore == v[i]) continue;
14528  rb_compile_warn(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i]));
14529  }
14530 }
14531 
14532 static void
14533 local_push_gen(struct parser_params *parser, int inherit_dvars)
14534 {
14535  struct local_vars *local;
14536 
14537  local = ALLOC(struct local_vars);
14538  local->prev = lvtbl;
14539  local->args = vtable_alloc(0);
14540  local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
14541  local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0;
14542  lvtbl = local;
14543 }
14544 
14545 static void
14547 {
14548  struct local_vars *local = lvtbl->prev;
14549  if (lvtbl->used) {
14550  warn_unused_var(parser, lvtbl);
14551  vtable_free(lvtbl->used);
14552  }
14553  vtable_free(lvtbl->args);
14554  vtable_free(lvtbl->vars);
14555  xfree(lvtbl);
14556  lvtbl = local;
14557 }
14558 
14559 #ifndef RIPPER
14560 static ID*
14561 vtable_tblcpy(ID *buf, const struct vtable *src)
14562 {
14563  int i, cnt = vtable_size(src);
14564 
14565  if (cnt > 0) {
14566  buf[0] = cnt;
14567  for (i = 0; i < cnt; i++) {
14568  buf[i] = src->tbl[i];
14569  }
14570  return buf;
14571  }
14572  return 0;
14573 }
14574 
14575 static ID*
14577 {
14578  int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars);
14579  ID *buf;
14580 
14581  if (cnt <= 0) return 0;
14582  buf = ALLOC_N(ID, cnt + 1);
14583  vtable_tblcpy(buf+1, lvtbl->args);
14584  vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars);
14585  buf[0] = cnt;
14586  return buf;
14587 }
14588 #endif
14589 
14590 static int
14591 arg_var_gen(struct parser_params *parser, ID id)
14592 {
14593  vtable_add(lvtbl->args, id);
14594  return vtable_size(lvtbl->args) - 1;
14595 }
14596 
14597 static int
14598 local_var_gen(struct parser_params *parser, ID id)
14599 {
14600  vtable_add(lvtbl->vars, id);
14601  if (lvtbl->used) {
14603  }
14604  return vtable_size(lvtbl->vars) - 1;
14605 }
14606 
14607 static int
14608 local_id_gen(struct parser_params *parser, ID id)
14609 {
14610  struct vtable *vars, *args, *used;
14611 
14612  vars = lvtbl->vars;
14613  args = lvtbl->args;
14614  used = lvtbl->used;
14615 
14616  while (vars && POINTER_P(vars->prev)) {
14617  vars = vars->prev;
14618  args = args->prev;
14619  if (used) used = used->prev;
14620  }
14621 
14622  if (vars && vars->prev == DVARS_INHERIT) {
14623  return rb_local_defined(id);
14624  }
14625  else if (vtable_included(args, id)) {
14626  return 1;
14627  }
14628  else {
14629  int i = vtable_included(vars, id);
14630  if (i && used) used->tbl[i-1] |= LVAR_USED;
14631  return i != 0;
14632  }
14633 }
14634 
14635 static const struct vtable *
14637 {
14638  lvtbl->args = vtable_alloc(lvtbl->args);
14639  lvtbl->vars = vtable_alloc(lvtbl->vars);
14640  if (lvtbl->used) {
14641  lvtbl->used = vtable_alloc(lvtbl->used);
14642  }
14643  return lvtbl->args;
14644 }
14645 
14646 static void
14647 dyna_pop_1(struct parser_params *parser)
14648 {
14649  struct vtable *tmp;
14650 
14651  if ((tmp = lvtbl->used) != 0) {
14652  warn_unused_var(parser, lvtbl);
14653  lvtbl->used = lvtbl->used->prev;
14654  vtable_free(tmp);
14655  }
14656  tmp = lvtbl->args;
14657  lvtbl->args = lvtbl->args->prev;
14658  vtable_free(tmp);
14659  tmp = lvtbl->vars;
14660  lvtbl->vars = lvtbl->vars->prev;
14661  vtable_free(tmp);
14662 }
14663 
14664 static void
14665 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
14666 {
14667  while (lvtbl->args != lvargs) {
14668  dyna_pop_1(parser);
14669  if (!lvtbl->args) {
14670  struct local_vars *local = lvtbl->prev;
14671  xfree(lvtbl);
14672  lvtbl = local;
14673  }
14674  }
14675  dyna_pop_1(parser);
14676 }
14677 
14678 static int
14680 {
14681  return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE;
14682 }
14683 
14684 static int
14685 dvar_defined_gen(struct parser_params *parser, ID id, int get)
14686 {
14687  struct vtable *vars, *args, *used;
14688  int i;
14689 
14690  args = lvtbl->args;
14691  vars = lvtbl->vars;
14692  used = lvtbl->used;
14693 
14694  while (POINTER_P(vars)) {
14695  if (vtable_included(args, id)) {
14696  return 1;
14697  }
14698  if ((i = vtable_included(vars, id)) != 0) {
14699  if (used) used->tbl[i-1] |= LVAR_USED;
14700  return 1;
14701  }
14702  args = args->prev;
14703  vars = vars->prev;
14704  if (get) used = 0;
14705  if (used) used = used->prev;
14706  }
14707 
14708  if (vars == DVARS_INHERIT) {
14709  return rb_dvar_defined(id);
14710  }
14711 
14712  return 0;
14713 }
14714 
14715 static int
14716 dvar_curr_gen(struct parser_params *parser, ID id)
14717 {
14718  return (vtable_included(lvtbl->args, id) ||
14719  vtable_included(lvtbl->vars, id));
14720 }
14721 
14722 #ifndef RIPPER
14723 static void
14725 {
14726  int c = RE_OPTION_ENCODING_IDX(options);
14727 
14728  if (c) {
14729  int opt, idx;
14730  rb_char_to_option_kcode(c, &opt, &idx);
14731  if (idx != ENCODING_GET(str) &&
14733  goto error;
14734  }
14735  ENCODING_SET(str, idx);
14736  }
14737  else if (RE_OPTION_ENCODING_NONE(options)) {
14738  if (!ENCODING_IS_ASCII8BIT(str) &&
14740  c = 'n';
14741  goto error;
14742  }
14744  }
14745  else if (parser->enc == rb_usascii_encoding()) {
14747  /* raise in re.c */
14749  }
14750  else {
14752  }
14753  }
14754  return;
14755 
14756  error:
14758  "regexp encoding option '%c' differs from source encoding '%s'",
14759  c, rb_enc_name(rb_enc_get(str)));
14760 }
14761 
14762 static int
14764 {
14765  VALUE err;
14766  reg_fragment_setenc(str, options);
14767  err = rb_reg_check_preprocess(str);
14768  if (err != Qnil) {
14769  err = rb_obj_as_string(err);
14770  compile_error(PARSER_ARG "%s", RSTRING_PTR(err));
14771  RB_GC_GUARD(err);
14772  return 0;
14773  }
14774  return 1;
14775 }
14776 
14777 typedef struct {
14778  struct parser_params* parser;
14779  rb_encoding *enc;
14780  NODE *succ_block;
14781  NODE *fail_block;
14782  int num;
14784 
14785 static int
14787  int back_num, int *back_refs, OnigRegex regex, void *arg0)
14788 {
14790  struct parser_params* parser = arg->parser;
14791  rb_encoding *enc = arg->enc;
14792  long len = name_end - name;
14793  const char *s = (const char *)name;
14794  ID var;
14795 
14796  arg->num++;
14797 
14798  if (arg->succ_block == 0) {
14799  arg->succ_block = NEW_BEGIN(0);
14800  arg->fail_block = NEW_BEGIN(0);
14801  }
14802 
14803  if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) ||
14804  (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) ||
14805  !rb_enc_symname2_p(s, len, enc)) {
14806  return ST_CONTINUE;
14807  }
14808  var = rb_intern3(s, len, enc);
14809  if (dvar_defined(var) || local_id(var)) {
14810  rb_warningS("named capture conflicts a local variable - %s",
14811  rb_id2name(var));
14812  }
14813  arg->succ_block = block_append(arg->succ_block,
14815  NEW_CALL(
14816  gettable(rb_intern("$~")),
14817  idAREF,
14818  NEW_LIST(NEW_LIT(ID2SYM(var))))
14819  )));
14820  arg->fail_block = block_append(arg->fail_block,
14822  return ST_CONTINUE;
14823 }
14824 
14825 static NODE *
14827 {
14829 
14830  arg.parser = parser;
14831  arg.enc = rb_enc_get(regexp);
14832  arg.succ_block = 0;
14833  arg.fail_block = 0;
14834  arg.num = 0;
14835  onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg);
14836 
14837  if (arg.num == 0)
14838  return match;
14839 
14840  return
14841  block_append(
14842  newline_node(match),
14843  NEW_IF(gettable(rb_intern("$~")),
14844  block_append(
14845  newline_node(arg.succ_block),
14846  newline_node(
14847  NEW_CALL(
14848  gettable(rb_intern("$~")),
14849  rb_intern("begin"),
14850  NEW_LIST(NEW_LIT(INT2FIX(0)))))),
14851  block_append(
14852  newline_node(arg.fail_block),
14853  newline_node(
14854  NEW_LIT(Qnil)))));
14855 }
14856 
14857 static VALUE
14858 reg_compile_gen(struct parser_params* parser, VALUE str, int options)
14859 {
14860  VALUE re;
14861  VALUE err;
14862 
14863  reg_fragment_setenc(str, options);
14864  err = rb_errinfo();
14866  if (NIL_P(re)) {
14867  ID mesg = rb_intern("mesg");
14868  VALUE m = rb_attr_get(rb_errinfo(), mesg);
14869  rb_set_errinfo(err);
14870  if (!NIL_P(err)) {
14871  rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m);
14872  }
14873  else {
14875  }
14876  return Qnil;
14877  }
14878  return re;
14879 }
14880 
14881 void
14883 {
14884 }
14885 
14886 NODE*
14888 {
14889  NODE *prelude = 0;
14890  NODE *scope = node;
14891  struct parser_params *parser;
14892 
14893  if (!node) return node;
14894 
14895  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
14896 
14897  node = node->nd_body;
14898 
14899  if (nd_type(node) == NODE_PRELUDE) {
14900  prelude = node;
14901  node = node->nd_body;
14902  }
14903 
14904  node = block_append(node,
14905  NEW_FCALL(rb_intern("print"),
14906  NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
14907  if (prelude) {
14908  prelude->nd_body = node;
14909  scope->nd_body = prelude;
14910  }
14911  else {
14912  scope->nd_body = node;
14913  }
14914 
14915  return scope;
14916 }
14917 
14918 NODE *
14919 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split)
14920 {
14921  NODE *prelude = 0;
14922  NODE *scope = node;
14923  struct parser_params *parser;
14924 
14925  if (!node) return node;
14926 
14927  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
14928 
14929  node = node->nd_body;
14930 
14931  if (nd_type(node) == NODE_PRELUDE) {
14932  prelude = node;
14933  node = node->nd_body;
14934  }
14935  if (split) {
14936  node = block_append(NEW_GASGN(rb_intern("$F"),
14937  NEW_CALL(NEW_GVAR(rb_intern("$_")),
14938  rb_intern("split"), 0)),
14939  node);
14940  }
14941  if (chop) {
14942  node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
14943  rb_intern("chop!"), 0), node);
14944  }
14945 
14946  node = NEW_OPT_N(node);
14947 
14948  if (prelude) {
14949  prelude->nd_body = node;
14950  scope->nd_body = prelude;
14951  }
14952  else {
14953  scope->nd_body = node;
14954  }
14955 
14956  return scope;
14957 }
14958 
14959 static const struct {
14961  const char *name;
14962 } op_tbl[] = {
14963  {tDOT2, ".."},
14964  {tDOT3, "..."},
14965  {'+', "+(binary)"},
14966  {'-', "-(binary)"},
14967  {tPOW, "**"},
14968  {tUPLUS, "+@"},
14969  {tUMINUS, "-@"},
14970  {tCMP, "<=>"},
14971  {tGEQ, ">="},
14972  {tLEQ, "<="},
14973  {tEQ, "=="},
14974  {tEQQ, "==="},
14975  {tNEQ, "!="},
14976  {tMATCH, "=~"},
14977  {tNMATCH, "!~"},
14978  {tAREF, "[]"},
14979  {tASET, "[]="},
14980  {tLSHFT, "<<"},
14981  {tRSHFT, ">>"},
14982  {tCOLON2, "::"},
14983 };
14984 
14985 #define op_tbl_count numberof(op_tbl)
14986 
14987 #ifndef ENABLE_SELECTOR_NAMESPACE
14988 #define ENABLE_SELECTOR_NAMESPACE 0
14989 #endif
14990 
14991 static struct symbols {
14992  ID last_id;
14993  st_table *sym_id;
14994  st_table *id_str;
14995 #if ENABLE_SELECTOR_NAMESPACE
14996  st_table *ivar2_id;
14997  st_table *id_ivar2;
14998 #endif
15000 } global_symbols = {tLAST_ID};
15001 
15002 static const struct st_hash_type symhash = {
15004  rb_str_hash,
15005 };
15006 
15007 #if ENABLE_SELECTOR_NAMESPACE
15008 struct ivar2_key {
15009  ID id;
15010  VALUE klass;
15011 };
15012 
15013 static int
15014 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2)
15015 {
15016  if (key1->id == key2->id && key1->klass == key2->klass) {
15017  return 0;
15018  }
15019  return 1;
15020 }
15021 
15022 static int
15023 ivar2_hash(struct ivar2_key *key)
15024 {
15025  return (key->id << 8) ^ (key->klass >> 2);
15026 }
15027 
15028 static const struct st_hash_type ivar2_hash_type = {
15029  ivar2_cmp,
15030  ivar2_hash,
15031 };
15032 #endif
15033 
15034 void
15036 {
15037  global_symbols.sym_id = st_init_table_with_size(&symhash, 1000);
15039 #if ENABLE_SELECTOR_NAMESPACE
15040  global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000);
15041  global_symbols.id_ivar2 = st_init_numtable_with_size(1000);
15042 #endif
15043 
15044  Init_id();
15045 }
15046 
15047 void
15049 {
15053 }
15054 #endif /* !RIPPER */
15055 
15056 static ID
15058 {
15059  ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars);
15060  id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1;
15061  return ID_INTERNAL | (id << ID_SCOPE_SHIFT);
15062 }
15063 
15064 #ifndef RIPPER
15065 static int
15066 is_special_global_name(const char *m, const char *e, rb_encoding *enc)
15067 {
15068  int mb = 0;
15069 
15070  if (m >= e) return 0;
15071  switch (*m) {
15072  case '~': case '*': case '$': case '?': case '!': case '@':
15073  case '/': case '\\': case ';': case ',': case '.': case '=':
15074  case ':': case '<': case '>': case '\"':
15075  case '&': case '`': case '\'': case '+':
15076  case '0':
15077  ++m;
15078  break;
15079  case '-':
15080  ++m;
15081  if (m < e && is_identchar(m, e, enc)) {
15082  if (!ISASCII(*m)) mb = 1;
15083  m += rb_enc_mbclen(m, e, enc);
15084  }
15085  break;
15086  default:
15087  if (!rb_enc_isdigit(*m, enc)) return 0;
15088  do {
15089  if (!ISASCII(*m)) mb = 1;
15090  ++m;
15091  } while (m < e && rb_enc_isdigit(*m, enc));
15092  }
15093  return m == e ? mb + 1 : 0;
15094 }
15095 
15096 int
15097 rb_symname_p(const char *name)
15098 {
15099  return rb_enc_symname_p(name, rb_ascii8bit_encoding());
15100 }
15101 
15102 int
15103 rb_enc_symname_p(const char *name, rb_encoding *enc)
15104 {
15105  return rb_enc_symname2_p(name, strlen(name), enc);
15106 }
15107 
15108 int
15109 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
15110 {
15111  const char *m = name;
15112  const char *e = m + len;
15113  int localid = FALSE;
15114 
15115  if (!m || len <= 0) return FALSE;
15116  switch (*m) {
15117  case '\0':
15118  return FALSE;
15119 
15120  case '$':
15121  if (is_special_global_name(++m, e, enc)) return TRUE;
15122  goto id;
15123 
15124  case '@':
15125  if (*++m == '@') ++m;
15126  goto id;
15127 
15128  case '<':
15129  switch (*++m) {
15130  case '<': ++m; break;
15131  case '=': if (*++m == '>') ++m; break;
15132  default: break;
15133  }
15134  break;
15135 
15136  case '>':
15137  switch (*++m) {
15138  case '>': case '=': ++m; break;
15139  }
15140  break;
15141 
15142  case '=':
15143  switch (*++m) {
15144  case '~': ++m; break;
15145  case '=': if (*++m == '=') ++m; break;
15146  default: return FALSE;
15147  }
15148  break;
15149 
15150  case '*':
15151  if (*++m == '*') ++m;
15152  break;
15153 
15154  case '+': case '-':
15155  if (*++m == '@') ++m;
15156  break;
15157 
15158  case '|': case '^': case '&': case '/': case '%': case '~': case '`':
15159  ++m;
15160  break;
15161 
15162  case '[':
15163  if (*++m != ']') return FALSE;
15164  if (*++m == '=') ++m;
15165  break;
15166 
15167  case '!':
15168  if (len == 1) return TRUE;
15169  switch (*++m) {
15170  case '=': case '~': ++m; break;
15171  default: return FALSE;
15172  }
15173  break;
15174 
15175  default:
15176  localid = !rb_enc_isupper(*m, enc);
15177  id:
15178  if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m)))
15179  return FALSE;
15180  while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc);
15181  if (localid) {
15182  switch (*m) {
15183  case '!': case '?': case '=': ++m;
15184  }
15185  }
15186  break;
15187  }
15188  return m == e;
15189 }
15190 
15191 static ID
15192 register_symid(ID id, const char *name, long len, rb_encoding *enc)
15193 {
15194  VALUE str = rb_enc_str_new(name, len, enc);
15195  OBJ_FREEZE(str);
15198  return id;
15199 }
15200 
15201 ID
15202 rb_intern3(const char *name, long len, rb_encoding *enc)
15203 {
15204  const char *m = name;
15205  const char *e = m + len;
15206  unsigned char c;
15207  VALUE str;
15208  ID id;
15209  long last;
15210  int mb;
15211  st_data_t data;
15212  struct RString fake_str;
15213  fake_str.basic.flags = T_STRING|RSTRING_NOEMBED;
15214  fake_str.basic.klass = rb_cString;
15215  fake_str.as.heap.len = len;
15216  fake_str.as.heap.ptr = (char *)name;
15217  fake_str.as.heap.aux.capa = len;
15218  str = (VALUE)&fake_str;
15219  rb_enc_associate(str, enc);
15220  OBJ_FREEZE(str);
15221 
15223  rb_raise(rb_eEncodingError, "invalid encoding symbol");
15224  }
15225 
15226  if (st_lookup(global_symbols.sym_id, str, &data))
15227  return (ID)data;
15228 
15229  if (rb_cString && !rb_enc_asciicompat(enc)) {
15230  id = ID_JUNK;
15231  goto new_id;
15232  }
15233  last = len-1;
15234  id = 0;
15235  switch (*m) {
15236  case '$':
15237  id |= ID_GLOBAL;
15238  if ((mb = is_special_global_name(++m, e, enc)) != 0) {
15239  if (!--mb) enc = rb_ascii8bit_encoding();
15240  goto new_id;
15241  }
15242  break;
15243  case '@':
15244  if (m[1] == '@') {
15245  m++;
15246  id |= ID_CLASS;
15247  }
15248  else {
15249  id |= ID_INSTANCE;
15250  }
15251  m++;
15252  break;
15253  default:
15254  c = m[0];
15255  if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) {
15256  /* operators */
15257  int i;
15258 
15259  if (len == 1) {
15260  id = c;
15261  goto id_register;
15262  }
15263  for (i = 0; i < op_tbl_count; i++) {
15264  if (*op_tbl[i].name == *m &&
15265  strcmp(op_tbl[i].name, m) == 0) {
15266  id = op_tbl[i].token;
15267  goto id_register;
15268  }
15269  }
15270  }
15271 
15272  if (m[last] == '=') {
15273  /* attribute assignment */
15274  id = rb_intern3(name, last, enc);
15275  if (id > tLAST_TOKEN && !is_attrset_id(id)) {
15276  enc = rb_enc_get(rb_id2str(id));
15277  id = rb_id_attrset(id);
15278  goto id_register;
15279  }
15280  id = ID_ATTRSET;
15281  }
15282  else if (rb_enc_isupper(m[0], enc)) {
15283  id = ID_CONST;
15284  }
15285  else {
15286  id = ID_LOCAL;
15287  }
15288  break;
15289  }
15290  mb = 0;
15291  if (!rb_enc_isdigit(*m, enc)) {
15292  while (m <= name + last && is_identchar(m, e, enc)) {
15293  if (ISASCII(*m)) {
15294  m++;
15295  }
15296  else {
15297  mb = 1;
15298  m += rb_enc_mbclen(m, e, enc);
15299  }
15300  }
15301  }
15302  if (m - name < len) id = ID_JUNK;
15303  if (enc != rb_usascii_encoding()) {
15304  /*
15305  * this clause makes sense only when called from other than
15306  * rb_intern_str() taking care of code-range.
15307  */
15308  if (!mb) {
15309  for (; m <= name + len; ++m) {
15310  if (!ISASCII(*m)) goto mbstr;
15311  }
15312  enc = rb_usascii_encoding();
15313  }
15314  mbstr:;
15315  }
15316  new_id:
15318  if (len > 20) {
15319  rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)",
15320  name);
15321  }
15322  else {
15323  rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)",
15324  (int)len, name);
15325  }
15326  }
15328  id_register:
15329  return register_symid(id, name, len, enc);
15330 }
15331 
15332 ID
15333 rb_intern2(const char *name, long len)
15334 {
15335  return rb_intern3(name, len, rb_usascii_encoding());
15336 }
15337 
15338 #undef rb_intern
15339 ID
15340 rb_intern(const char *name)
15341 {
15342  return rb_intern2(name, strlen(name));
15343 }
15344 
15345 ID
15347 {
15348  rb_encoding *enc;
15349  ID id;
15350 
15352  enc = rb_usascii_encoding();
15353  }
15354  else {
15355  enc = rb_enc_get(str);
15356  }
15357  id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc);
15358  RB_GC_GUARD(str);
15359  return id;
15360 }
15361 
15362 VALUE
15364 {
15365  st_data_t data;
15366 
15367  if (id < tLAST_TOKEN) {
15368  int i = 0;
15369 
15370  if (id < INT_MAX && rb_ispunct((int)id)) {
15371  VALUE str = global_symbols.op_sym[i = (int)id];
15372  if (!str) {
15373  char name[2];
15374  name[0] = (char)id;
15375  name[1] = 0;
15376  str = rb_usascii_str_new(name, 1);
15377  OBJ_FREEZE(str);
15378  global_symbols.op_sym[i] = str;
15379  }
15380  return str;
15381  }
15382  for (i = 0; i < op_tbl_count; i++) {
15383  if (op_tbl[i].token == id) {
15384  VALUE str = global_symbols.op_sym[i];
15385  if (!str) {
15386  str = rb_usascii_str_new2(op_tbl[i].name);
15387  OBJ_FREEZE(str);
15388  global_symbols.op_sym[i] = str;
15389  }
15390  return str;
15391  }
15392  }
15393  }
15394 
15395  if (st_lookup(global_symbols.id_str, id, &data)) {
15396  VALUE str = (VALUE)data;
15397  if (RBASIC(str)->klass == 0)
15398  RBASIC(str)->klass = rb_cString;
15399  return str;
15400  }
15401 
15402  if (is_attrset_id(id)) {
15403  ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
15404  VALUE str;
15405 
15406  while (!(str = rb_id2str(id2))) {
15407  if (!is_local_id(id2)) return 0;
15408  id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;
15409  }
15410  str = rb_str_dup(str);
15411  rb_str_cat(str, "=", 1);
15412  rb_intern_str(str);
15413  if (st_lookup(global_symbols.id_str, id, &data)) {
15414  VALUE str = (VALUE)data;
15415  if (RBASIC(str)->klass == 0)
15416  RBASIC(str)->klass = rb_cString;
15417  return str;
15418  }
15419  }
15420  return 0;
15421 }
15422 
15423 const char *
15425 {
15426  VALUE str = rb_id2str(id);
15427 
15428  if (!str) return 0;
15429  return RSTRING_PTR(str);
15430 }
15431 
15432 static int
15434 {
15435  rb_ary_push(ary, ID2SYM(value));
15436  return ST_CONTINUE;
15437 }
15438 
15439 /*
15440  * call-seq:
15441  * Symbol.all_symbols => array
15442  *
15443  * Returns an array of all the symbols currently in Ruby's symbol
15444  * table.
15445  *
15446  * Symbol.all_symbols.size #=> 903
15447  * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink,
15448  * :chown, :EOFError, :$;, :String,
15449  * :LOCK_SH, :"setuid?", :$<,
15450  * :default_proc, :compact, :extend,
15451  * :Tms, :getwd, :$=, :ThreadGroup,
15452  * :wait2, :$>]
15453  */
15454 
15455 VALUE
15457 {
15459 
15461  return ary;
15462 }
15463 
15464 int
15466 {
15467  return is_const_id(id);
15468 }
15469 
15470 int
15472 {
15473  return is_class_id(id);
15474 }
15475 
15476 int
15478 {
15479  return is_instance_id(id);
15480 }
15481 
15482 int
15484 {
15485  return is_local_id(id);
15486 }
15487 
15488 int
15490 {
15491  return is_junk_id(id);
15492 }
15493 
15494 #endif /* !RIPPER */
15495 
15496 static void
15498 {
15499  parser->eofp = Qfalse;
15500 
15501  parser->parser_lex_strterm = 0;
15502  parser->parser_cond_stack = 0;
15503  parser->parser_cmdarg_stack = 0;
15504  parser->parser_class_nest = 0;
15505  parser->parser_paren_nest = 0;
15506  parser->parser_lpar_beg = 0;
15507  parser->parser_in_single = 0;
15508  parser->parser_in_def = 0;
15509  parser->parser_in_defined = 0;
15510  parser->parser_compile_for_eval = 0;
15511  parser->parser_cur_mid = 0;
15512  parser->parser_tokenbuf = NULL;
15513  parser->parser_tokidx = 0;
15514  parser->parser_toksiz = 0;
15515  parser->parser_heredoc_end = 0;
15516  parser->parser_command_start = TRUE;
15517  parser->parser_deferred_nodes = 0;
15518  parser->parser_lex_pbeg = 0;
15519  parser->parser_lex_p = 0;
15520  parser->parser_lex_pend = 0;
15521  parser->parser_lvtbl = 0;
15522  parser->parser_ruby__end__seen = 0;
15523  parser->parser_ruby_sourcefile = 0;
15524 #ifndef RIPPER
15525  parser->is_ripper = 0;
15526  parser->parser_eval_tree_begin = 0;
15527  parser->parser_eval_tree = 0;
15528 #else
15529  parser->is_ripper = 1;
15530  parser->parser_ruby_sourcefile_string = Qnil;
15531  parser->delayed = Qnil;
15532 
15533  parser->result = Qnil;
15534  parser->parsing_thread = Qnil;
15535  parser->toplevel_p = TRUE;
15536 #endif
15537 #ifdef YYMALLOC
15538  parser->heap = NULL;
15539 #endif
15540  parser->enc = rb_usascii_encoding();
15541 }
15542 
15543 #ifdef RIPPER
15544 #define parser_mark ripper_parser_mark
15545 #define parser_free ripper_parser_free
15546 #endif
15547 
15548 static void
15550 {
15551  struct parser_params *p = (struct parser_params*)ptr;
15552 
15558 #ifndef RIPPER
15561  rb_gc_mark(p->debug_lines);
15562 #else
15563  rb_gc_mark(p->parser_ruby_sourcefile_string);
15564  rb_gc_mark(p->delayed);
15565  rb_gc_mark(p->value);
15566  rb_gc_mark(p->result);
15567  rb_gc_mark(p->parsing_thread);
15568 #endif
15569 #ifdef YYMALLOC
15570  rb_gc_mark((VALUE)p->heap);
15571 #endif
15572 }
15573 
15574 static void
15575 parser_free(void *ptr)
15576 {
15577  struct parser_params *p = (struct parser_params*)ptr;
15578  struct local_vars *local, *prev;
15579 
15580  if (p->parser_tokenbuf) {
15581  xfree(p->parser_tokenbuf);
15582  }
15583  for (local = p->parser_lvtbl; local; local = prev) {
15584  if (local->vars) xfree(local->vars);
15585  prev = local->prev;
15586  xfree(local);
15587  }
15588 #ifndef RIPPER
15590 #endif
15591  xfree(p);
15592 }
15593 
15594 static size_t
15595 parser_memsize(const void *ptr)
15596 {
15597  struct parser_params *p = (struct parser_params*)ptr;
15598  struct local_vars *local;
15599  size_t size = sizeof(*p);
15600 
15601  if (!ptr) return 0;
15602  size += p->parser_toksiz;
15603  for (local = p->parser_lvtbl; local; local = local->prev) {
15604  size += sizeof(*local);
15605  if (local->vars) size += local->vars->capa * sizeof(ID);
15606  }
15607 #ifndef RIPPER
15608  if (p->parser_ruby_sourcefile) {
15609  size += strlen(p->parser_ruby_sourcefile) + 1;
15610  }
15611 #endif
15612  return size;
15613 }
15614 
15615 static
15616 #ifndef RIPPER
15617 const
15618 #endif
15619 rb_data_type_t parser_data_type = {
15620  "parser",
15621  {
15622  parser_mark,
15623  parser_free,
15625  },
15626 };
15627 
15628 #ifndef RIPPER
15629 #undef rb_reserved_word
15630 
15631 const struct kwtable *
15632 rb_reserved_word(const char *str, unsigned int len)
15633 {
15634  return reserved_word(str, len);
15635 }
15636 
15637 static struct parser_params *
15639 {
15640  struct parser_params *p;
15641 
15642  p = ALLOC_N(struct parser_params, 1);
15643  MEMZERO(p, struct parser_params, 1);
15644  parser_initialize(p);
15645  return p;
15646 }
15647 
15648 VALUE
15650 {
15651  struct parser_params *p = parser_new();
15652 
15653  return TypedData_Wrap_Struct(0, &parser_data_type, p);
15654 }
15655 
15656 /*
15657  * call-seq:
15658  * ripper#end_seen? -> Boolean
15659  *
15660  * Return true if parsed source ended by +\_\_END\_\_+.
15661  */
15662 VALUE
15664 {
15665  struct parser_params *parser;
15666 
15667  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15668  return ruby__end__seen ? Qtrue : Qfalse;
15669 }
15670 
15671 /*
15672  * call-seq:
15673  * ripper#encoding -> encoding
15674  *
15675  * Return encoding of the source.
15676  */
15677 VALUE
15679 {
15680  struct parser_params *parser;
15681 
15682  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15683  return rb_enc_from_encoding(parser->enc);
15684 }
15685 
15686 /*
15687  * call-seq:
15688  * ripper.yydebug -> true or false
15689  *
15690  * Get yydebug.
15691  */
15692 VALUE
15694 {
15695  struct parser_params *parser;
15696 
15697  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
15698  return yydebug ? Qtrue : Qfalse;
15699 }
15700 
15701 /*
15702  * call-seq:
15703  * ripper.yydebug = flag
15704  *
15705  * Set yydebug.
15706  */
15707 VALUE
15709 {
15710  struct parser_params *parser;
15711 
15712  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
15713  yydebug = RTEST(flag);
15714  return flag;
15715 }
15716 
15717 #ifdef YYMALLOC
15718 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
15719 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)
15720 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \
15721  (n)->u3.cnt = (c), (p))
15722 
15723 void *
15724 rb_parser_malloc(struct parser_params *parser, size_t size)
15725 {
15726  size_t cnt = HEAPCNT(1, size);
15727  NODE *n = NEWHEAP();
15728  void *ptr = xmalloc(size);
15729 
15730  return ADD2HEAP(n, cnt, ptr);
15731 }
15732 
15733 void *
15734 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size)
15735 {
15736  size_t cnt = HEAPCNT(nelem, size);
15737  NODE *n = NEWHEAP();
15738  void *ptr = xcalloc(nelem, size);
15739 
15740  return ADD2HEAP(n, cnt, ptr);
15741 }
15742 
15743 void *
15744 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size)
15745 {
15746  NODE *n;
15747  size_t cnt = HEAPCNT(1, size);
15748 
15749  if (ptr && (n = parser->heap) != NULL) {
15750  do {
15751  if (n->u1.node == ptr) {
15752  n->u1.node = ptr = xrealloc(ptr, size);
15753  if (n->u3.cnt) n->u3.cnt = cnt;
15754  return ptr;
15755  }
15756  } while ((n = n->u2.node) != NULL);
15757  }
15758  n = NEWHEAP();
15759  ptr = xrealloc(ptr, size);
15760  return ADD2HEAP(n, cnt, ptr);
15761 }
15762 
15763 void
15764 rb_parser_free(struct parser_params *parser, void *ptr)
15765 {
15766  NODE **prev = &parser->heap, *n;
15767 
15768  while ((n = *prev) != NULL) {
15769  if (n->u1.node == ptr) {
15770  *prev = n->u2.node;
15772  break;
15773  }
15774  prev = &n->u2.node;
15775  }
15776  xfree(ptr);
15777 }
15778 #endif
15779 #endif
15780 
15781 #ifdef RIPPER
15782 #ifdef RIPPER_DEBUG
15783 extern int rb_is_pointer_to_heap(VALUE);
15784 
15785 /* :nodoc: */
15786 static VALUE
15787 ripper_validate_object(VALUE self, VALUE x)
15788 {
15789  if (x == Qfalse) return x;
15790  if (x == Qtrue) return x;
15791  if (x == Qnil) return x;
15792  if (x == Qundef)
15793  rb_raise(rb_eArgError, "Qundef given");
15794  if (FIXNUM_P(x)) return x;
15795  if (SYMBOL_P(x)) return x;
15796  if (!rb_is_pointer_to_heap(x))
15797  rb_raise(rb_eArgError, "invalid pointer: %p", x);
15798  switch (TYPE(x)) {
15799  case T_STRING:
15800  case T_OBJECT:
15801  case T_ARRAY:
15802  case T_BIGNUM:
15803  case T_FLOAT:
15804  return x;
15805  case T_NODE:
15806  if (nd_type(x) != NODE_LASGN) {
15807  rb_raise(rb_eArgError, "NODE given: %p", x);
15808  }
15809  return ((NODE *)x)->nd_rval;
15810  default:
15811  rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
15812  x, rb_obj_classname(x));
15813  }
15814  return x;
15815 }
15816 #endif
15817 
15818 #define validate(x) ((x) = get_value(x))
15819 
15820 static VALUE
15821 ripper_dispatch0(struct parser_params *parser, ID mid)
15822 {
15823  return rb_funcall(parser->value, mid, 0);
15824 }
15825 
15826 static VALUE
15827 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
15828 {
15829  validate(a);
15830  return rb_funcall(parser->value, mid, 1, a);
15831 }
15832 
15833 static VALUE
15834 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
15835 {
15836  validate(a);
15837  validate(b);
15838  return rb_funcall(parser->value, mid, 2, a, b);
15839 }
15840 
15841 static VALUE
15842 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
15843 {
15844  validate(a);
15845  validate(b);
15846  validate(c);
15847  return rb_funcall(parser->value, mid, 3, a, b, c);
15848 }
15849 
15850 static VALUE
15851 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
15852 {
15853  validate(a);
15854  validate(b);
15855  validate(c);
15856  validate(d);
15857  return rb_funcall(parser->value, mid, 4, a, b, c, d);
15858 }
15859 
15860 static VALUE
15861 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
15862 {
15863  validate(a);
15864  validate(b);
15865  validate(c);
15866  validate(d);
15867  validate(e);
15868  return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
15869 }
15870 
15871 static const struct kw_assoc {
15872  ID id;
15873  const char *name;
15874 } keyword_to_name[] = {
15875  {keyword_class, "class"},
15876  {keyword_module, "module"},
15877  {keyword_def, "def"},
15878  {keyword_undef, "undef"},
15879  {keyword_begin, "begin"},
15880  {keyword_rescue, "rescue"},
15881  {keyword_ensure, "ensure"},
15882  {keyword_end, "end"},
15883  {keyword_if, "if"},
15884  {keyword_unless, "unless"},
15885  {keyword_then, "then"},
15886  {keyword_elsif, "elsif"},
15887  {keyword_else, "else"},
15888  {keyword_case, "case"},
15889  {keyword_when, "when"},
15890  {keyword_while, "while"},
15891  {keyword_until, "until"},
15892  {keyword_for, "for"},
15893  {keyword_break, "break"},
15894  {keyword_next, "next"},
15895  {keyword_redo, "redo"},
15896  {keyword_retry, "retry"},
15897  {keyword_in, "in"},
15898  {keyword_do, "do"},
15899  {keyword_do_cond, "do"},
15900  {keyword_do_block, "do"},
15901  {keyword_return, "return"},
15902  {keyword_yield, "yield"},
15903  {keyword_super, "super"},
15904  {keyword_self, "self"},
15905  {keyword_nil, "nil"},
15906  {keyword_true, "true"},
15907  {keyword_false, "false"},
15908  {keyword_and, "and"},
15909  {keyword_or, "or"},
15910  {keyword_not, "not"},
15911  {modifier_if, "if"},
15912  {modifier_unless, "unless"},
15913  {modifier_while, "while"},
15914  {modifier_until, "until"},
15915  {modifier_rescue, "rescue"},
15916  {keyword_alias, "alias"},
15917  {keyword_defined, "defined?"},
15918  {keyword_BEGIN, "BEGIN"},
15919  {keyword_END, "END"},
15920  {keyword__LINE__, "__LINE__"},
15921  {keyword__FILE__, "__FILE__"},
15922  {keyword__ENCODING__, "__ENCODING__"},
15923  {0, NULL}
15924 };
15925 
15926 static const char*
15927 keyword_id_to_str(ID id)
15928 {
15929  const struct kw_assoc *a;
15930 
15931  for (a = keyword_to_name; a->id; a++) {
15932  if (a->id == id)
15933  return a->name;
15934  }
15935  return NULL;
15936 }
15937 
15938 #undef ripper_id2sym
15939 static VALUE
15940 ripper_id2sym(ID id)
15941 {
15942  const char *name;
15943  char buf[8];
15944 
15945  if (id <= 256) {
15946  buf[0] = (char)id;
15947  buf[1] = '\0';
15948  return ID2SYM(rb_intern2(buf, 1));
15949  }
15950  if ((name = keyword_id_to_str(id))) {
15951  return ID2SYM(rb_intern(name));
15952  }
15953  switch (id) {
15954  case tOROP:
15955  name = "||";
15956  break;
15957  case tANDOP:
15958  name = "&&";
15959  break;
15960  default:
15961  name = rb_id2name(id);
15962  if (!name) {
15963  rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
15964  }
15965  return ID2SYM(id);
15966  }
15967  return ID2SYM(rb_intern(name));
15968 }
15969 
15970 static ID
15971 ripper_get_id(VALUE v)
15972 {
15973  NODE *nd;
15974  if (!RB_TYPE_P(v, T_NODE)) return 0;
15975  nd = (NODE *)v;
15976  if (nd_type(nd) != NODE_LASGN) return 0;
15977  return nd->nd_vid;
15978 }
15979 
15980 static VALUE
15981 ripper_get_value(VALUE v)
15982 {
15983  NODE *nd;
15984  if (v == Qundef) return Qnil;
15985  if (!RB_TYPE_P(v, T_NODE)) return v;
15986  nd = (NODE *)v;
15987  if (nd_type(nd) != NODE_LASGN) return Qnil;
15988  return nd->nd_rval;
15989 }
15990 
15991 static void
15992 ripper_compile_error(struct parser_params *parser, const char *fmt, ...)
15993 {
15994  VALUE str;
15995  va_list args;
15996 
15997  va_start(args, fmt);
15998  str = rb_vsprintf(fmt, args);
15999  va_end(args);
16000  rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
16001 }
16002 
16003 static void
16004 ripper_warn0(struct parser_params *parser, const char *fmt)
16005 {
16006  rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt));
16007 }
16008 
16009 static void
16010 ripper_warnI(struct parser_params *parser, const char *fmt, int a)
16011 {
16012  rb_funcall(parser->value, rb_intern("warn"), 2,
16013  STR_NEW2(fmt), INT2NUM(a));
16014 }
16015 
16016 #if 0
16017 static void
16018 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str)
16019 {
16020  rb_funcall(parser->value, rb_intern("warn"), 2,
16021  STR_NEW2(fmt), STR_NEW2(str));
16022 }
16023 #endif
16024 
16025 static void
16026 ripper_warning0(struct parser_params *parser, const char *fmt)
16027 {
16028  rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt));
16029 }
16030 
16031 static void
16032 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str)
16033 {
16034  rb_funcall(parser->value, rb_intern("warning"), 2,
16035  STR_NEW2(fmt), STR_NEW2(str));
16036 }
16037 
16038 static VALUE
16039 ripper_lex_get_generic(struct parser_params *parser, VALUE src)
16040 {
16041  return rb_funcall(src, ripper_id_gets, 0);
16042 }
16043 
16044 static VALUE
16045 ripper_s_allocate(VALUE klass)
16046 {
16047  struct parser_params *p;
16048  VALUE self;
16049 
16050  p = ALLOC_N(struct parser_params, 1);
16051  MEMZERO(p, struct parser_params, 1);
16052  self = TypedData_Wrap_Struct(klass, &parser_data_type, p);
16053  p->value = self;
16054  return self;
16055 }
16056 
16057 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0)
16058 
16059 /*
16060  * call-seq:
16061  * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
16062  *
16063  * Create a new Ripper object.
16064  * _src_ must be a String, an IO, or an Object which has #gets method.
16065  *
16066  * This method does not starts parsing.
16067  * See also Ripper#parse and Ripper.parse.
16068  */
16069 static VALUE
16070 ripper_initialize(int argc, VALUE *argv, VALUE self)
16071 {
16072  struct parser_params *parser;
16073  VALUE src, fname, lineno;
16074 
16075  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16076  rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
16077  if (rb_obj_respond_to(src, ripper_id_gets, 0)) {
16078  parser->parser_lex_gets = ripper_lex_get_generic;
16079  }
16080  else {
16081  StringValue(src);
16082  parser->parser_lex_gets = lex_get_str;
16083  }
16084  parser->parser_lex_input = src;
16085  parser->eofp = Qfalse;
16086  if (NIL_P(fname)) {
16087  fname = STR_NEW2("(ripper)");
16088  }
16089  else {
16090  StringValue(fname);
16091  }
16092  parser_initialize(parser);
16093 
16094  parser->parser_ruby_sourcefile_string = fname;
16095  parser->parser_ruby_sourcefile = RSTRING_PTR(fname);
16096  parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
16097 
16098  return Qnil;
16099 }
16100 
16101 struct ripper_args {
16102  struct parser_params *parser;
16103  int argc;
16104  VALUE *argv;
16105 };
16106 
16107 static VALUE
16108 ripper_parse0(VALUE parser_v)
16109 {
16110  struct parser_params *parser;
16111 
16112  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
16113  parser_prepare(parser);
16114  ripper_yyparse((void*)parser);
16115  return parser->result;
16116 }
16117 
16118 static VALUE
16119 ripper_ensure(VALUE parser_v)
16120 {
16121  struct parser_params *parser;
16122 
16123  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
16124  parser->parsing_thread = Qnil;
16125  return Qnil;
16126 }
16127 
16128 /*
16129  * call-seq:
16130  * ripper#parse
16131  *
16132  * Start parsing and returns the value of the root action.
16133  */
16134 static VALUE
16135 ripper_parse(VALUE self)
16136 {
16137  struct parser_params *parser;
16138 
16139  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16140  if (!ripper_initialized_p(parser)) {
16141  rb_raise(rb_eArgError, "method called for uninitialized object");
16142  }
16143  if (!NIL_P(parser->parsing_thread)) {
16144  if (parser->parsing_thread == rb_thread_current())
16145  rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
16146  else
16147  rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
16148  }
16149  parser->parsing_thread = rb_thread_current();
16150  rb_ensure(ripper_parse0, self, ripper_ensure, self);
16151 
16152  return parser->result;
16153 }
16154 
16155 /*
16156  * call-seq:
16157  * ripper#column -> Integer
16158  *
16159  * Return column number of current parsing line.
16160  * This number starts from 0.
16161  */
16162 static VALUE
16163 ripper_column(VALUE self)
16164 {
16165  struct parser_params *parser;
16166  long col;
16167 
16168  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16169  if (!ripper_initialized_p(parser)) {
16170  rb_raise(rb_eArgError, "method called for uninitialized object");
16171  }
16172  if (NIL_P(parser->parsing_thread)) return Qnil;
16173  col = parser->tokp - parser->parser_lex_pbeg;
16174  return LONG2NUM(col);
16175 }
16176 
16177 /*
16178  * call-seq:
16179  * ripper#filename -> String
16180  *
16181  * Return current parsing filename.
16182  */
16183 static VALUE
16184 ripper_filename(VALUE self)
16185 {
16186  struct parser_params *parser;
16187 
16188  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16189  if (!ripper_initialized_p(parser)) {
16190  rb_raise(rb_eArgError, "method called for uninitialized object");
16191  }
16192  return parser->parser_ruby_sourcefile_string;
16193 }
16194 
16195 /*
16196  * call-seq:
16197  * ripper#lineno -> Integer
16198  *
16199  * Return line number of current parsing line.
16200  * This number starts from 1.
16201  */
16202 static VALUE
16203 ripper_lineno(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)) return Qnil;
16212  return INT2NUM(parser->parser_ruby_sourceline);
16213 }
16214 
16215 #ifdef RIPPER_DEBUG
16216 /* :nodoc: */
16217 static VALUE
16218 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
16219 {
16220  StringValue(msg);
16221  if (obj == Qundef) {
16222  rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg));
16223  }
16224  return Qnil;
16225 }
16226 
16227 /* :nodoc: */
16228 static VALUE
16229 ripper_value(VALUE self, VALUE obj)
16230 {
16231  return ULONG2NUM(obj);
16232 }
16233 #endif
16234 
16235 
16236 void
16237 InitVM_ripper(void)
16238 {
16239  parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new());
16240 }
16241 
16242 void
16243 Init_ripper(void)
16244 {
16245  VALUE Ripper;
16246 
16247  InitVM(ripper);
16248  Ripper = rb_define_class("Ripper", rb_cObject);
16249  rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
16250  rb_define_alloc_func(Ripper, ripper_s_allocate);
16251  rb_define_method(Ripper, "initialize", ripper_initialize, -1);
16252  rb_define_method(Ripper, "parse", ripper_parse, 0);
16253  rb_define_method(Ripper, "column", ripper_column, 0);
16254  rb_define_method(Ripper, "filename", ripper_filename, 0);
16255  rb_define_method(Ripper, "lineno", ripper_lineno, 0);
16256  rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
16257  rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
16258  rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
16259  rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
16260 #ifdef RIPPER_DEBUG
16261  rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
16262  rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
16263  rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
16264 #endif
16265 
16266  ripper_id_gets = rb_intern("gets");
16267  ripper_init_eventids1(Ripper);
16268  ripper_init_eventids2(Ripper);
16269  /* ensure existing in symbol table */
16270  (void)rb_intern("||");
16271  (void)rb_intern("&&");
16272 
16273 # if 0
16274  /* Hack to let RDoc document SCRIPT_LINES__ */
16275 
16276  /*
16277  * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
16278  * after the assignment will be added as an Array of lines with the file
16279  * name as the key.
16280  */
16281  rb_define_global_const("SCRIPT_LINES__", Qnil);
16282 #endif
16283 
16284 }
16285 #endif /* RIPPER */
16286 
16287