Ruby  3.4.0dev (2024-11-05 revision e440268d51fe02b303e3817a7a733a0dac1c5091)
parse.c
1 /* A Bison parser, made by Lrama 0.6.10. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6  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 3 of the License, or
11  (at your option) 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, see <https://www.gnu.org/licenses/>. */
20 
21 /* As a special exception, you may create a larger work that contains
22  part or all of the Bison parser skeleton and distribute that work
23  under terms of your choice, so long as that work isn't itself a
24  parser generator using the skeleton or a modified version thereof
25  as a parser skeleton. Alternatively, if you modify or redistribute
26  the parser skeleton itself, you may (at your option) remove this
27  special exception, which will cause the skeleton and the resulting
28  Bison output files to be licensed under the GNU General Public
29  License without this special exception.
30 
31  This special exception was added by the Free Software Foundation in
32  version 2.2 of Bison. */
33 
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35  simplifying the original so-called "semantic" parser. */
36 
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38  especially those whose name start with YY_ or yy_. They are
39  private implementation details that can be changed or removed. */
40 
41 /* All symbols defined below should begin with yy or YY, to avoid
42  infringing on user name space. This should be done even for local
43  variables, as they might otherwise be expanded by user macros.
44  There are some unavoidable exceptions within include files to
45  define necessary library symbols; they are noted "INFRINGES ON
46  USER NAME SPACE" below. */
47 
48 /* Identify Bison output, and Bison version. */
49 #define YYBISON 30802
50 
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.8.2"
53 
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56 
57 /* Pure parsers. */
58 #define YYPURE 1
59 
60 /* Push parsers. */
61 #define YYPUSH 0
62 
63 /* Pull parsers. */
64 #define YYPULL 1
65 
66 
67 /* First part of user prologue. */
68 #line 14 "parse.y"
69 
70 
71 #if !YYPURE
72 # error needs pure parser
73 #endif
74 #define YYDEBUG 1
75 #define YYERROR_VERBOSE 1
76 #define YYSTACK_USE_ALLOCA 0
77 
78 /* For Ripper */
79 #ifdef RUBY_EXTCONF_H
80 # include RUBY_EXTCONF_H
81 #endif
82 
83 #include "ruby/internal/config.h"
84 
85 #include <errno.h>
86 
87 #ifdef UNIVERSAL_PARSER
88 
89 #include "internal/ruby_parser.h"
90 #include "parser_node.h"
91 #include "universal_parser.c"
92 
93 #ifdef RIPPER
94 #define STATIC_ID2SYM p->config->static_id2sym
95 #define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
96 #endif
97 
98 #else
99 
100 #include "internal.h"
101 #include "internal/compile.h"
102 #include "internal/compilers.h"
103 #include "internal/complex.h"
104 #include "internal/encoding.h"
105 #include "internal/error.h"
106 #include "internal/hash.h"
107 #include "internal/io.h"
108 #include "internal/numeric.h"
109 #include "internal/parse.h"
110 #include "internal/rational.h"
111 #include "internal/re.h"
112 #include "internal/ruby_parser.h"
113 #include "internal/symbol.h"
114 #include "internal/thread.h"
115 #include "internal/variable.h"
116 #include "node.h"
117 #include "parser_node.h"
118 #include "probes.h"
119 #include "regenc.h"
120 #include "ruby/encoding.h"
121 #include "ruby/regex.h"
122 #include "ruby/ruby.h"
123 #include "ruby/st.h"
124 #include "ruby/util.h"
125 #include "ruby/ractor.h"
126 #include "symbol.h"
127 
128 #ifndef RIPPER
129 static VALUE
130 syntax_error_new(void)
131 {
133 }
134 #endif
135 
136 static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc);
137 
138 #define compile_callback rb_suppress_tracing
139 #endif /* !UNIVERSAL_PARSER */
140 
141 #define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
142 #define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
143 
144 static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
145 
146 #ifndef RIPPER
147 static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
148 #endif
149 
150 static int
151 node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
152 {
153  return (n1->minus != n2->minus ||
154  n1->base != n2->base ||
155  strcmp(n1->val, n2->val));
156 }
157 
158 static int
159 node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
160 {
161  return (n1->minus != n2->minus ||
162  strcmp(n1->val, n2->val));
163 }
164 
165 static int
166 node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
167 {
168  return (n1->minus != n2->minus ||
169  n1->base != n2->base ||
170  n1->seen_point != n2->seen_point ||
171  strcmp(n1->val, n2->val));
172 }
173 
174 static int
175 node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
176 {
177  return (n1->minus != n2->minus ||
178  n1->base != n2->base ||
179  n1->seen_point != n2->seen_point ||
180  n1->type != n2->type ||
181  strcmp(n1->val, n2->val));
182 }
183 
184 static int
185 rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
186 {
187  return (n1->options != n2->options ||
188  rb_parser_string_hash_cmp(n1->string, n2->string));
189 }
190 
191 static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
192 static st_index_t rb_char_p_hash(const char *c);
193 
194 static int
195 literal_cmp(st_data_t val, st_data_t lit)
196 {
197  if (val == lit) return 0;
198 
199  NODE *node_val = RNODE(val);
200  NODE *node_lit = RNODE(lit);
201  enum node_type type_val = nd_type(node_val);
202  enum node_type type_lit = nd_type(node_lit);
203 
204  if (type_val != type_lit) {
205  return -1;
206  }
207 
208  switch (type_lit) {
209  case NODE_INTEGER:
210  return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
211  case NODE_FLOAT:
212  return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
213  case NODE_RATIONAL:
214  return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
215  case NODE_IMAGINARY:
216  return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
217  case NODE_STR:
218  return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
219  case NODE_SYM:
220  return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
221  case NODE_REGX:
222  return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
223  case NODE_LINE:
224  return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
225  case NODE_FILE:
226  return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
227  case NODE_ENCODING:
228  return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
229  default:
230 #ifdef UNIVERSAL_PARSER
231  abort();
232 #else
233  rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
234 #endif
235  }
236 }
237 
238 static st_index_t
239 literal_hash(st_data_t a)
240 {
241  NODE *node = (NODE *)a;
242  enum node_type type = nd_type(node);
243 
244  switch (type) {
245  case NODE_INTEGER:
246  return rb_char_p_hash(RNODE_INTEGER(node)->val);
247  case NODE_FLOAT:
248  return rb_char_p_hash(RNODE_FLOAT(node)->val);
249  case NODE_RATIONAL:
250  return rb_char_p_hash(RNODE_RATIONAL(node)->val);
251  case NODE_IMAGINARY:
252  return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
253  case NODE_STR:
254  return rb_parser_str_hash(RNODE_STR(node)->string);
255  case NODE_SYM:
256  return rb_parser_str_hash(RNODE_SYM(node)->string);
257  case NODE_REGX:
258  return rb_parser_str_hash(RNODE_REGX(node)->string);
259  case NODE_LINE:
260  return (st_index_t)node->nd_loc.beg_pos.lineno;
261  case NODE_FILE:
262  return rb_parser_str_hash(RNODE_FILE(node)->path);
263  case NODE_ENCODING:
264  return (st_index_t)RNODE_ENCODING(node)->enc;
265  default:
266 #ifdef UNIVERSAL_PARSER
267  abort();
268 #else
269  rb_bug("unexpected node: %s", ruby_node_name(type));
270 #endif
271  }
272 }
273 
274 static inline int
275 parse_isascii(int c)
276 {
277  return '\0' <= c && c <= '\x7f';
278 }
279 
280 #undef ISASCII
281 #define ISASCII parse_isascii
282 
283 static inline int
284 parse_isspace(int c)
285 {
286  return c == ' ' || ('\t' <= c && c <= '\r');
287 }
288 
289 #undef ISSPACE
290 #define ISSPACE parse_isspace
291 
292 static inline int
293 parse_iscntrl(int c)
294 {
295  return ('\0' <= c && c < ' ') || c == '\x7f';
296 }
297 
298 #undef ISCNTRL
299 #define ISCNTRL(c) parse_iscntrl(c)
300 
301 static inline int
302 parse_isupper(int c)
303 {
304  return 'A' <= c && c <= 'Z';
305 }
306 
307 static inline int
308 parse_islower(int c)
309 {
310  return 'a' <= c && c <= 'z';
311 }
312 
313 static inline int
314 parse_isalpha(int c)
315 {
316  return parse_isupper(c) || parse_islower(c);
317 }
318 
319 #undef ISALPHA
320 #define ISALPHA(c) parse_isalpha(c)
321 
322 static inline int
323 parse_isdigit(int c)
324 {
325  return '0' <= c && c <= '9';
326 }
327 
328 #undef ISDIGIT
329 #define ISDIGIT(c) parse_isdigit(c)
330 
331 static inline int
332 parse_isalnum(int c)
333 {
334  return parse_isalpha(c) || parse_isdigit(c);
335 }
336 
337 #undef ISALNUM
338 #define ISALNUM(c) parse_isalnum(c)
339 
340 static inline int
341 parse_isxdigit(int c)
342 {
343  return parse_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
344 }
345 
346 #undef ISXDIGIT
347 #define ISXDIGIT(c) parse_isxdigit(c)
348 
349 #include "parser_st.h"
350 
351 #undef STRCASECMP
352 #define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
353 
354 #undef STRNCASECMP
355 #define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
356 
357 #ifdef RIPPER
358 #include "ripper_init.h"
359 #endif
360 
361 enum rescue_context {
362  before_rescue,
363  after_rescue,
364  after_else,
365  after_ensure,
366 };
367 
368 struct lex_context {
369  unsigned int in_defined: 1;
370  unsigned int in_kwarg: 1;
371  unsigned int in_argdef: 1;
372  unsigned int in_def: 1;
373  unsigned int in_class: 1;
374  BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
375  BITFIELD(enum rescue_context, in_rescue, 2);
376  unsigned int cant_return: 1;
377 };
378 
379 typedef struct RNode_DEF_TEMP rb_node_def_temp_t;
380 
381 #if defined(__GNUC__) && !defined(__clang__)
382 // Suppress "parameter passing for argument of type 'struct
383 // lex_context' changed" notes. `struct lex_context` is file scope,
384 // and has no ABI compatibility issue.
386 RBIMPL_WARNING_IGNORED(-Wpsabi)
388 // Not sure why effective even after popped.
389 #endif
390 
391 #include "parse.h"
392 
393 #define NO_LEX_CTXT (struct lex_context){0}
394 
395 #ifndef WARN_PAST_SCOPE
396 # define WARN_PAST_SCOPE 0
397 #endif
398 
399 #define TAB_WIDTH 8
400 
401 #define yydebug (p->debug) /* disable the global variable definition */
402 
403 #define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
404 #define YY_LOCATION_PRINT(File, loc, p) \
405  rb_parser_printf(p, "%d.%d-%d.%d", \
406  (loc).beg_pos.lineno, (loc).beg_pos.column,\
407  (loc).end_pos.lineno, (loc).end_pos.column)
408 #define YYLLOC_DEFAULT(Current, Rhs, N) \
409  do \
410  if (N) \
411  { \
412  (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
413  (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
414  } \
415  else \
416  { \
417  (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
418  (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
419  } \
420  while (0)
421 #define YY_(Msgid) \
422  (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
423  "nesting too deep" : (Msgid))
424 
425 #define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
426  rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
427 #define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
428  rb_parser_set_location_of_delayed_token(p, &(Current))
429 #define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
430  rb_parser_set_location_of_heredoc_end(p, &(Current))
431 #define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
432  rb_parser_set_location_of_dummy_end(p, &(Current))
433 #define RUBY_SET_YYLLOC_OF_NONE(Current) \
434  rb_parser_set_location_of_none(p, &(Current))
435 #define RUBY_SET_YYLLOC(Current) \
436  rb_parser_set_location(p, &(Current))
437 #define RUBY_INIT_YYLLOC() \
438  { \
439  {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
440  {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
441  }
442 
443 #define IS_lex_state_for(x, ls) ((x) & (ls))
444 #define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
445 #define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
446 #define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
447 
448 # define SET_LEX_STATE(ls) \
449  parser_set_lex_state(p, ls, __LINE__)
450 static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
451 
452 typedef VALUE stack_type;
453 
454 static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
455 
456 # define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
457 # define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
458 # define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
459 # define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
460 # define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
461 
462 /* A flag to identify keyword_do_cond, "do" keyword after condition expression.
463  Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
464 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
465 #define COND_POP() BITSTACK_POP(cond_stack)
466 #define COND_P() BITSTACK_SET_P(cond_stack)
467 #define COND_SET(n) BITSTACK_SET(cond_stack, (n))
468 
469 /* A flag to identify keyword_do_block; "do" keyword after command_call.
470  Example: `foo 1, 2 do`. */
471 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
472 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
473 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
474 #define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
475 
476 struct vtable {
477  ID *tbl;
478  int pos;
479  int capa;
480  struct vtable *prev;
481 };
482 
483 struct local_vars {
484  struct vtable *args;
485  struct vtable *vars;
486  struct vtable *used;
487 # if WARN_PAST_SCOPE
488  struct vtable *past;
489 # endif
490  struct local_vars *prev;
491  struct {
492  NODE *outer, *inner, *current;
493  } numparam;
494  NODE *it;
495 };
496 
497 enum {
498  ORDINAL_PARAM = -1,
499  NO_PARAM = 0,
500  NUMPARAM_MAX = 9,
501 };
502 
503 #define DVARS_INHERIT ((void*)1)
504 #define DVARS_TOPSCOPE NULL
505 #define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
506 
507 typedef struct token_info {
508  const char *token;
509  rb_code_position_t beg;
510  int indent;
511  int nonspc;
512  struct token_info *next;
513 } token_info;
514 
516  const rb_code_position_t *pos;
517  struct end_expect_token_locations *prev;
519 
521  struct parser_string_buffer_elem *next;
522  long len; /* Total length of allocated buf */
523  long used; /* Current usage of buf */
524  rb_parser_string_t *buf[FLEX_ARY_LEN];
526 
527 typedef struct parser_string_buffer {
531 
532 #define AFTER_HEREDOC_WITHOUT_TERMINTOR ((rb_parser_string_t *)1)
533 
534 /*
535  Structure of Lexer Buffer:
536 
537  lex.pbeg lex.ptok lex.pcur lex.pend
538  | | | |
539  |------------+------------+------------|
540  |<---------->|
541  token
542 */
544  YYSTYPE *lval;
545  YYLTYPE *yylloc;
546 
547  struct {
548  rb_strterm_t *strterm;
549  rb_parser_lex_gets_func *gets;
550  rb_parser_input_data input;
551  parser_string_buffer_t string_buffer;
552  rb_parser_string_t *lastline;
553  rb_parser_string_t *nextline;
554  const char *pbeg;
555  const char *pcur;
556  const char *pend;
557  const char *ptok;
558  enum lex_state_e state;
559  /* track the nest level of any parens "()[]{}" */
560  int paren_nest;
561  /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
562  int lpar_beg;
563  /* track the nest level of only braces "{}" */
564  int brace_nest;
565  } lex;
566  stack_type cond_stack;
567  stack_type cmdarg_stack;
568  int tokidx;
569  int toksiz;
570  int heredoc_end;
571  int heredoc_indent;
572  int heredoc_line_indent;
573  char *tokenbuf;
574  struct local_vars *lvtbl;
575  st_table *pvtbl;
576  st_table *pktbl;
577  int line_count;
578  int ruby_sourceline; /* current line no. */
579  const char *ruby_sourcefile; /* current source file */
580  VALUE ruby_sourcefile_string;
581  rb_encoding *enc;
583  st_table *case_labels;
584  rb_node_exits_t *exits;
585 
586  VALUE debug_buffer;
587  VALUE debug_output;
588 
589  struct {
590  rb_parser_string_t *token;
591  int beg_line;
592  int beg_col;
593  int end_line;
594  int end_col;
595  } delayed;
596 
597  rb_ast_t *ast;
598  int node_id;
599 
600  st_table *warn_duplicate_keys_table;
601 
602  int max_numparam;
603  ID it_id;
604 
605  struct lex_context ctxt;
606 
607  NODE *eval_tree_begin;
608  NODE *eval_tree;
609  const struct rb_iseq_struct *parent_iseq;
610 
611 #ifdef UNIVERSAL_PARSER
612  const rb_parser_config_t *config;
613 #endif
614  /* compile_option */
615  signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
616 
617  unsigned int command_start:1;
618  unsigned int eofp: 1;
619  unsigned int ruby__end__seen: 1;
620  unsigned int debug: 1;
621  unsigned int has_shebang: 1;
622  unsigned int token_seen: 1;
623  unsigned int token_info_enabled: 1;
624 # if WARN_PAST_SCOPE
625  unsigned int past_scope_enabled: 1;
626 # endif
627  unsigned int error_p: 1;
628  unsigned int cr_seen: 1;
629 
630 #ifndef RIPPER
631  /* Ruby core only */
632 
633  unsigned int do_print: 1;
634  unsigned int do_loop: 1;
635  unsigned int do_chomp: 1;
636  unsigned int do_split: 1;
637  unsigned int error_tolerant: 1;
638  unsigned int keep_tokens: 1;
639 
640  VALUE error_buffer;
641  rb_parser_ary_t *debug_lines;
642  /*
643  * Store specific keyword locations to generate dummy end token.
644  * Refer to the tail of list element.
645  */
647  /* id for terms */
648  int token_id;
649  /* Array for term tokens */
650  rb_parser_ary_t *tokens;
651 #else
652  /* Ripper only */
653 
654  VALUE value;
655  VALUE result;
656  VALUE parsing_thread;
657  VALUE s_value; /* Token VALUE */
658  VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
659  VALUE s_value_stack;
660 #endif
661 };
662 
663 #define NUMPARAM_ID_P(id) numparam_id_p(p, id)
664 #define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
665 #define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
666 static int
667 numparam_id_p(struct parser_params *p, ID id)
668 {
669  if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
670  unsigned int idx = NUMPARAM_ID_TO_IDX(id);
671  return idx > 0 && idx <= NUMPARAM_MAX;
672 }
673 static void numparam_name(struct parser_params *p, ID id);
674 
675 #ifdef RIPPER
676 static void
677 after_shift(struct parser_params *p)
678 {
679  if (p->debug) {
680  rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
681  }
682  rb_ary_push(p->s_value_stack, p->s_value);
683  p->s_value = Qnil;
684 }
685 
686 static void
687 before_reduce(int len, struct parser_params *p)
688 {
689  // Initialize $$ with $1.
690  if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
691 }
692 
693 static void
694 after_reduce(int len, struct parser_params *p)
695 {
696  for (int i = 0; i < len; i++) {
697  VALUE tos = rb_ary_pop(p->s_value_stack);
698  if (p->debug) {
699  rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
700  }
701  }
702  if (p->debug) {
703  rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
704  }
705  rb_ary_push(p->s_value_stack, p->s_lvalue);
706  p->s_lvalue = Qnil;
707 }
708 
709 static void
710 after_shift_error_token(struct parser_params *p)
711 {
712  if (p->debug) {
713  rb_parser_printf(p, "after-shift-error-token:\n");
714  }
715  rb_ary_push(p->s_value_stack, Qnil);
716 }
717 
718 static void
719 after_pop_stack(int len, struct parser_params *p)
720 {
721  for (int i = 0; i < len; i++) {
722  VALUE tos = rb_ary_pop(p->s_value_stack);
723  if (p->debug) {
724  rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
725  }
726  }
727 }
728 #else
729 static void
730 after_shift(struct parser_params *p)
731 {
732 }
733 
734 static void
735 before_reduce(int len, struct parser_params *p)
736 {
737 }
738 
739 static void
740 after_reduce(int len, struct parser_params *p)
741 {
742 }
743 
744 static void
745 after_shift_error_token(struct parser_params *p)
746 {
747 }
748 
749 static void
750 after_pop_stack(int len, struct parser_params *p)
751 {
752 }
753 #endif
754 
755 #define intern_cstr(n,l,en) rb_intern3(n,l,en)
756 
757 #define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
758 
759 #define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
760 #define STR_NEW0() rb_enc_str_new(0,0,p->enc)
761 #define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
762 #define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
763 #define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
764 #define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
765 
766 #ifndef RIPPER
767 static inline int
768 char_at_end(struct parser_params *p, VALUE str, int when_empty)
769 {
770  long len = RSTRING_LEN(str);
771  return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
772 }
773 #endif
774 
775 static void
776 pop_pvtbl(struct parser_params *p, st_table *tbl)
777 {
778  st_free_table(p->pvtbl);
779  p->pvtbl = tbl;
780 }
781 
782 static void
783 pop_pktbl(struct parser_params *p, st_table *tbl)
784 {
785  if (p->pktbl) st_free_table(p->pktbl);
786  p->pktbl = tbl;
787 }
788 
789 #define STRING_BUF_DEFAULT_LEN 16
790 
791 static void
792 string_buffer_init(struct parser_params *p)
793 {
794  parser_string_buffer_t *buf = &p->lex.string_buffer;
795  const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
796 
797  buf->head = buf->last = xmalloc(size);
798  buf->head->len = STRING_BUF_DEFAULT_LEN;
799  buf->head->used = 0;
800  buf->head->next = NULL;
801 }
802 
803 static void
804 string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
805 {
806  parser_string_buffer_t *buf = &p->lex.string_buffer;
807 
808  if (buf->head->used >= buf->head->len) {
810  long n = buf->head->len * 2;
811  const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
812 
813  elem = xmalloc(size);
814  elem->len = n;
815  elem->used = 0;
816  elem->next = NULL;
817  buf->last->next = elem;
818  buf->last = elem;
819  }
820  buf->last->buf[buf->last->used++] = str;
821 }
822 
823 static void
824 string_buffer_free(struct parser_params *p)
825 {
826  parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
827 
828  while (elem) {
829  parser_string_buffer_elem_t *next_elem = elem->next;
830 
831  for (long i = 0; i < elem->used; i++) {
832  rb_parser_string_free(p, elem->buf[i]);
833  }
834 
835  xfree(elem);
836  elem = next_elem;
837  }
838 }
839 
840 #ifndef RIPPER
841 static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
842 
843 static void
844 debug_end_expect_token_locations(struct parser_params *p, const char *name)
845 {
846  if(p->debug) {
847  VALUE mesg = rb_sprintf("%s: [", name);
848  int i = 0;
849  for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
850  if (i > 0)
851  rb_str_cat_cstr(mesg, ", ");
852  rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
853  i++;
854  }
855  rb_str_cat_cstr(mesg, "]\n");
856  flush_debug_buffer(p, p->debug_output, mesg);
857  }
858 }
859 
860 static void
861 push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
862 {
863  if(!p->error_tolerant) return;
864 
865  end_expect_token_locations_t *locations;
866  locations = ALLOC(end_expect_token_locations_t);
867  locations->pos = pos;
868  locations->prev = p->end_expect_token_locations;
869  p->end_expect_token_locations = locations;
870 
871  debug_end_expect_token_locations(p, "push_end_expect_token_locations");
872 }
873 
874 static void
875 pop_end_expect_token_locations(struct parser_params *p)
876 {
877  if(!p->end_expect_token_locations) return;
878 
879  end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
880  ruby_sized_xfree(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
881  p->end_expect_token_locations = locations;
882 
883  debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
884 }
885 
887 peek_end_expect_token_locations(struct parser_params *p)
888 {
889  return p->end_expect_token_locations;
890 }
891 
892 static const char *
893 parser_token2char(struct parser_params *p, enum yytokentype tok)
894 {
895  switch ((int) tok) {
896 #define TOKEN2CHAR(tok) case tok: return (#tok);
897 #define TOKEN2CHAR2(tok, name) case tok: return (name);
898  TOKEN2CHAR2(' ', "word_sep");
899  TOKEN2CHAR2('!', "!")
900  TOKEN2CHAR2('%', "%");
901  TOKEN2CHAR2('&', "&");
902  TOKEN2CHAR2('*', "*");
903  TOKEN2CHAR2('+', "+");
904  TOKEN2CHAR2('-', "-");
905  TOKEN2CHAR2('/', "/");
906  TOKEN2CHAR2('<', "<");
907  TOKEN2CHAR2('=', "=");
908  TOKEN2CHAR2('>', ">");
909  TOKEN2CHAR2('?', "?");
910  TOKEN2CHAR2('^', "^");
911  TOKEN2CHAR2('|', "|");
912  TOKEN2CHAR2('~', "~");
913  TOKEN2CHAR2(':', ":");
914  TOKEN2CHAR2(',', ",");
915  TOKEN2CHAR2('.', ".");
916  TOKEN2CHAR2(';', ";");
917  TOKEN2CHAR2('`', "`");
918  TOKEN2CHAR2('\n', "nl");
919  TOKEN2CHAR2('{', "\"{\"");
920  TOKEN2CHAR2('}', "\"}\"");
921  TOKEN2CHAR2('[', "\"[\"");
922  TOKEN2CHAR2(']', "\"]\"");
923  TOKEN2CHAR2('(', "\"(\"");
924  TOKEN2CHAR2(')', "\")\"");
925  TOKEN2CHAR2('\\', "backslash");
926  TOKEN2CHAR(keyword_class);
927  TOKEN2CHAR(keyword_module);
928  TOKEN2CHAR(keyword_def);
929  TOKEN2CHAR(keyword_undef);
930  TOKEN2CHAR(keyword_begin);
931  TOKEN2CHAR(keyword_rescue);
932  TOKEN2CHAR(keyword_ensure);
933  TOKEN2CHAR(keyword_end);
934  TOKEN2CHAR(keyword_if);
935  TOKEN2CHAR(keyword_unless);
936  TOKEN2CHAR(keyword_then);
937  TOKEN2CHAR(keyword_elsif);
938  TOKEN2CHAR(keyword_else);
939  TOKEN2CHAR(keyword_case);
940  TOKEN2CHAR(keyword_when);
941  TOKEN2CHAR(keyword_while);
942  TOKEN2CHAR(keyword_until);
943  TOKEN2CHAR(keyword_for);
944  TOKEN2CHAR(keyword_break);
945  TOKEN2CHAR(keyword_next);
946  TOKEN2CHAR(keyword_redo);
947  TOKEN2CHAR(keyword_retry);
948  TOKEN2CHAR(keyword_in);
949  TOKEN2CHAR(keyword_do);
950  TOKEN2CHAR(keyword_do_cond);
951  TOKEN2CHAR(keyword_do_block);
952  TOKEN2CHAR(keyword_do_LAMBDA);
953  TOKEN2CHAR(keyword_return);
954  TOKEN2CHAR(keyword_yield);
955  TOKEN2CHAR(keyword_super);
956  TOKEN2CHAR(keyword_self);
957  TOKEN2CHAR(keyword_nil);
958  TOKEN2CHAR(keyword_true);
959  TOKEN2CHAR(keyword_false);
960  TOKEN2CHAR(keyword_and);
961  TOKEN2CHAR(keyword_or);
962  TOKEN2CHAR(keyword_not);
963  TOKEN2CHAR(modifier_if);
964  TOKEN2CHAR(modifier_unless);
965  TOKEN2CHAR(modifier_while);
966  TOKEN2CHAR(modifier_until);
967  TOKEN2CHAR(modifier_rescue);
968  TOKEN2CHAR(keyword_alias);
969  TOKEN2CHAR(keyword_defined);
970  TOKEN2CHAR(keyword_BEGIN);
971  TOKEN2CHAR(keyword_END);
972  TOKEN2CHAR(keyword__LINE__);
973  TOKEN2CHAR(keyword__FILE__);
974  TOKEN2CHAR(keyword__ENCODING__);
975  TOKEN2CHAR(tIDENTIFIER);
976  TOKEN2CHAR(tFID);
977  TOKEN2CHAR(tGVAR);
978  TOKEN2CHAR(tIVAR);
979  TOKEN2CHAR(tCONSTANT);
980  TOKEN2CHAR(tCVAR);
981  TOKEN2CHAR(tLABEL);
982  TOKEN2CHAR(tINTEGER);
983  TOKEN2CHAR(tFLOAT);
984  TOKEN2CHAR(tRATIONAL);
985  TOKEN2CHAR(tIMAGINARY);
986  TOKEN2CHAR(tCHAR);
987  TOKEN2CHAR(tNTH_REF);
988  TOKEN2CHAR(tBACK_REF);
989  TOKEN2CHAR(tSTRING_CONTENT);
990  TOKEN2CHAR(tREGEXP_END);
991  TOKEN2CHAR(tDUMNY_END);
992  TOKEN2CHAR(tSP);
993  TOKEN2CHAR(tUPLUS);
994  TOKEN2CHAR(tUMINUS);
995  TOKEN2CHAR(tPOW);
996  TOKEN2CHAR(tCMP);
997  TOKEN2CHAR(tEQ);
998  TOKEN2CHAR(tEQQ);
999  TOKEN2CHAR(tNEQ);
1000  TOKEN2CHAR(tGEQ);
1001  TOKEN2CHAR(tLEQ);
1002  TOKEN2CHAR(tANDOP);
1003  TOKEN2CHAR(tOROP);
1004  TOKEN2CHAR(tMATCH);
1005  TOKEN2CHAR(tNMATCH);
1006  TOKEN2CHAR(tDOT2);
1007  TOKEN2CHAR(tDOT3);
1008  TOKEN2CHAR(tBDOT2);
1009  TOKEN2CHAR(tBDOT3);
1010  TOKEN2CHAR(tAREF);
1011  TOKEN2CHAR(tASET);
1012  TOKEN2CHAR(tLSHFT);
1013  TOKEN2CHAR(tRSHFT);
1014  TOKEN2CHAR(tANDDOT);
1015  TOKEN2CHAR(tCOLON2);
1016  TOKEN2CHAR(tCOLON3);
1017  TOKEN2CHAR(tOP_ASGN);
1018  TOKEN2CHAR(tASSOC);
1019  TOKEN2CHAR(tLPAREN);
1020  TOKEN2CHAR(tLPAREN_ARG);
1021  TOKEN2CHAR(tRPAREN);
1022  TOKEN2CHAR(tLBRACK);
1023  TOKEN2CHAR(tLBRACE);
1024  TOKEN2CHAR(tLBRACE_ARG);
1025  TOKEN2CHAR(tSTAR);
1026  TOKEN2CHAR(tDSTAR);
1027  TOKEN2CHAR(tAMPER);
1028  TOKEN2CHAR(tLAMBDA);
1029  TOKEN2CHAR(tSYMBEG);
1030  TOKEN2CHAR(tSTRING_BEG);
1031  TOKEN2CHAR(tXSTRING_BEG);
1032  TOKEN2CHAR(tREGEXP_BEG);
1033  TOKEN2CHAR(tWORDS_BEG);
1034  TOKEN2CHAR(tQWORDS_BEG);
1035  TOKEN2CHAR(tSYMBOLS_BEG);
1036  TOKEN2CHAR(tQSYMBOLS_BEG);
1037  TOKEN2CHAR(tSTRING_END);
1038  TOKEN2CHAR(tSTRING_DEND);
1039  TOKEN2CHAR(tSTRING_DBEG);
1040  TOKEN2CHAR(tSTRING_DVAR);
1041  TOKEN2CHAR(tLAMBEG);
1042  TOKEN2CHAR(tLABEL_END);
1043  TOKEN2CHAR(tIGNORED_NL);
1044  TOKEN2CHAR(tCOMMENT);
1045  TOKEN2CHAR(tEMBDOC_BEG);
1046  TOKEN2CHAR(tEMBDOC);
1047  TOKEN2CHAR(tEMBDOC_END);
1048  TOKEN2CHAR(tHEREDOC_BEG);
1049  TOKEN2CHAR(tHEREDOC_END);
1050  TOKEN2CHAR(k__END__);
1051  TOKEN2CHAR(tLOWEST);
1052  TOKEN2CHAR(tUMINUS_NUM);
1053  TOKEN2CHAR(tLAST_TOKEN);
1054 #undef TOKEN2CHAR
1055 #undef TOKEN2CHAR2
1056  }
1057 
1058  rb_bug("parser_token2id: unknown token %d", tok);
1059 
1060  UNREACHABLE_RETURN(0);
1061 }
1062 #else
1063 static void
1064 push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1065 {
1066 }
1067 
1068 static void
1069 pop_end_expect_token_locations(struct parser_params *p)
1070 {
1071 }
1072 #endif
1073 
1074 RBIMPL_ATTR_NONNULL((1, 2, 3))
1075 static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1076 RBIMPL_ATTR_NONNULL((1, 2))
1077 static int parser_yyerror0(struct parser_params*, const char*);
1078 #define yyerror0(msg) parser_yyerror0(p, (msg))
1079 #define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1080 #define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1081 #define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1082 #define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1083 #define lex_eol_p(p) lex_eol_n_p(p, 0)
1084 #define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1085 #define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1086 #define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1087 
1088 static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1089 static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1090 static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1091 static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1092 static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1093 
1094 #ifdef RIPPER
1095 #define compile_for_eval (0)
1096 #else
1097 #define compile_for_eval (p->parent_iseq != 0)
1098 #endif
1099 
1100 #define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1101 
1102 #define CALL_Q_P(q) ((q) == tANDDOT)
1103 #define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1104 
1105 #define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1106 
1107 static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1108 
1109 static inline void
1110 rb_discard_node(struct parser_params *p, NODE *n)
1111 {
1112  rb_ast_delete_node(p->ast, n);
1113 }
1114 
1115 static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1116 static rb_node_scope_t *rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1117 static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1118 static rb_node_if_t *rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc);
1119 static rb_node_unless_t *rb_node_unless_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *end_keyword_loc);
1120 static rb_node_case_t *rb_node_case_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1121 static rb_node_case2_t *rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1122 static rb_node_case3_t *rb_node_case3_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1123 static rb_node_when_t *rb_node_when_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc);
1124 static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1125 static rb_node_while_t *rb_node_while_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1126 static rb_node_until_t *rb_node_until_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1127 static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1128 static rb_node_for_t *rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc);
1129 static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1130 static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1131 static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1132 static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1133 static rb_node_resbody_t *rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1134 static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1135 static rb_node_and_t *rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1136 static rb_node_or_t *rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1137 static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1138 static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1139 static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1140 static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1141 static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1142 static rb_node_cdecl_t *rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1143 static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1144 static rb_node_op_asgn1_t *rb_node_op_asgn1_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *index, NODE *rvalue, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1145 static rb_node_op_asgn2_t *rb_node_op_asgn2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, ID nd_vid, ID nd_mid, bool nd_aid, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1146 static rb_node_op_asgn_or_t *rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1147 static rb_node_op_asgn_and_t *rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1148 static rb_node_op_cdecl_t *rb_node_op_cdecl_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, ID nd_aid, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1149 static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1150 static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1151 static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1152 static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1153 static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1154 static rb_node_super_t *rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc);
1155 static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1156 static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1157 static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1158 static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1159 static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1160 static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1161 static rb_node_yield_t *rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1162 static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1163 static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1164 static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1165 static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1166 static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1167 static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1168 static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1169 static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1170 static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1171 static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1172 static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1173 static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1174 static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1175 static rb_node_imaginary_t * rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type, const YYLTYPE *loc);
1176 static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1177 static rb_node_dstr_t *rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1178 static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1179 static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1180 static rb_node_dxstr_t *rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1181 static rb_node_evstr_t *rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1182 static rb_node_regx_t *rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc);
1183 static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1184 static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1185 static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1186 static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1187 static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1188 static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1189 static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1190 static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1191 static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1192 static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1193 static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1194 static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1195 static rb_node_alias_t *rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1196 static rb_node_valias_t *rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1197 static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1198 static rb_node_class_t *rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc);
1199 static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc);
1200 static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc);
1201 static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc);
1202 static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1203 static rb_node_dot2_t *rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc);
1204 static rb_node_dot3_t *rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc);
1205 static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1206 static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1207 static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1208 static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1209 static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1210 static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1211 static rb_node_postexe_t *rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1212 static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1213 static rb_node_dsym_t *rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1214 static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1215 static rb_node_lambda_t *rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1216 static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1217 static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1218 static rb_node_fndptn_t *rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1219 static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1220 static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1221 static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1222 
1223 #define NEW_SCOPE(a,b,loc) (NODE *)rb_node_scope_new(p,a,b,loc)
1224 #define NEW_SCOPE2(t,a,b,loc) (NODE *)rb_node_scope_new2(p,t,a,b,loc)
1225 #define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1226 #define NEW_IF(c,t,e,loc) (NODE *)rb_node_if_new(p,c,t,e,loc)
1227 #define NEW_UNLESS(c,t,e,loc,k_loc,t_loc,e_loc) (NODE *)rb_node_unless_new(p,c,t,e,loc,k_loc,t_loc,e_loc)
1228 #define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1229 #define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1230 #define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1231 #define NEW_WHEN(c,t,e,loc,k_loc,t_loc) (NODE *)rb_node_when_new(p,c,t,e,loc,k_loc,t_loc)
1232 #define NEW_IN(c,t,e,loc) (NODE *)rb_node_in_new(p,c,t,e,loc)
1233 #define NEW_WHILE(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_while_new(p,c,b,n,loc,k_loc,c_loc)
1234 #define NEW_UNTIL(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_until_new(p,c,b,n,loc,k_loc,c_loc)
1235 #define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1236 #define NEW_FOR(i,b,loc) (NODE *)rb_node_for_new(p,i,b,loc)
1237 #define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1238 #define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1239 #define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1240 #define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1241 #define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1242 #define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1243 #define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1244 #define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1245 #define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1246 #define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1247 #define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1248 #define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1249 #define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1250 #define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1251 #define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1252 #define NEW_OP_ASGN1(r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc) (NODE *)rb_node_op_asgn1_new(p,r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc)
1253 #define NEW_OP_ASGN2(r,t,i,o,val,loc,c_op_loc,m_loc,b_op_loc) (NODE *)rb_node_op_asgn2_new(p,r,val,i,o,t,loc,c_op_loc,m_loc,b_op_loc)
1254 #define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1255 #define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1256 #define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1257 #define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1258 #define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1259 #define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1260 #define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1261 #define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1262 #define NEW_SUPER(a,loc) (NODE *)rb_node_super_new(p,a,loc)
1263 #define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1264 #define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1265 #define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1266 #define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1267 #define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1268 #define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1269 #define NEW_YIELD(a,loc) (NODE *)rb_node_yield_new(p,a,loc)
1270 #define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1271 #define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1272 #define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1273 #define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1274 #define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1275 #define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1276 #define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1277 #define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1278 #define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1279 #define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1280 #define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1281 #define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1282 #define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1283 #define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1284 #define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1285 #define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1286 #define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1287 #define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1288 #define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1289 #define NEW_EVSTR(n,loc) (NODE *)rb_node_evstr_new(p,n,loc)
1290 #define NEW_REGX(str,opts,loc) (NODE *)rb_node_regx_new(p,str,opts,loc)
1291 #define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1292 #define NEW_ARGS(loc) rb_node_args_new(p,loc)
1293 #define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1294 #define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1295 #define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1296 #define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1297 #define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1298 #define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1299 #define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1300 #define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1301 #define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1302 #define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1303 #define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1304 #define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1305 #define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1306 #define NEW_CLASS(n,b,s,loc) (NODE *)rb_node_class_new(p,n,b,s,loc)
1307 #define NEW_MODULE(n,b,loc) (NODE *)rb_node_module_new(p,n,b,loc)
1308 #define NEW_SCLASS(r,b,loc) (NODE *)rb_node_sclass_new(p,r,b,loc)
1309 #define NEW_COLON2(c,i,loc) (NODE *)rb_node_colon2_new(p,c,i,loc)
1310 #define NEW_COLON3(i,loc) (NODE *)rb_node_colon3_new(p,i,loc)
1311 #define NEW_DOT2(b,e,loc) (NODE *)rb_node_dot2_new(p,b,e,loc)
1312 #define NEW_DOT3(b,e,loc) (NODE *)rb_node_dot3_new(p,b,e,loc)
1313 #define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1314 #define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1315 #define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1316 #define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1317 #define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1318 #define NEW_DEFINED(e,loc) (NODE *)rb_node_defined_new(p,e,loc)
1319 #define NEW_POSTEXE(b,loc) (NODE *)rb_node_postexe_new(p,b,loc)
1320 #define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1321 #define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1322 #define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1323 #define NEW_LAMBDA(a,b,loc) (NODE *)rb_node_lambda_new(p,a,b,loc)
1324 #define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1325 #define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1326 #define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1327 #define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1328 #define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1329 #define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1330 #define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1331 
1332 enum internal_node_type {
1333  NODE_INTERNAL_ONLY = NODE_LAST,
1334  NODE_DEF_TEMP,
1335  NODE_EXITS,
1336  NODE_INTERNAL_LAST
1337 };
1338 
1339 static const char *
1340 parser_node_name(int node)
1341 {
1342  switch (node) {
1343  case NODE_DEF_TEMP:
1344  return "NODE_DEF_TEMP";
1345  case NODE_EXITS:
1346  return "NODE_EXITS";
1347  default:
1348  return ruby_node_name(node);
1349  }
1350 }
1351 
1352 /* This node is parse.y internal */
1353 struct RNode_DEF_TEMP {
1354  NODE node;
1355 
1356  /* for NODE_DEFN/NODE_DEFS */
1357 
1358  struct RNode *nd_def;
1359  ID nd_mid;
1360 
1361  struct {
1362  int max_numparam;
1363  NODE *numparam_save;
1364  struct lex_context ctxt;
1365  } save;
1366 };
1367 
1368 #define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1369 
1370 static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1371 static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1372 static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1373 static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1374 static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1375 
1376 #define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1377 #define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1378 #define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1379 #define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1380 
1381 /* Make a new internal node, which should not be appeared in the
1382  * result AST and does not have node_id and location. */
1383 static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1384 #define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1385 
1386 static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1387 
1388 static int
1389 parser_get_node_id(struct parser_params *p)
1390 {
1391  int node_id = p->node_id;
1392  p->node_id++;
1393  return node_id;
1394 }
1395 
1396 static void
1397 anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1398 {
1399  if (id == tANDDOT) {
1400  yyerror1(loc, "&. inside multiple assignment destination");
1401  }
1402 }
1403 
1404 static inline void
1405 set_line_body(NODE *body, int line)
1406 {
1407  if (!body) return;
1408  switch (nd_type(body)) {
1409  case NODE_RESCUE:
1410  case NODE_ENSURE:
1411  nd_set_line(body, line);
1412  }
1413 }
1414 
1415 static void
1416 set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1417 {
1418  RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1419  nd_set_line(node, beg->end_pos.lineno);
1420 }
1421 
1422 static NODE *
1423 last_expr_node(NODE *expr)
1424 {
1425  while (expr) {
1426  if (nd_type_p(expr, NODE_BLOCK)) {
1427  expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1428  }
1429  else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1430  expr = RNODE_BEGIN(expr)->nd_body;
1431  }
1432  else {
1433  break;
1434  }
1435  }
1436  return expr;
1437 }
1438 
1439 #ifndef RIPPER
1440 #define yyparse ruby_yyparse
1441 #endif
1442 
1443 static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1444 static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1445 #define new_nil(loc) NEW_NIL(loc)
1446 static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1447 static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
1448 static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1449 static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1450 
1451 static NODE *newline_node(NODE*);
1452 static void fixpos(NODE*,NODE*);
1453 
1454 static int value_expr_gen(struct parser_params*,NODE*);
1455 static void void_expr(struct parser_params*,NODE*);
1456 static NODE *remove_begin(NODE*);
1457 #define value_expr(node) value_expr_gen(p, (node))
1458 static NODE *void_stmts(struct parser_params*,NODE*);
1459 static void reduce_nodes(struct parser_params*,NODE**);
1460 static void block_dup_check(struct parser_params*,NODE*,NODE*);
1461 
1462 static NODE *block_append(struct parser_params*,NODE*,NODE*);
1463 static NODE *list_append(struct parser_params*,NODE*,NODE*);
1464 static NODE *list_concat(NODE*,NODE*);
1465 static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1466 static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1467 static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1468 static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1469 static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*);
1470 static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1471 static NODE *str2dstr(struct parser_params*,NODE*);
1472 static NODE *evstr2dstr(struct parser_params*,NODE*);
1473 static NODE *splat_array(NODE*);
1474 static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1475 
1476 static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1477 static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1478 static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1479 static NODE *new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc);
1480 static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {RNODE_ITER(b)->nd_iter = m; b->nd_loc = *loc; return b;}
1481 
1482 static bool args_info_empty_p(struct rb_args_info *args);
1483 static rb_node_args_t *new_args(struct parser_params*,rb_node_args_aux_t*,rb_node_opt_arg_t*,ID,rb_node_args_aux_t*,rb_node_args_t*,const YYLTYPE*);
1484 static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1485 static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1486 static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1487 static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1488 static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1489 static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1490 static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1491 
1492 static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1493 static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1494 
1495 static NODE* negate_lit(struct parser_params*, NODE*);
1496 static NODE *ret_args(struct parser_params*,NODE*);
1497 static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1498 static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*);
1499 static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1500 
1501 static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1502 static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1503 
1504 static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1505 static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1506 
1507 static VALUE rb_backref_error(struct parser_params*,NODE*);
1508 static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1509 
1510 static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1511 static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1512 static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1513 static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1514 static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1515 
1516 static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1517 
1518 static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1519 static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1520 
1521 static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1522 static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1523 
1524 static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
1525 
1526 static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
1527 
1528 #define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1529 
1530 static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1531 
1532 static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1533 
1534 static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1535 
1536 static rb_ast_id_table_t *local_tbl(struct parser_params*);
1537 
1538 static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1539 static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1540 #define reg_fragment_check rb_parser_reg_fragment_check
1541 int reg_fragment_check(struct parser_params*, rb_parser_string_t*, int);
1542 
1543 static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1544 static NODE *heredoc_dedent(struct parser_params*,NODE*);
1545 
1546 static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1547 
1548 #ifdef RIPPER
1549 #define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1550 #define set_value(val) (p->s_lvalue = val)
1551 static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1552 static int id_is_var(struct parser_params *p, ID id);
1553 #endif
1554 
1555 RUBY_SYMBOL_EXPORT_BEGIN
1556 VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1557 int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1558 enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1559 VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1560 void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1561 PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1562 YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1563 YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1564 YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1565 YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1566 YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1567 YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1568 void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1569 RUBY_SYMBOL_EXPORT_END
1570 
1571 static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1572 static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1573 static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1574 static VALUE formal_argument_error(struct parser_params*, ID);
1575 static ID shadowing_lvar(struct parser_params*,ID);
1576 static void new_bv(struct parser_params*,ID);
1577 
1578 static void local_push(struct parser_params*,int);
1579 static void local_pop(struct parser_params*);
1580 static void local_var(struct parser_params*, ID);
1581 static void arg_var(struct parser_params*, ID);
1582 static int local_id(struct parser_params *p, ID id);
1583 static int local_id_ref(struct parser_params*, ID, ID **);
1584 #define internal_id rb_parser_internal_id
1585 ID internal_id(struct parser_params*);
1586 static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1587 static int check_forwarding_args(struct parser_params*);
1588 static void add_forwarding_args(struct parser_params *p);
1589 static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1590 
1591 static const struct vtable *dyna_push(struct parser_params *);
1592 static void dyna_pop(struct parser_params*, const struct vtable *);
1593 static int dyna_in_block(struct parser_params*);
1594 #define dyna_var(p, id) local_var(p, id)
1595 static int dvar_defined(struct parser_params*, ID);
1596 #define dvar_defined_ref rb_parser_dvar_defined_ref
1597 int dvar_defined_ref(struct parser_params*, ID, ID**);
1598 static int dvar_curr(struct parser_params*,ID);
1599 
1600 static int lvar_defined(struct parser_params*, ID);
1601 
1602 static NODE *numparam_push(struct parser_params *p);
1603 static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1604 
1605 #define METHOD_NOT '!'
1606 
1607 #define idFWD_REST '*'
1608 #define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1609 #define idFWD_BLOCK '&'
1610 #define idFWD_ALL idDot3
1611 #define arg_FWD_BLOCK idFWD_BLOCK
1612 
1613 #define RE_ONIG_OPTION_IGNORECASE 1
1614 #define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1615 #define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1616 #define RE_OPTION_ONCE (1<<16)
1617 #define RE_OPTION_ENCODING_SHIFT 8
1618 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1619 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1620 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1621 #define RE_OPTION_MASK 0xff
1622 #define RE_OPTION_ARG_ENCODING_NONE 32
1623 
1624 #define CHECK_LITERAL_WHEN (st_table *)1
1625 #define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1626 
1627 #define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1628 RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1629 
1630 #define TOKEN2ID(tok) ( \
1631  tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1632  tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1633  tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1634  tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1635  tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1636  tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1637  ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1638 
1639 /****** Ripper *******/
1640 
1641 #ifdef RIPPER
1642 
1643 #include "eventids1.h"
1644 #include "eventids2.h"
1645 
1646 extern const struct ripper_parser_ids ripper_parser_ids;
1647 
1648 static VALUE ripper_dispatch0(struct parser_params*,ID);
1649 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1650 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1651 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1652 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1653 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1654 static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1655 void ripper_error(struct parser_params *p);
1656 
1657 #define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1658 #define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1659 #define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1660 #define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1661 #define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1662 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1663 #define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1664 
1665 #define yyparse ripper_yyparse
1666 
1667 static VALUE
1668 aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1669 {
1670  if (!NIL_P(pre_arg)) {
1671  if (!NIL_P(pre_args)) {
1672  rb_ary_unshift(pre_args, pre_arg);
1673  }
1674  else {
1675  pre_args = rb_ary_new_from_args(1, pre_arg);
1676  }
1677  }
1678  return pre_args;
1679 }
1680 
1681 #define ID2VAL(id) STATIC_ID2SYM(id)
1682 #define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1683 #endif /* RIPPER */
1684 
1685 #define KWD2EID(t, v) keyword_##t
1686 
1687 static NODE *
1688 new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, const YYLTYPE *loc)
1689 {
1690  body = remove_begin(body);
1691  reduce_nodes(p, &body);
1692  NODE *n = NEW_SCOPE(args, body, loc);
1693  nd_set_line(n, loc->end_pos.lineno);
1694  set_line_body(body, loc->beg_pos.lineno);
1695  return n;
1696 }
1697 
1698 static NODE *
1699 rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1700  const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1701 {
1702  YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1703  rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1704  loc.beg_pos = arg_loc->beg_pos;
1705  return NEW_RESCUE(arg, rescue, 0, &loc);
1706 }
1707 
1708 static NODE *add_block_exit(struct parser_params *p, NODE *node);
1709 static rb_node_exits_t *init_block_exit(struct parser_params *p);
1710 static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1711 static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1712 static void clear_block_exit(struct parser_params *p, bool error);
1713 
1714 static void
1715 next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1716 {
1717  next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1718 }
1719 
1720 static void
1721 restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1722 {
1723  /* See: def_name action */
1724  struct lex_context ctxt = temp->save.ctxt;
1725  p->ctxt.in_def = ctxt.in_def;
1726  p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1727  p->ctxt.in_rescue = ctxt.in_rescue;
1728  p->max_numparam = temp->save.max_numparam;
1729  numparam_pop(p, temp->save.numparam_save);
1730  clear_block_exit(p, true);
1731 }
1732 
1733 static void
1734 endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1735 {
1736  if (is_attrset_id(mid)) {
1737  yyerror1(loc, "setter method cannot be defined in an endless method definition");
1738  }
1739  token_info_drop(p, "def", loc->beg_pos);
1740 }
1741 
1742 #define debug_token_line(p, name, line) do { \
1743  if (p->debug) { \
1744  const char *const pcur = p->lex.pcur; \
1745  const char *const ptok = p->lex.ptok; \
1746  rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1747  line, p->ruby_sourceline, \
1748  ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1749  } \
1750  } while (0)
1751 
1752 #define begin_definition(k, loc_beg, loc_end) \
1753  do { \
1754  if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1755  /* singleton class */ \
1756  p->ctxt.cant_return = !p->ctxt.in_def; \
1757  p->ctxt.in_def = 0; \
1758  } \
1759  else if (p->ctxt.in_def) { \
1760  YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1761  yyerror1(&loc, k " definition in method body"); \
1762  } \
1763  else { \
1764  p->ctxt.cant_return = 1; \
1765  } \
1766  local_push(p, 0); \
1767  } while (0)
1768 
1769 #ifndef RIPPER
1770 # define ifndef_ripper(x) (x)
1771 # define ifdef_ripper(r,x) (x)
1772 #else
1773 # define ifndef_ripper(x)
1774 # define ifdef_ripper(r,x) (r)
1775 #endif
1776 
1777 # define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1778 # define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1779 # define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1780 # define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1781 # define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1782 # define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1783 # define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1784 # define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1785 # define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1786 # define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1787 # define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1788 # define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1789 # define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1790 # define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1791 # define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1792 # define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1793 # define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1794 # define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1795 # define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1796 # define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1797 #ifdef RIPPER
1798 extern const ID id_warn, id_warning, id_gets, id_assoc;
1799 # define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1800 # define WARN_S_L(s,l) STR_NEW(s,l)
1801 # define WARN_S(s) STR_NEW2(s)
1802 # define WARN_I(i) INT2NUM(i)
1803 # define WARN_ID(i) rb_id2str(i)
1804 # define PRIsWARN PRIsVALUE
1805 # define rb_warn0L_experimental(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1806 # define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1807 # define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1808 # ifdef HAVE_VA_ARGS_MACRO
1809 # define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1810 # else
1811 # define WARN_CALL rb_funcall
1812 # endif
1813 # define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1814 # define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1815 # ifdef HAVE_VA_ARGS_MACRO
1816 # define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1817 # else
1818 # define WARNING_CALL rb_funcall
1819 # endif
1820 # define compile_error ripper_compile_error
1821 #else
1822 # define WARN_S_L(s,l) s
1823 # define WARN_S(s) s
1824 # define WARN_I(i) i
1825 # define WARN_ID(i) rb_id2name(i)
1826 # define PRIsWARN PRIsVALUE
1827 # define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1828 # define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1829 # define WARN_CALL rb_compile_warn
1830 # define rb_warn0L_experimental(l,fmt) rb_category_compile_warn(RB_WARN_CATEGORY_EXPERIMENTAL, WARN_ARGS_L(l, fmt, 1))
1831 # define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1832 # define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1833 # define WARNING_CALL rb_compile_warning
1834 PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1835 # define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1836 #endif
1837 
1838 #define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1839 
1840 static NODE *
1841 add_block_exit(struct parser_params *p, NODE *node)
1842 {
1843  if (!node) {
1844  compile_error(p, "unexpected null node");
1845  return 0;
1846  }
1847  switch (nd_type(node)) {
1848  case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1849  default:
1850  compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1851  return node;
1852  }
1853  if (!p->ctxt.in_defined) {
1854  rb_node_exits_t *exits = p->exits;
1855  if (exits) {
1856  RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1857  exits->nd_stts = node;
1858  }
1859  }
1860  return node;
1861 }
1862 
1863 static rb_node_exits_t *
1864 init_block_exit(struct parser_params *p)
1865 {
1866  rb_node_exits_t *old = p->exits;
1867  rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1868  exits->nd_chain = 0;
1869  exits->nd_stts = RNODE(exits);
1870  p->exits = exits;
1871  return old;
1872 }
1873 
1874 static rb_node_exits_t *
1875 allow_block_exit(struct parser_params *p)
1876 {
1877  rb_node_exits_t *exits = p->exits;
1878  p->exits = 0;
1879  return exits;
1880 }
1881 
1882 static void
1883 restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1884 {
1885  p->exits = exits;
1886 }
1887 
1888 static void
1889 clear_block_exit(struct parser_params *p, bool error)
1890 {
1891  rb_node_exits_t *exits = p->exits;
1892  if (!exits) return;
1893  if (error) {
1894  for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1895  switch (nd_type(e)) {
1896  case NODE_BREAK:
1897  yyerror1(&e->nd_loc, "Invalid break");
1898  break;
1899  case NODE_NEXT:
1900  yyerror1(&e->nd_loc, "Invalid next");
1901  break;
1902  case NODE_REDO:
1903  yyerror1(&e->nd_loc, "Invalid redo");
1904  break;
1905  default:
1906  yyerror1(&e->nd_loc, "unexpected node");
1907  goto end_checks; /* no nd_chain */
1908  }
1909  }
1910  end_checks:;
1911  }
1912  exits->nd_stts = RNODE(exits);
1913  exits->nd_chain = 0;
1914 }
1915 
1916 #define WARN_EOL(tok) \
1917  (looking_at_eol_p(p) ? \
1918  (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1919  (void)0)
1920 static int looking_at_eol_p(struct parser_params *p);
1921 
1922 static NODE *
1923 get_nd_value(struct parser_params *p, NODE *node)
1924 {
1925  switch (nd_type(node)) {
1926  case NODE_GASGN:
1927  return RNODE_GASGN(node)->nd_value;
1928  case NODE_IASGN:
1929  return RNODE_IASGN(node)->nd_value;
1930  case NODE_LASGN:
1931  return RNODE_LASGN(node)->nd_value;
1932  case NODE_DASGN:
1933  return RNODE_DASGN(node)->nd_value;
1934  case NODE_MASGN:
1935  return RNODE_MASGN(node)->nd_value;
1936  case NODE_CVASGN:
1937  return RNODE_CVASGN(node)->nd_value;
1938  case NODE_CDECL:
1939  return RNODE_CDECL(node)->nd_value;
1940  default:
1941  compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1942  return 0;
1943  }
1944 }
1945 
1946 static void
1947 set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1948 {
1949  switch (nd_type(node)) {
1950  case NODE_CDECL:
1951  RNODE_CDECL(node)->nd_value = rhs;
1952  break;
1953  case NODE_GASGN:
1954  RNODE_GASGN(node)->nd_value = rhs;
1955  break;
1956  case NODE_IASGN:
1957  RNODE_IASGN(node)->nd_value = rhs;
1958  break;
1959  case NODE_LASGN:
1960  RNODE_LASGN(node)->nd_value = rhs;
1961  break;
1962  case NODE_DASGN:
1963  RNODE_DASGN(node)->nd_value = rhs;
1964  break;
1965  case NODE_MASGN:
1966  RNODE_MASGN(node)->nd_value = rhs;
1967  break;
1968  case NODE_CVASGN:
1969  RNODE_CVASGN(node)->nd_value = rhs;
1970  break;
1971  default:
1972  compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1973  break;
1974  }
1975 }
1976 
1977 static ID
1978 get_nd_vid(struct parser_params *p, NODE *node)
1979 {
1980  switch (nd_type(node)) {
1981  case NODE_CDECL:
1982  return RNODE_CDECL(node)->nd_vid;
1983  case NODE_GASGN:
1984  return RNODE_GASGN(node)->nd_vid;
1985  case NODE_IASGN:
1986  return RNODE_IASGN(node)->nd_vid;
1987  case NODE_LASGN:
1988  return RNODE_LASGN(node)->nd_vid;
1989  case NODE_DASGN:
1990  return RNODE_DASGN(node)->nd_vid;
1991  case NODE_CVASGN:
1992  return RNODE_CVASGN(node)->nd_vid;
1993  default:
1994  compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1995  return 0;
1996  }
1997 }
1998 
1999 static NODE *
2000 get_nd_args(struct parser_params *p, NODE *node)
2001 {
2002  switch (nd_type(node)) {
2003  case NODE_CALL:
2004  return RNODE_CALL(node)->nd_args;
2005  case NODE_OPCALL:
2006  return RNODE_OPCALL(node)->nd_args;
2007  case NODE_FCALL:
2008  return RNODE_FCALL(node)->nd_args;
2009  case NODE_QCALL:
2010  return RNODE_QCALL(node)->nd_args;
2011  case NODE_SUPER:
2012  return RNODE_SUPER(node)->nd_args;
2013  case NODE_VCALL:
2014  case NODE_ZSUPER:
2015  case NODE_YIELD:
2016  case NODE_RETURN:
2017  case NODE_BREAK:
2018  case NODE_NEXT:
2019  return 0;
2020  default:
2021  compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2022  return 0;
2023  }
2024 }
2025 
2026 static st_index_t
2027 djb2(const uint8_t *str, size_t len)
2028 {
2029  st_index_t hash = 5381;
2030 
2031  for (size_t i = 0; i < len; i++) {
2032  hash = ((hash << 5) + hash) + str[i];
2033  }
2034 
2035  return hash;
2036 }
2037 
2038 static st_index_t
2039 parser_memhash(const void *ptr, long len)
2040 {
2041  return djb2(ptr, len);
2042 }
2043 
2044 #define PARSER_STRING_PTR(str) (str->ptr)
2045 #define PARSER_STRING_LEN(str) (str->len)
2046 #define PARSER_STRING_END(str) (&str->ptr[str->len])
2047 #define STRING_SIZE(str) ((size_t)str->len + 1)
2048 #define STRING_TERM_LEN(str) (1)
2049 #define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2050 #define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2051  SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2052  str->len = total; \
2053 } while (0)
2054 #define STRING_SET_LEN(str, n) do { \
2055  (str)->len = (n); \
2056 } while (0)
2057 #define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2058  ((ptrvar) = str->ptr, \
2059  (lenvar) = str->len)
2060 
2061 static inline int
2062 parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2063 {
2064  return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2065 }
2066 
2067 static rb_parser_string_t *
2068 rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2069 {
2070  rb_parser_string_t *str;
2071 
2072  if (len < 0) {
2073  rb_bug("negative string size (or size too big): %ld", len);
2074  }
2075 
2076  str = xcalloc(1, sizeof(rb_parser_string_t));
2077  str->ptr = xcalloc(len + 1, sizeof(char));
2078 
2079  if (ptr) {
2080  memcpy(PARSER_STRING_PTR(str), ptr, len);
2081  }
2082  STRING_SET_LEN(str, len);
2083  STRING_TERM_FILL(str);
2084  return str;
2085 }
2086 
2087 static rb_parser_string_t *
2088 rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2089 {
2090  rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2091  str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2092  str->enc = enc;
2093  return str;
2094 }
2095 
2096 #ifndef RIPPER
2097 rb_parser_string_t *
2098 rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2099 {
2100  /* Type check */
2101  rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2102  RB_GC_GUARD(str);
2103  return ret;
2104 }
2105 
2106 void
2107 rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2108 {
2109  if (!str) return;
2110  xfree(PARSER_STRING_PTR(str));
2111  xfree(str);
2112 }
2113 #endif
2114 
2115 static st_index_t
2116 rb_parser_str_hash(rb_parser_string_t *str)
2117 {
2118  return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2119 }
2120 
2121 static st_index_t
2122 rb_char_p_hash(const char *c)
2123 {
2124  return parser_memhash((const void *)c, strlen(c));
2125 }
2126 
2127 static size_t
2128 rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2129 {
2130  return PARSER_STRING_LEN(str);
2131 }
2132 
2133 #ifndef RIPPER
2134 static char *
2135 rb_parser_string_end(rb_parser_string_t *str)
2136 {
2137  return &str->ptr[str->len];
2138 }
2139 #endif
2140 
2141 static void
2142 rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2143 {
2144  str->enc = enc;
2145 }
2146 
2147 static rb_encoding *
2148 rb_parser_str_get_encoding(rb_parser_string_t *str)
2149 {
2150  return str->enc;
2151 }
2152 
2153 #ifndef RIPPER
2154 static bool
2155 PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2156 {
2157  return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2158 }
2159 #endif
2160 
2161 static int
2162 PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2163 {
2164  return str->coderange;
2165 }
2166 
2167 static void
2168 PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2169 {
2170  str->coderange = coderange;
2171 }
2172 
2173 static void
2174 PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2175 {
2176  rb_parser_string_set_encoding(str, enc);
2177  PARSER_ENC_CODERANGE_SET(str, cr);
2178 }
2179 
2180 static void
2181 PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2182 {
2183  str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2184 }
2185 
2186 static bool
2187 PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2188 {
2189  return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2190 }
2191 
2192 static bool
2193 PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2194 {
2195  return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2196 }
2197 
2198 static const char *
2199 rb_parser_search_nonascii(const char *p, const char *e)
2200 {
2201  const char *s = p;
2202 
2203  for (; s < e; s++) {
2204  if (*s & 0x80) return s;
2205  }
2206 
2207  return NULL;
2208 }
2209 
2210 static int
2211 rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2212 {
2213  const char *e = ptr + len;
2214 
2215  if (enc == rb_ascii8bit_encoding()) {
2216  /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2217  ptr = rb_parser_search_nonascii(ptr, e);
2218  return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2219  }
2220 
2221  /* parser string encoding is always asciicompat */
2222  ptr = rb_parser_search_nonascii(ptr, e);
2223  if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2224  for (;;) {
2225  int ret = rb_enc_precise_mbclen(ptr, e, enc);
2226  if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2227  ptr += MBCLEN_CHARFOUND_LEN(ret);
2228  if (ptr == e) break;
2229  ptr = rb_parser_search_nonascii(ptr, e);
2230  if (!ptr) break;
2231  }
2232 
2233  return RB_PARSER_ENC_CODERANGE_VALID;
2234 }
2235 
2236 static int
2237 rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2238 {
2239  return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2240 }
2241 
2242 static int
2243 rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2244 {
2245  int cr = PARSER_ENC_CODERANGE(str);
2246 
2247  if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2248  cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2249  PARSER_ENC_CODERANGE_SET(str, cr);
2250  }
2251 
2252  return cr;
2253 }
2254 
2255 static rb_parser_string_t *
2256 rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2257 {
2258  if (rb_parser_str_get_encoding(str) == enc)
2259  return str;
2260  if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2261  PARSER_ENC_CODERANGE_CLEAR(str);
2262  }
2263  rb_parser_string_set_encoding(str, enc);
2264  return str;
2265 }
2266 
2267 static bool
2268 rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2269 {
2270  return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2271 }
2272 
2273 static rb_encoding *
2274 rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2275 {
2276  rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2277  rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2278 
2279  if (enc1 == NULL || enc2 == NULL)
2280  return 0;
2281 
2282  if (enc1 == enc2) {
2283  return enc1;
2284  }
2285 
2286  if (PARSER_STRING_LEN(str2) == 0)
2287  return enc1;
2288  if (PARSER_STRING_LEN(str1) == 0)
2289  return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2290 
2291  int cr1, cr2;
2292 
2293  cr1 = rb_parser_enc_str_coderange(p, str1);
2294  cr2 = rb_parser_enc_str_coderange(p, str2);
2295 
2296  if (cr1 != cr2) {
2297  if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2298  if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2299  }
2300 
2301  if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2302  return enc1;
2303  }
2304 
2305  if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2306  return enc2;
2307  }
2308 
2309  return 0;
2310 }
2311 
2312 static void
2313 rb_parser_str_modify(rb_parser_string_t *str)
2314 {
2315  PARSER_ENC_CODERANGE_CLEAR(str);
2316 }
2317 
2318 static void
2319 rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2320 {
2321  long capa;
2322  const int termlen = STRING_TERM_LEN(str);
2323 
2324  if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2325  rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2326  }
2327 
2328  int cr = PARSER_ENC_CODERANGE(str);
2329  if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2330  /* Leave unknown. */
2331  }
2332  else if (len > PARSER_STRING_LEN(str)) {
2333  PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2334  }
2335  else if (len < PARSER_STRING_LEN(str)) {
2336  if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2337  /* ASCII-only string is keeping after truncated. Valid
2338  * and broken may be invalid or valid, leave unknown. */
2339  PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2340  }
2341  }
2342 
2343  STRING_SET_LEN(str, len);
2344  STRING_TERM_FILL(str);
2345 }
2346 
2347 static rb_parser_string_t *
2348 rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2349 {
2350  rb_parser_str_modify(str);
2351  if (len == 0) return 0;
2352 
2353  long total, olen, off = -1;
2354  char *sptr;
2355  const int termlen = STRING_TERM_LEN(str);
2356 
2357  PARSER_STRING_GETMEM(str, sptr, olen);
2358  if (ptr >= sptr && ptr <= sptr + olen) {
2359  off = ptr - sptr;
2360  }
2361 
2362  if (olen > LONG_MAX - len) {
2363  compile_error(p, "string sizes too big");
2364  return 0;
2365  }
2366  total = olen + len;
2367  PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2368  sptr = PARSER_STRING_PTR(str);
2369  if (off != -1) {
2370  ptr = sptr + off;
2371  }
2372  memcpy(sptr + olen, ptr, len);
2373  STRING_SET_LEN(str, total);
2374  STRING_TERM_FILL(str);
2375 
2376  return str;
2377 }
2378 
2379 #define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2380 #define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2381 
2382 static rb_parser_string_t *
2383 rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2384  rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2385 {
2386  int str_cr, res_cr;
2387  rb_encoding *str_enc, *res_enc;
2388 
2389  str_enc = rb_parser_str_get_encoding(str);
2390  str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2391 
2392  if (str_enc == ptr_enc) {
2393  if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2394  ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2395  }
2396  }
2397  else {
2398  /* parser string encoding is always asciicompat */
2399  if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2400  ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2401  }
2402  if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2403  if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2404  str_cr = rb_parser_enc_str_coderange(p, str);
2405  }
2406  }
2407  }
2408  if (ptr_cr_ret)
2409  *ptr_cr_ret = ptr_cr;
2410 
2411  if (str_enc != ptr_enc &&
2412  str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2413  ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2414  goto incompatible;
2415  }
2416 
2417  if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2418  res_enc = str_enc;
2419  res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2420  }
2421  else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2422  if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2423  res_enc = str_enc;
2424  res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2425  }
2426  else {
2427  res_enc = ptr_enc;
2428  res_cr = ptr_cr;
2429  }
2430  }
2431  else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2432  res_enc = str_enc;
2433  if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2434  res_cr = str_cr;
2435  else
2436  res_cr = ptr_cr;
2437  }
2438  else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2439  res_enc = str_enc;
2440  res_cr = str_cr;
2441  if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2442  }
2443 
2444  if (len < 0) {
2445  compile_error(p, "negative string size (or size too big)");
2446  }
2447  parser_str_cat(str, ptr, len);
2448  PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2449  return str;
2450 
2451  incompatible:
2452  compile_error(p, "incompatible character encodings: %s and %s",
2453  rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2454  UNREACHABLE_RETURN(0);
2455 
2456 }
2457 
2458 static rb_parser_string_t *
2459 rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2460  rb_encoding *ptr_enc)
2461 {
2462  return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2463 }
2464 
2465 static rb_parser_string_t *
2466 rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2467 {
2468  int str2_cr = rb_parser_enc_str_coderange(p, str2);
2469 
2470  rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2471  rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2472 
2473  PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2474 
2475  return str;
2476 }
2477 
2478 static rb_parser_string_t *
2479 rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2480 {
2481  if (len < 0) {
2482  rb_bug("negative string size (or size too big)");
2483  }
2484 
2485  long slen = PARSER_STRING_LEN(str);
2486 
2487  if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2488  PARSER_ENC_CODERANGE_CLEAR(str);
2489  }
2490 
2491  {
2492  long capa;
2493  const int termlen = STRING_TERM_LEN(str);
2494 
2495  if ((capa = slen) < len) {
2496  SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2497  }
2498  else if (len == slen) return str;
2499  STRING_SET_LEN(str, len);
2500  STRING_TERM_FILL(str);
2501  }
2502  return str;
2503 }
2504 
2505 # define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2506  ((ptrvar) = str->ptr, \
2507  (lenvar) = str->len, \
2508  (encvar) = str->enc)
2509 
2510 static int
2511 rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2512 {
2513  long len1, len2;
2514  const char *ptr1, *ptr2;
2515  rb_encoding *enc1, *enc2;
2516 
2517  PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2518  PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2519 
2520  return (len1 != len2 ||
2521  enc1 != enc2 ||
2522  memcmp(ptr1, ptr2, len1) != 0);
2523 }
2524 
2525 static void
2526 rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2527 {
2528  long i;
2529  if (ary->capa < len) {
2530  ary->capa = len;
2531  ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2532  for (i = ary->len; i < len; i++) {
2533  ary->data[i] = 0;
2534  }
2535  }
2536 }
2537 
2538 /*
2539  * Do not call this directly.
2540  * Use rb_parser_ary_new_capa_for_XXX() instead.
2541  */
2542 static rb_parser_ary_t *
2543 parser_ary_new_capa(rb_parser_t *p, long len)
2544 {
2545  if (len < 0) {
2546  rb_bug("negative array size (or size too big): %ld", len);
2547  }
2548  rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2549  ary->data_type = 0;
2550  ary->len = 0;
2551  ary->capa = len;
2552  if (0 < len) {
2553  ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2554  }
2555  else {
2556  ary->data = NULL;
2557  }
2558  return ary;
2559 }
2560 
2561 #ifndef RIPPER
2562 static rb_parser_ary_t *
2563 rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2564 {
2565  rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2566  ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2567  return ary;
2568 }
2569 
2570 static rb_parser_ary_t *
2571 rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2572 {
2573  rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2574  ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2575  return ary;
2576 }
2577 #endif
2578 
2579 static rb_parser_ary_t *
2580 rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2581 {
2582  rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2583  ary->data_type = PARSER_ARY_DATA_NODE;
2584  return ary;
2585 }
2586 
2587 /*
2588  * Do not call this directly.
2589  * Use rb_parser_ary_push_XXX() instead.
2590  */
2591 static rb_parser_ary_t *
2592 parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2593 {
2594  if (ary->len == ary->capa) {
2595  rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2596  }
2597  ary->data[ary->len++] = val;
2598  return ary;
2599 }
2600 
2601 #ifndef RIPPER
2602 static rb_parser_ary_t *
2603 rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2604 {
2605  if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2606  rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2607  }
2608  return parser_ary_push(p, ary, val);
2609 }
2610 
2611 static rb_parser_ary_t *
2612 rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2613 {
2614  if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2615  rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2616  }
2617  return parser_ary_push(p, ary, val);
2618 }
2619 #endif
2620 
2621 static rb_parser_ary_t *
2622 rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2623 {
2624  if (ary->data_type != PARSER_ARY_DATA_NODE) {
2625  rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2626  }
2627  return parser_ary_push(p, ary, val);
2628 }
2629 
2630 #ifndef RIPPER
2631 static void
2632 rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2633 {
2634  if (!token) return;
2635  rb_parser_string_free(p, token->str);
2636  xfree(token);
2637 }
2638 
2639 static void
2640 rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2641 {
2642 # define foreach_ary(ptr) \
2643  for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2644  ptr < end_ary_data; ptr++)
2645  switch (ary->data_type) {
2646  case PARSER_ARY_DATA_AST_TOKEN:
2647  foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2648  break;
2649  case PARSER_ARY_DATA_SCRIPT_LINE:
2650  foreach_ary(data) {rb_parser_string_free(p, *data);}
2651  break;
2652  case PARSER_ARY_DATA_NODE:
2653  /* Do nothing because nodes are freed when rb_ast_t is freed */
2654  break;
2655  default:
2656  rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2657  break;
2658  }
2659 # undef foreach_ary
2660  xfree(ary->data);
2661  xfree(ary);
2662 }
2663 
2664 #endif /* !RIPPER */
2665 
2666 #line 2667 "parse.c"
2667 
2668 # ifndef YY_CAST
2669 # ifdef __cplusplus
2670 # define YY_CAST(Type, Val) static_cast<Type> (Val)
2671 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2672 # else
2673 # define YY_CAST(Type, Val) ((Type) (Val))
2674 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2675 # endif
2676 # endif
2677 # ifndef YY_NULLPTR
2678 # if defined __cplusplus
2679 # if 201103L <= __cplusplus
2680 # define YY_NULLPTR nullptr
2681 # else
2682 # define YY_NULLPTR 0
2683 # endif
2684 # else
2685 # define YY_NULLPTR ((void*)0)
2686 # endif
2687 # endif
2688 
2689 #include "parse.h"
2690 /* Symbol kind. */
2691 enum yysymbol_kind_t
2692 {
2693  YYSYMBOL_YYEMPTY = -2,
2694  YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2695  YYSYMBOL_YYerror = 1, /* error */
2696  YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2697  YYSYMBOL_keyword_class = 3, /* "'class'" */
2698  YYSYMBOL_keyword_module = 4, /* "'module'" */
2699  YYSYMBOL_keyword_def = 5, /* "'def'" */
2700  YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2701  YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2702  YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2703  YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2704  YYSYMBOL_keyword_end = 10, /* "'end'" */
2705  YYSYMBOL_keyword_if = 11, /* "'if'" */
2706  YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2707  YYSYMBOL_keyword_then = 13, /* "'then'" */
2708  YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2709  YYSYMBOL_keyword_else = 15, /* "'else'" */
2710  YYSYMBOL_keyword_case = 16, /* "'case'" */
2711  YYSYMBOL_keyword_when = 17, /* "'when'" */
2712  YYSYMBOL_keyword_while = 18, /* "'while'" */
2713  YYSYMBOL_keyword_until = 19, /* "'until'" */
2714  YYSYMBOL_keyword_for = 20, /* "'for'" */
2715  YYSYMBOL_keyword_break = 21, /* "'break'" */
2716  YYSYMBOL_keyword_next = 22, /* "'next'" */
2717  YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2718  YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2719  YYSYMBOL_keyword_in = 25, /* "'in'" */
2720  YYSYMBOL_keyword_do = 26, /* "'do'" */
2721  YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2722  YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2723  YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2724  YYSYMBOL_keyword_return = 30, /* "'return'" */
2725  YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2726  YYSYMBOL_keyword_super = 32, /* "'super'" */
2727  YYSYMBOL_keyword_self = 33, /* "'self'" */
2728  YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2729  YYSYMBOL_keyword_true = 35, /* "'true'" */
2730  YYSYMBOL_keyword_false = 36, /* "'false'" */
2731  YYSYMBOL_keyword_and = 37, /* "'and'" */
2732  YYSYMBOL_keyword_or = 38, /* "'or'" */
2733  YYSYMBOL_keyword_not = 39, /* "'not'" */
2734  YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2735  YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2736  YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2737  YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2738  YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2739  YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2740  YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2741  YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2742  YYSYMBOL_keyword_END = 48, /* "'END'" */
2743  YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2744  YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2745  YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2746  YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2747  YYSYMBOL_tFID = 53, /* "method" */
2748  YYSYMBOL_tGVAR = 54, /* "global variable" */
2749  YYSYMBOL_tIVAR = 55, /* "instance variable" */
2750  YYSYMBOL_tCONSTANT = 56, /* "constant" */
2751  YYSYMBOL_tCVAR = 57, /* "class variable" */
2752  YYSYMBOL_tLABEL = 58, /* "label" */
2753  YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2754  YYSYMBOL_tFLOAT = 60, /* "float literal" */
2755  YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2756  YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2757  YYSYMBOL_tCHAR = 63, /* "char literal" */
2758  YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2759  YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2760  YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2761  YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2762  YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2763  YYSYMBOL_69_ = 69, /* '.' */
2764  YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2765  YYSYMBOL_tSP = 71, /* "escaped space" */
2766  YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2767  YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2768  YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2769  YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2770  YYSYMBOL_tUPLUS = 76, /* "unary+" */
2771  YYSYMBOL_tUMINUS = 77, /* "unary-" */
2772  YYSYMBOL_tPOW = 78, /* "**" */
2773  YYSYMBOL_tCMP = 79, /* "<=>" */
2774  YYSYMBOL_tEQ = 80, /* "==" */
2775  YYSYMBOL_tEQQ = 81, /* "===" */
2776  YYSYMBOL_tNEQ = 82, /* "!=" */
2777  YYSYMBOL_tGEQ = 83, /* ">=" */
2778  YYSYMBOL_tLEQ = 84, /* "<=" */
2779  YYSYMBOL_tANDOP = 85, /* "&&" */
2780  YYSYMBOL_tOROP = 86, /* "||" */
2781  YYSYMBOL_tMATCH = 87, /* "=~" */
2782  YYSYMBOL_tNMATCH = 88, /* "!~" */
2783  YYSYMBOL_tDOT2 = 89, /* ".." */
2784  YYSYMBOL_tDOT3 = 90, /* "..." */
2785  YYSYMBOL_tBDOT2 = 91, /* "(.." */
2786  YYSYMBOL_tBDOT3 = 92, /* "(..." */
2787  YYSYMBOL_tAREF = 93, /* "[]" */
2788  YYSYMBOL_tASET = 94, /* "[]=" */
2789  YYSYMBOL_tLSHFT = 95, /* "<<" */
2790  YYSYMBOL_tRSHFT = 96, /* ">>" */
2791  YYSYMBOL_tANDDOT = 97, /* "&." */
2792  YYSYMBOL_tCOLON2 = 98, /* "::" */
2793  YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2794  YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2795  YYSYMBOL_tASSOC = 101, /* "=>" */
2796  YYSYMBOL_tLPAREN = 102, /* "(" */
2797  YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2798  YYSYMBOL_tRPAREN = 104, /* ")" */
2799  YYSYMBOL_tLBRACK = 105, /* "[" */
2800  YYSYMBOL_tLBRACE = 106, /* "{" */
2801  YYSYMBOL_tLBRACE_ARG = 107, /* "{ arg" */
2802  YYSYMBOL_tSTAR = 108, /* "*" */
2803  YYSYMBOL_tDSTAR = 109, /* "**arg" */
2804  YYSYMBOL_tAMPER = 110, /* "&" */
2805  YYSYMBOL_tLAMBDA = 111, /* "->" */
2806  YYSYMBOL_tSYMBEG = 112, /* "symbol literal" */
2807  YYSYMBOL_tSTRING_BEG = 113, /* "string literal" */
2808  YYSYMBOL_tXSTRING_BEG = 114, /* "backtick literal" */
2809  YYSYMBOL_tREGEXP_BEG = 115, /* "regexp literal" */
2810  YYSYMBOL_tWORDS_BEG = 116, /* "word list" */
2811  YYSYMBOL_tQWORDS_BEG = 117, /* "verbatim word list" */
2812  YYSYMBOL_tSYMBOLS_BEG = 118, /* "symbol list" */
2813  YYSYMBOL_tQSYMBOLS_BEG = 119, /* "verbatim symbol list" */
2814  YYSYMBOL_tSTRING_END = 120, /* "terminator" */
2815  YYSYMBOL_tSTRING_DEND = 121, /* "'}'" */
2816  YYSYMBOL_tSTRING_DBEG = 122, /* "'#{'" */
2817  YYSYMBOL_tSTRING_DVAR = 123, /* tSTRING_DVAR */
2818  YYSYMBOL_tLAMBEG = 124, /* tLAMBEG */
2819  YYSYMBOL_tLABEL_END = 125, /* tLABEL_END */
2820  YYSYMBOL_tIGNORED_NL = 126, /* tIGNORED_NL */
2821  YYSYMBOL_tCOMMENT = 127, /* tCOMMENT */
2822  YYSYMBOL_tEMBDOC_BEG = 128, /* tEMBDOC_BEG */
2823  YYSYMBOL_tEMBDOC = 129, /* tEMBDOC */
2824  YYSYMBOL_tEMBDOC_END = 130, /* tEMBDOC_END */
2825  YYSYMBOL_tHEREDOC_BEG = 131, /* tHEREDOC_BEG */
2826  YYSYMBOL_tHEREDOC_END = 132, /* tHEREDOC_END */
2827  YYSYMBOL_k__END__ = 133, /* k__END__ */
2828  YYSYMBOL_tLOWEST = 134, /* tLOWEST */
2829  YYSYMBOL_135_ = 135, /* '=' */
2830  YYSYMBOL_136_ = 136, /* '?' */
2831  YYSYMBOL_137_ = 137, /* ':' */
2832  YYSYMBOL_138_ = 138, /* '>' */
2833  YYSYMBOL_139_ = 139, /* '<' */
2834  YYSYMBOL_140_ = 140, /* '|' */
2835  YYSYMBOL_141_ = 141, /* '^' */
2836  YYSYMBOL_142_ = 142, /* '&' */
2837  YYSYMBOL_143_ = 143, /* '+' */
2838  YYSYMBOL_144_ = 144, /* '-' */
2839  YYSYMBOL_145_ = 145, /* '*' */
2840  YYSYMBOL_146_ = 146, /* '/' */
2841  YYSYMBOL_147_ = 147, /* '%' */
2842  YYSYMBOL_tUMINUS_NUM = 148, /* tUMINUS_NUM */
2843  YYSYMBOL_149_ = 149, /* '!' */
2844  YYSYMBOL_150_ = 150, /* '~' */
2845  YYSYMBOL_tLAST_TOKEN = 151, /* tLAST_TOKEN */
2846  YYSYMBOL_152_ = 152, /* '{' */
2847  YYSYMBOL_153_ = 153, /* '}' */
2848  YYSYMBOL_154_ = 154, /* '[' */
2849  YYSYMBOL_155_n_ = 155, /* '\n' */
2850  YYSYMBOL_156_ = 156, /* ',' */
2851  YYSYMBOL_157_ = 157, /* '`' */
2852  YYSYMBOL_158_ = 158, /* '(' */
2853  YYSYMBOL_159_ = 159, /* ')' */
2854  YYSYMBOL_160_ = 160, /* ']' */
2855  YYSYMBOL_161_ = 161, /* ';' */
2856  YYSYMBOL_162_ = 162, /* ' ' */
2857  YYSYMBOL_YYACCEPT = 163, /* $accept */
2858  YYSYMBOL_164_1 = 164, /* $@1 */
2859  YYSYMBOL_program = 165, /* program */
2860  YYSYMBOL_option_terms = 166, /* option_terms */
2861  YYSYMBOL_top_compstmt = 167, /* top_compstmt */
2862  YYSYMBOL_top_stmts = 168, /* top_stmts */
2863  YYSYMBOL_top_stmt = 169, /* top_stmt */
2864  YYSYMBOL_block_open = 170, /* block_open */
2865  YYSYMBOL_begin_block = 171, /* begin_block */
2866  YYSYMBOL_172_2 = 172, /* $@2 */
2867  YYSYMBOL_173_3 = 173, /* $@3 */
2868  YYSYMBOL_bodystmt = 174, /* bodystmt */
2869  YYSYMBOL_175_4 = 175, /* $@4 */
2870  YYSYMBOL_compstmt = 176, /* compstmt */
2871  YYSYMBOL_stmts = 177, /* stmts */
2872  YYSYMBOL_stmt_or_begin = 178, /* stmt_or_begin */
2873  YYSYMBOL_179_5 = 179, /* $@5 */
2874  YYSYMBOL_allow_exits = 180, /* allow_exits */
2875  YYSYMBOL_k_END = 181, /* k_END */
2876  YYSYMBOL_182_6 = 182, /* $@6 */
2877  YYSYMBOL_stmt = 183, /* stmt */
2878  YYSYMBOL_command_asgn = 184, /* command_asgn */
2879  YYSYMBOL_endless_command = 185, /* endless_command */
2880  YYSYMBOL_option__n_ = 186, /* option_'\n' */
2881  YYSYMBOL_command_rhs = 187, /* command_rhs */
2882  YYSYMBOL_expr = 188, /* expr */
2883  YYSYMBOL_189_7 = 189, /* $@7 */
2884  YYSYMBOL_190_8 = 190, /* $@8 */
2885  YYSYMBOL_def_name = 191, /* def_name */
2886  YYSYMBOL_defn_head = 192, /* defn_head */
2887  YYSYMBOL_193_9 = 193, /* $@9 */
2888  YYSYMBOL_defs_head = 194, /* defs_head */
2889  YYSYMBOL_expr_value = 195, /* expr_value */
2890  YYSYMBOL_196_10 = 196, /* $@10 */
2891  YYSYMBOL_197_11 = 197, /* $@11 */
2892  YYSYMBOL_expr_value_do = 198, /* expr_value_do */
2893  YYSYMBOL_command_call = 199, /* command_call */
2894  YYSYMBOL_block_command = 200, /* block_command */
2895  YYSYMBOL_cmd_brace_block = 201, /* cmd_brace_block */
2896  YYSYMBOL_fcall = 202, /* fcall */
2897  YYSYMBOL_command = 203, /* command */
2898  YYSYMBOL_mlhs = 204, /* mlhs */
2899  YYSYMBOL_mlhs_inner = 205, /* mlhs_inner */
2900  YYSYMBOL_mlhs_basic = 206, /* mlhs_basic */
2901  YYSYMBOL_mlhs_item = 207, /* mlhs_item */
2902  YYSYMBOL_mlhs_head = 208, /* mlhs_head */
2903  YYSYMBOL_mlhs_post = 209, /* mlhs_post */
2904  YYSYMBOL_mlhs_node = 210, /* mlhs_node */
2905  YYSYMBOL_lhs = 211, /* lhs */
2906  YYSYMBOL_cname = 212, /* cname */
2907  YYSYMBOL_cpath = 213, /* cpath */
2908  YYSYMBOL_fname = 214, /* fname */
2909  YYSYMBOL_fitem = 215, /* fitem */
2910  YYSYMBOL_undef_list = 216, /* undef_list */
2911  YYSYMBOL_217_12 = 217, /* $@12 */
2912  YYSYMBOL_op = 218, /* op */
2913  YYSYMBOL_reswords = 219, /* reswords */
2914  YYSYMBOL_arg = 220, /* arg */
2915  YYSYMBOL_endless_arg = 221, /* endless_arg */
2916  YYSYMBOL_relop = 222, /* relop */
2917  YYSYMBOL_rel_expr = 223, /* rel_expr */
2918  YYSYMBOL_lex_ctxt = 224, /* lex_ctxt */
2919  YYSYMBOL_begin_defined = 225, /* begin_defined */
2920  YYSYMBOL_after_rescue = 226, /* after_rescue */
2921  YYSYMBOL_arg_value = 227, /* arg_value */
2922  YYSYMBOL_aref_args = 228, /* aref_args */
2923  YYSYMBOL_arg_rhs = 229, /* arg_rhs */
2924  YYSYMBOL_paren_args = 230, /* paren_args */
2925  YYSYMBOL_opt_paren_args = 231, /* opt_paren_args */
2926  YYSYMBOL_opt_call_args = 232, /* opt_call_args */
2927  YYSYMBOL_call_args = 233, /* call_args */
2928  YYSYMBOL_234_13 = 234, /* $@13 */
2929  YYSYMBOL_command_args = 235, /* command_args */
2930  YYSYMBOL_block_arg = 236, /* block_arg */
2931  YYSYMBOL_opt_block_arg = 237, /* opt_block_arg */
2932  YYSYMBOL_args = 238, /* args */
2933  YYSYMBOL_arg_splat = 239, /* arg_splat */
2934  YYSYMBOL_mrhs_arg = 240, /* mrhs_arg */
2935  YYSYMBOL_mrhs = 241, /* mrhs */
2936  YYSYMBOL_primary = 242, /* primary */
2937  YYSYMBOL_243_14 = 243, /* $@14 */
2938  YYSYMBOL_244_15 = 244, /* $@15 */
2939  YYSYMBOL_245_16 = 245, /* @16 */
2940  YYSYMBOL_246_17 = 246, /* @17 */
2941  YYSYMBOL_247_18 = 247, /* $@18 */
2942  YYSYMBOL_248_19 = 248, /* $@19 */
2943  YYSYMBOL_249_20 = 249, /* $@20 */
2944  YYSYMBOL_250_21 = 250, /* $@21 */
2945  YYSYMBOL_251_22 = 251, /* $@22 */
2946  YYSYMBOL_primary_value = 252, /* primary_value */
2947  YYSYMBOL_k_begin = 253, /* k_begin */
2948  YYSYMBOL_k_if = 254, /* k_if */
2949  YYSYMBOL_k_unless = 255, /* k_unless */
2950  YYSYMBOL_k_while = 256, /* k_while */
2951  YYSYMBOL_k_until = 257, /* k_until */
2952  YYSYMBOL_k_case = 258, /* k_case */
2953  YYSYMBOL_k_for = 259, /* k_for */
2954  YYSYMBOL_k_class = 260, /* k_class */
2955  YYSYMBOL_k_module = 261, /* k_module */
2956  YYSYMBOL_k_def = 262, /* k_def */
2957  YYSYMBOL_k_do = 263, /* k_do */
2958  YYSYMBOL_k_do_block = 264, /* k_do_block */
2959  YYSYMBOL_k_rescue = 265, /* k_rescue */
2960  YYSYMBOL_k_ensure = 266, /* k_ensure */
2961  YYSYMBOL_k_when = 267, /* k_when */
2962  YYSYMBOL_k_else = 268, /* k_else */
2963  YYSYMBOL_k_elsif = 269, /* k_elsif */
2964  YYSYMBOL_k_end = 270, /* k_end */
2965  YYSYMBOL_k_return = 271, /* k_return */
2966  YYSYMBOL_k_yield = 272, /* k_yield */
2967  YYSYMBOL_then = 273, /* then */
2968  YYSYMBOL_do = 274, /* do */
2969  YYSYMBOL_if_tail = 275, /* if_tail */
2970  YYSYMBOL_opt_else = 276, /* opt_else */
2971  YYSYMBOL_for_var = 277, /* for_var */
2972  YYSYMBOL_f_marg = 278, /* f_marg */
2973  YYSYMBOL_f_marg_list = 279, /* f_marg_list */
2974  YYSYMBOL_f_margs = 280, /* f_margs */
2975  YYSYMBOL_f_rest_marg = 281, /* f_rest_marg */
2976  YYSYMBOL_f_any_kwrest = 282, /* f_any_kwrest */
2977  YYSYMBOL_283_23 = 283, /* $@23 */
2978  YYSYMBOL_f_eq = 284, /* f_eq */
2979  YYSYMBOL_f_kwarg_f_block_kw = 285, /* f_kwarg_f_block_kw */
2980  YYSYMBOL_block_args_tail = 286, /* block_args_tail */
2981  YYSYMBOL_excessed_comma = 287, /* excessed_comma */
2982  YYSYMBOL_f_opt_primary_value = 288, /* f_opt_primary_value */
2983  YYSYMBOL_f_optarg_primary_value = 289, /* f_optarg_primary_value */
2984  YYSYMBOL_opt_args_tail_block_args_tail = 290, /* opt_args_tail_block_args_tail */
2985  YYSYMBOL_block_param = 291, /* block_param */
2986  YYSYMBOL_opt_block_param = 292, /* opt_block_param */
2987  YYSYMBOL_block_param_def = 293, /* block_param_def */
2988  YYSYMBOL_opt_bv_decl = 294, /* opt_bv_decl */
2989  YYSYMBOL_bv_decls = 295, /* bv_decls */
2990  YYSYMBOL_bvar = 296, /* bvar */
2991  YYSYMBOL_max_numparam = 297, /* max_numparam */
2992  YYSYMBOL_numparam = 298, /* numparam */
2993  YYSYMBOL_it_id = 299, /* it_id */
2994  YYSYMBOL_300_24 = 300, /* @24 */
2995  YYSYMBOL_301_25 = 301, /* $@25 */
2996  YYSYMBOL_lambda = 302, /* lambda */
2997  YYSYMBOL_f_larglist = 303, /* f_larglist */
2998  YYSYMBOL_lambda_body = 304, /* lambda_body */
2999  YYSYMBOL_305_26 = 305, /* $@26 */
3000  YYSYMBOL_do_block = 306, /* do_block */
3001  YYSYMBOL_block_call = 307, /* block_call */
3002  YYSYMBOL_method_call = 308, /* method_call */
3003  YYSYMBOL_brace_block = 309, /* brace_block */
3004  YYSYMBOL_310_27 = 310, /* @27 */
3005  YYSYMBOL_brace_body = 311, /* brace_body */
3006  YYSYMBOL_312_28 = 312, /* @28 */
3007  YYSYMBOL_do_body = 313, /* do_body */
3008  YYSYMBOL_case_args = 314, /* case_args */
3009  YYSYMBOL_case_body = 315, /* case_body */
3010  YYSYMBOL_cases = 316, /* cases */
3011  YYSYMBOL_p_pvtbl = 317, /* p_pvtbl */
3012  YYSYMBOL_p_pktbl = 318, /* p_pktbl */
3013  YYSYMBOL_p_in_kwarg = 319, /* p_in_kwarg */
3014  YYSYMBOL_320_29 = 320, /* $@29 */
3015  YYSYMBOL_p_case_body = 321, /* p_case_body */
3016  YYSYMBOL_p_cases = 322, /* p_cases */
3017  YYSYMBOL_p_top_expr = 323, /* p_top_expr */
3018  YYSYMBOL_p_top_expr_body = 324, /* p_top_expr_body */
3019  YYSYMBOL_p_expr = 325, /* p_expr */
3020  YYSYMBOL_p_as = 326, /* p_as */
3021  YYSYMBOL_p_alt = 327, /* p_alt */
3022  YYSYMBOL_p_lparen = 328, /* p_lparen */
3023  YYSYMBOL_p_lbracket = 329, /* p_lbracket */
3024  YYSYMBOL_p_expr_basic = 330, /* p_expr_basic */
3025  YYSYMBOL_331_30 = 331, /* $@30 */
3026  YYSYMBOL_p_args = 332, /* p_args */
3027  YYSYMBOL_p_args_head = 333, /* p_args_head */
3028  YYSYMBOL_p_args_tail = 334, /* p_args_tail */
3029  YYSYMBOL_p_find = 335, /* p_find */
3030  YYSYMBOL_p_rest = 336, /* p_rest */
3031  YYSYMBOL_p_args_post = 337, /* p_args_post */
3032  YYSYMBOL_p_arg = 338, /* p_arg */
3033  YYSYMBOL_p_kwargs = 339, /* p_kwargs */
3034  YYSYMBOL_p_kwarg = 340, /* p_kwarg */
3035  YYSYMBOL_p_kw = 341, /* p_kw */
3036  YYSYMBOL_p_kw_label = 342, /* p_kw_label */
3037  YYSYMBOL_p_kwrest = 343, /* p_kwrest */
3038  YYSYMBOL_p_kwnorest = 344, /* p_kwnorest */
3039  YYSYMBOL_p_any_kwrest = 345, /* p_any_kwrest */
3040  YYSYMBOL_p_value = 346, /* p_value */
3041  YYSYMBOL_p_primitive = 347, /* p_primitive */
3042  YYSYMBOL_p_variable = 348, /* p_variable */
3043  YYSYMBOL_p_var_ref = 349, /* p_var_ref */
3044  YYSYMBOL_p_expr_ref = 350, /* p_expr_ref */
3045  YYSYMBOL_p_const = 351, /* p_const */
3046  YYSYMBOL_opt_rescue = 352, /* opt_rescue */
3047  YYSYMBOL_exc_list = 353, /* exc_list */
3048  YYSYMBOL_exc_var = 354, /* exc_var */
3049  YYSYMBOL_opt_ensure = 355, /* opt_ensure */
3050  YYSYMBOL_literal = 356, /* literal */
3051  YYSYMBOL_strings = 357, /* strings */
3052  YYSYMBOL_string = 358, /* string */
3053  YYSYMBOL_string1 = 359, /* string1 */
3054  YYSYMBOL_xstring = 360, /* xstring */
3055  YYSYMBOL_regexp = 361, /* regexp */
3056  YYSYMBOL_nonempty_list__ = 362, /* nonempty_list_' ' */
3057  YYSYMBOL_words_tWORDS_BEG_word_list = 363, /* words_tWORDS_BEG_word_list */
3058  YYSYMBOL_words = 364, /* words */
3059  YYSYMBOL_word_list = 365, /* word_list */
3060  YYSYMBOL_word = 366, /* word */
3061  YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 367, /* words_tSYMBOLS_BEG_symbol_list */
3062  YYSYMBOL_symbols = 368, /* symbols */
3063  YYSYMBOL_symbol_list = 369, /* symbol_list */
3064  YYSYMBOL_words_tQWORDS_BEG_qword_list = 370, /* words_tQWORDS_BEG_qword_list */
3065  YYSYMBOL_qwords = 371, /* qwords */
3066  YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 372, /* words_tQSYMBOLS_BEG_qsym_list */
3067  YYSYMBOL_qsymbols = 373, /* qsymbols */
3068  YYSYMBOL_qword_list = 374, /* qword_list */
3069  YYSYMBOL_qsym_list = 375, /* qsym_list */
3070  YYSYMBOL_string_contents = 376, /* string_contents */
3071  YYSYMBOL_xstring_contents = 377, /* xstring_contents */
3072  YYSYMBOL_regexp_contents = 378, /* regexp_contents */
3073  YYSYMBOL_string_content = 379, /* string_content */
3074  YYSYMBOL_380_31 = 380, /* @31 */
3075  YYSYMBOL_381_32 = 381, /* @32 */
3076  YYSYMBOL_382_33 = 382, /* @33 */
3077  YYSYMBOL_383_34 = 383, /* @34 */
3078  YYSYMBOL_string_dend = 384, /* string_dend */
3079  YYSYMBOL_string_dvar = 385, /* string_dvar */
3080  YYSYMBOL_symbol = 386, /* symbol */
3081  YYSYMBOL_ssym = 387, /* ssym */
3082  YYSYMBOL_sym = 388, /* sym */
3083  YYSYMBOL_dsym = 389, /* dsym */
3084  YYSYMBOL_numeric = 390, /* numeric */
3085  YYSYMBOL_simple_numeric = 391, /* simple_numeric */
3086  YYSYMBOL_nonlocal_var = 392, /* nonlocal_var */
3087  YYSYMBOL_user_variable = 393, /* user_variable */
3088  YYSYMBOL_keyword_variable = 394, /* keyword_variable */
3089  YYSYMBOL_var_ref = 395, /* var_ref */
3090  YYSYMBOL_var_lhs = 396, /* var_lhs */
3091  YYSYMBOL_backref = 397, /* backref */
3092  YYSYMBOL_398_35 = 398, /* $@35 */
3093  YYSYMBOL_superclass = 399, /* superclass */
3094  YYSYMBOL_f_opt_paren_args = 400, /* f_opt_paren_args */
3095  YYSYMBOL_f_paren_args = 401, /* f_paren_args */
3096  YYSYMBOL_f_arglist = 402, /* f_arglist */
3097  YYSYMBOL_403_36 = 403, /* @36 */
3098  YYSYMBOL_f_kwarg_f_kw = 404, /* f_kwarg_f_kw */
3099  YYSYMBOL_args_tail = 405, /* args_tail */
3100  YYSYMBOL_f_opt_arg_value = 406, /* f_opt_arg_value */
3101  YYSYMBOL_f_optarg_arg_value = 407, /* f_optarg_arg_value */
3102  YYSYMBOL_opt_args_tail_args_tail = 408, /* opt_args_tail_args_tail */
3103  YYSYMBOL_f_args = 409, /* f_args */
3104  YYSYMBOL_args_forward = 410, /* args_forward */
3105  YYSYMBOL_f_bad_arg = 411, /* f_bad_arg */
3106  YYSYMBOL_f_norm_arg = 412, /* f_norm_arg */
3107  YYSYMBOL_f_arg_asgn = 413, /* f_arg_asgn */
3108  YYSYMBOL_f_arg_item = 414, /* f_arg_item */
3109  YYSYMBOL_f_arg = 415, /* f_arg */
3110  YYSYMBOL_f_label = 416, /* f_label */
3111  YYSYMBOL_f_kw = 417, /* f_kw */
3112  YYSYMBOL_f_block_kw = 418, /* f_block_kw */
3113  YYSYMBOL_kwrest_mark = 419, /* kwrest_mark */
3114  YYSYMBOL_f_no_kwarg = 420, /* f_no_kwarg */
3115  YYSYMBOL_f_kwrest = 421, /* f_kwrest */
3116  YYSYMBOL_restarg_mark = 422, /* restarg_mark */
3117  YYSYMBOL_f_rest_arg = 423, /* f_rest_arg */
3118  YYSYMBOL_blkarg_mark = 424, /* blkarg_mark */
3119  YYSYMBOL_f_block_arg = 425, /* f_block_arg */
3120  YYSYMBOL_opt_f_block_arg = 426, /* opt_f_block_arg */
3121  YYSYMBOL_singleton = 427, /* singleton */
3122  YYSYMBOL_428_37 = 428, /* $@37 */
3123  YYSYMBOL_assoc_list = 429, /* assoc_list */
3124  YYSYMBOL_assocs = 430, /* assocs */
3125  YYSYMBOL_assoc = 431, /* assoc */
3126  YYSYMBOL_operation = 432, /* operation */
3127  YYSYMBOL_operation2 = 433, /* operation2 */
3128  YYSYMBOL_operation3 = 434, /* operation3 */
3129  YYSYMBOL_dot_or_colon = 435, /* dot_or_colon */
3130  YYSYMBOL_call_op = 436, /* call_op */
3131  YYSYMBOL_call_op2 = 437, /* call_op2 */
3132  YYSYMBOL_rparen = 438, /* rparen */
3133  YYSYMBOL_rbracket = 439, /* rbracket */
3134  YYSYMBOL_rbrace = 440, /* rbrace */
3135  YYSYMBOL_trailer = 441, /* trailer */
3136  YYSYMBOL_term = 442, /* term */
3137  YYSYMBOL_terms = 443, /* terms */
3138  YYSYMBOL_none = 444 /* none */
3139 };
3140 typedef enum yysymbol_kind_t yysymbol_kind_t;
3141 
3142 
3143 
3144 
3145 #ifdef short
3146 # undef short
3147 #endif
3148 
3149 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3150  <limits.h> and (if available) <stdint.h> are included
3151  so that the code can choose integer types of a good width. */
3152 
3153 #ifndef __PTRDIFF_MAX__
3154 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
3155 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3156 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3157 # define YY_STDINT_H
3158 # endif
3159 #endif
3160 
3161 /* Narrow types that promote to a signed type and that can represent a
3162  signed or unsigned integer of at least N bits. In tables they can
3163  save space and decrease cache pressure. Promoting to a signed type
3164  helps avoid bugs in integer arithmetic. */
3165 
3166 #ifdef __INT_LEAST8_MAX__
3167 typedef __INT_LEAST8_TYPE__ yytype_int8;
3168 #elif defined YY_STDINT_H
3169 typedef int_least8_t yytype_int8;
3170 #else
3171 typedef signed char yytype_int8;
3172 #endif
3173 
3174 #ifdef __INT_LEAST16_MAX__
3175 typedef __INT_LEAST16_TYPE__ yytype_int16;
3176 #elif defined YY_STDINT_H
3177 typedef int_least16_t yytype_int16;
3178 #else
3179 typedef short yytype_int16;
3180 #endif
3181 
3182 /* Work around bug in HP-UX 11.23, which defines these macros
3183  incorrectly for preprocessor constants. This workaround can likely
3184  be removed in 2023, as HPE has promised support for HP-UX 11.23
3185  (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3186  <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3187 #ifdef __hpux
3188 # undef UINT_LEAST8_MAX
3189 # undef UINT_LEAST16_MAX
3190 # define UINT_LEAST8_MAX 255
3191 # define UINT_LEAST16_MAX 65535
3192 #endif
3193 
3194 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3195 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3196 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3197  && UINT_LEAST8_MAX <= INT_MAX)
3198 typedef uint_least8_t yytype_uint8;
3199 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3200 typedef unsigned char yytype_uint8;
3201 #else
3202 typedef short yytype_uint8;
3203 #endif
3204 
3205 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3206 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3207 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3208  && UINT_LEAST16_MAX <= INT_MAX)
3209 typedef uint_least16_t yytype_uint16;
3210 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3211 typedef unsigned short yytype_uint16;
3212 #else
3213 typedef int yytype_uint16;
3214 #endif
3215 
3216 #ifndef YYPTRDIFF_T
3217 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3218 # define YYPTRDIFF_T __PTRDIFF_TYPE__
3219 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3220 # elif defined PTRDIFF_MAX
3221 # ifndef ptrdiff_t
3222 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3223 # endif
3224 # define YYPTRDIFF_T ptrdiff_t
3225 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3226 # else
3227 # define YYPTRDIFF_T long
3228 # define YYPTRDIFF_MAXIMUM LONG_MAX
3229 # endif
3230 #endif
3231 
3232 #ifndef YYSIZE_T
3233 # ifdef __SIZE_TYPE__
3234 # define YYSIZE_T __SIZE_TYPE__
3235 # elif defined size_t
3236 # define YYSIZE_T size_t
3237 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3238 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3239 # define YYSIZE_T size_t
3240 # else
3241 # define YYSIZE_T unsigned
3242 # endif
3243 #endif
3244 
3245 #define YYSIZE_MAXIMUM \
3246  YY_CAST (YYPTRDIFF_T, \
3247  (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3248  ? YYPTRDIFF_MAXIMUM \
3249  : YY_CAST (YYSIZE_T, -1)))
3250 
3251 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3252 
3253 
3254 /* Stored state numbers (used for stacks). */
3255 typedef yytype_int16 yy_state_t;
3256 
3257 /* State numbers in computations. */
3258 typedef int yy_state_fast_t;
3259 
3260 #ifndef YY_
3261 # if defined YYENABLE_NLS && YYENABLE_NLS
3262 # if ENABLE_NLS
3263 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3264 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3265 # endif
3266 # endif
3267 # ifndef YY_
3268 # define YY_(Msgid) Msgid
3269 # endif
3270 #endif
3271 
3272 
3273 #ifndef YY_ATTRIBUTE_PURE
3274 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3275 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3276 # else
3277 # define YY_ATTRIBUTE_PURE
3278 # endif
3279 #endif
3280 
3281 #ifndef YY_ATTRIBUTE_UNUSED
3282 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3283 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3284 # else
3285 # define YY_ATTRIBUTE_UNUSED
3286 # endif
3287 #endif
3288 
3289 /* Suppress unused-variable warnings by "using" E. */
3290 #if ! defined lint || defined __GNUC__
3291 # define YY_USE(E) ((void) (E))
3292 #else
3293 # define YY_USE(E) /* empty */
3294 #endif
3295 
3296 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
3297 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3298 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3299 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3300  _Pragma ("GCC diagnostic push") \
3301  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3302 # else
3303 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3304  _Pragma ("GCC diagnostic push") \
3305  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3306  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3307 # endif
3308 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3309  _Pragma ("GCC diagnostic pop")
3310 #else
3311 # define YY_INITIAL_VALUE(Value) Value
3312 #endif
3313 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3314 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3315 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
3316 #endif
3317 #ifndef YY_INITIAL_VALUE
3318 # define YY_INITIAL_VALUE(Value) /* Nothing. */
3319 #endif
3320 
3321 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3322 # define YY_IGNORE_USELESS_CAST_BEGIN \
3323  _Pragma ("GCC diagnostic push") \
3324  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3325 # define YY_IGNORE_USELESS_CAST_END \
3326  _Pragma ("GCC diagnostic pop")
3327 #endif
3328 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
3329 # define YY_IGNORE_USELESS_CAST_BEGIN
3330 # define YY_IGNORE_USELESS_CAST_END
3331 #endif
3332 
3333 
3334 #define YY_ASSERT(E) ((void) (0 && (E)))
3335 
3336 #if 1
3337 
3338 /* The parser invokes alloca or malloc; define the necessary symbols. */
3339 
3340 # ifdef YYSTACK_USE_ALLOCA
3341 # if YYSTACK_USE_ALLOCA
3342 # ifdef __GNUC__
3343 # define YYSTACK_ALLOC __builtin_alloca
3344 # elif defined __BUILTIN_VA_ARG_INCR
3345 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3346 # elif defined _AIX
3347 # define YYSTACK_ALLOC __alloca
3348 # elif defined _MSC_VER
3349 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3350 # define alloca _alloca
3351 # else
3352 # define YYSTACK_ALLOC alloca
3353 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3354 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3355  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3356 # ifndef EXIT_SUCCESS
3357 # define EXIT_SUCCESS 0
3358 # endif
3359 # endif
3360 # endif
3361 # endif
3362 # endif
3363 
3364 # ifdef YYSTACK_ALLOC
3365  /* Pacify GCC's 'empty if-body' warning. */
3366 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3367 # ifndef YYSTACK_ALLOC_MAXIMUM
3368  /* The OS might guarantee only one guard page at the bottom of the stack,
3369  and a page size can be as small as 4096 bytes. So we cannot safely
3370  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3371  to allow for a few compiler-allocated temporary stack slots. */
3372 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3373 # endif
3374 # else
3375 # define YYSTACK_ALLOC YYMALLOC
3376 # define YYSTACK_FREE YYFREE
3377 # ifndef YYSTACK_ALLOC_MAXIMUM
3378 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3379 # endif
3380 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
3381  && ! ((defined YYMALLOC || defined malloc) \
3382  && (defined YYFREE || defined free)))
3383 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3384 # ifndef EXIT_SUCCESS
3385 # define EXIT_SUCCESS 0
3386 # endif
3387 # endif
3388 # ifndef YYMALLOC
3389 # define YYMALLOC malloc
3390 # if ! defined malloc && ! defined EXIT_SUCCESS
3391 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3392 # endif
3393 # endif
3394 # ifndef YYFREE
3395 # define YYFREE free
3396 # if ! defined free && ! defined EXIT_SUCCESS
3397 void free (void *); /* INFRINGES ON USER NAME SPACE */
3398 # endif
3399 # endif
3400 # endif
3401 #endif /* 1 */
3402 
3403 #if (! defined yyoverflow \
3404  && (! defined __cplusplus \
3405  || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3406  && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3407 
3408 /* A type that is properly aligned for any stack member. */
3409 union yyalloc
3410 {
3411  yy_state_t yyss_alloc;
3412  YYSTYPE yyvs_alloc;
3413  YYLTYPE yyls_alloc;
3414 };
3415 
3416 /* The size of the maximum gap between one aligned stack and the next. */
3417 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3418 
3419 /* The size of an array large to enough to hold all stacks, each with
3420  N elements. */
3421 # define YYSTACK_BYTES(N) \
3422  ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3423  + YYSIZEOF (YYLTYPE)) \
3424  + 2 * YYSTACK_GAP_MAXIMUM)
3425 
3426 # define YYCOPY_NEEDED 1
3427 
3428 /* Relocate STACK from its old location to the new one. The
3429  local variables YYSIZE and YYSTACKSIZE give the old and new number of
3430  elements in the stack, and YYPTR gives the new location of the
3431  stack. Advance YYPTR to a properly aligned location for the next
3432  stack. */
3433 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3434  do \
3435  { \
3436  YYPTRDIFF_T yynewbytes; \
3437  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3438  Stack = &yyptr->Stack_alloc; \
3439  yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3440  yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3441  } \
3442  while (0)
3443 
3444 #endif
3445 
3446 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3447 /* Copy COUNT objects from SRC to DST. The source and destination do
3448  not overlap. */
3449 # ifndef YYCOPY
3450 # if defined __GNUC__ && 1 < __GNUC__
3451 # define YYCOPY(Dst, Src, Count) \
3452  __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3453 # else
3454 # define YYCOPY(Dst, Src, Count) \
3455  do \
3456  { \
3457  YYPTRDIFF_T yyi; \
3458  for (yyi = 0; yyi < (Count); yyi++) \
3459  (Dst)[yyi] = (Src)[yyi]; \
3460  } \
3461  while (0)
3462 # endif
3463 # endif
3464 #endif /* !YYCOPY_NEEDED */
3465 
3466 /* YYFINAL -- State number of the termination state. */
3467 #define YYFINAL 134
3468 /* YYLAST -- Last index in YYTABLE. */
3469 #define YYLAST 15506
3470 
3471 /* YYNTOKENS -- Number of terminals. */
3472 #define YYNTOKENS 163
3473 /* YYNNTS -- Number of nonterminals. */
3474 #define YYNNTS 282
3475 /* YYNRULES -- Number of rules. */
3476 #define YYNRULES 788
3477 /* YYNSTATES -- Number of states. */
3478 #define YYNSTATES 1349
3479 
3480 /* YYMAXUTOK -- Last valid token kind. */
3481 #define YYMAXUTOK 362
3482 
3483 
3484 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3485  as returned by yylex, with out-of-bounds checking. */
3486 #define YYTRANSLATE(YYX) \
3487  (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3488  ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3489  : YYSYMBOL_YYUNDEF)
3490 
3491 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3492  as returned by yylex. */
3493 static const yytype_uint8 yytranslate[] =
3494 {
3495  0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3496  155, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3497  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3498  2, 2, 162, 149, 2, 2, 2, 147, 142, 2,
3499  158, 159, 145, 143, 156, 144, 69, 146, 2, 2,
3500  2, 2, 2, 2, 2, 2, 2, 2, 137, 161,
3501  139, 135, 138, 136, 2, 2, 2, 2, 2, 2,
3502  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3503  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3504  2, 154, 70, 160, 141, 2, 157, 2, 2, 2,
3505  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3506  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3507  2, 2, 2, 152, 140, 153, 150, 2, 89, 90,
3508  91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3509  80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3510  97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3511  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3512  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3513  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3514  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3515  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3516  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3517  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3518  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3519  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3520  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3521  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3522  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3523  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3524  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3525  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3526  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3527  65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3528  104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3529  114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3530  124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3531  134, 148, 151
3532 };
3533 
3534 #if YYDEBUG
3535 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3536 static const yytype_int16 yyrline[] =
3537 {
3538  0, 2971, 2971, 2971, 2997, 2997, 2997, 3003, 3008, 3013,
3539  3020, 3025, 3032, 3034, 3048, 3053, 3044, 3064, 3061, 3074,
3540  3080, 3085, 3090, 3097, 3102, 3101, 3111, 3113, 3120, 3120,
3541  3125, 3130, 3138, 3147, 3154, 3160, 3166, 3177, 3188, 3197,
3542  3210, 3211, 3217, 3222, 3233, 3238, 3239, 3246, 3251, 3256,
3543  3262, 3262, 3267, 3273, 3278, 3289, 3300, 3308, 3309, 3315,
3544  3315, 3315, 3322, 3327, 3335, 3338, 3339, 3344, 3349, 3354,
3545  3360, 3359, 3373, 3372, 3385, 3388, 3400, 3410, 3409, 3423,
3546  3428, 3434, 3434, 3434, 3441, 3442, 3445, 3446, 3453, 3461,
3547  3468, 3475, 3484, 3489, 3494, 3499, 3504, 3510, 3516, 3522,
3548  3527, 3534, 3543, 3544, 3551, 3552, 3559, 3564, 3569, 3574,
3549  3579, 3584, 3589, 3594, 3599, 3604, 3611, 3612, 3619, 3624,
3550  3631, 3636, 3643, 3643, 3648, 3653, 3659, 3664, 3670, 3675,
3551  3680, 3688, 3688, 3693, 3698, 3703, 3708, 3713, 3718, 3723,
3552  3731, 3739, 3742, 3747, 3752, 3759, 3759, 3760, 3761, 3766,
3553  3769, 3774, 3777, 3782, 3782, 3790, 3791, 3792, 3793, 3794,
3554  3795, 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, 3804,
3555  3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814,
3556  3815, 3816, 3817, 3818, 3819, 3822, 3822, 3822, 3823, 3823,
3557  3824, 3824, 3824, 3825, 3825, 3825, 3825, 3826, 3826, 3826,
3558  3826, 3827, 3827, 3827, 3828, 3828, 3828, 3828, 3829, 3829,
3559  3829, 3829, 3830, 3830, 3830, 3830, 3831, 3831, 3831, 3831,
3560  3832, 3832, 3832, 3832, 3833, 3833, 3836, 3841, 3846, 3851,
3561  3856, 3861, 3866, 3872, 3878, 3884, 3891, 3898, 3904, 3910,
3562  3916, 3922, 3927, 3932, 3937, 3942, 3947, 3952, 3957, 3962,
3563  3967, 3972, 3977, 3982, 3987, 3988, 3993, 3998, 4003, 4008,
3564  4013, 4018, 4023, 4028, 4033, 4038, 4043, 4049, 4056, 4067,
3565  4078, 4084, 4085, 4091, 4098, 4099, 4100, 4101, 4104, 4109,
3566  4117, 4123, 4130, 4137, 4144, 4145, 4149, 4154, 4161, 4166,
3567  4175, 4180, 4190, 4202, 4203, 4209, 4210, 4211, 4215, 4220,
3568  4227, 4233, 4238, 4244, 4250, 4254, 4254, 4292, 4297, 4305,
3569  4310, 4318, 4323, 4328, 4333, 4341, 4346, 4355, 4356, 4360,
3570  4365, 4370, 4388, 4388, 4388, 4388, 4388, 4388, 4388, 4388,
3571  4389, 4390, 4391, 4397, 4396, 4409, 4409, 4415, 4421, 4426,
3572  4431, 4436, 4442, 4447, 4452, 4457, 4462, 4468, 4473, 4478,
3573  4483, 4484, 4490, 4491, 4500, 4509, 4518, 4528, 4527, 4542,
3574  4541, 4554, 4561, 4604, 4603, 4621, 4620, 4640, 4639, 4658,
3575  4656, 4673, 4671, 4686, 4691, 4696, 4701, 4716, 4723, 4730,
3576  4748, 4755, 4763, 4771, 4778, 4786, 4795, 4804, 4812, 4819,
3577  4826, 4834, 4841, 4847, 4862, 4869, 4874, 4880, 4887, 4894,
3578  4895, 4896, 4899, 4900, 4903, 4904, 4914, 4915, 4922, 4923,
3579  4926, 4931, 4938, 4943, 4950, 4955, 4960, 4965, 4970, 4977,
3580  4983, 4990, 4991, 4998, 4998, 5000, 5000, 5000, 5005, 5010,
3581  5015, 5022, 5030, 5030, 5030, 5030, 5030, 5030, 5035, 5040,
3582  5045, 5050, 5055, 5061, 5066, 5071, 5076, 5081, 5086, 5091,
3583  5096, 5101, 5108, 5109, 5115, 5122, 5132, 5137, 5144, 5146,
3584  5150, 5155, 5161, 5167, 5172, 5179, 5185, 5178, 5211, 5218,
3585  5227, 5234, 5233, 5244, 5252, 5264, 5274, 5283, 5290, 5297,
3586  5308, 5314, 5319, 5325, 5331, 5336, 5341, 5349, 5355, 5363,
3587  5363, 5380, 5380, 5401, 5407, 5412, 5418, 5425, 5435, 5436,
3588  5439, 5440, 5442, 5453, 5450, 5466, 5467, 5470, 5471, 5477,
3589  5485, 5486, 5492, 5498, 5503, 5508, 5515, 5518, 5525, 5528,
3590  5533, 5536, 5543, 5550, 5551, 5552, 5559, 5566, 5573, 5579,
3591  5586, 5593, 5600, 5606, 5611, 5616, 5623, 5622, 5633, 5639,
3592  5647, 5653, 5658, 5663, 5668, 5673, 5676, 5680, 5687, 5692,
3593  5699, 5707, 5713, 5720, 5721, 5728, 5735, 5740, 5745, 5750,
3594  5757, 5759, 5766, 5772, 5784, 5785, 5800, 5805, 5812, 5818,
3595  5819, 5826, 5827, 5834, 5841, 5847, 5853, 5854, 5855, 5856,
3596  5862, 5870, 5870, 5870, 5870, 5870, 5870, 5870, 5870, 5871,
3597  5876, 5879, 5887, 5899, 5906, 5913, 5918, 5923, 5930, 5951,
3598  5954, 5959, 5963, 5966, 5971, 5974, 5981, 5984, 5985, 5988,
3599  6002, 6003, 6004, 6011, 6024, 6036, 6043, 6043, 6043, 6043,
3600  6047, 6051, 6058, 6060, 6067, 6067, 6071, 6075, 6082, 6082,
3601  6085, 6085, 6089, 6093, 6101, 6105, 6113, 6117, 6125, 6129,
3602  6137, 6141, 6167, 6170, 6169, 6184, 6192, 6196, 6183, 6215,
3603  6216, 6219, 6224, 6227, 6228, 6231, 6247, 6248, 6251, 6259,
3604  6260, 6268, 6269, 6270, 6271, 6274, 6275, 6276, 6279, 6279,
3605  6280, 6283, 6284, 6285, 6286, 6287, 6288, 6289, 6292, 6302,
3606  6309, 6309, 6316, 6317, 6321, 6320, 6331, 6337, 6338, 6347,
3607  6357, 6358, 6358, 6375, 6375, 6375, 6380, 6385, 6390, 6395,
3608  6412, 6412, 6412, 6412, 6412, 6412, 6417, 6422, 6427, 6432,
3609  6437, 6442, 6447, 6452, 6457, 6462, 6467, 6472, 6477, 6483,
3610  6490, 6501, 6510, 6519, 6528, 6539, 6540, 6550, 6558, 6563,
3611  6582, 6584, 6595, 6615, 6621, 6629, 6635, 6643, 6644, 6647,
3612  6653, 6659, 6667, 6668, 6671, 6677, 6685, 6686, 6689, 6695,
3613  6703, 6708, 6715, 6721, 6720, 6758, 6759, 6766, 6768, 6793,
3614  6798, 6803, 6810, 6816, 6821, 6830, 6830, 6831, 6834, 6835,
3615  6838, 6839, 6840, 6843, 6844, 6847, 6848, 6851, 6852, 6855,
3616  6858, 6861, 6864, 6865, 6868, 6869, 6876, 6877, 6881
3617 };
3618 #endif
3619 
3621 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3622 
3623 #if 1
3624 /* The user-facing name of the symbol whose (internal) number is
3625  YYSYMBOL. No bounds checking. */
3626 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3627 
3628 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3629  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3630 static const char *const yytname[] =
3631 {
3632  "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3633  "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3634  "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3635  "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3636  "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3637  "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3638  "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3639  "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3640  "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3641  "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3642  "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3643  "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3644  "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3645  "\"method\"", "\"global variable\"", "\"instance variable\"",
3646  "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3647  "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3648  "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3649  "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3650  "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3651  "\"escaped form feed\"", "\"escaped carriage return\"",
3652  "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3653  "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3654  "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3655  "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3656  "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3657  "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
3658  "\"**arg\"", "\"&\"", "\"->\"", "\"symbol literal\"",
3659  "\"string literal\"", "\"backtick literal\"", "\"regexp literal\"",
3660  "\"word list\"", "\"verbatim word list\"", "\"symbol list\"",
3661  "\"verbatim symbol list\"", "\"terminator\"", "\"'}'\"", "\"'#{'\"",
3662  "tSTRING_DVAR", "tLAMBEG", "tLABEL_END", "tIGNORED_NL", "tCOMMENT",
3663  "tEMBDOC_BEG", "tEMBDOC", "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END",
3664  "k__END__", "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'",
3665  "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'",
3666  "tLAST_TOKEN", "'{'", "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'",
3667  "']'", "';'", "' '", "$accept", "$@1", "program", "option_terms",
3668  "top_compstmt", "top_stmts", "top_stmt", "block_open", "begin_block",
3669  "$@2", "$@3", "bodystmt", "$@4", "compstmt", "stmts", "stmt_or_begin",
3670  "$@5", "allow_exits", "k_END", "$@6", "stmt", "command_asgn",
3671  "endless_command", "option_'\\n'", "command_rhs", "expr", "$@7", "$@8",
3672  "def_name", "defn_head", "$@9", "defs_head", "expr_value", "$@10",
3673  "$@11", "expr_value_do", "command_call", "block_command",
3674  "cmd_brace_block", "fcall", "command", "mlhs", "mlhs_inner",
3675  "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post", "mlhs_node", "lhs",
3676  "cname", "cpath", "fname", "fitem", "undef_list", "$@12", "op",
3677  "reswords", "arg", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3678  "begin_defined", "after_rescue", "arg_value", "aref_args", "arg_rhs",
3679  "paren_args", "opt_paren_args", "opt_call_args", "call_args", "$@13",
3680  "command_args", "block_arg", "opt_block_arg", "args", "arg_splat",
3681  "mrhs_arg", "mrhs", "primary", "$@14", "$@15", "@16", "@17", "$@18",
3682  "$@19", "$@20", "$@21", "$@22", "primary_value", "k_begin", "k_if",
3683  "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3684  "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3685  "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3686  "do", "if_tail", "opt_else", "for_var", "f_marg", "f_marg_list",
3687  "f_margs", "f_rest_marg", "f_any_kwrest", "$@23", "f_eq",
3688  "f_kwarg_f_block_kw", "block_args_tail", "excessed_comma",
3689  "f_opt_primary_value", "f_optarg_primary_value",
3690  "opt_args_tail_block_args_tail", "block_param", "opt_block_param",
3691  "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "max_numparam",
3692  "numparam", "it_id", "@24", "$@25", "lambda", "f_larglist",
3693  "lambda_body", "$@26", "do_block", "block_call", "method_call",
3694  "brace_block", "@27", "brace_body", "@28", "do_body", "case_args",
3695  "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg", "$@29",
3696  "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body", "p_expr",
3697  "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic", "$@30",
3698  "p_args", "p_args_head", "p_args_tail", "p_find", "p_rest",
3699  "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
3700  "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value", "p_primitive",
3701  "p_variable", "p_var_ref", "p_expr_ref", "p_const", "opt_rescue",
3702  "exc_list", "exc_var", "opt_ensure", "literal", "strings", "string",
3703  "string1", "xstring", "regexp", "nonempty_list_' '",
3704  "words_tWORDS_BEG_word_list", "words", "word_list", "word",
3705  "words_tSYMBOLS_BEG_symbol_list", "symbols", "symbol_list",
3706  "words_tQWORDS_BEG_qword_list", "qwords",
3707  "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3708  "string_contents", "xstring_contents", "regexp_contents",
3709  "string_content", "@31", "@32", "@33", "@34", "string_dend",
3710  "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3711  "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3712  "var_ref", "var_lhs", "backref", "$@35", "superclass",
3713  "f_opt_paren_args", "f_paren_args", "f_arglist", "@36", "f_kwarg_f_kw",
3714  "args_tail", "f_opt_arg_value", "f_optarg_arg_value",
3715  "opt_args_tail_args_tail", "f_args", "args_forward", "f_bad_arg",
3716  "f_norm_arg", "f_arg_asgn", "f_arg_item", "f_arg", "f_label", "f_kw",
3717  "f_block_kw", "kwrest_mark", "f_no_kwarg", "f_kwrest", "restarg_mark",
3718  "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg",
3719  "singleton", "$@37", "assoc_list", "assocs", "assoc", "operation",
3720  "operation2", "operation3", "dot_or_colon", "call_op", "call_op2",
3721  "rparen", "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3722 };
3723 
3724 static const char *
3725 yysymbol_name (yysymbol_kind_t yysymbol)
3726 {
3727  return yytname[yysymbol];
3728 }
3729 #endif
3730 
3731 #define YYPACT_NINF (-1105)
3732 
3733 #define yypact_value_is_default(Yyn) \
3734  ((Yyn) == YYPACT_NINF)
3735 
3736 #define YYTABLE_NINF (-789)
3737 
3738 #define yytable_value_is_error(Yyn) \
3739  ((Yyn) == YYTABLE_NINF)
3740 
3741 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3742  STATE-NUM. */
3743 static const yytype_int16 yypact[] =
3744 {
3745  -1105, 5137, 116, -1105, -1105, -1105, -1105, 9782, -1105, -1105,
3746  -1105, -1105, -1105, -1105, -1105, 10845, 10845, -1105, -1105, -1105,
3747  -1105, 6047, -1105, -1105, -1105, -1105, 577, 9627, 14, 2,
3748  -1105, -1105, -1105, -1105, 4430, 6204, -1105, -1105, 5576, -1105,
3749  -1105, -1105, -1105, -1105, -1105, -1105, -1105, 12297, 12297, 12297,
3750  12297, 176, 8533, 8692, 11329, 11571, 10085, -1105, 9472, -1105,
3751  -1105, -1105, 117, 117, 117, 117, 1370, 12418, 12297, -1105,
3752  646, -1105, -1105, 1384, -1105, 776, 314, 314, -1105, -1105,
3753  260, 148, 160, -1105, 186, 12902, -1105, 268, 2773, 925,
3754  370, 385, -1105, 10724, 10724, -1105, -1105, 9157, 13021, 13140,
3755  13259, 9316, 10845, 6675, -1105, 683, 78, -1105, -1105, 366,
3756  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3757  -1105, -1105, -1105, -1105, -1105, -1105, -1105, 320, 420, -1105,
3758  308, 427, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3759  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3760  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3761  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3762  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3763  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3764  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3765  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3766  -1105, 333, -1105, -1105, -1105, -1105, -1105, -1105, 336, 12297,
3767  448, 8692, 12297, 12297, 12297, -1105, 12297, 314, 314, -1105,
3768  393, 5546, 480, -1105, -1105, 435, -1105, 432, 52, 53,
3769  500, 70, 465, -1105, -1105, 10966, -1105, 10845, -1105, -1105,
3770  10463, 12539, 614, -1105, 474, -1105, 8851, -1105, -1105, -1105,
3771  -1105, -1105, 519, 260, -1105, 546, -1105, 572, 621, 5703,
3772  5703, 611, -1105, 8533, 561, 646, -1105, 1384, 14, 602,
3773  -1105, -1105, 590, 720, 819, -1105, 480, 616, 819, -1105,
3774  14, 704, 1370, 13378, 613, 613, 627, -1105, 658, 731,
3775  741, 746, -1105, -1105, 818, -1105, -1105, 972, 1002, 547,
3776  -1105, 630, 630, 630, 630, 716, -1105, -1105, -1105, -1105,
3777  -1105, -1105, -1105, 5290, 672, 10724, 10724, 10724, 10724, -1105,
3778  12539, 12539, 2275, 691, 710, -1105, 2275, -1105, 752, -1105,
3779  -1105, -1105, -1105, 747, -1105, -1105, -1105, -1105, -1105, -1105,
3780  -1105, 8533, 10204, 743, -1105, -1105, 12297, 12297, 12297, 12297,
3781  12297, -1105, -1105, 12297, 12297, 12297, 12297, 12297, 12297, 12297,
3782  12297, -1105, 12297, -1105, -1105, 12297, 12297, 12297, 12297, 12297,
3783  12297, 12297, 12297, 12297, 12297, -1105, -1105, 4541, 10845, 13864,
3784  7462, -1105, 776, 88, 88, 10724, 8380, 8380, -1105, 646,
3785  733, 854, -1105, -1105, 749, 883, 81, 135, 140, 879,
3786  887, 10724, 634, -1105, 778, 793, -1105, -1105, -1105, -1105,
3787  59, 92, 526, 584, 624, 649, 719, 724, 742, -1105,
3788  -1105, -1105, -1105, 788, -1105, 10323, -1105, -1105, -1105, 15349,
3789  -1105, -1105, -1105, -1105, -1105, -1105, 410, -1105, -1105, -1105,
3790  730, 804, 807, -1105, 12297, 11087, -1105, -1105, 13963, 10845,
3791  14062, -1105, -1105, 11450, -1105, 12297, 14, -1105, 789, 14,
3792  797, -1105, -1105, 799, 177, -1105, -1105, -1105, -1105, -1105,
3793  9782, -1105, -1105, 12297, 815, 14161, 14062, -1105, 2, 14,
3794  -1105, -1105, 4702, 834, 841, -1105, 11329, -1105, -1105, 11571,
3795  -1105, -1105, -1105, 474, 809, -1105, -1105, 869, -1105, 13378,
3796  14260, 10845, 14359, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3797  -1105, -1105, -1105, -1105, -1105, 1050, 297, 1081, 326, 12297,
3798  -1105, -1105, 9004, -1105, -1105, -1105, -1105, -1105, 10603, -1105,
3799  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, 1300,
3800  -1105, -1105, -1105, -1105, -1105, 876, -1105, 880, -1105, -1105,
3801  886, 14, -1105, -1105, -1105, 913, -1105, 900, 12297, -1105,
3802  115, -1105, -1105, 1007, 904, 1010, -1105, 12660, 7462, 646,
3803  12660, 7462, -1105, 914, -1105, -1105, -1105, 134, 134, 11692,
3804  14, 13378, 916, -1105, 11692, -1105, 621, 4975, 4975, 4975,
3805  4975, 5128, 4761, 4975, 4975, 5703, 5703, 529, 529, -1105,
3806  5389, 1270, 1270, 1294, 406, 406, 621, 621, 621, 1457,
3807  1457, 6832, 5733, 7146, 5890, -1105, -1105, 519, -1105, 14,
3808  920, 643, -1105, 685, -1105, -1105, 6361, 134, -1105, -1105,
3809  7615, 1056, 8074, 170, 134, 134, 1062, 1057, 164, 14458,
3810  10845, 14557, -1105, -1105, -1105, 809, -1105, -1105, -1105, 14656,
3811  10845, 14755, 7462, 12539, -1105, -1105, -1105, 14, -1105, -1105,
3812  -1105, 3926, 12418, 12418, 9782, 12297, 12781, 12781, 12297, -1105,
3813  480, -1105, -1105, 465, 5419, 6518, 14, 413, 422, 12297,
3814  12297, -1105, -1105, 11208, -1105, 11450, -1105, -1105, -1105, 12539,
3815  5546, -1105, 50, 519, 519, 12297, -1105, 259, -1105, -1105,
3816  819, 13378, 869, 305, 344, 14, 391, 423, -1105, -1105,
3817  1151, -1105, 315, -1105, 117, -1105, -1105, 315, 117, -1105,
3818  621, 931, -1105, 1300, 1251, -1105, 929, 14, 930, -1105,
3819  291, -1105, -1105, 68, -1105, 2275, -1105, -1105, 955, 12297,
3820  2275, -1105, -1105, -1105, -1105, -1105, 1777, -1105, -1105, 577,
3821  1047, -1105, 5546, 1053, 134, -1105, 1047, 1053, 134, -1105,
3822  -1105, 946, -1105, -1105, -1105, -1105, -1105, 12297, -1105, 950,
3823  951, 1071, -1105, -1105, 869, 13378, -1105, -1105, 1076, 991,
3824  4088, -1105, -1105, -1105, 852, 461, -1105, -1105, 994, -1105,
3825  -1105, -1105, -1105, 747, 968, 878, 11087, -1105, -1105, -1105,
3826  -1105, 747, -1105, -1105, 1124, 965, -1105, 1122, -1105, -1105,
3827  -1105, -1105, -1105, -1105, 11813, 134, -1105, 1062, 134, 349,
3828  359, 14, 171, 178, 8380, 646, 10724, 7462, 1242, 344,
3829  -1105, 14, 134, 177, 9937, -1105, 78, 148, -1105, 4172,
3830  -1105, -1105, -1105, -1105, -1105, 577, -1105, -1105, -1105, 527,
3831  -1105, -1105, 14, 983, 177, -1105, -1105, -1105, 467, -1105,
3832  -1105, -1105, -1105, -1105, 630, -1105, 630, 630, 630, -1105,
3833  14, -1105, 1300, -1105, 1261, -1105, -1105, 1090, 876, -1105,
3834  -1105, 987, 988, -1105, -1105, 992, -1105, 993, -1105, 987,
3835  12660, -1105, -1105, -1105, -1105, -1105, -1105, -1105, 999, 11934,
3836  -1105, 869, -1105, -1105, -1105, 14854, 10845, 14953, -1105, -1105,
3837  12297, 12418, 12418, 997, -1105, -1105, -1105, 12418, 12418, -1105,
3838  -1105, 12055, 1122, -1105, -1105, -1105, 8380, 10724, 134, -1105,
3839  -1105, 134, -1105, 12297, -1105, 98, -1105, -1105, 134, -1105,
3840  191, 134, 7462, 646, 134, -1105, -1105, -1105, -1105, -1105,
3841  -1105, 12781, 12297, 12297, -1105, 12297, 12297, -1105, 11450, -1105,
3842  1672, 4984, -1105, -1105, 1018, 1021, -1105, 1777, -1105, 1777,
3843  -1105, 2275, -1105, 1777, -1105, -1105, 1047, 1053, 12297, 12297,
3844  -1105, -1105, 12297, 1029, 10603, 10603, 12418, 12297, 6989, 7303,
3845  14, 549, 589, 13690, 13690, 5546, -1105, -1105, -1105, -1105,
3846  -1105, 12418, -1105, -1105, -1105, -1105, 950, -1105, 1065, -1105,
3847  1178, -1105, -1105, 88, -1105, -1105, -1105, 12176, 7768, -1105,
3848  -1105, -1105, 134, -1105, -1105, 12297, 2275, -1105, -1105, 137,
3849  1261, 1261, 987, 987, 1035, 987, 5546, 5546, 1059, 1059,
3850  999, -1105, -1105, 5546, 607, -1105, -1105, -1105, 3518, 3518,
3851  779, -1105, 4010, 272, 1150, -1105, 1225, -1105, -1105, 35,
3852  -1105, 1067, -1105, -1105, -1105, 1054, -1105, 1058, -1105, 13876,
3853  -1105, -1105, -1105, -1105, 908, -1105, -1105, -1105, 41, -1105,
3854  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, 469, -1105,
3855  -1105, -1105, 13497, 88, -1105, -1105, 8380, -1105, -1105, 8227,
3856  7615, 12297, -1105, 494, 13690, -1105, 14, 89, -1105, -1105,
3857  -1105, 1021, -1105, -1105, 1777, -1105, -1105, 1993, 9004, -1105,
3858  -1105, 7462, -1105, -1105, -1105, -1105, 13876, 251, 14, 13783,
3859  -1105, 14, 1064, -1105, 1068, -1105, -1105, -1105, 738, -1105,
3860  10724, -1105, 1157, 13783, 13876, 13876, 696, 1111, 3518, 3518,
3861  779, -13, 712, 13690, 13690, -1105, 1166, -1105, 875, 106,
3862  120, 188, 7462, 646, -1105, 965, -1105, -1105, -1105, -1105,
3863  88, 979, 1063, 1066, -1105, 9004, -1105, 987, 876, 1072,
3864  -1105, -1105, 1073, 14, 1093, 913, 1079, 13616, -1105, 1082,
3865  -1105, -1105, -1105, 74, -1105, 1111, 1083, 1085, -1105, -1105,
3866  -1105, -1105, -1105, 14, -1105, -1105, 1086, -1105, 1089, -1105,
3867  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
3868  14, 14, 14, 14, 14, 14, 209, 15052, 10845, 15151,
3869  1124, -1105, 1178, -1105, -1105, 10724, 10724, 1290, -1105, 7462,
3870  1101, -1105, -1105, 68, -1105, 1854, -1105, 1116, -1105, 13616,
3871  1854, -1105, -1105, 1204, 890, 1697, -1105, -1105, 13876, -1105,
3872  696, -1105, 13876, 13783, 832, -1105, -1105, -1105, -1105, -1105,
3873  -1105, 227, 232, 14, 243, 244, -1105, -1105, 7921, -1105,
3874  -1105, -1105, 895, -1105, -1105, 134, -1105, -1105, 876, -1105,
3875  -1105, 1105, 1114, -1105, 890, 1119, 1120, -1105, 15250, 1105,
3876  1129, 14, 1129, -1105, -1105, 267, 409, 1290, -1105, -1105,
3877  -1105, 1697, -1105, 1697, -1105, 1854, -1105, 1697, -1105, 1130,
3878  1132, -1105, 13876, -1105, -1105, -1105, -1105, -1105, 1105, 1105,
3879  1135, 1105, -1105, -1105, 1697, -1105, -1105, 1105, -1105
3880 };
3881 
3882 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3883  Performed when YYTABLE does not specify something else to do. Zero
3884  means the default is an error. */
3885 static const yytype_int16 yydefact[] =
3886 {
3887  2, 0, 0, 46, 385, 386, 387, 0, 378, 379,
3888  380, 383, 26, 26, 26, 373, 374, 375, 376, 397,
3889  398, 305, 672, 671, 673, 674, 59, 0, 59, 0,
3890  788, 676, 675, 677, 765, 767, 666, 665, 766, 667,
3891  661, 662, 663, 664, 610, 682, 683, 0, 0, 0,
3892  0, 0, 0, 0, 788, 788, 114, 465, 636, 636,
3893  638, 640, 0, 0, 0, 0, 0, 0, 0, 3,
3894  4, 8, 26, 10, 40, 45, 691, 691, 65, 85,
3895  305, 84, 0, 102, 0, 106, 116, 0, 74, 254,
3896  270, 0, 333, 0, 0, 81, 81, 0, 0, 0,
3897  0, 0, 342, 305, 352, 86, 350, 322, 323, 609,
3898  611, 324, 325, 619, 326, 625, 328, 629, 327, 631,
3899  329, 608, 653, 654, 607, 659, 670, 678, 679, 330,
3900  0, 331, 89, 7, 1, 195, 206, 196, 219, 192,
3901  212, 202, 201, 222, 223, 217, 200, 199, 194, 220,
3902  224, 225, 204, 193, 207, 211, 213, 205, 198, 214,
3903  221, 216, 215, 208, 218, 203, 191, 210, 209, 190,
3904  197, 188, 189, 185, 186, 187, 145, 147, 146, 180,
3905  181, 176, 158, 159, 160, 167, 164, 166, 161, 162,
3906  182, 183, 168, 169, 173, 177, 163, 165, 155, 156,
3907  157, 170, 171, 172, 174, 175, 178, 179, 184, 150,
3908  152, 33, 148, 149, 151, 381, 382, 384, 0, 761,
3909  0, 0, 316, 764, 308, 636, 0, 691, 691, 300,
3910  0, 283, 311, 100, 304, 788, 312, 0, 678, 679,
3911  0, 331, 788, 757, 101, 788, 484, 0, 97, 60,
3912  59, 0, 0, 28, 788, 12, 0, 11, 27, 280,
3913  373, 374, 485, 0, 248, 0, 342, 345, 249, 239,
3914  240, 339, 24, 0, 0, 4, 21, 23, 59, 104,
3915  20, 335, 0, 59, 59, 284, 0, 0, 59, 755,
3916  59, 0, 0, 0, 691, 691, 112, 377, 0, 122,
3917  123, 130, 462, 656, 0, 655, 657, 0, 0, 0,
3918  616, 620, 632, 626, 634, 660, 69, 260, 261, 785,
3919  784, 6, 786, 0, 0, 0, 0, 0, 0, 788,
3920  0, 0, 719, 0, 690, 369, 719, 688, 0, 371,
3921  388, 489, 478, 90, 491, 349, 389, 491, 474, 788,
3922  118, 0, 110, 107, 788, 72, 0, 0, 0, 0,
3923  0, 276, 277, 0, 0, 0, 0, 237, 238, 0,
3924  0, 70, 0, 274, 275, 0, 0, 0, 0, 0,
3925  0, 0, 0, 0, 0, 775, 776, 0, 788, 0,
3926  0, 80, 79, 0, 0, 0, 0, 0, 359, 4,
3927  5, 0, 409, 408, 0, 0, 678, 679, 331, 140,
3928  141, 0, 0, 143, 686, 0, 678, 679, 331, 367,
3929  215, 208, 218, 203, 185, 186, 187, 145, 146, 753,
3930  76, 75, 752, 0, 99, 59, 98, 778, 777, 0,
3931  351, 612, 788, 788, 153, 760, 339, 315, 763, 307,
3932  0, 0, 0, 788, 0, 0, 301, 310, 0, 788,
3933  0, 788, 788, 0, 302, 720, 59, 296, 788, 59,
3934  788, 295, 306, 0, 59, 348, 68, 30, 32, 31,
3935  0, 788, 281, 0, 0, 0, 0, 788, 0, 59,
3936  337, 19, 0, 103, 0, 340, 783, 782, 285, 783,
3937  287, 341, 756, 0, 129, 660, 120, 115, 690, 0,
3938  0, 788, 0, 463, 642, 658, 645, 643, 637, 613,
3939  614, 639, 615, 641, 617, 0, 0, 0, 0, 0,
3940  787, 9, 0, 34, 35, 36, 37, 282, 0, 66,
3941  67, 726, 723, 722, 721, 724, 732, 737, 720, 0,
3942  743, 738, 747, 746, 742, 788, 739, 788, 718, 701,
3943  704, 59, 699, 725, 727, 728, 730, 704, 734, 693,
3944  741, 422, 421, 745, 704, 749, 698, 0, 0, 0,
3945  0, 0, 462, 0, 489, 91, 462, 0, 0, 0,
3946  59, 0, 108, 119, 0, 502, 246, 253, 255, 256,
3947  257, 264, 265, 258, 259, 235, 236, 262, 263, 502,
3948  59, 250, 251, 252, 241, 242, 243, 244, 245, 278,
3949  279, 765, 767, 766, 769, 483, 768, 305, 481, 59,
3950  788, 765, 767, 766, 769, 482, 305, 0, 788, 400,
3951  0, 399, 0, 0, 0, 0, 0, 357, 339, 0,
3952  788, 0, 81, 365, 140, 141, 142, 684, 363, 0,
3953  788, 0, 0, 0, 773, 774, 77, 59, 344, 765,
3954  766, 305, 0, 0, 0, 0, 0, 0, 0, 759,
3955  313, 309, 314, 788, 765, 766, 59, 765, 766, 0,
3956  0, 758, 290, 297, 292, 299, 779, 347, 29, 0,
3957  266, 13, 338, 0, 788, 0, 25, 105, 22, 336,
3958  59, 0, 113, 770, 128, 59, 765, 766, 464, 646,
3959  0, 618, 0, 622, 0, 628, 624, 0, 0, 630,
3960  247, 0, 38, 0, 420, 412, 414, 59, 417, 410,
3961  0, 697, 751, 0, 696, 0, 714, 689, 0, 0,
3962  0, 711, 733, 568, 740, 744, 0, 716, 748, 59,
3963  54, 57, 271, 268, 0, 692, 55, 269, 0, 463,
3964  487, 0, 463, 395, 396, 488, 473, 316, 41, 318,
3965  0, 44, 317, 117, 111, 0, 64, 47, 62, 0,
3966  288, 311, 226, 42, 0, 331, 500, 500, 0, 788,
3967  788, 489, 480, 94, 0, 486, 297, 788, 788, 294,
3968  479, 92, 293, 334, 788, 788, 401, 788, 403, 82,
3969  402, 355, 356, 392, 0, 0, 502, 0, 0, 770,
3970  338, 59, 765, 766, 0, 0, 0, 0, 140, 141,
3971  144, 59, 0, 59, 0, 343, 475, 87, 48, 288,
3972  227, 56, 234, 154, 762, 59, 303, 788, 788, 486,
3973  788, 788, 59, 788, 59, 233, 286, 121, 486, 26,
3974  647, 644, 651, 652, 621, 623, 633, 627, 635, 39,
3975  59, 419, 0, 729, 0, 750, 694, 741, 788, 703,
3976  702, 704, 704, 424, 700, 704, 731, 704, 728, 704,
3977  0, 788, 788, 370, 372, 464, 88, 464, 321, 0,
3978  788, 109, 788, 788, 788, 0, 788, 0, 501, 501,
3979  0, 0, 0, 0, 95, 780, 788, 0, 0, 93,
3980  390, 788, 17, 599, 394, 393, 0, 0, 0, 404,
3981  406, 0, 83, 0, 493, 0, 360, 500, 0, 361,
3982  486, 0, 0, 0, 0, 486, 368, 754, 78, 476,
3983  477, 0, 0, 0, 788, 0, 0, 291, 298, 346,
3984  719, 0, 411, 413, 415, 418, 695, 0, 715, 0,
3985  712, 0, 707, 0, 709, 717, 61, 273, 0, 0,
3986  26, 26, 316, 319, 0, 0, 0, 0, 765, 766,
3987  59, 765, 766, 0, 0, 267, 53, 231, 52, 232,
3988  96, 0, 50, 229, 51, 230, 600, 601, 788, 602,
3989  788, 14, 407, 0, 353, 354, 494, 0, 0, 501,
3990  358, 362, 0, 685, 364, 0, 719, 466, 469, 0,
3991  0, 0, 704, 704, 704, 704, 58, 272, 788, 788,
3992  320, 43, 63, 289, 486, 591, 597, 564, 0, 0,
3993  0, 501, 59, 501, 552, 636, 0, 590, 73, 510,
3994  516, 518, 520, 514, 513, 548, 515, 557, 560, 563,
3995  569, 570, 559, 523, 571, 524, 576, 577, 578, 581,
3996  582, 583, 584, 585, 587, 586, 588, 589, 567, 71,
3997  49, 228, 0, 0, 604, 391, 0, 18, 606, 0,
3998  0, 0, 495, 788, 0, 366, 59, 0, 650, 649,
3999  648, 416, 713, 708, 0, 705, 710, 59, 0, 453,
4000  452, 0, 579, 580, 141, 595, 0, 540, 59, 541,
4001  545, 59, 0, 535, 0, 788, 538, 551, 0, 592,
4002  0, 593, 0, 511, 0, 0, 558, 562, 574, 575,
4003  0, 501, 501, 0, 0, 566, 0, 603, 0, 678,
4004  679, 331, 0, 4, 15, 788, 496, 498, 499, 497,
4005  0, 507, 456, 0, 471, 0, 467, 704, 788, 788,
4006  451, 433, 436, 59, 0, 728, 436, 736, 425, 436,
4007  430, 490, 492, 59, 533, 555, 543, 542, 534, 546,
4008  781, 536, 565, 59, 517, 512, 548, 519, 549, 553,
4009  636, 561, 556, 572, 573, 596, 522, 532, 521, 528,
4010  59, 59, 59, 59, 59, 59, 339, 0, 788, 0,
4011  788, 605, 788, 405, 503, 0, 0, 0, 468, 0,
4012  0, 706, 429, 0, 428, 0, 447, 0, 454, 0,
4013  431, 442, 444, 0, 735, 0, 449, 539, 0, 547,
4014  0, 594, 0, 0, 0, 525, 526, 527, 529, 530,
4015  531, 770, 338, 59, 765, 766, 598, 16, 0, 508,
4016  509, 460, 59, 458, 461, 0, 470, 426, 788, 435,
4017  434, 436, 436, 455, 432, 436, 436, 339, 0, 436,
4018  544, 59, 549, 550, 554, 486, 788, 0, 457, 472,
4019  427, 0, 448, 0, 445, 0, 439, 0, 441, 770,
4020  338, 450, 0, 537, 505, 506, 504, 459, 436, 436,
4021  436, 436, 446, 440, 0, 437, 443, 436, 438
4022 };
4023 
4024 /* YYPGOTO[NTERM-NUM]. */
4025 static const yytype_int16 yypgoto[] =
4026 {
4027  -1105, -1105, -1105, -96, 1038, -1105, 973, -1105, 811, -1105,
4028  -1105, -533, -1105, -39, 194, 817, -1105, 5, -1105, -1105,
4029  22, 254, -520, 18, -492, -57, -1105, -1105, 470, 2485,
4030  -1105, 2614, -9, -1105, -1105, -58, 125, -1105, -244, 1231,
4031  -12, 1221, -153, 21, -51, -1105, -417, 10, 1013, -395,
4032  1220, -38, -18, -1105, -1105, 20, -1105, 3966, -547, 1232,
4033  -1105, 562, 842, 541, 2850, -1105, 702, -16, 659, -373,
4034  60, -1105, 65, -328, -226, 15, -353, -1105, -540, -28,
4035  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, 867,
4036  -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105, -1105,
4037  -1105, -1105, -1105, -1105, -1105, 402, -1105, 629, 1595, 2113,
4038  -372, -1105, 162, -767, -1105, -793, -801, 605, 453, -502,
4039  -1105, 146, -1105, 231, -1105, -1104, 100, 184, -1105, 318,
4040  -1105, -993, -1105, 51, 295, 161, -389, -1105, -1105, 581,
4041  -1105, -1105, -1105, 530, -1105, -1105, -95, -1105, -516, -1105,
4042  1026, -1105, -769, -1105, -706, -825, -513, -1105, 63, -1105,
4043  -1105, -891, -753, -1105, -1105, -1105, -1105, 228, -1105, -142,
4044  -1105, -779, -957, -980, -343, -984, -732, -1105, 225, -1105,
4045  -1105, -785, 239, -1105, -584, 235, -1105, -1105, -1105, 158,
4046  -1105, -1105, 159, 1133, 1320, -1105, 1279, 1660, 1842, 17,
4047  -1105, 2023, -1105, 877, -1105, 2256, -1105, -1105, 2643, -1105,
4048  2725, -1105, -1105, -53, -1105, -1105, -186, -1105, -1105, -1105,
4049  -1105, -1105, -1105, 32, -1105, -1105, -1105, -1105, 29, -56,
4050  3112, -1, 1305, 3168, 1958, -1105, -1105, 132, 760, 38,
4051  -1105, -1105, -311, -683, 661, -426, -307, -196, -1089, -507,
4052  -324, -663, -493, -225, 675, 168, -374, -1105, -711, -1105,
4053  -671, -1105, -557, -522, -1105, -1105, -1105, 109, -396, 263,
4054  -346, -1105, -1105, -81, -1105, 119, 151, 122, -223, -44,
4055  -63, 55
4056 };
4057 
4058 /* YYDEFGOTO[NTERM-NUM]. */
4059 static const yytype_int16 yydefgoto[] =
4060 {
4061  0, 1, 2, 321, 69, 70, 71, 256, 257, 1109,
4062  1242, 637, 1020, 638, 275, 276, 488, 215, 72, 480,
4063  277, 74, 760, 473, 787, 75, 609, 595, 430, 227,
4064  844, 228, 393, 395, 942, 396, 78, 79, 585, 263,
4065  81, 82, 278, 83, 84, 85, 507, 86, 230, 413,
4066  414, 209, 210, 211, 674, 624, 213, 88, 763, 383,
4067  89, 537, 483, 538, 232, 282, 792, 625, 810, 466,
4068  467, 247, 248, 234, 456, 630, 236, 781, 782, 90,
4069  390, 494, 827, 646, 837, 835, 662, 578, 581, 265,
4070  92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
4071  344, 347, 931, 1106, 824, 936, 937, 775, 266, 267,
4072  640, 819, 938, 939, 405, 735, 736, 737, 738, 555,
4073  748, 749, 1189, 1299, 1261, 1191, 1192, 1256, 1193, 1128,
4074  1129, 1183, 1292, 1293, 513, 718, 869, 302, 1117, 104,
4075  1037, 1186, 1249, 348, 105, 106, 345, 582, 583, 586,
4076  587, 945, 825, 1179, 918, 1003, 796, 1288, 828, 1336,
4077  1180, 1068, 1205, 1070, 1071, 1163, 1164, 1072, 1270, 1138,
4078  1139, 1140, 1074, 1075, 1218, 1142, 1076, 1077, 1078, 1079,
4079  1080, 556, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 932,
4080  1018, 1103, 1107, 107, 108, 109, 110, 111, 112, 311,
4081  113, 114, 525, 722, 115, 116, 527, 117, 118, 119,
4082  120, 526, 528, 304, 308, 309, 518, 720, 719, 870,
4083  971, 1120, 871, 121, 122, 305, 123, 124, 125, 126,
4084  238, 239, 129, 240, 241, 836, 658, 333, 334, 335,
4085  336, 557, 889, 559, 560, 746, 561, 562, 563, 564,
4086  898, 566, 567, 568, 569, 1198, 570, 571, 572, 573,
4087  574, 575, 576, 741, 433, 663, 287, 470, 243, 132,
4088  703, 628, 666, 661, 439, 475, 805, 1146, 498, 641,
4089  400, 259
4090 };
4091 
4092 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4093  positive, shift that token. If negative, reduce the rule whose
4094  number is the opposite. If YYTABLE_NINF, syntax error. */
4095 static const yytype_int16 yytable[] =
4096 {
4097  128, 398, 306, 229, 229, 246, 307, 323, 565, 253,
4098  389, 440, 565, 274, 281, 629, 464, 656, 216, 217,
4099  303, 558, 642, 73, 438, 558, 322, 212, 297, 579,
4100  235, 235, 888, 767, 353, 744, 392, 392, 397, 214,
4101  392, 627, 739, 636, 251, 764, 254, 212, 768, 469,
4102  941, 128, 128, 322, 793, 300, 133, 297, 948, 214,
4103  766, 500, 890, 431, 342, 502, 296, 691, 771, 283,
4104  297, 297, 297, 279, 892, 233, 244, 324, 212, 897,
4105  312, 313, 314, 975, 300, 394, 686, 896, 399, 973,
4106  229, 919, 712, 671, 1004, 315, 797, 407, 417, 417,
4107  417, 639, 682, 691, 340, 1141, -131, 280, 280, 285,
4108  289, 639, 627, 1099, 636, 339, 134, 235, 1184, -131,
4109  489, 212, 521, 523, 242, 242, 546, 681, -672, 842,
4110  767, 337, 337, -132, 1194, 681, 1152, 1118, 715, 1160,
4111  704, 751, 249, 682, 773, 343, 547, -59, 757, 753,
4112  858, 1300, -680, -681, 255, 1207, 460, -672, 1294, 1206,
4113  -132, -671, 434, 284, 288, -139, 704, 754, 436, 249,
4114  462, 1219, 450, 1216, 784, 1152, 346, 551, 552, 491,
4115  848, 851, 274, 885, 486, -137, 885, -131, -132, -138,
4116  -671, 1153, 316, 474, 476, 1161, -134, 818, 590, 1162,
4117  1257, -139, 774, -136, 1114, -139, 1231, 1234, -766, 338,
4118  553, 242, 492, 1185, 330, 331, -133, 512, 1081, 1081,
4119  128, 1300, -138, 1181, 1073, 1073, 739, 881, 1294, 249,
4120  341, 322, 271, 229, 274, 229, 1136, -122, 1145, 1121,
4121  -135, 1029, 506, 319, 464, -137, 246, 342, 973, 320,
4122  1069, 1069, 891, 319, 1027, 128, -134, -136, 1119, 320,
4123  468, -131, 235, 899, 840, 297, 339, -131, 392, 392,
4124  392, 392, 128, 539, 540, -132, 280, 831, 73, 310,
4125  -133, -132, 337, 337, 1219, 923, 340, 841, 1219, 1314,
4126  457, -123, 300, 1313, 279, 349, -130, 457, 890, 691,
4127  471, 497, 497, 647, 954, 704, 497, 472, 503, 1137,
4128  1044, 133, 274, 947, 896, 704, 533, 534, 535, 536,
4129  -129, 505, 128, 651, 297, 319, 1157, -125, 280, 1081,
4130  -126, 320, 249, 339, -127, 1073, 1226, 1228, 392, 723,
4131  682, 723, 350, -139, 1178, 73, 1177, -124, 1314, -139,
4132  128, 300, 1152, 987, 392, 322, 242, 644, 645, 451,
4133  452, 1069, 592, 724, -138, 681, 976, 681, 911, 887,
4134  -138, 1081, 279, 635, -135, 739, 229, 739, 1081, 1081,
4135  986, 514, -135, 1203, -137, -765, 643, -137, -135, 128,
4136  -766, 1017, 728, -137, -103, 128, 128, 493, -134, -136,
4137  1137, 552, 653, 354, -134, -136, 280, -555, 442, 634,
4138  1137, 1137, 341, -338, 987, -117, -125, 725, 245, 1032,
4139  -680, 565, -133, 229, 935, -59, 565, 249, -133, 1006,
4140  1008, 1232, 1235, 553, 826, 1012, 1014, 516, 517, -377,
4141  -126, -338, -338, 471, 635, 280, 729, 229, -127, -788,
4142  235, 280, 280, 682, 385, -131, 1199, 856, 506, 634,
4143  -126, -126, 698, -765, -126, 978, 980, -377, -377, 982,
4144  635, 984, 332, 985, 1132, 1133, -122, 310, 681, 59,
4145  634, 297, 386, 387, 356, 1081, 1042, 866, 1043, 444,
4146  1045, 128, -124, 731, 250, 667, 635, 862, -338, 229,
4147  212, 385, -766, 753, 446, -126, 634, -765, 300, 935,
4148  487, 823, 214, 860, 471, -128, 990, -766, 991, 1100,
4149  -681, 1165, 861, 457, -377, 457, -125, 443, 453, 386,
4150  458, 128, 634, 739, 739, 765, 875, 128, 1311, 388,
4151  506, 875, 1298, 1000, 242, -138, -125, -125, -134, 1334,
4152  -125, 380, 381, 382, 668, -132, 682, -136, -127, 924,
4153  732, 443, -139, 297, 683, 761, 471, 929, 761, 627,
4154  1200, 636, 691, 1028, 1223, 1224, -123, 128, -127, -127,
4155  128, 454, -127, -130, 1302, 692, 459, 280, 694, 1306,
4156  300, 455, 258, 697, 834, -673, -139, 896, 1202, 820,
4157  461, 815, -124, 817, 780, 710, 843, 356, 707, 780,
4158  742, 802, 742, 514, 522, 385, 1122, 1123, 1125, 1126,
4159  809, 463, -124, -124, -673, 1188, -124, 964, 798, 1098,
4160  1098, 1187, 481, 280, 1196, 635, 280, 856, 229, 128,
4161  681, 128, 864, 386, 485, 635, 565, 804, 229, 807,
4162  626, 1110, 626, -674, 1340, 809, 853, 565, 896, 558,
4163  867, 128, -133, 1038, 872, 1135, 1252, 1254, 477, 516,
4164  517, 634, 378, 379, 380, 381, 382, 245, 478, 479,
4165  747, 634, -674, 297, -134, 457, 654, 802, 809, 808,
4166  655, 812, 803, -676, 212, 280, 885, 280, 1200, 356,
4167  459, 811, 626, 1200, 804, 471, 214, 926, 1200, 783,
4168  300, 487, 565, 917, 778, 471, 1295, 280, -675, 788,
4169  490, 626, -676, 626, -136, 558, 812, 385, 497, 1116,
4170  435, 1172, 249, 804, 506, 250, 847, -102, 457, 874,
4171  1098, 876, -133, 807, 877, 878, -138, -675, 626, 626,
4172  495, 959, 385, 1188, 1057, 386, 510, 297, 1188, 812,
4173  504, 1251, 1301, 1188, 1200, 1225, 1200, -129, 1200, 501,
4174  1200, 332, 1309, 626, 547, 626, 1320, 900, -134, 392,
4175  386, 437, 1098, 509, 300, 808, 845, 1200, -677, 1098,
4176  1098, 952, 524, -668, 529, 951, 514, 788, 788, -125,
4177  -678, 319, 863, 1195, 514, 551, 431, 320, 1244, 1220,
4178  -679, -669, 511, 330, 331, -331, 482, -677, 385, 1188,
4179  -136, 1188, -668, 1188, 532, 1188, 577, 953, -678, -678,
4180  1338, 654, 1339, 128, 1341, 1134, 128, 859, -679, -679,
4181  -669, -127, 1188, -331, -331, -687, 386, 649, 786, 804,
4182  519, 1347, 516, 517, 584, 675, 883, 664, 519, 804,
4183  516, 517, 385, 1212, 212, 1283, 868, 249, 91, 933,
4184  940, -59, 940, 961, 970, 249, 496, 769, -339, 887,
4185  392, 772, 237, 237, 514, -678, 665, 580, 761, 280,
4186  386, 659, 280, 704, 530, -679, 1098, 1022, 514, 593,
4187  -331, 635, 1197, 650, 229, -765, -339, -339, 652, 1033,
4188  648, 589, 626, -766, 626, 863, 594, 657, 457, 91,
4189  91, 385, 626, 298, 626, 1310, 786, 786, 1023, 1312,
4190  905, 1195, 1039, 907, 237, 128, 1195, 634, 515, 676,
4191  516, 517, 677, 742, 385, 693, 780, 660, -668, 386,
4192  915, 128, 298, 695, 516, 517, -669, 1212, 696, 385,
4193  237, 237, 957, -339, 237, 404, 415, 415, 701, 237,
4194  128, 471, 386, 1237, 249, 499, -668, -668, 926, 934,
4195  935, 967, 950, 969, -669, -669, 1019, 386, 1308, 1113,
4196  -117, 280, 955, 128, 128, 1048, 1049, 1158, 1159, 972,
4197  709, 1195, 1097, 1097, 672, 673, 916, 280, 361, 362,
4198  1151, 1215, 1148, -133, 87, 678, 1051, 1052, 804, 1245,
4199  1246, 1230, 1233, 689, 690, 711, 280, 128, 1197, 1238,
4200  1197, -765, 740, -668, -124, 1197, 743, -765, 514, -766,
4201  1197, -669, 745, 482, 660, -766, 788, 788, -423, 705,
4202  249, 1317, 788, 788, 508, 508, 750, 1097, 1097, 755,
4203  756, 1097, 758, 373, 374, 87, 87, 770, 514, 816,
4204  1174, 1175, 785, 1104, 297, 1108, 806, 1241, 1097, 823,
4205  804, 1144, 826, 280, 879, 882, 884, 1239, 91, 1201,
4206  893, 901, 519, 392, 516, 517, 1197, 902, 1197, 906,
4207  1197, 1170, 1197, 1130, 1130, 128, -311, 909, 128, 128,
4208  492, 403, 237, 1097, 237, 910, 514, 237, 237, 1197,
4209  912, 788, 520, 91, 516, 517, 913, 128, 925, 322,
4210  128, 920, 930, 1240, 1182, 1097, 788, 935, 1097, 968,
4211  91, 1213, 754, 977, 979, 1182, 1250, 514, 981, 983,
4212  1010, 1054, 1097, 1097, 1097, -315, 804, 1097, 1097, 804,
4213  298, 280, 1097, 1097, 280, 280, 1102, 1274, 940, 297,
4214  721, 128, 516, 517, 1040, 786, 786, 1041, 626, 804,
4215  626, 786, 786, 280, 128, -313, 280, 1105, 392, 392,
4216  91, 1124, 237, 237, 237, 237, 417, 237, 237, 1127,
4217  814, 726, 1147, 516, 517, 36, 37, 1154, 39, 1055,
4218  1155, 1182, 1152, 1143, 1156, 45, 46, 776, 91, 298,
4219  1209, 1210, 1236, 635, 1247, 1248, 229, 280, 1253, 1255,
4220  940, 297, 80, 1258, 87, 1260, 1289, 1290, 1265, 1268,
4221  280, 1269, 1272, 742, 742, 1273, 80, 80, 128, 1316,
4222  786, 804, 804, 804, 1296, 237, 1303, 91, 417, 634,
4223  1307, 1321, 237, 91, 91, 786, 813, 1097, -770, 87,
4224  1323, 1097, 1097, 821, 822, 1325, 1327, 1149, 237, 36,
4225  37, 1229, 39, 80, 80, 1332, 87, 128, -765, 1204,
4226  -766, 1344, 1208, 471, 484, 933, 531, 1108, 80, 706,
4227  1173, 804, 237, 541, 280, 542, 543, 544, 545, 708,
4228  1318, -770, 1227, 541, 958, 542, 543, 544, 545, 402,
4229  419, 384, 1267, 699, 80, 80, 237, 1150, 80, 1144,
4230  846, 1097, 1271, 80, 1021, 974, 87, 1243, 880, -770,
4231  -770, 1259, 1291, 280, 542, 543, 544, 545, 356, 1275,
4232  1276, 1277, 541, 742, 542, 543, 544, 545, 1190, 91,
4233  1305, 921, 922, 733, 87, 369, 370, 1131, 1337, 927,
4234  928, 940, 356, 588, 850, 852, 298, 960, 237, 1335,
4235  1262, 1221, 1217, 1266, 1278, 1279, 1280, 1214, 441, 369,
4236  370, 850, 852, 903, -770, 1222, -770, 904, 1286, 91,
4237  -765, 1287, 733, 87, 727, 91, 432, 865, 734, 87,
4238  87, 895, 377, 378, 379, 380, 381, 382, 886, 962,
4239  963, 1297, 965, 966, 325, 326, 327, 328, 329, 40,
4240  41, 42, 43, 1333, 1315, 0, 0, 378, 379, 380,
4241  381, 382, 988, 989, 237, 91, 0, 237, 91, 0,
4242  0, 994, 80, 995, 946, 997, 237, 949, 298, 0,
4243  0, 794, 0, 0, 0, 0, 0, 0, 0, 0,
4244  0, 956, 0, 0, 0, 996, 80, 0, 80, 0,
4245  0, 80, 80, 0, 0, 1322, 1324, 80, 1011, 1326,
4246  1328, 0, 0, 1331, 0, 0, 0, 0, 0, 0,
4247  626, 0, 626, 0, 80, 87, 0, 91, 0, 91,
4248  0, 0, 0, 0, 0, 0, 0, 237, 0, 0,
4249  0, 0, 1342, 1343, 1345, 1346, 1035, 237, 0, 91,
4250  237, 1348, 0, 0, 0, 356, 0, 0, 0, 794,
4251  794, 0, 0, 0, 0, 87, 0, 0, 0, 0,
4252  0, 87, 369, 370, 80, 0, 80, 80, 80, 80,
4253  0, 80, 80, 0, 0, 0, 237, 1024, 0, 0,
4254  1025, 626, 0, 0, 0, 0, 0, 1030, 298, 0,
4255  1031, 0, 80, 1034, 1067, 1067, 0, 0, 0, 0,
4256  0, 87, 0, 0, 87, 0, 102, 375, 376, 377,
4257  378, 379, 380, 381, 382, 0, 0, 789, 0, 0,
4258  102, 102, 0, 0, 0, 0, 0, 0, 0, 80,
4259  0, 80, 0, 1007, 1009, 0, 80, 80, 80, 1013,
4260  1015, 0, 0, 0, 0, 0, 0, 0, 0, 1067,
4261  1067, 0, 80, 1067, 0, 0, 0, 102, 102, 0,
4262  0, 0, 298, 87, 0, 87, 0, 0, 0, 0,
4263  1067, 1115, 102, 0, 1007, 1009, 80, 1013, 1015, 0,
4264  0, 0, 0, 0, 0, 87, 0, 0, 0, 0,
4265  0, 0, 0, 0, 0, 789, 789, 0, 102, 102,
4266  80, 0, 102, 0, 0, 1067, 0, 102, 0, 0,
4267  0, 91, 0, 237, 91, 0, 0, 1211, 0, 0,
4268  0, 0, 0, 1101, 0, 0, 0, 1067, 0, 0,
4269  1067, 0, 0, 80, 541, 0, 542, 543, 544, 545,
4270  546, 0, 0, 0, 1067, 1067, 1067, 1101, 0, 1067,
4271  1067, 0, 80, 0, 1067, 1067, 0, 0, 0, 541,
4272  547, 542, 543, 544, 545, 546, 0, 0, 0, 0,
4273  0, 0, 0, 80, 548, 0, 0, 237, 0, 80,
4274  0, 0, 0, 0, 549, 547, 0, 0, 0, 0,
4275  550, 551, 552, 237, 0, 0, 0, 0, 794, 794,
4276  0, 0, 0, 0, 794, 794, 0, 0, 0, 549,
4277  0, 0, 0, 91, 237, 0, 551, 552, 80, 80,
4278  0, 80, 80, 0, 553, 0, 102, 554, 0, 91,
4279  80, 0, 0, 0, 0, 80, 0, 0, 0, 541,
4280  1036, 542, 543, 544, 545, 546, 0, 0, 91, 553,
4281  102, 0, 102, 0, 0, 102, 102, 87, 0, 1067,
4282  87, 102, 0, 1067, 1067, 547, 0, 0, 0, 0,
4283  0, 91, 91, 794, 0, 0, 0, 0, 102, 548,
4284  0, 80, 0, 80, 0, 0, 0, 0, 794, 549,
4285  0, 80, 0, 0, 0, 0, 551, 552, 0, 0,
4286  0, 80, 0, 80, 80, 91, 0, 0, 0, 0,
4287  0, 0, 0, 80, 80, 0, 541, 0, 542, 543,
4288  544, 545, 546, 1067, 0, 0, 0, 0, 102, 553,
4289  102, 102, 102, 102, 1319, 102, 102, 0, 0, 0,
4290  80, 0, 547, 0, 789, 789, 0, 0, 0, 0,
4291  789, 789, 0, 0, 0, 0, 102, 0, 0, 87,
4292  0, 0, 0, 0, 0, 0, 549, 0, 0, 131,
4293  0, 0, 550, 551, 552, 87, 0, 0, 0, 1168,
4294  0, 0, 0, 91, 0, 0, 91, 91, 0, 0,
4295  0, 0, 0, 102, 87, 102, 0, 0, 0, 0,
4296  102, 102, 102, 0, 0, 91, 553, 0, 91, 554,
4297  0, 0, 0, 0, 0, 0, 102, 87, 87, 789,
4298  131, 131, 0, 0, 301, 0, 0, 237, 0, 0,
4299  0, 0, 0, 0, 789, 0, 0, 0, 0, 0,
4300  102, 0, 0, 0, 0, 0, 0, 0, 0, 91,
4301  0, 87, 0, 301, 0, 541, 0, 542, 543, 544,
4302  545, 546, 91, 0, 102, 0, 408, 418, 418, 0,
4303  0, 0, 0, 0, 1264, 80, 0, 80, 80, 0,
4304  0, 547, 0, 0, 0, 0, 0, 0, 0, 0,
4305  0, 0, 0, 0, 0, 0, 0, 102, 0, 0,
4306  0, 0, 0, 0, 0, 549, 0, 0, 0, 0,
4307  0, 550, 551, 552, 0, 237, 102, 0, 0, 0,
4308  0, 0, 237, 237, 103, 1167, 91, 0, 0, 87,
4309  0, 0, 87, 87, 0, 0, 1304, 102, 103, 103,
4310  0, 80, 0, 102, 0, 553, 1089, 1089, 554, 0,
4311  0, 87, 0, 0, 87, 0, 0, 80, 249, 0,
4312  0, 0, 80, 80, 0, 91, 0, 0, 80, 80,
4313  0, 0, 0, 0, 0, 103, 103, 80, 80, 0,
4314  0, 0, 102, 102, 0, 102, 102, 0, 0, 131,
4315  103, 0, 0, 80, 102, 87, 0, 0, 0, 102,
4316  0, 1089, 1089, 0, 0, 1089, 0, 0, 87, 0,
4317  0, 0, 80, 0, 0, 0, 103, 103, 0, 0,
4318  103, 0, 1089, 0, 131, 103, 0, 0, 0, 0,
4319  0, 0, 0, 0, 0, 80, 80, 80, 0, 0,
4320  0, 131, 0, 0, 0, 102, 0, 102, 0, 0,
4321  0, 0, 80, 0, 0, 102, 0, 1089, 0, 0,
4322  0, 301, 0, 0, 0, 102, 0, 102, 102, 80,
4323  0, 0, 87, 0, 0, 0, 0, 102, 102, 1089,
4324  0, 0, 1089, 0, 0, 0, 0, 0, 0, 0,
4325  0, 131, 0, 0, 0, 0, 1089, 1089, 1089, 0,
4326  0, 1089, 1089, 0, 102, 0, 1089, 1089, 0, 0,
4327  0, 87, 0, 0, 0, 0, 0, 0, 0, 131,
4328  301, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4329  0, 0, 0, 1090, 1090, 0, 0, 541, 0, 542,
4330  543, 544, 545, 546, 103, 0, 0, 80, 0, 0,
4331  80, 80, 0, 0, 0, 0, 0, 0, 131, 0,
4332  0, 0, 0, 547, 131, 131, 0, 0, 103, 80,
4333  103, 0, 80, 103, 103, 0, 0, 548, 0, 103,
4334  0, 0, 0, 0, 0, 0, 0, 549, 1090, 1090,
4335  0, 80, 1090, 550, 551, 552, 103, 0, 0, 0,
4336  0, 0, 0, 0, 0, 0, 0, 0, 0, 1090,
4337  0, 1089, 0, 80, 0, 1089, 1089, 0, 0, 0,
4338  0, 0, 0, 0, 0, 0, 80, 553, 0, 0,
4339  554, 0, 0, 0, 0, 0, 0, 0, 0, 102,
4340  0, 102, 102, 0, 1090, 0, 103, 0, 103, 103,
4341  103, 103, 0, 103, 103, 0, 0, 0, 0, 0,
4342  131, 0, 0, 0, 0, 0, 1090, 0, 0, 1090,
4343  0, 0, 0, 0, 103, 1089, 0, 301, 0, 80,
4344  0, 0, 0, 1090, 1090, 1090, 80, 80, 1090, 1090,
4345  80, 0, 0, 1090, 1090, 0, 76, 0, 0, 0,
4346  131, 0, 0, 0, 0, 102, 131, 0, 0, 0,
4347  0, 103, 0, 103, 0, 0, 0, 0, 103, 103,
4348  103, 102, 0, 0, 0, 0, 102, 102, 0, 80,
4349  0, 0, 102, 102, 103, 0, 0, 0, 0, 0,
4350  0, 102, 102, 0, 0, 0, 131, 76, 76, 131,
4351  0, 294, 0, 0, 0, 0, 0, 102, 103, 301,
4352  0, 0, 795, 0, 0, 0, 0, 0, 0, 0,
4353  0, 0, 0, 0, 0, 0, 102, 0, 0, 0,
4354  294, 0, 103, 0, 0, 0, 0, 0, 0, 0,
4355  0, 0, 0, 294, 294, 294, 0, 0, 1090, 102,
4356  102, 102, 1090, 1090, 0, 0, 0, 0, 131, 0,
4357  131, 0, 0, 0, 0, 103, 102, 0, 0, 0,
4358  0, 0, 0, 0, 0, 77, 0, 0, 0, 0,
4359  131, 0, 0, 102, 103, 0, 0, 0, 0, 0,
4360  795, 795, 0, 0, 0, 0, 0, 0, 0, 0,
4361  0, 0, 0, 0, 0, 103, 0, 0, 0, 0,
4362  0, 103, 1090, 0, 0, 0, 0, 0, 0, 0,
4363  0, 0, 0, 1091, 1091, 0, 77, 77, 0, 301,
4364  295, 0, 0, 0, 0, 0, 0, 0, 873, 0,
4365  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4366  103, 103, 0, 103, 103, 0, 0, 0, 0, 295,
4367  0, 102, 103, 0, 102, 102, 76, 103, 0, 0,
4368  0, 0, 295, 295, 295, 0, 0, 0, 1091, 1091,
4369  0, 0, 1091, 102, 0, 0, 102, 0, 0, 0,
4370  0, 0, 0, 0, 0, 0, 0, 0, 0, 1091,
4371  0, 76, 0, 301, 0, 102, 0, 0, 0, 0,
4372  0, 0, 0, 103, 0, 103, 0, 0, 76, 0,
4373  0, 0, 0, 103, 0, 0, 0, 102, 0, 0,
4374  0, 0, 0, 103, 1091, 103, 103, 0, 294, 0,
4375  102, 0, 0, 0, 0, 103, 103, 0, 0, 0,
4376  0, 0, 131, 0, 0, 131, 1091, 0, 355, 1091,
4377  0, 0, 0, 0, 0, 0, 0, 0, 76, 0,
4378  0, 0, 103, 1091, 1091, 1091, 0, 0, 1091, 1091,
4379  0, 0, 0, 1091, 1091, 0, 0, 0, 0, 0,
4380  0, 0, 0, 102, 0, 77, 76, 294, 0, 0,
4381  102, 102, 0, 0, 102, 1092, 1092, 0, 0, 0,
4382  0, 356, 357, 358, 359, 360, 361, 362, 363, 364,
4383  365, 366, 367, 368, 0, 0, 0, 0, 369, 370,
4384  77, 0, 0, 0, 371, 76, 0, 0, 0, 795,
4385  795, 76, 76, 102, 0, 795, 795, 77, 0, 0,
4386  0, 0, 0, 0, 131, 0, 0, 0, 0, 0,
4387  1092, 1092, 0, 0, 1092, 286, 0, 295, 0, 372,
4388  131, 373, 374, 375, 376, 377, 378, 379, 380, 381,
4389  382, 1092, 0, 0, 0, 0, 0, 0, 1091, 131,
4390  0, 0, 1091, 1091, 0, 0, 0, 77, 0, 0,
4391  0, 0, 0, 0, 0, 0, 0, 103, 0, 103,
4392  103, 0, 131, 131, 795, 0, 1092, 0, 0, 0,
4393  0, 0, 0, 0, 0, 77, 295, 0, 0, 795,
4394  0, 0, 0, 0, 0, 0, 0, 76, 1092, 0,
4395  0, 1092, 0, 0, 0, 0, 131, 0, 0, 0,
4396  0, 0, 1091, 0, 294, 1092, 1092, 1092, 0, 0,
4397  1092, 1092, 0, 0, 77, 1092, 1092, 0, 0, 0,
4398  77, 77, 0, 103, 0, 0, 0, 76, 0, 0,
4399  0, 0, 0, 76, 0, 0, 1093, 1093, 0, 103,
4400  0, 0, 0, 0, 103, 103, 0, 0, 0, 0,
4401  103, 103, 0, 0, 0, 0, 0, 0, 0, 103,
4402  103, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4403  1171, 0, 0, 76, 131, 103, 76, 131, 131, 445,
4404  0, 0, 447, 448, 449, 0, 294, 0, 0, 76,
4405  0, 1093, 1093, 0, 103, 1093, 131, 0, 0, 131,
4406  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4407  0, 0, 1093, 0, 0, 0, 77, 103, 103, 103,
4408  1092, 0, 0, 127, 1092, 1092, 0, 0, 0, 0,
4409  0, 0, 0, 295, 103, 76, 0, 76, 0, 0,
4410  131, 0, 0, 0, 0, 0, 0, 1093, 0, 0,
4411  0, 103, 0, 131, 0, 0, 77, 76, 0, 0,
4412  0, 0, 77, 0, 0, 418, 0, 76, 76, 1093,
4413  0, 0, 1093, 0, 127, 127, 0, 0, 299, 130,
4414  0, 0, 0, 0, 1092, 0, 1093, 1093, 1093, 0,
4415  0, 1093, 1093, 0, 0, 0, 1093, 1093, 0, 0,
4416  0, 0, 77, 0, 0, 77, 294, 299, 0, 0,
4417  0, 0, 0, 0, 0, 295, 0, 131, 77, 0,
4418  406, 416, 416, 416, 0, 0, 0, 418, 0, 103,
4419  130, 130, 103, 103, 0, 0, 0, 0, 0, 0,
4420  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4421  0, 103, 0, 0, 103, 0, 131, 0, 0, 0,
4422  0, 0, 0, 0, 77, 0, 77, 0, 0, 1094,
4423  1094, 0, 0, 103, 0, 0, 0, 0, 0, 0,
4424  294, 0, 0, 0, 0, 0, 77, 0, 0, 0,
4425  0, 0, 0, 0, 0, 103, 77, 77, 0, 0,
4426  0, 1093, 0, 0, 0, 1093, 1093, 0, 103, 0,
4427  0, 0, 0, 0, 679, 680, 0, 0, 0, 0,
4428  0, 0, 0, 286, 1094, 1094, 0, 0, 1094, 76,
4429  0, 0, 76, 0, 0, 295, 0, 0, 0, 0,
4430  0, 0, 0, 127, 0, 1094, 0, 0, 0, 0,
4431  0, 0, 0, 0, 0, 0, 680, 0, 0, 286,
4432  0, 103, 0, 0, 0, 1093, 0, 0, 103, 103,
4433  0, 0, 103, 0, 0, 0, 0, 0, 127, 0,
4434  1094, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4435  0, 0, 0, 0, 0, 127, 0, 0, 0, 130,
4436  0, 0, 1094, 0, 0, 1094, 0, 0, 0, 295,
4437  0, 103, 0, 0, 0, 299, 76, 76, 0, 1094,
4438  1094, 1094, 76, 76, 1094, 1094, 0, 0, 752, 1094,
4439  1094, 76, 0, 0, 130, 0, 0, 0, 0, 0,
4440  0, 0, 0, 0, 0, 127, 0, 76, 0, 779,
4441  0, 130, 0, 0, 791, 0, 0, 0, 77, 0,
4442  0, 77, 0, 0, 0, 0, 76, 0, 0, 0,
4443  0, 0, 0, 127, 299, 0, 0, 0, 0, 0,
4444  0, 0, 0, 0, 0, 0, 0, 0, 0, 76,
4445  76, 76, 0, 0, 0, 0, 0, 0, 0, 0,
4446  0, 130, 0, 0, 0, 0, 76, 0, 0, 0,
4447  0, 0, 127, 0, 0, 0, 0, 0, 127, 127,
4448  0, 0, 0, 76, 0, 0, 0, 0, 0, 130,
4449  0, 0, 0, 0, 1094, 854, 0, 0, 1094, 1094,
4450  0, 0, 0, 0, 0, 77, 77, 0, 0, 0,
4451  0, 77, 77, 680, 0, 286, 0, 0, 0, 0,
4452  77, 22, 23, 24, 25, 0, 0, 0, 130, 0,
4453  0, 0, 0, 0, 130, 130, 77, 31, 32, 33,
4454  0, 0, 0, 0, 0, 0, 0, 40, 41, 42,
4455  43, 44, 0, 0, 0, 77, 0, 294, 1094, 0,
4456  0, 76, 0, 0, 76, 76, 0, 0, 0, 894,
4457  0, 0, 0, 0, 127, 0, 0, 0, 77, 77,
4458  77, 0, 0, 76, 0, 0, 76, 0, 0, 0,
4459  0, 299, 0, 0, 0, 77, 0, 908, 0, 57,
4460  58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4461  0, 0, 77, 0, 127, 0, 1095, 1095, 0, 0,
4462  127, 0, 0, 0, 0, 0, 680, 76, 0, 0,
4463  130, 0, 0, 0, 0, 0, 292, 0, 0, 0,
4464  76, 0, 0, 0, 944, 0, 0, 0, 0, 0,
4465  0, 0, 294, 0, 0, 0, 0, 0, 0, 0,
4466  127, 0, 0, 127, 0, 0, 0, 0, 0, 0,
4467  130, 1095, 1095, 299, 0, 1095, 130, 0, 0, 0,
4468  0, 0, 0, 0, 0, 0, 295, 0, 0, 0,
4469  77, 0, 1095, 77, 77, 0, 0, 0, 1096, 1096,
4470  0, 0, 0, 0, 76, 0, 0, 0, 0, 0,
4471  0, 0, 77, 0, 294, 77, 130, 0, 0, 130,
4472  0, 0, 127, 0, 127, 0, 0, 1095, 0, 993,
4473  0, 0, 130, 0, 0, 0, 0, 0, 0, 0,
4474  0, 0, 0, 76, 127, 0, 0, 0, 0, 1095,
4475  0, 1016, 1095, 1096, 1096, 0, 77, 1096, 0, 0,
4476  0, 0, 0, 1026, 0, 0, 1095, 1095, 1095, 77,
4477  0, 1095, 1095, 0, 1096, 0, 1095, 1095, 130, 0,
4478  130, 295, 0, 0, 0, 0, 0, 0, 286, 0,
4479  0, 0, 0, 299, 0, 0, 0, 0, 0, 0,
4480  130, 0, 0, 0, 0, 0, 0, 0, 0, 1096,
4481  130, 130, 1050, 0, 0, 0, 0, 0, 0, 0,
4482  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4483  0, 1096, 0, 77, 1096, 0, 0, 0, 0, 0,
4484  0, 0, 0, 295, 0, 0, 0, 1112, 1096, 1096,
4485  1096, 0, 0, 1096, 1096, 0, 0, 0, 1096, 1096,
4486  0, 0, 0, 0, 0, 0, 0, 299, 0, 0,
4487  0, 0, 77, 0, 0, 0, 0, 0, 0, 0,
4488  0, 1095, 0, 0, 0, 1095, 1095, 0, 0, 0,
4489  0, 0, 0, 0, 0, 0, -788, 0, 0, 0,
4490  0, 0, 0, 0, -788, -788, -788, 0, 0, -788,
4491  -788, -788, 0, -788, 0, 0, 127, 0, 0, 127,
4492  0, -788, -788, -788, 0, 0, 0, 0, 0, 0,
4493  0, 1176, 0, -788, -788, 0, -788, -788, -788, -788,
4494  -788, 0, 0, 0, 0, 1095, 0, 0, 0, 0,
4495  0, 231, 231, 0, 0, 0, 0, 0, 0, 0,
4496  0, 0, 0, 1096, -788, -788, 0, 1096, 1096, 0,
4497  0, 0, 130, 0, 0, 130, 0, 0, 0, 0,
4498  0, 0, 0, 264, 268, 269, 270, 0, 0, 0,
4499  231, 231, 0, -788, -788, 0, 0, 0, 0, 0,
4500  0, 0, 0, 317, 318, 0, 0, 0, 0, 0,
4501  0, 0, 0, 22, 23, 24, 25, -788, 127, 0,
4502  0, 0, 0, 0, 0, 0, 0, 1096, 0, 31,
4503  32, 33, 1055, 0, 127, 0, 1056, 0, 231, 40,
4504  41, 42, 43, 44, 0, 0, 0, 0, -788, -788,
4505  0, -788, 0, 127, 245, -788, 0, -788, 0, 130,
4506  130, 0, 0, 0, 0, 130, 130, 0, 0, 0,
4507  0, 1058, 1059, 0, 130, 0, 127, 127, 0, 1060,
4508  0, 0, 1061, 0, 0, 1062, 1063, 0, 1064, 0,
4509  130, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4510  0, 0, 914, 0, 0, 0, 0, 0, 0, 130,
4511  127, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4512  0, 1066, 0, 0, 0, 0, 0, 0, 292, 0,
4513  0, 0, 130, 130, 130, 249, 356, 357, 358, 359,
4514  360, 361, 362, 363, 364, 365, 366, 367, 368, 130,
4515  0, 0, 0, 369, 370, 231, 0, 0, 231, 231,
4516  231, 0, 317, 0, 0, 0, 130, 0, 0, 0,
4517  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4518  0, 231, 0, 231, 1169, 0, 914, 0, 127, 0,
4519  0, 127, 127, 0, 372, 0, 373, 374, 375, 376,
4520  377, 378, 379, 380, 381, 382, 0, 0, 0, 0,
4521  127, 0, 0, 127, -283, 0, 0, 0, 0, 0,
4522  356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
4523  366, 367, 368, 0, 0, 0, 0, 369, 370, 0,
4524  0, 0, 0, 0, 130, 0, 0, 130, 130, 0,
4525  0, 0, 0, 0, 127, 0, 0, 0, 0, 0,
4526  0, 0, 0, 0, 0, 0, 130, 127, 0, 130,
4527  0, 0, 0, 0, 0, 0, 0, 0, 372, 416,
4528  373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
4529  0, 0, 596, 597, 598, 599, 600, 0, 0, 601,
4530  602, 603, 604, 605, 606, 607, 608, 0, 610, 0,
4531  130, 611, 612, 613, 614, 615, 616, 617, 618, 619,
4532  620, 0, 0, 130, 231, 0, 0, 0, 0, 0,
4533  0, 127, 0, 0, 0, 0, 0, 0, 0, 0,
4534  0, 416, 0, 0, 0, 0, 0, 0, 0, 0,
4535  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4536  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4537  127, 231, 0, 0, 0, 0, 0, 0, 0, 0,
4538  0, 0, 0, 0, 0, 0, 0, 130, 0, 0,
4539  231, 231, 0, 0, 0, 231, 0, 0, 0, 231,
4540  -668, 270, 0, 0, 0, 0, 0, 0, -668, -668,
4541  -668, 0, 0, -668, -668, -668, 0, -668, 0, 700,
4542  0, 0, 0, 0, 0, -668, 130, -668, -668, -668,
4543  0, 0, 231, 0, 0, 231, 0, -668, -668, 0,
4544  -668, -668, -668, -668, -668, 0, 0, 231, 0, 0,
4545  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4546  0, 0, 0, 0, 0, 730, 0, 0, -668, -668,
4547  0, 0, 0, 0, 0, 0, 0, 0, -668, -668,
4548  -668, -668, -668, -668, -668, -668, -668, -668, -668, -668,
4549  -668, 0, 0, 0, 0, -668, -668, -668, -668, 0,
4550  -668, -668, 0, 0, 231, 0, 0, -668, 0, 0,
4551  0, 0, 0, 762, 0, 0, 762, 0, 0, 0,
4552  0, -668, 0, 0, -668, 231, 0, 0, 0, 0,
4553  790, 0, 0, 0, 0, -668, -668, -668, -668, -668,
4554  -668, -668, -668, -668, -668, -668, -668, -668, 0, 0,
4555  0, 0, 0, -668, -668, -668, -668, 0, 0, -668,
4556  -668, -668, 0, 621, 622, 0, 0, 623, 0, 0,
4557  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4558  0, 0, 0, 0, 0, 0, 231, 179, 180, 181,
4559  182, 183, 184, 185, 186, 187, 231, 0, 188, 189,
4560  0, 0, 0, 0, 190, 191, 192, 193, 849, 849,
4561  0, 231, 762, 762, 849, 0, 0, 0, 0, 194,
4562  195, 0, 0, 0, 0, 849, 849, 0, 0, 231,
4563  0, 231, 0, 0, 0, 0, 0, 0, 0, 0,
4564  0, 849, 0, 0, 0, 0, 0, 0, 0, 196,
4565  197, 198, 199, 200, 201, 202, 203, 204, 205, 0,
4566  206, 207, 0, 0, 0, 0, 0, 0, 208, 245,
4567  0, 0, -5, 3, 0, 4, 5, 6, 7, 8,
4568  -5, -5, -5, 9, 10, 231, -5, -5, 11, -5,
4569  12, 13, 14, 15, 16, 17, 18, -5, 0, 0,
4570  0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4571  0, 26, 0, 231, 0, 0, 0, 27, 28, 272,
4572  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4573  0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4574  -5, 0, 231, 0, 0, 0, 0, 0, 47, 48,
4575  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4576  231, 0, 0, 49, 50, 0, 0, 0, 0, 0,
4577  0, 51, 0, 0, 52, 53, 0, 54, 55, 0,
4578  56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4579  64, 65, 0, -5, 0, 0, 0, 0, 0, 0,
4580  0, 0, 0, 0, 0, 0, 0, 0, 0, 356,
4581  357, 358, 359, 360, 361, 362, 363, 0, 365, 366,
4582  66, 67, 68, 0, 0, -5, 369, 370, 0, 0,
4583  0, -5, 0, 530, 0, 0, 762, 0, 0, 0,
4584  0, 0, 0, 0, 0, 231, 0, 0, 0, 0,
4585  0, 0, 231, 0, 0, 0, 1005, 849, 849, 0,
4586  0, 0, 0, 849, 849, 0, 0, 231, 0, 373,
4587  374, 375, 376, 377, 378, 379, 380, 381, 382, 231,
4588  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4589  0, 0, 0, 0, 0, 0, 0, 762, 849, 849,
4590  0, 849, 849, 0, 231, 0, 0, 0, 0, 0,
4591  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4592  0, 0, 0, 0, 1046, 1047, 0, 0, 231, 0,
4593  0, 0, 849, 1053, 0, 0, 0, 0, 0, 0,
4594  0, 0, 0, 0, 0, 0, 0, 849, 0, 0,
4595  0, 0, 0, 0, -788, 3, 0, 4, 5, 6,
4596  7, 8, 0, 231, 0, 9, 10, 0, 0, 0,
4597  11, 849, 12, 13, 14, 15, 16, 17, 18, 0,
4598  0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4599  25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4600  28, 272, 30, 31, 32, 33, 34, 35, 36, 37,
4601  38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4602  0, 0, 0, 356, -789, -789, -789, -789, 361, 362,
4603  47, 48, -789, -789, 0, 0, 0, 0, 0, 0,
4604  369, 370, 0, 0, 0, 49, 50, 231, 0, 0,
4605  0, 0, 0, 51, 0, 0, 52, 53, 0, 54,
4606  55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4607  62, 63, 64, 65, 0, -788, 0, 0, 0, 0,
4608  0, 0, 0, 373, 374, 375, 376, 377, 378, 379,
4609  380, 381, 382, 0, 0, 0, 0, 0, 0, 0,
4610  0, 0, 66, 67, 68, 0, 0, -788, 3, -788,
4611  4, 5, 6, 7, 8, -788, 0, 0, 9, 10,
4612  0, 0, 0, 11, 0, 12, 13, 14, 15, 16,
4613  17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
4614  22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
4615  0, 0, 27, 28, 29, 30, 31, 32, 33, 34,
4616  35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
4617  44, 45, 46, 0, 231, 0, 356, 357, 358, 359,
4618  360, 361, 362, 47, 48, 365, 366, 0, 0, 0,
4619  0, 0, 0, 369, 370, 0, 0, 0, 49, 50,
4620  0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
4621  53, 0, 54, 55, 0, 56, 0, 0, 57, 58,
4622  59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4623  0, 0, 0, 0, 0, 0, 373, 374, 375, 376,
4624  377, 378, 379, 380, 381, 382, 0, 0, 0, 0,
4625  0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
4626  -5, 3, -788, 4, 5, 6, 7, 8, -788, 0,
4627  0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
4628  14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
4629  19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4630  0, 0, 0, 0, 0, 27, 28, 29, 30, 31,
4631  32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
4632  41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
4633  0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
4634  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4635  0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4636  0, 0, 52, 53, 0, 54, 55, 0, 56, 0,
4637  0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4638  0, 0, 0, 0, 0, 0, 0, 0, 0, -770,
4639  0, 0, 0, 0, 0, 0, 0, -770, -770, -770,
4640  0, 0, -770, -770, -770, 0, -770, 0, 66, 67,
4641  68, 0, 0, -5, -770, -770, -770, -770, -770, 0,
4642  0, 530, 0, 0, 0, 0, -770, -770, 0, -770,
4643  -770, -770, -770, -770, 0, 0, 0, 356, 357, 358,
4644  359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
4645  0, 0, 0, 0, 369, 370, 0, -770, -770, 0,
4646  0, 0, 0, 0, 0, 0, 0, -770, -770, -770,
4647  -770, -770, -770, -770, -770, -770, -770, -770, -770, -770,
4648  0, 0, 0, 0, -770, -770, -770, -770, 0, 857,
4649  -770, 0, 0, 0, 0, 372, -770, 373, 374, 375,
4650  376, 377, 378, 379, 380, 381, 382, 0, 0, 0,
4651  -770, 0, 0, -770, 249, 0, 0, 0, 0, 0,
4652  0, 0, 0, 0, -135, -770, -770, -770, -770, -770,
4653  -770, -770, -770, -770, -770, -770, -770, 0, 0, 0,
4654  0, -770, -770, -770, -770, -770, -669, 0, -770, -770,
4655  -770, 0, 0, 0, -669, -669, -669, 0, 0, -669,
4656  -669, -669, 0, -669, 0, 0, 0, 0, 0, 0,
4657  0, -669, 0, -669, -669, -669, 0, 0, 0, 0,
4658  0, 0, 0, -669, -669, 0, -669, -669, -669, -669,
4659  -669, 0, 0, 0, 356, 357, 358, 359, 360, 361,
4660  362, 363, 364, 365, 366, 367, 368, 0, 0, 0,
4661  0, 369, 370, 0, -669, -669, 0, 0, 0, 0,
4662  0, 0, 0, 0, -669, -669, -669, -669, -669, -669,
4663  -669, -669, -669, -669, -669, -669, -669, 0, 0, 0,
4664  0, -669, -669, -669, -669, 0, -669, -669, 0, 0,
4665  0, 0, 372, -669, 373, 374, 375, 376, 377, 378,
4666  379, 380, 381, 382, 0, 0, 0, -669, 0, 0,
4667  -669, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4668  0, -669, -669, -669, -669, -669, -669, -669, -669, -669,
4669  -669, -669, -669, -669, 0, 0, 0, 0, 0, -669,
4670  -669, -669, -669, -771, 0, -669, -669, -669, 0, 0,
4671  0, -771, -771, -771, 0, 0, -771, -771, -771, 0,
4672  -771, 0, 0, 0, 0, 0, 0, 0, -771, -771,
4673  -771, -771, -771, 0, 0, 0, 0, 0, 0, 0,
4674  -771, -771, 0, -771, -771, -771, -771, -771, 0, 0,
4675  0, 356, 357, 358, 359, 360, 361, 362, 363, 364,
4676  365, 366, -789, -789, 0, 0, 0, 0, 369, 370,
4677  0, -771, -771, 0, 0, 0, 0, 0, 0, 0,
4678  0, -771, -771, -771, -771, -771, -771, -771, -771, -771,
4679  -771, -771, -771, -771, 0, 0, 0, 0, -771, -771,
4680  -771, -771, 0, 0, -771, 0, 0, 0, 0, 0,
4681  -771, 373, 374, 375, 376, 377, 378, 379, 380, 381,
4682  382, 0, 0, 0, -771, 0, 0, -771, 0, 0,
4683  0, 0, 0, 0, 0, 0, 0, 0, 0, -771,
4684  -771, -771, -771, -771, -771, -771, -771, -771, -771, -771,
4685  -771, 0, 0, 0, 0, -771, -771, -771, -771, -771,
4686  -772, 0, -771, -771, -771, 0, 0, 0, -772, -772,
4687  -772, 0, 0, -772, -772, -772, 0, -772, 0, 0,
4688  0, 0, 0, 0, 0, -772, -772, -772, -772, -772,
4689  0, 0, 0, 0, 0, 0, 0, -772, -772, 0,
4690  -772, -772, -772, -772, -772, 0, 0, 0, 0, 0,
4691  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4692  0, 0, 0, 0, 0, 0, 0, 0, -772, -772,
4693  0, 0, 0, 0, 0, 0, 0, 0, -772, -772,
4694  -772, -772, -772, -772, -772, -772, -772, -772, -772, -772,
4695  -772, 0, 0, 0, 0, -772, -772, -772, -772, 0,
4696  0, -772, 0, 0, 0, 0, 0, -772, 0, 0,
4697  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4698  0, -772, 0, 0, -772, 0, 0, 0, 0, 0,
4699  0, 0, 0, 0, 0, 0, -772, -772, -772, -772,
4700  -772, -772, -772, -772, -772, -772, -772, -772, 0, 0,
4701  0, 0, -772, -772, -772, -772, -772, -485, 0, -772,
4702  -772, -772, 0, 0, 0, -485, -485, -485, 0, 0,
4703  -485, -485, -485, 0, -485, 0, 0, 0, 0, 0,
4704  0, 0, -485, -485, -485, -485, 0, 0, 0, 0,
4705  0, 0, 0, 0, -485, -485, 0, -485, -485, -485,
4706  -485, -485, 0, 0, 0, 0, 0, 0, 0, 0,
4707  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4708  0, 0, 0, 0, 0, -485, -485, 0, 0, 0,
4709  0, 0, 0, 0, 0, -485, -485, -485, -485, -485,
4710  -485, -485, -485, -485, -485, -485, -485, -485, 0, 0,
4711  0, 0, -485, -485, -485, -485, 0, 0, -485, 0,
4712  0, 0, 0, 0, -485, 0, 0, 0, 0, 0,
4713  0, 0, 0, 0, 0, 0, 0, 0, -485, 0,
4714  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4715  0, 0, 0, -485, 0, -485, -485, -485, -485, -485,
4716  -485, -485, -485, -485, -485, 0, 0, 0, 0, -485,
4717  -485, -485, -485, -485, -332, 245, -485, -485, -485, 0,
4718  0, 0, -332, -332, -332, 0, 0, -332, -332, -332,
4719  0, -332, 0, 0, 0, 0, 0, 0, 0, -332,
4720  0, -332, -332, -332, 0, 0, 0, 0, 0, 0,
4721  0, -332, -332, 0, -332, -332, -332, -332, -332, 0,
4722  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4723  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4724  0, 0, -332, -332, 0, 0, 0, 0, 0, 0,
4725  0, 0, -332, -332, -332, -332, -332, -332, -332, -332,
4726  -332, -332, -332, -332, -332, 0, 0, 0, 0, -332,
4727  -332, -332, -332, 0, 0, -332, 0, 0, 0, 0,
4728  0, -332, 0, 0, 0, 0, 0, 0, 0, 0,
4729  0, 0, 0, 0, 0, -332, 0, 0, -332, 0,
4730  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4731  -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
4732  -332, -332, 0, 0, 0, 0, 0, -332, -332, -332,
4733  -332, -788, 0, -332, -332, -332, 0, 0, 0, -788,
4734  -788, -788, 0, 0, -788, -788, -788, 0, -788, 0,
4735  0, 0, 0, 0, 0, 0, -788, -788, -788, -788,
4736  0, 0, 0, 0, 0, 0, 0, 0, -788, -788,
4737  0, -788, -788, -788, -788, -788, 0, 0, 0, 0,
4738  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4739  0, 0, 0, 0, 0, 0, 0, 0, 0, -788,
4740  -788, 0, 0, 0, 0, 0, 0, 0, 0, -788,
4741  -788, -788, -788, -788, -788, -788, -788, -788, -788, -788,
4742  -788, -788, 0, 0, 0, 0, -788, -788, -788, -788,
4743  0, 0, -788, 0, 0, 0, 0, 0, -788, 0,
4744  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4745  0, 0, -788, 0, 0, 0, 0, 0, 0, 0,
4746  0, 0, 0, 0, 0, 0, 0, -788, 0, -788,
4747  -788, -788, -788, -788, -788, -788, -788, -788, -788, 0,
4748  0, 0, 0, -788, -788, -788, -788, -788, -338, 245,
4749  -788, -788, -788, 0, 0, 0, -338, -338, -338, 0,
4750  0, -338, -338, -338, 0, -338, 0, 0, 0, 0,
4751  0, 0, 0, -338, 0, -338, -338, 0, 0, 0,
4752  0, 0, 0, 0, 0, -338, -338, 0, -338, -338,
4753  -338, -338, -338, 0, 0, 0, 0, 0, 0, 0,
4754  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4755  0, 0, 0, 0, 0, 0, -338, -338, 0, 0,
4756  0, 0, 0, 0, 0, 0, -338, -338, -338, -338,
4757  -338, -338, -338, -338, -338, -338, -338, -338, -338, 0,
4758  0, 0, 0, -338, -338, -338, -338, 0, 858, -338,
4759  0, 0, 0, 0, 0, -338, 0, 0, 0, 0,
4760  0, 0, 0, 0, 0, 0, 0, 0, 0, -338,
4761  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4762  0, 0, 0, -137, -338, 0, -338, -338, -338, -338,
4763  -338, -338, -338, -338, -338, -338, 0, 0, 0, 0,
4764  801, -338, -338, -338, -338, -345, 0, -338, -338, -338,
4765  0, 0, 0, -345, -345, -345, 0, 0, -345, -345,
4766  -345, 0, -345, 0, 0, 0, 0, 0, 0, 0,
4767  -345, 0, -345, -345, 0, 0, 0, 0, 0, 0,
4768  0, 0, -345, -345, 0, -345, -345, -345, -345, -345,
4769  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4770  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4771  0, 0, 0, -345, -345, 0, 0, 0, 0, 0,
4772  0, 0, 0, -345, -345, -345, -345, -345, -345, -345,
4773  -345, -345, -345, -345, -345, -345, 0, 0, 0, 0,
4774  -345, -345, -345, -345, 0, 0, -345, 0, 0, 0,
4775  0, 0, -345, 0, 0, 0, 0, 0, 0, 0,
4776  0, 0, 0, 0, 0, 0, -345, 0, 0, 0,
4777  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4778  0, -345, 0, -345, -345, -345, -345, -345, -345, -345,
4779  -345, -345, -345, 0, 0, 0, 0, 0, -345, -345,
4780  -345, -345, -770, 435, -345, -345, -345, 0, 0, 0,
4781  -770, -770, -770, 0, 0, 0, -770, -770, 0, -770,
4782  0, 0, 0, 0, 0, 0, 0, -770, -770, 0,
4783  0, 0, 0, 0, 0, 0, 0, 0, 0, -770,
4784  -770, 0, -770, -770, -770, -770, -770, 0, 0, 0,
4785  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4786  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4787  -770, -770, 0, 0, 0, 0, 0, 0, 0, 0,
4788  -770, -770, -770, -770, -770, -770, -770, -770, -770, -770,
4789  -770, -770, -770, 0, 0, 0, 0, -770, -770, -770,
4790  -770, 0, 799, -770, 0, 0, 0, 0, 0, 0,
4791  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4792  0, 0, 0, -770, 0, 0, 0, 0, 0, 0,
4793  0, 0, 0, 0, 0, 0, 0, -135, -770, 0,
4794  -770, -770, -770, -770, -770, -770, -770, -770, -770, -770,
4795  0, 0, 0, 0, -770, -770, -770, -770, -126, -770,
4796  0, -770, 0, -770, 0, 0, 0, -770, -770, -770,
4797  0, 0, 0, -770, -770, 0, -770, 0, 0, 0,
4798  0, 0, 0, 0, -770, -770, 0, 0, 0, 0,
4799  0, 0, 0, 0, 0, 0, -770, -770, 0, -770,
4800  -770, -770, -770, -770, 0, 0, 0, 0, 0, 0,
4801  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4802  0, 0, 0, 0, 0, 0, 0, -770, -770, 0,
4803  0, 0, 0, 0, 0, 0, 0, -770, -770, -770,
4804  -770, -770, -770, -770, -770, -770, -770, -770, -770, -770,
4805  0, 0, 0, 0, -770, -770, -770, -770, 0, 799,
4806  -770, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4807  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4808  -770, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4809  0, 0, 0, 0, -135, -770, 0, -770, -770, -770,
4810  -770, -770, -770, -770, -770, -770, -770, 0, 0, 0,
4811  0, -770, -770, -770, -770, -770, -338, 0, -770, 0,
4812  -770, 0, 0, 0, -338, -338, -338, 0, 0, 0,
4813  -338, -338, 0, -338, 0, 0, 0, 0, 0, 0,
4814  0, -338, 0, 0, 0, 0, 0, 0, 0, 0,
4815  0, 0, 0, -338, -338, 0, -338, -338, -338, -338,
4816  -338, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4817  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4818  0, 0, 0, 0, -338, -338, 0, 0, 0, 0,
4819  0, 0, 0, 0, -338, -338, -338, -338, -338, -338,
4820  -338, -338, -338, -338, -338, -338, -338, 0, 0, 0,
4821  0, -338, -338, -338, -338, 0, 800, -338, 0, 0,
4822  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4823  0, 0, 0, 0, 0, 0, 0, -338, 0, 0,
4824  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4825  0, -137, -338, 0, -338, -338, -338, -338, -338, -338,
4826  -338, -338, -338, -338, 0, 0, 0, 0, 801, -338,
4827  -338, -338, -128, -338, 0, -338, 0, -338, 0, 0,
4828  0, -338, -338, -338, 0, 0, 0, -338, -338, 0,
4829  -338, 0, 0, 0, 0, 0, 0, 0, -338, 0,
4830  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4831  -338, -338, 0, -338, -338, -338, -338, -338, 0, 0,
4832  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4833  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4834  0, -338, -338, 0, 0, 0, 0, 0, 0, 0,
4835  0, -338, -338, -338, -338, -338, -338, -338, -338, -338,
4836  -338, -338, -338, -338, 0, 0, 0, 0, -338, -338,
4837  -338, -338, 0, 800, -338, 0, 0, 0, 0, 0,
4838  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4839  0, 0, 0, 0, -338, 0, 0, 0, 0, 0,
4840  0, 0, 0, 0, 0, 0, 0, 0, -137, -338,
4841  0, -338, -338, -338, -338, -338, -338, -338, -338, -338,
4842  -338, 0, 0, 0, 0, 801, -338, -338, -338, -338,
4843  0, 0, -338, 3, -338, 4, 5, 6, 7, 8,
4844  -788, -788, -788, 9, 10, 0, 0, -788, 11, 0,
4845  12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
4846  0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4847  0, 26, 0, 0, 0, 0, 0, 27, 28, 272,
4848  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4849  0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4850  -788, 0, 0, 0, 0, 0, 0, 0, 47, 48,
4851  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4852  0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
4853  0, 51, 0, 0, 52, 53, 0, 54, 55, 0,
4854  56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4855  64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
4856  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4857  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4858  66, 67, 68, 0, 0, 0, 3, -788, 4, 5,
4859  6, 7, 8, -788, 0, -788, 9, 10, 0, -788,
4860  -788, 11, 0, 12, 13, 14, 15, 16, 17, 18,
4861  0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
4862  24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
4863  27, 28, 272, 30, 31, 32, 33, 34, 35, 36,
4864  37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4865  46, 0, 0, -788, 0, 0, 0, 0, 0, 0,
4866  0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4867  0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
4868  0, 0, 0, 0, 51, 0, 0, 52, 53, 0,
4869  54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4870  61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4871  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4872  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4873  0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
4874  -788, 4, 5, 6, 7, 8, -788, 0, -788, 9,
4875  10, 0, 0, -788, 11, -788, 12, 13, 14, 15,
4876  16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4877  21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4878  0, 0, 0, 27, 28, 272, 30, 31, 32, 33,
4879  34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4880  43, 44, 45, 46, 0, 0, -788, 0, 0, 0,
4881  0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4882  0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4883  50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4884  52, 53, 0, 54, 55, 0, 56, 0, 0, 57,
4885  58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4886  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4887  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4888  0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4889  0, 0, 3, -788, 4, 5, 6, 7, 8, -788,
4890  0, -788, 9, 10, 0, 0, -788, 11, 0, 12,
4891  13, 14, 15, 16, 17, 18, -788, 0, 0, 0,
4892  0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4893  26, 0, 0, 0, 0, 0, 27, 28, 272, 30,
4894  31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4895  40, 41, 42, 43, 44, 45, 46, 0, 0, -788,
4896  0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4897  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4898  0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
4899  51, 0, 0, 52, 53, 0, 54, 55, 0, 56,
4900  0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4901  65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4902  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4903  0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4904  67, 68, 0, 0, 0, 3, -788, 4, 5, 6,
4905  7, 8, -788, 0, -788, 9, 10, 0, 0, -788,
4906  11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4907  0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4908  25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4909  28, 272, 30, 31, 32, 33, 34, 35, 36, 37,
4910  38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4911  0, 0, -788, 0, 0, 0, 0, 0, 0, 0,
4912  47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4913  0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4914  0, 0, 0, 51, 0, 0, 52, 53, 0, 54,
4915  55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4916  62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
4917  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4918  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4919  0, 0, 66, 67, 68, 0, 0, 0, 3, -788,
4920  4, 5, 6, 7, 8, -788, -788, -788, 9, 10,
4921  0, 0, 0, 11, 0, 12, 13, 14, 15, 16,
4922  17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
4923  22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
4924  0, 0, 27, 28, 272, 30, 31, 32, 33, 34,
4925  35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
4926  44, 45, 46, 0, 0, -788, 0, 0, 0, 0,
4927  0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
4928  0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
4929  0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
4930  53, 0, 54, 55, 0, 56, 0, 0, 57, 58,
4931  59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4932  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4933  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4934  0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
4935  0, 3, -788, 4, 5, 6, 7, 8, -788, 0,
4936  -788, 9, 10, 0, 0, 0, 11, 0, 12, 13,
4937  14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
4938  19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4939  0, 0, 0, 0, 0, 27, 28, 272, 30, 31,
4940  32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
4941  41, 42, 43, 44, 45, 46, 0, 0, -788, 0,
4942  0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
4943  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4944  0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4945  0, 0, 52, 53, 0, 54, 55, 0, 56, 0,
4946  0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4947  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4948  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4949  0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4950  68, 0, 0, 0, 3, -788, 4, 5, 6, 7,
4951  8, -788, 0, 0, 9, 10, 0, 0, 0, 11,
4952  0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
4953  0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4954  0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
4955  272, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4956  39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4957  0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
4958  48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4959  0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4960  0, 0, 51, 0, 0, 273, 53, 0, 54, 55,
4961  0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4962  63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4963  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4964  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4965  0, 66, 67, 68, 0, 0, 0, 0, -788, 0,
4966  0, 0, -788, 3, -788, 4, 5, 6, 7, 8,
4967  0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
4968  12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
4969  0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4970  0, 26, 0, 0, 0, 0, 0, 27, 28, 272,
4971  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4972  0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4973  0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
4974  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4975  0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
4976  0, 51, 0, 0, 52, 53, 0, 54, 55, 0,
4977  56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4978  64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
4979  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4980  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4981  66, 67, 68, 0, 0, 0, 0, -788, 0, 0,
4982  0, -788, 3, -788, 4, 5, 6, 7, 8, 0,
4983  0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
4984  13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
4985  0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4986  26, 0, 0, 0, 0, 0, 27, 28, 29, 30,
4987  31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4988  40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
4989  0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4990  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4991  0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
4992  51, 0, 0, 52, 53, 0, 54, 55, 0, 56,
4993  0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4994  65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4995  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4996  0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4997  67, 68, 0, 0, -788, 3, -788, 4, 5, 6,
4998  7, 8, -788, 0, 0, 9, 10, 0, 0, 0,
4999  11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5000  0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5001  25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5002  28, 272, 30, 31, 32, 33, 34, 35, 36, 37,
5003  38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5004  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5005  47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5006  0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5007  0, 0, 0, 51, 0, 0, 52, 53, 0, 54,
5008  55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5009  62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5010  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5011  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5012  0, 0, 66, 67, 68, 0, 0, -788, 391, -788,
5013  4, 5, 6, 0, 8, -788, 0, 0, 9, 10,
5014  0, 0, 0, 11, -4, 12, 13, 14, 15, 16,
5015  17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
5016  22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5017  0, 0, 0, 28, 0, 0, 31, 32, 33, 34,
5018  35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5019  44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5020  0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5021  0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5022  0, 0, 0, 0, 0, 0, 220, 0, 0, 221,
5023  53, 0, 54, 55, 0, 0, 0, 0, 57, 58,
5024  59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5025  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5026  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5027  0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5028  0, 0, 319, 0, 0, 0, 0, 0, 320, 135,
5029  136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
5030  146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5031  156, 157, 158, 0, 0, 0, 159, 160, 161, 420,
5032  421, 422, 423, 166, 167, 168, 0, 0, 0, 0,
5033  0, 169, 170, 171, 172, 424, 425, 426, 427, 177,
5034  36, 37, 428, 39, 0, 0, 0, 0, 0, 0,
5035  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5036  0, 0, 179, 180, 181, 182, 183, 184, 185, 186,
5037  187, 0, 0, 188, 189, 0, 0, 0, 0, 190,
5038  191, 192, 193, 0, 0, 0, 0, 0, 0, 0,
5039  0, 0, 0, 0, 194, 195, 0, 0, 0, 0,
5040  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5041  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5042  0, 0, 0, 0, 196, 197, 198, 199, 200, 201,
5043  202, 203, 204, 205, 0, 206, 207, 0, 0, 0,
5044  0, 0, 0, 208, 429, 135, 136, 137, 138, 139,
5045  140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
5046  150, 151, 152, 153, 154, 155, 156, 157, 158, 0,
5047  0, 0, 159, 160, 161, 162, 163, 164, 165, 166,
5048  167, 168, 0, 0, 0, 0, 0, 169, 170, 171,
5049  172, 173, 174, 175, 176, 177, 36, 37, 178, 39,
5050  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5051  0, 0, 0, 0, 0, 0, 0, 0, 179, 180,
5052  181, 182, 183, 184, 185, 186, 187, 0, 0, 188,
5053  189, 0, 0, 0, 0, 190, 191, 192, 193, 0,
5054  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5055  194, 195, 0, 0, 0, 0, 0, 0, 0, 0,
5056  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5057  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5058  196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
5059  0, 206, 207, 0, 0, 0, 0, 0, 0, 208,
5060  135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
5061  145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5062  155, 156, 157, 158, 0, 0, 0, 159, 160, 161,
5063  162, 163, 164, 165, 166, 167, 168, 0, 0, 0,
5064  0, 0, 169, 170, 171, 172, 173, 174, 175, 176,
5065  177, 252, 0, 178, 0, 0, 0, 0, 0, 0,
5066  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5067  0, 0, 0, 179, 180, 181, 182, 183, 184, 185,
5068  186, 187, 0, 0, 188, 189, 0, 0, 0, 0,
5069  190, 191, 192, 193, 0, 0, 0, 0, 0, 0,
5070  0, 0, 0, 0, 0, 194, 195, 0, 0, 58,
5071  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5072  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5073  0, 0, 0, 0, 0, 196, 197, 198, 199, 200,
5074  201, 202, 203, 204, 205, 0, 206, 207, 0, 0,
5075  0, 0, 0, 0, 208, 135, 136, 137, 138, 139,
5076  140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
5077  150, 151, 152, 153, 154, 155, 156, 157, 158, 0,
5078  0, 0, 159, 160, 161, 162, 163, 164, 165, 166,
5079  167, 168, 0, 0, 0, 0, 0, 169, 170, 171,
5080  172, 173, 174, 175, 176, 177, 0, 0, 178, 0,
5081  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5082  0, 0, 0, 0, 0, 0, 0, 0, 179, 180,
5083  181, 182, 183, 184, 185, 186, 187, 0, 0, 188,
5084  189, 0, 0, 0, 0, 190, 191, 192, 193, 0,
5085  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5086  194, 195, 0, 0, 58, 0, 0, 0, 0, 0,
5087  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5088  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5089  196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
5090  0, 206, 207, 0, 0, 0, 0, 0, 0, 208,
5091  135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
5092  145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5093  155, 156, 157, 158, 0, 0, 0, 159, 160, 161,
5094  162, 163, 164, 165, 166, 167, 168, 0, 0, 0,
5095  0, 0, 169, 170, 171, 172, 173, 174, 175, 176,
5096  177, 0, 0, 178, 0, 0, 0, 0, 0, 0,
5097  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5098  0, 0, 0, 179, 180, 181, 182, 183, 184, 185,
5099  186, 187, 0, 0, 188, 189, 0, 0, 0, 0,
5100  190, 191, 192, 193, 0, 0, 0, 0, 0, 0,
5101  0, 0, 0, 0, 0, 194, 195, 0, 0, 0,
5102  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5103  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5104  0, 0, 0, 0, 0, 196, 197, 198, 199, 200,
5105  201, 202, 203, 204, 205, 0, 206, 207, 4, 5,
5106  6, 0, 8, 0, 208, 0, 9, 10, 0, 0,
5107  0, 11, 0, 12, 13, 14, 260, 261, 17, 18,
5108  0, 0, 0, 0, 0, 19, 20, 262, 22, 23,
5109  24, 25, 0, 0, 218, 0, 0, 0, 0, 0,
5110  0, 290, 0, 0, 31, 32, 33, 34, 35, 36,
5111  37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5112  46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5113  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5114  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5115  0, 0, 0, 0, 291, 0, 0, 221, 53, 0,
5116  54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5117  61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5118  0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5119  11, 0, 12, 13, 14, 260, 261, 17, 18, 0,
5120  0, 0, 0, 292, 19, 20, 262, 22, 23, 24,
5121  25, 293, 0, 218, 0, 0, 0, 0, 0, 0,
5122  290, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5123  38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5124  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5125  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5126  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5127  0, 0, 0, 291, 0, 0, 221, 53, 0, 54,
5128  55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5129  62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5130  8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5131  0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5132  0, 0, 292, 19, 20, 21, 22, 23, 24, 25,
5133  591, 0, 218, 0, 0, 0, 0, 0, 0, 28,
5134  0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5135  39, 219, 40, 41, 42, 43, 44, 45, 46, 0,
5136  0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5137  48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5138  0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5139  0, 0, 220, 0, 0, 221, 53, 0, 54, 55,
5140  0, 222, 223, 224, 57, 58, 225, 60, 61, 62,
5141  63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5142  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5143  0, 0, 0, 0, 0, 0, 4, 5, 6, 0,
5144  8, 66, 226, 68, 9, 10, 0, 0, 249, 11,
5145  0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5146  0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5147  0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5148  0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5149  39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5150  0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5151  48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5152  0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5153  0, 0, 220, 0, 0, 221, 53, 0, 54, 55,
5154  0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5155  63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5156  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5157  0, 0, 0, 0, 3, 0, 4, 5, 6, 7,
5158  8, 66, 67, 68, 9, 10, 0, 0, 249, 11,
5159  0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5160  0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5161  0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5162  0, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5163  39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5164  0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5165  48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5166  0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5167  0, 0, 51, 0, 0, 52, 53, 0, 54, 55,
5168  0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5169  63, 64, 65, 0, 0, 391, 0, 4, 5, 6,
5170  0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5171  11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5172  0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5173  25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
5174  28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5175  38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5176  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5177  47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5178  0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5179  0, 0, 0, 220, 0, 0, 221, 53, 0, 54,
5180  55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5181  62, 63, 64, 65, 0, 0, 0, 0, 4, 5,
5182  6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5183  0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5184  0, 0, 66, 67, 68, 19, 20, 21, 22, 23,
5185  24, 25, 0, 0, 218, 0, 0, 0, 0, 0,
5186  0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5187  37, 38, 39, 219, 40, 41, 42, 43, 44, 45,
5188  46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5189  0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5190  0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5191  0, 0, 0, 0, 220, 0, 0, 221, 53, 0,
5192  54, 55, 0, 222, 223, 224, 57, 58, 225, 60,
5193  61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5194  5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5195  0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5196  18, 0, 0, 66, 226, 68, 19, 20, 21, 22,
5197  23, 24, 25, 0, 0, 218, 0, 0, 0, 0,
5198  0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5199  36, 37, 38, 39, 219, 40, 41, 42, 43, 44,
5200  45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5201  0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5202  0, 0, 0, 0, 0, 0, 0, 49, 465, 0,
5203  0, 0, 0, 0, 0, 220, 0, 0, 221, 53,
5204  0, 54, 55, 0, 222, 223, 224, 57, 58, 225,
5205  60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5206  4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5207  0, 0, 0, 11, 0, 12, 13, 14, 260, 261,
5208  17, 18, 0, 0, 66, 226, 68, 19, 20, 262,
5209  22, 23, 24, 25, 0, 0, 218, 0, 0, 0,
5210  0, 0, 0, 28, 0, 0, 31, 32, 33, 34,
5211  35, 36, 37, 38, 39, 219, 40, 41, 42, 43,
5212  44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5213  0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5214  0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5215  0, 0, 0, 0, 0, 0, 220, 0, 0, 221,
5216  53, 0, 54, 55, 0, 222, 223, 224, 57, 58,
5217  225, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5218  0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5219  10, 0, 0, 0, 11, 0, 12, 13, 14, 260,
5220  261, 17, 18, 0, 0, 66, 226, 68, 19, 20,
5221  262, 22, 23, 24, 25, 0, 0, 218, 0, 0,
5222  0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5223  34, 35, 36, 37, 38, 39, 219, 40, 41, 42,
5224  43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5225  0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5226  0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5227  465, 0, 0, 0, 0, 0, 0, 220, 0, 0,
5228  221, 53, 0, 54, 55, 0, 222, 223, 224, 57,
5229  58, 225, 60, 61, 62, 63, 64, 65, 0, 0,
5230  0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5231  9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5232  260, 261, 17, 18, 0, 0, 66, 226, 68, 19,
5233  20, 262, 22, 23, 24, 25, 0, 0, 218, 0,
5234  0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5235  33, 34, 35, 36, 37, 38, 39, 219, 40, 41,
5236  42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5237  0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5238  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5239  49, 50, 0, 0, 0, 0, 0, 0, 220, 0,
5240  0, 221, 53, 0, 54, 55, 0, 222, 223, 0,
5241  57, 58, 225, 60, 61, 62, 63, 64, 65, 0,
5242  0, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5243  0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5244  14, 260, 261, 17, 18, 0, 0, 66, 226, 68,
5245  19, 20, 262, 22, 23, 24, 25, 0, 0, 218,
5246  0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5247  32, 33, 34, 35, 36, 37, 38, 39, 219, 40,
5248  41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5249  0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5250  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5251  0, 49, 50, 0, 0, 0, 0, 0, 0, 220,
5252  0, 0, 221, 53, 0, 54, 55, 0, 0, 223,
5253  224, 57, 58, 225, 60, 61, 62, 63, 64, 65,
5254  0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5255  0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5256  13, 14, 260, 261, 17, 18, 0, 0, 66, 226,
5257  68, 19, 20, 262, 22, 23, 24, 25, 0, 0,
5258  218, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5259  31, 32, 33, 34, 35, 36, 37, 38, 39, 219,
5260  40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5261  0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5262  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5263  0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5264  220, 0, 0, 221, 53, 0, 54, 55, 0, 0,
5265  223, 0, 57, 58, 225, 60, 61, 62, 63, 64,
5266  65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5267  0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5268  12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5269  226, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5270  0, 218, 0, 0, 0, 0, 0, 0, 28, 0,
5271  0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5272  0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5273  0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5274  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5275  0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5276  0, 220, 0, 0, 221, 53, 0, 54, 55, 0,
5277  777, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5278  64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5279  8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5280  0, 12, 13, 14, 260, 261, 17, 18, 0, 0,
5281  66, 226, 68, 19, 20, 262, 22, 23, 24, 25,
5282  0, 0, 218, 0, 0, 0, 0, 0, 0, 28,
5283  0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5284  39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5285  0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5286  48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5287  0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5288  0, 0, 220, 0, 0, 221, 53, 0, 54, 55,
5289  0, 943, 0, 0, 57, 58, 59, 60, 61, 62,
5290  63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5291  0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5292  11, 0, 12, 13, 14, 260, 261, 17, 18, 0,
5293  0, 66, 226, 68, 19, 20, 262, 22, 23, 24,
5294  25, 0, 0, 218, 0, 0, 0, 0, 0, 0,
5295  28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5296  38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5297  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5298  47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5299  0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5300  0, 0, 0, 220, 0, 0, 221, 53, 0, 54,
5301  55, 0, 992, 0, 0, 57, 58, 59, 60, 61,
5302  62, 63, 64, 65, 0, 0, 0, 0, 4, 5,
5303  6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5304  0, 11, 0, 12, 13, 14, 260, 261, 17, 18,
5305  0, 0, 66, 226, 68, 19, 20, 262, 22, 23,
5306  24, 25, 0, 0, 218, 0, 0, 0, 0, 0,
5307  0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5308  37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5309  46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5310  0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5311  0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5312  0, 0, 0, 0, 220, 0, 0, 221, 53, 0,
5313  54, 55, 0, 777, 0, 0, 57, 58, 59, 60,
5314  61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5315  5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5316  0, 0, 11, 0, 12, 13, 14, 260, 261, 17,
5317  18, 0, 0, 66, 226, 68, 19, 20, 262, 22,
5318  23, 24, 25, 0, 0, 218, 0, 0, 0, 0,
5319  0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5320  36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5321  45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5322  0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5323  0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5324  0, 0, 0, 0, 0, 220, 0, 0, 221, 53,
5325  0, 54, 55, 0, 1111, 0, 0, 57, 58, 59,
5326  60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5327  4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5328  0, 0, 0, 11, 0, 12, 13, 14, 260, 261,
5329  17, 18, 0, 0, 66, 226, 68, 19, 20, 262,
5330  22, 23, 24, 25, 0, 0, 218, 0, 0, 0,
5331  0, 0, 0, 28, 0, 0, 31, 32, 33, 34,
5332  35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5333  44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5334  0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5335  0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5336  0, 0, 0, 0, 0, 0, 220, 0, 0, 221,
5337  53, 0, 54, 55, 0, 0, 0, 0, 57, 58,
5338  59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5339  0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5340  10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5341  16, 17, 18, 0, 0, 66, 226, 68, 19, 20,
5342  21, 22, 23, 24, 25, 0, 0, 218, 0, 0,
5343  0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5344  34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5345  43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5346  0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5347  0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5348  50, 0, 0, 0, 0, 0, 0, 220, 0, 0,
5349  221, 53, 0, 54, 55, 0, 0, 0, 0, 57,
5350  58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5351  0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5352  9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5353  15, 16, 17, 18, 0, 0, 66, 226, 68, 19,
5354  20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5355  0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5356  33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5357  42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5358  0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5359  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5360  49, 50, 0, 0, 0, 0, 0, 0, 220, 0,
5361  0, 221, 53, 0, 54, 55, 0, 0, 0, 0,
5362  57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5363  0, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5364  0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5365  14, 15, 16, 17, 18, 0, 0, 66, 67, 68,
5366  19, 20, 21, 22, 23, 24, 25, 0, 0, 759,
5367  0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5368  32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5369  41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5370  0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5371  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5372  0, 49, 50, 0, 0, 0, 0, 0, 0, 220,
5373  0, 0, 221, 53, 0, 54, 55, 0, 0, 0,
5374  0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5375  0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5376  0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5377  13, 14, 260, 261, 17, 18, 0, 0, 66, 226,
5378  68, 19, 20, 262, 22, 23, 24, 25, 0, 0,
5379  855, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5380  31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5381  40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5382  0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5383  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5384  0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5385  220, 0, 0, 221, 53, 0, 54, 55, 0, 0,
5386  0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5387  65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5388  0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5389  12, 13, 14, 260, 261, 17, 18, 0, 0, 66,
5390  226, 68, 19, 20, 262, 22, 23, 24, 25, 0,
5391  0, 218, 0, 0, 0, 0, 0, 0, 290, 0,
5392  0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5393  0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5394  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5395  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5396  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5397  0, 291, 0, 0, 351, 53, 0, 54, 55, 0,
5398  352, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5399  64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5400  0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5401  13, 14, 260, 261, 17, 18, 0, 0, 0, 0,
5402  292, 19, 20, 262, 22, 23, 24, 25, 0, 0,
5403  218, 0, 0, 0, 0, 0, 0, 290, 0, 0,
5404  31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5405  40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5406  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5407  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5408  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5409  401, 0, 0, 52, 53, 0, 54, 55, 0, 56,
5410  0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5411  65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5412  0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5413  14, 260, 261, 17, 18, 0, 0, 0, 0, 292,
5414  19, 20, 262, 22, 23, 24, 25, 0, 0, 218,
5415  0, 0, 0, 0, 0, 0, 290, 0, 0, 31,
5416  32, 33, 409, 35, 36, 37, 410, 39, 0, 40,
5417  41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5418  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5419  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5420  0, 0, 0, 0, 0, 411, 0, 0, 0, 412,
5421  0, 0, 221, 53, 0, 54, 55, 0, 0, 0,
5422  0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5423  0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5424  9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5425  260, 261, 17, 18, 0, 0, 0, 0, 292, 19,
5426  20, 262, 22, 23, 24, 25, 0, 0, 218, 0,
5427  0, 0, 0, 0, 0, 290, 0, 0, 31, 32,
5428  33, 409, 35, 36, 37, 410, 39, 0, 40, 41,
5429  42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5430  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5431  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5432  0, 0, 0, 0, 0, 0, 0, 0, 412, 0,
5433  0, 221, 53, 0, 54, 55, 0, 0, 0, 0,
5434  57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5435  0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5436  10, 0, 0, 0, 11, 0, 12, 13, 14, 260,
5437  261, 17, 18, 0, 0, 0, 0, 292, 19, 20,
5438  262, 22, 23, 24, 25, 0, 0, 218, 0, 0,
5439  0, 0, 0, 0, 290, 0, 0, 31, 32, 33,
5440  34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5441  43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5442  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5443  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5444  0, 0, 0, 0, 0, 0, 0, 291, 0, 0,
5445  351, 53, 0, 54, 55, 0, 0, 0, 0, 57,
5446  58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5447  4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5448  0, 0, 0, 11, 0, 12, 13, 14, 260, 261,
5449  17, 18, 0, 0, 0, 0, 292, 19, 20, 262,
5450  22, 23, 24, 25, 0, 0, 218, 0, 0, 0,
5451  0, 0, 0, 290, 0, 0, 31, 32, 33, 34,
5452  35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5453  44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5454  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5455  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5456  0, 0, 0, 0, 0, 0, 1166, 0, 0, 221,
5457  53, 0, 54, 55, 0, 0, 0, 0, 57, 58,
5458  59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5459  5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5460  0, 0, 11, 0, 12, 13, 14, 260, 261, 17,
5461  18, 0, 0, 0, 0, 292, 19, 20, 262, 22,
5462  23, 24, 25, 0, 0, 218, 0, 0, 0, 0,
5463  0, 0, 290, 0, 0, 31, 32, 33, 34, 35,
5464  36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5465  45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5466  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5467  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5468  0, 0, 0, 0, 0, 1263, 0, 0, 221, 53,
5469  0, 54, 55, 22, 23, 24, 25, 57, 58, 59,
5470  60, 61, 62, 63, 64, 65, 0, 0, 0, 31,
5471  32, 33, 1055, 0, 0, 0, 1056, 0, 1057, 40,
5472  41, 42, 43, 44, 0, 0, 0, 0, 0, 0,
5473  0, 0, 0, 0, 292, 0, 0, 0, 547, 0,
5474  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5475  0, 1058, 1059, 0, 0, 0, 0, 0, 0, 1060,
5476  0, 0, 1061, 0, 0, 1062, 1063, 0, 1064, 551,
5477  0, 57, 58, 1065, 60, 61, 62, 63, 64, 65,
5478  0, 0, 0, 0, 0, 0, 22, 23, 24, 25,
5479  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5480  0, 1066, 31, 32, 33, 1055, 0, 0, 292, 1056,
5481  0, 0, 40, 41, 42, 43, 44, 0, 0, 0,
5482  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5483  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5484  0, 0, 0, 0, 1058, 1059, 0, 0, 0, 0,
5485  0, 0, 1060, 0, 0, 1061, 0, 0, 1062, 1063,
5486  0, 1064, 0, 0, 57, 58, 59, 60, 61, 62,
5487  63, 64, 65, 0, 0, 0, 0, 0, 0, 22,
5488  23, 24, 25, 0, 0, 0, 631, 632, 0, 0,
5489  633, 0, 0, 0, 1066, 31, 32, 33, 1055, 0,
5490  0, 292, 1056, 0, 0, 40, 41, 42, 43, 44,
5491  179, 180, 181, 182, 183, 184, 185, 186, 187, 0,
5492  0, 188, 189, 0, 0, 0, 0, 190, 191, 192,
5493  193, 0, 0, 0, 0, 0, 0, 1058, 1059, 0,
5494  0, 0, 194, 195, 0, 1060, 0, 0, 1061, 0,
5495  0, 1062, 1063, 0, 0, 0, 0, 57, 58, 59,
5496  60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5497  0, 0, 196, 197, 198, 199, 200, 201, 202, 203,
5498  204, 205, 0, 206, 207, 684, 622, 1066, 0, 685,
5499  0, 208, 245, 0, 292, 0, 0, 0, 0, 0,
5500  0, 0, 0, 0, 0, 0, 0, 0, 0, 179,
5501  180, 181, 182, 183, 184, 185, 186, 187, 0, 0,
5502  188, 189, 0, 0, 0, 0, 190, 191, 192, 193,
5503  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5504  0, 194, 195, 0, 0, 0, 0, 0, 0, 0,
5505  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5506  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5507  0, 196, 197, 198, 199, 200, 201, 202, 203, 204,
5508  205, 0, 206, 207, 687, 632, 0, 0, 688, 0,
5509  208, 245, 0, 0, 0, 0, 0, 0, 0, 0,
5510  0, 0, 0, 0, 0, 0, 0, 0, 179, 180,
5511  181, 182, 183, 184, 185, 186, 187, 0, 0, 188,
5512  189, 0, 0, 0, 0, 190, 191, 192, 193, 0,
5513  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5514  194, 195, 0, 0, 0, 0, 0, 0, 0, 0,
5515  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5516  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5517  196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
5518  0, 206, 207, 684, 622, 0, 0, 702, 0, 208,
5519  245, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5520  0, 0, 0, 0, 0, 0, 0, 179, 180, 181,
5521  182, 183, 184, 185, 186, 187, 0, 0, 188, 189,
5522  0, 0, 0, 0, 190, 191, 192, 193, 0, 0,
5523  0, 0, 0, 0, 0, 0, 0, 0, 0, 194,
5524  195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5525  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5526  0, 0, 0, 0, 0, 0, 0, 0, 0, 196,
5527  197, 198, 199, 200, 201, 202, 203, 204, 205, 0,
5528  206, 207, 713, 622, 0, 0, 714, 0, 208, 245,
5529  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5530  0, 0, 0, 0, 0, 0, 179, 180, 181, 182,
5531  183, 184, 185, 186, 187, 0, 0, 188, 189, 0,
5532  0, 0, 0, 190, 191, 192, 193, 0, 0, 0,
5533  0, 0, 0, 0, 0, 0, 0, 0, 194, 195,
5534  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5535  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5536  0, 0, 0, 0, 0, 0, 0, 0, 196, 197,
5537  198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
5538  207, 716, 632, 0, 0, 717, 0, 208, 245, 0,
5539  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5540  0, 0, 0, 0, 0, 179, 180, 181, 182, 183,
5541  184, 185, 186, 187, 0, 0, 188, 189, 0, 0,
5542  0, 0, 190, 191, 192, 193, 0, 0, 0, 0,
5543  0, 0, 0, 0, 0, 0, 0, 194, 195, 0,
5544  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5545  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5546  0, 0, 0, 0, 0, 0, 0, 196, 197, 198,
5547  199, 200, 201, 202, 203, 204, 205, 0, 206, 207,
5548  829, 622, 0, 0, 830, 0, 208, 245, 0, 0,
5549  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5550  0, 0, 0, 0, 179, 180, 181, 182, 183, 184,
5551  185, 186, 187, 0, 0, 188, 189, 0, 0, 0,
5552  0, 190, 191, 192, 193, 0, 0, 0, 0, 0,
5553  0, 0, 0, 0, 0, 0, 194, 195, 0, 0,
5554  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5555  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5556  0, 0, 0, 0, 0, 0, 196, 197, 198, 199,
5557  200, 201, 202, 203, 204, 205, 0, 206, 207, 832,
5558  632, 0, 0, 833, 0, 208, 245, 0, 0, 0,
5559  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5560  0, 0, 0, 179, 180, 181, 182, 183, 184, 185,
5561  186, 187, 0, 0, 188, 189, 0, 0, 0, 0,
5562  190, 191, 192, 193, 0, 0, 0, 0, 0, 0,
5563  0, 0, 0, 0, 0, 194, 195, 0, 0, 0,
5564  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5565  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5566  0, 0, 0, 0, 0, 196, 197, 198, 199, 200,
5567  201, 202, 203, 204, 205, 0, 206, 207, 838, 622,
5568  0, 0, 839, 0, 208, 245, 0, 0, 0, 0,
5569  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5570  0, 0, 179, 180, 181, 182, 183, 184, 185, 186,
5571  187, 0, 0, 188, 189, 0, 0, 0, 0, 190,
5572  191, 192, 193, 0, 0, 0, 0, 0, 0, 0,
5573  0, 0, 0, 0, 194, 195, 0, 0, 0, 0,
5574  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5575  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5576  0, 0, 0, 0, 196, 197, 198, 199, 200, 201,
5577  202, 203, 204, 205, 0, 206, 207, 669, 632, 0,
5578  0, 670, 0, 208, 245, 0, 0, 0, 0, 0,
5579  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5580  0, 179, 180, 181, 182, 183, 184, 185, 186, 187,
5581  0, 0, 188, 189, 0, 0, 0, 0, 190, 191,
5582  192, 193, 0, 0, 0, 0, 0, 0, 0, 0,
5583  0, 0, 0, 194, 195, 0, 0, 0, 0, 0,
5584  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5585  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5586  0, 0, 0, 196, 197, 198, 199, 200, 201, 202,
5587  203, 204, 205, 0, 206, 207, 998, 622, 0, 0,
5588  999, 0, 208, 245, 0, 0, 0, 0, 0, 0,
5589  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5590  179, 180, 181, 182, 183, 184, 185, 186, 187, 0,
5591  0, 188, 189, 0, 0, 0, 0, 190, 191, 192,
5592  193, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5593  0, 0, 194, 195, 0, 0, 0, 0, 0, 0,
5594  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5595  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5596  0, 0, 196, 197, 198, 199, 200, 201, 202, 203,
5597  204, 205, 0, 206, 207, 1001, 632, 0, 0, 1002,
5598  0, 208, 245, 0, 0, 0, 0, 0, 0, 0,
5599  0, 0, 0, 0, 0, 0, 0, 0, 0, 179,
5600  180, 181, 182, 183, 184, 185, 186, 187, 0, 0,
5601  188, 189, 0, 0, 0, 0, 190, 191, 192, 193,
5602  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5603  0, 194, 195, 0, 0, 0, 0, 0, 0, 0,
5604  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5605  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5606  0, 196, 197, 198, 199, 200, 201, 202, 203, 204,
5607  205, 0, 206, 207, 1281, 622, 0, 0, 1282, 0,
5608  208, 245, 0, 0, 0, 0, 0, 0, 0, 0,
5609  0, 0, 0, 0, 0, 0, 0, 0, 179, 180,
5610  181, 182, 183, 184, 185, 186, 187, 0, 0, 188,
5611  189, 0, 0, 0, 0, 190, 191, 192, 193, 0,
5612  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5613  194, 195, 0, 0, 0, 0, 0, 0, 0, 0,
5614  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5615  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5616  196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
5617  0, 206, 207, 1284, 632, 0, 0, 1285, 0, 208,
5618  245, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5619  0, 0, 0, 0, 0, 0, 0, 179, 180, 181,
5620  182, 183, 184, 185, 186, 187, 0, 0, 188, 189,
5621  0, 0, 0, 0, 190, 191, 192, 193, 0, 0,
5622  0, 0, 0, 0, 0, 0, 0, 0, 0, 194,
5623  195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5624  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5625  0, 0, 0, 0, 0, 0, 0, 0, 0, 196,
5626  197, 198, 199, 200, 201, 202, 203, 204, 205, 0,
5627  206, 207, 1329, 622, 0, 0, 1330, 0, 208, 245,
5628  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5629  0, 0, 0, 0, 0, 0, 179, 180, 181, 182,
5630  183, 184, 185, 186, 187, 0, 0, 188, 189, 0,
5631  0, 0, 0, 190, 191, 192, 193, 0, 0, 0,
5632  0, 0, 0, 0, 0, 0, 0, 0, 194, 195,
5633  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5634  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5635  0, 0, 0, 0, 0, 0, 0, 0, 196, 197,
5636  198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
5637  207, 669, 632, 0, 0, 670, 0, 208, 245, 0,
5638  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5639  0, 0, 0, 0, 0, 179, 180, 181, 182, 183,
5640  184, 185, 186, 187, 0, 0, 188, 189, 0, 0,
5641  0, 0, 190, 191, 192, 193, 0, 0, 0, 0,
5642  0, 0, 0, 0, 0, 0, 0, 194, 195, 0,
5643  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5644  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5645  0, 0, 0, 0, 0, 0, 0, 196, 197, 198,
5646  199, 200, 201, 202, 203, 204, 205, 0, 206, 207,
5647  0, 0, 0, 0, 0, 0, 208
5648 };
5649 
5650 static const yytype_int16 yycheck[] =
5651 {
5652  1, 97, 58, 15, 16, 21, 59, 70, 332, 27,
5653  91, 106, 336, 52, 53, 388, 242, 412, 13, 14,
5654  58, 332, 394, 1, 105, 336, 70, 7, 56, 336,
5655  15, 16, 743, 580, 85, 557, 93, 94, 96, 7,
5656  97, 387, 549, 389, 26, 578, 28, 27, 581, 245,
5657  817, 52, 53, 97, 594, 56, 1, 85, 827, 27,
5658  580, 284, 745, 101, 80, 288, 56, 463, 584, 54,
5659  98, 99, 100, 52, 745, 15, 16, 72, 58, 750,
5660  63, 64, 65, 884, 85, 94, 459, 750, 97, 882,
5661  102, 797, 509, 439, 919, 66, 609, 98, 99, 100,
5662  101, 13, 455, 499, 26, 1062, 25, 52, 53, 54,
5663  55, 13, 458, 1004, 460, 77, 0, 102, 29, 13,
5664  273, 101, 308, 309, 15, 16, 58, 455, 69, 662,
5665  677, 76, 77, 13, 1127, 463, 101, 0, 511, 98,
5666  486, 567, 155, 496, 10, 80, 78, 160, 574, 34,
5667  100, 1255, 100, 100, 152, 1139, 237, 98, 1247, 1139,
5668  25, 69, 102, 54, 55, 25, 512, 52, 103, 155,
5669  100, 1155, 225, 1153, 591, 101, 28, 109, 110, 275,
5670  672, 673, 221, 740, 265, 135, 743, 135, 135, 25,
5671  98, 156, 67, 250, 251, 154, 25, 27, 351, 158,
5672  1193, 13, 68, 25, 1029, 135, 1163, 1164, 158, 77,
5673  142, 102, 275, 124, 37, 38, 25, 298, 1003, 1004,
5674  221, 1325, 13, 1114, 1003, 1004, 733, 734, 1317, 155,
5675  152, 275, 56, 245, 273, 247, 1061, 156, 1063, 1040,
5676  13, 947, 293, 155, 470, 13, 262, 263, 1041, 161,
5677  1003, 1004, 745, 155, 156, 256, 13, 13, 121, 161,
5678  245, 155, 247, 756, 659, 293, 228, 161, 325, 326,
5679  327, 328, 273, 330, 331, 155, 221, 650, 256, 162,
5680  13, 161, 227, 228, 1268, 801, 26, 660, 1272, 1273,
5681  235, 156, 293, 1273, 273, 135, 156, 242, 981, 695,
5682  245, 283, 284, 399, 837, 651, 288, 247, 290, 1062,
5683  981, 256, 351, 826, 977, 661, 325, 326, 327, 328,
5684  156, 292, 323, 404, 352, 155, 1079, 156, 273, 1114,
5685  25, 161, 155, 295, 156, 1114, 1161, 1162, 395, 525,
5686  693, 527, 156, 155, 1113, 323, 1113, 156, 1332, 161,
5687  351, 352, 101, 900, 411, 399, 247, 396, 397, 227,
5688  228, 1114, 352, 66, 155, 693, 888, 695, 785, 743,
5689  161, 1156, 351, 389, 25, 882, 388, 884, 1163, 1164,
5690  900, 66, 155, 1136, 25, 158, 395, 155, 161, 390,
5691  158, 931, 66, 161, 135, 396, 397, 278, 155, 155,
5692  1153, 110, 411, 135, 161, 161, 351, 156, 100, 389,
5693  1163, 1164, 152, 69, 961, 156, 25, 120, 158, 952,
5694  100, 745, 155, 435, 15, 153, 750, 155, 161, 921,
5695  922, 1163, 1164, 142, 25, 927, 928, 122, 123, 69,
5696  135, 97, 98, 388, 460, 390, 120, 459, 25, 135,
5697  435, 396, 397, 806, 69, 135, 1127, 683, 509, 439,
5698  155, 156, 480, 158, 159, 891, 892, 97, 98, 895,
5699  486, 897, 158, 899, 1058, 1059, 156, 162, 806, 113,
5700  460, 509, 97, 98, 78, 1270, 979, 710, 981, 156,
5701  983, 492, 25, 532, 158, 435, 512, 693, 154, 511,
5702  480, 69, 158, 34, 56, 156, 486, 158, 509, 15,
5703  100, 17, 480, 100, 459, 156, 905, 158, 907, 1011,
5704  100, 52, 100, 468, 154, 470, 135, 100, 135, 97,
5705  98, 532, 512, 1040, 1041, 579, 722, 538, 1270, 154,
5706  591, 727, 1253, 916, 435, 135, 155, 156, 135, 1316,
5707  159, 145, 146, 147, 435, 135, 909, 135, 135, 803,
5708  538, 100, 135, 591, 455, 577, 511, 811, 580, 915,
5709  1127, 917, 968, 945, 1158, 1159, 156, 578, 155, 156,
5710  581, 101, 159, 156, 1255, 466, 154, 532, 469, 1260,
5711  591, 156, 30, 474, 652, 69, 135, 1260, 1131, 643,
5712  100, 640, 135, 642, 589, 496, 663, 78, 489, 594,
5713  555, 627, 557, 66, 67, 69, 1042, 1043, 1044, 1045,
5714  636, 156, 155, 156, 98, 1127, 159, 100, 610, 1003,
5715  1004, 1124, 158, 578, 1127, 651, 581, 863, 650, 640,
5716  968, 642, 699, 97, 98, 661, 970, 629, 660, 100,
5717  387, 1023, 389, 69, 1325, 671, 674, 981, 1321, 970,
5718  711, 662, 135, 970, 720, 1060, 1188, 1189, 54, 122,
5719  123, 651, 143, 144, 145, 146, 147, 158, 64, 65,
5720  561, 661, 98, 711, 135, 630, 52, 703, 704, 100,
5721  56, 636, 627, 69, 674, 640, 1253, 642, 1255, 78,
5722  154, 636, 439, 1260, 686, 650, 674, 100, 1265, 590,
5723  711, 100, 1036, 794, 589, 660, 1249, 662, 69, 594,
5724  159, 458, 98, 460, 135, 1036, 671, 69, 710, 1036,
5725  158, 1103, 155, 715, 785, 158, 671, 135, 683, 722,
5726  1114, 724, 135, 100, 727, 728, 135, 98, 485, 486,
5727  160, 846, 69, 1255, 58, 97, 98, 785, 1260, 704,
5728  56, 1187, 1255, 1265, 1321, 1160, 1323, 156, 1325, 153,
5729  1327, 158, 1265, 510, 78, 512, 1298, 759, 135, 836,
5730  97, 98, 1156, 156, 785, 100, 667, 1344, 69, 1163,
5731  1164, 835, 162, 69, 78, 834, 66, 672, 673, 156,
5732  69, 155, 693, 1127, 66, 109, 844, 161, 1180, 113,
5733  69, 69, 154, 37, 38, 69, 254, 98, 69, 1321,
5734  135, 1323, 98, 1325, 152, 1327, 135, 836, 97, 98,
5735  1323, 52, 1325, 834, 1327, 56, 837, 686, 97, 98,
5736  98, 156, 1344, 97, 98, 135, 97, 98, 594, 831,
5737  120, 1344, 122, 123, 107, 125, 737, 69, 120, 841,
5738  122, 123, 69, 125, 844, 1238, 715, 155, 1, 814,
5739  815, 159, 817, 855, 869, 155, 156, 582, 69, 1253,
5740  937, 586, 15, 16, 66, 154, 98, 135, 900, 834,
5741  97, 98, 837, 1239, 161, 154, 1270, 936, 66, 156,
5742  154, 917, 1127, 154, 916, 26, 97, 98, 25, 953,
5743  56, 349, 649, 26, 651, 806, 354, 139, 863, 52,
5744  53, 69, 659, 56, 661, 1268, 672, 673, 937, 1272,
5745  769, 1255, 971, 772, 67, 936, 1260, 917, 120, 135,
5746  122, 123, 135, 888, 69, 156, 931, 154, 69, 97,
5747  98, 952, 85, 156, 122, 123, 69, 125, 159, 69,
5748  93, 94, 843, 154, 97, 98, 99, 100, 153, 102,
5749  971, 916, 97, 98, 155, 156, 97, 98, 100, 14,
5750  15, 862, 831, 864, 97, 98, 931, 97, 98, 1028,
5751  156, 936, 841, 994, 995, 990, 991, 89, 90, 880,
5752  159, 1325, 1003, 1004, 442, 443, 154, 952, 83, 84,
5753  1066, 1153, 1065, 135, 1, 453, 994, 995, 1000, 40,
5754  41, 1163, 1164, 461, 462, 156, 971, 1028, 1253, 154,
5755  1255, 152, 156, 154, 156, 1260, 156, 158, 66, 152,
5756  1265, 154, 156, 481, 154, 158, 921, 922, 135, 487,
5757  155, 156, 927, 928, 294, 295, 156, 1058, 1059, 52,
5758  156, 1062, 52, 138, 139, 52, 53, 153, 66, 13,
5759  1109, 1110, 156, 1018, 1102, 1020, 156, 1173, 1079, 17,
5760  1062, 1063, 25, 1028, 153, 156, 156, 1168, 221, 1128,
5761  135, 44, 120, 1150, 122, 123, 1321, 44, 1323, 153,
5762  1325, 1102, 1327, 1048, 1049, 1106, 156, 156, 1109, 1110,
5763  1173, 98, 245, 1114, 247, 44, 66, 250, 251, 1344,
5764  44, 996, 120, 256, 122, 123, 135, 1128, 160, 1173,
5765  1131, 137, 8, 1172, 1116, 1136, 1011, 15, 1139, 156,
5766  273, 1150, 52, 156, 156, 1127, 1185, 66, 156, 156,
5767  153, 1000, 1153, 1154, 1155, 156, 1138, 1158, 1159, 1141,
5768  293, 1106, 1163, 1164, 1109, 1110, 101, 1220, 1113, 1197,
5769  120, 1172, 122, 123, 156, 921, 922, 156, 915, 1161,
5770  917, 927, 928, 1128, 1185, 156, 1131, 9, 1245, 1246,
5771  323, 156, 325, 326, 327, 328, 1197, 330, 331, 140,
5772  638, 120, 52, 122, 123, 54, 55, 140, 57, 52,
5773  156, 1193, 101, 1062, 156, 64, 65, 588, 351, 352,
5774  156, 153, 56, 1239, 161, 159, 1238, 1172, 156, 156,
5775  1175, 1259, 1, 140, 221, 156, 1245, 1246, 156, 156,
5776  1185, 156, 156, 1188, 1189, 156, 15, 16, 1249, 1288,
5777  996, 1233, 1234, 1235, 153, 388, 140, 390, 1259, 1239,
5778  56, 156, 395, 396, 397, 1011, 637, 1268, 26, 256,
5779  156, 1272, 1273, 644, 645, 156, 156, 52, 411, 54,
5780  55, 1162, 57, 52, 53, 156, 273, 1288, 158, 1138,
5781  158, 156, 1141, 1238, 256, 1240, 323, 1242, 67, 488,
5782  1106, 1283, 435, 52, 1249, 54, 55, 56, 57, 492,
5783  1292, 69, 1161, 52, 844, 54, 55, 56, 57, 98,
5784  100, 89, 1203, 481, 93, 94, 459, 102, 97, 1311,
5785  671, 1332, 1213, 102, 932, 882, 323, 1175, 733, 97,
5786  98, 1195, 52, 1288, 54, 55, 56, 57, 78, 1230,
5787  1231, 1232, 52, 1298, 54, 55, 56, 57, 1127, 492,
5788  1260, 799, 800, 102, 351, 95, 96, 1049, 1317, 807,
5789  808, 1316, 78, 347, 672, 673, 509, 847, 511, 1316,
5790  1196, 1156, 1154, 1199, 1233, 1234, 1235, 1152, 109, 95,
5791  96, 689, 690, 764, 152, 1156, 154, 768, 1240, 532,
5792  158, 1242, 102, 390, 527, 538, 101, 705, 108, 396,
5793  397, 750, 142, 143, 144, 145, 146, 147, 743, 857,
5794  858, 1253, 860, 861, 40, 41, 42, 43, 44, 59,
5795  60, 61, 62, 1311, 1283, -1, -1, 143, 144, 145,
5796  146, 147, 901, 902, 577, 578, -1, 580, 581, -1,
5797  -1, 910, 221, 912, 825, 914, 589, 828, 591, -1,
5798  -1, 594, -1, -1, -1, -1, -1, -1, -1, -1,
5799  -1, 842, -1, -1, -1, 913, 245, -1, 247, -1,
5800  -1, 250, 251, -1, -1, 1301, 1302, 256, 926, 1305,
5801  1306, -1, -1, 1309, -1, -1, -1, -1, -1, -1,
5802  1237, -1, 1239, -1, 273, 492, -1, 640, -1, 642,
5803  -1, -1, -1, -1, -1, -1, -1, 650, -1, -1,
5804  -1, -1, 1338, 1339, 1340, 1341, 964, 660, -1, 662,
5805  663, 1347, -1, -1, -1, 78, -1, -1, -1, 672,
5806  673, -1, -1, -1, -1, 532, -1, -1, -1, -1,
5807  -1, 538, 95, 96, 323, -1, 325, 326, 327, 328,
5808  -1, 330, 331, -1, -1, -1, 699, 938, -1, -1,
5809  941, 1308, -1, -1, -1, -1, -1, 948, 711, -1,
5810  951, -1, 351, 954, 1003, 1004, -1, -1, -1, -1,
5811  -1, 578, -1, -1, 581, -1, 1, 140, 141, 142,
5812  143, 144, 145, 146, 147, -1, -1, 594, -1, -1,
5813  15, 16, -1, -1, -1, -1, -1, -1, -1, 388,
5814  -1, 390, -1, 921, 922, -1, 395, 396, 397, 927,
5815  928, -1, -1, -1, -1, -1, -1, -1, -1, 1058,
5816  1059, -1, 411, 1062, -1, -1, -1, 52, 53, -1,
5817  -1, -1, 785, 640, -1, 642, -1, -1, -1, -1,
5818  1079, 1032, 67, -1, 962, 963, 435, 965, 966, -1,
5819  -1, -1, -1, -1, -1, 662, -1, -1, -1, -1,
5820  -1, -1, -1, -1, -1, 672, 673, -1, 93, 94,
5821  459, -1, 97, -1, -1, 1114, -1, 102, -1, -1,
5822  -1, 834, -1, 836, 837, -1, -1, 1145, -1, -1,
5823  -1, -1, -1, 1011, -1, -1, -1, 1136, -1, -1,
5824  1139, -1, -1, 492, 52, -1, 54, 55, 56, 57,
5825  58, -1, -1, -1, 1153, 1154, 1155, 1035, -1, 1158,
5826  1159, -1, 511, -1, 1163, 1164, -1, -1, -1, 52,
5827  78, 54, 55, 56, 57, 58, -1, -1, -1, -1,
5828  -1, -1, -1, 532, 92, -1, -1, 900, -1, 538,
5829  -1, -1, -1, -1, 102, 78, -1, -1, -1, -1,
5830  108, 109, 110, 916, -1, -1, -1, -1, 921, 922,
5831  -1, -1, -1, -1, 927, 928, -1, -1, -1, 102,
5832  -1, -1, -1, 936, 937, -1, 109, 110, 577, 578,
5833  -1, 580, 581, -1, 142, -1, 221, 145, -1, 952,
5834  589, -1, -1, -1, -1, 594, -1, -1, -1, 52,
5835  158, 54, 55, 56, 57, 58, -1, -1, 971, 142,
5836  245, -1, 247, -1, -1, 250, 251, 834, -1, 1268,
5837  837, 256, -1, 1272, 1273, 78, -1, -1, -1, -1,
5838  -1, 994, 995, 996, -1, -1, -1, -1, 273, 92,
5839  -1, 640, -1, 642, -1, -1, -1, -1, 1011, 102,
5840  -1, 650, -1, -1, -1, -1, 109, 110, -1, -1,
5841  -1, 660, -1, 662, 663, 1028, -1, -1, -1, -1,
5842  -1, -1, -1, 672, 673, -1, 52, -1, 54, 55,
5843  56, 57, 58, 1332, -1, -1, -1, -1, 323, 142,
5844  325, 326, 327, 328, 1295, 330, 331, -1, -1, -1,
5845  699, -1, 78, -1, 921, 922, -1, -1, -1, -1,
5846  927, 928, -1, -1, -1, -1, 351, -1, -1, 936,
5847  -1, -1, -1, -1, -1, -1, 102, -1, -1, 1,
5848  -1, -1, 108, 109, 110, 952, -1, -1, -1, 1102,
5849  -1, -1, -1, 1106, -1, -1, 1109, 1110, -1, -1,
5850  -1, -1, -1, 388, 971, 390, -1, -1, -1, -1,
5851  395, 396, 397, -1, -1, 1128, 142, -1, 1131, 145,
5852  -1, -1, -1, -1, -1, -1, 411, 994, 995, 996,
5853  52, 53, -1, -1, 56, -1, -1, 1150, -1, -1,
5854  -1, -1, -1, -1, 1011, -1, -1, -1, -1, -1,
5855  435, -1, -1, -1, -1, -1, -1, -1, -1, 1172,
5856  -1, 1028, -1, 85, -1, 52, -1, 54, 55, 56,
5857  57, 58, 1185, -1, 459, -1, 98, 99, 100, -1,
5858  -1, -1, -1, -1, 1197, 834, -1, 836, 837, -1,
5859  -1, 78, -1, -1, -1, -1, -1, -1, -1, -1,
5860  -1, -1, -1, -1, -1, -1, -1, 492, -1, -1,
5861  -1, -1, -1, -1, -1, 102, -1, -1, -1, -1,
5862  -1, 108, 109, 110, -1, 1238, 511, -1, -1, -1,
5863  -1, -1, 1245, 1246, 1, 1102, 1249, -1, -1, 1106,
5864  -1, -1, 1109, 1110, -1, -1, 1259, 532, 15, 16,
5865  -1, 900, -1, 538, -1, 142, 1003, 1004, 145, -1,
5866  -1, 1128, -1, -1, 1131, -1, -1, 916, 155, -1,
5867  -1, -1, 921, 922, -1, 1288, -1, -1, 927, 928,
5868  -1, -1, -1, -1, -1, 52, 53, 936, 937, -1,
5869  -1, -1, 577, 578, -1, 580, 581, -1, -1, 221,
5870  67, -1, -1, 952, 589, 1172, -1, -1, -1, 594,
5871  -1, 1058, 1059, -1, -1, 1062, -1, -1, 1185, -1,
5872  -1, -1, 971, -1, -1, -1, 93, 94, -1, -1,
5873  97, -1, 1079, -1, 256, 102, -1, -1, -1, -1,
5874  -1, -1, -1, -1, -1, 994, 995, 996, -1, -1,
5875  -1, 273, -1, -1, -1, 640, -1, 642, -1, -1,
5876  -1, -1, 1011, -1, -1, 650, -1, 1114, -1, -1,
5877  -1, 293, -1, -1, -1, 660, -1, 662, 663, 1028,
5878  -1, -1, 1249, -1, -1, -1, -1, 672, 673, 1136,
5879  -1, -1, 1139, -1, -1, -1, -1, -1, -1, -1,
5880  -1, 323, -1, -1, -1, -1, 1153, 1154, 1155, -1,
5881  -1, 1158, 1159, -1, 699, -1, 1163, 1164, -1, -1,
5882  -1, 1288, -1, -1, -1, -1, -1, -1, -1, 351,
5883  352, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5884  -1, -1, -1, 1003, 1004, -1, -1, 52, -1, 54,
5885  55, 56, 57, 58, 221, -1, -1, 1106, -1, -1,
5886  1109, 1110, -1, -1, -1, -1, -1, -1, 390, -1,
5887  -1, -1, -1, 78, 396, 397, -1, -1, 245, 1128,
5888  247, -1, 1131, 250, 251, -1, -1, 92, -1, 256,
5889  -1, -1, -1, -1, -1, -1, -1, 102, 1058, 1059,
5890  -1, 1150, 1062, 108, 109, 110, 273, -1, -1, -1,
5891  -1, -1, -1, -1, -1, -1, -1, -1, -1, 1079,
5892  -1, 1268, -1, 1172, -1, 1272, 1273, -1, -1, -1,
5893  -1, -1, -1, -1, -1, -1, 1185, 142, -1, -1,
5894  145, -1, -1, -1, -1, -1, -1, -1, -1, 834,
5895  -1, 836, 837, -1, 1114, -1, 323, -1, 325, 326,
5896  327, 328, -1, 330, 331, -1, -1, -1, -1, -1,
5897  492, -1, -1, -1, -1, -1, 1136, -1, -1, 1139,
5898  -1, -1, -1, -1, 351, 1332, -1, 509, -1, 1238,
5899  -1, -1, -1, 1153, 1154, 1155, 1245, 1246, 1158, 1159,
5900  1249, -1, -1, 1163, 1164, -1, 1, -1, -1, -1,
5901  532, -1, -1, -1, -1, 900, 538, -1, -1, -1,
5902  -1, 388, -1, 390, -1, -1, -1, -1, 395, 396,
5903  397, 916, -1, -1, -1, -1, 921, 922, -1, 1288,
5904  -1, -1, 927, 928, 411, -1, -1, -1, -1, -1,
5905  -1, 936, 937, -1, -1, -1, 578, 52, 53, 581,
5906  -1, 56, -1, -1, -1, -1, -1, 952, 435, 591,
5907  -1, -1, 594, -1, -1, -1, -1, -1, -1, -1,
5908  -1, -1, -1, -1, -1, -1, 971, -1, -1, -1,
5909  85, -1, 459, -1, -1, -1, -1, -1, -1, -1,
5910  -1, -1, -1, 98, 99, 100, -1, -1, 1268, 994,
5911  995, 996, 1272, 1273, -1, -1, -1, -1, 640, -1,
5912  642, -1, -1, -1, -1, 492, 1011, -1, -1, -1,
5913  -1, -1, -1, -1, -1, 1, -1, -1, -1, -1,
5914  662, -1, -1, 1028, 511, -1, -1, -1, -1, -1,
5915  672, 673, -1, -1, -1, -1, -1, -1, -1, -1,
5916  -1, -1, -1, -1, -1, 532, -1, -1, -1, -1,
5917  -1, 538, 1332, -1, -1, -1, -1, -1, -1, -1,
5918  -1, -1, -1, 1003, 1004, -1, 52, 53, -1, 711,
5919  56, -1, -1, -1, -1, -1, -1, -1, 720, -1,
5920  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5921  577, 578, -1, 580, 581, -1, -1, -1, -1, 85,
5922  -1, 1106, 589, -1, 1109, 1110, 221, 594, -1, -1,
5923  -1, -1, 98, 99, 100, -1, -1, -1, 1058, 1059,
5924  -1, -1, 1062, 1128, -1, -1, 1131, -1, -1, -1,
5925  -1, -1, -1, -1, -1, -1, -1, -1, -1, 1079,
5926  -1, 256, -1, 785, -1, 1150, -1, -1, -1, -1,
5927  -1, -1, -1, 640, -1, 642, -1, -1, 273, -1,
5928  -1, -1, -1, 650, -1, -1, -1, 1172, -1, -1,
5929  -1, -1, -1, 660, 1114, 662, 663, -1, 293, -1,
5930  1185, -1, -1, -1, -1, 672, 673, -1, -1, -1,
5931  -1, -1, 834, -1, -1, 837, 1136, -1, 25, 1139,
5932  -1, -1, -1, -1, -1, -1, -1, -1, 323, -1,
5933  -1, -1, 699, 1153, 1154, 1155, -1, -1, 1158, 1159,
5934  -1, -1, -1, 1163, 1164, -1, -1, -1, -1, -1,
5935  -1, -1, -1, 1238, -1, 221, 351, 352, -1, -1,
5936  1245, 1246, -1, -1, 1249, 1003, 1004, -1, -1, -1,
5937  -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
5938  87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
5939  256, -1, -1, -1, 101, 390, -1, -1, -1, 921,
5940  922, 396, 397, 1288, -1, 927, 928, 273, -1, -1,
5941  -1, -1, -1, -1, 936, -1, -1, -1, -1, -1,
5942  1058, 1059, -1, -1, 1062, 55, -1, 293, -1, 136,
5943  952, 138, 139, 140, 141, 142, 143, 144, 145, 146,
5944  147, 1079, -1, -1, -1, -1, -1, -1, 1268, 971,
5945  -1, -1, 1272, 1273, -1, -1, -1, 323, -1, -1,
5946  -1, -1, -1, -1, -1, -1, -1, 834, -1, 836,
5947  837, -1, 994, 995, 996, -1, 1114, -1, -1, -1,
5948  -1, -1, -1, -1, -1, 351, 352, -1, -1, 1011,
5949  -1, -1, -1, -1, -1, -1, -1, 492, 1136, -1,
5950  -1, 1139, -1, -1, -1, -1, 1028, -1, -1, -1,
5951  -1, -1, 1332, -1, 509, 1153, 1154, 1155, -1, -1,
5952  1158, 1159, -1, -1, 390, 1163, 1164, -1, -1, -1,
5953  396, 397, -1, 900, -1, -1, -1, 532, -1, -1,
5954  -1, -1, -1, 538, -1, -1, 1003, 1004, -1, 916,
5955  -1, -1, -1, -1, 921, 922, -1, -1, -1, -1,
5956  927, 928, -1, -1, -1, -1, -1, -1, -1, 936,
5957  937, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5958  1102, -1, -1, 578, 1106, 952, 581, 1109, 1110, 219,
5959  -1, -1, 222, 223, 224, -1, 591, -1, -1, 594,
5960  -1, 1058, 1059, -1, 971, 1062, 1128, -1, -1, 1131,
5961  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5962  -1, -1, 1079, -1, -1, -1, 492, 994, 995, 996,
5963  1268, -1, -1, 1, 1272, 1273, -1, -1, -1, -1,
5964  -1, -1, -1, 509, 1011, 640, -1, 642, -1, -1,
5965  1172, -1, -1, -1, -1, -1, -1, 1114, -1, -1,
5966  -1, 1028, -1, 1185, -1, -1, 532, 662, -1, -1,
5967  -1, -1, 538, -1, -1, 1197, -1, 672, 673, 1136,
5968  -1, -1, 1139, -1, 52, 53, -1, -1, 56, 1,
5969  -1, -1, -1, -1, 1332, -1, 1153, 1154, 1155, -1,
5970  -1, 1158, 1159, -1, -1, -1, 1163, 1164, -1, -1,
5971  -1, -1, 578, -1, -1, 581, 711, 85, -1, -1,
5972  -1, -1, -1, -1, -1, 591, -1, 1249, 594, -1,
5973  98, 99, 100, 101, -1, -1, -1, 1259, -1, 1106,
5974  52, 53, 1109, 1110, -1, -1, -1, -1, -1, -1,
5975  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5976  -1, 1128, -1, -1, 1131, -1, 1288, -1, -1, -1,
5977  -1, -1, -1, -1, 640, -1, 642, -1, -1, 1003,
5978  1004, -1, -1, 1150, -1, -1, -1, -1, -1, -1,
5979  785, -1, -1, -1, -1, -1, 662, -1, -1, -1,
5980  -1, -1, -1, -1, -1, 1172, 672, 673, -1, -1,
5981  -1, 1268, -1, -1, -1, 1272, 1273, -1, 1185, -1,
5982  -1, -1, -1, -1, 454, 455, -1, -1, -1, -1,
5983  -1, -1, -1, 463, 1058, 1059, -1, -1, 1062, 834,
5984  -1, -1, 837, -1, -1, 711, -1, -1, -1, -1,
5985  -1, -1, -1, 221, -1, 1079, -1, -1, -1, -1,
5986  -1, -1, -1, -1, -1, -1, 496, -1, -1, 499,
5987  -1, 1238, -1, -1, -1, 1332, -1, -1, 1245, 1246,
5988  -1, -1, 1249, -1, -1, -1, -1, -1, 256, -1,
5989  1114, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5990  -1, -1, -1, -1, -1, 273, -1, -1, -1, 221,
5991  -1, -1, 1136, -1, -1, 1139, -1, -1, -1, 785,
5992  -1, 1288, -1, -1, -1, 293, 921, 922, -1, 1153,
5993  1154, 1155, 927, 928, 1158, 1159, -1, -1, 568, 1163,
5994  1164, 936, -1, -1, 256, -1, -1, -1, -1, -1,
5995  -1, -1, -1, -1, -1, 323, -1, 952, -1, 589,
5996  -1, 273, -1, -1, 594, -1, -1, -1, 834, -1,
5997  -1, 837, -1, -1, -1, -1, 971, -1, -1, -1,
5998  -1, -1, -1, 351, 352, -1, -1, -1, -1, -1,
5999  -1, -1, -1, -1, -1, -1, -1, -1, -1, 994,
6000  995, 996, -1, -1, -1, -1, -1, -1, -1, -1,
6001  -1, 323, -1, -1, -1, -1, 1011, -1, -1, -1,
6002  -1, -1, 390, -1, -1, -1, -1, -1, 396, 397,
6003  -1, -1, -1, 1028, -1, -1, -1, -1, -1, 351,
6004  -1, -1, -1, -1, 1268, 675, -1, -1, 1272, 1273,
6005  -1, -1, -1, -1, -1, 921, 922, -1, -1, -1,
6006  -1, 927, 928, 693, -1, 695, -1, -1, -1, -1,
6007  936, 33, 34, 35, 36, -1, -1, -1, 390, -1,
6008  -1, -1, -1, -1, 396, 397, 952, 49, 50, 51,
6009  -1, -1, -1, -1, -1, -1, -1, 59, 60, 61,
6010  62, 63, -1, -1, -1, 971, -1, 1102, 1332, -1,
6011  -1, 1106, -1, -1, 1109, 1110, -1, -1, -1, 749,
6012  -1, -1, -1, -1, 492, -1, -1, -1, 994, 995,
6013  996, -1, -1, 1128, -1, -1, 1131, -1, -1, -1,
6014  -1, 509, -1, -1, -1, 1011, -1, 777, -1, 111,
6015  112, 113, 114, 115, 116, 117, 118, 119, -1, -1,
6016  -1, -1, 1028, -1, 532, -1, 1003, 1004, -1, -1,
6017  538, -1, -1, -1, -1, -1, 806, 1172, -1, -1,
6018  492, -1, -1, -1, -1, -1, 148, -1, -1, -1,
6019  1185, -1, -1, -1, 824, -1, -1, -1, -1, -1,
6020  -1, -1, 1197, -1, -1, -1, -1, -1, -1, -1,
6021  578, -1, -1, 581, -1, -1, -1, -1, -1, -1,
6022  532, 1058, 1059, 591, -1, 1062, 538, -1, -1, -1,
6023  -1, -1, -1, -1, -1, -1, 1102, -1, -1, -1,
6024  1106, -1, 1079, 1109, 1110, -1, -1, -1, 1003, 1004,
6025  -1, -1, -1, -1, 1249, -1, -1, -1, -1, -1,
6026  -1, -1, 1128, -1, 1259, 1131, 578, -1, -1, 581,
6027  -1, -1, 640, -1, 642, -1, -1, 1114, -1, 909,
6028  -1, -1, 594, -1, -1, -1, -1, -1, -1, -1,
6029  -1, -1, -1, 1288, 662, -1, -1, -1, -1, 1136,
6030  -1, 931, 1139, 1058, 1059, -1, 1172, 1062, -1, -1,
6031  -1, -1, -1, 943, -1, -1, 1153, 1154, 1155, 1185,
6032  -1, 1158, 1159, -1, 1079, -1, 1163, 1164, 640, -1,
6033  642, 1197, -1, -1, -1, -1, -1, -1, 968, -1,
6034  -1, -1, -1, 711, -1, -1, -1, -1, -1, -1,
6035  662, -1, -1, -1, -1, -1, -1, -1, -1, 1114,
6036  672, 673, 992, -1, -1, -1, -1, -1, -1, -1,
6037  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6038  -1, 1136, -1, 1249, 1139, -1, -1, -1, -1, -1,
6039  -1, -1, -1, 1259, -1, -1, -1, 1027, 1153, 1154,
6040  1155, -1, -1, 1158, 1159, -1, -1, -1, 1163, 1164,
6041  -1, -1, -1, -1, -1, -1, -1, 785, -1, -1,
6042  -1, -1, 1288, -1, -1, -1, -1, -1, -1, -1,
6043  -1, 1268, -1, -1, -1, 1272, 1273, -1, -1, -1,
6044  -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
6045  -1, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6046  14, 15, -1, 17, -1, -1, 834, -1, -1, 837,
6047  -1, 25, 26, 27, -1, -1, -1, -1, -1, -1,
6048  -1, 1111, -1, 37, 38, -1, 40, 41, 42, 43,
6049  44, -1, -1, -1, -1, 1332, -1, -1, -1, -1,
6050  -1, 15, 16, -1, -1, -1, -1, -1, -1, -1,
6051  -1, -1, -1, 1268, 68, 69, -1, 1272, 1273, -1,
6052  -1, -1, 834, -1, -1, 837, -1, -1, -1, -1,
6053  -1, -1, -1, 47, 48, 49, 50, -1, -1, -1,
6054  54, 55, -1, 97, 98, -1, -1, -1, -1, -1,
6055  -1, -1, -1, 67, 68, -1, -1, -1, -1, -1,
6056  -1, -1, -1, 33, 34, 35, 36, 121, 936, -1,
6057  -1, -1, -1, -1, -1, -1, -1, 1332, -1, 49,
6058  50, 51, 52, -1, 952, -1, 56, -1, 102, 59,
6059  60, 61, 62, 63, -1, -1, -1, -1, 152, 153,
6060  -1, 155, -1, 971, 158, 159, -1, 161, -1, 921,
6061  922, -1, -1, -1, -1, 927, 928, -1, -1, -1,
6062  -1, 91, 92, -1, 936, -1, 994, 995, -1, 99,
6063  -1, -1, 102, -1, -1, 105, 106, -1, 108, -1,
6064  952, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6065  -1, -1, 44, -1, -1, -1, -1, -1, -1, 971,
6066  1028, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6067  -1, 141, -1, -1, -1, -1, -1, -1, 148, -1,
6068  -1, -1, 994, 995, 996, 155, 78, 79, 80, 81,
6069  82, 83, 84, 85, 86, 87, 88, 89, 90, 1011,
6070  -1, -1, -1, 95, 96, 219, -1, -1, 222, 223,
6071  224, -1, 226, -1, -1, -1, 1028, -1, -1, -1,
6072  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6073  -1, 245, -1, 247, 1102, -1, 44, -1, 1106, -1,
6074  -1, 1109, 1110, -1, 136, -1, 138, 139, 140, 141,
6075  142, 143, 144, 145, 146, 147, -1, -1, -1, -1,
6076  1128, -1, -1, 1131, 156, -1, -1, -1, -1, -1,
6077  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6078  88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6079  -1, -1, -1, -1, 1106, -1, -1, 1109, 1110, -1,
6080  -1, -1, -1, -1, 1172, -1, -1, -1, -1, -1,
6081  -1, -1, -1, -1, -1, -1, 1128, 1185, -1, 1131,
6082  -1, -1, -1, -1, -1, -1, -1, -1, 136, 1197,
6083  138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
6084  -1, -1, 356, 357, 358, 359, 360, -1, -1, 363,
6085  364, 365, 366, 367, 368, 369, 370, -1, 372, -1,
6086  1172, 375, 376, 377, 378, 379, 380, 381, 382, 383,
6087  384, -1, -1, 1185, 388, -1, -1, -1, -1, -1,
6088  -1, 1249, -1, -1, -1, -1, -1, -1, -1, -1,
6089  -1, 1259, -1, -1, -1, -1, -1, -1, -1, -1,
6090  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6091  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6092  1288, 435, -1, -1, -1, -1, -1, -1, -1, -1,
6093  -1, -1, -1, -1, -1, -1, -1, 1249, -1, -1,
6094  454, 455, -1, -1, -1, 459, -1, -1, -1, 463,
6095  0, 465, -1, -1, -1, -1, -1, -1, 8, 9,
6096  10, -1, -1, 13, 14, 15, -1, 17, -1, 483,
6097  -1, -1, -1, -1, -1, 25, 1288, 27, 28, 29,
6098  -1, -1, 496, -1, -1, 499, -1, 37, 38, -1,
6099  40, 41, 42, 43, 44, -1, -1, 511, -1, -1,
6100  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6101  -1, -1, -1, -1, -1, 529, -1, -1, 68, 69,
6102  -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6103  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6104  90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6105  100, 101, -1, -1, 568, -1, -1, 107, -1, -1,
6106  -1, -1, -1, 577, -1, -1, 580, -1, -1, -1,
6107  -1, 121, -1, -1, 124, 589, -1, -1, -1, -1,
6108  594, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6109  140, 141, 142, 143, 144, 145, 146, 147, -1, -1,
6110  -1, -1, -1, 153, 154, 155, 156, -1, -1, 159,
6111  160, 161, -1, 52, 53, -1, -1, 56, -1, -1,
6112  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6113  -1, -1, -1, -1, -1, -1, 650, 76, 77, 78,
6114  79, 80, 81, 82, 83, 84, 660, -1, 87, 88,
6115  -1, -1, -1, -1, 93, 94, 95, 96, 672, 673,
6116  -1, 675, 676, 677, 678, -1, -1, -1, -1, 108,
6117  109, -1, -1, -1, -1, 689, 690, -1, -1, 693,
6118  -1, 695, -1, -1, -1, -1, -1, -1, -1, -1,
6119  -1, 705, -1, -1, -1, -1, -1, -1, -1, 138,
6120  139, 140, 141, 142, 143, 144, 145, 146, 147, -1,
6121  149, 150, -1, -1, -1, -1, -1, -1, 157, 158,
6122  -1, -1, 0, 1, -1, 3, 4, 5, 6, 7,
6123  8, 9, 10, 11, 12, 749, 14, 15, 16, 17,
6124  18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
6125  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6126  -1, 39, -1, 777, -1, -1, -1, 45, 46, 47,
6127  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6128  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6129  68, -1, 806, -1, -1, -1, -1, -1, 76, 77,
6130  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6131  824, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6132  -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
6133  108, -1, -1, 111, 112, 113, 114, 115, 116, 117,
6134  118, 119, -1, 121, -1, -1, -1, -1, -1, -1,
6135  -1, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6136  79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
6137  148, 149, 150, -1, -1, 153, 95, 96, -1, -1,
6138  -1, 159, -1, 161, -1, -1, 900, -1, -1, -1,
6139  -1, -1, -1, -1, -1, 909, -1, -1, -1, -1,
6140  -1, -1, 916, -1, -1, -1, 920, 921, 922, -1,
6141  -1, -1, -1, 927, 928, -1, -1, 931, -1, 138,
6142  139, 140, 141, 142, 143, 144, 145, 146, 147, 943,
6143  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6144  -1, -1, -1, -1, -1, -1, -1, 961, 962, 963,
6145  -1, 965, 966, -1, 968, -1, -1, -1, -1, -1,
6146  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6147  -1, -1, -1, -1, 988, 989, -1, -1, 992, -1,
6148  -1, -1, 996, 997, -1, -1, -1, -1, -1, -1,
6149  -1, -1, -1, -1, -1, -1, -1, 1011, -1, -1,
6150  -1, -1, -1, -1, 0, 1, -1, 3, 4, 5,
6151  6, 7, -1, 1027, -1, 11, 12, -1, -1, -1,
6152  16, 1035, 18, 19, 20, 21, 22, 23, 24, -1,
6153  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6154  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6155  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6156  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6157  -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6158  76, 77, 87, 88, -1, -1, -1, -1, -1, -1,
6159  95, 96, -1, -1, -1, 91, 92, 1111, -1, -1,
6160  -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6161  106, -1, 108, -1, -1, 111, 112, 113, 114, 115,
6162  116, 117, 118, 119, -1, 121, -1, -1, -1, -1,
6163  -1, -1, -1, 138, 139, 140, 141, 142, 143, 144,
6164  145, 146, 147, -1, -1, -1, -1, -1, -1, -1,
6165  -1, -1, 148, 149, 150, -1, -1, 0, 1, 155,
6166  3, 4, 5, 6, 7, 161, -1, -1, 11, 12,
6167  -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6168  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6169  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6170  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6171  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6172  63, 64, 65, -1, 1238, -1, 78, 79, 80, 81,
6173  82, 83, 84, 76, 77, 87, 88, -1, -1, -1,
6174  -1, -1, -1, 95, 96, -1, -1, -1, 91, 92,
6175  -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6176  103, -1, 105, 106, -1, 108, -1, -1, 111, 112,
6177  113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
6178  -1, -1, -1, -1, -1, -1, 138, 139, 140, 141,
6179  142, 143, 144, 145, 146, 147, -1, -1, -1, -1,
6180  -1, -1, -1, -1, -1, 148, 149, 150, -1, -1,
6181  0, 1, 155, 3, 4, 5, 6, 7, 161, -1,
6182  -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6183  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6184  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6185  -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6186  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6187  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6188  -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6189  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6190  -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6191  -1, -1, 102, 103, -1, 105, 106, -1, 108, -1,
6192  -1, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6193  -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
6194  -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
6195  -1, -1, 13, 14, 15, -1, 17, -1, 148, 149,
6196  150, -1, -1, 153, 25, 26, 27, 28, 29, -1,
6197  -1, 161, -1, -1, -1, -1, 37, 38, -1, 40,
6198  41, 42, 43, 44, -1, -1, -1, 78, 79, 80,
6199  81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6200  -1, -1, -1, -1, 95, 96, -1, 68, 69, -1,
6201  -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6202  81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6203  -1, -1, -1, -1, 95, 96, 97, 98, -1, 100,
6204  101, -1, -1, -1, -1, 136, 107, 138, 139, 140,
6205  141, 142, 143, 144, 145, 146, 147, -1, -1, -1,
6206  121, -1, -1, 124, 155, -1, -1, -1, -1, -1,
6207  -1, -1, -1, -1, 135, 136, 137, 138, 139, 140,
6208  141, 142, 143, 144, 145, 146, 147, -1, -1, -1,
6209  -1, 152, 153, 154, 155, 156, 0, -1, 159, 160,
6210  161, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6211  14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6212  -1, 25, -1, 27, 28, 29, -1, -1, -1, -1,
6213  -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6214  44, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6215  84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6216  -1, 95, 96, -1, 68, 69, -1, -1, -1, -1,
6217  -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6218  84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6219  -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6220  -1, -1, 136, 107, 138, 139, 140, 141, 142, 143,
6221  144, 145, 146, 147, -1, -1, -1, 121, -1, -1,
6222  124, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6223  -1, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6224  144, 145, 146, 147, -1, -1, -1, -1, -1, 153,
6225  154, 155, 156, 0, -1, 159, 160, 161, -1, -1,
6226  -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6227  17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6228  27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
6229  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6230  -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6231  87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6232  -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6233  -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6234  87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6235  97, 98, -1, -1, 101, -1, -1, -1, -1, -1,
6236  107, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6237  147, -1, -1, -1, 121, -1, -1, 124, -1, -1,
6238  -1, -1, -1, -1, -1, -1, -1, -1, -1, 136,
6239  137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6240  147, -1, -1, -1, -1, 152, 153, 154, 155, 156,
6241  0, -1, 159, 160, 161, -1, -1, -1, 8, 9,
6242  10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6243  -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6244  -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6245  40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6246  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6247  -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6248  -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6249  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6250  90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6251  -1, 101, -1, -1, -1, -1, -1, 107, -1, -1,
6252  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6253  -1, 121, -1, -1, 124, -1, -1, -1, -1, -1,
6254  -1, -1, -1, -1, -1, -1, 136, 137, 138, 139,
6255  140, 141, 142, 143, 144, 145, 146, 147, -1, -1,
6256  -1, -1, 152, 153, 154, 155, 156, 0, -1, 159,
6257  160, 161, -1, -1, -1, 8, 9, 10, -1, -1,
6258  13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6259  -1, -1, 25, 26, 27, 28, -1, -1, -1, -1,
6260  -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6261  43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6262  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6263  -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6264  -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6265  83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6266  -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6267  -1, -1, -1, -1, 107, -1, -1, -1, -1, -1,
6268  -1, -1, -1, -1, -1, -1, -1, -1, 121, -1,
6269  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6270  -1, -1, -1, 136, -1, 138, 139, 140, 141, 142,
6271  143, 144, 145, 146, 147, -1, -1, -1, -1, 152,
6272  153, 154, 155, 156, 0, 158, 159, 160, 161, -1,
6273  -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6274  -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6275  -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6276  -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6277  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6278  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6279  -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6280  -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6281  86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6282  96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6283  -1, 107, -1, -1, -1, -1, -1, -1, -1, -1,
6284  -1, -1, -1, -1, -1, 121, -1, -1, 124, -1,
6285  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6286  136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6287  146, 147, -1, -1, -1, -1, -1, 153, 154, 155,
6288  156, 0, -1, 159, 160, 161, -1, -1, -1, 8,
6289  9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6290  -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
6291  -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6292  -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6293  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6294  -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6295  69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6296  79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6297  89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6298  -1, -1, 101, -1, -1, -1, -1, -1, 107, -1,
6299  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6300  -1, -1, 121, -1, -1, -1, -1, -1, -1, -1,
6301  -1, -1, -1, -1, -1, -1, -1, 136, -1, 138,
6302  139, 140, 141, 142, 143, 144, 145, 146, 147, -1,
6303  -1, -1, -1, 152, 153, 154, 155, 156, 0, 158,
6304  159, 160, 161, -1, -1, -1, 8, 9, 10, -1,
6305  -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6306  -1, -1, -1, 25, -1, 27, 28, -1, -1, -1,
6307  -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6308  42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6309  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6310  -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6311  -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6312  82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6313  -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6314  -1, -1, -1, -1, -1, 107, -1, -1, -1, -1,
6315  -1, -1, -1, -1, -1, -1, -1, -1, -1, 121,
6316  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6317  -1, -1, -1, 135, 136, -1, 138, 139, 140, 141,
6318  142, 143, 144, 145, 146, 147, -1, -1, -1, -1,
6319  152, 153, 154, 155, 156, 0, -1, 159, 160, 161,
6320  -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6321  15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6322  25, -1, 27, 28, -1, -1, -1, -1, -1, -1,
6323  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6324  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6325  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6326  -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6327  -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6328  85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6329  95, 96, 97, 98, -1, -1, 101, -1, -1, -1,
6330  -1, -1, 107, -1, -1, -1, -1, -1, -1, -1,
6331  -1, -1, -1, -1, -1, -1, 121, -1, -1, -1,
6332  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6333  -1, 136, -1, 138, 139, 140, 141, 142, 143, 144,
6334  145, 146, 147, -1, -1, -1, -1, -1, 153, 154,
6335  155, 156, 0, 158, 159, 160, 161, -1, -1, -1,
6336  8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6337  -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
6338  -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6339  38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6340  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6341  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6342  68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6343  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6344  88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6345  98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6346  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6347  -1, -1, -1, 121, -1, -1, -1, -1, -1, -1,
6348  -1, -1, -1, -1, -1, -1, -1, 135, 136, -1,
6349  138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
6350  -1, -1, -1, -1, 152, 153, 154, 155, 156, 0,
6351  -1, 159, -1, 161, -1, -1, -1, 8, 9, 10,
6352  -1, -1, -1, 14, 15, -1, 17, -1, -1, -1,
6353  -1, -1, -1, -1, 25, 26, -1, -1, -1, -1,
6354  -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6355  41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6356  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6357  -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6358  -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6359  81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6360  -1, -1, -1, -1, 95, 96, 97, 98, -1, 100,
6361  101, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6362  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6363  121, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6364  -1, -1, -1, -1, 135, 136, -1, 138, 139, 140,
6365  141, 142, 143, 144, 145, 146, 147, -1, -1, -1,
6366  -1, 152, 153, 154, 155, 156, 0, -1, 159, -1,
6367  161, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6368  14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6369  -1, 25, -1, -1, -1, -1, -1, -1, -1, -1,
6370  -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6371  44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6372  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6373  -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6374  -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6375  84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6376  -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6377  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6378  -1, -1, -1, -1, -1, -1, -1, 121, -1, -1,
6379  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6380  -1, 135, 136, -1, 138, 139, 140, 141, 142, 143,
6381  144, 145, 146, 147, -1, -1, -1, -1, 152, 153,
6382  154, 155, 156, 0, -1, 159, -1, 161, -1, -1,
6383  -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
6384  17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6385  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6386  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6387  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6388  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6389  -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6390  -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6391  87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6392  97, 98, -1, 100, 101, -1, -1, -1, -1, -1,
6393  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6394  -1, -1, -1, -1, 121, -1, -1, -1, -1, -1,
6395  -1, -1, -1, -1, -1, -1, -1, -1, 135, 136,
6396  -1, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6397  147, -1, -1, -1, -1, 152, 153, 154, 155, 156,
6398  -1, -1, 159, 1, 161, 3, 4, 5, 6, 7,
6399  8, 9, 10, 11, 12, -1, -1, 15, 16, -1,
6400  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6401  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6402  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6403  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6404  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6405  68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6406  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6407  -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6408  -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
6409  108, -1, -1, 111, 112, 113, 114, 115, 116, 117,
6410  118, 119, -1, -1, -1, -1, -1, -1, -1, -1,
6411  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6412  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6413  148, 149, 150, -1, -1, -1, 1, 155, 3, 4,
6414  5, 6, 7, 161, -1, 10, 11, 12, -1, 14,
6415  15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6416  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6417  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6418  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6419  55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6420  65, -1, -1, 68, -1, -1, -1, -1, -1, -1,
6421  -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6422  -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6423  -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6424  105, 106, -1, 108, -1, -1, 111, 112, 113, 114,
6425  115, 116, 117, 118, 119, -1, -1, -1, -1, -1,
6426  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6427  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6428  -1, -1, -1, 148, 149, 150, -1, -1, -1, 1,
6429  155, 3, 4, 5, 6, 7, 161, -1, 10, 11,
6430  12, -1, -1, 15, 16, 17, 18, 19, 20, 21,
6431  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6432  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6433  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6434  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6435  62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6436  -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6437  -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6438  92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6439  102, 103, -1, 105, 106, -1, 108, -1, -1, 111,
6440  112, 113, 114, 115, 116, 117, 118, 119, -1, -1,
6441  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6442  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6443  -1, -1, -1, -1, -1, -1, 148, 149, 150, -1,
6444  -1, -1, 1, 155, 3, 4, 5, 6, 7, 161,
6445  -1, 10, 11, 12, -1, -1, 15, 16, -1, 18,
6446  19, 20, 21, 22, 23, 24, 25, -1, -1, -1,
6447  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6448  39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6449  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6450  59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6451  -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6452  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6453  -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6454  99, -1, -1, 102, 103, -1, 105, 106, -1, 108,
6455  -1, -1, 111, 112, 113, 114, 115, 116, 117, 118,
6456  119, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6457  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6458  -1, -1, -1, -1, -1, -1, -1, -1, -1, 148,
6459  149, 150, -1, -1, -1, 1, 155, 3, 4, 5,
6460  6, 7, 161, -1, 10, 11, 12, -1, -1, 15,
6461  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6462  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6463  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6464  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6465  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6466  -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6467  76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6468  -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6469  -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6470  106, -1, 108, -1, -1, 111, 112, 113, 114, 115,
6471  116, 117, 118, 119, -1, -1, -1, -1, -1, -1,
6472  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6473  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6474  -1, -1, 148, 149, 150, -1, -1, -1, 1, 155,
6475  3, 4, 5, 6, 7, 161, 9, 10, 11, 12,
6476  -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6477  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6478  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6479  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6480  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6481  63, 64, 65, -1, -1, 68, -1, -1, -1, -1,
6482  -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6483  -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6484  -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6485  103, -1, 105, 106, -1, 108, -1, -1, 111, 112,
6486  113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
6487  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6488  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6489  -1, -1, -1, -1, -1, 148, 149, 150, -1, -1,
6490  -1, 1, 155, 3, 4, 5, 6, 7, 161, -1,
6491  10, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6492  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6493  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6494  -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6495  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6496  60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6497  -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6498  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6499  -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6500  -1, -1, 102, 103, -1, 105, 106, -1, 108, -1,
6501  -1, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6502  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6503  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6504  -1, -1, -1, -1, -1, -1, -1, -1, 148, 149,
6505  150, -1, -1, -1, 1, 155, 3, 4, 5, 6,
6506  7, 161, -1, -1, 11, 12, -1, -1, -1, 16,
6507  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6508  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6509  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6510  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6511  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6512  -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6513  77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6514  -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6515  -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
6516  -1, 108, -1, -1, 111, 112, 113, 114, 115, 116,
6517  117, 118, 119, -1, -1, -1, -1, -1, -1, -1,
6518  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6519  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6520  -1, 148, 149, 150, -1, -1, -1, -1, 155, -1,
6521  -1, -1, 159, 1, 161, 3, 4, 5, 6, 7,
6522  -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6523  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6524  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6525  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6526  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6527  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6528  -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6529  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6530  -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6531  -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
6532  108, -1, -1, 111, 112, 113, 114, 115, 116, 117,
6533  118, 119, -1, -1, -1, -1, -1, -1, -1, -1,
6534  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6535  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6536  148, 149, 150, -1, -1, -1, -1, 155, -1, -1,
6537  -1, 159, 1, 161, 3, 4, 5, 6, 7, -1,
6538  -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6539  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6540  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6541  39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6542  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6543  59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6544  -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6545  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6546  -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6547  99, -1, -1, 102, 103, -1, 105, 106, -1, 108,
6548  -1, -1, 111, 112, 113, 114, 115, 116, 117, 118,
6549  119, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6550  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6551  -1, -1, -1, -1, -1, -1, -1, -1, -1, 148,
6552  149, 150, -1, -1, 153, 1, 155, 3, 4, 5,
6553  6, 7, 161, -1, -1, 11, 12, -1, -1, -1,
6554  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6555  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6556  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6557  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6558  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6559  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6560  76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6561  -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6562  -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6563  106, -1, 108, -1, -1, 111, 112, 113, 114, 115,
6564  116, 117, 118, 119, -1, -1, -1, -1, -1, -1,
6565  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6566  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6567  -1, -1, 148, 149, 150, -1, -1, 153, 1, 155,
6568  3, 4, 5, -1, 7, 161, -1, -1, 11, 12,
6569  -1, -1, -1, 16, 17, 18, 19, 20, 21, 22,
6570  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6571  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6572  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
6573  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6574  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6575  -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6576  -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6577  -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6578  103, -1, 105, 106, -1, -1, -1, -1, 111, 112,
6579  113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
6580  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6581  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6582  -1, -1, -1, -1, -1, 148, 149, 150, -1, -1,
6583  -1, -1, 155, -1, -1, -1, -1, -1, 161, 3,
6584  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6585  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6586  24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6587  34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6588  -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6589  54, 55, 56, 57, -1, -1, -1, -1, -1, -1,
6590  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6591  -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6592  84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6593  94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6594  -1, -1, -1, -1, 108, 109, -1, -1, -1, -1,
6595  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6596  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6597  -1, -1, -1, -1, 138, 139, 140, 141, 142, 143,
6598  144, 145, 146, 147, -1, 149, 150, -1, -1, -1,
6599  -1, -1, -1, 157, 158, 3, 4, 5, 6, 7,
6600  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
6601  18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
6602  -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
6603  38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6604  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6605  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6606  -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6607  78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6608  88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6609  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6610  108, 109, -1, -1, -1, -1, -1, -1, -1, -1,
6611  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6612  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6613  138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
6614  -1, 149, 150, -1, -1, -1, -1, -1, -1, 157,
6615  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
6616  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
6617  23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
6618  33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
6619  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6620  53, 54, -1, 56, -1, -1, -1, -1, -1, -1,
6621  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6622  -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
6623  83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
6624  93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
6625  -1, -1, -1, -1, -1, 108, 109, -1, -1, 112,
6626  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6627  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6628  -1, -1, -1, -1, -1, 138, 139, 140, 141, 142,
6629  143, 144, 145, 146, 147, -1, 149, 150, -1, -1,
6630  -1, -1, -1, -1, 157, 3, 4, 5, 6, 7,
6631  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
6632  18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
6633  -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
6634  38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6635  48, 49, 50, 51, 52, 53, -1, -1, 56, -1,
6636  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6637  -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6638  78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6639  88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6640  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6641  108, 109, -1, -1, 112, -1, -1, -1, -1, -1,
6642  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6643  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6644  138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
6645  -1, 149, 150, -1, -1, -1, -1, -1, -1, 157,
6646  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
6647  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
6648  23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
6649  33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
6650  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6651  53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
6652  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6653  -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
6654  83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
6655  93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
6656  -1, -1, -1, -1, -1, 108, 109, -1, -1, -1,
6657  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6658  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6659  -1, -1, -1, -1, -1, 138, 139, 140, 141, 142,
6660  143, 144, 145, 146, 147, -1, 149, 150, 3, 4,
6661  5, -1, 7, -1, 157, -1, 11, 12, -1, -1,
6662  -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6663  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6664  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6665  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6666  55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6667  65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6668  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6669  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6670  -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6671  105, 106, -1, -1, -1, -1, 111, 112, 113, 114,
6672  115, 116, 117, 118, 119, -1, -1, 3, 4, 5,
6673  -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6674  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6675  -1, -1, -1, 148, 30, 31, 32, 33, 34, 35,
6676  36, 156, -1, 39, -1, -1, -1, -1, -1, -1,
6677  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6678  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6679  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6680  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6681  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6682  -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6683  106, -1, -1, -1, -1, 111, 112, 113, 114, 115,
6684  116, 117, 118, 119, -1, -1, 3, 4, 5, -1,
6685  7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6686  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6687  -1, -1, 148, 30, 31, 32, 33, 34, 35, 36,
6688  156, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6689  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6690  57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
6691  -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6692  77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6693  -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6694  -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
6695  -1, 108, 109, 110, 111, 112, 113, 114, 115, 116,
6696  117, 118, 119, -1, -1, -1, -1, -1, -1, -1,
6697  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6698  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
6699  7, 148, 149, 150, 11, 12, -1, -1, 155, 16,
6700  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6701  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6702  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6703  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6704  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6705  -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6706  77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6707  -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6708  -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
6709  -1, -1, -1, -1, 111, 112, 113, 114, 115, 116,
6710  117, 118, 119, -1, -1, -1, -1, -1, -1, -1,
6711  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6712  -1, -1, -1, -1, 1, -1, 3, 4, 5, 6,
6713  7, 148, 149, 150, 11, 12, -1, -1, 155, 16,
6714  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6715  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6716  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6717  -1, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6718  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6719  -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6720  77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6721  -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6722  -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
6723  -1, 108, -1, -1, 111, 112, 113, 114, 115, 116,
6724  117, 118, 119, -1, -1, 1, -1, 3, 4, 5,
6725  -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6726  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6727  -1, 148, 149, 150, 30, 31, 32, 33, 34, 35,
6728  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6729  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6730  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6731  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6732  76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6733  -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6734  -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6735  106, -1, -1, -1, -1, 111, 112, 113, 114, 115,
6736  116, 117, 118, 119, -1, -1, -1, -1, 3, 4,
6737  5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
6738  -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6739  -1, -1, 148, 149, 150, 30, 31, 32, 33, 34,
6740  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6741  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6742  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
6743  65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6744  -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6745  -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6746  -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6747  105, 106, -1, 108, 109, 110, 111, 112, 113, 114,
6748  115, 116, 117, 118, 119, -1, -1, -1, -1, 3,
6749  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6750  -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6751  24, -1, -1, 148, 149, 150, 30, 31, 32, 33,
6752  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6753  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6754  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6755  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6756  -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6757  -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6758  -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6759  -1, 105, 106, -1, 108, 109, 110, 111, 112, 113,
6760  114, 115, 116, 117, 118, 119, -1, -1, -1, -1,
6761  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
6762  -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6763  23, 24, -1, -1, 148, 149, 150, 30, 31, 32,
6764  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6765  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
6766  53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
6767  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6768  -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6769  -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6770  -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6771  103, -1, 105, 106, -1, 108, 109, 110, 111, 112,
6772  113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
6773  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6774  12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6775  22, 23, 24, -1, -1, 148, 149, 150, 30, 31,
6776  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6777  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6778  52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
6779  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6780  -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6781  -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6782  92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6783  102, 103, -1, 105, 106, -1, 108, 109, 110, 111,
6784  112, 113, 114, 115, 116, 117, 118, 119, -1, -1,
6785  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6786  11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6787  21, 22, 23, 24, -1, -1, 148, 149, 150, 30,
6788  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6789  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6790  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6791  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6792  -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6793  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6794  91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6795  -1, 102, 103, -1, 105, 106, -1, 108, 109, -1,
6796  111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
6797  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
6798  -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6799  20, 21, 22, 23, 24, -1, -1, 148, 149, 150,
6800  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6801  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6802  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
6803  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6804  -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6805  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6806  -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6807  -1, -1, 102, 103, -1, 105, 106, -1, -1, 109,
6808  110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6809  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
6810  -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6811  19, 20, 21, 22, 23, 24, -1, -1, 148, 149,
6812  150, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6813  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
6814  49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
6815  59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6816  -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6817  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6818  -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6819  99, -1, -1, 102, 103, -1, 105, 106, -1, -1,
6820  109, -1, 111, 112, 113, 114, 115, 116, 117, 118,
6821  119, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6822  -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6823  18, 19, 20, 21, 22, 23, 24, -1, -1, 148,
6824  149, 150, 30, 31, 32, 33, 34, 35, 36, -1,
6825  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6826  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6827  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6828  -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6829  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6830  -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6831  -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
6832  108, -1, -1, 111, 112, 113, 114, 115, 116, 117,
6833  118, 119, -1, -1, -1, -1, 3, 4, 5, -1,
6834  7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6835  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6836  148, 149, 150, 30, 31, 32, 33, 34, 35, 36,
6837  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6838  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6839  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6840  -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6841  77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6842  -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6843  -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
6844  -1, 108, -1, -1, 111, 112, 113, 114, 115, 116,
6845  117, 118, 119, -1, -1, -1, -1, 3, 4, 5,
6846  -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6847  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6848  -1, 148, 149, 150, 30, 31, 32, 33, 34, 35,
6849  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6850  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6851  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6852  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6853  76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6854  -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6855  -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6856  106, -1, 108, -1, -1, 111, 112, 113, 114, 115,
6857  116, 117, 118, 119, -1, -1, -1, -1, 3, 4,
6858  5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
6859  -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6860  -1, -1, 148, 149, 150, 30, 31, 32, 33, 34,
6861  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6862  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6863  55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6864  65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6865  -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6866  -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6867  -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6868  105, 106, -1, 108, -1, -1, 111, 112, 113, 114,
6869  115, 116, 117, 118, 119, -1, -1, -1, -1, 3,
6870  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6871  -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6872  24, -1, -1, 148, 149, 150, 30, 31, 32, 33,
6873  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6874  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6875  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6876  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6877  -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6878  -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6879  -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6880  -1, 105, 106, -1, 108, -1, -1, 111, 112, 113,
6881  114, 115, 116, 117, 118, 119, -1, -1, -1, -1,
6882  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
6883  -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6884  23, 24, -1, -1, 148, 149, 150, 30, 31, 32,
6885  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6886  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
6887  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6888  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6889  -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6890  -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6891  -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6892  103, -1, 105, 106, -1, -1, -1, -1, 111, 112,
6893  113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
6894  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6895  12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6896  22, 23, 24, -1, -1, 148, 149, 150, 30, 31,
6897  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6898  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6899  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6900  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6901  -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6902  -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6903  92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6904  102, 103, -1, 105, 106, -1, -1, -1, -1, 111,
6905  112, 113, 114, 115, 116, 117, 118, 119, -1, -1,
6906  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6907  11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6908  21, 22, 23, 24, -1, -1, 148, 149, 150, 30,
6909  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6910  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6911  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6912  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6913  -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6914  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6915  91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6916  -1, 102, 103, -1, 105, 106, -1, -1, -1, -1,
6917  111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
6918  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
6919  -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6920  20, 21, 22, 23, 24, -1, -1, 148, 149, 150,
6921  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6922  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6923  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6924  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6925  -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6926  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6927  -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6928  -1, -1, 102, 103, -1, 105, 106, -1, -1, -1,
6929  -1, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6930  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
6931  -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6932  19, 20, 21, 22, 23, 24, -1, -1, 148, 149,
6933  150, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6934  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
6935  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6936  59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6937  -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6938  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6939  -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6940  99, -1, -1, 102, 103, -1, 105, 106, -1, -1,
6941  -1, -1, 111, 112, 113, 114, 115, 116, 117, 118,
6942  119, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6943  -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6944  18, 19, 20, 21, 22, 23, 24, -1, -1, 148,
6945  149, 150, 30, 31, 32, 33, 34, 35, 36, -1,
6946  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6947  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6948  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6949  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6950  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6951  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6952  -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
6953  108, -1, -1, 111, 112, 113, 114, 115, 116, 117,
6954  118, 119, -1, -1, 3, 4, 5, -1, 7, -1,
6955  -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6956  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6957  148, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6958  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
6959  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6960  59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6961  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6962  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6963  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6964  99, -1, -1, 102, 103, -1, 105, 106, -1, 108,
6965  -1, -1, 111, 112, 113, 114, 115, 116, 117, 118,
6966  119, -1, -1, 3, 4, 5, -1, 7, -1, -1,
6967  -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6968  20, 21, 22, 23, 24, -1, -1, -1, -1, 148,
6969  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6970  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6971  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6972  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6973  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6974  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6975  -1, -1, -1, -1, -1, 95, -1, -1, -1, 99,
6976  -1, -1, 102, 103, -1, 105, 106, -1, -1, -1,
6977  -1, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6978  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6979  11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6980  21, 22, 23, 24, -1, -1, -1, -1, 148, 30,
6981  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6982  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6983  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6984  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6985  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6986  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6987  -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
6988  -1, 102, 103, -1, 105, 106, -1, -1, -1, -1,
6989  111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
6990  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6991  12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6992  22, 23, 24, -1, -1, -1, -1, 148, 30, 31,
6993  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6994  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6995  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6996  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6997  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6998  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6999  -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7000  102, 103, -1, 105, 106, -1, -1, -1, -1, 111,
7001  112, 113, 114, 115, 116, 117, 118, 119, -1, -1,
7002  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7003  -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7004  23, 24, -1, -1, -1, -1, 148, 30, 31, 32,
7005  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7006  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7007  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7008  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7009  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7010  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7011  -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7012  103, -1, 105, 106, -1, -1, -1, -1, 111, 112,
7013  113, 114, 115, 116, 117, 118, 119, -1, -1, 3,
7014  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7015  -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7016  24, -1, -1, -1, -1, 148, 30, 31, 32, 33,
7017  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7018  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7019  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7020  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7021  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7022  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7023  -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7024  -1, 105, 106, 33, 34, 35, 36, 111, 112, 113,
7025  114, 115, 116, 117, 118, 119, -1, -1, -1, 49,
7026  50, 51, 52, -1, -1, -1, 56, -1, 58, 59,
7027  60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
7028  -1, -1, -1, -1, 148, -1, -1, -1, 78, -1,
7029  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7030  -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
7031  -1, -1, 102, -1, -1, 105, 106, -1, 108, 109,
7032  -1, 111, 112, 113, 114, 115, 116, 117, 118, 119,
7033  -1, -1, -1, -1, -1, -1, 33, 34, 35, 36,
7034  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7035  -1, 141, 49, 50, 51, 52, -1, -1, 148, 56,
7036  -1, -1, 59, 60, 61, 62, 63, -1, -1, -1,
7037  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7038  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7039  -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7040  -1, -1, 99, -1, -1, 102, -1, -1, 105, 106,
7041  -1, 108, -1, -1, 111, 112, 113, 114, 115, 116,
7042  117, 118, 119, -1, -1, -1, -1, -1, -1, 33,
7043  34, 35, 36, -1, -1, -1, 52, 53, -1, -1,
7044  56, -1, -1, -1, 141, 49, 50, 51, 52, -1,
7045  -1, 148, 56, -1, -1, 59, 60, 61, 62, 63,
7046  76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7047  -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7048  96, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7049  -1, -1, 108, 109, -1, 99, -1, -1, 102, -1,
7050  -1, 105, 106, -1, -1, -1, -1, 111, 112, 113,
7051  114, 115, 116, 117, 118, 119, -1, -1, -1, -1,
7052  -1, -1, 138, 139, 140, 141, 142, 143, 144, 145,
7053  146, 147, -1, 149, 150, 52, 53, 141, -1, 56,
7054  -1, 157, 158, -1, 148, -1, -1, -1, -1, -1,
7055  -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7056  77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7057  87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7058  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7059  -1, 108, 109, -1, -1, -1, -1, -1, -1, -1,
7060  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7061  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7062  -1, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7063  147, -1, 149, 150, 52, 53, -1, -1, 56, -1,
7064  157, 158, -1, -1, -1, -1, -1, -1, -1, -1,
7065  -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7066  78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7067  88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7068  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7069  108, 109, -1, -1, -1, -1, -1, -1, -1, -1,
7070  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7071  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7072  138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
7073  -1, 149, 150, 52, 53, -1, -1, 56, -1, 157,
7074  158, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7075  -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7076  79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7077  -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7078  -1, -1, -1, -1, -1, -1, -1, -1, -1, 108,
7079  109, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7080  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7081  -1, -1, -1, -1, -1, -1, -1, -1, -1, 138,
7082  139, 140, 141, 142, 143, 144, 145, 146, 147, -1,
7083  149, 150, 52, 53, -1, -1, 56, -1, 157, 158,
7084  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7085  -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7086  80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7087  -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7088  -1, -1, -1, -1, -1, -1, -1, -1, 108, 109,
7089  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7090  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7091  -1, -1, -1, -1, -1, -1, -1, -1, 138, 139,
7092  140, 141, 142, 143, 144, 145, 146, 147, -1, 149,
7093  150, 52, 53, -1, -1, 56, -1, 157, 158, -1,
7094  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7095  -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7096  81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7097  -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7098  -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
7099  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7100  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7101  -1, -1, -1, -1, -1, -1, -1, 138, 139, 140,
7102  141, 142, 143, 144, 145, 146, 147, -1, 149, 150,
7103  52, 53, -1, -1, 56, -1, 157, 158, -1, -1,
7104  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7105  -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7106  82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7107  -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7108  -1, -1, -1, -1, -1, -1, 108, 109, -1, -1,
7109  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7110  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7111  -1, -1, -1, -1, -1, -1, 138, 139, 140, 141,
7112  142, 143, 144, 145, 146, 147, -1, 149, 150, 52,
7113  53, -1, -1, 56, -1, 157, 158, -1, -1, -1,
7114  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7115  -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7116  83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7117  93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7118  -1, -1, -1, -1, -1, 108, 109, -1, -1, -1,
7119  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7120  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7121  -1, -1, -1, -1, -1, 138, 139, 140, 141, 142,
7122  143, 144, 145, 146, 147, -1, 149, 150, 52, 53,
7123  -1, -1, 56, -1, 157, 158, -1, -1, -1, -1,
7124  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7125  -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7126  84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7127  94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7128  -1, -1, -1, -1, 108, 109, -1, -1, -1, -1,
7129  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7130  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7131  -1, -1, -1, -1, 138, 139, 140, 141, 142, 143,
7132  144, 145, 146, 147, -1, 149, 150, 52, 53, -1,
7133  -1, 56, -1, 157, 158, -1, -1, -1, -1, -1,
7134  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7135  -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7136  -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7137  95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7138  -1, -1, -1, 108, 109, -1, -1, -1, -1, -1,
7139  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7140  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7141  -1, -1, -1, 138, 139, 140, 141, 142, 143, 144,
7142  145, 146, 147, -1, 149, 150, 52, 53, -1, -1,
7143  56, -1, 157, 158, -1, -1, -1, -1, -1, -1,
7144  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7145  76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7146  -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7147  96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7148  -1, -1, 108, 109, -1, -1, -1, -1, -1, -1,
7149  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7150  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7151  -1, -1, 138, 139, 140, 141, 142, 143, 144, 145,
7152  146, 147, -1, 149, 150, 52, 53, -1, -1, 56,
7153  -1, 157, 158, -1, -1, -1, -1, -1, -1, -1,
7154  -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7155  77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7156  87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7157  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7158  -1, 108, 109, -1, -1, -1, -1, -1, -1, -1,
7159  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7160  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7161  -1, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7162  147, -1, 149, 150, 52, 53, -1, -1, 56, -1,
7163  157, 158, -1, -1, -1, -1, -1, -1, -1, -1,
7164  -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7165  78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7166  88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7167  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7168  108, 109, -1, -1, -1, -1, -1, -1, -1, -1,
7169  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7170  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7171  138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
7172  -1, 149, 150, 52, 53, -1, -1, 56, -1, 157,
7173  158, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7174  -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7175  79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7176  -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7177  -1, -1, -1, -1, -1, -1, -1, -1, -1, 108,
7178  109, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7179  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7180  -1, -1, -1, -1, -1, -1, -1, -1, -1, 138,
7181  139, 140, 141, 142, 143, 144, 145, 146, 147, -1,
7182  149, 150, 52, 53, -1, -1, 56, -1, 157, 158,
7183  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7184  -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7185  80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7186  -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7187  -1, -1, -1, -1, -1, -1, -1, -1, 108, 109,
7188  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7189  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7190  -1, -1, -1, -1, -1, -1, -1, -1, 138, 139,
7191  140, 141, 142, 143, 144, 145, 146, 147, -1, 149,
7192  150, 52, 53, -1, -1, 56, -1, 157, 158, -1,
7193  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7194  -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7195  81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7196  -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7197  -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
7198  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7199  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7200  -1, -1, -1, -1, -1, -1, -1, 138, 139, 140,
7201  141, 142, 143, 144, 145, 146, 147, -1, 149, 150,
7202  -1, -1, -1, -1, -1, -1, 157
7203 };
7204 
7205 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7206  state STATE-NUM. */
7207 static const yytype_int16 yystos[] =
7208 {
7209  0, 164, 165, 1, 3, 4, 5, 6, 7, 11,
7210  12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7211  31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7212  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7213  59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7214  92, 99, 102, 103, 105, 106, 108, 111, 112, 113,
7215  114, 115, 116, 117, 118, 119, 148, 149, 150, 167,
7216  168, 169, 181, 183, 184, 188, 192, 194, 199, 200,
7217  202, 203, 204, 206, 207, 208, 210, 211, 220, 223,
7218  242, 252, 253, 254, 255, 256, 257, 258, 259, 260,
7219  261, 262, 271, 272, 302, 307, 308, 356, 357, 358,
7220  359, 360, 361, 363, 364, 367, 368, 370, 371, 372,
7221  373, 386, 387, 389, 390, 391, 392, 393, 394, 395,
7222  396, 397, 432, 444, 0, 3, 4, 5, 6, 7,
7223  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
7224  18, 19, 20, 21, 22, 23, 24, 25, 26, 30,
7225  31, 32, 33, 34, 35, 36, 37, 38, 39, 45,
7226  46, 47, 48, 49, 50, 51, 52, 53, 56, 76,
7227  77, 78, 79, 80, 81, 82, 83, 84, 87, 88,
7228  93, 94, 95, 96, 108, 109, 138, 139, 140, 141,
7229  142, 143, 144, 145, 146, 147, 149, 150, 157, 214,
7230  215, 216, 218, 219, 386, 180, 180, 180, 39, 58,
7231  99, 102, 108, 109, 110, 113, 149, 192, 194, 203,
7232  211, 220, 227, 233, 236, 238, 239, 252, 393, 394,
7233  396, 397, 430, 431, 233, 158, 230, 234, 235, 155,
7234  158, 186, 54, 215, 186, 152, 170, 171, 224, 444,
7235  21, 22, 32, 202, 220, 252, 271, 272, 220, 220,
7236  220, 56, 47, 102, 176, 177, 178, 183, 205, 206,
7237  444, 176, 228, 238, 430, 444, 227, 429, 430, 444,
7238  46, 99, 148, 156, 192, 194, 210, 242, 252, 393,
7239  394, 397, 300, 214, 376, 388, 392, 376, 377, 378,
7240  162, 362, 362, 362, 362, 391, 199, 220, 220, 155,
7241  161, 166, 442, 443, 180, 40, 41, 42, 43, 44,
7242  37, 38, 158, 400, 401, 402, 403, 444, 400, 402,
7243  26, 152, 230, 235, 263, 309, 28, 264, 306, 135,
7244  156, 102, 108, 207, 135, 25, 78, 79, 80, 81,
7245  82, 83, 84, 85, 86, 87, 88, 89, 90, 95,
7246  96, 101, 136, 138, 139, 140, 141, 142, 143, 144,
7247  145, 146, 147, 222, 222, 69, 97, 98, 154, 436,
7248  243, 1, 188, 195, 195, 196, 198, 198, 166, 195,
7249  443, 99, 204, 211, 252, 277, 393, 394, 397, 52,
7250  56, 95, 99, 212, 213, 252, 393, 394, 397, 213,
7251  33, 34, 35, 36, 49, 50, 51, 52, 56, 158,
7252  191, 214, 395, 427, 233, 158, 235, 98, 436, 437,
7253  309, 359, 100, 100, 156, 227, 56, 227, 227, 227,
7254  376, 400, 400, 135, 101, 156, 237, 444, 98, 154,
7255  436, 100, 100, 156, 237, 92, 232, 233, 238, 410,
7256  430, 444, 233, 186, 188, 438, 188, 54, 64, 65,
7257  182, 158, 224, 225, 167, 98, 436, 100, 179, 205,
7258  159, 166, 443, 438, 244, 160, 156, 186, 441, 156,
7259  441, 153, 441, 186, 56, 391, 207, 209, 401, 156,
7260  98, 154, 436, 297, 66, 120, 122, 123, 379, 120,
7261  120, 379, 67, 379, 162, 365, 374, 369, 375, 78,
7262  161, 169, 152, 195, 195, 195, 195, 224, 226, 188,
7263  188, 52, 54, 55, 56, 57, 58, 78, 92, 102,
7264  108, 109, 110, 142, 145, 282, 344, 404, 405, 406,
7265  407, 409, 410, 411, 412, 413, 414, 415, 416, 417,
7266  419, 420, 421, 422, 423, 424, 425, 135, 250, 409,
7267  135, 251, 310, 311, 107, 201, 312, 313, 313, 224,
7268  205, 156, 210, 156, 224, 190, 220, 220, 220, 220,
7269  220, 220, 220, 220, 220, 220, 220, 220, 220, 189,
7270  220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7271  220, 52, 53, 56, 218, 230, 432, 433, 434, 232,
7272  238, 52, 53, 56, 218, 230, 433, 174, 176, 13,
7273  273, 442, 273, 195, 176, 176, 246, 166, 56, 98,
7274  154, 436, 25, 195, 52, 56, 212, 139, 399, 98,
7275  154, 436, 249, 428, 69, 98, 435, 233, 438, 52,
7276  56, 433, 224, 224, 217, 125, 135, 135, 224, 227,
7277  227, 236, 239, 430, 52, 56, 232, 52, 56, 224,
7278  224, 431, 438, 156, 438, 156, 159, 438, 215, 225,
7279  220, 153, 56, 433, 433, 224, 171, 438, 178, 159,
7280  430, 156, 209, 52, 56, 232, 52, 56, 298, 381,
7281  380, 120, 366, 379, 66, 120, 120, 366, 66, 120,
7282  220, 176, 183, 102, 108, 278, 279, 280, 281, 412,
7283  156, 426, 444, 156, 426, 156, 408, 438, 283, 284,
7284  156, 408, 227, 34, 52, 52, 156, 408, 52, 39,
7285  185, 203, 220, 221, 174, 442, 185, 221, 174, 297,
7286  153, 311, 297, 10, 68, 270, 270, 108, 199, 227,
7287  238, 240, 241, 438, 209, 156, 184, 187, 199, 211,
7288  220, 227, 229, 241, 252, 397, 319, 319, 186, 100,
7289  100, 152, 230, 235, 186, 439, 156, 100, 100, 230,
7290  231, 235, 444, 270, 224, 176, 13, 176, 27, 274,
7291  442, 270, 270, 17, 267, 315, 25, 245, 321, 52,
7292  56, 232, 52, 56, 198, 248, 398, 247, 52, 56,
7293  212, 232, 174, 188, 193, 438, 231, 235, 187, 220,
7294  229, 187, 229, 215, 227, 39, 237, 100, 100, 439,
7295  100, 100, 410, 430, 188, 229, 441, 207, 439, 299,
7296  382, 385, 392, 397, 362, 379, 362, 362, 362, 153,
7297  280, 412, 156, 438, 156, 425, 417, 419, 421, 405,
7298  406, 415, 423, 135, 227, 407, 414, 423, 413, 415,
7299  186, 44, 44, 270, 270, 298, 153, 298, 227, 156,
7300  44, 209, 44, 135, 44, 98, 154, 436, 317, 317,
7301  137, 224, 224, 311, 201, 160, 100, 224, 224, 201,
7302  8, 265, 352, 444, 14, 15, 268, 269, 275, 276,
7303  444, 276, 197, 108, 227, 314, 270, 319, 315, 270,
7304  439, 176, 442, 195, 174, 439, 270, 438, 191, 309,
7305  306, 186, 224, 224, 100, 224, 224, 438, 156, 438,
7306  180, 383, 438, 278, 281, 279, 426, 156, 408, 156,
7307  408, 156, 408, 156, 408, 408, 185, 221, 226, 226,
7308  299, 299, 108, 227, 226, 226, 224, 226, 52, 56,
7309  232, 52, 56, 318, 318, 220, 187, 229, 187, 229,
7310  153, 224, 187, 229, 187, 229, 227, 241, 353, 444,
7311  175, 268, 176, 195, 270, 270, 227, 156, 273, 317,
7312  270, 270, 174, 442, 270, 224, 158, 303, 409, 176,
7313  156, 156, 415, 415, 423, 415, 220, 220, 180, 180,
7314  227, 183, 183, 220, 439, 52, 56, 58, 91, 92,
7315  99, 102, 105, 106, 108, 113, 141, 302, 324, 325,
7316  326, 327, 330, 334, 335, 336, 339, 340, 341, 342,
7317  343, 344, 345, 346, 347, 348, 349, 350, 351, 356,
7318  357, 360, 361, 364, 368, 371, 373, 394, 419, 324,
7319  187, 229, 101, 354, 444, 9, 266, 355, 444, 172,
7320  273, 108, 227, 176, 318, 270, 409, 301, 0, 121,
7321  384, 279, 408, 408, 156, 408, 408, 140, 292, 293,
7322  444, 292, 347, 347, 56, 212, 318, 325, 332, 333,
7323  334, 335, 338, 439, 186, 318, 440, 52, 376, 52,
7324  102, 392, 101, 156, 140, 156, 156, 325, 89, 90,
7325  98, 154, 158, 328, 329, 52, 99, 211, 252, 393,
7326  394, 397, 273, 177, 176, 176, 227, 276, 315, 316,
7327  323, 324, 186, 294, 29, 124, 304, 415, 282, 285,
7328  286, 288, 289, 291, 294, 413, 415, 416, 418, 423,
7329  425, 176, 174, 325, 439, 325, 336, 338, 439, 156,
7330  153, 224, 125, 195, 348, 332, 336, 330, 337, 338,
7331  113, 341, 345, 347, 347, 212, 318, 439, 318, 438,
7332  332, 335, 339, 332, 335, 339, 56, 98, 154, 436,
7333  176, 166, 173, 275, 273, 40, 41, 161, 159, 305,
7334  176, 408, 426, 156, 426, 156, 290, 294, 140, 284,
7335  156, 287, 290, 99, 252, 156, 290, 438, 156, 156,
7336  331, 438, 156, 156, 376, 438, 438, 438, 439, 439,
7337  439, 52, 56, 232, 52, 56, 352, 355, 320, 195,
7338  195, 52, 295, 296, 411, 174, 153, 418, 421, 286,
7339  288, 415, 423, 140, 252, 289, 423, 56, 98, 415,
7340  337, 339, 337, 336, 338, 439, 176, 156, 186, 270,
7341  426, 156, 290, 156, 290, 156, 290, 156, 290, 52,
7342  56, 290, 156, 440, 276, 321, 322, 296, 415, 415,
7343  423, 415, 290, 290, 156, 290, 290, 415, 290
7344 };
7345 
7346 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7347 static const yytype_int16 yyr1[] =
7348 {
7349  0, 163, 164, 165, 166, 166, 167, 168, 168, 168,
7350  169, 169, 170, 171, 172, 173, 174, 175, 174, 176,
7351  177, 177, 177, 178, 179, 178, 180, 181, 182, 183,
7352  183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
7353  183, 183, 183, 183, 183, 183, 183, 184, 184, 184,
7354  184, 184, 184, 184, 184, 184, 184, 185, 185, 186,
7355  186, 185, 187, 187, 187, 188, 188, 188, 188, 188,
7356  189, 188, 190, 188, 188, 191, 192, 193, 194, 195,
7357  195, 196, 197, 198, 199, 199, 200, 200, 201, 202,
7358  203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
7359  203, 203, 204, 204, 205, 205, 206, 206, 206, 206,
7360  206, 206, 206, 206, 206, 206, 207, 207, 208, 208,
7361  209, 209, 210, 210, 210, 210, 210, 210, 210, 210,
7362  210, 211, 211, 211, 211, 211, 211, 211, 211, 211,
7363  212, 212, 213, 213, 213, 214, 214, 214, 214, 214,
7364  215, 215, 216, 217, 216, 218, 218, 218, 218, 218,
7365  218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
7366  218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
7367  218, 218, 218, 218, 218, 219, 219, 219, 219, 219,
7368  219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
7369  219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
7370  219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
7371  219, 219, 219, 219, 219, 219, 220, 220, 220, 220,
7372  220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7373  220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7374  220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7375  220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7376  220, 221, 221, 221, 222, 222, 222, 222, 223, 223,
7377  224, 225, 226, 227, 228, 228, 228, 228, 229, 229,
7378  230, 230, 230, 231, 231, 232, 232, 232, 232, 232,
7379  233, 233, 233, 233, 233, 234, 235, 236, 236, 237,
7380  237, 238, 238, 238, 238, 239, 239, 240, 240, 241,
7381  241, 241, 242, 242, 242, 242, 242, 242, 242, 242,
7382  242, 242, 242, 243, 242, 244, 242, 242, 242, 242,
7383  242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
7384  242, 242, 242, 242, 242, 242, 242, 245, 242, 246,
7385  242, 242, 242, 247, 242, 248, 242, 249, 242, 250,
7386  242, 251, 242, 242, 242, 242, 242, 252, 253, 254,
7387  255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
7388  265, 266, 267, 268, 269, 270, 270, 271, 272, 273,
7389  273, 273, 274, 274, 275, 275, 276, 276, 277, 277,
7390  278, 278, 279, 279, 280, 280, 280, 280, 280, 281,
7391  281, 282, 282, 283, 284, 285, 285, 286, 286, 286,
7392  286, 287, 288, 289, 289, 290, 290, 291, 291, 291,
7393  291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
7394  291, 291, 292, 292, 293, 293, 294, 294, 295, 295,
7395  296, 296, 297, 298, 299, 300, 301, 302, 303, 303,
7396  304, 305, 304, 306, 307, 307, 307, 307, 308, 308,
7397  308, 308, 308, 308, 308, 308, 308, 309, 309, 310,
7398  311, 312, 313, 314, 314, 314, 314, 315, 316, 316,
7399  317, 318, 319, 320, 321, 322, 322, 323, 323, 323,
7400  324, 324, 324, 324, 324, 324, 325, 326, 326, 327,
7401  327, 328, 329, 330, 330, 330, 330, 330, 330, 330,
7402  330, 330, 330, 330, 330, 330, 331, 330, 330, 330,
7403  332, 332, 332, 332, 332, 332, 333, 333, 334, 334,
7404  335, 336, 336, 337, 337, 338, 339, 339, 339, 339,
7405  340, 340, 341, 341, 342, 342, 343, 343, 344, 345,
7406  345, 346, 346, 346, 346, 346, 346, 346, 346, 346,
7407  346, 347, 347, 347, 347, 347, 347, 347, 347, 347,
7408  347, 348, 349, 349, 350, 351, 351, 351, 352, 352,
7409  353, 353, 353, 354, 354, 355, 355, 356, 356, 357,
7410  358, 358, 358, 359, 360, 361, 362, 362, 363, 364,
7411  365, 365, 366, 366, 367, 368, 369, 369, 370, 371,
7412  372, 373, 374, 374, 375, 375, 376, 376, 377, 377,
7413  378, 378, 379, 380, 379, 381, 382, 383, 379, 384,
7414  384, 385, 385, 386, 386, 387, 388, 388, 389, 390,
7415  390, 391, 391, 391, 391, 392, 392, 392, 393, 393,
7416  393, 394, 394, 394, 394, 394, 394, 394, 395, 395,
7417  396, 396, 397, 397, 398, 399, 399, 400, 400, 401,
7418  402, 403, 402, 404, 404, 405, 405, 405, 405, 405,
7419  406, 407, 407, 408, 408, 409, 409, 409, 409, 409,
7420  409, 409, 409, 409, 409, 409, 409, 409, 409, 409,
7421  410, 411, 411, 411, 411, 412, 412, 413, 414, 414,
7422  415, 415, 416, 417, 417, 418, 418, 419, 419, 420,
7423  421, 421, 422, 422, 423, 423, 424, 424, 425, 425,
7424  426, 426, 427, 428, 427, 429, 429, 430, 430, 431,
7425  431, 431, 431, 431, 431, 432, 432, 432, 433, 433,
7426  434, 434, 434, 435, 435, 436, 436, 437, 437, 438,
7427  439, 440, 441, 441, 442, 442, 443, 443, 444
7428 };
7429 
7430 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7431 static const yytype_int8 yyr2[] =
7432 {
7433  0, 2, 0, 2, 0, 1, 2, 1, 1, 3,
7434  1, 2, 1, 3, 0, 0, 8, 0, 5, 2,
7435  1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7436  3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7437  1, 4, 4, 7, 4, 1, 1, 4, 4, 7,
7438  6, 6, 6, 6, 4, 4, 4, 1, 4, 0,
7439  1, 3, 1, 4, 1, 1, 3, 3, 3, 2,
7440  0, 7, 0, 7, 1, 1, 2, 0, 5, 1,
7441  1, 0, 0, 4, 1, 1, 1, 4, 3, 1,
7442  2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7443  2, 2, 1, 3, 1, 3, 1, 2, 3, 5,
7444  2, 4, 2, 4, 1, 3, 1, 3, 2, 3,
7445  1, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7446  1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7447  1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7448  1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7449  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7450  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7451  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7452  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7453  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7454  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7455  1, 1, 1, 1, 1, 1, 4, 4, 7, 6,
7456  6, 6, 6, 5, 4, 3, 3, 2, 2, 2,
7457  2, 3, 3, 3, 3, 3, 3, 4, 2, 2,
7458  3, 3, 3, 3, 1, 3, 3, 3, 3, 3,
7459  2, 2, 3, 3, 3, 3, 4, 6, 4, 4,
7460  1, 1, 4, 3, 1, 1, 1, 1, 3, 3,
7461  1, 1, 1, 1, 1, 2, 4, 2, 1, 4,
7462  3, 5, 3, 1, 1, 1, 1, 2, 4, 2,
7463  1, 2, 2, 4, 1, 0, 2, 2, 1, 2,
7464  1, 1, 1, 3, 3, 2, 1, 1, 1, 3,
7465  4, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7466  1, 1, 1, 0, 4, 0, 4, 3, 3, 2,
7467  3, 3, 1, 4, 3, 1, 6, 4, 3, 2,
7468  1, 2, 1, 6, 6, 4, 4, 0, 6, 0,
7469  5, 5, 6, 0, 6, 0, 7, 0, 5, 0,
7470  5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7471  1, 2, 2, 1, 2, 1, 1, 1, 1, 1,
7472  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7473  1, 2, 1, 1, 1, 5, 1, 2, 1, 1,
7474  1, 3, 1, 3, 1, 3, 5, 1, 3, 2,
7475  1, 1, 1, 0, 2, 1, 3, 4, 2, 2,
7476  1, 1, 3, 1, 3, 2, 0, 6, 8, 4,
7477  6, 4, 2, 6, 2, 4, 6, 2, 4, 2,
7478  4, 1, 1, 1, 3, 4, 1, 4, 1, 3,
7479  1, 1, 0, 0, 0, 0, 0, 9, 4, 1,
7480  3, 0, 4, 3, 2, 4, 5, 5, 2, 4,
7481  4, 3, 3, 3, 2, 1, 4, 3, 3, 0,
7482  7, 0, 7, 1, 2, 3, 4, 5, 1, 1,
7483  0, 0, 0, 0, 9, 1, 1, 1, 3, 3,
7484  1, 2, 3, 1, 1, 1, 1, 3, 1, 3,
7485  1, 2, 2, 1, 1, 4, 4, 4, 3, 4,
7486  4, 4, 3, 3, 3, 2, 0, 6, 2, 4,
7487  1, 1, 2, 2, 4, 1, 2, 3, 1, 3,
7488  5, 2, 1, 1, 3, 1, 3, 1, 2, 1,
7489  1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
7490  1, 1, 3, 3, 2, 2, 1, 1, 1, 2,
7491  2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7492  1, 1, 2, 2, 4, 2, 3, 1, 6, 1,
7493  1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
7494  1, 1, 2, 3, 3, 3, 1, 2, 4, 1,
7495  0, 3, 1, 2, 4, 1, 0, 3, 4, 1,
7496  4, 1, 0, 3, 0, 3, 0, 2, 0, 2,
7497  0, 2, 1, 0, 3, 0, 0, 0, 6, 1,
7498  1, 1, 1, 1, 1, 2, 1, 1, 3, 1,
7499  2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7500  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7501  1, 1, 1, 1, 0, 4, 0, 1, 1, 3,
7502  1, 0, 3, 1, 3, 4, 2, 2, 1, 1,
7503  3, 1, 3, 2, 0, 6, 8, 4, 6, 4,
7504  6, 2, 4, 6, 2, 4, 2, 4, 1, 0,
7505  1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
7506  1, 3, 1, 2, 1, 2, 1, 1, 1, 1,
7507  2, 1, 1, 1, 2, 1, 1, 1, 2, 1,
7508  2, 1, 1, 0, 4, 1, 2, 1, 3, 3,
7509  2, 1, 4, 2, 1, 1, 1, 1, 1, 1,
7510  1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
7511  2, 2, 1, 1, 1, 1, 1, 2, 0
7512 };
7513 
7514 
7515 enum { YYENOMEM = -2 };
7516 
7517 #define yyerrok (yyerrstatus = 0)
7518 #define yyclearin (yychar = YYEMPTY)
7519 
7520 #define YYACCEPT goto yyacceptlab
7521 #define YYABORT goto yyabortlab
7522 #define YYERROR goto yyerrorlab
7523 #define YYNOMEM goto yyexhaustedlab
7524 
7525 
7526 #define YYRECOVERING() (!!yyerrstatus)
7527 
7528 #define YYBACKUP(Token, Value) \
7529  do \
7530  if (yychar == YYEMPTY) \
7531  { \
7532  yychar = (Token); \
7533  yylval = (Value); \
7534  YYPOPSTACK (yylen); \
7535  yystate = *yyssp; \
7536  goto yybackup; \
7537  } \
7538  else \
7539  { \
7540  yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7541  YYERROR; \
7542  } \
7543  while (0)
7544 
7545 /* Backward compatibility with an undocumented macro.
7546  Use YYerror or YYUNDEF. */
7547 #define YYERRCODE YYUNDEF
7548 
7549 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7550  If N is 0, then set CURRENT to the empty location which ends
7551  the previous symbol: RHS[0] (always defined). */
7552 
7553 #ifndef YYLLOC_DEFAULT
7554 # define YYLLOC_DEFAULT(Current, Rhs, N) \
7555  do \
7556  if (N) \
7557  { \
7558  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7559  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7560  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7561  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7562  } \
7563  else \
7564  { \
7565  (Current).first_line = (Current).last_line = \
7566  YYRHSLOC (Rhs, 0).last_line; \
7567  (Current).first_column = (Current).last_column = \
7568  YYRHSLOC (Rhs, 0).last_column; \
7569  } \
7570  while (0)
7571 #endif
7572 
7573 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
7574 
7575 
7576 /* Enable debugging if requested. */
7577 #if YYDEBUG
7578 
7579 # ifndef YYFPRINTF
7580 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7581 # define YYFPRINTF fprintf
7582 # endif
7583 
7584 # define YYDPRINTF(Args) \
7585 do { \
7586  if (yydebug) \
7587  YYFPRINTF Args; \
7588 } while (0)
7589 
7590 
7591 /* YYLOCATION_PRINT -- Print the location on the stream.
7592  This macro was not mandated originally: define only if we know
7593  we won't break user code: when these are the locations we know. */
7594 
7595 # ifndef YYLOCATION_PRINT
7596 
7597 # if defined YY_LOCATION_PRINT
7598 
7599  /* Temporary convenience wrapper in case some people defined the
7600  undocumented and private YY_LOCATION_PRINT macros. */
7601 # define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7602 
7603 # elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7604 
7605 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7606 
7607 YY_ATTRIBUTE_UNUSED
7608 static int
7609 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7610 {
7611  int res = 0;
7612  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7613  if (0 <= yylocp->first_line)
7614  {
7615  res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7616  if (0 <= yylocp->first_column)
7617  res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7618  }
7619  if (0 <= yylocp->last_line)
7620  {
7621  if (yylocp->first_line < yylocp->last_line)
7622  {
7623  res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7624  if (0 <= end_col)
7625  res += YYFPRINTF (yyo, ".%d", end_col);
7626  }
7627  else if (0 <= end_col && yylocp->first_column < end_col)
7628  res += YYFPRINTF (yyo, "-%d", end_col);
7629  }
7630  return res;
7631 }
7632 
7633 # define YYLOCATION_PRINT yy_location_print_
7634 
7635  /* Temporary convenience wrapper in case some people defined the
7636  undocumented and private YY_LOCATION_PRINT macros. */
7637 # define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7638 
7639 # else
7640 
7641 # define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7642  /* Temporary convenience wrapper in case some people defined the
7643  undocumented and private YY_LOCATION_PRINT macros. */
7644 # define YY_LOCATION_PRINT YYLOCATION_PRINT
7645 
7646 # endif
7647 # endif /* !defined YYLOCATION_PRINT */
7648 
7649 
7650 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7651 do { \
7652  if (yydebug) \
7653  { \
7654  YYFPRINTF (stderr, "%s ", Title); \
7655  yy_symbol_print (stderr, \
7656  Kind, Value, Location, p); \
7657  YYFPRINTF (stderr, "\n"); \
7658  } \
7659 } while (0)
7660 
7661 
7662 /*-----------------------------------.
7663 | Print this symbol's value on YYO. |
7664 `-----------------------------------*/
7665 
7666 static void
7667 yy_symbol_value_print (FILE *yyo,
7668  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7669 {
7670  FILE *yyoutput = yyo;
7671  YY_USE (yyoutput);
7672  YY_USE (yylocationp);
7673  YY_USE (p);
7674  if (!yyvaluep)
7675  return;
7676  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7677 switch (yykind)
7678  {
7679  case YYSYMBOL_keyword_class: /* "'class'" */
7680 #line 2624 "parse.y"
7681  {
7682  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7683 }
7684 #line 7685 "parse.c"
7685  break;
7686 
7687  case YYSYMBOL_keyword_module: /* "'module'" */
7688 #line 2624 "parse.y"
7689  {
7690  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7691 }
7692 #line 7693 "parse.c"
7693  break;
7694 
7695  case YYSYMBOL_keyword_def: /* "'def'" */
7696 #line 2624 "parse.y"
7697  {
7698  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7699 }
7700 #line 7701 "parse.c"
7701  break;
7702 
7703  case YYSYMBOL_keyword_undef: /* "'undef'" */
7704 #line 2624 "parse.y"
7705  {
7706  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7707 }
7708 #line 7709 "parse.c"
7709  break;
7710 
7711  case YYSYMBOL_keyword_begin: /* "'begin'" */
7712 #line 2624 "parse.y"
7713  {
7714  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7715 }
7716 #line 7717 "parse.c"
7717  break;
7718 
7719  case YYSYMBOL_keyword_rescue: /* "'rescue'" */
7720 #line 2624 "parse.y"
7721  {
7722  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7723 }
7724 #line 7725 "parse.c"
7725  break;
7726 
7727  case YYSYMBOL_keyword_ensure: /* "'ensure'" */
7728 #line 2624 "parse.y"
7729  {
7730  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7731 }
7732 #line 7733 "parse.c"
7733  break;
7734 
7735  case YYSYMBOL_keyword_end: /* "'end'" */
7736 #line 2624 "parse.y"
7737  {
7738  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7739 }
7740 #line 7741 "parse.c"
7741  break;
7742 
7743  case YYSYMBOL_keyword_if: /* "'if'" */
7744 #line 2624 "parse.y"
7745  {
7746  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7747 }
7748 #line 7749 "parse.c"
7749  break;
7750 
7751  case YYSYMBOL_keyword_unless: /* "'unless'" */
7752 #line 2624 "parse.y"
7753  {
7754  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7755 }
7756 #line 7757 "parse.c"
7757  break;
7758 
7759  case YYSYMBOL_keyword_then: /* "'then'" */
7760 #line 2624 "parse.y"
7761  {
7762  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7763 }
7764 #line 7765 "parse.c"
7765  break;
7766 
7767  case YYSYMBOL_keyword_elsif: /* "'elsif'" */
7768 #line 2624 "parse.y"
7769  {
7770  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7771 }
7772 #line 7773 "parse.c"
7773  break;
7774 
7775  case YYSYMBOL_keyword_else: /* "'else'" */
7776 #line 2624 "parse.y"
7777  {
7778  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7779 }
7780 #line 7781 "parse.c"
7781  break;
7782 
7783  case YYSYMBOL_keyword_case: /* "'case'" */
7784 #line 2624 "parse.y"
7785  {
7786  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7787 }
7788 #line 7789 "parse.c"
7789  break;
7790 
7791  case YYSYMBOL_keyword_when: /* "'when'" */
7792 #line 2624 "parse.y"
7793  {
7794  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7795 }
7796 #line 7797 "parse.c"
7797  break;
7798 
7799  case YYSYMBOL_keyword_while: /* "'while'" */
7800 #line 2624 "parse.y"
7801  {
7802  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7803 }
7804 #line 7805 "parse.c"
7805  break;
7806 
7807  case YYSYMBOL_keyword_until: /* "'until'" */
7808 #line 2624 "parse.y"
7809  {
7810  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7811 }
7812 #line 7813 "parse.c"
7813  break;
7814 
7815  case YYSYMBOL_keyword_for: /* "'for'" */
7816 #line 2624 "parse.y"
7817  {
7818  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7819 }
7820 #line 7821 "parse.c"
7821  break;
7822 
7823  case YYSYMBOL_keyword_break: /* "'break'" */
7824 #line 2624 "parse.y"
7825  {
7826  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7827 }
7828 #line 7829 "parse.c"
7829  break;
7830 
7831  case YYSYMBOL_keyword_next: /* "'next'" */
7832 #line 2624 "parse.y"
7833  {
7834  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7835 }
7836 #line 7837 "parse.c"
7837  break;
7838 
7839  case YYSYMBOL_keyword_redo: /* "'redo'" */
7840 #line 2624 "parse.y"
7841  {
7842  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7843 }
7844 #line 7845 "parse.c"
7845  break;
7846 
7847  case YYSYMBOL_keyword_retry: /* "'retry'" */
7848 #line 2624 "parse.y"
7849  {
7850  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7851 }
7852 #line 7853 "parse.c"
7853  break;
7854 
7855  case YYSYMBOL_keyword_in: /* "'in'" */
7856 #line 2624 "parse.y"
7857  {
7858  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7859 }
7860 #line 7861 "parse.c"
7861  break;
7862 
7863  case YYSYMBOL_keyword_do: /* "'do'" */
7864 #line 2624 "parse.y"
7865  {
7866  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7867 }
7868 #line 7869 "parse.c"
7869  break;
7870 
7871  case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
7872 #line 2624 "parse.y"
7873  {
7874  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7875 }
7876 #line 7877 "parse.c"
7877  break;
7878 
7879  case YYSYMBOL_keyword_do_block: /* "'do' for block" */
7880 #line 2624 "parse.y"
7881  {
7882  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7883 }
7884 #line 7885 "parse.c"
7885  break;
7886 
7887  case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
7888 #line 2624 "parse.y"
7889  {
7890  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7891 }
7892 #line 7893 "parse.c"
7893  break;
7894 
7895  case YYSYMBOL_keyword_return: /* "'return'" */
7896 #line 2624 "parse.y"
7897  {
7898  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7899 }
7900 #line 7901 "parse.c"
7901  break;
7902 
7903  case YYSYMBOL_keyword_yield: /* "'yield'" */
7904 #line 2624 "parse.y"
7905  {
7906  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7907 }
7908 #line 7909 "parse.c"
7909  break;
7910 
7911  case YYSYMBOL_keyword_super: /* "'super'" */
7912 #line 2624 "parse.y"
7913  {
7914  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7915 }
7916 #line 7917 "parse.c"
7917  break;
7918 
7919  case YYSYMBOL_keyword_self: /* "'self'" */
7920 #line 2624 "parse.y"
7921  {
7922  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7923 }
7924 #line 7925 "parse.c"
7925  break;
7926 
7927  case YYSYMBOL_keyword_nil: /* "'nil'" */
7928 #line 2624 "parse.y"
7929  {
7930  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7931 }
7932 #line 7933 "parse.c"
7933  break;
7934 
7935  case YYSYMBOL_keyword_true: /* "'true'" */
7936 #line 2624 "parse.y"
7937  {
7938  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7939 }
7940 #line 7941 "parse.c"
7941  break;
7942 
7943  case YYSYMBOL_keyword_false: /* "'false'" */
7944 #line 2624 "parse.y"
7945  {
7946  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7947 }
7948 #line 7949 "parse.c"
7949  break;
7950 
7951  case YYSYMBOL_keyword_and: /* "'and'" */
7952 #line 2624 "parse.y"
7953  {
7954  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7955 }
7956 #line 7957 "parse.c"
7957  break;
7958 
7959  case YYSYMBOL_keyword_or: /* "'or'" */
7960 #line 2624 "parse.y"
7961  {
7962  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7963 }
7964 #line 7965 "parse.c"
7965  break;
7966 
7967  case YYSYMBOL_keyword_not: /* "'not'" */
7968 #line 2624 "parse.y"
7969  {
7970  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7971 }
7972 #line 7973 "parse.c"
7973  break;
7974 
7975  case YYSYMBOL_modifier_if: /* "'if' modifier" */
7976 #line 2624 "parse.y"
7977  {
7978  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7979 }
7980 #line 7981 "parse.c"
7981  break;
7982 
7983  case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
7984 #line 2624 "parse.y"
7985  {
7986  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7987 }
7988 #line 7989 "parse.c"
7989  break;
7990 
7991  case YYSYMBOL_modifier_while: /* "'while' modifier" */
7992 #line 2624 "parse.y"
7993  {
7994  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7995 }
7996 #line 7997 "parse.c"
7997  break;
7998 
7999  case YYSYMBOL_modifier_until: /* "'until' modifier" */
8000 #line 2624 "parse.y"
8001  {
8002  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8003 }
8004 #line 8005 "parse.c"
8005  break;
8006 
8007  case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8008 #line 2624 "parse.y"
8009  {
8010  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8011 }
8012 #line 8013 "parse.c"
8013  break;
8014 
8015  case YYSYMBOL_keyword_alias: /* "'alias'" */
8016 #line 2624 "parse.y"
8017  {
8018  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8019 }
8020 #line 8021 "parse.c"
8021  break;
8022 
8023  case YYSYMBOL_keyword_defined: /* "'defined?'" */
8024 #line 2624 "parse.y"
8025  {
8026  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8027 }
8028 #line 8029 "parse.c"
8029  break;
8030 
8031  case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8032 #line 2624 "parse.y"
8033  {
8034  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8035 }
8036 #line 8037 "parse.c"
8037  break;
8038 
8039  case YYSYMBOL_keyword_END: /* "'END'" */
8040 #line 2624 "parse.y"
8041  {
8042  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8043 }
8044 #line 8045 "parse.c"
8045  break;
8046 
8047  case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8048 #line 2624 "parse.y"
8049  {
8050  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8051 }
8052 #line 8053 "parse.c"
8053  break;
8054 
8055  case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8056 #line 2624 "parse.y"
8057  {
8058  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8059 }
8060 #line 8061 "parse.c"
8061  break;
8062 
8063  case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8064 #line 2624 "parse.y"
8065  {
8066  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8067 }
8068 #line 8069 "parse.c"
8069  break;
8070 
8071  case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8072 #line 2624 "parse.y"
8073  {
8074  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8075 }
8076 #line 8077 "parse.c"
8077  break;
8078 
8079  case YYSYMBOL_tFID: /* "method" */
8080 #line 2624 "parse.y"
8081  {
8082  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8083 }
8084 #line 8085 "parse.c"
8085  break;
8086 
8087  case YYSYMBOL_tGVAR: /* "global variable" */
8088 #line 2624 "parse.y"
8089  {
8090  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8091 }
8092 #line 8093 "parse.c"
8093  break;
8094 
8095  case YYSYMBOL_tIVAR: /* "instance variable" */
8096 #line 2624 "parse.y"
8097  {
8098  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8099 }
8100 #line 8101 "parse.c"
8101  break;
8102 
8103  case YYSYMBOL_tCONSTANT: /* "constant" */
8104 #line 2624 "parse.y"
8105  {
8106  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8107 }
8108 #line 8109 "parse.c"
8109  break;
8110 
8111  case YYSYMBOL_tCVAR: /* "class variable" */
8112 #line 2624 "parse.y"
8113  {
8114  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8115 }
8116 #line 8117 "parse.c"
8117  break;
8118 
8119  case YYSYMBOL_tLABEL: /* "label" */
8120 #line 2624 "parse.y"
8121  {
8122  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8123 }
8124 #line 8125 "parse.c"
8125  break;
8126 
8127  case YYSYMBOL_tINTEGER: /* "integer literal" */
8128 #line 2627 "parse.y"
8129  {
8130  switch (nd_type(RNODE(((*yyvaluep).node)))) {
8131  case NODE_INTEGER:
8132  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8133  break;
8134  case NODE_FLOAT:
8135  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8136  break;
8137  case NODE_RATIONAL:
8138  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8139  break;
8140  case NODE_IMAGINARY:
8141  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8142  break;
8143  default:
8144  break;
8145  }
8146 }
8147 #line 8148 "parse.c"
8148  break;
8149 
8150  case YYSYMBOL_tFLOAT: /* "float literal" */
8151 #line 2627 "parse.y"
8152  {
8153  switch (nd_type(RNODE(((*yyvaluep).node)))) {
8154  case NODE_INTEGER:
8155  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8156  break;
8157  case NODE_FLOAT:
8158  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8159  break;
8160  case NODE_RATIONAL:
8161  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8162  break;
8163  case NODE_IMAGINARY:
8164  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8165  break;
8166  default:
8167  break;
8168  }
8169 }
8170 #line 8171 "parse.c"
8171  break;
8172 
8173  case YYSYMBOL_tRATIONAL: /* "rational literal" */
8174 #line 2627 "parse.y"
8175  {
8176  switch (nd_type(RNODE(((*yyvaluep).node)))) {
8177  case NODE_INTEGER:
8178  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8179  break;
8180  case NODE_FLOAT:
8181  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8182  break;
8183  case NODE_RATIONAL:
8184  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8185  break;
8186  case NODE_IMAGINARY:
8187  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8188  break;
8189  default:
8190  break;
8191  }
8192 }
8193 #line 8194 "parse.c"
8194  break;
8195 
8196  case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8197 #line 2627 "parse.y"
8198  {
8199  switch (nd_type(RNODE(((*yyvaluep).node)))) {
8200  case NODE_INTEGER:
8201  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8202  break;
8203  case NODE_FLOAT:
8204  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8205  break;
8206  case NODE_RATIONAL:
8207  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8208  break;
8209  case NODE_IMAGINARY:
8210  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8211  break;
8212  default:
8213  break;
8214  }
8215 }
8216 #line 8217 "parse.c"
8217  break;
8218 
8219  case YYSYMBOL_tCHAR: /* "char literal" */
8220 #line 2627 "parse.y"
8221  {
8222  switch (nd_type(RNODE(((*yyvaluep).node)))) {
8223  case NODE_INTEGER:
8224  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8225  break;
8226  case NODE_FLOAT:
8227  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8228  break;
8229  case NODE_RATIONAL:
8230  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8231  break;
8232  case NODE_IMAGINARY:
8233  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8234  break;
8235  default:
8236  break;
8237  }
8238 }
8239 #line 8240 "parse.c"
8240  break;
8241 
8242  case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8243 #line 2645 "parse.y"
8244  {
8245  rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8246 }
8247 #line 8248 "parse.c"
8248  break;
8249 
8250  case YYSYMBOL_tBACK_REF: /* "back reference" */
8251 #line 2648 "parse.y"
8252  {
8253  rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8254 }
8255 #line 8256 "parse.c"
8256  break;
8257 
8258  case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8259 #line 2627 "parse.y"
8260  {
8261  switch (nd_type(RNODE(((*yyvaluep).node)))) {
8262  case NODE_INTEGER:
8263  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8264  break;
8265  case NODE_FLOAT:
8266  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8267  break;
8268  case NODE_RATIONAL:
8269  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8270  break;
8271  case NODE_IMAGINARY:
8272  rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8273  break;
8274  default:
8275  break;
8276  }
8277 }
8278 #line 8279 "parse.c"
8279  break;
8280 
8281  case YYSYMBOL_69_: /* '.' */
8282 #line 2624 "parse.y"
8283  {
8284  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8285 }
8286 #line 8287 "parse.c"
8287  break;
8288 
8289  case YYSYMBOL_70_backslash_: /* "backslash" */
8290 #line 2624 "parse.y"
8291  {
8292  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8293 }
8294 #line 8295 "parse.c"
8295  break;
8296 
8297  case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8298 #line 2624 "parse.y"
8299  {
8300  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8301 }
8302 #line 8303 "parse.c"
8303  break;
8304 
8305  case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8306 #line 2624 "parse.y"
8307  {
8308  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8309 }
8310 #line 8311 "parse.c"
8311  break;
8312 
8313  case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8314 #line 2624 "parse.y"
8315  {
8316  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8317 }
8318 #line 8319 "parse.c"
8319  break;
8320 
8321  case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8322 #line 2624 "parse.y"
8323  {
8324  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8325 }
8326 #line 8327 "parse.c"
8327  break;
8328 
8329  case YYSYMBOL_tANDDOT: /* "&." */
8330 #line 2624 "parse.y"
8331  {
8332  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8333 }
8334 #line 8335 "parse.c"
8335  break;
8336 
8337  case YYSYMBOL_tCOLON2: /* "::" */
8338 #line 2624 "parse.y"
8339  {
8340  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8341 }
8342 #line 8343 "parse.c"
8343  break;
8344 
8345  case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8346 #line 2624 "parse.y"
8347  {
8348  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8349 }
8350 #line 8351 "parse.c"
8351  break;
8352 
8353  case YYSYMBOL_top_compstmt: /* top_compstmt */
8354 #line 2615 "parse.y"
8355  {
8356  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8357  rb_parser_printf(p, "NODE_SPECIAL");
8358  }
8359  else if (((*yyvaluep).node)) {
8360  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8361  }
8362 }
8363 #line 8364 "parse.c"
8364  break;
8365 
8366  case YYSYMBOL_top_stmts: /* top_stmts */
8367 #line 2615 "parse.y"
8368  {
8369  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8370  rb_parser_printf(p, "NODE_SPECIAL");
8371  }
8372  else if (((*yyvaluep).node)) {
8373  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8374  }
8375 }
8376 #line 8377 "parse.c"
8377  break;
8378 
8379  case YYSYMBOL_top_stmt: /* top_stmt */
8380 #line 2615 "parse.y"
8381  {
8382  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8383  rb_parser_printf(p, "NODE_SPECIAL");
8384  }
8385  else if (((*yyvaluep).node)) {
8386  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8387  }
8388 }
8389 #line 8390 "parse.c"
8390  break;
8391 
8392  case YYSYMBOL_block_open: /* block_open */
8393 #line 2615 "parse.y"
8394  {
8395  if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8396  rb_parser_printf(p, "NODE_SPECIAL");
8397  }
8398  else if (((*yyvaluep).node_exits)) {
8399  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8400  }
8401 }
8402 #line 8403 "parse.c"
8403  break;
8404 
8405  case YYSYMBOL_begin_block: /* begin_block */
8406 #line 2615 "parse.y"
8407  {
8408  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8409  rb_parser_printf(p, "NODE_SPECIAL");
8410  }
8411  else if (((*yyvaluep).node)) {
8412  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8413  }
8414 }
8415 #line 8416 "parse.c"
8416  break;
8417 
8418  case YYSYMBOL_bodystmt: /* bodystmt */
8419 #line 2615 "parse.y"
8420  {
8421  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8422  rb_parser_printf(p, "NODE_SPECIAL");
8423  }
8424  else if (((*yyvaluep).node)) {
8425  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8426  }
8427 }
8428 #line 8429 "parse.c"
8429  break;
8430 
8431  case YYSYMBOL_compstmt: /* compstmt */
8432 #line 2615 "parse.y"
8433  {
8434  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8435  rb_parser_printf(p, "NODE_SPECIAL");
8436  }
8437  else if (((*yyvaluep).node)) {
8438  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8439  }
8440 }
8441 #line 8442 "parse.c"
8442  break;
8443 
8444  case YYSYMBOL_stmts: /* stmts */
8445 #line 2615 "parse.y"
8446  {
8447  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8448  rb_parser_printf(p, "NODE_SPECIAL");
8449  }
8450  else if (((*yyvaluep).node)) {
8451  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8452  }
8453 }
8454 #line 8455 "parse.c"
8455  break;
8456 
8457  case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8458 #line 2615 "parse.y"
8459  {
8460  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8461  rb_parser_printf(p, "NODE_SPECIAL");
8462  }
8463  else if (((*yyvaluep).node)) {
8464  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8465  }
8466 }
8467 #line 8468 "parse.c"
8468  break;
8469 
8470  case YYSYMBOL_allow_exits: /* allow_exits */
8471 #line 2615 "parse.y"
8472  {
8473  if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8474  rb_parser_printf(p, "NODE_SPECIAL");
8475  }
8476  else if (((*yyvaluep).node_exits)) {
8477  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8478  }
8479 }
8480 #line 8481 "parse.c"
8481  break;
8482 
8483  case YYSYMBOL_stmt: /* stmt */
8484 #line 2615 "parse.y"
8485  {
8486  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8487  rb_parser_printf(p, "NODE_SPECIAL");
8488  }
8489  else if (((*yyvaluep).node)) {
8490  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8491  }
8492 }
8493 #line 8494 "parse.c"
8494  break;
8495 
8496  case YYSYMBOL_command_asgn: /* command_asgn */
8497 #line 2615 "parse.y"
8498  {
8499  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8500  rb_parser_printf(p, "NODE_SPECIAL");
8501  }
8502  else if (((*yyvaluep).node)) {
8503  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8504  }
8505 }
8506 #line 8507 "parse.c"
8507  break;
8508 
8509  case YYSYMBOL_endless_command: /* endless_command */
8510 #line 2615 "parse.y"
8511  {
8512  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8513  rb_parser_printf(p, "NODE_SPECIAL");
8514  }
8515  else if (((*yyvaluep).node)) {
8516  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8517  }
8518 }
8519 #line 8520 "parse.c"
8520  break;
8521 
8522  case YYSYMBOL_command_rhs: /* command_rhs */
8523 #line 2615 "parse.y"
8524  {
8525  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8526  rb_parser_printf(p, "NODE_SPECIAL");
8527  }
8528  else if (((*yyvaluep).node)) {
8529  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8530  }
8531 }
8532 #line 8533 "parse.c"
8533  break;
8534 
8535  case YYSYMBOL_expr: /* expr */
8536 #line 2615 "parse.y"
8537  {
8538  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8539  rb_parser_printf(p, "NODE_SPECIAL");
8540  }
8541  else if (((*yyvaluep).node)) {
8542  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8543  }
8544 }
8545 #line 8546 "parse.c"
8546  break;
8547 
8548  case YYSYMBOL_def_name: /* def_name */
8549 #line 2624 "parse.y"
8550  {
8551  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8552 }
8553 #line 8554 "parse.c"
8554  break;
8555 
8556  case YYSYMBOL_defn_head: /* defn_head */
8557 #line 2615 "parse.y"
8558  {
8559  if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8560  rb_parser_printf(p, "NODE_SPECIAL");
8561  }
8562  else if (((*yyvaluep).node_def_temp)) {
8563  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8564  }
8565 }
8566 #line 8567 "parse.c"
8567  break;
8568 
8569  case YYSYMBOL_defs_head: /* defs_head */
8570 #line 2615 "parse.y"
8571  {
8572  if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8573  rb_parser_printf(p, "NODE_SPECIAL");
8574  }
8575  else if (((*yyvaluep).node_def_temp)) {
8576  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8577  }
8578 }
8579 #line 8580 "parse.c"
8580  break;
8581 
8582  case YYSYMBOL_expr_value: /* expr_value */
8583 #line 2615 "parse.y"
8584  {
8585  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8586  rb_parser_printf(p, "NODE_SPECIAL");
8587  }
8588  else if (((*yyvaluep).node)) {
8589  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8590  }
8591 }
8592 #line 8593 "parse.c"
8593  break;
8594 
8595  case YYSYMBOL_expr_value_do: /* expr_value_do */
8596 #line 2615 "parse.y"
8597  {
8598  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8599  rb_parser_printf(p, "NODE_SPECIAL");
8600  }
8601  else if (((*yyvaluep).node)) {
8602  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8603  }
8604 }
8605 #line 8606 "parse.c"
8606  break;
8607 
8608  case YYSYMBOL_command_call: /* command_call */
8609 #line 2615 "parse.y"
8610  {
8611  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8612  rb_parser_printf(p, "NODE_SPECIAL");
8613  }
8614  else if (((*yyvaluep).node)) {
8615  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8616  }
8617 }
8618 #line 8619 "parse.c"
8619  break;
8620 
8621  case YYSYMBOL_block_command: /* block_command */
8622 #line 2615 "parse.y"
8623  {
8624  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8625  rb_parser_printf(p, "NODE_SPECIAL");
8626  }
8627  else if (((*yyvaluep).node)) {
8628  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8629  }
8630 }
8631 #line 8632 "parse.c"
8632  break;
8633 
8634  case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
8635 #line 2615 "parse.y"
8636  {
8637  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8638  rb_parser_printf(p, "NODE_SPECIAL");
8639  }
8640  else if (((*yyvaluep).node)) {
8641  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8642  }
8643 }
8644 #line 8645 "parse.c"
8645  break;
8646 
8647  case YYSYMBOL_fcall: /* fcall */
8648 #line 2615 "parse.y"
8649  {
8650  if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8651  rb_parser_printf(p, "NODE_SPECIAL");
8652  }
8653  else if (((*yyvaluep).node_fcall)) {
8654  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8655  }
8656 }
8657 #line 8658 "parse.c"
8658  break;
8659 
8660  case YYSYMBOL_command: /* command */
8661 #line 2615 "parse.y"
8662  {
8663  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8664  rb_parser_printf(p, "NODE_SPECIAL");
8665  }
8666  else if (((*yyvaluep).node)) {
8667  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8668  }
8669 }
8670 #line 8671 "parse.c"
8671  break;
8672 
8673  case YYSYMBOL_mlhs: /* mlhs */
8674 #line 2615 "parse.y"
8675  {
8676  if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8677  rb_parser_printf(p, "NODE_SPECIAL");
8678  }
8679  else if (((*yyvaluep).node_masgn)) {
8680  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8681  }
8682 }
8683 #line 8684 "parse.c"
8684  break;
8685 
8686  case YYSYMBOL_mlhs_inner: /* mlhs_inner */
8687 #line 2615 "parse.y"
8688  {
8689  if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8690  rb_parser_printf(p, "NODE_SPECIAL");
8691  }
8692  else if (((*yyvaluep).node_masgn)) {
8693  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8694  }
8695 }
8696 #line 8697 "parse.c"
8697  break;
8698 
8699  case YYSYMBOL_mlhs_basic: /* mlhs_basic */
8700 #line 2615 "parse.y"
8701  {
8702  if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8703  rb_parser_printf(p, "NODE_SPECIAL");
8704  }
8705  else if (((*yyvaluep).node_masgn)) {
8706  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8707  }
8708 }
8709 #line 8710 "parse.c"
8710  break;
8711 
8712  case YYSYMBOL_mlhs_item: /* mlhs_item */
8713 #line 2615 "parse.y"
8714  {
8715  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8716  rb_parser_printf(p, "NODE_SPECIAL");
8717  }
8718  else if (((*yyvaluep).node)) {
8719  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8720  }
8721 }
8722 #line 8723 "parse.c"
8723  break;
8724 
8725  case YYSYMBOL_mlhs_head: /* mlhs_head */
8726 #line 2615 "parse.y"
8727  {
8728  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8729  rb_parser_printf(p, "NODE_SPECIAL");
8730  }
8731  else if (((*yyvaluep).node)) {
8732  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8733  }
8734 }
8735 #line 8736 "parse.c"
8736  break;
8737 
8738  case YYSYMBOL_mlhs_post: /* mlhs_post */
8739 #line 2615 "parse.y"
8740  {
8741  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8742  rb_parser_printf(p, "NODE_SPECIAL");
8743  }
8744  else if (((*yyvaluep).node)) {
8745  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8746  }
8747 }
8748 #line 8749 "parse.c"
8749  break;
8750 
8751  case YYSYMBOL_mlhs_node: /* mlhs_node */
8752 #line 2615 "parse.y"
8753  {
8754  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8755  rb_parser_printf(p, "NODE_SPECIAL");
8756  }
8757  else if (((*yyvaluep).node)) {
8758  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8759  }
8760 }
8761 #line 8762 "parse.c"
8762  break;
8763 
8764  case YYSYMBOL_lhs: /* lhs */
8765 #line 2615 "parse.y"
8766  {
8767  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8768  rb_parser_printf(p, "NODE_SPECIAL");
8769  }
8770  else if (((*yyvaluep).node)) {
8771  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8772  }
8773 }
8774 #line 8775 "parse.c"
8775  break;
8776 
8777  case YYSYMBOL_cname: /* cname */
8778 #line 2624 "parse.y"
8779  {
8780  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8781 }
8782 #line 8783 "parse.c"
8783  break;
8784 
8785  case YYSYMBOL_cpath: /* cpath */
8786 #line 2615 "parse.y"
8787  {
8788  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8789  rb_parser_printf(p, "NODE_SPECIAL");
8790  }
8791  else if (((*yyvaluep).node)) {
8792  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8793  }
8794 }
8795 #line 8796 "parse.c"
8796  break;
8797 
8798  case YYSYMBOL_fname: /* fname */
8799 #line 2624 "parse.y"
8800  {
8801  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8802 }
8803 #line 8804 "parse.c"
8804  break;
8805 
8806  case YYSYMBOL_fitem: /* fitem */
8807 #line 2615 "parse.y"
8808  {
8809  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8810  rb_parser_printf(p, "NODE_SPECIAL");
8811  }
8812  else if (((*yyvaluep).node)) {
8813  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8814  }
8815 }
8816 #line 8817 "parse.c"
8817  break;
8818 
8819  case YYSYMBOL_undef_list: /* undef_list */
8820 #line 2615 "parse.y"
8821  {
8822  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8823  rb_parser_printf(p, "NODE_SPECIAL");
8824  }
8825  else if (((*yyvaluep).node)) {
8826  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8827  }
8828 }
8829 #line 8830 "parse.c"
8830  break;
8831 
8832  case YYSYMBOL_op: /* op */
8833 #line 2624 "parse.y"
8834  {
8835  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8836 }
8837 #line 8838 "parse.c"
8838  break;
8839 
8840  case YYSYMBOL_reswords: /* reswords */
8841 #line 2624 "parse.y"
8842  {
8843  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8844 }
8845 #line 8846 "parse.c"
8846  break;
8847 
8848  case YYSYMBOL_arg: /* arg */
8849 #line 2615 "parse.y"
8850  {
8851  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8852  rb_parser_printf(p, "NODE_SPECIAL");
8853  }
8854  else if (((*yyvaluep).node)) {
8855  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8856  }
8857 }
8858 #line 8859 "parse.c"
8859  break;
8860 
8861  case YYSYMBOL_endless_arg: /* endless_arg */
8862 #line 2615 "parse.y"
8863  {
8864  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8865  rb_parser_printf(p, "NODE_SPECIAL");
8866  }
8867  else if (((*yyvaluep).node)) {
8868  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8869  }
8870 }
8871 #line 8872 "parse.c"
8872  break;
8873 
8874  case YYSYMBOL_relop: /* relop */
8875 #line 2624 "parse.y"
8876  {
8877  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8878 }
8879 #line 8880 "parse.c"
8880  break;
8881 
8882  case YYSYMBOL_rel_expr: /* rel_expr */
8883 #line 2615 "parse.y"
8884  {
8885  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8886  rb_parser_printf(p, "NODE_SPECIAL");
8887  }
8888  else if (((*yyvaluep).node)) {
8889  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8890  }
8891 }
8892 #line 8893 "parse.c"
8893  break;
8894 
8895  case YYSYMBOL_arg_value: /* arg_value */
8896 #line 2615 "parse.y"
8897  {
8898  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8899  rb_parser_printf(p, "NODE_SPECIAL");
8900  }
8901  else if (((*yyvaluep).node)) {
8902  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8903  }
8904 }
8905 #line 8906 "parse.c"
8906  break;
8907 
8908  case YYSYMBOL_aref_args: /* aref_args */
8909 #line 2615 "parse.y"
8910  {
8911  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8912  rb_parser_printf(p, "NODE_SPECIAL");
8913  }
8914  else if (((*yyvaluep).node)) {
8915  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8916  }
8917 }
8918 #line 8919 "parse.c"
8919  break;
8920 
8921  case YYSYMBOL_arg_rhs: /* arg_rhs */
8922 #line 2615 "parse.y"
8923  {
8924  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8925  rb_parser_printf(p, "NODE_SPECIAL");
8926  }
8927  else if (((*yyvaluep).node)) {
8928  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8929  }
8930 }
8931 #line 8932 "parse.c"
8932  break;
8933 
8934  case YYSYMBOL_paren_args: /* paren_args */
8935 #line 2615 "parse.y"
8936  {
8937  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8938  rb_parser_printf(p, "NODE_SPECIAL");
8939  }
8940  else if (((*yyvaluep).node)) {
8941  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8942  }
8943 }
8944 #line 8945 "parse.c"
8945  break;
8946 
8947  case YYSYMBOL_opt_paren_args: /* opt_paren_args */
8948 #line 2615 "parse.y"
8949  {
8950  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8951  rb_parser_printf(p, "NODE_SPECIAL");
8952  }
8953  else if (((*yyvaluep).node)) {
8954  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8955  }
8956 }
8957 #line 8958 "parse.c"
8958  break;
8959 
8960  case YYSYMBOL_opt_call_args: /* opt_call_args */
8961 #line 2615 "parse.y"
8962  {
8963  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8964  rb_parser_printf(p, "NODE_SPECIAL");
8965  }
8966  else if (((*yyvaluep).node)) {
8967  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8968  }
8969 }
8970 #line 8971 "parse.c"
8971  break;
8972 
8973  case YYSYMBOL_call_args: /* call_args */
8974 #line 2615 "parse.y"
8975  {
8976  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8977  rb_parser_printf(p, "NODE_SPECIAL");
8978  }
8979  else if (((*yyvaluep).node)) {
8980  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8981  }
8982 }
8983 #line 8984 "parse.c"
8984  break;
8985 
8986  case YYSYMBOL_command_args: /* command_args */
8987 #line 2615 "parse.y"
8988  {
8989  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8990  rb_parser_printf(p, "NODE_SPECIAL");
8991  }
8992  else if (((*yyvaluep).node)) {
8993  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8994  }
8995 }
8996 #line 8997 "parse.c"
8997  break;
8998 
8999  case YYSYMBOL_block_arg: /* block_arg */
9000 #line 2615 "parse.y"
9001  {
9002  if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9003  rb_parser_printf(p, "NODE_SPECIAL");
9004  }
9005  else if (((*yyvaluep).node_block_pass)) {
9006  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9007  }
9008 }
9009 #line 9010 "parse.c"
9010  break;
9011 
9012  case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9013 #line 2615 "parse.y"
9014  {
9015  if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9016  rb_parser_printf(p, "NODE_SPECIAL");
9017  }
9018  else if (((*yyvaluep).node_block_pass)) {
9019  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9020  }
9021 }
9022 #line 9023 "parse.c"
9023  break;
9024 
9025  case YYSYMBOL_args: /* args */
9026 #line 2615 "parse.y"
9027  {
9028  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9029  rb_parser_printf(p, "NODE_SPECIAL");
9030  }
9031  else if (((*yyvaluep).node)) {
9032  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9033  }
9034 }
9035 #line 9036 "parse.c"
9036  break;
9037 
9038  case YYSYMBOL_arg_splat: /* arg_splat */
9039 #line 2615 "parse.y"
9040  {
9041  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9042  rb_parser_printf(p, "NODE_SPECIAL");
9043  }
9044  else if (((*yyvaluep).node)) {
9045  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9046  }
9047 }
9048 #line 9049 "parse.c"
9049  break;
9050 
9051  case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9052 #line 2615 "parse.y"
9053  {
9054  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9055  rb_parser_printf(p, "NODE_SPECIAL");
9056  }
9057  else if (((*yyvaluep).node)) {
9058  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9059  }
9060 }
9061 #line 9062 "parse.c"
9062  break;
9063 
9064  case YYSYMBOL_mrhs: /* mrhs */
9065 #line 2615 "parse.y"
9066  {
9067  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9068  rb_parser_printf(p, "NODE_SPECIAL");
9069  }
9070  else if (((*yyvaluep).node)) {
9071  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9072  }
9073 }
9074 #line 9075 "parse.c"
9075  break;
9076 
9077  case YYSYMBOL_primary: /* primary */
9078 #line 2615 "parse.y"
9079  {
9080  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9081  rb_parser_printf(p, "NODE_SPECIAL");
9082  }
9083  else if (((*yyvaluep).node)) {
9084  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9085  }
9086 }
9087 #line 9088 "parse.c"
9088  break;
9089 
9090  case YYSYMBOL_primary_value: /* primary_value */
9091 #line 2615 "parse.y"
9092  {
9093  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9094  rb_parser_printf(p, "NODE_SPECIAL");
9095  }
9096  else if (((*yyvaluep).node)) {
9097  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9098  }
9099 }
9100 #line 9101 "parse.c"
9101  break;
9102 
9103  case YYSYMBOL_k_while: /* k_while */
9104 #line 2615 "parse.y"
9105  {
9106  if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9107  rb_parser_printf(p, "NODE_SPECIAL");
9108  }
9109  else if (((*yyvaluep).node_exits)) {
9110  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9111  }
9112 }
9113 #line 9114 "parse.c"
9114  break;
9115 
9116  case YYSYMBOL_k_until: /* k_until */
9117 #line 2615 "parse.y"
9118  {
9119  if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9120  rb_parser_printf(p, "NODE_SPECIAL");
9121  }
9122  else if (((*yyvaluep).node_exits)) {
9123  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9124  }
9125 }
9126 #line 9127 "parse.c"
9127  break;
9128 
9129  case YYSYMBOL_k_for: /* k_for */
9130 #line 2615 "parse.y"
9131  {
9132  if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9133  rb_parser_printf(p, "NODE_SPECIAL");
9134  }
9135  else if (((*yyvaluep).node_exits)) {
9136  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9137  }
9138 }
9139 #line 9140 "parse.c"
9140  break;
9141 
9142  case YYSYMBOL_k_def: /* k_def */
9143 #line 2615 "parse.y"
9144  {
9145  if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9146  rb_parser_printf(p, "NODE_SPECIAL");
9147  }
9148  else if (((*yyvaluep).node_def_temp)) {
9149  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9150  }
9151 }
9152 #line 9153 "parse.c"
9153  break;
9154 
9155  case YYSYMBOL_if_tail: /* if_tail */
9156 #line 2615 "parse.y"
9157  {
9158  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9159  rb_parser_printf(p, "NODE_SPECIAL");
9160  }
9161  else if (((*yyvaluep).node)) {
9162  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9163  }
9164 }
9165 #line 9166 "parse.c"
9166  break;
9167 
9168  case YYSYMBOL_opt_else: /* opt_else */
9169 #line 2615 "parse.y"
9170  {
9171  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9172  rb_parser_printf(p, "NODE_SPECIAL");
9173  }
9174  else if (((*yyvaluep).node)) {
9175  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9176  }
9177 }
9178 #line 9179 "parse.c"
9179  break;
9180 
9181  case YYSYMBOL_for_var: /* for_var */
9182 #line 2615 "parse.y"
9183  {
9184  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9185  rb_parser_printf(p, "NODE_SPECIAL");
9186  }
9187  else if (((*yyvaluep).node)) {
9188  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9189  }
9190 }
9191 #line 9192 "parse.c"
9192  break;
9193 
9194  case YYSYMBOL_f_marg: /* f_marg */
9195 #line 2615 "parse.y"
9196  {
9197  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9198  rb_parser_printf(p, "NODE_SPECIAL");
9199  }
9200  else if (((*yyvaluep).node)) {
9201  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9202  }
9203 }
9204 #line 9205 "parse.c"
9205  break;
9206 
9207  case YYSYMBOL_f_marg_list: /* f_marg_list */
9208 #line 2615 "parse.y"
9209  {
9210  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9211  rb_parser_printf(p, "NODE_SPECIAL");
9212  }
9213  else if (((*yyvaluep).node)) {
9214  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9215  }
9216 }
9217 #line 9218 "parse.c"
9218  break;
9219 
9220  case YYSYMBOL_f_margs: /* f_margs */
9221 #line 2615 "parse.y"
9222  {
9223  if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9224  rb_parser_printf(p, "NODE_SPECIAL");
9225  }
9226  else if (((*yyvaluep).node_masgn)) {
9227  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9228  }
9229 }
9230 #line 9231 "parse.c"
9231  break;
9232 
9233  case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9234 #line 2615 "parse.y"
9235  {
9236  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9237  rb_parser_printf(p, "NODE_SPECIAL");
9238  }
9239  else if (((*yyvaluep).node)) {
9240  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9241  }
9242 }
9243 #line 9244 "parse.c"
9244  break;
9245 
9246  case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9247 #line 2624 "parse.y"
9248  {
9249  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9250 }
9251 #line 9252 "parse.c"
9252  break;
9253 
9254  case YYSYMBOL_f_kwarg_f_block_kw: /* f_kwarg_f_block_kw */
9255 #line 2615 "parse.y"
9256  {
9257  if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9258  rb_parser_printf(p, "NODE_SPECIAL");
9259  }
9260  else if (((*yyvaluep).node_kw_arg)) {
9261  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9262  }
9263 }
9264 #line 9265 "parse.c"
9265  break;
9266 
9267  case YYSYMBOL_block_args_tail: /* block_args_tail */
9268 #line 2615 "parse.y"
9269  {
9270  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9271  rb_parser_printf(p, "NODE_SPECIAL");
9272  }
9273  else if (((*yyvaluep).node_args)) {
9274  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9275  }
9276 }
9277 #line 9278 "parse.c"
9278  break;
9279 
9280  case YYSYMBOL_excessed_comma: /* excessed_comma */
9281 #line 2624 "parse.y"
9282  {
9283  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9284 }
9285 #line 9286 "parse.c"
9286  break;
9287 
9288  case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9289 #line 2615 "parse.y"
9290  {
9291  if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9292  rb_parser_printf(p, "NODE_SPECIAL");
9293  }
9294  else if (((*yyvaluep).node_opt_arg)) {
9295  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9296  }
9297 }
9298 #line 9299 "parse.c"
9299  break;
9300 
9301  case YYSYMBOL_f_optarg_primary_value: /* f_optarg_primary_value */
9302 #line 2615 "parse.y"
9303  {
9304  if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9305  rb_parser_printf(p, "NODE_SPECIAL");
9306  }
9307  else if (((*yyvaluep).node_opt_arg)) {
9308  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9309  }
9310 }
9311 #line 9312 "parse.c"
9312  break;
9313 
9314  case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9315 #line 2615 "parse.y"
9316  {
9317  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9318  rb_parser_printf(p, "NODE_SPECIAL");
9319  }
9320  else if (((*yyvaluep).node_args)) {
9321  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9322  }
9323 }
9324 #line 9325 "parse.c"
9325  break;
9326 
9327  case YYSYMBOL_block_param: /* block_param */
9328 #line 2615 "parse.y"
9329  {
9330  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9331  rb_parser_printf(p, "NODE_SPECIAL");
9332  }
9333  else if (((*yyvaluep).node_args)) {
9334  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9335  }
9336 }
9337 #line 9338 "parse.c"
9338  break;
9339 
9340  case YYSYMBOL_opt_block_param: /* opt_block_param */
9341 #line 2615 "parse.y"
9342  {
9343  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9344  rb_parser_printf(p, "NODE_SPECIAL");
9345  }
9346  else if (((*yyvaluep).node_args)) {
9347  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9348  }
9349 }
9350 #line 9351 "parse.c"
9351  break;
9352 
9353  case YYSYMBOL_block_param_def: /* block_param_def */
9354 #line 2615 "parse.y"
9355  {
9356  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9357  rb_parser_printf(p, "NODE_SPECIAL");
9358  }
9359  else if (((*yyvaluep).node_args)) {
9360  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9361  }
9362 }
9363 #line 9364 "parse.c"
9364  break;
9365 
9366  case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9367 #line 2624 "parse.y"
9368  {
9369  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9370 }
9371 #line 9372 "parse.c"
9372  break;
9373 
9374  case YYSYMBOL_bv_decls: /* bv_decls */
9375 #line 2624 "parse.y"
9376  {
9377  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9378 }
9379 #line 9380 "parse.c"
9380  break;
9381 
9382  case YYSYMBOL_bvar: /* bvar */
9383 #line 2624 "parse.y"
9384  {
9385  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9386 }
9387 #line 9388 "parse.c"
9388  break;
9389 
9390  case YYSYMBOL_numparam: /* numparam */
9391 #line 2615 "parse.y"
9392  {
9393  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9394  rb_parser_printf(p, "NODE_SPECIAL");
9395  }
9396  else if (((*yyvaluep).node)) {
9397  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9398  }
9399 }
9400 #line 9401 "parse.c"
9401  break;
9402 
9403  case YYSYMBOL_it_id: /* it_id */
9404 #line 2624 "parse.y"
9405  {
9406  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9407 }
9408 #line 9409 "parse.c"
9409  break;
9410 
9411  case YYSYMBOL_lambda: /* lambda */
9412 #line 2615 "parse.y"
9413  {
9414  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9415  rb_parser_printf(p, "NODE_SPECIAL");
9416  }
9417  else if (((*yyvaluep).node)) {
9418  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9419  }
9420 }
9421 #line 9422 "parse.c"
9422  break;
9423 
9424  case YYSYMBOL_f_larglist: /* f_larglist */
9425 #line 2615 "parse.y"
9426  {
9427  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9428  rb_parser_printf(p, "NODE_SPECIAL");
9429  }
9430  else if (((*yyvaluep).node_args)) {
9431  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9432  }
9433 }
9434 #line 9435 "parse.c"
9435  break;
9436 
9437  case YYSYMBOL_lambda_body: /* lambda_body */
9438 #line 2615 "parse.y"
9439  {
9440  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9441  rb_parser_printf(p, "NODE_SPECIAL");
9442  }
9443  else if (((*yyvaluep).node)) {
9444  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9445  }
9446 }
9447 #line 9448 "parse.c"
9448  break;
9449 
9450  case YYSYMBOL_do_block: /* do_block */
9451 #line 2615 "parse.y"
9452  {
9453  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9454  rb_parser_printf(p, "NODE_SPECIAL");
9455  }
9456  else if (((*yyvaluep).node)) {
9457  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9458  }
9459 }
9460 #line 9461 "parse.c"
9461  break;
9462 
9463  case YYSYMBOL_block_call: /* block_call */
9464 #line 2615 "parse.y"
9465  {
9466  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9467  rb_parser_printf(p, "NODE_SPECIAL");
9468  }
9469  else if (((*yyvaluep).node)) {
9470  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9471  }
9472 }
9473 #line 9474 "parse.c"
9474  break;
9475 
9476  case YYSYMBOL_method_call: /* method_call */
9477 #line 2615 "parse.y"
9478  {
9479  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9480  rb_parser_printf(p, "NODE_SPECIAL");
9481  }
9482  else if (((*yyvaluep).node)) {
9483  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9484  }
9485 }
9486 #line 9487 "parse.c"
9487  break;
9488 
9489  case YYSYMBOL_brace_block: /* brace_block */
9490 #line 2615 "parse.y"
9491  {
9492  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9493  rb_parser_printf(p, "NODE_SPECIAL");
9494  }
9495  else if (((*yyvaluep).node)) {
9496  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9497  }
9498 }
9499 #line 9500 "parse.c"
9500  break;
9501 
9502  case YYSYMBOL_brace_body: /* brace_body */
9503 #line 2615 "parse.y"
9504  {
9505  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9506  rb_parser_printf(p, "NODE_SPECIAL");
9507  }
9508  else if (((*yyvaluep).node)) {
9509  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9510  }
9511 }
9512 #line 9513 "parse.c"
9513  break;
9514 
9515  case YYSYMBOL_do_body: /* do_body */
9516 #line 2615 "parse.y"
9517  {
9518  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9519  rb_parser_printf(p, "NODE_SPECIAL");
9520  }
9521  else if (((*yyvaluep).node)) {
9522  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9523  }
9524 }
9525 #line 9526 "parse.c"
9526  break;
9527 
9528  case YYSYMBOL_case_args: /* case_args */
9529 #line 2615 "parse.y"
9530  {
9531  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9532  rb_parser_printf(p, "NODE_SPECIAL");
9533  }
9534  else if (((*yyvaluep).node)) {
9535  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9536  }
9537 }
9538 #line 9539 "parse.c"
9539  break;
9540 
9541  case YYSYMBOL_case_body: /* case_body */
9542 #line 2615 "parse.y"
9543  {
9544  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9545  rb_parser_printf(p, "NODE_SPECIAL");
9546  }
9547  else if (((*yyvaluep).node)) {
9548  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9549  }
9550 }
9551 #line 9552 "parse.c"
9552  break;
9553 
9554  case YYSYMBOL_cases: /* cases */
9555 #line 2615 "parse.y"
9556  {
9557  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9558  rb_parser_printf(p, "NODE_SPECIAL");
9559  }
9560  else if (((*yyvaluep).node)) {
9561  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9562  }
9563 }
9564 #line 9565 "parse.c"
9565  break;
9566 
9567  case YYSYMBOL_p_case_body: /* p_case_body */
9568 #line 2615 "parse.y"
9569  {
9570  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9571  rb_parser_printf(p, "NODE_SPECIAL");
9572  }
9573  else if (((*yyvaluep).node)) {
9574  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9575  }
9576 }
9577 #line 9578 "parse.c"
9578  break;
9579 
9580  case YYSYMBOL_p_cases: /* p_cases */
9581 #line 2615 "parse.y"
9582  {
9583  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9584  rb_parser_printf(p, "NODE_SPECIAL");
9585  }
9586  else if (((*yyvaluep).node)) {
9587  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9588  }
9589 }
9590 #line 9591 "parse.c"
9591  break;
9592 
9593  case YYSYMBOL_p_top_expr: /* p_top_expr */
9594 #line 2615 "parse.y"
9595  {
9596  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9597  rb_parser_printf(p, "NODE_SPECIAL");
9598  }
9599  else if (((*yyvaluep).node)) {
9600  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9601  }
9602 }
9603 #line 9604 "parse.c"
9604  break;
9605 
9606  case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
9607 #line 2615 "parse.y"
9608  {
9609  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9610  rb_parser_printf(p, "NODE_SPECIAL");
9611  }
9612  else if (((*yyvaluep).node)) {
9613  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9614  }
9615 }
9616 #line 9617 "parse.c"
9617  break;
9618 
9619  case YYSYMBOL_p_expr: /* p_expr */
9620 #line 2615 "parse.y"
9621  {
9622  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9623  rb_parser_printf(p, "NODE_SPECIAL");
9624  }
9625  else if (((*yyvaluep).node)) {
9626  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9627  }
9628 }
9629 #line 9630 "parse.c"
9630  break;
9631 
9632  case YYSYMBOL_p_as: /* p_as */
9633 #line 2615 "parse.y"
9634  {
9635  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9636  rb_parser_printf(p, "NODE_SPECIAL");
9637  }
9638  else if (((*yyvaluep).node)) {
9639  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9640  }
9641 }
9642 #line 9643 "parse.c"
9643  break;
9644 
9645  case YYSYMBOL_p_alt: /* p_alt */
9646 #line 2615 "parse.y"
9647  {
9648  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9649  rb_parser_printf(p, "NODE_SPECIAL");
9650  }
9651  else if (((*yyvaluep).node)) {
9652  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9653  }
9654 }
9655 #line 9656 "parse.c"
9656  break;
9657 
9658  case YYSYMBOL_p_expr_basic: /* p_expr_basic */
9659 #line 2615 "parse.y"
9660  {
9661  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9662  rb_parser_printf(p, "NODE_SPECIAL");
9663  }
9664  else if (((*yyvaluep).node)) {
9665  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9666  }
9667 }
9668 #line 9669 "parse.c"
9669  break;
9670 
9671  case YYSYMBOL_p_args: /* p_args */
9672 #line 2615 "parse.y"
9673  {
9674  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9675  rb_parser_printf(p, "NODE_SPECIAL");
9676  }
9677  else if (((*yyvaluep).node)) {
9678  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9679  }
9680 }
9681 #line 9682 "parse.c"
9682  break;
9683 
9684  case YYSYMBOL_p_args_head: /* p_args_head */
9685 #line 2615 "parse.y"
9686  {
9687  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9688  rb_parser_printf(p, "NODE_SPECIAL");
9689  }
9690  else if (((*yyvaluep).node)) {
9691  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9692  }
9693 }
9694 #line 9695 "parse.c"
9695  break;
9696 
9697  case YYSYMBOL_p_args_tail: /* p_args_tail */
9698 #line 2615 "parse.y"
9699  {
9700  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9701  rb_parser_printf(p, "NODE_SPECIAL");
9702  }
9703  else if (((*yyvaluep).node)) {
9704  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9705  }
9706 }
9707 #line 9708 "parse.c"
9708  break;
9709 
9710  case YYSYMBOL_p_find: /* p_find */
9711 #line 2615 "parse.y"
9712  {
9713  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9714  rb_parser_printf(p, "NODE_SPECIAL");
9715  }
9716  else if (((*yyvaluep).node)) {
9717  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9718  }
9719 }
9720 #line 9721 "parse.c"
9721  break;
9722 
9723  case YYSYMBOL_p_rest: /* p_rest */
9724 #line 2615 "parse.y"
9725  {
9726  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9727  rb_parser_printf(p, "NODE_SPECIAL");
9728  }
9729  else if (((*yyvaluep).node)) {
9730  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9731  }
9732 }
9733 #line 9734 "parse.c"
9734  break;
9735 
9736  case YYSYMBOL_p_args_post: /* p_args_post */
9737 #line 2615 "parse.y"
9738  {
9739  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9740  rb_parser_printf(p, "NODE_SPECIAL");
9741  }
9742  else if (((*yyvaluep).node)) {
9743  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9744  }
9745 }
9746 #line 9747 "parse.c"
9747  break;
9748 
9749  case YYSYMBOL_p_arg: /* p_arg */
9750 #line 2615 "parse.y"
9751  {
9752  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9753  rb_parser_printf(p, "NODE_SPECIAL");
9754  }
9755  else if (((*yyvaluep).node)) {
9756  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9757  }
9758 }
9759 #line 9760 "parse.c"
9760  break;
9761 
9762  case YYSYMBOL_p_kwargs: /* p_kwargs */
9763 #line 2615 "parse.y"
9764  {
9765  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9766  rb_parser_printf(p, "NODE_SPECIAL");
9767  }
9768  else if (((*yyvaluep).node)) {
9769  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9770  }
9771 }
9772 #line 9773 "parse.c"
9773  break;
9774 
9775  case YYSYMBOL_p_kwarg: /* p_kwarg */
9776 #line 2615 "parse.y"
9777  {
9778  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9779  rb_parser_printf(p, "NODE_SPECIAL");
9780  }
9781  else if (((*yyvaluep).node)) {
9782  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9783  }
9784 }
9785 #line 9786 "parse.c"
9786  break;
9787 
9788  case YYSYMBOL_p_kw: /* p_kw */
9789 #line 2615 "parse.y"
9790  {
9791  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9792  rb_parser_printf(p, "NODE_SPECIAL");
9793  }
9794  else if (((*yyvaluep).node)) {
9795  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9796  }
9797 }
9798 #line 9799 "parse.c"
9799  break;
9800 
9801  case YYSYMBOL_p_kw_label: /* p_kw_label */
9802 #line 2624 "parse.y"
9803  {
9804  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9805 }
9806 #line 9807 "parse.c"
9807  break;
9808 
9809  case YYSYMBOL_p_kwrest: /* p_kwrest */
9810 #line 2624 "parse.y"
9811  {
9812  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9813 }
9814 #line 9815 "parse.c"
9815  break;
9816 
9817  case YYSYMBOL_p_kwnorest: /* p_kwnorest */
9818 #line 2624 "parse.y"
9819  {
9820  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9821 }
9822 #line 9823 "parse.c"
9823  break;
9824 
9825  case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
9826 #line 2624 "parse.y"
9827  {
9828  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9829 }
9830 #line 9831 "parse.c"
9831  break;
9832 
9833  case YYSYMBOL_p_value: /* p_value */
9834 #line 2615 "parse.y"
9835  {
9836  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9837  rb_parser_printf(p, "NODE_SPECIAL");
9838  }
9839  else if (((*yyvaluep).node)) {
9840  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9841  }
9842 }
9843 #line 9844 "parse.c"
9844  break;
9845 
9846  case YYSYMBOL_p_primitive: /* p_primitive */
9847 #line 2615 "parse.y"
9848  {
9849  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9850  rb_parser_printf(p, "NODE_SPECIAL");
9851  }
9852  else if (((*yyvaluep).node)) {
9853  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9854  }
9855 }
9856 #line 9857 "parse.c"
9857  break;
9858 
9859  case YYSYMBOL_p_variable: /* p_variable */
9860 #line 2615 "parse.y"
9861  {
9862  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9863  rb_parser_printf(p, "NODE_SPECIAL");
9864  }
9865  else if (((*yyvaluep).node)) {
9866  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9867  }
9868 }
9869 #line 9870 "parse.c"
9870  break;
9871 
9872  case YYSYMBOL_p_var_ref: /* p_var_ref */
9873 #line 2615 "parse.y"
9874  {
9875  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9876  rb_parser_printf(p, "NODE_SPECIAL");
9877  }
9878  else if (((*yyvaluep).node)) {
9879  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9880  }
9881 }
9882 #line 9883 "parse.c"
9883  break;
9884 
9885  case YYSYMBOL_p_expr_ref: /* p_expr_ref */
9886 #line 2615 "parse.y"
9887  {
9888  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9889  rb_parser_printf(p, "NODE_SPECIAL");
9890  }
9891  else if (((*yyvaluep).node)) {
9892  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9893  }
9894 }
9895 #line 9896 "parse.c"
9896  break;
9897 
9898  case YYSYMBOL_p_const: /* p_const */
9899 #line 2615 "parse.y"
9900  {
9901  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9902  rb_parser_printf(p, "NODE_SPECIAL");
9903  }
9904  else if (((*yyvaluep).node)) {
9905  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9906  }
9907 }
9908 #line 9909 "parse.c"
9909  break;
9910 
9911  case YYSYMBOL_opt_rescue: /* opt_rescue */
9912 #line 2615 "parse.y"
9913  {
9914  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9915  rb_parser_printf(p, "NODE_SPECIAL");
9916  }
9917  else if (((*yyvaluep).node)) {
9918  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9919  }
9920 }
9921 #line 9922 "parse.c"
9922  break;
9923 
9924  case YYSYMBOL_exc_list: /* exc_list */
9925 #line 2615 "parse.y"
9926  {
9927  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9928  rb_parser_printf(p, "NODE_SPECIAL");
9929  }
9930  else if (((*yyvaluep).node)) {
9931  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9932  }
9933 }
9934 #line 9935 "parse.c"
9935  break;
9936 
9937  case YYSYMBOL_exc_var: /* exc_var */
9938 #line 2615 "parse.y"
9939  {
9940  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9941  rb_parser_printf(p, "NODE_SPECIAL");
9942  }
9943  else if (((*yyvaluep).node)) {
9944  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9945  }
9946 }
9947 #line 9948 "parse.c"
9948  break;
9949 
9950  case YYSYMBOL_opt_ensure: /* opt_ensure */
9951 #line 2615 "parse.y"
9952  {
9953  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9954  rb_parser_printf(p, "NODE_SPECIAL");
9955  }
9956  else if (((*yyvaluep).node)) {
9957  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9958  }
9959 }
9960 #line 9961 "parse.c"
9961  break;
9962 
9963  case YYSYMBOL_literal: /* literal */
9964 #line 2615 "parse.y"
9965  {
9966  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9967  rb_parser_printf(p, "NODE_SPECIAL");
9968  }
9969  else if (((*yyvaluep).node)) {
9970  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9971  }
9972 }
9973 #line 9974 "parse.c"
9974  break;
9975 
9976  case YYSYMBOL_strings: /* strings */
9977 #line 2615 "parse.y"
9978  {
9979  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9980  rb_parser_printf(p, "NODE_SPECIAL");
9981  }
9982  else if (((*yyvaluep).node)) {
9983  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9984  }
9985 }
9986 #line 9987 "parse.c"
9987  break;
9988 
9989  case YYSYMBOL_string: /* string */
9990 #line 2615 "parse.y"
9991  {
9992  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9993  rb_parser_printf(p, "NODE_SPECIAL");
9994  }
9995  else if (((*yyvaluep).node)) {
9996  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9997  }
9998 }
9999 #line 10000 "parse.c"
10000  break;
10001 
10002  case YYSYMBOL_string1: /* string1 */
10003 #line 2615 "parse.y"
10004  {
10005  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10006  rb_parser_printf(p, "NODE_SPECIAL");
10007  }
10008  else if (((*yyvaluep).node)) {
10009  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10010  }
10011 }
10012 #line 10013 "parse.c"
10013  break;
10014 
10015  case YYSYMBOL_xstring: /* xstring */
10016 #line 2615 "parse.y"
10017  {
10018  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10019  rb_parser_printf(p, "NODE_SPECIAL");
10020  }
10021  else if (((*yyvaluep).node)) {
10022  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10023  }
10024 }
10025 #line 10026 "parse.c"
10026  break;
10027 
10028  case YYSYMBOL_regexp: /* regexp */
10029 #line 2615 "parse.y"
10030  {
10031  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10032  rb_parser_printf(p, "NODE_SPECIAL");
10033  }
10034  else if (((*yyvaluep).node)) {
10035  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10036  }
10037 }
10038 #line 10039 "parse.c"
10039  break;
10040 
10041  case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10042 #line 2615 "parse.y"
10043  {
10044  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10045  rb_parser_printf(p, "NODE_SPECIAL");
10046  }
10047  else if (((*yyvaluep).node)) {
10048  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10049  }
10050 }
10051 #line 10052 "parse.c"
10052  break;
10053 
10054  case YYSYMBOL_words: /* words */
10055 #line 2615 "parse.y"
10056  {
10057  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10058  rb_parser_printf(p, "NODE_SPECIAL");
10059  }
10060  else if (((*yyvaluep).node)) {
10061  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10062  }
10063 }
10064 #line 10065 "parse.c"
10065  break;
10066 
10067  case YYSYMBOL_word_list: /* word_list */
10068 #line 2615 "parse.y"
10069  {
10070  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10071  rb_parser_printf(p, "NODE_SPECIAL");
10072  }
10073  else if (((*yyvaluep).node)) {
10074  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10075  }
10076 }
10077 #line 10078 "parse.c"
10078  break;
10079 
10080  case YYSYMBOL_word: /* word */
10081 #line 2615 "parse.y"
10082  {
10083  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10084  rb_parser_printf(p, "NODE_SPECIAL");
10085  }
10086  else if (((*yyvaluep).node)) {
10087  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10088  }
10089 }
10090 #line 10091 "parse.c"
10091  break;
10092 
10093  case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10094 #line 2615 "parse.y"
10095  {
10096  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10097  rb_parser_printf(p, "NODE_SPECIAL");
10098  }
10099  else if (((*yyvaluep).node)) {
10100  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10101  }
10102 }
10103 #line 10104 "parse.c"
10104  break;
10105 
10106  case YYSYMBOL_symbols: /* symbols */
10107 #line 2615 "parse.y"
10108  {
10109  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10110  rb_parser_printf(p, "NODE_SPECIAL");
10111  }
10112  else if (((*yyvaluep).node)) {
10113  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10114  }
10115 }
10116 #line 10117 "parse.c"
10117  break;
10118 
10119  case YYSYMBOL_symbol_list: /* symbol_list */
10120 #line 2615 "parse.y"
10121  {
10122  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10123  rb_parser_printf(p, "NODE_SPECIAL");
10124  }
10125  else if (((*yyvaluep).node)) {
10126  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10127  }
10128 }
10129 #line 10130 "parse.c"
10130  break;
10131 
10132  case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10133 #line 2615 "parse.y"
10134  {
10135  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10136  rb_parser_printf(p, "NODE_SPECIAL");
10137  }
10138  else if (((*yyvaluep).node)) {
10139  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10140  }
10141 }
10142 #line 10143 "parse.c"
10143  break;
10144 
10145  case YYSYMBOL_qwords: /* qwords */
10146 #line 2615 "parse.y"
10147  {
10148  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10149  rb_parser_printf(p, "NODE_SPECIAL");
10150  }
10151  else if (((*yyvaluep).node)) {
10152  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10153  }
10154 }
10155 #line 10156 "parse.c"
10156  break;
10157 
10158  case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10159 #line 2615 "parse.y"
10160  {
10161  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10162  rb_parser_printf(p, "NODE_SPECIAL");
10163  }
10164  else if (((*yyvaluep).node)) {
10165  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10166  }
10167 }
10168 #line 10169 "parse.c"
10169  break;
10170 
10171  case YYSYMBOL_qsymbols: /* qsymbols */
10172 #line 2615 "parse.y"
10173  {
10174  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10175  rb_parser_printf(p, "NODE_SPECIAL");
10176  }
10177  else if (((*yyvaluep).node)) {
10178  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10179  }
10180 }
10181 #line 10182 "parse.c"
10182  break;
10183 
10184  case YYSYMBOL_qword_list: /* qword_list */
10185 #line 2615 "parse.y"
10186  {
10187  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10188  rb_parser_printf(p, "NODE_SPECIAL");
10189  }
10190  else if (((*yyvaluep).node)) {
10191  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10192  }
10193 }
10194 #line 10195 "parse.c"
10195  break;
10196 
10197  case YYSYMBOL_qsym_list: /* qsym_list */
10198 #line 2615 "parse.y"
10199  {
10200  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10201  rb_parser_printf(p, "NODE_SPECIAL");
10202  }
10203  else if (((*yyvaluep).node)) {
10204  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10205  }
10206 }
10207 #line 10208 "parse.c"
10208  break;
10209 
10210  case YYSYMBOL_string_contents: /* string_contents */
10211 #line 2615 "parse.y"
10212  {
10213  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10214  rb_parser_printf(p, "NODE_SPECIAL");
10215  }
10216  else if (((*yyvaluep).node)) {
10217  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10218  }
10219 }
10220 #line 10221 "parse.c"
10221  break;
10222 
10223  case YYSYMBOL_xstring_contents: /* xstring_contents */
10224 #line 2615 "parse.y"
10225  {
10226  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10227  rb_parser_printf(p, "NODE_SPECIAL");
10228  }
10229  else if (((*yyvaluep).node)) {
10230  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10231  }
10232 }
10233 #line 10234 "parse.c"
10234  break;
10235 
10236  case YYSYMBOL_regexp_contents: /* regexp_contents */
10237 #line 2615 "parse.y"
10238  {
10239  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10240  rb_parser_printf(p, "NODE_SPECIAL");
10241  }
10242  else if (((*yyvaluep).node)) {
10243  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10244  }
10245 }
10246 #line 10247 "parse.c"
10247  break;
10248 
10249  case YYSYMBOL_string_content: /* string_content */
10250 #line 2615 "parse.y"
10251  {
10252  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10253  rb_parser_printf(p, "NODE_SPECIAL");
10254  }
10255  else if (((*yyvaluep).node)) {
10256  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10257  }
10258 }
10259 #line 10260 "parse.c"
10260  break;
10261 
10262  case YYSYMBOL_string_dvar: /* string_dvar */
10263 #line 2615 "parse.y"
10264  {
10265  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10266  rb_parser_printf(p, "NODE_SPECIAL");
10267  }
10268  else if (((*yyvaluep).node)) {
10269  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10270  }
10271 }
10272 #line 10273 "parse.c"
10273  break;
10274 
10275  case YYSYMBOL_symbol: /* symbol */
10276 #line 2615 "parse.y"
10277  {
10278  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10279  rb_parser_printf(p, "NODE_SPECIAL");
10280  }
10281  else if (((*yyvaluep).node)) {
10282  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10283  }
10284 }
10285 #line 10286 "parse.c"
10286  break;
10287 
10288  case YYSYMBOL_ssym: /* ssym */
10289 #line 2615 "parse.y"
10290  {
10291  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10292  rb_parser_printf(p, "NODE_SPECIAL");
10293  }
10294  else if (((*yyvaluep).node)) {
10295  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10296  }
10297 }
10298 #line 10299 "parse.c"
10299  break;
10300 
10301  case YYSYMBOL_sym: /* sym */
10302 #line 2624 "parse.y"
10303  {
10304  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10305 }
10306 #line 10307 "parse.c"
10307  break;
10308 
10309  case YYSYMBOL_dsym: /* dsym */
10310 #line 2615 "parse.y"
10311  {
10312  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10313  rb_parser_printf(p, "NODE_SPECIAL");
10314  }
10315  else if (((*yyvaluep).node)) {
10316  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10317  }
10318 }
10319 #line 10320 "parse.c"
10320  break;
10321 
10322  case YYSYMBOL_numeric: /* numeric */
10323 #line 2615 "parse.y"
10324  {
10325  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10326  rb_parser_printf(p, "NODE_SPECIAL");
10327  }
10328  else if (((*yyvaluep).node)) {
10329  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10330  }
10331 }
10332 #line 10333 "parse.c"
10333  break;
10334 
10335  case YYSYMBOL_simple_numeric: /* simple_numeric */
10336 #line 2615 "parse.y"
10337  {
10338  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10339  rb_parser_printf(p, "NODE_SPECIAL");
10340  }
10341  else if (((*yyvaluep).node)) {
10342  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10343  }
10344 }
10345 #line 10346 "parse.c"
10346  break;
10347 
10348  case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10349 #line 2624 "parse.y"
10350  {
10351  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10352 }
10353 #line 10354 "parse.c"
10354  break;
10355 
10356  case YYSYMBOL_user_variable: /* user_variable */
10357 #line 2624 "parse.y"
10358  {
10359  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10360 }
10361 #line 10362 "parse.c"
10362  break;
10363 
10364  case YYSYMBOL_keyword_variable: /* keyword_variable */
10365 #line 2624 "parse.y"
10366  {
10367  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10368 }
10369 #line 10370 "parse.c"
10370  break;
10371 
10372  case YYSYMBOL_var_ref: /* var_ref */
10373 #line 2615 "parse.y"
10374  {
10375  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10376  rb_parser_printf(p, "NODE_SPECIAL");
10377  }
10378  else if (((*yyvaluep).node)) {
10379  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10380  }
10381 }
10382 #line 10383 "parse.c"
10383  break;
10384 
10385  case YYSYMBOL_var_lhs: /* var_lhs */
10386 #line 2615 "parse.y"
10387  {
10388  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10389  rb_parser_printf(p, "NODE_SPECIAL");
10390  }
10391  else if (((*yyvaluep).node)) {
10392  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10393  }
10394 }
10395 #line 10396 "parse.c"
10396  break;
10397 
10398  case YYSYMBOL_backref: /* backref */
10399 #line 2615 "parse.y"
10400  {
10401  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10402  rb_parser_printf(p, "NODE_SPECIAL");
10403  }
10404  else if (((*yyvaluep).node)) {
10405  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10406  }
10407 }
10408 #line 10409 "parse.c"
10409  break;
10410 
10411  case YYSYMBOL_superclass: /* superclass */
10412 #line 2615 "parse.y"
10413  {
10414  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10415  rb_parser_printf(p, "NODE_SPECIAL");
10416  }
10417  else if (((*yyvaluep).node)) {
10418  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10419  }
10420 }
10421 #line 10422 "parse.c"
10422  break;
10423 
10424  case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
10425 #line 2615 "parse.y"
10426  {
10427  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10428  rb_parser_printf(p, "NODE_SPECIAL");
10429  }
10430  else if (((*yyvaluep).node_args)) {
10431  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10432  }
10433 }
10434 #line 10435 "parse.c"
10435  break;
10436 
10437  case YYSYMBOL_f_paren_args: /* f_paren_args */
10438 #line 2615 "parse.y"
10439  {
10440  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10441  rb_parser_printf(p, "NODE_SPECIAL");
10442  }
10443  else if (((*yyvaluep).node_args)) {
10444  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10445  }
10446 }
10447 #line 10448 "parse.c"
10448  break;
10449 
10450  case YYSYMBOL_f_arglist: /* f_arglist */
10451 #line 2615 "parse.y"
10452  {
10453  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10454  rb_parser_printf(p, "NODE_SPECIAL");
10455  }
10456  else if (((*yyvaluep).node_args)) {
10457  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10458  }
10459 }
10460 #line 10461 "parse.c"
10461  break;
10462 
10463  case YYSYMBOL_f_kwarg_f_kw: /* f_kwarg_f_kw */
10464 #line 2615 "parse.y"
10465  {
10466  if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10467  rb_parser_printf(p, "NODE_SPECIAL");
10468  }
10469  else if (((*yyvaluep).node_kw_arg)) {
10470  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10471  }
10472 }
10473 #line 10474 "parse.c"
10474  break;
10475 
10476  case YYSYMBOL_args_tail: /* args_tail */
10477 #line 2615 "parse.y"
10478  {
10479  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10480  rb_parser_printf(p, "NODE_SPECIAL");
10481  }
10482  else if (((*yyvaluep).node_args)) {
10483  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10484  }
10485 }
10486 #line 10487 "parse.c"
10487  break;
10488 
10489  case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
10490 #line 2615 "parse.y"
10491  {
10492  if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10493  rb_parser_printf(p, "NODE_SPECIAL");
10494  }
10495  else if (((*yyvaluep).node_opt_arg)) {
10496  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10497  }
10498 }
10499 #line 10500 "parse.c"
10500  break;
10501 
10502  case YYSYMBOL_f_optarg_arg_value: /* f_optarg_arg_value */
10503 #line 2615 "parse.y"
10504  {
10505  if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10506  rb_parser_printf(p, "NODE_SPECIAL");
10507  }
10508  else if (((*yyvaluep).node_opt_arg)) {
10509  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10510  }
10511 }
10512 #line 10513 "parse.c"
10513  break;
10514 
10515  case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
10516 #line 2615 "parse.y"
10517  {
10518  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10519  rb_parser_printf(p, "NODE_SPECIAL");
10520  }
10521  else if (((*yyvaluep).node_args)) {
10522  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10523  }
10524 }
10525 #line 10526 "parse.c"
10526  break;
10527 
10528  case YYSYMBOL_f_args: /* f_args */
10529 #line 2615 "parse.y"
10530  {
10531  if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10532  rb_parser_printf(p, "NODE_SPECIAL");
10533  }
10534  else if (((*yyvaluep).node_args)) {
10535  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10536  }
10537 }
10538 #line 10539 "parse.c"
10539  break;
10540 
10541  case YYSYMBOL_args_forward: /* args_forward */
10542 #line 2624 "parse.y"
10543  {
10544  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10545 }
10546 #line 10547 "parse.c"
10547  break;
10548 
10549  case YYSYMBOL_f_bad_arg: /* f_bad_arg */
10550 #line 2624 "parse.y"
10551  {
10552  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10553 }
10554 #line 10555 "parse.c"
10555  break;
10556 
10557  case YYSYMBOL_f_norm_arg: /* f_norm_arg */
10558 #line 2624 "parse.y"
10559  {
10560  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10561 }
10562 #line 10563 "parse.c"
10563  break;
10564 
10565  case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
10566 #line 2624 "parse.y"
10567  {
10568  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10569 }
10570 #line 10571 "parse.c"
10571  break;
10572 
10573  case YYSYMBOL_f_arg_item: /* f_arg_item */
10574 #line 2615 "parse.y"
10575  {
10576  if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
10577  rb_parser_printf(p, "NODE_SPECIAL");
10578  }
10579  else if (((*yyvaluep).node_args_aux)) {
10580  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
10581  }
10582 }
10583 #line 10584 "parse.c"
10584  break;
10585 
10586  case YYSYMBOL_f_arg: /* f_arg */
10587 #line 2615 "parse.y"
10588  {
10589  if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
10590  rb_parser_printf(p, "NODE_SPECIAL");
10591  }
10592  else if (((*yyvaluep).node_args_aux)) {
10593  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
10594  }
10595 }
10596 #line 10597 "parse.c"
10597  break;
10598 
10599  case YYSYMBOL_f_label: /* f_label */
10600 #line 2624 "parse.y"
10601  {
10602  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10603 }
10604 #line 10605 "parse.c"
10605  break;
10606 
10607  case YYSYMBOL_f_kw: /* f_kw */
10608 #line 2615 "parse.y"
10609  {
10610  if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10611  rb_parser_printf(p, "NODE_SPECIAL");
10612  }
10613  else if (((*yyvaluep).node_kw_arg)) {
10614  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10615  }
10616 }
10617 #line 10618 "parse.c"
10618  break;
10619 
10620  case YYSYMBOL_f_block_kw: /* f_block_kw */
10621 #line 2615 "parse.y"
10622  {
10623  if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10624  rb_parser_printf(p, "NODE_SPECIAL");
10625  }
10626  else if (((*yyvaluep).node_kw_arg)) {
10627  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10628  }
10629 }
10630 #line 10631 "parse.c"
10631  break;
10632 
10633  case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
10634 #line 2624 "parse.y"
10635  {
10636  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10637 }
10638 #line 10639 "parse.c"
10639  break;
10640 
10641  case YYSYMBOL_f_kwrest: /* f_kwrest */
10642 #line 2624 "parse.y"
10643  {
10644  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10645 }
10646 #line 10647 "parse.c"
10647  break;
10648 
10649  case YYSYMBOL_f_rest_arg: /* f_rest_arg */
10650 #line 2624 "parse.y"
10651  {
10652  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10653 }
10654 #line 10655 "parse.c"
10655  break;
10656 
10657  case YYSYMBOL_f_block_arg: /* f_block_arg */
10658 #line 2624 "parse.y"
10659  {
10660  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10661 }
10662 #line 10663 "parse.c"
10663  break;
10664 
10665  case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
10666 #line 2624 "parse.y"
10667  {
10668  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10669 }
10670 #line 10671 "parse.c"
10671  break;
10672 
10673  case YYSYMBOL_singleton: /* singleton */
10674 #line 2615 "parse.y"
10675  {
10676  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10677  rb_parser_printf(p, "NODE_SPECIAL");
10678  }
10679  else if (((*yyvaluep).node)) {
10680  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10681  }
10682 }
10683 #line 10684 "parse.c"
10684  break;
10685 
10686  case YYSYMBOL_assoc_list: /* assoc_list */
10687 #line 2615 "parse.y"
10688  {
10689  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10690  rb_parser_printf(p, "NODE_SPECIAL");
10691  }
10692  else if (((*yyvaluep).node)) {
10693  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10694  }
10695 }
10696 #line 10697 "parse.c"
10697  break;
10698 
10699  case YYSYMBOL_assocs: /* assocs */
10700 #line 2615 "parse.y"
10701  {
10702  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10703  rb_parser_printf(p, "NODE_SPECIAL");
10704  }
10705  else if (((*yyvaluep).node)) {
10706  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10707  }
10708 }
10709 #line 10710 "parse.c"
10710  break;
10711 
10712  case YYSYMBOL_assoc: /* assoc */
10713 #line 2615 "parse.y"
10714  {
10715  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10716  rb_parser_printf(p, "NODE_SPECIAL");
10717  }
10718  else if (((*yyvaluep).node)) {
10719  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10720  }
10721 }
10722 #line 10723 "parse.c"
10723  break;
10724 
10725  case YYSYMBOL_operation: /* operation */
10726 #line 2624 "parse.y"
10727  {
10728  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10729 }
10730 #line 10731 "parse.c"
10731  break;
10732 
10733  case YYSYMBOL_operation2: /* operation2 */
10734 #line 2624 "parse.y"
10735  {
10736  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10737 }
10738 #line 10739 "parse.c"
10739  break;
10740 
10741  case YYSYMBOL_operation3: /* operation3 */
10742 #line 2624 "parse.y"
10743  {
10744  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10745 }
10746 #line 10747 "parse.c"
10747  break;
10748 
10749  case YYSYMBOL_dot_or_colon: /* dot_or_colon */
10750 #line 2624 "parse.y"
10751  {
10752  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10753 }
10754 #line 10755 "parse.c"
10755  break;
10756 
10757  case YYSYMBOL_call_op: /* call_op */
10758 #line 2624 "parse.y"
10759  {
10760  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10761 }
10762 #line 10763 "parse.c"
10763  break;
10764 
10765  case YYSYMBOL_call_op2: /* call_op2 */
10766 #line 2624 "parse.y"
10767  {
10768  rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10769 }
10770 #line 10771 "parse.c"
10771  break;
10772 
10773  case YYSYMBOL_none: /* none */
10774 #line 2615 "parse.y"
10775  {
10776  if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10777  rb_parser_printf(p, "NODE_SPECIAL");
10778  }
10779  else if (((*yyvaluep).node)) {
10780  rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10781  }
10782 }
10783 #line 10784 "parse.c"
10784  break;
10785 
10786  default:
10787  break;
10788  }
10789  YY_IGNORE_MAYBE_UNINITIALIZED_END
10790 }
10791 
10792 
10793 /*---------------------------.
10794 | Print this symbol on YYO. |
10795 `---------------------------*/
10796 
10797 static void
10798 yy_symbol_print (FILE *yyo,
10799  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
10800 {
10801  YYFPRINTF (yyo, "%s %s (",
10802  yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
10803 
10804  YYLOCATION_PRINT (yyo, yylocationp, p);
10805  YYFPRINTF (yyo, ": ");
10806  yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
10807  YYFPRINTF (yyo, ")");
10808 }
10809 
10810 /*------------------------------------------------------------------.
10811 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
10812 | TOP (included). |
10813 `------------------------------------------------------------------*/
10814 
10815 static void
10816 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
10817 {
10818  YYFPRINTF (stderr, "Stack now");
10819  for (; yybottom <= yytop; yybottom++)
10820  {
10821  int yybot = *yybottom;
10822  YYFPRINTF (stderr, " %d", yybot);
10823  }
10824  YYFPRINTF (stderr, "\n");
10825 }
10826 
10827 # define YY_STACK_PRINT(Bottom, Top, p) \
10828 do { \
10829  if (yydebug) \
10830  yy_stack_print ((Bottom), (Top), p); \
10831 } while (0)
10832 
10833 
10834 /*------------------------------------------------.
10835 | Report that the YYRULE is going to be reduced. |
10836 `------------------------------------------------*/
10837 
10838 static void
10839 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
10840  int yyrule, struct parser_params *p)
10841 {
10842  int yylno = yyrline[yyrule];
10843  int yynrhs = yyr2[yyrule];
10844  int yyi;
10845  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
10846  yyrule - 1, yylno);
10847  /* The symbols being reduced. */
10848  for (yyi = 0; yyi < yynrhs; yyi++)
10849  {
10850  YYFPRINTF (stderr, " $%d = ", yyi + 1);
10851  yy_symbol_print (stderr,
10852  YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
10853  &yyvsp[(yyi + 1) - (yynrhs)],
10854  &(yylsp[(yyi + 1) - (yynrhs)]), p);
10855  YYFPRINTF (stderr, "\n");
10856  }
10857 }
10858 
10859 # define YY_REDUCE_PRINT(Rule, p) \
10860 do { \
10861  if (yydebug) \
10862  yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
10863 } while (0)
10864 
10865 /* Nonzero means print parse trace. It is left uninitialized so that
10866  multiple parsers can coexist. */
10867 #ifndef yydebug
10868 int yydebug;
10869 #endif
10870 #else /* !YYDEBUG */
10871 # define YYDPRINTF(Args) ((void) 0)
10872 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
10873 # define YY_STACK_PRINT(Bottom, Top, p)
10874 # define YY_REDUCE_PRINT(Rule, p)
10875 #endif /* !YYDEBUG */
10876 
10877 
10878 /* YYINITDEPTH -- initial size of the parser's stacks. */
10879 #ifndef YYINITDEPTH
10880 # define YYINITDEPTH 200
10881 #endif
10882 
10883 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
10884  if the built-in stack extension method is used).
10885 
10886  Do not make this value too large; the results are undefined if
10887  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
10888  evaluated with infinite-precision integer arithmetic. */
10889 
10890 #ifndef YYMAXDEPTH
10891 # define YYMAXDEPTH 10000
10892 #endif
10893 
10894 
10895 /* Context of a parse error. */
10896 typedef struct
10897 {
10898  yy_state_t *yyssp;
10899  yysymbol_kind_t yytoken;
10900  YYLTYPE *yylloc;
10901 } yypcontext_t;
10902 
10903 /* Put in YYARG at most YYARGN of the expected tokens given the
10904  current YYCTX, and return the number of tokens stored in YYARG. If
10905  YYARG is null, return the number of expected tokens (guaranteed to
10906  be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
10907  Return 0 if there are more than YYARGN expected tokens, yet fill
10908  YYARG up to YYARGN. */
10909 static int
10910 yypcontext_expected_tokens (const yypcontext_t *yyctx,
10911  yysymbol_kind_t yyarg[], int yyargn)
10912 {
10913  /* Actual size of YYARG. */
10914  int yycount = 0;
10915  int yyn = yypact[+*yyctx->yyssp];
10916  if (!yypact_value_is_default (yyn))
10917  {
10918  /* Start YYX at -YYN if negative to avoid negative indexes in
10919  YYCHECK. In other words, skip the first -YYN actions for
10920  this state because they are default actions. */
10921  int yyxbegin = yyn < 0 ? -yyn : 0;
10922  /* Stay within bounds of both yycheck and yytname. */
10923  int yychecklim = YYLAST - yyn + 1;
10924  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
10925  int yyx;
10926  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
10927  if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
10928  && !yytable_value_is_error (yytable[yyx + yyn]))
10929  {
10930  if (!yyarg)
10931  ++yycount;
10932  else if (yycount == yyargn)
10933  return 0;
10934  else
10935  yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
10936  }
10937  }
10938  if (yyarg && yycount == 0 && 0 < yyargn)
10939  yyarg[0] = YYSYMBOL_YYEMPTY;
10940  return yycount;
10941 }
10942 
10943 
10944 
10945 
10946 #ifndef yystrlen
10947 # if defined __GLIBC__ && defined _STRING_H
10948 # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
10949 # else
10950 /* Return the length of YYSTR. */
10951 static YYPTRDIFF_T
10952 yystrlen (const char *yystr)
10953 {
10954  YYPTRDIFF_T yylen;
10955  for (yylen = 0; yystr[yylen]; yylen++)
10956  continue;
10957  return yylen;
10958 }
10959 # endif
10960 #endif
10961 
10962 #ifndef yystpcpy
10963 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
10964 # define yystpcpy stpcpy
10965 # else
10966 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
10967  YYDEST. */
10968 static char *
10969 yystpcpy (char *yydest, const char *yysrc)
10970 {
10971  char *yyd = yydest;
10972  const char *yys = yysrc;
10973 
10974  while ((*yyd++ = *yys++) != '\0')
10975  continue;
10976 
10977  return yyd - 1;
10978 }
10979 # endif
10980 #endif
10981 
10982 #ifndef yytnamerr
10983 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
10984  quotes and backslashes, so that it's suitable for yyerror. The
10985  heuristic is that double-quoting is unnecessary unless the string
10986  contains an apostrophe, a comma, or backslash (other than
10987  backslash-backslash). YYSTR is taken from yytname. If YYRES is
10988  null, do not copy; instead, return the length of what the result
10989  would have been. */
10990 static YYPTRDIFF_T
10991 yytnamerr (char *yyres, const char *yystr)
10992 {
10993  if (*yystr == '"')
10994  {
10995  YYPTRDIFF_T yyn = 0;
10996  char const *yyp = yystr;
10997  for (;;)
10998  switch (*++yyp)
10999  {
11000  case '\'':
11001  case ',':
11002  goto do_not_strip_quotes;
11003 
11004  case '\\':
11005  if (*++yyp != '\\')
11006  goto do_not_strip_quotes;
11007  else
11008  goto append;
11009 
11010  append:
11011  default:
11012  if (yyres)
11013  yyres[yyn] = *yyp;
11014  yyn++;
11015  break;
11016 
11017  case '"':
11018  if (yyres)
11019  yyres[yyn] = '\0';
11020  return yyn;
11021  }
11022  do_not_strip_quotes: ;
11023  }
11024 
11025  if (yyres)
11026  return yystpcpy (yyres, yystr) - yyres;
11027  else
11028  return yystrlen (yystr);
11029 }
11030 #endif
11031 
11032 
11033 static int
11034 yy_syntax_error_arguments (const yypcontext_t *yyctx,
11035  yysymbol_kind_t yyarg[], int yyargn)
11036 {
11037  /* Actual size of YYARG. */
11038  int yycount = 0;
11039  /* There are many possibilities here to consider:
11040  - If this state is a consistent state with a default action, then
11041  the only way this function was invoked is if the default action
11042  is an error action. In that case, don't check for expected
11043  tokens because there are none.
11044  - The only way there can be no lookahead present (in yychar) is if
11045  this state is a consistent state with a default action. Thus,
11046  detecting the absence of a lookahead is sufficient to determine
11047  that there is no unexpected or expected token to report. In that
11048  case, just report a simple "syntax error".
11049  - Don't assume there isn't a lookahead just because this state is a
11050  consistent state with a default action. There might have been a
11051  previous inconsistent state, consistent state with a non-default
11052  action, or user semantic action that manipulated yychar.
11053  - Of course, the expected token list depends on states to have
11054  correct lookahead information, and it depends on the parser not
11055  to perform extra reductions after fetching a lookahead from the
11056  scanner and before detecting a syntax error. Thus, state merging
11057  (from LALR or IELR) and default reductions corrupt the expected
11058  token list. However, the list is correct for canonical LR with
11059  one exception: it will still contain any token that will not be
11060  accepted due to an error action in a later state.
11061  */
11062  if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11063  {
11064  int yyn;
11065  if (yyarg)
11066  yyarg[yycount] = yyctx->yytoken;
11067  ++yycount;
11068  yyn = yypcontext_expected_tokens (yyctx,
11069  yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11070  if (yyn == YYENOMEM)
11071  return YYENOMEM;
11072  else
11073  yycount += yyn;
11074  }
11075  return yycount;
11076 }
11077 
11078 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11079  about the unexpected token YYTOKEN for the state stack whose top is
11080  YYSSP.
11081 
11082  Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11083  not large enough to hold the message. In that case, also set
11084  *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11085  required number of bytes is too large to store. */
11086 static int
11087 yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11088  const yypcontext_t *yyctx, struct parser_params *p)
11089 {
11090  enum { YYARGS_MAX = 5 };
11091  /* Internationalized format string. */
11092  const char *yyformat = YY_NULLPTR;
11093  /* Arguments of yyformat: reported tokens (one for the "unexpected",
11094  one per "expected"). */
11095  yysymbol_kind_t yyarg[YYARGS_MAX];
11096  /* Cumulated lengths of YYARG. */
11097  YYPTRDIFF_T yysize = 0;
11098 
11099  /* Actual size of YYARG. */
11100  int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11101  if (yycount == YYENOMEM)
11102  return YYENOMEM;
11103 
11104  switch (yycount)
11105  {
11106 #define YYCASE_(N, S) \
11107  case N: \
11108  yyformat = S; \
11109  break
11110  default: /* Avoid compiler warnings. */
11111  YYCASE_(0, YY_("syntax error"));
11112  YYCASE_(1, YY_("syntax error, unexpected %s"));
11113  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11114  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11115  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11116  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11117 #undef YYCASE_
11118  }
11119 
11120  /* Compute error message size. Don't count the "%s"s, but reserve
11121  room for the terminator. */
11122  yysize = yystrlen (yyformat) - 2 * yycount + 1;
11123  {
11124  int yyi;
11125  for (yyi = 0; yyi < yycount; ++yyi)
11126  {
11127  YYPTRDIFF_T yysize1
11128  = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11129  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11130  yysize = yysize1;
11131  else
11132  return YYENOMEM;
11133  }
11134  }
11135 
11136  if (*yymsg_alloc < yysize)
11137  {
11138  *yymsg_alloc = 2 * yysize;
11139  if (! (yysize <= *yymsg_alloc
11140  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11141  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11142  return -1;
11143  }
11144 
11145  /* Avoid sprintf, as that infringes on the user's name space.
11146  Don't have undefined behavior even if the translation
11147  produced a string with the wrong number of "%s"s. */
11148  {
11149  char *yyp = *yymsg;
11150  int yyi = 0;
11151  while ((*yyp = *yyformat) != '\0')
11152  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11153  {
11154  yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11155  yyformat += 2;
11156  }
11157  else
11158  {
11159  ++yyp;
11160  ++yyformat;
11161  }
11162  }
11163  return 0;
11164 }
11165 
11166 
11167 /*-----------------------------------------------.
11168 | Release the memory associated to this symbol. |
11169 `-----------------------------------------------*/
11170 
11171 static void
11172 yydestruct (const char *yymsg,
11173  yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11174 {
11175  YY_USE (yyvaluep);
11176  YY_USE (yylocationp);
11177  YY_USE (p);
11178  if (!yymsg)
11179  yymsg = "Deleting";
11180  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11181 
11182  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11183  switch (yykind)
11184  {
11185  case YYSYMBOL_245_16: /* @16 */
11186 #line 2652 "parse.y"
11187  {
11188  if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11189 }
11190 #line 11191 "parse.c"
11191  break;
11192 
11193  case YYSYMBOL_246_17: /* @17 */
11194 #line 2652 "parse.y"
11195  {
11196  if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11197 }
11198 #line 11199 "parse.c"
11199  break;
11200 
11201  default:
11202  break;
11203  }
11204  YY_IGNORE_MAYBE_UNINITIALIZED_END
11205 }
11206 
11207 
11208 
11209 
11210 
11211 
11212 /*----------.
11213 | yyparse. |
11214 `----------*/
11215 
11216 int
11217 yyparse (struct parser_params *p)
11218 {
11219 /* Lookahead token kind. */
11220 int yychar;
11221 
11222 
11223 /* The semantic value of the lookahead symbol. */
11224 /* Default value used for initialization, for pacifying older GCCs
11225  or non-GCC compilers. */
11226 #ifdef __cplusplus
11227 static const YYSTYPE yyval_default = {};
11228 (void) yyval_default;
11229 #else
11230 YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11231 #endif
11232 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11233 
11234 /* Location data for the lookahead symbol. */
11235 static const YYLTYPE yyloc_default
11236 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11237  = { 1, 1, 1, 1 }
11238 # endif
11239 ;
11240 YYLTYPE yylloc = yyloc_default;
11241 
11242  /* Number of syntax errors so far. */
11243  int yynerrs = 0;
11244  YY_USE (yynerrs); /* Silence compiler warning. */
11245 
11246  yy_state_fast_t yystate = 0;
11247  /* Number of tokens to shift before error messages enabled. */
11248  int yyerrstatus = 0;
11249 
11250  /* Refer to the stacks through separate pointers, to allow yyoverflow
11251  to reallocate them elsewhere. */
11252 
11253  /* Their size. */
11254  YYPTRDIFF_T yystacksize = YYINITDEPTH;
11255 
11256  /* The state stack: array, bottom, top. */
11257  yy_state_t yyssa[YYINITDEPTH];
11258  yy_state_t *yyss = yyssa;
11259  yy_state_t *yyssp = yyss;
11260 
11261  /* The semantic value stack: array, bottom, top. */
11262  YYSTYPE yyvsa[YYINITDEPTH];
11263  YYSTYPE *yyvs = yyvsa;
11264  YYSTYPE *yyvsp = yyvs;
11265 
11266  /* The location stack: array, bottom, top. */
11267  YYLTYPE yylsa[YYINITDEPTH];
11268  YYLTYPE *yyls = yylsa;
11269  YYLTYPE *yylsp = yyls;
11270 
11271  int yyn;
11272  /* The return value of yyparse. */
11273  int yyresult;
11274  /* Lookahead symbol kind. */
11275  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11276  /* The variables used to return semantic value and location from the
11277  action routines. */
11278  YYSTYPE yyval;
11279  YYLTYPE yyloc;
11280 
11281  /* The locations where the error started and ended. */
11282  YYLTYPE yyerror_range[3];
11283 
11284  /* Buffer for error messages, and its allocated size. */
11285  char yymsgbuf[128];
11286  char *yymsg = yymsgbuf;
11287  YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11288 
11289 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11290 
11291  /* The number of symbols on the RHS of the reduced rule.
11292  Keep to zero when no symbol should be popped. */
11293  int yylen = 0;
11294 
11295  YYDPRINTF ((stderr, "Starting parse\n"));
11296 
11297  yychar = YYEMPTY; /* Cause a token to be read. */
11298 
11299 
11300  /* User initialization code. */
11301 #line 2659 "parse.y"
11302  {
11303  RUBY_SET_YYLLOC_OF_NONE(yylloc);
11304 }
11305 
11306 #line 11307 "parse.c"
11307 
11308  yylsp[0] = yylloc;
11309  goto yysetstate;
11310 
11311 
11312 /*------------------------------------------------------------.
11313 | yynewstate -- push a new state, which is found in yystate. |
11314 `------------------------------------------------------------*/
11315 yynewstate:
11316  /* In all cases, when you get here, the value and location stacks
11317  have just been pushed. So pushing a state here evens the stacks. */
11318  yyssp++;
11319 
11320 
11321 /*--------------------------------------------------------------------.
11322 | yysetstate -- set current state (the top of the stack) to yystate. |
11323 `--------------------------------------------------------------------*/
11324 yysetstate:
11325  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11326  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11327  YY_IGNORE_USELESS_CAST_BEGIN
11328  *yyssp = YY_CAST (yy_state_t, yystate);
11329  YY_IGNORE_USELESS_CAST_END
11330  YY_STACK_PRINT (yyss, yyssp, p);
11331 
11332  if (yyss + yystacksize - 1 <= yyssp)
11333 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
11334  YYNOMEM;
11335 #else
11336  {
11337  /* Get the current used size of the three stacks, in elements. */
11338  YYPTRDIFF_T yysize = yyssp - yyss + 1;
11339 
11340 # if defined yyoverflow
11341  {
11342  /* Give user a chance to reallocate the stack. Use copies of
11343  these so that the &'s don't force the real ones into
11344  memory. */
11345  yy_state_t *yyss1 = yyss;
11346  YYSTYPE *yyvs1 = yyvs;
11347  YYLTYPE *yyls1 = yyls;
11348 
11349  /* Each stack pointer address is followed by the size of the
11350  data in use in that stack, in bytes. This used to be a
11351  conditional around just the two extra args, but that might
11352  be undefined if yyoverflow is a macro. */
11353  yyoverflow (YY_("memory exhausted"),
11354  &yyss1, yysize * YYSIZEOF (*yyssp),
11355  &yyvs1, yysize * YYSIZEOF (*yyvsp),
11356  &yyls1, yysize * YYSIZEOF (*yylsp),
11357  &yystacksize);
11358  yyss = yyss1;
11359  yyvs = yyvs1;
11360  yyls = yyls1;
11361  }
11362 # else /* defined YYSTACK_RELOCATE */
11363  /* Extend the stack our own way. */
11364  if (YYMAXDEPTH <= yystacksize)
11365  YYNOMEM;
11366  yystacksize *= 2;
11367  if (YYMAXDEPTH < yystacksize)
11368  yystacksize = YYMAXDEPTH;
11369 
11370  {
11371  yy_state_t *yyss1 = yyss;
11372  union yyalloc *yyptr =
11373  YY_CAST (union yyalloc *,
11374  YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11375  if (! yyptr)
11376  YYNOMEM;
11377  YYSTACK_RELOCATE (yyss_alloc, yyss);
11378  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11379  YYSTACK_RELOCATE (yyls_alloc, yyls);
11380 # undef YYSTACK_RELOCATE
11381  if (yyss1 != yyssa)
11382  YYSTACK_FREE (yyss1);
11383  }
11384 # endif
11385 
11386  yyssp = yyss + yysize - 1;
11387  yyvsp = yyvs + yysize - 1;
11388  yylsp = yyls + yysize - 1;
11389 
11390  YY_IGNORE_USELESS_CAST_BEGIN
11391  YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11392  YY_CAST (long, yystacksize)));
11393  YY_IGNORE_USELESS_CAST_END
11394 
11395  if (yyss + yystacksize - 1 <= yyssp)
11396  YYABORT;
11397  }
11398 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11399 
11400 
11401  if (yystate == YYFINAL)
11402  YYACCEPT;
11403 
11404  goto yybackup;
11405 
11406 
11407 /*-----------.
11408 | yybackup. |
11409 `-----------*/
11410 yybackup:
11411  /* Do appropriate processing given the current state. Read a
11412  lookahead token if we need one and don't already have one. */
11413 
11414  /* First try to decide what to do without reference to lookahead token. */
11415  yyn = yypact[yystate];
11416  if (yypact_value_is_default (yyn))
11417  goto yydefault;
11418 
11419  /* Not known => get a lookahead token if don't already have one. */
11420 
11421  /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11422  if (yychar == YYEMPTY)
11423  {
11424  YYDPRINTF ((stderr, "Reading a token\n"));
11425  yychar = yylex (&yylval, &yylloc, p);
11426  }
11427 
11428  if (yychar <= END_OF_INPUT)
11429  {
11430  yychar = END_OF_INPUT;
11431  yytoken = YYSYMBOL_YYEOF;
11432  YYDPRINTF ((stderr, "Now at end of input.\n"));
11433  }
11434  else if (yychar == YYerror)
11435  {
11436  /* The scanner already issued an error message, process directly
11437  to error recovery. But do not keep the error token as
11438  lookahead, it is too special and may lead us to an endless
11439  loop in error recovery. */
11440  yychar = YYUNDEF;
11441  yytoken = YYSYMBOL_YYerror;
11442  yyerror_range[1] = yylloc;
11443  goto yyerrlab1;
11444  }
11445  else
11446  {
11447  yytoken = YYTRANSLATE (yychar);
11448  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11449  }
11450 
11451  /* If the proper action on seeing token YYTOKEN is to reduce or to
11452  detect an error, take that action. */
11453  yyn += yytoken;
11454  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11455  goto yydefault;
11456  yyn = yytable[yyn];
11457  if (yyn <= 0)
11458  {
11459  if (yytable_value_is_error (yyn))
11460  goto yyerrlab;
11461  yyn = -yyn;
11462  goto yyreduce;
11463  }
11464 
11465  /* Count tokens shifted since error; after three, turn off error
11466  status. */
11467  if (yyerrstatus)
11468  yyerrstatus--;
11469 
11470  /* Shift the lookahead token. */
11471  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11472  yystate = yyn;
11473  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11474  *++yyvsp = yylval;
11475  YY_IGNORE_MAYBE_UNINITIALIZED_END
11476  *++yylsp = yylloc;
11477  /* %after-shift code. */
11478 #line 2662 "parse.y"
11479  {after_shift(p);}
11480 #line 11481 "parse.c"
11481 
11482 
11483  /* Discard the shifted token. */
11484  yychar = YYEMPTY;
11485  goto yynewstate;
11486 
11487 
11488 /*-----------------------------------------------------------.
11489 | yydefault -- do the default action for the current state. |
11490 `-----------------------------------------------------------*/
11491 yydefault:
11492  yyn = yydefact[yystate];
11493  if (yyn == 0)
11494  goto yyerrlab;
11495  goto yyreduce;
11496 
11497 
11498 /*-----------------------------.
11499 | yyreduce -- do a reduction. |
11500 `-----------------------------*/
11501 yyreduce:
11502  /* yyn is the number of a rule to reduce with. */
11503  yylen = yyr2[yyn];
11504 
11505  /* If YYLEN is nonzero, implement the default value of the action:
11506  '$$ = $1'.
11507 
11508  Otherwise, the following line sets YYVAL to garbage.
11509  This behavior is undocumented and Bison
11510  users should not rely upon it. Assigning to YYVAL
11511  unconditionally makes the parser a bit smaller, and it avoids a
11512  GCC warning that YYVAL may be used uninitialized. */
11513  yyval = yyvsp[1-yylen];
11514  /* %before-reduce function. */
11515 #line 2663 "parse.y"
11516  {before_reduce(yylen, p);}
11517 #line 11518 "parse.c"
11518 
11519 
11520  /* Default location. */
11521  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
11522  yyerror_range[1] = yyloc;
11523  YY_REDUCE_PRINT (yyn, p);
11524  switch (yyn)
11525  {
11526  case 2: /* $@1: %empty */
11527 #line 2971 "parse.y"
11528  {
11529  SET_LEX_STATE(EXPR_BEG);
11530  local_push(p, ifndef_ripper(1)+0);
11531  /* jumps are possible in the top-level loop. */
11532  if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
11533  }
11534 #line 11535 "parse.c"
11535  break;
11536 
11537  case 3: /* program: $@1 top_compstmt */
11538 #line 2978 "parse.y"
11539  {
11540  if ((yyvsp[0].node) && !compile_for_eval) {
11541  NODE *node = (yyvsp[0].node);
11542  /* last expression should not be void */
11543  if (nd_type_p(node, NODE_BLOCK)) {
11544  while (RNODE_BLOCK(node)->nd_next) {
11545  node = RNODE_BLOCK(node)->nd_next;
11546  }
11547  node = RNODE_BLOCK(node)->nd_head;
11548  }
11549  node = remove_begin(node);
11550  void_expr(p, node);
11551  }
11552  p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), &(yyloc));
11553  /*% ripper[final]: program!($:2) %*/
11554  local_pop(p);
11555  }
11556 #line 11557 "parse.c"
11557  break;
11558 
11559  case 6: /* top_compstmt: top_stmts option_terms */
11560 #line 2998 "parse.y"
11561  {
11562  void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11563  }
11564 #line 11565 "parse.c"
11565  break;
11566 
11567  case 7: /* top_stmts: none */
11568 #line 3004 "parse.y"
11569  {
11570  (yyval.node) = NEW_BEGIN(0, &(yyloc));
11571  /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
11572  }
11573 #line 11574 "parse.c"
11574  break;
11575 
11576  case 8: /* top_stmts: top_stmt */
11577 #line 3009 "parse.y"
11578  {
11579  (yyval.node) = newline_node((yyvsp[0].node));
11580  /*% ripper: stmts_add!(stmts_new!, $:1) %*/
11581  }
11582 #line 11583 "parse.c"
11583  break;
11584 
11585  case 9: /* top_stmts: top_stmts terms top_stmt */
11586 #line 3014 "parse.y"
11587  {
11588  (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
11589  /*% ripper: stmts_add!($:1, $:3) %*/
11590  }
11591 #line 11592 "parse.c"
11592  break;
11593 
11594  case 10: /* top_stmt: stmt */
11595 #line 3021 "parse.y"
11596  {
11597  clear_block_exit(p, true);
11598  (yyval.node) = (yyvsp[0].node);
11599  }
11600 #line 11601 "parse.c"
11601  break;
11602 
11603  case 11: /* top_stmt: "'BEGIN'" begin_block */
11604 #line 3026 "parse.y"
11605  {
11606  (yyval.node) = (yyvsp[0].node);
11607  /*% ripper: $:2 %*/
11608  }
11609 #line 11610 "parse.c"
11610  break;
11611 
11612  case 12: /* block_open: '{' */
11613 #line 3032 "parse.y"
11614  {(yyval.node_exits) = init_block_exit(p);}
11615 #line 11616 "parse.c"
11616  break;
11617 
11618  case 13: /* begin_block: block_open top_compstmt '}' */
11619 #line 3035 "parse.y"
11620  {
11621  restore_block_exit(p, (yyvsp[-2].node_exits));
11622  p->eval_tree_begin = block_append(p, p->eval_tree_begin,
11623  NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
11624  (yyval.node) = NEW_BEGIN(0, &(yyloc));
11625  /*% ripper: BEGIN!($:2) %*/
11626  }
11627 #line 11628 "parse.c"
11628  break;
11629 
11630  case 14: /* $@2: %empty */
11631 #line 3048 "parse.y"
11632  {
11633  if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
11634  next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
11635  }
11636 #line 11637 "parse.c"
11637  break;
11638 
11639  case 15: /* $@3: %empty */
11640 #line 3053 "parse.y"
11641  {
11642  next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
11643  }
11644 #line 11645 "parse.c"
11645  break;
11646 
11647  case 16: /* bodystmt: compstmt lex_ctxt opt_rescue k_else $@2 compstmt $@3 opt_ensure */
11648 #line 3057 "parse.y"
11649  {
11650  (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
11651  /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
11652  }
11653 #line 11654 "parse.c"
11654  break;
11655 
11656  case 17: /* $@4: %empty */
11657 #line 3064 "parse.y"
11658  {
11659  next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
11660  }
11661 #line 11662 "parse.c"
11662  break;
11663 
11664  case 18: /* bodystmt: compstmt lex_ctxt opt_rescue $@4 opt_ensure */
11665 #line 3068 "parse.y"
11666  {
11667  (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
11668  /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
11669  }
11670 #line 11671 "parse.c"
11671  break;
11672 
11673  case 19: /* compstmt: stmts option_terms */
11674 #line 3075 "parse.y"
11675  {
11676  void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11677  }
11678 #line 11679 "parse.c"
11679  break;
11680 
11681  case 20: /* stmts: none */
11682 #line 3081 "parse.y"
11683  {
11684  (yyval.node) = NEW_BEGIN(0, &(yyloc));
11685  /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
11686  }
11687 #line 11688 "parse.c"
11688  break;
11689 
11690  case 21: /* stmts: stmt_or_begin */
11691 #line 3086 "parse.y"
11692  {
11693  (yyval.node) = newline_node((yyvsp[0].node));
11694  /*% ripper: stmts_add!(stmts_new!, $:1) %*/
11695  }
11696 #line 11697 "parse.c"
11697  break;
11698 
11699  case 22: /* stmts: stmts terms stmt_or_begin */
11700 #line 3091 "parse.y"
11701  {
11702  (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
11703  /*% ripper: stmts_add!($:1, $:3) %*/
11704  }
11705 #line 11706 "parse.c"
11706  break;
11707 
11708  case 23: /* stmt_or_begin: stmt */
11709 #line 3098 "parse.y"
11710  {
11711  (yyval.node) = (yyvsp[0].node);
11712  }
11713 #line 11714 "parse.c"
11714  break;
11715 
11716  case 24: /* $@5: %empty */
11717 #line 3102 "parse.y"
11718  {
11719  yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
11720  }
11721 #line 11722 "parse.c"
11722  break;
11723 
11724  case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
11725 #line 3106 "parse.y"
11726  {
11727  (yyval.node) = (yyvsp[0].node);
11728  }
11729 #line 11730 "parse.c"
11730  break;
11731 
11732  case 26: /* allow_exits: %empty */
11733 #line 3111 "parse.y"
11734  {(yyval.node_exits) = allow_block_exit(p);}
11735 #line 11736 "parse.c"
11736  break;
11737 
11738  case 27: /* k_END: "'END'" lex_ctxt */
11739 #line 3114 "parse.y"
11740  {
11741  (yyval.ctxt) = (yyvsp[0].ctxt);
11742  p->ctxt.in_rescue = before_rescue;
11743  /*% ripper: $:2 %*/
11744  }
11745 #line 11746 "parse.c"
11746  break;
11747 
11748  case 28: /* $@6: %empty */
11749 #line 3120 "parse.y"
11750  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
11751 #line 11752 "parse.c"
11752  break;
11753 
11754  case 29: /* stmt: "'alias'" fitem $@6 fitem */
11755 #line 3121 "parse.y"
11756  {
11757  (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
11758  /*% ripper: alias!($:2, $:4) %*/
11759  }
11760 #line 11761 "parse.c"
11761  break;
11762 
11763  case 30: /* stmt: "'alias'" "global variable" "global variable" */
11764 #line 3126 "parse.y"
11765  {
11766  (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
11767  /*% ripper: var_alias!($:2, $:3) %*/
11768  }
11769 #line 11770 "parse.c"
11770  break;
11771 
11772  case 31: /* stmt: "'alias'" "global variable" "back reference" */
11773 #line 3131 "parse.y"
11774  {
11775  char buf[2];
11776  buf[0] = '$';
11777  buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
11778  (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
11779  /*% ripper: var_alias!($:2, $:3) %*/
11780  }
11781 #line 11782 "parse.c"
11782  break;
11783 
11784  case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
11785 #line 3139 "parse.y"
11786  {
11787  static const char mesg[] = "can't make alias for the number variables";
11788  /*%%%*/
11789  yyerror1(&(yylsp[0]), mesg);
11790  /*% %*/
11791  (yyval.node) = NEW_ERROR(&(yyloc));
11792  /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
11793  }
11794 #line 11795 "parse.c"
11795  break;
11796 
11797  case 33: /* stmt: "'undef'" undef_list */
11798 #line 3148 "parse.y"
11799  {
11800  nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
11801  RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
11802  (yyval.node) = (yyvsp[0].node);
11803  /*% ripper: undef!($:2) %*/
11804  }
11805 #line 11806 "parse.c"
11806  break;
11807 
11808  case 34: /* stmt: stmt "'if' modifier" expr_value */
11809 #line 3155 "parse.y"
11810  {
11811  (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
11812  fixpos((yyval.node), (yyvsp[0].node));
11813  /*% ripper: if_mod!($:3, $:1) %*/
11814  }
11815 #line 11816 "parse.c"
11816  break;
11817 
11818  case 35: /* stmt: stmt "'unless' modifier" expr_value */
11819 #line 3161 "parse.y"
11820  {
11821  (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
11822  fixpos((yyval.node), (yyvsp[0].node));
11823  /*% ripper: unless_mod!($:3, $:1) %*/
11824  }
11825 #line 11826 "parse.c"
11826  break;
11827 
11828  case 36: /* stmt: stmt "'while' modifier" expr_value */
11829 #line 3167 "parse.y"
11830  {
11831  clear_block_exit(p, false);
11832  if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
11833  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
11834  }
11835  else {
11836  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
11837  }
11838  /*% ripper: while_mod!($:3, $:1) %*/
11839  }
11840 #line 11841 "parse.c"
11841  break;
11842 
11843  case 37: /* stmt: stmt "'until' modifier" expr_value */
11844 #line 3178 "parse.y"
11845  {
11846  clear_block_exit(p, false);
11847  if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
11848  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
11849  }
11850  else {
11851  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
11852  }
11853  /*% ripper: until_mod!($:3, $:1) %*/
11854  }
11855 #line 11856 "parse.c"
11856  break;
11857 
11858  case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
11859 #line 3189 "parse.y"
11860  {
11861  p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
11862  NODE *resq;
11863  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
11864  resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
11865  (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
11866  /*% ripper: rescue_mod!($:1, $:4) %*/
11867  }
11868 #line 11869 "parse.c"
11869  break;
11870 
11871  case 39: /* stmt: k_END allow_exits '{' compstmt '}' */
11872 #line 3198 "parse.y"
11873  {
11874  if (p->ctxt.in_def) {
11875  rb_warn0("END in method; use at_exit");
11876  }
11877  restore_block_exit(p, (yyvsp[-3].node_exits));
11878  p->ctxt = (yyvsp[-4].ctxt);
11879  {
11880  NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, &(yyloc));
11881  (yyval.node) = NEW_POSTEXE(scope, &(yyloc));
11882  }
11883  /*% ripper: END!($:compstmt) %*/
11884  }
11885 #line 11886 "parse.c"
11886  break;
11887 
11888  case 41: /* stmt: mlhs '=' lex_ctxt command_call */
11889 #line 3212 "parse.y"
11890  {
11891  value_expr((yyvsp[0].node));
11892  (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
11893  /*% ripper: massign!($:1, $:4) %*/
11894  }
11895 #line 11896 "parse.c"
11896  break;
11897 
11898  case 42: /* stmt: lhs '=' lex_ctxt mrhs */
11899 #line 3218 "parse.y"
11900  {
11901  (yyval.node) = node_assign(p, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
11902  /*% ripper: assign!($:1, $:4) %*/
11903  }
11904 #line 11905 "parse.c"
11905  break;
11906 
11907  case 43: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
11908 #line 3224 "parse.y"
11909  {
11910  p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
11911  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
11912  (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
11913  loc.beg_pos = (yylsp[-3]).beg_pos;
11914  (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
11915  (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
11916  /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
11917  }
11918 #line 11919 "parse.c"
11919  break;
11920 
11921  case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
11922 #line 3234 "parse.y"
11923  {
11924  (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
11925  /*% ripper: massign!($:1, $:4) %*/
11926  }
11927 #line 11928 "parse.c"
11928  break;
11929 
11930  case 46: /* stmt: error */
11931 #line 3240 "parse.y"
11932  {
11933  (void)yynerrs;
11934  (yyval.node) = NEW_ERROR(&(yyloc));
11935  }
11936 #line 11937 "parse.c"
11937  break;
11938 
11939  case 47: /* command_asgn: lhs '=' lex_ctxt command_rhs */
11940 #line 3247 "parse.y"
11941  {
11942  (yyval.node) = node_assign(p, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
11943  /*% ripper: assign!($:1, $:4) %*/
11944  }
11945 #line 11946 "parse.c"
11946  break;
11947 
11948  case 48: /* command_asgn: var_lhs "operator-assignment" lex_ctxt command_rhs */
11949 #line 3252 "parse.y"
11950  {
11951  (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
11952  /*% ripper: opassign!($:1, $:2, $:4) %*/
11953  }
11954 #line 11955 "parse.c"
11955  break;
11956 
11957  case 49: /* command_asgn: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
11958 #line 3257 "parse.y"
11959  {
11960  (yyval.node) = new_ary_op_assign(p, (yyvsp[-6].node), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[0].node), &(yylsp[-4]), &(yyloc), &NULL_LOC, &(yylsp[-5]), &(yylsp[-3]), &(yylsp[-2]));
11961  /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
11962 
11963  }
11964 #line 11965 "parse.c"
11965  break;
11966 
11967  case 50: /* command_asgn: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
11968 #line 3263 "parse.y"
11969  {
11970  (yyval.node) = new_attr_op_assign(p, (yyvsp[-5].node), (yyvsp[-4].id), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-3]), &(yylsp[-2]));
11971  /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
11972  }
11973 #line 11974 "parse.c"
11974  break;
11975 
11976  case 51: /* command_asgn: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
11977 #line 3263 "parse.y"
11978  {
11979  (yyval.node) = new_attr_op_assign(p, (yyvsp[-5].node), (yyvsp[-4].id), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-3]), &(yylsp[-2]));
11980  /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
11981  }
11982 #line 11983 "parse.c"
11983  break;
11984 
11985  case 52: /* command_asgn: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
11986 #line 3268 "parse.y"
11987  {
11988  YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
11989  (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
11990  /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
11991  }
11992 #line 11993 "parse.c"
11993  break;
11994 
11995  case 53: /* command_asgn: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
11996 #line 3274 "parse.y"
11997  {
11998  (yyval.node) = new_attr_op_assign(p, (yyvsp[-5].node), idCOLON2, (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-3]), &(yylsp[-2]));
11999  /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12000  }
12001 #line 12002 "parse.c"
12002  break;
12003 
12004  case 54: /* command_asgn: defn_head f_opt_paren_args '=' endless_command */
12005 #line 3279 "parse.y"
12006  {
12007  endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12008  restore_defun(p, (yyvsp[-3].node_def_temp));
12009  (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12010  ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12011  RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12012  /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12013  /*% ripper: def!($:head, $:args, $:$) %*/
12014  local_pop(p);
12015  }
12016 #line 12017 "parse.c"
12017  break;
12018 
12019  case 55: /* command_asgn: defs_head f_opt_paren_args '=' endless_command */
12020 #line 3290 "parse.y"
12021  {
12022  endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12023  restore_defun(p, (yyvsp[-3].node_def_temp));
12024  (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12025  ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12026  RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12027  /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12028  /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12029  local_pop(p);
12030  }
12031 #line 12032 "parse.c"
12032  break;
12033 
12034  case 56: /* command_asgn: backref "operator-assignment" lex_ctxt command_rhs */
12035 #line 3301 "parse.y"
12036  {
12037  VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12038  (yyval.node) = NEW_ERROR(&(yyloc));
12039  /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12040  }
12041 #line 12042 "parse.c"
12042  break;
12043 
12044  case 58: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12045 #line 3310 "parse.y"
12046  {
12047  p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12048  (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12049  /*% ripper: rescue_mod!($:1, $:4) %*/
12050  }
12051 #line 12052 "parse.c"
12052  break;
12053 
12054  case 61: /* endless_command: "'not'" option_'\n' endless_command */
12055 #line 3316 "parse.y"
12056  {
12057  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12058  /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12059  }
12060 #line 12061 "parse.c"
12061  break;
12062 
12063  case 62: /* command_rhs: command_call */
12064 #line 3323 "parse.y"
12065  {
12066  value_expr((yyvsp[0].node));
12067  (yyval.node) = (yyvsp[0].node);
12068  }
12069 #line 12070 "parse.c"
12070  break;
12071 
12072  case 63: /* command_rhs: command_call "'rescue' modifier" after_rescue stmt */
12073 #line 3328 "parse.y"
12074  {
12075  p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12076  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12077  value_expr((yyvsp[-3].node));
12078  (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12079  /*% ripper: rescue_mod!($:1, $:4) %*/
12080  }
12081 #line 12082 "parse.c"
12082  break;
12083 
12084  case 66: /* expr: expr "'and'" expr */
12085 #line 3340 "parse.y"
12086  {
12087  (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12088  /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12089  }
12090 #line 12091 "parse.c"
12091  break;
12092 
12093  case 67: /* expr: expr "'or'" expr */
12094 #line 3345 "parse.y"
12095  {
12096  (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12097  /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12098  }
12099 #line 12100 "parse.c"
12100  break;
12101 
12102  case 68: /* expr: "'not'" option_'\n' expr */
12103 #line 3350 "parse.y"
12104  {
12105  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12106  /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12107  }
12108 #line 12109 "parse.c"
12109  break;
12110 
12111  case 69: /* expr: '!' command_call */
12112 #line 3355 "parse.y"
12113  {
12114  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12115  /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12116  }
12117 #line 12118 "parse.c"
12118  break;
12119 
12120  case 70: /* $@7: %empty */
12121 #line 3360 "parse.y"
12122  {
12123  value_expr((yyvsp[-1].node));
12124  }
12125 #line 12126 "parse.c"
12126  break;
12127 
12128  case 71: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12129 #line 3365 "parse.y"
12130  {
12131  pop_pktbl(p, (yyvsp[-1].tbl));
12132  pop_pvtbl(p, (yyvsp[-2].tbl));
12133  p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12134  (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), 0, 0, &(yylsp[0])), &(yyloc), &NULL_LOC, &NULL_LOC);
12135  /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12136  }
12137 #line 12138 "parse.c"
12138  break;
12139 
12140  case 72: /* $@8: %empty */
12141 #line 3373 "parse.y"
12142  {
12143  value_expr((yyvsp[-1].node));
12144  }
12145 #line 12146 "parse.c"
12146  break;
12147 
12148  case 73: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12149 #line 3378 "parse.y"
12150  {
12151  pop_pktbl(p, (yyvsp[-1].tbl));
12152  pop_pvtbl(p, (yyvsp[-2].tbl));
12153  p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12154  (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), NEW_TRUE(&(yylsp[0])), NEW_FALSE(&(yylsp[0])), &(yylsp[0])), &(yyloc), &NULL_LOC, &NULL_LOC);
12155  /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12156  }
12157 #line 12158 "parse.c"
12158  break;
12159 
12160  case 75: /* def_name: fname */
12161 #line 3389 "parse.y"
12162  {
12163  ID fname = (yyvsp[0].id);
12164  numparam_name(p, fname);
12165  local_push(p, 0);
12166  p->ctxt.in_def = 1;
12167  p->ctxt.in_rescue = before_rescue;
12168  p->ctxt.cant_return = 0;
12169  (yyval.id) = (yyvsp[0].id);
12170  }
12171 #line 12172 "parse.c"
12172  break;
12173 
12174  case 76: /* defn_head: k_def def_name */
12175 #line 3401 "parse.y"
12176  {
12177  (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12178  (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12179  (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12180  /*% ripper: $:def_name %*/
12181  }
12182 #line 12183 "parse.c"
12183  break;
12184 
12185  case 77: /* $@9: %empty */
12186 #line 3410 "parse.y"
12187  {
12188  SET_LEX_STATE(EXPR_FNAME);
12189  }
12190 #line 12191 "parse.c"
12191  break;
12192 
12193  case 78: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12194 #line 3414 "parse.y"
12195  {
12196  SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12197  (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12198  (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12199  (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12200  /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12201  }
12202 #line 12203 "parse.c"
12203  break;
12204 
12205  case 79: /* expr_value: expr */
12206 #line 3424 "parse.y"
12207  {
12208  value_expr((yyvsp[0].node));
12209  (yyval.node) = (yyvsp[0].node);
12210  }
12211 #line 12212 "parse.c"
12212  break;
12213 
12214  case 80: /* expr_value: error */
12215 #line 3429 "parse.y"
12216  {
12217  (yyval.node) = NEW_ERROR(&(yyloc));
12218  }
12219 #line 12220 "parse.c"
12220  break;
12221 
12222  case 81: /* $@10: %empty */
12223 #line 3434 "parse.y"
12224  {COND_PUSH(1);}
12225 #line 12226 "parse.c"
12226  break;
12227 
12228  case 82: /* $@11: %empty */
12229 #line 3434 "parse.y"
12230  {COND_POP();}
12231 #line 12232 "parse.c"
12232  break;
12233 
12234  case 83: /* expr_value_do: $@10 expr_value do $@11 */
12235 #line 3435 "parse.y"
12236  {
12237  (yyval.node) = (yyvsp[-2].node);
12238  /*% ripper: $:2 %*/
12239  }
12240 #line 12241 "parse.c"
12241  break;
12242 
12243  case 87: /* block_command: block_call call_op2 operation2 command_args */
12244 #line 3447 "parse.y"
12245  {
12246  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12247  /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12248  }
12249 #line 12250 "parse.c"
12250  break;
12251 
12252  case 88: /* cmd_brace_block: "{ arg" brace_body '}' */
12253 #line 3454 "parse.y"
12254  {
12255  (yyval.node) = (yyvsp[-1].node);
12256  set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12257  /*% ripper: $:2 %*/
12258  }
12259 #line 12260 "parse.c"
12260  break;
12261 
12262  case 89: /* fcall: operation */
12263 #line 3462 "parse.y"
12264  {
12265  (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12266  /*% ripper: $:1 %*/
12267  }
12268 #line 12269 "parse.c"
12269  break;
12270 
12271  case 90: /* command: fcall command_args */
12272 #line 3469 "parse.y"
12273  {
12274  (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12275  nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12276  (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12277  /*% ripper: command!($:1, $:2) %*/
12278  }
12279 #line 12280 "parse.c"
12280  break;
12281 
12282  case 91: /* command: fcall command_args cmd_brace_block */
12283 #line 3476 "parse.y"
12284  {
12285  block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12286  (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12287  (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12288  fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12289  nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12290  /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12291  }
12292 #line 12293 "parse.c"
12293  break;
12294 
12295  case 92: /* command: primary_value call_op operation2 command_args */
12296 #line 3485 "parse.y"
12297  {
12298  (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12299  /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12300  }
12301 #line 12302 "parse.c"
12302  break;
12303 
12304  case 93: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12305 #line 3490 "parse.y"
12306  {
12307  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12308  /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12309  }
12310 #line 12311 "parse.c"
12311  break;
12312 
12313  case 94: /* command: primary_value "::" operation2 command_args */
12314 #line 3495 "parse.y"
12315  {
12316  (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12317  /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12318  }
12319 #line 12320 "parse.c"
12320  break;
12321 
12322  case 95: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12323 #line 3500 "parse.y"
12324  {
12325  (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12326  /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12327  }
12328 #line 12329 "parse.c"
12329  break;
12330 
12331  case 96: /* command: primary_value "::" "constant" '{' brace_body '}' */
12332 #line 3505 "parse.y"
12333  {
12334  set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12335  (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12336  /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12337  }
12338 #line 12339 "parse.c"
12339  break;
12340 
12341  case 97: /* command: "'super'" command_args */
12342 #line 3511 "parse.y"
12343  {
12344  (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
12345  fixpos((yyval.node), (yyvsp[0].node));
12346  /*% ripper: super!($:2) %*/
12347  }
12348 #line 12349 "parse.c"
12349  break;
12350 
12351  case 98: /* command: k_yield command_args */
12352 #line 3517 "parse.y"
12353  {
12354  (yyval.node) = new_yield(p, (yyvsp[0].node), &(yyloc));
12355  fixpos((yyval.node), (yyvsp[0].node));
12356  /*% ripper: yield!($:2) %*/
12357  }
12358 #line 12359 "parse.c"
12359  break;
12360 
12361  case 99: /* command: k_return call_args */
12362 #line 3523 "parse.y"
12363  {
12364  (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12365  /*% ripper: return!($:2) %*/
12366  }
12367 #line 12368 "parse.c"
12368  break;
12369 
12370  case 100: /* command: "'break'" call_args */
12371 #line 3528 "parse.y"
12372  {
12373  NODE *args = 0;
12374  args = ret_args(p, (yyvsp[0].node));
12375  (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12376  /*% ripper: break!($:2) %*/
12377  }
12378 #line 12379 "parse.c"
12379  break;
12380 
12381  case 101: /* command: "'next'" call_args */
12382 #line 3535 "parse.y"
12383  {
12384  NODE *args = 0;
12385  args = ret_args(p, (yyvsp[0].node));
12386  (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12387  /*% ripper: next!($:2) %*/
12388  }
12389 #line 12390 "parse.c"
12390  break;
12391 
12392  case 103: /* mlhs: "(" mlhs_inner rparen */
12393 #line 3545 "parse.y"
12394  {
12395  (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12396  /*% ripper: mlhs_paren!($:2) %*/
12397  }
12398 #line 12399 "parse.c"
12399  break;
12400 
12401  case 105: /* mlhs_inner: "(" mlhs_inner rparen */
12402 #line 3553 "parse.y"
12403  {
12404  (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12405  /*% ripper: mlhs_paren!($:2) %*/
12406  }
12407 #line 12408 "parse.c"
12408  break;
12409 
12410  case 106: /* mlhs_basic: mlhs_head */
12411 #line 3560 "parse.y"
12412  {
12413  (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12414  /*% ripper: $:1 %*/
12415  }
12416 #line 12417 "parse.c"
12417  break;
12418 
12419  case 107: /* mlhs_basic: mlhs_head mlhs_item */
12420 #line 3565 "parse.y"
12421  {
12422  (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12423  /*% ripper: mlhs_add!($:1, $:2) %*/
12424  }
12425 #line 12426 "parse.c"
12426  break;
12427 
12428  case 108: /* mlhs_basic: mlhs_head "*" mlhs_node */
12429 #line 3570 "parse.y"
12430  {
12431  (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12432  /*% ripper: mlhs_add_star!($:1, $:3) %*/
12433  }
12434 #line 12435 "parse.c"
12435  break;
12436 
12437  case 109: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_post */
12438 #line 3575 "parse.y"
12439  {
12440  (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12441  /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12442  }
12443 #line 12444 "parse.c"
12444  break;
12445 
12446  case 110: /* mlhs_basic: mlhs_head "*" */
12447 #line 3580 "parse.y"
12448  {
12449  (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12450  /*% ripper: mlhs_add_star!($:1, Qnil) %*/
12451  }
12452 #line 12453 "parse.c"
12453  break;
12454 
12455  case 111: /* mlhs_basic: mlhs_head "*" ',' mlhs_post */
12456 #line 3585 "parse.y"
12457  {
12458  (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12459  /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
12460  }
12461 #line 12462 "parse.c"
12462  break;
12463 
12464  case 112: /* mlhs_basic: "*" mlhs_node */
12465 #line 3590 "parse.y"
12466  {
12467  (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
12468  /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
12469  }
12470 #line 12471 "parse.c"
12471  break;
12472 
12473  case 113: /* mlhs_basic: "*" mlhs_node ',' mlhs_post */
12474 #line 3595 "parse.y"
12475  {
12476  (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12477  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
12478  }
12479 #line 12480 "parse.c"
12480  break;
12481 
12482  case 114: /* mlhs_basic: "*" */
12483 #line 3600 "parse.y"
12484  {
12485  (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12486  /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
12487  }
12488 #line 12489 "parse.c"
12489  break;
12490 
12491  case 115: /* mlhs_basic: "*" ',' mlhs_post */
12492 #line 3605 "parse.y"
12493  {
12494  (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12495  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
12496  }
12497 #line 12498 "parse.c"
12498  break;
12499 
12500  case 117: /* mlhs_item: "(" mlhs_inner rparen */
12501 #line 3613 "parse.y"
12502  {
12503  (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
12504  /*% ripper: mlhs_paren!($:2) %*/
12505  }
12506 #line 12507 "parse.c"
12507  break;
12508 
12509  case 118: /* mlhs_head: mlhs_item ',' */
12510 #line 3620 "parse.y"
12511  {
12512  (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
12513  /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12514  }
12515 #line 12516 "parse.c"
12516  break;
12517 
12518  case 119: /* mlhs_head: mlhs_head mlhs_item ',' */
12519 #line 3625 "parse.y"
12520  {
12521  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
12522  /*% ripper: mlhs_add!($:1, $:2) %*/
12523  }
12524 #line 12525 "parse.c"
12525  break;
12526 
12527  case 120: /* mlhs_post: mlhs_item */
12528 #line 3632 "parse.y"
12529  {
12530  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12531  /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12532  }
12533 #line 12534 "parse.c"
12534  break;
12535 
12536  case 121: /* mlhs_post: mlhs_post ',' mlhs_item */
12537 #line 3637 "parse.y"
12538  {
12539  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12540  /*% ripper: mlhs_add!($:1, $:3) %*/
12541  }
12542 #line 12543 "parse.c"
12543  break;
12544 
12545  case 122: /* mlhs_node: user_variable */
12546 #line 3644 "parse.y"
12547  {
12548  /*% ripper: var_field!($:1) %*/
12549  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12550  }
12551 #line 12552 "parse.c"
12552  break;
12553 
12554  case 123: /* mlhs_node: keyword_variable */
12555 #line 3644 "parse.y"
12556  {
12557  /*% ripper: var_field!($:1) %*/
12558  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12559  }
12560 #line 12561 "parse.c"
12561  break;
12562 
12563  case 124: /* mlhs_node: primary_value '[' opt_call_args rbracket */
12564 #line 3649 "parse.y"
12565  {
12566  (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
12567  /*% ripper: aref_field!($:1, $:3) %*/
12568  }
12569 #line 12570 "parse.c"
12570  break;
12571 
12572  case 125: /* mlhs_node: primary_value call_op "local variable or method" */
12573 #line 3654 "parse.y"
12574  {
12575  anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
12576  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12577  /*% ripper: field!($:1, $:2, $:3) %*/
12578  }
12579 #line 12580 "parse.c"
12580  break;
12581 
12582  case 126: /* mlhs_node: primary_value "::" "local variable or method" */
12583 #line 3660 "parse.y"
12584  {
12585  (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
12586  /*% ripper: const_path_field!($:1, $:3) %*/
12587  }
12588 #line 12589 "parse.c"
12589  break;
12590 
12591  case 127: /* mlhs_node: primary_value call_op "constant" */
12592 #line 3665 "parse.y"
12593  {
12594  anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
12595  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12596  /*% ripper: field!($:1, $:2, $:3) %*/
12597  }
12598 #line 12599 "parse.c"
12599  break;
12600 
12601  case 128: /* mlhs_node: primary_value "::" "constant" */
12602 #line 3671 "parse.y"
12603  {
12604  /*% ripper: const_path_field!($:1, $:3) %*/
12605  (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
12606  }
12607 #line 12608 "parse.c"
12608  break;
12609 
12610  case 129: /* mlhs_node: ":: at EXPR_BEG" "constant" */
12611 #line 3676 "parse.y"
12612  {
12613  /*% ripper: top_const_field!($:2) %*/
12614  (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
12615  }
12616 #line 12617 "parse.c"
12617  break;
12618 
12619  case 130: /* mlhs_node: backref */
12620 #line 3681 "parse.y"
12621  {
12622  VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
12623  (yyval.node) = NEW_ERROR(&(yyloc));
12624  /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
12625  }
12626 #line 12627 "parse.c"
12627  break;
12628 
12629  case 131: /* lhs: user_variable */
12630 #line 3689 "parse.y"
12631  {
12632  /*% ripper: var_field!($:1) %*/
12633  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12634  }
12635 #line 12636 "parse.c"
12636  break;
12637 
12638  case 132: /* lhs: keyword_variable */
12639 #line 3689 "parse.y"
12640  {
12641  /*% ripper: var_field!($:1) %*/
12642  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12643  }
12644 #line 12645 "parse.c"
12645  break;
12646 
12647  case 133: /* lhs: primary_value '[' opt_call_args rbracket */
12648 #line 3694 "parse.y"
12649  {
12650  (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
12651  /*% ripper: aref_field!($:1, $:3) %*/
12652  }
12653 #line 12654 "parse.c"
12654  break;
12655 
12656  case 134: /* lhs: primary_value call_op "local variable or method" */
12657 #line 3699 "parse.y"
12658  {
12659  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12660  /*% ripper: field!($:1, $:2, $:3) %*/
12661  }
12662 #line 12663 "parse.c"
12663  break;
12664 
12665  case 135: /* lhs: primary_value "::" "local variable or method" */
12666 #line 3704 "parse.y"
12667  {
12668  (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
12669  /*% ripper: field!($:1, $:2, $:3) %*/
12670  }
12671 #line 12672 "parse.c"
12672  break;
12673 
12674  case 136: /* lhs: primary_value call_op "constant" */
12675 #line 3709 "parse.y"
12676  {
12677  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12678  /*% ripper: field!($:1, $:2, $:3) %*/
12679  }
12680 #line 12681 "parse.c"
12681  break;
12682 
12683  case 137: /* lhs: primary_value "::" "constant" */
12684 #line 3714 "parse.y"
12685  {
12686  /*% ripper: const_path_field!($:1, $:3) %*/
12687  (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
12688  }
12689 #line 12690 "parse.c"
12690  break;
12691 
12692  case 138: /* lhs: ":: at EXPR_BEG" "constant" */
12693 #line 3719 "parse.y"
12694  {
12695  /*% ripper: top_const_field!($:2) %*/
12696  (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
12697  }
12698 #line 12699 "parse.c"
12699  break;
12700 
12701  case 139: /* lhs: backref */
12702 #line 3724 "parse.y"
12703  {
12704  VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
12705  (yyval.node) = NEW_ERROR(&(yyloc));
12706  /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
12707  }
12708 #line 12709 "parse.c"
12709  break;
12710 
12711  case 140: /* cname: "local variable or method" */
12712 #line 3732 "parse.y"
12713  {
12714  static const char mesg[] = "class/module name must be CONSTANT";
12715  /*%%%*/
12716  yyerror1(&(yylsp[0]), mesg);
12717  /*% %*/
12718  /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
12719  }
12720 #line 12721 "parse.c"
12721  break;
12722 
12723  case 142: /* cpath: ":: at EXPR_BEG" cname */
12724 #line 3743 "parse.y"
12725  {
12726  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
12727  /*% ripper: top_const_ref!($:2) %*/
12728  }
12729 #line 12730 "parse.c"
12730  break;
12731 
12732  case 143: /* cpath: cname */
12733 #line 3748 "parse.y"
12734  {
12735  (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc));
12736  /*% ripper: const_ref!($:1) %*/
12737  }
12738 #line 12739 "parse.c"
12739  break;
12740 
12741  case 144: /* cpath: primary_value "::" cname */
12742 #line 3753 "parse.y"
12743  {
12744  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
12745  /*% ripper: const_path_ref!($:1, $:3) %*/
12746  }
12747 #line 12748 "parse.c"
12748  break;
12749 
12750  case 148: /* fname: op */
12751 #line 3762 "parse.y"
12752  {
12753  SET_LEX_STATE(EXPR_ENDFN);
12754  (yyval.id) = (yyvsp[0].id);
12755  }
12756 #line 12757 "parse.c"
12757  break;
12758 
12759  case 150: /* fitem: fname */
12760 #line 3770 "parse.y"
12761  {
12762  (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
12763  /*% ripper: symbol_literal!($:1) %*/
12764  }
12765 #line 12766 "parse.c"
12766  break;
12767 
12768  case 152: /* undef_list: fitem */
12769 #line 3778 "parse.y"
12770  {
12771  (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
12772  /*% ripper: rb_ary_new3(1, $:1) %*/
12773  }
12774 #line 12775 "parse.c"
12775  break;
12776 
12777  case 153: /* $@12: %empty */
12778 #line 3782 "parse.y"
12779  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12780 #line 12781 "parse.c"
12781  break;
12782 
12783  case 154: /* undef_list: undef_list ',' $@12 fitem */
12784 #line 3783 "parse.y"
12785  {
12786  nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
12787  rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
12788  /*% ripper: rb_ary_push($:1, $:4) %*/
12789  }
12790 #line 12791 "parse.c"
12791  break;
12792 
12793  case 155: /* op: '|' */
12794 #line 3790 "parse.y"
12795  { (yyval.id) = '|'; }
12796 #line 12797 "parse.c"
12797  break;
12798 
12799  case 156: /* op: '^' */
12800 #line 3791 "parse.y"
12801  { (yyval.id) = '^'; }
12802 #line 12803 "parse.c"
12803  break;
12804 
12805  case 157: /* op: '&' */
12806 #line 3792 "parse.y"
12807  { (yyval.id) = '&'; }
12808 #line 12809 "parse.c"
12809  break;
12810 
12811  case 158: /* op: "<=>" */
12812 #line 3793 "parse.y"
12813  { (yyval.id) = tCMP; }
12814 #line 12815 "parse.c"
12815  break;
12816 
12817  case 159: /* op: "==" */
12818 #line 3794 "parse.y"
12819  { (yyval.id) = tEQ; }
12820 #line 12821 "parse.c"
12821  break;
12822 
12823  case 160: /* op: "===" */
12824 #line 3795 "parse.y"
12825  { (yyval.id) = tEQQ; }
12826 #line 12827 "parse.c"
12827  break;
12828 
12829  case 161: /* op: "=~" */
12830 #line 3796 "parse.y"
12831  { (yyval.id) = tMATCH; }
12832 #line 12833 "parse.c"
12833  break;
12834 
12835  case 162: /* op: "!~" */
12836 #line 3797 "parse.y"
12837  { (yyval.id) = tNMATCH; }
12838 #line 12839 "parse.c"
12839  break;
12840 
12841  case 163: /* op: '>' */
12842 #line 3798 "parse.y"
12843  { (yyval.id) = '>'; }
12844 #line 12845 "parse.c"
12845  break;
12846 
12847  case 164: /* op: ">=" */
12848 #line 3799 "parse.y"
12849  { (yyval.id) = tGEQ; }
12850 #line 12851 "parse.c"
12851  break;
12852 
12853  case 165: /* op: '<' */
12854 #line 3800 "parse.y"
12855  { (yyval.id) = '<'; }
12856 #line 12857 "parse.c"
12857  break;
12858 
12859  case 166: /* op: "<=" */
12860 #line 3801 "parse.y"
12861  { (yyval.id) = tLEQ; }
12862 #line 12863 "parse.c"
12863  break;
12864 
12865  case 167: /* op: "!=" */
12866 #line 3802 "parse.y"
12867  { (yyval.id) = tNEQ; }
12868 #line 12869 "parse.c"
12869  break;
12870 
12871  case 168: /* op: "<<" */
12872 #line 3803 "parse.y"
12873  { (yyval.id) = tLSHFT; }
12874 #line 12875 "parse.c"
12875  break;
12876 
12877  case 169: /* op: ">>" */
12878 #line 3804 "parse.y"
12879  { (yyval.id) = tRSHFT; }
12880 #line 12881 "parse.c"
12881  break;
12882 
12883  case 170: /* op: '+' */
12884 #line 3805 "parse.y"
12885  { (yyval.id) = '+'; }
12886 #line 12887 "parse.c"
12887  break;
12888 
12889  case 171: /* op: '-' */
12890 #line 3806 "parse.y"
12891  { (yyval.id) = '-'; }
12892 #line 12893 "parse.c"
12893  break;
12894 
12895  case 172: /* op: '*' */
12896 #line 3807 "parse.y"
12897  { (yyval.id) = '*'; }
12898 #line 12899 "parse.c"
12899  break;
12900 
12901  case 173: /* op: "*" */
12902 #line 3808 "parse.y"
12903  { (yyval.id) = '*'; }
12904 #line 12905 "parse.c"
12905  break;
12906 
12907  case 174: /* op: '/' */
12908 #line 3809 "parse.y"
12909  { (yyval.id) = '/'; }
12910 #line 12911 "parse.c"
12911  break;
12912 
12913  case 175: /* op: '%' */
12914 #line 3810 "parse.y"
12915  { (yyval.id) = '%'; }
12916 #line 12917 "parse.c"
12917  break;
12918 
12919  case 176: /* op: "**" */
12920 #line 3811 "parse.y"
12921  { (yyval.id) = tPOW; }
12922 #line 12923 "parse.c"
12923  break;
12924 
12925  case 177: /* op: "**arg" */
12926 #line 3812 "parse.y"
12927  { (yyval.id) = tDSTAR; }
12928 #line 12929 "parse.c"
12929  break;
12930 
12931  case 178: /* op: '!' */
12932 #line 3813 "parse.y"
12933  { (yyval.id) = '!'; }
12934 #line 12935 "parse.c"
12935  break;
12936 
12937  case 179: /* op: '~' */
12938 #line 3814 "parse.y"
12939  { (yyval.id) = '~'; }
12940 #line 12941 "parse.c"
12941  break;
12942 
12943  case 180: /* op: "unary+" */
12944 #line 3815 "parse.y"
12945  { (yyval.id) = tUPLUS; }
12946 #line 12947 "parse.c"
12947  break;
12948 
12949  case 181: /* op: "unary-" */
12950 #line 3816 "parse.y"
12951  { (yyval.id) = tUMINUS; }
12952 #line 12953 "parse.c"
12953  break;
12954 
12955  case 182: /* op: "[]" */
12956 #line 3817 "parse.y"
12957  { (yyval.id) = tAREF; }
12958 #line 12959 "parse.c"
12959  break;
12960 
12961  case 183: /* op: "[]=" */
12962 #line 3818 "parse.y"
12963  { (yyval.id) = tASET; }
12964 #line 12965 "parse.c"
12965  break;
12966 
12967  case 184: /* op: '`' */
12968 #line 3819 "parse.y"
12969  { (yyval.id) = '`'; }
12970 #line 12971 "parse.c"
12971  break;
12972 
12973  case 226: /* arg: lhs '=' lex_ctxt arg_rhs */
12974 #line 3837 "parse.y"
12975  {
12976  (yyval.node) = node_assign(p, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12977  /*% ripper: assign!($:1, $:4) %*/
12978  }
12979 #line 12980 "parse.c"
12980  break;
12981 
12982  case 227: /* arg: var_lhs "operator-assignment" lex_ctxt arg_rhs */
12983 #line 3842 "parse.y"
12984  {
12985  (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12986  /*% ripper: opassign!($:1, $:2, $:4) %*/
12987  }
12988 #line 12989 "parse.c"
12989  break;
12990 
12991  case 228: /* arg: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
12992 #line 3847 "parse.y"
12993  {
12994  (yyval.node) = new_ary_op_assign(p, (yyvsp[-6].node), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[0].node), &(yylsp[-4]), &(yyloc), &NULL_LOC, &(yylsp[-5]), &(yylsp[-3]), &(yylsp[-2]));
12995  /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12996  }
12997 #line 12998 "parse.c"
12998  break;
12999 
13000  case 229: /* arg: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13001 #line 3852 "parse.y"
13002  {
13003  (yyval.node) = new_attr_op_assign(p, (yyvsp[-5].node), (yyvsp[-4].id), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-3]), &(yylsp[-2]));
13004  /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13005  }
13006 #line 13007 "parse.c"
13007  break;
13008 
13009  case 230: /* arg: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13010 #line 3857 "parse.y"
13011  {
13012  (yyval.node) = new_attr_op_assign(p, (yyvsp[-5].node), (yyvsp[-4].id), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-3]), &(yylsp[-2]));
13013  /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13014  }
13015 #line 13016 "parse.c"
13016  break;
13017 
13018  case 231: /* arg: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13019 #line 3862 "parse.y"
13020  {
13021  (yyval.node) = new_attr_op_assign(p, (yyvsp[-5].node), idCOLON2, (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-3]), &(yylsp[-2]));
13022  /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13023  }
13024 #line 13025 "parse.c"
13025  break;
13026 
13027  case 232: /* arg: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13028 #line 3867 "parse.y"
13029  {
13030  YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13031  (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13032  /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13033  }
13034 #line 13035 "parse.c"
13035  break;
13036 
13037  case 233: /* arg: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13038 #line 3873 "parse.y"
13039  {
13040  YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13041  (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13042  /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13043  }
13044 #line 13045 "parse.c"
13045  break;
13046 
13047  case 234: /* arg: backref "operator-assignment" lex_ctxt arg_rhs */
13048 #line 3879 "parse.y"
13049  {
13050  VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13051  (yyval.node) = NEW_ERROR(&(yyloc));
13052  /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13053  }
13054 #line 13055 "parse.c"
13055  break;
13056 
13057  case 235: /* arg: arg ".." arg */
13058 #line 3885 "parse.y"
13059  {
13060  value_expr((yyvsp[-2].node));
13061  value_expr((yyvsp[0].node));
13062  (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13063  /*% ripper: dot2!($:1, $:3) %*/
13064  }
13065 #line 13066 "parse.c"
13066  break;
13067 
13068  case 236: /* arg: arg "..." arg */
13069 #line 3892 "parse.y"
13070  {
13071  value_expr((yyvsp[-2].node));
13072  value_expr((yyvsp[0].node));
13073  (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13074  /*% ripper: dot3!($:1, $:3) %*/
13075  }
13076 #line 13077 "parse.c"
13077  break;
13078 
13079  case 237: /* arg: arg ".." */
13080 #line 3899 "parse.y"
13081  {
13082  value_expr((yyvsp[-1].node));
13083  (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
13084  /*% ripper: dot2!($:1, Qnil) %*/
13085  }
13086 #line 13087 "parse.c"
13087  break;
13088 
13089  case 238: /* arg: arg "..." */
13090 #line 3905 "parse.y"
13091  {
13092  value_expr((yyvsp[-1].node));
13093  (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
13094  /*% ripper: dot3!($:1, Qnil) %*/
13095  }
13096 #line 13097 "parse.c"
13097  break;
13098 
13099  case 239: /* arg: "(.." arg */
13100 #line 3911 "parse.y"
13101  {
13102  value_expr((yyvsp[0].node));
13103  (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc));
13104  /*% ripper: dot2!(Qnil, $:2) %*/
13105  }
13106 #line 13107 "parse.c"
13107  break;
13108 
13109  case 240: /* arg: "(..." arg */
13110 #line 3917 "parse.y"
13111  {
13112  value_expr((yyvsp[0].node));
13113  (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc));
13114  /*% ripper: dot3!(Qnil, $:2) %*/
13115  }
13116 #line 13117 "parse.c"
13117  break;
13118 
13119  case 241: /* arg: arg '+' arg */
13120 #line 3923 "parse.y"
13121  {
13122  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13123  /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13124  }
13125 #line 13126 "parse.c"
13126  break;
13127 
13128  case 242: /* arg: arg '-' arg */
13129 #line 3928 "parse.y"
13130  {
13131  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13132  /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13133  }
13134 #line 13135 "parse.c"
13135  break;
13136 
13137  case 243: /* arg: arg '*' arg */
13138 #line 3933 "parse.y"
13139  {
13140  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13141  /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13142  }
13143 #line 13144 "parse.c"
13144  break;
13145 
13146  case 244: /* arg: arg '/' arg */
13147 #line 3938 "parse.y"
13148  {
13149  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13150  /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13151  }
13152 #line 13153 "parse.c"
13153  break;
13154 
13155  case 245: /* arg: arg '%' arg */
13156 #line 3943 "parse.y"
13157  {
13158  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13159  /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13160  }
13161 #line 13162 "parse.c"
13162  break;
13163 
13164  case 246: /* arg: arg "**" arg */
13165 #line 3948 "parse.y"
13166  {
13167  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13168  /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13169  }
13170 #line 13171 "parse.c"
13171  break;
13172 
13173  case 247: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13174 #line 3953 "parse.y"
13175  {
13176  (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13177  /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13178  }
13179 #line 13180 "parse.c"
13180  break;
13181 
13182  case 248: /* arg: "unary+" arg */
13183 #line 3958 "parse.y"
13184  {
13185  (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13186  /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13187  }
13188 #line 13189 "parse.c"
13189  break;
13190 
13191  case 249: /* arg: "unary-" arg */
13192 #line 3963 "parse.y"
13193  {
13194  (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13195  /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13196  }
13197 #line 13198 "parse.c"
13198  break;
13199 
13200  case 250: /* arg: arg '|' arg */
13201 #line 3968 "parse.y"
13202  {
13203  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13204  /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13205  }
13206 #line 13207 "parse.c"
13207  break;
13208 
13209  case 251: /* arg: arg '^' arg */
13210 #line 3973 "parse.y"
13211  {
13212  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13213  /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13214  }
13215 #line 13216 "parse.c"
13216  break;
13217 
13218  case 252: /* arg: arg '&' arg */
13219 #line 3978 "parse.y"
13220  {
13221  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13222  /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13223  }
13224 #line 13225 "parse.c"
13225  break;
13226 
13227  case 253: /* arg: arg "<=>" arg */
13228 #line 3983 "parse.y"
13229  {
13230  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13231  /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13232  }
13233 #line 13234 "parse.c"
13234  break;
13235 
13236  case 255: /* arg: arg "==" arg */
13237 #line 3989 "parse.y"
13238  {
13239  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13240  /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13241  }
13242 #line 13243 "parse.c"
13243  break;
13244 
13245  case 256: /* arg: arg "===" arg */
13246 #line 3994 "parse.y"
13247  {
13248  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13249  /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13250  }
13251 #line 13252 "parse.c"
13252  break;
13253 
13254  case 257: /* arg: arg "!=" arg */
13255 #line 3999 "parse.y"
13256  {
13257  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13258  /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13259  }
13260 #line 13261 "parse.c"
13261  break;
13262 
13263  case 258: /* arg: arg "=~" arg */
13264 #line 4004 "parse.y"
13265  {
13266  (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13267  /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13268  }
13269 #line 13270 "parse.c"
13270  break;
13271 
13272  case 259: /* arg: arg "!~" arg */
13273 #line 4009 "parse.y"
13274  {
13275  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13276  /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13277  }
13278 #line 13279 "parse.c"
13279  break;
13280 
13281  case 260: /* arg: '!' arg */
13282 #line 4014 "parse.y"
13283  {
13284  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13285  /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13286  }
13287 #line 13288 "parse.c"
13288  break;
13289 
13290  case 261: /* arg: '~' arg */
13291 #line 4019 "parse.y"
13292  {
13293  (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13294  /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13295  }
13296 #line 13297 "parse.c"
13297  break;
13298 
13299  case 262: /* arg: arg "<<" arg */
13300 #line 4024 "parse.y"
13301  {
13302  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13303  /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13304  }
13305 #line 13306 "parse.c"
13306  break;
13307 
13308  case 263: /* arg: arg ">>" arg */
13309 #line 4029 "parse.y"
13310  {
13311  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13312  /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13313  }
13314 #line 13315 "parse.c"
13315  break;
13316 
13317  case 264: /* arg: arg "&&" arg */
13318 #line 4034 "parse.y"
13319  {
13320  (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13321  /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13322  }
13323 #line 13324 "parse.c"
13324  break;
13325 
13326  case 265: /* arg: arg "||" arg */
13327 #line 4039 "parse.y"
13328  {
13329  (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13330  /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13331  }
13332 #line 13333 "parse.c"
13333  break;
13334 
13335  case 266: /* arg: "'defined?'" option_'\n' begin_defined arg */
13336 #line 4044 "parse.y"
13337  {
13338  p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13339  (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc));
13340  /*% ripper: defined!($:4) %*/
13341  }
13342 #line 13343 "parse.c"
13343  break;
13344 
13345  case 267: /* arg: arg '?' arg option_'\n' ':' arg */
13346 #line 4050 "parse.y"
13347  {
13348  value_expr((yyvsp[-5].node));
13349  (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
13350  fixpos((yyval.node), (yyvsp[-5].node));
13351  /*% ripper: ifop!($:1, $:3, $:6) %*/
13352  }
13353 #line 13354 "parse.c"
13354  break;
13355 
13356  case 268: /* arg: defn_head f_opt_paren_args '=' endless_arg */
13357 #line 4057 "parse.y"
13358  {
13359  endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13360  restore_defun(p, (yyvsp[-3].node_def_temp));
13361  (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13362  ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13363  RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13364  /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13365  /*% ripper: def!($:head, $:args, $:$) %*/
13366  local_pop(p);
13367  }
13368 #line 13369 "parse.c"
13369  break;
13370 
13371  case 269: /* arg: defs_head f_opt_paren_args '=' endless_arg */
13372 #line 4068 "parse.y"
13373  {
13374  endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13375  restore_defun(p, (yyvsp[-3].node_def_temp));
13376  (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13377  ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13378  RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13379  /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13380  /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13381  local_pop(p);
13382  }
13383 #line 13384 "parse.c"
13384  break;
13385 
13386  case 270: /* arg: primary */
13387 #line 4079 "parse.y"
13388  {
13389  (yyval.node) = (yyvsp[0].node);
13390  }
13391 #line 13392 "parse.c"
13392  break;
13393 
13394  case 272: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13395 #line 4086 "parse.y"
13396  {
13397  p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13398  (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13399  /*% ripper: rescue_mod!($:1, $:4) %*/
13400  }
13401 #line 13402 "parse.c"
13402  break;
13403 
13404  case 273: /* endless_arg: "'not'" option_'\n' endless_arg */
13405 #line 4092 "parse.y"
13406  {
13407  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13408  /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13409  }
13410 #line 13411 "parse.c"
13411  break;
13412 
13413  case 274: /* relop: '>' */
13414 #line 4098 "parse.y"
13415  {(yyval.id) = '>';}
13416 #line 13417 "parse.c"
13417  break;
13418 
13419  case 275: /* relop: '<' */
13420 #line 4099 "parse.y"
13421  {(yyval.id) = '<';}
13422 #line 13423 "parse.c"
13423  break;
13424 
13425  case 276: /* relop: ">=" */
13426 #line 4100 "parse.y"
13427  {(yyval.id) = idGE;}
13428 #line 13429 "parse.c"
13429  break;
13430 
13431  case 277: /* relop: "<=" */
13432 #line 4101 "parse.y"
13433  {(yyval.id) = idLE;}
13434 #line 13435 "parse.c"
13435  break;
13436 
13437  case 278: /* rel_expr: arg relop arg */
13438 #line 4105 "parse.y"
13439  {
13440  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13441  /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13442  }
13443 #line 13444 "parse.c"
13444  break;
13445 
13446  case 279: /* rel_expr: rel_expr relop arg */
13447 #line 4110 "parse.y"
13448  {
13449  rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13450  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13451  /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13452  }
13453 #line 13454 "parse.c"
13454  break;
13455 
13456  case 280: /* lex_ctxt: none */
13457 #line 4118 "parse.y"
13458  {
13459  (yyval.ctxt) = p->ctxt;
13460  }
13461 #line 13462 "parse.c"
13462  break;
13463 
13464  case 281: /* begin_defined: lex_ctxt */
13465 #line 4124 "parse.y"
13466  {
13467  p->ctxt.in_defined = 1;
13468  (yyval.ctxt) = (yyvsp[0].ctxt);
13469  }
13470 #line 13471 "parse.c"
13471  break;
13472 
13473  case 282: /* after_rescue: lex_ctxt */
13474 #line 4131 "parse.y"
13475  {
13476  p->ctxt.in_rescue = after_rescue;
13477  (yyval.ctxt) = (yyvsp[0].ctxt);
13478  }
13479 #line 13480 "parse.c"
13480  break;
13481 
13482  case 283: /* arg_value: arg */
13483 #line 4138 "parse.y"
13484  {
13485  value_expr((yyvsp[0].node));
13486  (yyval.node) = (yyvsp[0].node);
13487  }
13488 #line 13489 "parse.c"
13489  break;
13490 
13491  case 285: /* aref_args: args trailer */
13492 #line 4146 "parse.y"
13493  {
13494  (yyval.node) = (yyvsp[-1].node);
13495  }
13496 #line 13497 "parse.c"
13497  break;
13498 
13499  case 286: /* aref_args: args ',' assocs trailer */
13500 #line 4150 "parse.y"
13501  {
13502  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13503  /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13504  }
13505 #line 13506 "parse.c"
13506  break;
13507 
13508  case 287: /* aref_args: assocs trailer */
13509 #line 4155 "parse.y"
13510  {
13511  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
13512  /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13513  }
13514 #line 13515 "parse.c"
13515  break;
13516 
13517  case 288: /* arg_rhs: arg */
13518 #line 4162 "parse.y"
13519  {
13520  value_expr((yyvsp[0].node));
13521  (yyval.node) = (yyvsp[0].node);
13522  }
13523 #line 13524 "parse.c"
13524  break;
13525 
13526  case 289: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
13527 #line 4167 "parse.y"
13528  {
13529  p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13530  value_expr((yyvsp[-3].node));
13531  (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13532  /*% ripper: rescue_mod!($:1, $:4) %*/
13533  }
13534 #line 13535 "parse.c"
13535  break;
13536 
13537  case 290: /* paren_args: '(' opt_call_args rparen */
13538 #line 4176 "parse.y"
13539  {
13540  (yyval.node) = (yyvsp[-1].node);
13541  /*% ripper: arg_paren!($:2) %*/
13542  }
13543 #line 13544 "parse.c"
13544  break;
13545 
13546  case 291: /* paren_args: '(' args ',' args_forward rparen */
13547 #line 4181 "parse.y"
13548  {
13549  if (!check_forwarding_args(p)) {
13550  (yyval.node) = 0;
13551  }
13552  else {
13553  (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
13554  /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
13555  }
13556  }
13557 #line 13558 "parse.c"
13558  break;
13559 
13560  case 292: /* paren_args: '(' args_forward rparen */
13561 #line 4191 "parse.y"
13562  {
13563  if (!check_forwarding_args(p)) {
13564  (yyval.node) = 0;
13565  }
13566  else {
13567  (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
13568  /*% ripper: arg_paren!($:2) %*/
13569  }
13570  }
13571 #line 13572 "parse.c"
13572  break;
13573 
13574  case 294: /* opt_paren_args: paren_args */
13575 #line 4204 "parse.y"
13576  {
13577  (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
13578  }
13579 #line 13580 "parse.c"
13580  break;
13581 
13582  case 297: /* opt_call_args: args ',' */
13583 #line 4212 "parse.y"
13584  {
13585  (yyval.node) = (yyvsp[-1].node);
13586  }
13587 #line 13588 "parse.c"
13588  break;
13589 
13590  case 298: /* opt_call_args: args ',' assocs ',' */
13591 #line 4216 "parse.y"
13592  {
13593  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13594  /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13595  }
13596 #line 13597 "parse.c"
13597  break;
13598 
13599  case 299: /* opt_call_args: assocs ',' */
13600 #line 4221 "parse.y"
13601  {
13602  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
13603  /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13604  }
13605 #line 13606 "parse.c"
13606  break;
13607 
13608  case 300: /* call_args: command */
13609 #line 4228 "parse.y"
13610  {
13611  value_expr((yyvsp[0].node));
13612  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13613  /*% ripper: args_add!(args_new!, $:1) %*/
13614  }
13615 #line 13616 "parse.c"
13616  break;
13617 
13618  case 301: /* call_args: args opt_block_arg */
13619 #line 4234 "parse.y"
13620  {
13621  (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
13622  /*% ripper: args_add_block!($:1, $:2) %*/
13623  }
13624 #line 13625 "parse.c"
13625  break;
13626 
13627  case 302: /* call_args: assocs opt_block_arg */
13628 #line 4239 "parse.y"
13629  {
13630  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
13631  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
13632  /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
13633  }
13634 #line 13635 "parse.c"
13635  break;
13636 
13637  case 303: /* call_args: args ',' assocs opt_block_arg */
13638 #line 4245 "parse.y"
13639  {
13640  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13641  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
13642  /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
13643  }
13644 #line 13645 "parse.c"
13645  break;
13646 
13647  case 305: /* $@13: %empty */
13648 #line 4254 "parse.y"
13649  {
13650  /* If call_args starts with a open paren '(' or '[',
13651  * look-ahead reading of the letters calls CMDARG_PUSH(0),
13652  * but the push must be done after CMDARG_PUSH(1).
13653  * So this code makes them consistent by first cancelling
13654  * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
13655  * and finally redoing CMDARG_PUSH(0).
13656  */
13657  int lookahead = 0;
13658  switch (yychar) {
13659  case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
13660  lookahead = 1;
13661  }
13662  if (lookahead) CMDARG_POP();
13663  CMDARG_PUSH(1);
13664  if (lookahead) CMDARG_PUSH(0);
13665  }
13666 #line 13667 "parse.c"
13667  break;
13668 
13669  case 306: /* command_args: $@13 call_args */
13670 #line 4272 "parse.y"
13671  {
13672  /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
13673  * but the push must be done after CMDARG_POP() in the parser.
13674  * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
13675  * CMDARG_POP() to pop 1 pushed by command_args,
13676  * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
13677  */
13678  int lookahead = 0;
13679  switch (yychar) {
13680  case tLBRACE_ARG:
13681  lookahead = 1;
13682  }
13683  if (lookahead) CMDARG_POP();
13684  CMDARG_POP();
13685  if (lookahead) CMDARG_PUSH(0);
13686  (yyval.node) = (yyvsp[0].node);
13687  /*% ripper: $:2 %*/
13688  }
13689 #line 13690 "parse.c"
13690  break;
13691 
13692  case 307: /* block_arg: "&" arg_value */
13693 #line 4293 "parse.y"
13694  {
13695  (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13696  /*% ripper: $:2 %*/
13697  }
13698 #line 13699 "parse.c"
13699  break;
13700 
13701  case 308: /* block_arg: "&" */
13702 #line 4298 "parse.y"
13703  {
13704  forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
13705  (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
13706  /*% ripper: Qnil %*/
13707  }
13708 #line 13709 "parse.c"
13709  break;
13710 
13711  case 309: /* opt_block_arg: ',' block_arg */
13712 #line 4306 "parse.y"
13713  {
13714  (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
13715  /*% ripper: $:2 %*/
13716  }
13717 #line 13718 "parse.c"
13718  break;
13719 
13720  case 310: /* opt_block_arg: none */
13721 #line 4311 "parse.y"
13722  {
13723  (yyval.node_block_pass) = 0;
13724  /*% ripper: Qfalse %*/
13725  }
13726 #line 13727 "parse.c"
13727  break;
13728 
13729  case 311: /* args: arg_value */
13730 #line 4319 "parse.y"
13731  {
13732  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13733  /*% ripper: args_add!(args_new!, $:arg_value) %*/
13734  }
13735 #line 13736 "parse.c"
13736  break;
13737 
13738  case 312: /* args: arg_splat */
13739 #line 4324 "parse.y"
13740  {
13741  (yyval.node) = (yyvsp[0].node);
13742  /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
13743  }
13744 #line 13745 "parse.c"
13745  break;
13746 
13747  case 313: /* args: args ',' arg_value */
13748 #line 4329 "parse.y"
13749  {
13750  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13751  /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
13752  }
13753 #line 13754 "parse.c"
13754  break;
13755 
13756  case 314: /* args: args ',' arg_splat */
13757 #line 4334 "parse.y"
13758  {
13759  (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
13760  /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
13761  }
13762 #line 13763 "parse.c"
13763  break;
13764 
13765  case 315: /* arg_splat: "*" arg_value */
13766 #line 4342 "parse.y"
13767  {
13768  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13769  /*% ripper: $:arg_value %*/
13770  }
13771 #line 13772 "parse.c"
13772  break;
13773 
13774  case 316: /* arg_splat: "*" */
13775 #line 4347 "parse.y"
13776  {
13777  forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
13778  (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
13779  /*% ripper: Qnil %*/
13780  }
13781 #line 13782 "parse.c"
13782  break;
13783 
13784  case 319: /* mrhs: args ',' arg_value */
13785 #line 4361 "parse.y"
13786  {
13787  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13788  /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
13789  }
13790 #line 13791 "parse.c"
13791  break;
13792 
13793  case 320: /* mrhs: args ',' "*" arg_value */
13794 #line 4366 "parse.y"
13795  {
13796  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
13797  /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
13798  }
13799 #line 13800 "parse.c"
13800  break;
13801 
13802  case 321: /* mrhs: "*" arg_value */
13803 #line 4371 "parse.y"
13804  {
13805  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13806  /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
13807  }
13808 #line 13809 "parse.c"
13809  break;
13810 
13811  case 332: /* primary: "method" */
13812 #line 4392 "parse.y"
13813  {
13814  (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13815  /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
13816  }
13817 #line 13818 "parse.c"
13818  break;
13819 
13820  case 333: /* $@14: %empty */
13821 #line 4397 "parse.y"
13822  {
13823  CMDARG_PUSH(0);
13824  }
13825 #line 13826 "parse.c"
13826  break;
13827 
13828  case 334: /* primary: k_begin $@14 bodystmt k_end */
13829 #line 4402 "parse.y"
13830  {
13831  CMDARG_POP();
13832  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
13833  (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
13834  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
13835  /*% ripper: begin!($:3) %*/
13836  }
13837 #line 13838 "parse.c"
13838  break;
13839 
13840  case 335: /* $@15: %empty */
13841 #line 4409 "parse.y"
13842  {SET_LEX_STATE(EXPR_ENDARG);}
13843 #line 13844 "parse.c"
13844  break;
13845 
13846  case 336: /* primary: "( arg" compstmt $@15 ')' */
13847 #line 4410 "parse.y"
13848  {
13849  if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
13850  (yyval.node) = (yyvsp[-2].node);
13851  /*% ripper: paren!($:2) %*/
13852  }
13853 #line 13854 "parse.c"
13854  break;
13855 
13856  case 337: /* primary: "(" compstmt ')' */
13857 #line 4416 "parse.y"
13858  {
13859  if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
13860  (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
13861  /*% ripper: paren!($:2) %*/
13862  }
13863 #line 13864 "parse.c"
13864  break;
13865 
13866  case 338: /* primary: primary_value "::" "constant" */
13867 #line 4422 "parse.y"
13868  {
13869  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
13870  /*% ripper: const_path_ref!($:1, $:3) %*/
13871  }
13872 #line 13873 "parse.c"
13873  break;
13874 
13875  case 339: /* primary: ":: at EXPR_BEG" "constant" */
13876 #line 4427 "parse.y"
13877  {
13878  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
13879  /*% ripper: top_const_ref!($:2) %*/
13880  }
13881 #line 13882 "parse.c"
13882  break;
13883 
13884  case 340: /* primary: "[" aref_args ']' */
13885 #line 4432 "parse.y"
13886  {
13887  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
13888  /*% ripper: array!($:2) %*/
13889  }
13890 #line 13891 "parse.c"
13891  break;
13892 
13893  case 341: /* primary: "{" assoc_list '}' */
13894 #line 4437 "parse.y"
13895  {
13896  (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
13897  RNODE_HASH((yyval.node))->nd_brace = TRUE;
13898  /*% ripper: hash!($:2) %*/
13899  }
13900 #line 13901 "parse.c"
13901  break;
13902 
13903  case 342: /* primary: k_return */
13904 #line 4443 "parse.y"
13905  {
13906  (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
13907  /*% ripper: return0! %*/
13908  }
13909 #line 13910 "parse.c"
13910  break;
13911 
13912  case 343: /* primary: k_yield '(' call_args rparen */
13913 #line 4448 "parse.y"
13914  {
13915  (yyval.node) = new_yield(p, (yyvsp[-1].node), &(yyloc));
13916  /*% ripper: yield!(paren!($:3)) %*/
13917  }
13918 #line 13919 "parse.c"
13919  break;
13920 
13921  case 344: /* primary: k_yield '(' rparen */
13922 #line 4453 "parse.y"
13923  {
13924  (yyval.node) = NEW_YIELD(0, &(yyloc));
13925  /*% ripper: yield!(paren!(args_new!)) %*/
13926  }
13927 #line 13928 "parse.c"
13928  break;
13929 
13930  case 345: /* primary: k_yield */
13931 #line 4458 "parse.y"
13932  {
13933  (yyval.node) = NEW_YIELD(0, &(yyloc));
13934  /*% ripper: yield0! %*/
13935  }
13936 #line 13937 "parse.c"
13937  break;
13938 
13939  case 346: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
13940 #line 4463 "parse.y"
13941  {
13942  p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
13943  (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc));
13944  /*% ripper: defined!($:5) %*/
13945  }
13946 #line 13947 "parse.c"
13947  break;
13948 
13949  case 347: /* primary: "'not'" '(' expr rparen */
13950 #line 4469 "parse.y"
13951  {
13952  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
13953  /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13954  }
13955 #line 13956 "parse.c"
13956  break;
13957 
13958  case 348: /* primary: "'not'" '(' rparen */
13959 #line 4474 "parse.y"
13960  {
13961  (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13962  /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
13963  }
13964 #line 13965 "parse.c"
13965  break;
13966 
13967  case 349: /* primary: fcall brace_block */
13968 #line 4479 "parse.y"
13969  {
13970  (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
13971  /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
13972  }
13973 #line 13974 "parse.c"
13974  break;
13975 
13976  case 351: /* primary: method_call brace_block */
13977 #line 4485 "parse.y"
13978  {
13979  block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
13980  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
13981  /*% ripper: method_add_block!($:1, $:2) %*/
13982  }
13983 #line 13984 "parse.c"
13984  break;
13985 
13986  case 353: /* primary: k_if expr_value then compstmt if_tail k_end */
13987 #line 4495 "parse.y"
13988  {
13989  (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
13990  fixpos((yyval.node), (yyvsp[-4].node));
13991  /*% ripper: if!($:2, $:4, $:5) %*/
13992  }
13993 #line 13994 "parse.c"
13994  break;
13995 
13996  case 354: /* primary: k_unless expr_value then compstmt opt_else k_end */
13997 #line 4504 "parse.y"
13998  {
13999  (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14000  fixpos((yyval.node), (yyvsp[-4].node));
14001  /*% ripper: unless!($:2, $:4, $:5) %*/
14002  }
14003 #line 14004 "parse.c"
14004  break;
14005 
14006  case 355: /* primary: k_while expr_value_do compstmt k_end */
14007 #line 4512 "parse.y"
14008  {
14009  restore_block_exit(p, (yyvsp[-3].node_exits));
14010  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14011  fixpos((yyval.node), (yyvsp[-2].node));
14012  /*% ripper: while!($:2, $:3) %*/
14013  }
14014 #line 14015 "parse.c"
14015  break;
14016 
14017  case 356: /* primary: k_until expr_value_do compstmt k_end */
14018 #line 4521 "parse.y"
14019  {
14020  restore_block_exit(p, (yyvsp[-3].node_exits));
14021  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14022  fixpos((yyval.node), (yyvsp[-2].node));
14023  /*% ripper: until!($:2, $:3) %*/
14024  }
14025 #line 14026 "parse.c"
14026  break;
14027 
14028  case 357: /* @16: %empty */
14029 #line 4528 "parse.y"
14030  {
14031  (yyval.labels) = p->case_labels;
14032  p->case_labels = CHECK_LITERAL_WHEN;
14033  }
14034 #line 14035 "parse.c"
14035  break;
14036 
14037  case 358: /* primary: k_case expr_value option_terms @16 case_body k_end */
14038 #line 4534 "parse.y"
14039  {
14040  if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14041  p->case_labels = (yyvsp[-2].labels);
14042  (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14043  fixpos((yyval.node), (yyvsp[-4].node));
14044  /*% ripper: case!($:2, $:5) %*/
14045  }
14046 #line 14047 "parse.c"
14047  break;
14048 
14049  case 359: /* @17: %empty */
14050 #line 4542 "parse.y"
14051  {
14052  (yyval.labels) = p->case_labels;
14053  p->case_labels = 0;
14054  }
14055 #line 14056 "parse.c"
14056  break;
14057 
14058  case 360: /* primary: k_case option_terms @17 case_body k_end */
14059 #line 4548 "parse.y"
14060  {
14061  if (p->case_labels) st_free_table(p->case_labels);
14062  p->case_labels = (yyvsp[-2].labels);
14063  (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14064  /*% ripper: case!(Qnil, $:4) %*/
14065  }
14066 #line 14067 "parse.c"
14067  break;
14068 
14069  case 361: /* primary: k_case expr_value option_terms p_case_body k_end */
14070 #line 4557 "parse.y"
14071  {
14072  (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14073  /*% ripper: case!($:2, $:4) %*/
14074  }
14075 #line 14076 "parse.c"
14076  break;
14077 
14078  case 362: /* primary: k_for for_var "'in'" expr_value_do compstmt k_end */
14079 #line 4564 "parse.y"
14080  {
14081  restore_block_exit(p, (yyvsp[-5].node_exits));
14082  /*
14083  * for a, b, c in e
14084  * #=>
14085  * e.each{|*x| a, b, c = x}
14086  *
14087  * for a in e
14088  * #=>
14089  * e.each{|x| a, = x}
14090  */
14091  ID id = internal_id(p);
14092  rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14093  rb_node_args_t *args;
14094  NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
14095  rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14096  tbl->ids[0] = id; /* internal id */
14097 
14098  switch (nd_type((yyvsp[-4].node))) {
14099  case NODE_LASGN:
14100  case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14101  set_nd_value(p, (yyvsp[-4].node), internal_var);
14102  id = 0;
14103  m->nd_plen = 1;
14104  m->nd_next = (yyvsp[-4].node);
14105  break;
14106  case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14107  m->nd_next = node_assign(p, (yyvsp[-4].node), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), NO_LEX_CTXT, &(yylsp[-4]));
14108  break;
14109  default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14110  m->nd_next = node_assign(p, (NODE *)NEW_MASGN(NEW_LIST((yyvsp[-4].node), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, NO_LEX_CTXT, &(yylsp[-4]));
14111  }
14112  /* {|*internal_id| <m> = internal_id; ... } */
14113  args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
14114  scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), &(yyloc));
14115  (yyval.node) = NEW_FOR((yyvsp[-2].node), scope, &(yyloc));
14116  fixpos((yyval.node), (yyvsp[-4].node));
14117  /*% ripper: for!($:2, $:4, $:5) %*/
14118  }
14119 #line 14120 "parse.c"
14120  break;
14121 
14122  case 363: /* $@18: %empty */
14123 #line 4604 "parse.y"
14124  {
14125  begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14126  }
14127 #line 14128 "parse.c"
14128  break;
14129 
14130  case 364: /* primary: k_class cpath superclass $@18 bodystmt k_end */
14131 #line 4609 "parse.y"
14132  {
14133  (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc));
14134  nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14135  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14136  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14137  /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14138  local_pop(p);
14139  p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14140  p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14141  p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14142  }
14143 #line 14144 "parse.c"
14144  break;
14145 
14146  case 365: /* $@19: %empty */
14147 #line 4621 "parse.y"
14148  {
14149  begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14150  }
14151 #line 14152 "parse.c"
14152  break;
14153 
14154  case 366: /* primary: k_class "<<" expr_value $@19 term bodystmt k_end */
14155 #line 4627 "parse.y"
14156  {
14157  (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
14158  nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14159  set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14160  fixpos((yyval.node), (yyvsp[-4].node));
14161  /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14162  local_pop(p);
14163  p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14164  p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14165  p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14166  p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14167  }
14168 #line 14169 "parse.c"
14169  break;
14170 
14171  case 367: /* $@20: %empty */
14172 #line 4640 "parse.y"
14173  {
14174  begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14175  }
14176 #line 14177 "parse.c"
14177  break;
14178 
14179  case 368: /* primary: k_module cpath $@20 bodystmt k_end */
14180 #line 4645 "parse.y"
14181  {
14182  (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
14183  nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14184  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14185  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14186  /*% ripper: module!($:cpath, $:bodystmt) %*/
14187  local_pop(p);
14188  p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14189  p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14190  p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14191  }
14192 #line 14193 "parse.c"
14193  break;
14194 
14195  case 369: /* $@21: %empty */
14196 #line 4658 "parse.y"
14197  {
14198  push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14199  }
14200 #line 14201 "parse.c"
14201  break;
14202 
14203  case 370: /* primary: defn_head f_arglist $@21 bodystmt k_end */
14204 #line 4663 "parse.y"
14205  {
14206  restore_defun(p, (yyvsp[-4].node_def_temp));
14207  (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14208  ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14209  RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14210  /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14211  local_pop(p);
14212  }
14213 #line 14214 "parse.c"
14214  break;
14215 
14216  case 371: /* $@22: %empty */
14217 #line 4673 "parse.y"
14218  {
14219  push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14220  }
14221 #line 14222 "parse.c"
14222  break;
14223 
14224  case 372: /* primary: defs_head f_arglist $@22 bodystmt k_end */
14225 #line 4678 "parse.y"
14226  {
14227  restore_defun(p, (yyvsp[-4].node_def_temp));
14228  (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14229  ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14230  RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14231  /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14232  local_pop(p);
14233  }
14234 #line 14235 "parse.c"
14235  break;
14236 
14237  case 373: /* primary: "'break'" */
14238 #line 4687 "parse.y"
14239  {
14240  (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14241  /*% ripper: break!(args_new!) %*/
14242  }
14243 #line 14244 "parse.c"
14244  break;
14245 
14246  case 374: /* primary: "'next'" */
14247 #line 4692 "parse.y"
14248  {
14249  (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14250  /*% ripper: next!(args_new!) %*/
14251  }
14252 #line 14253 "parse.c"
14253  break;
14254 
14255  case 375: /* primary: "'redo'" */
14256 #line 4697 "parse.y"
14257  {
14258  (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14259  /*% ripper: redo! %*/
14260  }
14261 #line 14262 "parse.c"
14262  break;
14263 
14264  case 376: /* primary: "'retry'" */
14265 #line 4702 "parse.y"
14266  {
14267  if (!p->ctxt.in_defined) {
14268  switch (p->ctxt.in_rescue) {
14269  case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14270  case after_rescue: /* ok */ break;
14271  case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14272  case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14273  }
14274  }
14275  (yyval.node) = NEW_RETRY(&(yyloc));
14276  /*% ripper: retry! %*/
14277  }
14278 #line 14279 "parse.c"
14279  break;
14280 
14281  case 377: /* primary_value: primary */
14282 #line 4717 "parse.y"
14283  {
14284  value_expr((yyvsp[0].node));
14285  (yyval.node) = (yyvsp[0].node);
14286  }
14287 #line 14288 "parse.c"
14288  break;
14289 
14290  case 378: /* k_begin: "'begin'" */
14291 #line 4724 "parse.y"
14292  {
14293  token_info_push(p, "begin", &(yyloc));
14294  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14295  }
14296 #line 14297 "parse.c"
14297  break;
14298 
14299  case 379: /* k_if: "'if'" */
14300 #line 4731 "parse.y"
14301  {
14302  WARN_EOL("if");
14303  token_info_push(p, "if", &(yyloc));
14304  if (p->token_info && p->token_info->nonspc &&
14305  p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14306  const char *tok = p->lex.ptok - rb_strlen_lit("if");
14307  const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14308  beg += rb_strlen_lit("else");
14309  while (beg < tok && ISSPACE(*beg)) beg++;
14310  if (beg == tok) {
14311  p->token_info->nonspc = 0;
14312  }
14313  }
14314  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14315  }
14316 #line 14317 "parse.c"
14317  break;
14318 
14319  case 380: /* k_unless: "'unless'" */
14320 #line 4749 "parse.y"
14321  {
14322  token_info_push(p, "unless", &(yyloc));
14323  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14324  }
14325 #line 14326 "parse.c"
14326  break;
14327 
14328  case 381: /* k_while: "'while'" allow_exits */
14329 #line 4756 "parse.y"
14330  {
14331  (yyval.node_exits) = (yyvsp[0].node_exits);
14332  token_info_push(p, "while", &(yyloc));
14333  push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14334  }
14335 #line 14336 "parse.c"
14336  break;
14337 
14338  case 382: /* k_until: "'until'" allow_exits */
14339 #line 4764 "parse.y"
14340  {
14341  (yyval.node_exits) = (yyvsp[0].node_exits);
14342  token_info_push(p, "until", &(yyloc));
14343  push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14344  }
14345 #line 14346 "parse.c"
14346  break;
14347 
14348  case 383: /* k_case: "'case'" */
14349 #line 4772 "parse.y"
14350  {
14351  token_info_push(p, "case", &(yyloc));
14352  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14353  }
14354 #line 14355 "parse.c"
14355  break;
14356 
14357  case 384: /* k_for: "'for'" allow_exits */
14358 #line 4779 "parse.y"
14359  {
14360  (yyval.node_exits) = (yyvsp[0].node_exits);
14361  token_info_push(p, "for", &(yyloc));
14362  push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14363  }
14364 #line 14365 "parse.c"
14365  break;
14366 
14367  case 385: /* k_class: "'class'" */
14368 #line 4787 "parse.y"
14369  {
14370  token_info_push(p, "class", &(yyloc));
14371  (yyval.ctxt) = p->ctxt;
14372  p->ctxt.in_rescue = before_rescue;
14373  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14374  }
14375 #line 14376 "parse.c"
14376  break;
14377 
14378  case 386: /* k_module: "'module'" */
14379 #line 4796 "parse.y"
14380  {
14381  token_info_push(p, "module", &(yyloc));
14382  (yyval.ctxt) = p->ctxt;
14383  p->ctxt.in_rescue = before_rescue;
14384  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14385  }
14386 #line 14387 "parse.c"
14387  break;
14388 
14389  case 387: /* k_def: "'def'" */
14390 #line 4805 "parse.y"
14391  {
14392  token_info_push(p, "def", &(yyloc));
14393  (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14394  p->ctxt.in_argdef = 1;
14395  }
14396 #line 14397 "parse.c"
14397  break;
14398 
14399  case 388: /* k_do: "'do'" */
14400 #line 4813 "parse.y"
14401  {
14402  token_info_push(p, "do", &(yyloc));
14403  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14404  }
14405 #line 14406 "parse.c"
14406  break;
14407 
14408  case 389: /* k_do_block: "'do' for block" */
14409 #line 4820 "parse.y"
14410  {
14411  token_info_push(p, "do", &(yyloc));
14412  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14413  }
14414 #line 14415 "parse.c"
14415  break;
14416 
14417  case 390: /* k_rescue: "'rescue'" */
14418 #line 4827 "parse.y"
14419  {
14420  token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14421  (yyval.ctxt) = p->ctxt;
14422  p->ctxt.in_rescue = after_rescue;
14423  }
14424 #line 14425 "parse.c"
14425  break;
14426 
14427  case 391: /* k_ensure: "'ensure'" */
14428 #line 4835 "parse.y"
14429  {
14430  token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14431  (yyval.ctxt) = p->ctxt;
14432  }
14433 #line 14434 "parse.c"
14434  break;
14435 
14436  case 392: /* k_when: "'when'" */
14437 #line 4842 "parse.y"
14438  {
14439  token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14440  }
14441 #line 14442 "parse.c"
14442  break;
14443 
14444  case 393: /* k_else: "'else'" */
14445 #line 4848 "parse.y"
14446  {
14447  token_info *ptinfo_beg = p->token_info;
14448  int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
14449  token_info_warn(p, "else", p->token_info, same, &(yyloc));
14450  if (same) {
14451  token_info e;
14452  e.next = ptinfo_beg->next;
14453  e.token = "else";
14454  token_info_setup(&e, p->lex.pbeg, &(yyloc));
14455  if (!e.nonspc) *ptinfo_beg = e;
14456  }
14457  }
14458 #line 14459 "parse.c"
14459  break;
14460 
14461  case 394: /* k_elsif: "'elsif'" */
14462 #line 4863 "parse.y"
14463  {
14464  WARN_EOL("elsif");
14465  token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
14466  }
14467 #line 14468 "parse.c"
14468  break;
14469 
14470  case 395: /* k_end: "'end'" */
14471 #line 4870 "parse.y"
14472  {
14473  token_info_pop(p, "end", &(yyloc));
14474  pop_end_expect_token_locations(p);
14475  }
14476 #line 14477 "parse.c"
14477  break;
14478 
14479  case 396: /* k_end: "dummy end" */
14480 #line 4875 "parse.y"
14481  {
14482  compile_error(p, "syntax error, unexpected end-of-input");
14483  }
14484 #line 14485 "parse.c"
14485  break;
14486 
14487  case 397: /* k_return: "'return'" */
14488 #line 4881 "parse.y"
14489  {
14490  if (p->ctxt.cant_return && !dyna_in_block(p))
14491  yyerror1(&(yylsp[0]), "Invalid return in class/module body");
14492  }
14493 #line 14494 "parse.c"
14494  break;
14495 
14496  case 398: /* k_yield: "'yield'" */
14497 #line 4888 "parse.y"
14498  {
14499  if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
14500  yyerror1(&(yylsp[0]), "Invalid yield");
14501  }
14502 #line 14503 "parse.c"
14503  break;
14504 
14505  case 405: /* if_tail: k_elsif expr_value then compstmt if_tail */
14506 #line 4907 "parse.y"
14507  {
14508  (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14509  fixpos((yyval.node), (yyvsp[-3].node));
14510  /*% ripper: elsif!($:2, $:4, $:5) %*/
14511  }
14512 #line 14513 "parse.c"
14513  break;
14514 
14515  case 407: /* opt_else: k_else compstmt */
14516 #line 4916 "parse.y"
14517  {
14518  (yyval.node) = (yyvsp[0].node);
14519  /*% ripper: else!($:2) %*/
14520  }
14521 #line 14522 "parse.c"
14522  break;
14523 
14524  case 410: /* f_marg: f_norm_arg */
14525 #line 4927 "parse.y"
14526  {
14527  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
14528  mark_lvar_used(p, (yyval.node));
14529  }
14530 #line 14531 "parse.c"
14531  break;
14532 
14533  case 411: /* f_marg: "(" f_margs rparen */
14534 #line 4932 "parse.y"
14535  {
14536  (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
14537  /*% ripper: mlhs_paren!($:2) %*/
14538  }
14539 #line 14540 "parse.c"
14540  break;
14541 
14542  case 412: /* f_marg_list: f_marg */
14543 #line 4939 "parse.y"
14544  {
14545  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14546  /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
14547  }
14548 #line 14549 "parse.c"
14549  break;
14550 
14551  case 413: /* f_marg_list: f_marg_list ',' f_marg */
14552 #line 4944 "parse.y"
14553  {
14554  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
14555  /*% ripper: mlhs_add!($:1, $:3) %*/
14556  }
14557 #line 14558 "parse.c"
14558  break;
14559 
14560  case 414: /* f_margs: f_marg_list */
14561 #line 4951 "parse.y"
14562  {
14563  (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
14564  /*% ripper: $:1 %*/
14565  }
14566 #line 14567 "parse.c"
14567  break;
14568 
14569  case 415: /* f_margs: f_marg_list ',' f_rest_marg */
14570 #line 4956 "parse.y"
14571  {
14572  (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14573  /*% ripper: mlhs_add_star!($:1, $:3) %*/
14574  }
14575 #line 14576 "parse.c"
14576  break;
14577 
14578  case 416: /* f_margs: f_marg_list ',' f_rest_marg ',' f_marg_list */
14579 #line 4961 "parse.y"
14580  {
14581  (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
14582  /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
14583  }
14584 #line 14585 "parse.c"
14585  break;
14586 
14587  case 417: /* f_margs: f_rest_marg */
14588 #line 4966 "parse.y"
14589  {
14590  (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
14591  /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
14592  }
14593 #line 14594 "parse.c"
14594  break;
14595 
14596  case 418: /* f_margs: f_rest_marg ',' f_marg_list */
14597 #line 4971 "parse.y"
14598  {
14599  (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
14600  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
14601  }
14602 #line 14603 "parse.c"
14603  break;
14604 
14605  case 419: /* f_rest_marg: "*" f_norm_arg */
14606 #line 4978 "parse.y"
14607  {
14608  /*% ripper: $:2 %*/
14609  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
14610  mark_lvar_used(p, (yyval.node));
14611  }
14612 #line 14613 "parse.c"
14613  break;
14614 
14615  case 420: /* f_rest_marg: "*" */
14616 #line 4984 "parse.y"
14617  {
14618  (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
14619  /*% ripper: Qnil %*/
14620  }
14621 #line 14622 "parse.c"
14622  break;
14623 
14624  case 422: /* f_any_kwrest: f_no_kwarg */
14625 #line 4992 "parse.y"
14626  {
14627  (yyval.id) = idNil;
14628  /*% ripper: ID2VAL(idNil) %*/
14629  }
14630 #line 14631 "parse.c"
14631  break;
14632 
14633  case 423: /* $@23: %empty */
14634 #line 4998 "parse.y"
14635  {p->ctxt.in_argdef = 0;}
14636 #line 14637 "parse.c"
14637  break;
14638 
14639  case 425: /* f_kwarg_f_block_kw: f_block_kw */
14640 #line 2938 "parse.y"
14641  {
14642  (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
14643  /*% ripper: rb_ary_new3(1, $:1) %*/
14644  }
14645 #line 14646 "parse.c"
14646  break;
14647 
14648  case 426: /* f_kwarg_f_block_kw: f_kwarg_f_block_kw ',' f_block_kw */
14649 #line 2943 "parse.y"
14650  {
14651  (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
14652  /*% ripper: rb_ary_push($:1, $:3) %*/
14653  }
14654 #line 14655 "parse.c"
14655  break;
14656 
14657  case 427: /* block_args_tail: f_kwarg_f_block_kw ',' f_kwrest opt_f_block_arg */
14658 #line 5001 "parse.y"
14659  {
14660  (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
14661  /*% ripper: [$:1, $:3, $:4] %*/
14662  }
14663 #line 14664 "parse.c"
14664  break;
14665 
14666  case 428: /* block_args_tail: f_kwarg_f_block_kw opt_f_block_arg */
14667 #line 5006 "parse.y"
14668  {
14669  (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
14670  /*% ripper: [$:1, Qnil, $:2] %*/
14671  }
14672 #line 14673 "parse.c"
14673  break;
14674 
14675  case 429: /* block_args_tail: f_any_kwrest opt_f_block_arg */
14676 #line 5011 "parse.y"
14677  {
14678  (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
14679  /*% ripper: [Qnil, $:1, $:2] %*/
14680  }
14681 #line 14682 "parse.c"
14682  break;
14683 
14684  case 430: /* block_args_tail: f_block_arg */
14685 #line 5016 "parse.y"
14686  {
14687  (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
14688  /*% ripper: [Qnil, Qnil, $:1] %*/
14689  }
14690 #line 14691 "parse.c"
14691  break;
14692 
14693  case 431: /* excessed_comma: ',' */
14694 #line 5023 "parse.y"
14695  {
14696  /* magic number for rest_id in iseq_set_arguments() */
14697  (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
14698  /*% ripper: excessed_comma! %*/
14699  }
14700 #line 14701 "parse.c"
14701  break;
14702 
14703  case 432: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
14704 #line 2916 "parse.y"
14705  {
14706  p->ctxt.in_argdef = 1;
14707  (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
14708  /*% ripper: [$:$, $:3] %*/
14709  }
14710 #line 14711 "parse.c"
14711  break;
14712 
14713  case 433: /* f_optarg_primary_value: f_opt_primary_value */
14714 #line 2925 "parse.y"
14715  {
14716  (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
14717  /*% ripper: rb_ary_new3(1, $:1) %*/
14718  }
14719 #line 14720 "parse.c"
14720  break;
14721 
14722  case 434: /* f_optarg_primary_value: f_optarg_primary_value ',' f_opt_primary_value */
14723 #line 2930 "parse.y"
14724  {
14725  (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
14726  /*% ripper: rb_ary_push($:1, $:3) %*/
14727  }
14728 #line 14729 "parse.c"
14729  break;
14730 
14731  case 435: /* opt_args_tail_block_args_tail: ',' block_args_tail */
14732 #line 2951 "parse.y"
14733  {
14734  (yyval.node_args) = (yyvsp[0].node_args);
14735  /*% ripper: $:2 %*/
14736  }
14737 #line 14738 "parse.c"
14738  break;
14739 
14740  case 436: /* opt_args_tail_block_args_tail: %empty */
14741 #line 2956 "parse.y"
14742  {
14743  (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
14744  /*% ripper: [Qnil, Qnil, Qnil] %*/
14745  }
14746 #line 14747 "parse.c"
14747  break;
14748 
14749  case 437: /* block_param: f_arg ',' f_optarg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
14750 #line 5031 "parse.y"
14751  {
14752  (yyval.node_args) = new_args(p, (yyvsp[-5].node_args_aux), (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
14753  /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
14754  }
14755 #line 14756 "parse.c"
14756  break;
14757 
14758  case 438: /* block_param: f_arg ',' f_optarg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
14759 #line 5036 "parse.y"
14760  {
14761  (yyval.node_args) = new_args(p, (yyvsp[-7].node_args_aux), (yyvsp[-5].node_opt_arg), (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
14762  /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
14763  }
14764 #line 14765 "parse.c"
14765  break;
14766 
14767  case 439: /* block_param: f_arg ',' f_optarg_primary_value opt_args_tail_block_args_tail */
14768 #line 5041 "parse.y"
14769  {
14770  (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
14771  /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
14772  }
14773 #line 14774 "parse.c"
14774  break;
14775 
14776  case 440: /* block_param: f_arg ',' f_optarg_primary_value ',' f_arg opt_args_tail_block_args_tail */
14777 #line 5046 "parse.y"
14778  {
14779  (yyval.node_args) = new_args(p, (yyvsp[-5].node_args_aux), (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
14780  /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
14781  }
14782 #line 14783 "parse.c"
14783  break;
14784 
14785  case 441: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
14786 #line 5051 "parse.y"
14787  {
14788  (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
14789  /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
14790  }
14791 #line 14792 "parse.c"
14792  break;
14793 
14794  case 442: /* block_param: f_arg excessed_comma */
14795 #line 5056 "parse.y"
14796  {
14797  (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
14798  (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
14799  /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
14800  }
14801 #line 14802 "parse.c"
14802  break;
14803 
14804  case 443: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
14805 #line 5062 "parse.y"
14806  {
14807  (yyval.node_args) = new_args(p, (yyvsp[-5].node_args_aux), 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
14808  /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
14809  }
14810 #line 14811 "parse.c"
14811  break;
14812 
14813  case 444: /* block_param: f_arg opt_args_tail_block_args_tail */
14814 #line 5067 "parse.y"
14815  {
14816  (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
14817  /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
14818  }
14819 #line 14820 "parse.c"
14820  break;
14821 
14822  case 445: /* block_param: f_optarg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
14823 #line 5072 "parse.y"
14824  {
14825  (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
14826  /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
14827  }
14828 #line 14829 "parse.c"
14829  break;
14830 
14831  case 446: /* block_param: f_optarg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
14832 #line 5077 "parse.y"
14833  {
14834  (yyval.node_args) = new_args(p, 0, (yyvsp[-5].node_opt_arg), (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
14835  /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
14836  }
14837 #line 14838 "parse.c"
14838  break;
14839 
14840  case 447: /* block_param: f_optarg_primary_value opt_args_tail_block_args_tail */
14841 #line 5082 "parse.y"
14842  {
14843  (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
14844  /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
14845  }
14846 #line 14847 "parse.c"
14847  break;
14848 
14849  case 448: /* block_param: f_optarg_primary_value ',' f_arg opt_args_tail_block_args_tail */
14850 #line 5087 "parse.y"
14851  {
14852  (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
14853  /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
14854  }
14855 #line 14856 "parse.c"
14856  break;
14857 
14858  case 449: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
14859 #line 5092 "parse.y"
14860  {
14861  (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
14862  /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
14863  }
14864 #line 14865 "parse.c"
14865  break;
14866 
14867  case 450: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
14868 #line 5097 "parse.y"
14869  {
14870  (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
14871  /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
14872  }
14873 #line 14874 "parse.c"
14874  break;
14875 
14876  case 451: /* block_param: block_args_tail */
14877 #line 5102 "parse.y"
14878  {
14879  (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
14880  /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
14881  }
14882 #line 14883 "parse.c"
14883  break;
14884 
14885  case 453: /* opt_block_param: block_param_def */
14886 #line 5110 "parse.y"
14887  {
14888  p->command_start = TRUE;
14889  }
14890 #line 14891 "parse.c"
14891  break;
14892 
14893  case 454: /* block_param_def: '|' opt_bv_decl '|' */
14894 #line 5116 "parse.y"
14895  {
14896  p->max_numparam = ORDINAL_PARAM;
14897  p->ctxt.in_argdef = 0;
14898  (yyval.node_args) = 0;
14899  /*% ripper: block_var!(params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), $:2) %*/
14900  }
14901 #line 14902 "parse.c"
14902  break;
14903 
14904  case 455: /* block_param_def: '|' block_param opt_bv_decl '|' */
14905 #line 5123 "parse.y"
14906  {
14907  p->max_numparam = ORDINAL_PARAM;
14908  p->ctxt.in_argdef = 0;
14909  (yyval.node_args) = (yyvsp[-2].node_args);
14910  /*% ripper: block_var!($:2, $:3) %*/
14911  }
14912 #line 14913 "parse.c"
14913  break;
14914 
14915  case 456: /* opt_bv_decl: option_'\n' */
14916 #line 5133 "parse.y"
14917  {
14918  (yyval.id) = 0;
14919  /*% ripper: Qfalse %*/
14920  }
14921 #line 14922 "parse.c"
14922  break;
14923 
14924  case 457: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
14925 #line 5138 "parse.y"
14926  {
14927  (yyval.id) = 0;
14928  /*% ripper: $:3 %*/
14929  }
14930 #line 14931 "parse.c"
14931  break;
14932 
14933  case 460: /* bvar: "local variable or method" */
14934 #line 5151 "parse.y"
14935  {
14936  new_bv(p, (yyvsp[0].id));
14937  /*% ripper: $:1 %*/
14938  }
14939 #line 14940 "parse.c"
14940  break;
14941 
14942  case 461: /* bvar: f_bad_arg */
14943 #line 5156 "parse.y"
14944  {
14945  (yyval.id) = 0;
14946  }
14947 #line 14948 "parse.c"
14948  break;
14949 
14950  case 462: /* max_numparam: %empty */
14951 #line 5161 "parse.y"
14952  {
14953  (yyval.num) = p->max_numparam;
14954  p->max_numparam = 0;
14955  }
14956 #line 14957 "parse.c"
14957  break;
14958 
14959  case 463: /* numparam: %empty */
14960 #line 5167 "parse.y"
14961  {
14962  (yyval.node) = numparam_push(p);
14963  }
14964 #line 14965 "parse.c"
14965  break;
14966 
14967  case 464: /* it_id: %empty */
14968 #line 5172 "parse.y"
14969  {
14970  (yyval.id) = p->it_id;
14971  p->it_id = 0;
14972  }
14973 #line 14974 "parse.c"
14974  break;
14975 
14976  case 465: /* @24: %empty */
14977 #line 5179 "parse.y"
14978  {
14979  token_info_push(p, "->", &(yylsp[0]));
14980  (yyval.vars) = dyna_push(p);
14981  }
14982 #line 14983 "parse.c"
14983  break;
14984 
14985  case 466: /* $@25: %empty */
14986 #line 5185 "parse.y"
14987  {
14988  CMDARG_PUSH(0);
14989  }
14990 #line 14991 "parse.c"
14991  break;
14992 
14993  case 467: /* lambda: "->" @24 max_numparam numparam it_id allow_exits f_larglist $@25 lambda_body */
14994 #line 5189 "parse.y"
14995  {
14996  int max_numparam = p->max_numparam;
14997  ID it_id = p->it_id;
14998  p->lex.lpar_beg = (yyvsp[-8].num);
14999  p->max_numparam = (yyvsp[-6].num);
15000  p->it_id = (yyvsp[-4].id);
15001  restore_block_exit(p, (yyvsp[-3].node_exits));
15002  CMDARG_POP();
15003  (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15004  {
15005  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15006  (yyval.node) = NEW_LAMBDA((yyvsp[-2].node_args), (yyvsp[0].node), &loc);
15007  nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15008  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15009  nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15010  }
15011  /*% ripper: lambda!($:args, $:body) %*/
15012  numparam_pop(p, (yyvsp[-5].node));
15013  dyna_pop(p, (yyvsp[-7].vars));
15014  }
15015 #line 15016 "parse.c"
15016  break;
15017 
15018  case 468: /* f_larglist: '(' f_args opt_bv_decl ')' */
15019 #line 5212 "parse.y"
15020  {
15021  p->ctxt.in_argdef = 0;
15022  (yyval.node_args) = (yyvsp[-2].node_args);
15023  p->max_numparam = ORDINAL_PARAM;
15024  /*% ripper: paren!($:2) %*/
15025  }
15026 #line 15027 "parse.c"
15027  break;
15028 
15029  case 469: /* f_larglist: f_args */
15030 #line 5219 "parse.y"
15031  {
15032  p->ctxt.in_argdef = 0;
15033  if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15034  p->max_numparam = ORDINAL_PARAM;
15035  (yyval.node_args) = (yyvsp[0].node_args);
15036  }
15037 #line 15038 "parse.c"
15038  break;
15039 
15040  case 470: /* lambda_body: tLAMBEG compstmt '}' */
15041 #line 5228 "parse.y"
15042  {
15043  token_info_pop(p, "}", &(yylsp[0]));
15044  (yyval.node) = (yyvsp[-1].node);
15045  /*% ripper: $:2 %*/
15046  }
15047 #line 15048 "parse.c"
15048  break;
15049 
15050  case 471: /* $@26: %empty */
15051 #line 5234 "parse.y"
15052  {
15053  push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15054  }
15055 #line 15056 "parse.c"
15056  break;
15057 
15058  case 472: /* lambda_body: "'do' for lambda" $@26 bodystmt k_end */
15059 #line 5238 "parse.y"
15060  {
15061  (yyval.node) = (yyvsp[-1].node);
15062  /*% ripper: $:3 %*/
15063  }
15064 #line 15065 "parse.c"
15065  break;
15066 
15067  case 473: /* do_block: k_do_block do_body k_end */
15068 #line 5245 "parse.y"
15069  {
15070  (yyval.node) = (yyvsp[-1].node);
15071  set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15072  /*% ripper: $:2 %*/
15073  }
15074 #line 15075 "parse.c"
15075  break;
15076 
15077  case 474: /* block_call: command do_block */
15078 #line 5253 "parse.y"
15079  {
15080  if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15081  compile_error(p, "block given to yield");
15082  }
15083  else {
15084  block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15085  }
15086  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15087  fixpos((yyval.node), (yyvsp[-1].node));
15088  /*% ripper: method_add_block!($:1, $:2) %*/
15089  }
15090 #line 15091 "parse.c"
15091  break;
15092 
15093  case 475: /* block_call: block_call call_op2 operation2 opt_paren_args */
15094 #line 5265 "parse.y"
15095  {
15096  bool has_args = (yyvsp[0].node) != 0;
15097  if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15098  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15099  /*% ripper: call!($:1, $:2, $:3) %*/
15100  if (has_args) {
15101  /*% ripper: method_add_arg!($:$, $:4) %*/
15102  }
15103  }
15104 #line 15105 "parse.c"
15105  break;
15106 
15107  case 476: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15108 #line 5275 "parse.y"
15109  {
15110  if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15111  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15112  /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
15113  if ((yyvsp[0].node)) {
15114  /*% ripper: method_add_block!($:$, $:5) %*/
15115  }
15116  }
15117 #line 15118 "parse.c"
15118  break;
15119 
15120  case 477: /* block_call: block_call call_op2 operation2 command_args do_block */
15121 #line 5284 "parse.y"
15122  {
15123  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15124  /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15125  }
15126 #line 15127 "parse.c"
15127  break;
15128 
15129  case 478: /* method_call: fcall paren_args */
15130 #line 5291 "parse.y"
15131  {
15132  (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15133  (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15134  nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15135  /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15136  }
15137 #line 15138 "parse.c"
15138  break;
15139 
15140  case 479: /* method_call: primary_value call_op operation2 opt_paren_args */
15141 #line 5298 "parse.y"
15142  {
15143  bool has_args = (yyvsp[0].node) != 0;
15144  if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15145  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15146  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15147  /*% ripper: call!($:1, $:2, $:3) %*/
15148  if (has_args) {
15149  /*% ripper: method_add_arg!($:$, $:4) %*/
15150  }
15151  }
15152 #line 15153 "parse.c"
15153  break;
15154 
15155  case 480: /* method_call: primary_value "::" operation2 paren_args */
15156 #line 5309 "parse.y"
15157  {
15158  (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15159  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15160  /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15161  }
15162 #line 15163 "parse.c"
15163  break;
15164 
15165  case 481: /* method_call: primary_value "::" operation3 */
15166 #line 5315 "parse.y"
15167  {
15168  (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15169  /*% ripper: call!($:1, $:2, $:3) %*/
15170  }
15171 #line 15172 "parse.c"
15172  break;
15173 
15174  case 482: /* method_call: primary_value call_op paren_args */
15175 #line 5320 "parse.y"
15176  {
15177  (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15178  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15179  /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15180  }
15181 #line 15182 "parse.c"
15182  break;
15183 
15184  case 483: /* method_call: primary_value "::" paren_args */
15185 #line 5326 "parse.y"
15186  {
15187  (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15188  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15189  /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15190  }
15191 #line 15192 "parse.c"
15192  break;
15193 
15194  case 484: /* method_call: "'super'" paren_args */
15195 #line 5332 "parse.y"
15196  {
15197  (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
15198  /*% ripper: super!($:2) %*/
15199  }
15200 #line 15201 "parse.c"
15201  break;
15202 
15203  case 485: /* method_call: "'super'" */
15204 #line 5337 "parse.y"
15205  {
15206  (yyval.node) = NEW_ZSUPER(&(yyloc));
15207  /*% ripper: zsuper! %*/
15208  }
15209 #line 15210 "parse.c"
15210  break;
15211 
15212  case 486: /* method_call: primary_value '[' opt_call_args rbracket */
15213 #line 5342 "parse.y"
15214  {
15215  (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15216  fixpos((yyval.node), (yyvsp[-3].node));
15217  /*% ripper: aref!($:1, $:3) %*/
15218  }
15219 #line 15220 "parse.c"
15220  break;
15221 
15222  case 487: /* brace_block: '{' brace_body '}' */
15223 #line 5350 "parse.y"
15224  {
15225  (yyval.node) = (yyvsp[-1].node);
15226  set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15227  /*% ripper: $:2 %*/
15228  }
15229 #line 15230 "parse.c"
15230  break;
15231 
15232  case 488: /* brace_block: k_do do_body k_end */
15233 #line 5356 "parse.y"
15234  {
15235  (yyval.node) = (yyvsp[-1].node);
15236  set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15237  /*% ripper: $:2 %*/
15238  }
15239 #line 15240 "parse.c"
15240  break;
15241 
15242  case 489: /* @27: %empty */
15243 #line 5363 "parse.y"
15244  {(yyval.vars) = dyna_push(p);}
15245 #line 15246 "parse.c"
15246  break;
15247 
15248  case 490: /* brace_body: @27 max_numparam numparam it_id allow_exits opt_block_param compstmt */
15249 #line 5366 "parse.y"
15250  {
15251  int max_numparam = p->max_numparam;
15252  ID it_id = p->it_id;
15253  p->max_numparam = (yyvsp[-5].num);
15254  p->it_id = (yyvsp[-3].id);
15255  (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15256  (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15257  /*% ripper: brace_block!($:args, $:compstmt) %*/
15258  restore_block_exit(p, (yyvsp[-2].node_exits));
15259  numparam_pop(p, (yyvsp[-4].node));
15260  dyna_pop(p, (yyvsp[-6].vars));
15261  }
15262 #line 15263 "parse.c"
15263  break;
15264 
15265  case 491: /* @28: %empty */
15266 #line 5380 "parse.y"
15267  {
15268  (yyval.vars) = dyna_push(p);
15269  CMDARG_PUSH(0);
15270  }
15271 #line 15272 "parse.c"
15272  break;
15273 
15274  case 492: /* do_body: @28 max_numparam numparam it_id allow_exits opt_block_param bodystmt */
15275 #line 5386 "parse.y"
15276  {
15277  int max_numparam = p->max_numparam;
15278  ID it_id = p->it_id;
15279  p->max_numparam = (yyvsp[-5].num);
15280  p->it_id = (yyvsp[-3].id);
15281  (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15282  (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15283  /*% ripper: do_block!($:args, $:bodystmt) %*/
15284  CMDARG_POP();
15285  restore_block_exit(p, (yyvsp[-2].node_exits));
15286  numparam_pop(p, (yyvsp[-4].node));
15287  dyna_pop(p, (yyvsp[-6].vars));
15288  }
15289 #line 15290 "parse.c"
15290  break;
15291 
15292  case 493: /* case_args: arg_value */
15293 #line 5402 "parse.y"
15294  {
15295  check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15296  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15297  /*% ripper: args_add!(args_new!, $:arg_value) %*/
15298  }
15299 #line 15300 "parse.c"
15300  break;
15301 
15302  case 494: /* case_args: "*" arg_value */
15303 #line 5408 "parse.y"
15304  {
15305  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15306  /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15307  }
15308 #line 15309 "parse.c"
15309  break;
15310 
15311  case 495: /* case_args: case_args ',' arg_value */
15312 #line 5413 "parse.y"
15313  {
15314  check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15315  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15316  /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15317  }
15318 #line 15319 "parse.c"
15319  break;
15320 
15321  case 496: /* case_args: case_args ',' "*" arg_value */
15322 #line 5419 "parse.y"
15323  {
15324  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15325  /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15326  }
15327 #line 15328 "parse.c"
15328  break;
15329 
15330  case 497: /* case_body: k_when case_args then compstmt cases */
15331 #line 5428 "parse.y"
15332  {
15333  (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15334  fixpos((yyval.node), (yyvsp[-3].node));
15335  /*% ripper: when!($:2, $:4, $:5) %*/
15336  }
15337 #line 15338 "parse.c"
15338  break;
15339 
15340  case 500: /* p_pvtbl: %empty */
15341 #line 5439 "parse.y"
15342  {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15343 #line 15344 "parse.c"
15344  break;
15345 
15346  case 501: /* p_pktbl: %empty */
15347 #line 5440 "parse.y"
15348  {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15349 #line 15350 "parse.c"
15350  break;
15351 
15352  case 502: /* p_in_kwarg: %empty */
15353 #line 5442 "parse.y"
15354  {
15355  (yyval.ctxt) = p->ctxt;
15356  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15357  p->command_start = FALSE;
15358  p->ctxt.in_kwarg = 1;
15359  }
15360 #line 15361 "parse.c"
15361  break;
15362 
15363  case 503: /* $@29: %empty */
15364 #line 5453 "parse.y"
15365  {
15366  pop_pktbl(p, (yyvsp[-2].tbl));
15367  pop_pvtbl(p, (yyvsp[-3].tbl));
15368  p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15369  }
15370 #line 15371 "parse.c"
15371  break;
15372 
15373  case 504: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@29 compstmt p_cases */
15374 #line 5460 "parse.y"
15375  {
15376  (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15377  /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15378  }
15379 #line 15380 "parse.c"
15380  break;
15381 
15382  case 508: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15383 #line 5472 "parse.y"
15384  {
15385  (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc));
15386  fixpos((yyval.node), (yyvsp[0].node));
15387  /*% ripper: if_mod!($:3, $:1) %*/
15388  }
15389 #line 15390 "parse.c"
15390  break;
15391 
15392  case 509: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15393 #line 5478 "parse.y"
15394  {
15395  (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15396  fixpos((yyval.node), (yyvsp[0].node));
15397  /*% ripper: unless_mod!($:3, $:1) %*/
15398  }
15399 #line 15400 "parse.c"
15400  break;
15401 
15402  case 511: /* p_top_expr_body: p_expr ',' */
15403 #line 5487 "parse.y"
15404  {
15405  (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15406  (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15407  /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15408  }
15409 #line 15410 "parse.c"
15410  break;
15411 
15412  case 512: /* p_top_expr_body: p_expr ',' p_args */
15413 #line 5493 "parse.y"
15414  {
15415  (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15416  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15417  /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15418  }
15419 #line 15420 "parse.c"
15420  break;
15421 
15422  case 513: /* p_top_expr_body: p_find */
15423 #line 5499 "parse.y"
15424  {
15425  (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15426  /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15427  }
15428 #line 15429 "parse.c"
15429  break;
15430 
15431  case 514: /* p_top_expr_body: p_args_tail */
15432 #line 5504 "parse.y"
15433  {
15434  (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
15435  /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
15436  }
15437 #line 15438 "parse.c"
15438  break;
15439 
15440  case 515: /* p_top_expr_body: p_kwargs */
15441 #line 5509 "parse.y"
15442  {
15443  (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15444  /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
15445  }
15446 #line 15447 "parse.c"
15447  break;
15448 
15449  case 517: /* p_as: p_expr "=>" p_variable */
15450 #line 5519 "parse.y"
15451  {
15452  NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
15453  n = list_append(p, n, (yyvsp[0].node));
15454  (yyval.node) = new_hash(p, n, &(yyloc));
15455  /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
15456  }
15457 #line 15458 "parse.c"
15458  break;
15459 
15460  case 519: /* p_alt: p_alt '|' p_expr_basic */
15461 #line 5529 "parse.y"
15462  {
15463  (yyval.node) = NEW_OR((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15464  /*% ripper: binary!($:1, ID2VAL(idOr), $:3) %*/
15465  }
15466 #line 15467 "parse.c"
15467  break;
15468 
15469  case 521: /* p_lparen: '(' p_pktbl */
15470 #line 5537 "parse.y"
15471  {
15472  (yyval.tbl) = (yyvsp[0].tbl);
15473  /*% ripper: $:2 %*/
15474  }
15475 #line 15476 "parse.c"
15476  break;
15477 
15478  case 522: /* p_lbracket: '[' p_pktbl */
15479 #line 5544 "parse.y"
15480  {
15481  (yyval.tbl) = (yyvsp[0].tbl);
15482  /*% ripper: $:2 %*/
15483  }
15484 #line 15485 "parse.c"
15485  break;
15486 
15487  case 525: /* p_expr_basic: p_const p_lparen p_args rparen */
15488 #line 5553 "parse.y"
15489  {
15490  pop_pktbl(p, (yyvsp[-2].tbl));
15491  (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15492  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15493  /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
15494  }
15495 #line 15496 "parse.c"
15496  break;
15497 
15498  case 526: /* p_expr_basic: p_const p_lparen p_find rparen */
15499 #line 5560 "parse.y"
15500  {
15501  pop_pktbl(p, (yyvsp[-2].tbl));
15502  (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15503  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15504  /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
15505  }
15506 #line 15507 "parse.c"
15507  break;
15508 
15509  case 527: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
15510 #line 5567 "parse.y"
15511  {
15512  pop_pktbl(p, (yyvsp[-2].tbl));
15513  (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15514  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15515  /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
15516  }
15517 #line 15518 "parse.c"
15518  break;
15519 
15520  case 528: /* p_expr_basic: p_const '(' rparen */
15521 #line 5574 "parse.y"
15522  {
15523  (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15524  (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
15525  /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
15526  }
15527 #line 15528 "parse.c"
15528  break;
15529 
15530  case 529: /* p_expr_basic: p_const p_lbracket p_args rbracket */
15531 #line 5580 "parse.y"
15532  {
15533  pop_pktbl(p, (yyvsp[-2].tbl));
15534  (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15535  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15536  /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
15537  }
15538 #line 15539 "parse.c"
15539  break;
15540 
15541  case 530: /* p_expr_basic: p_const p_lbracket p_find rbracket */
15542 #line 5587 "parse.y"
15543  {
15544  pop_pktbl(p, (yyvsp[-2].tbl));
15545  (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15546  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15547  /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
15548  }
15549 #line 15550 "parse.c"
15550  break;
15551 
15552  case 531: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
15553 #line 5594 "parse.y"
15554  {
15555  pop_pktbl(p, (yyvsp[-2].tbl));
15556  (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15557  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15558  /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
15559  }
15560 #line 15561 "parse.c"
15561  break;
15562 
15563  case 532: /* p_expr_basic: p_const '[' rbracket */
15564 #line 5601 "parse.y"
15565  {
15566  (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15567  (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
15568  /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
15569  }
15570 #line 15571 "parse.c"
15571  break;
15572 
15573  case 533: /* p_expr_basic: "[" p_args rbracket */
15574 #line 5607 "parse.y"
15575  {
15576  (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
15577  /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
15578  }
15579 #line 15580 "parse.c"
15580  break;
15581 
15582  case 534: /* p_expr_basic: "[" p_find rbracket */
15583 #line 5612 "parse.y"
15584  {
15585  (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
15586  /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
15587  }
15588 #line 15589 "parse.c"
15589  break;
15590 
15591  case 535: /* p_expr_basic: "[" rbracket */
15592 #line 5617 "parse.y"
15593  {
15594  (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15595  (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
15596  /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
15597  }
15598 #line 15599 "parse.c"
15599  break;
15600 
15601  case 536: /* $@30: %empty */
15602 #line 5623 "parse.y"
15603  {
15604  p->ctxt.in_kwarg = 0;
15605  }
15606 #line 15607 "parse.c"
15607  break;
15608 
15609  case 537: /* p_expr_basic: "{" p_pktbl lex_ctxt $@30 p_kwargs rbrace */
15610 #line 5627 "parse.y"
15611  {
15612  pop_pktbl(p, (yyvsp[-4].tbl));
15613  p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
15614  (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
15615  /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
15616  }
15617 #line 15618 "parse.c"
15618  break;
15619 
15620  case 538: /* p_expr_basic: "{" rbrace */
15621 #line 5634 "parse.y"
15622  {
15623  (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
15624  (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
15625  /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
15626  }
15627 #line 15628 "parse.c"
15628  break;
15629 
15630  case 539: /* p_expr_basic: "(" p_pktbl p_expr rparen */
15631 #line 5640 "parse.y"
15632  {
15633  pop_pktbl(p, (yyvsp[-2].tbl));
15634  (yyval.node) = (yyvsp[-1].node);
15635  /*% ripper: $:p_expr %*/
15636  }
15637 #line 15638 "parse.c"
15638  break;
15639 
15640  case 540: /* p_args: p_expr */
15641 #line 5648 "parse.y"
15642  {
15643  NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
15644  (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
15645  /*% ripper: [[$:1], Qnil, Qnil] %*/
15646  }
15647 #line 15648 "parse.c"
15648  break;
15649 
15650  case 541: /* p_args: p_args_head */
15651 #line 5654 "parse.y"
15652  {
15653  (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
15654  /*% ripper: [$:1, Qnil, Qnil] %*/
15655  }
15656 #line 15657 "parse.c"
15657  break;
15658 
15659  case 542: /* p_args: p_args_head p_arg */
15660 #line 5659 "parse.y"
15661  {
15662  (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
15663  /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
15664  }
15665 #line 15666 "parse.c"
15666  break;
15667 
15668  case 543: /* p_args: p_args_head p_rest */
15669 #line 5664 "parse.y"
15670  {
15671  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
15672  /*% ripper: [$:1, $:2, Qnil] %*/
15673  }
15674 #line 15675 "parse.c"
15675  break;
15676 
15677  case 544: /* p_args: p_args_head p_rest ',' p_args_post */
15678 #line 5669 "parse.y"
15679  {
15680  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15681  /*% ripper: [$:1, $:2, $:4] %*/
15682  }
15683 #line 15684 "parse.c"
15684  break;
15685 
15686  case 546: /* p_args_head: p_arg ',' */
15687 #line 5677 "parse.y"
15688  {
15689  (yyval.node) = (yyvsp[-1].node);
15690  }
15691 #line 15692 "parse.c"
15692  break;
15693 
15694  case 547: /* p_args_head: p_args_head p_arg ',' */
15695 #line 5681 "parse.y"
15696  {
15697  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
15698  /*% ripper: rb_ary_concat($:1, $:2) %*/
15699  }
15700 #line 15701 "parse.c"
15701  break;
15702 
15703  case 548: /* p_args_tail: p_rest */
15704 #line 5688 "parse.y"
15705  {
15706  (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
15707  /*% ripper: [Qnil, $:1, Qnil] %*/
15708  }
15709 #line 15710 "parse.c"
15710  break;
15711 
15712  case 549: /* p_args_tail: p_rest ',' p_args_post */
15713 #line 5693 "parse.y"
15714  {
15715  (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15716  /*% ripper: [Qnil, $:1, $:3] %*/
15717  }
15718 #line 15719 "parse.c"
15719  break;
15720 
15721  case 550: /* p_find: p_rest ',' p_args_post ',' p_rest */
15722 #line 5700 "parse.y"
15723  {
15724  (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15725  /*% ripper: [$:1, $:3, $:5] %*/
15726  }
15727 #line 15728 "parse.c"
15728  break;
15729 
15730  case 551: /* p_rest: "*" "local variable or method" */
15731 #line 5708 "parse.y"
15732  {
15733  error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
15734  /*% ripper: var_field!($:2) %*/
15735  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15736  }
15737 #line 15738 "parse.c"
15738  break;
15739 
15740  case 552: /* p_rest: "*" */
15741 #line 5714 "parse.y"
15742  {
15743  (yyval.node) = 0;
15744  /*% ripper: var_field!(Qnil) %*/
15745  }
15746 #line 15747 "parse.c"
15747  break;
15748 
15749  case 554: /* p_args_post: p_args_post ',' p_arg */
15750 #line 5722 "parse.y"
15751  {
15752  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
15753  /*% ripper: rb_ary_concat($:1, $:3) %*/
15754  }
15755 #line 15756 "parse.c"
15756  break;
15757 
15758  case 555: /* p_arg: p_expr */
15759 #line 5729 "parse.y"
15760  {
15761  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15762  /*% ripper: [$:1] %*/
15763  }
15764 #line 15765 "parse.c"
15765  break;
15766 
15767  case 556: /* p_kwargs: p_kwarg ',' p_any_kwrest */
15768 #line 5736 "parse.y"
15769  {
15770  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
15771  /*% ripper: [$:1, $:3] %*/
15772  }
15773 #line 15774 "parse.c"
15774  break;
15775 
15776  case 557: /* p_kwargs: p_kwarg */
15777 #line 5741 "parse.y"
15778  {
15779  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
15780  /*% ripper: [$:1, Qnil] %*/
15781  }
15782 #line 15783 "parse.c"
15783  break;
15784 
15785  case 558: /* p_kwargs: p_kwarg ',' */
15786 #line 5746 "parse.y"
15787  {
15788  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
15789  /*% ripper: [$:1, Qnil] %*/
15790  }
15791 #line 15792 "parse.c"
15792  break;
15793 
15794  case 559: /* p_kwargs: p_any_kwrest */
15795 #line 5751 "parse.y"
15796  {
15797  (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
15798  /*% ripper: [[], $:1] %*/
15799  }
15800 #line 15801 "parse.c"
15801  break;
15802 
15803  case 561: /* p_kwarg: p_kwarg ',' p_kw */
15804 #line 5760 "parse.y"
15805  {
15806  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
15807  /*% ripper: rb_ary_push($:1, $:3) %*/
15808  }
15809 #line 15810 "parse.c"
15810  break;
15811 
15812  case 562: /* p_kw: p_kw_label p_expr */
15813 #line 5767 "parse.y"
15814  {
15815  error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
15816  (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
15817  /*% ripper: [$:1, $:2] %*/
15818  }
15819 #line 15820 "parse.c"
15820  break;
15821 
15822  case 563: /* p_kw: p_kw_label */
15823 #line 5773 "parse.y"
15824  {
15825  error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
15826  if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
15827  yyerror1(&(yylsp[0]), "key must be valid as local variables");
15828  }
15829  error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
15830  (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
15831  /*% ripper: [$:1, Qnil] %*/
15832  }
15833 #line 15834 "parse.c"
15834  break;
15835 
15836  case 565: /* p_kw_label: "string literal" string_contents tLABEL_END */
15837 #line 5786 "parse.y"
15838  {
15839  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15840  if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
15841  NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
15842  (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
15843  }
15844  else {
15845  yyerror1(&loc, "symbol literal with interpolation is not allowed");
15846  (yyval.id) = rb_intern_str(STR_NEW0());
15847  }
15848  /*% ripper: $:2 %*/
15849  }
15850 #line 15851 "parse.c"
15851  break;
15852 
15853  case 566: /* p_kwrest: kwrest_mark "local variable or method" */
15854 #line 5801 "parse.y"
15855  {
15856  (yyval.id) = (yyvsp[0].id);
15857  /*% ripper: var_field!($:2) %*/
15858  }
15859 #line 15860 "parse.c"
15860  break;
15861 
15862  case 567: /* p_kwrest: kwrest_mark */
15863 #line 5806 "parse.y"
15864  {
15865  (yyval.id) = 0;
15866  /*% ripper: Qnil %*/
15867  }
15868 #line 15869 "parse.c"
15869  break;
15870 
15871  case 568: /* p_kwnorest: kwrest_mark "'nil'" */
15872 #line 5813 "parse.y"
15873  {
15874  (yyval.id) = 0;
15875  }
15876 #line 15877 "parse.c"
15877  break;
15878 
15879  case 570: /* p_any_kwrest: p_kwnorest */
15880 #line 5820 "parse.y"
15881  {
15882  (yyval.id) = idNil;
15883  /*% ripper: var_field!(ID2VAL(idNil)) %*/
15884  }
15885 #line 15886 "parse.c"
15886  break;
15887 
15888  case 572: /* p_value: p_primitive ".." p_primitive */
15889 #line 5828 "parse.y"
15890  {
15891  value_expr((yyvsp[-2].node));
15892  value_expr((yyvsp[0].node));
15893  (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15894  /*% ripper: dot2!($:1, $:3) %*/
15895  }
15896 #line 15897 "parse.c"
15897  break;
15898 
15899  case 573: /* p_value: p_primitive "..." p_primitive */
15900 #line 5835 "parse.y"
15901  {
15902  value_expr((yyvsp[-2].node));
15903  value_expr((yyvsp[0].node));
15904  (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15905  /*% ripper: dot3!($:1, $:3) %*/
15906  }
15907 #line 15908 "parse.c"
15908  break;
15909 
15910  case 574: /* p_value: p_primitive ".." */
15911 #line 5842 "parse.y"
15912  {
15913  value_expr((yyvsp[-1].node));
15914  (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
15915  /*% ripper: dot2!($:1, Qnil) %*/
15916  }
15917 #line 15918 "parse.c"
15918  break;
15919 
15920  case 575: /* p_value: p_primitive "..." */
15921 #line 5848 "parse.y"
15922  {
15923  value_expr((yyvsp[-1].node));
15924  (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
15925  /*% ripper: dot3!($:1, Qnil) %*/
15926  }
15927 #line 15928 "parse.c"
15928  break;
15929 
15930  case 579: /* p_value: "(.." p_primitive */
15931 #line 5857 "parse.y"
15932  {
15933  value_expr((yyvsp[0].node));
15934  (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc));
15935  /*% ripper: dot2!(Qnil, $:2) %*/
15936  }
15937 #line 15938 "parse.c"
15938  break;
15939 
15940  case 580: /* p_value: "(..." p_primitive */
15941 #line 5863 "parse.y"
15942  {
15943  value_expr((yyvsp[0].node));
15944  (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc));
15945  /*% ripper: dot3!(Qnil, $:2) %*/
15946  }
15947 #line 15948 "parse.c"
15948  break;
15949 
15950  case 589: /* p_primitive: keyword_variable */
15951 #line 5872 "parse.y"
15952  {
15953  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
15954  /*% ripper: var_ref!($:1) %*/
15955  }
15956 #line 15957 "parse.c"
15957  break;
15958 
15959  case 591: /* p_variable: "local variable or method" */
15960 #line 5880 "parse.y"
15961  {
15962  error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
15963  /*% ripper: var_field!($:1) %*/
15964  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15965  }
15966 #line 15967 "parse.c"
15967  break;
15968 
15969  case 592: /* p_var_ref: '^' "local variable or method" */
15970 #line 5888 "parse.y"
15971  {
15972  NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
15973  if (!n) {
15974  n = NEW_ERROR(&(yyloc));
15975  }
15976  else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
15977  compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
15978  }
15979  (yyval.node) = n;
15980  /*% ripper: var_ref!($:2) %*/
15981  }
15982 #line 15983 "parse.c"
15983  break;
15984 
15985  case 593: /* p_var_ref: '^' nonlocal_var */
15986 #line 5900 "parse.y"
15987  {
15988  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
15989  /*% ripper: var_ref!($:2) %*/
15990  }
15991 #line 15992 "parse.c"
15992  break;
15993 
15994  case 594: /* p_expr_ref: '^' "(" expr_value rparen */
15995 #line 5907 "parse.y"
15996  {
15997  (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
15998  /*% ripper: begin!($:3) %*/
15999  }
16000 #line 16001 "parse.c"
16001  break;
16002 
16003  case 595: /* p_const: ":: at EXPR_BEG" cname */
16004 #line 5914 "parse.y"
16005  {
16006  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
16007  /*% ripper: top_const_ref!($:2) %*/
16008  }
16009 #line 16010 "parse.c"
16010  break;
16011 
16012  case 596: /* p_const: p_const "::" cname */
16013 #line 5919 "parse.y"
16014  {
16015  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
16016  /*% ripper: const_path_ref!($:1, $:3) %*/
16017  }
16018 #line 16019 "parse.c"
16019  break;
16020 
16021  case 597: /* p_const: "constant" */
16022 #line 5924 "parse.y"
16023  {
16024  (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16025  /*% ripper: var_ref!($:1) %*/
16026  }
16027 #line 16028 "parse.c"
16028  break;
16029 
16030  case 598: /* opt_rescue: k_rescue exc_list exc_var then compstmt opt_rescue */
16031 #line 5933 "parse.y"
16032  {
16033  NODE *err = (yyvsp[-3].node);
16034  if ((yyvsp[-3].node)) {
16035  err = NEW_ERRINFO(&(yylsp[-3]));
16036  err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16037  }
16038  (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16039  if ((yyvsp[-4].node)) {
16040  fixpos((yyval.node), (yyvsp[-4].node));
16041  }
16042  else if ((yyvsp[-3].node)) {
16043  fixpos((yyval.node), (yyvsp[-3].node));
16044  }
16045  else {
16046  fixpos((yyval.node), (yyvsp[-1].node));
16047  }
16048  /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16049  }
16050 #line 16051 "parse.c"
16051  break;
16052 
16053  case 600: /* exc_list: arg_value */
16054 #line 5955 "parse.y"
16055  {
16056  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16057  /*% ripper: rb_ary_new3(1, $:1) %*/
16058  }
16059 #line 16060 "parse.c"
16060  break;
16061 
16062  case 601: /* exc_list: mrhs */
16063 #line 5960 "parse.y"
16064  {
16065  if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16066  }
16067 #line 16068 "parse.c"
16068  break;
16069 
16070  case 603: /* exc_var: "=>" lhs */
16071 #line 5967 "parse.y"
16072  {
16073  (yyval.node) = (yyvsp[0].node);
16074  /*% ripper: $:2 %*/
16075  }
16076 #line 16077 "parse.c"
16077  break;
16078 
16079  case 605: /* opt_ensure: k_ensure stmts option_terms */
16080 #line 5975 "parse.y"
16081  {
16082  p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16083  (yyval.node) = (yyvsp[-1].node);
16084  void_expr(p, void_stmts(p, (yyval.node)));
16085  /*% ripper: ensure!($:2) %*/
16086  }
16087 #line 16088 "parse.c"
16088  break;
16089 
16090  case 609: /* strings: string */
16091 #line 5989 "parse.y"
16092  {
16093  NODE *node = (yyvsp[0].node);
16094  if (!node) {
16095  node = NEW_STR(STRING_NEW0(), &(yyloc));
16096  }
16097  else {
16098  node = evstr2dstr(p, node);
16099  }
16100  (yyval.node) = node;
16101  /*% ripper: $:1 %*/
16102  }
16103 #line 16104 "parse.c"
16104  break;
16105 
16106  case 612: /* string: string string1 */
16107 #line 6005 "parse.y"
16108  {
16109  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16110  /*% ripper: string_concat!($:1, $:2) %*/
16111  }
16112 #line 16113 "parse.c"
16113  break;
16114 
16115  case 613: /* string1: "string literal" string_contents "terminator" */
16116 #line 6012 "parse.y"
16117  {
16118  (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16119  if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16120  /*% ripper: $:2 %*/
16121  if (p->heredoc_indent > 0) {
16122  /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16123  p->heredoc_indent = 0;
16124  }
16125  /*% ripper: string_literal!($:$) %*/
16126  }
16127 #line 16128 "parse.c"
16128  break;
16129 
16130  case 614: /* xstring: "backtick literal" xstring_contents "terminator" */
16131 #line 6025 "parse.y"
16132  {
16133  (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16134  /*% ripper: $:2 %*/
16135  if (p->heredoc_indent > 0) {
16136  /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16137  p->heredoc_indent = 0;
16138  }
16139  /*% ripper: xstring_literal!($:$) %*/
16140  }
16141 #line 16142 "parse.c"
16142  break;
16143 
16144  case 615: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16145 #line 6037 "parse.y"
16146  {
16147  (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc));
16148  /*% ripper: regexp_literal!($:2, $:3) %*/
16149  }
16150 #line 16151 "parse.c"
16151  break;
16152 
16153  case 618: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16154 #line 2964 "parse.y"
16155  {
16156  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16157  /*% ripper: array!($:3) %*/
16158  }
16159 #line 16160 "parse.c"
16160  break;
16161 
16162  case 620: /* word_list: %empty */
16163 #line 6047 "parse.y"
16164  {
16165  (yyval.node) = 0;
16166  /*% ripper: words_new! %*/
16167  }
16168 #line 16169 "parse.c"
16169  break;
16170 
16171  case 621: /* word_list: word_list word nonempty_list_' ' */
16172 #line 6052 "parse.y"
16173  {
16174  (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16175  /*% ripper: words_add!($:1, $:2) %*/
16176  }
16177 #line 16178 "parse.c"
16178  break;
16179 
16180  case 623: /* word: word string_content */
16181 #line 6061 "parse.y"
16182  {
16183  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16184  /*% ripper: word_add!($:1, $:2) %*/
16185  }
16186 #line 16187 "parse.c"
16187  break;
16188 
16189  case 624: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16190 #line 2964 "parse.y"
16191  {
16192  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16193  /*% ripper: array!($:3) %*/
16194  }
16195 #line 16196 "parse.c"
16196  break;
16197 
16198  case 626: /* symbol_list: %empty */
16199 #line 6071 "parse.y"
16200  {
16201  (yyval.node) = 0;
16202  /*% ripper: symbols_new! %*/
16203  }
16204 #line 16205 "parse.c"
16205  break;
16206 
16207  case 627: /* symbol_list: symbol_list word nonempty_list_' ' */
16208 #line 6076 "parse.y"
16209  {
16210  (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16211  /*% ripper: symbols_add!($:1, $:2) %*/
16212  }
16213 #line 16214 "parse.c"
16214  break;
16215 
16216  case 628: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16217 #line 2964 "parse.y"
16218  {
16219  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16220  /*% ripper: array!($:3) %*/
16221  }
16222 #line 16223 "parse.c"
16223  break;
16224 
16225  case 630: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16226 #line 2964 "parse.y"
16227  {
16228  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16229  /*% ripper: array!($:3) %*/
16230  }
16231 #line 16232 "parse.c"
16232  break;
16233 
16234  case 632: /* qword_list: %empty */
16235 #line 6089 "parse.y"
16236  {
16237  (yyval.node) = 0;
16238  /*% ripper: qwords_new! %*/
16239  }
16240 #line 16241 "parse.c"
16241  break;
16242 
16243  case 633: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16244 #line 6094 "parse.y"
16245  {
16246  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16247  /*% ripper: qwords_add!($:1, $:2) %*/
16248  }
16249 #line 16250 "parse.c"
16250  break;
16251 
16252  case 634: /* qsym_list: %empty */
16253 #line 6101 "parse.y"
16254  {
16255  (yyval.node) = 0;
16256  /*% ripper: qsymbols_new! %*/
16257  }
16258 #line 16259 "parse.c"
16259  break;
16260 
16261  case 635: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16262 #line 6106 "parse.y"
16263  {
16264  (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16265  /*% ripper: qsymbols_add!($:1, $:2) %*/
16266  }
16267 #line 16268 "parse.c"
16268  break;
16269 
16270  case 636: /* string_contents: %empty */
16271 #line 6113 "parse.y"
16272  {
16273  (yyval.node) = 0;
16274  /*% ripper: string_content! %*/
16275  }
16276 #line 16277 "parse.c"
16277  break;
16278 
16279  case 637: /* string_contents: string_contents string_content */
16280 #line 6118 "parse.y"
16281  {
16282  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16283  /*% ripper: string_add!($:1, $:2) %*/
16284  }
16285 #line 16286 "parse.c"
16286  break;
16287 
16288  case 638: /* xstring_contents: %empty */
16289 #line 6125 "parse.y"
16290  {
16291  (yyval.node) = 0;
16292  /*% ripper: xstring_new! %*/
16293  }
16294 #line 16295 "parse.c"
16295  break;
16296 
16297  case 639: /* xstring_contents: xstring_contents string_content */
16298 #line 6130 "parse.y"
16299  {
16300  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16301  /*% ripper: xstring_add!($:1, $:2) %*/
16302  }
16303 #line 16304 "parse.c"
16304  break;
16305 
16306  case 640: /* regexp_contents: %empty */
16307 #line 6137 "parse.y"
16308  {
16309  (yyval.node) = 0;
16310  /*% ripper: regexp_new! %*/
16311  }
16312 #line 16313 "parse.c"
16313  break;
16314 
16315  case 641: /* regexp_contents: regexp_contents string_content */
16316 #line 6142 "parse.y"
16317  {
16318  NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16319  if (!head) {
16320  (yyval.node) = tail;
16321  }
16322  else if (!tail) {
16323  (yyval.node) = head;
16324  }
16325  else {
16326  switch (nd_type(head)) {
16327  case NODE_STR:
16328  head = str2dstr(p, head);
16329  break;
16330  case NODE_DSTR:
16331  break;
16332  default:
16333  head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16334  break;
16335  }
16336  (yyval.node) = list_append(p, head, tail);
16337  }
16338  /*% ripper: regexp_add!($:1, $:2) %*/
16339  }
16340 #line 16341 "parse.c"
16341  break;
16342 
16343  case 643: /* @31: %empty */
16344 #line 6170 "parse.y"
16345  {
16346  /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16347  (yyval.strterm) = p->lex.strterm;
16348  p->lex.strterm = 0;
16349  SET_LEX_STATE(EXPR_BEG);
16350  }
16351 #line 16352 "parse.c"
16352  break;
16353 
16354  case 644: /* string_content: tSTRING_DVAR @31 string_dvar */
16355 #line 6177 "parse.y"
16356  {
16357  p->lex.strterm = (yyvsp[-1].strterm);
16358  (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc));
16359  nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16360  /*% ripper: string_dvar!($:3) %*/
16361  }
16362 #line 16363 "parse.c"
16363  break;
16364 
16365  case 645: /* @32: %empty */
16366 #line 6184 "parse.y"
16367  {
16368  CMDARG_PUSH(0);
16369  COND_PUSH(0);
16370  /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16371  (yyval.strterm) = p->lex.strterm;
16372  p->lex.strterm = 0;
16373  SET_LEX_STATE(EXPR_BEG);
16374  }
16375 #line 16376 "parse.c"
16376  break;
16377 
16378  case 646: /* @33: %empty */
16379 #line 6192 "parse.y"
16380  {
16381  (yyval.num) = p->lex.brace_nest;
16382  p->lex.brace_nest = 0;
16383  }
16384 #line 16385 "parse.c"
16385  break;
16386 
16387  case 647: /* @34: %empty */
16388 #line 6196 "parse.y"
16389  {
16390  (yyval.num) = p->heredoc_indent;
16391  p->heredoc_indent = 0;
16392  }
16393 #line 16394 "parse.c"
16394  break;
16395 
16396  case 648: /* string_content: "'#{'" @32 @33 @34 compstmt string_dend */
16397 #line 6201 "parse.y"
16398  {
16399  COND_POP();
16400  CMDARG_POP();
16401  p->lex.strterm = (yyvsp[-4].strterm);
16402  SET_LEX_STATE((yyvsp[-5].state));
16403  p->lex.brace_nest = (yyvsp[-3].num);
16404  p->heredoc_indent = (yyvsp[-2].num);
16405  p->heredoc_line_indent = -1;
16406  if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16407  (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc));
16408  /*% ripper: string_embexpr!($:compstmt) %*/
16409  }
16410 #line 16411 "parse.c"
16411  break;
16412 
16413  case 651: /* string_dvar: nonlocal_var */
16414 #line 6220 "parse.y"
16415  {
16416  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16417  /*% ripper: var_ref!($:1) %*/
16418  }
16419 #line 16420 "parse.c"
16420  break;
16421 
16422  case 655: /* ssym: "symbol literal" sym */
16423 #line 6232 "parse.y"
16424  {
16425  SET_LEX_STATE(EXPR_END);
16426  VALUE str = rb_id2str((yyvsp[0].id));
16427  /*
16428  * TODO:
16429  * set_yylval_noname sets invalid id to yylval.
16430  * This branch can be removed once yylval is changed to
16431  * hold lexed string.
16432  */
16433  if (!str) str = STR_NEW0();
16434  (yyval.node) = NEW_SYM(str, &(yyloc));
16435  /*% ripper: symbol_literal!(symbol!($:2)) %*/
16436  }
16437 #line 16438 "parse.c"
16438  break;
16439 
16440  case 658: /* dsym: "symbol literal" string_contents "terminator" */
16441 #line 6252 "parse.y"
16442  {
16443  SET_LEX_STATE(EXPR_END);
16444  (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
16445  /*% ripper: dyna_symbol!($:2) %*/
16446  }
16447 #line 16448 "parse.c"
16448  break;
16449 
16450  case 660: /* numeric: tUMINUS_NUM simple_numeric */
16451 #line 6261 "parse.y"
16452  {
16453  (yyval.node) = (yyvsp[0].node);
16454  negate_lit(p, (yyval.node));
16455  /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
16456  }
16457 #line 16458 "parse.c"
16458  break;
16459 
16460  case 671: /* keyword_variable: "'nil'" */
16461 #line 6283 "parse.y"
16462  {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
16463 #line 16464 "parse.c"
16464  break;
16465 
16466  case 672: /* keyword_variable: "'self'" */
16467 #line 6284 "parse.y"
16468  {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
16469 #line 16470 "parse.c"
16470  break;
16471 
16472  case 673: /* keyword_variable: "'true'" */
16473 #line 6285 "parse.y"
16474  {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
16475 #line 16476 "parse.c"
16476  break;
16477 
16478  case 674: /* keyword_variable: "'false'" */
16479 #line 6286 "parse.y"
16480  {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
16481 #line 16482 "parse.c"
16482  break;
16483 
16484  case 675: /* keyword_variable: "'__FILE__'" */
16485 #line 6287 "parse.y"
16486  {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
16487 #line 16488 "parse.c"
16488  break;
16489 
16490  case 676: /* keyword_variable: "'__LINE__'" */
16491 #line 6288 "parse.y"
16492  {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
16493 #line 16494 "parse.c"
16494  break;
16495 
16496  case 677: /* keyword_variable: "'__ENCODING__'" */
16497 #line 6289 "parse.y"
16498  {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
16499 #line 16500 "parse.c"
16500  break;
16501 
16502  case 678: /* var_ref: user_variable */
16503 #line 6293 "parse.y"
16504  {
16505  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16506  if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
16507  /*% ripper: var_ref!($:1) %*/
16508  }
16509  else {
16510  /*% ripper: vcall!($:1) %*/
16511  }
16512  }
16513 #line 16514 "parse.c"
16514  break;
16515 
16516  case 679: /* var_ref: keyword_variable */
16517 #line 6303 "parse.y"
16518  {
16519  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16520  /*% ripper: var_ref!($:1) %*/
16521  }
16522 #line 16523 "parse.c"
16523  break;
16524 
16525  case 680: /* var_lhs: user_variable */
16526 #line 6310 "parse.y"
16527  {
16528  /*% ripper: var_field!($:1) %*/
16529  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16530  }
16531 #line 16532 "parse.c"
16532  break;
16533 
16534  case 681: /* var_lhs: keyword_variable */
16535 #line 6310 "parse.y"
16536  {
16537  /*% ripper: var_field!($:1) %*/
16538  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16539  }
16540 #line 16541 "parse.c"
16541  break;
16542 
16543  case 684: /* $@35: %empty */
16544 #line 6321 "parse.y"
16545  {
16546  SET_LEX_STATE(EXPR_BEG);
16547  p->command_start = TRUE;
16548  }
16549 #line 16550 "parse.c"
16550  break;
16551 
16552  case 685: /* superclass: '<' $@35 expr_value term */
16553 #line 6326 "parse.y"
16554  {
16555  (yyval.node) = (yyvsp[-1].node);
16556  /*% ripper: $:3 %*/
16557  }
16558 #line 16559 "parse.c"
16559  break;
16560 
16561  case 686: /* superclass: %empty */
16562 #line 6331 "parse.y"
16563  {
16564  (yyval.node) = 0;
16565  /*% ripper: Qnil %*/
16566  }
16567 #line 16568 "parse.c"
16568  break;
16569 
16570  case 688: /* f_opt_paren_args: none */
16571 #line 6339 "parse.y"
16572  {
16573  p->ctxt.in_argdef = 0;
16574  (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
16575  (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
16576  /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
16577  }
16578 #line 16579 "parse.c"
16579  break;
16580 
16581  case 689: /* f_paren_args: '(' f_args rparen */
16582 #line 6348 "parse.y"
16583  {
16584  (yyval.node_args) = (yyvsp[-1].node_args);
16585  /*% ripper: paren!($:2) %*/
16586  SET_LEX_STATE(EXPR_BEG);
16587  p->command_start = TRUE;
16588  p->ctxt.in_argdef = 0;
16589  }
16590 #line 16591 "parse.c"
16591  break;
16592 
16593  case 691: /* @36: %empty */
16594 #line 6358 "parse.y"
16595  {
16596  (yyval.ctxt) = p->ctxt;
16597  p->ctxt.in_kwarg = 1;
16598  p->ctxt.in_argdef = 1;
16599  SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
16600  }
16601 #line 16602 "parse.c"
16602  break;
16603 
16604  case 692: /* f_arglist: @36 f_args term */
16605 #line 6365 "parse.y"
16606  {
16607  p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
16608  p->ctxt.in_argdef = 0;
16609  (yyval.node_args) = (yyvsp[-1].node_args);
16610  SET_LEX_STATE(EXPR_BEG);
16611  p->command_start = TRUE;
16612  /*% ripper: $:2 %*/
16613  }
16614 #line 16615 "parse.c"
16615  break;
16616 
16617  case 693: /* f_kwarg_f_kw: f_kw */
16618 #line 2938 "parse.y"
16619  {
16620  (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
16621  /*% ripper: rb_ary_new3(1, $:1) %*/
16622  }
16623 #line 16624 "parse.c"
16624  break;
16625 
16626  case 694: /* f_kwarg_f_kw: f_kwarg_f_kw ',' f_kw */
16627 #line 2943 "parse.y"
16628  {
16629  (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
16630  /*% ripper: rb_ary_push($:1, $:3) %*/
16631  }
16632 #line 16633 "parse.c"
16633  break;
16634 
16635  case 695: /* args_tail: f_kwarg_f_kw ',' f_kwrest opt_f_block_arg */
16636 #line 6376 "parse.y"
16637  {
16638  (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
16639  /*% ripper: [$:1, $:3, $:4] %*/
16640  }
16641 #line 16642 "parse.c"
16642  break;
16643 
16644  case 696: /* args_tail: f_kwarg_f_kw opt_f_block_arg */
16645 #line 6381 "parse.y"
16646  {
16647  (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
16648  /*% ripper: [$:1, Qnil, $:2] %*/
16649  }
16650 #line 16651 "parse.c"
16651  break;
16652 
16653  case 697: /* args_tail: f_any_kwrest opt_f_block_arg */
16654 #line 6386 "parse.y"
16655  {
16656  (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
16657  /*% ripper: [Qnil, $:1, $:2] %*/
16658  }
16659 #line 16660 "parse.c"
16660  break;
16661 
16662  case 698: /* args_tail: f_block_arg */
16663 #line 6391 "parse.y"
16664  {
16665  (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
16666  /*% ripper: [Qnil, Qnil, $:1] %*/
16667  }
16668 #line 16669 "parse.c"
16669  break;
16670 
16671  case 699: /* args_tail: args_forward */
16672 #line 6396 "parse.y"
16673  {
16674  ID fwd = (yyvsp[0].id);
16675  if (lambda_beginning_p() ||
16676  (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
16677  yyerror0("unexpected ... in lambda argument");
16678  fwd = 0;
16679  }
16680  else {
16681  add_forwarding_args(p);
16682  }
16683  (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
16684  (yyval.node_args)->nd_ainfo.forwarding = 1;
16685  /*% ripper: [Qnil, $:1, Qnil] %*/
16686  }
16687 #line 16688 "parse.c"
16688  break;
16689 
16690  case 700: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
16691 #line 2916 "parse.y"
16692  {
16693  p->ctxt.in_argdef = 1;
16694  (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
16695  /*% ripper: [$:$, $:3] %*/
16696  }
16697 #line 16698 "parse.c"
16698  break;
16699 
16700  case 701: /* f_optarg_arg_value: f_opt_arg_value */
16701 #line 2925 "parse.y"
16702  {
16703  (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
16704  /*% ripper: rb_ary_new3(1, $:1) %*/
16705  }
16706 #line 16707 "parse.c"
16707  break;
16708 
16709  case 702: /* f_optarg_arg_value: f_optarg_arg_value ',' f_opt_arg_value */
16710 #line 2930 "parse.y"
16711  {
16712  (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
16713  /*% ripper: rb_ary_push($:1, $:3) %*/
16714  }
16715 #line 16716 "parse.c"
16716  break;
16717 
16718  case 703: /* opt_args_tail_args_tail: ',' args_tail */
16719 #line 2951 "parse.y"
16720  {
16721  (yyval.node_args) = (yyvsp[0].node_args);
16722  /*% ripper: $:2 %*/
16723  }
16724 #line 16725 "parse.c"
16725  break;
16726 
16727  case 704: /* opt_args_tail_args_tail: %empty */
16728 #line 2956 "parse.y"
16729  {
16730  (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
16731  /*% ripper: [Qnil, Qnil, Qnil] %*/
16732  }
16733 #line 16734 "parse.c"
16734  break;
16735 
16736  case 705: /* f_args: f_arg ',' f_optarg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
16737 #line 6413 "parse.y"
16738  {
16739  (yyval.node_args) = new_args(p, (yyvsp[-5].node_args_aux), (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
16740  /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
16741  }
16742 #line 16743 "parse.c"
16743  break;
16744 
16745  case 706: /* f_args: f_arg ',' f_optarg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
16746 #line 6418 "parse.y"
16747  {
16748  (yyval.node_args) = new_args(p, (yyvsp[-7].node_args_aux), (yyvsp[-5].node_opt_arg), (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
16749  /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
16750  }
16751 #line 16752 "parse.c"
16752  break;
16753 
16754  case 707: /* f_args: f_arg ',' f_optarg_arg_value opt_args_tail_args_tail */
16755 #line 6423 "parse.y"
16756  {
16757  (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
16758  /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
16759  }
16760 #line 16761 "parse.c"
16761  break;
16762 
16763  case 708: /* f_args: f_arg ',' f_optarg_arg_value ',' f_arg opt_args_tail_args_tail */
16764 #line 6428 "parse.y"
16765  {
16766  (yyval.node_args) = new_args(p, (yyvsp[-5].node_args_aux), (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
16767  /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
16768  }
16769 #line 16770 "parse.c"
16770  break;
16771 
16772  case 709: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
16773 #line 6433 "parse.y"
16774  {
16775  (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
16776  /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
16777  }
16778 #line 16779 "parse.c"
16779  break;
16780 
16781  case 710: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
16782 #line 6438 "parse.y"
16783  {
16784  (yyval.node_args) = new_args(p, (yyvsp[-5].node_args_aux), 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
16785  /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
16786  }
16787 #line 16788 "parse.c"
16788  break;
16789 
16790  case 711: /* f_args: f_arg opt_args_tail_args_tail */
16791 #line 6443 "parse.y"
16792  {
16793  (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
16794  /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
16795  }
16796 #line 16797 "parse.c"
16797  break;
16798 
16799  case 712: /* f_args: f_optarg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
16800 #line 6448 "parse.y"
16801  {
16802  (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
16803  /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
16804  }
16805 #line 16806 "parse.c"
16806  break;
16807 
16808  case 713: /* f_args: f_optarg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
16809 #line 6453 "parse.y"
16810  {
16811  (yyval.node_args) = new_args(p, 0, (yyvsp[-5].node_opt_arg), (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
16812  /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
16813  }
16814 #line 16815 "parse.c"
16815  break;
16816 
16817  case 714: /* f_args: f_optarg_arg_value opt_args_tail_args_tail */
16818 #line 6458 "parse.y"
16819  {
16820  (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
16821  /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
16822  }
16823 #line 16824 "parse.c"
16824  break;
16825 
16826  case 715: /* f_args: f_optarg_arg_value ',' f_arg opt_args_tail_args_tail */
16827 #line 6463 "parse.y"
16828  {
16829  (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
16830  /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
16831  }
16832 #line 16833 "parse.c"
16833  break;
16834 
16835  case 716: /* f_args: f_rest_arg opt_args_tail_args_tail */
16836 #line 6468 "parse.y"
16837  {
16838  (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
16839  /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
16840  }
16841 #line 16842 "parse.c"
16842  break;
16843 
16844  case 717: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
16845 #line 6473 "parse.y"
16846  {
16847  (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
16848  /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
16849  }
16850 #line 16851 "parse.c"
16851  break;
16852 
16853  case 718: /* f_args: args_tail */
16854 #line 6478 "parse.y"
16855  {
16856  (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
16857  /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
16858  }
16859 #line 16860 "parse.c"
16860  break;
16861 
16862  case 719: /* f_args: %empty */
16863 #line 6483 "parse.y"
16864  {
16865  (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
16866  (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
16867  /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
16868  }
16869 #line 16870 "parse.c"
16870  break;
16871 
16872  case 720: /* args_forward: "(..." */
16873 #line 6491 "parse.y"
16874  {
16875 #ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
16876  (yyval.id) = 0;
16877 #else
16878  (yyval.id) = idFWD_KWREST;
16879 #endif
16880  /*% ripper: args_forward! %*/
16881  }
16882 #line 16883 "parse.c"
16883  break;
16884 
16885  case 721: /* f_bad_arg: "constant" */
16886 #line 6502 "parse.y"
16887  {
16888  static const char mesg[] = "formal argument cannot be a constant";
16889  /*%%%*/
16890  yyerror1(&(yylsp[0]), mesg);
16891  /*% %*/
16892  (yyval.id) = 0;
16893  /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
16894  }
16895 #line 16896 "parse.c"
16896  break;
16897 
16898  case 722: /* f_bad_arg: "instance variable" */
16899 #line 6511 "parse.y"
16900  {
16901  static const char mesg[] = "formal argument cannot be an instance variable";
16902  /*%%%*/
16903  yyerror1(&(yylsp[0]), mesg);
16904  /*% %*/
16905  (yyval.id) = 0;
16906  /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
16907  }
16908 #line 16909 "parse.c"
16909  break;
16910 
16911  case 723: /* f_bad_arg: "global variable" */
16912 #line 6520 "parse.y"
16913  {
16914  static const char mesg[] = "formal argument cannot be a global variable";
16915  /*%%%*/
16916  yyerror1(&(yylsp[0]), mesg);
16917  /*% %*/
16918  (yyval.id) = 0;
16919  /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
16920  }
16921 #line 16922 "parse.c"
16922  break;
16923 
16924  case 724: /* f_bad_arg: "class variable" */
16925 #line 6529 "parse.y"
16926  {
16927  static const char mesg[] = "formal argument cannot be a class variable";
16928  /*%%%*/
16929  yyerror1(&(yylsp[0]), mesg);
16930  /*% %*/
16931  (yyval.id) = 0;
16932  /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
16933  }
16934 #line 16935 "parse.c"
16935  break;
16936 
16937  case 726: /* f_norm_arg: "local variable or method" */
16938 #line 6541 "parse.y"
16939  {
16940  VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
16941  if (e) {
16942  /*% ripper[error]: param_error!(?e, $:1) %*/
16943  }
16944  p->max_numparam = ORDINAL_PARAM;
16945  }
16946 #line 16947 "parse.c"
16947  break;
16948 
16949  case 727: /* f_arg_asgn: f_norm_arg */
16950 #line 6551 "parse.y"
16951  {
16952  ID id = (yyvsp[0].id);
16953  arg_var(p, id);
16954  (yyval.id) = (yyvsp[0].id);
16955  }
16956 #line 16957 "parse.c"
16957  break;
16958 
16959  case 728: /* f_arg_item: f_arg_asgn */
16960 #line 6559 "parse.y"
16961  {
16962  (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
16963  /*% ripper: $:1 %*/
16964  }
16965 #line 16966 "parse.c"
16966  break;
16967 
16968  case 729: /* f_arg_item: "(" f_margs rparen */
16969 #line 6564 "parse.y"
16970  {
16971  ID tid = internal_id(p);
16972  YYLTYPE loc;
16973  loc.beg_pos = (yylsp[-1]).beg_pos;
16974  loc.end_pos = (yylsp[-1]).beg_pos;
16975  arg_var(p, tid);
16976  if (dyna_in_block(p)) {
16977  (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
16978  }
16979  else {
16980  (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
16981  }
16982  (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
16983  (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
16984  /*% ripper: mlhs_paren!($:2) %*/
16985  }
16986 #line 16987 "parse.c"
16987  break;
16988 
16989  case 731: /* f_arg: f_arg ',' f_arg_item */
16990 #line 6585 "parse.y"
16991  {
16992  (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
16993  (yyval.node_args_aux)->nd_plen++;
16994  (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
16995  rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
16996  /*% ripper: rb_ary_push($:1, $:3) %*/
16997  }
16998 #line 16999 "parse.c"
16999  break;
17000 
17001  case 732: /* f_label: "label" */
17002 #line 6596 "parse.y"
17003  {
17004  VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17005  if (e) {
17006  (yyval.id) = 0;
17007  /*% ripper[error]: param_error!(?e, $:1) %*/
17008  }
17009  /*
17010  * Workaround for Prism::ParseTest#test_filepath for
17011  * "unparser/corpus/literal/def.txt"
17012  *
17013  * See the discussion on https://github.com/ruby/ruby/pull/9923
17014  */
17015  arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17016  /*% ripper: $:1 %*/
17017  p->max_numparam = ORDINAL_PARAM;
17018  p->ctxt.in_argdef = 0;
17019  }
17020 #line 17021 "parse.c"
17021  break;
17022 
17023  case 733: /* f_kw: f_label arg_value */
17024 #line 6616 "parse.y"
17025  {
17026  p->ctxt.in_argdef = 1;
17027  (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17028  /*% ripper: [$:$, $:2] %*/
17029  }
17030 #line 17031 "parse.c"
17031  break;
17032 
17033  case 734: /* f_kw: f_label */
17034 #line 6622 "parse.y"
17035  {
17036  p->ctxt.in_argdef = 1;
17037  (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17038  /*% ripper: [$:$, 0] %*/
17039  }
17040 #line 17041 "parse.c"
17041  break;
17042 
17043  case 735: /* f_block_kw: f_label primary_value */
17044 #line 6630 "parse.y"
17045  {
17046  p->ctxt.in_argdef = 1;
17047  (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17048  /*% ripper: [$:$, $:2] %*/
17049  }
17050 #line 17051 "parse.c"
17051  break;
17052 
17053  case 736: /* f_block_kw: f_label */
17054 #line 6636 "parse.y"
17055  {
17056  p->ctxt.in_argdef = 1;
17057  (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17058  /*% ripper: [$:$, 0] %*/
17059  }
17060 #line 17061 "parse.c"
17061  break;
17062 
17063  case 739: /* f_no_kwarg: p_kwnorest */
17064 #line 6648 "parse.y"
17065  {
17066  /*% ripper: nokw_param!(Qnil) %*/
17067  }
17068 #line 17069 "parse.c"
17069  break;
17070 
17071  case 740: /* f_kwrest: kwrest_mark "local variable or method" */
17072 #line 6654 "parse.y"
17073  {
17074  arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17075  (yyval.id) = (yyvsp[0].id);
17076  /*% ripper: kwrest_param!($:2) %*/
17077  }
17078 #line 17079 "parse.c"
17079  break;
17080 
17081  case 741: /* f_kwrest: kwrest_mark */
17082 #line 6660 "parse.y"
17083  {
17084  arg_var(p, idFWD_KWREST);
17085  (yyval.id) = idFWD_KWREST;
17086  /*% ripper: kwrest_param!(Qnil) %*/
17087  }
17088 #line 17089 "parse.c"
17089  break;
17090 
17091  case 744: /* f_rest_arg: restarg_mark "local variable or method" */
17092 #line 6672 "parse.y"
17093  {
17094  arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17095  (yyval.id) = (yyvsp[0].id);
17096  /*% ripper: rest_param!($:2) %*/
17097  }
17098 #line 17099 "parse.c"
17099  break;
17100 
17101  case 745: /* f_rest_arg: restarg_mark */
17102 #line 6678 "parse.y"
17103  {
17104  arg_var(p, idFWD_REST);
17105  (yyval.id) = idFWD_REST;
17106  /*% ripper: rest_param!(Qnil) %*/
17107  }
17108 #line 17109 "parse.c"
17109  break;
17110 
17111  case 748: /* f_block_arg: blkarg_mark "local variable or method" */
17112 #line 6690 "parse.y"
17113  {
17114  arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17115  (yyval.id) = (yyvsp[0].id);
17116  /*% ripper: blockarg!($:2) %*/
17117  }
17118 #line 17119 "parse.c"
17119  break;
17120 
17121  case 749: /* f_block_arg: blkarg_mark */
17122 #line 6696 "parse.y"
17123  {
17124  arg_var(p, idFWD_BLOCK);
17125  (yyval.id) = idFWD_BLOCK;
17126  /*% ripper: blockarg!(Qnil) %*/
17127  }
17128 #line 17129 "parse.c"
17129  break;
17130 
17131  case 750: /* opt_f_block_arg: ',' f_block_arg */
17132 #line 6704 "parse.y"
17133  {
17134  (yyval.id) = (yyvsp[0].id);
17135  /*% ripper: $:2 %*/
17136  }
17137 #line 17138 "parse.c"
17138  break;
17139 
17140  case 751: /* opt_f_block_arg: none */
17141 #line 6709 "parse.y"
17142  {
17143  (yyval.id) = 0;
17144  /*% ripper: Qnil %*/
17145  }
17146 #line 17147 "parse.c"
17147  break;
17148 
17149  case 752: /* singleton: var_ref */
17150 #line 6716 "parse.y"
17151  {
17152  value_expr((yyvsp[0].node));
17153  (yyval.node) = (yyvsp[0].node);
17154  }
17155 #line 17156 "parse.c"
17156  break;
17157 
17158  case 753: /* $@37: %empty */
17159 #line 6721 "parse.y"
17160  {
17161  SET_LEX_STATE(EXPR_BEG);
17162  p->ctxt.in_argdef = 0;
17163  }
17164 #line 17165 "parse.c"
17165  break;
17166 
17167  case 754: /* singleton: '(' $@37 expr rparen */
17168 #line 6726 "parse.y"
17169  {
17170  p->ctxt.in_argdef = 1;
17171  NODE *expr = last_expr_node((yyvsp[-1].node));
17172  switch (nd_type(expr)) {
17173  case NODE_STR:
17174  case NODE_DSTR:
17175  case NODE_XSTR:
17176  case NODE_DXSTR:
17177  case NODE_REGX:
17178  case NODE_DREGX:
17179  case NODE_SYM:
17180  case NODE_LINE:
17181  case NODE_FILE:
17182  case NODE_ENCODING:
17183  case NODE_INTEGER:
17184  case NODE_FLOAT:
17185  case NODE_RATIONAL:
17186  case NODE_IMAGINARY:
17187  case NODE_DSYM:
17188  case NODE_LIST:
17189  case NODE_ZLIST:
17190  yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17191  break;
17192  default:
17193  value_expr((yyvsp[-1].node));
17194  break;
17195  }
17196  (yyval.node) = (yyvsp[-1].node);
17197  /*% ripper: paren!($:3) %*/
17198  }
17199 #line 17200 "parse.c"
17200  break;
17201 
17202  case 756: /* assoc_list: assocs trailer */
17203 #line 6760 "parse.y"
17204  {
17205  (yyval.node) = (yyvsp[-1].node);
17206  /*% ripper: assoclist_from_args!($:1) %*/
17207  }
17208 #line 17209 "parse.c"
17209  break;
17210 
17211  case 758: /* assocs: assocs ',' assoc */
17212 #line 6769 "parse.y"
17213  {
17214  NODE *assocs = (yyvsp[-2].node);
17215  NODE *tail = (yyvsp[0].node);
17216  if (!assocs) {
17217  assocs = tail;
17218  }
17219  else if (tail) {
17220  if (RNODE_LIST(assocs)->nd_head) {
17221  NODE *n = RNODE_LIST(tail)->nd_next;
17222  if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17223  nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17224  /* DSTAR */
17225  tail = RNODE_HASH(n)->nd_head;
17226  }
17227  }
17228  if (tail) {
17229  assocs = list_concat(assocs, tail);
17230  }
17231  }
17232  (yyval.node) = assocs;
17233  /*% ripper: rb_ary_push($:1, $:3) %*/
17234  }
17235 #line 17236 "parse.c"
17236  break;
17237 
17238  case 759: /* assoc: arg_value "=>" arg_value */
17239 #line 6794 "parse.y"
17240  {
17241  (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17242  /*% ripper: assoc_new!($:1, $:3) %*/
17243  }
17244 #line 17245 "parse.c"
17245  break;
17246 
17247  case 760: /* assoc: "label" arg_value */
17248 #line 6799 "parse.y"
17249  {
17250  (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17251  /*% ripper: assoc_new!($:1, $:2) %*/
17252  }
17253 #line 17254 "parse.c"
17254  break;
17255 
17256  case 761: /* assoc: "label" */
17257 #line 6804 "parse.y"
17258  {
17259  NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17260  if (!val) val = NEW_ERROR(&(yyloc));
17261  (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17262  /*% ripper: assoc_new!($:1, Qnil) %*/
17263  }
17264 #line 17265 "parse.c"
17265  break;
17266 
17267  case 762: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17268 #line 6811 "parse.y"
17269  {
17270  YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17271  (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17272  /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17273  }
17274 #line 17275 "parse.c"
17275  break;
17276 
17277  case 763: /* assoc: "**arg" arg_value */
17278 #line 6817 "parse.y"
17279  {
17280  (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17281  /*% ripper: assoc_splat!($:2) %*/
17282  }
17283 #line 17284 "parse.c"
17284  break;
17285 
17286  case 764: /* assoc: "**arg" */
17287 #line 6822 "parse.y"
17288  {
17289  forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17290  (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17291  NEW_LVAR(idFWD_KWREST, &(yyloc)));
17292  /*% ripper: assoc_splat!(Qnil) %*/
17293  }
17294 #line 17295 "parse.c"
17295  break;
17296 
17297  case 784: /* term: ';' */
17298 #line 6868 "parse.y"
17299  {yyerrok;token_flush(p);}
17300 #line 17301 "parse.c"
17301  break;
17302 
17303  case 785: /* term: '\n' */
17304 #line 6870 "parse.y"
17305  {
17306  (yyloc).end_pos = (yyloc).beg_pos;
17307  token_flush(p);
17308  }
17309 #line 17310 "parse.c"
17310  break;
17311 
17312  case 787: /* terms: terms ';' */
17313 #line 6877 "parse.y"
17314  {yyerrok;}
17315 #line 17316 "parse.c"
17316  break;
17317 
17318  case 788: /* none: %empty */
17319 #line 6881 "parse.y"
17320  {
17321  (yyval.node) = 0;
17322  }
17323 #line 17324 "parse.c"
17324  break;
17325 
17326 
17327 #line 17328 "parse.c"
17328 
17329  default: break;
17330  }
17331  /* User semantic actions sometimes alter yychar, and that requires
17332  that yytoken be updated with the new translation. We take the
17333  approach of translating immediately before every use of yytoken.
17334  One alternative is translating here after every semantic action,
17335  but that translation would be missed if the semantic action invokes
17336  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17337  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17338  incorrect destructor might then be invoked immediately. In the
17339  case of YYERROR or YYBACKUP, subsequent parser actions might lead
17340  to an incorrect destructor call or verbose syntax error message
17341  before the lookahead is translated. */
17342  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17343 
17344  YYPOPSTACK (yylen);
17345  /* %after-reduce function. */
17346 #line 2664 "parse.y"
17347  {after_reduce(yylen, p);}
17348 #line 17349 "parse.c"
17349 
17350  yylen = 0;
17351 
17352  *++yyvsp = yyval;
17353  *++yylsp = yyloc;
17354 
17355  /* Now 'shift' the result of the reduction. Determine what state
17356  that goes to, based on the state we popped back to and the rule
17357  number reduced by. */
17358  {
17359  const int yylhs = yyr1[yyn] - YYNTOKENS;
17360  const int yyi = yypgoto[yylhs] + *yyssp;
17361  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17362  ? yytable[yyi]
17363  : yydefgoto[yylhs]);
17364  }
17365 
17366  goto yynewstate;
17367 
17368 
17369 /*--------------------------------------.
17370 | yyerrlab -- here on detecting error. |
17371 `--------------------------------------*/
17372 yyerrlab:
17373  /* Make sure we have latest lookahead translation. See comments at
17374  user semantic actions for why this is necessary. */
17375  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17376  /* If not already recovering from an error, report this error. */
17377  if (!yyerrstatus)
17378  {
17379  ++yynerrs;
17380  {
17381  yypcontext_t yyctx
17382  = {yyssp, yytoken, &yylloc};
17383  char const *yymsgp = YY_("syntax error");
17384  int yysyntax_error_status;
17385  yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17386  if (yysyntax_error_status == 0)
17387  yymsgp = yymsg;
17388  else if (yysyntax_error_status == -1)
17389  {
17390  if (yymsg != yymsgbuf)
17391  YYSTACK_FREE (yymsg);
17392  yymsg = YY_CAST (char *,
17393  YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17394  if (yymsg)
17395  {
17396  yysyntax_error_status
17397  = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17398  yymsgp = yymsg;
17399  }
17400  else
17401  {
17402  yymsg = yymsgbuf;
17403  yymsg_alloc = sizeof yymsgbuf;
17404  yysyntax_error_status = YYENOMEM;
17405  }
17406  }
17407  yyerror (&yylloc, p, yymsgp);
17408  if (yysyntax_error_status == YYENOMEM)
17409  YYNOMEM;
17410  }
17411  }
17412 
17413  yyerror_range[1] = yylloc;
17414  if (yyerrstatus == 3)
17415  {
17416  /* If just tried and failed to reuse lookahead token after an
17417  error, discard it. */
17418 
17419  if (yychar <= END_OF_INPUT)
17420  {
17421  /* Return failure if at end of input. */
17422  if (yychar == END_OF_INPUT)
17423  YYABORT;
17424  }
17425  else
17426  {
17427  yydestruct ("Error: discarding",
17428  yytoken, &yylval, &yylloc, p);
17429  yychar = YYEMPTY;
17430  }
17431  }
17432 
17433  /* Else will try to reuse lookahead token after shifting the error
17434  token. */
17435  goto yyerrlab1;
17436 
17437 
17438 /*---------------------------------------------------.
17439 | yyerrorlab -- error raised explicitly by YYERROR. |
17440 `---------------------------------------------------*/
17441 yyerrorlab:
17442  /* Pacify compilers when the user code never invokes YYERROR and the
17443  label yyerrorlab therefore never appears in user code. */
17444  if (0)
17445  YYERROR;
17446  ++yynerrs;
17447 
17448  /* Do not reclaim the symbols of the rule whose action triggered
17449  this YYERROR. */
17450  YYPOPSTACK (yylen);
17451  /* %after-pop-stack function. */
17452 #line 2666 "parse.y"
17453  {after_pop_stack(yylen, p);}
17454 #line 17455 "parse.c"
17455 
17456  yylen = 0;
17457  YY_STACK_PRINT (yyss, yyssp, p);
17458  yystate = *yyssp;
17459  goto yyerrlab1;
17460 
17461 
17462 /*-------------------------------------------------------------.
17463 | yyerrlab1 -- common code for both syntax error and YYERROR. |
17464 `-------------------------------------------------------------*/
17465 yyerrlab1:
17466  yyerrstatus = 3; /* Each real token shifted decrements this. */
17467 
17468  /* Pop stack until we find a state that shifts the error token. */
17469  for (;;)
17470  {
17471  yyn = yypact[yystate];
17472  if (!yypact_value_is_default (yyn))
17473  {
17474  yyn += YYSYMBOL_YYerror;
17475  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
17476  {
17477  yyn = yytable[yyn];
17478  if (0 < yyn)
17479  break;
17480  }
17481  }
17482 
17483  /* Pop the current state because it cannot handle the error token. */
17484  if (yyssp == yyss)
17485  YYABORT;
17486 
17487  yyerror_range[1] = *yylsp;
17488  yydestruct ("Error: popping",
17489  YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
17490  YYPOPSTACK (1);
17491  /* %after-pop-stack function. */
17492 #line 2666 "parse.y"
17493  {after_pop_stack(1, p);}
17494 #line 17495 "parse.c"
17495 
17496  yystate = *yyssp;
17497  YY_STACK_PRINT (yyss, yyssp, p);
17498  }
17499 
17500  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17501  *++yyvsp = yylval;
17502  YY_IGNORE_MAYBE_UNINITIALIZED_END
17503 
17504  yyerror_range[2] = yylloc;
17505  ++yylsp;
17506  YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
17507 
17508  /* Shift the error token. */
17509  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
17510  /* %after-shift-error-token code. */
17511 #line 2665 "parse.y"
17512  {after_shift_error_token(p);}
17513 #line 17514 "parse.c"
17514 
17515 
17516  yystate = yyn;
17517  goto yynewstate;
17518 
17519 
17520 /*-------------------------------------.
17521 | yyacceptlab -- YYACCEPT comes here. |
17522 `-------------------------------------*/
17523 yyacceptlab:
17524  yyresult = 0;
17525  goto yyreturnlab;
17526 
17527 
17528 /*-----------------------------------.
17529 | yyabortlab -- YYABORT comes here. |
17530 `-----------------------------------*/
17531 yyabortlab:
17532  yyresult = 1;
17533  goto yyreturnlab;
17534 
17535 
17536 /*-----------------------------------------------------------.
17537 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
17538 `-----------------------------------------------------------*/
17539 yyexhaustedlab:
17540  yyerror (&yylloc, p, YY_("memory exhausted"));
17541  yyresult = 2;
17542  goto yyreturnlab;
17543 
17544 
17545 /*----------------------------------------------------------.
17546 | yyreturnlab -- parsing is finished, clean up and return. |
17547 `----------------------------------------------------------*/
17548 yyreturnlab:
17549  if (yychar != YYEMPTY)
17550  {
17551  /* Make sure we have latest lookahead translation. See comments at
17552  user semantic actions for why this is necessary. */
17553  yytoken = YYTRANSLATE (yychar);
17554  yydestruct ("Cleanup: discarding lookahead",
17555  yytoken, &yylval, &yylloc, p);
17556  }
17557  /* Do not reclaim the symbols of the rule whose action triggered
17558  this YYABORT or YYACCEPT. */
17559  YYPOPSTACK (yylen);
17560  YY_STACK_PRINT (yyss, yyssp, p);
17561  while (yyssp != yyss)
17562  {
17563  yydestruct ("Cleanup: popping",
17564  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
17565  YYPOPSTACK (1);
17566  }
17567 #ifndef yyoverflow
17568  if (yyss != yyssa)
17569  YYSTACK_FREE (yyss);
17570 #endif
17571  if (yymsg != yymsgbuf)
17572  YYSTACK_FREE (yymsg);
17573  return yyresult;
17574 }
17575 
17576 #line 6885 "parse.y"
17577 
17578 # undef p
17579 # undef yylex
17580 # undef yylval
17581 # define yylval (*p->lval)
17582 
17583 static int regx_options(struct parser_params*);
17584 static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
17585 static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
17586 static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
17587 static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
17588 
17589 #define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
17590 
17591 # define set_yylval_node(x) { \
17592  YYLTYPE _cur_loc; \
17593  rb_parser_set_location(p, &_cur_loc); \
17594  yylval.node = (x); \
17595  set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
17596 }
17597 # define set_yylval_str(x) \
17598 do { \
17599  set_yylval_node(NEW_STR(x, &_cur_loc)); \
17600  set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
17601 } while(0)
17602 # define set_yylval_num(x) { \
17603  yylval.num = (x); \
17604  set_parser_s_value(x); \
17605 }
17606 # define set_yylval_id(x) (yylval.id = (x))
17607 # define set_yylval_name(x) { \
17608  (yylval.id = (x)); \
17609  set_parser_s_value(ID2SYM(x)); \
17610 }
17611 # define yylval_id() (yylval.id)
17612 
17613 #define set_yylval_noname() set_yylval_id(keyword_nil)
17614 #define has_delayed_token(p) (p->delayed.token != NULL)
17615 
17616 #ifndef RIPPER
17617 #define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
17618 #define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
17619 
17620 static bool
17621 parser_has_token(struct parser_params *p)
17622 {
17623  const char *const pcur = p->lex.pcur;
17624  const char *const ptok = p->lex.ptok;
17625  if (p->keep_tokens && (pcur < ptok)) {
17626  rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
17627  p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
17628  }
17629  return pcur > ptok;
17630 }
17631 
17632 static const char *
17633 escaped_char(int c)
17634 {
17635  switch (c) {
17636  case '"': return "\\\"";
17637  case '\\': return "\\\\";
17638  case '\0': return "\\0";
17639  case '\n': return "\\n";
17640  case '\r': return "\\r";
17641  case '\t': return "\\t";
17642  case '\f': return "\\f";
17643  case '\013': return "\\v";
17644  case '\010': return "\\b";
17645  case '\007': return "\\a";
17646  case '\033': return "\\e";
17647  case '\x7f': return "\\c?";
17648  }
17649  return NULL;
17650 }
17651 
17652 static rb_parser_string_t *
17653 rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
17654 {
17655  rb_encoding *enc = p->enc;
17656  const char *ptr = str->ptr;
17657  const char *pend = ptr + str->len;
17658  const char *prev = ptr;
17659  char charbuf[5] = {'\\', 'x', 0, 0, 0};
17660  rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
17661 
17662  while (ptr < pend) {
17663  unsigned int c;
17664  const char *cc;
17665  int n = rb_enc_precise_mbclen(ptr, pend, enc);
17666  if (!MBCLEN_CHARFOUND_P(n)) {
17667  if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
17668  n = rb_enc_mbminlen(enc);
17669  if (pend < ptr + n)
17670  n = (int)(pend - ptr);
17671  while (n--) {
17672  c = *ptr & 0xf0 >> 4;
17673  charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
17674  c = *ptr & 0x0f;
17675  charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
17676  parser_str_cat(result, charbuf, 4);
17677  prev = ++ptr;
17678  }
17679  continue;
17680  }
17681  n = MBCLEN_CHARFOUND_LEN(n);
17682  c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
17683  ptr += n;
17684  cc = escaped_char(c);
17685  if (cc) {
17686  if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
17687  parser_str_cat_cstr(result, cc);
17688  prev = ptr;
17689  }
17690  else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
17691  }
17692  else {
17693  if (ptr - n > prev) {
17694  parser_str_cat(result, prev, ptr - n - prev);
17695  prev = ptr - n;
17696  }
17697  parser_str_cat(result, prev, ptr - prev);
17698  prev = ptr;
17699  }
17700  }
17701  if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
17702 
17703  return result;
17704 }
17705 
17706 static void
17707 parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
17708 {
17710  token->id = p->token_id;
17711  token->type_name = parser_token2char(p, t);
17712  token->str = str;
17713  token->loc.beg_pos = p->yylloc->beg_pos;
17714  token->loc.end_pos = p->yylloc->end_pos;
17715  rb_parser_ary_push_ast_token(p, p->tokens, token);
17716  p->token_id++;
17717 
17718  if (p->debug) {
17719  rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
17720  rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
17721  line, token->id, token->type_name, str_escaped->ptr,
17722  token->loc.beg_pos.lineno, token->loc.beg_pos.column,
17723  token->loc.end_pos.lineno, token->loc.end_pos.column);
17724  rb_parser_string_free(p, str_escaped);
17725  }
17726 }
17727 
17728 static void
17729 parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
17730 {
17731  debug_token_line(p, "parser_dispatch_scan_event", line);
17732 
17733  if (!parser_has_token(p)) return;
17734 
17735  RUBY_SET_YYLLOC(*p->yylloc);
17736 
17737  if (p->keep_tokens) {
17738  rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
17739  parser_append_tokens(p, str, t, line);
17740  }
17741 
17742  token_flush(p);
17743 }
17744 
17745 #define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
17746 static void
17747 parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
17748 {
17749  debug_token_line(p, "parser_dispatch_delayed_token", line);
17750 
17751  if (!has_delayed_token(p)) return;
17752 
17753  RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
17754 
17755  if (p->keep_tokens) {
17756  /* p->delayed.token is freed by rb_parser_tokens_free */
17757  parser_append_tokens(p, p->delayed.token, t, line);
17758  } else {
17759  rb_parser_string_free(p, p->delayed.token);
17760  }
17761 
17762  p->delayed.token = NULL;
17763 }
17764 #else
17765 #define literal_flush(p, ptr) ((void)(ptr))
17766 
17767 static int
17768 ripper_has_scan_event(struct parser_params *p)
17769 {
17770  if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
17771  return p->lex.pcur > p->lex.ptok;
17772 }
17773 
17774 static VALUE
17775 ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
17776 {
17777  VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
17778  VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
17779  RUBY_SET_YYLLOC(*p->yylloc);
17780  token_flush(p);
17781  return rval;
17782 }
17783 
17784 static void
17785 ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
17786 {
17787  if (!ripper_has_scan_event(p)) return;
17788 
17789  set_parser_s_value(ripper_scan_event_val(p, t));
17790 }
17791 #define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
17792 
17793 static void
17794 ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
17795 {
17796  /* save and adjust the location to delayed token for callbacks */
17797  int saved_line = p->ruby_sourceline;
17798  const char *saved_tokp = p->lex.ptok;
17799  VALUE s_value, str;
17800 
17801  if (!has_delayed_token(p)) return;
17802  p->ruby_sourceline = p->delayed.beg_line;
17803  p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
17804  str = rb_str_new_mutable_parser_string(p->delayed.token);
17805  rb_parser_string_free(p, p->delayed.token);
17806  s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
17807  set_parser_s_value(s_value);
17808  p->delayed.token = NULL;
17809  p->ruby_sourceline = saved_line;
17810  p->lex.ptok = saved_tokp;
17811 }
17812 #define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
17813 #endif /* RIPPER */
17814 
17815 static inline int
17816 is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
17817 {
17818  return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
17819 }
17820 
17821 static inline int
17822 parser_is_identchar(struct parser_params *p)
17823 {
17824  return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
17825 }
17826 
17827 static inline int
17828 parser_isascii(struct parser_params *p)
17829 {
17830  return ISASCII(*(p->lex.pcur-1));
17831 }
17832 
17833 static void
17834 token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
17835 {
17836  int column = 1, nonspc = 0, i;
17837  for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
17838  if (*ptr == '\t') {
17839  column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
17840  }
17841  column++;
17842  if (*ptr != ' ' && *ptr != '\t') {
17843  nonspc = 1;
17844  }
17845  }
17846 
17847  ptinfo->beg = loc->beg_pos;
17848  ptinfo->indent = column;
17849  ptinfo->nonspc = nonspc;
17850 }
17851 
17852 static void
17853 token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
17854 {
17855  token_info *ptinfo;
17856 
17857  if (!p->token_info_enabled) return;
17858  ptinfo = ALLOC(token_info);
17859  ptinfo->token = token;
17860  ptinfo->next = p->token_info;
17861  token_info_setup(ptinfo, p->lex.pbeg, loc);
17862 
17863  p->token_info = ptinfo;
17864 }
17865 
17866 static void
17867 token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
17868 {
17869  token_info *ptinfo_beg = p->token_info;
17870 
17871  if (!ptinfo_beg) return;
17872 
17873  /* indentation check of matched keywords (begin..end, if..end, etc.) */
17874  token_info_warn(p, token, ptinfo_beg, 1, loc);
17875 
17876  p->token_info = ptinfo_beg->next;
17877  ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
17878 }
17879 
17880 static void
17881 token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
17882 {
17883  token_info *ptinfo_beg = p->token_info;
17884 
17885  if (!ptinfo_beg) return;
17886  p->token_info = ptinfo_beg->next;
17887 
17888  if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
17889  ptinfo_beg->beg.column != beg_pos.column ||
17890  strcmp(ptinfo_beg->token, token)) {
17891  compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
17892  beg_pos.lineno, beg_pos.column, token,
17893  ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
17894  ptinfo_beg->token);
17895  }
17896 
17897  ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
17898 }
17899 
17900 static void
17901 token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
17902 {
17903  token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
17904  if (!p->token_info_enabled) return;
17905  if (!ptinfo_beg) return;
17906  token_info_setup(ptinfo_end, p->lex.pbeg, loc);
17907  if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
17908  if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
17909  if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
17910  if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
17911  rb_warn3L(ptinfo_end->beg.lineno,
17912  "mismatched indentations at '%s' with '%s' at %d",
17913  WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
17914 }
17915 
17916 static int
17917 parser_precise_mbclen(struct parser_params *p, const char *ptr)
17918 {
17919  int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
17920  if (!MBCLEN_CHARFOUND_P(len)) {
17921  compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
17922  return -1;
17923  }
17924  return len;
17925 }
17926 
17927 #ifndef RIPPER
17928 static inline void
17929 parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
17930 {
17931  rb_parser_string_t *str;
17932  int lineno = p->ruby_sourceline;
17933  if (!yylloc) {
17934  return;
17935  }
17936  else if (yylloc->beg_pos.lineno == lineno) {
17937  str = p->lex.lastline;
17938  }
17939  else {
17940  return;
17941  }
17942  ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
17943 }
17944 
17945 static int
17946 parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
17947 {
17948 #if 0
17949  YYLTYPE current;
17950 
17951  if (!yylloc) {
17952  yylloc = RUBY_SET_YYLLOC(current);
17953  }
17954  else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
17955  p->ruby_sourceline != yylloc->end_pos.lineno)) {
17956  yylloc = 0;
17957  }
17958 #endif
17959  parser_compile_error(p, yylloc, "%s", msg);
17960  parser_show_error_line(p, yylloc);
17961  return 0;
17962 }
17963 
17964 static int
17965 parser_yyerror0(struct parser_params *p, const char *msg)
17966 {
17967  YYLTYPE current;
17968  return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
17969 }
17970 
17971 void
17972 ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
17973 {
17974  VALUE mesg;
17975  const int max_line_margin = 30;
17976  const char *ptr, *ptr_end, *pt, *pb;
17977  const char *pre = "", *post = "", *pend;
17978  const char *code = "", *caret = "";
17979  const char *lim;
17980  const char *const pbeg = PARSER_STRING_PTR(str);
17981  char *buf;
17982  long len;
17983  int i;
17984 
17985  if (!yylloc) return;
17986  pend = rb_parser_string_end(str);
17987  if (pend > pbeg && pend[-1] == '\n') {
17988  if (--pend > pbeg && pend[-1] == '\r') --pend;
17989  }
17990 
17991  pt = pend;
17992  if (lineno == yylloc->end_pos.lineno &&
17993  (pend - pbeg) > yylloc->end_pos.column) {
17994  pt = pbeg + yylloc->end_pos.column;
17995  }
17996 
17997  ptr = ptr_end = pt;
17998  lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
17999  while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18000 
18001  lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18002  while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18003 
18004  len = ptr_end - ptr;
18005  if (len > 4) {
18006  if (ptr > pbeg) {
18007  ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18008  if (ptr > pbeg) pre = "...";
18009  }
18010  if (ptr_end < pend) {
18011  ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18012  if (ptr_end < pend) post = "...";
18013  }
18014  }
18015  pb = pbeg;
18016  if (lineno == yylloc->beg_pos.lineno) {
18017  pb += yylloc->beg_pos.column;
18018  if (pb > pt) pb = pt;
18019  }
18020  if (pb < ptr) pb = ptr;
18021  if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18022  return;
18023  }
18024  if (RTEST(errbuf)) {
18025  mesg = rb_attr_get(errbuf, idMesg);
18026  if (char_at_end(p, mesg, '\n') != '\n')
18027  rb_str_cat_cstr(mesg, "\n");
18028  }
18029  else {
18030  mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18031  }
18032  if (!errbuf && rb_stderr_tty_p()) {
18033 #define CSI_BEGIN "\033["
18034 #define CSI_SGR "m"
18035  rb_str_catf(mesg,
18036  CSI_BEGIN""CSI_SGR"%s" /* pre */
18037  CSI_BEGIN"1"CSI_SGR"%.*s"
18038  CSI_BEGIN"1;4"CSI_SGR"%.*s"
18039  CSI_BEGIN";1"CSI_SGR"%.*s"
18040  CSI_BEGIN""CSI_SGR"%s" /* post */
18041  "\n",
18042  pre,
18043  (int)(pb - ptr), ptr,
18044  (int)(pt - pb), pb,
18045  (int)(ptr_end - pt), pt,
18046  post);
18047  }
18048  else {
18049  char *p2;
18050 
18051  len = ptr_end - ptr;
18052  lim = pt < pend ? pt : pend;
18053  i = (int)(lim - ptr);
18054  buf = ALLOCA_N(char, i+2);
18055  code = ptr;
18056  caret = p2 = buf;
18057  if (ptr <= pb) {
18058  while (ptr < pb) {
18059  *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18060  }
18061  *p2++ = '^';
18062  ptr++;
18063  }
18064  if (lim > ptr) {
18065  memset(p2, '~', (lim - ptr));
18066  p2 += (lim - ptr);
18067  }
18068  *p2 = '\0';
18069  rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18070  pre, (int)len, code, post,
18071  pre, caret);
18072  }
18073  if (!errbuf) rb_write_error_str(mesg);
18074 }
18075 #else
18076 
18077 static int
18078 parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18079 {
18080  const char *pcur = 0, *ptok = 0;
18081  if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18082  p->ruby_sourceline == yylloc->end_pos.lineno) {
18083  pcur = p->lex.pcur;
18084  ptok = p->lex.ptok;
18085  p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18086  p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18087  }
18088  parser_yyerror0(p, msg);
18089  if (pcur) {
18090  p->lex.ptok = ptok;
18091  p->lex.pcur = pcur;
18092  }
18093  return 0;
18094 }
18095 
18096 static int
18097 parser_yyerror0(struct parser_params *p, const char *msg)
18098 {
18099  dispatch1(parse_error, STR_NEW2(msg));
18100  ripper_error(p);
18101  return 0;
18102 }
18103 
18104 static inline void
18105 parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18106 {
18107 }
18108 #endif /* !RIPPER */
18109 
18110 static int
18111 vtable_size(const struct vtable *tbl)
18112 {
18113  if (!DVARS_TERMINAL_P(tbl)) {
18114  return tbl->pos;
18115  }
18116  else {
18117  return 0;
18118  }
18119 }
18120 
18121 static struct vtable *
18122 vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18123 {
18124  struct vtable *tbl = ALLOC(struct vtable);
18125  tbl->pos = 0;
18126  tbl->capa = 8;
18127  tbl->tbl = ALLOC_N(ID, tbl->capa);
18128  tbl->prev = prev;
18129 #ifndef RIPPER
18130  if (p->debug) {
18131  rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18132  }
18133 #endif
18134  return tbl;
18135 }
18136 #define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18137 
18138 static void
18139 vtable_free_gen(struct parser_params *p, int line, const char *name,
18140  struct vtable *tbl)
18141 {
18142 #ifndef RIPPER
18143  if (p->debug) {
18144  rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18145  }
18146 #endif
18147  if (!DVARS_TERMINAL_P(tbl)) {
18148  if (tbl->tbl) {
18149  ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18150  }
18151  ruby_sized_xfree(tbl, sizeof(*tbl));
18152  }
18153 }
18154 #define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18155 
18156 static void
18157 vtable_add_gen(struct parser_params *p, int line, const char *name,
18158  struct vtable *tbl, ID id)
18159 {
18160 #ifndef RIPPER
18161  if (p->debug) {
18162  rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18163  line, name, (void *)tbl, rb_id2name(id));
18164  }
18165 #endif
18166  if (DVARS_TERMINAL_P(tbl)) {
18167  rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18168  return;
18169  }
18170  if (tbl->pos == tbl->capa) {
18171  tbl->capa = tbl->capa * 2;
18172  SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18173  }
18174  tbl->tbl[tbl->pos++] = id;
18175 }
18176 #define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18177 
18178 static void
18179 vtable_pop_gen(struct parser_params *p, int line, const char *name,
18180  struct vtable *tbl, int n)
18181 {
18182  if (p->debug) {
18183  rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18184  line, name, (void *)tbl, n);
18185  }
18186  if (tbl->pos < n) {
18187  rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18188  return;
18189  }
18190  tbl->pos -= n;
18191 }
18192 #define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18193 
18194 static int
18195 vtable_included(const struct vtable * tbl, ID id)
18196 {
18197  int i;
18198 
18199  if (!DVARS_TERMINAL_P(tbl)) {
18200  for (i = 0; i < tbl->pos; i++) {
18201  if (tbl->tbl[i] == id) {
18202  return i+1;
18203  }
18204  }
18205  }
18206  return 0;
18207 }
18208 
18209 static void parser_prepare(struct parser_params *p);
18210 
18211 static int
18212 e_option_supplied(struct parser_params *p)
18213 {
18214  return strcmp(p->ruby_sourcefile, "-e") == 0;
18215 }
18216 
18217 #ifndef RIPPER
18218 static NODE *parser_append_options(struct parser_params *p, NODE *node);
18219 
18220 static VALUE
18221 yycompile0(VALUE arg)
18222 {
18223  int n;
18224  NODE *tree;
18225  struct parser_params *p = (struct parser_params *)arg;
18226  int cov = FALSE;
18227 
18228  if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18229  cov = TRUE;
18230  }
18231 
18232  if (p->debug_lines) {
18233  p->ast->body.script_lines = p->debug_lines;
18234  }
18235 
18236  parser_prepare(p);
18237 #define RUBY_DTRACE_PARSE_HOOK(name) \
18238  if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18239  RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18240  }
18241  RUBY_DTRACE_PARSE_HOOK(BEGIN);
18242  n = yyparse(p);
18243  RUBY_DTRACE_PARSE_HOOK(END);
18244 
18245  p->debug_lines = 0;
18246 
18247  xfree(p->lex.strterm);
18248  p->lex.strterm = 0;
18249  p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18250  if (n || p->error_p) {
18251  VALUE mesg = p->error_buffer;
18252  if (!mesg) {
18253  mesg = syntax_error_new();
18254  }
18255  if (!p->error_tolerant) {
18256  rb_set_errinfo(mesg);
18257  return FALSE;
18258  }
18259  }
18260  tree = p->eval_tree;
18261  if (!tree) {
18262  tree = NEW_NIL(&NULL_LOC);
18263  }
18264  else {
18265  rb_parser_ary_t *tokens = p->tokens;
18266  NODE *prelude;
18267  NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18268  prelude = block_append(p, p->eval_tree_begin, body);
18269  RNODE_SCOPE(tree)->nd_body = prelude;
18270  p->ast->body.frozen_string_literal = p->frozen_string_literal;
18271  p->ast->body.coverage_enabled = cov;
18272  if (p->keep_tokens) {
18273  p->ast->node_buffer->tokens = tokens;
18274  p->tokens = NULL;
18275  }
18276  }
18277  p->ast->body.root = tree;
18278  p->ast->body.line_count = p->line_count;
18279  return TRUE;
18280 }
18281 
18282 static rb_ast_t *
18283 yycompile(struct parser_params *p, VALUE fname, int line)
18284 {
18285  rb_ast_t *ast;
18286  if (NIL_P(fname)) {
18287  p->ruby_sourcefile_string = Qnil;
18288  p->ruby_sourcefile = "(none)";
18289  }
18290  else {
18291  p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18292  p->ruby_sourcefile = StringValueCStr(fname);
18293  }
18294  p->ruby_sourceline = line - 1;
18295 
18296  p->lvtbl = NULL;
18297 
18298  p->ast = ast = rb_ast_new();
18299  compile_callback(yycompile0, (VALUE)p);
18300  p->ast = 0;
18301 
18302  while (p->lvtbl) {
18303  local_pop(p);
18304  }
18305 
18306  return ast;
18307 }
18308 #endif /* !RIPPER */
18309 
18310 static rb_encoding *
18311 must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18312 {
18313  rb_encoding *enc = rb_parser_str_get_encoding(s);
18314  if (!rb_enc_asciicompat(enc)) {
18315  rb_raise(rb_eArgError, "invalid source encoding");
18316  }
18317  return enc;
18318 }
18319 
18320 static rb_parser_string_t *
18321 lex_getline(struct parser_params *p)
18322 {
18323  rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18324  if (!line) return 0;
18325  p->line_count++;
18326  string_buffer_append(p, line);
18327  must_be_ascii_compatible(p, line);
18328  return line;
18329 }
18330 
18331 #ifndef RIPPER
18332 rb_ast_t*
18333 rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18334 {
18335  p->lex.gets = gets;
18336  p->lex.input = input;
18337  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18338 
18339  return yycompile(p, fname, line);
18340 }
18341 #endif /* !RIPPER */
18342 
18343 #define STR_FUNC_ESCAPE 0x01
18344 #define STR_FUNC_EXPAND 0x02
18345 #define STR_FUNC_REGEXP 0x04
18346 #define STR_FUNC_QWORDS 0x08
18347 #define STR_FUNC_SYMBOL 0x10
18348 #define STR_FUNC_INDENT 0x20
18349 #define STR_FUNC_LABEL 0x40
18350 #define STR_FUNC_LIST 0x4000
18351 #define STR_FUNC_TERM 0x8000
18352 
18353 enum string_type {
18354  str_label = STR_FUNC_LABEL,
18355  str_squote = (0),
18356  str_dquote = (STR_FUNC_EXPAND),
18357  str_xquote = (STR_FUNC_EXPAND),
18358  str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18359  str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18360  str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18361  str_ssym = (STR_FUNC_SYMBOL),
18362  str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18363 };
18364 
18365 static rb_parser_string_t *
18366 parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18367 {
18368  rb_parser_string_t *pstr;
18369 
18370  pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18371 
18372  if (!(func & STR_FUNC_REGEXP)) {
18373  if (rb_parser_is_ascii_string(p, pstr)) {
18374  }
18375  else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18376  /* everything is valid in ASCII-8BIT */
18377  enc = rb_ascii8bit_encoding();
18378  PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18379  }
18380  }
18381 
18382  return pstr;
18383 }
18384 
18385 static int
18386 strterm_is_heredoc(rb_strterm_t *strterm)
18387 {
18388  return strterm->heredoc;
18389 }
18390 
18391 static rb_strterm_t *
18392 new_strterm(struct parser_params *p, int func, int term, int paren)
18393 {
18394  rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18395  strterm->u.literal.func = func;
18396  strterm->u.literal.term = term;
18397  strterm->u.literal.paren = paren;
18398  return strterm;
18399 }
18400 
18401 static rb_strterm_t *
18402 new_heredoc(struct parser_params *p)
18403 {
18404  rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18405  strterm->heredoc = true;
18406  return strterm;
18407 }
18408 
18409 #define peek(p,c) peek_n(p, (c), 0)
18410 #define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18411 #define peekc(p) peekc_n(p, 0)
18412 #define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18413 
18414 #define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18415 static void
18416 parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18417 {
18418  debug_token_line(p, "add_delayed_token", line);
18419 
18420  if (tok < end) {
18421  if (has_delayed_token(p)) {
18422  bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18423  int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18424  int end_col = (next_line ? 0 : p->delayed.end_col);
18425  if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18426  dispatch_delayed_token(p, tSTRING_CONTENT);
18427  }
18428  }
18429  if (!has_delayed_token(p)) {
18430  p->delayed.token = rb_parser_string_new(p, 0, 0);
18431  rb_parser_enc_associate(p, p->delayed.token, p->enc);
18432  p->delayed.beg_line = p->ruby_sourceline;
18433  p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18434  }
18435  parser_str_cat(p->delayed.token, tok, end - tok);
18436  p->delayed.end_line = p->ruby_sourceline;
18437  p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
18438  p->lex.ptok = end;
18439  }
18440 }
18441 
18442 static void
18443 set_lastline(struct parser_params *p, rb_parser_string_t *str)
18444 {
18445  p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
18446  p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
18447  p->lex.lastline = str;
18448 }
18449 
18450 static int
18451 nextline(struct parser_params *p, int set_encoding)
18452 {
18453  rb_parser_string_t *str = p->lex.nextline;
18454  p->lex.nextline = 0;
18455  if (!str) {
18456  if (p->eofp)
18457  return -1;
18458 
18459  if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
18460  goto end_of_input;
18461  }
18462 
18463  if (!p->lex.input || !(str = lex_getline(p))) {
18464  end_of_input:
18465  p->eofp = 1;
18466  lex_goto_eol(p);
18467  return -1;
18468  }
18469 #ifndef RIPPER
18470  if (p->debug_lines) {
18471  if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
18472  rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
18473  rb_parser_ary_push_script_line(p, p->debug_lines, copy);
18474  }
18475 #endif
18476  p->cr_seen = FALSE;
18477  }
18478  else if (str == AFTER_HEREDOC_WITHOUT_TERMINTOR) {
18479  /* after here-document without terminator */
18480  goto end_of_input;
18481  }
18482  add_delayed_token(p, p->lex.ptok, p->lex.pend);
18483  if (p->heredoc_end > 0) {
18484  p->ruby_sourceline = p->heredoc_end;
18485  p->heredoc_end = 0;
18486  }
18487  p->ruby_sourceline++;
18488  set_lastline(p, str);
18489  token_flush(p);
18490  return 0;
18491 }
18492 
18493 static int
18494 parser_cr(struct parser_params *p, int c)
18495 {
18496  if (peek(p, '\n')) {
18497  p->lex.pcur++;
18498  c = '\n';
18499  }
18500  return c;
18501 }
18502 
18503 static inline int
18504 nextc0(struct parser_params *p, int set_encoding)
18505 {
18506  int c;
18507 
18508  if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINTOR)) {
18509  if (nextline(p, set_encoding)) return -1;
18510  }
18511  c = (unsigned char)*p->lex.pcur++;
18512  if (UNLIKELY(c == '\r')) {
18513  c = parser_cr(p, c);
18514  }
18515 
18516  return c;
18517 }
18518 #define nextc(p) nextc0(p, TRUE)
18519 
18520 static void
18521 pushback(struct parser_params *p, int c)
18522 {
18523  if (c == -1) return;
18524  p->eofp = 0;
18525  p->lex.pcur--;
18526  if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
18527  p->lex.pcur--;
18528  }
18529 }
18530 
18531 #define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
18532 
18533 #define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
18534 #define tok(p) (p)->tokenbuf
18535 #define toklen(p) (p)->tokidx
18536 
18537 static int
18538 looking_at_eol_p(struct parser_params *p)
18539 {
18540  const char *ptr = p->lex.pcur;
18541  while (!lex_eol_ptr_p(p, ptr)) {
18542  int c = (unsigned char)*ptr++;
18543  int eol = (c == '\n' || c == '#');
18544  if (eol || !ISSPACE(c)) {
18545  return eol;
18546  }
18547  }
18548  return TRUE;
18549 }
18550 
18551 static char*
18552 newtok(struct parser_params *p)
18553 {
18554  p->tokidx = 0;
18555  if (!p->tokenbuf) {
18556  p->toksiz = 60;
18557  p->tokenbuf = ALLOC_N(char, 60);
18558  }
18559  if (p->toksiz > 4096) {
18560  p->toksiz = 60;
18561  REALLOC_N(p->tokenbuf, char, 60);
18562  }
18563  return p->tokenbuf;
18564 }
18565 
18566 static char *
18567 tokspace(struct parser_params *p, int n)
18568 {
18569  p->tokidx += n;
18570 
18571  if (p->tokidx >= p->toksiz) {
18572  do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
18573  REALLOC_N(p->tokenbuf, char, p->toksiz);
18574  }
18575  return &p->tokenbuf[p->tokidx-n];
18576 }
18577 
18578 static void
18579 tokadd(struct parser_params *p, int c)
18580 {
18581  p->tokenbuf[p->tokidx++] = (char)c;
18582  if (p->tokidx >= p->toksiz) {
18583  p->toksiz *= 2;
18584  REALLOC_N(p->tokenbuf, char, p->toksiz);
18585  }
18586 }
18587 
18588 static int
18589 tok_hex(struct parser_params *p, size_t *numlen)
18590 {
18591  int c;
18592 
18593  c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
18594  if (!*numlen) {
18595  flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
18596  yyerror0("invalid hex escape");
18597  dispatch_scan_event(p, tSTRING_CONTENT);
18598  return 0;
18599  }
18600  p->lex.pcur += *numlen;
18601  return c;
18602 }
18603 
18604 #define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
18605 
18606 static int
18607 escaped_control_code(int c)
18608 {
18609  int c2 = 0;
18610  switch (c) {
18611  case ' ':
18612  c2 = 's';
18613  break;
18614  case '\n':
18615  c2 = 'n';
18616  break;
18617  case '\t':
18618  c2 = 't';
18619  break;
18620  case '\v':
18621  c2 = 'v';
18622  break;
18623  case '\r':
18624  c2 = 'r';
18625  break;
18626  case '\f':
18627  c2 = 'f';
18628  break;
18629  }
18630  return c2;
18631 }
18632 
18633 #define WARN_SPACE_CHAR(c, prefix) \
18634  rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
18635 
18636 static int
18637 tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
18638  int regexp_literal, const char *begin)
18639 {
18640  const int wide = !begin;
18641  size_t numlen;
18642  int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
18643 
18644  p->lex.pcur += numlen;
18645  if (p->lex.strterm == NULL ||
18646  strterm_is_heredoc(p->lex.strterm) ||
18647  (p->lex.strterm->u.literal.func != str_regexp)) {
18648  if (!begin) begin = p->lex.pcur;
18649  if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
18650  flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18651  yyerror0("invalid Unicode escape");
18652  dispatch_scan_event(p, tSTRING_CONTENT);
18653  return wide && numlen > 0;
18654  }
18655  if (codepoint > 0x10ffff) {
18656  flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18657  yyerror0("invalid Unicode codepoint (too large)");
18658  dispatch_scan_event(p, tSTRING_CONTENT);
18659  return wide;
18660  }
18661  if ((codepoint & 0xfffff800) == 0xd800) {
18662  flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18663  yyerror0("invalid Unicode codepoint");
18664  dispatch_scan_event(p, tSTRING_CONTENT);
18665  return wide;
18666  }
18667  }
18668  if (regexp_literal) {
18669  tokcopy(p, (int)numlen);
18670  }
18671  else if (codepoint >= 0x80) {
18672  rb_encoding *utf8 = rb_utf8_encoding();
18673  if (*encp && utf8 != *encp) {
18674  YYLTYPE loc = RUBY_INIT_YYLLOC();
18675  compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
18676  parser_show_error_line(p, &loc);
18677  return wide;
18678  }
18679  *encp = utf8;
18680  tokaddmbc(p, codepoint, *encp);
18681  }
18682  else {
18683  tokadd(p, codepoint);
18684  }
18685  return TRUE;
18686 }
18687 
18688 static int tokadd_mbchar(struct parser_params *p, int c);
18689 
18690 static int
18691 tokskip_mbchar(struct parser_params *p)
18692 {
18693  int len = parser_precise_mbclen(p, p->lex.pcur-1);
18694  if (len > 0) {
18695  p->lex.pcur += len - 1;
18696  }
18697  return len;
18698 }
18699 
18700 /* return value is for ?\u3042 */
18701 static void
18702 tokadd_utf8(struct parser_params *p, rb_encoding **encp,
18703  int term, int symbol_literal, int regexp_literal)
18704 {
18705  /*
18706  * If `term` is not -1, then we allow multiple codepoints in \u{}
18707  * upto `term` byte, otherwise we're parsing a character literal.
18708  * And then add the codepoints to the current token.
18709  */
18710  static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
18711 
18712  const int open_brace = '{', close_brace = '}';
18713 
18714  if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
18715 
18716  if (peek(p, open_brace)) { /* handle \u{...} form */
18717  if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
18718  /*
18719  * Skip parsing validation code and copy bytes as-is until term or
18720  * closing brace, in order to correctly handle extended regexps where
18721  * invalid unicode escapes are allowed in comments. The regexp parser
18722  * does its own validation and will catch any issues.
18723  */
18724  tokadd(p, open_brace);
18725  while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
18726  int c = peekc(p);
18727  if (c == close_brace) {
18728  tokadd(p, c);
18729  ++p->lex.pcur;
18730  break;
18731  }
18732  else if (c == term) {
18733  break;
18734  }
18735  if (c == '\\' && !lex_eol_n_p(p, 1)) {
18736  tokadd(p, c);
18737  c = *++p->lex.pcur;
18738  }
18739  tokadd_mbchar(p, c);
18740  }
18741  }
18742  else {
18743  const char *second = NULL;
18744  int c, last = nextc(p);
18745  if (lex_eol_p(p)) goto unterminated;
18746  while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
18747  while (c != close_brace) {
18748  if (c == term) goto unterminated;
18749  if (second == multiple_codepoints)
18750  second = p->lex.pcur;
18751  if (regexp_literal) tokadd(p, last);
18752  if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
18753  break;
18754  }
18755  while (ISSPACE(c = peekc(p))) {
18756  if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
18757  last = c;
18758  }
18759  if (term == -1 && !second)
18760  second = multiple_codepoints;
18761  }
18762 
18763  if (c != close_brace) {
18764  unterminated:
18765  flush_string_content(p, rb_utf8_encoding(), 0);
18766  yyerror0("unterminated Unicode escape");
18767  dispatch_scan_event(p, tSTRING_CONTENT);
18768  return;
18769  }
18770  if (second && second != multiple_codepoints) {
18771  const char *pcur = p->lex.pcur;
18772  p->lex.pcur = second;
18773  dispatch_scan_event(p, tSTRING_CONTENT);
18774  token_flush(p);
18775  p->lex.pcur = pcur;
18776  yyerror0(multiple_codepoints);
18777  token_flush(p);
18778  }
18779 
18780  if (regexp_literal) tokadd(p, close_brace);
18781  nextc(p);
18782  }
18783  }
18784  else { /* handle \uxxxx form */
18785  if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
18786  token_flush(p);
18787  return;
18788  }
18789  }
18790 }
18791 
18792 #define ESCAPE_CONTROL 1
18793 #define ESCAPE_META 2
18794 
18795 static int
18796 read_escape(struct parser_params *p, int flags, const char *begin)
18797 {
18798  int c;
18799  size_t numlen;
18800 
18801  switch (c = nextc(p)) {
18802  case '\\': /* Backslash */
18803  return c;
18804 
18805  case 'n': /* newline */
18806  return '\n';
18807 
18808  case 't': /* horizontal tab */
18809  return '\t';
18810 
18811  case 'r': /* carriage-return */
18812  return '\r';
18813 
18814  case 'f': /* form-feed */
18815  return '\f';
18816 
18817  case 'v': /* vertical tab */
18818  return '\13';
18819 
18820  case 'a': /* alarm(bell) */
18821  return '\007';
18822 
18823  case 'e': /* escape */
18824  return 033;
18825 
18826  case '0': case '1': case '2': case '3': /* octal constant */
18827  case '4': case '5': case '6': case '7':
18828  pushback(p, c);
18829  c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
18830  p->lex.pcur += numlen;
18831  return c;
18832 
18833  case 'x': /* hex constant */
18834  c = tok_hex(p, &numlen);
18835  if (numlen == 0) return 0;
18836  return c;
18837 
18838  case 'b': /* backspace */
18839  return '\010';
18840 
18841  case 's': /* space */
18842  return ' ';
18843 
18844  case 'M':
18845  if (flags & ESCAPE_META) goto eof;
18846  if ((c = nextc(p)) != '-') {
18847  goto eof;
18848  }
18849  if ((c = nextc(p)) == '\\') {
18850  switch (peekc(p)) {
18851  case 'u': case 'U':
18852  nextc(p);
18853  goto eof;
18854  }
18855  return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
18856  }
18857  else if (c == -1) goto eof;
18858  else if (!ISASCII(c)) {
18859  tokskip_mbchar(p);
18860  goto eof;
18861  }
18862  else {
18863  int c2 = escaped_control_code(c);
18864  if (c2) {
18865  if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
18866  WARN_SPACE_CHAR(c2, "\\M-");
18867  }
18868  else {
18869  WARN_SPACE_CHAR(c2, "\\C-\\M-");
18870  }
18871  }
18872  else if (ISCNTRL(c)) goto eof;
18873  return ((c & 0xff) | 0x80);
18874  }
18875 
18876  case 'C':
18877  if ((c = nextc(p)) != '-') {
18878  goto eof;
18879  }
18880  case 'c':
18881  if (flags & ESCAPE_CONTROL) goto eof;
18882  if ((c = nextc(p))== '\\') {
18883  switch (peekc(p)) {
18884  case 'u': case 'U':
18885  nextc(p);
18886  goto eof;
18887  }
18888  c = read_escape(p, flags|ESCAPE_CONTROL, begin);
18889  }
18890  else if (c == '?')
18891  return 0177;
18892  else if (c == -1) goto eof;
18893  else if (!ISASCII(c)) {
18894  tokskip_mbchar(p);
18895  goto eof;
18896  }
18897  else {
18898  int c2 = escaped_control_code(c);
18899  if (c2) {
18900  if (ISCNTRL(c)) {
18901  if (flags & ESCAPE_META) {
18902  WARN_SPACE_CHAR(c2, "\\M-");
18903  }
18904  else {
18905  WARN_SPACE_CHAR(c2, "");
18906  }
18907  }
18908  else {
18909  if (flags & ESCAPE_META) {
18910  WARN_SPACE_CHAR(c2, "\\M-\\C-");
18911  }
18912  else {
18913  WARN_SPACE_CHAR(c2, "\\C-");
18914  }
18915  }
18916  }
18917  else if (ISCNTRL(c)) goto eof;
18918  }
18919  return c & 0x9f;
18920 
18921  eof:
18922  case -1:
18923  flush_string_content(p, p->enc, p->lex.pcur - begin);
18924  yyerror0("Invalid escape character syntax");
18925  dispatch_scan_event(p, tSTRING_CONTENT);
18926  return '\0';
18927 
18928  default:
18929  return c;
18930  }
18931 }
18932 
18933 static void
18934 tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
18935 {
18936  int len = rb_enc_codelen(c, enc);
18937  rb_enc_mbcput(c, tokspace(p, len), enc);
18938 }
18939 
18940 static int
18941 tokadd_escape(struct parser_params *p)
18942 {
18943  int c;
18944  size_t numlen;
18945  const char *begin = p->lex.pcur;
18946 
18947  switch (c = nextc(p)) {
18948  case '\n':
18949  return 0; /* just ignore */
18950 
18951  case '0': case '1': case '2': case '3': /* octal constant */
18952  case '4': case '5': case '6': case '7':
18953  {
18954  ruby_scan_oct(--p->lex.pcur, 3, &numlen);
18955  if (numlen == 0) goto eof;
18956  p->lex.pcur += numlen;
18957  tokcopy(p, (int)numlen + 1);
18958  }
18959  return 0;
18960 
18961  case 'x': /* hex constant */
18962  {
18963  tok_hex(p, &numlen);
18964  if (numlen == 0) return -1;
18965  tokcopy(p, (int)numlen + 2);
18966  }
18967  return 0;
18968 
18969  eof:
18970  case -1:
18971  flush_string_content(p, p->enc, p->lex.pcur - begin);
18972  yyerror0("Invalid escape character syntax");
18973  token_flush(p);
18974  return -1;
18975 
18976  default:
18977  tokadd(p, '\\');
18978  tokadd(p, c);
18979  }
18980  return 0;
18981 }
18982 
18983 static int
18984 char_to_option(int c)
18985 {
18986  int val;
18987 
18988  switch (c) {
18989  case 'i':
18990  val = RE_ONIG_OPTION_IGNORECASE;
18991  break;
18992  case 'x':
18993  val = RE_ONIG_OPTION_EXTEND;
18994  break;
18995  case 'm':
18996  val = RE_ONIG_OPTION_MULTILINE;
18997  break;
18998  default:
18999  val = 0;
19000  break;
19001  }
19002  return val;
19003 }
19004 
19005 #define ARG_ENCODING_FIXED 16
19006 #define ARG_ENCODING_NONE 32
19007 #define ENC_ASCII8BIT 1
19008 #define ENC_EUC_JP 2
19009 #define ENC_Windows_31J 3
19010 #define ENC_UTF8 4
19011 
19012 static int
19013 char_to_option_kcode(int c, int *option, int *kcode)
19014 {
19015  *option = 0;
19016 
19017  switch (c) {
19018  case 'n':
19019  *kcode = ENC_ASCII8BIT;
19020  return (*option = ARG_ENCODING_NONE);
19021  case 'e':
19022  *kcode = ENC_EUC_JP;
19023  break;
19024  case 's':
19025  *kcode = ENC_Windows_31J;
19026  break;
19027  case 'u':
19028  *kcode = ENC_UTF8;
19029  break;
19030  default:
19031  *kcode = -1;
19032  return (*option = char_to_option(c));
19033  }
19034  *option = ARG_ENCODING_FIXED;
19035  return 1;
19036 }
19037 
19038 static int
19039 regx_options(struct parser_params *p)
19040 {
19041  int kcode = 0;
19042  int kopt = 0;
19043  int options = 0;
19044  int c, opt, kc;
19045 
19046  newtok(p);
19047  while (c = nextc(p), ISALPHA(c)) {
19048  if (c == 'o') {
19049  options |= RE_OPTION_ONCE;
19050  }
19051  else if (char_to_option_kcode(c, &opt, &kc)) {
19052  if (kc >= 0) {
19053  if (kc != ENC_ASCII8BIT) kcode = c;
19054  kopt = opt;
19055  }
19056  else {
19057  options |= opt;
19058  }
19059  }
19060  else {
19061  tokadd(p, c);
19062  }
19063  }
19064  options |= kopt;
19065  pushback(p, c);
19066  if (toklen(p)) {
19067  YYLTYPE loc = RUBY_INIT_YYLLOC();
19068  tokfix(p);
19069  compile_error(p, "unknown regexp option%s - %*s",
19070  toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19071  parser_show_error_line(p, &loc);
19072  }
19073  return options | RE_OPTION_ENCODING(kcode);
19074 }
19075 
19076 static int
19077 tokadd_mbchar(struct parser_params *p, int c)
19078 {
19079  int len = parser_precise_mbclen(p, p->lex.pcur-1);
19080  if (len < 0) return -1;
19081  tokadd(p, c);
19082  p->lex.pcur += --len;
19083  if (len > 0) tokcopy(p, len);
19084  return c;
19085 }
19086 
19087 static inline int
19088 simple_re_meta(int c)
19089 {
19090  switch (c) {
19091  case '$': case '*': case '+': case '.':
19092  case '?': case '^': case '|':
19093  case ')': case ']': case '}': case '>':
19094  return TRUE;
19095  default:
19096  return FALSE;
19097  }
19098 }
19099 
19100 static int
19101 parser_update_heredoc_indent(struct parser_params *p, int c)
19102 {
19103  if (p->heredoc_line_indent == -1) {
19104  if (c == '\n') p->heredoc_line_indent = 0;
19105  }
19106  else {
19107  if (c == ' ') {
19108  p->heredoc_line_indent++;
19109  return TRUE;
19110  }
19111  else if (c == '\t') {
19112  int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19113  p->heredoc_line_indent = w * TAB_WIDTH;
19114  return TRUE;
19115  }
19116  else if (c != '\n') {
19117  if (p->heredoc_indent > p->heredoc_line_indent) {
19118  p->heredoc_indent = p->heredoc_line_indent;
19119  }
19120  p->heredoc_line_indent = -1;
19121  }
19122  else {
19123  /* Whitespace only line has no indentation */
19124  p->heredoc_line_indent = 0;
19125  }
19126  }
19127  return FALSE;
19128 }
19129 
19130 static void
19131 parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19132 {
19133  YYLTYPE loc = RUBY_INIT_YYLLOC();
19134  const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19135  compile_error(p, "%s mixed within %s source", n1, n2);
19136  parser_show_error_line(p, &loc);
19137 }
19138 
19139 static void
19140 parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19141 {
19142  const char *pos = p->lex.pcur;
19143  p->lex.pcur = beg;
19144  parser_mixed_error(p, enc1, enc2);
19145  p->lex.pcur = pos;
19146 }
19147 
19148 static inline char
19149 nibble_char_upper(unsigned int c)
19150 {
19151  c &= 0xf;
19152  return c + (c < 10 ? '0' : 'A' - 10);
19153 }
19154 
19155 static int
19156 tokadd_string(struct parser_params *p,
19157  int func, int term, int paren, long *nest,
19158  rb_encoding **encp, rb_encoding **enc)
19159 {
19160  int c;
19161  bool erred = false;
19162 #ifdef RIPPER
19163  const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19164  int top_of_line = FALSE;
19165 #endif
19166 
19167 #define mixed_error(enc1, enc2) \
19168  (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19169 #define mixed_escape(beg, enc1, enc2) \
19170  (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19171 
19172  while ((c = nextc(p)) != -1) {
19173  if (p->heredoc_indent > 0) {
19174  parser_update_heredoc_indent(p, c);
19175  }
19176 #ifdef RIPPER
19177  if (top_of_line && heredoc_end == p->ruby_sourceline) {
19178  pushback(p, c);
19179  break;
19180  }
19181 #endif
19182 
19183  if (paren && c == paren) {
19184  ++*nest;
19185  }
19186  else if (c == term) {
19187  if (!nest || !*nest) {
19188  pushback(p, c);
19189  break;
19190  }
19191  --*nest;
19192  }
19193  else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19194  unsigned char c2 = *p->lex.pcur;
19195  if (c2 == '$' || c2 == '@' || c2 == '{') {
19196  pushback(p, c);
19197  break;
19198  }
19199  }
19200  else if (c == '\\') {
19201  c = nextc(p);
19202  switch (c) {
19203  case '\n':
19204  if (func & STR_FUNC_QWORDS) break;
19205  if (func & STR_FUNC_EXPAND) {
19206  if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19207  continue;
19208  if (c == term) {
19209  c = '\\';
19210  goto terminate;
19211  }
19212  }
19213  tokadd(p, '\\');
19214  break;
19215 
19216  case '\\':
19217  if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19218  break;
19219 
19220  case 'u':
19221  if ((func & STR_FUNC_EXPAND) == 0) {
19222  tokadd(p, '\\');
19223  break;
19224  }
19225  tokadd_utf8(p, enc, term,
19226  func & STR_FUNC_SYMBOL,
19227  func & STR_FUNC_REGEXP);
19228  continue;
19229 
19230  default:
19231  if (c == -1) return -1;
19232  if (!ISASCII(c)) {
19233  if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19234  goto non_ascii;
19235  }
19236  if (func & STR_FUNC_REGEXP) {
19237  switch (c) {
19238  case 'c':
19239  case 'C':
19240  case 'M': {
19241  pushback(p, c);
19242  c = read_escape(p, 0, p->lex.pcur - 1);
19243 
19244  char *t = tokspace(p, rb_strlen_lit("\\x00"));
19245  *t++ = '\\';
19246  *t++ = 'x';
19247  *t++ = nibble_char_upper(c >> 4);
19248  *t++ = nibble_char_upper(c);
19249  continue;
19250  }
19251  }
19252 
19253  if (c == term && !simple_re_meta(c)) {
19254  tokadd(p, c);
19255  continue;
19256  }
19257  pushback(p, c);
19258  if ((c = tokadd_escape(p)) < 0)
19259  return -1;
19260  if (*enc && *enc != *encp) {
19261  mixed_escape(p->lex.ptok+2, *enc, *encp);
19262  }
19263  continue;
19264  }
19265  else if (func & STR_FUNC_EXPAND) {
19266  pushback(p, c);
19267  if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19268  c = read_escape(p, 0, p->lex.pcur - 1);
19269  }
19270  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19271  /* ignore backslashed spaces in %w */
19272  }
19273  else if (c != term && !(paren && c == paren)) {
19274  tokadd(p, '\\');
19275  pushback(p, c);
19276  continue;
19277  }
19278  }
19279  }
19280  else if (!parser_isascii(p)) {
19281  non_ascii:
19282  if (!*enc) {
19283  *enc = *encp;
19284  }
19285  else if (*enc != *encp) {
19286  mixed_error(*enc, *encp);
19287  continue;
19288  }
19289  if (tokadd_mbchar(p, c) == -1) return -1;
19290  continue;
19291  }
19292  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19293  pushback(p, c);
19294  break;
19295  }
19296  if (c & 0x80) {
19297  if (!*enc) {
19298  *enc = *encp;
19299  }
19300  else if (*enc != *encp) {
19301  mixed_error(*enc, *encp);
19302  continue;
19303  }
19304  }
19305  tokadd(p, c);
19306 #ifdef RIPPER
19307  top_of_line = (c == '\n');
19308 #endif
19309  }
19310  terminate:
19311  if (*enc) *encp = *enc;
19312  return c;
19313 }
19314 
19315 #define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19316 
19317 static void
19318 flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19319 {
19320  p->lex.pcur -= back;
19321  if (has_delayed_token(p)) {
19322  ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19323  if (len > 0) {
19324  rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19325  p->delayed.end_line = p->ruby_sourceline;
19326  p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19327  }
19328  dispatch_delayed_token(p, tSTRING_CONTENT);
19329  p->lex.ptok = p->lex.pcur;
19330  }
19331  dispatch_scan_event(p, tSTRING_CONTENT);
19332  p->lex.pcur += back;
19333 }
19334 
19335 /* this can be shared with ripper, since it's independent from struct
19336  * parser_params. */
19337 #ifndef RIPPER
19338 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19339 #define SPECIAL_PUNCT(idx) ( \
19340  BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19341  BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19342  BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19343  BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19344  BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19345  BIT('0', idx))
19346 const uint_least32_t ruby_global_name_punct_bits[] = {
19347  SPECIAL_PUNCT(0),
19348  SPECIAL_PUNCT(1),
19349  SPECIAL_PUNCT(2),
19350 };
19351 #undef BIT
19352 #undef SPECIAL_PUNCT
19353 #endif
19354 
19355 static enum yytokentype
19356 parser_peek_variable_name(struct parser_params *p)
19357 {
19358  int c;
19359  const char *ptr = p->lex.pcur;
19360 
19361  if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19362  c = *ptr++;
19363  switch (c) {
19364  case '$':
19365  if ((c = *ptr) == '-') {
19366  if (lex_eol_ptr_p(p, ++ptr)) return 0;
19367  c = *ptr;
19368  }
19369  else if (is_global_name_punct(c) || ISDIGIT(c)) {
19370  return tSTRING_DVAR;
19371  }
19372  break;
19373  case '@':
19374  if ((c = *ptr) == '@') {
19375  if (lex_eol_ptr_p(p, ++ptr)) return 0;
19376  c = *ptr;
19377  }
19378  break;
19379  case '{':
19380  p->lex.pcur = ptr;
19381  p->command_start = TRUE;
19382  yylval.state = p->lex.state;
19383  return tSTRING_DBEG;
19384  default:
19385  return 0;
19386  }
19387  if (!ISASCII(c) || c == '_' || ISALPHA(c))
19388  return tSTRING_DVAR;
19389  return 0;
19390 }
19391 
19392 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19393 #define IS_END() IS_lex_state(EXPR_END_ANY)
19394 #define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19395 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19396 #define IS_LABEL_POSSIBLE() (\
19397  (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19398  IS_ARG())
19399 #define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19400 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19401 
19402 static inline enum yytokentype
19403 parser_string_term(struct parser_params *p, int func)
19404 {
19405  xfree(p->lex.strterm);
19406  p->lex.strterm = 0;
19407  if (func & STR_FUNC_REGEXP) {
19408  set_yylval_num(regx_options(p));
19409  dispatch_scan_event(p, tREGEXP_END);
19410  SET_LEX_STATE(EXPR_END);
19411  return tREGEXP_END;
19412  }
19413  if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19414  nextc(p);
19415  SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19416  return tLABEL_END;
19417  }
19418  SET_LEX_STATE(EXPR_END);
19419  return tSTRING_END;
19420 }
19421 
19422 static enum yytokentype
19423 parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19424 {
19425  int func = quote->func;
19426  int term = quote->term;
19427  int paren = quote->paren;
19428  int c, space = 0;
19429  rb_encoding *enc = p->enc;
19430  rb_encoding *base_enc = 0;
19431  rb_parser_string_t *lit;
19432 
19433  if (func & STR_FUNC_TERM) {
19434  if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
19435  SET_LEX_STATE(EXPR_END);
19436  xfree(p->lex.strterm);
19437  p->lex.strterm = 0;
19438  return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
19439  }
19440  c = nextc(p);
19441  if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19442  while (c != '\n' && ISSPACE(c = nextc(p)));
19443  space = 1;
19444  }
19445  if (func & STR_FUNC_LIST) {
19446  quote->func &= ~STR_FUNC_LIST;
19447  space = 1;
19448  }
19449  if (c == term && !quote->nest) {
19450  if (func & STR_FUNC_QWORDS) {
19451  quote->func |= STR_FUNC_TERM;
19452  pushback(p, c); /* dispatch the term at tSTRING_END */
19453  add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19454  return ' ';
19455  }
19456  return parser_string_term(p, func);
19457  }
19458  if (space) {
19459  if (!ISSPACE(c)) pushback(p, c);
19460  add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19461  return ' ';
19462  }
19463  newtok(p);
19464  if ((func & STR_FUNC_EXPAND) && c == '#') {
19465  enum yytokentype t = parser_peek_variable_name(p);
19466  if (t) return t;
19467  tokadd(p, '#');
19468  c = nextc(p);
19469  }
19470  pushback(p, c);
19471  if (tokadd_string(p, func, term, paren, &quote->nest,
19472  &enc, &base_enc) == -1) {
19473  if (p->eofp) {
19474 #ifndef RIPPER
19475 # define unterminated_literal(mesg) yyerror0(mesg)
19476 #else
19477 # define unterminated_literal(mesg) compile_error(p, mesg)
19478 #endif
19479  literal_flush(p, p->lex.pcur);
19480  if (func & STR_FUNC_QWORDS) {
19481  /* no content to add, bailing out here */
19482  unterminated_literal("unterminated list meets end of file");
19483  xfree(p->lex.strterm);
19484  p->lex.strterm = 0;
19485  return tSTRING_END;
19486  }
19487  if (func & STR_FUNC_REGEXP) {
19488  unterminated_literal("unterminated regexp meets end of file");
19489  }
19490  else {
19491  unterminated_literal("unterminated string meets end of file");
19492  }
19493  quote->func |= STR_FUNC_TERM;
19494  }
19495  }
19496 
19497  tokfix(p);
19498  lit = STR_NEW3(tok(p), toklen(p), enc, func);
19499  set_yylval_str(lit);
19500  flush_string_content(p, enc, 0);
19501 
19502  return tSTRING_CONTENT;
19503 }
19504 
19505 static enum yytokentype
19506 heredoc_identifier(struct parser_params *p)
19507 {
19508  /*
19509  * term_len is length of `<<"END"` except `END`,
19510  * in this case term_len is 4 (<, <, " and ").
19511  */
19512  long len, offset = p->lex.pcur - p->lex.pbeg;
19513  int c = nextc(p), term, func = 0, quote = 0;
19514  enum yytokentype token = tSTRING_BEG;
19515  int indent = 0;
19516 
19517  if (c == '-') {
19518  c = nextc(p);
19519  func = STR_FUNC_INDENT;
19520  offset++;
19521  }
19522  else if (c == '~') {
19523  c = nextc(p);
19524  func = STR_FUNC_INDENT;
19525  offset++;
19526  indent = INT_MAX;
19527  }
19528  switch (c) {
19529  case '\'':
19530  func |= str_squote; goto quoted;
19531  case '"':
19532  func |= str_dquote; goto quoted;
19533  case '`':
19534  token = tXSTRING_BEG;
19535  func |= str_xquote; goto quoted;
19536 
19537  quoted:
19538  quote++;
19539  offset++;
19540  term = c;
19541  len = 0;
19542  while ((c = nextc(p)) != term) {
19543  if (c == -1 || c == '\r' || c == '\n') {
19544  yyerror0("unterminated here document identifier");
19545  return -1;
19546  }
19547  }
19548  break;
19549 
19550  default:
19551  if (!parser_is_identchar(p)) {
19552  pushback(p, c);
19553  if (func & STR_FUNC_INDENT) {
19554  pushback(p, indent > 0 ? '~' : '-');
19555  }
19556  return 0;
19557  }
19558  func |= str_dquote;
19559  do {
19560  int n = parser_precise_mbclen(p, p->lex.pcur-1);
19561  if (n < 0) return 0;
19562  p->lex.pcur += --n;
19563  } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
19564  pushback(p, c);
19565  break;
19566  }
19567 
19568  len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
19569  if ((unsigned long)len >= HERETERM_LENGTH_MAX)
19570  yyerror0("too long here document identifier");
19571  dispatch_scan_event(p, tHEREDOC_BEG);
19572  lex_goto_eol(p);
19573 
19574  p->lex.strterm = new_heredoc(p);
19575  rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
19576  here->offset = offset;
19577  here->sourceline = p->ruby_sourceline;
19578  here->length = (unsigned)len;
19579  here->quote = quote;
19580  here->func = func;
19581  here->lastline = p->lex.lastline;
19582 
19583  token_flush(p);
19584  p->heredoc_indent = indent;
19585  p->heredoc_line_indent = 0;
19586  return token;
19587 }
19588 
19589 static void
19590 heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
19591 {
19592  rb_parser_string_t *line;
19593  rb_strterm_t *term = p->lex.strterm;
19594 
19595  p->lex.strterm = 0;
19596  line = here->lastline;
19597  p->lex.lastline = line;
19598  p->lex.pbeg = PARSER_STRING_PTR(line);
19599  p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
19600  p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
19601  p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
19602  p->heredoc_end = p->ruby_sourceline;
19603  p->ruby_sourceline = (int)here->sourceline;
19604  if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINTOR;
19605  p->eofp = 0;
19606  xfree(term);
19607 }
19608 
19609 static int
19610 dedent_string_column(const char *str, long len, int width)
19611 {
19612  int i, col = 0;
19613 
19614  for (i = 0; i < len && col < width; i++) {
19615  if (str[i] == ' ') {
19616  col++;
19617  }
19618  else if (str[i] == '\t') {
19619  int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
19620  if (n > width) break;
19621  col = n;
19622  }
19623  else {
19624  break;
19625  }
19626  }
19627 
19628  return i;
19629 }
19630 
19631 static int
19632 dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
19633 {
19634  char *str;
19635  long len;
19636  int i;
19637 
19638  len = PARSER_STRING_LEN(string);
19639  str = PARSER_STRING_PTR(string);
19640 
19641  i = dedent_string_column(str, len, width);
19642  if (!i) return 0;
19643 
19644  rb_parser_str_modify(string);
19645  str = PARSER_STRING_PTR(string);
19646  if (PARSER_STRING_LEN(string) != len)
19647  rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
19648  MEMMOVE(str, str + i, char, len - i);
19649  rb_parser_str_set_len(p, string, len - i);
19650  return i;
19651 }
19652 
19653 static NODE *
19654 heredoc_dedent(struct parser_params *p, NODE *root)
19655 {
19656  NODE *node, *str_node, *prev_node;
19657  int indent = p->heredoc_indent;
19658  rb_parser_string_t *prev_lit = 0;
19659 
19660  if (indent <= 0) return root;
19661  if (!root) return root;
19662 
19663  prev_node = node = str_node = root;
19664  if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
19665 
19666  while (str_node) {
19667  rb_parser_string_t *lit = RNODE_STR(str_node)->string;
19668  if (nd_fl_newline(str_node)) {
19669  dedent_string(p, lit, indent);
19670  }
19671  if (!prev_lit) {
19672  prev_lit = lit;
19673  }
19674  else if (!literal_concat0(p, prev_lit, lit)) {
19675  return 0;
19676  }
19677  else {
19678  NODE *end = RNODE_LIST(node)->as.nd_end;
19679  node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
19680  if (!node) {
19681  if (nd_type_p(prev_node, NODE_DSTR))
19682  nd_set_type(prev_node, NODE_STR);
19683  break;
19684  }
19685  RNODE_LIST(node)->as.nd_end = end;
19686  goto next_str;
19687  }
19688 
19689  str_node = 0;
19690  while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
19691  next_str:
19692  if (!nd_type_p(node, NODE_LIST)) break;
19693  if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
19694  enum node_type type = nd_type(str_node);
19695  if (type == NODE_STR || type == NODE_DSTR) break;
19696  prev_lit = 0;
19697  str_node = 0;
19698  }
19699  }
19700  }
19701  return root;
19702 }
19703 
19704 static int
19705 whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
19706 {
19707  const char *beg = p->lex.pbeg;
19708  const char *ptr = p->lex.pend;
19709 
19710  if (ptr - beg < len) return FALSE;
19711  if (ptr > beg && ptr[-1] == '\n') {
19712  if (--ptr > beg && ptr[-1] == '\r') --ptr;
19713  if (ptr - beg < len) return FALSE;
19714  }
19715  if (strncmp(eos, ptr -= len, len)) return FALSE;
19716  if (indent) {
19717  while (beg < ptr && ISSPACE(*beg)) beg++;
19718  }
19719  return beg == ptr;
19720 }
19721 
19722 static int
19723 word_match_p(struct parser_params *p, const char *word, long len)
19724 {
19725  if (strncmp(p->lex.pcur, word, len)) return 0;
19726  if (lex_eol_n_p(p, len)) return 1;
19727  int c = (unsigned char)p->lex.pcur[len];
19728  if (ISSPACE(c)) return 1;
19729  switch (c) {
19730  case '\0': case '\004': case '\032': return 1;
19731  }
19732  return 0;
19733 }
19734 
19735 #define NUM_SUFFIX_R (1<<0)
19736 #define NUM_SUFFIX_I (1<<1)
19737 #define NUM_SUFFIX_ALL 3
19738 
19739 static int
19740 number_literal_suffix(struct parser_params *p, int mask)
19741 {
19742  int c, result = 0;
19743  const char *lastp = p->lex.pcur;
19744 
19745  while ((c = nextc(p)) != -1) {
19746  if ((mask & NUM_SUFFIX_I) && c == 'i') {
19747  result |= (mask & NUM_SUFFIX_I);
19748  mask &= ~NUM_SUFFIX_I;
19749  /* r after i, rational of complex is disallowed */
19750  mask &= ~NUM_SUFFIX_R;
19751  continue;
19752  }
19753  if ((mask & NUM_SUFFIX_R) && c == 'r') {
19754  result |= (mask & NUM_SUFFIX_R);
19755  mask &= ~NUM_SUFFIX_R;
19756  continue;
19757  }
19758  if (!ISASCII(c) || ISALPHA(c) || c == '_') {
19759  p->lex.pcur = lastp;
19760  literal_flush(p, p->lex.pcur);
19761  return 0;
19762  }
19763  pushback(p, c);
19764  break;
19765  }
19766  return result;
19767 }
19768 
19769 static enum yytokentype
19770 set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
19771 {
19772  enum rb_numeric_type numeric_type = integer_literal;
19773 
19774  if (type == tFLOAT) {
19775  numeric_type = float_literal;
19776  }
19777 
19778  if (suffix & NUM_SUFFIX_R) {
19779  type = tRATIONAL;
19780  numeric_type = rational_literal;
19781  }
19782  if (suffix & NUM_SUFFIX_I) {
19783  type = tIMAGINARY;
19784  }
19785 
19786  switch (type) {
19787  case tINTEGER:
19788  set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
19789  break;
19790  case tFLOAT:
19791  set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
19792  break;
19793  case tRATIONAL:
19794  set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
19795  break;
19796  case tIMAGINARY:
19797  set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
19798  (void)numeric_type; /* for ripper */
19799  break;
19800  default:
19801  rb_bug("unexpected token: %d", type);
19802  }
19803  SET_LEX_STATE(EXPR_END);
19804  return type;
19805 }
19806 
19807 #define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
19808 static void
19809 parser_dispatch_heredoc_end(struct parser_params *p, int line)
19810 {
19811  if (has_delayed_token(p))
19812  dispatch_delayed_token(p, tSTRING_CONTENT);
19813 
19814 #ifdef RIPPER
19815  VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
19816  ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
19817 #else
19818  if (p->keep_tokens) {
19819  rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
19820  RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
19821  parser_append_tokens(p, str, tHEREDOC_END, line);
19822  }
19823 #endif
19824 
19825  RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
19826  lex_goto_eol(p);
19827  token_flush(p);
19828 }
19829 
19830 static enum yytokentype
19831 here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
19832 {
19833  int c, func, indent = 0;
19834  const char *eos, *ptr, *ptr_end;
19835  long len;
19836  rb_parser_string_t *str = 0;
19837  rb_encoding *enc = p->enc;
19838  rb_encoding *base_enc = 0;
19839  int bol;
19840 #ifdef RIPPER
19841  VALUE s_value;
19842 #endif
19843 
19844  eos = PARSER_STRING_PTR(here->lastline) + here->offset;
19845  len = here->length;
19846  indent = (func = here->func) & STR_FUNC_INDENT;
19847 
19848  if ((c = nextc(p)) == -1) {
19849  error:
19850 #ifdef RIPPER
19851  if (!has_delayed_token(p)) {
19852  dispatch_scan_event(p, tSTRING_CONTENT);
19853  }
19854  else {
19855  if ((len = p->lex.pcur - p->lex.ptok) > 0) {
19856  if (!(func & STR_FUNC_REGEXP)) {
19857  int cr = ENC_CODERANGE_UNKNOWN;
19858  rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
19859  if (cr != ENC_CODERANGE_7BIT &&
19860  rb_is_usascii_enc(p->enc) &&
19861  enc != rb_utf8_encoding()) {
19862  enc = rb_ascii8bit_encoding();
19863  }
19864  }
19865  rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19866  }
19867  dispatch_delayed_token(p, tSTRING_CONTENT);
19868  }
19869  lex_goto_eol(p);
19870 #endif
19871  heredoc_restore(p, &p->lex.strterm->u.heredoc);
19872  compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
19873  (int)len, eos);
19874  token_flush(p);
19875  SET_LEX_STATE(EXPR_END);
19876  return tSTRING_END;
19877  }
19878  bol = was_bol(p);
19879  if (!bol) {
19880  /* not beginning of line, cannot be the terminator */
19881  }
19882  else if (p->heredoc_line_indent == -1) {
19883  /* `heredoc_line_indent == -1` means
19884  * - "after an interpolation in the same line", or
19885  * - "in a continuing line"
19886  */
19887  p->heredoc_line_indent = 0;
19888  }
19889  else if (whole_match_p(p, eos, len, indent)) {
19890  dispatch_heredoc_end(p);
19891  restore:
19892  heredoc_restore(p, &p->lex.strterm->u.heredoc);
19893  token_flush(p);
19894  SET_LEX_STATE(EXPR_END);
19895  return tSTRING_END;
19896  }
19897 
19898  if (!(func & STR_FUNC_EXPAND)) {
19899  do {
19900  ptr = PARSER_STRING_PTR(p->lex.lastline);
19901  ptr_end = p->lex.pend;
19902  if (ptr_end > ptr) {
19903  switch (ptr_end[-1]) {
19904  case '\n':
19905  if (--ptr_end == ptr || ptr_end[-1] != '\r') {
19906  ptr_end++;
19907  break;
19908  }
19909  case '\r':
19910  --ptr_end;
19911  }
19912  }
19913 
19914  if (p->heredoc_indent > 0) {
19915  long i = 0;
19916  while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
19917  i++;
19918  p->heredoc_line_indent = 0;
19919  }
19920 
19921  if (str)
19922  parser_str_cat(str, ptr, ptr_end - ptr);
19923  else
19924  str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
19925  if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
19926  lex_goto_eol(p);
19927  if (p->heredoc_indent > 0) {
19928  goto flush_str;
19929  }
19930  if (nextc(p) == -1) {
19931  if (str) {
19932  rb_parser_string_free(p, str);
19933  str = 0;
19934  }
19935  goto error;
19936  }
19937  } while (!whole_match_p(p, eos, len, indent));
19938  }
19939  else {
19940  /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
19941  newtok(p);
19942  if (c == '#') {
19943  enum yytokentype t = parser_peek_variable_name(p);
19944  if (p->heredoc_line_indent != -1) {
19945  if (p->heredoc_indent > p->heredoc_line_indent) {
19946  p->heredoc_indent = p->heredoc_line_indent;
19947  }
19948  p->heredoc_line_indent = -1;
19949  }
19950  if (t) return t;
19951  tokadd(p, '#');
19952  c = nextc(p);
19953  }
19954  do {
19955  pushback(p, c);
19956  enc = p->enc;
19957  if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
19958  if (p->eofp) goto error;
19959  goto restore;
19960  }
19961  if (c != '\n') {
19962  if (c == '\\') p->heredoc_line_indent = -1;
19963  flush:
19964  str = STR_NEW3(tok(p), toklen(p), enc, func);
19965  flush_str:
19966  set_yylval_str(str);
19967 #ifndef RIPPER
19968  if (bol) nd_set_fl_newline(yylval.node);
19969 #endif
19970  flush_string_content(p, enc, 0);
19971  return tSTRING_CONTENT;
19972  }
19973  tokadd(p, nextc(p));
19974  if (p->heredoc_indent > 0) {
19975  lex_goto_eol(p);
19976  goto flush;
19977  }
19978  /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
19979  if ((c = nextc(p)) == -1) goto error;
19980  } while (!whole_match_p(p, eos, len, indent));
19981  str = STR_NEW3(tok(p), toklen(p), enc, func);
19982  }
19983  dispatch_heredoc_end(p);
19984  heredoc_restore(p, &p->lex.strterm->u.heredoc);
19985  token_flush(p);
19986  p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
19987 #ifdef RIPPER
19988  /* Preserve s_value for set_yylval_str */
19989  s_value = p->s_value;
19990 #endif
19991  set_yylval_str(str);
19992 #ifdef RIPPER
19993  set_parser_s_value(s_value);
19994 #endif
19995 
19996 #ifndef RIPPER
19997  if (bol) nd_set_fl_newline(yylval.node);
19998 #endif
19999  return tSTRING_CONTENT;
20000 }
20001 
20002 #include "lex.c"
20003 
20004 static int
20005 arg_ambiguous(struct parser_params *p, char c)
20006 {
20007 #ifndef RIPPER
20008  if (c == '/') {
20009  rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20010  }
20011  else {
20012  rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20013  }
20014 #else
20015  dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20016 #endif
20017  return TRUE;
20018 }
20019 
20020 /* returns true value if formal argument error;
20021  * Qtrue, or error message if ripper */
20022 static VALUE
20023 formal_argument_error(struct parser_params *p, ID id)
20024 {
20025  switch (id_type(id)) {
20026  case ID_LOCAL:
20027  break;
20028 #ifndef RIPPER
20029 # define ERR(mesg) (yyerror0(mesg), Qtrue)
20030 #else
20031 # define ERR(mesg) WARN_S(mesg)
20032 #endif
20033  case ID_CONST:
20034  return ERR("formal argument cannot be a constant");
20035  case ID_INSTANCE:
20036  return ERR("formal argument cannot be an instance variable");
20037  case ID_GLOBAL:
20038  return ERR("formal argument cannot be a global variable");
20039  case ID_CLASS:
20040  return ERR("formal argument cannot be a class variable");
20041  default:
20042  return ERR("formal argument must be local variable");
20043 #undef ERR
20044  }
20045  shadowing_lvar(p, id);
20046 
20047  return Qfalse;
20048 }
20049 
20050 static int
20051 lvar_defined(struct parser_params *p, ID id)
20052 {
20053  return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20054 }
20055 
20056 /* emacsen -*- hack */
20057 static long
20058 parser_encode_length(struct parser_params *p, const char *name, long len)
20059 {
20060  long nlen;
20061 
20062  if (len > 5 && name[nlen = len - 5] == '-') {
20063  if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20064  return nlen;
20065  }
20066  if (len > 4 && name[nlen = len - 4] == '-') {
20067  if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20068  return nlen;
20069  if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20070  !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20071  /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20072  return nlen;
20073  }
20074  return len;
20075 }
20076 
20077 static void
20078 parser_set_encode(struct parser_params *p, const char *name)
20079 {
20080  rb_encoding *enc;
20081  VALUE excargs[3];
20082  int idx = 0;
20083 
20084  const char *wrong = 0;
20085  switch (*name) {
20086  case 'e': case 'E': wrong = "external"; break;
20087  case 'i': case 'I': wrong = "internal"; break;
20088  case 'f': case 'F': wrong = "filesystem"; break;
20089  case 'l': case 'L': wrong = "locale"; break;
20090  }
20091  if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20092  idx = rb_enc_find_index(name);
20093  if (idx < 0) {
20094  unknown:
20095  excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20096  error:
20097  excargs[0] = rb_eArgError;
20098  excargs[2] = rb_make_backtrace();
20099  rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20100  VALUE exc = rb_make_exception(3, excargs);
20101  ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20102 
20103  rb_ast_free(p->ast);
20104  p->ast = NULL;
20105 
20106  rb_exc_raise(exc);
20107  }
20108  enc = rb_enc_from_index(idx);
20109  if (!rb_enc_asciicompat(enc)) {
20110  excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20111  goto error;
20112  }
20113  p->enc = enc;
20114 #ifndef RIPPER
20115  if (p->debug_lines) {
20116  long i;
20117  for (i = 0; i < p->debug_lines->len; i++) {
20118  rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20119  }
20120  }
20121 #endif
20122 }
20123 
20124 static bool
20125 comment_at_top(struct parser_params *p)
20126 {
20127  if (p->token_seen) return false;
20128  return (p->line_count == (p->has_shebang ? 2 : 1));
20129 }
20130 
20131 typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20132 typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20133 
20134 static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20135 
20136 static void
20137 magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20138 {
20139  if (!comment_at_top(p)) {
20140  return;
20141  }
20142  parser_set_encode(p, val);
20143 }
20144 
20145 static int
20146 parser_get_bool(struct parser_params *p, const char *name, const char *val)
20147 {
20148  switch (*val) {
20149  case 't': case 'T':
20150  if (STRCASECMP(val, "true") == 0) {
20151  return TRUE;
20152  }
20153  break;
20154  case 'f': case 'F':
20155  if (STRCASECMP(val, "false") == 0) {
20156  return FALSE;
20157  }
20158  break;
20159  }
20160  return parser_invalid_pragma_value(p, name, val);
20161 }
20162 
20163 static int
20164 parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20165 {
20166  rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20167  return -1;
20168 }
20169 
20170 static void
20171 parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20172 {
20173  int b = parser_get_bool(p, name, val);
20174  if (b >= 0) p->token_info_enabled = b;
20175 }
20176 
20177 static void
20178 parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20179 {
20180  int b;
20181 
20182  if (p->token_seen) {
20183  rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20184  return;
20185  }
20186 
20187  b = parser_get_bool(p, name, val);
20188  if (b < 0) return;
20189 
20190  p->frozen_string_literal = b;
20191 }
20192 
20193 static void
20194 parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20195 {
20196  for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20197  if (*s == ' ' || *s == '\t') continue;
20198  if (*s == '#') break;
20199  rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20200  return;
20201  }
20202 
20203  switch (*val) {
20204  case 'n': case 'N':
20205  if (STRCASECMP(val, "none") == 0) {
20206  p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20207  return;
20208  }
20209  break;
20210  case 'l': case 'L':
20211  if (STRCASECMP(val, "literal") == 0) {
20212  p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20213  return;
20214  }
20215  break;
20216  case 'e': case 'E':
20217  if (STRCASECMP(val, "experimental_copy") == 0) {
20218  p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20219  return;
20220  }
20221  if (STRCASECMP(val, "experimental_everything") == 0) {
20222  p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20223  return;
20224  }
20225  break;
20226  }
20227  parser_invalid_pragma_value(p, name, val);
20228 }
20229 
20230 # if WARN_PAST_SCOPE
20231 static void
20232 parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20233 {
20234  int b = parser_get_bool(p, name, val);
20235  if (b >= 0) p->past_scope_enabled = b;
20236 }
20237 # endif
20238 
20240  const char *name;
20241  rb_magic_comment_setter_t func;
20242  rb_magic_comment_length_t length;
20243 };
20244 
20245 static const struct magic_comment magic_comments[] = {
20246  {"coding", magic_comment_encoding, parser_encode_length},
20247  {"encoding", magic_comment_encoding, parser_encode_length},
20248  {"frozen_string_literal", parser_set_frozen_string_literal},
20249  {"shareable_constant_value", parser_set_shareable_constant_value},
20250  {"warn_indent", parser_set_token_info},
20251 # if WARN_PAST_SCOPE
20252  {"warn_past_scope", parser_set_past_scope},
20253 # endif
20254 };
20255 
20256 static const char *
20257 magic_comment_marker(const char *str, long len)
20258 {
20259  long i = 2;
20260 
20261  while (i < len) {
20262  switch (str[i]) {
20263  case '-':
20264  if (str[i-1] == '*' && str[i-2] == '-') {
20265  return str + i + 1;
20266  }
20267  i += 2;
20268  break;
20269  case '*':
20270  if (i + 1 >= len) return 0;
20271  if (str[i+1] != '-') {
20272  i += 4;
20273  }
20274  else if (str[i-1] != '-') {
20275  i += 2;
20276  }
20277  else {
20278  return str + i + 2;
20279  }
20280  break;
20281  default:
20282  i += 3;
20283  break;
20284  }
20285  }
20286  return 0;
20287 }
20288 
20289 static int
20290 parser_magic_comment(struct parser_params *p, const char *str, long len)
20291 {
20292  int indicator = 0;
20293  VALUE name = 0, val = 0;
20294  const char *beg, *end, *vbeg, *vend;
20295 #define str_copy(_s, _p, _n) ((_s) \
20296  ? (void)(rb_str_resize((_s), (_n)), \
20297  MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20298  : (void)((_s) = STR_NEW((_p), (_n))))
20299 
20300  if (len <= 7) return FALSE;
20301  if (!!(beg = magic_comment_marker(str, len))) {
20302  if (!(end = magic_comment_marker(beg, str + len - beg)))
20303  return FALSE;
20304  indicator = TRUE;
20305  str = beg;
20306  len = end - beg - 3;
20307  }
20308 
20309  /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20310  while (len > 0) {
20311  const struct magic_comment *mc = magic_comments;
20312  char *s;
20313  int i;
20314  long n = 0;
20315 
20316  for (; len > 0 && *str; str++, --len) {
20317  switch (*str) {
20318  case '\'': case '"': case ':': case ';':
20319  continue;
20320  }
20321  if (!ISSPACE(*str)) break;
20322  }
20323  for (beg = str; len > 0; str++, --len) {
20324  switch (*str) {
20325  case '\'': case '"': case ':': case ';':
20326  break;
20327  default:
20328  if (ISSPACE(*str)) break;
20329  continue;
20330  }
20331  break;
20332  }
20333  for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20334  if (!len) break;
20335  if (*str != ':') {
20336  if (!indicator) return FALSE;
20337  continue;
20338  }
20339 
20340  do str++; while (--len > 0 && ISSPACE(*str));
20341  if (!len) break;
20342  const char *tok_beg = str;
20343  if (*str == '"') {
20344  for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20345  if (*str == '\\') {
20346  --len;
20347  ++str;
20348  }
20349  }
20350  vend = str;
20351  if (len) {
20352  --len;
20353  ++str;
20354  }
20355  }
20356  else {
20357  for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20358  vend = str;
20359  }
20360  const char *tok_end = str;
20361  if (indicator) {
20362  while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20363  }
20364  else {
20365  while (len > 0 && (ISSPACE(*str))) --len, str++;
20366  if (len) return FALSE;
20367  }
20368 
20369  n = end - beg;
20370  str_copy(name, beg, n);
20371  s = RSTRING_PTR(name);
20372  for (i = 0; i < n; ++i) {
20373  if (s[i] == '-') s[i] = '_';
20374  }
20375  do {
20376  if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20377  n = vend - vbeg;
20378  if (mc->length) {
20379  n = (*mc->length)(p, vbeg, n);
20380  }
20381  str_copy(val, vbeg, n);
20382  p->lex.ptok = tok_beg;
20383  p->lex.pcur = tok_end;
20384  (*mc->func)(p, mc->name, RSTRING_PTR(val));
20385  break;
20386  }
20387  } while (++mc < magic_comments + numberof(magic_comments));
20388 #ifdef RIPPER
20389  str_copy(val, vbeg, vend - vbeg);
20390  dispatch2(magic_comment, name, val);
20391 #endif
20392  }
20393 
20394  return TRUE;
20395 }
20396 
20397 static void
20398 set_file_encoding(struct parser_params *p, const char *str, const char *send)
20399 {
20400  int sep = 0;
20401  const char *beg = str;
20402  VALUE s;
20403 
20404  for (;;) {
20405  if (send - str <= 6) return;
20406  switch (str[6]) {
20407  case 'C': case 'c': str += 6; continue;
20408  case 'O': case 'o': str += 5; continue;
20409  case 'D': case 'd': str += 4; continue;
20410  case 'I': case 'i': str += 3; continue;
20411  case 'N': case 'n': str += 2; continue;
20412  case 'G': case 'g': str += 1; continue;
20413  case '=': case ':':
20414  sep = 1;
20415  str += 6;
20416  break;
20417  default:
20418  str += 6;
20419  if (ISSPACE(*str)) break;
20420  continue;
20421  }
20422  if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20423  sep = 0;
20424  }
20425  for (;;) {
20426  do {
20427  if (++str >= send) return;
20428  } while (ISSPACE(*str));
20429  if (sep) break;
20430  if (*str != '=' && *str != ':') return;
20431  sep = 1;
20432  str++;
20433  }
20434  beg = str;
20435  while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
20436  s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
20437  p->lex.ptok = beg;
20438  p->lex.pcur = str;
20439  parser_set_encode(p, RSTRING_PTR(s));
20440  rb_str_resize(s, 0);
20441 }
20442 
20443 static void
20444 parser_prepare(struct parser_params *p)
20445 {
20446  int c = nextc0(p, FALSE);
20447  p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
20448  switch (c) {
20449  case '#':
20450  if (peek(p, '!')) p->has_shebang = 1;
20451  break;
20452  case 0xef: /* UTF-8 BOM marker */
20453  if (!lex_eol_n_p(p, 2) &&
20454  (unsigned char)p->lex.pcur[0] == 0xbb &&
20455  (unsigned char)p->lex.pcur[1] == 0xbf) {
20456  p->enc = rb_utf8_encoding();
20457  p->lex.pcur += 2;
20458 #ifndef RIPPER
20459  if (p->debug_lines) {
20460  rb_parser_string_set_encoding(p->lex.lastline, p->enc);
20461  }
20462 #endif
20463  p->lex.pbeg = p->lex.pcur;
20464  token_flush(p);
20465  return;
20466  }
20467  break;
20468  case -1: /* end of script. */
20469  return;
20470  }
20471  pushback(p, c);
20472  p->enc = rb_parser_str_get_encoding(p->lex.lastline);
20473 }
20474 
20475 #ifndef RIPPER
20476 #define ambiguous_operator(tok, op, syn) ( \
20477  rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
20478  rb_warning0("even though it seems like "syn""))
20479 #else
20480 #define ambiguous_operator(tok, op, syn) \
20481  dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
20482 #endif
20483 #define warn_balanced(tok, op, syn) ((void) \
20484  (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
20485  space_seen && !ISSPACE(c) && \
20486  (ambiguous_operator(tok, op, syn), 0)), \
20487  (enum yytokentype)(tok))
20488 
20489 static enum yytokentype
20490 no_digits(struct parser_params *p)
20491 {
20492  yyerror0("numeric literal without digits");
20493  if (peek(p, '_')) nextc(p);
20494  /* dummy 0, for tUMINUS_NUM at numeric */
20495  return set_number_literal(p, tINTEGER, 0, 10, 0);
20496 }
20497 
20498 static enum yytokentype
20499 parse_numeric(struct parser_params *p, int c)
20500 {
20501  int is_float, seen_point, seen_e, nondigit;
20502  int suffix;
20503 
20504  is_float = seen_point = seen_e = nondigit = 0;
20505  SET_LEX_STATE(EXPR_END);
20506  newtok(p);
20507  if (c == '-' || c == '+') {
20508  tokadd(p, c);
20509  c = nextc(p);
20510  }
20511  if (c == '0') {
20512  int start = toklen(p);
20513  c = nextc(p);
20514  if (c == 'x' || c == 'X') {
20515  /* hexadecimal */
20516  c = nextc(p);
20517  if (c != -1 && ISXDIGIT(c)) {
20518  do {
20519  if (c == '_') {
20520  if (nondigit) break;
20521  nondigit = c;
20522  continue;
20523  }
20524  if (!ISXDIGIT(c)) break;
20525  nondigit = 0;
20526  tokadd(p, c);
20527  } while ((c = nextc(p)) != -1);
20528  }
20529  pushback(p, c);
20530  tokfix(p);
20531  if (toklen(p) == start) {
20532  return no_digits(p);
20533  }
20534  else if (nondigit) goto trailing_uc;
20535  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20536  return set_number_literal(p, tINTEGER, suffix, 16, 0);
20537  }
20538  if (c == 'b' || c == 'B') {
20539  /* binary */
20540  c = nextc(p);
20541  if (c == '0' || c == '1') {
20542  do {
20543  if (c == '_') {
20544  if (nondigit) break;
20545  nondigit = c;
20546  continue;
20547  }
20548  if (c != '0' && c != '1') break;
20549  nondigit = 0;
20550  tokadd(p, c);
20551  } while ((c = nextc(p)) != -1);
20552  }
20553  pushback(p, c);
20554  tokfix(p);
20555  if (toklen(p) == start) {
20556  return no_digits(p);
20557  }
20558  else if (nondigit) goto trailing_uc;
20559  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20560  return set_number_literal(p, tINTEGER, suffix, 2, 0);
20561  }
20562  if (c == 'd' || c == 'D') {
20563  /* decimal */
20564  c = nextc(p);
20565  if (c != -1 && ISDIGIT(c)) {
20566  do {
20567  if (c == '_') {
20568  if (nondigit) break;
20569  nondigit = c;
20570  continue;
20571  }
20572  if (!ISDIGIT(c)) break;
20573  nondigit = 0;
20574  tokadd(p, c);
20575  } while ((c = nextc(p)) != -1);
20576  }
20577  pushback(p, c);
20578  tokfix(p);
20579  if (toklen(p) == start) {
20580  return no_digits(p);
20581  }
20582  else if (nondigit) goto trailing_uc;
20583  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20584  return set_number_literal(p, tINTEGER, suffix, 10, 0);
20585  }
20586  if (c == '_') {
20587  /* 0_0 */
20588  goto octal_number;
20589  }
20590  if (c == 'o' || c == 'O') {
20591  /* prefixed octal */
20592  c = nextc(p);
20593  if (c == -1 || c == '_' || !ISDIGIT(c)) {
20594  tokfix(p);
20595  return no_digits(p);
20596  }
20597  }
20598  if (c >= '0' && c <= '7') {
20599  /* octal */
20600  octal_number:
20601  do {
20602  if (c == '_') {
20603  if (nondigit) break;
20604  nondigit = c;
20605  continue;
20606  }
20607  if (c < '0' || c > '9') break;
20608  if (c > '7') goto invalid_octal;
20609  nondigit = 0;
20610  tokadd(p, c);
20611  } while ((c = nextc(p)) != -1);
20612  if (toklen(p) > start) {
20613  pushback(p, c);
20614  tokfix(p);
20615  if (nondigit) goto trailing_uc;
20616  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20617  return set_number_literal(p, tINTEGER, suffix, 8, 0);
20618  }
20619  if (nondigit) {
20620  pushback(p, c);
20621  goto trailing_uc;
20622  }
20623  }
20624  if (c > '7' && c <= '9') {
20625  invalid_octal:
20626  yyerror0("Invalid octal digit");
20627  }
20628  else if (c == '.' || c == 'e' || c == 'E') {
20629  tokadd(p, '0');
20630  }
20631  else {
20632  pushback(p, c);
20633  tokfix(p);
20634  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20635  return set_number_literal(p, tINTEGER, suffix, 10, 0);
20636  }
20637  }
20638 
20639  for (;;) {
20640  switch (c) {
20641  case '0': case '1': case '2': case '3': case '4':
20642  case '5': case '6': case '7': case '8': case '9':
20643  nondigit = 0;
20644  tokadd(p, c);
20645  break;
20646 
20647  case '.':
20648  if (nondigit) goto trailing_uc;
20649  if (seen_point || seen_e) {
20650  goto decode_num;
20651  }
20652  else {
20653  int c0 = nextc(p);
20654  if (c0 == -1 || !ISDIGIT(c0)) {
20655  pushback(p, c0);
20656  goto decode_num;
20657  }
20658  c = c0;
20659  }
20660  seen_point = toklen(p);
20661  tokadd(p, '.');
20662  tokadd(p, c);
20663  is_float++;
20664  nondigit = 0;
20665  break;
20666 
20667  case 'e':
20668  case 'E':
20669  if (nondigit) {
20670  pushback(p, c);
20671  c = nondigit;
20672  goto decode_num;
20673  }
20674  if (seen_e) {
20675  goto decode_num;
20676  }
20677  nondigit = c;
20678  c = nextc(p);
20679  if (c != '-' && c != '+' && !ISDIGIT(c)) {
20680  pushback(p, c);
20681  c = nondigit;
20682  nondigit = 0;
20683  goto decode_num;
20684  }
20685  tokadd(p, nondigit);
20686  seen_e++;
20687  is_float++;
20688  tokadd(p, c);
20689  nondigit = (c == '-' || c == '+') ? c : 0;
20690  break;
20691 
20692  case '_': /* `_' in number just ignored */
20693  if (nondigit) goto decode_num;
20694  nondigit = c;
20695  break;
20696 
20697  default:
20698  goto decode_num;
20699  }
20700  c = nextc(p);
20701  }
20702 
20703  decode_num:
20704  pushback(p, c);
20705  if (nondigit) {
20706  trailing_uc:
20707  literal_flush(p, p->lex.pcur - 1);
20708  YYLTYPE loc = RUBY_INIT_YYLLOC();
20709  compile_error(p, "trailing '%c' in number", nondigit);
20710  parser_show_error_line(p, &loc);
20711  }
20712  tokfix(p);
20713  if (is_float) {
20714  enum yytokentype type = tFLOAT;
20715 
20716  suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
20717  if (suffix & NUM_SUFFIX_R) {
20718  type = tRATIONAL;
20719  }
20720  else {
20721  strtod(tok(p), 0);
20722  if (errno == ERANGE) {
20723  rb_warning1("Float %s out of range", WARN_S(tok(p)));
20724  errno = 0;
20725  }
20726  }
20727  return set_number_literal(p, type, suffix, 0, seen_point);
20728  }
20729  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20730  return set_number_literal(p, tINTEGER, suffix, 10, 0);
20731 }
20732 
20733 static enum yytokentype
20734 parse_qmark(struct parser_params *p, int space_seen)
20735 {
20736  rb_encoding *enc;
20737  register int c;
20738  rb_parser_string_t *lit;
20739 
20740  if (IS_END()) {
20741  SET_LEX_STATE(EXPR_VALUE);
20742  return '?';
20743  }
20744  c = nextc(p);
20745  if (c == -1) {
20746  compile_error(p, "incomplete character syntax");
20747  return 0;
20748  }
20749  if (rb_enc_isspace(c, p->enc)) {
20750  if (!IS_ARG()) {
20751  int c2 = escaped_control_code(c);
20752  if (c2) {
20753  WARN_SPACE_CHAR(c2, "?");
20754  }
20755  }
20756  ternary:
20757  pushback(p, c);
20758  SET_LEX_STATE(EXPR_VALUE);
20759  return '?';
20760  }
20761  newtok(p);
20762  enc = p->enc;
20763  if (!parser_isascii(p)) {
20764  if (tokadd_mbchar(p, c) == -1) return 0;
20765  }
20766  else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
20767  !lex_eol_p(p) && is_identchar(p, p->lex.pcur, p->lex.pend, p->enc)) {
20768  if (space_seen) {
20769  const char *start = p->lex.pcur - 1, *ptr = start;
20770  do {
20771  int n = parser_precise_mbclen(p, ptr);
20772  if (n < 0) return -1;
20773  ptr += n;
20774  } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
20775  rb_warn2("'?' just followed by '%.*s' is interpreted as" \
20776  " a conditional operator, put a space after '?'",
20777  WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
20778  }
20779  goto ternary;
20780  }
20781  else if (c == '\\') {
20782  if (peek(p, 'u')) {
20783  nextc(p);
20784  enc = rb_utf8_encoding();
20785  tokadd_utf8(p, &enc, -1, 0, 0);
20786  }
20787  else if (!ISASCII(c = peekc(p)) && c != -1) {
20788  nextc(p);
20789  if (tokadd_mbchar(p, c) == -1) return 0;
20790  }
20791  else {
20792  c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
20793  tokadd(p, c);
20794  }
20795  }
20796  else {
20797  tokadd(p, c);
20798  }
20799  tokfix(p);
20800  lit = STR_NEW3(tok(p), toklen(p), enc, 0);
20801  set_yylval_str(lit);
20802  SET_LEX_STATE(EXPR_END);
20803  return tCHAR;
20804 }
20805 
20806 static enum yytokentype
20807 parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
20808 {
20809  register int c;
20810  const char *ptok = p->lex.pcur;
20811 
20812  if (IS_BEG()) {
20813  int term;
20814  int paren;
20815 
20816  c = nextc(p);
20817  quotation:
20818  if (c == -1) goto unterminated;
20819  if (!ISALNUM(c)) {
20820  term = c;
20821  if (!ISASCII(c)) goto unknown;
20822  c = 'Q';
20823  }
20824  else {
20825  term = nextc(p);
20826  if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
20827  unknown:
20828  pushback(p, term);
20829  c = parser_precise_mbclen(p, p->lex.pcur);
20830  if (c < 0) return 0;
20831  p->lex.pcur += c;
20832  yyerror0("unknown type of %string");
20833  return 0;
20834  }
20835  }
20836  if (term == -1) {
20837  unterminated:
20838  compile_error(p, "unterminated quoted string meets end of file");
20839  return 0;
20840  }
20841  paren = term;
20842  if (term == '(') term = ')';
20843  else if (term == '[') term = ']';
20844  else if (term == '{') term = '}';
20845  else if (term == '<') term = '>';
20846  else paren = 0;
20847 
20848  p->lex.ptok = ptok-1;
20849  switch (c) {
20850  case 'Q':
20851  p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
20852  return tSTRING_BEG;
20853 
20854  case 'q':
20855  p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
20856  return tSTRING_BEG;
20857 
20858  case 'W':
20859  p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
20860  return tWORDS_BEG;
20861 
20862  case 'w':
20863  p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
20864  return tQWORDS_BEG;
20865 
20866  case 'I':
20867  p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
20868  return tSYMBOLS_BEG;
20869 
20870  case 'i':
20871  p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
20872  return tQSYMBOLS_BEG;
20873 
20874  case 'x':
20875  p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
20876  return tXSTRING_BEG;
20877 
20878  case 'r':
20879  p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
20880  return tREGEXP_BEG;
20881 
20882  case 's':
20883  p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
20884  SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
20885  return tSYMBEG;
20886 
20887  default:
20888  yyerror0("unknown type of %string");
20889  return 0;
20890  }
20891  }
20892  if ((c = nextc(p)) == '=') {
20893  set_yylval_id('%');
20894  SET_LEX_STATE(EXPR_BEG);
20895  return tOP_ASGN;
20896  }
20897  if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
20898  goto quotation;
20899  }
20900  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
20901  pushback(p, c);
20902  return warn_balanced('%', "%%", "string literal");
20903 }
20904 
20905 static int
20906 tokadd_ident(struct parser_params *p, int c)
20907 {
20908  do {
20909  if (tokadd_mbchar(p, c) == -1) return -1;
20910  c = nextc(p);
20911  } while (parser_is_identchar(p));
20912  pushback(p, c);
20913  return 0;
20914 }
20915 
20916 static ID
20917 tokenize_ident(struct parser_params *p)
20918 {
20919  ID ident = TOK_INTERN();
20920 
20921  set_yylval_name(ident);
20922 
20923  return ident;
20924 }
20925 
20926 static int
20927 parse_numvar(struct parser_params *p)
20928 {
20929  size_t len;
20930  int overflow;
20931  unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
20932  const unsigned long nth_ref_max =
20933  ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
20934  /* NTH_REF is left-shifted to be ORed with back-ref flag and
20935  * turned into a Fixnum, in compile.c */
20936 
20937  if (overflow || n > nth_ref_max) {
20938  /* compile_error()? */
20939  rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
20940  return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
20941  }
20942  else {
20943  return (int)n;
20944  }
20945 }
20946 
20947 static enum yytokentype
20948 parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
20949 {
20950  const char *ptr = p->lex.pcur;
20951  register int c;
20952 
20953  SET_LEX_STATE(EXPR_END);
20954  p->lex.ptok = ptr - 1; /* from '$' */
20955  newtok(p);
20956  c = nextc(p);
20957  switch (c) {
20958  case '_': /* $_: last read line string */
20959  c = nextc(p);
20960  if (parser_is_identchar(p)) {
20961  tokadd(p, '$');
20962  tokadd(p, '_');
20963  break;
20964  }
20965  pushback(p, c);
20966  c = '_';
20967  /* fall through */
20968  case '~': /* $~: match-data */
20969  case '*': /* $*: argv */
20970  case '$': /* $$: pid */
20971  case '?': /* $?: last status */
20972  case '!': /* $!: error string */
20973  case '@': /* $@: error position */
20974  case '/': /* $/: input record separator */
20975  case '\\': /* $\: output record separator */
20976  case ';': /* $;: field separator */
20977  case ',': /* $,: output field separator */
20978  case '.': /* $.: last read line number */
20979  case '=': /* $=: ignorecase */
20980  case ':': /* $:: load path */
20981  case '<': /* $<: default input handle */
20982  case '>': /* $>: default output handle */
20983  case '\"': /* $": already loaded files */
20984  tokadd(p, '$');
20985  tokadd(p, c);
20986  goto gvar;
20987 
20988  case '-':
20989  tokadd(p, '$');
20990  tokadd(p, c);
20991  c = nextc(p);
20992  if (parser_is_identchar(p)) {
20993  if (tokadd_mbchar(p, c) == -1) return 0;
20994  }
20995  else {
20996  pushback(p, c);
20997  pushback(p, '-');
20998  return '$';
20999  }
21000  gvar:
21001  tokenize_ident(p);
21002  return tGVAR;
21003 
21004  case '&': /* $&: last match */
21005  case '`': /* $`: string before last match */
21006  case '\'': /* $': string after last match */
21007  case '+': /* $+: string matches last paren. */
21008  if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21009  tokadd(p, '$');
21010  tokadd(p, c);
21011  goto gvar;
21012  }
21013  set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21014  return tBACK_REF;
21015 
21016  case '1': case '2': case '3':
21017  case '4': case '5': case '6':
21018  case '7': case '8': case '9':
21019  tokadd(p, '$');
21020  do {
21021  tokadd(p, c);
21022  c = nextc(p);
21023  } while (c != -1 && ISDIGIT(c));
21024  pushback(p, c);
21025  if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21026  tokfix(p);
21027  c = parse_numvar(p);
21028  set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21029  return tNTH_REF;
21030 
21031  default:
21032  if (!parser_is_identchar(p)) {
21033  YYLTYPE loc = RUBY_INIT_YYLLOC();
21034  if (c == -1 || ISSPACE(c)) {
21035  compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21036  }
21037  else {
21038  pushback(p, c);
21039  compile_error(p, "'$%c' is not allowed as a global variable name", c);
21040  }
21041  parser_show_error_line(p, &loc);
21042  set_yylval_noname();
21043  return tGVAR;
21044  }
21045  /* fall through */
21046  case '0':
21047  tokadd(p, '$');
21048  }
21049 
21050  if (tokadd_ident(p, c)) return 0;
21051  SET_LEX_STATE(EXPR_END);
21052  if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21053  tokenize_ident(p);
21054  }
21055  else {
21056  compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21057  set_yylval_noname();
21058  }
21059  return tGVAR;
21060 }
21061 
21062 static bool
21063 parser_numbered_param(struct parser_params *p, int n)
21064 {
21065  if (n < 0) return false;
21066 
21067  if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21068  return false;
21069  }
21070  if (p->max_numparam == ORDINAL_PARAM) {
21071  compile_error(p, "ordinary parameter is defined");
21072  return false;
21073  }
21074  struct vtable *args = p->lvtbl->args;
21075  if (p->max_numparam < n) {
21076  p->max_numparam = n;
21077  }
21078  while (n > args->pos) {
21079  vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21080  }
21081  return true;
21082 }
21083 
21084 static enum yytokentype
21085 parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21086 {
21087  const char *ptr = p->lex.pcur;
21088  enum yytokentype result = tIVAR;
21089  register int c = nextc(p);
21090  YYLTYPE loc;
21091 
21092  p->lex.ptok = ptr - 1; /* from '@' */
21093  newtok(p);
21094  tokadd(p, '@');
21095  if (c == '@') {
21096  result = tCVAR;
21097  tokadd(p, '@');
21098  c = nextc(p);
21099  }
21100  SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21101  if (c == -1 || !parser_is_identchar(p)) {
21102  pushback(p, c);
21103  RUBY_SET_YYLLOC(loc);
21104  if (result == tIVAR) {
21105  compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21106  }
21107  else {
21108  compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21109  }
21110  parser_show_error_line(p, &loc);
21111  set_yylval_noname();
21112  SET_LEX_STATE(EXPR_END);
21113  return result;
21114  }
21115  else if (ISDIGIT(c)) {
21116  pushback(p, c);
21117  RUBY_SET_YYLLOC(loc);
21118  if (result == tIVAR) {
21119  compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21120  }
21121  else {
21122  compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21123  }
21124  parser_show_error_line(p, &loc);
21125  set_yylval_noname();
21126  SET_LEX_STATE(EXPR_END);
21127  return result;
21128  }
21129 
21130  if (tokadd_ident(p, c)) return 0;
21131  tokenize_ident(p);
21132  return result;
21133 }
21134 
21135 static enum yytokentype
21136 parse_ident(struct parser_params *p, int c, int cmd_state)
21137 {
21138  enum yytokentype result;
21139  bool is_ascii = true;
21140  const enum lex_state_e last_state = p->lex.state;
21141  ID ident;
21142  int enforce_keyword_end = 0;
21143 
21144  do {
21145  if (!ISASCII(c)) is_ascii = false;
21146  if (tokadd_mbchar(p, c) == -1) return 0;
21147  c = nextc(p);
21148  } while (parser_is_identchar(p));
21149  if ((c == '!' || c == '?') && !peek(p, '=')) {
21150  result = tFID;
21151  tokadd(p, c);
21152  }
21153  else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21154  (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21155  result = tIDENTIFIER;
21156  tokadd(p, c);
21157  }
21158  else {
21159  result = tCONSTANT; /* assume provisionally */
21160  pushback(p, c);
21161  }
21162  tokfix(p);
21163 
21164  if (IS_LABEL_POSSIBLE()) {
21165  if (IS_LABEL_SUFFIX(0)) {
21166  SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21167  nextc(p);
21168  tokenize_ident(p);
21169  return tLABEL;
21170  }
21171  }
21172 
21173 #ifndef RIPPER
21174  if (peek_end_expect_token_locations(p)) {
21175  const rb_code_position_t *end_pos;
21176  int lineno, column;
21177  int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21178 
21179  end_pos = peek_end_expect_token_locations(p)->pos;
21180  lineno = end_pos->lineno;
21181  column = end_pos->column;
21182 
21183  if (p->debug) {
21184  rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21185  p->ruby_sourceline, beg_pos, lineno, column);
21186  }
21187 
21188  if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21189  const struct kwtable *kw;
21190 
21191  if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21192  if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21193  enforce_keyword_end = 1;
21194  }
21195  }
21196  }
21197 #endif
21198 
21199  if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21200  const struct kwtable *kw;
21201 
21202  /* See if it is a reserved word. */
21203  kw = rb_reserved_word(tok(p), toklen(p));
21204  if (kw) {
21205  enum lex_state_e state = p->lex.state;
21206  if (IS_lex_state_for(state, EXPR_FNAME)) {
21207  SET_LEX_STATE(EXPR_ENDFN);
21208  set_yylval_name(rb_intern2(tok(p), toklen(p)));
21209  return kw->id[0];
21210  }
21211  SET_LEX_STATE(kw->state);
21212  if (IS_lex_state(EXPR_BEG)) {
21213  p->command_start = TRUE;
21214  }
21215  if (kw->id[0] == keyword_do) {
21216  if (lambda_beginning_p()) {
21217  p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21218  return keyword_do_LAMBDA;
21219  }
21220  if (COND_P()) return keyword_do_cond;
21221  if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21222  return keyword_do_block;
21223  return keyword_do;
21224  }
21225  if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21226  return kw->id[0];
21227  else {
21228  if (kw->id[0] != kw->id[1])
21229  SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21230  return kw->id[1];
21231  }
21232  }
21233  }
21234 
21235  if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21236  if (cmd_state) {
21237  SET_LEX_STATE(EXPR_CMDARG);
21238  }
21239  else {
21240  SET_LEX_STATE(EXPR_ARG);
21241  }
21242  }
21243  else if (p->lex.state == EXPR_FNAME) {
21244  SET_LEX_STATE(EXPR_ENDFN);
21245  }
21246  else {
21247  SET_LEX_STATE(EXPR_END);
21248  }
21249 
21250  ident = tokenize_ident(p);
21251  if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21252  if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21253  (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21254  (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21255  SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21256  }
21257  return result;
21258 }
21259 
21260 static void
21261 warn_cr(struct parser_params *p)
21262 {
21263  if (!p->cr_seen) {
21264  p->cr_seen = TRUE;
21265  /* carried over with p->lex.nextline for nextc() */
21266  rb_warn0("encountered \\r in middle of line, treated as a mere space");
21267  }
21268 }
21269 
21270 static enum yytokentype
21271 parser_yylex(struct parser_params *p)
21272 {
21273  register int c;
21274  int space_seen = 0;
21275  int cmd_state;
21276  int label;
21277  enum lex_state_e last_state;
21278  int fallthru = FALSE;
21279  int token_seen = p->token_seen;
21280 
21281  if (p->lex.strterm) {
21282  if (strterm_is_heredoc(p->lex.strterm)) {
21283  token_flush(p);
21284  return here_document(p, &p->lex.strterm->u.heredoc);
21285  }
21286  else {
21287  token_flush(p);
21288  return parse_string(p, &p->lex.strterm->u.literal);
21289  }
21290  }
21291  cmd_state = p->command_start;
21292  p->command_start = FALSE;
21293  p->token_seen = TRUE;
21294 #ifndef RIPPER
21295  token_flush(p);
21296 #endif
21297  retry:
21298  last_state = p->lex.state;
21299  switch (c = nextc(p)) {
21300  case '\0': /* NUL */
21301  case '\004': /* ^D */
21302  case '\032': /* ^Z */
21303  case -1: /* end of script. */
21304  p->eofp = 1;
21305 #ifndef RIPPER
21306  if (p->end_expect_token_locations) {
21307  pop_end_expect_token_locations(p);
21308  RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21309  return tDUMNY_END;
21310  }
21311 #endif
21312  /* Set location for end-of-input because dispatch_scan_event is not called. */
21313  RUBY_SET_YYLLOC(*p->yylloc);
21314  return END_OF_INPUT;
21315 
21316  /* white spaces */
21317  case '\r':
21318  warn_cr(p);
21319  /* fall through */
21320  case ' ': case '\t': case '\f':
21321  case '\13': /* '\v' */
21322  space_seen = 1;
21323  while ((c = nextc(p))) {
21324  switch (c) {
21325  case '\r':
21326  warn_cr(p);
21327  /* fall through */
21328  case ' ': case '\t': case '\f':
21329  case '\13': /* '\v' */
21330  break;
21331  default:
21332  goto outofloop;
21333  }
21334  }
21335  outofloop:
21336  pushback(p, c);
21337  dispatch_scan_event(p, tSP);
21338 #ifndef RIPPER
21339  token_flush(p);
21340 #endif
21341  goto retry;
21342 
21343  case '#': /* it's a comment */
21344  p->token_seen = token_seen;
21345  const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21346  /* no magic_comment in shebang line */
21347  if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21348  if (comment_at_top(p)) {
21349  set_file_encoding(p, p->lex.pcur, p->lex.pend);
21350  }
21351  }
21352  p->lex.pcur = pcur, p->lex.ptok = ptok;
21353  lex_goto_eol(p);
21354  dispatch_scan_event(p, tCOMMENT);
21355  fallthru = TRUE;
21356  /* fall through */
21357  case '\n':
21358  p->token_seen = token_seen;
21359  rb_parser_string_t *prevline = p->lex.lastline;
21360  c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21361  !IS_lex_state(EXPR_LABELED));
21362  if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21363  if (!fallthru) {
21364  dispatch_scan_event(p, tIGNORED_NL);
21365  }
21366  fallthru = FALSE;
21367  if (!c && p->ctxt.in_kwarg) {
21368  goto normal_newline;
21369  }
21370  goto retry;
21371  }
21372  while (1) {
21373  switch (c = nextc(p)) {
21374  case ' ': case '\t': case '\f': case '\r':
21375  case '\13': /* '\v' */
21376  space_seen = 1;
21377  break;
21378  case '#':
21379  pushback(p, c);
21380  if (space_seen) {
21381  dispatch_scan_event(p, tSP);
21382  token_flush(p);
21383  }
21384  goto retry;
21385  case '&':
21386  case '.': {
21387  dispatch_delayed_token(p, tIGNORED_NL);
21388  if (peek(p, '.') == (c == '&')) {
21389  pushback(p, c);
21390  dispatch_scan_event(p, tSP);
21391  goto retry;
21392  }
21393  }
21394  default:
21395  p->ruby_sourceline--;
21396  p->lex.nextline = p->lex.lastline;
21397  set_lastline(p, prevline);
21398  case -1: /* EOF no decrement*/
21399  if (c == -1 && space_seen) {
21400  dispatch_scan_event(p, tSP);
21401  }
21402  lex_goto_eol(p);
21403  if (c != -1) {
21404  token_flush(p);
21405  RUBY_SET_YYLLOC(*p->yylloc);
21406  }
21407  goto normal_newline;
21408  }
21409  }
21410  normal_newline:
21411  p->command_start = TRUE;
21412  SET_LEX_STATE(EXPR_BEG);
21413  return '\n';
21414 
21415  case '*':
21416  if ((c = nextc(p)) == '*') {
21417  if ((c = nextc(p)) == '=') {
21418  set_yylval_id(idPow);
21419  SET_LEX_STATE(EXPR_BEG);
21420  return tOP_ASGN;
21421  }
21422  pushback(p, c);
21423  if (IS_SPCARG(c)) {
21424  rb_warning0("'**' interpreted as argument prefix");
21425  c = tDSTAR;
21426  }
21427  else if (IS_BEG()) {
21428  c = tDSTAR;
21429  }
21430  else {
21431  c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
21432  }
21433  }
21434  else {
21435  if (c == '=') {
21436  set_yylval_id('*');
21437  SET_LEX_STATE(EXPR_BEG);
21438  return tOP_ASGN;
21439  }
21440  pushback(p, c);
21441  if (IS_SPCARG(c)) {
21442  rb_warning0("'*' interpreted as argument prefix");
21443  c = tSTAR;
21444  }
21445  else if (IS_BEG()) {
21446  c = tSTAR;
21447  }
21448  else {
21449  c = warn_balanced('*', "*", "argument prefix");
21450  }
21451  }
21452  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21453  return c;
21454 
21455  case '!':
21456  c = nextc(p);
21457  if (IS_AFTER_OPERATOR()) {
21458  SET_LEX_STATE(EXPR_ARG);
21459  if (c == '@') {
21460  return '!';
21461  }
21462  }
21463  else {
21464  SET_LEX_STATE(EXPR_BEG);
21465  }
21466  if (c == '=') {
21467  return tNEQ;
21468  }
21469  if (c == '~') {
21470  return tNMATCH;
21471  }
21472  pushback(p, c);
21473  return '!';
21474 
21475  case '=':
21476  if (was_bol(p)) {
21477  /* skip embedded rd document */
21478  if (word_match_p(p, "begin", 5)) {
21479  int first_p = TRUE;
21480 
21481  lex_goto_eol(p);
21482  dispatch_scan_event(p, tEMBDOC_BEG);
21483  for (;;) {
21484  lex_goto_eol(p);
21485  if (!first_p) {
21486  dispatch_scan_event(p, tEMBDOC);
21487  }
21488  first_p = FALSE;
21489  c = nextc(p);
21490  if (c == -1) {
21491  compile_error(p, "embedded document meets end of file");
21492  return END_OF_INPUT;
21493  }
21494  if (c == '=' && word_match_p(p, "end", 3)) {
21495  break;
21496  }
21497  pushback(p, c);
21498  }
21499  lex_goto_eol(p);
21500  dispatch_scan_event(p, tEMBDOC_END);
21501  goto retry;
21502  }
21503  }
21504 
21505  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21506  if ((c = nextc(p)) == '=') {
21507  if ((c = nextc(p)) == '=') {
21508  return tEQQ;
21509  }
21510  pushback(p, c);
21511  return tEQ;
21512  }
21513  if (c == '~') {
21514  return tMATCH;
21515  }
21516  else if (c == '>') {
21517  return tASSOC;
21518  }
21519  pushback(p, c);
21520  return '=';
21521 
21522  case '<':
21523  c = nextc(p);
21524  if (c == '<' &&
21525  !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
21526  !IS_END() &&
21527  (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
21528  enum yytokentype token = heredoc_identifier(p);
21529  if (token) return token < 0 ? 0 : token;
21530  }
21531  if (IS_AFTER_OPERATOR()) {
21532  SET_LEX_STATE(EXPR_ARG);
21533  }
21534  else {
21535  if (IS_lex_state(EXPR_CLASS))
21536  p->command_start = TRUE;
21537  SET_LEX_STATE(EXPR_BEG);
21538  }
21539  if (c == '=') {
21540  if ((c = nextc(p)) == '>') {
21541  return tCMP;
21542  }
21543  pushback(p, c);
21544  return tLEQ;
21545  }
21546  if (c == '<') {
21547  if ((c = nextc(p)) == '=') {
21548  set_yylval_id(idLTLT);
21549  SET_LEX_STATE(EXPR_BEG);
21550  return tOP_ASGN;
21551  }
21552  pushback(p, c);
21553  return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
21554  }
21555  pushback(p, c);
21556  return '<';
21557 
21558  case '>':
21559  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21560  if ((c = nextc(p)) == '=') {
21561  return tGEQ;
21562  }
21563  if (c == '>') {
21564  if ((c = nextc(p)) == '=') {
21565  set_yylval_id(idGTGT);
21566  SET_LEX_STATE(EXPR_BEG);
21567  return tOP_ASGN;
21568  }
21569  pushback(p, c);
21570  return tRSHFT;
21571  }
21572  pushback(p, c);
21573  return '>';
21574 
21575  case '"':
21576  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
21577  p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
21578  p->lex.ptok = p->lex.pcur-1;
21579  return tSTRING_BEG;
21580 
21581  case '`':
21582  if (IS_lex_state(EXPR_FNAME)) {
21583  SET_LEX_STATE(EXPR_ENDFN);
21584  return c;
21585  }
21586  if (IS_lex_state(EXPR_DOT)) {
21587  if (cmd_state)
21588  SET_LEX_STATE(EXPR_CMDARG);
21589  else
21590  SET_LEX_STATE(EXPR_ARG);
21591  return c;
21592  }
21593  p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
21594  return tXSTRING_BEG;
21595 
21596  case '\'':
21597  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
21598  p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
21599  p->lex.ptok = p->lex.pcur-1;
21600  return tSTRING_BEG;
21601 
21602  case '?':
21603  return parse_qmark(p, space_seen);
21604 
21605  case '&':
21606  if ((c = nextc(p)) == '&') {
21607  SET_LEX_STATE(EXPR_BEG);
21608  if ((c = nextc(p)) == '=') {
21609  set_yylval_id(idANDOP);
21610  SET_LEX_STATE(EXPR_BEG);
21611  return tOP_ASGN;
21612  }
21613  pushback(p, c);
21614  return tANDOP;
21615  }
21616  else if (c == '=') {
21617  set_yylval_id('&');
21618  SET_LEX_STATE(EXPR_BEG);
21619  return tOP_ASGN;
21620  }
21621  else if (c == '.') {
21622  set_yylval_id(idANDDOT);
21623  SET_LEX_STATE(EXPR_DOT);
21624  return tANDDOT;
21625  }
21626  pushback(p, c);
21627  if (IS_SPCARG(c)) {
21628  if ((c != ':') ||
21629  (c = peekc_n(p, 1)) == -1 ||
21630  !(c == '\'' || c == '"' ||
21631  is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
21632  rb_warning0("'&' interpreted as argument prefix");
21633  }
21634  c = tAMPER;
21635  }
21636  else if (IS_BEG()) {
21637  c = tAMPER;
21638  }
21639  else {
21640  c = warn_balanced('&', "&", "argument prefix");
21641  }
21642  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21643  return c;
21644 
21645  case '|':
21646  if ((c = nextc(p)) == '|') {
21647  SET_LEX_STATE(EXPR_BEG);
21648  if ((c = nextc(p)) == '=') {
21649  set_yylval_id(idOROP);
21650  SET_LEX_STATE(EXPR_BEG);
21651  return tOP_ASGN;
21652  }
21653  pushback(p, c);
21654  if (IS_lex_state_for(last_state, EXPR_BEG)) {
21655  c = '|';
21656  pushback(p, '|');
21657  return c;
21658  }
21659  return tOROP;
21660  }
21661  if (c == '=') {
21662  set_yylval_id('|');
21663  SET_LEX_STATE(EXPR_BEG);
21664  return tOP_ASGN;
21665  }
21666  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
21667  pushback(p, c);
21668  return '|';
21669 
21670  case '+':
21671  c = nextc(p);
21672  if (IS_AFTER_OPERATOR()) {
21673  SET_LEX_STATE(EXPR_ARG);
21674  if (c == '@') {
21675  return tUPLUS;
21676  }
21677  pushback(p, c);
21678  return '+';
21679  }
21680  if (c == '=') {
21681  set_yylval_id('+');
21682  SET_LEX_STATE(EXPR_BEG);
21683  return tOP_ASGN;
21684  }
21685  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
21686  SET_LEX_STATE(EXPR_BEG);
21687  pushback(p, c);
21688  if (c != -1 && ISDIGIT(c)) {
21689  return parse_numeric(p, '+');
21690  }
21691  return tUPLUS;
21692  }
21693  SET_LEX_STATE(EXPR_BEG);
21694  pushback(p, c);
21695  return warn_balanced('+', "+", "unary operator");
21696 
21697  case '-':
21698  c = nextc(p);
21699  if (IS_AFTER_OPERATOR()) {
21700  SET_LEX_STATE(EXPR_ARG);
21701  if (c == '@') {
21702  return tUMINUS;
21703  }
21704  pushback(p, c);
21705  return '-';
21706  }
21707  if (c == '=') {
21708  set_yylval_id('-');
21709  SET_LEX_STATE(EXPR_BEG);
21710  return tOP_ASGN;
21711  }
21712  if (c == '>') {
21713  SET_LEX_STATE(EXPR_ENDFN);
21714  yylval.num = p->lex.lpar_beg;
21715  p->lex.lpar_beg = p->lex.paren_nest;
21716  return tLAMBDA;
21717  }
21718  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
21719  SET_LEX_STATE(EXPR_BEG);
21720  pushback(p, c);
21721  if (c != -1 && ISDIGIT(c)) {
21722  return tUMINUS_NUM;
21723  }
21724  return tUMINUS;
21725  }
21726  SET_LEX_STATE(EXPR_BEG);
21727  pushback(p, c);
21728  return warn_balanced('-', "-", "unary operator");
21729 
21730  case '.': {
21731  int is_beg = IS_BEG();
21732  SET_LEX_STATE(EXPR_BEG);
21733  if ((c = nextc(p)) == '.') {
21734  if ((c = nextc(p)) == '.') {
21735  if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
21736  SET_LEX_STATE(EXPR_ENDARG);
21737  return tBDOT3;
21738  }
21739  if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
21740  rb_warn0("... at EOL, should be parenthesized?");
21741  }
21742  return is_beg ? tBDOT3 : tDOT3;
21743  }
21744  pushback(p, c);
21745  return is_beg ? tBDOT2 : tDOT2;
21746  }
21747  pushback(p, c);
21748  if (c != -1 && ISDIGIT(c)) {
21749  char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
21750  parse_numeric(p, '.');
21751  if (ISDIGIT(prev)) {
21752  yyerror0("unexpected fraction part after numeric literal");
21753  }
21754  else {
21755  yyerror0("no .<digit> floating literal anymore; put 0 before dot");
21756  }
21757  SET_LEX_STATE(EXPR_END);
21758  p->lex.ptok = p->lex.pcur;
21759  goto retry;
21760  }
21761  set_yylval_id('.');
21762  SET_LEX_STATE(EXPR_DOT);
21763  return '.';
21764  }
21765 
21766  case '0': case '1': case '2': case '3': case '4':
21767  case '5': case '6': case '7': case '8': case '9':
21768  return parse_numeric(p, c);
21769 
21770  case ')':
21771  COND_POP();
21772  CMDARG_POP();
21773  SET_LEX_STATE(EXPR_ENDFN);
21774  p->lex.paren_nest--;
21775  return c;
21776 
21777  case ']':
21778  COND_POP();
21779  CMDARG_POP();
21780  SET_LEX_STATE(EXPR_END);
21781  p->lex.paren_nest--;
21782  return c;
21783 
21784  case '}':
21785  /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
21786  if (!p->lex.brace_nest--) return tSTRING_DEND;
21787  COND_POP();
21788  CMDARG_POP();
21789  SET_LEX_STATE(EXPR_END);
21790  p->lex.paren_nest--;
21791  return c;
21792 
21793  case ':':
21794  c = nextc(p);
21795  if (c == ':') {
21796  if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
21797  SET_LEX_STATE(EXPR_BEG);
21798  return tCOLON3;
21799  }
21800  set_yylval_id(idCOLON2);
21801  SET_LEX_STATE(EXPR_DOT);
21802  return tCOLON2;
21803  }
21804  if (IS_END() || ISSPACE(c) || c == '#') {
21805  pushback(p, c);
21806  c = warn_balanced(':', ":", "symbol literal");
21807  SET_LEX_STATE(EXPR_BEG);
21808  return c;
21809  }
21810  switch (c) {
21811  case '\'':
21812  p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
21813  break;
21814  case '"':
21815  p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
21816  break;
21817  default:
21818  pushback(p, c);
21819  break;
21820  }
21821  SET_LEX_STATE(EXPR_FNAME);
21822  return tSYMBEG;
21823 
21824  case '/':
21825  if (IS_BEG()) {
21826  p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
21827  return tREGEXP_BEG;
21828  }
21829  if ((c = nextc(p)) == '=') {
21830  set_yylval_id('/');
21831  SET_LEX_STATE(EXPR_BEG);
21832  return tOP_ASGN;
21833  }
21834  pushback(p, c);
21835  if (IS_SPCARG(c)) {
21836  arg_ambiguous(p, '/');
21837  p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
21838  return tREGEXP_BEG;
21839  }
21840  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21841  return warn_balanced('/', "/", "regexp literal");
21842 
21843  case '^':
21844  if ((c = nextc(p)) == '=') {
21845  set_yylval_id('^');
21846  SET_LEX_STATE(EXPR_BEG);
21847  return tOP_ASGN;
21848  }
21849  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21850  pushback(p, c);
21851  return '^';
21852 
21853  case ';':
21854  SET_LEX_STATE(EXPR_BEG);
21855  p->command_start = TRUE;
21856  return ';';
21857 
21858  case ',':
21859  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
21860  return ',';
21861 
21862  case '~':
21863  if (IS_AFTER_OPERATOR()) {
21864  if ((c = nextc(p)) != '@') {
21865  pushback(p, c);
21866  }
21867  SET_LEX_STATE(EXPR_ARG);
21868  }
21869  else {
21870  SET_LEX_STATE(EXPR_BEG);
21871  }
21872  return '~';
21873 
21874  case '(':
21875  if (IS_BEG()) {
21876  c = tLPAREN;
21877  }
21878  else if (!space_seen) {
21879  /* foo( ... ) => method call, no ambiguity */
21880  }
21881  else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
21882  c = tLPAREN_ARG;
21883  }
21884  else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
21885  rb_warning0("parentheses after method name is interpreted as "
21886  "an argument list, not a decomposed argument");
21887  }
21888  p->lex.paren_nest++;
21889  COND_PUSH(0);
21890  CMDARG_PUSH(0);
21891  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
21892  return c;
21893 
21894  case '[':
21895  p->lex.paren_nest++;
21896  if (IS_AFTER_OPERATOR()) {
21897  if ((c = nextc(p)) == ']') {
21898  p->lex.paren_nest--;
21899  SET_LEX_STATE(EXPR_ARG);
21900  if ((c = nextc(p)) == '=') {
21901  return tASET;
21902  }
21903  pushback(p, c);
21904  return tAREF;
21905  }
21906  pushback(p, c);
21907  SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
21908  return '[';
21909  }
21910  else if (IS_BEG()) {
21911  c = tLBRACK;
21912  }
21913  else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
21914  c = tLBRACK;
21915  }
21916  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
21917  COND_PUSH(0);
21918  CMDARG_PUSH(0);
21919  return c;
21920 
21921  case '{':
21922  ++p->lex.brace_nest;
21923  if (lambda_beginning_p())
21924  c = tLAMBEG;
21925  else if (IS_lex_state(EXPR_LABELED))
21926  c = tLBRACE; /* hash */
21927  else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
21928  c = '{'; /* block (primary) */
21929  else if (IS_lex_state(EXPR_ENDARG))
21930  c = tLBRACE_ARG; /* block (expr) */
21931  else
21932  c = tLBRACE; /* hash */
21933  if (c != tLBRACE) {
21934  p->command_start = TRUE;
21935  SET_LEX_STATE(EXPR_BEG);
21936  }
21937  else {
21938  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
21939  }
21940  ++p->lex.paren_nest; /* after lambda_beginning_p() */
21941  COND_PUSH(0);
21942  CMDARG_PUSH(0);
21943  return c;
21944 
21945  case '\\':
21946  c = nextc(p);
21947  if (c == '\n') {
21948  space_seen = 1;
21949  dispatch_scan_event(p, tSP);
21950  goto retry; /* skip \\n */
21951  }
21952  if (c == ' ') return tSP;
21953  if (ISSPACE(c)) return c;
21954  pushback(p, c);
21955  return '\\';
21956 
21957  case '%':
21958  return parse_percent(p, space_seen, last_state);
21959 
21960  case '$':
21961  return parse_gvar(p, last_state);
21962 
21963  case '@':
21964  return parse_atmark(p, last_state);
21965 
21966  case '_':
21967  if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
21968  p->ruby__end__seen = 1;
21969  p->eofp = 1;
21970 #ifdef RIPPER
21971  lex_goto_eol(p);
21972  dispatch_scan_event(p, k__END__);
21973 #endif
21974  return END_OF_INPUT;
21975  }
21976  newtok(p);
21977  break;
21978 
21979  default:
21980  if (!parser_is_identchar(p)) {
21981  compile_error(p, "Invalid char '\\x%02X' in expression", c);
21982  token_flush(p);
21983  goto retry;
21984  }
21985 
21986  newtok(p);
21987  break;
21988  }
21989 
21990  return parse_ident(p, c, cmd_state);
21991 }
21992 
21993 static enum yytokentype
21994 yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
21995 {
21996  enum yytokentype t;
21997 
21998  p->lval = lval;
21999  lval->node = 0;
22000  p->yylloc = yylloc;
22001 
22002  t = parser_yylex(p);
22003 
22004  if (has_delayed_token(p))
22005  dispatch_delayed_token(p, t);
22006  else if (t != END_OF_INPUT)
22007  dispatch_scan_event(p, t);
22008 
22009  return t;
22010 }
22011 
22012 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22013 
22014 static NODE*
22015 node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22016 {
22017  NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22018 
22019  rb_node_init(n, type);
22020  return n;
22021 }
22022 
22023 static NODE *
22024 nd_set_loc(NODE *nd, const YYLTYPE *loc)
22025 {
22026  nd->nd_loc = *loc;
22027  nd_set_line(nd, loc->beg_pos.lineno);
22028  return nd;
22029 }
22030 
22031 static NODE*
22032 node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22033 {
22034  NODE *n = node_new_internal(p, type, size, alignment);
22035 
22036  nd_set_loc(n, loc);
22037  nd_set_node_id(n, parser_get_node_id(p));
22038  return n;
22039 }
22040 
22041 #define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22042 
22043 static rb_node_scope_t *
22044 rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22045 {
22046  rb_ast_id_table_t *nd_tbl;
22047  nd_tbl = local_tbl(p);
22048  rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22049  n->nd_tbl = nd_tbl;
22050  n->nd_body = nd_body;
22051  n->nd_args = nd_args;
22052 
22053  return n;
22054 }
22055 
22056 static rb_node_scope_t *
22057 rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22058 {
22059  rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22060  n->nd_tbl = nd_tbl;
22061  n->nd_body = nd_body;
22062  n->nd_args = nd_args;
22063 
22064  return n;
22065 }
22066 
22067 static rb_node_defn_t *
22068 rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22069 {
22070  rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22071  n->nd_mid = nd_mid;
22072  n->nd_defn = nd_defn;
22073 
22074  return n;
22075 }
22076 
22077 static rb_node_defs_t *
22078 rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22079 {
22080  rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22081  n->nd_recv = nd_recv;
22082  n->nd_mid = nd_mid;
22083  n->nd_defn = nd_defn;
22084 
22085  return n;
22086 }
22087 
22088 static rb_node_block_t *
22089 rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22090 {
22091  rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22092  n->nd_head = nd_head;
22093  n->nd_end = (NODE *)n;
22094  n->nd_next = 0;
22095 
22096  return n;
22097 }
22098 
22099 static rb_node_for_t *
22100 rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc)
22101 {
22102  rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22103  n->nd_body = nd_body;
22104  n->nd_iter = nd_iter;
22105 
22106  return n;
22107 }
22108 
22109 static rb_node_for_masgn_t *
22110 rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22111 {
22112  rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22113  n->nd_var = nd_var;
22114 
22115  return n;
22116 }
22117 
22118 static rb_node_retry_t *
22119 rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22120 {
22121  rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22122 
22123  return n;
22124 }
22125 
22126 static rb_node_begin_t *
22127 rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22128 {
22129  rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22130  n->nd_body = nd_body;
22131 
22132  return n;
22133 }
22134 
22135 static rb_node_rescue_t *
22136 rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22137 {
22138  rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22139  n->nd_head = nd_head;
22140  n->nd_resq = nd_resq;
22141  n->nd_else = nd_else;
22142 
22143  return n;
22144 }
22145 
22146 static rb_node_resbody_t *
22147 rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22148 {
22149  rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22150  n->nd_args = nd_args;
22151  n->nd_exc_var = nd_exc_var;
22152  n->nd_body = nd_body;
22153  n->nd_next = nd_next;
22154 
22155  return n;
22156 }
22157 
22158 static rb_node_ensure_t *
22159 rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22160 {
22161  rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22162  n->nd_head = nd_head;
22163  n->nd_ensr = nd_ensr;
22164 
22165  return n;
22166 }
22167 
22168 static rb_node_and_t *
22169 rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22170 {
22171  rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22172  n->nd_1st = nd_1st;
22173  n->nd_2nd = nd_2nd;
22174  n->operator_loc = *operator_loc;
22175 
22176  return n;
22177 }
22178 
22179 static rb_node_or_t *
22180 rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22181 {
22182  rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22183  n->nd_1st = nd_1st;
22184  n->nd_2nd = nd_2nd;
22185  n->operator_loc = *operator_loc;
22186 
22187  return n;
22188 }
22189 
22190 static rb_node_return_t *
22191 rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22192 {
22193  rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22194  n->nd_stts = nd_stts;
22195  n->keyword_loc = *keyword_loc;
22196  return n;
22197 }
22198 
22199 static rb_node_yield_t *
22200 rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22201 {
22202  rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22203  n->nd_head = nd_head;
22204 
22205  return n;
22206 }
22207 
22208 static rb_node_if_t *
22209 rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc)
22210 {
22211  rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22212  n->nd_cond = nd_cond;
22213  n->nd_body = nd_body;
22214  n->nd_else = nd_else;
22215 
22216  return n;
22217 }
22218 
22219 static rb_node_unless_t *
22220 rb_node_unless_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *end_keyword_loc)
22221 {
22222  rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22223  n->nd_cond = nd_cond;
22224  n->nd_body = nd_body;
22225  n->nd_else = nd_else;
22226  n->keyword_loc = *keyword_loc;
22227  n->then_keyword_loc = *then_keyword_loc;
22228  n->end_keyword_loc = *end_keyword_loc;
22229 
22230  return n;
22231 }
22232 
22233 static rb_node_class_t *
22234 rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc)
22235 {
22236  /* Keep the order of node creation */
22237  NODE *scope = NEW_SCOPE(0, nd_body, loc);
22238  rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22239  n->nd_cpath = nd_cpath;
22240  n->nd_body = scope;
22241  n->nd_super = nd_super;
22242 
22243  return n;
22244 }
22245 
22246 static rb_node_sclass_t *
22247 rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc)
22248 {
22249  /* Keep the order of node creation */
22250  NODE *scope = NEW_SCOPE(0, nd_body, loc);
22251  rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22252  n->nd_recv = nd_recv;
22253  n->nd_body = scope;
22254 
22255  return n;
22256 }
22257 
22258 static rb_node_module_t *
22259 rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc)
22260 {
22261  /* Keep the order of node creation */
22262  NODE *scope = NEW_SCOPE(0, nd_body, loc);
22263  rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22264  n->nd_cpath = nd_cpath;
22265  n->nd_body = scope;
22266 
22267  return n;
22268 }
22269 
22270 static rb_node_iter_t *
22271 rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22272 {
22273  /* Keep the order of node creation */
22274  NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22275  rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22276  n->nd_body = scope;
22277  n->nd_iter = 0;
22278 
22279  return n;
22280 }
22281 
22282 static rb_node_lambda_t *
22283 rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22284 {
22285  /* Keep the order of node creation */
22286  NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22287  rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, loc);
22288  n->nd_body = scope;
22289 
22290  return n;
22291 }
22292 
22293 static rb_node_case_t *
22294 rb_node_case_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22295 {
22296  rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22297  n->nd_head = nd_head;
22298  n->nd_body = nd_body;
22299  n->case_keyword_loc = *case_keyword_loc;
22300  n->end_keyword_loc = *end_keyword_loc;
22301 
22302  return n;
22303 }
22304 
22305 static rb_node_case2_t *
22306 rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22307 {
22308  rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22309  n->nd_head = 0;
22310  n->nd_body = nd_body;
22311  n->case_keyword_loc = *case_keyword_loc;
22312  n->end_keyword_loc = *end_keyword_loc;
22313 
22314  return n;
22315 }
22316 
22317 static rb_node_case3_t *
22318 rb_node_case3_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22319 {
22320  rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22321  n->nd_head = nd_head;
22322  n->nd_body = nd_body;
22323  n->case_keyword_loc = *case_keyword_loc;
22324  n->end_keyword_loc = *end_keyword_loc;
22325 
22326  return n;
22327 }
22328 
22329 static rb_node_when_t *
22330 rb_node_when_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc)
22331 {
22332  rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22333  n->nd_head = nd_head;
22334  n->nd_body = nd_body;
22335  n->nd_next = nd_next;
22336  n->keyword_loc = *keyword_loc;
22337  n->then_keyword_loc = *then_keyword_loc;
22338 
22339  return n;
22340 }
22341 
22342 static rb_node_in_t *
22343 rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22344 {
22345  rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22346  n->nd_head = nd_head;
22347  n->nd_body = nd_body;
22348  n->nd_next = nd_next;
22349 
22350  return n;
22351 }
22352 
22353 static rb_node_while_t *
22354 rb_node_while_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc)
22355 {
22356  rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22357  n->nd_cond = nd_cond;
22358  n->nd_body = nd_body;
22359  n->nd_state = nd_state;
22360  n->keyword_loc = *keyword_loc;
22361  n->closing_loc = *closing_loc;
22362 
22363  return n;
22364 }
22365 
22366 static rb_node_until_t *
22367 rb_node_until_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc)
22368 {
22369  rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22370  n->nd_cond = nd_cond;
22371  n->nd_body = nd_body;
22372  n->nd_state = nd_state;
22373  n->keyword_loc = *keyword_loc;
22374  n->closing_loc = *closing_loc;
22375 
22376  return n;
22377 }
22378 
22379 static rb_node_colon2_t *
22380 rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc)
22381 {
22382  rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
22383  n->nd_head = nd_head;
22384  n->nd_mid = nd_mid;
22385 
22386  return n;
22387 }
22388 
22389 static rb_node_colon3_t *
22390 rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
22391 {
22392  rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
22393  n->nd_mid = nd_mid;
22394 
22395  return n;
22396 }
22397 
22398 static rb_node_dot2_t *
22399 rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc)
22400 {
22401  rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
22402  n->nd_beg = nd_beg;
22403  n->nd_end = nd_end;
22404 
22405  return n;
22406 }
22407 
22408 static rb_node_dot3_t *
22409 rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc)
22410 {
22411  rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
22412  n->nd_beg = nd_beg;
22413  n->nd_end = nd_end;
22414 
22415  return n;
22416 }
22417 
22418 static rb_node_self_t *
22419 rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
22420 {
22421  rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
22422  n->nd_state = 1;
22423 
22424  return n;
22425 }
22426 
22427 static rb_node_nil_t *
22428 rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
22429 {
22430  rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
22431 
22432  return n;
22433 }
22434 
22435 static rb_node_true_t *
22436 rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
22437 {
22438  rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
22439 
22440  return n;
22441 }
22442 
22443 static rb_node_false_t *
22444 rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
22445 {
22446  rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
22447 
22448  return n;
22449 }
22450 
22451 static rb_node_super_t *
22452 rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc)
22453 {
22454  rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
22455  n->nd_args = nd_args;
22456 
22457  return n;
22458 }
22459 
22460 static rb_node_zsuper_t *
22461 rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
22462 {
22463  rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
22464 
22465  return n;
22466 }
22467 
22468 static rb_node_match2_t *
22469 rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22470 {
22471  rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
22472  n->nd_recv = nd_recv;
22473  n->nd_value = nd_value;
22474  n->nd_args = 0;
22475 
22476  return n;
22477 }
22478 
22479 static rb_node_match3_t *
22480 rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22481 {
22482  rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
22483  n->nd_recv = nd_recv;
22484  n->nd_value = nd_value;
22485 
22486  return n;
22487 }
22488 
22489 /* TODO: Use union for NODE_LIST2 */
22490 static rb_node_list_t *
22491 rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22492 {
22493  rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22494  n->nd_head = nd_head;
22495  n->as.nd_alen = 1;
22496  n->nd_next = 0;
22497 
22498  return n;
22499 }
22500 
22501 static rb_node_list_t *
22502 rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22503 {
22504  rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22505  n->nd_head = nd_head;
22506  n->as.nd_alen = nd_alen;
22507  n->nd_next = nd_next;
22508 
22509  return n;
22510 }
22511 
22512 static rb_node_zlist_t *
22513 rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
22514 {
22515  rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
22516 
22517  return n;
22518 }
22519 
22520 static rb_node_hash_t *
22521 rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22522 {
22523  rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
22524  n->nd_head = nd_head;
22525  n->nd_brace = 0;
22526 
22527  return n;
22528 }
22529 
22530 static rb_node_masgn_t *
22531 rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
22532 {
22533  rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
22534  n->nd_head = nd_head;
22535  n->nd_value = 0;
22536  n->nd_args = nd_args;
22537 
22538  return n;
22539 }
22540 
22541 static rb_node_gasgn_t *
22542 rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22543 {
22544  rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
22545  n->nd_vid = nd_vid;
22546  n->nd_value = nd_value;
22547 
22548  return n;
22549 }
22550 
22551 static rb_node_lasgn_t *
22552 rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22553 {
22554  rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
22555  n->nd_vid = nd_vid;
22556  n->nd_value = nd_value;
22557 
22558  return n;
22559 }
22560 
22561 static rb_node_dasgn_t *
22562 rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22563 {
22564  rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
22565  n->nd_vid = nd_vid;
22566  n->nd_value = nd_value;
22567 
22568  return n;
22569 }
22570 
22571 static rb_node_iasgn_t *
22572 rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22573 {
22574  rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
22575  n->nd_vid = nd_vid;
22576  n->nd_value = nd_value;
22577 
22578  return n;
22579 }
22580 
22581 static rb_node_cvasgn_t *
22582 rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22583 {
22584  rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
22585  n->nd_vid = nd_vid;
22586  n->nd_value = nd_value;
22587 
22588  return n;
22589 }
22590 
22591 static rb_node_op_asgn1_t *
22592 rb_node_op_asgn1_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *index, NODE *rvalue, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
22593 {
22594  rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
22595  n->nd_recv = nd_recv;
22596  n->nd_mid = nd_mid;
22597  n->nd_index = index;
22598  n->nd_rvalue = rvalue;
22599  n->call_operator_loc = *call_operator_loc;
22600  n->opening_loc = *opening_loc;
22601  n->closing_loc = *closing_loc;
22602  n->binary_operator_loc = *binary_operator_loc;
22603 
22604  return n;
22605 }
22606 
22607 static rb_node_op_asgn2_t *
22608 rb_node_op_asgn2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, ID nd_vid, ID nd_mid, bool nd_aid, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
22609 {
22610  rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
22611  n->nd_recv = nd_recv;
22612  n->nd_value = nd_value;
22613  n->nd_vid = nd_vid;
22614  n->nd_mid = nd_mid;
22615  n->nd_aid = nd_aid;
22616  n->call_operator_loc = *call_operator_loc;
22617  n->message_loc = *message_loc;
22618  n->binary_operator_loc = *binary_operator_loc;
22619 
22620  return n;
22621 }
22622 
22623 static rb_node_op_asgn_or_t *
22624 rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
22625 {
22626  rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
22627  n->nd_head = nd_head;
22628  n->nd_value = nd_value;
22629 
22630  return n;
22631 }
22632 
22633 static rb_node_op_asgn_and_t *
22634 rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
22635 {
22636  rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
22637  n->nd_head = nd_head;
22638  n->nd_value = nd_value;
22639 
22640  return n;
22641 }
22642 
22643 static rb_node_gvar_t *
22644 rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22645 {
22646  rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
22647  n->nd_vid = nd_vid;
22648 
22649  return n;
22650 }
22651 
22652 static rb_node_lvar_t *
22653 rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22654 {
22655  rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
22656  n->nd_vid = nd_vid;
22657 
22658  return n;
22659 }
22660 
22661 static rb_node_dvar_t *
22662 rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22663 {
22664  rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
22665  n->nd_vid = nd_vid;
22666 
22667  return n;
22668 }
22669 
22670 static rb_node_ivar_t *
22671 rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22672 {
22673  rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
22674  n->nd_vid = nd_vid;
22675 
22676  return n;
22677 }
22678 
22679 static rb_node_const_t *
22680 rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22681 {
22682  rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
22683  n->nd_vid = nd_vid;
22684 
22685  return n;
22686 }
22687 
22688 static rb_node_cvar_t *
22689 rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22690 {
22691  rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
22692  n->nd_vid = nd_vid;
22693 
22694  return n;
22695 }
22696 
22697 static rb_node_nth_ref_t *
22698 rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
22699 {
22700  rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
22701  n->nd_nth = nd_nth;
22702 
22703  return n;
22704 }
22705 
22706 static rb_node_back_ref_t *
22707 rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
22708 {
22709  rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
22710  n->nd_nth = nd_nth;
22711 
22712  return n;
22713 }
22714 
22715 static rb_node_integer_t *
22716 rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
22717 {
22718  rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
22719  n->val = val;
22720  n->minus = FALSE;
22721  n->base = base;
22722 
22723  return n;
22724 }
22725 
22726 static rb_node_float_t *
22727 rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
22728 {
22729  rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
22730  n->val = val;
22731  n->minus = FALSE;
22732 
22733  return n;
22734 }
22735 
22736 static rb_node_rational_t *
22737 rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
22738 {
22739  rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
22740  n->val = val;
22741  n->minus = FALSE;
22742  n->base = base;
22743  n->seen_point = seen_point;
22744 
22745  return n;
22746 }
22747 
22748 static rb_node_imaginary_t *
22749 rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
22750 {
22751  rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
22752  n->val = val;
22753  n->minus = FALSE;
22754  n->base = base;
22755  n->seen_point = seen_point;
22756  n->type = numeric_type;
22757 
22758  return n;
22759 }
22760 
22761 static rb_node_str_t *
22762 rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
22763 {
22764  rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
22765  n->string = string;
22766 
22767  return n;
22768 }
22769 
22770 /* TODO; Use union for NODE_DSTR2 */
22771 static rb_node_dstr_t *
22772 rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22773 {
22774  rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
22775  n->string = string;
22776  n->as.nd_alen = nd_alen;
22777  n->nd_next = (rb_node_list_t *)nd_next;
22778 
22779  return n;
22780 }
22781 
22782 static rb_node_dstr_t *
22783 rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
22784 {
22785  return rb_node_dstr_new0(p, string, 1, 0, loc);
22786 }
22787 
22788 static rb_node_xstr_t *
22789 rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
22790 {
22791  rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
22792  n->string = string;
22793 
22794  return n;
22795 }
22796 
22797 static rb_node_dxstr_t *
22798 rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22799 {
22800  rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
22801  n->string = string;
22802  n->as.nd_alen = nd_alen;
22803  n->nd_next = (rb_node_list_t *)nd_next;
22804 
22805  return n;
22806 }
22807 
22808 static rb_node_sym_t *
22809 rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
22810 {
22811  rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
22812  n->string = rb_str_to_parser_string(p, str);
22813 
22814  return n;
22815 }
22816 
22817 static rb_node_dsym_t *
22818 rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22819 {
22820  rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
22821  n->string = string;
22822  n->as.nd_alen = nd_alen;
22823  n->nd_next = (rb_node_list_t *)nd_next;
22824 
22825  return n;
22826 }
22827 
22828 static rb_node_evstr_t *
22829 rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22830 {
22831  rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
22832  n->nd_body = nd_body;
22833 
22834  return n;
22835 }
22836 
22837 static rb_node_regx_t *
22838 rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc)
22839 {
22840  rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
22841  n->string = string;
22842  n->options = options & RE_OPTION_MASK;
22843 
22844  return n;
22845 }
22846 
22847 static rb_node_call_t *
22848 rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
22849 {
22850  rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
22851  n->nd_recv = nd_recv;
22852  n->nd_mid = nd_mid;
22853  n->nd_args = nd_args;
22854 
22855  return n;
22856 }
22857 
22858 static rb_node_opcall_t *
22859 rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
22860 {
22861  rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
22862  n->nd_recv = nd_recv;
22863  n->nd_mid = nd_mid;
22864  n->nd_args = nd_args;
22865 
22866  return n;
22867 }
22868 
22869 static rb_node_fcall_t *
22870 rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
22871 {
22872  rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
22873  n->nd_mid = nd_mid;
22874  n->nd_args = nd_args;
22875 
22876  return n;
22877 }
22878 
22879 static rb_node_qcall_t *
22880 rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
22881 {
22882  rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
22883  n->nd_recv = nd_recv;
22884  n->nd_mid = nd_mid;
22885  n->nd_args = nd_args;
22886 
22887  return n;
22888 }
22889 
22890 static rb_node_vcall_t *
22891 rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
22892 {
22893  rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
22894  n->nd_mid = nd_mid;
22895 
22896  return n;
22897 }
22898 
22899 static rb_node_once_t *
22900 rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22901 {
22902  rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
22903  n->nd_body = nd_body;
22904 
22905  return n;
22906 }
22907 
22908 static rb_node_args_t *
22909 rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
22910 {
22911  rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
22912  MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
22913 
22914  return n;
22915 }
22916 
22917 static rb_node_args_aux_t *
22918 rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
22919 {
22920  rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
22921  n->nd_pid = nd_pid;
22922  n->nd_plen = nd_plen;
22923  n->nd_next = 0;
22924 
22925  return n;
22926 }
22927 
22928 static rb_node_opt_arg_t *
22929 rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22930 {
22931  rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
22932  n->nd_body = nd_body;
22933  n->nd_next = 0;
22934 
22935  return n;
22936 }
22937 
22938 static rb_node_kw_arg_t *
22939 rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22940 {
22941  rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
22942  n->nd_body = nd_body;
22943  n->nd_next = 0;
22944 
22945  return n;
22946 }
22947 
22948 static rb_node_postarg_t *
22949 rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
22950 {
22951  rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
22952  n->nd_1st = nd_1st;
22953  n->nd_2nd = nd_2nd;
22954 
22955  return n;
22956 }
22957 
22958 static rb_node_argscat_t *
22959 rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
22960 {
22961  rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
22962  n->nd_head = nd_head;
22963  n->nd_body = nd_body;
22964 
22965  return n;
22966 }
22967 
22968 static rb_node_argspush_t *
22969 rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
22970 {
22971  rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
22972  n->nd_head = nd_head;
22973  n->nd_body = nd_body;
22974 
22975  return n;
22976 }
22977 
22978 static rb_node_splat_t *
22979 rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22980 {
22981  rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
22982  n->nd_head = nd_head;
22983  n->operator_loc = *operator_loc;
22984 
22985  return n;
22986 }
22987 
22988 static rb_node_block_pass_t *
22989 rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22990 {
22991  rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
22992  n->forwarding = 0;
22993  n->nd_head = 0;
22994  n->nd_body = nd_body;
22995  n->operator_loc = *operator_loc;
22996 
22997  return n;
22998 }
22999 
23000 static rb_node_alias_t *
23001 rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23002 {
23003  rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23004  n->nd_1st = nd_1st;
23005  n->nd_2nd = nd_2nd;
23006  n->keyword_loc = *keyword_loc;
23007 
23008  return n;
23009 }
23010 
23011 static rb_node_valias_t *
23012 rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23013 {
23014  rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23015  n->nd_alias = nd_alias;
23016  n->nd_orig = nd_orig;
23017  n->keyword_loc = *keyword_loc;
23018 
23019  return n;
23020 }
23021 
23022 static rb_node_undef_t *
23023 rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23024 {
23025  rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23026  n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23027  n->keyword_loc = NULL_LOC;
23028  rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23029 
23030  return n;
23031 }
23032 
23033 static rb_node_errinfo_t *
23034 rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23035 {
23036  rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23037 
23038  return n;
23039 }
23040 
23041 static rb_node_defined_t *
23042 rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23043 {
23044  rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23045  n->nd_head = nd_head;
23046 
23047  return n;
23048 }
23049 
23050 static rb_node_postexe_t *
23051 rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23052 {
23053  rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23054  n->nd_body = nd_body;
23055 
23056  return n;
23057 }
23058 
23059 static rb_node_attrasgn_t *
23060 rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23061 {
23062  rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23063  n->nd_recv = nd_recv;
23064  n->nd_mid = nd_mid;
23065  n->nd_args = nd_args;
23066 
23067  return n;
23068 }
23069 
23070 static rb_node_aryptn_t *
23071 rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23072 {
23073  rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23074  n->nd_pconst = 0;
23075  n->pre_args = pre_args;
23076  n->rest_arg = rest_arg;
23077  n->post_args = post_args;
23078 
23079  return n;
23080 }
23081 
23082 static rb_node_hshptn_t *
23083 rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23084 {
23085  rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23086  n->nd_pconst = nd_pconst;
23087  n->nd_pkwargs = nd_pkwargs;
23088  n->nd_pkwrestarg = nd_pkwrestarg;
23089 
23090  return n;
23091 }
23092 
23093 static rb_node_fndptn_t *
23094 rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23095 {
23096  rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23097  n->nd_pconst = 0;
23098  n->pre_rest_arg = pre_rest_arg;
23099  n->args = args;
23100  n->post_rest_arg = post_rest_arg;
23101 
23102  return n;
23103 }
23104 
23105 static rb_node_line_t *
23106 rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23107 {
23108  rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23109 
23110  return n;
23111 }
23112 
23113 static rb_node_file_t *
23114 rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23115 {
23116  rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23117  n->path = rb_str_to_parser_string(p, str);
23118 
23119  return n;
23120 }
23121 
23122 static rb_node_encoding_t *
23123 rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23124 {
23125  rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23126  n->enc = p->enc;
23127 
23128  return n;
23129 }
23130 
23131 static rb_node_cdecl_t *
23132 rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23133 {
23134  rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23135  n->nd_vid = nd_vid;
23136  n->nd_value = nd_value;
23137  n->nd_else = nd_else;
23138  n->shareability = shareability;
23139 
23140  return n;
23141 }
23142 
23143 static rb_node_op_cdecl_t *
23144 rb_node_op_cdecl_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, ID nd_aid, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23145 {
23146  rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23147  n->nd_head = nd_head;
23148  n->nd_value = nd_value;
23149  n->nd_aid = nd_aid;
23150  n->shareability = shareability;
23151 
23152  return n;
23153 }
23154 
23155 static rb_node_error_t *
23156 rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23157 {
23158  rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23159 
23160  return n;
23161 }
23162 
23163 static rb_node_break_t *
23164 rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23165 {
23166  rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23167  n->nd_stts = nd_stts;
23168  n->nd_chain = 0;
23169  n->keyword_loc = *keyword_loc;
23170 
23171  return n;
23172 }
23173 
23174 static rb_node_next_t *
23175 rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23176 {
23177  rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23178  n->nd_stts = nd_stts;
23179  n->nd_chain = 0;
23180  n->keyword_loc = *keyword_loc;
23181 
23182  return n;
23183 }
23184 
23185 static rb_node_redo_t *
23186 rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23187 {
23188  rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23189  n->nd_chain = 0;
23190  n->keyword_loc = *keyword_loc;
23191 
23192  return n;
23193 }
23194 
23195 static rb_node_def_temp_t *
23196 rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23197 {
23198  rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23199  n->save.numparam_save = 0;
23200  n->save.max_numparam = 0;
23201  n->save.ctxt = p->ctxt;
23202  n->nd_def = 0;
23203  n->nd_mid = 0;
23204 
23205  return n;
23206 }
23207 
23208 static rb_node_def_temp_t *
23209 def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23210 {
23211  n->save.numparam_save = numparam_push(p);
23212  n->save.max_numparam = p->max_numparam;
23213  return n;
23214 }
23215 
23216 #ifndef RIPPER
23217 static enum node_type
23218 nodetype(NODE *node) /* for debug */
23219 {
23220  return (enum node_type)nd_type(node);
23221 }
23222 
23223 static int
23224 nodeline(NODE *node)
23225 {
23226  return nd_line(node);
23227 }
23228 #endif
23229 
23230 static NODE*
23231 newline_node(NODE *node)
23232 {
23233  if (node) {
23234  node = remove_begin(node);
23235  nd_set_fl_newline(node);
23236  }
23237  return node;
23238 }
23239 
23240 static void
23241 fixpos(NODE *node, NODE *orig)
23242 {
23243  if (!node) return;
23244  if (!orig) return;
23245  nd_set_line(node, nd_line(orig));
23246 }
23247 
23248 static NODE*
23249 block_append(struct parser_params *p, NODE *head, NODE *tail)
23250 {
23251  NODE *end, *h = head, *nd;
23252 
23253  if (tail == 0) return head;
23254 
23255  if (h == 0) return tail;
23256  switch (nd_type(h)) {
23257  default:
23258  h = end = NEW_BLOCK(head, &head->nd_loc);
23259  head = end;
23260  break;
23261  case NODE_BLOCK:
23262  end = RNODE_BLOCK(h)->nd_end;
23263  break;
23264  }
23265 
23266  nd = RNODE_BLOCK(end)->nd_head;
23267  switch (nd_type(nd)) {
23268  case NODE_RETURN:
23269  case NODE_BREAK:
23270  case NODE_NEXT:
23271  case NODE_REDO:
23272  case NODE_RETRY:
23273  rb_warning0L(nd_line(tail), "statement not reached");
23274  break;
23275 
23276  default:
23277  break;
23278  }
23279 
23280  if (!nd_type_p(tail, NODE_BLOCK)) {
23281  tail = NEW_BLOCK(tail, &tail->nd_loc);
23282  }
23283  RNODE_BLOCK(end)->nd_next = tail;
23284  RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23285  nd_set_last_loc(head, nd_last_loc(tail));
23286  return head;
23287 }
23288 
23289 /* append item to the list */
23290 static NODE*
23291 list_append(struct parser_params *p, NODE *list, NODE *item)
23292 {
23293  NODE *last;
23294 
23295  if (list == 0) return NEW_LIST(item, &item->nd_loc);
23296  if (RNODE_LIST(list)->nd_next) {
23297  last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23298  }
23299  else {
23300  last = list;
23301  }
23302 
23303  RNODE_LIST(list)->as.nd_alen += 1;
23304  RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23305  RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23306 
23307  nd_set_last_loc(list, nd_last_loc(item));
23308 
23309  return list;
23310 }
23311 
23312 /* concat two lists */
23313 static NODE*
23314 list_concat(NODE *head, NODE *tail)
23315 {
23316  NODE *last;
23317 
23318  if (RNODE_LIST(head)->nd_next) {
23319  last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23320  }
23321  else {
23322  last = head;
23323  }
23324 
23325  RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23326  RNODE_LIST(last)->nd_next = tail;
23327  if (RNODE_LIST(tail)->nd_next) {
23328  RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23329  }
23330  else {
23331  RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23332  }
23333 
23334  nd_set_last_loc(head, nd_last_loc(tail));
23335 
23336  return head;
23337 }
23338 
23339 static int
23340 literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23341 {
23342  if (!tail) return 1;
23343  if (!rb_parser_enc_compatible(p, head, tail)) {
23344  compile_error(p, "string literal encodings differ (%s / %s)",
23345  rb_enc_name(rb_parser_str_get_encoding(head)),
23346  rb_enc_name(rb_parser_str_get_encoding(tail)));
23347  rb_parser_str_resize(p, head, 0);
23348  rb_parser_str_resize(p, tail, 0);
23349  return 0;
23350  }
23351  rb_parser_str_buf_append(p, head, tail);
23352  return 1;
23353 }
23354 
23355 static rb_parser_string_t *
23356 string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23357 {
23358  if (htype != NODE_DSTR) return NULL;
23359  if (RNODE_DSTR(head)->nd_next) {
23360  head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
23361  if (!head || !nd_type_p(head, NODE_STR)) return NULL;
23362  }
23363  rb_parser_string_t *lit = RNODE_DSTR(head)->string;
23364  ASSUME(lit);
23365  return lit;
23366 }
23367 
23368 #ifndef RIPPER
23369 static rb_parser_string_t *
23370 rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
23371 {
23372  rb_parser_string_t *copy;
23373  if (!orig) return NULL;
23374  copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
23375  copy->coderange = orig->coderange;
23376  copy->enc = orig->enc;
23377  return copy;
23378 }
23379 #endif
23380 
23381 /* concat two string literals */
23382 static NODE *
23383 literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
23384 {
23385  enum node_type htype;
23386  rb_parser_string_t *lit;
23387 
23388  if (!head) return tail;
23389  if (!tail) return head;
23390 
23391  htype = nd_type(head);
23392  if (htype == NODE_EVSTR) {
23393  head = new_dstr(p, head, loc);
23394  htype = NODE_DSTR;
23395  }
23396  if (p->heredoc_indent > 0) {
23397  switch (htype) {
23398  case NODE_STR:
23399  head = str2dstr(p, head);
23400  case NODE_DSTR:
23401  return list_append(p, head, tail);
23402  default:
23403  break;
23404  }
23405  }
23406  switch (nd_type(tail)) {
23407  case NODE_STR:
23408  if ((lit = string_literal_head(p, htype, head)) != false) {
23409  htype = NODE_STR;
23410  }
23411  else {
23412  lit = RNODE_DSTR(head)->string;
23413  }
23414  if (htype == NODE_STR) {
23415  if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
23416  error:
23417  rb_discard_node(p, head);
23418  rb_discard_node(p, tail);
23419  return 0;
23420  }
23421  rb_discard_node(p, tail);
23422  }
23423  else {
23424  list_append(p, head, tail);
23425  }
23426  break;
23427 
23428  case NODE_DSTR:
23429  if (htype == NODE_STR) {
23430  if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
23431  goto error;
23432  rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23433  RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
23434  RNODE_STR(head)->string = NULL;
23435  rb_discard_node(p, head);
23436  head = tail;
23437  }
23438  else if (!RNODE_DSTR(tail)->string) {
23439  append:
23440  RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
23441  if (!RNODE_DSTR(head)->nd_next) {
23442  RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
23443  }
23444  else if (RNODE_DSTR(tail)->nd_next) {
23445  RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
23446  RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
23447  }
23448  rb_discard_node(p, tail);
23449  }
23450  else if ((lit = string_literal_head(p, htype, head)) != false) {
23451  if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
23452  goto error;
23453  rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23454  RNODE_DSTR(tail)->string = 0;
23455  goto append;
23456  }
23457  else {
23458  list_concat(head, NEW_LIST2(NEW_STR(RNODE_DSTR(tail)->string, loc), RNODE_DSTR(tail)->as.nd_alen, (NODE *)RNODE_DSTR(tail)->nd_next, loc));
23459  RNODE_DSTR(tail)->string = 0;
23460  }
23461  break;
23462 
23463  case NODE_EVSTR:
23464  if (htype == NODE_STR) {
23465  head = str2dstr(p, head);
23466  RNODE_DSTR(head)->as.nd_alen = 1;
23467  }
23468  list_append(p, head, tail);
23469  break;
23470  }
23471  return head;
23472 }
23473 
23474 static void
23475 nd_copy_flag(NODE *new_node, NODE *old_node)
23476 {
23477  if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
23478  nd_set_line(new_node, nd_line(old_node));
23479  new_node->nd_loc = old_node->nd_loc;
23480  new_node->node_id = old_node->node_id;
23481 }
23482 
23483 static NODE *
23484 str2dstr(struct parser_params *p, NODE *node)
23485 {
23486  NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
23487  nd_copy_flag(new_node, node);
23488  RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
23489  RNODE_DSTR(new_node)->as.nd_alen = 0;
23490  RNODE_DSTR(new_node)->nd_next = 0;
23491  RNODE_STR(node)->string = 0;
23492 
23493  return new_node;
23494 }
23495 
23496 static NODE *
23497 str2regx(struct parser_params *p, NODE *node, int options)
23498 {
23499  NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
23500  nd_copy_flag(new_node, node);
23501  RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
23502  RNODE_REGX(new_node)->options = options;
23503  RNODE_STR(node)->string = 0;
23504 
23505  return new_node;
23506 }
23507 
23508 static NODE *
23509 evstr2dstr(struct parser_params *p, NODE *node)
23510 {
23511  if (nd_type_p(node, NODE_EVSTR)) {
23512  node = new_dstr(p, node, &node->nd_loc);
23513  }
23514  return node;
23515 }
23516 
23517 static NODE *
23518 new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
23519 {
23520  NODE *head = node;
23521 
23522  if (node) {
23523  switch (nd_type(node)) {
23524  case NODE_STR:
23525  return str2dstr(p, node);
23526  case NODE_DSTR:
23527  break;
23528  case NODE_EVSTR:
23529  return node;
23530  }
23531  }
23532  return NEW_EVSTR(head, loc);
23533 }
23534 
23535 static NODE *
23536 new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
23537 {
23538  NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
23539  return list_append(p, dstr, node);
23540 }
23541 
23542 static NODE *
23543 call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
23544  const YYLTYPE *op_loc, const YYLTYPE *loc)
23545 {
23546  NODE *expr;
23547  value_expr(recv);
23548  value_expr(arg1);
23549  expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
23550  nd_set_line(expr, op_loc->beg_pos.lineno);
23551  return expr;
23552 }
23553 
23554 static NODE *
23555 call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
23556 {
23557  NODE *opcall;
23558  value_expr(recv);
23559  opcall = NEW_OPCALL(recv, id, 0, loc);
23560  nd_set_line(opcall, op_loc->beg_pos.lineno);
23561  return opcall;
23562 }
23563 
23564 static NODE *
23565 new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
23566 {
23567  NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
23568  nd_set_line(qcall, op_loc->beg_pos.lineno);
23569  return qcall;
23570 }
23571 
23572 static NODE*
23573 new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
23574 {
23575  NODE *ret;
23576  if (block) block_dup_check(p, args, block);
23577  ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
23578  if (block) ret = method_add_block(p, ret, block, loc);
23579  fixpos(ret, recv);
23580  return ret;
23581 }
23582 
23583 #define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
23584 
23585 static NODE*
23586 last_expr_once_body(NODE *node)
23587 {
23588  if (!node) return 0;
23589  return nd_once_body(node);
23590 }
23591 
23592 static NODE*
23593 match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
23594 {
23595  NODE *n;
23596  int line = op_loc->beg_pos.lineno;
23597 
23598  value_expr(node1);
23599  value_expr(node2);
23600 
23601  if ((n = last_expr_once_body(node1)) != 0) {
23602  switch (nd_type(n)) {
23603  case NODE_DREGX:
23604  {
23605  NODE *match = NEW_MATCH2(node1, node2, loc);
23606  nd_set_line(match, line);
23607  return match;
23608  }
23609 
23610  case NODE_REGX:
23611  {
23612  const VALUE lit = rb_node_regx_string_val(n);
23613  if (!NIL_P(lit)) {
23614  NODE *match = NEW_MATCH2(node1, node2, loc);
23615  RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc);
23616  nd_set_line(match, line);
23617  return match;
23618  }
23619  }
23620  }
23621  }
23622 
23623  if ((n = last_expr_once_body(node2)) != 0) {
23624  NODE *match3;
23625 
23626  switch (nd_type(n)) {
23627  case NODE_DREGX:
23628  match3 = NEW_MATCH3(node2, node1, loc);
23629  return match3;
23630  }
23631  }
23632 
23633  n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
23634  nd_set_line(n, line);
23635  return n;
23636 }
23637 
23638 # if WARN_PAST_SCOPE
23639 static int
23640 past_dvar_p(struct parser_params *p, ID id)
23641 {
23642  struct vtable *past = p->lvtbl->past;
23643  while (past) {
23644  if (vtable_included(past, id)) return 1;
23645  past = past->prev;
23646  }
23647  return 0;
23648 }
23649 # endif
23650 
23651 static int
23652 numparam_nested_p(struct parser_params *p)
23653 {
23654  struct local_vars *local = p->lvtbl;
23655  NODE *outer = local->numparam.outer;
23656  NODE *inner = local->numparam.inner;
23657  if (outer || inner) {
23658  NODE *used = outer ? outer : inner;
23659  compile_error(p, "numbered parameter is already used in\n"
23660  "%s:%d: %s block here",
23661  p->ruby_sourcefile, nd_line(used),
23662  outer ? "outer" : "inner");
23663  parser_show_error_line(p, &used->nd_loc);
23664  return 1;
23665  }
23666  return 0;
23667 }
23668 
23669 static int
23670 numparam_used_p(struct parser_params *p)
23671 {
23672  NODE *numparam = p->lvtbl->numparam.current;
23673  if (numparam) {
23674  compile_error(p, "numbered parameter is already used in\n"
23675  "%s:%d: current block here",
23676  p->ruby_sourcefile, nd_line(numparam));
23677  parser_show_error_line(p, &numparam->nd_loc);
23678  return 1;
23679  }
23680  return 0;
23681 }
23682 
23683 static int
23684 it_used_p(struct parser_params *p)
23685 {
23686  NODE *it = p->lvtbl->it;
23687  if (it) {
23688  compile_error(p, "'it' is already used in\n"
23689  "%s:%d: current block here",
23690  p->ruby_sourcefile, nd_line(it));
23691  parser_show_error_line(p, &it->nd_loc);
23692  return 1;
23693  }
23694  return 0;
23695 }
23696 
23697 static NODE*
23698 gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
23699 {
23700  ID *vidp = NULL;
23701  NODE *node;
23702  switch (id) {
23703  case keyword_self:
23704  return NEW_SELF(loc);
23705  case keyword_nil:
23706  return NEW_NIL(loc);
23707  case keyword_true:
23708  return NEW_TRUE(loc);
23709  case keyword_false:
23710  return NEW_FALSE(loc);
23711  case keyword__FILE__:
23712  {
23713  VALUE file = p->ruby_sourcefile_string;
23714  if (NIL_P(file))
23715  file = rb_str_new(0, 0);
23716  node = NEW_FILE(file, loc);
23717  }
23718  return node;
23719  case keyword__LINE__:
23720  return NEW_LINE(loc);
23721  case keyword__ENCODING__:
23722  return NEW_ENCODING(loc);
23723 
23724  }
23725  switch (id_type(id)) {
23726  case ID_LOCAL:
23727  if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
23728  if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
23729  if (vidp) *vidp |= LVAR_USED;
23730  node = NEW_DVAR(id, loc);
23731  return node;
23732  }
23733  if (local_id_ref(p, id, &vidp)) {
23734  if (vidp) *vidp |= LVAR_USED;
23735  node = NEW_LVAR(id, loc);
23736  return node;
23737  }
23738  if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
23739  parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
23740  if (numparam_nested_p(p) || it_used_p(p)) return 0;
23741  node = NEW_DVAR(id, loc);
23742  struct local_vars *local = p->lvtbl;
23743  if (!local->numparam.current) local->numparam.current = node;
23744  return node;
23745  }
23746 # if WARN_PAST_SCOPE
23747  if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
23748  rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
23749  }
23750 # endif
23751  /* method call without arguments */
23752  if (dyna_in_block(p) && id == rb_intern("it") && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
23753  if (numparam_used_p(p)) return 0;
23754  if (p->max_numparam == ORDINAL_PARAM) {
23755  compile_error(p, "ordinary parameter is defined");
23756  return 0;
23757  }
23758  if (!p->it_id) {
23759  p->it_id = internal_id(p);
23760  vtable_add(p->lvtbl->args, p->it_id);
23761  }
23762  NODE *node = NEW_DVAR(p->it_id, loc);
23763  if (!p->lvtbl->it) p->lvtbl->it = node;
23764  return node;
23765  }
23766  return NEW_VCALL(id, loc);
23767  case ID_GLOBAL:
23768  return NEW_GVAR(id, loc);
23769  case ID_INSTANCE:
23770  return NEW_IVAR(id, loc);
23771  case ID_CONST:
23772  return NEW_CONST(id, loc);
23773  case ID_CLASS:
23774  return NEW_CVAR(id, loc);
23775  }
23776  compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
23777  return 0;
23778 }
23779 
23780 static rb_node_opt_arg_t *
23781 opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
23782 {
23783  rb_node_opt_arg_t *opts = opt_list;
23784  RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
23785 
23786  while (opts->nd_next) {
23787  opts = opts->nd_next;
23788  RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
23789  }
23790  opts->nd_next = opt;
23791 
23792  return opt_list;
23793 }
23794 
23795 static rb_node_kw_arg_t *
23796 kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
23797 {
23798  if (kwlist) {
23799  /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
23800  opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
23801  }
23802  return kwlist;
23803 }
23804 
23805 static NODE *
23806 new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
23807 {
23808  NODE *n = expr;
23809  while (n) {
23810  if (nd_type_p(n, NODE_BEGIN)) {
23811  n = RNODE_BEGIN(n)->nd_body;
23812  }
23813  else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
23814  n = RNODE_BLOCK(n)->nd_head;
23815  }
23816  else {
23817  break;
23818  }
23819  }
23820  return NEW_DEFINED(n, loc);
23821 }
23822 
23823 static NODE*
23824 str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
23825 {
23826  VALUE lit;
23827  rb_parser_string_t *str = RNODE_STR(node)->string;
23828  if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
23829  yyerror1(loc, "invalid symbol");
23830  lit = STR_NEW0();
23831  }
23832  else {
23833  lit = rb_str_new_parser_string(str);
23834  }
23835  return NEW_SYM(lit, loc);
23836 }
23837 
23838 static NODE*
23839 symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
23840 {
23841  enum node_type type = nd_type(symbol);
23842  switch (type) {
23843  case NODE_DSTR:
23844  nd_set_type(symbol, NODE_DSYM);
23845  break;
23846  case NODE_STR:
23847  symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
23848  break;
23849  default:
23850  compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
23851  }
23852  return list_append(p, symbols, symbol);
23853 }
23854 
23855 static NODE *
23856 new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
23857 {
23858  struct RNode_LIST *list;
23859  NODE *prev;
23860 
23861  if (!node) {
23862  /* Check string is valid regex */
23863  rb_parser_string_t *str = STRING_NEW0();
23864  reg_compile(p, str, options);
23865  node = NEW_REGX(str, options, loc);
23866  return node;
23867  }
23868  switch (nd_type(node)) {
23869  case NODE_STR:
23870  {
23871  /* Check string is valid regex */
23872  reg_compile(p, RNODE_STR(node)->string, options);
23873  node = str2regx(p, node, options);
23874  }
23875  break;
23876  default:
23877  node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
23878  /* fall through */
23879  case NODE_DSTR:
23880  nd_set_type(node, NODE_DREGX);
23881  nd_set_loc(node, loc);
23882  rb_node_dregx_t *const dreg = RNODE_DREGX(node);
23883  dreg->as.nd_cflag = options & RE_OPTION_MASK;
23884  if (dreg->string) reg_fragment_check(p, dreg->string, options);
23885  prev = node;
23886  for (list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
23887  NODE *frag = list->nd_head;
23888  enum node_type type = nd_type(frag);
23889  if (type == NODE_STR || (type == NODE_DSTR && !RNODE_DSTR(frag)->nd_next)) {
23890  rb_parser_string_t *tail = RNODE_STR(frag)->string;
23891  if (reg_fragment_check(p, tail, options) && prev && RNODE_DREGX(prev)->string) {
23892  rb_parser_string_t *lit = prev == node ? dreg->string : RNODE_STR(RNODE_LIST(prev)->nd_head)->string;
23893  if (!literal_concat0(p, lit, tail)) {
23894  return NEW_NIL(loc); /* dummy node on error */
23895  }
23896  rb_parser_str_resize(p, tail, 0);
23897  RNODE_LIST(prev)->nd_next = list->nd_next;
23898  rb_discard_node(p, list->nd_head);
23899  rb_discard_node(p, (NODE *)list);
23900  list = RNODE_LIST(prev);
23901  }
23902  else {
23903  prev = (NODE *)list;
23904  }
23905  }
23906  else {
23907  prev = 0;
23908  }
23909  }
23910  if (!dreg->nd_next) {
23911  /* Check string is valid regex */
23912  reg_compile(p, dreg->string, options);
23913  }
23914  if (options & RE_OPTION_ONCE) {
23915  node = NEW_ONCE(node, loc);
23916  }
23917  break;
23918  }
23919  return node;
23920 }
23921 
23922 static rb_node_kw_arg_t *
23923 new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
23924 {
23925  if (!k) return 0;
23926  return NEW_KW_ARG((k), loc);
23927 }
23928 
23929 static NODE *
23930 new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
23931 {
23932  if (!node) {
23933  NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
23934  return xstr;
23935  }
23936  switch (nd_type(node)) {
23937  case NODE_STR:
23938  nd_set_type(node, NODE_XSTR);
23939  nd_set_loc(node, loc);
23940  break;
23941  case NODE_DSTR:
23942  nd_set_type(node, NODE_DXSTR);
23943  nd_set_loc(node, loc);
23944  break;
23945  default:
23946  node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
23947  break;
23948  }
23949  return node;
23950 }
23951 
23952 static const
23953 struct st_hash_type literal_type = {
23954  literal_cmp,
23955  literal_hash,
23956 };
23957 
23958 static int nd_type_st_key_enable_p(NODE *node);
23959 
23960 static void
23961 check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
23962 {
23963  /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
23964  if (!arg || !p->case_labels) return;
23965  if (!nd_type_st_key_enable_p(arg)) return;
23966 
23967  if (p->case_labels == CHECK_LITERAL_WHEN) {
23968  p->case_labels = st_init_table(&literal_type);
23969  }
23970  else {
23971  st_data_t line;
23972  if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
23973  rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
23974  WARN_I((int)nd_line(arg)), WARN_I((int)line));
23975  return;
23976  }
23977  }
23978  st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
23979 }
23980 
23981 #ifdef RIPPER
23982 static int
23983 id_is_var(struct parser_params *p, ID id)
23984 {
23985  if (is_notop_id(id)) {
23986  switch (id & ID_SCOPE_MASK) {
23987  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
23988  return 1;
23989  case ID_LOCAL:
23990  if (dyna_in_block(p)) {
23991  if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
23992  }
23993  if (local_id(p, id)) return 1;
23994  /* method call without arguments */
23995  return 0;
23996  }
23997  }
23998  compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
23999  return 0;
24000 }
24001 #endif
24002 
24003 static inline enum lex_state_e
24004 parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24005 {
24006  if (p->debug) {
24007  ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24008  }
24009  return p->lex.state = ls;
24010 }
24011 
24012 #ifndef RIPPER
24013 static void
24014 flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24015 {
24016  VALUE mesg = p->debug_buffer;
24017 
24018  if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24019  p->debug_buffer = Qnil;
24020  rb_io_puts(1, &mesg, out);
24021  }
24022  if (!NIL_P(str) && RSTRING_LEN(str)) {
24023  rb_io_write(p->debug_output, str);
24024  }
24025 }
24026 
24027 static const char rb_parser_lex_state_names[][8] = {
24028  "BEG", "END", "ENDARG", "ENDFN", "ARG",
24029  "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24030  "LABEL", "LABELED","FITEM",
24031 };
24032 
24033 static VALUE
24034 append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24035 {
24036  int i, sep = 0;
24037  unsigned int mask = 1;
24038  static const char none[] = "NONE";
24039 
24040  for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24041  if ((unsigned)state & mask) {
24042  if (sep) {
24043  rb_str_cat(buf, "|", 1);
24044  }
24045  sep = 1;
24046  rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24047  }
24048  }
24049  if (!sep) {
24050  rb_str_cat(buf, none, sizeof(none)-1);
24051  }
24052  return buf;
24053 }
24054 
24055 enum lex_state_e
24056 rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24057  enum lex_state_e to, int line)
24058 {
24059  VALUE mesg;
24060  mesg = rb_str_new_cstr("lex_state: ");
24061  append_lex_state_name(p, from, mesg);
24062  rb_str_cat_cstr(mesg, " -> ");
24063  append_lex_state_name(p, to, mesg);
24064  rb_str_catf(mesg, " at line %d\n", line);
24065  flush_debug_buffer(p, p->debug_output, mesg);
24066  return to;
24067 }
24068 
24069 VALUE
24070 rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24071 {
24072  return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24073 }
24074 
24075 static void
24076 append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24077 {
24078  if (stack == 0) {
24079  rb_str_cat_cstr(mesg, "0");
24080  }
24081  else {
24082  stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24083  for (; mask && !(stack & mask); mask >>= 1) continue;
24084  for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24085  }
24086 }
24087 
24088 void
24089 rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24090  const char *name, int line)
24091 {
24092  VALUE mesg = rb_sprintf("%s: ", name);
24093  append_bitstack_value(p, stack, mesg);
24094  rb_str_catf(mesg, " at line %d\n", line);
24095  flush_debug_buffer(p, p->debug_output, mesg);
24096 }
24097 
24098 void
24099 rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24100 {
24101  va_list ap;
24102  VALUE mesg = rb_str_new_cstr("internal parser error: ");
24103 
24104  va_start(ap, fmt);
24105  rb_str_vcatf(mesg, fmt, ap);
24106  va_end(ap);
24107  yyerror0(RSTRING_PTR(mesg));
24108  RB_GC_GUARD(mesg);
24109 
24110  mesg = rb_str_new(0, 0);
24111  append_lex_state_name(p, p->lex.state, mesg);
24112  compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24113  rb_str_resize(mesg, 0);
24114  append_bitstack_value(p, p->cond_stack, mesg);
24115  compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24116  rb_str_resize(mesg, 0);
24117  append_bitstack_value(p, p->cmdarg_stack, mesg);
24118  compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24119  if (p->debug_output == rb_ractor_stdout())
24120  p->debug_output = rb_ractor_stderr();
24121  p->debug = TRUE;
24122 }
24123 
24124 static YYLTYPE *
24125 rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24126 {
24127  yylloc->beg_pos.lineno = sourceline;
24128  yylloc->beg_pos.column = beg_pos;
24129  yylloc->end_pos.lineno = sourceline;
24130  yylloc->end_pos.column = end_pos;
24131  return yylloc;
24132 }
24133 
24134 YYLTYPE *
24135 rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24136 {
24137  int sourceline = here->sourceline;
24138  int beg_pos = (int)here->offset - here->quote
24139  - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24140  int end_pos = (int)here->offset + here->length + here->quote;
24141 
24142  return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24143 }
24144 
24145 YYLTYPE *
24146 rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24147 {
24148  yylloc->beg_pos.lineno = p->delayed.beg_line;
24149  yylloc->beg_pos.column = p->delayed.beg_col;
24150  yylloc->end_pos.lineno = p->delayed.end_line;
24151  yylloc->end_pos.column = p->delayed.end_col;
24152 
24153  return yylloc;
24154 }
24155 
24156 YYLTYPE *
24157 rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24158 {
24159  int sourceline = p->ruby_sourceline;
24160  int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24161  int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24162  return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24163 }
24164 
24165 YYLTYPE *
24166 rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24167 {
24168  yylloc->end_pos = yylloc->beg_pos;
24169 
24170  return yylloc;
24171 }
24172 
24173 YYLTYPE *
24174 rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24175 {
24176  int sourceline = p->ruby_sourceline;
24177  int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24178  int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24179  return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24180 }
24181 
24182 YYLTYPE *
24183 rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24184 {
24185  int sourceline = p->ruby_sourceline;
24186  int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24187  int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24188  return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24189 }
24190 #endif /* !RIPPER */
24191 
24192 static int
24193 assignable0(struct parser_params *p, ID id, const char **err)
24194 {
24195  if (!id) return -1;
24196  switch (id) {
24197  case keyword_self:
24198  *err = "Can't change the value of self";
24199  return -1;
24200  case keyword_nil:
24201  *err = "Can't assign to nil";
24202  return -1;
24203  case keyword_true:
24204  *err = "Can't assign to true";
24205  return -1;
24206  case keyword_false:
24207  *err = "Can't assign to false";
24208  return -1;
24209  case keyword__FILE__:
24210  *err = "Can't assign to __FILE__";
24211  return -1;
24212  case keyword__LINE__:
24213  *err = "Can't assign to __LINE__";
24214  return -1;
24215  case keyword__ENCODING__:
24216  *err = "Can't assign to __ENCODING__";
24217  return -1;
24218  }
24219  switch (id_type(id)) {
24220  case ID_LOCAL:
24221  if (dyna_in_block(p)) {
24222  if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24223  compile_error(p, "Can't assign to numbered parameter _%d",
24224  NUMPARAM_ID_TO_IDX(id));
24225  return -1;
24226  }
24227  if (dvar_curr(p, id)) return NODE_DASGN;
24228  if (dvar_defined(p, id)) return NODE_DASGN;
24229  if (local_id(p, id)) return NODE_LASGN;
24230  dyna_var(p, id);
24231  return NODE_DASGN;
24232  }
24233  else {
24234  if (!local_id(p, id)) local_var(p, id);
24235  return NODE_LASGN;
24236  }
24237  break;
24238  case ID_GLOBAL: return NODE_GASGN;
24239  case ID_INSTANCE: return NODE_IASGN;
24240  case ID_CONST:
24241  if (!p->ctxt.in_def) return NODE_CDECL;
24242  *err = "dynamic constant assignment";
24243  return -1;
24244  case ID_CLASS: return NODE_CVASGN;
24245  default:
24246  compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24247  }
24248  return -1;
24249 }
24250 
24251 static NODE*
24252 assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24253 {
24254  const char *err = 0;
24255  int node_type = assignable0(p, id, &err);
24256  switch (node_type) {
24257  case NODE_DASGN: return NEW_DASGN(id, val, loc);
24258  case NODE_LASGN: return NEW_LASGN(id, val, loc);
24259  case NODE_GASGN: return NEW_GASGN(id, val, loc);
24260  case NODE_IASGN: return NEW_IASGN(id, val, loc);
24261  case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24262  case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24263  }
24264 /* TODO: FIXME */
24265 #ifndef RIPPER
24266  if (err) yyerror1(loc, err);
24267 #else
24268  if (err) set_value(assign_error(p, err, p->s_lvalue));
24269 #endif
24270  return NEW_ERROR(loc);
24271 }
24272 
24273 static int
24274 is_private_local_id(struct parser_params *p, ID name)
24275 {
24276  VALUE s;
24277  if (name == idUScore) return 1;
24278  if (!is_local_id(name)) return 0;
24279  s = rb_id2str(name);
24280  if (!s) return 0;
24281  return RSTRING_PTR(s)[0] == '_';
24282 }
24283 
24284 static int
24285 shadowing_lvar_0(struct parser_params *p, ID name)
24286 {
24287  if (dyna_in_block(p)) {
24288  if (dvar_curr(p, name)) {
24289  if (is_private_local_id(p, name)) return 1;
24290  yyerror0("duplicated argument name");
24291  }
24292  else if (dvar_defined(p, name) || local_id(p, name)) {
24293  vtable_add(p->lvtbl->vars, name);
24294  if (p->lvtbl->used) {
24295  vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24296  }
24297  return 0;
24298  }
24299  }
24300  else {
24301  if (local_id(p, name)) {
24302  if (is_private_local_id(p, name)) return 1;
24303  yyerror0("duplicated argument name");
24304  }
24305  }
24306  return 1;
24307 }
24308 
24309 static ID
24310 shadowing_lvar(struct parser_params *p, ID name)
24311 {
24312  shadowing_lvar_0(p, name);
24313  return name;
24314 }
24315 
24316 static void
24317 new_bv(struct parser_params *p, ID name)
24318 {
24319  if (!name) return;
24320  if (!is_local_id(name)) {
24321  compile_error(p, "invalid local variable - %"PRIsVALUE,
24322  rb_id2str(name));
24323  return;
24324  }
24325  if (!shadowing_lvar_0(p, name)) return;
24326  dyna_var(p, name);
24327  ID *vidp = 0;
24328  if (dvar_defined_ref(p, name, &vidp)) {
24329  if (vidp) *vidp |= LVAR_USED;
24330  }
24331 }
24332 
24333 static void
24334 aryset_check(struct parser_params *p, NODE *args)
24335 {
24336  NODE *block = 0, *kwds = 0;
24337  if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
24338  block = RNODE_BLOCK_PASS(args)->nd_body;
24339  args = RNODE_BLOCK_PASS(args)->nd_head;
24340  }
24341  if (args && nd_type_p(args, NODE_ARGSCAT)) {
24342  args = RNODE_ARGSCAT(args)->nd_body;
24343  }
24344  if (args && nd_type_p(args, NODE_ARGSPUSH)) {
24345  kwds = RNODE_ARGSPUSH(args)->nd_body;
24346  }
24347  else {
24348  for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
24349  next = RNODE_LIST(next)->nd_next) {
24350  kwds = RNODE_LIST(next)->nd_head;
24351  }
24352  }
24353  if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
24354  yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
24355  }
24356  if (block) {
24357  yyerror1(&block->nd_loc, "block arg given in index assignment");
24358  }
24359 }
24360 
24361 static NODE *
24362 aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
24363 {
24364  aryset_check(p, idx);
24365  return NEW_ATTRASGN(recv, tASET, idx, loc);
24366 }
24367 
24368 static void
24369 block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
24370 {
24371  if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
24372  compile_error(p, "both block arg and actual block given");
24373  }
24374 }
24375 
24376 static NODE *
24377 attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
24378 {
24379  if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
24380  return NEW_ATTRASGN(recv, id, 0, loc);
24381 }
24382 
24383 static VALUE
24384 rb_backref_error(struct parser_params *p, NODE *node)
24385 {
24386 #ifndef RIPPER
24387 # define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
24388 #else
24389 # define ERR(...) rb_sprintf(__VA_ARGS__)
24390 #endif
24391  switch (nd_type(node)) {
24392  case NODE_NTH_REF:
24393  return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
24394  case NODE_BACK_REF:
24395  return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
24396  }
24397 #undef ERR
24398  UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
24399 }
24400 
24401 static NODE *
24402 arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24403 {
24404  if (!node1) return NEW_LIST(node2, &node2->nd_loc);
24405  switch (nd_type(node1)) {
24406  case NODE_LIST:
24407  return list_append(p, node1, node2);
24408  case NODE_BLOCK_PASS:
24409  RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24410  node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
24411  return node1;
24412  case NODE_ARGSPUSH:
24413  RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
24414  node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
24415  nd_set_type(node1, NODE_ARGSCAT);
24416  return node1;
24417  case NODE_ARGSCAT:
24418  if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24419  RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
24420  node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
24421  return node1;
24422  }
24423  return NEW_ARGSPUSH(node1, node2, loc);
24424 }
24425 
24426 static NODE *
24427 arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24428 {
24429  if (!node2) return node1;
24430  switch (nd_type(node1)) {
24431  case NODE_BLOCK_PASS:
24432  if (RNODE_BLOCK_PASS(node1)->nd_head)
24433  RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24434  else
24435  RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
24436  return node1;
24437  case NODE_ARGSPUSH:
24438  if (!nd_type_p(node2, NODE_LIST)) break;
24439  RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
24440  nd_set_type(node1, NODE_ARGSCAT);
24441  return node1;
24442  case NODE_ARGSCAT:
24443  if (!nd_type_p(node2, NODE_LIST) ||
24444  !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24445  RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
24446  return node1;
24447  }
24448  return NEW_ARGSCAT(node1, node2, loc);
24449 }
24450 
24451 static NODE *
24452 last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
24453 {
24454  NODE *n1;
24455  if ((n1 = splat_array(args)) != 0) {
24456  return list_append(p, n1, last_arg);
24457  }
24458  return arg_append(p, args, last_arg, loc);
24459 }
24460 
24461 static NODE *
24462 rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
24463 {
24464  NODE *n1;
24465  if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
24466  return list_concat(n1, rest_arg);
24467  }
24468  return arg_concat(p, args, rest_arg, loc);
24469 }
24470 
24471 static NODE *
24472 splat_array(NODE* node)
24473 {
24474  if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
24475  if (nd_type_p(node, NODE_LIST)) return node;
24476  return 0;
24477 }
24478 
24479 static void
24480 mark_lvar_used(struct parser_params *p, NODE *rhs)
24481 {
24482  ID *vidp = NULL;
24483  if (!rhs) return;
24484  switch (nd_type(rhs)) {
24485  case NODE_LASGN:
24486  if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
24487  if (vidp) *vidp |= LVAR_USED;
24488  }
24489  break;
24490  case NODE_DASGN:
24491  if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
24492  if (vidp) *vidp |= LVAR_USED;
24493  }
24494  break;
24495 #if 0
24496  case NODE_MASGN:
24497  for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
24498  mark_lvar_used(p, rhs->nd_head);
24499  }
24500  break;
24501 #endif
24502  }
24503 }
24504 
24505 static int is_static_content(NODE *node);
24506 
24507 static NODE *
24508 node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
24509 {
24510  if (!lhs) return 0;
24511 
24512  switch (nd_type(lhs)) {
24513  case NODE_CDECL:
24514  case NODE_GASGN:
24515  case NODE_IASGN:
24516  case NODE_LASGN:
24517  case NODE_DASGN:
24518  case NODE_MASGN:
24519  case NODE_CVASGN:
24520  set_nd_value(p, lhs, rhs);
24521  nd_set_loc(lhs, loc);
24522  break;
24523 
24524  case NODE_ATTRASGN:
24525  RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
24526  nd_set_loc(lhs, loc);
24527  break;
24528 
24529  default:
24530  /* should not happen */
24531  break;
24532  }
24533 
24534  return lhs;
24535 }
24536 
24537 static NODE *
24538 value_expr_check(struct parser_params *p, NODE *node)
24539 {
24540  NODE *void_node = 0, *vn;
24541 
24542  if (!node) {
24543  rb_warning0("empty expression");
24544  }
24545  while (node) {
24546  switch (nd_type(node)) {
24547  case NODE_ENSURE:
24548  vn = RNODE_ENSURE(node)->nd_head;
24549  node = RNODE_ENSURE(node)->nd_ensr;
24550  /* nd_ensr should not be NULL, check it out next */
24551  if (vn && (vn = value_expr_check(p, vn))) {
24552  goto found;
24553  }
24554  break;
24555 
24556  case NODE_RESCUE:
24557  /* void only if all children are void */
24558  vn = RNODE_RESCUE(node)->nd_head;
24559  if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
24560  if (!void_node) void_node = vn;
24561  for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
24562  if (!nd_type_p(r, NODE_RESBODY)) {
24563  compile_error(p, "unexpected node");
24564  return NULL;
24565  }
24566  if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
24567  void_node = 0;
24568  break;
24569  }
24570  if (!void_node) void_node = vn;
24571  }
24572  node = RNODE_RESCUE(node)->nd_else;
24573  if (!node) return void_node;
24574  break;
24575 
24576  case NODE_RETURN:
24577  case NODE_BREAK:
24578  case NODE_NEXT:
24579  case NODE_REDO:
24580  case NODE_RETRY:
24581  goto found;
24582 
24583  case NODE_CASE3:
24584  if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
24585  compile_error(p, "unexpected node");
24586  return NULL;
24587  }
24588  if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
24589  return NULL;
24590  }
24591  /* single line pattern matching with "=>" operator */
24592  goto found;
24593 
24594  case NODE_BLOCK:
24595  while (RNODE_BLOCK(node)->nd_next) {
24596  node = RNODE_BLOCK(node)->nd_next;
24597  }
24598  node = RNODE_BLOCK(node)->nd_head;
24599  break;
24600 
24601  case NODE_BEGIN:
24602  node = RNODE_BEGIN(node)->nd_body;
24603  break;
24604 
24605  case NODE_IF:
24606  case NODE_UNLESS:
24607  if (!RNODE_IF(node)->nd_body) {
24608  return NULL;
24609  }
24610  else if (!RNODE_IF(node)->nd_else) {
24611  return NULL;
24612  }
24613  vn = value_expr_check(p, RNODE_IF(node)->nd_body);
24614  if (!vn) return NULL;
24615  if (!void_node) void_node = vn;
24616  node = RNODE_IF(node)->nd_else;
24617  break;
24618 
24619  case NODE_AND:
24620  case NODE_OR:
24621  node = RNODE_AND(node)->nd_1st;
24622  break;
24623 
24624  case NODE_LASGN:
24625  case NODE_DASGN:
24626  case NODE_MASGN:
24627  mark_lvar_used(p, node);
24628  return NULL;
24629 
24630  default:
24631  return NULL;
24632  }
24633  }
24634 
24635  return NULL;
24636 
24637  found:
24638  /* return the first found node */
24639  return void_node ? void_node : node;
24640 }
24641 
24642 static int
24643 value_expr_gen(struct parser_params *p, NODE *node)
24644 {
24645  NODE *void_node = value_expr_check(p, node);
24646  if (void_node) {
24647  yyerror1(&void_node->nd_loc, "void value expression");
24648  /* or "control never reach"? */
24649  return FALSE;
24650  }
24651  return TRUE;
24652 }
24653 
24654 static void
24655 void_expr(struct parser_params *p, NODE *node)
24656 {
24657  const char *useless = 0;
24658 
24659  if (!RTEST(ruby_verbose)) return;
24660 
24661  if (!node || !(node = nd_once_body(node))) return;
24662  switch (nd_type(node)) {
24663  case NODE_OPCALL:
24664  switch (RNODE_OPCALL(node)->nd_mid) {
24665  case '+':
24666  case '-':
24667  case '*':
24668  case '/':
24669  case '%':
24670  case tPOW:
24671  case tUPLUS:
24672  case tUMINUS:
24673  case '|':
24674  case '^':
24675  case '&':
24676  case tCMP:
24677  case '>':
24678  case tGEQ:
24679  case '<':
24680  case tLEQ:
24681  case tEQ:
24682  case tNEQ:
24683  useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
24684  break;
24685  }
24686  break;
24687 
24688  case NODE_LVAR:
24689  case NODE_DVAR:
24690  case NODE_GVAR:
24691  case NODE_IVAR:
24692  case NODE_CVAR:
24693  case NODE_NTH_REF:
24694  case NODE_BACK_REF:
24695  useless = "a variable";
24696  break;
24697  case NODE_CONST:
24698  useless = "a constant";
24699  break;
24700  case NODE_SYM:
24701  case NODE_LINE:
24702  case NODE_FILE:
24703  case NODE_ENCODING:
24704  case NODE_INTEGER:
24705  case NODE_FLOAT:
24706  case NODE_RATIONAL:
24707  case NODE_IMAGINARY:
24708  case NODE_STR:
24709  case NODE_DSTR:
24710  case NODE_REGX:
24711  case NODE_DREGX:
24712  useless = "a literal";
24713  break;
24714  case NODE_COLON2:
24715  case NODE_COLON3:
24716  useless = "::";
24717  break;
24718  case NODE_DOT2:
24719  useless = "..";
24720  break;
24721  case NODE_DOT3:
24722  useless = "...";
24723  break;
24724  case NODE_SELF:
24725  useless = "self";
24726  break;
24727  case NODE_NIL:
24728  useless = "nil";
24729  break;
24730  case NODE_TRUE:
24731  useless = "true";
24732  break;
24733  case NODE_FALSE:
24734  useless = "false";
24735  break;
24736  case NODE_DEFINED:
24737  useless = "defined?";
24738  break;
24739  }
24740 
24741  if (useless) {
24742  rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
24743  }
24744 }
24745 
24746 /* warns useless use of block and returns the last statement node */
24747 static NODE *
24748 void_stmts(struct parser_params *p, NODE *node)
24749 {
24750  NODE *const n = node;
24751  if (!RTEST(ruby_verbose)) return n;
24752  if (!node) return n;
24753  if (!nd_type_p(node, NODE_BLOCK)) return n;
24754 
24755  while (RNODE_BLOCK(node)->nd_next) {
24756  void_expr(p, RNODE_BLOCK(node)->nd_head);
24757  node = RNODE_BLOCK(node)->nd_next;
24758  }
24759  return RNODE_BLOCK(node)->nd_head;
24760 }
24761 
24762 static NODE *
24763 remove_begin(NODE *node)
24764 {
24765  NODE **n = &node, *n1 = node;
24766  while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
24767  *n = n1 = RNODE_BEGIN(n1)->nd_body;
24768  }
24769  return node;
24770 }
24771 
24772 static void
24773 reduce_nodes(struct parser_params *p, NODE **body)
24774 {
24775  NODE *node = *body;
24776 
24777  if (!node) {
24778  *body = NEW_NIL(&NULL_LOC);
24779  return;
24780  }
24781 #define subnodes(type, n1, n2) \
24782  ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
24783  (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
24784  (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
24785 
24786  while (node) {
24787  int newline = (int)nd_fl_newline(node);
24788  switch (nd_type(node)) {
24789  end:
24790  case NODE_NIL:
24791  *body = 0;
24792  return;
24793  case NODE_BEGIN:
24794  *body = node = RNODE_BEGIN(node)->nd_body;
24795  if (newline && node) nd_set_fl_newline(node);
24796  continue;
24797  case NODE_BLOCK:
24798  body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
24799  break;
24800  case NODE_IF:
24801  case NODE_UNLESS:
24802  if (subnodes(RNODE_IF, nd_body, nd_else)) break;
24803  return;
24804  case NODE_CASE:
24805  body = &RNODE_CASE(node)->nd_body;
24806  break;
24807  case NODE_WHEN:
24808  if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
24809  break;
24810  case NODE_ENSURE:
24811  body = &RNODE_ENSURE(node)->nd_head;
24812  break;
24813  case NODE_RESCUE:
24814  newline = 0; // RESBODY should not be a NEWLINE
24815  if (RNODE_RESCUE(node)->nd_else) {
24816  body = &RNODE_RESCUE(node)->nd_resq;
24817  break;
24818  }
24819  if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
24820  break;
24821  default:
24822  return;
24823  }
24824  node = *body;
24825  if (newline && node) nd_set_fl_newline(node);
24826  }
24827 
24828 #undef subnodes
24829 }
24830 
24831 static int
24832 is_static_content(NODE *node)
24833 {
24834  if (!node) return 1;
24835  switch (nd_type(node)) {
24836  case NODE_HASH:
24837  if (!(node = RNODE_HASH(node)->nd_head)) break;
24838  case NODE_LIST:
24839  do {
24840  if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
24841  } while ((node = RNODE_LIST(node)->nd_next) != 0);
24842  case NODE_SYM:
24843  case NODE_REGX:
24844  case NODE_LINE:
24845  case NODE_FILE:
24846  case NODE_ENCODING:
24847  case NODE_INTEGER:
24848  case NODE_FLOAT:
24849  case NODE_RATIONAL:
24850  case NODE_IMAGINARY:
24851  case NODE_STR:
24852  case NODE_NIL:
24853  case NODE_TRUE:
24854  case NODE_FALSE:
24855  case NODE_ZLIST:
24856  break;
24857  default:
24858  return 0;
24859  }
24860  return 1;
24861 }
24862 
24863 static int
24864 assign_in_cond(struct parser_params *p, NODE *node)
24865 {
24866  switch (nd_type(node)) {
24867  case NODE_MASGN:
24868  case NODE_LASGN:
24869  case NODE_DASGN:
24870  case NODE_GASGN:
24871  case NODE_IASGN:
24872  case NODE_CVASGN:
24873  case NODE_CDECL:
24874  break;
24875 
24876  default:
24877  return 0;
24878  }
24879 
24880  if (!get_nd_value(p, node)) return 1;
24881  if (is_static_content(get_nd_value(p, node))) {
24882  /* reports always */
24883  rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
24884  }
24885  return 1;
24886 }
24887 
24888 enum cond_type {
24889  COND_IN_OP,
24890  COND_IN_COND,
24891  COND_IN_FF
24892 };
24893 
24894 #define SWITCH_BY_COND_TYPE(t, w, arg) do { \
24895  switch (t) { \
24896  case COND_IN_OP: break; \
24897  case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
24898  case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
24899  } \
24900 } while (0)
24901 
24902 static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
24903 
24904 static NODE*
24905 range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24906 {
24907  enum node_type type;
24908 
24909  if (node == 0) return 0;
24910 
24911  type = nd_type(node);
24912  value_expr(node);
24913  if (type == NODE_INTEGER) {
24914  if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
24915  ID lineno = rb_intern("$.");
24916  return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
24917  }
24918  return cond0(p, node, COND_IN_FF, loc, true);
24919 }
24920 
24921 static NODE*
24922 cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
24923 {
24924  if (node == 0) return 0;
24925  if (!(node = nd_once_body(node))) return 0;
24926  assign_in_cond(p, node);
24927 
24928  switch (nd_type(node)) {
24929  case NODE_BEGIN:
24930  RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
24931  break;
24932 
24933  case NODE_DSTR:
24934  case NODE_EVSTR:
24935  case NODE_STR:
24936  case NODE_FILE:
24937  SWITCH_BY_COND_TYPE(type, warn, "string ");
24938  break;
24939 
24940  case NODE_REGX:
24941  if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
24942  nd_set_type(node, NODE_MATCH);
24943  break;
24944 
24945  case NODE_DREGX:
24946  if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
24947 
24948  return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
24949 
24950  case NODE_BLOCK:
24951  {
24952  NODE *end = RNODE_BLOCK(node)->nd_end;
24953  NODE **expr = &RNODE_BLOCK(end)->nd_head;
24954  if (top) top = node == end;
24955  *expr = cond0(p, *expr, type, loc, top);
24956  }
24957  break;
24958 
24959  case NODE_AND:
24960  case NODE_OR:
24961  RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
24962  RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
24963  break;
24964 
24965  case NODE_DOT2:
24966  case NODE_DOT3:
24967  if (!top) break;
24968  RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
24969  RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
24970  switch (nd_type(node)) {
24971  case NODE_DOT2:
24972  nd_set_type(node,NODE_FLIP2);
24973  rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
24974  (void)flip2;
24975  break;
24976  case NODE_DOT3:
24977  nd_set_type(node, NODE_FLIP3);
24978  rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
24979  (void)flip3;
24980  break;
24981  }
24982  break;
24983 
24984  case NODE_SYM:
24985  case NODE_DSYM:
24986  SWITCH_BY_COND_TYPE(type, warning, "symbol ");
24987  break;
24988 
24989  case NODE_LINE:
24990  SWITCH_BY_COND_TYPE(type, warning, "");
24991  break;
24992 
24993  case NODE_ENCODING:
24994  SWITCH_BY_COND_TYPE(type, warning, "");
24995  break;
24996 
24997  case NODE_INTEGER:
24998  case NODE_FLOAT:
24999  case NODE_RATIONAL:
25000  case NODE_IMAGINARY:
25001  SWITCH_BY_COND_TYPE(type, warning, "");
25002  break;
25003 
25004  default:
25005  break;
25006  }
25007  return node;
25008 }
25009 
25010 static NODE*
25011 cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25012 {
25013  if (node == 0) return 0;
25014  return cond0(p, node, COND_IN_COND, loc, true);
25015 }
25016 
25017 static NODE*
25018 method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25019 {
25020  if (node == 0) return 0;
25021  return cond0(p, node, COND_IN_OP, loc, true);
25022 }
25023 
25024 static NODE*
25025 new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25026 {
25027  YYLTYPE loc = {*pos, *pos};
25028  return NEW_NIL(&loc);
25029 }
25030 
25031 static NODE*
25032 new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
25033 {
25034  if (!cc) return right;
25035  cc = cond0(p, cc, COND_IN_COND, loc, true);
25036  return newline_node(NEW_IF(cc, left, right, loc));
25037 }
25038 
25039 static NODE*
25040 new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *end_keyword_loc)
25041 {
25042  if (!cc) return right;
25043  cc = cond0(p, cc, COND_IN_COND, loc, true);
25044  return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25045 }
25046 
25047 #define NEW_AND_OR(type, f, s, loc, op_loc) (type == NODE_AND ? NEW_AND(f,s,loc,op_loc) : NEW_OR(f,s,loc,op_loc))
25048 
25049 static NODE*
25050 logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25051  const YYLTYPE *op_loc, const YYLTYPE *loc)
25052 {
25053  enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25054  NODE *op;
25055  value_expr(left);
25056  if (left && nd_type_p(left, type)) {
25057  NODE *node = left, *second;
25058  while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25059  node = second;
25060  }
25061  RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25062  nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25063  left->nd_loc.end_pos = loc->end_pos;
25064  return left;
25065  }
25066  op = NEW_AND_OR(type, left, right, loc, op_loc);
25067  nd_set_line(op, op_loc->beg_pos.lineno);
25068  return op;
25069 }
25070 
25071 #undef NEW_AND_OR
25072 
25073 static void
25074 no_blockarg(struct parser_params *p, NODE *node)
25075 {
25076  if (nd_type_p(node, NODE_BLOCK_PASS)) {
25077  compile_error(p, "block argument should not be given");
25078  }
25079 }
25080 
25081 static NODE *
25082 ret_args(struct parser_params *p, NODE *node)
25083 {
25084  if (node) {
25085  no_blockarg(p, node);
25086  if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25087  node = RNODE_LIST(node)->nd_head;
25088  }
25089  }
25090  return node;
25091 }
25092 
25093 static NODE *
25094 new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25095 {
25096  if (node) no_blockarg(p, node);
25097 
25098  return NEW_YIELD(node, loc);
25099 }
25100 
25101 static NODE*
25102 negate_lit(struct parser_params *p, NODE* node)
25103 {
25104  switch (nd_type(node)) {
25105  case NODE_INTEGER:
25106  RNODE_INTEGER(node)->minus = TRUE;
25107  break;
25108  case NODE_FLOAT:
25109  RNODE_FLOAT(node)->minus = TRUE;
25110  break;
25111  case NODE_RATIONAL:
25112  RNODE_RATIONAL(node)->minus = TRUE;
25113  break;
25114  case NODE_IMAGINARY:
25115  RNODE_IMAGINARY(node)->minus = TRUE;
25116  break;
25117  }
25118  return node;
25119 }
25120 
25121 static NODE *
25122 arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25123 {
25124  if (node2) {
25125  if (!node1) return (NODE *)node2;
25126  node2->nd_head = node1;
25127  nd_set_first_lineno(node2, nd_first_lineno(node1));
25128  nd_set_first_column(node2, nd_first_column(node1));
25129  return (NODE *)node2;
25130  }
25131  return node1;
25132 }
25133 
25134 static bool
25135 args_info_empty_p(struct rb_args_info *args)
25136 {
25137  if (args->pre_args_num) return false;
25138  if (args->post_args_num) return false;
25139  if (args->rest_arg) return false;
25140  if (args->opt_args) return false;
25141  if (args->block_arg) return false;
25142  if (args->kw_args) return false;
25143  if (args->kw_rest_arg) return false;
25144  return true;
25145 }
25146 
25147 static rb_node_args_t *
25148 new_args(struct parser_params *p, rb_node_args_aux_t *pre_args, rb_node_opt_arg_t *opt_args, ID rest_arg, rb_node_args_aux_t *post_args, rb_node_args_t *tail, const YYLTYPE *loc)
25149 {
25150  struct rb_args_info *args = &tail->nd_ainfo;
25151 
25152  if (args->forwarding) {
25153  if (rest_arg) {
25154  yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25155  return tail;
25156  }
25157  rest_arg = idFWD_REST;
25158  }
25159 
25160  args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25161  args->pre_init = pre_args ? pre_args->nd_next : 0;
25162 
25163  args->post_args_num = post_args ? post_args->nd_plen : 0;
25164  args->post_init = post_args ? post_args->nd_next : 0;
25165  args->first_post_arg = post_args ? post_args->nd_pid : 0;
25166 
25167  args->rest_arg = rest_arg;
25168 
25169  args->opt_args = opt_args;
25170 
25171 #ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25172  args->ruby2_keywords = args->forwarding;
25173 #else
25174  args->ruby2_keywords = 0;
25175 #endif
25176 
25177  nd_set_loc(RNODE(tail), loc);
25178 
25179  return tail;
25180 }
25181 
25182 static rb_node_args_t *
25183 new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25184 {
25185  rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25186  struct rb_args_info *args = &node->nd_ainfo;
25187  if (p->error_p) return node;
25188 
25189  args->block_arg = block;
25190  args->kw_args = kw_args;
25191 
25192  if (kw_args) {
25193  /*
25194  * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25195  * variable order: k1, kr1, k2, &b, internal_id, krest
25196  * #=> <reorder>
25197  * variable order: kr1, k1, k2, internal_id, krest, &b
25198  */
25199  ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25200  struct vtable *vtargs = p->lvtbl->args;
25201  rb_node_kw_arg_t *kwn = kw_args;
25202 
25203  if (block) block = vtargs->tbl[vtargs->pos-1];
25204  vtable_pop(vtargs, !!block + !!kw_rest_arg);
25205  required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25206  while (kwn) {
25207  if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25208  --kw_vars;
25209  --required_kw_vars;
25210  kwn = kwn->nd_next;
25211  }
25212 
25213  for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25214  ID vid = get_nd_vid(p, kwn->nd_body);
25215  if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25216  *required_kw_vars++ = vid;
25217  }
25218  else {
25219  *kw_vars++ = vid;
25220  }
25221  }
25222 
25223  arg_var(p, kw_bits);
25224  if (kw_rest_arg) arg_var(p, kw_rest_arg);
25225  if (block) arg_var(p, block);
25226 
25227  args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25228  }
25229  else if (kw_rest_arg == idNil) {
25230  args->no_kwarg = 1;
25231  }
25232  else if (kw_rest_arg) {
25233  args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25234  }
25235 
25236  return node;
25237 }
25238 
25239 static rb_node_args_t *
25240 args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25241 {
25242  if (max_numparam > NO_PARAM || it_id) {
25243  if (!args) {
25244  YYLTYPE loc = RUBY_INIT_YYLLOC();
25245  args = new_args_tail(p, 0, 0, 0, 0);
25246  nd_set_loc(RNODE(args), &loc);
25247  }
25248  args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25249  }
25250  return args;
25251 }
25252 
25253 static NODE*
25254 new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25255 {
25256  RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25257 
25258  if (pre_arg) {
25259  NODE *pre_args = NEW_LIST(pre_arg, loc);
25260  if (RNODE_ARYPTN(aryptn)->pre_args) {
25261  RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25262  }
25263  else {
25264  RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25265  }
25266  }
25267  return aryptn;
25268 }
25269 
25270 static NODE*
25271 new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25272 {
25273  if (has_rest) {
25274  rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25275  }
25276  else {
25277  rest_arg = NULL;
25278  }
25279  NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25280 
25281  return node;
25282 }
25283 
25284 static NODE*
25285 new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25286 {
25287  RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25288 
25289  return fndptn;
25290 }
25291 
25292 static NODE*
25293 new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25294 {
25295  pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25296  post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25297  NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25298 
25299  return node;
25300 }
25301 
25302 static NODE*
25303 new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25304 {
25305  RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25306  return hshptn;
25307 }
25308 
25309 static NODE*
25310 new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25311 {
25312  NODE *node, *kw_rest_arg_node;
25313 
25314  if (kw_rest_arg == idNil) {
25315  kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25316  }
25317  else if (kw_rest_arg) {
25318  kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25319  }
25320  else {
25321  kw_rest_arg_node = NULL;
25322  }
25323 
25324  node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25325 
25326  return node;
25327 }
25328 
25329 static NODE*
25330 dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25331 {
25332  if (!node) {
25333  return NEW_SYM(STR_NEW0(), loc);
25334  }
25335 
25336  switch (nd_type(node)) {
25337  case NODE_DSTR:
25338  nd_set_type(node, NODE_DSYM);
25339  nd_set_loc(node, loc);
25340  break;
25341  case NODE_STR:
25342  node = str_to_sym_node(p, node, loc);
25343  break;
25344  default:
25345  node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
25346  break;
25347  }
25348  return node;
25349 }
25350 
25351 static int
25352 nd_type_st_key_enable_p(NODE *node)
25353 {
25354  switch (nd_type(node)) {
25355  case NODE_INTEGER:
25356  case NODE_FLOAT:
25357  case NODE_RATIONAL:
25358  case NODE_IMAGINARY:
25359  case NODE_STR:
25360  case NODE_SYM:
25361  case NODE_REGX:
25362  case NODE_LINE:
25363  case NODE_FILE:
25364  case NODE_ENCODING:
25365  return true;
25366  default:
25367  return false;
25368  }
25369 }
25370 
25371 static VALUE
25372 nd_value(struct parser_params *p, NODE *node)
25373 {
25374  switch (nd_type(node)) {
25375  case NODE_STR:
25376  return rb_node_str_string_val(node);
25377  case NODE_INTEGER:
25378  return rb_node_integer_literal_val(node);
25379  case NODE_FLOAT:
25380  return rb_node_float_literal_val(node);
25381  case NODE_RATIONAL:
25382  return rb_node_rational_literal_val(node);
25383  case NODE_IMAGINARY:
25384  return rb_node_imaginary_literal_val(node);
25385  case NODE_SYM:
25386  return rb_node_sym_string_val(node);
25387  case NODE_REGX:
25388  return rb_node_regx_string_val(node);
25389  case NODE_LINE:
25390  return rb_node_line_lineno_val(node);
25391  case NODE_ENCODING:
25392  return rb_node_encoding_val(node);
25393  case NODE_FILE:
25394  return rb_node_file_path_val(node);
25395  default:
25396  rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
25397  UNREACHABLE_RETURN(0);
25398  }
25399 }
25400 
25401 static void
25402 warn_duplicate_keys(struct parser_params *p, NODE *hash)
25403 {
25404  /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25405  p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
25406  while (hash && RNODE_LIST(hash)->nd_next) {
25407  NODE *head = RNODE_LIST(hash)->nd_head;
25408  NODE *value = RNODE_LIST(hash)->nd_next;
25409  NODE *next = RNODE_LIST(value)->nd_next;
25410  st_data_t key;
25411  st_data_t data;
25412 
25413  /* keyword splat, e.g. {k: 1, **z, k: 2} */
25414  if (!head) {
25415  head = value;
25416  }
25417 
25418  if (nd_type_st_key_enable_p(head)) {
25419  key = (st_data_t)head;
25420 
25421  if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
25422  rb_warn2L(nd_line((NODE *)data),
25423  "key %+"PRIsWARN" is duplicated and overwritten on line %d",
25424  nd_value(p, head), WARN_I(nd_line(head)));
25425  }
25426  st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
25427  }
25428  hash = next;
25429  }
25430  st_free_table(p->warn_duplicate_keys_table);
25431  p->warn_duplicate_keys_table = NULL;
25432 }
25433 
25434 static NODE *
25435 new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25436 {
25437  if (hash) warn_duplicate_keys(p, hash);
25438  return NEW_HASH(hash, loc);
25439 }
25440 
25441 static void
25442 error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
25443 {
25444  if (is_private_local_id(p, id)) {
25445  return;
25446  }
25447  if (st_is_member(p->pvtbl, id)) {
25448  yyerror1(loc, "duplicated variable name");
25449  }
25450  else {
25451  st_insert(p->pvtbl, (st_data_t)id, 0);
25452  }
25453 }
25454 
25455 static void
25456 error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
25457 {
25458  if (!p->pktbl) {
25459  p->pktbl = st_init_numtable();
25460  }
25461  else if (st_is_member(p->pktbl, key)) {
25462  yyerror1(loc, "duplicated key name");
25463  return;
25464  }
25465  st_insert(p->pktbl, (st_data_t)key, 0);
25466 }
25467 
25468 static NODE *
25469 new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25470 {
25471  return NEW_HASH(hash, loc);
25472 }
25473 
25474 static NODE *
25475 new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25476 {
25477  NODE *asgn;
25478 
25479  if (lhs) {
25480  ID vid = get_nd_vid(p, lhs);
25481  YYLTYPE lhs_loc = lhs->nd_loc;
25482  if (op == tOROP) {
25483  set_nd_value(p, lhs, rhs);
25484  nd_set_loc(lhs, loc);
25485  asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
25486  }
25487  else if (op == tANDOP) {
25488  set_nd_value(p, lhs, rhs);
25489  nd_set_loc(lhs, loc);
25490  asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
25491  }
25492  else {
25493  asgn = lhs;
25494  rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
25495  set_nd_value(p, asgn, rhs);
25496  nd_set_loc(asgn, loc);
25497  }
25498  }
25499  else {
25500  asgn = NEW_ERROR(loc);
25501  }
25502  return asgn;
25503 }
25504 
25505 static NODE *
25506 new_ary_op_assign(struct parser_params *p, NODE *ary,
25507  NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
25508  const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
25509 {
25510  NODE *asgn;
25511 
25512  aryset_check(p, args);
25513  args = make_list(args, args_loc);
25514  asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
25515  fixpos(asgn, ary);
25516  return asgn;
25517 }
25518 
25519 static NODE *
25520 new_attr_op_assign(struct parser_params *p, NODE *lhs,
25521  ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
25522  const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
25523 {
25524  NODE *asgn;
25525 
25526  asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
25527  fixpos(asgn, lhs);
25528  return asgn;
25529 }
25530 
25531 static NODE *
25532 new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25533 {
25534  NODE *asgn;
25535 
25536  if (lhs) {
25537  asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
25538  }
25539  else {
25540  asgn = NEW_ERROR(loc);
25541  }
25542  fixpos(asgn, lhs);
25543  return asgn;
25544 }
25545 
25546 static NODE *
25547 const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
25548 {
25549  if (p->ctxt.in_def) {
25550 #ifndef RIPPER
25551  yyerror1(loc, "dynamic constant assignment");
25552 #else
25553  set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
25554 #endif
25555  }
25556  return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
25557 }
25558 
25559 #ifdef RIPPER
25560 static VALUE
25561 assign_error(struct parser_params *p, const char *mesg, VALUE a)
25562 {
25563  a = dispatch2(assign_error, ERR_MESG(), a);
25564  ripper_error(p);
25565  return a;
25566 }
25567 #endif
25568 
25569 static NODE *
25570 new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
25571 {
25572  NODE *result = head;
25573  if (rescue) {
25574  NODE *tmp = rescue_else ? rescue_else : rescue;
25575  YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
25576 
25577  result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
25578  nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
25579  }
25580  if (ensure) {
25581  result = NEW_ENSURE(result, ensure, loc);
25582  }
25583  fixpos(result, head);
25584  return result;
25585 }
25586 
25587 static void
25588 warn_unused_var(struct parser_params *p, struct local_vars *local)
25589 {
25590  int cnt;
25591 
25592  if (!local->used) return;
25593  cnt = local->used->pos;
25594  if (cnt != local->vars->pos) {
25595  rb_parser_fatal(p, "local->used->pos != local->vars->pos");
25596  }
25597 #ifndef RIPPER
25598  ID *v = local->vars->tbl;
25599  ID *u = local->used->tbl;
25600  for (int i = 0; i < cnt; ++i) {
25601  if (!v[i] || (u[i] & LVAR_USED)) continue;
25602  if (is_private_local_id(p, v[i])) continue;
25603  rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
25604  }
25605 #endif
25606 }
25607 
25608 static void
25609 local_push(struct parser_params *p, int toplevel_scope)
25610 {
25611  struct local_vars *local;
25612  int inherits_dvars = toplevel_scope && compile_for_eval;
25613  int warn_unused_vars = RTEST(ruby_verbose);
25614 
25615  local = ALLOC(struct local_vars);
25616  local->prev = p->lvtbl;
25617  local->args = vtable_alloc(0);
25618  local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
25619 #ifndef RIPPER
25620  if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
25621  if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
25622 #endif
25623  local->numparam.outer = 0;
25624  local->numparam.inner = 0;
25625  local->numparam.current = 0;
25626  local->it = 0;
25627  local->used = warn_unused_vars ? vtable_alloc(0) : 0;
25628 
25629 # if WARN_PAST_SCOPE
25630  local->past = 0;
25631 # endif
25632  CMDARG_PUSH(0);
25633  COND_PUSH(0);
25634  p->lvtbl = local;
25635 }
25636 
25637 static void
25638 vtable_chain_free(struct parser_params *p, struct vtable *table)
25639 {
25640  while (!DVARS_TERMINAL_P(table)) {
25641  struct vtable *cur_table = table;
25642  table = cur_table->prev;
25643  vtable_free(cur_table);
25644  }
25645 }
25646 
25647 static void
25648 local_free(struct parser_params *p, struct local_vars *local)
25649 {
25650  vtable_chain_free(p, local->used);
25651 
25652 # if WARN_PAST_SCOPE
25653  vtable_chain_free(p, local->past);
25654 # endif
25655 
25656  vtable_chain_free(p, local->args);
25657  vtable_chain_free(p, local->vars);
25658 
25659  ruby_sized_xfree(local, sizeof(struct local_vars));
25660 }
25661 
25662 static void
25663 local_pop(struct parser_params *p)
25664 {
25665  struct local_vars *local = p->lvtbl->prev;
25666  if (p->lvtbl->used) {
25667  warn_unused_var(p, p->lvtbl);
25668  }
25669 
25670  local_free(p, p->lvtbl);
25671  p->lvtbl = local;
25672 
25673  CMDARG_POP();
25674  COND_POP();
25675 }
25676 
25677 static rb_ast_id_table_t *
25678 local_tbl(struct parser_params *p)
25679 {
25680  int cnt_args = vtable_size(p->lvtbl->args);
25681  int cnt_vars = vtable_size(p->lvtbl->vars);
25682  int cnt = cnt_args + cnt_vars;
25683  int i, j;
25684  rb_ast_id_table_t *tbl;
25685 
25686  if (cnt <= 0) return 0;
25687  tbl = rb_ast_new_local_table(p->ast, cnt);
25688  MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
25689  /* remove IDs duplicated to warn shadowing */
25690  for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
25691  ID id = p->lvtbl->vars->tbl[i];
25692  if (!vtable_included(p->lvtbl->args, id)) {
25693  tbl->ids[j++] = id;
25694  }
25695  }
25696  if (j < cnt) {
25697  tbl = rb_ast_resize_latest_local_table(p->ast, j);
25698  }
25699 
25700  return tbl;
25701 }
25702 
25703 static void
25704 numparam_name(struct parser_params *p, ID id)
25705 {
25706  if (!NUMPARAM_ID_P(id)) return;
25707  compile_error(p, "_%d is reserved for numbered parameter",
25708  NUMPARAM_ID_TO_IDX(id));
25709 }
25710 
25711 static void
25712 arg_var(struct parser_params *p, ID id)
25713 {
25714  numparam_name(p, id);
25715  vtable_add(p->lvtbl->args, id);
25716 }
25717 
25718 static void
25719 local_var(struct parser_params *p, ID id)
25720 {
25721  numparam_name(p, id);
25722  vtable_add(p->lvtbl->vars, id);
25723  if (p->lvtbl->used) {
25724  vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
25725  }
25726 }
25727 
25728 #ifndef RIPPER
25729 int
25730 rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
25731 {
25732  return rb_local_defined(id, iseq);
25733 }
25734 #endif
25735 
25736 static int
25737 local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
25738 {
25739  struct vtable *vars, *args, *used;
25740 
25741  vars = p->lvtbl->vars;
25742  args = p->lvtbl->args;
25743  used = p->lvtbl->used;
25744 
25745  while (vars && !DVARS_TERMINAL_P(vars->prev)) {
25746  vars = vars->prev;
25747  args = args->prev;
25748  if (used) used = used->prev;
25749  }
25750 
25751  if (vars && vars->prev == DVARS_INHERIT) {
25752  return rb_parser_local_defined(p, id, p->parent_iseq);
25753  }
25754  else if (vtable_included(args, id)) {
25755  return 1;
25756  }
25757  else {
25758  int i = vtable_included(vars, id);
25759  if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
25760  return i != 0;
25761  }
25762 }
25763 
25764 static int
25765 local_id(struct parser_params *p, ID id)
25766 {
25767  return local_id_ref(p, id, NULL);
25768 }
25769 
25770 static int
25771 check_forwarding_args(struct parser_params *p)
25772 {
25773  if (local_id(p, idFWD_ALL)) return TRUE;
25774  compile_error(p, "unexpected ...");
25775  return FALSE;
25776 }
25777 
25778 static void
25779 add_forwarding_args(struct parser_params *p)
25780 {
25781  arg_var(p, idFWD_REST);
25782 #ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25783  arg_var(p, idFWD_KWREST);
25784 #endif
25785  arg_var(p, idFWD_BLOCK);
25786  arg_var(p, idFWD_ALL);
25787 }
25788 
25789 static void
25790 forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
25791 {
25792  bool conflict = false;
25793 
25794  struct vtable *vars, *args;
25795 
25796  vars = p->lvtbl->vars;
25797  args = p->lvtbl->args;
25798 
25799  while (vars && !DVARS_TERMINAL_P(vars->prev)) {
25800  conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
25801  vars = vars->prev;
25802  args = args->prev;
25803  }
25804 
25805  bool found = false;
25806  if (vars && vars->prev == DVARS_INHERIT && !found) {
25807  found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
25808  !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
25809  }
25810  else {
25811  found = (vtable_included(args, arg) &&
25812  !(all && vtable_included(args, all)));
25813  }
25814 
25815  if (!found) {
25816  compile_error(p, "no anonymous %s parameter", var);
25817  }
25818  else if (conflict) {
25819  compile_error(p, "anonymous %s parameter is also used within block", var);
25820  }
25821 }
25822 
25823 static NODE *
25824 new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
25825 {
25826  NODE *rest = NEW_LVAR(idFWD_REST, loc);
25827 #ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25828  NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
25829 #endif
25830  rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
25831  NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
25832  block->forwarding = TRUE;
25833 #ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25834  args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
25835 #endif
25836  return arg_blk_pass(args, block);
25837 }
25838 
25839 static NODE *
25840 numparam_push(struct parser_params *p)
25841 {
25842  struct local_vars *local = p->lvtbl;
25843  NODE *inner = local->numparam.inner;
25844  if (!local->numparam.outer) {
25845  local->numparam.outer = local->numparam.current;
25846  }
25847  local->numparam.inner = 0;
25848  local->numparam.current = 0;
25849  local->it = 0;
25850  return inner;
25851 }
25852 
25853 static void
25854 numparam_pop(struct parser_params *p, NODE *prev_inner)
25855 {
25856  struct local_vars *local = p->lvtbl;
25857  if (prev_inner) {
25858  /* prefer first one */
25859  local->numparam.inner = prev_inner;
25860  }
25861  else if (local->numparam.current) {
25862  /* current and inner are exclusive */
25863  local->numparam.inner = local->numparam.current;
25864  }
25865  if (p->max_numparam > NO_PARAM) {
25866  /* current and outer are exclusive */
25867  local->numparam.current = local->numparam.outer;
25868  local->numparam.outer = 0;
25869  }
25870  else {
25871  /* no numbered parameter */
25872  local->numparam.current = 0;
25873  }
25874  local->it = 0;
25875 }
25876 
25877 static const struct vtable *
25878 dyna_push(struct parser_params *p)
25879 {
25880  p->lvtbl->args = vtable_alloc(p->lvtbl->args);
25881  p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
25882  if (p->lvtbl->used) {
25883  p->lvtbl->used = vtable_alloc(p->lvtbl->used);
25884  }
25885  return p->lvtbl->args;
25886 }
25887 
25888 static void
25889 dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
25890 {
25891  struct vtable *tmp = *vtblp;
25892  *vtblp = tmp->prev;
25893 # if WARN_PAST_SCOPE
25894  if (p->past_scope_enabled) {
25895  tmp->prev = p->lvtbl->past;
25896  p->lvtbl->past = tmp;
25897  return;
25898  }
25899 # endif
25900  vtable_free(tmp);
25901 }
25902 
25903 static void
25904 dyna_pop_1(struct parser_params *p)
25905 {
25906  struct vtable *tmp;
25907 
25908  if ((tmp = p->lvtbl->used) != 0) {
25909  warn_unused_var(p, p->lvtbl);
25910  p->lvtbl->used = p->lvtbl->used->prev;
25911  vtable_free(tmp);
25912  }
25913  dyna_pop_vtable(p, &p->lvtbl->args);
25914  dyna_pop_vtable(p, &p->lvtbl->vars);
25915 }
25916 
25917 static void
25918 dyna_pop(struct parser_params *p, const struct vtable *lvargs)
25919 {
25920  while (p->lvtbl->args != lvargs) {
25921  dyna_pop_1(p);
25922  if (!p->lvtbl->args) {
25923  struct local_vars *local = p->lvtbl->prev;
25924  ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
25925  p->lvtbl = local;
25926  }
25927  }
25928  dyna_pop_1(p);
25929 }
25930 
25931 static int
25932 dyna_in_block(struct parser_params *p)
25933 {
25934  return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
25935 }
25936 
25937 #ifndef RIPPER
25938 int
25939 dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
25940 {
25941  struct vtable *vars, *args, *used;
25942  int i;
25943 
25944  args = p->lvtbl->args;
25945  vars = p->lvtbl->vars;
25946  used = p->lvtbl->used;
25947 
25948  while (!DVARS_TERMINAL_P(vars)) {
25949  if (vtable_included(args, id)) {
25950  return 1;
25951  }
25952  if ((i = vtable_included(vars, id)) != 0) {
25953  if (used && vidrefp) *vidrefp = &used->tbl[i-1];
25954  return 1;
25955  }
25956  args = args->prev;
25957  vars = vars->prev;
25958  if (!vidrefp) used = 0;
25959  if (used) used = used->prev;
25960  }
25961 
25962  if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
25963  return rb_dvar_defined(id, p->parent_iseq);
25964  }
25965 
25966  return 0;
25967 }
25968 #endif
25969 
25970 static int
25971 dvar_defined(struct parser_params *p, ID id)
25972 {
25973  return dvar_defined_ref(p, id, NULL);
25974 }
25975 
25976 static int
25977 dvar_curr(struct parser_params *p, ID id)
25978 {
25979  return (vtable_included(p->lvtbl->args, id) ||
25980  vtable_included(p->lvtbl->vars, id));
25981 }
25982 
25983 static void
25984 reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
25985 {
25986  compile_error(p,
25987  "regexp encoding option '%c' differs from source encoding '%s'",
25988  c, rb_enc_name(rb_parser_str_get_encoding(str)));
25989 }
25990 
25991 #ifndef RIPPER
25992 static rb_encoding *
25993 find_enc(struct parser_params* p, const char *name)
25994 {
25995  int idx = rb_enc_find_index(name);
25996  if (idx < 0) {
25997  rb_bug("unknown encoding name: %s", name);
25998  }
25999 
26000  return rb_enc_from_index(idx);
26001 }
26002 
26003 static rb_encoding *
26004 kcode_to_enc(struct parser_params* p, int kcode)
26005 {
26006  rb_encoding *enc;
26007 
26008  switch (kcode) {
26009  case ENC_ASCII8BIT:
26010  enc = rb_ascii8bit_encoding();
26011  break;
26012  case ENC_EUC_JP:
26013  enc = find_enc(p, "EUC-JP");
26014  break;
26015  case ENC_Windows_31J:
26016  enc = find_enc(p, "Windows-31J");
26017  break;
26018  case ENC_UTF8:
26019  enc = rb_utf8_encoding();
26020  break;
26021  default:
26022  enc = NULL;
26023  break;
26024  }
26025 
26026  return enc;
26027 }
26028 
26029 int
26030 rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26031 {
26032  int c = RE_OPTION_ENCODING_IDX(options);
26033 
26034  if (c) {
26035  int opt, idx;
26036  rb_encoding *enc;
26037 
26038  char_to_option_kcode(c, &opt, &idx);
26039  enc = kcode_to_enc(p, idx);
26040  if (enc != rb_parser_str_get_encoding(str) &&
26041  !rb_parser_is_ascii_string(p, str)) {
26042  goto error;
26043  }
26044  rb_parser_string_set_encoding(str, enc);
26045  }
26046  else if (RE_OPTION_ENCODING_NONE(options)) {
26047  if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26048  !rb_parser_is_ascii_string(p, str)) {
26049  c = 'n';
26050  goto error;
26051  }
26052  rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26053  }
26054  else if (rb_is_usascii_enc(p->enc)) {
26055  if (!rb_parser_is_ascii_string(p, str)) {
26056  /* raise in re.c */
26057  rb_parser_enc_associate(p, str, rb_usascii_encoding());
26058  }
26059  else {
26060  rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26061  }
26062  }
26063  return 0;
26064 
26065  error:
26066  return c;
26067 }
26068 #endif
26069 
26070 static void
26071 reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26072 {
26073  int c = rb_reg_fragment_setenc(p, str, options);
26074  if (c) reg_fragment_enc_error(p, str, c);
26075 }
26076 
26077 #ifndef RIPPER
26078 int
26079 reg_fragment_check(struct parser_params* p, rb_parser_string_t *str, int options)
26080 {
26081  VALUE err, str2;
26082  reg_fragment_setenc(p, str, options);
26083  /* TODO */
26084  str2 = rb_str_new_parser_string(str);
26085  err = rb_reg_check_preprocess(str2);
26086  if (err != Qnil) {
26087  err = rb_obj_as_string(err);
26088  compile_error(p, "%"PRIsVALUE, err);
26089  return 0;
26090  }
26091  return 1;
26092 }
26093 #endif
26094 
26095 #ifndef UNIVERSAL_PARSER
26096 typedef struct {
26097  struct parser_params* parser;
26098  rb_encoding *enc;
26099  NODE *succ_block;
26100  const YYLTYPE *loc;
26102 
26103 static int
26104 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26105  int back_num, int *back_refs, OnigRegex regex, void *arg0)
26106 {
26108  struct parser_params* p = arg->parser;
26109  rb_encoding *enc = arg->enc;
26110  long len = name_end - name;
26111  const char *s = (const char *)name;
26112 
26113  return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc);
26114 }
26115 
26116 static NODE *
26117 reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
26118 {
26120 
26121  arg.parser = p;
26122  arg.enc = rb_enc_get(regexp);
26123  arg.succ_block = 0;
26124  arg.loc = loc;
26125  onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26126 
26127  if (!arg.succ_block) return 0;
26128  return RNODE_BLOCK(arg.succ_block)->nd_next;
26129 }
26130 #endif
26131 
26132 #ifndef RIPPER
26133 int
26134 rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26135  rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc)
26136 {
26137  ID var;
26138  NODE *node, *succ;
26139 
26140  if (!len) return ST_CONTINUE;
26141  if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26142  return ST_CONTINUE;
26143 
26144  var = intern_cstr(s, len, enc);
26145  if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26146  if (!lvar_defined(p, var)) return ST_CONTINUE;
26147  }
26148  node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26149  succ = *succ_block;
26150  if (!succ) succ = NEW_ERROR(loc);
26151  succ = block_append(p, succ, node);
26152  *succ_block = succ;
26153  return ST_CONTINUE;
26154 }
26155 #endif
26156 
26157 static VALUE
26158 parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26159 {
26160  VALUE str2;
26161  reg_fragment_setenc(p, str, options);
26162  str2 = rb_str_new_parser_string(str);
26163  return rb_parser_reg_compile(p, str2, options);
26164 }
26165 
26166 #ifndef RIPPER
26167 VALUE
26168 rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26169 {
26170  return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26171 }
26172 #endif
26173 
26174 static VALUE
26175 reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26176 {
26177  VALUE re;
26178  VALUE err;
26179 
26180  err = rb_errinfo();
26181  re = parser_reg_compile(p, str, options);
26182  if (NIL_P(re)) {
26183  VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26184  rb_set_errinfo(err);
26185  compile_error(p, "%"PRIsVALUE, m);
26186  return Qnil;
26187  }
26188  return re;
26189 }
26190 
26191 #ifndef RIPPER
26192 void
26193 rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26194 {
26195  p->do_print = print;
26196  p->do_loop = loop;
26197  p->do_chomp = chomp;
26198  p->do_split = split;
26199 }
26200 
26201 static NODE *
26202 parser_append_options(struct parser_params *p, NODE *node)
26203 {
26204  static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26205  const YYLTYPE *const LOC = &default_location;
26206 
26207  if (p->do_print) {
26208  NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26209  NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26210  LOC);
26211  node = block_append(p, node, print);
26212  }
26213 
26214  if (p->do_loop) {
26215  NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26216 
26217  if (p->do_split) {
26218  ID ifs = rb_intern("$;");
26219  ID fields = rb_intern("$F");
26220  NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26221  NODE *split = NEW_GASGN(fields,
26222  NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26223  rb_intern("split"), args, LOC),
26224  LOC);
26225  node = block_append(p, split, node);
26226  }
26227  if (p->do_chomp) {
26228  NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26229  chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26230  irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26231  }
26232 
26233  node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26234  }
26235 
26236  return node;
26237 }
26238 
26239 void
26240 rb_init_parse(void)
26241 {
26242  /* just to suppress unused-function warnings */
26243  (void)nodetype;
26244  (void)nodeline;
26245 }
26246 
26247 ID
26248 internal_id(struct parser_params *p)
26249 {
26250  return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26251 }
26252 #endif /* !RIPPER */
26253 
26254 static void
26255 parser_initialize(struct parser_params *p)
26256 {
26257  /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26258  p->command_start = TRUE;
26259  p->ruby_sourcefile_string = Qnil;
26260  p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26261  string_buffer_init(p);
26262  p->node_id = 0;
26263  p->delayed.token = NULL;
26264  p->frozen_string_literal = -1; /* not specified */
26265 #ifndef RIPPER
26266  p->error_buffer = Qfalse;
26267  p->end_expect_token_locations = NULL;
26268  p->token_id = 0;
26269  p->tokens = NULL;
26270 #else
26271  p->result = Qnil;
26272  p->parsing_thread = Qnil;
26273  p->s_value = Qnil;
26274  p->s_lvalue = Qnil;
26275  p->s_value_stack = rb_ary_new();
26276 #endif
26277  p->debug_buffer = Qnil;
26278  p->debug_output = rb_ractor_stdout();
26279  p->enc = rb_utf8_encoding();
26280  p->exits = 0;
26281 }
26282 
26283 #ifdef RIPPER
26284 #define rb_ruby_parser_mark ripper_parser_mark
26285 #define rb_ruby_parser_free ripper_parser_free
26286 #define rb_ruby_parser_memsize ripper_parser_memsize
26287 #endif
26288 
26289 void
26290 rb_ruby_parser_mark(void *ptr)
26291 {
26292  struct parser_params *p = (struct parser_params*)ptr;
26293 
26294  rb_gc_mark(p->ruby_sourcefile_string);
26295 #ifndef RIPPER
26296  rb_gc_mark(p->error_buffer);
26297 #else
26298  rb_gc_mark(p->value);
26299  rb_gc_mark(p->result);
26300  rb_gc_mark(p->parsing_thread);
26301  rb_gc_mark(p->s_value);
26302  rb_gc_mark(p->s_lvalue);
26303  rb_gc_mark(p->s_value_stack);
26304 #endif
26305  rb_gc_mark(p->debug_buffer);
26306  rb_gc_mark(p->debug_output);
26307 }
26308 
26309 void
26310 rb_ruby_parser_free(void *ptr)
26311 {
26312  struct parser_params *p = (struct parser_params*)ptr;
26313  struct local_vars *local, *prev;
26314 
26315  if (p->ast) {
26316  rb_ast_free(p->ast);
26317  }
26318 
26319  if (p->warn_duplicate_keys_table) {
26320  st_free_table(p->warn_duplicate_keys_table);
26321  }
26322 
26323 #ifndef RIPPER
26324  if (p->tokens) {
26325  rb_parser_ary_free(p, p->tokens);
26326  }
26327 #endif
26328 
26329  if (p->tokenbuf) {
26330  ruby_sized_xfree(p->tokenbuf, p->toksiz);
26331  }
26332 
26333  for (local = p->lvtbl; local; local = prev) {
26334  prev = local->prev;
26335  local_free(p, local);
26336  }
26337 
26338  {
26339  token_info *ptinfo;
26340  while ((ptinfo = p->token_info) != 0) {
26341  p->token_info = ptinfo->next;
26342  xfree(ptinfo);
26343  }
26344  }
26345  string_buffer_free(p);
26346 
26347  if (p->pvtbl) {
26348  st_free_table(p->pvtbl);
26349  }
26350 
26351  if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26352  st_free_table(p->case_labels);
26353  }
26354 
26355  xfree(p->lex.strterm);
26356  p->lex.strterm = 0;
26357 
26358  xfree(ptr);
26359 }
26360 
26361 size_t
26362 rb_ruby_parser_memsize(const void *ptr)
26363 {
26364  struct parser_params *p = (struct parser_params*)ptr;
26365  struct local_vars *local;
26366  size_t size = sizeof(*p);
26367 
26368  size += p->toksiz;
26369  for (local = p->lvtbl; local; local = local->prev) {
26370  size += sizeof(*local);
26371  if (local->vars) size += local->vars->capa * sizeof(ID);
26372  }
26373  return size;
26374 }
26375 
26376 #ifndef RIPPER
26377 #undef rb_reserved_word
26378 
26379 const struct kwtable *
26380 rb_reserved_word(const char *str, unsigned int len)
26381 {
26382  return reserved_word(str, len);
26383 }
26384 
26385 #ifdef UNIVERSAL_PARSER
26386 rb_parser_t *
26387 rb_ruby_parser_allocate(const rb_parser_config_t *config)
26388 {
26389  /* parser_initialize expects fields to be set to 0 */
26390  rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26391  p->config = config;
26392  return p;
26393 }
26394 
26395 rb_parser_t *
26396 rb_ruby_parser_new(const rb_parser_config_t *config)
26397 {
26398  /* parser_initialize expects fields to be set to 0 */
26399  rb_parser_t *p = rb_ruby_parser_allocate(config);
26400  parser_initialize(p);
26401  return p;
26402 }
26403 #else
26404 rb_parser_t *
26405 rb_ruby_parser_allocate(void)
26406 {
26407  /* parser_initialize expects fields to be set to 0 */
26408  rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
26409  return p;
26410 }
26411 
26412 rb_parser_t *
26413 rb_ruby_parser_new(void)
26414 {
26415  /* parser_initialize expects fields to be set to 0 */
26416  rb_parser_t *p = rb_ruby_parser_allocate();
26417  parser_initialize(p);
26418  return p;
26419 }
26420 #endif
26421 
26422 rb_parser_t *
26423 rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
26424 {
26425  p->error_buffer = main ? Qfalse : Qnil;
26426  p->parent_iseq = base;
26427  return p;
26428 }
26429 
26430 void
26431 rb_ruby_parser_set_script_lines(rb_parser_t *p)
26432 {
26433  p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
26434 }
26435 
26436 void
26437 rb_ruby_parser_error_tolerant(rb_parser_t *p)
26438 {
26439  p->error_tolerant = 1;
26440 }
26441 
26442 void
26443 rb_ruby_parser_keep_tokens(rb_parser_t *p)
26444 {
26445  p->keep_tokens = 1;
26446  p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
26447 }
26448 
26449 rb_encoding *
26450 rb_ruby_parser_encoding(rb_parser_t *p)
26451 {
26452  return p->enc;
26453 }
26454 
26455 int
26456 rb_ruby_parser_end_seen_p(rb_parser_t *p)
26457 {
26458  return p->ruby__end__seen;
26459 }
26460 
26461 int
26462 rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
26463 {
26464  p->debug = flag;
26465  return flag;
26466 }
26467 #endif /* !RIPPER */
26468 
26469 #ifdef RIPPER
26470 int
26471 rb_ruby_parser_get_yydebug(rb_parser_t *p)
26472 {
26473  return p->debug;
26474 }
26475 
26476 void
26477 rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
26478 {
26479  p->value = value;
26480 }
26481 
26482 int
26483 rb_ruby_parser_error_p(rb_parser_t *p)
26484 {
26485  return p->error_p;
26486 }
26487 
26488 VALUE
26489 rb_ruby_parser_debug_output(rb_parser_t *p)
26490 {
26491  return p->debug_output;
26492 }
26493 
26494 void
26495 rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
26496 {
26497  p->debug_output = output;
26498 }
26499 
26500 VALUE
26501 rb_ruby_parser_parsing_thread(rb_parser_t *p)
26502 {
26503  return p->parsing_thread;
26504 }
26505 
26506 void
26507 rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
26508 {
26509  p->parsing_thread = parsing_thread;
26510 }
26511 
26512 void
26513 rb_ruby_parser_ripper_initialize(rb_parser_t *p, rb_parser_lex_gets_func *gets, rb_parser_input_data input, VALUE sourcefile_string, const char *sourcefile, int sourceline)
26514 {
26515  p->lex.gets = gets;
26516  p->lex.input = input;
26517  p->eofp = 0;
26518  p->ruby_sourcefile_string = sourcefile_string;
26519  p->ruby_sourcefile = sourcefile;
26520  p->ruby_sourceline = sourceline;
26521 }
26522 
26523 VALUE
26524 rb_ruby_parser_result(rb_parser_t *p)
26525 {
26526  return p->result;
26527 }
26528 
26529 rb_encoding *
26530 rb_ruby_parser_enc(rb_parser_t *p)
26531 {
26532  return p->enc;
26533 }
26534 
26535 VALUE
26536 rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
26537 {
26538  return p->ruby_sourcefile_string;
26539 }
26540 
26541 int
26542 rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
26543 {
26544  return p->ruby_sourceline;
26545 }
26546 
26547 int
26548 rb_ruby_parser_lex_state(rb_parser_t *p)
26549 {
26550  return p->lex.state;
26551 }
26552 
26553 void
26554 rb_ruby_ripper_parse0(rb_parser_t *p)
26555 {
26556  parser_prepare(p);
26557  p->ast = rb_ast_new();
26558  ripper_yyparse((void*)p);
26559  rb_ast_free(p->ast);
26560  p->ast = 0;
26561  p->eval_tree = 0;
26562  p->eval_tree_begin = 0;
26563 }
26564 
26565 int
26566 rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
26567 {
26568  return dedent_string(p, string, width);
26569 }
26570 
26571 int
26572 rb_ruby_ripper_initialized_p(rb_parser_t *p)
26573 {
26574  return p->lex.input != 0;
26575 }
26576 
26577 void
26578 rb_ruby_ripper_parser_initialize(rb_parser_t *p)
26579 {
26580  parser_initialize(p);
26581 }
26582 
26583 long
26584 rb_ruby_ripper_column(rb_parser_t *p)
26585 {
26586  return p->lex.ptok - p->lex.pbeg;
26587 }
26588 
26589 long
26590 rb_ruby_ripper_token_len(rb_parser_t *p)
26591 {
26592  return p->lex.pcur - p->lex.ptok;
26593 }
26594 
26596 rb_ruby_ripper_lex_lastline(rb_parser_t *p)
26597 {
26598  return p->lex.lastline;
26599 }
26600 
26601 VALUE
26602 rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
26603 {
26604  return rb_parser_lex_state_name(p, (enum lex_state_e)state);
26605 }
26606 
26607 #ifdef UNIVERSAL_PARSER
26608 rb_parser_t *
26609 rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
26610 {
26611  rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26612  p->config = config;
26613  return p;
26614 }
26615 #endif
26616 
26617 struct parser_params*
26618 rb_ruby_ripper_parser_allocate(void)
26619 {
26620  return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
26621 }
26622 #endif /* RIPPER */
26623 
26624 #ifndef RIPPER
26625 void
26626 rb_parser_printf(struct parser_params *p, const char *fmt, ...)
26627 {
26628  va_list ap;
26629  VALUE mesg = p->debug_buffer;
26630 
26631  if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
26632  va_start(ap, fmt);
26633  rb_str_vcatf(mesg, fmt, ap);
26634  va_end(ap);
26635  if (char_at_end(p, mesg, 0) == '\n') {
26636  rb_io_write(p->debug_output, mesg);
26637  p->debug_buffer = Qnil;
26638  }
26639 }
26640 
26641 static void
26642 parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
26643 {
26644  va_list ap;
26645  int lineno, column;
26646 
26647  if (loc) {
26648  lineno = loc->end_pos.lineno;
26649  column = loc->end_pos.column;
26650  }
26651  else {
26652  lineno = p->ruby_sourceline;
26653  column = rb_long2int(p->lex.pcur - p->lex.pbeg);
26654  }
26655 
26656  rb_io_flush(p->debug_output);
26657  p->error_p = 1;
26658  va_start(ap, fmt);
26659  p->error_buffer =
26660  rb_syntax_error_append(p->error_buffer,
26661  p->ruby_sourcefile_string,
26662  lineno, column,
26663  p->enc, fmt, ap);
26664  va_end(ap);
26665 }
26666 
26667 static size_t
26668 count_char(const char *str, int c)
26669 {
26670  int n = 0;
26671  while (str[n] == c) ++n;
26672  return n;
26673 }
26674 
26675 /*
26676  * strip enclosing double-quotes, same as the default yytnamerr except
26677  * for that single-quotes matching back-quotes do not stop stripping.
26678  *
26679  * "\"`class' keyword\"" => "`class' keyword"
26680  */
26681 size_t
26682 rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
26683 {
26684  if (*yystr == '"') {
26685  size_t yyn = 0, bquote = 0;
26686  const char *yyp = yystr;
26687 
26688  while (*++yyp) {
26689  switch (*yyp) {
26690  case '\'':
26691  if (!bquote) {
26692  bquote = count_char(yyp+1, '\'') + 1;
26693  if (yyres) memcpy(&yyres[yyn], yyp, bquote);
26694  yyn += bquote;
26695  yyp += bquote - 1;
26696  break;
26697  }
26698  else {
26699  if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
26700  if (yyres) memcpy(yyres + yyn, yyp, bquote);
26701  yyn += bquote;
26702  yyp += bquote - 1;
26703  bquote = 0;
26704  break;
26705  }
26706  if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
26707  if (yyres) memcpy(yyres + yyn, yyp, 3);
26708  yyn += 3;
26709  yyp += 2;
26710  break;
26711  }
26712  goto do_not_strip_quotes;
26713  }
26714 
26715  case ',':
26716  goto do_not_strip_quotes;
26717 
26718  case '\\':
26719  if (*++yyp != '\\')
26720  goto do_not_strip_quotes;
26721  /* Fall through. */
26722  default:
26723  if (yyres)
26724  yyres[yyn] = *yyp;
26725  yyn++;
26726  break;
26727 
26728  case '"':
26729  case '\0':
26730  if (yyres)
26731  yyres[yyn] = '\0';
26732  return yyn;
26733  }
26734  }
26735  do_not_strip_quotes: ;
26736  }
26737 
26738  if (!yyres) return strlen(yystr);
26739 
26740  return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
26741 }
26742 #endif
26743 
26744 #ifdef RIPPER
26745 #define validate(x) (void)(x)
26746 
26747 static VALUE
26748 ripper_dispatch0(struct parser_params *p, ID mid)
26749 {
26750  return rb_funcall(p->value, mid, 0);
26751 }
26752 
26753 static VALUE
26754 ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
26755 {
26756  validate(a);
26757  return rb_funcall(p->value, mid, 1, a);
26758 }
26759 
26760 static VALUE
26761 ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
26762 {
26763  validate(a);
26764  validate(b);
26765  return rb_funcall(p->value, mid, 2, a, b);
26766 }
26767 
26768 static VALUE
26769 ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
26770 {
26771  validate(a);
26772  validate(b);
26773  validate(c);
26774  return rb_funcall(p->value, mid, 3, a, b, c);
26775 }
26776 
26777 static VALUE
26778 ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
26779 {
26780  validate(a);
26781  validate(b);
26782  validate(c);
26783  validate(d);
26784  return rb_funcall(p->value, mid, 4, a, b, c, d);
26785 }
26786 
26787 static VALUE
26788 ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
26789 {
26790  validate(a);
26791  validate(b);
26792  validate(c);
26793  validate(d);
26794  validate(e);
26795  return rb_funcall(p->value, mid, 5, a, b, c, d, e);
26796 }
26797 
26798 static VALUE
26799 ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
26800 {
26801  validate(a);
26802  validate(b);
26803  validate(c);
26804  validate(d);
26805  validate(e);
26806  validate(f);
26807  validate(g);
26808  return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
26809 }
26810 
26811 void
26812 ripper_error(struct parser_params *p)
26813 {
26814  p->error_p = TRUE;
26815 }
26816 
26817 VALUE
26818 ripper_value(struct parser_params *p)
26819 {
26820  (void)yystpcpy; /* may not used in newer bison */
26821 
26822  return p->value;
26823 }
26824 
26825 #endif /* RIPPER */
26826 /*
26827  * Local variables:
26828  * mode: c
26829  * c-file-style: "ruby"
26830  * End:
26831  */
static bool rb_enc_isascii(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isascii(), except it additionally takes an encoding.
Definition: ctype.h:82
static bool rb_enc_isspace(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isspace(), except it additionally takes an encoding.
Definition: ctype.h:194
static bool rb_enc_isalnum(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isalnum(), except it additionally takes an encoding.
Definition: ctype.h:166
#define ENC_CODERANGE_7BIT
Old name of RUBY_ENC_CODERANGE_7BIT.
Definition: coderange.h:180
#define REALLOC_N
Old name of RB_REALLOC_N.
Definition: memory.h:398
#define ISSPACE
Old name of rb_isspace.
Definition: ctype.h:88
#define ALLOC
Old name of RB_ALLOC.
Definition: memory.h:395
#define xfree
Old name of ruby_xfree.
Definition: xmalloc.h:58
#define UNREACHABLE_RETURN
Old name of RBIMPL_UNREACHABLE_RETURN.
Definition: assume.h:29
#define ZALLOC
Old name of RB_ZALLOC.
Definition: memory.h:397
#define ENC_CODERANGE_UNKNOWN
Old name of RUBY_ENC_CODERANGE_UNKNOWN.
Definition: coderange.h:179
#define xmalloc
Old name of ruby_xmalloc.
Definition: xmalloc.h:53
#define ISDIGIT
Old name of rb_isdigit.
Definition: ctype.h:93
#define ASSUME
Old name of RBIMPL_ASSUME.
Definition: assume.h:27
#define ALLOC_N
Old name of RB_ALLOC_N.
Definition: memory.h:394
#define MBCLEN_CHARFOUND_LEN(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_LEN.
Definition: encoding.h:517
#define STRCASECMP
Old name of st_locale_insensitive_strcasecmp.
Definition: ctype.h:102
#define ISALPHA
Old name of rb_isalpha.
Definition: ctype.h:92
#define STRNCASECMP
Old name of st_locale_insensitive_strncasecmp.
Definition: ctype.h:103
#define ISASCII
Old name of rb_isascii.
Definition: ctype.h:85
#define Qnil
Old name of RUBY_Qnil.
#define Qfalse
Old name of RUBY_Qfalse.
#define NIL_P
Old name of RB_NIL_P.
#define MBCLEN_CHARFOUND_P(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_P.
Definition: encoding.h:516
#define ISPRINT
Old name of rb_isprint.
Definition: ctype.h:86
#define xcalloc
Old name of ruby_xcalloc.
Definition: xmalloc.h:55
#define ISXDIGIT
Old name of rb_isxdigit.
Definition: ctype.h:94
#define ISCNTRL
Old name of rb_iscntrl.
Definition: ctype.h:96
#define ISALNUM
Old name of rb_isalnum.
Definition: ctype.h:91
void rb_raise(VALUE exc, const char *fmt,...)
Exception entry point.
Definition: error.c:3627
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:676
void rb_bug(const char *fmt,...)
Interpreter panic switch.
Definition: error.c:1088
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1941
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition: error.h:471
void rb_fatal(const char *fmt,...)
Raises the unsung "fatal" exception.
Definition: error.c:3678
VALUE rb_eRuntimeError
RuntimeError exception.
Definition: error.c:1401
VALUE rb_eArgError
ArgumentError exception.
Definition: error.c:1404
VALUE rb_errinfo(void)
This is the same as $! in Ruby.
Definition: eval.c:1935
VALUE rb_eSyntaxError
SyntaxError exception.
Definition: error.c:1420
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition: object.c:2132
Encoding relates APIs.
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
Queries the number of bytes of the character at the passed pointer.
Definition: encoding.c:1176
rb_encoding * rb_usascii_encoding(void)
Queries the encoding that represents US-ASCII.
Definition: encoding.c:1472
int rb_enc_codelen(int code, rb_encoding *enc)
Queries the number of bytes requested to represent the passed code point using the passed encoding.
Definition: encoding.c:1226
rb_encoding * rb_ascii8bit_encoding(void)
Queries the encoding that represents ASCII-8BIT a.k.a.
Definition: encoding.c:1448
static bool rb_enc_asciicompat(rb_encoding *enc)
Queries if the passed encoding is in some sense compatible with ASCII.
Definition: encoding.h:768
rb_encoding * rb_utf8_encoding(void)
Queries the encoding that represents UTF-8.
Definition: encoding.c:1460
static char * rb_enc_prev_char(const char *s, const char *p, const char *e, rb_encoding *enc)
Queries the previous (left) character.
Definition: encoding.h:662
static int rb_enc_mbcput(unsigned int c, void *buf, rb_encoding *enc)
Identical to rb_enc_uint_chr(), except it writes back to the passed buffer instead of allocating one.
Definition: encoding.h:643
rb_encoding * rb_enc_from_index(int idx)
Identical to rb_find_encoding(), except it takes an encoding index instead of a Ruby object.
Definition: encoding.c:402
rb_encoding * rb_enc_get(VALUE obj)
Identical to rb_enc_get_index(), except the return type.
Definition: encoding.c:1013
static OnigCodePoint rb_enc_mbc_to_codepoint(const char *p, const char *e, rb_encoding *enc)
Identical to rb_enc_codepoint(), except it assumes the passed character is not broken.
Definition: encoding.h:591
static const char * rb_enc_name(rb_encoding *enc)
Queries the (canonical) name of the passed encoding.
Definition: encoding.h:417
int rb_enc_find_index(const char *name)
Queries the index of the encoding.
Definition: encoding.c:824
static int rb_enc_mbminlen(rb_encoding *enc)
Queries the minimum number of bytes that the passed encoding needs to represent a character.
Definition: encoding.h:432
VALUE rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)
Identical to rb_str_new(), except it additionally takes an encoding.
Definition: string.c:1042
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition: string.c:764
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition: vm_eval.c:1099
void rb_gc_mark(VALUE obj)
Marks an object.
Definition: gc.c:2094
VALUE rb_ary_unshift(VALUE ary, VALUE elem)
Destructively prepends the passed item at the beginning of the passed array.
Definition: array.c:1719
VALUE rb_ary_new(void)
Allocates a new, empty array.
Definition: array.c:747
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
Definition: array.c:1431
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
Definition: array.c:1384
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
Definition: array.c:1737
VALUE rb_make_exception(int argc, const VALUE *argv)
Constructs an exception object from the list of arguments, in a manner similar to Ruby's raise.
Definition: eval.c:883
VALUE rb_io_puts(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8922
VALUE rb_io_write(VALUE io, VALUE str)
Writes the given string to the given IO.
Definition: io.c:2294
VALUE rb_io_flush(VALUE io)
Flushes any buffered data within the passed IO to the underlying operating system.
Definition: io.c:2398
ID rb_id_attrset(ID id)
Calculates an ID of attribute writer.
Definition: symbol.c:121
int rb_memcicmp(const void *s1, const void *s2, long n)
Identical to st_locale_insensitive_strcasecmp(), except it is timing safe and returns something diffe...
Definition: re.c:95
VALUE rb_str_to_interned_str(VALUE str)
Identical to rb_interned_str(), except it takes a Ruby's string instead of C's.
Definition: string.c:12487
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition: string.c:3430
VALUE rb_usascii_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "US ASCII" encoding.
Definition: string.c:1026
#define rb_strlen_lit(str)
Length of a string literal.
Definition: string.h:1692
VALUE rb_str_new(const char *ptr, long len)
Allocates an instance of rb_cString.
Definition: string.c:1020
VALUE rb_str_new_cstr(const char *ptr)
Identical to rb_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1054
VALUE rb_str_resize(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:3302
VALUE rb_str_cat_cstr(VALUE dst, const char *src)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:3440
VALUE rb_obj_as_string(VALUE obj)
Try converting an object to its stringised representation using its to_s method, if any.
Definition: string.c:1770
VALUE rb_attr_get(VALUE obj, ID name)
Identical to rb_ivar_get()
Definition: variable.c:1358
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
ID rb_intern2(const char *name, long len)
Identical to rb_intern(), except it additionally takes the length of the string.
Definition: symbol.c:816
const char * rb_id2name(ID id)
Retrieves the name mapped to the given id.
Definition: symbol.c:992
ID rb_intern(const char *name)
Finds or creates a symbol of the given name.
Definition: symbol.c:823
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition: symbol.c:917
ID rb_intern_str(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: symbol.c:829
VALUE rb_id2str(ID id)
Identical to rb_id2name(), except it returns a Ruby's String instead of C's.
Definition: symbol.c:986
char * ptr
Pointer to the underlying memory region, of at least capa bytes.
Definition: io.h:2
int len
Length of the buffer.
Definition: io.h:8
VALUE rb_ractor_stderr(void)
Queries the standard error of the current Ractor that is calling this function.
Definition: ractor.c:2711
VALUE rb_ractor_stdout(void)
Queries the standard output of the current Ractor that is calling this function.
Definition: ractor.c:2699
unsigned long ruby_scan_hex(const char *str, size_t len, size_t *ret)
Interprets the passed string a hexadecimal unsigned integer.
Definition: util.c:61
#define strtod(s, e)
Just another name of ruby_strtod.
Definition: util.h:223
unsigned long ruby_scan_oct(const char *str, size_t len, size_t *consumed)
Interprets the passed string as an octal unsigned integer.
Definition: util.c:43
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Scans the passed string, assuming the string is a textual representation of an integer.
Definition: util.c:103
#define strdup(s)
Just another name of ruby_strdup.
Definition: util.h:187
VALUE rb_sprintf(const char *fmt,...)
Ruby's extended sprintf(3).
Definition: sprintf.c:1217
VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap)
Identical to rb_str_catf(), except it takes a va_list.
Definition: sprintf.c:1230
VALUE rb_str_catf(VALUE dst, const char *fmt,...)
Identical to rb_sprintf(), except it renders the output to the specified object rather than creating ...
Definition: sprintf.c:1240
#define rb_long2int
Just another name of rb_long2int_inline.
Definition: long.h:62
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition: memory.h:367
#define ALLOCA_N(type, n)
Definition: memory.h:287
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition: memory.h:355
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition: memory.h:162
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition: memory.h:379
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
Functions related to nodes in the AST.
#define RREGEXP_PTR(obj)
Convenient accessor macro.
Definition: rregexp.h:45
static char * RSTRING_PTR(VALUE str)
Queries the contents pointer of the string.
Definition: rstring.h:416
static long RSTRING_LEN(VALUE str)
Queries the length of the string.
Definition: rstring.h:367
#define StringValueCStr(v)
Identical to StringValuePtr, except it additionally checks for the contents for viability as a C stri...
Definition: rstring.h:89
#define errno
Ractor-aware version of errno.
Definition: ruby.h:388
#define RTEST
This is an old name of RB_TEST.
Definition: parse.h:226
Definition: lex.c:33
Definition: st.h:79
Definition: parse.c:476
Definition: parse.h:192
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition: value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40
#define RBIMPL_WARNING_IGNORED(flag)
Suppresses a warning.
Definition: warning_push.h:80
#define RBIMPL_WARNING_PUSH()
Pushes compiler warning state.
Definition: warning_push.h:55
#define RBIMPL_WARNING_POP()
Pops compiler warning state.
Definition: warning_push.h:62
void * ruby_xcalloc(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc2(), except it returns a zero-filled storage instance.
Definition: gc.c:4204