Ruby 4.1.0dev (2026-08-14 revision 7da70f17736d9a210167dda5636e76183136bb43)
parse.c
1/* A Bison parser, made by Lrama 0.8.0. */
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 12 "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#include "internal/thread.h"
85
86#include <errno.h>
87
88#ifdef UNIVERSAL_PARSER
89
90#include "internal/ruby_parser.h"
91#include "parser_node.h"
92#include "universal_parser.c"
93
94#ifdef RIPPER
95#define STATIC_ID2SYM p->config->static_id2sym
96#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
97#endif
98
99#else
100
101#include "internal.h"
102#include "internal/array.h"
103#include "internal/compile.h"
104#include "internal/compilers.h"
105#include "internal/complex.h"
106#include "internal/encoding.h"
107#include "internal/error.h"
108#include "internal/gc.h"
109#include "internal/hash.h"
110#include "internal/io.h"
111#include "internal/numeric.h"
112#include "internal/parse.h"
113#include "internal/rational.h"
114#include "internal/re.h"
115#include "internal/ruby_parser.h"
116#include "internal/symbol.h"
117#include "internal/thread.h"
118#include "node.h"
119#include "parser_node.h"
120#include "probes.h"
121#include "regenc.h"
122#include "ruby/encoding.h"
123#include "ruby/regex.h"
124#include "ruby/ruby.h"
125#include "ruby/st.h"
126#include "ruby/util.h"
127#include "ruby/ractor.h"
128#include "symbol.h"
129
130#ifndef RIPPER
131static VALUE
132syntax_error_new(void)
133{
135}
136#endif
137
138static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
139
140#define compile_callback rb_suppress_tracing
141#endif /* !UNIVERSAL_PARSER */
142
143#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
144#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
145
146static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
147
148#ifndef RIPPER
149static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
150#endif
151
152static int
153node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
154{
155 return (n1->minus != n2->minus ||
156 n1->base != n2->base ||
157 strcmp(n1->val, n2->val));
158}
159
160static int
161node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
162{
163 return (n1->minus != n2->minus ||
164 strcmp(n1->val, n2->val));
165}
166
167static int
168node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
169{
170 return (n1->minus != n2->minus ||
171 n1->base != n2->base ||
172 n1->seen_point != n2->seen_point ||
173 strcmp(n1->val, n2->val));
174}
175
176static int
177node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
178{
179 return (n1->minus != n2->minus ||
180 n1->base != n2->base ||
181 n1->seen_point != n2->seen_point ||
182 n1->type != n2->type ||
183 strcmp(n1->val, n2->val));
184}
185
186static int
187rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
188{
189 return (n1->options != n2->options ||
190 rb_parser_string_hash_cmp(n1->string, n2->string));
191}
192
193static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
194static st_index_t rb_char_p_hash(const char *c);
195
196static int
197literal_cmp(st_data_t val, st_data_t lit)
198{
199 if (val == lit) return 0;
200
201 NODE *node_val = RNODE(val);
202 NODE *node_lit = RNODE(lit);
203 enum node_type type_val = nd_type(node_val);
204 enum node_type type_lit = nd_type(node_lit);
205
206 if (type_val != type_lit) {
207 return -1;
208 }
209
210 switch (type_lit) {
211 case NODE_INTEGER:
212 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
213 case NODE_FLOAT:
214 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
215 case NODE_RATIONAL:
216 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
217 case NODE_IMAGINARY:
218 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
219 case NODE_STR:
220 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
221 case NODE_SYM:
222 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
223 case NODE_REGX:
224 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
225 case NODE_LINE:
226 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
227 case NODE_FILE:
228 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
229 case NODE_ENCODING:
230 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
231 default:
232#ifdef UNIVERSAL_PARSER
233 abort();
234#else
235 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
236#endif
237 }
238}
239
240static st_index_t
241literal_hash(st_data_t a)
242{
243 NODE *node = (NODE *)a;
244 enum node_type type = nd_type(node);
245
246 switch (type) {
247 case NODE_INTEGER:
248 return rb_char_p_hash(RNODE_INTEGER(node)->val);
249 case NODE_FLOAT:
250 return rb_char_p_hash(RNODE_FLOAT(node)->val);
251 case NODE_RATIONAL:
252 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
253 case NODE_IMAGINARY:
254 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
255 case NODE_STR:
256 return rb_parser_str_hash(RNODE_STR(node)->string);
257 case NODE_SYM:
258 return rb_parser_str_hash(RNODE_SYM(node)->string);
259 case NODE_REGX:
260 return rb_parser_str_hash(RNODE_REGX(node)->string);
261 case NODE_LINE:
262 return (st_index_t)node->nd_loc.beg_pos.lineno;
263 case NODE_FILE:
264 return rb_parser_str_hash(RNODE_FILE(node)->path);
265 case NODE_ENCODING:
266 return (st_index_t)RNODE_ENCODING(node)->enc;
267 default:
268#ifdef UNIVERSAL_PARSER
269 abort();
270#else
271 rb_bug("unexpected node: %s", ruby_node_name(type));
272#endif
273 }
274}
275
276static inline int
277parse_isascii(int c)
278{
279 return '\0' <= c && c <= '\x7f';
280}
281
282#undef ISASCII
283#define ISASCII parse_isascii
284
285static inline int
286parse_isspace(int c)
287{
288 return c == ' ' || ('\t' <= c && c <= '\r');
289}
290
291#undef ISSPACE
292#define ISSPACE parse_isspace
293
294static inline int
295parse_iscntrl(int c)
296{
297 return ('\0' <= c && c < ' ') || c == '\x7f';
298}
299
300#undef ISCNTRL
301#define ISCNTRL(c) parse_iscntrl(c)
302
303static inline int
304parse_isupper(int c)
305{
306 return 'A' <= c && c <= 'Z';
307}
308
309static inline int
310parse_islower(int c)
311{
312 return 'a' <= c && c <= 'z';
313}
314
315static inline int
316parse_isalpha(int c)
317{
318 return parse_isupper(c) || parse_islower(c);
319}
320
321#undef ISALPHA
322#define ISALPHA(c) parse_isalpha(c)
323
324static inline int
325parse_isdigit(int c)
326{
327 return '0' <= c && c <= '9';
328}
329
330#undef ISDIGIT
331#define ISDIGIT(c) parse_isdigit(c)
332
333static inline int
334parse_isalnum(int c)
335{
336 return ISALPHA(c) || ISDIGIT(c);
337}
338
339#undef ISALNUM
340#define ISALNUM(c) parse_isalnum(c)
341
342static inline int
343parse_isxdigit(int c)
344{
345 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
346}
347
348#undef ISXDIGIT
349#define ISXDIGIT(c) parse_isxdigit(c)
350
351#include "parser_st.h"
352
353#undef STRCASECMP
354#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
355
356#undef STRNCASECMP
357#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
358
359#ifdef RIPPER
360#include "ripper_init.h"
361#endif
362
363enum rescue_context {
364 before_rescue,
365 after_rescue,
366 after_else,
367 after_ensure,
368};
369
371 unsigned int in_defined: 1;
372 unsigned int in_kwarg: 1;
373 unsigned int in_argdef: 1;
374 unsigned int in_def: 1;
375 unsigned int in_class: 1;
376 unsigned int has_trailing_semicolon: 1;
377 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
378 BITFIELD(enum rescue_context, in_rescue, 2);
379 unsigned int cant_return: 1;
380 unsigned int in_alt_pattern: 1;
381 unsigned int capture_in_pattern: 1;
382};
383
385
386#if defined(__GNUC__) && !defined(__clang__)
387// Suppress "parameter passing for argument of type 'struct
388// lex_context' changed" notes. `struct lex_context` is file scope,
389// and has no ABI compatibility issue.
393// Not sure why effective even after popped.
394#endif
395
396#include "parse.h"
397
398#define NO_LEX_CTXT (struct lex_context){0}
399
400#ifndef WARN_PAST_SCOPE
401# define WARN_PAST_SCOPE 0
402#endif
403
404#define TAB_WIDTH 8
405
406#define yydebug (p->debug) /* disable the global variable definition */
407
408#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
409#define YY_LOCATION_PRINT(File, loc, p) \
410 rb_parser_printf(p, "%d.%d-%d.%d", \
411 (loc).beg_pos.lineno, (loc).beg_pos.column,\
412 (loc).end_pos.lineno, (loc).end_pos.column)
413#define YYLLOC_DEFAULT(Current, Rhs, N) \
414 do \
415 if (N) \
416 { \
417 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
418 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
419 } \
420 else \
421 { \
422 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
423 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
424 } \
425 while (0)
426#define YY_(Msgid) \
427 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
428 "nesting too deep" : (Msgid))
429
430#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
431 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
432#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
433 rb_parser_set_location_of_delayed_token(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
435 rb_parser_set_location_of_heredoc_end(p, &(Current))
436#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
437 rb_parser_set_location_of_dummy_end(p, &(Current))
438#define RUBY_SET_YYLLOC_OF_NONE(Current) \
439 rb_parser_set_location_of_none(p, &(Current))
440#define RUBY_SET_YYLLOC(Current) \
441 rb_parser_set_location(p, &(Current))
442#define RUBY_INIT_YYLLOC() \
443 { \
444 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
445 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
446 }
447
448#define IS_lex_state_for(x, ls) ((x) & (ls))
449#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
450#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
451#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
452
453# define SET_LEX_STATE(ls) \
454 parser_set_lex_state(p, ls, __LINE__)
455static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
456
457typedef VALUE stack_type;
458
459static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
460
461# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
462# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
463# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
464# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
465# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
466
467/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
468 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
469#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
470#define COND_POP() BITSTACK_POP(cond_stack)
471#define COND_P() BITSTACK_SET_P(cond_stack)
472#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
473
474/* A flag to identify keyword_do_block; "do" keyword after command_call.
475 Example: `foo 1, 2 do`. */
476#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
477#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
478#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
479#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
480
481struct vtable {
482 ID *tbl;
483 int pos;
484 int capa;
485 struct vtable *prev;
486};
487
489 struct vtable *args;
490 struct vtable *vars;
491 struct vtable *used;
492# if WARN_PAST_SCOPE
493 struct vtable *past;
494# endif
495 struct local_vars *prev;
496 struct {
497 NODE *outer, *inner, *current;
498 } numparam;
499 NODE *it;
500};
501
503 NODE *node;
504 YYLTYPE opening_loc;
505 YYLTYPE closing_loc;
507
508enum {
509 ORDINAL_PARAM = -1,
510 NO_PARAM = 0,
511 NUMPARAM_MAX = 9,
512};
513
514#define DVARS_INHERIT ((void*)1)
515#define DVARS_TOPSCOPE NULL
516#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
517
518typedef struct token_info {
519 const char *token;
521 int indent;
522 int nonspc;
523 struct token_info *next;
524} token_info;
525
530
532 struct parser_string_buffer_elem *next;
533 long len; /* Total length of allocated buf */
534 long used; /* Current usage of buf */
535 rb_parser_string_t *buf[FLEX_ARY_LEN];
537
542
543#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
544
545/*
546 Structure of Lexer Buffer:
547
548 lex.pbeg lex.ptok lex.pcur lex.pend
549 | | | |
550 |------------+------------+------------|
551 |<---------->|
552 token
553*/
555 YYSTYPE *lval;
556 YYLTYPE *yylloc;
557
558 struct {
559 rb_strterm_t *strterm;
560 rb_parser_lex_gets_func *gets;
561 rb_parser_input_data input;
562 parser_string_buffer_t string_buffer;
563 rb_parser_string_t *lastline;
564 rb_parser_string_t *nextline;
565 const char *pbeg;
566 const char *pcur;
567 const char *pend;
568 const char *ptok;
569 enum lex_state_e state;
570 /* track the nest level of any parens "()[]{}" */
571 int paren_nest;
572 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
573 int lpar_beg;
574 /* track the nest level of only braces "{}" */
575 int brace_nest;
576 } lex;
577 stack_type cond_stack;
578 stack_type cmdarg_stack;
579 int tokidx;
580 int toksiz;
581 int heredoc_end;
582 int heredoc_indent;
583 int heredoc_line_indent;
584 char *tokenbuf;
585 struct local_vars *lvtbl;
586 st_table *pvtbl;
587 st_table *pktbl;
588 int line_count;
589 int ruby_sourceline; /* current line no. */
590 const char *ruby_sourcefile; /* current source file */
591 VALUE ruby_sourcefile_string;
592 rb_encoding *enc;
594 st_table *case_labels;
595 rb_node_exits_t *exits;
596
597 VALUE debug_buffer;
598 VALUE debug_output;
599
600 struct {
601 rb_parser_string_t *token;
602 int beg_line;
603 int beg_col;
604 int end_line;
605 int end_col;
606 } delayed;
607
608 rb_ast_t *ast;
609 int node_id;
610
611 st_table *warn_duplicate_keys_table;
612
613 int max_numparam;
614 ID it_id;
615
616 struct lex_context ctxt;
617
618 NODE *eval_tree_begin;
619 NODE *eval_tree;
620 const struct rb_iseq_struct *parent_iseq;
621
622#ifdef UNIVERSAL_PARSER
623 const rb_parser_config_t *config;
624#endif
625 /* compile_option */
626 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
627
628 unsigned int command_start:1;
629 unsigned int eofp: 1;
630 unsigned int ruby__end__seen: 1;
631 unsigned int debug: 1;
632 unsigned int has_shebang: 1;
633 unsigned int token_seen: 1;
634 unsigned int token_info_enabled: 1;
635# if WARN_PAST_SCOPE
636 unsigned int past_scope_enabled: 1;
637# endif
638 unsigned int error_p: 1;
639 unsigned int cr_seen: 1;
640
641 /* Streaming hash state of the source bytes read so far. */
642 rb_source_hash_state_t source_hash;
643
644#ifndef RIPPER
645 /* Ruby core only */
646
647 unsigned int do_print: 1;
648 unsigned int do_loop: 1;
649 unsigned int do_chomp: 1;
650 unsigned int do_split: 1;
651 unsigned int error_tolerant: 1;
652 unsigned int keep_tokens: 1;
653
654 VALUE error_buffer;
655 rb_parser_ary_t *debug_lines;
656 /*
657 * Store specific keyword locations to generate dummy end token.
658 * Refer to the tail of list element.
659 */
661 /* id for terms */
662 int token_id;
663 /* Array for term tokens */
664 rb_parser_ary_t *tokens;
665#else
666 /* Ripper only */
667
668 VALUE value;
669 VALUE result;
670 VALUE parsing_thread;
671 VALUE s_value; /* Token VALUE */
672 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
673 VALUE s_value_stack;
674#endif
675};
676
677#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
678#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
679#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
680static int
681numparam_id_p(struct parser_params *p, ID id)
682{
683 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
684 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
685 return idx > 0 && idx <= NUMPARAM_MAX;
686}
687static void numparam_name(struct parser_params *p, ID id);
688
689#ifdef RIPPER
690static void
691after_shift(struct parser_params *p)
692{
693 if (p->debug) {
694 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
695 }
696 rb_ary_push(p->s_value_stack, p->s_value);
697 p->s_value = Qnil;
698}
699
700static void
701before_reduce(int len, struct parser_params *p)
702{
703 // Initialize $$ with $1.
704 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
705}
706
707static void
708after_reduce(int len, struct parser_params *p)
709{
710 for (int i = 0; i < len; i++) {
711 VALUE tos = rb_ary_pop(p->s_value_stack);
712 if (p->debug) {
713 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
714 }
715 }
716 if (p->debug) {
717 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
718 }
719 rb_ary_push(p->s_value_stack, p->s_lvalue);
720 p->s_lvalue = Qnil;
721}
722
723static void
724after_shift_error_token(struct parser_params *p)
725{
726 if (p->debug) {
727 rb_parser_printf(p, "after-shift-error-token:\n");
728 }
729 rb_ary_push(p->s_value_stack, Qnil);
730}
731
732static void
733after_pop_stack(int len, struct parser_params *p)
734{
735 for (int i = 0; i < len; i++) {
736 VALUE tos = rb_ary_pop(p->s_value_stack);
737 if (p->debug) {
738 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
739 }
740 }
741}
742#else
743static void
744after_shift(struct parser_params *p)
745{
746}
747
748static void
749before_reduce(int len, struct parser_params *p)
750{
751}
752
753static void
754after_reduce(int len, struct parser_params *p)
755{
756}
757
758static void
759after_shift_error_token(struct parser_params *p)
760{
761}
762
763static void
764after_pop_stack(int len, struct parser_params *p)
765{
766}
767#endif
768
769#define intern_cstr(n,l,en) rb_intern3(n,l,en)
770
771#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
772
773#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
774#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
775#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
776#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
777#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
778#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
779
780#ifndef RIPPER
781static inline int
782char_at_end(struct parser_params *p, VALUE str, int when_empty)
783{
784 long len = RSTRING_LEN(str);
785 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
786}
787#endif
788
789static void
790pop_pvtbl(struct parser_params *p, st_table *tbl)
791{
792 st_free_table(p->pvtbl);
793 p->pvtbl = tbl;
794}
795
796static void
797pop_pktbl(struct parser_params *p, st_table *tbl)
798{
799 if (p->pktbl) st_free_table(p->pktbl);
800 p->pktbl = tbl;
801}
802
803#define STRING_BUF_DEFAULT_LEN 16
804
805static void
806string_buffer_init(struct parser_params *p)
807{
808 parser_string_buffer_t *buf = &p->lex.string_buffer;
809 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
810
811 buf->head = buf->last = xmalloc(size);
812 buf->head->len = STRING_BUF_DEFAULT_LEN;
813 buf->head->used = 0;
814 buf->head->next = NULL;
815}
816
817static void
818string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
819{
820 parser_string_buffer_t *buf = &p->lex.string_buffer;
821
822 if (buf->head->used >= buf->head->len) {
824 long n = buf->head->len * 2;
825 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
826
827 elem = xmalloc(size);
828 elem->len = n;
829 elem->used = 0;
830 elem->next = NULL;
831 buf->last->next = elem;
832 buf->last = elem;
833 }
834 buf->last->buf[buf->last->used++] = str;
835}
836
837static void
838string_buffer_free(struct parser_params *p)
839{
840 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
841
842 while (elem) {
843 parser_string_buffer_elem_t *next_elem = elem->next;
844
845 for (long i = 0; i < elem->used; i++) {
846 rb_parser_string_free(p, elem->buf[i]);
847 }
848
849 xfree(elem);
850 elem = next_elem;
851 }
852}
853
854#ifndef RIPPER
855static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
856
857static void
858debug_end_expect_token_locations(struct parser_params *p, const char *name)
859{
860 if(p->debug) {
861 VALUE mesg = rb_sprintf("%s: [", name);
862 int i = 0;
863 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
864 if (i > 0)
865 rb_str_cat_cstr(mesg, ", ");
866 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
867 i++;
868 }
869 rb_str_cat_cstr(mesg, "]\n");
870 flush_debug_buffer(p, p->debug_output, mesg);
871 }
872}
873
874static void
875push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
876{
877 if(!p->error_tolerant) return;
878
881 locations->pos = pos;
882 locations->prev = p->end_expect_token_locations;
883 p->end_expect_token_locations = locations;
884
885 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
886}
887
888static void
889pop_end_expect_token_locations(struct parser_params *p)
890{
891 if(!p->end_expect_token_locations) return;
892
893 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
894 ruby_xfree_sized(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
895 p->end_expect_token_locations = locations;
896
897 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
898}
899
901peek_end_expect_token_locations(struct parser_params *p)
902{
903 return p->end_expect_token_locations;
904}
905
906static const char *
907parser_token2char(struct parser_params *p, enum yytokentype tok)
908{
909 switch ((int) tok) {
910#define TOKEN2CHAR(tok) case tok: return (#tok);
911#define TOKEN2CHAR2(tok, name) case tok: return (name);
912 TOKEN2CHAR2(' ', "word_sep");
913 TOKEN2CHAR2('!', "!")
914 TOKEN2CHAR2('%', "%");
915 TOKEN2CHAR2('&', "&");
916 TOKEN2CHAR2('*', "*");
917 TOKEN2CHAR2('+', "+");
918 TOKEN2CHAR2('-', "-");
919 TOKEN2CHAR2('/', "/");
920 TOKEN2CHAR2('<', "<");
921 TOKEN2CHAR2('=', "=");
922 TOKEN2CHAR2('>', ">");
923 TOKEN2CHAR2('?', "?");
924 TOKEN2CHAR2('^', "^");
925 TOKEN2CHAR2('|', "|");
926 TOKEN2CHAR2('~', "~");
927 TOKEN2CHAR2(':', ":");
928 TOKEN2CHAR2(',', ",");
929 TOKEN2CHAR2('.', ".");
930 TOKEN2CHAR2(';', ";");
931 TOKEN2CHAR2('`', "`");
932 TOKEN2CHAR2('\n', "nl");
933 TOKEN2CHAR2('{', "\"{\"");
934 TOKEN2CHAR2('}', "\"}\"");
935 TOKEN2CHAR2('[', "\"[\"");
936 TOKEN2CHAR2(']', "\"]\"");
937 TOKEN2CHAR2('(', "\"(\"");
938 TOKEN2CHAR2(')', "\")\"");
939 TOKEN2CHAR2('\\', "backslash");
940 TOKEN2CHAR(keyword_class);
941 TOKEN2CHAR(keyword_module);
942 TOKEN2CHAR(keyword_def);
943 TOKEN2CHAR(keyword_undef);
944 TOKEN2CHAR(keyword_begin);
945 TOKEN2CHAR(keyword_rescue);
946 TOKEN2CHAR(keyword_ensure);
947 TOKEN2CHAR(keyword_end);
948 TOKEN2CHAR(keyword_if);
949 TOKEN2CHAR(keyword_unless);
950 TOKEN2CHAR(keyword_then);
951 TOKEN2CHAR(keyword_elsif);
952 TOKEN2CHAR(keyword_else);
953 TOKEN2CHAR(keyword_case);
954 TOKEN2CHAR(keyword_when);
955 TOKEN2CHAR(keyword_while);
956 TOKEN2CHAR(keyword_until);
957 TOKEN2CHAR(keyword_for);
958 TOKEN2CHAR(keyword_break);
959 TOKEN2CHAR(keyword_next);
960 TOKEN2CHAR(keyword_redo);
961 TOKEN2CHAR(keyword_retry);
962 TOKEN2CHAR(keyword_in);
963 TOKEN2CHAR(keyword_do);
964 TOKEN2CHAR(keyword_do_cond);
965 TOKEN2CHAR(keyword_do_block);
966 TOKEN2CHAR(keyword_do_LAMBDA);
967 TOKEN2CHAR(keyword_return);
968 TOKEN2CHAR(keyword_yield);
969 TOKEN2CHAR(keyword_super);
970 TOKEN2CHAR(keyword_self);
971 TOKEN2CHAR(keyword_nil);
972 TOKEN2CHAR(keyword_true);
973 TOKEN2CHAR(keyword_false);
974 TOKEN2CHAR(keyword_and);
975 TOKEN2CHAR(keyword_or);
976 TOKEN2CHAR(keyword_not);
977 TOKEN2CHAR(modifier_if);
978 TOKEN2CHAR(modifier_unless);
979 TOKEN2CHAR(modifier_while);
980 TOKEN2CHAR(modifier_until);
981 TOKEN2CHAR(modifier_rescue);
982 TOKEN2CHAR(keyword_alias);
983 TOKEN2CHAR(keyword_defined);
984 TOKEN2CHAR(keyword_BEGIN);
985 TOKEN2CHAR(keyword_END);
986 TOKEN2CHAR(keyword__LINE__);
987 TOKEN2CHAR(keyword__FILE__);
988 TOKEN2CHAR(keyword__ENCODING__);
989 TOKEN2CHAR(tIDENTIFIER);
990 TOKEN2CHAR(tFID);
991 TOKEN2CHAR(tGVAR);
992 TOKEN2CHAR(tIVAR);
993 TOKEN2CHAR(tCONSTANT);
994 TOKEN2CHAR(tCVAR);
995 TOKEN2CHAR(tLABEL);
996 TOKEN2CHAR(tINTEGER);
997 TOKEN2CHAR(tFLOAT);
998 TOKEN2CHAR(tRATIONAL);
999 TOKEN2CHAR(tIMAGINARY);
1000 TOKEN2CHAR(tCHAR);
1001 TOKEN2CHAR(tNTH_REF);
1002 TOKEN2CHAR(tBACK_REF);
1003 TOKEN2CHAR(tSTRING_CONTENT);
1004 TOKEN2CHAR(tREGEXP_END);
1005 TOKEN2CHAR(tDUMNY_END);
1006 TOKEN2CHAR(tSP);
1007 TOKEN2CHAR(tUPLUS);
1008 TOKEN2CHAR(tUMINUS);
1009 TOKEN2CHAR(tPOW);
1010 TOKEN2CHAR(tCMP);
1011 TOKEN2CHAR(tEQ);
1012 TOKEN2CHAR(tEQQ);
1013 TOKEN2CHAR(tNEQ);
1014 TOKEN2CHAR(tGEQ);
1015 TOKEN2CHAR(tLEQ);
1016 TOKEN2CHAR(tANDOP);
1017 TOKEN2CHAR(tOROP);
1018 TOKEN2CHAR(tMATCH);
1019 TOKEN2CHAR(tNMATCH);
1020 TOKEN2CHAR(tDOT2);
1021 TOKEN2CHAR(tDOT3);
1022 TOKEN2CHAR(tBDOT2);
1023 TOKEN2CHAR(tBDOT3);
1024 TOKEN2CHAR(tAREF);
1025 TOKEN2CHAR(tASET);
1026 TOKEN2CHAR(tLSHFT);
1027 TOKEN2CHAR(tRSHFT);
1028 TOKEN2CHAR(tANDDOT);
1029 TOKEN2CHAR(tCOLON2);
1030 TOKEN2CHAR(tCOLON3);
1031 TOKEN2CHAR(tOP_ASGN);
1032 TOKEN2CHAR(tASSOC);
1033 TOKEN2CHAR(tLPAREN);
1034 TOKEN2CHAR(tLPAREN_ARG);
1035 TOKEN2CHAR(tLBRACK);
1036 TOKEN2CHAR(tLBRACE);
1037 TOKEN2CHAR(tLBRACE_ARG);
1038 TOKEN2CHAR(tSTAR);
1039 TOKEN2CHAR(tDSTAR);
1040 TOKEN2CHAR(tAMPER);
1041 TOKEN2CHAR(tLAMBDA);
1042 TOKEN2CHAR(tSYMBEG);
1043 TOKEN2CHAR(tSTRING_BEG);
1044 TOKEN2CHAR(tXSTRING_BEG);
1045 TOKEN2CHAR(tREGEXP_BEG);
1046 TOKEN2CHAR(tWORDS_BEG);
1047 TOKEN2CHAR(tQWORDS_BEG);
1048 TOKEN2CHAR(tSYMBOLS_BEG);
1049 TOKEN2CHAR(tQSYMBOLS_BEG);
1050 TOKEN2CHAR(tSTRING_END);
1051 TOKEN2CHAR(tSTRING_DEND);
1052 TOKEN2CHAR(tSTRING_DBEG);
1053 TOKEN2CHAR(tSTRING_DVAR);
1054 TOKEN2CHAR(tLAMBEG);
1055 TOKEN2CHAR(tLABEL_END);
1056 TOKEN2CHAR(tIGNORED_NL);
1057 TOKEN2CHAR(tCOMMENT);
1058 TOKEN2CHAR(tEMBDOC_BEG);
1059 TOKEN2CHAR(tEMBDOC);
1060 TOKEN2CHAR(tEMBDOC_END);
1061 TOKEN2CHAR(tHEREDOC_BEG);
1062 TOKEN2CHAR(tHEREDOC_END);
1063 TOKEN2CHAR(k__END__);
1064 TOKEN2CHAR(tLOWEST);
1065 TOKEN2CHAR(tUMINUS_NUM);
1066 TOKEN2CHAR(tLAST_TOKEN);
1067#undef TOKEN2CHAR
1068#undef TOKEN2CHAR2
1069 }
1070
1071 rb_bug("parser_token2id: unknown token %d", tok);
1072
1073 UNREACHABLE_RETURN(0);
1074}
1075#else
1076static void
1077push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1078{
1079}
1080
1081static void
1082pop_end_expect_token_locations(struct parser_params *p)
1083{
1084}
1085#endif
1086
1087RBIMPL_ATTR_NONNULL((1, 2, 3))
1088static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1089RBIMPL_ATTR_NONNULL((1, 2))
1090static int parser_yyerror0(struct parser_params*, const char*);
1091#define yyerror0(msg) parser_yyerror0(p, (msg))
1092#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1093#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1094#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1095#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1096#define lex_eol_p(p) lex_eol_n_p(p, 0)
1097#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1098#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1099#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1100
1101static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1102static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1103static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1104static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1105static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1106
1107#ifdef RIPPER
1108#define compile_for_eval (0)
1109#else
1110#define compile_for_eval (p->parent_iseq != 0)
1111#endif
1112
1113#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1114
1115#define CALL_Q_P(q) ((q) == tANDDOT)
1116#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1117
1118#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1119
1120static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1121
1122static inline void
1123rb_discard_node(struct parser_params *p, NODE *n)
1124{
1125 rb_ast_delete_node(p->ast, n);
1126}
1127
1128static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1129static 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, NODE *nd_parent, const YYLTYPE *loc);
1130static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1131static rb_node_if_t *rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE* if_keyword_loc, const YYLTYPE* then_keyword_loc, const YYLTYPE* end_keyword_loc);
1132static 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);
1133static 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);
1134static 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);
1135static 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);
1136static 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);
1137static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *operator_loc);
1138static 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);
1139static 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);
1140static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1141static rb_node_for_t *rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *for_keyword_loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *do_keyword_loc, const YYLTYPE *end_keyword_loc);
1142static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1143static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1144static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1145static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1146static 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);
1147static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1148static 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);
1149static 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);
1150static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1151static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1152static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1153static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1154static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1155static 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);
1156static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1157static 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);
1158static 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);
1159static 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);
1160static 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);
1161static 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);
1162static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1163static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1164static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1165static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1166static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1167static rb_node_super_t *rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1168static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1169static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1170static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1171static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1172static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1173static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1174static rb_node_yield_t *rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1175static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1176static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1177static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1178static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1179static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1180static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1181static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1182static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1183static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1184static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1185static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1186static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1187static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1188static 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);
1189static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1190static 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);
1191static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1192static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1193static 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);
1194static rb_node_evstr_t *rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1195static rb_node_regx_t *rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc);
1196static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1197static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1198static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1199static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1200static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1201static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1202static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1203static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1204static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1205static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1206static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1207static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1208static 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);
1209static 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);
1210static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1211static rb_node_class_t *rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *inheritance_operator_loc, const YYLTYPE *end_keyword_loc);
1212static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *module_keyword_loc, const YYLTYPE *end_keyword_loc);
1213static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *operator_loc, const YYLTYPE *end_keyword_loc);
1214static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1215static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1216static rb_node_dot2_t *rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1217static rb_node_dot3_t *rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1218static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1219static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1220static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1221static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1222static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1223static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1224static rb_node_postexe_t *rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1225static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1226static 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);
1227static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1228static rb_node_lambda_t *rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1229static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1230static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1231static 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);
1232static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1233static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1234static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1235
1236#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1237#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1238#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1239#define NEW_IF(c,t,e,loc,ik_loc,tk_loc,ek_loc) (NODE *)rb_node_if_new(p,c,t,e,loc,ik_loc,tk_loc,ek_loc)
1240#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)
1241#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1242#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1243#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1244#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)
1245#define NEW_IN(c,t,e,loc,ik_loc,tk_loc,o_loc) (NODE *)rb_node_in_new(p,c,t,e,loc,ik_loc,tk_loc,o_loc)
1246#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)
1247#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)
1248#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1249#define NEW_FOR(i,b,loc,f_loc,i_loc,d_loc,e_loc) (NODE *)rb_node_for_new(p,i,b,loc,f_loc,i_loc,d_loc,e_loc)
1250#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1251#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1252#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1253#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1254#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1255#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1256#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1257#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1258#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1259#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1260#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1261#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1262#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1263#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1264#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1265#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)
1266#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)
1267#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1268#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1269#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1270#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1271#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1272#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1273#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1274#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1275#define NEW_SUPER(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_super_new(p,a,loc,k_loc,l_loc,r_loc)
1276#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1277#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1278#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1279#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1280#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1281#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1282#define NEW_YIELD(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_yield_new(p,a,loc,k_loc,l_loc,r_loc)
1283#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1284#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1285#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1286#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1287#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1288#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1289#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1290#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1291#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1292#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1293#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1294#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1295#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1296#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1297#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1298#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1299#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1300#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1301#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1302#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1303#define NEW_REGX(str,opts,loc,o_loc,ct_loc,c_loc) (NODE *)rb_node_regx_new(p,str,opts,loc,o_loc,ct_loc,c_loc)
1304#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1305#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1306#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1307#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1308#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1309#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1310#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1311#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1312#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1313#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1314#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1315#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1316#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1317#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1318#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1319#define NEW_CLASS(n,b,s,loc,ck_loc,io_loc,ek_loc) (NODE *)rb_node_class_new(p,n,b,s,loc,ck_loc,io_loc,ek_loc)
1320#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1321#define NEW_SCLASS(r,b,loc,ck_loc,op_loc,ek_loc) (NODE *)rb_node_sclass_new(p,r,b,loc,ck_loc,op_loc,ek_loc)
1322#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1323#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1324#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1325#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1326#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1327#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1328#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1329#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1330#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1331#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1332#define NEW_POSTEXE(b,loc,k_loc,o_loc,c_loc) (NODE *)rb_node_postexe_new(p,b,loc,k_loc,o_loc,c_loc)
1333#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1334#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1335#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1336#define NEW_LAMBDA(a,b,loc,op_loc,o_loc,c_loc) (NODE *)rb_node_lambda_new(p,a,b,loc,op_loc,o_loc,c_loc)
1337#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1338#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1339#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1340#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1341#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1342#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1343#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1344
1345enum internal_node_type {
1346 NODE_INTERNAL_ONLY = NODE_LAST,
1347 NODE_DEF_TEMP,
1348 NODE_EXITS,
1349 NODE_INTERNAL_LAST
1350};
1351
1352static const char *
1353parser_node_name(int node)
1354{
1355 switch (node) {
1356 case NODE_DEF_TEMP:
1357 return "NODE_DEF_TEMP";
1358 case NODE_EXITS:
1359 return "NODE_EXITS";
1360 default:
1361 return ruby_node_name(node);
1362 }
1363}
1364
1365/* This node is parse.y internal */
1366struct RNode_DEF_TEMP {
1367 NODE node;
1368
1369 /* for NODE_DEFN/NODE_DEFS */
1370
1371 struct RNode *nd_def;
1372 ID nd_mid;
1373
1374 struct {
1375 int max_numparam;
1376 NODE *numparam_save;
1377 struct lex_context ctxt;
1378 } save;
1379};
1380
1381#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1382
1383static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1384static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1385static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1386static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1387static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1388
1389#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1390#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1391#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1392#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1393
1394/* Make a new internal node, which should not be appeared in the
1395 * result AST and does not have node_id and location. */
1396static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1397#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1398
1399static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1400
1401static int
1402parser_get_node_id(struct parser_params *p)
1403{
1404 int node_id = p->node_id;
1405 p->node_id++;
1406 return node_id;
1407}
1408
1409static void
1410anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1411{
1412 if (id == tANDDOT) {
1413 yyerror1(loc, "&. inside multiple assignment destination");
1414 }
1415}
1416
1417static inline void
1418set_line_body(NODE *body, int line)
1419{
1420 if (!body) return;
1421 switch (nd_type(body)) {
1422 case NODE_RESCUE:
1423 case NODE_ENSURE:
1424 nd_set_line(body, line);
1425 }
1426}
1427
1428static void
1429set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1430{
1431 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1432 nd_set_line(node, beg->end_pos.lineno);
1433}
1434
1435static NODE *
1436last_expr_node(NODE *expr)
1437{
1438 while (expr) {
1439 if (nd_type_p(expr, NODE_BLOCK)) {
1440 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1441 }
1442 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1443 expr = RNODE_BEGIN(expr)->nd_body;
1444 }
1445 else {
1446 break;
1447 }
1448 }
1449 return expr;
1450}
1451
1452#ifndef RIPPER
1453#define yyparse ruby_yyparse
1454#endif
1455
1456static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1457static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1458static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1459static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1460static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1461static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1462
1463static NODE *newline_node(NODE*);
1464static void fixpos(NODE*,NODE*);
1465
1466static int value_expr(struct parser_params*,NODE*);
1467static void void_expr(struct parser_params*,NODE*);
1468static NODE *remove_begin(NODE*);
1469static NODE *void_stmts(struct parser_params*,NODE*);
1470static void reduce_nodes(struct parser_params*,NODE**);
1471static void block_dup_check(struct parser_params*,NODE*,NODE*);
1472
1473static NODE *block_append(struct parser_params*,NODE*,NODE*);
1474static NODE *list_append(struct parser_params*,NODE*,NODE*);
1475static NODE *list_concat(NODE*,NODE*);
1476static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1477static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1478static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1479static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1480static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1481static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1482static NODE *str2dstr(struct parser_params*,NODE*);
1483static NODE *evstr2dstr(struct parser_params*,NODE*);
1484static NODE *splat_array(NODE*);
1485static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1486
1487static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1488static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1489static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1490static 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);
1491static 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;}
1492static NODE *command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc);
1493
1494static bool args_info_empty_p(struct rb_args_info *args);
1495static 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*);
1496static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1497#define new_empty_args_tail(p, loc) new_args_tail(p, 0, 0, 0, loc)
1498static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1499static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1500static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1501static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1502static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1503static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1504
1505static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1506static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1507
1508static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1509static void no_blockarg(struct parser_params*,NODE*);
1510static NODE *ret_args(struct parser_params*,NODE*);
1511static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1512static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1513
1514static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1515static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1516
1517static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1518static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1519
1520static VALUE rb_backref_error(struct parser_params*,NODE*);
1521static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1522
1523static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1524static 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);
1525static 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);
1526static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1527static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1528
1529static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1530
1531static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1532static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1533
1534static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1535static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1536
1537static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1538
1539static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1540
1541#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1542
1543static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1544
1545static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1546
1547static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1548
1549static rb_ast_id_table_t *local_tbl(struct parser_params*);
1550
1551static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1552static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1553
1554static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1555static NODE *heredoc_dedent(struct parser_params*,NODE*);
1556
1557static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1558
1559static rb_locations_lambda_body_t* new_locations_lambda_body(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1560
1561#ifdef RIPPER
1562#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1563#define set_value(val) (p->s_lvalue = val)
1564static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1565static int id_is_var(struct parser_params *p, ID id);
1566#endif
1567
1568RUBY_SYMBOL_EXPORT_BEGIN
1569VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1570int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1571enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1572VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1573void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1574PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1575YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1576YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1577YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1578YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1579YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1580YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1581void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1582RUBY_SYMBOL_EXPORT_END
1583
1584static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1585static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1586static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1587static VALUE formal_argument_error(struct parser_params*, ID);
1588static ID shadowing_lvar(struct parser_params*,ID);
1589static void new_bv(struct parser_params*,ID);
1590
1591static void local_push(struct parser_params*,int);
1592static void local_pop(struct parser_params*);
1593static void local_var(struct parser_params*, ID);
1594static void arg_var(struct parser_params*, ID);
1595static int local_id(struct parser_params *p, ID id);
1596static int local_id_ref(struct parser_params*, ID, ID **);
1597#define internal_id rb_parser_internal_id
1598ID internal_id(struct parser_params*);
1599static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1600static int check_forwarding_args(struct parser_params*);
1601static void add_forwarding_args(struct parser_params *p);
1602static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1603
1604static const struct vtable *dyna_push(struct parser_params *);
1605static void dyna_pop(struct parser_params*, const struct vtable *);
1606static int dyna_in_block(struct parser_params*);
1607#define dyna_var(p, id) local_var(p, id)
1608static int dvar_defined(struct parser_params*, ID);
1609#define dvar_defined_ref rb_parser_dvar_defined_ref
1610int dvar_defined_ref(struct parser_params*, ID, ID**);
1611static int dvar_curr(struct parser_params*,ID);
1612
1613static int lvar_defined(struct parser_params*, ID);
1614
1615static NODE *numparam_push(struct parser_params *p);
1616static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1617
1618#define METHOD_NOT '!'
1619
1620#define idFWD_REST '*'
1621#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1622#define idFWD_BLOCK '&'
1623#define idFWD_ALL idDot3
1624#define arg_FWD_BLOCK idFWD_BLOCK
1625
1626#define RE_ONIG_OPTION_IGNORECASE 1
1627#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1628#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1629#define RE_OPTION_ONCE (1<<16)
1630#define RE_OPTION_ENCODING_SHIFT 8
1631#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1632#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1633#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1634#define RE_OPTION_MASK 0xff
1635#define RE_OPTION_ARG_ENCODING_NONE 32
1636
1637#define CHECK_LITERAL_WHEN (st_table *)1
1638#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1639
1640#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1641RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1642
1643#define TOKEN2ID(tok) ( \
1644 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1645 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1646 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1647 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1648 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1649 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1650 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1651
1652/****** Ripper *******/
1653
1654#ifdef RIPPER
1655
1656#include "eventids1.h"
1657#include "eventids2.h"
1658
1659extern const struct ripper_parser_ids ripper_parser_ids;
1660
1661static VALUE ripper_dispatch0(struct parser_params*,ID);
1662static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1663static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1664static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1665static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1666static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1667static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1668void ripper_error(struct parser_params *p);
1669
1670#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1671#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1672#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1673#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1674#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1675#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1676#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1677
1678#define yyparse ripper_yyparse
1679
1680static VALUE
1681aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1682{
1683 if (!NIL_P(pre_arg)) {
1684 if (!NIL_P(pre_args)) {
1685 rb_ary_unshift(pre_args, pre_arg);
1686 }
1687 else {
1688 pre_args = rb_ary_new_from_args(1, pre_arg);
1689 }
1690 }
1691 return pre_args;
1692}
1693
1694#define ID2VAL(id) STATIC_ID2SYM(id)
1695#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1696#endif /* RIPPER */
1697
1698#define KWD2EID(t, v) keyword_##t
1699
1700static NODE *
1701new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1702{
1703 body = remove_begin(body);
1704 reduce_nodes(p, &body);
1705 NODE *n = NEW_SCOPE(args, body, parent, loc);
1706 nd_set_line(n, loc->end_pos.lineno);
1707 set_line_body(body, loc->beg_pos.lineno);
1708 return n;
1709}
1710
1711static NODE *
1712rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1713 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1714{
1715 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1716 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1717 loc.beg_pos = arg_loc->beg_pos;
1718 return NEW_RESCUE(arg, rescue, 0, &loc);
1719}
1720
1721static NODE *add_block_exit(struct parser_params *p, NODE *node);
1722static rb_node_exits_t *init_block_exit(struct parser_params *p);
1723static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1724static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1725static void clear_block_exit(struct parser_params *p, bool error);
1726
1727static void
1728next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1729{
1730 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1731}
1732
1733static void
1734restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1735{
1736 /* See: def_name action */
1737 struct lex_context ctxt = temp->save.ctxt;
1738 p->ctxt.in_def = ctxt.in_def;
1739 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1740 p->ctxt.in_rescue = ctxt.in_rescue;
1741 p->max_numparam = temp->save.max_numparam;
1742 numparam_pop(p, temp->save.numparam_save);
1743 clear_block_exit(p, true);
1744}
1745
1746static void
1747endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1748{
1749 if (is_attrset_id(mid)) {
1750 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1751 }
1752 token_info_drop(p, "def", loc->beg_pos);
1753}
1754
1755#define debug_token_line(p, name, line) do { \
1756 if (p->debug) { \
1757 const char *const pcur = p->lex.pcur; \
1758 const char *const ptok = p->lex.ptok; \
1759 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1760 line, p->ruby_sourceline, \
1761 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1762 } \
1763 } while (0)
1764
1765#define begin_definition(k, loc_beg, loc_end) \
1766 do { \
1767 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1768 /* singleton class */ \
1769 p->ctxt.cant_return = !p->ctxt.in_def; \
1770 p->ctxt.in_def = 0; \
1771 } \
1772 else if (p->ctxt.in_def) { \
1773 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1774 yyerror1(&loc, k " definition in method body"); \
1775 } \
1776 else { \
1777 p->ctxt.cant_return = 1; \
1778 } \
1779 local_push(p, 0); \
1780 } while (0)
1781
1782#ifndef RIPPER
1783# define ifndef_ripper(x) (x)
1784# define ifdef_ripper(r,x) (x)
1785#else
1786# define ifndef_ripper(x)
1787# define ifdef_ripper(r,x) (r)
1788#endif
1789
1790# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1791# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1792# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1793# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1794# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1795# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1796# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1797# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1798# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1799# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1800# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1801# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1802# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1803# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1804# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1805# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1806# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1807# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1808# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1809# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1810#ifdef RIPPER
1811extern const ID id_warn, id_warning, id_gets, id_assoc;
1812# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1813# define WARN_S_L(s,l) STR_NEW(s,l)
1814# define WARN_S(s) STR_NEW2(s)
1815# define WARN_I(i) INT2NUM(i)
1816# define WARN_ID(i) rb_id2str(i)
1817# define PRIsWARN PRIsVALUE
1818# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1819# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1820# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1821# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1822# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1823# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1824# define compile_error ripper_compile_error
1825#else
1826# define WARN_S_L(s,l) s
1827# define WARN_S(s) s
1828# define WARN_I(i) i
1829# define WARN_ID(i) rb_id2name(i)
1830# define PRIsWARN PRIsVALUE
1831# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1832# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1833# define WARN_CALL rb_compile_warn
1834# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1835# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1836# define WARNING_CALL rb_compile_warning
1837PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1838# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1839#endif
1840
1841#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1842
1843static NODE *
1844add_block_exit(struct parser_params *p, NODE *node)
1845{
1846 if (!node) {
1847 compile_error(p, "unexpected null node");
1848 return 0;
1849 }
1850 switch (nd_type(node)) {
1851 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1852 default:
1853 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1854 return node;
1855 }
1856 if (!p->ctxt.in_defined) {
1857 rb_node_exits_t *exits = p->exits;
1858 if (exits) {
1859 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1860 exits->nd_stts = node;
1861 }
1862 }
1863 return node;
1864}
1865
1866static rb_node_exits_t *
1867init_block_exit(struct parser_params *p)
1868{
1869 rb_node_exits_t *old = p->exits;
1870 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1871 exits->nd_chain = 0;
1872 exits->nd_stts = RNODE(exits);
1873 p->exits = exits;
1874 return old;
1875}
1876
1877static rb_node_exits_t *
1878allow_block_exit(struct parser_params *p)
1879{
1880 rb_node_exits_t *exits = p->exits;
1881 p->exits = 0;
1882 return exits;
1883}
1884
1885static void
1886restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1887{
1888 p->exits = exits;
1889}
1890
1891static void
1892clear_block_exit(struct parser_params *p, bool error)
1893{
1894 rb_node_exits_t *exits = p->exits;
1895 if (!exits) return;
1896 if (error) {
1897 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1898 switch (nd_type(e)) {
1899 case NODE_BREAK:
1900 yyerror1(&e->nd_loc, "Invalid break");
1901 break;
1902 case NODE_NEXT:
1903 yyerror1(&e->nd_loc, "Invalid next");
1904 break;
1905 case NODE_REDO:
1906 yyerror1(&e->nd_loc, "Invalid redo");
1907 break;
1908 default:
1909 yyerror1(&e->nd_loc, "unexpected node");
1910 goto end_checks; /* no nd_chain */
1911 }
1912 }
1913 end_checks:;
1914 }
1915 exits->nd_stts = RNODE(exits);
1916 exits->nd_chain = 0;
1917}
1918
1919#define WARN_EOL(tok) \
1920 (looking_at_eol_p(p) ? \
1921 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1922 (void)0)
1923static int looking_at_eol_p(struct parser_params *p);
1924
1925static NODE *
1926get_nd_value(struct parser_params *p, NODE *node)
1927{
1928 switch (nd_type(node)) {
1929 case NODE_GASGN:
1930 return RNODE_GASGN(node)->nd_value;
1931 case NODE_IASGN:
1932 return RNODE_IASGN(node)->nd_value;
1933 case NODE_LASGN:
1934 return RNODE_LASGN(node)->nd_value;
1935 case NODE_DASGN:
1936 return RNODE_DASGN(node)->nd_value;
1937 case NODE_MASGN:
1938 return RNODE_MASGN(node)->nd_value;
1939 case NODE_CVASGN:
1940 return RNODE_CVASGN(node)->nd_value;
1941 case NODE_CDECL:
1942 return RNODE_CDECL(node)->nd_value;
1943 default:
1944 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1945 return 0;
1946 }
1947}
1948
1949static void
1950set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1951{
1952 switch (nd_type(node)) {
1953 case NODE_CDECL:
1954 RNODE_CDECL(node)->nd_value = rhs;
1955 break;
1956 case NODE_GASGN:
1957 RNODE_GASGN(node)->nd_value = rhs;
1958 break;
1959 case NODE_IASGN:
1960 RNODE_IASGN(node)->nd_value = rhs;
1961 break;
1962 case NODE_LASGN:
1963 RNODE_LASGN(node)->nd_value = rhs;
1964 break;
1965 case NODE_DASGN:
1966 RNODE_DASGN(node)->nd_value = rhs;
1967 break;
1968 case NODE_MASGN:
1969 RNODE_MASGN(node)->nd_value = rhs;
1970 break;
1971 case NODE_CVASGN:
1972 RNODE_CVASGN(node)->nd_value = rhs;
1973 break;
1974 default:
1975 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1976 break;
1977 }
1978}
1979
1980static ID
1981get_nd_vid(struct parser_params *p, NODE *node)
1982{
1983 switch (nd_type(node)) {
1984 case NODE_CDECL:
1985 return RNODE_CDECL(node)->nd_vid;
1986 case NODE_GASGN:
1987 return RNODE_GASGN(node)->nd_vid;
1988 case NODE_IASGN:
1989 return RNODE_IASGN(node)->nd_vid;
1990 case NODE_LASGN:
1991 return RNODE_LASGN(node)->nd_vid;
1992 case NODE_DASGN:
1993 return RNODE_DASGN(node)->nd_vid;
1994 case NODE_CVASGN:
1995 return RNODE_CVASGN(node)->nd_vid;
1996 default:
1997 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1998 return 0;
1999 }
2000}
2001
2002static NODE *
2003get_nd_args(struct parser_params *p, NODE *node)
2004{
2005 switch (nd_type(node)) {
2006 case NODE_CALL:
2007 return RNODE_CALL(node)->nd_args;
2008 case NODE_OPCALL:
2009 return RNODE_OPCALL(node)->nd_args;
2010 case NODE_FCALL:
2011 return RNODE_FCALL(node)->nd_args;
2012 case NODE_QCALL:
2013 return RNODE_QCALL(node)->nd_args;
2014 case NODE_SUPER:
2015 return RNODE_SUPER(node)->nd_args;
2016 case NODE_VCALL:
2017 case NODE_ZSUPER:
2018 case NODE_YIELD:
2019 case NODE_RETURN:
2020 case NODE_BREAK:
2021 case NODE_NEXT:
2022 return 0;
2023 default:
2024 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2025 return 0;
2026 }
2027}
2028
2029static st_index_t
2030djb2(const uint8_t *str, size_t len)
2031{
2032 st_index_t hash = 5381;
2033
2034 for (size_t i = 0; i < len; i++) {
2035 hash = ((hash << 5) + hash) + str[i];
2036 }
2037
2038 return hash;
2039}
2040
2041static st_index_t
2042parser_memhash(const void *ptr, long len)
2043{
2044 return djb2(ptr, len);
2045}
2046
2047#define PARSER_STRING_PTR(str) (str->ptr)
2048#define PARSER_STRING_LEN(str) (str->len)
2049#define PARSER_STRING_END(str) (&str->ptr[str->len])
2050#define STRING_SIZE(str) ((size_t)str->len + 1)
2051#define STRING_TERM_LEN(str) (1)
2052#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2053#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2054 REALLOC_N(str->ptr, char, (size_t)total + termlen); \
2055 str->len = total; \
2056} while (0)
2057#define STRING_SET_LEN(str, n) do { \
2058 (str)->len = (n); \
2059} while (0)
2060#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2061 ((ptrvar) = str->ptr, \
2062 (lenvar) = str->len)
2063
2064static inline int
2065parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2066{
2067 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2068}
2069
2070static rb_parser_string_t *
2071rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2072{
2073 rb_parser_string_t *str;
2074
2075 if (len < 0) {
2076 rb_bug("negative string size (or size too big): %ld", len);
2077 }
2078
2079 str = xcalloc(1, sizeof(rb_parser_string_t));
2080 str->ptr = xcalloc(len + 1, sizeof(char));
2081
2082 if (ptr) {
2083 memcpy(PARSER_STRING_PTR(str), ptr, len);
2084 }
2085 STRING_SET_LEN(str, len);
2086 STRING_TERM_FILL(str);
2087 return str;
2088}
2089
2090static rb_parser_string_t *
2091rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2092{
2093 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2094 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2095 str->enc = enc;
2096 return str;
2097}
2098
2099#ifndef RIPPER
2100rb_parser_string_t *
2101rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2102{
2103 /* Type check */
2104 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2105 RB_GC_GUARD(str);
2106 return ret;
2107}
2108
2109void
2110rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2111{
2112 if (!str) return;
2113 xfree(PARSER_STRING_PTR(str));
2114 xfree(str);
2115}
2116#endif
2117
2118static st_index_t
2119rb_parser_str_hash(rb_parser_string_t *str)
2120{
2121 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2122}
2123
2124static st_index_t
2125rb_char_p_hash(const char *c)
2126{
2127 return parser_memhash((const void *)c, strlen(c));
2128}
2129
2130static size_t
2131rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2132{
2133 return PARSER_STRING_LEN(str);
2134}
2135
2136#ifndef RIPPER
2137static char *
2138rb_parser_string_end(rb_parser_string_t *str)
2139{
2140 return &str->ptr[str->len];
2141}
2142#endif
2143
2144static void
2145rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2146{
2147 str->enc = enc;
2148}
2149
2150static rb_encoding *
2151rb_parser_str_get_encoding(rb_parser_string_t *str)
2152{
2153 return str->enc;
2154}
2155
2156#ifndef RIPPER
2157static bool
2158PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2159{
2160 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2161}
2162#endif
2163
2164static int
2165PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2166{
2167 return str->coderange;
2168}
2169
2170static void
2171PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2172{
2173 str->coderange = coderange;
2174}
2175
2176static void
2177PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2178{
2179 rb_parser_string_set_encoding(str, enc);
2180 PARSER_ENC_CODERANGE_SET(str, cr);
2181}
2182
2183static void
2184PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2185{
2186 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2187}
2188
2189static bool
2190PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2191{
2192 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2193}
2194
2195static bool
2196PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2197{
2198 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2199}
2200
2201static const char *
2202rb_parser_search_nonascii(const char *p, const char *e)
2203{
2204 const char *s = p;
2205
2206 for (; s < e; s++) {
2207 if (*s & 0x80) return s;
2208 }
2209
2210 return NULL;
2211}
2212
2213static int
2214rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2215{
2216 const char *e = ptr + len;
2217
2218 if (enc == rb_ascii8bit_encoding()) {
2219 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2220 ptr = rb_parser_search_nonascii(ptr, e);
2221 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2222 }
2223
2224 /* parser string encoding is always asciicompat */
2225 ptr = rb_parser_search_nonascii(ptr, e);
2226 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2227 for (;;) {
2228 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2229 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2230 ptr += MBCLEN_CHARFOUND_LEN(ret);
2231 if (ptr == e) break;
2232 ptr = rb_parser_search_nonascii(ptr, e);
2233 if (!ptr) break;
2234 }
2235
2236 return RB_PARSER_ENC_CODERANGE_VALID;
2237}
2238
2239static int
2240rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2241{
2242 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2243}
2244
2245static int
2246rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2247{
2248 int cr = PARSER_ENC_CODERANGE(str);
2249
2250 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2251 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2252 PARSER_ENC_CODERANGE_SET(str, cr);
2253 }
2254
2255 return cr;
2256}
2257
2258static rb_parser_string_t *
2259rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2260{
2261 if (rb_parser_str_get_encoding(str) == enc)
2262 return str;
2263 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2264 PARSER_ENC_CODERANGE_CLEAR(str);
2265 }
2266 rb_parser_string_set_encoding(str, enc);
2267 return str;
2268}
2269
2270static bool
2271rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2272{
2273 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2274}
2275
2276static rb_encoding *
2277rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2278{
2279 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2280 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2281
2282 if (enc1 == NULL || enc2 == NULL)
2283 return 0;
2284
2285 if (enc1 == enc2) {
2286 return enc1;
2287 }
2288
2289 if (PARSER_STRING_LEN(str2) == 0)
2290 return enc1;
2291 if (PARSER_STRING_LEN(str1) == 0)
2292 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2293
2294 int cr1, cr2;
2295
2296 cr1 = rb_parser_enc_str_coderange(p, str1);
2297 cr2 = rb_parser_enc_str_coderange(p, str2);
2298
2299 if (cr1 != cr2) {
2300 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2301 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2302 }
2303
2304 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2305 return enc1;
2306 }
2307
2308 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2309 return enc2;
2310 }
2311
2312 return 0;
2313}
2314
2315static void
2316rb_parser_str_modify(rb_parser_string_t *str)
2317{
2318 PARSER_ENC_CODERANGE_CLEAR(str);
2319}
2320
2321static void
2322rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2323{
2324 long capa;
2325 const int termlen = STRING_TERM_LEN(str);
2326
2327 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2328 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2329 }
2330
2331 int cr = PARSER_ENC_CODERANGE(str);
2332 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2333 /* Leave unknown. */
2334 }
2335 else if (len > PARSER_STRING_LEN(str)) {
2336 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2337 }
2338 else if (len < PARSER_STRING_LEN(str)) {
2339 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2340 /* ASCII-only string is keeping after truncated. Valid
2341 * and broken may be invalid or valid, leave unknown. */
2342 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2343 }
2344 }
2345
2346 STRING_SET_LEN(str, len);
2347 STRING_TERM_FILL(str);
2348}
2349
2350static rb_parser_string_t *
2351rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2352{
2353 rb_parser_str_modify(str);
2354 if (len == 0) return 0;
2355
2356 long total, olen, off = -1;
2357 char *sptr;
2358 const int termlen = STRING_TERM_LEN(str);
2359
2360 PARSER_STRING_GETMEM(str, sptr, olen);
2361 if (ptr >= sptr && ptr <= sptr + olen) {
2362 off = ptr - sptr;
2363 }
2364
2365 if (olen > LONG_MAX - len) {
2366 compile_error(p, "string sizes too big");
2367 return 0;
2368 }
2369 total = olen + len;
2370 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2371 sptr = PARSER_STRING_PTR(str);
2372 if (off != -1) {
2373 ptr = sptr + off;
2374 }
2375 memcpy(sptr + olen, ptr, len);
2376 STRING_SET_LEN(str, total);
2377 STRING_TERM_FILL(str);
2378
2379 return str;
2380}
2381
2382#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2383#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2384
2385static rb_parser_string_t *
2386rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2387 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2388{
2389 int str_cr, res_cr;
2390 rb_encoding *str_enc, *res_enc;
2391
2392 str_enc = rb_parser_str_get_encoding(str);
2393 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2394
2395 if (str_enc == ptr_enc) {
2396 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2397 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2398 }
2399 }
2400 else {
2401 /* parser string encoding is always asciicompat */
2402 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2403 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2404 }
2405 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2406 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2407 str_cr = rb_parser_enc_str_coderange(p, str);
2408 }
2409 }
2410 }
2411 if (ptr_cr_ret)
2412 *ptr_cr_ret = ptr_cr;
2413
2414 if (str_enc != ptr_enc &&
2415 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2416 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2417 goto incompatible;
2418 }
2419
2420 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2421 res_enc = str_enc;
2422 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2423 }
2424 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2425 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2426 res_enc = str_enc;
2427 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2428 }
2429 else {
2430 res_enc = ptr_enc;
2431 res_cr = ptr_cr;
2432 }
2433 }
2434 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2435 res_enc = str_enc;
2436 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2437 res_cr = str_cr;
2438 else
2439 res_cr = ptr_cr;
2440 }
2441 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2442 res_enc = str_enc;
2443 res_cr = str_cr;
2444 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2445 }
2446
2447 if (len < 0) {
2448 compile_error(p, "negative string size (or size too big)");
2449 }
2450 parser_str_cat(str, ptr, len);
2451 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2452 return str;
2453
2454 incompatible:
2455 compile_error(p, "incompatible character encodings: %s and %s",
2456 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2457 UNREACHABLE_RETURN(0);
2458
2459}
2460
2461static rb_parser_string_t *
2462rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2463 rb_encoding *ptr_enc)
2464{
2465 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2466}
2467
2468static rb_parser_string_t *
2469rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2470{
2471 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2472
2473 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2474 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2475
2476 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2477
2478 return str;
2479}
2480
2481static rb_parser_string_t *
2482rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2483{
2484 if (len < 0) {
2485 rb_bug("negative string size (or size too big)");
2486 }
2487
2488 long slen = PARSER_STRING_LEN(str);
2489
2490 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2491 PARSER_ENC_CODERANGE_CLEAR(str);
2492 }
2493
2494 {
2495 long capa;
2496 const int termlen = STRING_TERM_LEN(str);
2497
2498 if ((capa = slen) < len) {
2499 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2500 }
2501 else if (len == slen) return str;
2502 STRING_SET_LEN(str, len);
2503 STRING_TERM_FILL(str);
2504 }
2505 return str;
2506}
2507
2508# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2509 ((ptrvar) = str->ptr, \
2510 (lenvar) = str->len, \
2511 (encvar) = str->enc)
2512
2513static int
2514rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2515{
2516 long len1, len2;
2517 const char *ptr1, *ptr2;
2518 rb_encoding *enc1, *enc2;
2519
2520 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2521 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2522
2523 return (len1 != len2 ||
2524 enc1 != enc2 ||
2525 memcmp(ptr1, ptr2, len1) != 0);
2526}
2527
2528static void
2529rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2530{
2531 long i;
2532 if (ary->capa < len) {
2533 ary->capa = len;
2534 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2535 for (i = ary->len; i < len; i++) {
2536 ary->data[i] = 0;
2537 }
2538 }
2539}
2540
2541/*
2542 * Do not call this directly.
2543 * Use rb_parser_ary_new_capa_for_XXX() instead.
2544 */
2545static rb_parser_ary_t *
2546parser_ary_new_capa(rb_parser_t *p, long len)
2547{
2548 if (len < 0) {
2549 rb_bug("negative array size (or size too big): %ld", len);
2550 }
2551 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2552 ary->data_type = 0;
2553 ary->len = 0;
2554 ary->capa = len;
2555 if (0 < len) {
2556 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2557 }
2558 else {
2559 ary->data = NULL;
2560 }
2561 return ary;
2562}
2563
2564#ifndef RIPPER
2565static rb_parser_ary_t *
2566rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2567{
2568 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2569 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2570 return ary;
2571}
2572
2573static rb_parser_ary_t *
2574rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2575{
2576 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2577 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2578 return ary;
2579}
2580#endif
2581
2582static rb_parser_ary_t *
2583rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2584{
2585 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2586 ary->data_type = PARSER_ARY_DATA_NODE;
2587 return ary;
2588}
2589
2590/*
2591 * Do not call this directly.
2592 * Use rb_parser_ary_push_XXX() instead.
2593 */
2594static rb_parser_ary_t *
2595parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2596{
2597 if (ary->len == ary->capa) {
2598 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2599 }
2600 ary->data[ary->len++] = val;
2601 return ary;
2602}
2603
2604#ifndef RIPPER
2605static rb_parser_ary_t *
2606rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2607{
2608 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2609 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2610 }
2611 return parser_ary_push(p, ary, val);
2612}
2613
2614static rb_parser_ary_t *
2615rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2616{
2617 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2618 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2619 }
2620 return parser_ary_push(p, ary, val);
2621}
2622#endif
2623
2624static rb_parser_ary_t *
2625rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2626{
2627 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2628 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2629 }
2630 return parser_ary_push(p, ary, val);
2631}
2632
2633#ifndef RIPPER
2634static void
2635rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2636{
2637 if (!token) return;
2638 rb_parser_string_free(p, token->str);
2639 xfree(token);
2640}
2641
2642static void
2643rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2644{
2645# define foreach_ary(ptr) \
2646 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2647 ptr < end_ary_data; ptr++)
2648 switch (ary->data_type) {
2649 case PARSER_ARY_DATA_AST_TOKEN:
2650 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2651 break;
2652 case PARSER_ARY_DATA_SCRIPT_LINE:
2653 foreach_ary(data) {rb_parser_string_free(p, *data);}
2654 break;
2655 case PARSER_ARY_DATA_NODE:
2656 /* Do nothing because nodes are freed when rb_ast_t is freed */
2657 break;
2658 default:
2659 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2660 break;
2661 }
2662# undef foreach_ary
2663 xfree(ary->data);
2664 xfree(ary);
2665}
2666
2667#endif /* !RIPPER */
2668
2669#line 2670 "parse.c"
2670
2671# ifndef YY_CAST
2672# ifdef __cplusplus
2673# define YY_CAST(Type, Val) static_cast<Type> (Val)
2674# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2675# else
2676# define YY_CAST(Type, Val) ((Type) (Val))
2677# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2678# endif
2679# endif
2680# ifndef YY_NULLPTR
2681# if defined __cplusplus
2682# if 201103L <= __cplusplus
2683# define YY_NULLPTR nullptr
2684# else
2685# define YY_NULLPTR 0
2686# endif
2687# else
2688# define YY_NULLPTR ((void*)0)
2689# endif
2690# endif
2691
2692#include "parse.h"
2693/* Symbol kind. */
2694enum yysymbol_kind_t
2695{
2696 YYSYMBOL_YYEMPTY = -2,
2697 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2698 YYSYMBOL_YYerror = 1, /* error */
2699 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2700 YYSYMBOL_keyword_class = 3, /* "'class'" */
2701 YYSYMBOL_keyword_module = 4, /* "'module'" */
2702 YYSYMBOL_keyword_def = 5, /* "'def'" */
2703 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2704 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2705 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2706 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2707 YYSYMBOL_keyword_end = 10, /* "'end'" */
2708 YYSYMBOL_keyword_if = 11, /* "'if'" */
2709 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2710 YYSYMBOL_keyword_then = 13, /* "'then'" */
2711 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2712 YYSYMBOL_keyword_else = 15, /* "'else'" */
2713 YYSYMBOL_keyword_case = 16, /* "'case'" */
2714 YYSYMBOL_keyword_when = 17, /* "'when'" */
2715 YYSYMBOL_keyword_while = 18, /* "'while'" */
2716 YYSYMBOL_keyword_until = 19, /* "'until'" */
2717 YYSYMBOL_keyword_for = 20, /* "'for'" */
2718 YYSYMBOL_keyword_break = 21, /* "'break'" */
2719 YYSYMBOL_keyword_next = 22, /* "'next'" */
2720 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2721 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2722 YYSYMBOL_keyword_in = 25, /* "'in'" */
2723 YYSYMBOL_keyword_do = 26, /* "'do'" */
2724 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2725 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2726 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2727 YYSYMBOL_keyword_return = 30, /* "'return'" */
2728 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2729 YYSYMBOL_keyword_super = 32, /* "'super'" */
2730 YYSYMBOL_keyword_self = 33, /* "'self'" */
2731 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2732 YYSYMBOL_keyword_true = 35, /* "'true'" */
2733 YYSYMBOL_keyword_false = 36, /* "'false'" */
2734 YYSYMBOL_keyword_and = 37, /* "'and'" */
2735 YYSYMBOL_keyword_or = 38, /* "'or'" */
2736 YYSYMBOL_keyword_not = 39, /* "'not'" */
2737 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2738 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2739 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2740 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2741 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2742 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2743 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2744 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2745 YYSYMBOL_keyword_END = 48, /* "'END'" */
2746 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2747 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2748 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2749 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2750 YYSYMBOL_tFID = 53, /* "method" */
2751 YYSYMBOL_tGVAR = 54, /* "global variable" */
2752 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2753 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2754 YYSYMBOL_tCVAR = 57, /* "class variable" */
2755 YYSYMBOL_tLABEL = 58, /* "label" */
2756 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2757 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2758 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2759 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2760 YYSYMBOL_tCHAR = 63, /* "char literal" */
2761 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2762 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2763 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2764 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2765 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2766 YYSYMBOL_69_ = 69, /* '.' */
2767 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2768 YYSYMBOL_tSP = 71, /* "escaped space" */
2769 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2770 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2771 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2772 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2773 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2774 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2775 YYSYMBOL_tPOW = 78, /* "**" */
2776 YYSYMBOL_tCMP = 79, /* "<=>" */
2777 YYSYMBOL_tEQ = 80, /* "==" */
2778 YYSYMBOL_tEQQ = 81, /* "===" */
2779 YYSYMBOL_tNEQ = 82, /* "!=" */
2780 YYSYMBOL_tGEQ = 83, /* ">=" */
2781 YYSYMBOL_tLEQ = 84, /* "<=" */
2782 YYSYMBOL_tANDOP = 85, /* "&&" */
2783 YYSYMBOL_tOROP = 86, /* "||" */
2784 YYSYMBOL_tMATCH = 87, /* "=~" */
2785 YYSYMBOL_tNMATCH = 88, /* "!~" */
2786 YYSYMBOL_tDOT2 = 89, /* ".." */
2787 YYSYMBOL_tDOT3 = 90, /* "..." */
2788 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2789 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2790 YYSYMBOL_tAREF = 93, /* "[]" */
2791 YYSYMBOL_tASET = 94, /* "[]=" */
2792 YYSYMBOL_tLSHFT = 95, /* "<<" */
2793 YYSYMBOL_tRSHFT = 96, /* ">>" */
2794 YYSYMBOL_tANDDOT = 97, /* "&." */
2795 YYSYMBOL_tCOLON2 = 98, /* "::" */
2796 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2797 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2798 YYSYMBOL_tASSOC = 101, /* "=>" */
2799 YYSYMBOL_tLPAREN = 102, /* "(" */
2800 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2801 YYSYMBOL_tLBRACK = 104, /* "[" */
2802 YYSYMBOL_tLBRACE = 105, /* "{" */
2803 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2804 YYSYMBOL_tSTAR = 107, /* "*" */
2805 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2806 YYSYMBOL_tAMPER = 109, /* "&" */
2807 YYSYMBOL_tLAMBDA = 110, /* "->" */
2808 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2809 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2810 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2811 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2812 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2813 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2814 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2815 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2816 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2817 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2818 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2819 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2820 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2821 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2822 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2823 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2824 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2825 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2826 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2827 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2828 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2829 YYSYMBOL_k__END__ = 132, /* k__END__ */
2830 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2831 YYSYMBOL_134_ = 134, /* '=' */
2832 YYSYMBOL_135_ = 135, /* '?' */
2833 YYSYMBOL_136_ = 136, /* ':' */
2834 YYSYMBOL_137_ = 137, /* '>' */
2835 YYSYMBOL_138_ = 138, /* '<' */
2836 YYSYMBOL_139_ = 139, /* '|' */
2837 YYSYMBOL_140_ = 140, /* '^' */
2838 YYSYMBOL_141_ = 141, /* '&' */
2839 YYSYMBOL_142_ = 142, /* '+' */
2840 YYSYMBOL_143_ = 143, /* '-' */
2841 YYSYMBOL_144_ = 144, /* '*' */
2842 YYSYMBOL_145_ = 145, /* '/' */
2843 YYSYMBOL_146_ = 146, /* '%' */
2844 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2845 YYSYMBOL_148_ = 148, /* '!' */
2846 YYSYMBOL_149_ = 149, /* '~' */
2847 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2848 YYSYMBOL_151_ = 151, /* '{' */
2849 YYSYMBOL_152_ = 152, /* '}' */
2850 YYSYMBOL_153_ = 153, /* '[' */
2851 YYSYMBOL_154_n_ = 154, /* '\n' */
2852 YYSYMBOL_155_ = 155, /* ',' */
2853 YYSYMBOL_156_ = 156, /* '`' */
2854 YYSYMBOL_157_ = 157, /* '(' */
2855 YYSYMBOL_158_ = 158, /* ')' */
2856 YYSYMBOL_159_ = 159, /* ']' */
2857 YYSYMBOL_160_ = 160, /* ';' */
2858 YYSYMBOL_161_ = 161, /* ' ' */
2859 YYSYMBOL_YYACCEPT = 162, /* $accept */
2860 YYSYMBOL_option_terms = 163, /* option_terms */
2861 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2862 YYSYMBOL_165_1 = 165, /* $@1 */
2863 YYSYMBOL_program = 166, /* program */
2864 YYSYMBOL_top_stmts = 167, /* top_stmts */
2865 YYSYMBOL_top_stmt = 168, /* top_stmt */
2866 YYSYMBOL_block_open = 169, /* block_open */
2867 YYSYMBOL_begin_block = 170, /* begin_block */
2868 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2869 YYSYMBOL_172_2 = 172, /* $@2 */
2870 YYSYMBOL_173_3 = 173, /* $@3 */
2871 YYSYMBOL_bodystmt = 174, /* bodystmt */
2872 YYSYMBOL_175_4 = 175, /* $@4 */
2873 YYSYMBOL_stmts = 176, /* stmts */
2874 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2875 YYSYMBOL_178_5 = 178, /* $@5 */
2876 YYSYMBOL_allow_exits = 179, /* allow_exits */
2877 YYSYMBOL_k_END = 180, /* k_END */
2878 YYSYMBOL_181_6 = 181, /* $@6 */
2879 YYSYMBOL_stmt = 182, /* stmt */
2880 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2881 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2882 YYSYMBOL_command_asgn = 185, /* command_asgn */
2883 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2884 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2885 YYSYMBOL_endless_command = 188, /* endless_command */
2886 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2887 YYSYMBOL_command_rhs = 190, /* command_rhs */
2888 YYSYMBOL_expr = 191, /* expr */
2889 YYSYMBOL_192_7 = 192, /* $@7 */
2890 YYSYMBOL_193_8 = 193, /* $@8 */
2891 YYSYMBOL_def_name = 194, /* def_name */
2892 YYSYMBOL_defn_head = 195, /* defn_head */
2893 YYSYMBOL_196_9 = 196, /* $@9 */
2894 YYSYMBOL_defs_head = 197, /* defs_head */
2895 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2896 YYSYMBOL_expr_value = 199, /* expr_value */
2897 YYSYMBOL_200_10 = 200, /* $@10 */
2898 YYSYMBOL_201_11 = 201, /* $@11 */
2899 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2900 YYSYMBOL_command_call = 203, /* command_call */
2901 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2902 YYSYMBOL_command_call_value = 205, /* command_call_value */
2903 YYSYMBOL_block_command = 206, /* block_command */
2904 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2905 YYSYMBOL_fcall = 208, /* fcall */
2906 YYSYMBOL_command = 209, /* command */
2907 YYSYMBOL_mlhs = 210, /* mlhs */
2908 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2909 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2910 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2911 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2912 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2913 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2914 YYSYMBOL_lhs = 217, /* lhs */
2915 YYSYMBOL_cname = 218, /* cname */
2916 YYSYMBOL_cpath = 219, /* cpath */
2917 YYSYMBOL_fname = 220, /* fname */
2918 YYSYMBOL_fitem = 221, /* fitem */
2919 YYSYMBOL_undef_list = 222, /* undef_list */
2920 YYSYMBOL_223_12 = 223, /* $@12 */
2921 YYSYMBOL_op = 224, /* op */
2922 YYSYMBOL_reswords = 225, /* reswords */
2923 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2924 YYSYMBOL_arg = 227, /* arg */
2925 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2926 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2927 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2928 YYSYMBOL_ternary = 231, /* ternary */
2929 YYSYMBOL_endless_arg = 232, /* endless_arg */
2930 YYSYMBOL_relop = 233, /* relop */
2931 YYSYMBOL_rel_expr = 234, /* rel_expr */
2932 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2933 YYSYMBOL_begin_defined = 236, /* begin_defined */
2934 YYSYMBOL_after_rescue = 237, /* after_rescue */
2935 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2936 YYSYMBOL_arg_value = 239, /* arg_value */
2937 YYSYMBOL_aref_args = 240, /* aref_args */
2938 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2939 YYSYMBOL_paren_args = 242, /* paren_args */
2940 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2941 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2942 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2943 YYSYMBOL_call_args = 246, /* call_args */
2944 YYSYMBOL_247_13 = 247, /* $@13 */
2945 YYSYMBOL_command_args = 248, /* command_args */
2946 YYSYMBOL_block_arg = 249, /* block_arg */
2947 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2948 YYSYMBOL_args = 251, /* args */
2949 YYSYMBOL_arg_splat = 252, /* arg_splat */
2950 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2951 YYSYMBOL_mrhs = 254, /* mrhs */
2952 YYSYMBOL_primary = 255, /* primary */
2953 YYSYMBOL_256_14 = 256, /* $@14 */
2954 YYSYMBOL_257_15 = 257, /* $@15 */
2955 YYSYMBOL_258_16 = 258, /* @16 */
2956 YYSYMBOL_259_17 = 259, /* @17 */
2957 YYSYMBOL_260_18 = 260, /* $@18 */
2958 YYSYMBOL_261_19 = 261, /* $@19 */
2959 YYSYMBOL_262_20 = 262, /* $@20 */
2960 YYSYMBOL_263_21 = 263, /* $@21 */
2961 YYSYMBOL_264_22 = 264, /* $@22 */
2962 YYSYMBOL_265_23 = 265, /* $@23 */
2963 YYSYMBOL_266_24 = 266, /* $@24 */
2964 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2965 YYSYMBOL_primary_value = 268, /* primary_value */
2966 YYSYMBOL_k_begin = 269, /* k_begin */
2967 YYSYMBOL_k_if = 270, /* k_if */
2968 YYSYMBOL_k_unless = 271, /* k_unless */
2969 YYSYMBOL_k_while = 272, /* k_while */
2970 YYSYMBOL_k_until = 273, /* k_until */
2971 YYSYMBOL_k_case = 274, /* k_case */
2972 YYSYMBOL_k_for = 275, /* k_for */
2973 YYSYMBOL_k_class = 276, /* k_class */
2974 YYSYMBOL_k_module = 277, /* k_module */
2975 YYSYMBOL_k_def = 278, /* k_def */
2976 YYSYMBOL_k_do = 279, /* k_do */
2977 YYSYMBOL_k_do_block = 280, /* k_do_block */
2978 YYSYMBOL_k_rescue = 281, /* k_rescue */
2979 YYSYMBOL_k_ensure = 282, /* k_ensure */
2980 YYSYMBOL_k_when = 283, /* k_when */
2981 YYSYMBOL_k_else = 284, /* k_else */
2982 YYSYMBOL_k_elsif = 285, /* k_elsif */
2983 YYSYMBOL_k_end = 286, /* k_end */
2984 YYSYMBOL_k_return = 287, /* k_return */
2985 YYSYMBOL_k_yield = 288, /* k_yield */
2986 YYSYMBOL_then = 289, /* then */
2987 YYSYMBOL_do = 290, /* do */
2988 YYSYMBOL_if_tail = 291, /* if_tail */
2989 YYSYMBOL_opt_else = 292, /* opt_else */
2990 YYSYMBOL_for_var = 293, /* for_var */
2991 YYSYMBOL_f_marg = 294, /* f_marg */
2992 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
2993 YYSYMBOL_f_margs = 296, /* f_margs */
2994 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2995 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2996 YYSYMBOL_299_25 = 299, /* $@25 */
2997 YYSYMBOL_f_eq = 300, /* f_eq */
2998 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
2999 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3000 YYSYMBOL_opt_f_block_arg_none = 303, /* opt_f_block_arg_none */
3001 YYSYMBOL_args_tail_basic_primary_value_none = 304, /* args_tail_basic_primary_value_none */
3002 YYSYMBOL_block_args_tail = 305, /* block_args_tail */
3003 YYSYMBOL_excessed_comma = 306, /* excessed_comma */
3004 YYSYMBOL_f_opt_primary_value = 307, /* f_opt_primary_value */
3005 YYSYMBOL_f_opt_arg_primary_value = 308, /* f_opt_arg_primary_value */
3006 YYSYMBOL_opt_args_tail_block_args_tail_none = 309, /* opt_args_tail_block_args_tail_none */
3007 YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none = 310, /* args-list_primary_value_opt_args_tail_block_args_tail_none */
3008 YYSYMBOL_block_param = 311, /* block_param */
3009 YYSYMBOL_tail_only_args_block_args_tail = 312, /* tail-only-args_block_args_tail */
3010 YYSYMBOL_opt_block_param_def = 313, /* opt_block_param_def */
3011 YYSYMBOL_block_param_def = 314, /* block_param_def */
3012 YYSYMBOL_opt_block_param = 315, /* opt_block_param */
3013 YYSYMBOL_opt_bv_decl = 316, /* opt_bv_decl */
3014 YYSYMBOL_bv_decls = 317, /* bv_decls */
3015 YYSYMBOL_bvar = 318, /* bvar */
3016 YYSYMBOL_max_numparam = 319, /* max_numparam */
3017 YYSYMBOL_numparam = 320, /* numparam */
3018 YYSYMBOL_it_id = 321, /* it_id */
3019 YYSYMBOL_322_26 = 322, /* @26 */
3020 YYSYMBOL_323_27 = 323, /* $@27 */
3021 YYSYMBOL_lambda = 324, /* lambda */
3022 YYSYMBOL_f_larglist = 325, /* f_larglist */
3023 YYSYMBOL_lambda_body = 326, /* lambda_body */
3024 YYSYMBOL_327_28 = 327, /* $@28 */
3025 YYSYMBOL_do_block = 328, /* do_block */
3026 YYSYMBOL_block_call = 329, /* block_call */
3027 YYSYMBOL_method_call = 330, /* method_call */
3028 YYSYMBOL_brace_block = 331, /* brace_block */
3029 YYSYMBOL_332_29 = 332, /* @29 */
3030 YYSYMBOL_brace_body = 333, /* brace_body */
3031 YYSYMBOL_334_30 = 334, /* @30 */
3032 YYSYMBOL_do_body = 335, /* do_body */
3033 YYSYMBOL_case_args = 336, /* case_args */
3034 YYSYMBOL_case_body = 337, /* case_body */
3035 YYSYMBOL_cases = 338, /* cases */
3036 YYSYMBOL_p_pvtbl = 339, /* p_pvtbl */
3037 YYSYMBOL_p_pktbl = 340, /* p_pktbl */
3038 YYSYMBOL_p_in_kwarg = 341, /* p_in_kwarg */
3039 YYSYMBOL_342_31 = 342, /* $@31 */
3040 YYSYMBOL_p_case_body = 343, /* p_case_body */
3041 YYSYMBOL_p_cases = 344, /* p_cases */
3042 YYSYMBOL_p_top_expr = 345, /* p_top_expr */
3043 YYSYMBOL_p_top_expr_body = 346, /* p_top_expr_body */
3044 YYSYMBOL_p_expr = 347, /* p_expr */
3045 YYSYMBOL_p_as = 348, /* p_as */
3046 YYSYMBOL_349_32 = 349, /* $@32 */
3047 YYSYMBOL_p_alt = 350, /* p_alt */
3048 YYSYMBOL_p_lparen = 351, /* p_lparen */
3049 YYSYMBOL_p_lbracket = 352, /* p_lbracket */
3050 YYSYMBOL_p_expr_basic = 353, /* p_expr_basic */
3051 YYSYMBOL_354_33 = 354, /* $@33 */
3052 YYSYMBOL_p_args = 355, /* p_args */
3053 YYSYMBOL_p_args_head = 356, /* p_args_head */
3054 YYSYMBOL_p_args_tail = 357, /* p_args_tail */
3055 YYSYMBOL_p_find = 358, /* p_find */
3056 YYSYMBOL_p_rest = 359, /* p_rest */
3057 YYSYMBOL_p_args_post = 360, /* p_args_post */
3058 YYSYMBOL_p_arg = 361, /* p_arg */
3059 YYSYMBOL_p_kwargs = 362, /* p_kwargs */
3060 YYSYMBOL_p_kwarg = 363, /* p_kwarg */
3061 YYSYMBOL_p_kw = 364, /* p_kw */
3062 YYSYMBOL_p_kw_label = 365, /* p_kw_label */
3063 YYSYMBOL_p_kwrest = 366, /* p_kwrest */
3064 YYSYMBOL_p_kwnorest = 367, /* p_kwnorest */
3065 YYSYMBOL_p_any_kwrest = 368, /* p_any_kwrest */
3066 YYSYMBOL_p_value = 369, /* p_value */
3067 YYSYMBOL_range_expr_p_primitive = 370, /* range_expr_p_primitive */
3068 YYSYMBOL_p_primitive = 371, /* p_primitive */
3069 YYSYMBOL_p_variable = 372, /* p_variable */
3070 YYSYMBOL_p_var_ref = 373, /* p_var_ref */
3071 YYSYMBOL_p_expr_ref = 374, /* p_expr_ref */
3072 YYSYMBOL_p_const = 375, /* p_const */
3073 YYSYMBOL_opt_rescue = 376, /* opt_rescue */
3074 YYSYMBOL_exc_list = 377, /* exc_list */
3075 YYSYMBOL_exc_var = 378, /* exc_var */
3076 YYSYMBOL_opt_ensure = 379, /* opt_ensure */
3077 YYSYMBOL_literal = 380, /* literal */
3078 YYSYMBOL_strings = 381, /* strings */
3079 YYSYMBOL_string = 382, /* string */
3080 YYSYMBOL_string1 = 383, /* string1 */
3081 YYSYMBOL_xstring = 384, /* xstring */
3082 YYSYMBOL_regexp = 385, /* regexp */
3083 YYSYMBOL_nonempty_list__ = 386, /* nonempty_list_' ' */
3084 YYSYMBOL_words_tWORDS_BEG_word_list = 387, /* words_tWORDS_BEG_word_list */
3085 YYSYMBOL_words = 388, /* words */
3086 YYSYMBOL_word_list = 389, /* word_list */
3087 YYSYMBOL_word = 390, /* word */
3088 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 391, /* words_tSYMBOLS_BEG_symbol_list */
3089 YYSYMBOL_symbols = 392, /* symbols */
3090 YYSYMBOL_symbol_list = 393, /* symbol_list */
3091 YYSYMBOL_words_tQWORDS_BEG_qword_list = 394, /* words_tQWORDS_BEG_qword_list */
3092 YYSYMBOL_qwords = 395, /* qwords */
3093 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 396, /* words_tQSYMBOLS_BEG_qsym_list */
3094 YYSYMBOL_qsymbols = 397, /* qsymbols */
3095 YYSYMBOL_qword_list = 398, /* qword_list */
3096 YYSYMBOL_qsym_list = 399, /* qsym_list */
3097 YYSYMBOL_string_contents = 400, /* string_contents */
3098 YYSYMBOL_xstring_contents = 401, /* xstring_contents */
3099 YYSYMBOL_regexp_contents = 402, /* regexp_contents */
3100 YYSYMBOL_string_content = 403, /* string_content */
3101 YYSYMBOL_404_34 = 404, /* @34 */
3102 YYSYMBOL_405_35 = 405, /* @35 */
3103 YYSYMBOL_406_36 = 406, /* @36 */
3104 YYSYMBOL_407_37 = 407, /* @37 */
3105 YYSYMBOL_408_38 = 408, /* @38 */
3106 YYSYMBOL_string_dend = 409, /* string_dend */
3107 YYSYMBOL_string_dvar = 410, /* string_dvar */
3108 YYSYMBOL_symbol = 411, /* symbol */
3109 YYSYMBOL_ssym = 412, /* ssym */
3110 YYSYMBOL_sym = 413, /* sym */
3111 YYSYMBOL_dsym = 414, /* dsym */
3112 YYSYMBOL_numeric = 415, /* numeric */
3113 YYSYMBOL_simple_numeric = 416, /* simple_numeric */
3114 YYSYMBOL_nonlocal_var = 417, /* nonlocal_var */
3115 YYSYMBOL_user_variable = 418, /* user_variable */
3116 YYSYMBOL_keyword_variable = 419, /* keyword_variable */
3117 YYSYMBOL_var_ref = 420, /* var_ref */
3118 YYSYMBOL_var_lhs = 421, /* var_lhs */
3119 YYSYMBOL_backref = 422, /* backref */
3120 YYSYMBOL_423_39 = 423, /* $@39 */
3121 YYSYMBOL_superclass = 424, /* superclass */
3122 YYSYMBOL_f_opt_paren_args = 425, /* f_opt_paren_args */
3123 YYSYMBOL_f_empty_arg = 426, /* f_empty_arg */
3124 YYSYMBOL_f_paren_args = 427, /* f_paren_args */
3125 YYSYMBOL_f_arglist = 428, /* f_arglist */
3126 YYSYMBOL_429_40 = 429, /* @40 */
3127 YYSYMBOL_f_kw_arg_value = 430, /* f_kw_arg_value */
3128 YYSYMBOL_f_kwarg_arg_value = 431, /* f_kwarg_arg_value */
3129 YYSYMBOL_opt_f_block_arg_opt_comma = 432, /* opt_f_block_arg_opt_comma */
3130 YYSYMBOL_args_tail_basic_arg_value_opt_comma = 433, /* args_tail_basic_arg_value_opt_comma */
3131 YYSYMBOL_args_tail = 434, /* args_tail */
3132 YYSYMBOL_args_tail_basic_arg_value_none = 435, /* args_tail_basic_arg_value_none */
3133 YYSYMBOL_largs_tail = 436, /* largs_tail */
3134 YYSYMBOL_f_opt_arg_value = 437, /* f_opt_arg_value */
3135 YYSYMBOL_f_opt_arg_arg_value = 438, /* f_opt_arg_arg_value */
3136 YYSYMBOL_opt_args_tail_args_tail_opt_comma = 439, /* opt_args_tail_args_tail_opt_comma */
3137 YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma = 440, /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
3138 YYSYMBOL_f_args_list_args_tail_opt_comma = 441, /* f_args-list_args_tail_opt_comma */
3139 YYSYMBOL_tail_only_args_args_tail = 442, /* tail-only-args_args_tail */
3140 YYSYMBOL_f_args = 443, /* f_args */
3141 YYSYMBOL_opt_args_tail_largs_tail_none = 444, /* opt_args_tail_largs_tail_none */
3142 YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none = 445, /* args-list_arg_value_opt_args_tail_largs_tail_none */
3143 YYSYMBOL_f_args_list_largs_tail_none = 446, /* f_args-list_largs_tail_none */
3144 YYSYMBOL_tail_only_args_largs_tail = 447, /* tail-only-args_largs_tail */
3145 YYSYMBOL_f_largs = 448, /* f_largs */
3146 YYSYMBOL_args_forward = 449, /* args_forward */
3147 YYSYMBOL_f_bad_arg = 450, /* f_bad_arg */
3148 YYSYMBOL_f_norm_arg = 451, /* f_norm_arg */
3149 YYSYMBOL_f_arg_asgn = 452, /* f_arg_asgn */
3150 YYSYMBOL_f_arg_item = 453, /* f_arg_item */
3151 YYSYMBOL_f_arg = 454, /* f_arg */
3152 YYSYMBOL_f_label = 455, /* f_label */
3153 YYSYMBOL_kwrest_mark = 456, /* kwrest_mark */
3154 YYSYMBOL_f_no_kwarg = 457, /* f_no_kwarg */
3155 YYSYMBOL_f_kwrest = 458, /* f_kwrest */
3156 YYSYMBOL_restarg_mark = 459, /* restarg_mark */
3157 YYSYMBOL_f_rest_arg = 460, /* f_rest_arg */
3158 YYSYMBOL_blkarg_mark = 461, /* blkarg_mark */
3159 YYSYMBOL_f_block_arg = 462, /* f_block_arg */
3160 YYSYMBOL_option__ = 463, /* option_',' */
3161 YYSYMBOL_opt_comma = 464, /* opt_comma */
3162 YYSYMBOL_value_expr_singleton_expr = 465, /* value_expr_singleton_expr */
3163 YYSYMBOL_singleton = 466, /* singleton */
3164 YYSYMBOL_singleton_expr = 467, /* singleton_expr */
3165 YYSYMBOL_468_41 = 468, /* $@41 */
3166 YYSYMBOL_assoc_list = 469, /* assoc_list */
3167 YYSYMBOL_assocs = 470, /* assocs */
3168 YYSYMBOL_assoc = 471, /* assoc */
3169 YYSYMBOL_operation2 = 472, /* operation2 */
3170 YYSYMBOL_operation3 = 473, /* operation3 */
3171 YYSYMBOL_dot_or_colon = 474, /* dot_or_colon */
3172 YYSYMBOL_call_op = 475, /* call_op */
3173 YYSYMBOL_call_op2 = 476, /* call_op2 */
3174 YYSYMBOL_rparen = 477, /* rparen */
3175 YYSYMBOL_rbracket = 478, /* rbracket */
3176 YYSYMBOL_rbrace = 479, /* rbrace */
3177 YYSYMBOL_trailer = 480, /* trailer */
3178 YYSYMBOL_term = 481, /* term */
3179 YYSYMBOL_terms = 482, /* terms */
3180 YYSYMBOL_none = 483 /* none */
3181};
3182typedef enum yysymbol_kind_t yysymbol_kind_t;
3183
3184
3185
3186
3187#ifdef short
3188# undef short
3189#endif
3190
3191/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3192 <limits.h> and (if available) <stdint.h> are included
3193 so that the code can choose integer types of a good width. */
3194
3195#ifndef __PTRDIFF_MAX__
3196# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3197# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3198# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3199# define YY_STDINT_H
3200# endif
3201#endif
3202
3203/* Narrow types that promote to a signed type and that can represent a
3204 signed or unsigned integer of at least N bits. In tables they can
3205 save space and decrease cache pressure. Promoting to a signed type
3206 helps avoid bugs in integer arithmetic. */
3207
3208#ifdef __INT_LEAST8_MAX__
3209typedef __INT_LEAST8_TYPE__ yytype_int8;
3210#elif defined YY_STDINT_H
3211typedef int_least8_t yytype_int8;
3212#else
3213typedef signed char yytype_int8;
3214#endif
3215
3216#ifdef __INT_LEAST16_MAX__
3217typedef __INT_LEAST16_TYPE__ yytype_int16;
3218#elif defined YY_STDINT_H
3219typedef int_least16_t yytype_int16;
3220#else
3221typedef short yytype_int16;
3222#endif
3223
3224/* Work around bug in HP-UX 11.23, which defines these macros
3225 incorrectly for preprocessor constants. This workaround can likely
3226 be removed in 2023, as HPE has promised support for HP-UX 11.23
3227 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3228 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3229#ifdef __hpux
3230# undef UINT_LEAST8_MAX
3231# undef UINT_LEAST16_MAX
3232# define UINT_LEAST8_MAX 255
3233# define UINT_LEAST16_MAX 65535
3234#endif
3235
3236#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3237typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3238#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3239 && UINT_LEAST8_MAX <= INT_MAX)
3240typedef uint_least8_t yytype_uint8;
3241#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3242typedef unsigned char yytype_uint8;
3243#else
3244typedef short yytype_uint8;
3245#endif
3246
3247#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3248typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3249#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3250 && UINT_LEAST16_MAX <= INT_MAX)
3251typedef uint_least16_t yytype_uint16;
3252#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3253typedef unsigned short yytype_uint16;
3254#else
3255typedef int yytype_uint16;
3256#endif
3257
3258#ifndef YYPTRDIFF_T
3259# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3260# define YYPTRDIFF_T __PTRDIFF_TYPE__
3261# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3262# elif defined PTRDIFF_MAX
3263# ifndef ptrdiff_t
3264# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3265# endif
3266# define YYPTRDIFF_T ptrdiff_t
3267# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3268# else
3269# define YYPTRDIFF_T long
3270# define YYPTRDIFF_MAXIMUM LONG_MAX
3271# endif
3272#endif
3273
3274#ifndef YYSIZE_T
3275# ifdef __SIZE_TYPE__
3276# define YYSIZE_T __SIZE_TYPE__
3277# elif defined size_t
3278# define YYSIZE_T size_t
3279# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3280# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3281# define YYSIZE_T size_t
3282# else
3283# define YYSIZE_T unsigned
3284# endif
3285#endif
3286
3287#define YYSIZE_MAXIMUM \
3288 YY_CAST (YYPTRDIFF_T, \
3289 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3290 ? YYPTRDIFF_MAXIMUM \
3291 : YY_CAST (YYSIZE_T, -1)))
3292
3293#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3294
3295
3296/* Stored state numbers (used for stacks). */
3297typedef yytype_int16 yy_state_t;
3298
3299/* State numbers in computations. */
3300typedef int yy_state_fast_t;
3301
3302#ifndef YY_
3303# if defined YYENABLE_NLS && YYENABLE_NLS
3304# if ENABLE_NLS
3305# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3306# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3307# endif
3308# endif
3309# ifndef YY_
3310# define YY_(Msgid) Msgid
3311# endif
3312#endif
3313
3314
3315#ifndef YY_ATTRIBUTE_PURE
3316# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3317# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3318# else
3319# define YY_ATTRIBUTE_PURE
3320# endif
3321#endif
3322
3323#ifndef YY_ATTRIBUTE_UNUSED
3324# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3325# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3326# else
3327# define YY_ATTRIBUTE_UNUSED
3328# endif
3329#endif
3330
3331/* Suppress unused-variable warnings by "using" E. */
3332#if ! defined lint || defined __GNUC__
3333# define YY_USE(E) ((void) (E))
3334#else
3335# define YY_USE(E) /* empty */
3336#endif
3337
3338/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3339#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3340# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3341# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3342 _Pragma ("GCC diagnostic push") \
3343 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3344# else
3345# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3346 _Pragma ("GCC diagnostic push") \
3347 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3348 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3349# endif
3350# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3351 _Pragma ("GCC diagnostic pop")
3352#else
3353# define YY_INITIAL_VALUE(Value) Value
3354#endif
3355#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3356# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3357# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3358#endif
3359#ifndef YY_INITIAL_VALUE
3360# define YY_INITIAL_VALUE(Value) /* Nothing. */
3361#endif
3362
3363#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3364# define YY_IGNORE_USELESS_CAST_BEGIN \
3365 _Pragma ("GCC diagnostic push") \
3366 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3367# define YY_IGNORE_USELESS_CAST_END \
3368 _Pragma ("GCC diagnostic pop")
3369#endif
3370#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3371# define YY_IGNORE_USELESS_CAST_BEGIN
3372# define YY_IGNORE_USELESS_CAST_END
3373#endif
3374
3375
3376#define YY_ASSERT(E) ((void) (0 && (E)))
3377
3378#if 1
3379
3380/* The parser invokes alloca or malloc; define the necessary symbols. */
3381
3382# ifdef YYSTACK_USE_ALLOCA
3383# if YYSTACK_USE_ALLOCA
3384# ifdef __GNUC__
3385# define YYSTACK_ALLOC __builtin_alloca
3386# elif defined __BUILTIN_VA_ARG_INCR
3387# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3388# elif defined _AIX
3389# define YYSTACK_ALLOC __alloca
3390# elif defined _MSC_VER
3391# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3392# define alloca _alloca
3393# else
3394# define YYSTACK_ALLOC alloca
3395# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3396# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3397 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3398# ifndef EXIT_SUCCESS
3399# define EXIT_SUCCESS 0
3400# endif
3401# endif
3402# endif
3403# endif
3404# endif
3405
3406# ifdef YYSTACK_ALLOC
3407 /* Pacify GCC's 'empty if-body' warning. */
3408# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3409# ifndef YYSTACK_ALLOC_MAXIMUM
3410 /* The OS might guarantee only one guard page at the bottom of the stack,
3411 and a page size can be as small as 4096 bytes. So we cannot safely
3412 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3413 to allow for a few compiler-allocated temporary stack slots. */
3414# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3415# endif
3416# else
3417# define YYSTACK_ALLOC YYMALLOC
3418# define YYSTACK_FREE YYFREE
3419# ifndef YYSTACK_ALLOC_MAXIMUM
3420# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3421# endif
3422# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3423 && ! ((defined YYMALLOC || defined malloc) \
3424 && (defined YYFREE || defined free)))
3425# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3426# ifndef EXIT_SUCCESS
3427# define EXIT_SUCCESS 0
3428# endif
3429# endif
3430# ifndef YYMALLOC
3431# define YYMALLOC malloc
3432# if ! defined malloc && ! defined EXIT_SUCCESS
3433void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3434# endif
3435# endif
3436# ifndef YYFREE
3437# define YYFREE free
3438# if ! defined free && ! defined EXIT_SUCCESS
3439void free (void *); /* INFRINGES ON USER NAME SPACE */
3440# endif
3441# endif
3442# endif
3443#endif /* 1 */
3444
3445#if (! defined yyoverflow \
3446 && (! defined __cplusplus \
3447 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3448 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3449
3450/* A type that is properly aligned for any stack member. */
3451union yyalloc
3452{
3453 yy_state_t yyss_alloc;
3454 YYSTYPE yyvs_alloc;
3455 YYLTYPE yyls_alloc;
3456};
3457
3458/* The size of the maximum gap between one aligned stack and the next. */
3459# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3460
3461/* The size of an array large to enough to hold all stacks, each with
3462 N elements. */
3463# define YYSTACK_BYTES(N) \
3464 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3465 + YYSIZEOF (YYLTYPE)) \
3466 + 2 * YYSTACK_GAP_MAXIMUM)
3467
3468# define YYCOPY_NEEDED 1
3469
3470/* Relocate STACK from its old location to the new one. The
3471 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3472 elements in the stack, and YYPTR gives the new location of the
3473 stack. Advance YYPTR to a properly aligned location for the next
3474 stack. */
3475# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3476 do \
3477 { \
3478 YYPTRDIFF_T yynewbytes; \
3479 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3480 Stack = &yyptr->Stack_alloc; \
3481 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3482 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3483 } \
3484 while (0)
3485
3486#endif
3487
3488#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3489/* Copy COUNT objects from SRC to DST. The source and destination do
3490 not overlap. */
3491# ifndef YYCOPY
3492# if defined __GNUC__ && 1 < __GNUC__
3493# define YYCOPY(Dst, Src, Count) \
3494 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3495# else
3496# define YYCOPY(Dst, Src, Count) \
3497 do \
3498 { \
3499 YYPTRDIFF_T yyi; \
3500 for (yyi = 0; yyi < (Count); yyi++) \
3501 (Dst)[yyi] = (Src)[yyi]; \
3502 } \
3503 while (0)
3504# endif
3505# endif
3506#endif /* !YYCOPY_NEEDED */
3507
3508/* YYFINAL -- State number of the termination state. */
3509#define YYFINAL 143
3510/* YYLAST -- Last index in YYTABLE. */
3511#define YYLAST 16524
3512
3513/* YYNTOKENS -- Number of terminals. */
3514#define YYNTOKENS 162
3515/* YYNNTS -- Number of nonterminals. */
3516#define YYNNTS 322
3517/* YYNRULES -- Number of rules. */
3518#define YYNRULES 854
3519/* YYNSTATES -- Number of states. */
3520#define YYNSTATES 1442
3521
3522/* YYMAXUTOK -- Last valid token kind. */
3523#define YYMAXUTOK 361
3524
3525
3526/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3527 as returned by yylex, with out-of-bounds checking. */
3528#define YYTRANSLATE(YYX) \
3529 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3530 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3531 : YYSYMBOL_YYUNDEF)
3532
3533/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3534 as returned by yylex. */
3535static const yytype_uint8 yytranslate[] =
3536{
3537 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3538 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3540 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3541 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3542 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3543 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3546 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3549 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3550 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3551 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3552 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3562 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3563 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3564 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3565 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3566 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3567 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3568 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3569 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3570 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3571 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3572 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3573 147, 150
3574};
3575
3576#if YYDEBUG
3577/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3578static const yytype_int16 yyrline[] =
3579{
3580 0, 3174, 3168, 3174, 3174, 3174, 3174, 3194, 3199, 3204,
3581 3211, 3216, 3223, 3225, 3243, 3239, 3244, 3243, 3255, 3252,
3582 3265, 3270, 3275, 3282, 3284, 3283, 3293, 3295, 3305, 3305,
3583 3310, 3315, 3323, 3332, 3339, 3345, 3351, 3362, 3373, 3382,
3584 3394, 3395, 3400, 3400, 3401, 3412, 3417, 3418, 3425, 3425,
3585 3426, 3426, 3426, 3426, 3426, 3426, 3426, 3426, 3426, 3427,
3586 3427, 3427, 3430, 3431, 3437, 3437, 3437, 3444, 3445, 3452,
3587 3455, 3456, 3461, 3466, 3471, 3477, 3476, 3492, 3491, 3506,
3588 3509, 3520, 3530, 3529, 3543, 3543, 3544, 3550, 3550, 3550,
3589 3557, 3558, 3561, 3561, 3564, 3565, 3572, 3580, 3580, 3580,
3590 3587, 3594, 3603, 3608, 3613, 3618, 3623, 3629, 3635, 3641,
3591 3646, 3653, 3662, 3663, 3670, 3671, 3678, 3683, 3688, 3693,
3592 3693, 3693, 3698, 3703, 3708, 3713, 3718, 3723, 3730, 3731,
3593 3738, 3743, 3751, 3751, 3756, 3761, 3761, 3767, 3772, 3777,
3594 3782, 3790, 3790, 3795, 3800, 3800, 3805, 3810, 3815, 3820,
3595 3828, 3836, 3839, 3844, 3849, 3856, 3856, 3856, 3857, 3862,
3596 3865, 3870, 3873, 3878, 3878, 3886, 3887, 3888, 3889, 3890,
3597 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900,
3598 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, 3910,
3599 3911, 3912, 3913, 3914, 3915, 3918, 3918, 3918, 3919, 3919,
3600 3920, 3920, 3920, 3921, 3921, 3921, 3921, 3922, 3922, 3922,
3601 3922, 3923, 3923, 3923, 3924, 3924, 3924, 3924, 3925, 3925,
3602 3925, 3925, 3926, 3926, 3926, 3926, 3927, 3927, 3927, 3927,
3603 3928, 3928, 3928, 3928, 3929, 3929, 3932, 3932, 3933, 3933,
3604 3933, 3933, 3933, 3933, 3933, 3933, 3933, 3934, 3934, 3934,
3605 3934, 3934, 3934, 3934, 3935, 3940, 3945, 3950, 3955, 3960,
3606 3965, 3970, 3975, 3980, 3985, 3990, 3995, 4000, 4001, 4006,
3607 4011, 4016, 4021, 4026, 4031, 4036, 4041, 4046, 4051, 4056,
3608 4063, 4063, 4063, 4064, 4065, 4068, 4077, 4078, 4084, 4091,
3609 4092, 4093, 4094, 4097, 4102, 4110, 4116, 4123, 4130, 4130,
3610 4133, 4134, 4135, 4140, 4147, 4152, 4161, 4166, 4176, 4188,
3611 4189, 4195, 4196, 4197, 4198, 4203, 4210, 4210, 4215, 4220,
3612 4225, 4231, 4237, 4241, 4241, 4279, 4284, 4292, 4297, 4305,
3613 4310, 4315, 4320, 4328, 4333, 4342, 4343, 4347, 4352, 4357,
3614 4375, 4375, 4375, 4375, 4375, 4375, 4375, 4375, 4376, 4377,
3615 4378, 4384, 4383, 4396, 4396, 4402, 4408, 4413, 4418, 4423,
3616 4429, 4434, 4439, 4444, 4449, 4456, 4461, 4466, 4471, 4472,
3617 4478, 4480, 4492, 4501, 4510, 4519, 4518, 4533, 4532, 4545,
3618 4553, 4553, 4554, 4598, 4597, 4620, 4619, 4639, 4638, 4657,
3619 4655, 4672, 4670, 4685, 4690, 4695, 4700, 4715, 4715, 4718,
3620 4725, 4743, 4750, 4758, 4766, 4773, 4781, 4790, 4799, 4807,
3621 4814, 4821, 4829, 4836, 4842, 4857, 4864, 4869, 4875, 4882,
3622 4889, 4890, 4891, 4894, 4895, 4898, 4900, 4909, 4910, 4917,
3623 4918, 4921, 4926, 4934, 4934, 4934, 4939, 4944, 4949, 4954,
3624 4961, 4967, 4974, 4975, 4982, 4982, 4984, 4984, 4984, 4984,
3625 4984, 4984, 4984, 4984, 4984, 4984, 4984, 4987, 4995, 4995,
3626 4995, 4995, 4995, 4995, 4995, 4995, 4995, 4995, 4995, 4995,
3627 4995, 4995, 4995, 4995, 4995, 4995, 4996, 5002, 5007, 5007,
3628 5010, 5011, 5017, 5027, 5031, 5034, 5039, 5046, 5048, 5052,
3629 5057, 5060, 5066, 5071, 5078, 5084, 5077, 5111, 5118, 5127,
3630 5134, 5133, 5144, 5152, 5158, 5168, 5174, 5179, 5187, 5194,
3631 5205, 5211, 5216, 5222, 5232, 5237, 5245, 5251, 5259, 5261,
3632 5276, 5276, 5297, 5303, 5308, 5314, 5322, 5331, 5332, 5335,
3633 5336, 5338, 5351, 5358, 5366, 5367, 5370, 5371, 5377, 5385,
3634 5386, 5392, 5398, 5403, 5408, 5415, 5418, 5425, 5429, 5428,
3635 5441, 5444, 5451, 5458, 5459, 5460, 5467, 5474, 5481, 5487,
3636 5494, 5501, 5508, 5514, 5519, 5524, 5531, 5530, 5541, 5547,
3637 5555, 5561, 5566, 5571, 5576, 5581, 5584, 5585, 5592, 5597,
3638 5604, 5612, 5618, 5625, 5626, 5633, 5640, 5645, 5650, 5655,
3639 5662, 5664, 5671, 5677, 5689, 5690, 5705, 5710, 5717, 5723,
3640 5724, 5731, 5732, 5732, 5732, 5732, 5732, 5732, 5732, 5733,
3641 5734, 5735, 5738, 5738, 5738, 5738, 5738, 5738, 5738, 5738,
3642 5739, 5744, 5747, 5755, 5767, 5774, 5781, 5786, 5791, 5799,
3643 5819, 5822, 5827, 5831, 5834, 5839, 5842, 5849, 5852, 5853,
3644 5856, 5868, 5869, 5870, 5877, 5890, 5902, 5909, 5909, 5909,
3645 5909, 5913, 5917, 5924, 5926, 5933, 5933, 5937, 5941, 5948,
3646 5948, 5951, 5951, 5955, 5959, 5967, 5971, 5979, 5983, 5991,
3647 5995, 6003, 6007, 6033, 6036, 6035, 6050, 6058, 6062, 6066,
3648 6070, 6086, 6087, 6090, 6095, 6098, 6099, 6102, 6118, 6119,
3649 6122, 6130, 6131, 6139, 6140, 6141, 6142, 6145, 6146, 6147,
3650 6150, 6150, 6151, 6154, 6155, 6156, 6157, 6158, 6159, 6160,
3651 6163, 6173, 6180, 6180, 6187, 6188, 6192, 6191, 6201, 6204,
3652 6205, 6212, 6219, 6229, 6230, 6230, 6247, 6247, 6247, 6247,
3653 6247, 6247, 6247, 6247, 6247, 6247, 6247, 6248, 6257, 6257,
3654 6257, 6257, 6257, 6258, 6349, 6349, 6349, 6349, 6349, 6349,
3655 6349, 6349, 6349, 6349, 6349, 6349, 6349, 6349, 6349, 6349,
3656 6349, 6349, 6349, 6349, 6349, 6349, 6349, 6352, 6352, 6352,
3657 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352,
3658 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6355, 6362, 6371,
3659 6380, 6389, 6400, 6401, 6411, 6418, 6423, 6442, 6444, 6455,
3660 6475, 6476, 6479, 6485, 6491, 6499, 6500, 6503, 6509, 6517,
3661 6518, 6521, 6527, 6532, 6540, 6540, 6540, 6548, 6548, 6578,
3662 6580, 6579, 6592, 6593, 6600, 6602, 6627, 6632, 6637, 6644,
3663 6650, 6655, 6668, 6668, 6668, 6669, 6672, 6673, 6674, 6677,
3664 6678, 6681, 6682, 6685, 6686, 6689, 6692, 6695, 6698, 6699,
3665 6702, 6710, 6717, 6718, 6722
3666};
3667#endif
3668
3670#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3671
3672#if 1
3673/* The user-facing name of the symbol whose (internal) number is
3674 YYSYMBOL. No bounds checking. */
3675static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3676
3677/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3678 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3679static const char *const yytname[] =
3680{
3681 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3682 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3683 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3684 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3685 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3686 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3687 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3688 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3689 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3690 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3691 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3692 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3693 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3694 "\"method\"", "\"global variable\"", "\"instance variable\"",
3695 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3696 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3697 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3698 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3699 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3700 "\"escaped form feed\"", "\"escaped carriage return\"",
3701 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3702 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3703 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3704 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3705 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3706 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3707 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3708 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3709 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3710 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3711 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3712 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3713 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3714 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3715 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3716 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3717 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3718 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3719 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3720 "command_asgn", "op_asgn_command_rhs",
3721 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3722 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3723 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3724 "expr_value_do", "command_call", "value_expr_command_call",
3725 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3726 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3727 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3728 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3729 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3730 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3731 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3732 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3733 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3734 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3735 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3736 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3737 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3738 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3739 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3740 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3741 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3742 "f_kw_primary_value", "f_kwarg_primary_value", "opt_f_block_arg_none",
3743 "args_tail_basic_primary_value_none", "block_args_tail",
3744 "excessed_comma", "f_opt_primary_value", "f_opt_arg_primary_value",
3745 "opt_args_tail_block_args_tail_none",
3746 "args-list_primary_value_opt_args_tail_block_args_tail_none",
3747 "block_param", "tail-only-args_block_args_tail", "opt_block_param_def",
3748 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3749 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3750 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3751 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3752 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3753 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3754 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3755 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3756 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3757 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3758 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3759 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3760 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3761 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3762 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3763 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3764 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3765 "string_contents", "xstring_contents", "regexp_contents",
3766 "string_content", "@34", "@35", "@36", "@37", "@38", "string_dend",
3767 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3768 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3769 "var_ref", "var_lhs", "backref", "$@39", "superclass",
3770 "f_opt_paren_args", "f_empty_arg", "f_paren_args", "f_arglist", "@40",
3771 "f_kw_arg_value", "f_kwarg_arg_value", "opt_f_block_arg_opt_comma",
3772 "args_tail_basic_arg_value_opt_comma", "args_tail",
3773 "args_tail_basic_arg_value_none", "largs_tail", "f_opt_arg_value",
3774 "f_opt_arg_arg_value", "opt_args_tail_args_tail_opt_comma",
3775 "args-list_arg_value_opt_args_tail_args_tail_opt_comma",
3776 "f_args-list_args_tail_opt_comma", "tail-only-args_args_tail", "f_args",
3777 "opt_args_tail_largs_tail_none",
3778 "args-list_arg_value_opt_args_tail_largs_tail_none",
3779 "f_args-list_largs_tail_none", "tail-only-args_largs_tail", "f_largs",
3780 "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item",
3781 "f_arg", "f_label", "kwrest_mark", "f_no_kwarg", "f_kwrest",
3782 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", "option_','",
3783 "opt_comma", "value_expr_singleton_expr", "singleton", "singleton_expr",
3784 "$@41", "assoc_list", "assocs", "assoc", "operation2", "operation3",
3785 "dot_or_colon", "call_op", "call_op2", "rparen", "rbracket", "rbrace",
3786 "trailer", "term", "terms", "none", YY_NULLPTR
3787};
3788
3789static const char *
3790yysymbol_name (yysymbol_kind_t yysymbol)
3791{
3792 return yytname[yysymbol];
3793}
3794#endif
3795
3796#define YYPACT_NINF (-1208)
3797
3798#define yypact_value_is_default(Yyn) \
3799 ((Yyn) == YYPACT_NINF)
3800
3801#define YYTABLE_NINF (-855)
3802
3803#define yytable_value_is_error(Yyn) \
3804 ((Yyn) == YYTABLE_NINF)
3805
3806/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3807 STATE-NUM. */
3808static const yytype_int16 yypact[] =
3809{
3810 -1208, 6236, 149, -1208, -1208, -1208, -1208, 11007, -1208, -1208,
3811 -1208, -1208, -1208, -1208, -1208, 12062, 12062, -1208, -1208, -1208,
3812 -1208, 7296, -1208, -1208, -1208, -1208, 400, 10853, 8, 33,
3813 -1208, -1208, -1208, -1208, 6672, 7452, -1208, -1208, 6828, -1208,
3814 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 13622, 13622, 13622,
3815 13622, 144, 9766, 9924, 12542, 12782, 11308, -1208, 10699, -1208,
3816 -1208, -1208, 163, 163, 163, 163, 1269, 13742, 13622, -1208,
3817 563, -1208, 33, 1167, -1208, -1208, -1208, -1208, -1208, 824,
3818 35, 35, -1208, -1208, 170, 214, 280, -1208, 62, 14342,
3819 -1208, 323, -1208, 3973, -1208, -1208, -1208, -1208, 720, 61,
3820 -1208, 133, -1208, 11942, 11942, -1208, -1208, 10386, 14460, 14578,
3821 14696, 10544, 12062, 7920, -1208, 805, 102, -1208, -1208, 458,
3822 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3823 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 283, 350, -1208,
3824 374, 418, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3825 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3826 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3827 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3828 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3829 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3830 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3831 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3832 357, -1208, -1208, -1208, -1208, -1208, -1208, 432, 13622, 549,
3833 9924, 13622, 13622, 13622, -1208, 13622, -1208, -1208, 476, 6642,
3834 -1208, 525, -1208, -1208, -1208, 501, -1208, 679, 76, 79,
3835 582, 247, 508, -1208, -1208, 12182, -1208, 12062, -1208, -1208,
3836 11683, 13862, 996, -1208, 546, -1208, 10082, -1208, -1208, -1208,
3837 -1208, -1208, 556, 35, 35, 170, -1208, 713, -1208, 558,
3838 609, 6798, 6798, 601, -1208, 9766, 550, 563, -1208, 1167,
3839 8, 592, -1208, -1208, 584, 770, 785, -1208, 525, 640,
3840 785, -1208, 8, 750, 1269, 14814, 651, 651, 658, -1208,
3841 731, 774, 784, 851, -1208, -1208, 1026, -1208, -1208, 1096,
3842 1136, 540, -1208, 654, 654, 654, 654, 761, -1208, -1208,
3843 -1208, -1208, -1208, -1208, -1208, 6388, 10234, 11942, 11942, 11942,
3844 11942, -1208, 13862, 13862, 1926, 702, -1208, 760, -1208, 1926,
3845 763, -1208, -1208, -1208, -1208, 741, -1208, -1208, -1208, -1208,
3846 -1208, -1208, -1208, 9766, 11426, 744, -1208, -1208, 13622, 13622,
3847 13622, 13622, 13622, -1208, -1208, 13622, 13622, 13622, 13622, 13622,
3848 13622, 13622, 13622, -1208, 13622, -1208, -1208, 13622, 13622, 13622,
3849 13622, 13622, 13622, 13622, 13622, 13622, 13622, -1208, -1208, 4938,
3850 12062, 5402, 556, 8702, -1208, 824, -1208, 110, 110, 11942,
3851 9614, 9614, -1208, 563, 756, 866, -1208, -1208, 869, 908,
3852 81, 108, 122, 936, 1017, 11942, 689, -1208, 808, 895,
3853 -1208, -1208, -1208, -1208, 74, 551, 588, 664, 690, 748,
3854 758, 769, 820, -1208, -1208, -1208, -1208, -1208, 823, -1208,
3855 -1208, 11544, -1208, -1208, -1208, 4515, -1208, -1208, -1208, -1208,
3856 -1208, -1208, 353, -1208, -1208, -1208, 730, -1208, 13622, 12302,
3857 -1208, -1208, 15094, 12062, 15192, -1208, -1208, 12662, -1208, 13622,
3858 8, -1208, 800, 8, 815, -1208, -1208, 822, 189, -1208,
3859 -1208, -1208, -1208, -1208, 11007, -1208, -1208, 13622, 811, 848,
3860 874, 15290, 15192, -1208, 33, 8, -1208, -1208, 5800, 880,
3861 858, -1208, 12542, -1208, -1208, 12782, -1208, -1208, -1208, 546,
3862 903, -1208, 891, -1208, -1208, 14814, 15388, 12062, 15486, -1208,
3863 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3864 -1208, 1156, 72, 1172, 78, 13622, -1208, -1208, 888, -1208,
3865 -1208, -1208, -1208, -1208, 11822, -1208, -1208, -1208, -1208, -1208,
3866 -1208, -1208, -1208, -1208, -1208, 1311, -1208, -1208, -1208, -1208,
3867 -1208, 900, -1208, -1208, -1208, 907, -1208, -1208, -1208, 919,
3868 -1208, -1208, -1208, 8, -1208, -1208, -1208, 942, -1208, 925,
3869 13622, 378, -1208, -1208, 1025, 927, 415, -1208, 13982, 8702,
3870 563, 13982, 8702, -1208, 931, -1208, -1208, -1208, 164, 164,
3871 12902, 8, 14814, 930, -1208, 13022, -1208, 609, 3213, 3213,
3872 3213, 3213, 4601, 3866, 3213, 3213, 6798, 6798, 576, 576,
3873 -1208, 6486, 1128, 1128, 1033, 59, 59, 609, 609, 609,
3874 1055, 1055, 8076, 6984, 8388, 7140, 556, -1208, 8, 933,
3875 675, -1208, 686, -1208, 7608, -1208, -1208, 164, -1208, 8854,
3876 1082, 9310, 89, 164, 164, 1083, 1076, 123, 15584, 12062,
3877 15682, -1208, -1208, -1208, 903, -1208, -1208, -1208, -1208, 15780,
3878 12062, 15878, 8702, 13862, -1208, -1208, -1208, 8, -1208, -1208,
3879 -1208, -1208, 3459, 14102, 14102, 11007, -1208, 13622, 13622, -1208,
3880 525, -1208, -1208, 508, 6516, 7764, 8, 362, 376, 13622,
3881 13622, -1208, -1208, 12422, -1208, 12662, -1208, -1208, -1208, 13862,
3882 6642, -1208, 14222, 14222, 234, 556, 556, 14102, -1208, 56,
3883 -1208, -1208, 785, 14814, 891, 616, 468, 8, 422, 603,
3884 -1208, -1208, 1350, -1208, 367, -1208, 163, -1208, -1208, 367,
3885 163, -1208, 609, -1208, -1208, 1311, 1437, -1208, 950, 8,
3886 954, -1208, 32, -1208, -1208, -1208, 504, -1208, 1926, -1208,
3887 -1208, -1208, 976, 13622, 1926, -1208, -1208, -1208, -1208, -1208,
3888 1944, -1208, -1208, -1208, 400, 1069, -1208, 6642, 1080, 164,
3889 -1208, 1069, 1080, 164, -1208, -1208, 975, -1208, -1208, -1208,
3890 -1208, -1208, 13622, -1208, -1208, -1208, 977, 987, 1087, -1208,
3891 -1208, 891, 14814, 1088, -1208, -1208, 1095, 1035, 3781, -1208,
3892 -1208, -1208, 905, 424, -1208, -1208, 1024, -1208, -1208, -1208,
3893 -1208, 741, 1008, 889, 12302, -1208, -1208, -1208, -1208, 741,
3894 -1208, 1163, -1208, 871, -1208, 1165, -1208, -1208, -1208, -1208,
3895 -1208, -1208, 13142, 164, -1208, 1083, 164, 80, 143, 8,
3896 127, 138, 11942, 563, 11942, 8702, 1068, 468, -1208, 8,
3897 164, 189, 11161, -1208, 102, 214, -1208, 4110, -1208, -1208,
3898 -1208, -1208, 13622, -1208, -1208, -1208, -1208, 496, -1208, -1208,
3899 8, 1028, 189, 400, -1208, -1208, -1208, -1208, 647, -1208,
3900 -1208, -1208, -1208, -1208, 654, -1208, 654, 654, 654, 8,
3901 -1208, 1311, -1208, 1245, -1208, -1208, 1139, 900, -1208, -1208,
3902 1037, 1038, -1208, -1208, 1048, -1208, 1049, -1208, 1037, 13982,
3903 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 1058, 13262, -1208,
3904 891, 497, -1208, -1208, -1208, 15976, 12062, 16074, -1208, -1208,
3905 13622, 14102, 14102, 1062, -1208, -1208, -1208, 14102, 14102, -1208,
3906 -1208, 13382, 1165, -1208, -1208, -1208, 9614, 11942, 164, -1208,
3907 -1208, 164, -1208, 13622, -1208, 274, -1208, -1208, 164, -1208,
3908 150, 89, 8702, 563, 164, -1208, -1208, -1208, -1208, -1208,
3909 -1208, 13622, 13622, -1208, 13622, 13622, -1208, 12662, -1208, 14222,
3910 1388, -1208, -1208, -1208, 1072, 1073, -1208, 1944, -1208, 1944,
3911 -1208, 1926, -1208, 1944, -1208, -1208, 1069, 1080, 13622, 13622,
3912 -1208, -1208, 13622, 1075, 11822, 11822, 14102, 13622, 8232, 8544,
3913 8, 535, 644, 4819, 4819, 6642, -1208, -1208, -1208, -1208,
3914 -1208, 14102, -1208, -1208, -1208, -1208, 977, -1208, 1133, -1208,
3915 1230, -1208, -1208, 110, -1208, -1208, -1208, 13502, 9006, -1208,
3916 -1208, -1208, 164, -1208, -1208, 13622, 1926, 1085, -1208, -1208,
3917 1089, -1208, -1208, 1098, -1208, -1208, -1208, -1208, -1208, 1104,
3918 1106, -1208, 6084, 1245, 1245, 1037, 1037, 1107, 1037, 6642,
3919 6642, 1103, 1103, 1058, -1208, -1208, 6642, 680, -1208, -1208,
3920 -1208, 3155, 3155, 861, -1208, 2296, 304, 1198, -1208, 1260,
3921 -1208, -1208, 39, -1208, 1112, -1208, -1208, -1208, 1108, -1208,
3922 1124, -1208, 5920, -1208, -1208, -1208, -1208, -1208, 898, -1208,
3923 -1208, -1208, 461, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3924 -1208, -1208, 643, -1208, -1208, -1208, 14932, 110, -1208, -1208,
3925 9614, -1208, -1208, 9462, 8854, 13622, -1208, 530, 4819, 9614,
3926 -1208, 8, 32, -1208, -1208, 98, 504, -1208, 1926, -1208,
3927 -1208, 1926, -1208, 1944, -1208, 113, 1073, -1208, -1208, 1944,
3928 -1208, -1208, 1482, 10234, -1208, -1208, 8702, -1208, -1208, -1208,
3929 -1208, 5920, 296, 8, 5570, -1208, 8, 1126, -1208, 1115,
3930 -1208, -1208, -1208, 999, -1208, 11942, -1208, 1233, 5570, -1208,
3931 5920, 995, 1181, 3155, 3155, 861, 213, 611, 4819, 4819,
3932 -1208, 1231, -1208, 917, 165, 185, 253, 8702, 563, -1208,
3933 871, -1208, -1208, -1208, -1208, 110, 984, 164, 1130, 1137,
3934 -1208, -1208, 10234, -1208, 1085, -1208, 1131, 1141, 1149, 1153,
3935 1131, -1208, -1208, -1208, 1037, 1085, -1208, 1155, -1208, -1208,
3936 -1208, 1168, -1208, -1208, -1208, 8, 942, 1170, 15050, 1177,
3937 -1208, -1208, -1208, 262, -1208, 1181, 1179, 1180, -1208, -1208,
3938 -1208, -1208, -1208, 8, -1208, -1208, 1184, 5920, 1187, -1208,
3939 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3940 8, 8, 8, 8, 8, 8, 319, 16172, 12062, 16270,
3941 1163, -1208, 1230, -1208, -1208, 11942, 11942, -1208, 1447, -1208,
3942 8702, 1166, -1208, 1944, -1208, 1944, -1208, 1926, -1208, 1944,
3943 -1208, -1208, -1208, -1208, 504, -1208, 1482, -1208, -1208, 1183,
3944 15050, 1482, -1208, -1208, 1280, 922, 1559, -1208, -1208, 5920,
3945 -1208, 995, -1208, 5920, -1208, 5570, 101, -1208, -1208, -1208,
3946 -1208, -1208, -1208, 153, 288, 8, 346, 375, -1208, -1208,
3947 9158, -1208, -1208, -1208, 877, -1208, -1208, 164, -1208, 1131,
3948 1131, 1191, 1131, -1208, 1085, -1208, -1208, 1195, 1196, -1208,
3949 922, 1199, 1201, -1208, 16368, 1195, 1203, 8, 1203, -1208,
3950 -1208, 427, 445, 1447, -1208, -1208, -1208, -1208, 1944, -1208,
3951 -1208, -1208, 1559, -1208, 1559, -1208, 1482, -1208, 1559, -1208,
3952 1204, 1207, -1208, 5920, -1208, -1208, -1208, -1208, -1208, 1131,
3953 1195, 1195, 1215, 1195, -1208, -1208, -1208, 1559, -1208, -1208,
3954 1195, -1208
3955};
3956
3957/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3958 Performed when YYTABLE does not specify something else to do. Zero
3959 means the default is an error. */
3960static const yytype_int16 yydefact[] =
3961{
3962 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3963 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3964 419, 323, 704, 703, 705, 706, 64, 0, 64, 0,
3965 854, 708, 707, 709, 97, 99, 698, 697, 98, 699,
3966 693, 694, 695, 696, 641, 714, 715, 0, 0, 0,
3967 0, 0, 0, 0, 854, 854, 126, 494, 667, 667,
3968 669, 671, 0, 0, 0, 0, 0, 0, 0, 6,
3969 3, 8, 0, 10, 43, 49, 40, 58, 61, 46,
3970 724, 724, 70, 91, 323, 90, 0, 112, 0, 116,
3971 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3972 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3973 0, 0, 360, 323, 370, 94, 368, 340, 341, 640,
3974 642, 342, 343, 650, 344, 656, 346, 660, 345, 662,
3975 347, 639, 685, 686, 638, 691, 702, 710, 711, 348,
3976 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3977 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3978 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3979 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3980 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3981 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3982 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3983 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3984 33, 158, 159, 161, 402, 403, 405, 0, 828, 0,
3985 0, 334, 831, 326, 667, 0, 318, 316, 0, 298,
3986 299, 329, 317, 110, 322, 854, 330, 0, 710, 711,
3987 0, 349, 854, 824, 111, 854, 513, 0, 107, 65,
3988 64, 0, 0, 28, 854, 12, 0, 11, 27, 295,
3989 393, 394, 514, 724, 724, 0, 261, 0, 360, 363,
3990 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3991 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
3992 64, 822, 64, 0, 0, 0, 724, 724, 124, 397,
3993 0, 132, 133, 140, 491, 688, 0, 687, 689, 0,
3994 0, 0, 647, 651, 663, 657, 665, 692, 74, 273,
3995 274, 851, 850, 5, 852, 0, 0, 0, 0, 0,
3996 0, 854, 0, 0, 721, 0, 720, 723, 389, 721,
3997 0, 391, 409, 518, 508, 100, 520, 367, 410, 520,
3998 503, 854, 130, 0, 122, 117, 854, 77, 0, 0,
3999 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
4000 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
4001 0, 0, 0, 0, 0, 0, 0, 841, 842, 844,
4002 854, 843, 0, 0, 86, 84, 85, 0, 0, 0,
4003 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
4004 710, 711, 349, 150, 151, 0, 0, 153, 854, 0,
4005 710, 711, 349, 387, 225, 218, 228, 213, 195, 196,
4006 197, 155, 156, 820, 81, 80, 819, 818, 0, 817,
4007 109, 64, 108, 844, 843, 0, 369, 643, 854, 854,
4008 163, 827, 357, 333, 830, 325, 0, 854, 0, 0,
4009 319, 328, 844, 854, 843, 854, 854, 0, 320, 787,
4010 64, 312, 854, 64, 854, 311, 324, 0, 64, 366,
4011 73, 30, 32, 31, 0, 854, 296, 0, 0, 0,
4012 0, 844, 843, 854, 0, 64, 355, 14, 0, 113,
4013 0, 358, 849, 848, 301, 849, 303, 359, 823, 0,
4014 139, 692, 127, 119, 723, 0, 844, 854, 843, 492,
4015 673, 690, 676, 674, 668, 644, 645, 670, 646, 672,
4016 648, 0, 0, 0, 0, 0, 853, 9, 0, 34,
4017 35, 36, 37, 297, 0, 71, 72, 793, 790, 789,
4018 788, 791, 799, 800, 787, 0, 806, 801, 810, 809,
4019 805, 814, 802, 765, 728, 814, 736, 763, 745, 814,
4020 761, 766, 764, 64, 737, 792, 794, 795, 797, 814,
4021 727, 804, 443, 442, 808, 814, 813, 735, 0, 0,
4022 0, 0, 0, 491, 0, 518, 101, 491, 0, 0,
4023 0, 64, 0, 118, 131, 0, 531, 259, 266, 268,
4024 269, 270, 277, 278, 271, 272, 247, 248, 275, 276,
4025 531, 64, 263, 264, 265, 254, 255, 256, 257, 258,
4026 293, 294, 832, 834, 833, 835, 323, 511, 64, 854,
4027 832, 834, 833, 835, 323, 512, 854, 0, 421, 0,
4028 420, 0, 0, 0, 0, 0, 375, 357, 844, 854,
4029 843, 380, 385, 150, 151, 152, 716, 383, 718, 844,
4030 854, 843, 0, 0, 839, 840, 82, 64, 362, 832,
4031 833, 507, 323, 0, 0, 0, 854, 0, 0, 826,
4032 331, 327, 332, 854, 832, 833, 64, 832, 833, 0,
4033 0, 825, 306, 313, 308, 315, 845, 365, 29, 0,
4034 279, 13, 0, 0, 356, 0, 854, 0, 25, 115,
4035 22, 354, 64, 0, 125, 836, 138, 64, 832, 833,
4036 493, 677, 0, 649, 0, 653, 0, 659, 655, 0,
4037 0, 661, 260, 39, 38, 0, 441, 433, 435, 64,
4038 438, 431, 815, 734, 816, 731, 815, 733, 815, 757,
4039 748, 722, 0, 0, 815, 762, 726, 598, 803, 807,
4040 815, 759, 812, 811, 64, 59, 62, 286, 280, 0,
4041 725, 60, 281, 0, 492, 516, 0, 492, 416, 417,
4042 517, 502, 334, 92, 93, 41, 336, 0, 45, 335,
4043 129, 123, 0, 0, 69, 48, 67, 0, 304, 329,
4044 236, 42, 0, 349, 529, 529, 0, 854, 854, 518,
4045 510, 104, 0, 515, 313, 854, 854, 310, 509, 102,
4046 309, 854, 352, 854, 422, 854, 424, 88, 423, 373,
4047 374, 413, 0, 0, 531, 0, 0, 836, 356, 64,
4048 832, 833, 0, 0, 0, 0, 150, 151, 154, 64,
4049 0, 64, 0, 361, 504, 95, 50, 304, 238, 57,
4050 245, 164, 0, 829, 321, 854, 854, 515, 854, 854,
4051 64, 854, 64, 64, 56, 244, 302, 120, 515, 26,
4052 678, 675, 683, 684, 652, 654, 664, 658, 666, 64,
4053 440, 0, 796, 0, 730, 729, 804, 814, 747, 746,
4054 814, 814, 445, 744, 814, 798, 814, 795, 814, 0,
4055 854, 854, 390, 392, 493, 96, 493, 339, 0, 854,
4056 121, 357, 854, 854, 854, 844, 854, 843, 530, 530,
4057 0, 0, 0, 0, 105, 846, 854, 0, 0, 103,
4058 411, 854, 18, 630, 415, 414, 0, 0, 0, 425,
4059 427, 0, 89, 0, 522, 0, 378, 529, 0, 379,
4060 515, 0, 0, 0, 0, 515, 388, 821, 83, 505,
4061 506, 0, 0, 854, 0, 0, 307, 314, 364, 0,
4062 721, 679, 432, 434, 436, 439, 732, 815, 758, 815,
4063 755, 815, 751, 815, 753, 760, 66, 288, 0, 0,
4064 26, 26, 334, 337, 0, 0, 0, 0, 832, 833,
4065 64, 832, 833, 0, 0, 285, 54, 242, 55, 243,
4066 106, 0, 52, 240, 53, 241, 631, 632, 854, 633,
4067 854, 15, 428, 0, 371, 372, 523, 0, 0, 530,
4068 376, 381, 0, 717, 384, 0, 721, 854, 495, 785,
4069 854, 742, 783, 854, 781, 786, 784, 498, 743, 854,
4070 854, 741, 0, 0, 0, 814, 814, 814, 814, 63,
4071 287, 854, 854, 338, 44, 68, 305, 515, 622, 628,
4072 594, 0, 0, 0, 530, 64, 530, 582, 667, 0,
4073 621, 78, 539, 545, 547, 550, 543, 542, 578, 544,
4074 587, 590, 593, 599, 600, 589, 553, 608, 601, 554,
4075 609, 610, 611, 612, 613, 614, 615, 616, 618, 617,
4076 619, 620, 597, 76, 51, 239, 0, 0, 635, 412,
4077 0, 19, 637, 0, 0, 0, 524, 854, 0, 0,
4078 386, 64, 0, 740, 451, 0, 0, 739, 0, 777,
4079 768, 0, 782, 0, 779, 0, 437, 756, 752, 815,
4080 749, 754, 483, 0, 481, 480, 0, 606, 607, 151,
4081 626, 0, 570, 64, 571, 575, 64, 0, 565, 0,
4082 854, 568, 581, 0, 623, 0, 624, 0, 540, 548,
4083 0, 588, 592, 604, 605, 0, 530, 530, 0, 0,
4084 596, 0, 634, 0, 710, 711, 349, 0, 3, 16,
4085 854, 525, 527, 528, 526, 0, 536, 0, 485, 0,
4086 450, 500, 0, 496, 854, 767, 854, 854, 854, 854,
4087 854, 682, 681, 680, 814, 854, 448, 854, 456, 478,
4088 459, 854, 475, 484, 479, 64, 795, 854, 447, 854,
4089 455, 519, 521, 64, 563, 585, 573, 572, 564, 576,
4090 847, 566, 595, 64, 546, 541, 578, 0, 579, 583,
4091 667, 591, 586, 602, 603, 627, 552, 562, 551, 558,
4092 64, 64, 64, 64, 64, 64, 357, 844, 854, 843,
4093 854, 636, 854, 426, 532, 0, 0, 382, 0, 497,
4094 0, 0, 738, 0, 778, 0, 775, 0, 771, 0,
4095 773, 780, 750, 454, 0, 453, 0, 471, 462, 0,
4096 0, 457, 476, 477, 0, 446, 0, 473, 569, 0,
4097 577, 0, 625, 0, 549, 0, 0, 555, 556, 557,
4098 559, 560, 561, 836, 356, 64, 832, 833, 629, 17,
4099 0, 537, 538, 489, 64, 487, 490, 0, 499, 854,
4100 854, 854, 854, 449, 854, 461, 460, 854, 854, 482,
4101 458, 854, 854, 357, 844, 854, 574, 64, 579, 580,
4102 584, 515, 854, 0, 486, 501, 776, 772, 0, 769,
4103 774, 452, 0, 472, 0, 469, 0, 465, 0, 467,
4104 836, 356, 474, 0, 567, 534, 535, 533, 488, 854,
4105 854, 854, 854, 854, 770, 470, 466, 0, 463, 468,
4106 854, 464
4107};
4108
4109/* YYPGOTO[NTERM-NUM]. */
4110static const yytype_int16 yypgoto[] =
4111{
4112 -1208, -98, 1110, -1208, -1208, -1208, 1018, 1301, 870, -37,
4113 -1208, -1208, -557, -1208, 227, 876, -1208, 16, -1208, -1208,
4114 17, -1208, -1208, -133, -1208, -5, -553, 159, -51, 11,
4115 -1208, -1208, 510, 3119, -1208, 3492, -1208, -79, -1208, -1208,
4116 1279, -47, -1208, 778, -1208, -447, 1566, -10, 1281, -151,
4117 48, -442, -17, -1208, 25, 4179, -399, 1285, -46, 10,
4118 -1208, -1208, -3, -1208, -1208, 5056, -1208, -1208, -1208, -1208,
4119 -535, 1294, -1208, 141, 904, 242, -1208, 1282, -1208, 885,
4120 42, 710, -374, -1208, 104, -1208, -27, -395, -217, 24,
4121 -411, -1208, -568, -48, -1208, -1208, -1208, -1208, -1208, -1208,
4122 -1208, -1208, -1208, -1208, -1208, -1208, 1344, -1208, -1208, -1208,
4123 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
4124 -1208, -1208, 441, -1208, -278, 2216, 2729, -401, 425, 178,
4125 -799, -1208, -838, -821, 655, 498, 393, -1208, 146, 82,
4126 -1208, -915, -1208, 237, -1208, -1207, 84, -434, -1208, -1208,
4127 -1208, 328, -1208, -1208, 156, -1208, 19, 368, -157, -168,
4128 -1208, -1208, 676, -1208, -1208, -1208, 548, -1208, -1208, -102,
4129 -1208, -520, -1208, 1067, -1208, -788, -1208, -708, -905, -526,
4130 -1208, 36, -1208, -1208, -924, -235, -1208, -1208, -1208, -1208,
4131 -1208, 140, -1208, -83, -1208, -873, -705, -1099, -336, -1059,
4132 -1062, -1208, 223, -1208, -1208, -943, 224, -1208, -1208, -581,
4133 229, -1208, -1208, -1208, 131, -1208, -1208, 125, 884, 1356,
4134 -1208, 1330, 1386, 1420, 5, -1208, 1654, -1208, 912, -1208,
4135 1698, -1208, -1208, 1756, -1208, 1900, -1208, -1208, -57, -1208,
4136 -1208, -140, -1208, -1208, -1208, -1208, -1208, -1208, -1208, 29,
4137 -1208, -1208, -1208, -1208, 37, -45, 4031, 130, 1346, 4554,
4138 3801, -1208, -1208, 83, -327, 732, 30, -1208, -734, -793,
4139 -511, -1208, 200, -1208, -858, -737, -662, -502, -1208, -1208,
4140 -1208, 1109, -370, -1208, -1208, -1208, 394, -221, -1197, -433,
4141 -273, -652, 779, -486, -668, -1208, -723, -1208, -629, -1208,
4142 305, -1208, -496, -1208, -1208, -1208, -1208, -1208, 34, -418,
4143 -378, -1208, -1208, -82, 1353, 248, -482, 64, -216, -69,
4144 -67, -1
4145};
4146
4147/* YYDEFGOTO[NTERM-NUM]. */
4148static const yytype_int16 yydefgoto[] =
4149{
4150 0, 333, 69, 1, 2, 70, 71, 266, 267, 656,
4151 1153, 1312, 657, 1050, 287, 288, 504, 224, 72, 494,
4152 289, 74, 75, 76, 77, 78, 785, 487, 815, 79,
4153 630, 616, 444, 273, 872, 274, 406, 407, 409, 972,
4154 410, 82, 804, 816, 83, 606, 275, 85, 86, 290,
4155 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4156 220, 695, 645, 222, 92, 93, 94, 95, 96, 97,
4157 788, 395, 98, 553, 497, 554, 240, 241, 294, 820,
4158 837, 838, 480, 242, 481, 257, 258, 244, 470, 649,
4159 246, 808, 809, 99, 403, 510, 855, 665, 862, 1159,
4160 865, 863, 682, 599, 602, 100, 277, 102, 103, 104,
4161 105, 106, 107, 108, 109, 110, 111, 356, 359, 961,
4162 1150, 852, 966, 967, 800, 278, 279, 659, 847, 968,
4163 969, 419, 757, 758, 759, 760, 571, 772, 773, 1256,
4164 1257, 1163, 1258, 1385, 1342, 1260, 1261, 1337, 1262, 1263,
4165 1264, 1183, 1184, 1265, 1239, 1374, 1375, 529, 740, 899,
4166 314, 1165, 114, 1068, 1243, 1320, 360, 115, 116, 357,
4167 603, 604, 607, 608, 975, 853, 1234, 948, 1033, 824,
4168 1370, 856, 1427, 1235, 1111, 1275, 1113, 1287, 1114, 1218,
4169 1219, 1115, 1351, 1193, 1194, 1195, 1117, 1118, 1288, 1197,
4170 1119, 1120, 1121, 1122, 1123, 572, 1125, 1126, 1127, 1128,
4171 1129, 1130, 1131, 1132, 962, 1048, 1147, 1151, 117, 118,
4172 119, 120, 121, 122, 323, 123, 124, 541, 744, 125,
4173 126, 543, 127, 128, 129, 130, 542, 544, 316, 320,
4174 321, 534, 742, 741, 900, 1001, 1082, 1253, 901, 131,
4175 132, 317, 133, 134, 135, 136, 248, 249, 139, 250,
4176 251, 864, 677, 345, 346, 347, 348, 349, 574, 575,
4177 763, 576, 918, 1071, 1245, 578, 579, 769, 580, 581,
4178 582, 583, 1169, 1074, 1075, 1076, 1077, 584, 585, 586,
4179 927, 588, 589, 590, 591, 592, 593, 594, 595, 596,
4180 597, 764, 770, 447, 448, 449, 683, 299, 484, 253,
4181 725, 647, 686, 681, 402, 489, 833, 1201, 514, 660,
4182 414, 269
4183};
4184
4185/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4186 positive, shift that token. If negative, reduce the rule whose
4187 number is the opposite. If YYTABLE_NINF, syntax error. */
4188static const yytype_int16 yytable[] =
4189{
4190 142, 334, 319, 335, 221, 237, 237, 661, 309, 412,
4191 236, 236, 315, 318, 456, 286, 293, 573, 73, 401,
4192 328, 646, 573, 654, 221, 408, 648, 675, 413, 225,
4193 226, 919, 915, 454, 483, 478, 223, 263, 334, 245,
4194 245, 309, 789, 917, 1034, 793, 971, 821, 791, 252,
4195 252, 292, 292, 297, 301, 221, 223, 355, 702, 711,
4196 309, 309, 309, 256, 767, 445, 792, 978, 324, 325,
4197 326, 587, 365, 1003, 701, 765, 587, 692, 295, 765,
4198 516, 308, 701, 734, 518, 796, 452, 775, 296, 300,
4199 1124, 1124, 1005, 781, 646, 1276, 654, 711, 916, 706,
4200 291, 702, 237, 327, 825, -146, -141, 236, 221, 1286,
4201 1143, 351, 924, 1251, 405, 405, 846, 949, 405, 243,
4202 254, 1376, 925, 658, 726, 870, 354, 1241, 352, 1386,
4203 -397, 138, 761, -142, 505, 1277, 245, 368, 746, 921,
4204 1207, 568, 1072, -704, 750, 926, 252, -149, -148, 143,
4205 726, 1289, -144, 737, 1158, 1167, 1302, 1305, -397, -397,
4206 1116, 1116, 259, -145, 350, 474, -146, 530, -147, -721,
4207 811, 268, -704, 569, 798, -143, -712, 466, -141, -713,
4208 537, 539, 138, 138, 265, 261, 312, 264, 792, 507,
4209 -113, 747, 344, 286, 1208, 502, 352, 751, -142, 1191,
4210 283, 1200, 397, 392, 393, 394, 1376, 1070, 1072, 1386,
4211 -141, -129, 611, -142, -397, 1124, 450, 362, 334, 312,
4212 508, 1242, 532, 533, 887, 1282, 342, 343, 528, 292,
4213 398, 399, 799, 1252, 1236, -137, -132, -832, 421, 431,
4214 431, 431, 358, 331, 471, 237, 1003, 237, 286, 332,
4215 236, 471, 236, 353, 485, 898, 1399, 309, 549, 550,
4216 551, 552, 1176, -133, 331, 142, -149, 478, 1124, 1059,
4217 332, 488, 490, 1070, 919, 1124, 1124, -140, -139, 482,
4218 868, 245, -135, 73, 292, 1116, 400, 658, 523, 1397,
4219 1289, 252, 726, -136, 1289, 859, 1400, 711, -138, 548,
4220 -833, -147, 702, 726, 351, -134, 869, -146, 984, 953,
4221 -832, 1296, 1298, -146, 256, 666, 309, 354, 701, -141,
4222 701, 353, 761, 910, 322, -141, 286, 255, 977, 1322,
4223 662, 801, -148, 291, 886, 292, 670, 351, 1073, -142,
4224 1333, 521, 1335, 259, 334, -142, 672, 476, 405, 405,
4225 405, 405, 73, 555, 556, 925, 499, 500, 1232, -144,
4226 138, 486, 292, 1207, 1400, 1142, 1142, 259, -147, 1233,
4227 940, 1080, -64, 663, 664, 1070, 1016, 980, 1070, 842,
4228 1070, -149, 1087, -712, 954, 849, 850, 985, -145, 613,
4229 237, -833, 959, 1047, 1017, 236, 138, 1207, 653, 485,
4230 1196, 745, 292, 745, 1073, 496, 1006, -149, 1124, 292,
4231 292, 291, 777, -149, 361, 138, 259, -141, 1008, 1010,
4232 405, 765, 1012, 702, 1014, 1062, 1015, 678, 331, 1057,
4233 778, 919, 915, 530, 332, 312, 405, 1080, -132, 701,
4234 -143, 237, -147, 1244, 655, -833, 236, -135, -147, 782,
4235 -713, -585, 653, 696, 513, 513, -64, 366, 259, 513,
4236 965, 519, 888, 237, 1017, 138, 138, 783, 236, 1411,
4237 854, 653, 485, -148, 458, 245, 889, 309, 761, -148,
4238 761, 471, 814, 471, -142, 252, 884, -148, 532, 533,
4239 1142, 221, 890, 138, 312, 587, -144, 691, 916, 653,
4240 -144, 587, 610, 703, 718, -133, -144, 615, 523, 1248,
4241 -145, 932, 460, 1301, 1304, 933, 896, 237, 459, 925,
4242 1187, 1188, 236, 223, 459, 653, 485, 702, 322, -145,
4243 1070, 790, 1070, 138, 1070, -145, 1070, -356, 509, 1247,
4244 138, 138, 1249, 1142, 577, 965, 732, 851, 1097, 577,
4245 1142, 1142, -149, 1269, 259, 687, -135, 260, -149, 1215,
4246 814, 814, 562, 803, 309, -356, -356, 646, 803, 654,
4247 59, 754, 1030, -140, 1058, 976, -135, -135, 979, 711,
4248 -135, -143, 563, 1177, 1178, 1180, 1181, -143, 786, 260,
4249 919, 786, 986, 848, 814, 523, 993, 503, 292, 693,
4250 694, 292, 701, 1425, 905, 462, 530, 538, 698, 905,
4251 467, 1384, 567, 568, 1216, 1070, 709, 710, 1217, 831,
4252 -703, -356, 843, 1198, 845, -833, 468, 839, -136, 1272,
4253 -143, -148, 1293, 1294, 807, 835, 496, 934, 138, 807,
4254 936, -137, 876, 879, 727, 569, 803, 803, 471, -703,
4255 761, 761, 1154, 840, 368, 312, 469, -705, 292, 237,
4256 292, 532, 533, 477, 236, 875, 916, 653, 485, -144,
4257 237, 925, -134, 1069, 884, 236, 894, 777, 653, 485,
4258 803, 292, 475, 1142, 138, 309, -705, 368, 830, 925,
4259 1054, 840, 221, 1055, 871, 1220, 1268, 902, 1381, 688,
4260 1060, 503, 471, 495, 1190, 881, 1064, 1388, 506, 1172,
4261 1174, 1274, 1392, 255, 1278, 451, 897, 331, 390, 391,
4262 392, 393, 394, 332, 223, 840, -112, 587, 712, 138,
4263 892, 714, 138, -706, 1297, -148, 717, -136, 587, 1069,
4264 947, 673, 312, 511, 836, 674, 1227, 891, 397, 904,
4265 -137, 906, 1332, 729, 907, 908, -139, -136, -136, -708,
4266 925, -136, -706, 1377, 309, 259, 1020, 830, 1021, -64,
4267 -137, -137, 989, -832, -137, 835, 398, 472, -145, 1078,
4268 956, -134, 397, 981, 1160, 983, 836, 1432, -708, 138,
4269 826, 138, 517, 587, 982, 523, 530, 841, 1112, 1112,
4270 397, -134, -134, 373, 374, -134, 520, 832, 344, -144,
4271 398, 501, 138, 525, -143, 540, 1295, -707, 814, 814,
4272 -145, 1360, 1361, 1362, 814, 814, 445, -709, 398, 526,
4273 -135, 771, 473, 1343, 1314, 1347, 598, 882, -700, 545,
4274 963, -136, 970, -710, 970, 1078, -707, 605, 1268, 535,
4275 1268, 532, 533, -711, 697, 1268, -709, 385, 386, 810,
4276 1268, 342, 343, 312, 292, 832, 473, -700, 891, 221,
4277 1192, -710, -710, 405, 397, 405, 1324, 1326, 1328, 1330,
4278 1331, -711, -711, 1401, 527, 964, 965, 1212, 1053, -701,
4279 471, 513, 684, 814, -719, 587, 832, 601, 587, 614,
4280 1036, 1038, 398, 453, 803, 803, 1042, 1044, 814, 1266,
4281 803, 803, 848, 673, 1063, 1000, 546, 1189, -701, 786,
4282 -349, 685, 667, 1112, 259, 512, 1268, -710, 1268, 1052,
4283 1268, 726, 1268, 671, 1365, 873, 237, -711, 397, 259,
4284 515, 236, 312, 929, 653, 485, 676, 1078, -349, -349,
4285 1078, 1268, 1078, 1413, 1415, 713, 1273, 1417, 1419, 1317,
4286 1049, 1422, -97, 721, 397, 292, 398, 668, 951, 952,
4287 715, 794, -357, 1192, 397, 797, 957, 958, 405, 803,
4288 716, 292, 722, 1192, 1192, 807, 397, 1213, 1214, 956,
4289 1144, 397, 398, 679, 803, 138, 1435, 1436, 1438, 1439,
4290 -357, -357, 398, 945, -349, -700, 1441, 912, 723, 1406,
4291 1407, 1409, 1410, 1396, 398, 1307, 731, 1398, 832, 398,
4292 1394, 1157, 669, -143, 1315, 1316, 991, 992, 832, 994,
4293 995, 259, 1403, -700, -700, -129, 1091, 1092, 524, 524,
4294 753, 1094, 1095, -98, -134, 1175, 733, 1148, 680, 1152,
4295 491, 1203, 999, 1100, 587, 762, -357, 292, 946, 1434,
4296 492, 493, 766, 1266, 1206, 530, 1164, 914, 1266, 1164,
4297 1308, 914, 1170, 563, 768, 680, -444, 779, 1170, 1170,
4298 774, 292, 780, 795, 1026, 812, -701, -97, 834, -700,
4299 1185, 1185, 530, -97, -836, 844, 138, 1041, 309, 1405,
4300 851, 854, 1078, 567, 1078, 911, 1078, 1290, 1078, 913,
4301 922, 368, 138, 930, -701, -701, 1229, 1230, 535, 987,
4302 532, 533, 1237, 1282, 931, 1285, 1283, 935, 381, 382,
4303 1311, 939, -329, 368, 1065, 1300, 1303, -836, 996, 942,
4304 998, 1309, 938, 1266, 941, 531, 1271, 532, 533, 292,
4305 381, 382, 292, 292, 138, 138, 970, 1002, 292, 334,
4306 950, 508, 530, 1141, 1141, -836, -836, 955, -98, 943,
4307 -701, 960, 1018, 1019, -98, 390, 391, 392, 393, 394,
4308 965, 1024, 292, 997, 1025, 292, 1027, 1078, 138, 832,
4309 1310, 778, 1007, 1009, 387, 388, 389, 390, 391, 392,
4310 393, 394, 530, 1011, 1013, 1321, 368, 337, 338, 339,
4311 340, 341, 138, -333, 1040, 535, 405, 532, 533, -836,
4312 309, -836, 530, 381, 382, -832, 292, 1083, 1084, 970,
4313 -331, 1141, 1141, 1356, 1146, 1141, 1371, 1372, 530, 1149,
4314 1162, 292, 1182, 1164, 1166, 1170, 1170, 1170, 1170, 1170,
4315 1202, 1209, 1141, 1168, 1164, 536, 1164, 532, 533, 1171,
4316 1338, 1173, 1179, 1210, 832, 1199, 1338, 1280, 1338, 389,
4317 390, 391, 392, 393, 394, 743, 1225, 532, 533, 1211,
4318 138, 1279, 1207, 138, 138, 1098, 1323, 1306, 1141, 138,
4319 1318, 748, 309, 532, 533, 1319, 1325, 557, 237, 558,
4320 559, 560, 561, 236, 1327, 1081, 653, 485, 1329, 963,
4321 1334, 1152, 1204, 138, 36, 37, 138, 39, 1378, 292,
4322 1238, 1141, 1389, 1336, 1141, 1341, 405, 405, 40, 41,
4323 42, 43, 1346, 1402, 1349, 1350, 1393, 298, 1141, 1353,
4324 1141, 1281, 1355, 1141, 1141, 101, 1408, 755, 1141, 1141,
4325 1412, 1414, 832, 547, 1416, 832, 1418, 138, 1423, 247,
4326 247, -832, 1205, 557, -833, 558, 559, 560, 561, 292,
4327 1437, 1081, 138, 336, 728, 832, 498, 1228, 1170, 1170,
4328 1170, 1170, 988, 1164, 730, 411, 1338, 1338, 805, 416,
4329 1338, 1338, 396, 1067, 1338, 433, 101, 101, 431, 719,
4330 310, 970, 874, 1051, 36, 37, 1061, 39, 1313, 1004,
4331 909, 247, 1340, 755, 45, 46, 1383, 1141, 756, 1259,
4332 1186, 1339, 1428, 990, 1238, 1391, 609, 1354, 1170, 1338,
4333 1338, 1338, 1338, 310, 1291, 1292, 1284, 1369, 1426, 1338,
4334 557, 1368, 558, 559, 560, 561, 562, 247, 247, 457,
4335 138, 247, 418, 429, 429, 749, 247, 446, 600, 1067,
4336 1161, 1424, 832, 832, 832, 1299, 563, 1240, 455, 0,
4337 431, 1240, 0, 1081, 0, 0, 1081, 0, 1081, 1141,
4338 564, 0, 0, 1141, 0, 1141, 0, 1270, 0, 557,
4339 565, 558, 559, 560, 561, 566, 567, 568, 0, 1373,
4340 138, 558, 559, 560, 561, 0, 0, 0, 0, 0,
4341 461, 0, 0, 463, 464, 465, 0, 0, 0, 0,
4342 0, 1348, 0, 0, 832, 0, 0, 0, 0, 569,
4343 0, 1352, 570, 1404, 557, 0, 558, 559, 560, 561,
4344 562, 0, 0, 0, 0, 1066, 0, 920, 1357, 1358,
4345 1359, 0, 0, 1141, 0, 0, 1199, 0, 0, 928,
4346 563, 1067, 0, 0, 1067, 0, 1067, 84, 0, 0,
4347 0, 0, 0, 0, 101, 1255, 0, 0, 878, 880,
4348 0, 84, 84, 0, 565, 0, 0, 0, 0, 566,
4349 567, 568, 0, 0, 878, 880, 0, 0, 0, 247,
4350 0, 247, 0, 0, 247, 247, 0, 0, 0, 0,
4351 101, 557, 895, 558, 559, 560, 561, 562, 84, 84,
4352 0, 0, 0, 569, 0, 0, 570, 0, 1081, 101,
4353 1081, 0, 1081, 84, 1081, 0, 0, 563, 0, 1240,
4354 0, 1270, 0, 0, 0, 0, 1270, 0, 0, 310,
4355 0, 1270, 0, 0, 0, 0, 0, 0, 0, 0,
4356 0, 565, 0, 0, 0, 0, 0, 567, 568, 84,
4357 84, 0, 0, 84, 0, 0, 0, 0, 84, 101,
4358 101, 247, 247, 247, 247, 0, 247, 247, 0, 0,
4359 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4360 569, 0, 0, 0, 0, 0, 0, 101, 310, 1110,
4361 1110, 0, 0, 1081, 0, 0, 1067, 1270, 1067, 1270,
4362 1067, 1270, 1067, 1270, 0, 0, 0, 0, 0, 1255,
4363 0, 0, 0, 0, 1255, 0, 0, 0, 0, 1255,
4364 0, 0, 1270, 0, 247, 0, 0, 101, 0, 0,
4365 699, 700, 0, 247, 101, 101, 0, 0, 0, 298,
4366 0, 0, 0, 0, 0, 0, 0, 895, 0, 247,
4367 0, 0, 0, 0, 0, 0, 0, 1110, 1110, 1079,
4368 0, 1110, 0, 0, 0, 0, 0, 0, 1085, 0,
4369 1086, 0, 1088, 0, 700, 247, 84, 298, 1110, 0,
4370 0, 1067, 0, 0, 0, 1255, 0, 1255, 0, 1255,
4371 0, 1255, 0, 0, 0, 0, 0, 247, 0, 0,
4372 0, 84, 0, 84, 0, 0, 84, 84, 0, 0,
4373 1255, 0, 84, 0, 1110, 0, 1037, 1039, 0, 0,
4374 0, 0, 1043, 1045, 0, 1079, 0, 0, 0, 0,
4375 0, 84, 101, 0, 0, 0, 0, 0, 0, 0,
4376 0, 0, 0, 0, 0, 0, 0, 1110, 0, 310,
4377 1110, 247, 776, 0, 0, 0, 1037, 1039, 0, 1043,
4378 1045, 0, 0, 0, 1110, 0, 1110, 0, 0, 1110,
4379 1110, 0, 806, 0, 1110, 1110, 0, 819, 101, 0,
4380 0, 84, 84, 84, 84, 84, 84, 0, 84, 84,
4381 0, 0, 0, 0, 0, 0, 0, 1133, 1133, 0,
4382 0, 0, 0, 0, 0, 0, 1145, 0, 0, 84,
4383 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4384 0, 0, 247, 101, 0, 247, 101, 1246, 0, 0,
4385 1145, 0, 1250, 0, 247, 0, 310, 0, 1254, 822,
4386 0, 1267, 0, 1110, 0, 0, 84, 0, 0, 84,
4387 0, 0, 0, 0, 0, 84, 84, 84, 557, 883,
4388 558, 559, 560, 561, 562, 1133, 1133, 0, 0, 1133,
4389 0, 84, 0, 0, 0, 700, 557, 298, 558, 559,
4390 560, 561, 562, 101, 563, 101, 1133, 0, 0, 0,
4391 0, 0, 0, 247, 0, 0, 0, 84, 564, 0,
4392 0, 0, 563, 0, 247, 1110, 101, 247, 565, 1110,
4393 0, 1110, 0, 566, 567, 568, 564, 822, 822, 84,
4394 0, 0, 1133, 0, 0, 0, 565, 0, 0, 0,
4395 0, 0, 567, 568, 0, 923, 0, 0, 0, 0,
4396 0, 0, 0, 247, 0, 0, 0, 569, 0, 0,
4397 570, 822, 0, 0, 84, 1133, 0, 310, 1133, 0,
4398 0, 0, 0, 0, 937, 569, 0, 0, 0, 0,
4399 0, 0, 1133, 84, 1133, 0, 0, 1133, 1133, 1110,
4400 0, 0, 1133, 1133, 1379, 0, 1380, 0, 1382, 0,
4401 0, 0, 0, 0, 0, 1387, 700, 0, 0, 0,
4402 84, 0, 0, 0, 0, 1395, 0, 0, 0, 0,
4403 0, 0, 0, 0, 974, 0, 0, 0, 0, 0,
4404 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4405 0, 0, 0, 0, 0, 0, 310, 0, 0, 0,
4406 0, 0, 0, 0, 84, 84, 0, 84, 84, 0,
4407 0, 1133, 0, 0, 0, 0, 84, 0, 0, 0,
4408 0, 84, 0, 0, 0, 0, 0, 1429, 0, 0,
4409 0, 0, 0, 1430, 0, 1431, 0, 1433, 0, 0,
4410 0, 0, 0, 0, 0, 0, 247, 0, 247, 101,
4411 0, 0, 0, 0, 0, 0, 1440, 112, 0, 0,
4412 1023, 0, 0, 0, 0, 84, 0, 84, 0, 0,
4413 0, 112, 112, 1133, 0, 84, 0, 1133, 0, 1133,
4414 0, 0, 0, 1046, 0, 0, 84, 0, 84, 84,
4415 0, 0, 0, 0, 0, 1056, 0, 0, 0, 84,
4416 84, 0, 0, 0, 0, 0, 0, 0, 112, 112,
4417 0, 0, 0, 247, 0, 0, 0, 0, 0, 298,
4418 0, 0, 0, 112, 0, 84, 0, 0, 0, 0,
4419 247, 0, 0, 84, 0, 822, 822, 0, 0, 0,
4420 0, 822, 822, 0, 1093, 0, 0, 1133, 0, 0,
4421 101, 247, 0, 0, 0, 0, 0, 0, 0, 112,
4422 112, 0, 0, 112, 0, 0, 101, 0, 112, 22,
4423 23, 24, 25, 0, 0, 0, 0, 0, 0, 1156,
4424 0, 0, 0, 0, 0, 31, 32, 33, 1098, 0,
4425 0, 0, 1099, 0, 0, 40, 41, 42, 43, 44,
4426 0, 0, 0, 0, 0, 0, 0, 0, 101, 101,
4427 822, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4428 0, 0, 0, 0, 0, 822, 0, 1101, 1102, 1134,
4429 1134, 0, 0, 0, 0, 1103, 0, 0, 1104, 0,
4430 1105, 1106, 101, 1107, 0, 0, 57, 58, 59, 60,
4431 61, 62, 63, 64, 65, 0, 0, 0, 0, 1135,
4432 1135, 0, 0, 0, 0, 0, 101, 0, 84, 0,
4433 84, 84, 0, 0, 0, 0, 1109, 1231, 0, 0,
4434 0, 0, 0, 304, 0, 0, 112, 0, 0, 0,
4435 259, 0, 0, 1136, 1136, 0, 0, 1134, 1134, 0,
4436 0, 1134, 0, 0, 0, 0, 0, 0, 0, 0,
4437 0, 112, 0, 112, 0, 0, 112, 112, 1134, 0,
4438 0, 0, 112, 0, 0, 0, 0, 1135, 1135, 0,
4439 1223, 1135, 0, 0, 101, 84, 0, 101, 101, 0,
4440 0, 112, 0, 101, 0, 0, 0, 0, 1135, 0,
4441 0, 0, 84, 0, 1134, 0, 0, 84, 84, 0,
4442 0, 1136, 1136, 84, 84, 1136, 0, 101, 0, 0,
4443 101, 0, 84, 84, 0, 0, 0, 0, 0, 0,
4444 0, 0, 1136, 0, 1135, 0, 0, 1134, 84, 247,
4445 1134, 112, 112, 112, 112, 112, 112, 0, 112, 112,
4446 0, 0, 0, 0, 1134, 0, 1134, 0, 0, 1134,
4447 1134, 101, 0, 0, 1134, 1134, 0, 1135, 1136, 112,
4448 1135, 0, 0, 0, 0, 0, 101, 0, 0, 0,
4449 84, 84, 84, 0, 1135, 0, 1135, 0, 0, 1135,
4450 1135, 0, 0, 0, 1135, 1135, 0, 84, 0, 0,
4451 0, 1136, 1345, 0, 1136, 0, 112, 0, 0, 112,
4452 0, 0, 0, 0, 84, 112, 112, 112, 1136, 0,
4453 1136, 0, 0, 1136, 1136, 0, 0, 0, 1136, 1136,
4454 0, 112, 0, 1134, 0, 0, 0, 0, 84, 0,
4455 0, 0, 247, 0, 0, 0, 0, 0, 0, 247,
4456 247, 0, 0, 0, 101, 0, 0, 112, 0, 0,
4457 0, 0, 0, 1135, 0, 0, 0, 0, 0, 0,
4458 0, 0, 0, 0, 1390, 0, 0, 1137, 1137, 112,
4459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4460 0, 0, 0, 0, 0, 1134, 0, 1136, 0, 1134,
4461 0, 1134, 0, 0, 101, 0, 84, 0, 0, 84,
4462 84, 0, 0, 0, 112, 84, 0, 0, 0, 0,
4463 113, 1138, 1138, 0, 0, 1135, 0, 0, 0, 1135,
4464 0, 1135, 0, 112, 113, 113, 0, 0, 0, 84,
4465 0, 0, 84, 0, 0, 1137, 1137, 0, 0, 1137,
4466 0, 0, 0, 0, 0, 0, 0, 0, 0, 1136,
4467 112, 84, 0, 1136, 0, 1136, 1137, 0, 0, 1134,
4468 0, 113, 113, 0, 0, 0, 0, 0, 0, 1139,
4469 1139, 0, 0, 84, 0, 0, 113, 0, 0, 1138,
4470 1138, 0, 0, 1138, 0, 0, 0, 0, 84, 1135,
4471 0, 0, 1137, 0, 112, 112, 0, 112, 112, 0,
4472 1138, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4473 0, 112, 113, 113, 0, 0, 113, 0, 0, 0,
4474 0, 113, 0, 1136, 0, 1137, 0, 0, 1137, 0,
4475 0, 0, 0, 0, 0, 0, 1138, 1139, 1139, 0,
4476 0, 1139, 1137, 0, 1137, 0, 0, 1137, 1137, 0,
4477 0, 0, 1137, 1137, 84, 112, 0, 112, 1139, 0,
4478 0, 84, 84, 0, 0, 112, 84, 0, 0, 1138,
4479 0, 0, 1138, 0, 0, 0, 112, 0, 112, 112,
4480 0, 0, 0, 0, 0, 0, 1138, 0, 1138, 112,
4481 112, 1138, 1138, 0, 1139, 0, 1138, 1138, 0, 0,
4482 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4483 0, 0, 0, 1140, 1140, 112, 84, 0, 0, 0,
4484 0, 1137, 0, 112, 0, 0, 0, 1139, 0, 0,
4485 1139, 0, 0, 0, 0, 0, 0, 0, 0, 113,
4486 0, 0, 0, 0, 1139, 0, 1139, 0, 0, 1139,
4487 1139, 0, 0, 0, 1139, 1139, 0, 0, 0, 0,
4488 0, 0, 0, 0, 113, 1138, 113, 0, 0, 113,
4489 113, 0, 0, 0, 0, 113, 0, 0, 0, 0,
4490 0, 1140, 1140, 1137, 0, 1140, 0, 1137, 0, 1137,
4491 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4492 0, 0, 1140, 0, 0, 0, 0, 0, 0, 0,
4493 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4494 0, 0, 0, 1139, 0, 0, 0, 1138, 0, 0,
4495 0, 1138, 0, 1138, 0, 0, 0, 0, 1140, 0,
4496 0, 0, 0, 0, 113, 113, 113, 113, 113, 113,
4497 0, 113, 113, 0, 0, 0, 0, 1137, 112, 0,
4498 112, 112, 0, 0, 0, 0, 0, 0, 0, 0,
4499 0, 1140, 113, 0, 1140, 0, 0, 0, 0, 0,
4500 0, 0, 0, 0, 0, 1139, 0, 0, 1140, 1139,
4501 1140, 1139, 0, 1140, 1140, 0, 0, 0, 1140, 1140,
4502 80, 1138, 0, 0, 0, 0, 0, 0, 0, 113,
4503 0, 0, 113, 0, 80, 80, 0, 0, 113, 113,
4504 113, 0, 0, 0, 0, 112, 0, 0, 0, 0,
4505 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4506 0, 0, 112, 0, 0, 0, 0, 112, 112, 0,
4507 0, 80, 80, 112, 112, 306, 0, 0, 0, 1139,
4508 113, 0, 112, 112, 0, 0, 0, 1140, 22, 23,
4509 24, 25, 0, 0, 0, 0, 0, 0, 112, 0,
4510 0, 0, 113, 0, 31, 32, 33, 0, 306, 0,
4511 0, 0, 0, 0, 40, 41, 42, 43, 44, 0,
4512 0, 0, 0, 0, 0, 0, 0, 306, 306, 306,
4513 0, 80, 0, 0, 0, 0, 0, 113, 0, 0,
4514 112, 112, 112, 0, 0, 0, 0, 0, 0, 1140,
4515 0, 0, 0, 1140, 0, 1140, 113, 112, 0, 0,
4516 0, 0, 0, 0, 0, 57, 58, 59, 60, 61,
4517 62, 63, 64, 65, 112, 0, 0, 0, 0, 0,
4518 0, 0, 0, 113, 0, 0, 0, 0, 0, 0,
4519 0, 368, -855, -855, -855, -855, 373, 374, 112, 0,
4520 -855, -855, 304, 0, 0, 0, 0, 0, 381, 382,
4521 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4522 0, 0, 0, 1140, 0, 0, 0, 113, 113, 0,
4523 113, 113, 0, 0, 0, 0, 0, 0, 0, 113,
4524 0, 0, 0, 0, 113, 0, 0, 0, 0, 80,
4525 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4526 0, 0, 0, 0, 0, 0, 112, 0, 0, 112,
4527 112, 0, 0, 0, 80, 112, 80, 0, 0, 0,
4528 0, 0, 0, 0, 0, 80, 0, 0, 113, 0,
4529 113, 0, 0, 0, 0, 0, 0, 0, 113, 112,
4530 0, 0, 112, 0, 80, 0, 0, 0, 0, 113,
4531 0, 113, 113, 0, 0, 0, 0, 0, 0, 0,
4532 0, 112, 113, 113, 306, 0, 0, 0, 0, 0,
4533 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4534 0, 0, 0, 112, 0, 0, 0, 0, 113, 0,
4535 0, 0, 0, 0, 80, 80, 113, 0, 112, -854,
4536 0, 0, 0, 0, 0, 0, 0, -854, -854, -854,
4537 0, 0, -854, -854, -854, 0, -854, 0, 0, 0,
4538 0, 0, 80, 306, -854, -854, -854, 0, 0, 0,
4539 0, 0, 0, 81, 0, 0, -854, -854, 0, -854,
4540 -854, -854, -854, -854, 0, 0, 0, 81, 81, 0,
4541 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4542 0, 0, 80, 0, 112, 0, 0, -854, -854, 80,
4543 80, 112, 112, 0, 0, 0, 112, 0, 0, 0,
4544 0, 0, 0, 0, 81, 81, 0, 0, 307, 0,
4545 0, 0, 0, 0, 0, 0, -854, -854, 0, 0,
4546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4547 80, 0, 0, 0, 0, 0, 0, 0, 0, -854,
4548 0, 307, 0, 0, 0, 0, 112, 0, 0, 0,
4549 0, 113, 80, 113, 113, 0, 0, 0, 0, 0,
4550 307, 307, 307, 0, 81, 0, 0, 0, 0, 0,
4551 -854, -854, 0, -854, 0, 0, 255, -854, 0, -854,
4552 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4554 0, 0, 0, 0, 306, 0, 80, 0, 0, 0,
4555 0, 0, 0, 0, 0, 0, 0, 0, 113, 0,
4556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4557 0, 0, 0, 80, 0, 113, 0, 0, 0, 0,
4558 113, 113, 0, 0, 0, 0, 113, 113, 0, 0,
4559 0, 0, 0, 0, 0, 113, 113, 0, 0, 0,
4560 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4561 0, 113, 0, 0, 0, 0, 0, 0, 80, 0,
4562 0, 80, 81, 0, 0, 0, 0, 0, 0, 0,
4563 0, 306, 0, 0, 80, 0, 0, 0, 0, 0,
4564 0, 0, 0, 0, 0, 0, 0, 81, 0, 81,
4565 0, 0, 0, 113, 113, 113, 0, 0, 81, 0,
4566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4567 113, 0, 0, 0, 0, 0, 0, 81, 80, 0,
4568 80, 0, 0, 0, 0, 0, 0, 113, 80, 0,
4569 0, 0, 0, 0, 0, 0, 0, 307, 0, 80,
4570 0, 80, 141, 0, 0, 0, 0, 0, 0, 0,
4571 0, 113, 80, 80, 0, 0, 0, 0, 0, 0,
4572 0, 0, 0, 0, 0, 944, 0, 81, 81, 0,
4573 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4574 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4575 0, 0, 306, 141, 141, 81, 307, 313, 0, 368,
4576 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4577 379, 380, 0, 0, 0, 0, 381, 382, 0, 113,
4578 0, 0, 113, 113, 0, 0, 0, 0, 113, 0,
4579 313, 0, 81, 0, 0, 81, 0, 0, 0, 0,
4580 0, 0, 81, 81, 0, 0, 0, 0, 0, 422,
4581 432, 432, 113, 0, 0, 113, 384, 0, 385, 386,
4582 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4583 0, 306, 0, 0, 113, 0, -298, 0, 0, 0,
4584 0, 0, 0, 81, 368, 369, 370, 371, 372, 373,
4585 374, 375, 0, 377, 378, 0, 113, 0, 0, 0,
4586 0, 381, 382, 0, 0, 81, 0, 0, 0, 0,
4587 0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4588 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4589 0, 0, 0, 0, 0, 0, 0, 0, 367, 0,
4590 81, 0, 0, 385, 386, 387, 388, 389, 390, 391,
4591 392, 393, 394, 0, 0, 0, 0, 307, 0, 81,
4592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4593 0, 141, 137, 0, 0, 0, 0, 113, 0, 0,
4594 0, 0, 0, 0, 113, 113, 81, 0, 0, 113,
4595 0, 368, 369, 370, 371, 372, 373, 374, 375, 376,
4596 377, 378, 379, 380, 0, 80, 0, 141, 381, 382,
4597 80, 80, 0, 0, 383, 0, 80, 80, 0, 0,
4598 0, 0, 0, 137, 137, 80, 141, 311, 0, 0,
4599 0, 81, 0, 0, 81, 0, 0, 0, 0, 113,
4600 0, 80, 0, 0, 307, 0, 313, 81, 384, 0,
4601 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4602 311, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4603 0, 0, 0, 0, 0, 0, 141, 141, 0, 420,
4604 430, 430, 430, 80, 80, 80, 0, 0, 0, 0,
4605 0, 81, 0, 81, 944, 0, 0, 0, 0, 0,
4606 80, 81, 0, 0, 141, 313, 0, 0, 0, 0,
4607 0, 0, 81, 0, 81, 0, 0, 80, 0, 0,
4608 91, 0, 0, 0, 0, 81, 81, 0, 368, 369,
4609 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4610 380, 80, 0, 0, 141, 381, 382, 0, 0, 0,
4611 0, 141, 141, 0, 0, 0, 0, 0, 0, 81,
4612 0, 0, 0, 0, 0, 307, 0, 0, 0, 0,
4613 0, 91, 91, 0, 0, 0, 0, 0, 0, 0,
4614 0, 0, 0, 0, 0, 384, 0, 385, 386, 387,
4615 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4616 0, 137, 0, 0, 0, 306, 0, 0, 0, 80,
4617 0, 0, 80, 80, 0, 0, 0, 0, 80, 0,
4618 0, 0, 0, 0, 0, 0, 0, 417, 0, 0,
4619 0, 0, 0, 0, 0, 0, 0, 137, 0, 0,
4620 0, 0, 80, 0, 307, 80, 0, 0, 0, 141,
4621 0, 0, 0, 0, 0, 0, 137, 0, 0, 0,
4622 0, 0, 0, 0, 0, 0, 313, 0, 0, 0,
4623 0, 0, 0, 0, 0, 0, 311, 0, 0, 0,
4624 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4625 0, 0, 0, 0, 0, 141, 0, 81, 0, 0,
4626 0, 80, 0, 0, 0, 0, 137, 137, 0, 0,
4627 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4628 0, 0, 0, 0, 0, 0, 0, 306, 0, 0,
4629 0, 0, 0, 0, 137, 311, 0, 0, 0, 0,
4630 141, 0, 0, 141, 0, 0, 0, 0, 0, 91,
4631 0, 0, 0, 313, 0, 0, 823, 0, 0, 0,
4632 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4633 0, 0, 0, 0, 137, 0, 0, 0, 81, 80,
4634 0, 137, 137, 81, 81, 91, 0, 0, 0, 81,
4635 81, 0, 0, 0, 0, 0, 0, 0, 81, 306,
4636 141, 0, 141, 0, 91, 0, 0, 0, 0, 0,
4637 0, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4638 0, 0, 0, 141, 0, 0, 0, 0, 0, 80,
4639 0, 0, 0, 0, 823, 823, 0, 0, 0, 0,
4640 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4641 0, 0, 0, 0, 91, 91, 81, 81, 81, 0,
4642 0, 0, 0, 0, 0, 0, 0, 0, 823, 0,
4643 0, 0, 0, 81, 313, 0, 0, 0, 0, 137,
4644 0, 0, 91, 903, 0, 0, 0, 0, 0, 0,
4645 81, 0, 0, 0, 0, 140, 311, 0, 0, 0,
4646 0, 0, 0, 0, 0, 0, 0, 689, 651, 0,
4647 0, 690, 0, 0, 81, 0, 0, 0, 0, 0,
4648 0, 0, 91, 0, 0, 137, 0, 0, 0, 91,
4649 91, 188, 189, 190, 191, 192, 193, 194, 195, 196,
4650 0, 0, 197, 198, 0, 0, 140, 140, 199, 200,
4651 201, 202, 0, 313, 0, 0, 0, 0, 0, 0,
4652 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
4653 137, 0, 0, 137, 0, 0, 0, 0, 307, 0,
4654 0, 0, 81, 311, 0, 81, 81, 0, 0, 0,
4655 0, 81, 205, 206, 207, 208, 209, 210, 211, 212,
4656 213, 214, 0, 215, 216, 0, 141, 0, 0, 0,
4657 0, 217, 255, 0, 0, 81, 0, 0, 81, 368,
4658 369, 370, 371, 372, 373, 374, 0, 91, 377, 378,
4659 137, 0, 137, 0, 0, 0, 381, 382, 0, 0,
4660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4661 0, 0, 0, 137, 0, 0, 0, 0, 0, 81,
4662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4663 0, 0, 0, 91, 81, 0, 0, 0, 385, 386,
4664 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4665 0, 0, 823, 823, 0, 0, 0, 0, 823, 823,
4666 307, 0, 0, 0, 311, 0, 0, 141, 0, 0,
4667 0, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4668 0, 91, 0, 141, 140, 0, 0, 0, 0, 0,
4669 0, 0, 0, 0, 817, 0, 0, 0, 0, 0,
4670 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4671 0, 0, 81, 0, 0, 0, 0, 0, 0, 0,
4672 140, 0, 0, 0, 0, 141, 141, 823, 0, 0,
4673 0, 0, 307, 0, 0, 0, 0, 0, 91, 140,
4674 91, 0, 823, 311, 0, 0, 0, 0, 0, 0,
4675 0, 0, 22, 23, 24, 25, 0, 0, 0, 141,
4676 0, 91, 81, 0, 0, 0, 0, 0, 31, 32,
4677 33, 1098, 817, 817, 0, 1099, 0, 1100, 40, 41,
4678 42, 43, 44, 141, 0, 0, 0, 0, 0, 140,
4679 140, 0, 0, 0, 0, 0, 137, 563, 0, 0,
4680 0, 0, 0, 0, 0, 0, 817, 0, 0, 0,
4681 1101, 1102, 0, 0, 0, 0, 0, 140, 1103, 0,
4682 0, 1104, 0, 1105, 1106, 0, 1107, 567, 0, 57,
4683 58, 1108, 60, 61, 62, 63, 64, 65, 0, 0,
4684 0, 0, 0, 0, 0, 0, 0, 1226, 0, 0,
4685 0, 141, 0, 0, 141, 141, 0, 140, 0, 1109,
4686 141, 0, 0, 0, 140, 140, 304, 0, 0, 0,
4687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4688 0, 0, 0, 0, 141, 0, 0, 141, 0, 0,
4689 642, 643, 0, 0, 644, 0, 0, 137, 0, 0,
4690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4691 0, 0, 0, 137, 188, 189, 190, 191, 192, 193,
4692 194, 195, 196, 0, 0, 197, 198, 0, 141, 0,
4693 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
4694 0, 0, 0, 141, 91, 203, 204, 0, 0, 0,
4695 0, 0, 0, 0, 0, 137, 137, 0, 0, 0,
4696 0, 0, 140, 0, 0, 0, 0, 0, 0, 432,
4697 0, 239, 239, 0, 0, 205, 206, 207, 208, 209,
4698 210, 211, 212, 213, 214, 0, 215, 216, 0, 137,
4699 0, 0, 0, 0, 217, 0, 0, 0, 0, 0,
4700 0, 0, 0, 276, 280, 281, 282, 0, 140, 0,
4701 239, 239, 0, 137, 0, 0, 0, 0, 0, 0,
4702 0, 141, 0, 329, 330, 0, 0, 0, 0, 0,
4703 817, 817, 0, 0, 0, 0, 817, 817, 0, 0,
4704 0, 432, 0, 0, 0, 91, 0, 0, 0, 0,
4705 0, 0, 0, 140, 0, 0, 140, 0, 0, 0,
4706 0, 91, 0, 0, 0, 0, 0, 0, 239, 140,
4707 0, 141, 0, 0, 0, 0, 0, 1224, 0, 0,
4708 0, 137, 0, 0, 137, 137, 0, 0, 0, 0,
4709 137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4710 0, 0, 0, 91, 91, 817, 0, 0, 0, 0,
4711 0, 0, 0, 140, 137, 140, 0, 137, 0, 0,
4712 817, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4713 0, 0, 0, 0, 0, 0, 140, 91, 0, 0,
4714 0, 0, 0, 0, 0, 0, 0, 140, 140, 0,
4715 0, 0, 0, 0, 0, 0, 0, 0, 137, 0,
4716 0, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4717 0, 0, 0, 137, 0, 0, 0, 0, 0, 0,
4718 0, 140, 0, 0, 239, 0, 0, 239, 239, 239,
4719 0, 329, 0, 0, 0, 0, 0, 0, 0, 430,
4720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4721 0, 239, 0, 239, 0, 0, 0, 0, 0, 0,
4722 0, 0, 0, 0, 0, 1222, 0, 0, 0, 91,
4723 0, 0, 91, 91, 0, 0, 0, 0, 91, 0,
4724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4725 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4726 0, 0, 91, 0, 0, 91, 0, 0, 0, 0,
4727 0, 430, 0, 0, 0, 0, 0, 0, 0, 0,
4728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4729 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4730 0, 137, 0, 0, 0, 0, 91, 0, 0, 0,
4731 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4732 0, 91, 0, 0, 617, 618, 619, 620, 621, 0,
4733 0, 622, 623, 624, 625, 626, 627, 628, 629, 0,
4734 631, 0, 0, 632, 633, 634, 635, 636, 637, 638,
4735 639, 640, 641, 0, 650, 651, 239, 0, 652, 0,
4736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4737 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
4738 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
4739 198, 0, 0, 0, 0, 199, 200, 201, 202, 91,
4740 0, 0, 0, 0, 0, 140, 140, 239, 0, 203,
4741 204, 140, 140, 0, 0, 0, 0, 0, 0, 0,
4742 140, 0, 0, 0, 239, 239, 0, 0, 0, 239,
4743 0, 0, 0, 239, 0, 282, 140, 0, 0, 205,
4744 206, 207, 208, 209, 210, 211, 212, 213, 214, 91,
4745 215, 216, 0, 720, 0, 0, 0, 0, 217, 0,
4746 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
4747 0, 239, 0, 0, 0, 0, 0, 0, 140, 140,
4748 140, 0, 0, 239, 0, 0, 0, 0, 0, 0,
4749 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4750 0, 752, 0, 22, 23, 24, 25, 0, 0, 0,
4751 0, 0, 140, 0, 0, 0, 0, 0, 0, 31,
4752 32, 33, 1098, 0, 0, 0, 1099, 0, 0, 40,
4753 41, 42, 43, 44, 0, 0, 140, 0, 0, 0,
4754 0, 0, 0, 0, 0, 0, 239, 0, 0, 0,
4755 0, 0, 0, 0, 787, 0, 0, 787, 0, 0,
4756 0, 1101, 1102, 0, 0, 0, 239, 0, 0, 1103,
4757 0, 818, 1104, 0, 1105, 1106, 0, 1107, 0, 0,
4758 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4760 0, 0, 0, 0, 140, 0, 0, 140, 140, 0,
4761 1109, 0, 0, 140, 0, 0, 0, 304, 0, 0,
4762 0, 0, 0, 0, 0, 239, 0, 0, 0, 0,
4763 0, 0, 0, 0, 0, 0, 239, 140, 0, 0,
4764 140, 0, 0, 0, 0, 0, 0, 0, 0, 877,
4765 877, 0, 0, 239, 877, 0, 0, 0, 0, 0,
4766 0, 0, 0, 0, 0, 877, 877, 0, 0, 239,
4767 0, 239, 0, 0, 0, 0, 0, 0, 787, 787,
4768 0, 140, 0, 877, 0, 0, 0, 0, 0, 0,
4769 0, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4770 -4, 3, 0, 4, 5, 6, 7, 8, -4, -4,
4771 -4, 9, 10, 0, -4, -4, 11, -4, 12, 13,
4772 14, 15, 16, 17, 18, -4, 0, 0, 0, 239,
4773 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4774 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
4775 32, 33, 34, 35, 36, 37, 38, 39, 239, 40,
4776 41, 42, 43, 44, 45, 46, 0, 0, -4, 0,
4777 0, 0, 0, 0, 140, 0, 47, 48, 0, 0,
4778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4779 239, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4780 0, 0, 52, 53, 54, 55, 0, 56, 239, 0,
4781 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4782 -4, 0, 0, 0, 140, 0, 0, 0, 0, 0,
4783 0, 0, 0, 0, 0, 0, 0, 0, 877, 0,
4784 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
4785 0, 0, -4, 22, 23, 24, 25, 0, -4, 0,
4786 546, 0, 0, 0, 0, 0, 0, 0, 0, 31,
4787 32, 33, 1098, 0, 0, 0, 1099, 0, 0, 40,
4788 41, 42, 43, 44, 0, 787, 0, 0, 0, 0,
4789 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4790 0, 0, 239, 0, 0, 0, 1035, 877, 877, 0,
4791 0, 1101, 1102, 877, 877, 0, 0, 239, 0, 1103,
4792 0, 0, 1104, 0, 1105, 1106, 0, 0, 0, 239,
4793 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4794 0, 0, 0, 0, 0, 0, 0, 877, 877, 0,
4795 877, 877, 0, 239, 0, 787, 0, 0, 0, 0,
4796 1109, 0, 0, 0, 0, 0, 0, 304, 0, 0,
4797 0, 0, 0, 0, 1089, 1090, 0, 0, 239, 0,
4798 0, 0, 877, 1096, -854, 3, 0, 4, 5, 6,
4799 7, 8, 0, 0, 0, 9, 10, 877, 0, 0,
4800 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4801 0, 0, 0, 239, 19, 20, 21, 22, 23, 24,
4802 25, 877, 0, 26, 0, 0, 0, 0, 0, 27,
4803 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4804 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4806 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4807 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4808 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4809 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4810 63, 64, 65, 0, -854, 0, 0, 0, 0, 0,
4811 0, 239, 0, 0, 0, 0, 0, 0, 0, 0,
4812 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4813 0, 66, 67, 68, 0, 0, -854, 3, -854, 4,
4814 5, 6, 7, 8, -854, 0, 0, 9, 10, 0,
4815 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
4816 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4817 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4818 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
4819 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4820 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
4821 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4822 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4823 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4824 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4825 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4826 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4828 0, 0, 0, 66, 67, 68, 0, 0, -4, 3,
4829 -854, 4, 5, 6, 7, 8, -854, 0, 0, 9,
4830 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4831 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4832 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4833 0, 0, 0, 27, 28, 29, 30, 31, 32, 33,
4834 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4835 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
4836 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4837 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4838 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4839 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4840 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4841 0, 0, 0, 0, 0, 0, -836, 0, 0, 0,
4842 0, 0, 0, 0, -836, -836, -836, 0, 0, -836,
4843 -836, -836, 0, -836, 0, 66, 67, 68, 0, 0,
4844 -4, -836, -836, -836, -836, -836, 0, 0, 546, 0,
4845 0, 0, 0, -836, -836, 0, -836, -836, -836, -836,
4846 -836, 0, 0, 0, 368, 369, 370, 371, 372, 373,
4847 374, 375, 376, 377, 378, 379, 380, 0, 0, 0,
4848 0, 381, 382, 0, -836, -836, 0, 0, 0, 0,
4849 0, 0, 0, 0, -836, -836, -836, -836, -836, -836,
4850 -836, -836, -836, -836, -836, -836, -836, 0, 0, 0,
4851 0, -836, -836, -836, -836, 0, 885, -836, 0, 0,
4852 0, 384, -836, 385, 386, 387, 388, 389, 390, 391,
4853 392, 393, 394, 0, 0, 0, -836, 0, 0, -836,
4854 259, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4855 -146, -836, -836, -836, -836, -836, -836, -836, -836, -836,
4856 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
4857 -836, -836, -700, 0, -836, -836, -836, 0, 0, 0,
4858 -700, -700, -700, 0, 0, -700, -700, -700, 0, -700,
4859 0, 0, 0, 0, 0, 0, 0, -700, 0, -700,
4860 -700, -700, 0, 0, 0, 0, 0, 0, 0, -700,
4861 -700, 0, -700, -700, -700, -700, -700, 0, 0, 0,
4862 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
4863 378, 379, 380, 0, 0, 0, 0, 381, 382, 0,
4864 -700, -700, 0, 0, 0, 0, 0, 0, 0, 0,
4865 -700, -700, -700, -700, -700, -700, -700, -700, -700, -700,
4866 -700, -700, -700, 0, 0, 0, 0, -700, -700, -700,
4867 -700, 0, -700, -700, 0, 0, 0, 384, -700, 385,
4868 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4869 0, 0, -700, 0, 0, -700, 0, 0, 0, 0,
4870 0, 0, 0, 0, 0, 0, -700, -700, -700, -700,
4871 -700, -700, -700, -700, -700, -700, -700, -700, -700, 0,
4872 0, 0, 0, 0, -700, -700, -700, -700, -701, 0,
4873 -700, -700, -700, 0, 0, 0, -701, -701, -701, 0,
4874 0, -701, -701, -701, 0, -701, 0, 0, 0, 0,
4875 0, 0, 0, -701, 0, -701, -701, -701, 0, 0,
4876 0, 0, 0, 0, 0, -701, -701, 0, -701, -701,
4877 -701, -701, -701, 0, 0, 0, 368, 369, 370, 371,
4878 372, 373, 374, 375, 376, 377, 378, -855, -855, 0,
4879 0, 0, 0, 381, 382, 0, -701, -701, 0, 0,
4880 0, 0, 0, 0, 0, 0, -701, -701, -701, -701,
4881 -701, -701, -701, -701, -701, -701, -701, -701, -701, 0,
4882 0, 0, 0, -701, -701, -701, -701, 0, -701, -701,
4883 0, 0, 0, 0, -701, 385, 386, 387, 388, 389,
4884 390, 391, 392, 393, 394, 0, 0, 0, -701, 0,
4885 0, -701, 0, 0, 0, 0, 0, 0, 0, 0,
4886 0, 0, -701, -701, -701, -701, -701, -701, -701, -701,
4887 -701, -701, -701, -701, -701, 0, 0, 0, 0, 0,
4888 -701, -701, -701, -701, -837, 0, -701, -701, -701, 0,
4889 0, 0, -837, -837, -837, 0, 0, -837, -837, -837,
4890 0, -837, 0, 0, 0, 0, 0, 0, 0, -837,
4891 -837, -837, -837, -837, 0, 0, 0, 0, 0, 0,
4892 0, -837, -837, 0, -837, -837, -837, -837, -837, 0,
4893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4895 0, 0, -837, -837, 0, 0, 0, 0, 0, 0,
4896 0, 0, -837, -837, -837, -837, -837, -837, -837, -837,
4897 -837, -837, -837, -837, -837, 0, 0, 0, 0, -837,
4898 -837, -837, -837, 0, 0, -837, 0, 0, 0, 0,
4899 -837, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4900 0, 0, 0, 0, -837, 0, 0, -837, 0, 0,
4901 0, 0, 0, 0, 0, 0, 0, 0, 0, -837,
4902 -837, -837, -837, -837, -837, -837, -837, -837, -837, -837,
4903 -837, 0, 0, 0, 0, -837, -837, -837, -837, -837,
4904 -838, 0, -837, -837, -837, 0, 0, 0, -838, -838,
4905 -838, 0, 0, -838, -838, -838, 0, -838, 0, 0,
4906 0, 0, 0, 0, 0, -838, -838, -838, -838, -838,
4907 0, 0, 0, 0, 0, 0, 0, -838, -838, 0,
4908 -838, -838, -838, -838, -838, 0, 0, 0, 0, 0,
4909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, 0, 0, 0, -838, -838,
4911 0, 0, 0, 0, 0, 0, 0, 0, -838, -838,
4912 -838, -838, -838, -838, -838, -838, -838, -838, -838, -838,
4913 -838, 0, 0, 0, 0, -838, -838, -838, -838, 0,
4914 0, -838, 0, 0, 0, 0, -838, 0, 0, 0,
4915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4916 -838, 0, 0, -838, 0, 0, 0, 0, 0, 0,
4917 0, 0, 0, 0, 0, -838, -838, -838, -838, -838,
4918 -838, -838, -838, -838, -838, -838, -838, 0, 0, 0,
4919 0, -838, -838, -838, -838, -838, -514, 0, -838, -838,
4920 -838, 0, 0, 0, -514, -514, -514, 0, 0, -514,
4921 -514, -514, 0, -514, 0, 0, 0, 0, 0, 0,
4922 0, -514, -514, -514, -514, 0, 0, 0, 0, 0,
4923 0, 0, 0, -514, -514, 0, -514, -514, -514, -514,
4924 -514, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, 0, 0, 0, -514, -514, 0, 0, 0, 0,
4927 0, 0, 0, 0, -514, -514, -514, -514, -514, -514,
4928 -514, -514, -514, -514, -514, -514, -514, 0, 0, 0,
4929 0, -514, -514, -514, -514, 0, 0, -514, 0, 0,
4930 0, 0, -514, 0, 0, 0, 0, 0, 0, 0,
4931 0, 0, 0, 0, 0, 0, -514, 0, 0, 0,
4932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4933 0, -514, 0, -514, -514, -514, -514, -514, -514, -514,
4934 -514, -514, -514, 0, 0, 0, 0, -514, -514, -514,
4935 -514, -514, -350, 255, -514, -514, -514, 0, 0, 0,
4936 -350, -350, -350, 0, 0, -350, -350, -350, 0, -350,
4937 0, 0, 0, 0, 0, 0, 0, -350, 0, -350,
4938 -350, -350, 0, 0, 0, 0, 0, 0, 0, -350,
4939 -350, 0, -350, -350, -350, -350, -350, 0, 0, 0,
4940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4942 -350, -350, 0, 0, 0, 0, 0, 0, 0, 0,
4943 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4944 -350, -350, -350, 0, 0, 0, 0, -350, -350, -350,
4945 -350, 0, 0, -350, 0, 0, 0, 0, -350, 0,
4946 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4947 0, 0, -350, 0, 0, -350, 0, 0, 0, 0,
4948 0, 0, 0, 0, 0, 0, 0, -350, -350, -350,
4949 -350, -350, -350, -350, -350, -350, -350, -350, -350, 0,
4950 0, 0, 0, 0, -350, -350, -350, -350, -854, 0,
4951 -350, -350, -350, 0, 0, 0, -854, -854, -854, 0,
4952 0, -854, -854, -854, 0, -854, 0, 0, 0, 0,
4953 0, 0, 0, -854, -854, -854, -854, 0, 0, 0,
4954 0, 0, 0, 0, 0, -854, -854, 0, -854, -854,
4955 -854, -854, -854, 0, 0, 0, 0, 0, 0, 0,
4956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, 0, 0, 0, -854, -854, 0, 0,
4958 0, 0, 0, 0, 0, 0, -854, -854, -854, -854,
4959 -854, -854, -854, -854, -854, -854, -854, -854, -854, 0,
4960 0, 0, 0, -854, -854, -854, -854, 0, 0, -854,
4961 0, 0, 0, 0, -854, 0, 0, 0, 0, 0,
4962 0, 0, 0, 0, 0, 0, 0, 0, -854, 0,
4963 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4964 0, 0, 0, -854, 0, -854, -854, -854, -854, -854,
4965 -854, -854, -854, -854, -854, 0, 0, 0, 0, -854,
4966 -854, -854, -854, -854, -356, 255, -854, -854, -854, 0,
4967 0, 0, -356, -356, -356, 0, 0, -356, -356, -356,
4968 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
4969 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
4970 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
4971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4973 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
4974 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
4975 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
4976 -356, -356, -356, 0, 886, -356, 0, 0, 0, 0,
4977 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4978 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
4979 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
4980 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4981 -356, 0, 0, 0, 0, 829, -356, -356, -356, -356,
4982 -363, 0, -356, -356, -356, 0, 0, 0, -363, -363,
4983 -363, 0, 0, -363, -363, -363, 0, -363, 0, 0,
4984 0, 0, 0, 0, 0, -363, 0, -363, -363, 0,
4985 0, 0, 0, 0, 0, 0, 0, -363, -363, 0,
4986 -363, -363, -363, -363, -363, 0, 0, 0, 0, 0,
4987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4988 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4989 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4990 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
4991 -363, 0, 0, 0, 0, -363, -363, -363, -363, 0,
4992 0, -363, 0, 0, 0, 0, -363, 0, 0, 0,
4993 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4994 -363, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4995 0, 0, 0, 0, 0, -363, 0, -363, -363, -363,
4996 -363, -363, -363, -363, -363, -363, -363, 0, 0, 0,
4997 0, 0, -363, -363, -363, -363, -836, 451, -363, -363,
4998 -363, 0, 0, 0, -836, -836, -836, 0, 0, 0,
4999 -836, -836, 0, -836, 0, 0, 0, 0, 0, 0,
5000 0, -836, -836, 0, 0, 0, 0, 0, 0, 0,
5001 0, 0, 0, -836, -836, 0, -836, -836, -836, -836,
5002 -836, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5004 0, 0, 0, 0, -836, -836, 0, 0, 0, 0,
5005 0, 0, 0, 0, -836, -836, -836, -836, -836, -836,
5006 -836, -836, -836, -836, -836, -836, -836, 0, 0, 0,
5007 0, -836, -836, -836, -836, 0, 827, -836, 0, 0,
5008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5009 0, 0, 0, 0, 0, 0, -836, 0, 0, 0,
5010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5011 -146, -836, 0, -836, -836, -836, -836, -836, -836, -836,
5012 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
5013 -836, -137, -836, 0, -836, 0, -836, 0, 0, 0,
5014 -836, -836, -836, 0, 0, 0, -836, -836, 0, -836,
5015 0, 0, 0, 0, 0, 0, 0, -836, -836, 0,
5016 0, 0, 0, 0, 0, 0, 0, 0, 0, -836,
5017 -836, 0, -836, -836, -836, -836, -836, 0, 0, 0,
5018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5020 -836, -836, 0, 0, 0, 0, 0, 0, 0, 0,
5021 -836, -836, -836, -836, -836, -836, -836, -836, -836, -836,
5022 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
5023 -836, 0, 827, -836, 0, 0, 0, 0, 0, 0,
5024 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5025 0, 0, -836, 0, 0, 0, 0, 0, 0, 0,
5026 0, 0, 0, 0, 0, 0, -146, -836, 0, -836,
5027 -836, -836, -836, -836, -836, -836, -836, -836, -836, 0,
5028 0, 0, 0, -836, -836, -836, -836, -836, -356, 0,
5029 -836, 0, -836, 0, 0, 0, -356, -356, -356, 0,
5030 0, 0, -356, -356, 0, -356, 0, 0, 0, 0,
5031 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5032 0, 0, 0, 0, 0, -356, -356, 0, -356, -356,
5033 -356, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, 0, 0, 0, -356, -356, 0, 0,
5036 0, 0, 0, 0, 0, 0, -356, -356, -356, -356,
5037 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
5038 0, 0, 0, -356, -356, -356, -356, 0, 828, -356,
5039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5040 0, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5041 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5042 0, 0, -147, -356, 0, -356, -356, -356, -356, -356,
5043 -356, -356, -356, -356, -356, 0, 0, 0, 0, 829,
5044 -356, -356, -356, -138, -356, 0, -356, 0, -356, 0,
5045 0, 0, -356, -356, -356, 0, 0, 0, -356, -356,
5046 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
5047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5048 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
5049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5051 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
5052 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
5053 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
5054 -356, -356, -356, 0, 828, -356, 0, 0, 0, 0,
5055 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5056 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
5057 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
5058 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5059 -356, 0, 0, 0, 0, 829, -356, -356, -356, -356,
5060 0, 0, -356, 3, -356, 4, 5, 6, 7, 8,
5061 -854, -854, -854, 9, 10, 0, 0, -854, 11, 0,
5062 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5063 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5064 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5065 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5066 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5067 -854, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5068 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5069 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5070 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5071 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5072 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5074 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5075 67, 68, 0, 0, 0, 3, -854, 4, 5, 6,
5076 7, 8, -854, 0, -854, 9, 10, 0, -854, -854,
5077 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5078 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5079 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5080 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5081 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5082 0, 0, -854, 0, 0, 0, 0, 0, 0, 0,
5083 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5084 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5085 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5086 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5087 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5088 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5089 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5090 0, 66, 67, 68, 0, 0, 0, 3, -854, 4,
5091 5, 6, 7, 8, -854, 0, -854, 9, 10, 0,
5092 0, -854, 11, -854, 12, 13, 14, 15, 16, 17,
5093 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5094 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5095 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5096 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5097 45, 46, 0, 0, -854, 0, 0, 0, 0, 0,
5098 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5099 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5100 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5101 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5102 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5105 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5106 -854, 4, 5, 6, 7, 8, -854, 0, -854, 9,
5107 10, 0, 0, -854, 11, 0, 12, 13, 14, 15,
5108 16, 17, 18, -854, 0, 0, 0, 0, 19, 20,
5109 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5110 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5111 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5112 43, 44, 45, 46, 0, 0, -854, 0, 0, 0,
5113 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5114 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5115 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5116 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5117 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5118 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5120 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5121 0, 3, -854, 4, 5, 6, 7, 8, -854, 0,
5122 -854, 9, 10, 0, 0, -854, 11, 0, 12, 13,
5123 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5124 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5125 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
5126 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5127 41, 42, 43, 44, 45, 46, 0, 0, -854, 0,
5128 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5130 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5131 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5132 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5135 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5136 0, 0, 0, 3, -854, 4, 5, 6, 7, 8,
5137 -854, -854, -854, 9, 10, 0, 0, 0, 11, 0,
5138 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5139 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5140 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5141 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5142 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5143 -854, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5145 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5146 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5147 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5148 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5150 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5151 67, 68, 0, 0, 0, 3, -854, 4, 5, 6,
5152 7, 8, -854, 0, -854, 9, 10, 0, 0, 0,
5153 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5154 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5155 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5156 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5157 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5158 0, 0, -854, 0, 0, 0, 0, 0, 0, 0,
5159 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5160 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5161 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5162 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5163 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5164 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5166 0, 66, 67, 68, 0, 0, 0, 3, -854, 4,
5167 5, 6, 7, 8, -854, 0, 0, 9, 10, 0,
5168 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5169 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5170 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5171 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5172 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5173 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5174 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5175 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5176 0, 0, 0, 0, 0, 51, 0, 0, 285, 53,
5177 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5178 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5180 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5181 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5182 -854, 0, 0, 0, -854, 3, -854, 4, 5, 6,
5183 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5184 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5185 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5186 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5187 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5188 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5190 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5191 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5192 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5193 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5194 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5195 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5196 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5197 0, 66, 67, 68, 0, 0, 0, 0, -854, 0,
5198 0, 0, -854, 3, -854, 4, 5, 6, 7, 8,
5199 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5200 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5201 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5202 0, 26, 0, 0, 0, 0, 0, 27, 28, 29,
5203 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5204 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5205 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5206 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5207 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5208 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5209 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5210 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5211 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5212 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5213 67, 68, 0, 0, -854, 3, -854, 4, 5, 6,
5214 7, 8, -854, 0, 0, 9, 10, 0, 0, 0,
5215 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5216 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5217 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5218 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5219 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5221 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5222 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5223 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5224 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5225 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5228 0, 66, 67, 68, 0, 0, -854, 404, -854, 4,
5229 5, 6, 0, 8, -854, 0, 0, 9, 10, 0,
5230 0, 0, 11, -3, 12, 13, 14, 15, 16, 17,
5231 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5232 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5233 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5234 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5235 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5236 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5237 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5238 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5239 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5240 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5243 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5244 331, 0, 0, 0, 0, 0, 332, 144, 145, 146,
5245 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5246 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5247 167, 0, 0, 0, 168, 169, 170, 434, 435, 436,
5248 437, 175, 176, 177, 0, 0, 0, 0, 0, 178,
5249 179, 180, 181, 438, 439, 440, 441, 186, 36, 37,
5250 442, 39, 0, 0, 0, 0, 0, 0, 0, 0,
5251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5252 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5253 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5254 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5255 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5256 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5258 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5259 214, 0, 215, 216, 0, 0, 0, 0, 0, 0,
5260 217, 443, 144, 145, 146, 147, 148, 149, 150, 151,
5261 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
5262 162, 163, 164, 165, 166, 167, 0, 0, 0, 168,
5263 169, 170, 171, 172, 173, 174, 175, 176, 177, 0,
5264 0, 0, 0, 0, 178, 179, 180, 181, 182, 183,
5265 184, 185, 186, 36, 37, 187, 39, 0, 0, 0,
5266 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5267 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5268 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5269 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5270 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5273 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5274 209, 210, 211, 212, 213, 214, 0, 215, 216, 0,
5275 0, 0, 0, 0, 0, 217, 144, 145, 146, 147,
5276 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5277 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5278 0, 0, 0, 168, 169, 170, 171, 172, 173, 174,
5279 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5280 180, 181, 182, 183, 184, 185, 186, 262, 0, 187,
5281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5282 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5283 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5284 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5286 203, 204, 0, 0, 58, 0, 0, 0, 0, 0,
5287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5289 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5290 0, 215, 216, 0, 0, 0, 0, 0, 0, 217,
5291 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
5292 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
5293 164, 165, 166, 167, 0, 0, 0, 168, 169, 170,
5294 171, 172, 173, 174, 175, 176, 177, 0, 0, 0,
5295 0, 0, 178, 179, 180, 181, 182, 183, 184, 185,
5296 186, 0, 0, 187, 0, 0, 0, 0, 0, 0,
5297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5298 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5299 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5300 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5301 0, 0, 0, 0, 203, 204, 0, 0, 58, 0,
5302 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5303 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5304 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5305 211, 212, 213, 214, 0, 215, 216, 0, 0, 0,
5306 0, 0, 0, 217, 144, 145, 146, 147, 148, 149,
5307 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5308 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5309 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
5310 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5311 182, 183, 184, 185, 186, 0, 0, 187, 0, 0,
5312 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5313 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5314 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5315 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5316 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5317 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5318 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5319 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5320 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5321 216, 4, 5, 6, 0, 8, 0, 217, 0, 9,
5322 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5323 271, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5324 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5325 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5326 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5327 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5330 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
5331 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5332 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5333 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5334 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5335 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5336 23, 24, 25, 305, 0, 227, 0, 0, 0, 0,
5337 0, 0, 302, 0, 0, 31, 32, 33, 34, 35,
5338 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5339 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5342 0, 0, 0, 0, 0, 303, 0, 0, 230, 53,
5343 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5344 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5345 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5346 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5347 0, 0, 0, 304, 19, 20, 21, 22, 23, 24,
5348 25, 612, 0, 227, 0, 0, 0, 0, 0, 0,
5349 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5350 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5351 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5352 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5353 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5354 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5355 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5356 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5357 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5358 0, 0, 0, 0, 0, 0, 4, 5, 6, 0,
5359 8, 66, 235, 68, 9, 10, 0, 0, 259, 11,
5360 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5361 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5362 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5363 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5364 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5365 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5366 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5367 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5368 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5369 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5370 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5371 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5372 0, 0, 0, 3, 0, 4, 5, 6, 7, 8,
5373 66, 67, 68, 9, 10, 0, 0, 259, 11, 0,
5374 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5375 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5376 0, 26, 0, 0, 0, 0, 0, 27, 28, 0,
5377 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5378 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5379 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5381 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5382 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5383 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5384 65, 0, 0, 404, 0, 4, 5, 6, 0, 8,
5385 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5386 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5387 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5388 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5389 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5390 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5391 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5393 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5394 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5395 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5396 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5397 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5398 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5399 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5400 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5401 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5402 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5403 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5404 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5405 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5406 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5407 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5408 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5409 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5410 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5411 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5412 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5413 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5414 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5415 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5416 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5417 0, 0, 0, 49, 479, 0, 0, 0, 0, 0,
5418 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5419 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5420 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5421 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5422 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5423 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5424 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5425 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5426 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5427 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5428 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5429 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5430 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5431 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5432 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5433 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5434 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5435 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5436 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5437 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5438 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5439 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5441 0, 0, 0, 49, 479, 0, 0, 0, 0, 0,
5442 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5443 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5444 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5445 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5446 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5447 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5448 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5449 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5450 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5451 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5452 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5453 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5454 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5455 232, 0, 57, 58, 234, 60, 61, 62, 63, 64,
5456 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5457 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5458 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5459 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5460 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5461 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5462 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5463 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5464 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5465 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5466 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5467 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5468 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5469 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5470 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5471 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5472 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5473 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5474 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5475 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5476 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5477 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5478 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5479 232, 0, 57, 58, 234, 60, 61, 62, 63, 64,
5480 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5481 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5482 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5483 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5484 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5485 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5486 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5487 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5488 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5489 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5490 0, 229, 0, 0, 230, 53, 54, 55, 0, 802,
5491 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5492 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5493 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5494 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5495 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5496 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5497 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5498 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5499 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5500 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5501 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5502 0, 813, 0, 0, 230, 53, 54, 55, 0, 802,
5503 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5504 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5505 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5506 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5507 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5508 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5509 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5510 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5511 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5512 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5513 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5514 0, 229, 0, 0, 230, 53, 54, 55, 0, 973,
5515 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5516 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5517 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5518 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5519 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5520 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5521 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5522 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5523 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5525 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5526 0, 229, 0, 0, 230, 53, 54, 55, 0, 1022,
5527 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5528 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5529 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5530 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5531 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5532 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5533 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5534 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5535 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5537 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5538 0, 229, 0, 0, 230, 53, 54, 55, 0, 802,
5539 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5540 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5541 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5542 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5543 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5544 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5545 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5546 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5547 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5548 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5549 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5550 0, 229, 0, 0, 230, 53, 54, 55, 0, 1155,
5551 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5552 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5553 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5554 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5555 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5556 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5557 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5558 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5559 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5560 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5561 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5562 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5563 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5564 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5565 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5566 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5567 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5568 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5569 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5570 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5571 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5573 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5574 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5575 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5576 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5577 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5578 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5579 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5580 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5581 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5582 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5583 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5584 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5585 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5586 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5587 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5588 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5589 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5590 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5591 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5592 0, 784, 0, 0, 0, 0, 0, 0, 28, 0,
5593 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5594 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5595 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5596 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5597 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5598 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5599 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5600 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5601 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5602 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5603 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5604 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5605 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5606 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5607 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5608 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5609 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5610 0, 813, 0, 0, 230, 53, 54, 55, 0, 0,
5611 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5612 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5613 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5614 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5615 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5616 0, 893, 0, 0, 0, 0, 0, 0, 28, 0,
5617 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5618 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5619 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5621 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5622 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5623 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5624 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5625 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5626 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5627 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5628 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5629 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5630 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5631 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5634 0, 303, 0, 0, 363, 53, 54, 55, 0, 364,
5635 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5636 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5637 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5638 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5639 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5640 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5641 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5642 41, 42, 43, 44, 45, 46, 0, 0, 0, 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, 0, 0, 415,
5646 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5647 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5648 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5649 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5650 271, 17, 18, 0, 0, 0, 0, 304, 19, 20,
5651 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5652 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5653 423, 35, 36, 37, 424, 39, 0, 40, 41, 42,
5654 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5657 0, 0, 0, 425, 0, 0, 0, 426, 0, 0,
5658 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5659 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5660 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5661 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5662 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5663 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5664 0, 0, 302, 0, 0, 31, 32, 33, 423, 35,
5665 36, 37, 424, 39, 0, 40, 41, 42, 43, 44,
5666 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5668 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5669 0, 0, 0, 0, 0, 426, 0, 0, 230, 53,
5670 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5671 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5672 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5673 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5674 0, 0, 0, 304, 19, 20, 272, 22, 23, 24,
5675 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5676 302, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5677 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5678 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5679 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5681 0, 0, 0, 303, 0, 0, 363, 53, 54, 55,
5682 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5683 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5684 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5685 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5686 0, 304, 19, 20, 272, 22, 23, 24, 25, 0,
5687 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5688 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5689 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5693 0, 1221, 0, 0, 230, 53, 54, 55, 0, 0,
5694 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5695 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5696 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5697 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5698 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5699 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5700 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5701 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5702 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5704 0, 0, 0, 0, 0, 0, 704, 643, 0, 1344,
5705 705, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5706 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5707 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5708 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5709 202, 0, 0, 0, 0, 0, 0, 304, 0, 0,
5710 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5713 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5714 214, 0, 215, 216, 707, 651, 0, 0, 708, 0,
5715 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5716 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5717 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5718 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5719 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5720 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5722 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5723 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5724 215, 216, 704, 643, 0, 0, 724, 0, 217, 0,
5725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5726 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5727 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5728 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5729 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5732 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5733 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5734 735, 643, 0, 0, 736, 0, 217, 0, 0, 0,
5735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5736 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5737 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5738 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5739 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5742 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5743 210, 211, 212, 213, 214, 0, 215, 216, 738, 651,
5744 0, 0, 739, 0, 217, 0, 0, 0, 0, 0,
5745 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5746 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5747 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5748 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5749 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5752 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5753 212, 213, 214, 0, 215, 216, 857, 643, 0, 0,
5754 858, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5755 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5756 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5757 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5758 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5759 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5760 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5762 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5763 214, 0, 215, 216, 860, 651, 0, 0, 861, 0,
5764 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5765 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5766 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5767 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5768 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5769 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5771 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5772 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5773 215, 216, 866, 643, 0, 0, 867, 0, 217, 0,
5774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5775 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5776 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5777 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5778 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5781 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5782 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5783 689, 651, 0, 0, 690, 0, 217, 0, 0, 0,
5784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5785 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5786 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5787 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5788 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5791 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5792 210, 211, 212, 213, 214, 0, 215, 216, 1028, 643,
5793 0, 0, 1029, 0, 217, 0, 0, 0, 0, 0,
5794 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5795 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5796 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5797 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5798 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5799 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5801 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5802 212, 213, 214, 0, 215, 216, 1031, 651, 0, 0,
5803 1032, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5804 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5805 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5806 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5807 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5808 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5809 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5811 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5812 214, 0, 215, 216, 1363, 643, 0, 0, 1364, 0,
5813 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5814 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5815 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5816 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5817 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5818 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5820 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5821 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5822 215, 216, 1366, 651, 0, 0, 1367, 0, 217, 0,
5823 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5824 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5825 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5826 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5827 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5828 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5829 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5830 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5831 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5832 1420, 643, 0, 0, 1421, 0, 217, 0, 0, 0,
5833 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5834 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5835 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5836 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5837 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5839 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5840 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5841 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
5842 0, 0, 0, 0, 217
5843};
5844
5845static const yytype_int16 yycheck[] =
5846{
5847 1, 70, 59, 70, 7, 15, 16, 408, 56, 107,
5848 15, 16, 58, 58, 116, 52, 53, 344, 1, 101,
5849 67, 399, 349, 401, 27, 104, 400, 426, 107, 13,
5850 14, 768, 766, 115, 255, 252, 7, 27, 107, 15,
5851 16, 89, 599, 766, 949, 602, 845, 615, 601, 15,
5852 16, 52, 53, 54, 55, 58, 27, 84, 469, 477,
5853 108, 109, 110, 21, 575, 111, 601, 855, 63, 64,
5854 65, 344, 89, 911, 469, 571, 349, 455, 54, 575,
5855 296, 56, 477, 525, 300, 605, 113, 589, 54, 55,
5856 1033, 1034, 913, 595, 472, 1194, 474, 515, 766, 473,
5857 52, 512, 112, 66, 630, 25, 25, 112, 111, 1208,
5858 1034, 81, 774, 0, 103, 104, 27, 825, 107, 15,
5859 16, 1318, 774, 13, 502, 682, 84, 29, 26, 1336,
5860 69, 1, 565, 25, 285, 1194, 112, 78, 66, 768,
5861 101, 109, 1000, 69, 66, 774, 112, 25, 25, 0,
5862 528, 1210, 25, 527, 1059, 1070, 1218, 1219, 97, 98,
5863 1033, 1034, 154, 25, 81, 247, 13, 66, 25, 134,
5864 612, 30, 98, 141, 10, 25, 100, 234, 13, 100,
5865 320, 321, 52, 53, 151, 26, 56, 28, 723, 287,
5866 134, 119, 157, 230, 155, 277, 26, 119, 13, 1104,
5867 56, 1106, 69, 144, 145, 146, 1403, 1000, 1066, 1416,
5868 134, 155, 363, 134, 153, 1158, 112, 155, 287, 89,
5869 287, 123, 121, 122, 706, 124, 37, 38, 310, 230,
5870 97, 98, 68, 120, 1158, 155, 155, 157, 108, 109,
5871 110, 111, 28, 154, 245, 255, 1084, 257, 285, 160,
5872 255, 252, 257, 151, 255, 737, 1355, 305, 337, 338,
5873 339, 340, 1083, 155, 154, 266, 13, 484, 1211, 977,
5874 160, 260, 261, 1066, 1011, 1218, 1219, 155, 155, 255,
5875 679, 257, 155, 266, 285, 1158, 153, 13, 305, 1351,
5876 1349, 257, 670, 155, 1353, 669, 1355, 715, 155, 336,
5877 157, 13, 713, 681, 274, 155, 680, 154, 865, 829,
5878 157, 1216, 1217, 160, 272, 413, 364, 275, 713, 154,
5879 715, 151, 755, 756, 161, 160, 363, 157, 854, 1244,
5880 409, 609, 13, 285, 100, 336, 418, 307, 1000, 154,
5881 1255, 304, 1257, 154, 413, 160, 425, 100, 337, 338,
5882 339, 340, 335, 342, 343, 1007, 273, 274, 1157, 13,
5883 230, 257, 363, 101, 1423, 1033, 1034, 154, 134, 1157,
5884 812, 1000, 159, 410, 411, 1168, 929, 859, 1171, 657,
5885 1173, 134, 1011, 100, 831, 663, 664, 869, 13, 364,
5886 400, 157, 839, 961, 929, 400, 266, 101, 401, 400,
5887 1105, 541, 403, 543, 1066, 264, 917, 154, 1351, 410,
5888 411, 363, 34, 160, 134, 285, 154, 134, 920, 921,
5889 409, 917, 924, 834, 926, 982, 928, 428, 154, 155,
5890 52, 1168, 1166, 66, 160, 305, 425, 1066, 155, 834,
5891 13, 451, 154, 1166, 402, 157, 451, 25, 160, 34,
5892 100, 155, 455, 100, 295, 296, 152, 134, 154, 300,
5893 15, 302, 100, 473, 999, 335, 336, 52, 473, 1384,
5894 25, 474, 473, 154, 100, 451, 100, 525, 911, 160,
5895 913, 482, 615, 484, 134, 451, 703, 134, 121, 122,
5896 1158, 494, 713, 363, 364, 768, 134, 455, 1166, 502,
5897 154, 774, 361, 469, 494, 155, 160, 366, 525, 1171,
5898 134, 789, 155, 1218, 1219, 793, 732, 527, 100, 1171,
5899 1101, 1102, 527, 494, 100, 528, 527, 938, 161, 154,
5900 1323, 600, 1325, 403, 1327, 160, 1329, 69, 290, 1168,
5901 410, 411, 1171, 1211, 344, 15, 512, 17, 1030, 349,
5902 1218, 1219, 134, 1182, 154, 451, 134, 157, 134, 98,
5903 693, 694, 58, 610, 612, 97, 98, 945, 615, 947,
5904 112, 554, 946, 155, 975, 853, 154, 155, 856, 997,
5905 158, 154, 78, 1085, 1086, 1087, 1088, 160, 598, 157,
5906 1327, 601, 870, 662, 727, 612, 100, 100, 599, 458,
5907 459, 602, 997, 1402, 744, 56, 66, 67, 467, 749,
5908 134, 1334, 108, 109, 153, 1408, 475, 476, 157, 646,
5909 69, 153, 659, 1105, 661, 157, 101, 654, 25, 1186,
5910 134, 134, 1213, 1214, 610, 100, 495, 794, 508, 615,
5911 797, 25, 693, 694, 503, 141, 693, 694, 649, 98,
5912 1083, 1084, 1053, 654, 78, 525, 155, 69, 659, 669,
5913 661, 121, 122, 155, 669, 692, 1334, 670, 669, 134,
5914 680, 1323, 25, 1000, 891, 680, 727, 34, 681, 680,
5915 727, 682, 100, 1351, 554, 733, 98, 78, 646, 1341,
5916 968, 692, 695, 971, 683, 52, 1182, 742, 1327, 451,
5917 978, 100, 703, 157, 1103, 695, 984, 1336, 158, 1079,
5918 1080, 1193, 1341, 157, 1196, 157, 733, 154, 142, 143,
5919 144, 145, 146, 160, 695, 726, 134, 1000, 480, 599,
5920 719, 483, 602, 69, 1216, 134, 488, 134, 1011, 1066,
5921 822, 52, 612, 159, 100, 56, 1147, 713, 69, 744,
5922 134, 746, 1254, 505, 749, 750, 155, 154, 155, 69,
5923 1412, 158, 98, 1320, 812, 154, 934, 725, 936, 158,
5924 154, 155, 874, 157, 158, 100, 97, 98, 134, 1000,
5925 100, 134, 69, 862, 1062, 864, 100, 1416, 98, 659,
5926 631, 661, 152, 1066, 863, 812, 66, 656, 1033, 1034,
5927 69, 154, 155, 83, 84, 158, 56, 648, 157, 134,
5928 97, 98, 682, 155, 134, 161, 1215, 69, 951, 952,
5929 134, 1303, 1304, 1305, 957, 958, 872, 69, 97, 98,
5930 155, 583, 153, 1267, 1235, 1269, 134, 696, 69, 78,
5931 841, 155, 843, 69, 845, 1066, 98, 106, 1334, 119,
5932 1336, 121, 122, 69, 124, 1341, 98, 137, 138, 611,
5933 1346, 37, 38, 733, 865, 706, 153, 98, 834, 872,
5934 1105, 97, 98, 862, 69, 864, 1246, 1247, 1248, 1249,
5935 1250, 97, 98, 1365, 153, 14, 15, 1122, 967, 69,
5936 891, 732, 69, 1026, 134, 1168, 737, 134, 1171, 155,
5937 951, 952, 97, 98, 951, 952, 957, 958, 1041, 1182,
5938 957, 958, 981, 52, 983, 899, 160, 56, 98, 929,
5939 69, 98, 56, 1158, 154, 155, 1412, 153, 1414, 966,
5940 1416, 1309, 1418, 25, 1308, 687, 946, 153, 69, 154,
5941 155, 946, 812, 784, 947, 946, 138, 1168, 97, 98,
5942 1171, 1437, 1173, 1387, 1388, 155, 1191, 1391, 1392, 1237,
5943 961, 1395, 26, 152, 69, 966, 97, 98, 827, 828,
5944 155, 603, 69, 1208, 69, 607, 835, 836, 967, 1026,
5945 158, 982, 134, 1218, 1219, 961, 69, 89, 90, 100,
5946 1041, 69, 97, 98, 1041, 865, 1430, 1431, 1432, 1433,
5947 97, 98, 97, 98, 153, 69, 1440, 759, 134, 1379,
5948 1380, 1381, 1382, 1349, 97, 98, 158, 1353, 859, 97,
5949 98, 1058, 153, 134, 40, 41, 885, 886, 869, 888,
5950 889, 154, 155, 97, 98, 155, 1020, 1021, 306, 307,
5951 152, 1024, 1025, 26, 155, 1082, 155, 1048, 153, 1050,
5952 54, 1108, 893, 58, 1327, 155, 153, 1058, 153, 1429,
5953 64, 65, 155, 1336, 1109, 66, 1067, 762, 1341, 1070,
5954 153, 766, 1073, 78, 155, 153, 134, 52, 1079, 1080,
5955 155, 1082, 155, 152, 943, 155, 69, 151, 155, 153,
5956 1091, 1092, 66, 157, 26, 13, 966, 956, 1146, 1377,
5957 17, 25, 1323, 108, 1325, 155, 1327, 112, 1329, 155,
5958 134, 78, 982, 44, 97, 98, 1153, 1154, 119, 871,
5959 121, 122, 1159, 124, 44, 1208, 1205, 152, 95, 96,
5960 1228, 44, 155, 78, 993, 1218, 1219, 69, 890, 44,
5961 892, 1223, 155, 1416, 56, 119, 1183, 121, 122, 1150,
5962 95, 96, 1153, 1154, 1024, 1025, 1157, 909, 1159, 1228,
5963 136, 1228, 66, 1033, 1034, 97, 98, 159, 151, 134,
5964 153, 8, 930, 931, 157, 142, 143, 144, 145, 146,
5965 15, 939, 1183, 155, 942, 1186, 944, 1408, 1058, 1030,
5966 1227, 52, 155, 155, 139, 140, 141, 142, 143, 144,
5967 145, 146, 66, 155, 155, 1242, 78, 40, 41, 42,
5968 43, 44, 1082, 155, 152, 119, 1205, 121, 122, 151,
5969 1268, 153, 66, 95, 96, 157, 1227, 155, 155, 1230,
5970 155, 1101, 1102, 1290, 101, 1105, 1315, 1316, 66, 9,
5971 155, 1242, 139, 1244, 155, 1246, 1247, 1248, 1249, 1250,
5972 52, 139, 1122, 155, 1255, 119, 1257, 121, 122, 155,
5973 1261, 155, 155, 155, 1105, 1106, 1267, 152, 1269, 141,
5974 142, 143, 144, 145, 146, 119, 1146, 121, 122, 155,
5975 1150, 155, 101, 1153, 1154, 52, 155, 56, 1158, 1159,
5976 160, 119, 1340, 121, 122, 158, 155, 52, 1308, 54,
5977 55, 56, 57, 1308, 155, 1000, 1309, 1308, 155, 1310,
5978 155, 1312, 52, 1183, 54, 55, 1186, 57, 152, 1320,
5979 1161, 1191, 139, 155, 1194, 155, 1315, 1316, 59, 60,
5980 61, 62, 155, 1370, 155, 155, 56, 55, 1208, 155,
5981 1210, 1200, 155, 1213, 1214, 1, 155, 102, 1218, 1219,
5982 155, 155, 1193, 335, 155, 1196, 155, 1227, 155, 15,
5983 16, 157, 102, 52, 157, 54, 55, 56, 57, 1370,
5984 155, 1066, 1242, 72, 504, 1216, 266, 1150, 1379, 1380,
5985 1381, 1382, 872, 1384, 508, 106, 1387, 1388, 610, 108,
5986 1391, 1392, 98, 1000, 1395, 110, 52, 53, 1268, 495,
5987 56, 1402, 692, 962, 54, 55, 981, 57, 1230, 911,
5988 755, 67, 1266, 102, 64, 65, 1334, 1287, 107, 1182,
5989 1092, 1265, 1403, 875, 1265, 1341, 359, 1287, 1429, 1430,
5990 1431, 1432, 1433, 89, 1211, 1211, 1207, 1312, 1402, 1440,
5991 52, 1310, 54, 55, 56, 57, 58, 103, 104, 119,
5992 1320, 107, 108, 109, 110, 543, 112, 111, 349, 1066,
5993 1066, 1397, 1303, 1304, 1305, 1217, 78, 1162, 115, -1,
5994 1340, 1166, -1, 1168, -1, -1, 1171, -1, 1173, 1349,
5995 92, -1, -1, 1353, -1, 1355, -1, 1182, -1, 52,
5996 102, 54, 55, 56, 57, 107, 108, 109, -1, 52,
5997 1370, 54, 55, 56, 57, -1, -1, -1, -1, -1,
5998 228, -1, -1, 231, 232, 233, -1, -1, -1, -1,
5999 -1, 1273, -1, -1, 1365, -1, -1, -1, -1, 141,
6000 -1, 1283, 144, 1374, 52, -1, 54, 55, 56, 57,
6001 58, -1, -1, -1, -1, 157, -1, 768, 1300, 1301,
6002 1302, -1, -1, 1423, -1, -1, 1397, -1, -1, 780,
6003 78, 1168, -1, -1, 1171, -1, 1173, 1, -1, -1,
6004 -1, -1, -1, -1, 230, 1182, -1, -1, 693, 694,
6005 -1, 15, 16, -1, 102, -1, -1, -1, -1, 107,
6006 108, 109, -1, -1, 709, 710, -1, -1, -1, 255,
6007 -1, 257, -1, -1, 260, 261, -1, -1, -1, -1,
6008 266, 52, 727, 54, 55, 56, 57, 58, 52, 53,
6009 -1, -1, -1, 141, -1, -1, 144, -1, 1323, 285,
6010 1325, -1, 1327, 67, 1329, -1, -1, 78, -1, 1334,
6011 -1, 1336, -1, -1, -1, -1, 1341, -1, -1, 305,
6012 -1, 1346, -1, -1, -1, -1, -1, -1, -1, -1,
6013 -1, 102, -1, -1, -1, -1, -1, 108, 109, 103,
6014 104, -1, -1, 107, -1, -1, -1, -1, 112, 335,
6015 336, 337, 338, 339, 340, -1, 342, 343, -1, -1,
6016 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6017 141, -1, -1, -1, -1, -1, -1, 363, 364, 1033,
6018 1034, -1, -1, 1408, -1, -1, 1323, 1412, 1325, 1414,
6019 1327, 1416, 1329, 1418, -1, -1, -1, -1, -1, 1336,
6020 -1, -1, -1, -1, 1341, -1, -1, -1, -1, 1346,
6021 -1, -1, 1437, -1, 400, -1, -1, 403, -1, -1,
6022 468, 469, -1, 409, 410, 411, -1, -1, -1, 477,
6023 -1, -1, -1, -1, -1, -1, -1, 882, -1, 425,
6024 -1, -1, -1, -1, -1, -1, -1, 1101, 1102, 1000,
6025 -1, 1105, -1, -1, -1, -1, -1, -1, 1009, -1,
6026 1011, -1, 1013, -1, 512, 451, 230, 515, 1122, -1,
6027 -1, 1408, -1, -1, -1, 1412, -1, 1414, -1, 1416,
6028 -1, 1418, -1, -1, -1, -1, -1, 473, -1, -1,
6029 -1, 255, -1, 257, -1, -1, 260, 261, -1, -1,
6030 1437, -1, 266, -1, 1158, -1, 951, 952, -1, -1,
6031 -1, -1, 957, 958, -1, 1066, -1, -1, -1, -1,
6032 -1, 285, 508, -1, -1, -1, -1, -1, -1, -1,
6033 -1, -1, -1, -1, -1, -1, -1, 1191, -1, 525,
6034 1194, 527, 590, -1, -1, -1, 991, 992, -1, 994,
6035 995, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6036 1214, -1, 610, -1, 1218, 1219, -1, 615, 554, -1,
6037 -1, 335, 336, 337, 338, 339, 340, -1, 342, 343,
6038 -1, -1, -1, -1, -1, -1, -1, 1033, 1034, -1,
6039 -1, -1, -1, -1, -1, -1, 1041, -1, -1, 363,
6040 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6041 -1, -1, 598, 599, -1, 601, 602, 1168, -1, -1,
6042 1065, -1, 1173, -1, 610, -1, 612, -1, 1179, 615,
6043 -1, 1182, -1, 1287, -1, -1, 400, -1, -1, 403,
6044 -1, -1, -1, -1, -1, 409, 410, 411, 52, 697,
6045 54, 55, 56, 57, 58, 1101, 1102, -1, -1, 1105,
6046 -1, 425, -1, -1, -1, 713, 52, 715, 54, 55,
6047 56, 57, 58, 659, 78, 661, 1122, -1, -1, -1,
6048 -1, -1, -1, 669, -1, -1, -1, 451, 92, -1,
6049 -1, -1, 78, -1, 680, 1349, 682, 683, 102, 1353,
6050 -1, 1355, -1, 107, 108, 109, 92, 693, 694, 473,
6051 -1, -1, 1158, -1, -1, -1, 102, -1, -1, -1,
6052 -1, -1, 108, 109, -1, 773, -1, -1, -1, -1,
6053 -1, -1, -1, 719, -1, -1, -1, 141, -1, -1,
6054 144, 727, -1, -1, 508, 1191, -1, 733, 1194, -1,
6055 -1, -1, -1, -1, 802, 141, -1, -1, -1, -1,
6056 -1, -1, 1208, 527, 1210, -1, -1, 1213, 1214, 1423,
6057 -1, -1, 1218, 1219, 1325, -1, 1327, -1, 1329, -1,
6058 -1, -1, -1, -1, -1, 1336, 834, -1, -1, -1,
6059 554, -1, -1, -1, -1, 1346, -1, -1, -1, -1,
6060 -1, -1, -1, -1, 852, -1, -1, -1, -1, -1,
6061 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6062 -1, -1, -1, -1, -1, -1, 812, -1, -1, -1,
6063 -1, -1, -1, -1, 598, 599, -1, 601, 602, -1,
6064 -1, 1287, -1, -1, -1, -1, 610, -1, -1, -1,
6065 -1, 615, -1, -1, -1, -1, -1, 1408, -1, -1,
6066 -1, -1, -1, 1414, -1, 1416, -1, 1418, -1, -1,
6067 -1, -1, -1, -1, -1, -1, 862, -1, 864, 865,
6068 -1, -1, -1, -1, -1, -1, 1437, 1, -1, -1,
6069 938, -1, -1, -1, -1, 659, -1, 661, -1, -1,
6070 -1, 15, 16, 1349, -1, 669, -1, 1353, -1, 1355,
6071 -1, -1, -1, 961, -1, -1, 680, -1, 682, 683,
6072 -1, -1, -1, -1, -1, 973, -1, -1, -1, 693,
6073 694, -1, -1, -1, -1, -1, -1, -1, 52, 53,
6074 -1, -1, -1, 929, -1, -1, -1, -1, -1, 997,
6075 -1, -1, -1, 67, -1, 719, -1, -1, -1, -1,
6076 946, -1, -1, 727, -1, 951, 952, -1, -1, -1,
6077 -1, 957, 958, -1, 1022, -1, -1, 1423, -1, -1,
6078 966, 967, -1, -1, -1, -1, -1, -1, -1, 103,
6079 104, -1, -1, 107, -1, -1, 982, -1, 112, 33,
6080 34, 35, 36, -1, -1, -1, -1, -1, -1, 1057,
6081 -1, -1, -1, -1, -1, 49, 50, 51, 52, -1,
6082 -1, -1, 56, -1, -1, 59, 60, 61, 62, 63,
6083 -1, -1, -1, -1, -1, -1, -1, -1, 1024, 1025,
6084 1026, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6085 -1, -1, -1, -1, -1, 1041, -1, 91, 92, 1033,
6086 1034, -1, -1, -1, -1, 99, -1, -1, 102, -1,
6087 104, 105, 1058, 107, -1, -1, 110, 111, 112, 113,
6088 114, 115, 116, 117, 118, -1, -1, -1, -1, 1033,
6089 1034, -1, -1, -1, -1, -1, 1082, -1, 862, -1,
6090 864, 865, -1, -1, -1, -1, 140, 1155, -1, -1,
6091 -1, -1, -1, 147, -1, -1, 230, -1, -1, -1,
6092 154, -1, -1, 1033, 1034, -1, -1, 1101, 1102, -1,
6093 -1, 1105, -1, -1, -1, -1, -1, -1, -1, -1,
6094 -1, 255, -1, 257, -1, -1, 260, 261, 1122, -1,
6095 -1, -1, 266, -1, -1, -1, -1, 1101, 1102, -1,
6096 1146, 1105, -1, -1, 1150, 929, -1, 1153, 1154, -1,
6097 -1, 285, -1, 1159, -1, -1, -1, -1, 1122, -1,
6098 -1, -1, 946, -1, 1158, -1, -1, 951, 952, -1,
6099 -1, 1101, 1102, 957, 958, 1105, -1, 1183, -1, -1,
6100 1186, -1, 966, 967, -1, -1, -1, -1, -1, -1,
6101 -1, -1, 1122, -1, 1158, -1, -1, 1191, 982, 1205,
6102 1194, 335, 336, 337, 338, 339, 340, -1, 342, 343,
6103 -1, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6104 1214, 1227, -1, -1, 1218, 1219, -1, 1191, 1158, 363,
6105 1194, -1, -1, -1, -1, -1, 1242, -1, -1, -1,
6106 1024, 1025, 1026, -1, 1208, -1, 1210, -1, -1, 1213,
6107 1214, -1, -1, -1, 1218, 1219, -1, 1041, -1, -1,
6108 -1, 1191, 1268, -1, 1194, -1, 400, -1, -1, 403,
6109 -1, -1, -1, -1, 1058, 409, 410, 411, 1208, -1,
6110 1210, -1, -1, 1213, 1214, -1, -1, -1, 1218, 1219,
6111 -1, 425, -1, 1287, -1, -1, -1, -1, 1082, -1,
6112 -1, -1, 1308, -1, -1, -1, -1, -1, -1, 1315,
6113 1316, -1, -1, -1, 1320, -1, -1, 451, -1, -1,
6114 -1, -1, -1, 1287, -1, -1, -1, -1, -1, -1,
6115 -1, -1, -1, -1, 1340, -1, -1, 1033, 1034, 473,
6116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6117 -1, -1, -1, -1, -1, 1349, -1, 1287, -1, 1353,
6118 -1, 1355, -1, -1, 1370, -1, 1150, -1, -1, 1153,
6119 1154, -1, -1, -1, 508, 1159, -1, -1, -1, -1,
6120 1, 1033, 1034, -1, -1, 1349, -1, -1, -1, 1353,
6121 -1, 1355, -1, 527, 15, 16, -1, -1, -1, 1183,
6122 -1, -1, 1186, -1, -1, 1101, 1102, -1, -1, 1105,
6123 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1349,
6124 554, 1205, -1, 1353, -1, 1355, 1122, -1, -1, 1423,
6125 -1, 52, 53, -1, -1, -1, -1, -1, -1, 1033,
6126 1034, -1, -1, 1227, -1, -1, 67, -1, -1, 1101,
6127 1102, -1, -1, 1105, -1, -1, -1, -1, 1242, 1423,
6128 -1, -1, 1158, -1, 598, 599, -1, 601, 602, -1,
6129 1122, -1, -1, -1, -1, -1, 610, -1, -1, -1,
6130 -1, 615, 103, 104, -1, -1, 107, -1, -1, -1,
6131 -1, 112, -1, 1423, -1, 1191, -1, -1, 1194, -1,
6132 -1, -1, -1, -1, -1, -1, 1158, 1101, 1102, -1,
6133 -1, 1105, 1208, -1, 1210, -1, -1, 1213, 1214, -1,
6134 -1, -1, 1218, 1219, 1308, 659, -1, 661, 1122, -1,
6135 -1, 1315, 1316, -1, -1, 669, 1320, -1, -1, 1191,
6136 -1, -1, 1194, -1, -1, -1, 680, -1, 682, 683,
6137 -1, -1, -1, -1, -1, -1, 1208, -1, 1210, 693,
6138 694, 1213, 1214, -1, 1158, -1, 1218, 1219, -1, -1,
6139 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6140 -1, -1, -1, 1033, 1034, 719, 1370, -1, -1, -1,
6141 -1, 1287, -1, 727, -1, -1, -1, 1191, -1, -1,
6142 1194, -1, -1, -1, -1, -1, -1, -1, -1, 230,
6143 -1, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6144 1214, -1, -1, -1, 1218, 1219, -1, -1, -1, -1,
6145 -1, -1, -1, -1, 255, 1287, 257, -1, -1, 260,
6146 261, -1, -1, -1, -1, 266, -1, -1, -1, -1,
6147 -1, 1101, 1102, 1349, -1, 1105, -1, 1353, -1, 1355,
6148 -1, -1, -1, -1, 285, -1, -1, -1, -1, -1,
6149 -1, -1, 1122, -1, -1, -1, -1, -1, -1, -1,
6150 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6151 -1, -1, -1, 1287, -1, -1, -1, 1349, -1, -1,
6152 -1, 1353, -1, 1355, -1, -1, -1, -1, 1158, -1,
6153 -1, -1, -1, -1, 335, 336, 337, 338, 339, 340,
6154 -1, 342, 343, -1, -1, -1, -1, 1423, 862, -1,
6155 864, 865, -1, -1, -1, -1, -1, -1, -1, -1,
6156 -1, 1191, 363, -1, 1194, -1, -1, -1, -1, -1,
6157 -1, -1, -1, -1, -1, 1349, -1, -1, 1208, 1353,
6158 1210, 1355, -1, 1213, 1214, -1, -1, -1, 1218, 1219,
6159 1, 1423, -1, -1, -1, -1, -1, -1, -1, 400,
6160 -1, -1, 403, -1, 15, 16, -1, -1, 409, 410,
6161 411, -1, -1, -1, -1, 929, -1, -1, -1, -1,
6162 -1, -1, -1, -1, 425, -1, -1, -1, -1, -1,
6163 -1, -1, 946, -1, -1, -1, -1, 951, 952, -1,
6164 -1, 52, 53, 957, 958, 56, -1, -1, -1, 1423,
6165 451, -1, 966, 967, -1, -1, -1, 1287, 33, 34,
6166 35, 36, -1, -1, -1, -1, -1, -1, 982, -1,
6167 -1, -1, 473, -1, 49, 50, 51, -1, 89, -1,
6168 -1, -1, -1, -1, 59, 60, 61, 62, 63, -1,
6169 -1, -1, -1, -1, -1, -1, -1, 108, 109, 110,
6170 -1, 112, -1, -1, -1, -1, -1, 508, -1, -1,
6171 1024, 1025, 1026, -1, -1, -1, -1, -1, -1, 1349,
6172 -1, -1, -1, 1353, -1, 1355, 527, 1041, -1, -1,
6173 -1, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6174 115, 116, 117, 118, 1058, -1, -1, -1, -1, -1,
6175 -1, -1, -1, 554, -1, -1, -1, -1, -1, -1,
6176 -1, 78, 79, 80, 81, 82, 83, 84, 1082, -1,
6177 87, 88, 147, -1, -1, -1, -1, -1, 95, 96,
6178 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6179 -1, -1, -1, 1423, -1, -1, -1, 598, 599, -1,
6180 601, 602, -1, -1, -1, -1, -1, -1, -1, 610,
6181 -1, -1, -1, -1, 615, -1, -1, -1, -1, 230,
6182 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6183 -1, -1, -1, -1, -1, -1, 1150, -1, -1, 1153,
6184 1154, -1, -1, -1, 255, 1159, 257, -1, -1, -1,
6185 -1, -1, -1, -1, -1, 266, -1, -1, 659, -1,
6186 661, -1, -1, -1, -1, -1, -1, -1, 669, 1183,
6187 -1, -1, 1186, -1, 285, -1, -1, -1, -1, 680,
6188 -1, 682, 683, -1, -1, -1, -1, -1, -1, -1,
6189 -1, 1205, 693, 694, 305, -1, -1, -1, -1, -1,
6190 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6191 -1, -1, -1, 1227, -1, -1, -1, -1, 719, -1,
6192 -1, -1, -1, -1, 335, 336, 727, -1, 1242, 0,
6193 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
6194 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6195 -1, -1, 363, 364, 25, 26, 27, -1, -1, -1,
6196 -1, -1, -1, 1, -1, -1, 37, 38, -1, 40,
6197 41, 42, 43, 44, -1, -1, -1, 15, 16, -1,
6198 -1, -1, -1, -1, -1, -1, -1, -1, -1, 400,
6199 -1, -1, 403, -1, 1308, -1, -1, 68, 69, 410,
6200 411, 1315, 1316, -1, -1, -1, 1320, -1, -1, -1,
6201 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
6202 -1, -1, -1, -1, -1, -1, 97, 98, -1, -1,
6203 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6204 451, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6205 -1, 89, -1, -1, -1, -1, 1370, -1, -1, -1,
6206 -1, 862, 473, 864, 865, -1, -1, -1, -1, -1,
6207 108, 109, 110, -1, 112, -1, -1, -1, -1, -1,
6208 151, 152, -1, 154, -1, -1, 157, 158, -1, 160,
6209 -1, -1, -1, -1, -1, -1, -1, 508, -1, -1,
6210 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6211 -1, -1, -1, -1, 525, -1, 527, -1, -1, -1,
6212 -1, -1, -1, -1, -1, -1, -1, -1, 929, -1,
6213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6214 -1, -1, -1, 554, -1, 946, -1, -1, -1, -1,
6215 951, 952, -1, -1, -1, -1, 957, 958, -1, -1,
6216 -1, -1, -1, -1, -1, 966, 967, -1, -1, -1,
6217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6218 -1, 982, -1, -1, -1, -1, -1, -1, 599, -1,
6219 -1, 602, 230, -1, -1, -1, -1, -1, -1, -1,
6220 -1, 612, -1, -1, 615, -1, -1, -1, -1, -1,
6221 -1, -1, -1, -1, -1, -1, -1, 255, -1, 257,
6222 -1, -1, -1, 1024, 1025, 1026, -1, -1, 266, -1,
6223 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6224 1041, -1, -1, -1, -1, -1, -1, 285, 659, -1,
6225 661, -1, -1, -1, -1, -1, -1, 1058, 669, -1,
6226 -1, -1, -1, -1, -1, -1, -1, 305, -1, 680,
6227 -1, 682, 1, -1, -1, -1, -1, -1, -1, -1,
6228 -1, 1082, 693, 694, -1, -1, -1, -1, -1, -1,
6229 -1, -1, -1, -1, -1, 44, -1, 335, 336, -1,
6230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6231 -1, -1, -1, -1, -1, -1, 727, -1, -1, -1,
6232 -1, -1, 733, 52, 53, 363, 364, 56, -1, 78,
6233 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6234 89, 90, -1, -1, -1, -1, 95, 96, -1, 1150,
6235 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6236 89, -1, 400, -1, -1, 403, -1, -1, -1, -1,
6237 -1, -1, 410, 411, -1, -1, -1, -1, -1, 108,
6238 109, 110, 1183, -1, -1, 1186, 135, -1, 137, 138,
6239 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6240 -1, 812, -1, -1, 1205, -1, 155, -1, -1, -1,
6241 -1, -1, -1, 451, 78, 79, 80, 81, 82, 83,
6242 84, 85, -1, 87, 88, -1, 1227, -1, -1, -1,
6243 -1, 95, 96, -1, -1, 473, -1, -1, -1, -1,
6244 -1, 1242, -1, -1, -1, -1, -1, -1, -1, -1,
6245 -1, -1, -1, -1, 865, -1, -1, -1, -1, -1,
6246 -1, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6247 508, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6248 144, 145, 146, -1, -1, -1, -1, 525, -1, 527,
6249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6250 -1, 230, 1, -1, -1, -1, -1, 1308, -1, -1,
6251 -1, -1, -1, -1, 1315, 1316, 554, -1, -1, 1320,
6252 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6253 87, 88, 89, 90, -1, 946, -1, 266, 95, 96,
6254 951, 952, -1, -1, 101, -1, 957, 958, -1, -1,
6255 -1, -1, -1, 52, 53, 966, 285, 56, -1, -1,
6256 -1, 599, -1, -1, 602, -1, -1, -1, -1, 1370,
6257 -1, 982, -1, -1, 612, -1, 305, 615, 135, -1,
6258 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6259 89, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6260 -1, -1, -1, -1, -1, -1, 335, 336, -1, 108,
6261 109, 110, 111, 1024, 1025, 1026, -1, -1, -1, -1,
6262 -1, 659, -1, 661, 44, -1, -1, -1, -1, -1,
6263 1041, 669, -1, -1, 363, 364, -1, -1, -1, -1,
6264 -1, -1, 680, -1, 682, -1, -1, 1058, -1, -1,
6265 1, -1, -1, -1, -1, 693, 694, -1, 78, 79,
6266 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6267 90, 1082, -1, -1, 403, 95, 96, -1, -1, -1,
6268 -1, 410, 411, -1, -1, -1, -1, -1, -1, 727,
6269 -1, -1, -1, -1, -1, 733, -1, -1, -1, -1,
6270 -1, 52, 53, -1, -1, -1, -1, -1, -1, -1,
6271 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6272 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6273 -1, 230, -1, -1, -1, 1146, -1, -1, -1, 1150,
6274 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6275 -1, -1, -1, -1, -1, -1, -1, 108, -1, -1,
6276 -1, -1, -1, -1, -1, -1, -1, 266, -1, -1,
6277 -1, -1, 1183, -1, 812, 1186, -1, -1, -1, 508,
6278 -1, -1, -1, -1, -1, -1, 285, -1, -1, -1,
6279 -1, -1, -1, -1, -1, -1, 525, -1, -1, -1,
6280 -1, -1, -1, -1, -1, -1, 305, -1, -1, -1,
6281 -1, -1, -1, -1, -1, -1, 1227, -1, -1, -1,
6282 -1, -1, -1, -1, -1, 554, -1, 865, -1, -1,
6283 -1, 1242, -1, -1, -1, -1, 335, 336, -1, -1,
6284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6285 -1, -1, -1, -1, -1, -1, -1, 1268, -1, -1,
6286 -1, -1, -1, -1, 363, 364, -1, -1, -1, -1,
6287 599, -1, -1, 602, -1, -1, -1, -1, -1, 230,
6288 -1, -1, -1, 612, -1, -1, 615, -1, -1, -1,
6289 -1, -1, -1, -1, -1, -1, -1, 1308, -1, -1,
6290 -1, -1, -1, -1, 403, -1, -1, -1, 946, 1320,
6291 -1, 410, 411, 951, 952, 266, -1, -1, -1, 957,
6292 958, -1, -1, -1, -1, -1, -1, -1, 966, 1340,
6293 659, -1, 661, -1, 285, -1, -1, -1, -1, -1,
6294 -1, -1, -1, -1, 982, -1, -1, -1, -1, -1,
6295 -1, -1, -1, 682, -1, -1, -1, -1, -1, 1370,
6296 -1, -1, -1, -1, 693, 694, -1, -1, -1, -1,
6297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6298 -1, -1, -1, -1, 335, 336, 1024, 1025, 1026, -1,
6299 -1, -1, -1, -1, -1, -1, -1, -1, 727, -1,
6300 -1, -1, -1, 1041, 733, -1, -1, -1, -1, 508,
6301 -1, -1, 363, 742, -1, -1, -1, -1, -1, -1,
6302 1058, -1, -1, -1, -1, 1, 525, -1, -1, -1,
6303 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6304 -1, 56, -1, -1, 1082, -1, -1, -1, -1, -1,
6305 -1, -1, 403, -1, -1, 554, -1, -1, -1, 410,
6306 411, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6307 -1, -1, 87, 88, -1, -1, 52, 53, 93, 94,
6308 95, 96, -1, 812, -1, -1, -1, -1, -1, -1,
6309 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
6310 599, -1, -1, 602, -1, -1, -1, -1, 1146, -1,
6311 -1, -1, 1150, 612, -1, 1153, 1154, -1, -1, -1,
6312 -1, 1159, 137, 138, 139, 140, 141, 142, 143, 144,
6313 145, 146, -1, 148, 149, -1, 865, -1, -1, -1,
6314 -1, 156, 157, -1, -1, 1183, -1, -1, 1186, 78,
6315 79, 80, 81, 82, 83, 84, -1, 508, 87, 88,
6316 659, -1, 661, -1, -1, -1, 95, 96, -1, -1,
6317 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6318 -1, -1, -1, 682, -1, -1, -1, -1, -1, 1227,
6319 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6320 -1, -1, -1, 554, 1242, -1, -1, -1, 137, 138,
6321 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6322 -1, -1, 951, 952, -1, -1, -1, -1, 957, 958,
6323 1268, -1, -1, -1, 733, -1, -1, 966, -1, -1,
6324 -1, -1, -1, -1, -1, -1, -1, -1, 599, -1,
6325 -1, 602, -1, 982, 230, -1, -1, -1, -1, -1,
6326 -1, -1, -1, -1, 615, -1, -1, -1, -1, -1,
6327 1308, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6328 -1, -1, 1320, -1, -1, -1, -1, -1, -1, -1,
6329 266, -1, -1, -1, -1, 1024, 1025, 1026, -1, -1,
6330 -1, -1, 1340, -1, -1, -1, -1, -1, 659, 285,
6331 661, -1, 1041, 812, -1, -1, -1, -1, -1, -1,
6332 -1, -1, 33, 34, 35, 36, -1, -1, -1, 1058,
6333 -1, 682, 1370, -1, -1, -1, -1, -1, 49, 50,
6334 51, 52, 693, 694, -1, 56, -1, 58, 59, 60,
6335 61, 62, 63, 1082, -1, -1, -1, -1, -1, 335,
6336 336, -1, -1, -1, -1, -1, 865, 78, -1, -1,
6337 -1, -1, -1, -1, -1, -1, 727, -1, -1, -1,
6338 91, 92, -1, -1, -1, -1, -1, 363, 99, -1,
6339 -1, 102, -1, 104, 105, -1, 107, 108, -1, 110,
6340 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6341 -1, -1, -1, -1, -1, -1, -1, 1146, -1, -1,
6342 -1, 1150, -1, -1, 1153, 1154, -1, 403, -1, 140,
6343 1159, -1, -1, -1, 410, 411, 147, -1, -1, -1,
6344 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6345 -1, -1, -1, -1, 1183, -1, -1, 1186, -1, -1,
6346 52, 53, -1, -1, 56, -1, -1, 966, -1, -1,
6347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6348 -1, -1, -1, 982, 76, 77, 78, 79, 80, 81,
6349 82, 83, 84, -1, -1, 87, 88, -1, 1227, -1,
6350 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6351 -1, -1, -1, 1242, 865, 107, 108, -1, -1, -1,
6352 -1, -1, -1, -1, -1, 1024, 1025, -1, -1, -1,
6353 -1, -1, 508, -1, -1, -1, -1, -1, -1, 1268,
6354 -1, 15, 16, -1, -1, 137, 138, 139, 140, 141,
6355 142, 143, 144, 145, 146, -1, 148, 149, -1, 1058,
6356 -1, -1, -1, -1, 156, -1, -1, -1, -1, -1,
6357 -1, -1, -1, 47, 48, 49, 50, -1, 554, -1,
6358 54, 55, -1, 1082, -1, -1, -1, -1, -1, -1,
6359 -1, 1320, -1, 67, 68, -1, -1, -1, -1, -1,
6360 951, 952, -1, -1, -1, -1, 957, 958, -1, -1,
6361 -1, 1340, -1, -1, -1, 966, -1, -1, -1, -1,
6362 -1, -1, -1, 599, -1, -1, 602, -1, -1, -1,
6363 -1, 982, -1, -1, -1, -1, -1, -1, 112, 615,
6364 -1, 1370, -1, -1, -1, -1, -1, 1146, -1, -1,
6365 -1, 1150, -1, -1, 1153, 1154, -1, -1, -1, -1,
6366 1159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6367 -1, -1, -1, 1024, 1025, 1026, -1, -1, -1, -1,
6368 -1, -1, -1, 659, 1183, 661, -1, 1186, -1, -1,
6369 1041, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6370 -1, -1, -1, -1, -1, -1, 682, 1058, -1, -1,
6371 -1, -1, -1, -1, -1, -1, -1, 693, 694, -1,
6372 -1, -1, -1, -1, -1, -1, -1, -1, 1227, -1,
6373 -1, 1082, -1, -1, -1, -1, -1, -1, -1, -1,
6374 -1, -1, -1, 1242, -1, -1, -1, -1, -1, -1,
6375 -1, 727, -1, -1, 228, -1, -1, 231, 232, 233,
6376 -1, 235, -1, -1, -1, -1, -1, -1, -1, 1268,
6377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6378 -1, 255, -1, 257, -1, -1, -1, -1, -1, -1,
6379 -1, -1, -1, -1, -1, 1146, -1, -1, -1, 1150,
6380 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6381 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6382 -1, 1320, -1, -1, -1, -1, -1, -1, -1, -1,
6383 -1, -1, 1183, -1, -1, 1186, -1, -1, -1, -1,
6384 -1, 1340, -1, -1, -1, -1, -1, -1, -1, -1,
6385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6387 -1, 1370, -1, -1, -1, -1, 1227, -1, -1, -1,
6388 -1, -1, -1, -1, -1, -1, -1, -1, -1, 865,
6389 -1, 1242, -1, -1, 368, 369, 370, 371, 372, -1,
6390 -1, 375, 376, 377, 378, 379, 380, 381, 382, -1,
6391 384, -1, -1, 387, 388, 389, 390, 391, 392, 393,
6392 394, 395, 396, -1, 52, 53, 400, -1, 56, -1,
6393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6394 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6395 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6396 88, -1, -1, -1, -1, 93, 94, 95, 96, 1320,
6397 -1, -1, -1, -1, -1, 951, 952, 451, -1, 107,
6398 108, 957, 958, -1, -1, -1, -1, -1, -1, -1,
6399 966, -1, -1, -1, 468, 469, -1, -1, -1, 473,
6400 -1, -1, -1, 477, -1, 479, 982, -1, -1, 137,
6401 138, 139, 140, 141, 142, 143, 144, 145, 146, 1370,
6402 148, 149, -1, 497, -1, -1, -1, -1, 156, -1,
6403 -1, -1, -1, -1, -1, -1, -1, -1, 512, -1,
6404 -1, 515, -1, -1, -1, -1, -1, -1, 1024, 1025,
6405 1026, -1, -1, 527, -1, -1, -1, -1, -1, -1,
6406 -1, -1, -1, -1, -1, 1041, -1, -1, -1, -1,
6407 -1, 545, -1, 33, 34, 35, 36, -1, -1, -1,
6408 -1, -1, 1058, -1, -1, -1, -1, -1, -1, 49,
6409 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
6410 60, 61, 62, 63, -1, -1, 1082, -1, -1, -1,
6411 -1, -1, -1, -1, -1, -1, 590, -1, -1, -1,
6412 -1, -1, -1, -1, 598, -1, -1, 601, -1, -1,
6413 -1, 91, 92, -1, -1, -1, 610, -1, -1, 99,
6414 -1, 615, 102, -1, 104, 105, -1, 107, -1, -1,
6415 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6416 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6417 -1, -1, -1, -1, 1150, -1, -1, 1153, 1154, -1,
6418 140, -1, -1, 1159, -1, -1, -1, 147, -1, -1,
6419 -1, -1, -1, -1, -1, 669, -1, -1, -1, -1,
6420 -1, -1, -1, -1, -1, -1, 680, 1183, -1, -1,
6421 1186, -1, -1, -1, -1, -1, -1, -1, -1, 693,
6422 694, -1, -1, 697, 698, -1, -1, -1, -1, -1,
6423 -1, -1, -1, -1, -1, 709, 710, -1, -1, 713,
6424 -1, 715, -1, -1, -1, -1, -1, -1, 722, 723,
6425 -1, 1227, -1, 727, -1, -1, -1, -1, -1, -1,
6426 -1, -1, -1, -1, -1, -1, 1242, -1, -1, -1,
6427 0, 1, -1, 3, 4, 5, 6, 7, 8, 9,
6428 10, 11, 12, -1, 14, 15, 16, 17, 18, 19,
6429 20, 21, 22, 23, 24, 25, -1, -1, -1, 773,
6430 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6431 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6432 50, 51, 52, 53, 54, 55, 56, 57, 802, 59,
6433 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6434 -1, -1, -1, -1, 1320, -1, 76, 77, -1, -1,
6435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6436 834, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6437 -1, -1, 102, 103, 104, 105, -1, 107, 852, -1,
6438 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6439 120, -1, -1, -1, 1370, -1, -1, -1, -1, -1,
6440 -1, -1, -1, -1, -1, -1, -1, -1, 882, -1,
6441 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6442 -1, -1, 152, 33, 34, 35, 36, -1, 158, -1,
6443 160, -1, -1, -1, -1, -1, -1, -1, -1, 49,
6444 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
6445 60, 61, 62, 63, -1, 929, -1, -1, -1, -1,
6446 -1, -1, -1, -1, 938, -1, -1, -1, -1, -1,
6447 -1, -1, 946, -1, -1, -1, 950, 951, 952, -1,
6448 -1, 91, 92, 957, 958, -1, -1, 961, -1, 99,
6449 -1, -1, 102, -1, 104, 105, -1, -1, -1, 973,
6450 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6451 -1, -1, -1, -1, -1, -1, -1, 991, 992, -1,
6452 994, 995, -1, 997, -1, 999, -1, -1, -1, -1,
6453 140, -1, -1, -1, -1, -1, -1, 147, -1, -1,
6454 -1, -1, -1, -1, 1018, 1019, -1, -1, 1022, -1,
6455 -1, -1, 1026, 1027, 0, 1, -1, 3, 4, 5,
6456 6, 7, -1, -1, -1, 11, 12, 1041, -1, -1,
6457 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6458 -1, -1, -1, 1057, 30, 31, 32, 33, 34, 35,
6459 36, 1065, -1, 39, -1, -1, -1, -1, -1, 45,
6460 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6461 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6462 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6463 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6464 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6465 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6466 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6467 116, 117, 118, -1, 120, -1, -1, -1, -1, -1,
6468 -1, 1155, -1, -1, -1, -1, -1, -1, -1, -1,
6469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6470 -1, 147, 148, 149, -1, -1, 0, 1, 154, 3,
6471 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6472 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6473 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6474 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6475 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6476 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6477 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6478 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6479 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6480 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6481 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6482 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6483 -1, -1, -1, -1, 1308, -1, -1, -1, -1, -1,
6484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6485 -1, -1, -1, 147, 148, 149, -1, -1, 0, 1,
6486 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6487 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6488 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6489 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6490 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6491 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6492 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6493 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6494 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6495 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6496 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6497 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6498 -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
6499 -1, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6500 14, 15, -1, 17, -1, 147, 148, 149, -1, -1,
6501 152, 25, 26, 27, 28, 29, -1, -1, 160, -1,
6502 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6503 44, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6504 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6505 -1, 95, 96, -1, 68, 69, -1, -1, -1, -1,
6506 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6507 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6508 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6509 -1, 135, 106, 137, 138, 139, 140, 141, 142, 143,
6510 144, 145, 146, -1, -1, -1, 120, -1, -1, 123,
6511 154, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6512 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6513 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6514 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6515 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6516 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6517 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6518 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6519 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6520 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6521 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6522 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6523 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6524 98, -1, 100, 101, -1, -1, -1, 135, 106, 137,
6525 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6526 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6527 -1, -1, -1, -1, -1, -1, 134, 135, 136, 137,
6528 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6529 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6530 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6531 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6532 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6533 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6534 42, 43, 44, -1, -1, -1, 78, 79, 80, 81,
6535 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6536 -1, -1, -1, 95, 96, -1, 68, 69, -1, -1,
6537 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6538 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6539 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6540 -1, -1, -1, -1, 106, 137, 138, 139, 140, 141,
6541 142, 143, 144, 145, 146, -1, -1, -1, 120, -1,
6542 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6543 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6544 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6545 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6546 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6547 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6548 26, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6549 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6550 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6551 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6552 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6553 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6554 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6555 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6556 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6557 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6558 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6559 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6560 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6561 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6562 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6563 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6564 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6565 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6566 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6567 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6568 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6569 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6570 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6571 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6572 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6573 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6574 -1, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6575 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6576 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6577 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6578 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6579 -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
6580 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6581 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6584 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6585 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6586 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6587 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6588 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6590 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6591 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6592 154, 155, 0, 157, 158, 159, 160, -1, -1, -1,
6593 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6594 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6595 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6596 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6599 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6600 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6601 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6602 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6603 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6604 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6605 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6606 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6607 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6608 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6609 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6610 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6611 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6612 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6613 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6614 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6615 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6616 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6617 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6618 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6619 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6621 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6622 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6623 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6624 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6625 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6626 -1, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6627 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6628 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6630 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6631 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6632 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6633 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6634 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6635 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6636 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6637 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6638 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6639 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6640 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6641 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6642 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6643 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6644 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6645 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6646 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6647 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6648 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6649 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6650 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6651 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6652 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6653 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6654 -1, -1, 152, 153, 154, 155, 0, 157, 158, 159,
6655 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6656 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6657 -1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
6658 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6659 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6660 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6662 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6663 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6664 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6665 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6666 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6667 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6668 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6669 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6670 154, 155, 0, -1, 158, -1, 160, -1, -1, -1,
6671 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6672 -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
6673 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6674 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6675 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6678 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6679 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6680 98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6682 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6683 -1, -1, -1, -1, -1, -1, 134, 135, -1, 137,
6684 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6685 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6686 158, -1, 160, -1, -1, -1, 8, 9, 10, -1,
6687 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6688 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6689 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6690 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6692 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6693 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6694 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6695 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6696 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6697 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6698 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6699 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6700 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6701 152, 153, 154, 155, 0, -1, 158, -1, 160, -1,
6702 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
6703 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6704 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6705 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6706 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6708 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6709 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6710 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6711 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6713 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6714 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6715 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6716 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6717 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6718 8, 9, 10, 11, 12, -1, -1, 15, 16, -1,
6719 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6720 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6721 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6722 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6723 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6724 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6725 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6726 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6727 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6728 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6729 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6730 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6731 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6732 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6733 6, 7, 160, -1, 10, 11, 12, -1, 14, 15,
6734 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6735 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6736 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6737 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6738 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6739 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6740 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6741 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6742 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6743 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6744 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6745 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6747 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6748 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6749 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6750 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6751 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6752 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6753 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6754 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6755 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6756 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6757 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6758 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6759 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6760 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6761 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6762 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6763 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6764 12, -1, -1, 15, 16, -1, 18, 19, 20, 21,
6765 22, 23, 24, 25, -1, -1, -1, -1, 30, 31,
6766 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6767 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6768 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6769 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6770 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6771 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6772 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6773 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6774 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6775 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6776 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6777 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6778 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6779 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
6780 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6781 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6782 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6783 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6784 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6785 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6786 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6787 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6788 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6789 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6790 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6791 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6792 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6793 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6794 160, 9, 10, 11, 12, -1, -1, -1, 16, -1,
6795 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6796 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6797 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6798 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6799 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6800 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6803 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6804 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6805 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6806 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6807 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6808 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6809 6, 7, 160, -1, 10, 11, 12, -1, -1, -1,
6810 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6811 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6812 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6813 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6814 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6815 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6816 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6817 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6818 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6819 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6820 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6821 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6822 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6823 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6824 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6825 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6826 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6827 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6828 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6829 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6830 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6831 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6832 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6833 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6834 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6835 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6836 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6837 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6838 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6839 154, -1, -1, -1, 158, 1, 160, 3, 4, 5,
6840 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6841 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6842 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6843 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6844 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6845 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6847 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6848 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6849 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6850 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6851 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6852 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6853 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6854 -1, 147, 148, 149, -1, -1, -1, -1, 154, -1,
6855 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6856 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6857 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6858 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6859 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6860 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6861 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6862 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6863 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6864 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6865 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6866 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6867 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6868 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6869 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6870 148, 149, -1, -1, 152, 1, 154, 3, 4, 5,
6871 6, 7, 160, -1, -1, 11, 12, -1, -1, -1,
6872 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6873 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6874 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6875 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6876 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6878 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6879 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6880 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6881 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6882 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6883 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6885 -1, 147, 148, 149, -1, -1, 152, 1, 154, 3,
6886 4, 5, -1, 7, 160, -1, -1, 11, 12, -1,
6887 -1, -1, 16, 17, 18, 19, 20, 21, 22, 23,
6888 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6889 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6890 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6891 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6892 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6893 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6894 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6895 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6896 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
6897 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6898 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6899 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6900 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6901 154, -1, -1, -1, -1, -1, 160, 3, 4, 5,
6902 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6903 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6904 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6905 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6906 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6907 56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
6908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6909 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6910 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6911 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6912 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
6913 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6914 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6915 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6916 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
6917 156, 157, 3, 4, 5, 6, 7, 8, 9, 10,
6918 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6919 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6920 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6921 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6922 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
6923 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6924 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6925 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6926 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6927 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
6928 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6929 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6930 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
6931 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
6932 -1, -1, -1, -1, -1, 156, 3, 4, 5, 6,
6933 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6934 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6935 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6936 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6937 47, 48, 49, 50, 51, 52, 53, 54, -1, 56,
6938 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6939 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6940 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6941 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6942 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6943 107, 108, -1, -1, 111, -1, -1, -1, -1, -1,
6944 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6945 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6946 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6947 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6948 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
6949 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
6950 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
6951 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
6952 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6953 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
6954 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6955 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
6956 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
6957 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
6958 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
6959 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6960 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6961 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
6962 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
6963 -1, -1, -1, 156, 3, 4, 5, 6, 7, 8,
6964 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6965 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6966 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6967 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6968 49, 50, 51, 52, 53, -1, -1, 56, -1, -1,
6969 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6970 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6971 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6972 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6973 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6974 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6975 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6976 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6977 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6978 149, 3, 4, 5, -1, 7, -1, 156, -1, 11,
6979 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6980 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6981 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6982 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6983 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6984 62, 63, 64, 65, -1, -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, 99, -1, -1,
6988 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6989 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
6990 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6991 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6992 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
6993 34, 35, 36, 155, -1, 39, -1, -1, -1, -1,
6994 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6995 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6996 64, 65, -1, -1, -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, 99, -1, -1, 102, 103,
7000 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7001 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7002 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7003 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7004 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7005 36, 155, -1, 39, -1, -1, -1, -1, -1, -1,
7006 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7007 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7008 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7009 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7010 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7011 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7012 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
7013 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
7014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7015 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
7016 7, 147, 148, 149, 11, 12, -1, -1, 154, 16,
7017 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7018 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
7019 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7020 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7021 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7022 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7023 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7024 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7025 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7026 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7027 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
7028 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7029 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
7030 147, 148, 149, 11, 12, -1, -1, 154, 16, -1,
7031 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7032 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
7033 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
7034 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7035 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7036 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7037 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7038 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7039 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7040 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7041 118, -1, -1, 1, -1, 3, 4, 5, -1, 7,
7042 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7043 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7044 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7045 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7046 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7047 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7048 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7049 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7050 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7051 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7052 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7053 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7054 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7055 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7056 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7057 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7058 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7059 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7060 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7061 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7062 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7063 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7064 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7065 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7066 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7067 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7068 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7069 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7070 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7071 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7072 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7073 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7074 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7075 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7076 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7077 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7078 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7079 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7080 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7081 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7082 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7083 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7084 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7086 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7087 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7088 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7089 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7090 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7091 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7092 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7093 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7094 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7095 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7096 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7097 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7098 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7099 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7100 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7101 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7102 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7103 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7104 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7105 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7106 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7107 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7108 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7110 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7111 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7112 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7113 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7114 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7115 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7116 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7117 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7118 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7119 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7120 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7121 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7122 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7123 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7124 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7125 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7126 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7127 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7128 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7129 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7130 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7131 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7132 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7133 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7134 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7135 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7136 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7137 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7138 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7139 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7140 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7141 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7142 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7143 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7144 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7146 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7147 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7148 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7149 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7150 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7151 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7152 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7153 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7154 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7155 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7156 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7158 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7159 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7160 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7161 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7162 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7163 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7164 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7165 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7166 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7167 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7168 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7170 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7171 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7172 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7173 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7174 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7175 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7176 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7177 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7178 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7179 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7180 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7182 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7183 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7184 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7185 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7186 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7187 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7188 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7189 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7190 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7191 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7192 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7193 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7194 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7195 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7196 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7197 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7198 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7199 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7200 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7201 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7202 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7203 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7204 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7205 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7206 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7207 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7208 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7209 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7210 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7211 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7212 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7213 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7214 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7215 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7216 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7218 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7219 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7220 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7221 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7222 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7223 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7224 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7225 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7226 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7227 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7228 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7229 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7230 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7231 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7232 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7233 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7234 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7235 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7236 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7237 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7238 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7239 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7240 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7241 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7242 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7243 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7244 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7245 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7246 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7247 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7248 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7249 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7250 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7251 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7252 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7253 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7254 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7255 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7256 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7257 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7258 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7259 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7260 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7261 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7262 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7263 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7264 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7266 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7267 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7268 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7269 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7270 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7271 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7272 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7273 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7274 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7275 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7276 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7277 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7278 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7279 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7280 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7281 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7282 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7283 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7284 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7285 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7286 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7287 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7289 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7290 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7291 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7292 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7293 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7294 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7295 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7296 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7297 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7298 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7299 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7302 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7303 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
7304 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7305 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7306 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7307 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7308 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7309 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7310 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7311 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7312 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7314 -1, -1, -1, 95, -1, -1, -1, 99, -1, -1,
7315 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7316 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7317 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7318 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7319 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7320 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7321 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7322 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7323 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7326 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7327 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7328 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7329 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7330 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7331 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7332 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7333 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7334 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7335 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7338 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7339 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7340 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7341 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7342 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7343 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7344 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7345 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7346 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7348 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7350 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7351 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7352 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7353 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7354 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7355 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7356 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7357 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7358 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7359 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7361 -1, -1, -1, -1, -1, -1, 52, 53, -1, 99,
7362 56, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7363 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7364 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7365 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7366 96, -1, -1, -1, -1, -1, -1, 147, -1, -1,
7367 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7368 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7369 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7370 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7371 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7372 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7373 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7374 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7375 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7376 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7377 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7379 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7380 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7381 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7382 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7383 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7384 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7385 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7386 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7388 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7389 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7390 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7391 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7392 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7393 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7394 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7395 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7396 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7398 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7399 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7400 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7401 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7402 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7403 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7404 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7405 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7406 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7408 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7409 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7410 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7411 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7413 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7414 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7415 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7416 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7418 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7419 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7420 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7421 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7422 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7423 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7424 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7425 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7426 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7428 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7429 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7430 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7431 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7432 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7433 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7434 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7435 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7437 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7438 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7439 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7440 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7442 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7443 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7444 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7445 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7446 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7448 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7449 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7450 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7452 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7453 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7454 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7455 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7456 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7457 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7458 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7459 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7460 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7461 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7462 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7463 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7464 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7465 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7466 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7467 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7468 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7469 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7470 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7471 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7472 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7473 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7474 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7475 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7476 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7477 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7478 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7479 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7480 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7481 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7482 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7483 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7484 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7486 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7487 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7488 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7489 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7491 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7492 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7493 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7494 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7495 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7496 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7497 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7498 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
7499 -1, -1, -1, -1, 156
7500};
7501
7502/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7503 state STATE-NUM. */
7504static const yytype_int16 yystos[] =
7505{
7506 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7507 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7508 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7509 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7510 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7511 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7512 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7513 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7514 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7515 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7516 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7517 277, 278, 287, 288, 324, 329, 330, 380, 381, 382,
7518 383, 384, 385, 387, 388, 391, 392, 394, 395, 396,
7519 397, 411, 412, 414, 415, 416, 417, 418, 419, 420,
7520 421, 422, 483, 0, 3, 4, 5, 6, 7, 8,
7521 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7522 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7523 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7524 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7525 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7526 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7527 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7528 222, 224, 225, 411, 179, 179, 179, 39, 58, 99,
7529 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7530 238, 239, 245, 246, 249, 251, 252, 268, 418, 419,
7531 421, 422, 470, 471, 246, 157, 242, 247, 248, 154,
7532 157, 189, 54, 221, 189, 151, 169, 170, 235, 483,
7533 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7534 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7535 211, 212, 483, 171, 240, 251, 470, 483, 239, 469,
7536 470, 483, 46, 99, 147, 155, 195, 197, 216, 255,
7537 268, 418, 419, 422, 322, 220, 400, 413, 417, 400,
7538 401, 402, 161, 386, 386, 386, 386, 416, 203, 227,
7539 227, 154, 160, 163, 481, 482, 169, 40, 41, 42,
7540 43, 44, 37, 38, 157, 425, 426, 427, 428, 429,
7541 425, 428, 26, 151, 242, 248, 279, 331, 28, 280,
7542 328, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7543 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7544 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7545 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7546 153, 475, 476, 256, 1, 191, 198, 199, 199, 200,
7547 202, 202, 163, 199, 482, 99, 210, 217, 268, 293,
7548 418, 419, 422, 52, 56, 95, 99, 218, 219, 268,
7549 418, 419, 422, 219, 33, 34, 35, 36, 49, 50,
7550 51, 52, 56, 157, 194, 220, 420, 465, 466, 467,
7551 246, 157, 248, 98, 475, 476, 331, 383, 100, 100,
7552 155, 239, 56, 239, 239, 239, 400, 134, 101, 155,
7553 250, 483, 98, 153, 475, 100, 100, 155, 250, 92,
7554 244, 246, 251, 449, 470, 483, 246, 189, 191, 477,
7555 191, 54, 64, 65, 181, 157, 235, 236, 164, 425,
7556 425, 98, 475, 100, 178, 211, 158, 163, 482, 477,
7557 257, 159, 155, 189, 480, 155, 480, 152, 480, 189,
7558 56, 416, 213, 214, 427, 155, 98, 153, 475, 319,
7559 66, 119, 121, 122, 403, 119, 119, 403, 67, 403,
7560 161, 389, 398, 393, 399, 78, 160, 168, 171, 199,
7561 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7562 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7563 144, 298, 367, 426, 430, 431, 433, 434, 437, 438,
7564 440, 441, 442, 443, 449, 450, 451, 452, 453, 454,
7565 455, 456, 457, 458, 459, 460, 461, 462, 134, 265,
7566 443, 134, 266, 332, 333, 106, 207, 334, 335, 335,
7567 235, 211, 155, 216, 155, 235, 193, 227, 227, 227,
7568 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7569 192, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7570 227, 227, 52, 53, 56, 224, 472, 473, 244, 251,
7571 52, 53, 56, 224, 472, 242, 171, 174, 13, 289,
7572 481, 289, 199, 171, 171, 259, 163, 56, 98, 153,
7573 475, 25, 199, 52, 56, 218, 138, 424, 483, 98,
7574 153, 475, 264, 468, 69, 98, 474, 246, 477, 52,
7575 56, 242, 472, 235, 235, 223, 100, 124, 235, 239,
7576 239, 249, 252, 470, 52, 56, 244, 52, 56, 235,
7577 235, 471, 477, 155, 477, 155, 158, 477, 221, 236,
7578 227, 152, 134, 134, 56, 472, 472, 235, 170, 477,
7579 177, 158, 470, 155, 213, 52, 56, 244, 52, 56,
7580 320, 405, 404, 119, 390, 403, 66, 119, 119, 390,
7581 66, 119, 227, 152, 182, 102, 107, 294, 295, 296,
7582 297, 451, 155, 432, 463, 464, 155, 432, 155, 439,
7583 464, 477, 299, 300, 155, 439, 239, 34, 52, 52,
7584 155, 439, 34, 52, 39, 188, 209, 227, 232, 174,
7585 481, 188, 232, 174, 319, 152, 333, 319, 10, 68,
7586 286, 286, 107, 203, 204, 205, 239, 251, 253, 254,
7587 477, 213, 155, 99, 185, 190, 205, 217, 227, 239,
7588 241, 254, 268, 422, 341, 341, 189, 100, 100, 151,
7589 242, 248, 189, 478, 155, 100, 100, 242, 243, 248,
7590 483, 235, 286, 171, 13, 171, 27, 290, 481, 286,
7591 286, 17, 283, 337, 25, 258, 343, 52, 56, 244,
7592 52, 56, 260, 263, 423, 262, 52, 56, 218, 244,
7593 174, 191, 196, 477, 243, 248, 190, 227, 241, 190,
7594 241, 221, 235, 239, 250, 100, 100, 478, 100, 100,
7595 449, 470, 191, 39, 190, 241, 480, 214, 478, 321,
7596 406, 410, 417, 422, 386, 403, 386, 386, 386, 296,
7597 451, 155, 477, 155, 462, 430, 456, 458, 434, 437,
7598 454, 460, 134, 239, 438, 453, 460, 452, 454, 189,
7599 44, 44, 286, 286, 320, 152, 320, 239, 155, 44,
7600 213, 56, 44, 134, 44, 98, 153, 475, 339, 339,
7601 136, 235, 235, 333, 207, 159, 100, 235, 235, 207,
7602 8, 281, 376, 483, 14, 15, 284, 285, 291, 292,
7603 483, 292, 201, 107, 239, 336, 286, 341, 337, 286,
7604 478, 199, 481, 199, 174, 478, 286, 477, 194, 331,
7605 328, 235, 235, 100, 235, 235, 477, 155, 477, 189,
7606 179, 407, 477, 294, 297, 295, 432, 155, 439, 155,
7607 439, 155, 439, 155, 439, 439, 188, 232, 237, 237,
7608 321, 321, 107, 239, 237, 237, 235, 237, 52, 56,
7609 244, 52, 56, 340, 340, 227, 190, 241, 190, 241,
7610 152, 235, 190, 241, 190, 241, 239, 254, 377, 483,
7611 175, 284, 171, 199, 286, 286, 239, 155, 289, 339,
7612 286, 290, 174, 481, 286, 235, 157, 298, 325, 426,
7613 431, 435, 436, 438, 445, 446, 447, 448, 449, 454,
7614 460, 462, 408, 155, 155, 454, 454, 460, 454, 227,
7615 227, 179, 179, 239, 182, 182, 227, 478, 52, 56,
7616 58, 91, 92, 99, 102, 104, 105, 107, 112, 140,
7617 324, 346, 347, 348, 350, 353, 357, 358, 359, 362,
7618 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
7619 373, 374, 375, 380, 381, 384, 385, 388, 392, 395,
7620 397, 419, 456, 346, 190, 241, 101, 378, 483, 9,
7621 282, 379, 483, 172, 289, 107, 239, 171, 340, 261,
7622 286, 448, 155, 303, 483, 323, 155, 303, 155, 444,
7623 483, 155, 444, 155, 444, 171, 295, 439, 439, 155,
7624 439, 439, 139, 313, 314, 483, 313, 371, 371, 56,
7625 218, 340, 347, 355, 356, 357, 358, 361, 478, 189,
7626 340, 479, 52, 400, 52, 102, 417, 101, 155, 139,
7627 155, 155, 347, 89, 90, 98, 153, 157, 351, 352,
7628 52, 99, 217, 268, 418, 419, 422, 289, 176, 171,
7629 171, 239, 292, 337, 338, 345, 346, 171, 189, 316,
7630 462, 29, 123, 326, 458, 436, 454, 460, 438, 460,
7631 454, 0, 120, 409, 454, 298, 301, 302, 304, 305,
7632 307, 308, 310, 311, 312, 315, 452, 454, 455, 460,
7633 462, 171, 174, 347, 478, 347, 359, 361, 478, 155,
7634 152, 235, 124, 199, 372, 355, 359, 349, 360, 361,
7635 112, 364, 368, 371, 371, 218, 340, 478, 340, 477,
7636 355, 358, 362, 355, 358, 362, 56, 98, 153, 475,
7637 171, 163, 173, 291, 289, 40, 41, 286, 160, 158,
7638 327, 171, 303, 155, 444, 155, 444, 155, 444, 155,
7639 444, 444, 439, 303, 155, 303, 155, 309, 483, 316,
7640 300, 155, 306, 309, 99, 268, 155, 309, 477, 155,
7641 155, 354, 477, 155, 353, 155, 400, 477, 477, 477,
7642 478, 478, 478, 52, 56, 244, 52, 56, 376, 379,
7643 342, 199, 199, 52, 317, 318, 450, 174, 152, 454,
7644 454, 460, 454, 301, 458, 305, 307, 454, 460, 139,
7645 268, 308, 460, 56, 98, 454, 360, 362, 360, 359,
7646 361, 478, 171, 155, 189, 286, 444, 444, 155, 444,
7647 444, 303, 155, 309, 155, 309, 155, 309, 155, 309,
7648 52, 56, 309, 155, 479, 292, 343, 344, 318, 454,
7649 454, 454, 460, 454, 444, 309, 309, 155, 309, 309,
7650 454, 309
7651};
7652
7653/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7654static const yytype_int16 yyr1[] =
7655{
7656 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7657 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7658 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7659 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7660 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7661 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7662 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7663 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7664 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7665 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7666 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7667 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7668 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7669 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7670 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7671 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7672 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7673 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7674 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7675 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7676 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7677 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7678 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7679 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7680 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7681 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7682 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7683 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7684 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7685 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7686 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7687 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7688 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7689 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7690 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7691 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7692 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7693 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7694 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7695 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7696 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7697 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7698 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7699 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7700 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7701 303, 303, 304, 304, 304, 304, 305, 306, 307, 308,
7702 308, 309, 309, 310, 310, 310, 310, 310, 310, 310,
7703 310, 310, 310, 310, 310, 311, 311, 311, 312, 311,
7704 313, 313, 314, 315, 315, 316, 316, 317, 317, 318,
7705 318, 319, 320, 321, 322, 323, 324, 325, 325, 326,
7706 327, 326, 328, 329, 329, 329, 329, 329, 330, 330,
7707 330, 330, 330, 330, 330, 330, 331, 331, 332, 333,
7708 334, 335, 336, 336, 336, 336, 337, 338, 338, 339,
7709 340, 341, 342, 343, 344, 344, 345, 345, 345, 346,
7710 346, 346, 346, 346, 346, 347, 348, 348, 349, 350,
7711 350, 351, 352, 353, 353, 353, 353, 353, 353, 353,
7712 353, 353, 353, 353, 353, 353, 354, 353, 353, 353,
7713 355, 355, 355, 355, 355, 355, 356, 356, 357, 357,
7714 358, 359, 359, 360, 360, 361, 362, 362, 362, 362,
7715 363, 363, 364, 364, 365, 365, 366, 366, 367, 368,
7716 368, 369, 370, 370, 370, 370, 370, 370, 369, 369,
7717 369, 369, 371, 371, 371, 371, 371, 371, 371, 371,
7718 371, 371, 372, 373, 373, 374, 375, 375, 375, 376,
7719 376, 377, 377, 377, 378, 378, 379, 379, 380, 380,
7720 381, 382, 382, 382, 383, 384, 385, 386, 386, 387,
7721 388, 389, 389, 390, 390, 391, 392, 393, 393, 394,
7722 395, 396, 397, 398, 398, 399, 399, 400, 400, 401,
7723 401, 402, 402, 403, 404, 403, 405, 406, 407, 408,
7724 403, 409, 409, 410, 410, 411, 411, 412, 413, 413,
7725 414, 415, 415, 416, 416, 416, 416, 417, 417, 417,
7726 418, 418, 418, 419, 419, 419, 419, 419, 419, 419,
7727 420, 420, 421, 421, 422, 422, 423, 424, 424, 425,
7728 425, 426, 427, 428, 429, 428, 430, 430, 431, 431,
7729 432, 432, 433, 433, 433, 433, 434, 434, 435, 435,
7730 435, 435, 436, 436, 437, 438, 438, 439, 439, 440,
7731 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
7732 440, 441, 441, 442, 441, 441, 443, 444, 444, 445,
7733 445, 445, 445, 445, 445, 445, 445, 445, 445, 445,
7734 445, 446, 446, 447, 446, 446, 448, 449, 450, 450,
7735 450, 450, 451, 451, 452, 453, 453, 454, 454, 455,
7736 456, 456, 457, 458, 458, 459, 459, 460, 460, 461,
7737 461, 462, 462, 462, 463, 463, 464, 465, 466, 467,
7738 468, 467, 469, 469, 470, 470, 471, 471, 471, 471,
7739 471, 471, 472, 472, 472, 472, 473, 473, 473, 474,
7740 474, 475, 475, 476, 476, 477, 478, 479, 480, 480,
7741 481, 481, 482, 482, 483
7742};
7743
7744/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7745static const yytype_int8 yyr2[] =
7746{
7747 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7748 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7749 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7750 3, 3, 3, 2, 3, 3, 3, 3, 4, 4,
7751 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7752 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7753 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7754 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7755 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7756 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7757 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7758 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7759 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7760 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7761 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7762 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7763 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7764 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7765 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7766 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7767 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7768 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7769 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7770 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7771 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7772 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7773 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7774 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7775 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7776 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7777 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7778 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7779 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7780 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7781 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7782 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7783 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7784 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7785 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7786 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7787 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7788 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7789 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7790 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7791 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7792 2, 1, 4, 2, 2, 1, 1, 1, 3, 1,
7793 3, 2, 1, 6, 8, 4, 6, 4, 6, 4,
7794 6, 2, 4, 2, 4, 1, 2, 2, 1, 1,
7795 1, 1, 4, 0, 1, 1, 4, 1, 3, 1,
7796 1, 0, 0, 0, 0, 0, 9, 4, 1, 3,
7797 0, 4, 3, 2, 4, 5, 5, 3, 2, 4,
7798 4, 3, 3, 2, 1, 4, 3, 3, 0, 7,
7799 0, 7, 1, 2, 3, 4, 5, 1, 1, 0,
7800 0, 0, 0, 9, 1, 1, 1, 3, 3, 1,
7801 2, 3, 1, 1, 1, 1, 3, 1, 0, 4,
7802 1, 2, 2, 1, 1, 4, 4, 4, 3, 4,
7803 4, 4, 3, 3, 3, 2, 0, 6, 2, 4,
7804 1, 1, 2, 2, 4, 1, 2, 3, 1, 3,
7805 5, 2, 1, 1, 3, 1, 3, 1, 2, 1,
7806 1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
7807 1, 1, 3, 3, 2, 2, 2, 2, 1, 1,
7808 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7809 1, 1, 1, 2, 2, 4, 2, 3, 1, 6,
7810 1, 1, 1, 1, 2, 1, 3, 1, 1, 1,
7811 1, 1, 1, 2, 3, 3, 3, 1, 2, 4,
7812 1, 0, 3, 1, 2, 4, 1, 0, 3, 4,
7813 1, 4, 1, 0, 3, 0, 3, 0, 2, 0,
7814 2, 0, 2, 1, 0, 3, 0, 0, 0, 0,
7815 7, 1, 1, 1, 1, 1, 1, 2, 1, 1,
7816 3, 1, 2, 1, 1, 1, 1, 1, 1, 1,
7817 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7818 1, 1, 1, 1, 1, 1, 0, 4, 1, 1,
7819 1, 0, 3, 1, 0, 3, 2, 1, 1, 3,
7820 2, 1, 4, 2, 2, 1, 1, 1, 4, 2,
7821 2, 1, 1, 1, 3, 1, 3, 2, 1, 6,
7822 8, 4, 6, 4, 6, 4, 6, 2, 4, 2,
7823 4, 1, 2, 1, 1, 1, 1, 2, 1, 6,
7824 8, 4, 6, 4, 6, 4, 6, 2, 4, 2,
7825 4, 1, 2, 1, 1, 1, 1, 1, 1, 1,
7826 1, 1, 1, 1, 1, 1, 3, 1, 3, 1,
7827 1, 1, 1, 2, 1, 1, 1, 2, 1, 1,
7828 1, 2, 2, 1, 0, 1, 1, 1, 1, 1,
7829 0, 4, 1, 2, 1, 3, 3, 2, 1, 4,
7830 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7831 1, 1, 1, 1, 1, 2, 2, 2, 1, 1,
7832 1, 1, 1, 2, 0
7833};
7834
7835
7836enum { YYENOMEM = -2 };
7837
7838#define yyerrok (yyerrstatus = 0)
7839#define yyclearin (yychar = YYEMPTY)
7840
7841#define YYACCEPT goto yyacceptlab
7842#define YYABORT goto yyabortlab
7843#define YYERROR goto yyerrorlab
7844#define YYNOMEM goto yyexhaustedlab
7845
7846
7847#define YYRECOVERING() (!!yyerrstatus)
7848
7849#define YYBACKUP(Token, Value) \
7850 do \
7851 if (yychar == YYEMPTY) \
7852 { \
7853 yychar = (Token); \
7854 yylval = (Value); \
7855 YYPOPSTACK (yylen); \
7856 yystate = *yyssp; \
7857 goto yybackup; \
7858 } \
7859 else \
7860 { \
7861 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7862 YYERROR; \
7863 } \
7864 while (0)
7865
7866/* Backward compatibility with an undocumented macro.
7867 Use YYerror or YYUNDEF. */
7868#define YYERRCODE YYUNDEF
7869
7870/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7871 If N is 0, then set CURRENT to the empty location which ends
7872 the previous symbol: RHS[0] (always defined). */
7873
7874#ifndef YYLLOC_DEFAULT
7875# define YYLLOC_DEFAULT(Current, Rhs, N) \
7876 do \
7877 if (N) \
7878 { \
7879 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7880 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7881 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7882 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7883 } \
7884 else \
7885 { \
7886 (Current).first_line = (Current).last_line = \
7887 YYRHSLOC (Rhs, 0).last_line; \
7888 (Current).first_column = (Current).last_column = \
7889 YYRHSLOC (Rhs, 0).last_column; \
7890 } \
7891 while (0)
7892#endif
7893
7894#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7895
7896
7897/* Enable debugging if requested. */
7898#if YYDEBUG
7899
7900# ifndef YYFPRINTF
7901# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7902# define YYFPRINTF fprintf
7903# endif
7904
7905# define YYDPRINTF(Args) \
7906do { \
7907 if (yydebug) \
7908 YYFPRINTF Args; \
7909} while (0)
7910
7911
7912/* YYLOCATION_PRINT -- Print the location on the stream.
7913 This macro was not mandated originally: define only if we know
7914 we won't break user code: when these are the locations we know. */
7915
7916# ifndef YYLOCATION_PRINT
7917
7918# if defined YY_LOCATION_PRINT
7919
7920 /* Temporary convenience wrapper in case some people defined the
7921 undocumented and private YY_LOCATION_PRINT macros. */
7922# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7923
7924# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7925
7926/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7927
7928YY_ATTRIBUTE_UNUSED
7929static int
7930yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7931{
7932 int res = 0;
7933 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7934 if (0 <= yylocp->first_line)
7935 {
7936 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7937 if (0 <= yylocp->first_column)
7938 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7939 }
7940 if (0 <= yylocp->last_line)
7941 {
7942 if (yylocp->first_line < yylocp->last_line)
7943 {
7944 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7945 if (0 <= end_col)
7946 res += YYFPRINTF (yyo, ".%d", end_col);
7947 }
7948 else if (0 <= end_col && yylocp->first_column < end_col)
7949 res += YYFPRINTF (yyo, "-%d", end_col);
7950 }
7951 return res;
7952}
7953
7954# define YYLOCATION_PRINT yy_location_print_
7955
7956 /* Temporary convenience wrapper in case some people defined the
7957 undocumented and private YY_LOCATION_PRINT macros. */
7958# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7959
7960# else
7961
7962# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7963 /* Temporary convenience wrapper in case some people defined the
7964 undocumented and private YY_LOCATION_PRINT macros. */
7965# define YY_LOCATION_PRINT YYLOCATION_PRINT
7966
7967# endif
7968# endif /* !defined YYLOCATION_PRINT */
7969
7970
7971# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7972do { \
7973 if (yydebug) \
7974 { \
7975 YYFPRINTF (stderr, "%s ", Title); \
7976 yy_symbol_print (stderr, \
7977 Kind, Value, Location, p); \
7978 YYFPRINTF (stderr, "\n"); \
7979 } \
7980} while (0)
7981
7982
7983/*-----------------------------------.
7984| Print this symbol's value on YYO. |
7985`-----------------------------------*/
7986
7987static void
7988yy_symbol_value_print (FILE *yyo,
7989 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7990{
7991 FILE *yyoutput = yyo;
7992 YY_USE (yyoutput);
7993 YY_USE (yylocationp);
7994 YY_USE (p);
7995 if (!yyvaluep)
7996 return;
7997 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7998switch (yykind)
7999 {
8000 case YYSYMBOL_keyword_class: /* "'class'" */
8001#line 2625 "parse.y"
8002 {
8003 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8004}
8005#line 8006 "parse.c"
8006 break;
8007
8008 case YYSYMBOL_keyword_module: /* "'module'" */
8009#line 2625 "parse.y"
8010 {
8011 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8012}
8013#line 8014 "parse.c"
8014 break;
8015
8016 case YYSYMBOL_keyword_def: /* "'def'" */
8017#line 2625 "parse.y"
8018 {
8019 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8020}
8021#line 8022 "parse.c"
8022 break;
8023
8024 case YYSYMBOL_keyword_undef: /* "'undef'" */
8025#line 2625 "parse.y"
8026 {
8027 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8028}
8029#line 8030 "parse.c"
8030 break;
8031
8032 case YYSYMBOL_keyword_begin: /* "'begin'" */
8033#line 2625 "parse.y"
8034 {
8035 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8036}
8037#line 8038 "parse.c"
8038 break;
8039
8040 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
8041#line 2625 "parse.y"
8042 {
8043 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8044}
8045#line 8046 "parse.c"
8046 break;
8047
8048 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
8049#line 2625 "parse.y"
8050 {
8051 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8052}
8053#line 8054 "parse.c"
8054 break;
8055
8056 case YYSYMBOL_keyword_end: /* "'end'" */
8057#line 2625 "parse.y"
8058 {
8059 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8060}
8061#line 8062 "parse.c"
8062 break;
8063
8064 case YYSYMBOL_keyword_if: /* "'if'" */
8065#line 2625 "parse.y"
8066 {
8067 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8068}
8069#line 8070 "parse.c"
8070 break;
8071
8072 case YYSYMBOL_keyword_unless: /* "'unless'" */
8073#line 2625 "parse.y"
8074 {
8075 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8076}
8077#line 8078 "parse.c"
8078 break;
8079
8080 case YYSYMBOL_keyword_then: /* "'then'" */
8081#line 2625 "parse.y"
8082 {
8083 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8084}
8085#line 8086 "parse.c"
8086 break;
8087
8088 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
8089#line 2625 "parse.y"
8090 {
8091 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8092}
8093#line 8094 "parse.c"
8094 break;
8095
8096 case YYSYMBOL_keyword_else: /* "'else'" */
8097#line 2625 "parse.y"
8098 {
8099 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8100}
8101#line 8102 "parse.c"
8102 break;
8103
8104 case YYSYMBOL_keyword_case: /* "'case'" */
8105#line 2625 "parse.y"
8106 {
8107 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8108}
8109#line 8110 "parse.c"
8110 break;
8111
8112 case YYSYMBOL_keyword_when: /* "'when'" */
8113#line 2625 "parse.y"
8114 {
8115 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8116}
8117#line 8118 "parse.c"
8118 break;
8119
8120 case YYSYMBOL_keyword_while: /* "'while'" */
8121#line 2625 "parse.y"
8122 {
8123 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8124}
8125#line 8126 "parse.c"
8126 break;
8127
8128 case YYSYMBOL_keyword_until: /* "'until'" */
8129#line 2625 "parse.y"
8130 {
8131 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8132}
8133#line 8134 "parse.c"
8134 break;
8135
8136 case YYSYMBOL_keyword_for: /* "'for'" */
8137#line 2625 "parse.y"
8138 {
8139 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8140}
8141#line 8142 "parse.c"
8142 break;
8143
8144 case YYSYMBOL_keyword_break: /* "'break'" */
8145#line 2625 "parse.y"
8146 {
8147 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8148}
8149#line 8150 "parse.c"
8150 break;
8151
8152 case YYSYMBOL_keyword_next: /* "'next'" */
8153#line 2625 "parse.y"
8154 {
8155 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8156}
8157#line 8158 "parse.c"
8158 break;
8159
8160 case YYSYMBOL_keyword_redo: /* "'redo'" */
8161#line 2625 "parse.y"
8162 {
8163 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8164}
8165#line 8166 "parse.c"
8166 break;
8167
8168 case YYSYMBOL_keyword_retry: /* "'retry'" */
8169#line 2625 "parse.y"
8170 {
8171 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8172}
8173#line 8174 "parse.c"
8174 break;
8175
8176 case YYSYMBOL_keyword_in: /* "'in'" */
8177#line 2625 "parse.y"
8178 {
8179 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8180}
8181#line 8182 "parse.c"
8182 break;
8183
8184 case YYSYMBOL_keyword_do: /* "'do'" */
8185#line 2625 "parse.y"
8186 {
8187 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8188}
8189#line 8190 "parse.c"
8190 break;
8191
8192 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8193#line 2625 "parse.y"
8194 {
8195 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8196}
8197#line 8198 "parse.c"
8198 break;
8199
8200 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8201#line 2625 "parse.y"
8202 {
8203 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8204}
8205#line 8206 "parse.c"
8206 break;
8207
8208 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8209#line 2625 "parse.y"
8210 {
8211 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8212}
8213#line 8214 "parse.c"
8214 break;
8215
8216 case YYSYMBOL_keyword_return: /* "'return'" */
8217#line 2625 "parse.y"
8218 {
8219 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8220}
8221#line 8222 "parse.c"
8222 break;
8223
8224 case YYSYMBOL_keyword_yield: /* "'yield'" */
8225#line 2625 "parse.y"
8226 {
8227 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8228}
8229#line 8230 "parse.c"
8230 break;
8231
8232 case YYSYMBOL_keyword_super: /* "'super'" */
8233#line 2625 "parse.y"
8234 {
8235 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8236}
8237#line 8238 "parse.c"
8238 break;
8239
8240 case YYSYMBOL_keyword_self: /* "'self'" */
8241#line 2625 "parse.y"
8242 {
8243 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8244}
8245#line 8246 "parse.c"
8246 break;
8247
8248 case YYSYMBOL_keyword_nil: /* "'nil'" */
8249#line 2625 "parse.y"
8250 {
8251 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8252}
8253#line 8254 "parse.c"
8254 break;
8255
8256 case YYSYMBOL_keyword_true: /* "'true'" */
8257#line 2625 "parse.y"
8258 {
8259 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8260}
8261#line 8262 "parse.c"
8262 break;
8263
8264 case YYSYMBOL_keyword_false: /* "'false'" */
8265#line 2625 "parse.y"
8266 {
8267 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8268}
8269#line 8270 "parse.c"
8270 break;
8271
8272 case YYSYMBOL_keyword_and: /* "'and'" */
8273#line 2625 "parse.y"
8274 {
8275 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8276}
8277#line 8278 "parse.c"
8278 break;
8279
8280 case YYSYMBOL_keyword_or: /* "'or'" */
8281#line 2625 "parse.y"
8282 {
8283 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8284}
8285#line 8286 "parse.c"
8286 break;
8287
8288 case YYSYMBOL_keyword_not: /* "'not'" */
8289#line 2625 "parse.y"
8290 {
8291 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8292}
8293#line 8294 "parse.c"
8294 break;
8295
8296 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8297#line 2625 "parse.y"
8298 {
8299 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8300}
8301#line 8302 "parse.c"
8302 break;
8303
8304 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8305#line 2625 "parse.y"
8306 {
8307 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8308}
8309#line 8310 "parse.c"
8310 break;
8311
8312 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8313#line 2625 "parse.y"
8314 {
8315 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8316}
8317#line 8318 "parse.c"
8318 break;
8319
8320 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8321#line 2625 "parse.y"
8322 {
8323 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8324}
8325#line 8326 "parse.c"
8326 break;
8327
8328 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8329#line 2625 "parse.y"
8330 {
8331 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8332}
8333#line 8334 "parse.c"
8334 break;
8335
8336 case YYSYMBOL_keyword_alias: /* "'alias'" */
8337#line 2625 "parse.y"
8338 {
8339 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8340}
8341#line 8342 "parse.c"
8342 break;
8343
8344 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8345#line 2625 "parse.y"
8346 {
8347 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8348}
8349#line 8350 "parse.c"
8350 break;
8351
8352 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8353#line 2625 "parse.y"
8354 {
8355 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8356}
8357#line 8358 "parse.c"
8358 break;
8359
8360 case YYSYMBOL_keyword_END: /* "'END'" */
8361#line 2625 "parse.y"
8362 {
8363 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8364}
8365#line 8366 "parse.c"
8366 break;
8367
8368 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8369#line 2625 "parse.y"
8370 {
8371 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8372}
8373#line 8374 "parse.c"
8374 break;
8375
8376 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8377#line 2625 "parse.y"
8378 {
8379 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8380}
8381#line 8382 "parse.c"
8382 break;
8383
8384 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8385#line 2625 "parse.y"
8386 {
8387 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8388}
8389#line 8390 "parse.c"
8390 break;
8391
8392 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8393#line 2625 "parse.y"
8394 {
8395 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8396}
8397#line 8398 "parse.c"
8398 break;
8399
8400 case YYSYMBOL_tFID: /* "method" */
8401#line 2625 "parse.y"
8402 {
8403 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8404}
8405#line 8406 "parse.c"
8406 break;
8407
8408 case YYSYMBOL_tGVAR: /* "global variable" */
8409#line 2625 "parse.y"
8410 {
8411 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8412}
8413#line 8414 "parse.c"
8414 break;
8415
8416 case YYSYMBOL_tIVAR: /* "instance variable" */
8417#line 2625 "parse.y"
8418 {
8419 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8420}
8421#line 8422 "parse.c"
8422 break;
8423
8424 case YYSYMBOL_tCONSTANT: /* "constant" */
8425#line 2625 "parse.y"
8426 {
8427 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8428}
8429#line 8430 "parse.c"
8430 break;
8431
8432 case YYSYMBOL_tCVAR: /* "class variable" */
8433#line 2625 "parse.y"
8434 {
8435 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8436}
8437#line 8438 "parse.c"
8438 break;
8439
8440 case YYSYMBOL_tLABEL: /* "label" */
8441#line 2625 "parse.y"
8442 {
8443 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8444}
8445#line 8446 "parse.c"
8446 break;
8447
8448 case YYSYMBOL_tINTEGER: /* "integer literal" */
8449#line 2628 "parse.y"
8450 {
8451 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8452 case NODE_INTEGER:
8453 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8454 break;
8455 case NODE_FLOAT:
8456 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8457 break;
8458 case NODE_RATIONAL:
8459 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8460 break;
8461 case NODE_IMAGINARY:
8462 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8463 break;
8464 default:
8465 break;
8466 }
8467}
8468#line 8469 "parse.c"
8469 break;
8470
8471 case YYSYMBOL_tFLOAT: /* "float literal" */
8472#line 2628 "parse.y"
8473 {
8474 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8475 case NODE_INTEGER:
8476 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8477 break;
8478 case NODE_FLOAT:
8479 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8480 break;
8481 case NODE_RATIONAL:
8482 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8483 break;
8484 case NODE_IMAGINARY:
8485 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8486 break;
8487 default:
8488 break;
8489 }
8490}
8491#line 8492 "parse.c"
8492 break;
8493
8494 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8495#line 2628 "parse.y"
8496 {
8497 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8498 case NODE_INTEGER:
8499 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8500 break;
8501 case NODE_FLOAT:
8502 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8503 break;
8504 case NODE_RATIONAL:
8505 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8506 break;
8507 case NODE_IMAGINARY:
8508 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8509 break;
8510 default:
8511 break;
8512 }
8513}
8514#line 8515 "parse.c"
8515 break;
8516
8517 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8518#line 2628 "parse.y"
8519 {
8520 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8521 case NODE_INTEGER:
8522 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8523 break;
8524 case NODE_FLOAT:
8525 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8526 break;
8527 case NODE_RATIONAL:
8528 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8529 break;
8530 case NODE_IMAGINARY:
8531 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8532 break;
8533 default:
8534 break;
8535 }
8536}
8537#line 8538 "parse.c"
8538 break;
8539
8540 case YYSYMBOL_tCHAR: /* "char literal" */
8541#line 2628 "parse.y"
8542 {
8543 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8544 case NODE_INTEGER:
8545 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8546 break;
8547 case NODE_FLOAT:
8548 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8549 break;
8550 case NODE_RATIONAL:
8551 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8552 break;
8553 case NODE_IMAGINARY:
8554 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8555 break;
8556 default:
8557 break;
8558 }
8559}
8560#line 8561 "parse.c"
8561 break;
8562
8563 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8564#line 2646 "parse.y"
8565 {
8566 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8567}
8568#line 8569 "parse.c"
8569 break;
8570
8571 case YYSYMBOL_tBACK_REF: /* "back reference" */
8572#line 2649 "parse.y"
8573 {
8574 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8575}
8576#line 8577 "parse.c"
8577 break;
8578
8579 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8580#line 2628 "parse.y"
8581 {
8582 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8583 case NODE_INTEGER:
8584 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8585 break;
8586 case NODE_FLOAT:
8587 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8588 break;
8589 case NODE_RATIONAL:
8590 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8591 break;
8592 case NODE_IMAGINARY:
8593 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8594 break;
8595 default:
8596 break;
8597 }
8598}
8599#line 8600 "parse.c"
8600 break;
8601
8602 case YYSYMBOL_69_: /* '.' */
8603#line 2625 "parse.y"
8604 {
8605 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8606}
8607#line 8608 "parse.c"
8608 break;
8609
8610 case YYSYMBOL_70_backslash_: /* "backslash" */
8611#line 2625 "parse.y"
8612 {
8613 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8614}
8615#line 8616 "parse.c"
8616 break;
8617
8618 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8619#line 2625 "parse.y"
8620 {
8621 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8622}
8623#line 8624 "parse.c"
8624 break;
8625
8626 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8627#line 2625 "parse.y"
8628 {
8629 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8630}
8631#line 8632 "parse.c"
8632 break;
8633
8634 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8635#line 2625 "parse.y"
8636 {
8637 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8638}
8639#line 8640 "parse.c"
8640 break;
8641
8642 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8643#line 2625 "parse.y"
8644 {
8645 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8646}
8647#line 8648 "parse.c"
8648 break;
8649
8650 case YYSYMBOL_tANDDOT: /* "&." */
8651#line 2625 "parse.y"
8652 {
8653 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8654}
8655#line 8656 "parse.c"
8656 break;
8657
8658 case YYSYMBOL_tCOLON2: /* "::" */
8659#line 2625 "parse.y"
8660 {
8661 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8662}
8663#line 8664 "parse.c"
8664 break;
8665
8666 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8667#line 2625 "parse.y"
8668 {
8669 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8670}
8671#line 8672 "parse.c"
8672 break;
8673
8674 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8675#line 2616 "parse.y"
8676 {
8677 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8678 rb_parser_printf(p, "NODE_SPECIAL");
8679 }
8680 else if (((*yyvaluep).node)) {
8681 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8682 }
8683}
8684#line 8685 "parse.c"
8685 break;
8686
8687 case YYSYMBOL_top_stmts: /* top_stmts */
8688#line 2616 "parse.y"
8689 {
8690 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8691 rb_parser_printf(p, "NODE_SPECIAL");
8692 }
8693 else if (((*yyvaluep).node)) {
8694 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8695 }
8696}
8697#line 8698 "parse.c"
8698 break;
8699
8700 case YYSYMBOL_top_stmt: /* top_stmt */
8701#line 2616 "parse.y"
8702 {
8703 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8704 rb_parser_printf(p, "NODE_SPECIAL");
8705 }
8706 else if (((*yyvaluep).node)) {
8707 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8708 }
8709}
8710#line 8711 "parse.c"
8711 break;
8712
8713 case YYSYMBOL_block_open: /* block_open */
8714#line 2616 "parse.y"
8715 {
8716 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8717 rb_parser_printf(p, "NODE_SPECIAL");
8718 }
8719 else if (((*yyvaluep).node_exits)) {
8720 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8721 }
8722}
8723#line 8724 "parse.c"
8724 break;
8725
8726 case YYSYMBOL_begin_block: /* begin_block */
8727#line 2616 "parse.y"
8728 {
8729 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8730 rb_parser_printf(p, "NODE_SPECIAL");
8731 }
8732 else if (((*yyvaluep).node)) {
8733 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8734 }
8735}
8736#line 8737 "parse.c"
8737 break;
8738
8739 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8740#line 2616 "parse.y"
8741 {
8742 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8743 rb_parser_printf(p, "NODE_SPECIAL");
8744 }
8745 else if (((*yyvaluep).node)) {
8746 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8747 }
8748}
8749#line 8750 "parse.c"
8750 break;
8751
8752 case YYSYMBOL_bodystmt: /* bodystmt */
8753#line 2616 "parse.y"
8754 {
8755 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8756 rb_parser_printf(p, "NODE_SPECIAL");
8757 }
8758 else if (((*yyvaluep).node)) {
8759 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8760 }
8761}
8762#line 8763 "parse.c"
8763 break;
8764
8765 case YYSYMBOL_stmts: /* stmts */
8766#line 2616 "parse.y"
8767 {
8768 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8769 rb_parser_printf(p, "NODE_SPECIAL");
8770 }
8771 else if (((*yyvaluep).node)) {
8772 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8773 }
8774}
8775#line 8776 "parse.c"
8776 break;
8777
8778 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8779#line 2616 "parse.y"
8780 {
8781 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8782 rb_parser_printf(p, "NODE_SPECIAL");
8783 }
8784 else if (((*yyvaluep).node)) {
8785 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8786 }
8787}
8788#line 8789 "parse.c"
8789 break;
8790
8791 case YYSYMBOL_allow_exits: /* allow_exits */
8792#line 2616 "parse.y"
8793 {
8794 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8795 rb_parser_printf(p, "NODE_SPECIAL");
8796 }
8797 else if (((*yyvaluep).node_exits)) {
8798 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8799 }
8800}
8801#line 8802 "parse.c"
8802 break;
8803
8804 case YYSYMBOL_stmt: /* stmt */
8805#line 2616 "parse.y"
8806 {
8807 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8808 rb_parser_printf(p, "NODE_SPECIAL");
8809 }
8810 else if (((*yyvaluep).node)) {
8811 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8812 }
8813}
8814#line 8815 "parse.c"
8815 break;
8816
8817 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8818#line 2616 "parse.y"
8819 {
8820 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8821 rb_parser_printf(p, "NODE_SPECIAL");
8822 }
8823 else if (((*yyvaluep).node)) {
8824 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8825 }
8826}
8827#line 8828 "parse.c"
8828 break;
8829
8830 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8831#line 2616 "parse.y"
8832 {
8833 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8834 rb_parser_printf(p, "NODE_SPECIAL");
8835 }
8836 else if (((*yyvaluep).node)) {
8837 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8838 }
8839}
8840#line 8841 "parse.c"
8841 break;
8842
8843 case YYSYMBOL_command_asgn: /* command_asgn */
8844#line 2616 "parse.y"
8845 {
8846 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8847 rb_parser_printf(p, "NODE_SPECIAL");
8848 }
8849 else if (((*yyvaluep).node)) {
8850 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8851 }
8852}
8853#line 8854 "parse.c"
8854 break;
8855
8856 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8857#line 2616 "parse.y"
8858 {
8859 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8860 rb_parser_printf(p, "NODE_SPECIAL");
8861 }
8862 else if (((*yyvaluep).node)) {
8863 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8864 }
8865}
8866#line 8867 "parse.c"
8867 break;
8868
8869 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8870#line 2616 "parse.y"
8871 {
8872 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8873 rb_parser_printf(p, "NODE_SPECIAL");
8874 }
8875 else if (((*yyvaluep).node)) {
8876 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8877 }
8878}
8879#line 8880 "parse.c"
8880 break;
8881
8882 case YYSYMBOL_endless_command: /* endless_command */
8883#line 2616 "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_command_rhs: /* command_rhs */
8896#line 2616 "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_expr: /* expr */
8909#line 2616 "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_def_name: /* def_name */
8922#line 2625 "parse.y"
8923 {
8924 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8925}
8926#line 8927 "parse.c"
8927 break;
8928
8929 case YYSYMBOL_defn_head: /* defn_head */
8930#line 2616 "parse.y"
8931 {
8932 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8933 rb_parser_printf(p, "NODE_SPECIAL");
8934 }
8935 else if (((*yyvaluep).node_def_temp)) {
8936 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8937 }
8938}
8939#line 8940 "parse.c"
8940 break;
8941
8942 case YYSYMBOL_defs_head: /* defs_head */
8943#line 2616 "parse.y"
8944 {
8945 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8946 rb_parser_printf(p, "NODE_SPECIAL");
8947 }
8948 else if (((*yyvaluep).node_def_temp)) {
8949 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8950 }
8951}
8952#line 8953 "parse.c"
8953 break;
8954
8955 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8956#line 2616 "parse.y"
8957 {
8958 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8959 rb_parser_printf(p, "NODE_SPECIAL");
8960 }
8961 else if (((*yyvaluep).node)) {
8962 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8963 }
8964}
8965#line 8966 "parse.c"
8966 break;
8967
8968 case YYSYMBOL_expr_value: /* expr_value */
8969#line 2616 "parse.y"
8970 {
8971 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8972 rb_parser_printf(p, "NODE_SPECIAL");
8973 }
8974 else if (((*yyvaluep).node)) {
8975 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8976 }
8977}
8978#line 8979 "parse.c"
8979 break;
8980
8981 case YYSYMBOL_expr_value_do: /* expr_value_do */
8982#line 2616 "parse.y"
8983 {
8984 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8985 rb_parser_printf(p, "NODE_SPECIAL");
8986 }
8987 else if (((*yyvaluep).node)) {
8988 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8989 }
8990}
8991#line 8992 "parse.c"
8992 break;
8993
8994 case YYSYMBOL_command_call: /* command_call */
8995#line 2616 "parse.y"
8996 {
8997 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8998 rb_parser_printf(p, "NODE_SPECIAL");
8999 }
9000 else if (((*yyvaluep).node)) {
9001 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9002 }
9003}
9004#line 9005 "parse.c"
9005 break;
9006
9007 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
9008#line 2616 "parse.y"
9009 {
9010 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9011 rb_parser_printf(p, "NODE_SPECIAL");
9012 }
9013 else if (((*yyvaluep).node)) {
9014 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9015 }
9016}
9017#line 9018 "parse.c"
9018 break;
9019
9020 case YYSYMBOL_command_call_value: /* command_call_value */
9021#line 2616 "parse.y"
9022 {
9023 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9024 rb_parser_printf(p, "NODE_SPECIAL");
9025 }
9026 else if (((*yyvaluep).node)) {
9027 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9028 }
9029}
9030#line 9031 "parse.c"
9031 break;
9032
9033 case YYSYMBOL_block_command: /* block_command */
9034#line 2616 "parse.y"
9035 {
9036 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9037 rb_parser_printf(p, "NODE_SPECIAL");
9038 }
9039 else if (((*yyvaluep).node)) {
9040 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9041 }
9042}
9043#line 9044 "parse.c"
9044 break;
9045
9046 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9047#line 2616 "parse.y"
9048 {
9049 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9050 rb_parser_printf(p, "NODE_SPECIAL");
9051 }
9052 else if (((*yyvaluep).node)) {
9053 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9054 }
9055}
9056#line 9057 "parse.c"
9057 break;
9058
9059 case YYSYMBOL_fcall: /* fcall */
9060#line 2616 "parse.y"
9061 {
9062 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9063 rb_parser_printf(p, "NODE_SPECIAL");
9064 }
9065 else if (((*yyvaluep).node_fcall)) {
9066 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9067 }
9068}
9069#line 9070 "parse.c"
9070 break;
9071
9072 case YYSYMBOL_command: /* command */
9073#line 2616 "parse.y"
9074 {
9075 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9076 rb_parser_printf(p, "NODE_SPECIAL");
9077 }
9078 else if (((*yyvaluep).node)) {
9079 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9080 }
9081}
9082#line 9083 "parse.c"
9083 break;
9084
9085 case YYSYMBOL_mlhs: /* mlhs */
9086#line 2616 "parse.y"
9087 {
9088 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9089 rb_parser_printf(p, "NODE_SPECIAL");
9090 }
9091 else if (((*yyvaluep).node_masgn)) {
9092 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9093 }
9094}
9095#line 9096 "parse.c"
9096 break;
9097
9098 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9099#line 2616 "parse.y"
9100 {
9101 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9102 rb_parser_printf(p, "NODE_SPECIAL");
9103 }
9104 else if (((*yyvaluep).node_masgn)) {
9105 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9106 }
9107}
9108#line 9109 "parse.c"
9109 break;
9110
9111 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9112#line 2616 "parse.y"
9113 {
9114 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9115 rb_parser_printf(p, "NODE_SPECIAL");
9116 }
9117 else if (((*yyvaluep).node_masgn)) {
9118 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9119 }
9120}
9121#line 9122 "parse.c"
9122 break;
9123
9124 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9125#line 2616 "parse.y"
9126 {
9127 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9128 rb_parser_printf(p, "NODE_SPECIAL");
9129 }
9130 else if (((*yyvaluep).node)) {
9131 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9132 }
9133}
9134#line 9135 "parse.c"
9135 break;
9136
9137 case YYSYMBOL_mlhs_item: /* mlhs_item */
9138#line 2616 "parse.y"
9139 {
9140 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9141 rb_parser_printf(p, "NODE_SPECIAL");
9142 }
9143 else if (((*yyvaluep).node)) {
9144 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9145 }
9146}
9147#line 9148 "parse.c"
9148 break;
9149
9150 case YYSYMBOL_mlhs_head: /* mlhs_head */
9151#line 2616 "parse.y"
9152 {
9153 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9154 rb_parser_printf(p, "NODE_SPECIAL");
9155 }
9156 else if (((*yyvaluep).node)) {
9157 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9158 }
9159}
9160#line 9161 "parse.c"
9161 break;
9162
9163 case YYSYMBOL_mlhs_node: /* mlhs_node */
9164#line 2616 "parse.y"
9165 {
9166 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9167 rb_parser_printf(p, "NODE_SPECIAL");
9168 }
9169 else if (((*yyvaluep).node)) {
9170 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9171 }
9172}
9173#line 9174 "parse.c"
9174 break;
9175
9176 case YYSYMBOL_lhs: /* lhs */
9177#line 2616 "parse.y"
9178 {
9179 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9180 rb_parser_printf(p, "NODE_SPECIAL");
9181 }
9182 else if (((*yyvaluep).node)) {
9183 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9184 }
9185}
9186#line 9187 "parse.c"
9187 break;
9188
9189 case YYSYMBOL_cname: /* cname */
9190#line 2625 "parse.y"
9191 {
9192 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9193}
9194#line 9195 "parse.c"
9195 break;
9196
9197 case YYSYMBOL_cpath: /* cpath */
9198#line 2616 "parse.y"
9199 {
9200 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9201 rb_parser_printf(p, "NODE_SPECIAL");
9202 }
9203 else if (((*yyvaluep).node)) {
9204 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9205 }
9206}
9207#line 9208 "parse.c"
9208 break;
9209
9210 case YYSYMBOL_fname: /* fname */
9211#line 2625 "parse.y"
9212 {
9213 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9214}
9215#line 9216 "parse.c"
9216 break;
9217
9218 case YYSYMBOL_fitem: /* fitem */
9219#line 2616 "parse.y"
9220 {
9221 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9222 rb_parser_printf(p, "NODE_SPECIAL");
9223 }
9224 else if (((*yyvaluep).node)) {
9225 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9226 }
9227}
9228#line 9229 "parse.c"
9229 break;
9230
9231 case YYSYMBOL_undef_list: /* undef_list */
9232#line 2616 "parse.y"
9233 {
9234 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9235 rb_parser_printf(p, "NODE_SPECIAL");
9236 }
9237 else if (((*yyvaluep).node)) {
9238 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9239 }
9240}
9241#line 9242 "parse.c"
9242 break;
9243
9244 case YYSYMBOL_op: /* op */
9245#line 2625 "parse.y"
9246 {
9247 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9248}
9249#line 9250 "parse.c"
9250 break;
9251
9252 case YYSYMBOL_reswords: /* reswords */
9253#line 2625 "parse.y"
9254 {
9255 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9256}
9257#line 9258 "parse.c"
9258 break;
9259
9260 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9261#line 2616 "parse.y"
9262 {
9263 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9264 rb_parser_printf(p, "NODE_SPECIAL");
9265 }
9266 else if (((*yyvaluep).node)) {
9267 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9268 }
9269}
9270#line 9271 "parse.c"
9271 break;
9272
9273 case YYSYMBOL_arg: /* arg */
9274#line 2616 "parse.y"
9275 {
9276 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9277 rb_parser_printf(p, "NODE_SPECIAL");
9278 }
9279 else if (((*yyvaluep).node)) {
9280 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9281 }
9282}
9283#line 9284 "parse.c"
9284 break;
9285
9286 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9287#line 2616 "parse.y"
9288 {
9289 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9290 rb_parser_printf(p, "NODE_SPECIAL");
9291 }
9292 else if (((*yyvaluep).node)) {
9293 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9294 }
9295}
9296#line 9297 "parse.c"
9297 break;
9298
9299 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9300#line 2616 "parse.y"
9301 {
9302 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9303 rb_parser_printf(p, "NODE_SPECIAL");
9304 }
9305 else if (((*yyvaluep).node)) {
9306 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9307 }
9308}
9309#line 9310 "parse.c"
9310 break;
9311
9312 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9313#line 2616 "parse.y"
9314 {
9315 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9316 rb_parser_printf(p, "NODE_SPECIAL");
9317 }
9318 else if (((*yyvaluep).node)) {
9319 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9320 }
9321}
9322#line 9323 "parse.c"
9323 break;
9324
9325 case YYSYMBOL_ternary: /* ternary */
9326#line 2616 "parse.y"
9327 {
9328 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9329 rb_parser_printf(p, "NODE_SPECIAL");
9330 }
9331 else if (((*yyvaluep).node)) {
9332 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9333 }
9334}
9335#line 9336 "parse.c"
9336 break;
9337
9338 case YYSYMBOL_endless_arg: /* endless_arg */
9339#line 2616 "parse.y"
9340 {
9341 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9342 rb_parser_printf(p, "NODE_SPECIAL");
9343 }
9344 else if (((*yyvaluep).node)) {
9345 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9346 }
9347}
9348#line 9349 "parse.c"
9349 break;
9350
9351 case YYSYMBOL_relop: /* relop */
9352#line 2625 "parse.y"
9353 {
9354 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9355}
9356#line 9357 "parse.c"
9357 break;
9358
9359 case YYSYMBOL_rel_expr: /* rel_expr */
9360#line 2616 "parse.y"
9361 {
9362 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9363 rb_parser_printf(p, "NODE_SPECIAL");
9364 }
9365 else if (((*yyvaluep).node)) {
9366 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9367 }
9368}
9369#line 9370 "parse.c"
9370 break;
9371
9372 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9373#line 2616 "parse.y"
9374 {
9375 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9376 rb_parser_printf(p, "NODE_SPECIAL");
9377 }
9378 else if (((*yyvaluep).node)) {
9379 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9380 }
9381}
9382#line 9383 "parse.c"
9383 break;
9384
9385 case YYSYMBOL_arg_value: /* arg_value */
9386#line 2616 "parse.y"
9387 {
9388 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9389 rb_parser_printf(p, "NODE_SPECIAL");
9390 }
9391 else if (((*yyvaluep).node)) {
9392 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9393 }
9394}
9395#line 9396 "parse.c"
9396 break;
9397
9398 case YYSYMBOL_aref_args: /* aref_args */
9399#line 2616 "parse.y"
9400 {
9401 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9402 rb_parser_printf(p, "NODE_SPECIAL");
9403 }
9404 else if (((*yyvaluep).node)) {
9405 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9406 }
9407}
9408#line 9409 "parse.c"
9409 break;
9410
9411 case YYSYMBOL_arg_rhs: /* arg_rhs */
9412#line 2616 "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_paren_args: /* paren_args */
9425#line 2616 "parse.y"
9426 {
9427 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9428 rb_parser_printf(p, "NODE_SPECIAL");
9429 }
9430 else if (((*yyvaluep).node)) {
9431 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9432 }
9433}
9434#line 9435 "parse.c"
9435 break;
9436
9437 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9438#line 2616 "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_opt_call_args: /* opt_call_args */
9451#line 2616 "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_value_expr_command: /* value_expr_command */
9464#line 2616 "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_call_args: /* call_args */
9477#line 2616 "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_command_args: /* command_args */
9490#line 2616 "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_block_arg: /* block_arg */
9503#line 2616 "parse.y"
9504 {
9505 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9506 rb_parser_printf(p, "NODE_SPECIAL");
9507 }
9508 else if (((*yyvaluep).node_block_pass)) {
9509 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9510 }
9511}
9512#line 9513 "parse.c"
9513 break;
9514
9515 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9516#line 2616 "parse.y"
9517 {
9518 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9519 rb_parser_printf(p, "NODE_SPECIAL");
9520 }
9521 else if (((*yyvaluep).node_block_pass)) {
9522 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9523 }
9524}
9525#line 9526 "parse.c"
9526 break;
9527
9528 case YYSYMBOL_args: /* args */
9529#line 2616 "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_arg_splat: /* arg_splat */
9542#line 2616 "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_mrhs_arg: /* mrhs_arg */
9555#line 2616 "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_mrhs: /* mrhs */
9568#line 2616 "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_primary: /* primary */
9581#line 2616 "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_value_expr_primary: /* value_expr_primary */
9594#line 2616 "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_primary_value: /* primary_value */
9607#line 2616 "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_k_while: /* k_while */
9620#line 2616 "parse.y"
9621 {
9622 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9623 rb_parser_printf(p, "NODE_SPECIAL");
9624 }
9625 else if (((*yyvaluep).node_exits)) {
9626 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9627 }
9628}
9629#line 9630 "parse.c"
9630 break;
9631
9632 case YYSYMBOL_k_until: /* k_until */
9633#line 2616 "parse.y"
9634 {
9635 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9636 rb_parser_printf(p, "NODE_SPECIAL");
9637 }
9638 else if (((*yyvaluep).node_exits)) {
9639 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9640 }
9641}
9642#line 9643 "parse.c"
9643 break;
9644
9645 case YYSYMBOL_k_for: /* k_for */
9646#line 2616 "parse.y"
9647 {
9648 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9649 rb_parser_printf(p, "NODE_SPECIAL");
9650 }
9651 else if (((*yyvaluep).node_exits)) {
9652 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9653 }
9654}
9655#line 9656 "parse.c"
9656 break;
9657
9658 case YYSYMBOL_k_def: /* k_def */
9659#line 2616 "parse.y"
9660 {
9661 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9662 rb_parser_printf(p, "NODE_SPECIAL");
9663 }
9664 else if (((*yyvaluep).node_def_temp)) {
9665 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9666 }
9667}
9668#line 9669 "parse.c"
9669 break;
9670
9671 case YYSYMBOL_do: /* do */
9672#line 2625 "parse.y"
9673 {
9674 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9675}
9676#line 9677 "parse.c"
9677 break;
9678
9679 case YYSYMBOL_if_tail: /* if_tail */
9680#line 2616 "parse.y"
9681 {
9682 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9683 rb_parser_printf(p, "NODE_SPECIAL");
9684 }
9685 else if (((*yyvaluep).node)) {
9686 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9687 }
9688}
9689#line 9690 "parse.c"
9690 break;
9691
9692 case YYSYMBOL_opt_else: /* opt_else */
9693#line 2616 "parse.y"
9694 {
9695 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9696 rb_parser_printf(p, "NODE_SPECIAL");
9697 }
9698 else if (((*yyvaluep).node)) {
9699 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9700 }
9701}
9702#line 9703 "parse.c"
9703 break;
9704
9705 case YYSYMBOL_for_var: /* for_var */
9706#line 2616 "parse.y"
9707 {
9708 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9709 rb_parser_printf(p, "NODE_SPECIAL");
9710 }
9711 else if (((*yyvaluep).node)) {
9712 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9713 }
9714}
9715#line 9716 "parse.c"
9716 break;
9717
9718 case YYSYMBOL_f_marg: /* f_marg */
9719#line 2616 "parse.y"
9720 {
9721 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9722 rb_parser_printf(p, "NODE_SPECIAL");
9723 }
9724 else if (((*yyvaluep).node)) {
9725 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9726 }
9727}
9728#line 9729 "parse.c"
9729 break;
9730
9731 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9732#line 2616 "parse.y"
9733 {
9734 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9735 rb_parser_printf(p, "NODE_SPECIAL");
9736 }
9737 else if (((*yyvaluep).node)) {
9738 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9739 }
9740}
9741#line 9742 "parse.c"
9742 break;
9743
9744 case YYSYMBOL_f_margs: /* f_margs */
9745#line 2616 "parse.y"
9746 {
9747 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9748 rb_parser_printf(p, "NODE_SPECIAL");
9749 }
9750 else if (((*yyvaluep).node_masgn)) {
9751 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9752 }
9753}
9754#line 9755 "parse.c"
9755 break;
9756
9757 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9758#line 2616 "parse.y"
9759 {
9760 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9761 rb_parser_printf(p, "NODE_SPECIAL");
9762 }
9763 else if (((*yyvaluep).node)) {
9764 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9765 }
9766}
9767#line 9768 "parse.c"
9768 break;
9769
9770 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9771#line 2625 "parse.y"
9772 {
9773 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9774}
9775#line 9776 "parse.c"
9776 break;
9777
9778 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9779#line 2616 "parse.y"
9780 {
9781 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9782 rb_parser_printf(p, "NODE_SPECIAL");
9783 }
9784 else if (((*yyvaluep).node_kw_arg)) {
9785 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9786 }
9787}
9788#line 9789 "parse.c"
9789 break;
9790
9791 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9792#line 2616 "parse.y"
9793 {
9794 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9795 rb_parser_printf(p, "NODE_SPECIAL");
9796 }
9797 else if (((*yyvaluep).node_kw_arg)) {
9798 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9799 }
9800}
9801#line 9802 "parse.c"
9802 break;
9803
9804 case YYSYMBOL_opt_f_block_arg_none: /* opt_f_block_arg_none */
9805#line 2625 "parse.y"
9806 {
9807 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9808}
9809#line 9810 "parse.c"
9810 break;
9811
9812 case YYSYMBOL_args_tail_basic_primary_value_none: /* args_tail_basic_primary_value_none */
9813#line 2616 "parse.y"
9814 {
9815 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9816 rb_parser_printf(p, "NODE_SPECIAL");
9817 }
9818 else if (((*yyvaluep).node_args)) {
9819 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9820 }
9821}
9822#line 9823 "parse.c"
9823 break;
9824
9825 case YYSYMBOL_block_args_tail: /* block_args_tail */
9826#line 2616 "parse.y"
9827 {
9828 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9829 rb_parser_printf(p, "NODE_SPECIAL");
9830 }
9831 else if (((*yyvaluep).node_args)) {
9832 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9833 }
9834}
9835#line 9836 "parse.c"
9836 break;
9837
9838 case YYSYMBOL_excessed_comma: /* excessed_comma */
9839#line 2625 "parse.y"
9840 {
9841 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9842}
9843#line 9844 "parse.c"
9844 break;
9845
9846 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9847#line 2616 "parse.y"
9848 {
9849 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9850 rb_parser_printf(p, "NODE_SPECIAL");
9851 }
9852 else if (((*yyvaluep).node_opt_arg)) {
9853 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9854 }
9855}
9856#line 9857 "parse.c"
9857 break;
9858
9859 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9860#line 2616 "parse.y"
9861 {
9862 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9863 rb_parser_printf(p, "NODE_SPECIAL");
9864 }
9865 else if (((*yyvaluep).node_opt_arg)) {
9866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9867 }
9868}
9869#line 9870 "parse.c"
9870 break;
9871
9872 case YYSYMBOL_opt_args_tail_block_args_tail_none: /* opt_args_tail_block_args_tail_none */
9873#line 2616 "parse.y"
9874 {
9875 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9876 rb_parser_printf(p, "NODE_SPECIAL");
9877 }
9878 else if (((*yyvaluep).node_args)) {
9879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9880 }
9881}
9882#line 9883 "parse.c"
9883 break;
9884
9885 case YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none: /* args-list_primary_value_opt_args_tail_block_args_tail_none */
9886#line 2616 "parse.y"
9887 {
9888 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9889 rb_parser_printf(p, "NODE_SPECIAL");
9890 }
9891 else if (((*yyvaluep).node_args)) {
9892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9893 }
9894}
9895#line 9896 "parse.c"
9896 break;
9897
9898 case YYSYMBOL_block_param: /* block_param */
9899#line 2616 "parse.y"
9900 {
9901 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9902 rb_parser_printf(p, "NODE_SPECIAL");
9903 }
9904 else if (((*yyvaluep).node_args)) {
9905 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9906 }
9907}
9908#line 9909 "parse.c"
9909 break;
9910
9911 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
9912#line 2616 "parse.y"
9913 {
9914 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9915 rb_parser_printf(p, "NODE_SPECIAL");
9916 }
9917 else if (((*yyvaluep).node_args)) {
9918 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9919 }
9920}
9921#line 9922 "parse.c"
9922 break;
9923
9924 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9925#line 2616 "parse.y"
9926 {
9927 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9928 rb_parser_printf(p, "NODE_SPECIAL");
9929 }
9930 else if (((*yyvaluep).node_args)) {
9931 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9932 }
9933}
9934#line 9935 "parse.c"
9935 break;
9936
9937 case YYSYMBOL_block_param_def: /* block_param_def */
9938#line 2616 "parse.y"
9939 {
9940 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9941 rb_parser_printf(p, "NODE_SPECIAL");
9942 }
9943 else if (((*yyvaluep).node_args)) {
9944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9945 }
9946}
9947#line 9948 "parse.c"
9948 break;
9949
9950 case YYSYMBOL_opt_block_param: /* opt_block_param */
9951#line 2616 "parse.y"
9952 {
9953 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9954 rb_parser_printf(p, "NODE_SPECIAL");
9955 }
9956 else if (((*yyvaluep).node_args)) {
9957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9958 }
9959}
9960#line 9961 "parse.c"
9961 break;
9962
9963 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9964#line 2625 "parse.y"
9965 {
9966 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9967}
9968#line 9969 "parse.c"
9969 break;
9970
9971 case YYSYMBOL_bv_decls: /* bv_decls */
9972#line 2625 "parse.y"
9973 {
9974 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9975}
9976#line 9977 "parse.c"
9977 break;
9978
9979 case YYSYMBOL_bvar: /* bvar */
9980#line 2625 "parse.y"
9981 {
9982 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9983}
9984#line 9985 "parse.c"
9985 break;
9986
9987 case YYSYMBOL_numparam: /* numparam */
9988#line 2616 "parse.y"
9989 {
9990 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9991 rb_parser_printf(p, "NODE_SPECIAL");
9992 }
9993 else if (((*yyvaluep).node)) {
9994 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9995 }
9996}
9997#line 9998 "parse.c"
9998 break;
9999
10000 case YYSYMBOL_it_id: /* it_id */
10001#line 2625 "parse.y"
10002 {
10003 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10004}
10005#line 10006 "parse.c"
10006 break;
10007
10008 case YYSYMBOL_lambda: /* lambda */
10009#line 2616 "parse.y"
10010 {
10011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10012 rb_parser_printf(p, "NODE_SPECIAL");
10013 }
10014 else if (((*yyvaluep).node)) {
10015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10016 }
10017}
10018#line 10019 "parse.c"
10019 break;
10020
10021 case YYSYMBOL_f_larglist: /* f_larglist */
10022#line 2616 "parse.y"
10023 {
10024 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10025 rb_parser_printf(p, "NODE_SPECIAL");
10026 }
10027 else if (((*yyvaluep).node_args)) {
10028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10029 }
10030}
10031#line 10032 "parse.c"
10032 break;
10033
10034 case YYSYMBOL_do_block: /* do_block */
10035#line 2616 "parse.y"
10036 {
10037 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10038 rb_parser_printf(p, "NODE_SPECIAL");
10039 }
10040 else if (((*yyvaluep).node)) {
10041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10042 }
10043}
10044#line 10045 "parse.c"
10045 break;
10046
10047 case YYSYMBOL_block_call: /* block_call */
10048#line 2616 "parse.y"
10049 {
10050 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10051 rb_parser_printf(p, "NODE_SPECIAL");
10052 }
10053 else if (((*yyvaluep).node)) {
10054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10055 }
10056}
10057#line 10058 "parse.c"
10058 break;
10059
10060 case YYSYMBOL_method_call: /* method_call */
10061#line 2616 "parse.y"
10062 {
10063 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10064 rb_parser_printf(p, "NODE_SPECIAL");
10065 }
10066 else if (((*yyvaluep).node)) {
10067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10068 }
10069}
10070#line 10071 "parse.c"
10071 break;
10072
10073 case YYSYMBOL_brace_block: /* brace_block */
10074#line 2616 "parse.y"
10075 {
10076 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10077 rb_parser_printf(p, "NODE_SPECIAL");
10078 }
10079 else if (((*yyvaluep).node)) {
10080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10081 }
10082}
10083#line 10084 "parse.c"
10084 break;
10085
10086 case YYSYMBOL_brace_body: /* brace_body */
10087#line 2616 "parse.y"
10088 {
10089 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10090 rb_parser_printf(p, "NODE_SPECIAL");
10091 }
10092 else if (((*yyvaluep).node)) {
10093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10094 }
10095}
10096#line 10097 "parse.c"
10097 break;
10098
10099 case YYSYMBOL_do_body: /* do_body */
10100#line 2616 "parse.y"
10101 {
10102 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10103 rb_parser_printf(p, "NODE_SPECIAL");
10104 }
10105 else if (((*yyvaluep).node)) {
10106 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10107 }
10108}
10109#line 10110 "parse.c"
10110 break;
10111
10112 case YYSYMBOL_case_args: /* case_args */
10113#line 2616 "parse.y"
10114 {
10115 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10116 rb_parser_printf(p, "NODE_SPECIAL");
10117 }
10118 else if (((*yyvaluep).node)) {
10119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10120 }
10121}
10122#line 10123 "parse.c"
10123 break;
10124
10125 case YYSYMBOL_case_body: /* case_body */
10126#line 2616 "parse.y"
10127 {
10128 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10129 rb_parser_printf(p, "NODE_SPECIAL");
10130 }
10131 else if (((*yyvaluep).node)) {
10132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10133 }
10134}
10135#line 10136 "parse.c"
10136 break;
10137
10138 case YYSYMBOL_cases: /* cases */
10139#line 2616 "parse.y"
10140 {
10141 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10142 rb_parser_printf(p, "NODE_SPECIAL");
10143 }
10144 else if (((*yyvaluep).node)) {
10145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10146 }
10147}
10148#line 10149 "parse.c"
10149 break;
10150
10151 case YYSYMBOL_p_case_body: /* p_case_body */
10152#line 2616 "parse.y"
10153 {
10154 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10155 rb_parser_printf(p, "NODE_SPECIAL");
10156 }
10157 else if (((*yyvaluep).node)) {
10158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10159 }
10160}
10161#line 10162 "parse.c"
10162 break;
10163
10164 case YYSYMBOL_p_cases: /* p_cases */
10165#line 2616 "parse.y"
10166 {
10167 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10168 rb_parser_printf(p, "NODE_SPECIAL");
10169 }
10170 else if (((*yyvaluep).node)) {
10171 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10172 }
10173}
10174#line 10175 "parse.c"
10175 break;
10176
10177 case YYSYMBOL_p_top_expr: /* p_top_expr */
10178#line 2616 "parse.y"
10179 {
10180 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10181 rb_parser_printf(p, "NODE_SPECIAL");
10182 }
10183 else if (((*yyvaluep).node)) {
10184 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10185 }
10186}
10187#line 10188 "parse.c"
10188 break;
10189
10190 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10191#line 2616 "parse.y"
10192 {
10193 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10194 rb_parser_printf(p, "NODE_SPECIAL");
10195 }
10196 else if (((*yyvaluep).node)) {
10197 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10198 }
10199}
10200#line 10201 "parse.c"
10201 break;
10202
10203 case YYSYMBOL_p_expr: /* p_expr */
10204#line 2616 "parse.y"
10205 {
10206 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10207 rb_parser_printf(p, "NODE_SPECIAL");
10208 }
10209 else if (((*yyvaluep).node)) {
10210 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10211 }
10212}
10213#line 10214 "parse.c"
10214 break;
10215
10216 case YYSYMBOL_p_as: /* p_as */
10217#line 2616 "parse.y"
10218 {
10219 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10220 rb_parser_printf(p, "NODE_SPECIAL");
10221 }
10222 else if (((*yyvaluep).node)) {
10223 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10224 }
10225}
10226#line 10227 "parse.c"
10227 break;
10228
10229 case YYSYMBOL_p_alt: /* p_alt */
10230#line 2616 "parse.y"
10231 {
10232 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10233 rb_parser_printf(p, "NODE_SPECIAL");
10234 }
10235 else if (((*yyvaluep).node)) {
10236 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10237 }
10238}
10239#line 10240 "parse.c"
10240 break;
10241
10242 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10243#line 2616 "parse.y"
10244 {
10245 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10246 rb_parser_printf(p, "NODE_SPECIAL");
10247 }
10248 else if (((*yyvaluep).node)) {
10249 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10250 }
10251}
10252#line 10253 "parse.c"
10253 break;
10254
10255 case YYSYMBOL_p_args: /* p_args */
10256#line 2616 "parse.y"
10257 {
10258 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10259 rb_parser_printf(p, "NODE_SPECIAL");
10260 }
10261 else if (((*yyvaluep).node)) {
10262 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10263 }
10264}
10265#line 10266 "parse.c"
10266 break;
10267
10268 case YYSYMBOL_p_args_head: /* p_args_head */
10269#line 2616 "parse.y"
10270 {
10271 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10272 rb_parser_printf(p, "NODE_SPECIAL");
10273 }
10274 else if (((*yyvaluep).node)) {
10275 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10276 }
10277}
10278#line 10279 "parse.c"
10279 break;
10280
10281 case YYSYMBOL_p_args_tail: /* p_args_tail */
10282#line 2616 "parse.y"
10283 {
10284 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10285 rb_parser_printf(p, "NODE_SPECIAL");
10286 }
10287 else if (((*yyvaluep).node)) {
10288 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10289 }
10290}
10291#line 10292 "parse.c"
10292 break;
10293
10294 case YYSYMBOL_p_find: /* p_find */
10295#line 2616 "parse.y"
10296 {
10297 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10298 rb_parser_printf(p, "NODE_SPECIAL");
10299 }
10300 else if (((*yyvaluep).node)) {
10301 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10302 }
10303}
10304#line 10305 "parse.c"
10305 break;
10306
10307 case YYSYMBOL_p_rest: /* p_rest */
10308#line 2616 "parse.y"
10309 {
10310 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10311 rb_parser_printf(p, "NODE_SPECIAL");
10312 }
10313 else if (((*yyvaluep).node)) {
10314 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10315 }
10316}
10317#line 10318 "parse.c"
10318 break;
10319
10320 case YYSYMBOL_p_args_post: /* p_args_post */
10321#line 2616 "parse.y"
10322 {
10323 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10324 rb_parser_printf(p, "NODE_SPECIAL");
10325 }
10326 else if (((*yyvaluep).node)) {
10327 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10328 }
10329}
10330#line 10331 "parse.c"
10331 break;
10332
10333 case YYSYMBOL_p_arg: /* p_arg */
10334#line 2616 "parse.y"
10335 {
10336 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10337 rb_parser_printf(p, "NODE_SPECIAL");
10338 }
10339 else if (((*yyvaluep).node)) {
10340 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10341 }
10342}
10343#line 10344 "parse.c"
10344 break;
10345
10346 case YYSYMBOL_p_kwargs: /* p_kwargs */
10347#line 2616 "parse.y"
10348 {
10349 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10350 rb_parser_printf(p, "NODE_SPECIAL");
10351 }
10352 else if (((*yyvaluep).node)) {
10353 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10354 }
10355}
10356#line 10357 "parse.c"
10357 break;
10358
10359 case YYSYMBOL_p_kwarg: /* p_kwarg */
10360#line 2616 "parse.y"
10361 {
10362 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10363 rb_parser_printf(p, "NODE_SPECIAL");
10364 }
10365 else if (((*yyvaluep).node)) {
10366 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10367 }
10368}
10369#line 10370 "parse.c"
10370 break;
10371
10372 case YYSYMBOL_p_kw: /* p_kw */
10373#line 2616 "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_p_kw_label: /* p_kw_label */
10386#line 2625 "parse.y"
10387 {
10388 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10389}
10390#line 10391 "parse.c"
10391 break;
10392
10393 case YYSYMBOL_p_kwrest: /* p_kwrest */
10394#line 2625 "parse.y"
10395 {
10396 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10397}
10398#line 10399 "parse.c"
10399 break;
10400
10401 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10402#line 2625 "parse.y"
10403 {
10404 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10405}
10406#line 10407 "parse.c"
10407 break;
10408
10409 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10410#line 2625 "parse.y"
10411 {
10412 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10413}
10414#line 10415 "parse.c"
10415 break;
10416
10417 case YYSYMBOL_p_value: /* p_value */
10418#line 2616 "parse.y"
10419 {
10420 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10421 rb_parser_printf(p, "NODE_SPECIAL");
10422 }
10423 else if (((*yyvaluep).node)) {
10424 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10425 }
10426}
10427#line 10428 "parse.c"
10428 break;
10429
10430 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10431#line 2616 "parse.y"
10432 {
10433 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10434 rb_parser_printf(p, "NODE_SPECIAL");
10435 }
10436 else if (((*yyvaluep).node)) {
10437 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10438 }
10439}
10440#line 10441 "parse.c"
10441 break;
10442
10443 case YYSYMBOL_p_primitive: /* p_primitive */
10444#line 2616 "parse.y"
10445 {
10446 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10447 rb_parser_printf(p, "NODE_SPECIAL");
10448 }
10449 else if (((*yyvaluep).node)) {
10450 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10451 }
10452}
10453#line 10454 "parse.c"
10454 break;
10455
10456 case YYSYMBOL_p_variable: /* p_variable */
10457#line 2616 "parse.y"
10458 {
10459 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10460 rb_parser_printf(p, "NODE_SPECIAL");
10461 }
10462 else if (((*yyvaluep).node)) {
10463 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10464 }
10465}
10466#line 10467 "parse.c"
10467 break;
10468
10469 case YYSYMBOL_p_var_ref: /* p_var_ref */
10470#line 2616 "parse.y"
10471 {
10472 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10473 rb_parser_printf(p, "NODE_SPECIAL");
10474 }
10475 else if (((*yyvaluep).node)) {
10476 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10477 }
10478}
10479#line 10480 "parse.c"
10480 break;
10481
10482 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10483#line 2616 "parse.y"
10484 {
10485 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10486 rb_parser_printf(p, "NODE_SPECIAL");
10487 }
10488 else if (((*yyvaluep).node)) {
10489 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10490 }
10491}
10492#line 10493 "parse.c"
10493 break;
10494
10495 case YYSYMBOL_p_const: /* p_const */
10496#line 2616 "parse.y"
10497 {
10498 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10499 rb_parser_printf(p, "NODE_SPECIAL");
10500 }
10501 else if (((*yyvaluep).node)) {
10502 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10503 }
10504}
10505#line 10506 "parse.c"
10506 break;
10507
10508 case YYSYMBOL_opt_rescue: /* opt_rescue */
10509#line 2616 "parse.y"
10510 {
10511 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10512 rb_parser_printf(p, "NODE_SPECIAL");
10513 }
10514 else if (((*yyvaluep).node)) {
10515 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10516 }
10517}
10518#line 10519 "parse.c"
10519 break;
10520
10521 case YYSYMBOL_exc_list: /* exc_list */
10522#line 2616 "parse.y"
10523 {
10524 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10525 rb_parser_printf(p, "NODE_SPECIAL");
10526 }
10527 else if (((*yyvaluep).node)) {
10528 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10529 }
10530}
10531#line 10532 "parse.c"
10532 break;
10533
10534 case YYSYMBOL_exc_var: /* exc_var */
10535#line 2616 "parse.y"
10536 {
10537 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10538 rb_parser_printf(p, "NODE_SPECIAL");
10539 }
10540 else if (((*yyvaluep).node)) {
10541 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10542 }
10543}
10544#line 10545 "parse.c"
10545 break;
10546
10547 case YYSYMBOL_opt_ensure: /* opt_ensure */
10548#line 2616 "parse.y"
10549 {
10550 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10551 rb_parser_printf(p, "NODE_SPECIAL");
10552 }
10553 else if (((*yyvaluep).node)) {
10554 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10555 }
10556}
10557#line 10558 "parse.c"
10558 break;
10559
10560 case YYSYMBOL_literal: /* literal */
10561#line 2616 "parse.y"
10562 {
10563 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10564 rb_parser_printf(p, "NODE_SPECIAL");
10565 }
10566 else if (((*yyvaluep).node)) {
10567 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10568 }
10569}
10570#line 10571 "parse.c"
10571 break;
10572
10573 case YYSYMBOL_strings: /* strings */
10574#line 2616 "parse.y"
10575 {
10576 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10577 rb_parser_printf(p, "NODE_SPECIAL");
10578 }
10579 else if (((*yyvaluep).node)) {
10580 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10581 }
10582}
10583#line 10584 "parse.c"
10584 break;
10585
10586 case YYSYMBOL_string: /* string */
10587#line 2616 "parse.y"
10588 {
10589 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10590 rb_parser_printf(p, "NODE_SPECIAL");
10591 }
10592 else if (((*yyvaluep).node)) {
10593 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10594 }
10595}
10596#line 10597 "parse.c"
10597 break;
10598
10599 case YYSYMBOL_string1: /* string1 */
10600#line 2616 "parse.y"
10601 {
10602 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10603 rb_parser_printf(p, "NODE_SPECIAL");
10604 }
10605 else if (((*yyvaluep).node)) {
10606 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10607 }
10608}
10609#line 10610 "parse.c"
10610 break;
10611
10612 case YYSYMBOL_xstring: /* xstring */
10613#line 2616 "parse.y"
10614 {
10615 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10616 rb_parser_printf(p, "NODE_SPECIAL");
10617 }
10618 else if (((*yyvaluep).node)) {
10619 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10620 }
10621}
10622#line 10623 "parse.c"
10623 break;
10624
10625 case YYSYMBOL_regexp: /* regexp */
10626#line 2616 "parse.y"
10627 {
10628 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10629 rb_parser_printf(p, "NODE_SPECIAL");
10630 }
10631 else if (((*yyvaluep).node)) {
10632 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10633 }
10634}
10635#line 10636 "parse.c"
10636 break;
10637
10638 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10639#line 2616 "parse.y"
10640 {
10641 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10642 rb_parser_printf(p, "NODE_SPECIAL");
10643 }
10644 else if (((*yyvaluep).node)) {
10645 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10646 }
10647}
10648#line 10649 "parse.c"
10649 break;
10650
10651 case YYSYMBOL_words: /* words */
10652#line 2616 "parse.y"
10653 {
10654 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10655 rb_parser_printf(p, "NODE_SPECIAL");
10656 }
10657 else if (((*yyvaluep).node)) {
10658 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10659 }
10660}
10661#line 10662 "parse.c"
10662 break;
10663
10664 case YYSYMBOL_word_list: /* word_list */
10665#line 2616 "parse.y"
10666 {
10667 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10668 rb_parser_printf(p, "NODE_SPECIAL");
10669 }
10670 else if (((*yyvaluep).node)) {
10671 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10672 }
10673}
10674#line 10675 "parse.c"
10675 break;
10676
10677 case YYSYMBOL_word: /* word */
10678#line 2616 "parse.y"
10679 {
10680 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10681 rb_parser_printf(p, "NODE_SPECIAL");
10682 }
10683 else if (((*yyvaluep).node)) {
10684 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10685 }
10686}
10687#line 10688 "parse.c"
10688 break;
10689
10690 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10691#line 2616 "parse.y"
10692 {
10693 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10694 rb_parser_printf(p, "NODE_SPECIAL");
10695 }
10696 else if (((*yyvaluep).node)) {
10697 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10698 }
10699}
10700#line 10701 "parse.c"
10701 break;
10702
10703 case YYSYMBOL_symbols: /* symbols */
10704#line 2616 "parse.y"
10705 {
10706 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10707 rb_parser_printf(p, "NODE_SPECIAL");
10708 }
10709 else if (((*yyvaluep).node)) {
10710 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10711 }
10712}
10713#line 10714 "parse.c"
10714 break;
10715
10716 case YYSYMBOL_symbol_list: /* symbol_list */
10717#line 2616 "parse.y"
10718 {
10719 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10720 rb_parser_printf(p, "NODE_SPECIAL");
10721 }
10722 else if (((*yyvaluep).node)) {
10723 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10724 }
10725}
10726#line 10727 "parse.c"
10727 break;
10728
10729 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10730#line 2616 "parse.y"
10731 {
10732 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10733 rb_parser_printf(p, "NODE_SPECIAL");
10734 }
10735 else if (((*yyvaluep).node)) {
10736 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10737 }
10738}
10739#line 10740 "parse.c"
10740 break;
10741
10742 case YYSYMBOL_qwords: /* qwords */
10743#line 2616 "parse.y"
10744 {
10745 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10746 rb_parser_printf(p, "NODE_SPECIAL");
10747 }
10748 else if (((*yyvaluep).node)) {
10749 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10750 }
10751}
10752#line 10753 "parse.c"
10753 break;
10754
10755 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10756#line 2616 "parse.y"
10757 {
10758 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10759 rb_parser_printf(p, "NODE_SPECIAL");
10760 }
10761 else if (((*yyvaluep).node)) {
10762 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10763 }
10764}
10765#line 10766 "parse.c"
10766 break;
10767
10768 case YYSYMBOL_qsymbols: /* qsymbols */
10769#line 2616 "parse.y"
10770 {
10771 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10772 rb_parser_printf(p, "NODE_SPECIAL");
10773 }
10774 else if (((*yyvaluep).node)) {
10775 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10776 }
10777}
10778#line 10779 "parse.c"
10779 break;
10780
10781 case YYSYMBOL_qword_list: /* qword_list */
10782#line 2616 "parse.y"
10783 {
10784 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10785 rb_parser_printf(p, "NODE_SPECIAL");
10786 }
10787 else if (((*yyvaluep).node)) {
10788 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10789 }
10790}
10791#line 10792 "parse.c"
10792 break;
10793
10794 case YYSYMBOL_qsym_list: /* qsym_list */
10795#line 2616 "parse.y"
10796 {
10797 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10798 rb_parser_printf(p, "NODE_SPECIAL");
10799 }
10800 else if (((*yyvaluep).node)) {
10801 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10802 }
10803}
10804#line 10805 "parse.c"
10805 break;
10806
10807 case YYSYMBOL_string_contents: /* string_contents */
10808#line 2616 "parse.y"
10809 {
10810 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10811 rb_parser_printf(p, "NODE_SPECIAL");
10812 }
10813 else if (((*yyvaluep).node)) {
10814 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10815 }
10816}
10817#line 10818 "parse.c"
10818 break;
10819
10820 case YYSYMBOL_xstring_contents: /* xstring_contents */
10821#line 2616 "parse.y"
10822 {
10823 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10824 rb_parser_printf(p, "NODE_SPECIAL");
10825 }
10826 else if (((*yyvaluep).node)) {
10827 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10828 }
10829}
10830#line 10831 "parse.c"
10831 break;
10832
10833 case YYSYMBOL_regexp_contents: /* regexp_contents */
10834#line 2616 "parse.y"
10835 {
10836 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10837 rb_parser_printf(p, "NODE_SPECIAL");
10838 }
10839 else if (((*yyvaluep).node)) {
10840 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10841 }
10842}
10843#line 10844 "parse.c"
10844 break;
10845
10846 case YYSYMBOL_string_content: /* string_content */
10847#line 2616 "parse.y"
10848 {
10849 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10850 rb_parser_printf(p, "NODE_SPECIAL");
10851 }
10852 else if (((*yyvaluep).node)) {
10853 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10854 }
10855}
10856#line 10857 "parse.c"
10857 break;
10858
10859 case YYSYMBOL_string_dvar: /* string_dvar */
10860#line 2616 "parse.y"
10861 {
10862 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10863 rb_parser_printf(p, "NODE_SPECIAL");
10864 }
10865 else if (((*yyvaluep).node)) {
10866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10867 }
10868}
10869#line 10870 "parse.c"
10870 break;
10871
10872 case YYSYMBOL_symbol: /* symbol */
10873#line 2616 "parse.y"
10874 {
10875 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10876 rb_parser_printf(p, "NODE_SPECIAL");
10877 }
10878 else if (((*yyvaluep).node)) {
10879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10880 }
10881}
10882#line 10883 "parse.c"
10883 break;
10884
10885 case YYSYMBOL_ssym: /* ssym */
10886#line 2616 "parse.y"
10887 {
10888 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10889 rb_parser_printf(p, "NODE_SPECIAL");
10890 }
10891 else if (((*yyvaluep).node)) {
10892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10893 }
10894}
10895#line 10896 "parse.c"
10896 break;
10897
10898 case YYSYMBOL_sym: /* sym */
10899#line 2625 "parse.y"
10900 {
10901 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10902}
10903#line 10904 "parse.c"
10904 break;
10905
10906 case YYSYMBOL_dsym: /* dsym */
10907#line 2616 "parse.y"
10908 {
10909 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10910 rb_parser_printf(p, "NODE_SPECIAL");
10911 }
10912 else if (((*yyvaluep).node)) {
10913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10914 }
10915}
10916#line 10917 "parse.c"
10917 break;
10918
10919 case YYSYMBOL_numeric: /* numeric */
10920#line 2616 "parse.y"
10921 {
10922 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10923 rb_parser_printf(p, "NODE_SPECIAL");
10924 }
10925 else if (((*yyvaluep).node)) {
10926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10927 }
10928}
10929#line 10930 "parse.c"
10930 break;
10931
10932 case YYSYMBOL_simple_numeric: /* simple_numeric */
10933#line 2616 "parse.y"
10934 {
10935 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10936 rb_parser_printf(p, "NODE_SPECIAL");
10937 }
10938 else if (((*yyvaluep).node)) {
10939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10940 }
10941}
10942#line 10943 "parse.c"
10943 break;
10944
10945 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10946#line 2625 "parse.y"
10947 {
10948 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10949}
10950#line 10951 "parse.c"
10951 break;
10952
10953 case YYSYMBOL_user_variable: /* user_variable */
10954#line 2625 "parse.y"
10955 {
10956 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10957}
10958#line 10959 "parse.c"
10959 break;
10960
10961 case YYSYMBOL_keyword_variable: /* keyword_variable */
10962#line 2625 "parse.y"
10963 {
10964 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10965}
10966#line 10967 "parse.c"
10967 break;
10968
10969 case YYSYMBOL_var_ref: /* var_ref */
10970#line 2616 "parse.y"
10971 {
10972 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10973 rb_parser_printf(p, "NODE_SPECIAL");
10974 }
10975 else if (((*yyvaluep).node)) {
10976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10977 }
10978}
10979#line 10980 "parse.c"
10980 break;
10981
10982 case YYSYMBOL_var_lhs: /* var_lhs */
10983#line 2616 "parse.y"
10984 {
10985 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10986 rb_parser_printf(p, "NODE_SPECIAL");
10987 }
10988 else if (((*yyvaluep).node)) {
10989 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10990 }
10991}
10992#line 10993 "parse.c"
10993 break;
10994
10995 case YYSYMBOL_backref: /* backref */
10996#line 2616 "parse.y"
10997 {
10998 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10999 rb_parser_printf(p, "NODE_SPECIAL");
11000 }
11001 else if (((*yyvaluep).node)) {
11002 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11003 }
11004}
11005#line 11006 "parse.c"
11006 break;
11007
11008 case YYSYMBOL_superclass: /* superclass */
11009#line 2616 "parse.y"
11010 {
11011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11012 rb_parser_printf(p, "NODE_SPECIAL");
11013 }
11014 else if (((*yyvaluep).node)) {
11015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11016 }
11017}
11018#line 11019 "parse.c"
11019 break;
11020
11021 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11022#line 2616 "parse.y"
11023 {
11024 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11025 rb_parser_printf(p, "NODE_SPECIAL");
11026 }
11027 else if (((*yyvaluep).node_args)) {
11028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11029 }
11030}
11031#line 11032 "parse.c"
11032 break;
11033
11034 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11035#line 2616 "parse.y"
11036 {
11037 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11038 rb_parser_printf(p, "NODE_SPECIAL");
11039 }
11040 else if (((*yyvaluep).node_args)) {
11041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11042 }
11043}
11044#line 11045 "parse.c"
11045 break;
11046
11047 case YYSYMBOL_f_paren_args: /* f_paren_args */
11048#line 2616 "parse.y"
11049 {
11050 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11051 rb_parser_printf(p, "NODE_SPECIAL");
11052 }
11053 else if (((*yyvaluep).node_args)) {
11054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11055 }
11056}
11057#line 11058 "parse.c"
11058 break;
11059
11060 case YYSYMBOL_f_arglist: /* f_arglist */
11061#line 2616 "parse.y"
11062 {
11063 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11064 rb_parser_printf(p, "NODE_SPECIAL");
11065 }
11066 else if (((*yyvaluep).node_args)) {
11067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11068 }
11069}
11070#line 11071 "parse.c"
11071 break;
11072
11073 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11074#line 2616 "parse.y"
11075 {
11076 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11077 rb_parser_printf(p, "NODE_SPECIAL");
11078 }
11079 else if (((*yyvaluep).node_kw_arg)) {
11080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11081 }
11082}
11083#line 11084 "parse.c"
11084 break;
11085
11086 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11087#line 2616 "parse.y"
11088 {
11089 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11090 rb_parser_printf(p, "NODE_SPECIAL");
11091 }
11092 else if (((*yyvaluep).node_kw_arg)) {
11093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11094 }
11095}
11096#line 11097 "parse.c"
11097 break;
11098
11099 case YYSYMBOL_opt_f_block_arg_opt_comma: /* opt_f_block_arg_opt_comma */
11100#line 2625 "parse.y"
11101 {
11102 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11103}
11104#line 11105 "parse.c"
11105 break;
11106
11107 case YYSYMBOL_args_tail_basic_arg_value_opt_comma: /* args_tail_basic_arg_value_opt_comma */
11108#line 2616 "parse.y"
11109 {
11110 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11111 rb_parser_printf(p, "NODE_SPECIAL");
11112 }
11113 else if (((*yyvaluep).node_args)) {
11114 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11115 }
11116}
11117#line 11118 "parse.c"
11118 break;
11119
11120 case YYSYMBOL_args_tail: /* args_tail */
11121#line 2616 "parse.y"
11122 {
11123 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11124 rb_parser_printf(p, "NODE_SPECIAL");
11125 }
11126 else if (((*yyvaluep).node_args)) {
11127 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11128 }
11129}
11130#line 11131 "parse.c"
11131 break;
11132
11133 case YYSYMBOL_args_tail_basic_arg_value_none: /* args_tail_basic_arg_value_none */
11134#line 2616 "parse.y"
11135 {
11136 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11137 rb_parser_printf(p, "NODE_SPECIAL");
11138 }
11139 else if (((*yyvaluep).node_args)) {
11140 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11141 }
11142}
11143#line 11144 "parse.c"
11144 break;
11145
11146 case YYSYMBOL_largs_tail: /* largs_tail */
11147#line 2616 "parse.y"
11148 {
11149 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11150 rb_parser_printf(p, "NODE_SPECIAL");
11151 }
11152 else if (((*yyvaluep).node_args)) {
11153 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11154 }
11155}
11156#line 11157 "parse.c"
11157 break;
11158
11159 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11160#line 2616 "parse.y"
11161 {
11162 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11163 rb_parser_printf(p, "NODE_SPECIAL");
11164 }
11165 else if (((*yyvaluep).node_opt_arg)) {
11166 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11167 }
11168}
11169#line 11170 "parse.c"
11170 break;
11171
11172 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11173#line 2616 "parse.y"
11174 {
11175 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11176 rb_parser_printf(p, "NODE_SPECIAL");
11177 }
11178 else if (((*yyvaluep).node_opt_arg)) {
11179 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11180 }
11181}
11182#line 11183 "parse.c"
11183 break;
11184
11185 case YYSYMBOL_opt_args_tail_args_tail_opt_comma: /* opt_args_tail_args_tail_opt_comma */
11186#line 2616 "parse.y"
11187 {
11188 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11189 rb_parser_printf(p, "NODE_SPECIAL");
11190 }
11191 else if (((*yyvaluep).node_args)) {
11192 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11193 }
11194}
11195#line 11196 "parse.c"
11196 break;
11197
11198 case YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
11199#line 2616 "parse.y"
11200 {
11201 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11202 rb_parser_printf(p, "NODE_SPECIAL");
11203 }
11204 else if (((*yyvaluep).node_args)) {
11205 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11206 }
11207}
11208#line 11209 "parse.c"
11209 break;
11210
11211 case YYSYMBOL_f_args_list_args_tail_opt_comma: /* f_args-list_args_tail_opt_comma */
11212#line 2616 "parse.y"
11213 {
11214 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11215 rb_parser_printf(p, "NODE_SPECIAL");
11216 }
11217 else if (((*yyvaluep).node_args)) {
11218 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11219 }
11220}
11221#line 11222 "parse.c"
11222 break;
11223
11224 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11225#line 2616 "parse.y"
11226 {
11227 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11228 rb_parser_printf(p, "NODE_SPECIAL");
11229 }
11230 else if (((*yyvaluep).node_args)) {
11231 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11232 }
11233}
11234#line 11235 "parse.c"
11235 break;
11236
11237 case YYSYMBOL_f_args: /* f_args */
11238#line 2616 "parse.y"
11239 {
11240 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11241 rb_parser_printf(p, "NODE_SPECIAL");
11242 }
11243 else if (((*yyvaluep).node_args)) {
11244 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11245 }
11246}
11247#line 11248 "parse.c"
11248 break;
11249
11250 case YYSYMBOL_opt_args_tail_largs_tail_none: /* opt_args_tail_largs_tail_none */
11251#line 2616 "parse.y"
11252 {
11253 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11254 rb_parser_printf(p, "NODE_SPECIAL");
11255 }
11256 else if (((*yyvaluep).node_args)) {
11257 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11258 }
11259}
11260#line 11261 "parse.c"
11261 break;
11262
11263 case YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none: /* args-list_arg_value_opt_args_tail_largs_tail_none */
11264#line 2616 "parse.y"
11265 {
11266 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11267 rb_parser_printf(p, "NODE_SPECIAL");
11268 }
11269 else if (((*yyvaluep).node_args)) {
11270 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11271 }
11272}
11273#line 11274 "parse.c"
11274 break;
11275
11276 case YYSYMBOL_f_args_list_largs_tail_none: /* f_args-list_largs_tail_none */
11277#line 2616 "parse.y"
11278 {
11279 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11280 rb_parser_printf(p, "NODE_SPECIAL");
11281 }
11282 else if (((*yyvaluep).node_args)) {
11283 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11284 }
11285}
11286#line 11287 "parse.c"
11287 break;
11288
11289 case YYSYMBOL_tail_only_args_largs_tail: /* tail-only-args_largs_tail */
11290#line 2616 "parse.y"
11291 {
11292 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11293 rb_parser_printf(p, "NODE_SPECIAL");
11294 }
11295 else if (((*yyvaluep).node_args)) {
11296 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11297 }
11298}
11299#line 11300 "parse.c"
11300 break;
11301
11302 case YYSYMBOL_f_largs: /* f_largs */
11303#line 2616 "parse.y"
11304 {
11305 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11306 rb_parser_printf(p, "NODE_SPECIAL");
11307 }
11308 else if (((*yyvaluep).node_args)) {
11309 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11310 }
11311}
11312#line 11313 "parse.c"
11313 break;
11314
11315 case YYSYMBOL_args_forward: /* args_forward */
11316#line 2625 "parse.y"
11317 {
11318 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11319}
11320#line 11321 "parse.c"
11321 break;
11322
11323 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11324#line 2625 "parse.y"
11325 {
11326 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11327}
11328#line 11329 "parse.c"
11329 break;
11330
11331 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11332#line 2625 "parse.y"
11333 {
11334 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11335}
11336#line 11337 "parse.c"
11337 break;
11338
11339 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11340#line 2625 "parse.y"
11341 {
11342 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11343}
11344#line 11345 "parse.c"
11345 break;
11346
11347 case YYSYMBOL_f_arg_item: /* f_arg_item */
11348#line 2616 "parse.y"
11349 {
11350 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11351 rb_parser_printf(p, "NODE_SPECIAL");
11352 }
11353 else if (((*yyvaluep).node_args_aux)) {
11354 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11355 }
11356}
11357#line 11358 "parse.c"
11358 break;
11359
11360 case YYSYMBOL_f_arg: /* f_arg */
11361#line 2616 "parse.y"
11362 {
11363 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11364 rb_parser_printf(p, "NODE_SPECIAL");
11365 }
11366 else if (((*yyvaluep).node_args_aux)) {
11367 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11368 }
11369}
11370#line 11371 "parse.c"
11371 break;
11372
11373 case YYSYMBOL_f_label: /* f_label */
11374#line 2625 "parse.y"
11375 {
11376 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11377}
11378#line 11379 "parse.c"
11379 break;
11380
11381 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11382#line 2625 "parse.y"
11383 {
11384 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11385}
11386#line 11387 "parse.c"
11387 break;
11388
11389 case YYSYMBOL_f_kwrest: /* f_kwrest */
11390#line 2625 "parse.y"
11391 {
11392 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11393}
11394#line 11395 "parse.c"
11395 break;
11396
11397 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11398#line 2625 "parse.y"
11399 {
11400 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11401}
11402#line 11403 "parse.c"
11403 break;
11404
11405 case YYSYMBOL_f_block_arg: /* f_block_arg */
11406#line 2625 "parse.y"
11407 {
11408 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11409}
11410#line 11411 "parse.c"
11411 break;
11412
11413 case YYSYMBOL_opt_comma: /* opt_comma */
11414#line 2625 "parse.y"
11415 {
11416 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11417}
11418#line 11419 "parse.c"
11419 break;
11420
11421 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11422#line 2616 "parse.y"
11423 {
11424 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11425 rb_parser_printf(p, "NODE_SPECIAL");
11426 }
11427 else if (((*yyvaluep).node)) {
11428 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11429 }
11430}
11431#line 11432 "parse.c"
11432 break;
11433
11434 case YYSYMBOL_singleton: /* singleton */
11435#line 2616 "parse.y"
11436 {
11437 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11438 rb_parser_printf(p, "NODE_SPECIAL");
11439 }
11440 else if (((*yyvaluep).node)) {
11441 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11442 }
11443}
11444#line 11445 "parse.c"
11445 break;
11446
11447 case YYSYMBOL_singleton_expr: /* singleton_expr */
11448#line 2616 "parse.y"
11449 {
11450 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11451 rb_parser_printf(p, "NODE_SPECIAL");
11452 }
11453 else if (((*yyvaluep).node)) {
11454 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11455 }
11456}
11457#line 11458 "parse.c"
11458 break;
11459
11460 case YYSYMBOL_assoc_list: /* assoc_list */
11461#line 2616 "parse.y"
11462 {
11463 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11464 rb_parser_printf(p, "NODE_SPECIAL");
11465 }
11466 else if (((*yyvaluep).node)) {
11467 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11468 }
11469}
11470#line 11471 "parse.c"
11471 break;
11472
11473 case YYSYMBOL_assocs: /* assocs */
11474#line 2616 "parse.y"
11475 {
11476 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11477 rb_parser_printf(p, "NODE_SPECIAL");
11478 }
11479 else if (((*yyvaluep).node)) {
11480 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11481 }
11482}
11483#line 11484 "parse.c"
11484 break;
11485
11486 case YYSYMBOL_assoc: /* assoc */
11487#line 2616 "parse.y"
11488 {
11489 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11490 rb_parser_printf(p, "NODE_SPECIAL");
11491 }
11492 else if (((*yyvaluep).node)) {
11493 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11494 }
11495}
11496#line 11497 "parse.c"
11497 break;
11498
11499 case YYSYMBOL_operation2: /* operation2 */
11500#line 2625 "parse.y"
11501 {
11502 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11503}
11504#line 11505 "parse.c"
11505 break;
11506
11507 case YYSYMBOL_operation3: /* operation3 */
11508#line 2625 "parse.y"
11509 {
11510 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11511}
11512#line 11513 "parse.c"
11513 break;
11514
11515 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11516#line 2625 "parse.y"
11517 {
11518 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11519}
11520#line 11521 "parse.c"
11521 break;
11522
11523 case YYSYMBOL_call_op: /* call_op */
11524#line 2625 "parse.y"
11525 {
11526 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11527}
11528#line 11529 "parse.c"
11529 break;
11530
11531 case YYSYMBOL_call_op2: /* call_op2 */
11532#line 2625 "parse.y"
11533 {
11534 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11535}
11536#line 11537 "parse.c"
11537 break;
11538
11539 case YYSYMBOL_none: /* none */
11540#line 2616 "parse.y"
11541 {
11542 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11543 rb_parser_printf(p, "NODE_SPECIAL");
11544 }
11545 else if (((*yyvaluep).node)) {
11546 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11547 }
11548}
11549#line 11550 "parse.c"
11550 break;
11551
11552 default:
11553 break;
11554 }
11555 YY_IGNORE_MAYBE_UNINITIALIZED_END
11556}
11557
11558
11559/*---------------------------.
11560| Print this symbol on YYO. |
11561`---------------------------*/
11562
11563static void
11564yy_symbol_print (FILE *yyo,
11565 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11566{
11567 YYFPRINTF (yyo, "%s %s (",
11568 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11569
11570 YYLOCATION_PRINT (yyo, yylocationp, p);
11571 YYFPRINTF (yyo, ": ");
11572 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11573 YYFPRINTF (yyo, ")");
11574}
11575
11576/*------------------------------------------------------------------.
11577| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11578| TOP (included). |
11579`------------------------------------------------------------------*/
11580
11581static void
11582yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11583{
11584 YYFPRINTF (stderr, "Stack now");
11585 for (; yybottom <= yytop; yybottom++)
11586 {
11587 int yybot = *yybottom;
11588 YYFPRINTF (stderr, " %d", yybot);
11589 }
11590 YYFPRINTF (stderr, "\n");
11591}
11592
11593# define YY_STACK_PRINT(Bottom, Top, p) \
11594do { \
11595 if (yydebug) \
11596 yy_stack_print ((Bottom), (Top), p); \
11597} while (0)
11598
11599
11600/*------------------------------------------------.
11601| Report that the YYRULE is going to be reduced. |
11602`------------------------------------------------*/
11603
11604static void
11605yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11606 int yyrule, struct parser_params *p)
11607{
11608 int yylno = yyrline[yyrule];
11609 int yynrhs = yyr2[yyrule];
11610 int yyi;
11611 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11612 yyrule - 1, yylno);
11613 /* The symbols being reduced. */
11614 for (yyi = 0; yyi < yynrhs; yyi++)
11615 {
11616 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11617 yy_symbol_print (stderr,
11618 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11619 &yyvsp[(yyi + 1) - (yynrhs)],
11620 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11621 YYFPRINTF (stderr, "\n");
11622 }
11623}
11624
11625# define YY_REDUCE_PRINT(Rule, p) \
11626do { \
11627 if (yydebug) \
11628 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11629} while (0)
11630
11631/* Nonzero means print parse trace. It is left uninitialized so that
11632 multiple parsers can coexist. */
11633#ifndef yydebug
11634int yydebug;
11635#endif
11636#else /* !YYDEBUG */
11637# define YYDPRINTF(Args) ((void) 0)
11638# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11639# define YY_STACK_PRINT(Bottom, Top, p)
11640# define YY_REDUCE_PRINT(Rule, p)
11641#endif /* !YYDEBUG */
11642
11643
11644/* YYINITDEPTH -- initial size of the parser's stacks. */
11645#ifndef YYINITDEPTH
11646# define YYINITDEPTH 200
11647#endif
11648
11649/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11650 if the built-in stack extension method is used).
11651
11652 Do not make this value too large; the results are undefined if
11653 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11654 evaluated with infinite-precision integer arithmetic. */
11655
11656#ifndef YYMAXDEPTH
11657# define YYMAXDEPTH 10000
11658#endif
11659
11660
11661/* Context of a parse error. */
11662typedef struct
11663{
11664 yy_state_t *yyssp;
11665 yysymbol_kind_t yytoken;
11666 YYLTYPE *yylloc;
11667} yypcontext_t;
11668
11669/* Put in YYARG at most YYARGN of the expected tokens given the
11670 current YYCTX, and return the number of tokens stored in YYARG. If
11671 YYARG is null, return the number of expected tokens (guaranteed to
11672 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11673 Return 0 if there are more than YYARGN expected tokens, yet fill
11674 YYARG up to YYARGN. */
11675static int
11676yypcontext_expected_tokens (const yypcontext_t *yyctx,
11677 yysymbol_kind_t yyarg[], int yyargn)
11678{
11679 /* Actual size of YYARG. */
11680 int yycount = 0;
11681 int yyn = yypact[+*yyctx->yyssp];
11682 if (!yypact_value_is_default (yyn))
11683 {
11684 /* Start YYX at -YYN if negative to avoid negative indexes in
11685 YYCHECK. In other words, skip the first -YYN actions for
11686 this state because they are default actions. */
11687 int yyxbegin = yyn < 0 ? -yyn : 0;
11688 /* Stay within bounds of both yycheck and yytname. */
11689 int yychecklim = YYLAST - yyn + 1;
11690 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11691 int yyx;
11692 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11693 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11694 && !yytable_value_is_error (yytable[yyx + yyn]))
11695 {
11696 if (!yyarg)
11697 ++yycount;
11698 else if (yycount == yyargn)
11699 return 0;
11700 else
11701 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11702 }
11703 }
11704 if (yyarg && yycount == 0 && 0 < yyargn)
11705 yyarg[0] = YYSYMBOL_YYEMPTY;
11706 return yycount;
11707}
11708
11709
11710
11711
11712#ifndef yystrlen
11713# if defined __GLIBC__ && defined _STRING_H
11714# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11715# else
11716/* Return the length of YYSTR. */
11717static YYPTRDIFF_T
11718yystrlen (const char *yystr)
11719{
11720 YYPTRDIFF_T yylen;
11721 for (yylen = 0; yystr[yylen]; yylen++)
11722 continue;
11723 return yylen;
11724}
11725# endif
11726#endif
11727
11728#ifndef yystpcpy
11729# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11730# define yystpcpy stpcpy
11731# else
11732/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11733 YYDEST. */
11734static char *
11735yystpcpy (char *yydest, const char *yysrc)
11736{
11737 char *yyd = yydest;
11738 const char *yys = yysrc;
11739
11740 while ((*yyd++ = *yys++) != '\0')
11741 continue;
11742
11743 return yyd - 1;
11744}
11745# endif
11746#endif
11747
11748#ifndef yytnamerr
11749/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11750 quotes and backslashes, so that it's suitable for yyerror. The
11751 heuristic is that double-quoting is unnecessary unless the string
11752 contains an apostrophe, a comma, or backslash (other than
11753 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11754 null, do not copy; instead, return the length of what the result
11755 would have been. */
11756static YYPTRDIFF_T
11757yytnamerr (char *yyres, const char *yystr)
11758{
11759 if (*yystr == '"')
11760 {
11761 YYPTRDIFF_T yyn = 0;
11762 char const *yyp = yystr;
11763 for (;;)
11764 switch (*++yyp)
11765 {
11766 case '\'':
11767 case ',':
11768 goto do_not_strip_quotes;
11769
11770 case '\\':
11771 if (*++yyp != '\\')
11772 goto do_not_strip_quotes;
11773 else
11774 goto append;
11775
11776 append:
11777 default:
11778 if (yyres)
11779 yyres[yyn] = *yyp;
11780 yyn++;
11781 break;
11782
11783 case '"':
11784 if (yyres)
11785 yyres[yyn] = '\0';
11786 return yyn;
11787 }
11788 do_not_strip_quotes: ;
11789 }
11790
11791 if (yyres)
11792 return yystpcpy (yyres, yystr) - yyres;
11793 else
11794 return yystrlen (yystr);
11795}
11796#endif
11797
11798
11799static int
11800yy_syntax_error_arguments (const yypcontext_t *yyctx,
11801 yysymbol_kind_t yyarg[], int yyargn)
11802{
11803 /* Actual size of YYARG. */
11804 int yycount = 0;
11805 /* There are many possibilities here to consider:
11806 - If this state is a consistent state with a default action, then
11807 the only way this function was invoked is if the default action
11808 is an error action. In that case, don't check for expected
11809 tokens because there are none.
11810 - The only way there can be no lookahead present (in yychar) is if
11811 this state is a consistent state with a default action. Thus,
11812 detecting the absence of a lookahead is sufficient to determine
11813 that there is no unexpected or expected token to report. In that
11814 case, just report a simple "syntax error".
11815 - Don't assume there isn't a lookahead just because this state is a
11816 consistent state with a default action. There might have been a
11817 previous inconsistent state, consistent state with a non-default
11818 action, or user semantic action that manipulated yychar.
11819 - Of course, the expected token list depends on states to have
11820 correct lookahead information, and it depends on the parser not
11821 to perform extra reductions after fetching a lookahead from the
11822 scanner and before detecting a syntax error. Thus, state merging
11823 (from LALR or IELR) and default reductions corrupt the expected
11824 token list. However, the list is correct for canonical LR with
11825 one exception: it will still contain any token that will not be
11826 accepted due to an error action in a later state.
11827 */
11828 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11829 {
11830 int yyn;
11831 if (yyarg)
11832 yyarg[yycount] = yyctx->yytoken;
11833 ++yycount;
11834 yyn = yypcontext_expected_tokens (yyctx,
11835 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11836 if (yyn == YYENOMEM)
11837 return YYENOMEM;
11838 else
11839 yycount += yyn;
11840 }
11841 return yycount;
11842}
11843
11844/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11845 about the unexpected token YYTOKEN for the state stack whose top is
11846 YYSSP.
11847
11848 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11849 not large enough to hold the message. In that case, also set
11850 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11851 required number of bytes is too large to store. */
11852static int
11853yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11854 const yypcontext_t *yyctx, struct parser_params *p)
11855{
11856 enum { YYARGS_MAX = 5 };
11857 /* Internationalized format string. */
11858 const char *yyformat = YY_NULLPTR;
11859 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11860 one per "expected"). */
11861 yysymbol_kind_t yyarg[YYARGS_MAX];
11862 /* Cumulated lengths of YYARG. */
11863 YYPTRDIFF_T yysize = 0;
11864
11865 /* Actual size of YYARG. */
11866 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11867 if (yycount == YYENOMEM)
11868 return YYENOMEM;
11869
11870 switch (yycount)
11871 {
11872#define YYCASE_(N, S) \
11873 case N: \
11874 yyformat = S; \
11875 break
11876 default: /* Avoid compiler warnings. */
11877 YYCASE_(0, YY_("syntax error"));
11878 YYCASE_(1, YY_("syntax error, unexpected %s"));
11879 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11880 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11881 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11882 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11883#undef YYCASE_
11884 }
11885
11886 /* Compute error message size. Don't count the "%s"s, but reserve
11887 room for the terminator. */
11888 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11889 {
11890 int yyi;
11891 for (yyi = 0; yyi < yycount; ++yyi)
11892 {
11893 YYPTRDIFF_T yysize1
11894 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11895 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11896 yysize = yysize1;
11897 else
11898 return YYENOMEM;
11899 }
11900 }
11901
11902 if (*yymsg_alloc < yysize)
11903 {
11904 *yymsg_alloc = 2 * yysize;
11905 if (! (yysize <= *yymsg_alloc
11906 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11907 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11908 return -1;
11909 }
11910
11911 /* Avoid sprintf, as that infringes on the user's name space.
11912 Don't have undefined behavior even if the translation
11913 produced a string with the wrong number of "%s"s. */
11914 {
11915 char *yyp = *yymsg;
11916 int yyi = 0;
11917 while ((*yyp = *yyformat) != '\0')
11918 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11919 {
11920 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11921 yyformat += 2;
11922 }
11923 else
11924 {
11925 ++yyp;
11926 ++yyformat;
11927 }
11928 }
11929 return 0;
11930}
11931
11932
11933/*-----------------------------------------------.
11934| Release the memory associated to this symbol. |
11935`-----------------------------------------------*/
11936
11937static void
11938yydestruct (const char *yymsg,
11939 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11940{
11941 YY_USE (yyvaluep);
11942 YY_USE (yylocationp);
11943 YY_USE (p);
11944 if (!yymsg)
11945 yymsg = "Deleting";
11946 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11947
11948 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11949 switch (yykind)
11950 {
11951 case YYSYMBOL_258_16: /* @16 */
11952#line 2653 "parse.y"
11953 {
11954 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11955}
11956#line 11957 "parse.c"
11957 break;
11958
11959 case YYSYMBOL_259_17: /* @17 */
11960#line 2653 "parse.y"
11961 {
11962 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11963}
11964#line 11965 "parse.c"
11965 break;
11966
11967 default:
11968 break;
11969 }
11970 YY_IGNORE_MAYBE_UNINITIALIZED_END
11971}
11972
11973
11974
11975
11976
11977
11978/*----------.
11979| yyparse. |
11980`----------*/
11981
11982int
11983yyparse (struct parser_params *p)
11984{
11985/* Lookahead token kind. */
11986int yychar;
11987
11988
11989/* The semantic value of the lookahead symbol. */
11990/* Default value used for initialization, for pacifying older GCCs
11991 or non-GCC compilers. */
11992#ifdef __cplusplus
11993static const YYSTYPE yyval_default = {};
11994(void) yyval_default;
11995#else
11996YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11997#endif
11998YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11999
12000/* Location data for the lookahead symbol. */
12001static const YYLTYPE yyloc_default
12002# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
12003 = { 1, 1, 1, 1 }
12004# endif
12005;
12006YYLTYPE yylloc = yyloc_default;
12007
12008 /* Number of syntax errors so far. */
12009 int yynerrs = 0;
12010 YY_USE (yynerrs); /* Silence compiler warning. */
12011
12012 yy_state_fast_t yystate = 0;
12013 /* Number of tokens to shift before error messages enabled. */
12014 int yyerrstatus = 0;
12015
12016 /* Refer to the stacks through separate pointers, to allow yyoverflow
12017 to reallocate them elsewhere. */
12018
12019 /* Their size. */
12020 YYPTRDIFF_T yystacksize = YYINITDEPTH;
12021
12022 /* The state stack: array, bottom, top. */
12023 yy_state_t yyssa[YYINITDEPTH];
12024 yy_state_t *yyss = yyssa;
12025 yy_state_t *yyssp = yyss;
12026
12027 /* The semantic value stack: array, bottom, top. */
12028 YYSTYPE yyvsa[YYINITDEPTH];
12029 YYSTYPE *yyvs = yyvsa;
12030 YYSTYPE *yyvsp = yyvs;
12031
12032 /* The location stack: array, bottom, top. */
12033 YYLTYPE yylsa[YYINITDEPTH];
12034 YYLTYPE *yyls = yylsa;
12035 YYLTYPE *yylsp = yyls;
12036
12037 int yyn;
12038 /* The return value of yyparse. */
12039 int yyresult;
12040 /* Lookahead symbol kind. */
12041 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
12042 /* The variables used to return semantic value and location from the
12043 action routines. */
12044 YYSTYPE yyval;
12045 YYLTYPE yyloc;
12046
12047 /* The locations where the error started and ended. */
12048 YYLTYPE yyerror_range[3];
12049
12050 /* Buffer for error messages, and its allocated size. */
12051 char yymsgbuf[128];
12052 char *yymsg = yymsgbuf;
12053 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
12054
12055#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
12056
12057 /* The number of symbols on the RHS of the reduced rule.
12058 Keep to zero when no symbol should be popped. */
12059 int yylen = 0;
12060
12061 YYDPRINTF ((stderr, "Starting parse\n"));
12062
12063 yychar = YYEMPTY; /* Cause a token to be read. */
12064
12065
12066 /* User initialization code. */
12067#line 2660 "parse.y"
12068 {
12069 RUBY_SET_YYLLOC_OF_NONE(yylloc);
12070}
12071
12072#line 12073 "parse.c"
12073
12074 yylsp[0] = yylloc;
12075 goto yysetstate;
12076
12077
12078/*------------------------------------------------------------.
12079| yynewstate -- push a new state, which is found in yystate. |
12080`------------------------------------------------------------*/
12081yynewstate:
12082 /* In all cases, when you get here, the value and location stacks
12083 have just been pushed. So pushing a state here evens the stacks. */
12084 yyssp++;
12085
12086
12087/*--------------------------------------------------------------------.
12088| yysetstate -- set current state (the top of the stack) to yystate. |
12089`--------------------------------------------------------------------*/
12090yysetstate:
12091 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12092 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12093 YY_IGNORE_USELESS_CAST_BEGIN
12094 *yyssp = YY_CAST (yy_state_t, yystate);
12095 YY_IGNORE_USELESS_CAST_END
12096 YY_STACK_PRINT (yyss, yyssp, p);
12097
12098 if (yyss + yystacksize - 1 <= yyssp)
12099#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12100 YYNOMEM;
12101#else
12102 {
12103 /* Get the current used size of the three stacks, in elements. */
12104 YYPTRDIFF_T yysize = yyssp - yyss + 1;
12105
12106# if defined yyoverflow
12107 {
12108 /* Give user a chance to reallocate the stack. Use copies of
12109 these so that the &'s don't force the real ones into
12110 memory. */
12111 yy_state_t *yyss1 = yyss;
12112 YYSTYPE *yyvs1 = yyvs;
12113 YYLTYPE *yyls1 = yyls;
12114
12115 /* Each stack pointer address is followed by the size of the
12116 data in use in that stack, in bytes. This used to be a
12117 conditional around just the two extra args, but that might
12118 be undefined if yyoverflow is a macro. */
12119 yyoverflow (YY_("memory exhausted"),
12120 &yyss1, yysize * YYSIZEOF (*yyssp),
12121 &yyvs1, yysize * YYSIZEOF (*yyvsp),
12122 &yyls1, yysize * YYSIZEOF (*yylsp),
12123 &yystacksize);
12124 yyss = yyss1;
12125 yyvs = yyvs1;
12126 yyls = yyls1;
12127 }
12128# else /* defined YYSTACK_RELOCATE */
12129 /* Extend the stack our own way. */
12130 if (YYMAXDEPTH <= yystacksize)
12131 YYNOMEM;
12132 yystacksize *= 2;
12133 if (YYMAXDEPTH < yystacksize)
12134 yystacksize = YYMAXDEPTH;
12135
12136 {
12137 yy_state_t *yyss1 = yyss;
12138 union yyalloc *yyptr =
12139 YY_CAST (union yyalloc *,
12140 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12141 if (! yyptr)
12142 YYNOMEM;
12143 YYSTACK_RELOCATE (yyss_alloc, yyss);
12144 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12145 YYSTACK_RELOCATE (yyls_alloc, yyls);
12146# undef YYSTACK_RELOCATE
12147 if (yyss1 != yyssa)
12148 YYSTACK_FREE (yyss1);
12149 }
12150# endif
12151
12152 yyssp = yyss + yysize - 1;
12153 yyvsp = yyvs + yysize - 1;
12154 yylsp = yyls + yysize - 1;
12155
12156 YY_IGNORE_USELESS_CAST_BEGIN
12157 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12158 YY_CAST (long, yystacksize)));
12159 YY_IGNORE_USELESS_CAST_END
12160
12161 if (yyss + yystacksize - 1 <= yyssp)
12162 YYABORT;
12163 }
12164#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12165
12166
12167 if (yystate == YYFINAL)
12168 YYACCEPT;
12169
12170 goto yybackup;
12171
12172
12173/*-----------.
12174| yybackup. |
12175`-----------*/
12176yybackup:
12177 /* Do appropriate processing given the current state. Read a
12178 lookahead token if we need one and don't already have one. */
12179
12180 /* First try to decide what to do without reference to lookahead token. */
12181 yyn = yypact[yystate];
12182 if (yypact_value_is_default (yyn))
12183 goto yydefault;
12184
12185 /* Not known => get a lookahead token if don't already have one. */
12186
12187 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12188 if (yychar == YYEMPTY)
12189 {
12190 YYDPRINTF ((stderr, "Reading a token\n"));
12191 yychar = yylex (&yylval, &yylloc, p);
12192 }
12193
12194 if (yychar <= END_OF_INPUT)
12195 {
12196 yychar = END_OF_INPUT;
12197 yytoken = YYSYMBOL_YYEOF;
12198 YYDPRINTF ((stderr, "Now at end of input.\n"));
12199 }
12200 else if (yychar == YYerror)
12201 {
12202 /* The scanner already issued an error message, process directly
12203 to error recovery. But do not keep the error token as
12204 lookahead, it is too special and may lead us to an endless
12205 loop in error recovery. */
12206 yychar = YYUNDEF;
12207 yytoken = YYSYMBOL_YYerror;
12208 yyerror_range[1] = yylloc;
12209 goto yyerrlab1;
12210 }
12211 else
12212 {
12213 yytoken = YYTRANSLATE (yychar);
12214 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12215 }
12216
12217 /* If the proper action on seeing token YYTOKEN is to reduce or to
12218 detect an error, take that action. */
12219 yyn += yytoken;
12220 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12221 goto yydefault;
12222 yyn = yytable[yyn];
12223 if (yyn <= 0)
12224 {
12225 if (yytable_value_is_error (yyn))
12226 goto yyerrlab;
12227 yyn = -yyn;
12228 goto yyreduce;
12229 }
12230
12231 /* Count tokens shifted since error; after three, turn off error
12232 status. */
12233 if (yyerrstatus)
12234 yyerrstatus--;
12235
12236 /* Shift the lookahead token. */
12237 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12238 yystate = yyn;
12239 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12240 *++yyvsp = yylval;
12241 YY_IGNORE_MAYBE_UNINITIALIZED_END
12242 *++yylsp = yylloc;
12243 /* %after-shift code. */
12244#line 2663 "parse.y"
12245 {after_shift(p);}
12246#line 12247 "parse.c"
12247
12248
12249 /* Discard the shifted token. */
12250 yychar = YYEMPTY;
12251 goto yynewstate;
12252
12253
12254/*-----------------------------------------------------------.
12255| yydefault -- do the default action for the current state. |
12256`-----------------------------------------------------------*/
12257yydefault:
12258 yyn = yydefact[yystate];
12259 if (yyn == 0)
12260 goto yyerrlab;
12261 goto yyreduce;
12262
12263
12264/*-----------------------------.
12265| yyreduce -- do a reduction. |
12266`-----------------------------*/
12267yyreduce:
12268 /* yyn is the number of a rule to reduce with. */
12269 yylen = yyr2[yyn];
12270
12271 /* If YYLEN is nonzero, implement the default value of the action:
12272 '$$ = $1'.
12273
12274 Otherwise, the following line sets YYVAL to garbage.
12275 This behavior is undocumented and Bison
12276 users should not rely upon it. Assigning to YYVAL
12277 unconditionally makes the parser a bit smaller, and it avoids a
12278 GCC warning that YYVAL may be used uninitialized. */
12279 yyval = yyvsp[1-yylen];
12280 /* %before-reduce function. */
12281#line 2664 "parse.y"
12282 {before_reduce(yylen, p);}
12283#line 12284 "parse.c"
12284
12285
12286 /* Default location. */
12287 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12288 yyerror_range[1] = yyloc;
12289 YY_REDUCE_PRINT (yyn, p);
12290 switch (yyn)
12291 {
12292 case 2: /* $@1: %empty */
12293#line 3168 "parse.y"
12294 {
12295 SET_LEX_STATE(EXPR_BEG);
12296 local_push(p, ifndef_ripper(1)+0);
12297 /* jumps are possible in the top-level loop. */
12298 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12299 }
12300#line 12301 "parse.c"
12301 break;
12302
12303 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12304#line 2983 "parse.y"
12305 {
12306 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12307 }
12308#line 12309 "parse.c"
12309 break;
12310
12311 case 6: /* program: $@1 compstmt_top_stmts */
12312#line 3175 "parse.y"
12313 {
12314 if ((yyvsp[0].node) && !compile_for_eval) {
12315 NODE *node = (yyvsp[0].node);
12316 /* last expression should not be void */
12317 if (nd_type_p(node, NODE_BLOCK)) {
12318 while (RNODE_BLOCK(node)->nd_next) {
12319 node = RNODE_BLOCK(node)->nd_next;
12320 }
12321 node = RNODE_BLOCK(node)->nd_head;
12322 }
12323 node = remove_begin(node);
12324 void_expr(p, node);
12325 }
12326 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12327 /*% ripper[final]: program!($:2) %*/
12328 local_pop(p);
12329 }
12330#line 12331 "parse.c"
12331 break;
12332
12333 case 7: /* top_stmts: none */
12334#line 3195 "parse.y"
12335 {
12336 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12337 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12338 }
12339#line 12340 "parse.c"
12340 break;
12341
12342 case 8: /* top_stmts: top_stmt */
12343#line 3200 "parse.y"
12344 {
12345 (yyval.node) = newline_node((yyvsp[0].node));
12346 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12347 }
12348#line 12349 "parse.c"
12349 break;
12350
12351 case 9: /* top_stmts: top_stmts terms top_stmt */
12352#line 3205 "parse.y"
12353 {
12354 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12355 /*% ripper: stmts_add!($:1, $:3) %*/
12356 }
12357#line 12358 "parse.c"
12358 break;
12359
12360 case 10: /* top_stmt: stmt */
12361#line 3212 "parse.y"
12362 {
12363 clear_block_exit(p, true);
12364 (yyval.node) = (yyvsp[0].node);
12365 }
12366#line 12367 "parse.c"
12367 break;
12368
12369 case 11: /* top_stmt: "'BEGIN'" begin_block */
12370#line 3217 "parse.y"
12371 {
12372 (yyval.node) = (yyvsp[0].node);
12373 /*% ripper: $:2 %*/
12374 }
12375#line 12376 "parse.c"
12376 break;
12377
12378 case 12: /* block_open: '{' */
12379#line 3223 "parse.y"
12380 {(yyval.node_exits) = init_block_exit(p);}
12381#line 12382 "parse.c"
12382 break;
12383
12384 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12385#line 3226 "parse.y"
12386 {
12387 restore_block_exit(p, (yyvsp[-2].node_exits));
12388 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12389 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12390 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12391 /*% ripper: BEGIN!($:compstmt) %*/
12392 }
12393#line 12394 "parse.c"
12394 break;
12395
12396 case 14: /* compstmt_stmts: stmts option_terms */
12397#line 2983 "parse.y"
12398 {
12399 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12400 }
12401#line 12402 "parse.c"
12402 break;
12403
12404 case 15: /* $@2: %empty */
12405#line 3239 "parse.y"
12406 {
12407 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12408 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12409 }
12410#line 12411 "parse.c"
12411 break;
12412
12413 case 16: /* $@3: %empty */
12414#line 3244 "parse.y"
12415 {
12416 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12417 }
12418#line 12419 "parse.c"
12419 break;
12420
12421 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12422#line 3248 "parse.y"
12423 {
12424 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12425 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12426 }
12427#line 12428 "parse.c"
12428 break;
12429
12430 case 18: /* $@4: %empty */
12431#line 3255 "parse.y"
12432 {
12433 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12434 }
12435#line 12436 "parse.c"
12436 break;
12437
12438 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12439#line 3259 "parse.y"
12440 {
12441 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12442 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12443 }
12444#line 12445 "parse.c"
12445 break;
12446
12447 case 20: /* stmts: none */
12448#line 3266 "parse.y"
12449 {
12450 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12451 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12452 }
12453#line 12454 "parse.c"
12454 break;
12455
12456 case 21: /* stmts: stmt_or_begin */
12457#line 3271 "parse.y"
12458 {
12459 (yyval.node) = newline_node((yyvsp[0].node));
12460 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12461 }
12462#line 12463 "parse.c"
12463 break;
12464
12465 case 22: /* stmts: stmts terms stmt_or_begin */
12466#line 3276 "parse.y"
12467 {
12468 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12469 /*% ripper: stmts_add!($:1, $:3) %*/
12470 }
12471#line 12472 "parse.c"
12472 break;
12473
12474 case 24: /* $@5: %empty */
12475#line 3284 "parse.y"
12476 {
12477 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12478 }
12479#line 12480 "parse.c"
12480 break;
12481
12482 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12483#line 3288 "parse.y"
12484 {
12485 (yyval.node) = (yyvsp[0].node);
12486 }
12487#line 12488 "parse.c"
12488 break;
12489
12490 case 26: /* allow_exits: %empty */
12491#line 3293 "parse.y"
12492 {(yyval.node_exits) = allow_block_exit(p);}
12493#line 12494 "parse.c"
12494 break;
12495
12496 case 27: /* k_END: "'END'" lex_ctxt */
12497#line 3296 "parse.y"
12498 {
12499 if (p->ctxt.in_def) {
12500 rb_warn0("END in method; use at_exit");
12501 }
12502 (yyval.ctxt) = (yyvsp[0].ctxt);
12503 p->ctxt.in_rescue = before_rescue;
12504 /*% ripper: $:2 %*/
12505 }
12506#line 12507 "parse.c"
12507 break;
12508
12509 case 28: /* $@6: %empty */
12510#line 3305 "parse.y"
12511 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12512#line 12513 "parse.c"
12513 break;
12514
12515 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12516#line 3306 "parse.y"
12517 {
12518 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12519 /*% ripper: alias!($:new, $:old) %*/
12520 }
12521#line 12522 "parse.c"
12522 break;
12523
12524 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12525#line 3311 "parse.y"
12526 {
12527 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12528 /*% ripper: var_alias!($:new, $:old) %*/
12529 }
12530#line 12531 "parse.c"
12531 break;
12532
12533 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12534#line 3316 "parse.y"
12535 {
12536 char buf[2];
12537 buf[0] = '$';
12538 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12539 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12540 /*% ripper: var_alias!($:new, $:old) %*/
12541 }
12542#line 12543 "parse.c"
12543 break;
12544
12545 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12546#line 3324 "parse.y"
12547 {
12548 static const char mesg[] = "can't make alias for the number variables";
12549 /*%%%*/
12550 yyerror1(&(yylsp[0]), mesg);
12551 /*% %*/
12552 (yyval.node) = NEW_ERROR(&(yyloc));
12553 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12554 }
12555#line 12556 "parse.c"
12556 break;
12557
12558 case 33: /* stmt: "'undef'" undef_list */
12559#line 3333 "parse.y"
12560 {
12561 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12562 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12563 (yyval.node) = (yyvsp[0].node);
12564 /*% ripper: undef!($:list) %*/
12565 }
12566#line 12567 "parse.c"
12567 break;
12568
12569 case 34: /* stmt: stmt "'if' modifier" expr_value */
12570#line 3340 "parse.y"
12571 {
12572 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12573 fixpos((yyval.node), (yyvsp[0].node));
12574 /*% ripper: if_mod!($:cond, $:body) %*/
12575 }
12576#line 12577 "parse.c"
12577 break;
12578
12579 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12580#line 3346 "parse.y"
12581 {
12582 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12583 fixpos((yyval.node), (yyvsp[0].node));
12584 /*% ripper: unless_mod!($:cond, $:body) %*/
12585 }
12586#line 12587 "parse.c"
12587 break;
12588
12589 case 36: /* stmt: stmt "'while' modifier" expr_value */
12590#line 3352 "parse.y"
12591 {
12592 clear_block_exit(p, false);
12593 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12594 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12595 }
12596 else {
12597 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12598 }
12599 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12600 }
12601#line 12602 "parse.c"
12602 break;
12603
12604 case 37: /* stmt: stmt "'until' modifier" expr_value */
12605#line 3363 "parse.y"
12606 {
12607 clear_block_exit(p, 0);
12608 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12609 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12610 }
12611 else {
12612 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12613 }
12614 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12615 }
12616#line 12617 "parse.c"
12617 break;
12618
12619 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12620#line 3374 "parse.y"
12621 {
12622 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12623 NODE *resq;
12624 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12625 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12626 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12627 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12628 }
12629#line 12630 "parse.c"
12630 break;
12631
12632 case 39: /* stmt: k_END block_open compstmt_stmts '}' */
12633#line 3383 "parse.y"
12634 {
12635 clear_block_exit(p, true);
12636 restore_block_exit(p, (yyvsp[-2].node_exits));
12637 p->ctxt = (yyvsp[-3].ctxt);
12638 {
12639 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12640 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12641 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12642 }
12643 /*% ripper: END!($:body) %*/
12644 }
12645#line 12646 "parse.c"
12646 break;
12647
12648 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12649#line 3396 "parse.y"
12650 {
12651 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12652 /*% ripper: massign!($:lhs, $:rhs) %*/
12653 }
12654#line 12655 "parse.c"
12655 break;
12656
12657 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12658#line 2918 "parse.y"
12659 {
12660 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12661 /*% ripper: assign!($:1, $:4) %*/
12662 }
12663#line 12664 "parse.c"
12664 break;
12665
12666 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12667#line 3403 "parse.y"
12668 {
12669 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12670 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12671 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12672 loc.beg_pos = (yylsp[-3]).beg_pos;
12673 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12674 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12675 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12676 }
12677#line 12678 "parse.c"
12678 break;
12679
12680 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12681#line 3413 "parse.y"
12682 {
12683 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12684 /*% ripper: massign!($:lhs, $:rhs) %*/
12685 }
12686#line 12687 "parse.c"
12687 break;
12688
12689 case 47: /* stmt: error */
12690#line 3419 "parse.y"
12691 {
12692 (void)yynerrs;
12693 (yyval.node) = NEW_ERROR(&(yyloc));
12694 }
12695#line 12696 "parse.c"
12696 break;
12697
12698 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12699#line 2918 "parse.y"
12700 {
12701 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12702 /*% ripper: assign!($:1, $:4) %*/
12703 }
12704#line 12705 "parse.c"
12705 break;
12706
12707 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12708#line 3053 "parse.y"
12709 {
12710 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12711 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12712 }
12713#line 12714 "parse.c"
12714 break;
12715
12716 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12717#line 3058 "parse.y"
12718 {
12719 (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]));
12720 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12721 }
12722#line 12723 "parse.c"
12723 break;
12724
12725 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12726#line 3063 "parse.y"
12727 {
12728 (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]));
12729 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12730 }
12731#line 12732 "parse.c"
12732 break;
12733
12734 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12735#line 3068 "parse.y"
12736 {
12737 (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]));
12738 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12739 }
12740#line 12741 "parse.c"
12741 break;
12742
12743 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12744#line 3073 "parse.y"
12745 {
12746 (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]));
12747 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12748 }
12749#line 12750 "parse.c"
12750 break;
12751
12752 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12753#line 3078 "parse.y"
12754 {
12755 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12756 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc, &(yylsp[-4]), &(yylsp[-3])), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12757 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12758 }
12759#line 12760 "parse.c"
12760 break;
12761
12762 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12763#line 3084 "parse.y"
12764 {
12765 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12766 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc, &(yylsp[-4]), &(yylsp[-3])), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12767 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12768 }
12769#line 12770 "parse.c"
12770 break;
12771
12772 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12773#line 3090 "parse.y"
12774 {
12775 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12776 (yyval.node) = NEW_ERROR(&(yyloc));
12777 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12778 }
12779#line 12780 "parse.c"
12780 break;
12781
12782 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12783#line 2958 "parse.y"
12784 {
12785 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12786 restore_defun(p, (yyvsp[-3].node_def_temp));
12787 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12788 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12789 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12790 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12791 /*% ripper: def!($:head, $:args, $:$) %*/
12792 local_pop(p);
12793 }
12794#line 12795 "parse.c"
12795 break;
12796
12797 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12798#line 2969 "parse.y"
12799 {
12800 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12801 restore_defun(p, (yyvsp[-3].node_def_temp));
12802 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12803 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12804 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12805 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12806 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12807 local_pop(p);
12808 }
12809#line 12810 "parse.c"
12810 break;
12811
12812 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12813#line 3432 "parse.y"
12814 {
12815 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12816 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12817 /*% ripper: rescue_mod!($:1, $:4) %*/
12818 }
12819#line 12820 "parse.c"
12820 break;
12821
12822 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12823#line 3438 "parse.y"
12824 {
12825 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12826 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12827 }
12828#line 12829 "parse.c"
12829 break;
12830
12831 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12832#line 3446 "parse.y"
12833 {
12834 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12835 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12836 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12837 /*% ripper: rescue_mod!($:1, $:4) %*/
12838 }
12839#line 12840 "parse.c"
12840 break;
12841
12842 case 71: /* expr: expr "'and'" expr */
12843#line 3457 "parse.y"
12844 {
12845 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12846 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12847 }
12848#line 12849 "parse.c"
12849 break;
12850
12851 case 72: /* expr: expr "'or'" expr */
12852#line 3462 "parse.y"
12853 {
12854 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12855 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12856 }
12857#line 12858 "parse.c"
12858 break;
12859
12860 case 73: /* expr: "'not'" option_'\n' expr */
12861#line 3467 "parse.y"
12862 {
12863 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12864 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12865 }
12866#line 12867 "parse.c"
12867 break;
12868
12869 case 74: /* expr: '!' command_call */
12870#line 3472 "parse.y"
12871 {
12872 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12873 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
12874 }
12875#line 12876 "parse.c"
12876 break;
12877
12878 case 75: /* $@7: %empty */
12879#line 3477 "parse.y"
12880 {
12881 value_expr(p, (yyvsp[-1].node));
12882 }
12883#line 12884 "parse.c"
12884 break;
12885
12886 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12887#line 3482 "parse.y"
12888 {
12889 pop_pktbl(p, (yyvsp[-1].tbl));
12890 pop_pvtbl(p, (yyvsp[-2].tbl));
12891 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12892 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12893 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12894 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), 0, 0, &(yylsp[0]), &NULL_LOC, &NULL_LOC, &(yylsp[-5])), &(yyloc), &NULL_LOC, &NULL_LOC);
12895 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12896 }
12897#line 12898 "parse.c"
12898 break;
12899
12900 case 77: /* $@8: %empty */
12901#line 3492 "parse.y"
12902 {
12903 value_expr(p, (yyvsp[-1].node));
12904 }
12905#line 12906 "parse.c"
12906 break;
12907
12908 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12909#line 3497 "parse.y"
12910 {
12911 pop_pktbl(p, (yyvsp[-1].tbl));
12912 pop_pvtbl(p, (yyvsp[-2].tbl));
12913 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12914 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12915 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12916 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), NEW_TRUE(&(yylsp[0])), NEW_FALSE(&(yylsp[0])), &(yylsp[0]), &(yylsp[-5]), &NULL_LOC, &NULL_LOC), &(yyloc), &NULL_LOC, &NULL_LOC);
12917 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12918 }
12919#line 12920 "parse.c"
12920 break;
12921
12922 case 80: /* def_name: fname */
12923#line 3510 "parse.y"
12924 {
12925 numparam_name(p, (yyvsp[0].id));
12926 local_push(p, 0);
12927 p->ctxt.in_def = 1;
12928 p->ctxt.in_rescue = before_rescue;
12929 p->ctxt.cant_return = 0;
12930 (yyval.id) = (yyvsp[0].id);
12931 }
12932#line 12933 "parse.c"
12933 break;
12934
12935 case 81: /* defn_head: k_def def_name */
12936#line 3521 "parse.y"
12937 {
12938 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12939 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12940 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12941 /*% ripper: $:def_name %*/
12942 }
12943#line 12944 "parse.c"
12944 break;
12945
12946 case 82: /* $@9: %empty */
12947#line 3530 "parse.y"
12948 {
12949 SET_LEX_STATE(EXPR_FNAME);
12950 }
12951#line 12952 "parse.c"
12952 break;
12953
12954 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12955#line 3534 "parse.y"
12956 {
12957 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12958 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12959 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12960 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12961 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12962 }
12963#line 12964 "parse.c"
12964 break;
12965
12966 case 84: /* value_expr_expr: expr */
12967#line 3153 "parse.y"
12968 {
12969 value_expr(p, (yyvsp[0].node));
12970 (yyval.node) = (yyvsp[0].node);
12971 }
12972#line 12973 "parse.c"
12973 break;
12974
12975 case 86: /* expr_value: error */
12976#line 3545 "parse.y"
12977 {
12978 (yyval.node) = NEW_ERROR(&(yyloc));
12979 }
12980#line 12981 "parse.c"
12981 break;
12982
12983 case 87: /* $@10: %empty */
12984#line 3550 "parse.y"
12985 {COND_PUSH(1);}
12986#line 12987 "parse.c"
12987 break;
12988
12989 case 88: /* $@11: %empty */
12990#line 3550 "parse.y"
12991 {COND_POP();}
12992#line 12993 "parse.c"
12993 break;
12994
12995 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12996#line 3551 "parse.y"
12997 {
12998 (yyval.node) = (yyvsp[-2].node);
12999 /*% ripper: $:2 %*/
13000 }
13001#line 13002 "parse.c"
13002 break;
13003
13004 case 92: /* value_expr_command_call: command_call */
13005#line 3153 "parse.y"
13006 {
13007 value_expr(p, (yyvsp[0].node));
13008 (yyval.node) = (yyvsp[0].node);
13009 }
13010#line 13011 "parse.c"
13011 break;
13012
13013 case 95: /* block_command: block_call call_op2 operation2 command_args */
13014#line 3566 "parse.y"
13015 {
13016 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13017 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
13018 }
13019#line 13020 "parse.c"
13020 break;
13021
13022 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
13023#line 3573 "parse.y"
13024 {
13025 (yyval.node) = (yyvsp[-1].node);
13026 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
13027 /*% ripper: $:2 %*/
13028 }
13029#line 13030 "parse.c"
13030 break;
13031
13032 case 97: /* fcall: "local variable or method" */
13033#line 3581 "parse.y"
13034 {
13035 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13036 /*% ripper: $:1 %*/
13037 }
13038#line 13039 "parse.c"
13039 break;
13040
13041 case 98: /* fcall: "constant" */
13042#line 3581 "parse.y"
13043 {
13044 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13045 /*% ripper: $:1 %*/
13046 }
13047#line 13048 "parse.c"
13048 break;
13049
13050 case 99: /* fcall: "method" */
13051#line 3581 "parse.y"
13052 {
13053 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13054 /*% ripper: $:1 %*/
13055 }
13056#line 13057 "parse.c"
13057 break;
13058
13059 case 100: /* command: fcall command_args */
13060#line 3588 "parse.y"
13061 {
13062 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
13063 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
13064 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
13065 /*% ripper: command!($:1, $:2) %*/
13066 }
13067#line 13068 "parse.c"
13068 break;
13069
13070 case 101: /* command: fcall command_args cmd_brace_block */
13071#line 3595 "parse.y"
13072 {
13073 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
13074 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
13075 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
13076 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
13077 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
13078 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
13079 }
13080#line 13081 "parse.c"
13081 break;
13082
13083 case 102: /* command: primary_value call_op operation2 command_args */
13084#line 3604 "parse.y"
13085 {
13086 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13087 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13088 }
13089#line 13090 "parse.c"
13090 break;
13091
13092 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
13093#line 3609 "parse.y"
13094 {
13095 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13096 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13097 }
13098#line 13099 "parse.c"
13099 break;
13100
13101 case 104: /* command: primary_value "::" operation2 command_args */
13102#line 3614 "parse.y"
13103 {
13104 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13105 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13106 }
13107#line 13108 "parse.c"
13108 break;
13109
13110 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
13111#line 3619 "parse.y"
13112 {
13113 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13114 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13115 }
13116#line 13117 "parse.c"
13117 break;
13118
13119 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
13120#line 3624 "parse.y"
13121 {
13122 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
13123 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
13124 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
13125 }
13126#line 13127 "parse.c"
13127 break;
13128
13129 case 107: /* command: "'super'" command_args */
13130#line 3630 "parse.y"
13131 {
13132 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13133 fixpos((yyval.node), (yyvsp[0].node));
13134 /*% ripper: super!($:2) %*/
13135 }
13136#line 13137 "parse.c"
13137 break;
13138
13139 case 108: /* command: k_yield command_args */
13140#line 3636 "parse.y"
13141 {
13142 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13143 fixpos((yyval.node), (yyvsp[0].node));
13144 /*% ripper: yield!($:2) %*/
13145 }
13146#line 13147 "parse.c"
13147 break;
13148
13149 case 109: /* command: k_return call_args */
13150#line 3642 "parse.y"
13151 {
13152 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13153 /*% ripper: return!($:2) %*/
13154 }
13155#line 13156 "parse.c"
13156 break;
13157
13158 case 110: /* command: "'break'" call_args */
13159#line 3647 "parse.y"
13160 {
13161 NODE *args = 0;
13162 args = ret_args(p, (yyvsp[0].node));
13163 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13164 /*% ripper: break!($:2) %*/
13165 }
13166#line 13167 "parse.c"
13167 break;
13168
13169 case 111: /* command: "'next'" call_args */
13170#line 3654 "parse.y"
13171 {
13172 NODE *args = 0;
13173 args = ret_args(p, (yyvsp[0].node));
13174 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13175 /*% ripper: next!($:2) %*/
13176 }
13177#line 13178 "parse.c"
13178 break;
13179
13180 case 113: /* mlhs: "(" mlhs_inner rparen */
13181#line 3664 "parse.y"
13182 {
13183 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13184 /*% ripper: mlhs_paren!($:2) %*/
13185 }
13186#line 13187 "parse.c"
13187 break;
13188
13189 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13190#line 3672 "parse.y"
13191 {
13192 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13193 /*% ripper: mlhs_paren!($:2) %*/
13194 }
13195#line 13196 "parse.c"
13196 break;
13197
13198 case 116: /* mlhs_basic: mlhs_head */
13199#line 3679 "parse.y"
13200 {
13201 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13202 /*% ripper: $:1 %*/
13203 }
13204#line 13205 "parse.c"
13205 break;
13206
13207 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13208#line 3684 "parse.y"
13209 {
13210 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13211 /*% ripper: mlhs_add!($:1, $:2) %*/
13212 }
13213#line 13214 "parse.c"
13214 break;
13215
13216 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13217#line 3689 "parse.y"
13218 {
13219 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13220 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13221 }
13222#line 13223 "parse.c"
13223 break;
13224
13225 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13226#line 3040 "parse.y"
13227 {
13228 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13229 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13230 }
13231#line 13232 "parse.c"
13232 break;
13233
13234 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13235#line 3045 "parse.y"
13236 {
13237 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13238 /*% ripper: mlhs_add!($:1, $:3) %*/
13239 }
13240#line 13241 "parse.c"
13241 break;
13242
13243 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13244#line 3694 "parse.y"
13245 {
13246 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13247 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13248 }
13249#line 13250 "parse.c"
13250 break;
13251
13252 case 122: /* mlhs_basic: mlhs_head "*" */
13253#line 3699 "parse.y"
13254 {
13255 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13256 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13257 }
13258#line 13259 "parse.c"
13259 break;
13260
13261 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13262#line 3704 "parse.y"
13263 {
13264 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13265 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13266 }
13267#line 13268 "parse.c"
13268 break;
13269
13270 case 124: /* mlhs_basic: "*" mlhs_node */
13271#line 3709 "parse.y"
13272 {
13273 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13274 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13275 }
13276#line 13277 "parse.c"
13277 break;
13278
13279 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13280#line 3714 "parse.y"
13281 {
13282 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13283 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13284 }
13285#line 13286 "parse.c"
13286 break;
13287
13288 case 126: /* mlhs_basic: "*" */
13289#line 3719 "parse.y"
13290 {
13291 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13292 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13293 }
13294#line 13295 "parse.c"
13295 break;
13296
13297 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13298#line 3724 "parse.y"
13299 {
13300 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13301 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13302 }
13303#line 13304 "parse.c"
13304 break;
13305
13306 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13307#line 3732 "parse.y"
13308 {
13309 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13310 /*% ripper: mlhs_paren!($:2) %*/
13311 }
13312#line 13313 "parse.c"
13313 break;
13314
13315 case 130: /* mlhs_head: mlhs_item ',' */
13316#line 3739 "parse.y"
13317 {
13318 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13319 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13320 }
13321#line 13322 "parse.c"
13322 break;
13323
13324 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13325#line 3744 "parse.y"
13326 {
13327 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13328 /*% ripper: mlhs_add!($:1, $:2) %*/
13329 }
13330#line 13331 "parse.c"
13331 break;
13332
13333 case 132: /* mlhs_node: user_variable */
13334#line 3752 "parse.y"
13335 {
13336 /*% ripper: var_field!($:1) %*/
13337 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13338 }
13339#line 13340 "parse.c"
13340 break;
13341
13342 case 133: /* mlhs_node: keyword_variable */
13343#line 3752 "parse.y"
13344 {
13345 /*% ripper: var_field!($:1) %*/
13346 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13347 }
13348#line 13349 "parse.c"
13349 break;
13350
13351 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13352#line 3757 "parse.y"
13353 {
13354 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13355 /*% ripper: aref_field!($:1, $:3) %*/
13356 }
13357#line 13358 "parse.c"
13358 break;
13359
13360 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13361#line 3762 "parse.y"
13362 {
13363 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13364 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13365 /*% ripper: field!($:1, $:2, $:3) %*/
13366 }
13367#line 13368 "parse.c"
13368 break;
13369
13370 case 136: /* mlhs_node: primary_value call_op "constant" */
13371#line 3762 "parse.y"
13372 {
13373 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13374 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13375 /*% ripper: field!($:1, $:2, $:3) %*/
13376 }
13377#line 13378 "parse.c"
13378 break;
13379
13380 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13381#line 3768 "parse.y"
13382 {
13383 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13384 /*% ripper: const_path_field!($:1, $:3) %*/
13385 }
13386#line 13387 "parse.c"
13387 break;
13388
13389 case 138: /* mlhs_node: primary_value "::" "constant" */
13390#line 3773 "parse.y"
13391 {
13392 /*% ripper: const_path_field!($:1, $:3) %*/
13393 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13394 }
13395#line 13396 "parse.c"
13396 break;
13397
13398 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13399#line 3778 "parse.y"
13400 {
13401 /*% ripper: top_const_field!($:2) %*/
13402 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13403 }
13404#line 13405 "parse.c"
13405 break;
13406
13407 case 140: /* mlhs_node: backref */
13408#line 3783 "parse.y"
13409 {
13410 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13411 (yyval.node) = NEW_ERROR(&(yyloc));
13412 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13413 }
13414#line 13415 "parse.c"
13415 break;
13416
13417 case 141: /* lhs: user_variable */
13418#line 3791 "parse.y"
13419 {
13420 /*% ripper: var_field!($:1) %*/
13421 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13422 }
13423#line 13424 "parse.c"
13424 break;
13425
13426 case 142: /* lhs: keyword_variable */
13427#line 3791 "parse.y"
13428 {
13429 /*% ripper: var_field!($:1) %*/
13430 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13431 }
13432#line 13433 "parse.c"
13433 break;
13434
13435 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13436#line 3796 "parse.y"
13437 {
13438 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13439 /*% ripper: aref_field!($:1, $:3) %*/
13440 }
13441#line 13442 "parse.c"
13442 break;
13443
13444 case 144: /* lhs: primary_value call_op "local variable or method" */
13445#line 3801 "parse.y"
13446 {
13447 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13448 /*% ripper: field!($:1, $:2, $:3) %*/
13449 }
13450#line 13451 "parse.c"
13451 break;
13452
13453 case 145: /* lhs: primary_value call_op "constant" */
13454#line 3801 "parse.y"
13455 {
13456 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13457 /*% ripper: field!($:1, $:2, $:3) %*/
13458 }
13459#line 13460 "parse.c"
13460 break;
13461
13462 case 146: /* lhs: primary_value "::" "local variable or method" */
13463#line 3806 "parse.y"
13464 {
13465 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13466 /*% ripper: field!($:1, $:2, $:3) %*/
13467 }
13468#line 13469 "parse.c"
13469 break;
13470
13471 case 147: /* lhs: primary_value "::" "constant" */
13472#line 3811 "parse.y"
13473 {
13474 /*% ripper: const_path_field!($:1, $:3) %*/
13475 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13476 }
13477#line 13478 "parse.c"
13478 break;
13479
13480 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13481#line 3816 "parse.y"
13482 {
13483 /*% ripper: top_const_field!($:2) %*/
13484 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13485 }
13486#line 13487 "parse.c"
13487 break;
13488
13489 case 149: /* lhs: backref */
13490#line 3821 "parse.y"
13491 {
13492 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13493 (yyval.node) = NEW_ERROR(&(yyloc));
13494 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13495 }
13496#line 13497 "parse.c"
13497 break;
13498
13499 case 150: /* cname: "local variable or method" */
13500#line 3829 "parse.y"
13501 {
13502 static const char mesg[] = "class/module name must be CONSTANT";
13503 /*%%%*/
13504 yyerror1(&(yylsp[0]), mesg);
13505 /*% %*/
13506 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13507 }
13508#line 13509 "parse.c"
13509 break;
13510
13511 case 152: /* cpath: ":: at EXPR_BEG" cname */
13512#line 3840 "parse.y"
13513 {
13514 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13515 /*% ripper: top_const_ref!($:2) %*/
13516 }
13517#line 13518 "parse.c"
13518 break;
13519
13520 case 153: /* cpath: cname */
13521#line 3845 "parse.y"
13522 {
13523 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13524 /*% ripper: const_ref!($:1) %*/
13525 }
13526#line 13527 "parse.c"
13527 break;
13528
13529 case 154: /* cpath: primary_value "::" cname */
13530#line 3850 "parse.y"
13531 {
13532 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13533 /*% ripper: const_path_ref!($:1, $:3) %*/
13534 }
13535#line 13536 "parse.c"
13536 break;
13537
13538 case 158: /* fname: op */
13539#line 3858 "parse.y"
13540 {
13541 SET_LEX_STATE(EXPR_ENDFN);
13542 (yyval.id) = (yyvsp[0].id);
13543 }
13544#line 13545 "parse.c"
13545 break;
13546
13547 case 160: /* fitem: fname */
13548#line 3866 "parse.y"
13549 {
13550 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13551 /*% ripper: symbol_literal!($:1) %*/
13552 }
13553#line 13554 "parse.c"
13554 break;
13555
13556 case 162: /* undef_list: fitem */
13557#line 3874 "parse.y"
13558 {
13559 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13560 /*% ripper: rb_ary_new3(1, $:1) %*/
13561 }
13562#line 13563 "parse.c"
13563 break;
13564
13565 case 163: /* $@12: %empty */
13566#line 3878 "parse.y"
13567 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13568#line 13569 "parse.c"
13569 break;
13570
13571 case 164: /* undef_list: undef_list ',' $@12 fitem */
13572#line 3879 "parse.y"
13573 {
13574 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13575 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13576 /*% ripper: rb_ary_push($:1, $:4) %*/
13577 }
13578#line 13579 "parse.c"
13579 break;
13580
13581 case 165: /* op: '|' */
13582#line 3886 "parse.y"
13583 { (yyval.id) = '|'; }
13584#line 13585 "parse.c"
13585 break;
13586
13587 case 166: /* op: '^' */
13588#line 3887 "parse.y"
13589 { (yyval.id) = '^'; }
13590#line 13591 "parse.c"
13591 break;
13592
13593 case 167: /* op: '&' */
13594#line 3888 "parse.y"
13595 { (yyval.id) = '&'; }
13596#line 13597 "parse.c"
13597 break;
13598
13599 case 168: /* op: "<=>" */
13600#line 3889 "parse.y"
13601 { (yyval.id) = tCMP; }
13602#line 13603 "parse.c"
13603 break;
13604
13605 case 169: /* op: "==" */
13606#line 3890 "parse.y"
13607 { (yyval.id) = tEQ; }
13608#line 13609 "parse.c"
13609 break;
13610
13611 case 170: /* op: "===" */
13612#line 3891 "parse.y"
13613 { (yyval.id) = tEQQ; }
13614#line 13615 "parse.c"
13615 break;
13616
13617 case 171: /* op: "=~" */
13618#line 3892 "parse.y"
13619 { (yyval.id) = tMATCH; }
13620#line 13621 "parse.c"
13621 break;
13622
13623 case 172: /* op: "!~" */
13624#line 3893 "parse.y"
13625 { (yyval.id) = tNMATCH; }
13626#line 13627 "parse.c"
13627 break;
13628
13629 case 173: /* op: '>' */
13630#line 3894 "parse.y"
13631 { (yyval.id) = '>'; }
13632#line 13633 "parse.c"
13633 break;
13634
13635 case 174: /* op: ">=" */
13636#line 3895 "parse.y"
13637 { (yyval.id) = tGEQ; }
13638#line 13639 "parse.c"
13639 break;
13640
13641 case 175: /* op: '<' */
13642#line 3896 "parse.y"
13643 { (yyval.id) = '<'; }
13644#line 13645 "parse.c"
13645 break;
13646
13647 case 176: /* op: "<=" */
13648#line 3897 "parse.y"
13649 { (yyval.id) = tLEQ; }
13650#line 13651 "parse.c"
13651 break;
13652
13653 case 177: /* op: "!=" */
13654#line 3898 "parse.y"
13655 { (yyval.id) = tNEQ; }
13656#line 13657 "parse.c"
13657 break;
13658
13659 case 178: /* op: "<<" */
13660#line 3899 "parse.y"
13661 { (yyval.id) = tLSHFT; }
13662#line 13663 "parse.c"
13663 break;
13664
13665 case 179: /* op: ">>" */
13666#line 3900 "parse.y"
13667 { (yyval.id) = tRSHFT; }
13668#line 13669 "parse.c"
13669 break;
13670
13671 case 180: /* op: '+' */
13672#line 3901 "parse.y"
13673 { (yyval.id) = '+'; }
13674#line 13675 "parse.c"
13675 break;
13676
13677 case 181: /* op: '-' */
13678#line 3902 "parse.y"
13679 { (yyval.id) = '-'; }
13680#line 13681 "parse.c"
13681 break;
13682
13683 case 182: /* op: '*' */
13684#line 3903 "parse.y"
13685 { (yyval.id) = '*'; }
13686#line 13687 "parse.c"
13687 break;
13688
13689 case 183: /* op: "*" */
13690#line 3904 "parse.y"
13691 { (yyval.id) = '*'; }
13692#line 13693 "parse.c"
13693 break;
13694
13695 case 184: /* op: '/' */
13696#line 3905 "parse.y"
13697 { (yyval.id) = '/'; }
13698#line 13699 "parse.c"
13699 break;
13700
13701 case 185: /* op: '%' */
13702#line 3906 "parse.y"
13703 { (yyval.id) = '%'; }
13704#line 13705 "parse.c"
13705 break;
13706
13707 case 186: /* op: "**" */
13708#line 3907 "parse.y"
13709 { (yyval.id) = tPOW; }
13710#line 13711 "parse.c"
13711 break;
13712
13713 case 187: /* op: "**arg" */
13714#line 3908 "parse.y"
13715 { (yyval.id) = tDSTAR; }
13716#line 13717 "parse.c"
13717 break;
13718
13719 case 188: /* op: '!' */
13720#line 3909 "parse.y"
13721 { (yyval.id) = '!'; }
13722#line 13723 "parse.c"
13723 break;
13724
13725 case 189: /* op: '~' */
13726#line 3910 "parse.y"
13727 { (yyval.id) = '~'; }
13728#line 13729 "parse.c"
13729 break;
13730
13731 case 190: /* op: "unary+" */
13732#line 3911 "parse.y"
13733 { (yyval.id) = tUPLUS; }
13734#line 13735 "parse.c"
13735 break;
13736
13737 case 191: /* op: "unary-" */
13738#line 3912 "parse.y"
13739 { (yyval.id) = tUMINUS; }
13740#line 13741 "parse.c"
13741 break;
13742
13743 case 192: /* op: "[]" */
13744#line 3913 "parse.y"
13745 { (yyval.id) = tAREF; }
13746#line 13747 "parse.c"
13747 break;
13748
13749 case 193: /* op: "[]=" */
13750#line 3914 "parse.y"
13751 { (yyval.id) = tASET; }
13752#line 13753 "parse.c"
13753 break;
13754
13755 case 194: /* op: '`' */
13756#line 3915 "parse.y"
13757 { (yyval.id) = '`'; }
13758#line 13759 "parse.c"
13759 break;
13760
13761 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13762#line 2918 "parse.y"
13763 {
13764 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13765 /*% ripper: assign!($:1, $:4) %*/
13766 }
13767#line 13768 "parse.c"
13768 break;
13769
13770 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13771#line 3053 "parse.y"
13772 {
13773 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13774 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13775 }
13776#line 13777 "parse.c"
13777 break;
13778
13779 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13780#line 3058 "parse.y"
13781 {
13782 (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]));
13783 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13784 }
13785#line 13786 "parse.c"
13786 break;
13787
13788 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13789#line 3063 "parse.y"
13790 {
13791 (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]));
13792 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13793 }
13794#line 13795 "parse.c"
13795 break;
13796
13797 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13798#line 3068 "parse.y"
13799 {
13800 (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]));
13801 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13802 }
13803#line 13804 "parse.c"
13804 break;
13805
13806 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13807#line 3073 "parse.y"
13808 {
13809 (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]));
13810 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13811 }
13812#line 13813 "parse.c"
13813 break;
13814
13815 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13816#line 3078 "parse.y"
13817 {
13818 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13819 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc, &(yylsp[-4]), &(yylsp[-3])), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13820 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13821 }
13822#line 13823 "parse.c"
13823 break;
13824
13825 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13826#line 3084 "parse.y"
13827 {
13828 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13829 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc, &(yylsp[-4]), &(yylsp[-3])), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13830 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13831 }
13832#line 13833 "parse.c"
13833 break;
13834
13835 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13836#line 3090 "parse.y"
13837 {
13838 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13839 (yyval.node) = NEW_ERROR(&(yyloc));
13840 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13841 }
13842#line 13843 "parse.c"
13843 break;
13844
13845 case 247: /* range_expr_arg: arg ".." arg */
13846#line 3112 "parse.y"
13847 {
13848 value_expr(p, (yyvsp[-2].node));
13849 value_expr(p, (yyvsp[0].node));
13850 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13851 /*% ripper: dot2!($:1, $:3) %*/
13852 }
13853#line 13854 "parse.c"
13854 break;
13855
13856 case 248: /* range_expr_arg: arg "..." arg */
13857#line 3119 "parse.y"
13858 {
13859 value_expr(p, (yyvsp[-2].node));
13860 value_expr(p, (yyvsp[0].node));
13861 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13862 /*% ripper: dot3!($:1, $:3) %*/
13863 }
13864#line 13865 "parse.c"
13865 break;
13866
13867 case 249: /* range_expr_arg: arg ".." */
13868#line 3126 "parse.y"
13869 {
13870 value_expr(p, (yyvsp[-1].node));
13871 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13872 /*% ripper: dot2!($:1, Qnil) %*/
13873 }
13874#line 13875 "parse.c"
13875 break;
13876
13877 case 250: /* range_expr_arg: arg "..." */
13878#line 3132 "parse.y"
13879 {
13880 value_expr(p, (yyvsp[-1].node));
13881 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13882 /*% ripper: dot3!($:1, Qnil) %*/
13883 }
13884#line 13885 "parse.c"
13885 break;
13886
13887 case 251: /* range_expr_arg: "(.." arg */
13888#line 3138 "parse.y"
13889 {
13890 value_expr(p, (yyvsp[0].node));
13891 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13892 /*% ripper: dot2!(Qnil, $:2) %*/
13893 }
13894#line 13895 "parse.c"
13895 break;
13896
13897 case 252: /* range_expr_arg: "(..." arg */
13898#line 3144 "parse.y"
13899 {
13900 value_expr(p, (yyvsp[0].node));
13901 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13902 /*% ripper: dot3!(Qnil, $:2) %*/
13903 }
13904#line 13905 "parse.c"
13905 break;
13906
13907 case 254: /* arg: arg '+' arg */
13908#line 3936 "parse.y"
13909 {
13910 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13911 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13912 }
13913#line 13914 "parse.c"
13914 break;
13915
13916 case 255: /* arg: arg '-' arg */
13917#line 3941 "parse.y"
13918 {
13919 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13920 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13921 }
13922#line 13923 "parse.c"
13923 break;
13924
13925 case 256: /* arg: arg '*' arg */
13926#line 3946 "parse.y"
13927 {
13928 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13929 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13930 }
13931#line 13932 "parse.c"
13932 break;
13933
13934 case 257: /* arg: arg '/' arg */
13935#line 3951 "parse.y"
13936 {
13937 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13938 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13939 }
13940#line 13941 "parse.c"
13941 break;
13942
13943 case 258: /* arg: arg '%' arg */
13944#line 3956 "parse.y"
13945 {
13946 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13947 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13948 }
13949#line 13950 "parse.c"
13950 break;
13951
13952 case 259: /* arg: arg "**" arg */
13953#line 3961 "parse.y"
13954 {
13955 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13956 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13957 }
13958#line 13959 "parse.c"
13959 break;
13960
13961 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13962#line 3966 "parse.y"
13963 {
13964 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13965 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13966 }
13967#line 13968 "parse.c"
13968 break;
13969
13970 case 261: /* arg: "unary+" arg */
13971#line 3971 "parse.y"
13972 {
13973 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13974 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13975 }
13976#line 13977 "parse.c"
13977 break;
13978
13979 case 262: /* arg: "unary-" arg */
13980#line 3976 "parse.y"
13981 {
13982 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13983 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13984 }
13985#line 13986 "parse.c"
13986 break;
13987
13988 case 263: /* arg: arg '|' arg */
13989#line 3981 "parse.y"
13990 {
13991 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13992 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13993 }
13994#line 13995 "parse.c"
13995 break;
13996
13997 case 264: /* arg: arg '^' arg */
13998#line 3986 "parse.y"
13999 {
14000 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14001 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
14002 }
14003#line 14004 "parse.c"
14004 break;
14005
14006 case 265: /* arg: arg '&' arg */
14007#line 3991 "parse.y"
14008 {
14009 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14010 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
14011 }
14012#line 14013 "parse.c"
14013 break;
14014
14015 case 266: /* arg: arg "<=>" arg */
14016#line 3996 "parse.y"
14017 {
14018 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14019 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
14020 }
14021#line 14022 "parse.c"
14022 break;
14023
14024 case 268: /* arg: arg "==" arg */
14025#line 4002 "parse.y"
14026 {
14027 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14028 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
14029 }
14030#line 14031 "parse.c"
14031 break;
14032
14033 case 269: /* arg: arg "===" arg */
14034#line 4007 "parse.y"
14035 {
14036 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14037 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
14038 }
14039#line 14040 "parse.c"
14040 break;
14041
14042 case 270: /* arg: arg "!=" arg */
14043#line 4012 "parse.y"
14044 {
14045 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14046 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
14047 }
14048#line 14049 "parse.c"
14049 break;
14050
14051 case 271: /* arg: arg "=~" arg */
14052#line 4017 "parse.y"
14053 {
14054 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14055 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
14056 }
14057#line 14058 "parse.c"
14058 break;
14059
14060 case 272: /* arg: arg "!~" arg */
14061#line 4022 "parse.y"
14062 {
14063 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14064 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
14065 }
14066#line 14067 "parse.c"
14067 break;
14068
14069 case 273: /* arg: '!' arg */
14070#line 4027 "parse.y"
14071 {
14072 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
14073 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
14074 }
14075#line 14076 "parse.c"
14076 break;
14077
14078 case 274: /* arg: '~' arg */
14079#line 4032 "parse.y"
14080 {
14081 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
14082 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
14083 }
14084#line 14085 "parse.c"
14085 break;
14086
14087 case 275: /* arg: arg "<<" arg */
14088#line 4037 "parse.y"
14089 {
14090 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14091 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
14092 }
14093#line 14094 "parse.c"
14094 break;
14095
14096 case 276: /* arg: arg ">>" arg */
14097#line 4042 "parse.y"
14098 {
14099 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14100 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
14101 }
14102#line 14103 "parse.c"
14103 break;
14104
14105 case 277: /* arg: arg "&&" arg */
14106#line 4047 "parse.y"
14107 {
14108 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14109 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
14110 }
14111#line 14112 "parse.c"
14112 break;
14113
14114 case 278: /* arg: arg "||" arg */
14115#line 4052 "parse.y"
14116 {
14117 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14118 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
14119 }
14120#line 14121 "parse.c"
14121 break;
14122
14123 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
14124#line 4057 "parse.y"
14125 {
14126 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
14127 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
14128 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
14129 /*% ripper: defined!($:4) %*/
14130 }
14131#line 14132 "parse.c"
14132 break;
14133
14134 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14135#line 2958 "parse.y"
14136 {
14137 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14138 restore_defun(p, (yyvsp[-3].node_def_temp));
14139 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14140 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14141 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14142 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14143 /*% ripper: def!($:head, $:args, $:$) %*/
14144 local_pop(p);
14145 }
14146#line 14147 "parse.c"
14147 break;
14148
14149 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14150#line 2969 "parse.y"
14151 {
14152 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14153 restore_defun(p, (yyvsp[-3].node_def_temp));
14154 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14155 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14156 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14157 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14158 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14159 local_pop(p);
14160 }
14161#line 14162 "parse.c"
14162 break;
14163
14164 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14165#line 4069 "parse.y"
14166 {
14167 value_expr(p, (yyvsp[-5].node));
14168 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14169 fixpos((yyval.node), (yyvsp[-5].node));
14170 /*% ripper: ifop!($:1, $:3, $:6) %*/
14171 }
14172#line 14173 "parse.c"
14173 break;
14174
14175 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14176#line 4079 "parse.y"
14177 {
14178 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14179 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14180 /*% ripper: rescue_mod!($:1, $:4) %*/
14181 }
14182#line 14183 "parse.c"
14183 break;
14184
14185 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14186#line 4085 "parse.y"
14187 {
14188 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14189 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14190 }
14191#line 14192 "parse.c"
14192 break;
14193
14194 case 289: /* relop: '>' */
14195#line 4091 "parse.y"
14196 {(yyval.id) = '>';}
14197#line 14198 "parse.c"
14198 break;
14199
14200 case 290: /* relop: '<' */
14201#line 4092 "parse.y"
14202 {(yyval.id) = '<';}
14203#line 14204 "parse.c"
14204 break;
14205
14206 case 291: /* relop: ">=" */
14207#line 4093 "parse.y"
14208 {(yyval.id) = idGE;}
14209#line 14210 "parse.c"
14210 break;
14211
14212 case 292: /* relop: "<=" */
14213#line 4094 "parse.y"
14214 {(yyval.id) = idLE;}
14215#line 14216 "parse.c"
14216 break;
14217
14218 case 293: /* rel_expr: arg relop arg */
14219#line 4098 "parse.y"
14220 {
14221 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14222 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14223 }
14224#line 14225 "parse.c"
14225 break;
14226
14227 case 294: /* rel_expr: rel_expr relop arg */
14228#line 4103 "parse.y"
14229 {
14230 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14231 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14232 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14233 }
14234#line 14235 "parse.c"
14235 break;
14236
14237 case 295: /* lex_ctxt: none */
14238#line 4111 "parse.y"
14239 {
14240 (yyval.ctxt) = p->ctxt;
14241 }
14242#line 14243 "parse.c"
14243 break;
14244
14245 case 296: /* begin_defined: lex_ctxt */
14246#line 4117 "parse.y"
14247 {
14248 p->ctxt.in_defined = 1;
14249 (yyval.ctxt) = (yyvsp[0].ctxt);
14250 }
14251#line 14252 "parse.c"
14252 break;
14253
14254 case 297: /* after_rescue: lex_ctxt */
14255#line 4124 "parse.y"
14256 {
14257 p->ctxt.in_rescue = after_rescue;
14258 (yyval.ctxt) = (yyvsp[0].ctxt);
14259 }
14260#line 14261 "parse.c"
14261 break;
14262
14263 case 298: /* value_expr_arg: arg */
14264#line 3153 "parse.y"
14265 {
14266 value_expr(p, (yyvsp[0].node));
14267 (yyval.node) = (yyvsp[0].node);
14268 }
14269#line 14270 "parse.c"
14270 break;
14271
14272 case 302: /* aref_args: args ',' assocs trailer */
14273#line 4136 "parse.y"
14274 {
14275 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14276 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14277 }
14278#line 14279 "parse.c"
14279 break;
14280
14281 case 303: /* aref_args: assocs trailer */
14282#line 4141 "parse.y"
14283 {
14284 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14285 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14286 }
14287#line 14288 "parse.c"
14288 break;
14289
14290 case 304: /* arg_rhs: arg */
14291#line 4148 "parse.y"
14292 {
14293 value_expr(p, (yyvsp[0].node));
14294 (yyval.node) = (yyvsp[0].node);
14295 }
14296#line 14297 "parse.c"
14297 break;
14298
14299 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14300#line 4153 "parse.y"
14301 {
14302 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14303 value_expr(p, (yyvsp[-3].node));
14304 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14305 /*% ripper: rescue_mod!($:1, $:4) %*/
14306 }
14307#line 14308 "parse.c"
14308 break;
14309
14310 case 306: /* paren_args: '(' opt_call_args rparen */
14311#line 4162 "parse.y"
14312 {
14313 (yyval.node) = (yyvsp[-1].node);
14314 /*% ripper: arg_paren!($:2) %*/
14315 }
14316#line 14317 "parse.c"
14317 break;
14318
14319 case 307: /* paren_args: '(' args ',' args_forward rparen */
14320#line 4167 "parse.y"
14321 {
14322 if (!check_forwarding_args(p)) {
14323 (yyval.node) = 0;
14324 }
14325 else {
14326 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14327 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14328 }
14329 }
14330#line 14331 "parse.c"
14331 break;
14332
14333 case 308: /* paren_args: '(' args_forward rparen */
14334#line 4177 "parse.y"
14335 {
14336 if (!check_forwarding_args(p)) {
14337 (yyval.node) = 0;
14338 }
14339 else {
14340 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14341 /*% ripper: arg_paren!($:2) %*/
14342 }
14343 }
14344#line 14345 "parse.c"
14345 break;
14346
14347 case 310: /* opt_paren_args: paren_args */
14348#line 4190 "parse.y"
14349 {
14350 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14351 }
14352#line 14353 "parse.c"
14353 break;
14354
14355 case 314: /* opt_call_args: args ',' assocs ',' */
14356#line 4199 "parse.y"
14357 {
14358 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14359 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14360 }
14361#line 14362 "parse.c"
14362 break;
14363
14364 case 315: /* opt_call_args: assocs ',' */
14365#line 4204 "parse.y"
14366 {
14367 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14368 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14369 }
14370#line 14371 "parse.c"
14371 break;
14372
14373 case 316: /* value_expr_command: command */
14374#line 3153 "parse.y"
14375 {
14376 value_expr(p, (yyvsp[0].node));
14377 (yyval.node) = (yyvsp[0].node);
14378 }
14379#line 14380 "parse.c"
14380 break;
14381
14382 case 317: /* call_args: value_expr_command */
14383#line 4211 "parse.y"
14384 {
14385 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14386 /*% ripper: args_add!(args_new!, $:1) %*/
14387 }
14388#line 14389 "parse.c"
14389 break;
14390
14391 case 318: /* call_args: def_endless_method_endless_command */
14392#line 4216 "parse.y"
14393 {
14394 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14395 /*% ripper: args_add!(args_new!, $:1) %*/
14396 }
14397#line 14398 "parse.c"
14398 break;
14399
14400 case 319: /* call_args: args opt_block_arg */
14401#line 4221 "parse.y"
14402 {
14403 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14404 /*% ripper: args_add_block!($:1, $:2) %*/
14405 }
14406#line 14407 "parse.c"
14407 break;
14408
14409 case 320: /* call_args: assocs opt_block_arg */
14410#line 4226 "parse.y"
14411 {
14412 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14413 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14414 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14415 }
14416#line 14417 "parse.c"
14417 break;
14418
14419 case 321: /* call_args: args ',' assocs opt_block_arg */
14420#line 4232 "parse.y"
14421 {
14422 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14423 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14424 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14425 }
14426#line 14427 "parse.c"
14427 break;
14428
14429 case 323: /* $@13: %empty */
14430#line 4241 "parse.y"
14431 {
14432 /* If call_args starts with a open paren '(' or '[',
14433 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14434 * but the push must be done after CMDARG_PUSH(1).
14435 * So this code makes them consistent by first cancelling
14436 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14437 * and finally redoing CMDARG_PUSH(0).
14438 */
14439 int lookahead = 0;
14440 switch (yychar) {
14441 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14442 lookahead = 1;
14443 }
14444 if (lookahead) CMDARG_POP();
14445 CMDARG_PUSH(1);
14446 if (lookahead) CMDARG_PUSH(0);
14447 }
14448#line 14449 "parse.c"
14449 break;
14450
14451 case 324: /* command_args: $@13 call_args */
14452#line 4259 "parse.y"
14453 {
14454 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14455 * but the push must be done after CMDARG_POP() in the parser.
14456 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14457 * CMDARG_POP() to pop 1 pushed by command_args,
14458 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14459 */
14460 int lookahead = 0;
14461 switch (yychar) {
14462 case tLBRACE_ARG:
14463 lookahead = 1;
14464 }
14465 if (lookahead) CMDARG_POP();
14466 CMDARG_POP();
14467 if (lookahead) CMDARG_PUSH(0);
14468 (yyval.node) = (yyvsp[0].node);
14469 /*% ripper: $:2 %*/
14470 }
14471#line 14472 "parse.c"
14472 break;
14473
14474 case 325: /* block_arg: "&" arg_value */
14475#line 4280 "parse.y"
14476 {
14477 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14478 /*% ripper: $:2 %*/
14479 }
14480#line 14481 "parse.c"
14481 break;
14482
14483 case 326: /* block_arg: "&" */
14484#line 4285 "parse.y"
14485 {
14486 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14487 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14488 /*% ripper: Qnil %*/
14489 }
14490#line 14491 "parse.c"
14491 break;
14492
14493 case 327: /* opt_block_arg: ',' block_arg */
14494#line 4293 "parse.y"
14495 {
14496 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14497 /*% ripper: $:2 %*/
14498 }
14499#line 14500 "parse.c"
14500 break;
14501
14502 case 328: /* opt_block_arg: none */
14503#line 4298 "parse.y"
14504 {
14505 (yyval.node_block_pass) = 0;
14506 /*% ripper: Qfalse %*/
14507 }
14508#line 14509 "parse.c"
14509 break;
14510
14511 case 329: /* args: arg_value */
14512#line 4306 "parse.y"
14513 {
14514 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14515 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14516 }
14517#line 14518 "parse.c"
14518 break;
14519
14520 case 330: /* args: arg_splat */
14521#line 4311 "parse.y"
14522 {
14523 (yyval.node) = (yyvsp[0].node);
14524 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14525 }
14526#line 14527 "parse.c"
14527 break;
14528
14529 case 331: /* args: args ',' arg_value */
14530#line 4316 "parse.y"
14531 {
14532 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14533 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14534 }
14535#line 14536 "parse.c"
14536 break;
14537
14538 case 332: /* args: args ',' arg_splat */
14539#line 4321 "parse.y"
14540 {
14541 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14542 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14543 }
14544#line 14545 "parse.c"
14545 break;
14546
14547 case 333: /* arg_splat: "*" arg_value */
14548#line 4329 "parse.y"
14549 {
14550 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14551 /*% ripper: $:arg_value %*/
14552 }
14553#line 14554 "parse.c"
14554 break;
14555
14556 case 334: /* arg_splat: "*" */
14557#line 4334 "parse.y"
14558 {
14559 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14560 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14561 /*% ripper: Qnil %*/
14562 }
14563#line 14564 "parse.c"
14564 break;
14565
14566 case 337: /* mrhs: args ',' arg_value */
14567#line 4348 "parse.y"
14568 {
14569 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14570 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14571 }
14572#line 14573 "parse.c"
14573 break;
14574
14575 case 338: /* mrhs: args ',' "*" arg_value */
14576#line 4353 "parse.y"
14577 {
14578 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14579 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14580 }
14581#line 14582 "parse.c"
14582 break;
14583
14584 case 339: /* mrhs: "*" arg_value */
14585#line 4358 "parse.y"
14586 {
14587 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14588 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14589 }
14590#line 14591 "parse.c"
14591 break;
14592
14593 case 350: /* primary: "method" */
14594#line 4379 "parse.y"
14595 {
14596 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14597 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14598 }
14599#line 14600 "parse.c"
14600 break;
14601
14602 case 351: /* $@14: %empty */
14603#line 4384 "parse.y"
14604 {
14605 CMDARG_PUSH(0);
14606 }
14607#line 14608 "parse.c"
14608 break;
14609
14610 case 352: /* primary: k_begin $@14 bodystmt k_end */
14611#line 4389 "parse.y"
14612 {
14613 CMDARG_POP();
14614 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14615 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14616 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14617 /*% ripper: begin!($:body) %*/
14618 }
14619#line 14620 "parse.c"
14620 break;
14621
14622 case 353: /* $@15: %empty */
14623#line 4396 "parse.y"
14624 {SET_LEX_STATE(EXPR_ENDARG);}
14625#line 14626 "parse.c"
14626 break;
14627
14628 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14629#line 4397 "parse.y"
14630 {
14631 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14632 (yyval.node) = (yyvsp[-2].node);
14633 /*% ripper: paren!($:body) %*/
14634 }
14635#line 14636 "parse.c"
14636 break;
14637
14638 case 355: /* primary: "(" compstmt_stmts ')' */
14639#line 4403 "parse.y"
14640 {
14641 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14642 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14643 /*% ripper: paren!($:body) %*/
14644 }
14645#line 14646 "parse.c"
14646 break;
14647
14648 case 356: /* primary: primary_value "::" "constant" */
14649#line 4409 "parse.y"
14650 {
14651 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14652 /*% ripper: const_path_ref!($:recv, $:name) %*/
14653 }
14654#line 14655 "parse.c"
14655 break;
14656
14657 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14658#line 4414 "parse.y"
14659 {
14660 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14661 /*% ripper: top_const_ref!($:name) %*/
14662 }
14663#line 14664 "parse.c"
14664 break;
14665
14666 case 358: /* primary: "[" aref_args ']' */
14667#line 4419 "parse.y"
14668 {
14669 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14670 /*% ripper: array!($:args) %*/
14671 }
14672#line 14673 "parse.c"
14673 break;
14674
14675 case 359: /* primary: "{" assoc_list '}' */
14676#line 4424 "parse.y"
14677 {
14678 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14679 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14680 /*% ripper: hash!($:list) %*/
14681 }
14682#line 14683 "parse.c"
14683 break;
14684
14685 case 360: /* primary: k_return */
14686#line 4430 "parse.y"
14687 {
14688 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14689 /*% ripper: return0! %*/
14690 }
14691#line 14692 "parse.c"
14692 break;
14693
14694 case 361: /* primary: k_yield '(' call_args rparen */
14695#line 4435 "parse.y"
14696 {
14697 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14698 /*% ripper: yield!(paren!($:args)) %*/
14699 }
14700#line 14701 "parse.c"
14701 break;
14702
14703 case 362: /* primary: k_yield '(' rparen */
14704#line 4440 "parse.y"
14705 {
14706 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14707 /*% ripper: yield!(paren!(args_new!)) %*/
14708 }
14709#line 14710 "parse.c"
14710 break;
14711
14712 case 363: /* primary: k_yield */
14713#line 4445 "parse.y"
14714 {
14715 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14716 /*% ripper: yield0! %*/
14717 }
14718#line 14719 "parse.c"
14719 break;
14720
14721 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14722#line 4450 "parse.y"
14723 {
14724 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14725 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14726 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14727 /*% ripper: defined!($:arg) %*/
14728 }
14729#line 14730 "parse.c"
14730 break;
14731
14732 case 365: /* primary: "'not'" '(' expr rparen */
14733#line 4457 "parse.y"
14734 {
14735 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14736 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14737 }
14738#line 14739 "parse.c"
14739 break;
14740
14741 case 366: /* primary: "'not'" '(' rparen */
14742#line 4462 "parse.y"
14743 {
14744 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14745 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14746 }
14747#line 14748 "parse.c"
14748 break;
14749
14750 case 367: /* primary: fcall brace_block */
14751#line 4467 "parse.y"
14752 {
14753 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14754 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14755 }
14756#line 14757 "parse.c"
14757 break;
14758
14759 case 369: /* primary: method_call brace_block */
14760#line 4473 "parse.y"
14761 {
14762 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14763 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14764 /*% ripper: method_add_block!($:call, $:block) %*/
14765 }
14766#line 14767 "parse.c"
14767 break;
14768
14769 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14770#line 4483 "parse.y"
14771 {
14772 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14773 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14774
14775 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14776 fixpos((yyval.node), (yyvsp[-4].node));
14777 /*% ripper: if!($:cond, $:body, $:tail) %*/
14778 }
14779#line 14780 "parse.c"
14780 break;
14781
14782 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14783#line 4495 "parse.y"
14784 {
14785 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14786 fixpos((yyval.node), (yyvsp[-4].node));
14787 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14788 }
14789#line 14790 "parse.c"
14790 break;
14791
14792 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14793#line 4503 "parse.y"
14794 {
14795 restore_block_exit(p, (yyvsp[-3].node_exits));
14796 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14797 fixpos((yyval.node), (yyvsp[-2].node));
14798 /*% ripper: while!($:cond, $:body) %*/
14799 }
14800#line 14801 "parse.c"
14801 break;
14802
14803 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14804#line 4512 "parse.y"
14805 {
14806 restore_block_exit(p, (yyvsp[-3].node_exits));
14807 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14808 fixpos((yyval.node), (yyvsp[-2].node));
14809 /*% ripper: until!($:cond, $:body) %*/
14810 }
14811#line 14812 "parse.c"
14812 break;
14813
14814 case 375: /* @16: %empty */
14815#line 4519 "parse.y"
14816 {
14817 (yyval.labels) = p->case_labels;
14818 p->case_labels = CHECK_LITERAL_WHEN;
14819 }
14820#line 14821 "parse.c"
14821 break;
14822
14823 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14824#line 4525 "parse.y"
14825 {
14826 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14827 p->case_labels = (yyvsp[-2].labels);
14828 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14829 fixpos((yyval.node), (yyvsp[-4].node));
14830 /*% ripper: case!($:expr, $:body) %*/
14831 }
14832#line 14833 "parse.c"
14833 break;
14834
14835 case 377: /* @17: %empty */
14836#line 4533 "parse.y"
14837 {
14838 (yyval.labels) = p->case_labels;
14839 p->case_labels = 0;
14840 }
14841#line 14842 "parse.c"
14842 break;
14843
14844 case 378: /* primary: k_case option_terms @17 case_body k_end */
14845#line 4539 "parse.y"
14846 {
14847 if (p->case_labels) st_free_table(p->case_labels);
14848 p->case_labels = (yyvsp[-2].labels);
14849 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14850 /*% ripper: case!(Qnil, $:body) %*/
14851 }
14852#line 14853 "parse.c"
14853 break;
14854
14855 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14856#line 4548 "parse.y"
14857 {
14858 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14859 /*% ripper: case!($:expr, $:body) %*/
14860 }
14861#line 14862 "parse.c"
14862 break;
14863
14864 case 380: /* $@18: %empty */
14865#line 4553 "parse.y"
14866 {COND_PUSH(1);}
14867#line 14868 "parse.c"
14868 break;
14869
14870 case 381: /* $@19: %empty */
14871#line 4553 "parse.y"
14872 {COND_POP();}
14873#line 14874 "parse.c"
14874 break;
14875
14876 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14877#line 4556 "parse.y"
14878 {
14879 restore_block_exit(p, (yyvsp[-8].node_exits));
14880 /*
14881 * for a, b, c in e
14882 * #=>
14883 * e.each{|*x| a, b, c = x}
14884 *
14885 * for a in e
14886 * #=>
14887 * e.each{|x| a, = x}
14888 */
14889 ID id = internal_id(p);
14890 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14891 rb_node_args_t *args;
14892 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14893 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14894 tbl->ids[0] = id; /* internal id */
14895
14896 switch (nd_type((yyvsp[-7].node))) {
14897 case NODE_LASGN:
14898 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14899 set_nd_value(p, (yyvsp[-7].node), internal_var);
14900 id = 0;
14901 m->nd_plen = 1;
14902 m->nd_next = (yyvsp[-7].node);
14903 break;
14904 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14905 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14906 break;
14907 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14908 m->nd_next = node_assign(p, (NODE *)NEW_MASGN(NEW_LIST((yyvsp[-7].node), &(yylsp[-7])), 0, &(yylsp[-7])), internal_var, NO_LEX_CTXT, &(yylsp[-7]));
14909 }
14910 /* {|*internal_id| <m> = internal_id; ... } */
14911 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
14912 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14913 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14914 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14915 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14916 fixpos((yyval.node), (yyvsp[-7].node));
14917 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14918 }
14919#line 14920 "parse.c"
14920 break;
14921
14922 case 383: /* $@20: %empty */
14923#line 4598 "parse.y"
14924 {
14925 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14926 }
14927#line 14928 "parse.c"
14928 break;
14929
14930 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14931#line 4603 "parse.y"
14932 {
14933 YYLTYPE inheritance_operator_loc = NULL_LOC;
14934 if ((yyvsp[-3].node)) {
14935 inheritance_operator_loc = (yylsp[-3]);
14936 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14937 }
14938 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14939 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14940 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14941 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14942 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14943 local_pop(p);
14944 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14945 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14946 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14947 }
14948#line 14949 "parse.c"
14949 break;
14950
14951 case 385: /* $@21: %empty */
14952#line 4620 "parse.y"
14953 {
14954 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14955 }
14956#line 14957 "parse.c"
14957 break;
14958
14959 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14960#line 4626 "parse.y"
14961 {
14962 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14963 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14964 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14965 fixpos((yyval.node), (yyvsp[-4].node));
14966 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14967 local_pop(p);
14968 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14969 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14970 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14971 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14972 }
14973#line 14974 "parse.c"
14974 break;
14975
14976 case 387: /* $@22: %empty */
14977#line 4639 "parse.y"
14978 {
14979 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14980 }
14981#line 14982 "parse.c"
14982 break;
14983
14984 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14985#line 4644 "parse.y"
14986 {
14987 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14988 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14989 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14990 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14991 /*% ripper: module!($:cpath, $:bodystmt) %*/
14992 local_pop(p);
14993 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14994 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14995 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14996 }
14997#line 14998 "parse.c"
14998 break;
14999
15000 case 389: /* $@23: %empty */
15001#line 4657 "parse.y"
15002 {
15003 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15004 }
15005#line 15006 "parse.c"
15006 break;
15007
15008 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
15009#line 4662 "parse.y"
15010 {
15011 restore_defun(p, (yyvsp[-4].node_def_temp));
15012 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15013 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15014 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
15015 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
15016 local_pop(p);
15017 }
15018#line 15019 "parse.c"
15019 break;
15020
15021 case 391: /* $@24: %empty */
15022#line 4672 "parse.y"
15023 {
15024 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15025 }
15026#line 15027 "parse.c"
15027 break;
15028
15029 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
15030#line 4677 "parse.y"
15031 {
15032 restore_defun(p, (yyvsp[-4].node_def_temp));
15033 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15034 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15035 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
15036 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
15037 local_pop(p);
15038 }
15039#line 15040 "parse.c"
15040 break;
15041
15042 case 393: /* primary: "'break'" */
15043#line 4686 "parse.y"
15044 {
15045 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
15046 /*% ripper: break!(args_new!) %*/
15047 }
15048#line 15049 "parse.c"
15049 break;
15050
15051 case 394: /* primary: "'next'" */
15052#line 4691 "parse.y"
15053 {
15054 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
15055 /*% ripper: next!(args_new!) %*/
15056 }
15057#line 15058 "parse.c"
15058 break;
15059
15060 case 395: /* primary: "'redo'" */
15061#line 4696 "parse.y"
15062 {
15063 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
15064 /*% ripper: redo! %*/
15065 }
15066#line 15067 "parse.c"
15067 break;
15068
15069 case 396: /* primary: "'retry'" */
15070#line 4701 "parse.y"
15071 {
15072 if (!p->ctxt.in_defined) {
15073 switch (p->ctxt.in_rescue) {
15074 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
15075 case after_rescue: /* ok */ break;
15076 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
15077 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
15078 }
15079 }
15080 (yyval.node) = NEW_RETRY(&(yyloc));
15081 /*% ripper: retry! %*/
15082 }
15083#line 15084 "parse.c"
15084 break;
15085
15086 case 397: /* value_expr_primary: primary */
15087#line 3153 "parse.y"
15088 {
15089 value_expr(p, (yyvsp[0].node));
15090 (yyval.node) = (yyvsp[0].node);
15091 }
15092#line 15093 "parse.c"
15093 break;
15094
15095 case 399: /* k_begin: "'begin'" */
15096#line 4719 "parse.y"
15097 {
15098 token_info_push(p, "begin", &(yyloc));
15099 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15100 }
15101#line 15102 "parse.c"
15102 break;
15103
15104 case 400: /* k_if: "'if'" */
15105#line 4726 "parse.y"
15106 {
15107 WARN_EOL("if");
15108 token_info_push(p, "if", &(yyloc));
15109 if (p->token_info && p->token_info->nonspc &&
15110 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
15111 const char *tok = p->lex.ptok - rb_strlen_lit("if");
15112 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
15113 beg += rb_strlen_lit("else");
15114 while (beg < tok && ISSPACE(*beg)) beg++;
15115 if (beg == tok) {
15116 p->token_info->nonspc = 0;
15117 }
15118 }
15119 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15120 }
15121#line 15122 "parse.c"
15122 break;
15123
15124 case 401: /* k_unless: "'unless'" */
15125#line 4744 "parse.y"
15126 {
15127 token_info_push(p, "unless", &(yyloc));
15128 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15129 }
15130#line 15131 "parse.c"
15131 break;
15132
15133 case 402: /* k_while: "'while'" allow_exits */
15134#line 4751 "parse.y"
15135 {
15136 (yyval.node_exits) = (yyvsp[0].node_exits);
15137 token_info_push(p, "while", &(yyloc));
15138 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15139 }
15140#line 15141 "parse.c"
15141 break;
15142
15143 case 403: /* k_until: "'until'" allow_exits */
15144#line 4759 "parse.y"
15145 {
15146 (yyval.node_exits) = (yyvsp[0].node_exits);
15147 token_info_push(p, "until", &(yyloc));
15148 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15149 }
15150#line 15151 "parse.c"
15151 break;
15152
15153 case 404: /* k_case: "'case'" */
15154#line 4767 "parse.y"
15155 {
15156 token_info_push(p, "case", &(yyloc));
15157 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15158 }
15159#line 15160 "parse.c"
15160 break;
15161
15162 case 405: /* k_for: "'for'" allow_exits */
15163#line 4774 "parse.y"
15164 {
15165 (yyval.node_exits) = (yyvsp[0].node_exits);
15166 token_info_push(p, "for", &(yyloc));
15167 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15168 }
15169#line 15170 "parse.c"
15170 break;
15171
15172 case 406: /* k_class: "'class'" */
15173#line 4782 "parse.y"
15174 {
15175 token_info_push(p, "class", &(yyloc));
15176 (yyval.ctxt) = p->ctxt;
15177 p->ctxt.in_rescue = before_rescue;
15178 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15179 }
15180#line 15181 "parse.c"
15181 break;
15182
15183 case 407: /* k_module: "'module'" */
15184#line 4791 "parse.y"
15185 {
15186 token_info_push(p, "module", &(yyloc));
15187 (yyval.ctxt) = p->ctxt;
15188 p->ctxt.in_rescue = before_rescue;
15189 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15190 }
15191#line 15192 "parse.c"
15192 break;
15193
15194 case 408: /* k_def: "'def'" */
15195#line 4800 "parse.y"
15196 {
15197 token_info_push(p, "def", &(yyloc));
15198 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15199 p->ctxt.in_argdef = 1;
15200 }
15201#line 15202 "parse.c"
15202 break;
15203
15204 case 409: /* k_do: "'do'" */
15205#line 4808 "parse.y"
15206 {
15207 token_info_push(p, "do", &(yyloc));
15208 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15209 }
15210#line 15211 "parse.c"
15211 break;
15212
15213 case 410: /* k_do_block: "'do' for block" */
15214#line 4815 "parse.y"
15215 {
15216 token_info_push(p, "do", &(yyloc));
15217 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15218 }
15219#line 15220 "parse.c"
15220 break;
15221
15222 case 411: /* k_rescue: "'rescue'" */
15223#line 4822 "parse.y"
15224 {
15225 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15226 (yyval.ctxt) = p->ctxt;
15227 p->ctxt.in_rescue = after_rescue;
15228 }
15229#line 15230 "parse.c"
15230 break;
15231
15232 case 412: /* k_ensure: "'ensure'" */
15233#line 4830 "parse.y"
15234 {
15235 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15236 (yyval.ctxt) = p->ctxt;
15237 }
15238#line 15239 "parse.c"
15239 break;
15240
15241 case 413: /* k_when: "'when'" */
15242#line 4837 "parse.y"
15243 {
15244 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15245 }
15246#line 15247 "parse.c"
15247 break;
15248
15249 case 414: /* k_else: "'else'" */
15250#line 4843 "parse.y"
15251 {
15252 token_info *ptinfo_beg = p->token_info;
15253 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15254 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15255 if (same) {
15256 token_info e;
15257 e.next = ptinfo_beg->next;
15258 e.token = "else";
15259 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15260 if (!e.nonspc) *ptinfo_beg = e;
15261 }
15262 }
15263#line 15264 "parse.c"
15264 break;
15265
15266 case 415: /* k_elsif: "'elsif'" */
15267#line 4858 "parse.y"
15268 {
15269 WARN_EOL("elsif");
15270 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15271 }
15272#line 15273 "parse.c"
15273 break;
15274
15275 case 416: /* k_end: "'end'" */
15276#line 4865 "parse.y"
15277 {
15278 token_info_pop(p, "end", &(yyloc));
15279 pop_end_expect_token_locations(p);
15280 }
15281#line 15282 "parse.c"
15282 break;
15283
15284 case 417: /* k_end: "dummy end" */
15285#line 4870 "parse.y"
15286 {
15287 compile_error(p, "syntax error, unexpected end-of-input");
15288 }
15289#line 15290 "parse.c"
15290 break;
15291
15292 case 418: /* k_return: "'return'" */
15293#line 4876 "parse.y"
15294 {
15295 if (p->ctxt.cant_return && !dyna_in_block(p))
15296 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15297 }
15298#line 15299 "parse.c"
15299 break;
15300
15301 case 419: /* k_yield: "'yield'" */
15302#line 4883 "parse.y"
15303 {
15304 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15305 yyerror1(&(yylsp[0]), "Invalid yield");
15306 }
15307#line 15308 "parse.c"
15308 break;
15309
15310 case 424: /* do: "'do' for condition" */
15311#line 4895 "parse.y"
15312 { (yyval.id) = keyword_do_cond; }
15313#line 15314 "parse.c"
15314 break;
15315
15316 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15317#line 4902 "parse.y"
15318 {
15319 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15320 fixpos((yyval.node), (yyvsp[-3].node));
15321 /*% ripper: elsif!($:2, $:4, $:5) %*/
15322 }
15323#line 15324 "parse.c"
15324 break;
15325
15326 case 428: /* opt_else: k_else compstmt_stmts */
15327#line 4911 "parse.y"
15328 {
15329 (yyval.node) = (yyvsp[0].node);
15330 /*% ripper: else!($:2) %*/
15331 }
15332#line 15333 "parse.c"
15333 break;
15334
15335 case 431: /* f_marg: f_norm_arg */
15336#line 4922 "parse.y"
15337 {
15338 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15339 mark_lvar_used(p, (yyval.node));
15340 }
15341#line 15342 "parse.c"
15342 break;
15343
15344 case 432: /* f_marg: "(" f_margs rparen */
15345#line 4927 "parse.y"
15346 {
15347 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15348 /*% ripper: mlhs_paren!($:2) %*/
15349 }
15350#line 15351 "parse.c"
15351 break;
15352
15353 case 433: /* mlhs_items_f_marg: f_marg */
15354#line 3040 "parse.y"
15355 {
15356 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15357 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15358 }
15359#line 15360 "parse.c"
15360 break;
15361
15362 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15363#line 3045 "parse.y"
15364 {
15365 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15366 /*% ripper: mlhs_add!($:1, $:3) %*/
15367 }
15368#line 15369 "parse.c"
15369 break;
15370
15371 case 435: /* f_margs: mlhs_items_f_marg */
15372#line 4935 "parse.y"
15373 {
15374 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15375 /*% ripper: $:1 %*/
15376 }
15377#line 15378 "parse.c"
15378 break;
15379
15380 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15381#line 4940 "parse.y"
15382 {
15383 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15384 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15385 }
15386#line 15387 "parse.c"
15387 break;
15388
15389 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15390#line 4945 "parse.y"
15391 {
15392 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15393 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15394 }
15395#line 15396 "parse.c"
15396 break;
15397
15398 case 438: /* f_margs: f_rest_marg */
15399#line 4950 "parse.y"
15400 {
15401 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15402 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15403 }
15404#line 15405 "parse.c"
15405 break;
15406
15407 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15408#line 4955 "parse.y"
15409 {
15410 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15411 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15412 }
15413#line 15414 "parse.c"
15414 break;
15415
15416 case 440: /* f_rest_marg: "*" f_norm_arg */
15417#line 4962 "parse.y"
15418 {
15419 /*% ripper: $:2 %*/
15420 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15421 mark_lvar_used(p, (yyval.node));
15422 }
15423#line 15424 "parse.c"
15424 break;
15425
15426 case 441: /* f_rest_marg: "*" */
15427#line 4968 "parse.y"
15428 {
15429 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15430 /*% ripper: Qnil %*/
15431 }
15432#line 15433 "parse.c"
15433 break;
15434
15435 case 443: /* f_any_kwrest: f_no_kwarg */
15436#line 4976 "parse.y"
15437 {
15438 (yyval.id) = idNil;
15439 /*% ripper: ID2VAL(idNil) %*/
15440 }
15441#line 15442 "parse.c"
15442 break;
15443
15444 case 444: /* $@25: %empty */
15445#line 4982 "parse.y"
15446 {p->ctxt.in_argdef = 0;}
15447#line 15448 "parse.c"
15448 break;
15449
15450 case 446: /* f_kw_primary_value: f_label primary_value */
15451#line 3012 "parse.y"
15452 {
15453 p->ctxt.in_argdef = 1;
15454 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15455 /*% ripper: [$:$, $:value] %*/
15456 }
15457#line 15458 "parse.c"
15458 break;
15459
15460 case 447: /* f_kw_primary_value: f_label */
15461#line 3018 "parse.y"
15462 {
15463 p->ctxt.in_argdef = 1;
15464 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15465 /*% ripper: [$:$, 0] %*/
15466 }
15467#line 15468 "parse.c"
15468 break;
15469
15470 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15471#line 3027 "parse.y"
15472 {
15473 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15474 /*% ripper: rb_ary_new3(1, $:1) %*/
15475 }
15476#line 15477 "parse.c"
15477 break;
15478
15479 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15480#line 3032 "parse.y"
15481 {
15482 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15483 /*% ripper: rb_ary_push($:1, $:3) %*/
15484 }
15485#line 15486 "parse.c"
15486 break;
15487
15488 case 450: /* opt_f_block_arg_none: ',' f_block_arg */
15489#line 2949 "parse.y"
15490 {
15491 (yyval.id) = (yyvsp[0].id);
15492 /*% ripper: $:2 %*/
15493 }
15494#line 15495 "parse.c"
15495 break;
15496
15497 case 452: /* args_tail_basic_primary_value_none: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg_none */
15498#line 2926 "parse.y"
15499 {
15500 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15501 /*% ripper: [$:1, $:3, $:4] %*/
15502 }
15503#line 15504 "parse.c"
15504 break;
15505
15506 case 453: /* args_tail_basic_primary_value_none: f_kwarg_primary_value opt_f_block_arg_none */
15507#line 2931 "parse.y"
15508 {
15509 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15510 /*% ripper: [$:1, Qnil, $:2] %*/
15511 }
15512#line 15513 "parse.c"
15513 break;
15514
15515 case 454: /* args_tail_basic_primary_value_none: f_any_kwrest opt_f_block_arg_none */
15516#line 2936 "parse.y"
15517 {
15518 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15519 /*% ripper: [Qnil, $:1, $:2] %*/
15520 }
15521#line 15522 "parse.c"
15522 break;
15523
15524 case 455: /* args_tail_basic_primary_value_none: f_block_arg */
15525#line 2941 "parse.y"
15526 {
15527 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15528 /*% ripper: [Qnil, Qnil, $:1] %*/
15529 }
15530#line 15531 "parse.c"
15531 break;
15532
15533 case 457: /* excessed_comma: ',' */
15534#line 4988 "parse.y"
15535 {
15536 /* magic number for rest_id in iseq_set_arguments() */
15537 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15538 /*% ripper: excessed_comma! %*/
15539 }
15540#line 15541 "parse.c"
15541 break;
15542
15543 case 458: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15544#line 2990 "parse.y"
15545 {
15546 p->ctxt.in_argdef = 1;
15547 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15548 /*% ripper: [$:$, $:3] %*/
15549 }
15550#line 15551 "parse.c"
15551 break;
15552
15553 case 459: /* f_opt_arg_primary_value: f_opt_primary_value */
15554#line 2999 "parse.y"
15555 {
15556 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15557 /*% ripper: rb_ary_new3(1, $:1) %*/
15558 }
15559#line 15560 "parse.c"
15560 break;
15561
15562 case 460: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15563#line 3004 "parse.y"
15564 {
15565 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15566 /*% ripper: rb_ary_push($:1, $:3) %*/
15567 }
15568#line 15569 "parse.c"
15569 break;
15570
15571 case 461: /* opt_args_tail_block_args_tail_none: ',' block_args_tail */
15572#line 3099 "parse.y"
15573 {
15574 (yyval.node_args) = (yyvsp[0].node_args);
15575 /*% ripper: $:tail %*/
15576 }
15577#line 15578 "parse.c"
15578 break;
15579
15580 case 462: /* opt_args_tail_block_args_tail_none: none */
15581#line 3104 "parse.y"
15582 {
15583 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15584 /*% ripper: [Qnil, Qnil, Qnil] %*/
15585 }
15586#line 15587 "parse.c"
15587 break;
15588
15589 case 463: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15590#line 6269 "parse.y"
15591 {
15592 (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));
15593 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15594 }
15595#line 15596 "parse.c"
15596 break;
15597
15598 case 464: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15599#line 6274 "parse.y"
15600 {
15601 (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));
15602 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15603 }
15604#line 15605 "parse.c"
15605 break;
15606
15607 case 465: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15608#line 6279 "parse.y"
15609 {
15610 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15611 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15612 }
15613#line 15614 "parse.c"
15614 break;
15615
15616 case 466: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15617#line 6284 "parse.y"
15618 {
15619 (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));
15620 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15621 }
15622#line 15623 "parse.c"
15623 break;
15624
15625 case 467: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg opt_args_tail_block_args_tail_none */
15626#line 6289 "parse.y"
15627 {
15628 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15629 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15630 }
15631#line 15632 "parse.c"
15632 break;
15633
15634 case 468: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15635#line 6294 "parse.y"
15636 {
15637 (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));
15638 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15639 }
15640#line 15641 "parse.c"
15641 break;
15642
15643 case 469: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15644#line 6299 "parse.y"
15645 {
15646 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15647 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15648 }
15649#line 15650 "parse.c"
15650 break;
15651
15652 case 470: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15653#line 6304 "parse.y"
15654 {
15655 (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));
15656 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15657 }
15658#line 15659 "parse.c"
15659 break;
15660
15661 case 471: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15662#line 6309 "parse.y"
15663 {
15664 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15665 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15666 }
15667#line 15668 "parse.c"
15668 break;
15669
15670 case 472: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15671#line 6314 "parse.y"
15672 {
15673 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15674 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15675 }
15676#line 15677 "parse.c"
15677 break;
15678
15679 case 473: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg opt_args_tail_block_args_tail_none */
15680#line 6319 "parse.y"
15681 {
15682 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15683 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15684 }
15685#line 15686 "parse.c"
15686 break;
15687
15688 case 474: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15689#line 6324 "parse.y"
15690 {
15691 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15692 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15693 }
15694#line 15695 "parse.c"
15695 break;
15696
15697 case 476: /* block_param: f_arg excessed_comma */
15698#line 4997 "parse.y"
15699 {
15700 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15701 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15702 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15703 }
15704#line 15705 "parse.c"
15705 break;
15706
15707 case 477: /* block_param: f_arg opt_args_tail_block_args_tail_none */
15708#line 5003 "parse.y"
15709 {
15710 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15711 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15712 }
15713#line 15714 "parse.c"
15714 break;
15715
15716 case 478: /* tail-only-args_block_args_tail: block_args_tail */
15717#line 6332 "parse.y"
15718 {
15719 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15720 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15721 }
15722#line 15723 "parse.c"
15723 break;
15724
15725 case 481: /* opt_block_param_def: block_param_def */
15726#line 5012 "parse.y"
15727 {
15728 p->command_start = TRUE;
15729 }
15730#line 15731 "parse.c"
15731 break;
15732
15733 case 482: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15734#line 5018 "parse.y"
15735 {
15736 p->max_numparam = ORDINAL_PARAM;
15737 p->ctxt.in_argdef = 0;
15738 (yyval.node_args) = (yyvsp[-2].node_args);
15739 /*% ripper: block_var!($:2, $:3) %*/
15740 }
15741#line 15742 "parse.c"
15742 break;
15743
15744 case 483: /* opt_block_param: %empty */
15745#line 5027 "parse.y"
15746 {
15747 (yyval.node_args) = 0;
15748 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15749 }
15750#line 15751 "parse.c"
15751 break;
15752
15753 case 485: /* opt_bv_decl: option_'\n' */
15754#line 5035 "parse.y"
15755 {
15756 (yyval.id) = 0;
15757 /*% ripper: Qfalse %*/
15758 }
15759#line 15760 "parse.c"
15760 break;
15761
15762 case 486: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15763#line 5040 "parse.y"
15764 {
15765 (yyval.id) = 0;
15766 /*% ripper: $:3 %*/
15767 }
15768#line 15769 "parse.c"
15769 break;
15770
15771 case 489: /* bvar: "local variable or method" */
15772#line 5053 "parse.y"
15773 {
15774 new_bv(p, (yyvsp[0].id));
15775 /*% ripper: $:1 %*/
15776 }
15777#line 15778 "parse.c"
15778 break;
15779
15780 case 491: /* max_numparam: %empty */
15781#line 5060 "parse.y"
15782 {
15783 (yyval.num) = p->max_numparam;
15784 p->max_numparam = 0;
15785 }
15786#line 15787 "parse.c"
15787 break;
15788
15789 case 492: /* numparam: %empty */
15790#line 5066 "parse.y"
15791 {
15792 (yyval.node) = numparam_push(p);
15793 }
15794#line 15795 "parse.c"
15795 break;
15796
15797 case 493: /* it_id: %empty */
15798#line 5071 "parse.y"
15799 {
15800 (yyval.id) = p->it_id;
15801 p->it_id = 0;
15802 }
15803#line 15804 "parse.c"
15804 break;
15805
15806 case 494: /* @26: %empty */
15807#line 5078 "parse.y"
15808 {
15809 token_info_push(p, "->", &(yylsp[0]));
15810 (yyval.vars) = dyna_push(p);
15811 }
15812#line 15813 "parse.c"
15813 break;
15814
15815 case 495: /* $@27: %empty */
15816#line 5084 "parse.y"
15817 {
15818 CMDARG_PUSH(0);
15819 }
15820#line 15821 "parse.c"
15821 break;
15822
15823 case 496: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15824#line 5088 "parse.y"
15825 {
15826 int max_numparam = p->max_numparam;
15827 ID it_id = p->it_id;
15828 p->lex.lpar_beg = (yyvsp[-8].num);
15829 p->max_numparam = (yyvsp[-6].num);
15830 p->it_id = (yyvsp[-4].id);
15831 restore_block_exit(p, (yyvsp[-3].node_exits));
15832 CMDARG_POP();
15833 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15834 {
15835 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15836 (yyval.node) = NEW_LAMBDA((yyvsp[-2].node_args), (yyvsp[0].locations_lambda_body)->node, &loc, &(yylsp[-8]), &(yyvsp[0].locations_lambda_body)->opening_loc, &(yyvsp[0].locations_lambda_body)->closing_loc);
15837 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15838 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15839 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15840 xfree((yyvsp[0].locations_lambda_body));
15841 }
15842 /*% ripper: lambda!($:args, $:body) %*/
15843 numparam_pop(p, (yyvsp[-5].node));
15844 dyna_pop(p, (yyvsp[-7].vars));
15845 }
15846#line 15847 "parse.c"
15847 break;
15848
15849 case 497: /* f_larglist: '(' f_largs opt_bv_decl ')' */
15850#line 5112 "parse.y"
15851 {
15852 p->ctxt.in_argdef = 0;
15853 (yyval.node_args) = (yyvsp[-2].node_args);
15854 p->max_numparam = ORDINAL_PARAM;
15855 /*% ripper: paren!($:args) %*/
15856 }
15857#line 15858 "parse.c"
15858 break;
15859
15860 case 498: /* f_larglist: f_largs */
15861#line 5119 "parse.y"
15862 {
15863 p->ctxt.in_argdef = 0;
15864 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15865 p->max_numparam = ORDINAL_PARAM;
15866 (yyval.node_args) = (yyvsp[0].node_args);
15867 }
15868#line 15869 "parse.c"
15869 break;
15870
15871 case 499: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15872#line 5128 "parse.y"
15873 {
15874 token_info_pop(p, "}", &(yylsp[0]));
15875 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15876 /*% ripper: $:2 %*/
15877 }
15878#line 15879 "parse.c"
15879 break;
15880
15881 case 500: /* $@28: %empty */
15882#line 5134 "parse.y"
15883 {
15884 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15885 }
15886#line 15887 "parse.c"
15887 break;
15888
15889 case 501: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15890#line 5138 "parse.y"
15891 {
15892 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15893 /*% ripper: $:3 %*/
15894 }
15895#line 15896 "parse.c"
15896 break;
15897
15898 case 502: /* do_block: k_do_block do_body k_end */
15899#line 5145 "parse.y"
15900 {
15901 (yyval.node) = (yyvsp[-1].node);
15902 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15903 /*% ripper: $:2 %*/
15904 }
15905#line 15906 "parse.c"
15906 break;
15907
15908 case 503: /* block_call: command do_block */
15909#line 5153 "parse.y"
15910 {
15911 (yyval.node) = command_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15912 fixpos((yyval.node), (yyvsp[-1].node));
15913 /*% ripper: method_add_block!($:1, $:2) %*/
15914 }
15915#line 15916 "parse.c"
15916 break;
15917
15918 case 504: /* block_call: block_call call_op2 operation2 opt_paren_args */
15919#line 5159 "parse.y"
15920 {
15921 bool has_args = (yyvsp[0].node) != 0;
15922 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15923 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15924 /*% ripper: call!($:1, $:2, $:3) %*/
15925 if (has_args) {
15926 /*% ripper: method_add_arg!($:$, $:4) %*/
15927 }
15928 }
15929#line 15930 "parse.c"
15930 break;
15931
15932 case 505: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15933#line 5169 "parse.y"
15934 {
15935 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15936 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15937 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15938 }
15939#line 15940 "parse.c"
15940 break;
15941
15942 case 506: /* block_call: block_call call_op2 operation2 command_args do_block */
15943#line 5175 "parse.y"
15944 {
15945 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15946 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15947 }
15948#line 15949 "parse.c"
15949 break;
15950
15951 case 507: /* block_call: block_call call_op2 paren_args */
15952#line 5180 "parse.y"
15953 {
15954 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15955 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15956 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15957 }
15958#line 15959 "parse.c"
15959 break;
15960
15961 case 508: /* method_call: fcall paren_args */
15962#line 5188 "parse.y"
15963 {
15964 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15965 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15966 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15967 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15968 }
15969#line 15970 "parse.c"
15970 break;
15971
15972 case 509: /* method_call: primary_value call_op operation2 opt_paren_args */
15973#line 5195 "parse.y"
15974 {
15975 bool has_args = (yyvsp[0].node) != 0;
15976 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15977 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15978 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15979 /*% ripper: call!($:1, $:2, $:3) %*/
15980 if (has_args) {
15981 /*% ripper: method_add_arg!($:$, $:4) %*/
15982 }
15983 }
15984#line 15985 "parse.c"
15985 break;
15986
15987 case 510: /* method_call: primary_value "::" operation2 paren_args */
15988#line 5206 "parse.y"
15989 {
15990 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15991 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15992 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15993 }
15994#line 15995 "parse.c"
15995 break;
15996
15997 case 511: /* method_call: primary_value "::" operation3 */
15998#line 5212 "parse.y"
15999 {
16000 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
16001 /*% ripper: call!($:1, $:2, $:3) %*/
16002 }
16003#line 16004 "parse.c"
16004 break;
16005
16006 case 512: /* method_call: primary_value call_op2 paren_args */
16007#line 5217 "parse.y"
16008 {
16009 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16010 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16011 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16012 }
16013#line 16014 "parse.c"
16014 break;
16015
16016 case 513: /* method_call: "'super'" paren_args */
16017#line 5223 "parse.y"
16018 {
16019 rb_code_location_t lparen_loc = (yylsp[0]);
16020 rb_code_location_t rparen_loc = (yylsp[0]);
16021 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
16022 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
16023
16024 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
16025 /*% ripper: super!($:2) %*/
16026 }
16027#line 16028 "parse.c"
16028 break;
16029
16030 case 514: /* method_call: "'super'" */
16031#line 5233 "parse.y"
16032 {
16033 (yyval.node) = NEW_ZSUPER(&(yyloc));
16034 /*% ripper: zsuper! %*/
16035 }
16036#line 16037 "parse.c"
16037 break;
16038
16039 case 515: /* method_call: primary_value '[' opt_call_args rbracket */
16040#line 5238 "parse.y"
16041 {
16042 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
16043 fixpos((yyval.node), (yyvsp[-3].node));
16044 /*% ripper: aref!($:1, $:3) %*/
16045 }
16046#line 16047 "parse.c"
16047 break;
16048
16049 case 516: /* brace_block: '{' brace_body '}' */
16050#line 5246 "parse.y"
16051 {
16052 (yyval.node) = (yyvsp[-1].node);
16053 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16054 /*% ripper: $:2 %*/
16055 }
16056#line 16057 "parse.c"
16057 break;
16058
16059 case 517: /* brace_block: k_do do_body k_end */
16060#line 5252 "parse.y"
16061 {
16062 (yyval.node) = (yyvsp[-1].node);
16063 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16064 /*% ripper: $:2 %*/
16065 }
16066#line 16067 "parse.c"
16067 break;
16068
16069 case 518: /* @29: %empty */
16070#line 5259 "parse.y"
16071 {(yyval.vars) = dyna_push(p);}
16072#line 16073 "parse.c"
16073 break;
16074
16075 case 519: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
16076#line 5262 "parse.y"
16077 {
16078 int max_numparam = p->max_numparam;
16079 ID it_id = p->it_id;
16080 p->max_numparam = (yyvsp[-5].num);
16081 p->it_id = (yyvsp[-3].id);
16082 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16083 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16084 /*% ripper: brace_block!($:args, $:compstmt) %*/
16085 restore_block_exit(p, (yyvsp[-2].node_exits));
16086 numparam_pop(p, (yyvsp[-4].node));
16087 dyna_pop(p, (yyvsp[-6].vars));
16088 }
16089#line 16090 "parse.c"
16090 break;
16091
16092 case 520: /* @30: %empty */
16093#line 5276 "parse.y"
16094 {
16095 (yyval.vars) = dyna_push(p);
16096 CMDARG_PUSH(0);
16097 }
16098#line 16099 "parse.c"
16099 break;
16100
16101 case 521: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
16102#line 5282 "parse.y"
16103 {
16104 int max_numparam = p->max_numparam;
16105 ID it_id = p->it_id;
16106 p->max_numparam = (yyvsp[-5].num);
16107 p->it_id = (yyvsp[-3].id);
16108 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16109 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16110 /*% ripper: do_block!($:args, $:bodystmt) %*/
16111 CMDARG_POP();
16112 restore_block_exit(p, (yyvsp[-2].node_exits));
16113 numparam_pop(p, (yyvsp[-4].node));
16114 dyna_pop(p, (yyvsp[-6].vars));
16115 }
16116#line 16117 "parse.c"
16117 break;
16118
16119 case 522: /* case_args: arg_value */
16120#line 5298 "parse.y"
16121 {
16122 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16123 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16124 /*% ripper: args_add!(args_new!, $:arg_value) %*/
16125 }
16126#line 16127 "parse.c"
16127 break;
16128
16129 case 523: /* case_args: "*" arg_value */
16130#line 5304 "parse.y"
16131 {
16132 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16133 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16134 }
16135#line 16136 "parse.c"
16136 break;
16137
16138 case 524: /* case_args: case_args ',' arg_value */
16139#line 5309 "parse.y"
16140 {
16141 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16142 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16143 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16144 }
16145#line 16146 "parse.c"
16146 break;
16147
16148 case 525: /* case_args: case_args ',' "*" arg_value */
16149#line 5315 "parse.y"
16150 {
16151 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16152 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16153 }
16154#line 16155 "parse.c"
16155 break;
16156
16157 case 526: /* case_body: k_when case_args then compstmt_stmts cases */
16158#line 5324 "parse.y"
16159 {
16160 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16161 fixpos((yyval.node), (yyvsp[-3].node));
16162 /*% ripper: when!($:2, $:4, $:5) %*/
16163 }
16164#line 16165 "parse.c"
16165 break;
16166
16167 case 529: /* p_pvtbl: %empty */
16168#line 5335 "parse.y"
16169 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16170#line 16171 "parse.c"
16171 break;
16172
16173 case 530: /* p_pktbl: %empty */
16174#line 5336 "parse.y"
16175 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16176#line 16177 "parse.c"
16177 break;
16178
16179 case 531: /* p_in_kwarg: %empty */
16180#line 5338 "parse.y"
16181 {
16182 (yyval.ctxt) = p->ctxt;
16183 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16184 p->command_start = FALSE;
16185 p->ctxt.in_kwarg = 1;
16186 p->ctxt.in_alt_pattern = 0;
16187 p->ctxt.capture_in_pattern = 0;
16188 }
16189#line 16190 "parse.c"
16190 break;
16191
16192 case 532: /* $@31: %empty */
16193#line 5351 "parse.y"
16194 {
16195 pop_pktbl(p, (yyvsp[-2].tbl));
16196 pop_pvtbl(p, (yyvsp[-3].tbl));
16197 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16198 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16199 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16200 }
16201#line 16202 "parse.c"
16202 break;
16203
16204 case 533: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16205#line 5360 "parse.y"
16206 {
16207 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16208 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16209 }
16210#line 16211 "parse.c"
16211 break;
16212
16213 case 537: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16214#line 5372 "parse.y"
16215 {
16216 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16217 fixpos((yyval.node), (yyvsp[0].node));
16218 /*% ripper: if_mod!($:3, $:1) %*/
16219 }
16220#line 16221 "parse.c"
16221 break;
16222
16223 case 538: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16224#line 5378 "parse.y"
16225 {
16226 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16227 fixpos((yyval.node), (yyvsp[0].node));
16228 /*% ripper: unless_mod!($:3, $:1) %*/
16229 }
16230#line 16231 "parse.c"
16231 break;
16232
16233 case 540: /* p_top_expr_body: p_expr ',' */
16234#line 5387 "parse.y"
16235 {
16236 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16237 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16238 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16239 }
16240#line 16241 "parse.c"
16241 break;
16242
16243 case 541: /* p_top_expr_body: p_expr ',' p_args */
16244#line 5393 "parse.y"
16245 {
16246 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16247 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16248 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16249 }
16250#line 16251 "parse.c"
16251 break;
16252
16253 case 542: /* p_top_expr_body: p_find */
16254#line 5399 "parse.y"
16255 {
16256 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16257 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16258 }
16259#line 16260 "parse.c"
16260 break;
16261
16262 case 543: /* p_top_expr_body: p_args_tail */
16263#line 5404 "parse.y"
16264 {
16265 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16266 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16267 }
16268#line 16269 "parse.c"
16269 break;
16270
16271 case 544: /* p_top_expr_body: p_kwargs */
16272#line 5409 "parse.y"
16273 {
16274 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16275 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16276 }
16277#line 16278 "parse.c"
16278 break;
16279
16280 case 546: /* p_as: p_expr "=>" p_variable */
16281#line 5419 "parse.y"
16282 {
16283 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16284 n = list_append(p, n, (yyvsp[0].node));
16285 (yyval.node) = new_hash(p, n, &(yyloc));
16286 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16287 }
16288#line 16289 "parse.c"
16289 break;
16290
16291 case 548: /* $@32: %empty */
16292#line 5429 "parse.y"
16293 {
16294 p->ctxt.in_alt_pattern = 1;
16295 }
16296#line 16297 "parse.c"
16297 break;
16298
16299 case 549: /* p_alt: p_alt '|' $@32 p_expr_basic */
16300#line 5433 "parse.y"
16301 {
16302 if (p->ctxt.capture_in_pattern) {
16303 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16304 }
16305 p->ctxt.in_alt_pattern = 0;
16306 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16307 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16308 }
16309#line 16310 "parse.c"
16310 break;
16311
16312 case 551: /* p_lparen: '(' p_pktbl */
16313#line 5445 "parse.y"
16314 {
16315 (yyval.tbl) = (yyvsp[0].tbl);
16316 /*% ripper: $:2 %*/
16317 }
16318#line 16319 "parse.c"
16319 break;
16320
16321 case 552: /* p_lbracket: '[' p_pktbl */
16322#line 5452 "parse.y"
16323 {
16324 (yyval.tbl) = (yyvsp[0].tbl);
16325 /*% ripper: $:2 %*/
16326 }
16327#line 16328 "parse.c"
16328 break;
16329
16330 case 555: /* p_expr_basic: p_const p_lparen p_args rparen */
16331#line 5461 "parse.y"
16332 {
16333 pop_pktbl(p, (yyvsp[-2].tbl));
16334 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16335 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16336 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16337 }
16338#line 16339 "parse.c"
16339 break;
16340
16341 case 556: /* p_expr_basic: p_const p_lparen p_find rparen */
16342#line 5468 "parse.y"
16343 {
16344 pop_pktbl(p, (yyvsp[-2].tbl));
16345 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16346 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16347 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16348 }
16349#line 16350 "parse.c"
16350 break;
16351
16352 case 557: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16353#line 5475 "parse.y"
16354 {
16355 pop_pktbl(p, (yyvsp[-2].tbl));
16356 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16357 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16358 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16359 }
16360#line 16361 "parse.c"
16361 break;
16362
16363 case 558: /* p_expr_basic: p_const '(' rparen */
16364#line 5482 "parse.y"
16365 {
16366 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16367 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16368 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16369 }
16370#line 16371 "parse.c"
16371 break;
16372
16373 case 559: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16374#line 5488 "parse.y"
16375 {
16376 pop_pktbl(p, (yyvsp[-2].tbl));
16377 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16378 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16379 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16380 }
16381#line 16382 "parse.c"
16382 break;
16383
16384 case 560: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16385#line 5495 "parse.y"
16386 {
16387 pop_pktbl(p, (yyvsp[-2].tbl));
16388 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16389 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16390 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16391 }
16392#line 16393 "parse.c"
16393 break;
16394
16395 case 561: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16396#line 5502 "parse.y"
16397 {
16398 pop_pktbl(p, (yyvsp[-2].tbl));
16399 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16400 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16401 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16402 }
16403#line 16404 "parse.c"
16404 break;
16405
16406 case 562: /* p_expr_basic: p_const '[' rbracket */
16407#line 5509 "parse.y"
16408 {
16409 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16410 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16411 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16412 }
16413#line 16414 "parse.c"
16414 break;
16415
16416 case 563: /* p_expr_basic: "[" p_args rbracket */
16417#line 5515 "parse.y"
16418 {
16419 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16420 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16421 }
16422#line 16423 "parse.c"
16423 break;
16424
16425 case 564: /* p_expr_basic: "[" p_find rbracket */
16426#line 5520 "parse.y"
16427 {
16428 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16429 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16430 }
16431#line 16432 "parse.c"
16432 break;
16433
16434 case 565: /* p_expr_basic: "[" rbracket */
16435#line 5525 "parse.y"
16436 {
16437 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16438 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16439 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16440 }
16441#line 16442 "parse.c"
16442 break;
16443
16444 case 566: /* $@33: %empty */
16445#line 5531 "parse.y"
16446 {
16447 p->ctxt.in_kwarg = 0;
16448 }
16449#line 16450 "parse.c"
16450 break;
16451
16452 case 567: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16453#line 5535 "parse.y"
16454 {
16455 pop_pktbl(p, (yyvsp[-4].tbl));
16456 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16457 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16458 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16459 }
16460#line 16461 "parse.c"
16461 break;
16462
16463 case 568: /* p_expr_basic: "{" rbrace */
16464#line 5542 "parse.y"
16465 {
16466 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16467 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16468 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16469 }
16470#line 16471 "parse.c"
16471 break;
16472
16473 case 569: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16474#line 5548 "parse.y"
16475 {
16476 pop_pktbl(p, (yyvsp[-2].tbl));
16477 (yyval.node) = (yyvsp[-1].node);
16478 /*% ripper: $:p_expr %*/
16479 }
16480#line 16481 "parse.c"
16481 break;
16482
16483 case 570: /* p_args: p_expr */
16484#line 5556 "parse.y"
16485 {
16486 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16487 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16488 /*% ripper: [[$:1], Qnil, Qnil] %*/
16489 }
16490#line 16491 "parse.c"
16491 break;
16492
16493 case 571: /* p_args: p_args_head */
16494#line 5562 "parse.y"
16495 {
16496 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16497 /*% ripper: [$:1, Qnil, Qnil] %*/
16498 }
16499#line 16500 "parse.c"
16500 break;
16501
16502 case 572: /* p_args: p_args_head p_arg */
16503#line 5567 "parse.y"
16504 {
16505 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16506 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16507 }
16508#line 16509 "parse.c"
16509 break;
16510
16511 case 573: /* p_args: p_args_head p_rest */
16512#line 5572 "parse.y"
16513 {
16514 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16515 /*% ripper: [$:1, $:2, Qnil] %*/
16516 }
16517#line 16518 "parse.c"
16518 break;
16519
16520 case 574: /* p_args: p_args_head p_rest ',' p_args_post */
16521#line 5577 "parse.y"
16522 {
16523 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16524 /*% ripper: [$:1, $:2, $:4] %*/
16525 }
16526#line 16527 "parse.c"
16527 break;
16528
16529 case 577: /* p_args_head: p_args_head p_arg ',' */
16530#line 5586 "parse.y"
16531 {
16532 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16533 /*% ripper: rb_ary_concat($:1, $:2) %*/
16534 }
16535#line 16536 "parse.c"
16536 break;
16537
16538 case 578: /* p_args_tail: p_rest */
16539#line 5593 "parse.y"
16540 {
16541 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16542 /*% ripper: [Qnil, $:1, Qnil] %*/
16543 }
16544#line 16545 "parse.c"
16545 break;
16546
16547 case 579: /* p_args_tail: p_rest ',' p_args_post */
16548#line 5598 "parse.y"
16549 {
16550 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16551 /*% ripper: [Qnil, $:1, $:3] %*/
16552 }
16553#line 16554 "parse.c"
16554 break;
16555
16556 case 580: /* p_find: p_rest ',' p_args_post ',' p_rest */
16557#line 5605 "parse.y"
16558 {
16559 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16560 /*% ripper: [$:1, $:3, $:5] %*/
16561 }
16562#line 16563 "parse.c"
16563 break;
16564
16565 case 581: /* p_rest: "*" "local variable or method" */
16566#line 5613 "parse.y"
16567 {
16568 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16569 /*% ripper: var_field!($:2) %*/
16570 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16571 }
16572#line 16573 "parse.c"
16573 break;
16574
16575 case 582: /* p_rest: "*" */
16576#line 5619 "parse.y"
16577 {
16578 (yyval.node) = 0;
16579 /*% ripper: var_field!(Qnil) %*/
16580 }
16581#line 16582 "parse.c"
16582 break;
16583
16584 case 584: /* p_args_post: p_args_post ',' p_arg */
16585#line 5627 "parse.y"
16586 {
16587 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16588 /*% ripper: rb_ary_concat($:1, $:3) %*/
16589 }
16590#line 16591 "parse.c"
16591 break;
16592
16593 case 585: /* p_arg: p_expr */
16594#line 5634 "parse.y"
16595 {
16596 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16597 /*% ripper: [$:1] %*/
16598 }
16599#line 16600 "parse.c"
16600 break;
16601
16602 case 586: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16603#line 5641 "parse.y"
16604 {
16605 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16606 /*% ripper: [$:1, $:3] %*/
16607 }
16608#line 16609 "parse.c"
16609 break;
16610
16611 case 587: /* p_kwargs: p_kwarg */
16612#line 5646 "parse.y"
16613 {
16614 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16615 /*% ripper: [$:1, Qnil] %*/
16616 }
16617#line 16618 "parse.c"
16618 break;
16619
16620 case 588: /* p_kwargs: p_kwarg ',' */
16621#line 5651 "parse.y"
16622 {
16623 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16624 /*% ripper: [$:1, Qnil] %*/
16625 }
16626#line 16627 "parse.c"
16627 break;
16628
16629 case 589: /* p_kwargs: p_any_kwrest */
16630#line 5656 "parse.y"
16631 {
16632 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16633 /*% ripper: [[], $:1] %*/
16634 }
16635#line 16636 "parse.c"
16636 break;
16637
16638 case 591: /* p_kwarg: p_kwarg ',' p_kw */
16639#line 5665 "parse.y"
16640 {
16641 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16642 /*% ripper: rb_ary_push($:1, $:3) %*/
16643 }
16644#line 16645 "parse.c"
16645 break;
16646
16647 case 592: /* p_kw: p_kw_label p_expr */
16648#line 5672 "parse.y"
16649 {
16650 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16651 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16652 /*% ripper: [$:1, $:2] %*/
16653 }
16654#line 16655 "parse.c"
16655 break;
16656
16657 case 593: /* p_kw: p_kw_label */
16658#line 5678 "parse.y"
16659 {
16660 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16661 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16662 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16663 }
16664 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16665 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16666 /*% ripper: [$:1, Qnil] %*/
16667 }
16668#line 16669 "parse.c"
16669 break;
16670
16671 case 595: /* p_kw_label: "string literal" string_contents tLABEL_END */
16672#line 5691 "parse.y"
16673 {
16674 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16675 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16676 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16677 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16678 }
16679 else {
16680 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16681 (yyval.id) = rb_intern_str(STR_NEW0());
16682 }
16683 /*% ripper: $:2 %*/
16684 }
16685#line 16686 "parse.c"
16686 break;
16687
16688 case 596: /* p_kwrest: kwrest_mark "local variable or method" */
16689#line 5706 "parse.y"
16690 {
16691 (yyval.id) = (yyvsp[0].id);
16692 /*% ripper: var_field!($:2) %*/
16693 }
16694#line 16695 "parse.c"
16695 break;
16696
16697 case 597: /* p_kwrest: kwrest_mark */
16698#line 5711 "parse.y"
16699 {
16700 (yyval.id) = 0;
16701 /*% ripper: Qnil %*/
16702 }
16703#line 16704 "parse.c"
16704 break;
16705
16706 case 598: /* p_kwnorest: kwrest_mark "'nil'" */
16707#line 5718 "parse.y"
16708 {
16709 (yyval.id) = 0;
16710 }
16711#line 16712 "parse.c"
16712 break;
16713
16714 case 600: /* p_any_kwrest: p_kwnorest */
16715#line 5725 "parse.y"
16716 {
16717 (yyval.id) = idNil;
16718 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16719 }
16720#line 16721 "parse.c"
16721 break;
16722
16723 case 602: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16724#line 3112 "parse.y"
16725 {
16726 value_expr(p, (yyvsp[-2].node));
16727 value_expr(p, (yyvsp[0].node));
16728 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16729 /*% ripper: dot2!($:1, $:3) %*/
16730 }
16731#line 16732 "parse.c"
16732 break;
16733
16734 case 603: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16735#line 3119 "parse.y"
16736 {
16737 value_expr(p, (yyvsp[-2].node));
16738 value_expr(p, (yyvsp[0].node));
16739 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16740 /*% ripper: dot3!($:1, $:3) %*/
16741 }
16742#line 16743 "parse.c"
16743 break;
16744
16745 case 604: /* range_expr_p_primitive: p_primitive ".." */
16746#line 3126 "parse.y"
16747 {
16748 value_expr(p, (yyvsp[-1].node));
16749 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16750 /*% ripper: dot2!($:1, Qnil) %*/
16751 }
16752#line 16753 "parse.c"
16753 break;
16754
16755 case 605: /* range_expr_p_primitive: p_primitive "..." */
16756#line 3132 "parse.y"
16757 {
16758 value_expr(p, (yyvsp[-1].node));
16759 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16760 /*% ripper: dot3!($:1, Qnil) %*/
16761 }
16762#line 16763 "parse.c"
16763 break;
16764
16765 case 606: /* range_expr_p_primitive: "(.." p_primitive */
16766#line 3138 "parse.y"
16767 {
16768 value_expr(p, (yyvsp[0].node));
16769 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16770 /*% ripper: dot2!(Qnil, $:2) %*/
16771 }
16772#line 16773 "parse.c"
16773 break;
16774
16775 case 607: /* range_expr_p_primitive: "(..." p_primitive */
16776#line 3144 "parse.y"
16777 {
16778 value_expr(p, (yyvsp[0].node));
16779 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16780 /*% ripper: dot3!(Qnil, $:2) %*/
16781 }
16782#line 16783 "parse.c"
16783 break;
16784
16785 case 620: /* p_primitive: keyword_variable */
16786#line 5740 "parse.y"
16787 {
16788 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16789 /*% ripper: var_ref!($:1) %*/
16790 }
16791#line 16792 "parse.c"
16792 break;
16793
16794 case 622: /* p_variable: "local variable or method" */
16795#line 5748 "parse.y"
16796 {
16797 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16798 /*% ripper: var_field!($:1) %*/
16799 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16800 }
16801#line 16802 "parse.c"
16802 break;
16803
16804 case 623: /* p_var_ref: '^' "local variable or method" */
16805#line 5756 "parse.y"
16806 {
16807 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16808 if (!n) {
16809 n = NEW_ERROR(&(yyloc));
16810 }
16811 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16812 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16813 }
16814 (yyval.node) = n;
16815 /*% ripper: var_ref!($:2) %*/
16816 }
16817#line 16818 "parse.c"
16818 break;
16819
16820 case 624: /* p_var_ref: '^' nonlocal_var */
16821#line 5768 "parse.y"
16822 {
16823 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16824 /*% ripper: var_ref!($:2) %*/
16825 }
16826#line 16827 "parse.c"
16827 break;
16828
16829 case 625: /* p_expr_ref: '^' "(" expr_value rparen */
16830#line 5775 "parse.y"
16831 {
16832 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16833 /*% ripper: begin!($:3) %*/
16834 }
16835#line 16836 "parse.c"
16836 break;
16837
16838 case 626: /* p_const: ":: at EXPR_BEG" cname */
16839#line 5782 "parse.y"
16840 {
16841 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16842 /*% ripper: top_const_ref!($:2) %*/
16843 }
16844#line 16845 "parse.c"
16845 break;
16846
16847 case 627: /* p_const: p_const "::" cname */
16848#line 5787 "parse.y"
16849 {
16850 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16851 /*% ripper: const_path_ref!($:1, $:3) %*/
16852 }
16853#line 16854 "parse.c"
16854 break;
16855
16856 case 628: /* p_const: "constant" */
16857#line 5792 "parse.y"
16858 {
16859 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16860 /*% ripper: var_ref!($:1) %*/
16861 }
16862#line 16863 "parse.c"
16863 break;
16864
16865 case 629: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16866#line 5801 "parse.y"
16867 {
16868 NODE *err = (yyvsp[-3].node);
16869 if ((yyvsp[-3].node)) {
16870 err = NEW_ERRINFO(&(yylsp[-3]));
16871 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16872 }
16873 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16874 if ((yyvsp[-4].node)) {
16875 fixpos((yyval.node), (yyvsp[-4].node));
16876 }
16877 else if ((yyvsp[-3].node)) {
16878 fixpos((yyval.node), (yyvsp[-3].node));
16879 }
16880 else {
16881 fixpos((yyval.node), (yyvsp[-1].node));
16882 }
16883 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16884 }
16885#line 16886 "parse.c"
16886 break;
16887
16888 case 631: /* exc_list: arg_value */
16889#line 5823 "parse.y"
16890 {
16891 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16892 /*% ripper: rb_ary_new3(1, $:1) %*/
16893 }
16894#line 16895 "parse.c"
16895 break;
16896
16897 case 632: /* exc_list: mrhs */
16898#line 5828 "parse.y"
16899 {
16900 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16901 }
16902#line 16903 "parse.c"
16903 break;
16904
16905 case 634: /* exc_var: "=>" lhs */
16906#line 5835 "parse.y"
16907 {
16908 (yyval.node) = (yyvsp[0].node);
16909 /*% ripper: $:2 %*/
16910 }
16911#line 16912 "parse.c"
16912 break;
16913
16914 case 636: /* opt_ensure: k_ensure stmts option_terms */
16915#line 5843 "parse.y"
16916 {
16917 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16918 (yyval.node) = (yyvsp[-1].node);
16919 void_expr(p, void_stmts(p, (yyval.node)));
16920 /*% ripper: ensure!($:2) %*/
16921 }
16922#line 16923 "parse.c"
16923 break;
16924
16925 case 640: /* strings: string */
16926#line 5857 "parse.y"
16927 {
16928 if (!(yyvsp[0].node)) {
16929 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16930 }
16931 else {
16932 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16933 }
16934 /*% ripper: $:1 %*/
16935 }
16936#line 16937 "parse.c"
16937 break;
16938
16939 case 643: /* string: string string1 */
16940#line 5871 "parse.y"
16941 {
16942 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16943 /*% ripper: string_concat!($:1, $:2) %*/
16944 }
16945#line 16946 "parse.c"
16946 break;
16947
16948 case 644: /* string1: "string literal" string_contents "terminator" */
16949#line 5878 "parse.y"
16950 {
16951 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16952 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16953 /*% ripper: $:2 %*/
16954 if (p->heredoc_indent > 0) {
16955 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16956 p->heredoc_indent = 0;
16957 }
16958 /*% ripper: string_literal!($:$) %*/
16959 }
16960#line 16961 "parse.c"
16961 break;
16962
16963 case 645: /* xstring: "backtick literal" xstring_contents "terminator" */
16964#line 5891 "parse.y"
16965 {
16966 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16967 /*% ripper: $:2 %*/
16968 if (p->heredoc_indent > 0) {
16969 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16970 p->heredoc_indent = 0;
16971 }
16972 /*% ripper: xstring_literal!($:$) %*/
16973 }
16974#line 16975 "parse.c"
16975 break;
16976
16977 case 646: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16978#line 5903 "parse.y"
16979 {
16980 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16981 /*% ripper: regexp_literal!($:2, $:3) %*/
16982 }
16983#line 16984 "parse.c"
16984 break;
16985
16986 case 649: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16987#line 3161 "parse.y"
16988 {
16989 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16990 /*% ripper: array!($:word_list) %*/
16991 }
16992#line 16993 "parse.c"
16993 break;
16994
16995 case 651: /* word_list: %empty */
16996#line 5913 "parse.y"
16997 {
16998 (yyval.node) = 0;
16999 /*% ripper: words_new! %*/
17000 }
17001#line 17002 "parse.c"
17002 break;
17003
17004 case 652: /* word_list: word_list word nonempty_list_' ' */
17005#line 5918 "parse.y"
17006 {
17007 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17008 /*% ripper: words_add!($:1, $:2) %*/
17009 }
17010#line 17011 "parse.c"
17011 break;
17012
17013 case 654: /* word: word string_content */
17014#line 5927 "parse.y"
17015 {
17016 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17017 /*% ripper: word_add!($:1, $:2) %*/
17018 }
17019#line 17020 "parse.c"
17020 break;
17021
17022 case 655: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
17023#line 3161 "parse.y"
17024 {
17025 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17026 /*% ripper: array!($:word_list) %*/
17027 }
17028#line 17029 "parse.c"
17029 break;
17030
17031 case 657: /* symbol_list: %empty */
17032#line 5937 "parse.y"
17033 {
17034 (yyval.node) = 0;
17035 /*% ripper: symbols_new! %*/
17036 }
17037#line 17038 "parse.c"
17038 break;
17039
17040 case 658: /* symbol_list: symbol_list word nonempty_list_' ' */
17041#line 5942 "parse.y"
17042 {
17043 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17044 /*% ripper: symbols_add!($:1, $:2) %*/
17045 }
17046#line 17047 "parse.c"
17047 break;
17048
17049 case 659: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
17050#line 3161 "parse.y"
17051 {
17052 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17053 /*% ripper: array!($:word_list) %*/
17054 }
17055#line 17056 "parse.c"
17056 break;
17057
17058 case 661: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
17059#line 3161 "parse.y"
17060 {
17061 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17062 /*% ripper: array!($:word_list) %*/
17063 }
17064#line 17065 "parse.c"
17065 break;
17066
17067 case 663: /* qword_list: %empty */
17068#line 5955 "parse.y"
17069 {
17070 (yyval.node) = 0;
17071 /*% ripper: qwords_new! %*/
17072 }
17073#line 17074 "parse.c"
17074 break;
17075
17076 case 664: /* qword_list: qword_list "literal content" nonempty_list_' ' */
17077#line 5960 "parse.y"
17078 {
17079 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17080 /*% ripper: qwords_add!($:1, $:2) %*/
17081 }
17082#line 17083 "parse.c"
17083 break;
17084
17085 case 665: /* qsym_list: %empty */
17086#line 5967 "parse.y"
17087 {
17088 (yyval.node) = 0;
17089 /*% ripper: qsymbols_new! %*/
17090 }
17091#line 17092 "parse.c"
17092 break;
17093
17094 case 666: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
17095#line 5972 "parse.y"
17096 {
17097 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17098 /*% ripper: qsymbols_add!($:1, $:2) %*/
17099 }
17100#line 17101 "parse.c"
17101 break;
17102
17103 case 667: /* string_contents: %empty */
17104#line 5979 "parse.y"
17105 {
17106 (yyval.node) = 0;
17107 /*% ripper: string_content! %*/
17108 }
17109#line 17110 "parse.c"
17110 break;
17111
17112 case 668: /* string_contents: string_contents string_content */
17113#line 5984 "parse.y"
17114 {
17115 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17116 /*% ripper: string_add!($:1, $:2) %*/
17117 }
17118#line 17119 "parse.c"
17119 break;
17120
17121 case 669: /* xstring_contents: %empty */
17122#line 5991 "parse.y"
17123 {
17124 (yyval.node) = 0;
17125 /*% ripper: xstring_new! %*/
17126 }
17127#line 17128 "parse.c"
17128 break;
17129
17130 case 670: /* xstring_contents: xstring_contents string_content */
17131#line 5996 "parse.y"
17132 {
17133 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17134 /*% ripper: xstring_add!($:1, $:2) %*/
17135 }
17136#line 17137 "parse.c"
17137 break;
17138
17139 case 671: /* regexp_contents: %empty */
17140#line 6003 "parse.y"
17141 {
17142 (yyval.node) = 0;
17143 /*% ripper: regexp_new! %*/
17144 }
17145#line 17146 "parse.c"
17146 break;
17147
17148 case 672: /* regexp_contents: regexp_contents string_content */
17149#line 6008 "parse.y"
17150 {
17151 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17152 if (!head) {
17153 (yyval.node) = tail;
17154 }
17155 else if (!tail) {
17156 (yyval.node) = head;
17157 }
17158 else {
17159 switch (nd_type(head)) {
17160 case NODE_STR:
17161 head = str2dstr(p, head);
17162 break;
17163 case NODE_DSTR:
17164 break;
17165 default:
17166 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17167 break;
17168 }
17169 (yyval.node) = list_append(p, head, tail);
17170 }
17171 /*% ripper: regexp_add!($:1, $:2) %*/
17172 }
17173#line 17174 "parse.c"
17174 break;
17175
17176 case 674: /* @34: %empty */
17177#line 6036 "parse.y"
17178 {
17179 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17180 (yyval.strterm) = p->lex.strterm;
17181 p->lex.strterm = 0;
17182 SET_LEX_STATE(EXPR_BEG);
17183 }
17184#line 17185 "parse.c"
17185 break;
17186
17187 case 675: /* string_content: tSTRING_DVAR @34 string_dvar */
17188#line 6043 "parse.y"
17189 {
17190 p->lex.strterm = (yyvsp[-1].strterm);
17191 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17192 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17193 /*% ripper: string_dvar!($:dvar) %*/
17194 }
17195#line 17196 "parse.c"
17196 break;
17197
17198 case 676: /* @35: %empty */
17199#line 6050 "parse.y"
17200 {
17201 CMDARG_PUSH(0);
17202 COND_PUSH(0);
17203 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17204 (yyval.strterm) = p->lex.strterm;
17205 p->lex.strterm = 0;
17206 SET_LEX_STATE(EXPR_BEG);
17207 }
17208#line 17209 "parse.c"
17209 break;
17210
17211 case 677: /* @36: %empty */
17212#line 6058 "parse.y"
17213 {
17214 (yyval.num) = p->lex.brace_nest;
17215 p->lex.brace_nest = 0;
17216 }
17217#line 17218 "parse.c"
17218 break;
17219
17220 case 678: /* @37: %empty */
17221#line 6062 "parse.y"
17222 {
17223 (yyval.num) = p->lex.lpar_beg;
17224 p->lex.lpar_beg = -1;
17225 }
17226#line 17227 "parse.c"
17227 break;
17228
17229 case 679: /* @38: %empty */
17230#line 6066 "parse.y"
17231 {
17232 (yyval.num) = p->heredoc_indent;
17233 p->heredoc_indent = 0;
17234 }
17235#line 17236 "parse.c"
17236 break;
17237
17238 case 680: /* string_content: "'#{'" @35 @36 @37 @38 compstmt_stmts string_dend */
17239#line 6071 "parse.y"
17240 {
17241 COND_POP();
17242 CMDARG_POP();
17243 p->lex.strterm = (yyvsp[-5].strterm);
17244 SET_LEX_STATE((yyvsp[-6].state));
17245 p->lex.brace_nest = (yyvsp[-4].num);
17246 p->lex.lpar_beg = (yyvsp[-3].num);
17247 p->heredoc_indent = (yyvsp[-2].num);
17248 p->heredoc_line_indent = -1;
17249 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17250 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[0]));
17251 /*% ripper: string_embexpr!($:compstmt) %*/
17252 }
17253#line 17254 "parse.c"
17254 break;
17255
17256 case 683: /* string_dvar: nonlocal_var */
17257#line 6091 "parse.y"
17258 {
17259 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17260 /*% ripper: var_ref!($:1) %*/
17261 }
17262#line 17263 "parse.c"
17263 break;
17264
17265 case 687: /* ssym: "symbol literal" sym */
17266#line 6103 "parse.y"
17267 {
17268 SET_LEX_STATE(EXPR_END);
17269 VALUE str = rb_id2str((yyvsp[0].id));
17270 /*
17271 * TODO:
17272 * set_yylval_noname sets invalid id to yylval.
17273 * This branch can be removed once yylval is changed to
17274 * hold lexed string.
17275 */
17276 if (!str) str = STR_NEW0();
17277 (yyval.node) = NEW_SYM(str, &(yyloc));
17278 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17279 }
17280#line 17281 "parse.c"
17281 break;
17282
17283 case 690: /* dsym: "symbol literal" string_contents "terminator" */
17284#line 6123 "parse.y"
17285 {
17286 SET_LEX_STATE(EXPR_END);
17287 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17288 /*% ripper: dyna_symbol!($:2) %*/
17289 }
17290#line 17291 "parse.c"
17291 break;
17292
17293 case 692: /* numeric: tUMINUS_NUM simple_numeric */
17294#line 6132 "parse.y"
17295 {
17296 (yyval.node) = (yyvsp[0].node);
17297 negate_lit(p, (yyval.node), &(yyloc));
17298 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17299 }
17300#line 17301 "parse.c"
17301 break;
17302
17303 case 703: /* keyword_variable: "'nil'" */
17304#line 6154 "parse.y"
17305 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17306#line 17307 "parse.c"
17307 break;
17308
17309 case 704: /* keyword_variable: "'self'" */
17310#line 6155 "parse.y"
17311 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17312#line 17313 "parse.c"
17313 break;
17314
17315 case 705: /* keyword_variable: "'true'" */
17316#line 6156 "parse.y"
17317 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17318#line 17319 "parse.c"
17319 break;
17320
17321 case 706: /* keyword_variable: "'false'" */
17322#line 6157 "parse.y"
17323 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17324#line 17325 "parse.c"
17325 break;
17326
17327 case 707: /* keyword_variable: "'__FILE__'" */
17328#line 6158 "parse.y"
17329 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17330#line 17331 "parse.c"
17331 break;
17332
17333 case 708: /* keyword_variable: "'__LINE__'" */
17334#line 6159 "parse.y"
17335 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17336#line 17337 "parse.c"
17337 break;
17338
17339 case 709: /* keyword_variable: "'__ENCODING__'" */
17340#line 6160 "parse.y"
17341 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17342#line 17343 "parse.c"
17343 break;
17344
17345 case 710: /* var_ref: user_variable */
17346#line 6164 "parse.y"
17347 {
17348 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17349 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17350 /*% ripper: var_ref!($:1) %*/
17351 }
17352 else {
17353 /*% ripper: vcall!($:1) %*/
17354 }
17355 }
17356#line 17357 "parse.c"
17357 break;
17358
17359 case 711: /* var_ref: keyword_variable */
17360#line 6174 "parse.y"
17361 {
17362 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17363 /*% ripper: var_ref!($:1) %*/
17364 }
17365#line 17366 "parse.c"
17366 break;
17367
17368 case 712: /* var_lhs: user_variable */
17369#line 6181 "parse.y"
17370 {
17371 /*% ripper: var_field!($:1) %*/
17372 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17373 }
17374#line 17375 "parse.c"
17375 break;
17376
17377 case 713: /* var_lhs: keyword_variable */
17378#line 6181 "parse.y"
17379 {
17380 /*% ripper: var_field!($:1) %*/
17381 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17382 }
17383#line 17384 "parse.c"
17384 break;
17385
17386 case 716: /* $@39: %empty */
17387#line 6192 "parse.y"
17388 {
17389 SET_LEX_STATE(EXPR_BEG);
17390 p->command_start = TRUE;
17391 }
17392#line 17393 "parse.c"
17393 break;
17394
17395 case 717: /* superclass: '<' $@39 expr_value term */
17396#line 6197 "parse.y"
17397 {
17398 (yyval.node) = (yyvsp[-1].node);
17399 /*% ripper: $:3 %*/
17400 }
17401#line 17402 "parse.c"
17402 break;
17403
17404 case 720: /* f_opt_paren_args: f_empty_arg */
17405#line 6206 "parse.y"
17406 {
17407 p->ctxt.in_argdef = 0;
17408 }
17409#line 17410 "parse.c"
17410 break;
17411
17412 case 721: /* f_empty_arg: %empty */
17413#line 6212 "parse.y"
17414 {
17415 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17416 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17417 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17418 }
17419#line 17420 "parse.c"
17420 break;
17421
17422 case 722: /* f_paren_args: '(' f_args rparen */
17423#line 6220 "parse.y"
17424 {
17425 (yyval.node_args) = (yyvsp[-1].node_args);
17426 /*% ripper: paren!($:2) %*/
17427 SET_LEX_STATE(EXPR_BEG);
17428 p->command_start = TRUE;
17429 p->ctxt.in_argdef = 0;
17430 }
17431#line 17432 "parse.c"
17432 break;
17433
17434 case 724: /* @40: %empty */
17435#line 6230 "parse.y"
17436 {
17437 (yyval.ctxt) = p->ctxt;
17438 p->ctxt.in_kwarg = 1;
17439 p->ctxt.in_argdef = 1;
17440 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17441 }
17442#line 17443 "parse.c"
17443 break;
17444
17445 case 725: /* f_arglist: @40 f_args term */
17446#line 6237 "parse.y"
17447 {
17448 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17449 p->ctxt.in_argdef = 0;
17450 (yyval.node_args) = (yyvsp[-1].node_args);
17451 SET_LEX_STATE(EXPR_BEG);
17452 p->command_start = TRUE;
17453 /*% ripper: $:2 %*/
17454 }
17455#line 17456 "parse.c"
17456 break;
17457
17458 case 726: /* f_kw_arg_value: f_label arg_value */
17459#line 3012 "parse.y"
17460 {
17461 p->ctxt.in_argdef = 1;
17462 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17463 /*% ripper: [$:$, $:value] %*/
17464 }
17465#line 17466 "parse.c"
17466 break;
17467
17468 case 727: /* f_kw_arg_value: f_label */
17469#line 3018 "parse.y"
17470 {
17471 p->ctxt.in_argdef = 1;
17472 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17473 /*% ripper: [$:$, 0] %*/
17474 }
17475#line 17476 "parse.c"
17476 break;
17477
17478 case 728: /* f_kwarg_arg_value: f_kw_arg_value */
17479#line 3027 "parse.y"
17480 {
17481 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17482 /*% ripper: rb_ary_new3(1, $:1) %*/
17483 }
17484#line 17485 "parse.c"
17485 break;
17486
17487 case 729: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17488#line 3032 "parse.y"
17489 {
17490 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17491 /*% ripper: rb_ary_push($:1, $:3) %*/
17492 }
17493#line 17494 "parse.c"
17494 break;
17495
17496 case 730: /* opt_f_block_arg_opt_comma: ',' f_block_arg */
17497#line 2949 "parse.y"
17498 {
17499 (yyval.id) = (yyvsp[0].id);
17500 /*% ripper: $:2 %*/
17501 }
17502#line 17503 "parse.c"
17503 break;
17504
17505 case 732: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_opt_comma */
17506#line 2926 "parse.y"
17507 {
17508 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17509 /*% ripper: [$:1, $:3, $:4] %*/
17510 }
17511#line 17512 "parse.c"
17512 break;
17513
17514 case 733: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value opt_f_block_arg_opt_comma */
17515#line 2931 "parse.y"
17516 {
17517 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17518 /*% ripper: [$:1, Qnil, $:2] %*/
17519 }
17520#line 17521 "parse.c"
17521 break;
17522
17523 case 734: /* args_tail_basic_arg_value_opt_comma: f_any_kwrest opt_f_block_arg_opt_comma */
17524#line 2936 "parse.y"
17525 {
17526 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17527 /*% ripper: [Qnil, $:1, $:2] %*/
17528 }
17529#line 17530 "parse.c"
17530 break;
17531
17532 case 735: /* args_tail_basic_arg_value_opt_comma: f_block_arg */
17533#line 2941 "parse.y"
17534 {
17535 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17536 /*% ripper: [Qnil, Qnil, $:1] %*/
17537 }
17538#line 17539 "parse.c"
17539 break;
17540
17541 case 737: /* args_tail: args_forward */
17542#line 6249 "parse.y"
17543 {
17544 add_forwarding_args(p);
17545 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[0].id), arg_FWD_BLOCK, &(yylsp[0]));
17546 (yyval.node_args)->nd_ainfo.forwarding = 1;
17547 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17548 }
17549#line 17550 "parse.c"
17550 break;
17551
17552 case 738: /* args_tail_basic_arg_value_none: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_none */
17553#line 2926 "parse.y"
17554 {
17555 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17556 /*% ripper: [$:1, $:3, $:4] %*/
17557 }
17558#line 17559 "parse.c"
17559 break;
17560
17561 case 739: /* args_tail_basic_arg_value_none: f_kwarg_arg_value opt_f_block_arg_none */
17562#line 2931 "parse.y"
17563 {
17564 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17565 /*% ripper: [$:1, Qnil, $:2] %*/
17566 }
17567#line 17568 "parse.c"
17568 break;
17569
17570 case 740: /* args_tail_basic_arg_value_none: f_any_kwrest opt_f_block_arg_none */
17571#line 2936 "parse.y"
17572 {
17573 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17574 /*% ripper: [Qnil, $:1, $:2] %*/
17575 }
17576#line 17577 "parse.c"
17577 break;
17578
17579 case 741: /* args_tail_basic_arg_value_none: f_block_arg */
17580#line 2941 "parse.y"
17581 {
17582 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17583 /*% ripper: [Qnil, Qnil, $:1] %*/
17584 }
17585#line 17586 "parse.c"
17586 break;
17587
17588 case 743: /* largs_tail: args_forward */
17589#line 6259 "parse.y"
17590 {
17591 yyerror1(&(yylsp[0]), "unexpected ... in lambda argument");
17592 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17593 (yyval.node_args)->nd_ainfo.forwarding = 1;
17594 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17595 }
17596#line 17597 "parse.c"
17597 break;
17598
17599 case 744: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17600#line 2990 "parse.y"
17601 {
17602 p->ctxt.in_argdef = 1;
17603 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17604 /*% ripper: [$:$, $:3] %*/
17605 }
17606#line 17607 "parse.c"
17607 break;
17608
17609 case 745: /* f_opt_arg_arg_value: f_opt_arg_value */
17610#line 2999 "parse.y"
17611 {
17612 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17613 /*% ripper: rb_ary_new3(1, $:1) %*/
17614 }
17615#line 17616 "parse.c"
17616 break;
17617
17618 case 746: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17619#line 3004 "parse.y"
17620 {
17621 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17622 /*% ripper: rb_ary_push($:1, $:3) %*/
17623 }
17624#line 17625 "parse.c"
17625 break;
17626
17627 case 747: /* opt_args_tail_args_tail_opt_comma: ',' args_tail */
17628#line 3099 "parse.y"
17629 {
17630 (yyval.node_args) = (yyvsp[0].node_args);
17631 /*% ripper: $:tail %*/
17632 }
17633#line 17634 "parse.c"
17634 break;
17635
17636 case 748: /* opt_args_tail_args_tail_opt_comma: opt_comma */
17637#line 3104 "parse.y"
17638 {
17639 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17640 /*% ripper: [Qnil, Qnil, Qnil] %*/
17641 }
17642#line 17643 "parse.c"
17643 break;
17644
17645 case 749: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17646#line 6269 "parse.y"
17647 {
17648 (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));
17649 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17650 }
17651#line 17652 "parse.c"
17652 break;
17653
17654 case 750: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17655#line 6274 "parse.y"
17656 {
17657 (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));
17658 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17659 }
17660#line 17661 "parse.c"
17661 break;
17662
17663 case 751: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17664#line 6279 "parse.y"
17665 {
17666 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17667 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17668 }
17669#line 17670 "parse.c"
17670 break;
17671
17672 case 752: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17673#line 6284 "parse.y"
17674 {
17675 (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));
17676 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17677 }
17678#line 17679 "parse.c"
17679 break;
17680
17681 case 753: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17682#line 6289 "parse.y"
17683 {
17684 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17685 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17686 }
17687#line 17688 "parse.c"
17688 break;
17689
17690 case 754: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17691#line 6294 "parse.y"
17692 {
17693 (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));
17694 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17695 }
17696#line 17697 "parse.c"
17697 break;
17698
17699 case 755: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17700#line 6299 "parse.y"
17701 {
17702 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17703 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17704 }
17705#line 17706 "parse.c"
17706 break;
17707
17708 case 756: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17709#line 6304 "parse.y"
17710 {
17711 (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));
17712 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17713 }
17714#line 17715 "parse.c"
17715 break;
17716
17717 case 757: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17718#line 6309 "parse.y"
17719 {
17720 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17721 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17722 }
17723#line 17724 "parse.c"
17724 break;
17725
17726 case 758: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17727#line 6314 "parse.y"
17728 {
17729 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17730 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17731 }
17732#line 17733 "parse.c"
17733 break;
17734
17735 case 759: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg opt_args_tail_args_tail_opt_comma */
17736#line 6319 "parse.y"
17737 {
17738 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17739 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17740 }
17741#line 17742 "parse.c"
17742 break;
17743
17744 case 760: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17745#line 6324 "parse.y"
17746 {
17747 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17748 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17749 }
17750#line 17751 "parse.c"
17751 break;
17752
17753 case 762: /* f_args-list_args_tail_opt_comma: f_arg opt_args_tail_args_tail_opt_comma */
17754#line 6341 "parse.y"
17755 {
17756 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17757 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17758 }
17759#line 17760 "parse.c"
17760 break;
17761
17762 case 763: /* tail-only-args_args_tail: args_tail */
17763#line 6332 "parse.y"
17764 {
17765 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17766 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17767 }
17768#line 17769 "parse.c"
17769 break;
17770
17771 case 767: /* opt_args_tail_largs_tail_none: ',' largs_tail */
17772#line 3099 "parse.y"
17773 {
17774 (yyval.node_args) = (yyvsp[0].node_args);
17775 /*% ripper: $:tail %*/
17776 }
17777#line 17778 "parse.c"
17778 break;
17779
17780 case 768: /* opt_args_tail_largs_tail_none: none */
17781#line 3104 "parse.y"
17782 {
17783 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17784 /*% ripper: [Qnil, Qnil, Qnil] %*/
17785 }
17786#line 17787 "parse.c"
17787 break;
17788
17789 case 769: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17790#line 6269 "parse.y"
17791 {
17792 (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));
17793 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17794 }
17795#line 17796 "parse.c"
17796 break;
17797
17798 case 770: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17799#line 6274 "parse.y"
17800 {
17801 (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));
17802 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17803 }
17804#line 17805 "parse.c"
17805 break;
17806
17807 case 771: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17808#line 6279 "parse.y"
17809 {
17810 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17811 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17812 }
17813#line 17814 "parse.c"
17814 break;
17815
17816 case 772: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17817#line 6284 "parse.y"
17818 {
17819 (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));
17820 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17821 }
17822#line 17823 "parse.c"
17823 break;
17824
17825 case 773: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg opt_args_tail_largs_tail_none */
17826#line 6289 "parse.y"
17827 {
17828 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17829 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17830 }
17831#line 17832 "parse.c"
17832 break;
17833
17834 case 774: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17835#line 6294 "parse.y"
17836 {
17837 (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));
17838 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17839 }
17840#line 17841 "parse.c"
17841 break;
17842
17843 case 775: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17844#line 6299 "parse.y"
17845 {
17846 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17847 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17848 }
17849#line 17850 "parse.c"
17850 break;
17851
17852 case 776: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17853#line 6304 "parse.y"
17854 {
17855 (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));
17856 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17857 }
17858#line 17859 "parse.c"
17859 break;
17860
17861 case 777: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17862#line 6309 "parse.y"
17863 {
17864 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17865 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17866 }
17867#line 17868 "parse.c"
17868 break;
17869
17870 case 778: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17871#line 6314 "parse.y"
17872 {
17873 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17874 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17875 }
17876#line 17877 "parse.c"
17877 break;
17878
17879 case 779: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg opt_args_tail_largs_tail_none */
17880#line 6319 "parse.y"
17881 {
17882 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17883 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17884 }
17885#line 17886 "parse.c"
17886 break;
17887
17888 case 780: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17889#line 6324 "parse.y"
17890 {
17891 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17892 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17893 }
17894#line 17895 "parse.c"
17895 break;
17896
17897 case 782: /* f_args-list_largs_tail_none: f_arg opt_args_tail_largs_tail_none */
17898#line 6341 "parse.y"
17899 {
17900 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17901 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17902 }
17903#line 17904 "parse.c"
17904 break;
17905
17906 case 783: /* tail-only-args_largs_tail: largs_tail */
17907#line 6332 "parse.y"
17908 {
17909 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17910 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17911 }
17912#line 17913 "parse.c"
17913 break;
17914
17915 case 787: /* args_forward: "(..." */
17916#line 6356 "parse.y"
17917 {
17918 (yyval.id) = idFWD_KWREST;
17919 /*% ripper: args_forward! %*/
17920 }
17921#line 17922 "parse.c"
17922 break;
17923
17924 case 788: /* f_bad_arg: "constant" */
17925#line 6363 "parse.y"
17926 {
17927 static const char mesg[] = "formal argument cannot be a constant";
17928 /*%%%*/
17929 yyerror1(&(yylsp[0]), mesg);
17930 /*% %*/
17931 (yyval.id) = 0;
17932 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17933 }
17934#line 17935 "parse.c"
17935 break;
17936
17937 case 789: /* f_bad_arg: "instance variable" */
17938#line 6372 "parse.y"
17939 {
17940 static const char mesg[] = "formal argument cannot be an instance variable";
17941 /*%%%*/
17942 yyerror1(&(yylsp[0]), mesg);
17943 /*% %*/
17944 (yyval.id) = 0;
17945 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17946 }
17947#line 17948 "parse.c"
17948 break;
17949
17950 case 790: /* f_bad_arg: "global variable" */
17951#line 6381 "parse.y"
17952 {
17953 static const char mesg[] = "formal argument cannot be a global variable";
17954 /*%%%*/
17955 yyerror1(&(yylsp[0]), mesg);
17956 /*% %*/
17957 (yyval.id) = 0;
17958 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17959 }
17960#line 17961 "parse.c"
17961 break;
17962
17963 case 791: /* f_bad_arg: "class variable" */
17964#line 6390 "parse.y"
17965 {
17966 static const char mesg[] = "formal argument cannot be a class variable";
17967 /*%%%*/
17968 yyerror1(&(yylsp[0]), mesg);
17969 /*% %*/
17970 (yyval.id) = 0;
17971 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17972 }
17973#line 17974 "parse.c"
17974 break;
17975
17976 case 793: /* f_norm_arg: "local variable or method" */
17977#line 6402 "parse.y"
17978 {
17979 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17980 if (e) {
17981 /*% ripper[error]: param_error!(?e, $:1) %*/
17982 }
17983 p->max_numparam = ORDINAL_PARAM;
17984 }
17985#line 17986 "parse.c"
17986 break;
17987
17988 case 794: /* f_arg_asgn: f_norm_arg */
17989#line 6412 "parse.y"
17990 {
17991 arg_var(p, (yyvsp[0].id));
17992 (yyval.id) = (yyvsp[0].id);
17993 }
17994#line 17995 "parse.c"
17995 break;
17996
17997 case 795: /* f_arg_item: f_arg_asgn */
17998#line 6419 "parse.y"
17999 {
18000 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
18001 /*% ripper: $:1 %*/
18002 }
18003#line 18004 "parse.c"
18004 break;
18005
18006 case 796: /* f_arg_item: "(" f_margs rparen */
18007#line 6424 "parse.y"
18008 {
18009 ID tid = internal_id(p);
18010 YYLTYPE loc;
18011 loc.beg_pos = (yylsp[-1]).beg_pos;
18012 loc.end_pos = (yylsp[-1]).beg_pos;
18013 arg_var(p, tid);
18014 if (dyna_in_block(p)) {
18015 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
18016 }
18017 else {
18018 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
18019 }
18020 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
18021 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
18022 /*% ripper: mlhs_paren!($:2) %*/
18023 }
18024#line 18025 "parse.c"
18025 break;
18026
18027 case 798: /* f_arg: f_arg ',' f_arg_item */
18028#line 6445 "parse.y"
18029 {
18030 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
18031 (yyval.node_args_aux)->nd_plen++;
18032 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
18033 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
18034 /*% ripper: rb_ary_push($:1, $:3) %*/
18035 }
18036#line 18037 "parse.c"
18037 break;
18038
18039 case 799: /* f_label: "label" */
18040#line 6456 "parse.y"
18041 {
18042 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18043 if (e) {
18044 (yyval.id) = 0;
18045 /*% ripper[error]: param_error!(?e, $:1) %*/
18046 }
18047 /*
18048 * Workaround for Prism::ParseTest#test_filepath for
18049 * "unparser/corpus/literal/def.txt"
18050 *
18051 * See the discussion on https://github.com/ruby/ruby/pull/9923
18052 */
18053 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
18054 /*% ripper: $:1 %*/
18055 p->max_numparam = ORDINAL_PARAM;
18056 p->ctxt.in_argdef = 0;
18057 }
18058#line 18059 "parse.c"
18059 break;
18060
18061 case 802: /* f_no_kwarg: p_kwnorest */
18062#line 6480 "parse.y"
18063 {
18064 /*% ripper: nokw_param!(Qnil) %*/
18065 }
18066#line 18067 "parse.c"
18067 break;
18068
18069 case 803: /* f_kwrest: kwrest_mark "local variable or method" */
18070#line 6486 "parse.y"
18071 {
18072 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18073 (yyval.id) = (yyvsp[0].id);
18074 /*% ripper: kwrest_param!($:2) %*/
18075 }
18076#line 18077 "parse.c"
18077 break;
18078
18079 case 804: /* f_kwrest: kwrest_mark */
18080#line 6492 "parse.y"
18081 {
18082 arg_var(p, idFWD_KWREST);
18083 (yyval.id) = idFWD_KWREST;
18084 /*% ripper: kwrest_param!(Qnil) %*/
18085 }
18086#line 18087 "parse.c"
18087 break;
18088
18089 case 807: /* f_rest_arg: restarg_mark "local variable or method" */
18090#line 6504 "parse.y"
18091 {
18092 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18093 (yyval.id) = (yyvsp[0].id);
18094 /*% ripper: rest_param!($:2) %*/
18095 }
18096#line 18097 "parse.c"
18097 break;
18098
18099 case 808: /* f_rest_arg: restarg_mark */
18100#line 6510 "parse.y"
18101 {
18102 arg_var(p, idFWD_REST);
18103 (yyval.id) = idFWD_REST;
18104 /*% ripper: rest_param!(Qnil) %*/
18105 }
18106#line 18107 "parse.c"
18107 break;
18108
18109 case 811: /* f_block_arg: blkarg_mark "local variable or method" */
18110#line 6522 "parse.y"
18111 {
18112 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18113 (yyval.id) = (yyvsp[0].id);
18114 /*% ripper: blockarg!($:2) %*/
18115 }
18116#line 18117 "parse.c"
18117 break;
18118
18119 case 812: /* f_block_arg: blkarg_mark "'nil'" */
18120#line 6528 "parse.y"
18121 {
18122 (yyval.id) = idNil;
18123 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
18124 }
18125#line 18126 "parse.c"
18126 break;
18127
18128 case 813: /* f_block_arg: blkarg_mark */
18129#line 6533 "parse.y"
18130 {
18131 arg_var(p, idFWD_BLOCK);
18132 (yyval.id) = idFWD_BLOCK;
18133 /*% ripper: blockarg!(Qnil) %*/
18134 }
18135#line 18136 "parse.c"
18136 break;
18137
18138 case 816: /* opt_comma: option_',' */
18139#line 6541 "parse.y"
18140 {
18141 (yyval.id) = 0;
18142 /*% ripper: Qnil %*/
18143 }
18144#line 18145 "parse.c"
18145 break;
18146
18147 case 817: /* value_expr_singleton_expr: singleton_expr */
18148#line 3153 "parse.y"
18149 {
18150 value_expr(p, (yyvsp[0].node));
18151 (yyval.node) = (yyvsp[0].node);
18152 }
18153#line 18154 "parse.c"
18154 break;
18155
18156 case 818: /* singleton: value_expr_singleton_expr */
18157#line 6549 "parse.y"
18158 {
18159 NODE *expr = last_expr_node((yyvsp[0].node));
18160 switch (nd_type(expr)) {
18161 case NODE_STR:
18162 case NODE_DSTR:
18163 case NODE_XSTR:
18164 case NODE_DXSTR:
18165 case NODE_REGX:
18166 case NODE_DREGX:
18167 case NODE_SYM:
18168 case NODE_LINE:
18169 case NODE_FILE:
18170 case NODE_ENCODING:
18171 case NODE_INTEGER:
18172 case NODE_FLOAT:
18173 case NODE_RATIONAL:
18174 case NODE_IMAGINARY:
18175 case NODE_DSYM:
18176 case NODE_LIST:
18177 case NODE_ZLIST:
18178 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
18179 break;
18180 default:
18181 break;
18182 }
18183 (yyval.node) = (yyvsp[0].node);
18184 }
18185#line 18186 "parse.c"
18186 break;
18187
18188 case 820: /* $@41: %empty */
18189#line 6580 "parse.y"
18190 {
18191 SET_LEX_STATE(EXPR_BEG);
18192 p->ctxt.in_argdef = 0;
18193 }
18194#line 18195 "parse.c"
18195 break;
18196
18197 case 821: /* singleton_expr: '(' $@41 expr rparen */
18198#line 6585 "parse.y"
18199 {
18200 p->ctxt.in_argdef = 1;
18201 (yyval.node) = (yyvsp[-1].node);
18202 /*% ripper: paren!($:3) %*/
18203 }
18204#line 18205 "parse.c"
18205 break;
18206
18207 case 823: /* assoc_list: assocs trailer */
18208#line 6594 "parse.y"
18209 {
18210 (yyval.node) = (yyvsp[-1].node);
18211 /*% ripper: assoclist_from_args!($:1) %*/
18212 }
18213#line 18214 "parse.c"
18214 break;
18215
18216 case 825: /* assocs: assocs ',' assoc */
18217#line 6603 "parse.y"
18218 {
18219 NODE *assocs = (yyvsp[-2].node);
18220 NODE *tail = (yyvsp[0].node);
18221 if (!assocs) {
18222 assocs = tail;
18223 }
18224 else if (tail) {
18225 if (RNODE_LIST(assocs)->nd_head) {
18226 NODE *n = RNODE_LIST(tail)->nd_next;
18227 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
18228 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
18229 /* DSTAR */
18230 tail = RNODE_HASH(n)->nd_head;
18231 }
18232 }
18233 if (tail) {
18234 assocs = list_concat(assocs, tail);
18235 }
18236 }
18237 (yyval.node) = assocs;
18238 /*% ripper: rb_ary_push($:1, $:3) %*/
18239 }
18240#line 18241 "parse.c"
18241 break;
18242
18243 case 826: /* assoc: arg_value "=>" arg_value */
18244#line 6628 "parse.y"
18245 {
18246 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
18247 /*% ripper: assoc_new!($:1, $:3) %*/
18248 }
18249#line 18250 "parse.c"
18250 break;
18251
18252 case 827: /* assoc: "label" arg_value */
18253#line 6633 "parse.y"
18254 {
18255 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
18256 /*% ripper: assoc_new!($:1, $:2) %*/
18257 }
18258#line 18259 "parse.c"
18259 break;
18260
18261 case 828: /* assoc: "label" */
18262#line 6638 "parse.y"
18263 {
18264 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
18265 if (!val) val = NEW_ERROR(&(yyloc));
18266 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
18267 /*% ripper: assoc_new!($:1, Qnil) %*/
18268 }
18269#line 18270 "parse.c"
18270 break;
18271
18272 case 829: /* assoc: "string literal" string_contents tLABEL_END arg_value */
18273#line 6645 "parse.y"
18274 {
18275 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
18276 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
18277 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
18278 }
18279#line 18280 "parse.c"
18280 break;
18281
18282 case 830: /* assoc: "**arg" arg_value */
18283#line 6651 "parse.y"
18284 {
18285 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
18286 /*% ripper: assoc_splat!($:2) %*/
18287 }
18288#line 18289 "parse.c"
18289 break;
18290
18291 case 831: /* assoc: "**arg" */
18292#line 6656 "parse.y"
18293 {
18294 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
18295 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
18296 NEW_LVAR(idFWD_KWREST, &(yyloc)));
18297 /*% ripper: assoc_splat!(Qnil) %*/
18298 }
18299#line 18300 "parse.c"
18300 break;
18301
18302 case 850: /* term: ';' */
18303#line 6703 "parse.y"
18304 {
18305 yyerrok;
18306 token_flush(p);
18307 if (p->ctxt.in_defined) {
18308 p->ctxt.has_trailing_semicolon = 1;
18309 }
18310 }
18311#line 18312 "parse.c"
18312 break;
18313
18314 case 851: /* term: '\n' */
18315#line 6711 "parse.y"
18316 {
18317 (yyloc).end_pos = (yyloc).beg_pos;
18318 token_flush(p);
18319 }
18320#line 18321 "parse.c"
18321 break;
18322
18323 case 853: /* terms: terms ';' */
18324#line 6718 "parse.y"
18325 {yyerrok;}
18326#line 18327 "parse.c"
18327 break;
18328
18329 case 854: /* none: %empty */
18330#line 6722 "parse.y"
18331 {
18332 (yyval.node) = 0;
18333 /*% ripper: Qnil %*/
18334 }
18335#line 18336 "parse.c"
18336 break;
18337
18338
18339#line 18340 "parse.c"
18340
18341 default: break;
18342 }
18343 /* User semantic actions sometimes alter yychar, and that requires
18344 that yytoken be updated with the new translation. We take the
18345 approach of translating immediately before every use of yytoken.
18346 One alternative is translating here after every semantic action,
18347 but that translation would be missed if the semantic action invokes
18348 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18349 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18350 incorrect destructor might then be invoked immediately. In the
18351 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18352 to an incorrect destructor call or verbose syntax error message
18353 before the lookahead is translated. */
18354 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18355
18356 YYPOPSTACK (yylen);
18357 /* %after-reduce function. */
18358#line 2665 "parse.y"
18359 {after_reduce(yylen, p);}
18360#line 18361 "parse.c"
18361
18362 yylen = 0;
18363
18364 *++yyvsp = yyval;
18365 *++yylsp = yyloc;
18366
18367 /* Now 'shift' the result of the reduction. Determine what state
18368 that goes to, based on the state we popped back to and the rule
18369 number reduced by. */
18370 {
18371 const int yylhs = yyr1[yyn] - YYNTOKENS;
18372 const int yyi = yypgoto[yylhs] + *yyssp;
18373 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18374 ? yytable[yyi]
18375 : yydefgoto[yylhs]);
18376 }
18377
18378 goto yynewstate;
18379
18380
18381/*--------------------------------------.
18382| yyerrlab -- here on detecting error. |
18383`--------------------------------------*/
18384yyerrlab:
18385 /* Make sure we have latest lookahead translation. See comments at
18386 user semantic actions for why this is necessary. */
18387 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18388 /* If not already recovering from an error, report this error. */
18389 if (!yyerrstatus)
18390 {
18391 ++yynerrs;
18392 {
18393 yypcontext_t yyctx
18394 = {yyssp, yytoken, &yylloc};
18395 char const *yymsgp = YY_("syntax error");
18396 int yysyntax_error_status;
18397 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18398 if (yysyntax_error_status == 0)
18399 yymsgp = yymsg;
18400 else if (yysyntax_error_status == -1)
18401 {
18402 if (yymsg != yymsgbuf)
18403 YYSTACK_FREE (yymsg);
18404 yymsg = YY_CAST (char *,
18405 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18406 if (yymsg)
18407 {
18408 yysyntax_error_status
18409 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18410 yymsgp = yymsg;
18411 }
18412 else
18413 {
18414 yymsg = yymsgbuf;
18415 yymsg_alloc = sizeof yymsgbuf;
18416 yysyntax_error_status = YYENOMEM;
18417 }
18418 }
18419 yyerror (&yylloc, p, yymsgp);
18420 if (yysyntax_error_status == YYENOMEM)
18421 YYNOMEM;
18422 }
18423 }
18424
18425 yyerror_range[1] = yylloc;
18426 if (yyerrstatus == 3)
18427 {
18428 /* If just tried and failed to reuse lookahead token after an
18429 error, discard it. */
18430
18431 if (yychar <= END_OF_INPUT)
18432 {
18433 /* Return failure if at end of input. */
18434 if (yychar == END_OF_INPUT)
18435 YYABORT;
18436 }
18437 else
18438 {
18439 yydestruct ("Error: discarding",
18440 yytoken, &yylval, &yylloc, p);
18441 yychar = YYEMPTY;
18442 }
18443 }
18444
18445 /* Else will try to reuse lookahead token after shifting the error
18446 token. */
18447 goto yyerrlab1;
18448
18449
18450/*---------------------------------------------------.
18451| yyerrorlab -- error raised explicitly by YYERROR. |
18452`---------------------------------------------------*/
18453yyerrorlab:
18454 /* Pacify compilers when the user code never invokes YYERROR and the
18455 label yyerrorlab therefore never appears in user code. */
18456 if (0)
18457 YYERROR;
18458 ++yynerrs;
18459
18460 /* Do not reclaim the symbols of the rule whose action triggered
18461 this YYERROR. */
18462 YYPOPSTACK (yylen);
18463 /* %after-pop-stack function. */
18464#line 2667 "parse.y"
18465 {after_pop_stack(yylen, p);}
18466#line 18467 "parse.c"
18467
18468 yylen = 0;
18469 YY_STACK_PRINT (yyss, yyssp, p);
18470 yystate = *yyssp;
18471 goto yyerrlab1;
18472
18473
18474/*-------------------------------------------------------------.
18475| yyerrlab1 -- common code for both syntax error and YYERROR. |
18476`-------------------------------------------------------------*/
18477yyerrlab1:
18478 yyerrstatus = 3; /* Each real token shifted decrements this. */
18479
18480 /* Pop stack until we find a state that shifts the error token. */
18481 for (;;)
18482 {
18483 yyn = yypact[yystate];
18484 if (!yypact_value_is_default (yyn))
18485 {
18486 yyn += YYSYMBOL_YYerror;
18487 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18488 {
18489 yyn = yytable[yyn];
18490 if (0 < yyn)
18491 break;
18492 }
18493 }
18494
18495 /* Pop the current state because it cannot handle the error token. */
18496 if (yyssp == yyss)
18497 YYABORT;
18498
18499 yyerror_range[1] = *yylsp;
18500 yydestruct ("Error: popping",
18501 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18502 YYPOPSTACK (1);
18503 /* %after-pop-stack function. */
18504#line 2667 "parse.y"
18505 {after_pop_stack(1, p);}
18506#line 18507 "parse.c"
18507
18508 yystate = *yyssp;
18509 YY_STACK_PRINT (yyss, yyssp, p);
18510 }
18511
18512 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18513 *++yyvsp = yylval;
18514 YY_IGNORE_MAYBE_UNINITIALIZED_END
18515
18516 yyerror_range[2] = yylloc;
18517 ++yylsp;
18518 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18519
18520 /* Shift the error token. */
18521 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18522 /* %after-shift-error-token code. */
18523#line 2666 "parse.y"
18524 {after_shift_error_token(p);}
18525#line 18526 "parse.c"
18526
18527
18528 yystate = yyn;
18529 goto yynewstate;
18530
18531
18532/*-------------------------------------.
18533| yyacceptlab -- YYACCEPT comes here. |
18534`-------------------------------------*/
18535yyacceptlab:
18536 yyresult = 0;
18537 goto yyreturnlab;
18538
18539
18540/*-----------------------------------.
18541| yyabortlab -- YYABORT comes here. |
18542`-----------------------------------*/
18543yyabortlab:
18544 yyresult = 1;
18545 goto yyreturnlab;
18546
18547
18548/*-----------------------------------------------------------.
18549| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18550`-----------------------------------------------------------*/
18551yyexhaustedlab:
18552 yyerror (&yylloc, p, YY_("memory exhausted"));
18553 yyresult = 2;
18554 goto yyreturnlab;
18555
18556
18557/*----------------------------------------------------------.
18558| yyreturnlab -- parsing is finished, clean up and return. |
18559`----------------------------------------------------------*/
18560yyreturnlab:
18561 if (yychar != YYEMPTY)
18562 {
18563 /* Make sure we have latest lookahead translation. See comments at
18564 user semantic actions for why this is necessary. */
18565 yytoken = YYTRANSLATE (yychar);
18566 yydestruct ("Cleanup: discarding lookahead",
18567 yytoken, &yylval, &yylloc, p);
18568 }
18569 /* Do not reclaim the symbols of the rule whose action triggered
18570 this YYABORT or YYACCEPT. */
18571 YYPOPSTACK (yylen);
18572 YY_STACK_PRINT (yyss, yyssp, p);
18573 while (yyssp != yyss)
18574 {
18575 yydestruct ("Cleanup: popping",
18576 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18577 YYPOPSTACK (1);
18578 }
18579#ifndef yyoverflow
18580 if (yyss != yyssa)
18581 YYSTACK_FREE (yyss);
18582#endif
18583 if (yymsg != yymsgbuf)
18584 YYSTACK_FREE (yymsg);
18585 return yyresult;
18586}
18587
18588#line 6727 "parse.y"
18589
18590# undef p
18591# undef yylex
18592# undef yylval
18593# define yylval (*p->lval)
18594
18595static int regx_options(struct parser_params*);
18596static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18597static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18598static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18599static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18600
18601#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18602
18603# define set_yylval_node(x) { \
18604 YYLTYPE _cur_loc; \
18605 rb_parser_set_location(p, &_cur_loc); \
18606 yylval.node = (x); \
18607 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18608}
18609# define set_yylval_str(x) \
18610do { \
18611 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18612 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18613} while(0)
18614# define set_yylval_num(x) { \
18615 yylval.num = (x); \
18616 set_parser_s_value(x); \
18617}
18618# define set_yylval_id(x) (yylval.id = (x))
18619# define set_yylval_name(x) { \
18620 (yylval.id = (x)); \
18621 set_parser_s_value(ID2SYM(x)); \
18622}
18623# define yylval_id() (yylval.id)
18624
18625#define set_yylval_noname() set_yylval_id(keyword_nil)
18626#define has_delayed_token(p) (p->delayed.token != NULL)
18627
18628#ifndef RIPPER
18629#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18630#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18631
18632static bool
18633parser_has_token(struct parser_params *p)
18634{
18635 const char *const pcur = p->lex.pcur;
18636 const char *const ptok = p->lex.ptok;
18637 if (p->keep_tokens && (pcur < ptok)) {
18638 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18639 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18640 }
18641 return pcur > ptok;
18642}
18643
18644static const char *
18645escaped_char(int c)
18646{
18647 switch (c) {
18648 case '"': return "\\\"";
18649 case '\\': return "\\\\";
18650 case '\0': return "\\0";
18651 case '\n': return "\\n";
18652 case '\r': return "\\r";
18653 case '\t': return "\\t";
18654 case '\f': return "\\f";
18655 case '\013': return "\\v";
18656 case '\010': return "\\b";
18657 case '\007': return "\\a";
18658 case '\033': return "\\e";
18659 case '\x7f': return "\\c?";
18660 }
18661 return NULL;
18662}
18663
18664static rb_parser_string_t *
18665rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18666{
18667 rb_encoding *enc = p->enc;
18668 const char *ptr = str->ptr;
18669 const char *pend = ptr + str->len;
18670 const char *prev = ptr;
18671 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18672 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18673
18674 while (ptr < pend) {
18675 unsigned int c;
18676 const char *cc;
18677 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18678 if (!MBCLEN_CHARFOUND_P(n)) {
18679 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18680 n = rb_enc_mbminlen(enc);
18681 if (pend < ptr + n)
18682 n = (int)(pend - ptr);
18683 while (n--) {
18684 c = *ptr & 0xf0 >> 4;
18685 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18686 c = *ptr & 0x0f;
18687 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18688 parser_str_cat(result, charbuf, 4);
18689 prev = ++ptr;
18690 }
18691 continue;
18692 }
18693 n = MBCLEN_CHARFOUND_LEN(n);
18694 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18695 ptr += n;
18696 cc = escaped_char(c);
18697 if (cc) {
18698 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18699 parser_str_cat_cstr(result, cc);
18700 prev = ptr;
18701 }
18702 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18703 }
18704 else {
18705 if (ptr - n > prev) {
18706 parser_str_cat(result, prev, ptr - n - prev);
18707 prev = ptr - n;
18708 }
18709 parser_str_cat(result, prev, ptr - prev);
18710 prev = ptr;
18711 }
18712 }
18713 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18714
18715 return result;
18716}
18717
18718static void
18719parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18720{
18722 token->id = p->token_id;
18723 token->type_name = parser_token2char(p, t);
18724 token->str = str;
18725 token->loc.beg_pos = p->yylloc->beg_pos;
18726 token->loc.end_pos = p->yylloc->end_pos;
18727 rb_parser_ary_push_ast_token(p, p->tokens, token);
18728 p->token_id++;
18729
18730 if (p->debug) {
18731 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18732 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18733 line, token->id, token->type_name, str_escaped->ptr,
18734 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18735 token->loc.end_pos.lineno, token->loc.end_pos.column);
18736 rb_parser_string_free(p, str_escaped);
18737 }
18738}
18739
18740static void
18741parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18742{
18743 debug_token_line(p, "parser_dispatch_scan_event", line);
18744
18745 if (!parser_has_token(p)) return;
18746
18747 RUBY_SET_YYLLOC(*p->yylloc);
18748
18749 if (p->keep_tokens) {
18750 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18751 parser_append_tokens(p, str, t, line);
18752 }
18753
18754 token_flush(p);
18755}
18756
18757#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18758static void
18759parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18760{
18761 debug_token_line(p, "parser_dispatch_delayed_token", line);
18762
18763 if (!has_delayed_token(p)) return;
18764
18765 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18766
18767 if (p->keep_tokens) {
18768 /* p->delayed.token is freed by rb_parser_tokens_free */
18769 parser_append_tokens(p, p->delayed.token, t, line);
18770 }
18771 else {
18772 rb_parser_string_free(p, p->delayed.token);
18773 }
18774
18775 p->delayed.token = NULL;
18776}
18777#else
18778#define literal_flush(p, ptr) ((void)(ptr))
18779
18780static int
18781ripper_has_scan_event(struct parser_params *p)
18782{
18783 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18784 return p->lex.pcur > p->lex.ptok;
18785}
18786
18787static VALUE
18788ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18789{
18790 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18791 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18792 RUBY_SET_YYLLOC(*p->yylloc);
18793 token_flush(p);
18794 return rval;
18795}
18796
18797static void
18798ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18799{
18800 if (!ripper_has_scan_event(p)) return;
18801
18802 set_parser_s_value(ripper_scan_event_val(p, t));
18803}
18804#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18805
18806static void
18807ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18808{
18809 /* save and adjust the location to delayed token for callbacks */
18810 int saved_line = p->ruby_sourceline;
18811 const char *saved_tokp = p->lex.ptok;
18812 VALUE s_value, str;
18813
18814 if (!has_delayed_token(p)) return;
18815 p->ruby_sourceline = p->delayed.beg_line;
18816 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18817 str = rb_str_new_mutable_parser_string(p->delayed.token);
18818 rb_parser_string_free(p, p->delayed.token);
18819 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18820 set_parser_s_value(s_value);
18821 p->delayed.token = NULL;
18822 p->ruby_sourceline = saved_line;
18823 p->lex.ptok = saved_tokp;
18824}
18825#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18826#endif /* RIPPER */
18827
18828static inline int
18829is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18830{
18831 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18832}
18833
18834static inline bool
18835peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18836{
18837 const char *ptr = p->lex.pcur + at;
18838 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18839 if (memcmp(ptr, str, len)) return false;
18840 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18841 switch (ptr[len]) {
18842 case '!': case '?': return false;
18843 }
18844 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18845}
18846
18847static inline int
18848parser_is_identchar(struct parser_params *p)
18849{
18850 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18851}
18852
18853static inline int
18854parser_isascii(struct parser_params *p)
18855{
18856 return ISASCII(*(p->lex.pcur-1));
18857}
18858
18859static void
18860token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18861{
18862 int column = 1, nonspc = 0, i;
18863 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18864 if (*ptr == '\t') {
18865 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18866 }
18867 column++;
18868 if (*ptr != ' ' && *ptr != '\t') {
18869 nonspc = 1;
18870 }
18871 }
18872
18873 ptinfo->beg = loc->beg_pos;
18874 ptinfo->indent = column;
18875 ptinfo->nonspc = nonspc;
18876}
18877
18878static void
18879token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18880{
18881 token_info *ptinfo;
18882
18883 if (!p->token_info_enabled) return;
18884 ptinfo = ALLOC(token_info);
18885 ptinfo->token = token;
18886 ptinfo->next = p->token_info;
18887 token_info_setup(ptinfo, p->lex.pbeg, loc);
18888
18889 p->token_info = ptinfo;
18890}
18891
18892static void
18893token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18894{
18895 token_info *ptinfo_beg = p->token_info;
18896
18897 if (!ptinfo_beg) return;
18898
18899 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18900 token_info_warn(p, token, ptinfo_beg, 1, loc);
18901
18902 p->token_info = ptinfo_beg->next;
18903 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18904}
18905
18906static void
18907token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18908{
18909 token_info *ptinfo_beg = p->token_info;
18910
18911 if (!ptinfo_beg) return;
18912 p->token_info = ptinfo_beg->next;
18913
18914 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18915 ptinfo_beg->beg.column != beg_pos.column ||
18916 strcmp(ptinfo_beg->token, token)) {
18917 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18918 beg_pos.lineno, beg_pos.column, token,
18919 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18920 ptinfo_beg->token);
18921 }
18922
18923 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18924}
18925
18926static void
18927token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18928{
18929 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18930 if (!p->token_info_enabled) return;
18931 if (!ptinfo_beg) return;
18932 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18933 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18934 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18935 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18936 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18937 rb_warn3L(ptinfo_end->beg.lineno,
18938 "mismatched indentations at '%s' with '%s' at %d",
18939 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18940}
18941
18942static int
18943parser_precise_mbclen(struct parser_params *p, const char *ptr)
18944{
18945 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18946 if (!MBCLEN_CHARFOUND_P(len)) {
18947 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18948 return -1;
18949 }
18950 return len;
18951}
18952
18953#ifndef RIPPER
18954static inline void
18955parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18956{
18957 rb_parser_string_t *str;
18958 int lineno = p->ruby_sourceline;
18959 if (!yylloc) {
18960 return;
18961 }
18962 else if (yylloc->beg_pos.lineno == lineno) {
18963 str = p->lex.lastline;
18964 }
18965 else {
18966 return;
18967 }
18968 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18969}
18970
18971static int
18972parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18973{
18974#if 0
18975 YYLTYPE current;
18976
18977 if (!yylloc) {
18978 yylloc = RUBY_SET_YYLLOC(current);
18979 }
18980 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18981 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18982 yylloc = 0;
18983 }
18984#endif
18985 parser_compile_error(p, yylloc, "%s", msg);
18986 parser_show_error_line(p, yylloc);
18987 return 0;
18988}
18989
18990static int
18991parser_yyerror0(struct parser_params *p, const char *msg)
18992{
18993 YYLTYPE current;
18994 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18995}
18996
18997void
18998ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18999{
19000 VALUE mesg;
19001 const int max_line_margin = 30;
19002 const char *ptr, *ptr_end, *pt, *pb;
19003 const char *pre = "", *post = "", *pend;
19004 const char *code = "", *caret = "";
19005 const char *lim;
19006 const char *const pbeg = PARSER_STRING_PTR(str);
19007 char *buf;
19008 long len;
19009 int i;
19010
19011 if (!yylloc) return;
19012 pend = rb_parser_string_end(str);
19013 if (pend > pbeg && pend[-1] == '\n') {
19014 if (--pend > pbeg && pend[-1] == '\r') --pend;
19015 }
19016
19017 pt = pend;
19018 if (lineno == yylloc->end_pos.lineno &&
19019 (pend - pbeg) > yylloc->end_pos.column) {
19020 pt = pbeg + yylloc->end_pos.column;
19021 }
19022
19023 ptr = ptr_end = pt;
19024 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
19025 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
19026
19027 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
19028 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
19029
19030 len = ptr_end - ptr;
19031 if (len > 4) {
19032 if (ptr > pbeg) {
19033 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
19034 if (ptr > pbeg) pre = "...";
19035 }
19036 if (ptr_end < pend) {
19037 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
19038 if (ptr_end < pend) post = "...";
19039 }
19040 }
19041 pb = pbeg;
19042 if (lineno == yylloc->beg_pos.lineno) {
19043 pb += yylloc->beg_pos.column;
19044 if (pb > pt) pb = pt;
19045 }
19046 if (pb < ptr) pb = ptr;
19047 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
19048 return;
19049 }
19050 if (RTEST(errbuf)) {
19051 mesg = rb_attr_get(errbuf, idMesg);
19052 if (char_at_end(p, mesg, '\n') != '\n')
19053 rb_str_cat_cstr(mesg, "\n");
19054 }
19055 else {
19056 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
19057 }
19058 if (!errbuf && rb_stderr_tty_p()) {
19059#define CSI_BEGIN "\033["
19060#define CSI_SGR "m"
19061 rb_str_catf(mesg,
19062 CSI_BEGIN""CSI_SGR"%s" /* pre */
19063 CSI_BEGIN"1"CSI_SGR"%.*s"
19064 CSI_BEGIN"1;4"CSI_SGR"%.*s"
19065 CSI_BEGIN";1"CSI_SGR"%.*s"
19066 CSI_BEGIN""CSI_SGR"%s" /* post */
19067 "\n",
19068 pre,
19069 (int)(pb - ptr), ptr,
19070 (int)(pt - pb), pb,
19071 (int)(ptr_end - pt), pt,
19072 post);
19073 }
19074 else {
19075 char *p2;
19076
19077 len = ptr_end - ptr;
19078 lim = pt < pend ? pt : pend;
19079 i = (int)(lim - ptr);
19080 buf = ALLOCA_N(char, i+2);
19081 code = ptr;
19082 caret = p2 = buf;
19083 if (ptr <= pb) {
19084 while (ptr < pb) {
19085 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
19086 }
19087 *p2++ = '^';
19088 ptr++;
19089 }
19090 if (lim > ptr) {
19091 memset(p2, '~', (lim - ptr));
19092 p2 += (lim - ptr);
19093 }
19094 *p2 = '\0';
19095 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
19096 pre, (int)len, code, post,
19097 pre, caret);
19098 }
19099 if (!errbuf) rb_write_error_str(mesg);
19100}
19101#else
19102
19103static int
19104parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
19105{
19106 const char *pcur = 0, *ptok = 0;
19107 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
19108 p->ruby_sourceline == yylloc->end_pos.lineno) {
19109 pcur = p->lex.pcur;
19110 ptok = p->lex.ptok;
19111 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
19112 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
19113 }
19114 parser_yyerror0(p, msg);
19115 if (pcur) {
19116 p->lex.ptok = ptok;
19117 p->lex.pcur = pcur;
19118 }
19119 return 0;
19120}
19121
19122static int
19123parser_yyerror0(struct parser_params *p, const char *msg)
19124{
19125 dispatch1(parse_error, STR_NEW2(msg));
19126 ripper_error(p);
19127 return 0;
19128}
19129
19130static inline void
19131parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19132{
19133}
19134#endif /* !RIPPER */
19135
19136static int
19137vtable_size(const struct vtable *tbl)
19138{
19139 if (!DVARS_TERMINAL_P(tbl)) {
19140 return tbl->pos;
19141 }
19142 else {
19143 return 0;
19144 }
19145}
19146
19147static struct vtable *
19148vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
19149{
19150 struct vtable *tbl = ALLOC(struct vtable);
19151 tbl->pos = 0;
19152 tbl->capa = 8;
19153 tbl->tbl = ALLOC_N(ID, tbl->capa);
19154 tbl->prev = prev;
19155#ifndef RIPPER
19156 if (p->debug) {
19157 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
19158 }
19159#endif
19160 return tbl;
19161}
19162#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
19163
19164static void
19165vtable_free_gen(struct parser_params *p, int line, const char *name,
19166 struct vtable *tbl)
19167{
19168#ifndef RIPPER
19169 if (p->debug) {
19170 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
19171 }
19172#endif
19173 if (!DVARS_TERMINAL_P(tbl)) {
19174 if (tbl->tbl) {
19175 ruby_xfree_sized(tbl->tbl, tbl->capa * sizeof(ID));
19176 }
19177 ruby_xfree_sized(tbl, sizeof(*tbl));
19178 }
19179}
19180#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
19181
19182static void
19183vtable_add_gen(struct parser_params *p, int line, const char *name,
19184 struct vtable *tbl, ID id)
19185{
19186#ifndef RIPPER
19187 if (p->debug) {
19188 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
19189 line, name, (void *)tbl, rb_id2name(id));
19190 }
19191#endif
19192 if (DVARS_TERMINAL_P(tbl)) {
19193 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
19194 return;
19195 }
19196 if (tbl->pos == tbl->capa) {
19197 tbl->capa = tbl->capa * 2;
19198 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
19199 }
19200 tbl->tbl[tbl->pos++] = id;
19201}
19202#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
19203
19204static void
19205vtable_pop_gen(struct parser_params *p, int line, const char *name,
19206 struct vtable *tbl, int n)
19207{
19208 if (p->debug) {
19209 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
19210 line, name, (void *)tbl, n);
19211 }
19212 if (tbl->pos < n) {
19213 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
19214 return;
19215 }
19216 tbl->pos -= n;
19217}
19218#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
19219
19220static int
19221vtable_included(const struct vtable * tbl, ID id)
19222{
19223 int i;
19224
19225 if (!DVARS_TERMINAL_P(tbl)) {
19226 for (i = 0; i < tbl->pos; i++) {
19227 if (tbl->tbl[i] == id) {
19228 return i+1;
19229 }
19230 }
19231 }
19232 return 0;
19233}
19234
19235static void parser_prepare(struct parser_params *p);
19236
19237static int
19238e_option_supplied(struct parser_params *p)
19239{
19240 return strcmp(p->ruby_sourcefile, "-e") == 0;
19241}
19242
19243#ifndef RIPPER
19244static NODE *parser_append_options(struct parser_params *p, NODE *node);
19245
19246static VALUE
19247yycompile0(VALUE arg)
19248{
19249 int n;
19250 NODE *tree;
19251 struct parser_params *p = (struct parser_params *)arg;
19252 int cov = FALSE;
19253
19254 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
19255 cov = TRUE;
19256 }
19257
19258 if (p->debug_lines) {
19259 p->ast->body.script_lines = p->debug_lines;
19260 }
19261
19262 parser_prepare(p);
19263#define RUBY_DTRACE_PARSE_HOOK(name) \
19264 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
19265 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
19266 }
19267 RUBY_DTRACE_PARSE_HOOK(BEGIN);
19268 n = yyparse(p);
19269 RUBY_DTRACE_PARSE_HOOK(END);
19270
19271 p->debug_lines = 0;
19272
19273 xfree(p->lex.strterm);
19274 p->lex.strterm = 0;
19275 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
19276 if (n || p->error_p) {
19277 VALUE mesg = p->error_buffer;
19278 if (!mesg) {
19279 mesg = syntax_error_new();
19280 }
19281 if (!p->error_tolerant) {
19282 rb_set_errinfo(mesg);
19283 return FALSE;
19284 }
19285 }
19286 tree = p->eval_tree;
19287 if (!tree) {
19288 tree = NEW_NIL(&NULL_LOC);
19289 }
19290 else {
19291 rb_parser_ary_t *tokens = p->tokens;
19292 NODE *prelude;
19293 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
19294 prelude = block_append(p, p->eval_tree_begin, body);
19295 RNODE_SCOPE(tree)->nd_body = prelude;
19296 p->ast->body.frozen_string_literal = p->frozen_string_literal;
19297 p->ast->body.coverage_enabled = cov;
19298 if (p->keep_tokens) {
19299 p->ast->node_buffer->tokens = tokens;
19300 p->tokens = NULL;
19301 }
19302 }
19303 p->ast->body.root = tree;
19304 p->ast->body.line_count = p->line_count;
19305 return TRUE;
19306}
19307
19308static rb_ast_t *
19309yycompile(struct parser_params *p, VALUE fname, int line)
19310{
19311 rb_ast_t *ast;
19312 if (NIL_P(fname)) {
19313 p->ruby_sourcefile_string = Qnil;
19314 p->ruby_sourcefile = "(none)";
19315 }
19316 else {
19317 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
19318 p->ruby_sourcefile = StringValueCStr(fname);
19319 }
19320 p->ruby_sourceline = line - 1;
19321
19322 p->lvtbl = NULL;
19323
19324 p->ast = ast = rb_ast_new();
19325 compile_callback(yycompile0, (VALUE)p);
19326 ast->body.source_hash = rb_source_hash_finalize(&p->source_hash);
19327 ast->body.has_source_hash = 1;
19328 p->ast = 0;
19329
19330 while (p->lvtbl) {
19331 local_pop(p);
19332 }
19333
19334 return ast;
19335}
19336#endif /* !RIPPER */
19337
19338static rb_encoding *
19339must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19340{
19341 rb_encoding *enc = rb_parser_str_get_encoding(s);
19342 if (!rb_enc_asciicompat(enc)) {
19343 rb_raise(rb_eArgError, "invalid source encoding");
19344 }
19345 return enc;
19346}
19347
19348static rb_parser_string_t *
19349lex_getline(struct parser_params *p)
19350{
19351 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19352 if (!line) return 0;
19353 p->line_count++;
19354 rb_source_hash_update(&p->source_hash, (const uint8_t *)line->ptr, (size_t)line->len);
19355 string_buffer_append(p, line);
19356 must_be_ascii_compatible(p, line);
19357 return line;
19358}
19359
19360#ifndef RIPPER
19361rb_ast_t*
19362rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19363{
19364 p->lex.gets = gets;
19365 p->lex.input = input;
19366 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19367
19368 return yycompile(p, fname, line);
19369}
19370#endif /* !RIPPER */
19371
19372#define STR_FUNC_ESCAPE 0x01
19373#define STR_FUNC_EXPAND 0x02
19374#define STR_FUNC_REGEXP 0x04
19375#define STR_FUNC_QWORDS 0x08
19376#define STR_FUNC_SYMBOL 0x10
19377#define STR_FUNC_INDENT 0x20
19378#define STR_FUNC_LABEL 0x40
19379#define STR_FUNC_LIST 0x4000
19380#define STR_FUNC_TERM 0x8000
19381
19382enum string_type {
19383 str_label = STR_FUNC_LABEL,
19384 str_squote = (0),
19385 str_dquote = (STR_FUNC_EXPAND),
19386 str_xquote = (STR_FUNC_EXPAND),
19387 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19388 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19389 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19390 str_ssym = (STR_FUNC_SYMBOL),
19391 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19392};
19393
19394static rb_parser_string_t *
19395parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
19396{
19397 rb_parser_string_t *pstr;
19398
19399 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19400
19401 if (!(func & STR_FUNC_REGEXP)) {
19402 if (rb_parser_is_ascii_string(p, pstr)) {
19403 }
19404 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19405 /* everything is valid in ASCII-8BIT */
19406 enc = rb_ascii8bit_encoding();
19407 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19408 }
19409 }
19410
19411 return pstr;
19412}
19413
19414static int
19415strterm_is_heredoc(rb_strterm_t *strterm)
19416{
19417 return strterm->heredoc;
19418}
19419
19420static rb_strterm_t *
19421new_strterm(struct parser_params *p, int func, int term, int paren)
19422{
19423 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19424 strterm->u.literal.func = func;
19425 strterm->u.literal.term = term;
19426 strterm->u.literal.paren = paren;
19427 return strterm;
19428}
19429
19430static rb_strterm_t *
19431new_heredoc(struct parser_params *p)
19432{
19433 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19434 strterm->heredoc = true;
19435 return strterm;
19436}
19437
19438#define peek(p,c) peek_n(p, (c), 0)
19439#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19440#define peekc(p) peekc_n(p, 0)
19441#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19442
19443#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19444static void
19445parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19446{
19447 debug_token_line(p, "add_delayed_token", line);
19448
19449 if (tok < end) {
19450 if (has_delayed_token(p)) {
19451 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19452 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19453 int end_col = (next_line ? 0 : p->delayed.end_col);
19454 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19455 dispatch_delayed_token(p, tSTRING_CONTENT);
19456 }
19457 }
19458 if (!has_delayed_token(p)) {
19459 p->delayed.token = rb_parser_string_new(p, 0, 0);
19460 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19461 p->delayed.beg_line = p->ruby_sourceline;
19462 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
19463 }
19464 parser_str_cat(p->delayed.token, tok, end - tok);
19465 p->delayed.end_line = p->ruby_sourceline;
19466 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19467 p->lex.ptok = end;
19468 }
19469}
19470
19471static void
19472set_lastline(struct parser_params *p, rb_parser_string_t *str)
19473{
19474 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19475 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19476 p->lex.lastline = str;
19477}
19478
19479static int
19480nextline(struct parser_params *p, int set_encoding)
19481{
19482 rb_parser_string_t *str = p->lex.nextline;
19483 p->lex.nextline = 0;
19484 if (!str) {
19485 if (p->eofp)
19486 return -1;
19487
19488 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19489 goto end_of_input;
19490 }
19491
19492 if (!p->lex.input || !(str = lex_getline(p))) {
19493 end_of_input:
19494 p->eofp = 1;
19495 lex_goto_eol(p);
19496 return -1;
19497 }
19498#ifndef RIPPER
19499 if (p->debug_lines) {
19500 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19501 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19502 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19503 }
19504#endif
19505 p->cr_seen = FALSE;
19506 }
19507 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19508 /* after here-document without terminator */
19509 goto end_of_input;
19510 }
19511 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19512 if (p->heredoc_end > 0) {
19513 p->ruby_sourceline = p->heredoc_end;
19514 p->heredoc_end = 0;
19515 }
19516 p->ruby_sourceline++;
19517 set_lastline(p, str);
19518 token_flush(p);
19519 return 0;
19520}
19521
19522static int
19523parser_cr(struct parser_params *p, int c)
19524{
19525 if (peek(p, '\n')) {
19526 p->lex.pcur++;
19527 c = '\n';
19528 }
19529 return c;
19530}
19531
19532static inline int
19533nextc0(struct parser_params *p, int set_encoding)
19534{
19535 int c;
19536
19537 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19538 if (nextline(p, set_encoding)) return -1;
19539 }
19540 c = (unsigned char)*p->lex.pcur++;
19541 if (UNLIKELY(c == '\r')) {
19542 c = parser_cr(p, c);
19543 }
19544
19545 return c;
19546}
19547#define nextc(p) nextc0(p, TRUE)
19548
19549static void
19550pushback(struct parser_params *p, int c)
19551{
19552 if (c == -1) return;
19553 p->eofp = 0;
19554 p->lex.pcur--;
19555 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19556 p->lex.pcur--;
19557 }
19558}
19559
19560#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19561
19562#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19563#define tok(p) (p)->tokenbuf
19564#define toklen(p) (p)->tokidx
19565
19566static int
19567looking_at_eol_p(struct parser_params *p)
19568{
19569 const char *ptr = p->lex.pcur;
19570 while (!lex_eol_ptr_p(p, ptr)) {
19571 int c = (unsigned char)*ptr++;
19572 int eol = (c == '\n' || c == '#');
19573 if (eol || !ISSPACE(c)) {
19574 return eol;
19575 }
19576 }
19577 return TRUE;
19578}
19579
19580static char*
19581newtok(struct parser_params *p)
19582{
19583 p->tokidx = 0;
19584 if (!p->tokenbuf) {
19585 p->toksiz = 60;
19586 p->tokenbuf = ALLOC_N(char, 60);
19587 }
19588 if (p->toksiz > 4096) {
19589 p->toksiz = 60;
19590 REALLOC_N(p->tokenbuf, char, 60);
19591 }
19592 return p->tokenbuf;
19593}
19594
19595static char *
19596tokspace(struct parser_params *p, int n)
19597{
19598 p->tokidx += n;
19599
19600 if (p->tokidx >= p->toksiz) {
19601 do {p->toksiz *= 2;} while (p->toksiz <= p->tokidx);
19602 REALLOC_N(p->tokenbuf, char, p->toksiz);
19603 }
19604 return &p->tokenbuf[p->tokidx-n];
19605}
19606
19607static void
19608tokadd(struct parser_params *p, int c)
19609{
19610 p->tokenbuf[p->tokidx++] = (char)c;
19611 if (p->tokidx >= p->toksiz) {
19612 p->toksiz *= 2;
19613 REALLOC_N(p->tokenbuf, char, p->toksiz);
19614 }
19615}
19616
19617static int
19618tok_hex(struct parser_params *p, size_t *numlen)
19619{
19620 int c;
19621
19622 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19623 if (!*numlen) {
19624 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19625 yyerror0("invalid hex escape");
19626 dispatch_scan_event(p, tSTRING_CONTENT);
19627 return 0;
19628 }
19629 p->lex.pcur += *numlen;
19630 return c;
19631}
19632
19633#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19634
19635static int
19636escaped_control_code(int c)
19637{
19638 int c2 = 0;
19639 switch (c) {
19640 case ' ':
19641 c2 = 's';
19642 break;
19643 case '\n':
19644 c2 = 'n';
19645 break;
19646 case '\t':
19647 c2 = 't';
19648 break;
19649 case '\v':
19650 c2 = 'v';
19651 break;
19652 case '\r':
19653 c2 = 'r';
19654 break;
19655 case '\f':
19656 c2 = 'f';
19657 break;
19658 }
19659 return c2;
19660}
19661
19662#define WARN_SPACE_CHAR(c, prefix) \
19663 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19664
19665static int
19666tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19667 int regexp_literal, const char *begin)
19668{
19669 const int wide = !begin;
19670 size_t numlen;
19671 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19672
19673 p->lex.pcur += numlen;
19674 if (p->lex.strterm == NULL ||
19675 strterm_is_heredoc(p->lex.strterm) ||
19676 (p->lex.strterm->u.literal.func != str_regexp)) {
19677 if (!begin) begin = p->lex.pcur;
19678 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19679 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19680 yyerror0("invalid Unicode escape");
19681 dispatch_scan_event(p, tSTRING_CONTENT);
19682 return wide && numlen > 0;
19683 }
19684 if (codepoint > 0x10ffff) {
19685 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19686 yyerror0("invalid Unicode codepoint (too large)");
19687 dispatch_scan_event(p, tSTRING_CONTENT);
19688 return wide;
19689 }
19690 if ((codepoint & 0xfffff800) == 0xd800) {
19691 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19692 yyerror0("invalid Unicode codepoint");
19693 dispatch_scan_event(p, tSTRING_CONTENT);
19694 return wide;
19695 }
19696 }
19697 if (regexp_literal) {
19698 tokcopy(p, (int)numlen);
19699 }
19700 else if (codepoint >= 0x80) {
19701 rb_encoding *utf8 = rb_utf8_encoding();
19702 if (*encp && utf8 != *encp) {
19703 YYLTYPE loc = RUBY_INIT_YYLLOC();
19704 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19705 parser_show_error_line(p, &loc);
19706 return wide;
19707 }
19708 *encp = utf8;
19709 tokaddmbc(p, codepoint, *encp);
19710 }
19711 else {
19712 tokadd(p, codepoint);
19713 }
19714 return TRUE;
19715}
19716
19717static int tokadd_mbchar(struct parser_params *p, int c);
19718
19719static int
19720tokskip_mbchar(struct parser_params *p)
19721{
19722 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19723 if (len > 0) {
19724 p->lex.pcur += len - 1;
19725 }
19726 return len;
19727}
19728
19729/* return value is for ?\u3042 */
19730static void
19731tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19732 int term, int symbol_literal, int regexp_literal)
19733{
19734 /*
19735 * If `term` is not -1, then we allow multiple codepoints in \u{}
19736 * upto `term` byte, otherwise we're parsing a character literal.
19737 * And then add the codepoints to the current token.
19738 */
19739 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19740
19741 const int open_brace = '{', close_brace = '}';
19742
19743 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19744
19745 if (peek(p, open_brace)) { /* handle \u{...} form */
19746 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19747 /*
19748 * Skip parsing validation code and copy bytes as-is until term or
19749 * closing brace, in order to correctly handle extended regexps where
19750 * invalid unicode escapes are allowed in comments. The regexp parser
19751 * does its own validation and will catch any issues.
19752 */
19753 tokadd(p, open_brace);
19754 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19755 int c = peekc(p);
19756 if (c == close_brace) {
19757 tokadd(p, c);
19758 ++p->lex.pcur;
19759 break;
19760 }
19761 else if (c == term) {
19762 break;
19763 }
19764 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19765 tokadd(p, c);
19766 c = *++p->lex.pcur;
19767 }
19768 tokadd_mbchar(p, c);
19769 }
19770 }
19771 else {
19772 const char *second = NULL;
19773 int c, last = nextc(p);
19774 if (lex_eol_p(p)) goto unterminated;
19775 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19776 while (c != close_brace) {
19777 if (c == term) goto unterminated;
19778 if (second == multiple_codepoints)
19779 second = p->lex.pcur;
19780 if (regexp_literal) tokadd(p, last);
19781 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19782 break;
19783 }
19784 while (ISSPACE(c = peekc(p))) {
19785 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19786 last = c;
19787 }
19788 if (term == -1 && !second)
19789 second = multiple_codepoints;
19790 }
19791
19792 if (c != close_brace) {
19793 unterminated:
19794 flush_string_content(p, rb_utf8_encoding(), 0);
19795 yyerror0("unterminated Unicode escape");
19796 dispatch_scan_event(p, tSTRING_CONTENT);
19797 return;
19798 }
19799 if (second && second != multiple_codepoints) {
19800 const char *pcur = p->lex.pcur;
19801 p->lex.pcur = second;
19802 dispatch_scan_event(p, tSTRING_CONTENT);
19803 token_flush(p);
19804 p->lex.pcur = pcur;
19805 yyerror0(multiple_codepoints);
19806 token_flush(p);
19807 }
19808
19809 if (regexp_literal) tokadd(p, close_brace);
19810 nextc(p);
19811 }
19812 }
19813 else { /* handle \uxxxx form */
19814 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19815 token_flush(p);
19816 return;
19817 }
19818 }
19819}
19820
19821#define ESCAPE_CONTROL 1
19822#define ESCAPE_META 2
19823
19824static int
19825read_escape(struct parser_params *p, int flags, const char *begin)
19826{
19827 int c;
19828 size_t numlen;
19829
19830 switch (c = nextc(p)) {
19831 case '\\': /* Backslash */
19832 return c;
19833
19834 case 'n': /* newline */
19835 return '\n';
19836
19837 case 't': /* horizontal tab */
19838 return '\t';
19839
19840 case 'r': /* carriage-return */
19841 return '\r';
19842
19843 case 'f': /* form-feed */
19844 return '\f';
19845
19846 case 'v': /* vertical tab */
19847 return '\13';
19848
19849 case 'a': /* alarm(bell) */
19850 return '\007';
19851
19852 case 'e': /* escape */
19853 return 033;
19854
19855 case '0': case '1': case '2': case '3': /* octal constant */
19856 case '4': case '5': case '6': case '7':
19857 pushback(p, c);
19858 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19859 p->lex.pcur += numlen;
19860 return c;
19861
19862 case 'x': /* hex constant */
19863 c = tok_hex(p, &numlen);
19864 if (numlen == 0) return 0;
19865 return c;
19866
19867 case 'b': /* backspace */
19868 return '\010';
19869
19870 case 's': /* space */
19871 return ' ';
19872
19873 case 'M':
19874 if (flags & ESCAPE_META) goto eof;
19875 if ((c = nextc(p)) != '-') {
19876 goto eof;
19877 }
19878 if ((c = nextc(p)) == '\\') {
19879 switch (peekc(p)) {
19880 case 'u': case 'U':
19881 nextc(p);
19882 goto eof;
19883 }
19884 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19885 }
19886 else if (c == -1) goto eof;
19887 else if (!ISASCII(c)) {
19888 tokskip_mbchar(p);
19889 goto eof;
19890 }
19891 else {
19892 int c2 = escaped_control_code(c);
19893 if (c2) {
19894 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19895 WARN_SPACE_CHAR(c2, "\\M-");
19896 }
19897 else {
19898 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19899 }
19900 }
19901 else if (ISCNTRL(c)) goto eof;
19902 return ((c & 0xff) | 0x80);
19903 }
19904
19905 case 'C':
19906 if ((c = nextc(p)) != '-') {
19907 goto eof;
19908 }
19909 case 'c':
19910 if (flags & ESCAPE_CONTROL) goto eof;
19911 if ((c = nextc(p))== '\\') {
19912 switch (peekc(p)) {
19913 case 'u': case 'U':
19914 nextc(p);
19915 goto eof;
19916 }
19917 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19918 }
19919 else if (c == '?')
19920 return 0177;
19921 else if (c == -1) goto eof;
19922 else if (!ISASCII(c)) {
19923 tokskip_mbchar(p);
19924 goto eof;
19925 }
19926 else {
19927 int c2 = escaped_control_code(c);
19928 if (c2) {
19929 if (ISCNTRL(c)) {
19930 if (flags & ESCAPE_META) {
19931 WARN_SPACE_CHAR(c2, "\\M-");
19932 }
19933 else {
19934 WARN_SPACE_CHAR(c2, "");
19935 }
19936 }
19937 else {
19938 if (flags & ESCAPE_META) {
19939 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19940 }
19941 else {
19942 WARN_SPACE_CHAR(c2, "\\C-");
19943 }
19944 }
19945 }
19946 else if (ISCNTRL(c)) goto eof;
19947 }
19948 return c & 0x9f;
19949
19950 eof:
19951 case -1:
19952 flush_string_content(p, p->enc, p->lex.pcur - begin);
19953 yyerror0("Invalid escape character syntax");
19954 dispatch_scan_event(p, tSTRING_CONTENT);
19955 return '\0';
19956
19957 default:
19958 if (!ISASCII(c)) {
19959 tokskip_mbchar(p);
19960 goto eof;
19961 }
19962 return c;
19963 }
19964}
19965
19966static void
19967tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19968{
19969 int len = rb_enc_codelen(c, enc);
19970 rb_enc_mbcput(c, tokspace(p, len), enc);
19971}
19972
19973static int
19974tokadd_escape(struct parser_params *p)
19975{
19976 int c;
19977 size_t numlen;
19978 const char *begin = p->lex.pcur;
19979
19980 switch (c = nextc(p)) {
19981 case '\n':
19982 return 0; /* just ignore */
19983
19984 case '0': case '1': case '2': case '3': /* octal constant */
19985 case '4': case '5': case '6': case '7':
19986 {
19987 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19988 if (numlen == 0) goto eof;
19989 p->lex.pcur += numlen;
19990 tokcopy(p, (int)numlen + 1);
19991 }
19992 return 0;
19993
19994 case 'x': /* hex constant */
19995 {
19996 tok_hex(p, &numlen);
19997 if (numlen == 0) return -1;
19998 tokcopy(p, (int)numlen + 2);
19999 }
20000 return 0;
20001
20002 eof:
20003 case -1:
20004 flush_string_content(p, p->enc, p->lex.pcur - begin);
20005 yyerror0("Invalid escape character syntax");
20006 token_flush(p);
20007 return -1;
20008
20009 default:
20010 tokadd(p, '\\');
20011 tokadd(p, c);
20012 }
20013 return 0;
20014}
20015
20016static int
20017char_to_option(int c)
20018{
20019 int val;
20020
20021 switch (c) {
20022 case 'i':
20023 val = RE_ONIG_OPTION_IGNORECASE;
20024 break;
20025 case 'x':
20026 val = RE_ONIG_OPTION_EXTEND;
20027 break;
20028 case 'm':
20029 val = RE_ONIG_OPTION_MULTILINE;
20030 break;
20031 default:
20032 val = 0;
20033 break;
20034 }
20035 return val;
20036}
20037
20038#define ARG_ENCODING_FIXED 16
20039#define ARG_ENCODING_NONE 32
20040#define ENC_ASCII8BIT 1
20041#define ENC_EUC_JP 2
20042#define ENC_Windows_31J 3
20043#define ENC_UTF8 4
20044
20045static int
20046char_to_option_kcode(int c, int *option, int *kcode)
20047{
20048 *option = 0;
20049
20050 switch (c) {
20051 case 'n':
20052 *kcode = ENC_ASCII8BIT;
20053 return (*option = ARG_ENCODING_NONE);
20054 case 'e':
20055 *kcode = ENC_EUC_JP;
20056 break;
20057 case 's':
20058 *kcode = ENC_Windows_31J;
20059 break;
20060 case 'u':
20061 *kcode = ENC_UTF8;
20062 break;
20063 default:
20064 *kcode = -1;
20065 return (*option = char_to_option(c));
20066 }
20067 *option = ARG_ENCODING_FIXED;
20068 return 1;
20069}
20070
20071static int
20072regx_options(struct parser_params *p)
20073{
20074 int kcode = 0;
20075 int kopt = 0;
20076 int options = 0;
20077 int c, opt, kc;
20078
20079 newtok(p);
20080 while (c = nextc(p), ISALPHA(c)) {
20081 if (c == 'o') {
20082 options |= RE_OPTION_ONCE;
20083 }
20084 else if (char_to_option_kcode(c, &opt, &kc)) {
20085 if (kc >= 0) {
20086 if (kc != ENC_ASCII8BIT) kcode = c;
20087 kopt = opt;
20088 }
20089 else {
20090 options |= opt;
20091 }
20092 }
20093 else {
20094 tokadd(p, c);
20095 }
20096 }
20097 options |= kopt;
20098 pushback(p, c);
20099 if (toklen(p)) {
20100 YYLTYPE loc = RUBY_INIT_YYLLOC();
20101 tokfix(p);
20102 compile_error(p, "unknown regexp option%s - %*s",
20103 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
20104 parser_show_error_line(p, &loc);
20105 }
20106 return options | RE_OPTION_ENCODING(kcode);
20107}
20108
20109static int
20110tokadd_mbchar(struct parser_params *p, int c)
20111{
20112 int len = parser_precise_mbclen(p, p->lex.pcur-1);
20113 if (len < 0) return -1;
20114 tokadd(p, c);
20115 p->lex.pcur += --len;
20116 if (len > 0) tokcopy(p, len);
20117 return c;
20118}
20119
20120static inline int
20121simple_re_meta(int c)
20122{
20123 switch (c) {
20124 case '$': case '*': case '+': case '.':
20125 case '?': case '^': case '|':
20126 case ')': case ']': case '}': case '>':
20127 return TRUE;
20128 default:
20129 return FALSE;
20130 }
20131}
20132
20133static int
20134parser_update_heredoc_indent(struct parser_params *p, int c)
20135{
20136 if (p->heredoc_line_indent == -1) {
20137 if (c == '\n') p->heredoc_line_indent = 0;
20138 }
20139 else {
20140 if (c == ' ') {
20141 p->heredoc_line_indent++;
20142 return TRUE;
20143 }
20144 else if (c == '\t') {
20145 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
20146 p->heredoc_line_indent = w * TAB_WIDTH;
20147 return TRUE;
20148 }
20149 else if (c != '\n') {
20150 if (p->heredoc_indent > p->heredoc_line_indent) {
20151 p->heredoc_indent = p->heredoc_line_indent;
20152 }
20153 p->heredoc_line_indent = -1;
20154 }
20155 else {
20156 /* Whitespace only line has no indentation */
20157 p->heredoc_line_indent = 0;
20158 }
20159 }
20160 return FALSE;
20161}
20162
20163static void
20164parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
20165{
20166 YYLTYPE loc = RUBY_INIT_YYLLOC();
20167 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
20168 compile_error(p, "%s mixed within %s source", n1, n2);
20169 parser_show_error_line(p, &loc);
20170}
20171
20172static void
20173parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
20174{
20175 const char *pos = p->lex.pcur;
20176 p->lex.pcur = beg;
20177 parser_mixed_error(p, enc1, enc2);
20178 p->lex.pcur = pos;
20179}
20180
20181static inline char
20182nibble_char_upper(unsigned int c)
20183{
20184 c &= 0xf;
20185 return c + (c < 10 ? '0' : 'A' - 10);
20186}
20187
20188static int
20189tokadd_string(struct parser_params *p,
20190 int func, int term, int paren, long *nest,
20191 rb_encoding **encp, rb_encoding **enc)
20192{
20193 int c;
20194 bool erred = false;
20195#ifdef RIPPER
20196 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
20197 int top_of_line = FALSE;
20198#endif
20199
20200#define mixed_error(enc1, enc2) \
20201 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
20202#define mixed_escape(beg, enc1, enc2) \
20203 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
20204
20205 while ((c = nextc(p)) != -1) {
20206 if (p->heredoc_indent > 0) {
20207 parser_update_heredoc_indent(p, c);
20208 }
20209#ifdef RIPPER
20210 if (top_of_line && heredoc_end == p->ruby_sourceline) {
20211 pushback(p, c);
20212 break;
20213 }
20214#endif
20215
20216 if (paren && c == paren) {
20217 ++*nest;
20218 }
20219 else if (c == term) {
20220 if (!nest || !*nest) {
20221 pushback(p, c);
20222 break;
20223 }
20224 --*nest;
20225 }
20226 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
20227 unsigned char c2 = *p->lex.pcur;
20228 if (c2 == '$' || c2 == '@' || c2 == '{') {
20229 pushback(p, c);
20230 break;
20231 }
20232 }
20233 else if (c == '\\') {
20234 c = nextc(p);
20235 switch (c) {
20236 case '\n':
20237 if (func & STR_FUNC_QWORDS) break;
20238 if (func & STR_FUNC_EXPAND) {
20239 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
20240 continue;
20241 if (c == term) {
20242 c = '\\';
20243 goto terminate;
20244 }
20245 }
20246 tokadd(p, '\\');
20247 break;
20248
20249 case '\\':
20250 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
20251 break;
20252
20253 case 'u':
20254 if ((func & STR_FUNC_EXPAND) == 0) {
20255 tokadd(p, '\\');
20256 break;
20257 }
20258 tokadd_utf8(p, enc, term,
20259 func & STR_FUNC_SYMBOL,
20260 func & STR_FUNC_REGEXP);
20261 continue;
20262
20263 default:
20264 if (c == -1) return -1;
20265 if (!ISASCII(c)) {
20266 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
20267 goto non_ascii;
20268 }
20269 if (func & STR_FUNC_REGEXP) {
20270 switch (c) {
20271 case 'c':
20272 case 'C':
20273 case 'M': {
20274 pushback(p, c);
20275 c = read_escape(p, 0, p->lex.pcur - 1);
20276
20277 char *t = tokspace(p, rb_strlen_lit("\\x00"));
20278 *t++ = '\\';
20279 *t++ = 'x';
20280 *t++ = nibble_char_upper(c >> 4);
20281 *t++ = nibble_char_upper(c);
20282 continue;
20283 }
20284 }
20285
20286 if (c == term && !simple_re_meta(c)) {
20287 tokadd(p, c);
20288 continue;
20289 }
20290 pushback(p, c);
20291 if ((c = tokadd_escape(p)) < 0)
20292 return -1;
20293 if (*enc && *enc != *encp) {
20294 mixed_escape(p->lex.ptok+2, *enc, *encp);
20295 }
20296 continue;
20297 }
20298 else if (func & STR_FUNC_EXPAND) {
20299 pushback(p, c);
20300 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
20301 c = read_escape(p, 0, p->lex.pcur - 1);
20302 }
20303 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20304 /* ignore backslashed spaces in %w */
20305 }
20306 else if (c != term && !(paren && c == paren)) {
20307 tokadd(p, '\\');
20308 pushback(p, c);
20309 continue;
20310 }
20311 }
20312 }
20313 else if (!parser_isascii(p)) {
20314 non_ascii:
20315 if (!*enc) {
20316 *enc = *encp;
20317 }
20318 else if (*enc != *encp) {
20319 mixed_error(*enc, *encp);
20320 continue;
20321 }
20322 if (tokadd_mbchar(p, c) == -1) return -1;
20323 continue;
20324 }
20325 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20326 pushback(p, c);
20327 break;
20328 }
20329 if (c & 0x80) {
20330 if (!*enc) {
20331 *enc = *encp;
20332 }
20333 else if (*enc != *encp) {
20334 mixed_error(*enc, *encp);
20335 continue;
20336 }
20337 }
20338 tokadd(p, c);
20339#ifdef RIPPER
20340 top_of_line = (c == '\n');
20341#endif
20342 }
20343 terminate:
20344 if (*enc) *encp = *enc;
20345 return c;
20346}
20347
20348#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20349
20350static void
20351flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20352{
20353 p->lex.pcur -= back;
20354 if (has_delayed_token(p)) {
20355 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20356 if (len > 0) {
20357 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20358 p->delayed.end_line = p->ruby_sourceline;
20359 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
20360 }
20361 dispatch_delayed_token(p, tSTRING_CONTENT);
20362 p->lex.ptok = p->lex.pcur;
20363 }
20364 dispatch_scan_event(p, tSTRING_CONTENT);
20365 p->lex.pcur += back;
20366}
20367
20368/* this can be shared with ripper, since it's independent from struct
20369 * parser_params. */
20370#ifndef RIPPER
20371#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20372#define SPECIAL_PUNCT(idx) ( \
20373 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20374 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20375 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20376 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20377 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20378 BIT('0', idx))
20379const uint_least32_t ruby_global_name_punct_bits[] = {
20380 SPECIAL_PUNCT(0),
20381 SPECIAL_PUNCT(1),
20382 SPECIAL_PUNCT(2),
20383};
20384#undef BIT
20385#undef SPECIAL_PUNCT
20386#endif
20387
20388static enum yytokentype
20389parser_peek_variable_name(struct parser_params *p)
20390{
20391 int c;
20392 const char *ptr = p->lex.pcur;
20393
20394 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20395 c = *ptr++;
20396 switch (c) {
20397 case '$':
20398 if ((c = *ptr) == '-') {
20399 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20400 c = *ptr;
20401 }
20402 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20403 return tSTRING_DVAR;
20404 }
20405 break;
20406 case '@':
20407 if ((c = *ptr) == '@') {
20408 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20409 c = *ptr;
20410 }
20411 break;
20412 case '{':
20413 p->lex.pcur = ptr;
20414 p->command_start = TRUE;
20415 yylval.state = p->lex.state;
20416 return tSTRING_DBEG;
20417 default:
20418 return 0;
20419 }
20420 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20421 return tSTRING_DVAR;
20422 return 0;
20423}
20424
20425#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20426#define IS_END() IS_lex_state(EXPR_END_ANY)
20427#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20428#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20429#define IS_LABEL_POSSIBLE() (\
20430 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20431 IS_ARG())
20432#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20433#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20434
20435static inline enum yytokentype
20436parser_string_term(struct parser_params *p, int func)
20437{
20438 xfree(p->lex.strterm);
20439 p->lex.strterm = 0;
20440 if (func & STR_FUNC_REGEXP) {
20441 set_yylval_num(regx_options(p));
20442 dispatch_scan_event(p, tREGEXP_END);
20443 SET_LEX_STATE(EXPR_END);
20444 return tREGEXP_END;
20445 }
20446 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20447 nextc(p);
20448 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20449 return tLABEL_END;
20450 }
20451 SET_LEX_STATE(EXPR_END);
20452 return tSTRING_END;
20453}
20454
20455static enum yytokentype
20456parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20457{
20458 int func = quote->func;
20459 int term = quote->term;
20460 int paren = quote->paren;
20461 int c, space = 0;
20462 rb_encoding *enc = p->enc;
20463 rb_encoding *base_enc = 0;
20464 rb_parser_string_t *lit;
20465
20466 if (func & STR_FUNC_TERM) {
20467 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20468 SET_LEX_STATE(EXPR_END);
20469 xfree(p->lex.strterm);
20470 p->lex.strterm = 0;
20471 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20472 }
20473 c = nextc(p);
20474 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20475 while (c != '\n' && ISSPACE(c = nextc(p)));
20476 space = 1;
20477 }
20478 if (func & STR_FUNC_LIST) {
20479 quote->func &= ~STR_FUNC_LIST;
20480 space = 1;
20481 }
20482 if (c == term && !quote->nest) {
20483 if (func & STR_FUNC_QWORDS) {
20484 quote->func |= STR_FUNC_TERM;
20485 pushback(p, c); /* dispatch the term at tSTRING_END */
20486 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20487 return ' ';
20488 }
20489 return parser_string_term(p, func);
20490 }
20491 if (space) {
20492 if (!ISSPACE(c)) pushback(p, c);
20493 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20494 return ' ';
20495 }
20496 newtok(p);
20497 if ((func & STR_FUNC_EXPAND) && c == '#') {
20498 enum yytokentype t = parser_peek_variable_name(p);
20499 if (t) return t;
20500 tokadd(p, '#');
20501 c = nextc(p);
20502 }
20503 pushback(p, c);
20504 if (tokadd_string(p, func, term, paren, &quote->nest,
20505 &enc, &base_enc) == -1) {
20506 if (p->eofp) {
20507#ifndef RIPPER
20508# define unterminated_literal(mesg) yyerror0(mesg)
20509#else
20510# define unterminated_literal(mesg) compile_error(p, mesg)
20511#endif
20512 literal_flush(p, p->lex.pcur);
20513 if (func & STR_FUNC_QWORDS) {
20514 /* no content to add, bailing out here */
20515 unterminated_literal("unterminated list meets end of file");
20516 xfree(p->lex.strterm);
20517 p->lex.strterm = 0;
20518 return tSTRING_END;
20519 }
20520 if (func & STR_FUNC_REGEXP) {
20521 unterminated_literal("unterminated regexp meets end of file");
20522 }
20523 else {
20524 unterminated_literal("unterminated string meets end of file");
20525 }
20526 quote->func |= STR_FUNC_TERM;
20527 }
20528 }
20529
20530 tokfix(p);
20531 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20532 set_yylval_str(lit);
20533 flush_string_content(p, enc, 0);
20534
20535 return tSTRING_CONTENT;
20536}
20537
20538static enum yytokentype
20539heredoc_identifier(struct parser_params *p)
20540{
20541 /*
20542 * term_len is length of `<<"END"` except `END`,
20543 * in this case term_len is 4 (<, <, " and ").
20544 */
20545 long len, offset = p->lex.pcur - p->lex.pbeg;
20546 int c = nextc(p), term, func = 0, quote = 0;
20547 enum yytokentype token = tSTRING_BEG;
20548 int indent = 0;
20549
20550 if (c == '-') {
20551 c = nextc(p);
20552 func = STR_FUNC_INDENT;
20553 offset++;
20554 }
20555 else if (c == '~') {
20556 c = nextc(p);
20557 func = STR_FUNC_INDENT;
20558 offset++;
20559 indent = INT_MAX;
20560 }
20561 switch (c) {
20562 case '\'':
20563 func |= str_squote; goto quoted;
20564 case '"':
20565 func |= str_dquote; goto quoted;
20566 case '`':
20567 token = tXSTRING_BEG;
20568 func |= str_xquote; goto quoted;
20569
20570 quoted:
20571 quote++;
20572 offset++;
20573 term = c;
20574 len = 0;
20575 while ((c = nextc(p)) != term) {
20576 if (c == -1 || c == '\r' || c == '\n') {
20577 yyerror0("unterminated here document identifier");
20578 return -1;
20579 }
20580 }
20581 break;
20582
20583 default:
20584 if (!parser_is_identchar(p)) {
20585 pushback(p, c);
20586 if (func & STR_FUNC_INDENT) {
20587 pushback(p, indent > 0 ? '~' : '-');
20588 }
20589 return 0;
20590 }
20591 func |= str_dquote;
20592 do {
20593 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20594 if (n < 0) return 0;
20595 p->lex.pcur += --n;
20596 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20597 pushback(p, c);
20598 break;
20599 }
20600
20601 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20602 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20603 yyerror0("too long here document identifier");
20604 dispatch_scan_event(p, tHEREDOC_BEG);
20605 lex_goto_eol(p);
20606
20607 p->lex.strterm = new_heredoc(p);
20608 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20609 here->offset = offset;
20610 here->sourceline = p->ruby_sourceline;
20611 here->length = (unsigned)len;
20612 here->quote = quote;
20613 here->func = func;
20614 here->lastline = p->lex.lastline;
20615
20616 token_flush(p);
20617 p->heredoc_indent = indent;
20618 p->heredoc_line_indent = 0;
20619 return token;
20620}
20621
20622static void
20623heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20624{
20625 rb_parser_string_t *line;
20626 rb_strterm_t *term = p->lex.strterm;
20627
20628 p->lex.strterm = 0;
20629 line = here->lastline;
20630 p->lex.lastline = line;
20631 p->lex.pbeg = PARSER_STRING_PTR(line);
20632 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20633 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20634 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20635 p->heredoc_end = p->ruby_sourceline;
20636 p->ruby_sourceline = (int)here->sourceline;
20637 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20638 p->eofp = 0;
20639 xfree(term);
20640}
20641
20642static int
20643dedent_string_column(const char *str, long len, int width)
20644{
20645 int i, col = 0;
20646
20647 for (i = 0; i < len && col < width; i++) {
20648 if (str[i] == ' ') {
20649 col++;
20650 }
20651 else if (str[i] == '\t') {
20652 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20653 if (n > width) break;
20654 col = n;
20655 }
20656 else {
20657 break;
20658 }
20659 }
20660
20661 return i;
20662}
20663
20664static int
20665dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20666{
20667 char *str;
20668 long len;
20669 int i;
20670
20671 len = PARSER_STRING_LEN(string);
20672 str = PARSER_STRING_PTR(string);
20673
20674 i = dedent_string_column(str, len, width);
20675 if (!i) return 0;
20676
20677 rb_parser_str_modify(string);
20678 str = PARSER_STRING_PTR(string);
20679 if (PARSER_STRING_LEN(string) != len)
20680 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20681 MEMMOVE(str, str + i, char, len - i);
20682 rb_parser_str_set_len(p, string, len - i);
20683 return i;
20684}
20685
20686static NODE *
20687heredoc_dedent(struct parser_params *p, NODE *root)
20688{
20689 NODE *node, *str_node, *prev_node;
20690 int indent = p->heredoc_indent;
20691 rb_parser_string_t *prev_lit = 0;
20692
20693 if (indent <= 0) return root;
20694 if (!root) return root;
20695
20696 prev_node = node = str_node = root;
20697 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20698
20699 while (str_node) {
20700 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20701 if (nd_fl_newline(str_node)) {
20702 dedent_string(p, lit, indent);
20703 }
20704 if (!prev_lit) {
20705 prev_lit = lit;
20706 }
20707 else if (!literal_concat0(p, prev_lit, lit)) {
20708 return 0;
20709 }
20710 else {
20711 NODE *end = RNODE_LIST(node)->as.nd_end;
20712 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20713 if (!node) {
20714 if (nd_type_p(prev_node, NODE_DSTR))
20715 nd_set_type(prev_node, NODE_STR);
20716 break;
20717 }
20718 RNODE_LIST(node)->as.nd_end = end;
20719 goto next_str;
20720 }
20721
20722 str_node = 0;
20723 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20724 next_str:
20725 if (!nd_type_p(node, NODE_LIST)) break;
20726 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20727 enum node_type type = nd_type(str_node);
20728 if (type == NODE_STR || type == NODE_DSTR) break;
20729 prev_lit = 0;
20730 str_node = 0;
20731 }
20732 }
20733 }
20734 return root;
20735}
20736
20737static int
20738whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20739{
20740 const char *beg = p->lex.pbeg;
20741 const char *ptr = p->lex.pend;
20742
20743 if (ptr - beg < len) return FALSE;
20744 if (ptr > beg && ptr[-1] == '\n') {
20745 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20746 if (ptr - beg < len) return FALSE;
20747 }
20748 if (strncmp(eos, ptr -= len, len)) return FALSE;
20749 if (indent) {
20750 while (beg < ptr && ISSPACE(*beg)) beg++;
20751 }
20752 return beg == ptr;
20753}
20754
20755static int
20756word_match_p(struct parser_params *p, const char *word, long len)
20757{
20758 if (strncmp(p->lex.pcur, word, len)) return 0;
20759 if (lex_eol_n_p(p, len)) return 1;
20760 int c = (unsigned char)p->lex.pcur[len];
20761 if (ISSPACE(c)) return 1;
20762 switch (c) {
20763 case '\0': case '\004': case '\032': return 1;
20764 }
20765 return 0;
20766}
20767
20768#define NUM_SUFFIX_R (1<<0)
20769#define NUM_SUFFIX_I (1<<1)
20770#define NUM_SUFFIX_ALL 3
20771
20772static int
20773number_literal_suffix(struct parser_params *p, int mask)
20774{
20775 int c, result = 0;
20776 const char *lastp = p->lex.pcur;
20777
20778 while ((c = nextc(p)) != -1) {
20779 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20780 result |= (mask & NUM_SUFFIX_I);
20781 mask &= ~NUM_SUFFIX_I;
20782 /* r after i, rational of complex is disallowed */
20783 mask &= ~NUM_SUFFIX_R;
20784 continue;
20785 }
20786 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20787 result |= (mask & NUM_SUFFIX_R);
20788 mask &= ~NUM_SUFFIX_R;
20789 continue;
20790 }
20791 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20792 p->lex.pcur = lastp;
20793 return 0;
20794 }
20795 pushback(p, c);
20796 break;
20797 }
20798 return result;
20799}
20800
20801static enum yytokentype
20802set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20803{
20804 enum rb_numeric_type numeric_type = integer_literal;
20805
20806 if (type == tFLOAT) {
20807 numeric_type = float_literal;
20808 }
20809
20810 if (suffix & NUM_SUFFIX_R) {
20811 type = tRATIONAL;
20812 numeric_type = rational_literal;
20813 }
20814 if (suffix & NUM_SUFFIX_I) {
20815 type = tIMAGINARY;
20816 }
20817
20818 switch (type) {
20819 case tINTEGER:
20820 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20821 break;
20822 case tFLOAT:
20823 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20824 break;
20825 case tRATIONAL:
20826 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20827 break;
20828 case tIMAGINARY:
20829 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20830 (void)numeric_type; /* for ripper */
20831 break;
20832 default:
20833 rb_bug("unexpected token: %d", type);
20834 }
20835 SET_LEX_STATE(EXPR_END);
20836 return type;
20837}
20838
20839#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20840static void
20841parser_dispatch_heredoc_end(struct parser_params *p, int line)
20842{
20843 if (has_delayed_token(p))
20844 dispatch_delayed_token(p, tSTRING_CONTENT);
20845
20846#ifdef RIPPER
20847 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20848 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20849#else
20850 if (p->keep_tokens) {
20851 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20852 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20853 parser_append_tokens(p, str, tHEREDOC_END, line);
20854 }
20855#endif
20856
20857 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20858 lex_goto_eol(p);
20859 token_flush(p);
20860}
20861
20862static enum yytokentype
20863here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20864{
20865 int c, func, indent = 0;
20866 const char *eos, *ptr, *ptr_end;
20867 long len;
20868 rb_parser_string_t *str = 0;
20869 rb_encoding *enc = p->enc;
20870 rb_encoding *base_enc = 0;
20871 int bol;
20872#ifdef RIPPER
20873 VALUE s_value;
20874#endif
20875
20876 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20877 len = here->length;
20878 indent = (func = here->func) & STR_FUNC_INDENT;
20879
20880 if ((c = nextc(p)) == -1) {
20881 error:
20882#ifdef RIPPER
20883 if (!has_delayed_token(p)) {
20884 dispatch_scan_event(p, tSTRING_CONTENT);
20885 }
20886 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20887 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20888 if (!(func & STR_FUNC_REGEXP)) {
20889 int cr = ENC_CODERANGE_UNKNOWN;
20890 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20891 if (cr != ENC_CODERANGE_7BIT &&
20892 rb_is_usascii_enc(p->enc) &&
20893 enc != rb_utf8_encoding()) {
20894 enc = rb_ascii8bit_encoding();
20895 }
20896 }
20897 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20898 }
20899 dispatch_delayed_token(p, tSTRING_CONTENT);
20900 }
20901 else {
20902 dispatch_delayed_token(p, tSTRING_CONTENT);
20903 dispatch_scan_event(p, tSTRING_CONTENT);
20904 }
20905 lex_goto_eol(p);
20906#endif
20907 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20908 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20909 (int)len, eos);
20910 token_flush(p);
20911 SET_LEX_STATE(EXPR_END);
20912 return tSTRING_END;
20913 }
20914 bol = was_bol(p);
20915 if (!bol) {
20916 /* not beginning of line, cannot be the terminator */
20917 }
20918 else if (p->heredoc_line_indent == -1) {
20919 /* `heredoc_line_indent == -1` means
20920 * - "after an interpolation in the same line", or
20921 * - "in a continuing line"
20922 */
20923 p->heredoc_line_indent = 0;
20924 }
20925 else if (whole_match_p(p, eos, len, indent)) {
20926 dispatch_heredoc_end(p);
20927 restore:
20928 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20929 token_flush(p);
20930 SET_LEX_STATE(EXPR_END);
20931 return tSTRING_END;
20932 }
20933
20934 if (!(func & STR_FUNC_EXPAND)) {
20935 do {
20936 ptr = PARSER_STRING_PTR(p->lex.lastline);
20937 ptr_end = p->lex.pend;
20938 if (ptr_end > ptr) {
20939 switch (ptr_end[-1]) {
20940 case '\n':
20941 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20942 ptr_end++;
20943 break;
20944 }
20945 case '\r':
20946 --ptr_end;
20947 }
20948 }
20949
20950 if (p->heredoc_indent > 0) {
20951 long i = 0;
20952 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20953 i++;
20954 p->heredoc_line_indent = 0;
20955 }
20956
20957 if (str)
20958 parser_str_cat(str, ptr, ptr_end - ptr);
20959 else
20960 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20961 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20962 lex_goto_eol(p);
20963 if (p->heredoc_indent > 0) {
20964 goto flush_str;
20965 }
20966 if (nextc(p) == -1) {
20967 if (str) {
20968 rb_parser_string_free(p, str);
20969 str = 0;
20970 }
20971 goto error;
20972 }
20973 } while (!whole_match_p(p, eos, len, indent));
20974 }
20975 else {
20976 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20977 newtok(p);
20978 if (c == '#') {
20979 enum yytokentype t = parser_peek_variable_name(p);
20980 if (p->heredoc_line_indent != -1) {
20981 if (p->heredoc_indent > p->heredoc_line_indent) {
20982 p->heredoc_indent = p->heredoc_line_indent;
20983 }
20984 p->heredoc_line_indent = -1;
20985 }
20986 if (t) return t;
20987 tokadd(p, '#');
20988 c = nextc(p);
20989 }
20990 do {
20991 pushback(p, c);
20992 enc = p->enc;
20993 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20994 if (p->eofp) goto error;
20995 goto restore;
20996 }
20997 if (c != '\n') {
20998 if (c == '\\') p->heredoc_line_indent = -1;
20999 flush:
21000 str = STR_NEW3(tok(p), toklen(p), enc, func);
21001 flush_str:
21002 set_yylval_str(str);
21003#ifndef RIPPER
21004 if (bol) nd_set_fl_newline(yylval.node);
21005#endif
21006 flush_string_content(p, enc, 0);
21007 return tSTRING_CONTENT;
21008 }
21009 tokadd(p, nextc(p));
21010 if (p->heredoc_indent > 0) {
21011 lex_goto_eol(p);
21012 goto flush;
21013 }
21014 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
21015 if ((c = nextc(p)) == -1) goto error;
21016 } while (!whole_match_p(p, eos, len, indent));
21017 str = STR_NEW3(tok(p), toklen(p), enc, func);
21018 }
21019 dispatch_heredoc_end(p);
21020 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21021 token_flush(p);
21022 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
21023#ifdef RIPPER
21024 /* Preserve s_value for set_yylval_str */
21025 s_value = p->s_value;
21026#endif
21027 set_yylval_str(str);
21028#ifdef RIPPER
21029 set_parser_s_value(s_value);
21030#endif
21031
21032#ifndef RIPPER
21033 if (bol) nd_set_fl_newline(yylval.node);
21034#endif
21035 return tSTRING_CONTENT;
21036}
21037
21038#include "lex.c"
21039
21040static int
21041arg_ambiguous(struct parser_params *p, char c)
21042{
21043#ifndef RIPPER
21044 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
21045#else
21046 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
21047#endif
21048 return TRUE;
21049}
21050
21051/* returns true value if formal argument error;
21052 * Qtrue, or error message if ripper */
21053static VALUE
21054formal_argument_error(struct parser_params *p, ID id)
21055{
21056 switch (id_type(id)) {
21057 case ID_LOCAL:
21058 break;
21059#ifndef RIPPER
21060# define ERR(mesg) (yyerror0(mesg), Qtrue)
21061#else
21062# define ERR(mesg) WARN_S(mesg)
21063#endif
21064 case ID_CONST:
21065 return ERR("formal argument cannot be a constant");
21066 case ID_INSTANCE:
21067 return ERR("formal argument cannot be an instance variable");
21068 case ID_GLOBAL:
21069 return ERR("formal argument cannot be a global variable");
21070 case ID_CLASS:
21071 return ERR("formal argument cannot be a class variable");
21072 default:
21073 return ERR("formal argument must be local variable");
21074#undef ERR
21075 }
21076 shadowing_lvar(p, id);
21077
21078 return Qfalse;
21079}
21080
21081static int
21082lvar_defined(struct parser_params *p, ID id)
21083{
21084 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
21085}
21086
21087/* emacsen -*- hack */
21088static long
21089parser_encode_length(struct parser_params *p, const char *name, long len)
21090{
21091 long nlen;
21092
21093 if (len > 5 && name[nlen = len - 5] == '-') {
21094 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
21095 return nlen;
21096 }
21097 if (len > 4 && name[nlen = len - 4] == '-') {
21098 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
21099 return nlen;
21100 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
21101 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
21102 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
21103 return nlen;
21104 }
21105 return len;
21106}
21107
21108static void
21109parser_set_encode(struct parser_params *p, const char *name)
21110{
21111 rb_encoding *enc;
21112 VALUE excargs[3];
21113 int idx = 0;
21114
21115 const char *wrong = 0;
21116 switch (*name) {
21117 case 'e': case 'E': wrong = "external"; break;
21118 case 'i': case 'I': wrong = "internal"; break;
21119 case 'f': case 'F': wrong = "filesystem"; break;
21120 case 'l': case 'L': wrong = "locale"; break;
21121 }
21122 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
21123 idx = rb_enc_find_index(name);
21124 if (idx < 0) {
21125 unknown:
21126 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
21127 error:
21128 excargs[0] = rb_eArgError;
21129 excargs[2] = rb_make_backtrace();
21130 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
21131 VALUE exc = rb_make_exception(3, excargs);
21132 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
21133
21134 rb_ast_free(p->ast);
21135 p->ast = NULL;
21136
21137 rb_exc_raise(exc);
21138 }
21139 enc = rb_enc_from_index(idx);
21140 if (!rb_enc_asciicompat(enc)) {
21141 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
21142 goto error;
21143 }
21144 p->enc = enc;
21145#ifndef RIPPER
21146 if (p->debug_lines) {
21147 long i;
21148 for (i = 0; i < p->debug_lines->len; i++) {
21149 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
21150 }
21151 }
21152#endif
21153}
21154
21155static bool
21156comment_at_top(struct parser_params *p)
21157{
21158 if (p->token_seen) return false;
21159 return (p->line_count == (p->has_shebang ? 2 : 1));
21160}
21161
21162typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
21163typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
21164
21165static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
21166
21167static void
21168magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
21169{
21170 if (!comment_at_top(p)) {
21171 return;
21172 }
21173 parser_set_encode(p, val);
21174}
21175
21176static int
21177parser_get_bool(struct parser_params *p, const char *name, const char *val)
21178{
21179 switch (*val) {
21180 case 't': case 'T':
21181 if (STRCASECMP(val, "true") == 0) {
21182 return TRUE;
21183 }
21184 break;
21185 case 'f': case 'F':
21186 if (STRCASECMP(val, "false") == 0) {
21187 return FALSE;
21188 }
21189 break;
21190 }
21191 return parser_invalid_pragma_value(p, name, val);
21192}
21193
21194static int
21195parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
21196{
21197 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
21198 return -1;
21199}
21200
21201static void
21202parser_set_token_info(struct parser_params *p, const char *name, const char *val)
21203{
21204 int b = parser_get_bool(p, name, val);
21205 if (b >= 0) p->token_info_enabled = b;
21206}
21207
21208static void
21209parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
21210{
21211 int b;
21212
21213 if (p->token_seen) {
21214 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
21215 return;
21216 }
21217
21218 b = parser_get_bool(p, name, val);
21219 if (b < 0) return;
21220
21221 p->frozen_string_literal = b;
21222}
21223
21224static void
21225parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
21226{
21227 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
21228 if (*s == ' ' || *s == '\t') continue;
21229 if (*s == '#') break;
21230 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
21231 return;
21232 }
21233
21234 switch (*val) {
21235 case 'n': case 'N':
21236 if (STRCASECMP(val, "none") == 0) {
21237 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
21238 return;
21239 }
21240 break;
21241 case 'l': case 'L':
21242 if (STRCASECMP(val, "literal") == 0) {
21243 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
21244 return;
21245 }
21246 break;
21247 case 'e': case 'E':
21248 if (STRCASECMP(val, "experimental_copy") == 0) {
21249 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
21250 return;
21251 }
21252 if (STRCASECMP(val, "experimental_everything") == 0) {
21253 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
21254 return;
21255 }
21256 break;
21257 }
21258 parser_invalid_pragma_value(p, name, val);
21259}
21260
21261# if WARN_PAST_SCOPE
21262static void
21263parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
21264{
21265 int b = parser_get_bool(p, name, val);
21266 if (b >= 0) p->past_scope_enabled = b;
21267}
21268# endif
21269
21271 const char *name;
21272 rb_magic_comment_setter_t func;
21273 rb_magic_comment_length_t length;
21274};
21275
21276static const struct magic_comment magic_comments[] = {
21277 {"coding", magic_comment_encoding, parser_encode_length},
21278 {"encoding", magic_comment_encoding, parser_encode_length},
21279 {"frozen_string_literal", parser_set_frozen_string_literal},
21280 {"shareable_constant_value", parser_set_shareable_constant_value},
21281 {"warn_indent", parser_set_token_info},
21282# if WARN_PAST_SCOPE
21283 {"warn_past_scope", parser_set_past_scope},
21284# endif
21285};
21286
21287static const char *
21288magic_comment_marker(const char *str, long len)
21289{
21290 long i = 2;
21291
21292 while (i < len) {
21293 switch (str[i]) {
21294 case '-':
21295 if (str[i-1] == '*' && str[i-2] == '-') {
21296 return str + i + 1;
21297 }
21298 i += 2;
21299 break;
21300 case '*':
21301 if (i + 1 >= len) return 0;
21302 if (str[i+1] != '-') {
21303 i += 4;
21304 }
21305 else if (str[i-1] != '-') {
21306 i += 2;
21307 }
21308 else {
21309 return str + i + 2;
21310 }
21311 break;
21312 default:
21313 i += 3;
21314 break;
21315 }
21316 }
21317 return 0;
21318}
21319
21320static int
21321parser_magic_comment(struct parser_params *p, const char *str, long len)
21322{
21323 int indicator = 0;
21324 VALUE name = 0, val = 0;
21325 const char *beg, *end, *vbeg, *vend;
21326#define str_copy(_s, _p, _n) ((_s) \
21327 ? (void)(rb_str_resize((_s), (_n)), \
21328 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21329 : (void)((_s) = STR_NEW((_p), (_n))))
21330
21331 if (len <= 7) return FALSE;
21332 if (!!(beg = magic_comment_marker(str, len))) {
21333 if (!(end = magic_comment_marker(beg, str + len - beg)))
21334 return FALSE;
21335 indicator = TRUE;
21336 str = beg;
21337 len = end - beg - 3;
21338 }
21339
21340 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21341 while (len > 0) {
21342 const struct magic_comment *mc = magic_comments;
21343 char *s;
21344 int i;
21345 long n = 0;
21346
21347 for (; len > 0 && *str; str++, --len) {
21348 switch (*str) {
21349 case '\'': case '"': case ':': case ';':
21350 continue;
21351 }
21352 if (!ISSPACE(*str)) break;
21353 }
21354 for (beg = str; len > 0; str++, --len) {
21355 switch (*str) {
21356 case '\'': case '"': case ':': case ';':
21357 break;
21358 default:
21359 if (ISSPACE(*str)) break;
21360 continue;
21361 }
21362 break;
21363 }
21364 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21365 if (!len) break;
21366 if (*str != ':') {
21367 if (!indicator) return FALSE;
21368 continue;
21369 }
21370
21371 do str++; while (--len > 0 && ISSPACE(*str));
21372 if (!len) break;
21373 const char *tok_beg = str;
21374 if (*str == '"') {
21375 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21376 if (*str == '\\') {
21377 --len;
21378 ++str;
21379 }
21380 }
21381 vend = str;
21382 if (len) {
21383 --len;
21384 ++str;
21385 }
21386 }
21387 else {
21388 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21389 vend = str;
21390 }
21391 const char *tok_end = str;
21392 if (indicator) {
21393 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21394 }
21395 else {
21396 while (len > 0 && (ISSPACE(*str))) --len, str++;
21397 if (len) return FALSE;
21398 }
21399
21400 n = end - beg;
21401 str_copy(name, beg, n);
21402 s = RSTRING_PTR(name);
21403 for (i = 0; i < n; ++i) {
21404 if (s[i] == '-') s[i] = '_';
21405 }
21406 do {
21407 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21408 n = vend - vbeg;
21409 if (mc->length) {
21410 n = (*mc->length)(p, vbeg, n);
21411 }
21412 str_copy(val, vbeg, n);
21413 p->lex.ptok = tok_beg;
21414 p->lex.pcur = tok_end;
21415 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21416 break;
21417 }
21418 } while (++mc < magic_comments + numberof(magic_comments));
21419#ifdef RIPPER
21420 str_copy(val, vbeg, vend - vbeg);
21421 dispatch2(magic_comment, name, val);
21422#endif
21423 }
21424
21425 return TRUE;
21426}
21427
21428static void
21429set_file_encoding(struct parser_params *p, const char *str, const char *send)
21430{
21431 int sep = 0;
21432 const char *beg = str;
21433 VALUE s;
21434
21435 for (;;) {
21436 if (send - str <= 6) return;
21437 switch (str[6]) {
21438 case 'C': case 'c': str += 6; continue;
21439 case 'O': case 'o': str += 5; continue;
21440 case 'D': case 'd': str += 4; continue;
21441 case 'I': case 'i': str += 3; continue;
21442 case 'N': case 'n': str += 2; continue;
21443 case 'G': case 'g': str += 1; continue;
21444 case '=': case ':':
21445 sep = 1;
21446 str += 6;
21447 break;
21448 default:
21449 str += 6;
21450 if (ISSPACE(*str)) break;
21451 continue;
21452 }
21453 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21454 sep = 0;
21455 }
21456 for (;;) {
21457 do {
21458 if (++str >= send) return;
21459 } while (ISSPACE(*str));
21460 if (sep) break;
21461 if (*str != '=' && *str != ':') return;
21462 sep = 1;
21463 str++;
21464 }
21465 beg = str;
21466 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21467 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21468 p->lex.ptok = beg;
21469 p->lex.pcur = str;
21470 parser_set_encode(p, RSTRING_PTR(s));
21471 rb_str_resize(s, 0);
21472}
21473
21474static void
21475parser_prepare(struct parser_params *p)
21476{
21477 int c = nextc0(p, FALSE);
21478 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21479 switch (c) {
21480 case '#':
21481 if (peek(p, '!')) p->has_shebang = 1;
21482 break;
21483 case 0xef: /* UTF-8 BOM marker */
21484 if (!lex_eol_n_p(p, 2) &&
21485 (unsigned char)p->lex.pcur[0] == 0xbb &&
21486 (unsigned char)p->lex.pcur[1] == 0xbf) {
21487 p->enc = rb_utf8_encoding();
21488 p->lex.pcur += 2;
21489#ifndef RIPPER
21490 if (p->debug_lines) {
21491 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21492 }
21493#endif
21494 p->lex.pbeg = p->lex.pcur;
21495 token_flush(p);
21496 return;
21497 }
21498 break;
21499 case -1: /* end of script. */
21500 return;
21501 }
21502 pushback(p, c);
21503 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21504}
21505
21506#ifndef RIPPER
21507#define ambiguous_operator(tok, op, syn) ( \
21508 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21509 rb_warning0("even though it seems like "syn""))
21510#else
21511#define ambiguous_operator(tok, op, syn) \
21512 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21513#endif
21514#define warn_balanced(tok, op, syn) ((void) \
21515 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21516 space_seen && !ISSPACE(c) && \
21517 (ambiguous_operator(tok, op, syn), 0)), \
21518 (enum yytokentype)(tok))
21519
21520static enum yytokentype
21521no_digits(struct parser_params *p)
21522{
21523 yyerror0("numeric literal without digits");
21524 if (peek(p, '_')) nextc(p);
21525 /* dummy 0, for tUMINUS_NUM at numeric */
21526 return set_number_literal(p, tINTEGER, 0, 10, 0);
21527}
21528
21529static enum yytokentype
21530parse_numeric(struct parser_params *p, int c)
21531{
21532 int is_float, seen_point, seen_e, nondigit;
21533 int suffix;
21534
21535 is_float = seen_point = seen_e = nondigit = 0;
21536 SET_LEX_STATE(EXPR_END);
21537 newtok(p);
21538 if (c == '-' || c == '+') {
21539 tokadd(p, c);
21540 c = nextc(p);
21541 }
21542 if (c == '0') {
21543 int start = toklen(p);
21544 c = nextc(p);
21545 if (c == 'x' || c == 'X') {
21546 /* hexadecimal */
21547 c = nextc(p);
21548 if (c != -1 && ISXDIGIT(c)) {
21549 do {
21550 if (c == '_') {
21551 if (nondigit) break;
21552 nondigit = c;
21553 continue;
21554 }
21555 if (!ISXDIGIT(c)) break;
21556 nondigit = 0;
21557 tokadd(p, c);
21558 } while ((c = nextc(p)) != -1);
21559 }
21560 pushback(p, c);
21561 tokfix(p);
21562 if (toklen(p) == start) {
21563 return no_digits(p);
21564 }
21565 else if (nondigit) goto trailing_uc;
21566 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21567 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21568 }
21569 if (c == 'b' || c == 'B') {
21570 /* binary */
21571 c = nextc(p);
21572 if (c == '0' || c == '1') {
21573 do {
21574 if (c == '_') {
21575 if (nondigit) break;
21576 nondigit = c;
21577 continue;
21578 }
21579 if (c != '0' && c != '1') break;
21580 nondigit = 0;
21581 tokadd(p, c);
21582 } while ((c = nextc(p)) != -1);
21583 }
21584 pushback(p, c);
21585 tokfix(p);
21586 if (toklen(p) == start) {
21587 return no_digits(p);
21588 }
21589 else if (nondigit) goto trailing_uc;
21590 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21591 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21592 }
21593 if (c == 'd' || c == 'D') {
21594 /* decimal */
21595 c = nextc(p);
21596 if (c != -1 && ISDIGIT(c)) {
21597 do {
21598 if (c == '_') {
21599 if (nondigit) break;
21600 nondigit = c;
21601 continue;
21602 }
21603 if (!ISDIGIT(c)) break;
21604 nondigit = 0;
21605 tokadd(p, c);
21606 } while ((c = nextc(p)) != -1);
21607 }
21608 pushback(p, c);
21609 tokfix(p);
21610 if (toklen(p) == start) {
21611 return no_digits(p);
21612 }
21613 else if (nondigit) goto trailing_uc;
21614 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21615 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21616 }
21617 if (c == '_') {
21618 /* 0_0 */
21619 goto octal_number;
21620 }
21621 if (c == 'o' || c == 'O') {
21622 /* prefixed octal */
21623 c = nextc(p);
21624 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21625 tokfix(p);
21626 return no_digits(p);
21627 }
21628 }
21629 if (c >= '0' && c <= '7') {
21630 /* octal */
21631 octal_number:
21632 do {
21633 if (c == '_') {
21634 if (nondigit) break;
21635 nondigit = c;
21636 continue;
21637 }
21638 if (c < '0' || c > '9') break;
21639 if (c > '7') goto invalid_octal;
21640 nondigit = 0;
21641 tokadd(p, c);
21642 } while ((c = nextc(p)) != -1);
21643 if (toklen(p) > start) {
21644 pushback(p, c);
21645 tokfix(p);
21646 if (nondigit) goto trailing_uc;
21647 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21648 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21649 }
21650 if (nondigit) {
21651 pushback(p, c);
21652 goto trailing_uc;
21653 }
21654 }
21655 if (c > '7' && c <= '9') {
21656 invalid_octal:
21657 yyerror0("Invalid octal digit");
21658 }
21659 else if (c == '.' || c == 'e' || c == 'E') {
21660 tokadd(p, '0');
21661 }
21662 else {
21663 pushback(p, c);
21664 tokfix(p);
21665 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21666 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21667 }
21668 }
21669
21670 for (;;) {
21671 switch (c) {
21672 case '0': case '1': case '2': case '3': case '4':
21673 case '5': case '6': case '7': case '8': case '9':
21674 nondigit = 0;
21675 tokadd(p, c);
21676 break;
21677
21678 case '.':
21679 if (nondigit) goto trailing_uc;
21680 if (seen_point || seen_e) {
21681 goto decode_num;
21682 }
21683 else {
21684 int c0 = nextc(p);
21685 if (c0 == -1 || !ISDIGIT(c0)) {
21686 pushback(p, c0);
21687 goto decode_num;
21688 }
21689 c = c0;
21690 }
21691 seen_point = toklen(p);
21692 tokadd(p, '.');
21693 tokadd(p, c);
21694 is_float++;
21695 nondigit = 0;
21696 break;
21697
21698 case 'e':
21699 case 'E':
21700 if (nondigit) {
21701 pushback(p, c);
21702 c = nondigit;
21703 goto decode_num;
21704 }
21705 if (seen_e) {
21706 goto decode_num;
21707 }
21708 nondigit = c;
21709 c = nextc(p);
21710 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21711 pushback(p, c);
21712 c = nondigit;
21713 nondigit = 0;
21714 goto decode_num;
21715 }
21716 tokadd(p, nondigit);
21717 seen_e++;
21718 is_float++;
21719 tokadd(p, c);
21720 nondigit = (c == '-' || c == '+') ? c : 0;
21721 break;
21722
21723 case '_': /* `_' in number just ignored */
21724 if (nondigit) goto decode_num;
21725 nondigit = c;
21726 break;
21727
21728 default:
21729 goto decode_num;
21730 }
21731 c = nextc(p);
21732 }
21733
21734 decode_num:
21735 pushback(p, c);
21736 if (nondigit) {
21737 trailing_uc:
21738 literal_flush(p, p->lex.pcur - 1);
21739 YYLTYPE loc = RUBY_INIT_YYLLOC();
21740 compile_error(p, "trailing '%c' in number", nondigit);
21741 parser_show_error_line(p, &loc);
21742 }
21743 tokfix(p);
21744 if (is_float) {
21745 enum yytokentype type = tFLOAT;
21746
21747 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21748 if (suffix & NUM_SUFFIX_R) {
21749 type = tRATIONAL;
21750 }
21751 else {
21752 strtod(tok(p), 0);
21753 if (errno == ERANGE) {
21754 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21755 errno = 0;
21756 }
21757 }
21758 return set_number_literal(p, type, suffix, 0, seen_point);
21759 }
21760 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21761 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21762}
21763
21764static enum yytokentype
21765parse_qmark(struct parser_params *p, int space_seen)
21766{
21767 rb_encoding *enc;
21768 register int c;
21769 rb_parser_string_t *lit;
21770 const char *start = p->lex.pcur;
21771
21772 if (IS_END()) {
21773 SET_LEX_STATE(EXPR_VALUE);
21774 return '?';
21775 }
21776 c = nextc(p);
21777 if (c == -1) {
21778 compile_error(p, "incomplete character syntax");
21779 return 0;
21780 }
21781 if (rb_enc_isspace(c, p->enc)) {
21782 if (!IS_ARG()) {
21783 int c2 = escaped_control_code(c);
21784 if (c2) {
21785 WARN_SPACE_CHAR(c2, "?");
21786 }
21787 }
21788 ternary:
21789 pushback(p, c);
21790 SET_LEX_STATE(EXPR_VALUE);
21791 return '?';
21792 }
21793 newtok(p);
21794 enc = p->enc;
21795 int w = parser_precise_mbclen(p, start);
21796 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21797 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21798 if (space_seen) {
21799 const char *ptr = start;
21800 do {
21801 int n = parser_precise_mbclen(p, ptr);
21802 if (n < 0) return -1;
21803 ptr += n;
21804 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21805 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21806 " a conditional operator, put a space after '?'",
21807 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21808 }
21809 goto ternary;
21810 }
21811 else if (c == '\\') {
21812 if (peek(p, 'u')) {
21813 nextc(p);
21814 enc = rb_utf8_encoding();
21815 tokadd_utf8(p, &enc, -1, 0, 0);
21816 }
21817 else if (!ISASCII(c = peekc(p)) && c != -1) {
21818 nextc(p);
21819 if (tokadd_mbchar(p, c) == -1) return 0;
21820 }
21821 else {
21822 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21823 tokadd(p, c);
21824 }
21825 }
21826 else {
21827 if (tokadd_mbchar(p, c) == -1) return 0;
21828 }
21829 tokfix(p);
21830 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21831 set_yylval_str(lit);
21832 SET_LEX_STATE(EXPR_END);
21833 return tCHAR;
21834}
21835
21836static enum yytokentype
21837parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21838{
21839 register int c;
21840 const char *ptok = p->lex.pcur;
21841
21842 if (IS_BEG()) {
21843 int term;
21844 int paren;
21845
21846 c = nextc(p);
21847 quotation:
21848 if (c == -1) goto unterminated;
21849 if (!ISALNUM(c)) {
21850 term = c;
21851 if (!ISASCII(c)) goto unknown;
21852 c = 'Q';
21853 }
21854 else {
21855 term = nextc(p);
21856 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21857 unknown:
21858 pushback(p, term);
21859 c = parser_precise_mbclen(p, p->lex.pcur);
21860 if (c < 0) return 0;
21861 p->lex.pcur += c;
21862 yyerror0("unknown type of %string");
21863 return 0;
21864 }
21865 }
21866 if (term == -1) {
21867 unterminated:
21868 compile_error(p, "unterminated quoted string meets end of file");
21869 return 0;
21870 }
21871 paren = term;
21872 if (term == '(') term = ')';
21873 else if (term == '[') term = ']';
21874 else if (term == '{') term = '}';
21875 else if (term == '<') term = '>';
21876 else paren = 0;
21877
21878 p->lex.ptok = ptok-1;
21879 switch (c) {
21880 case 'Q':
21881 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21882 return tSTRING_BEG;
21883
21884 case 'q':
21885 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21886 return tSTRING_BEG;
21887
21888 case 'W':
21889 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21890 return tWORDS_BEG;
21891
21892 case 'w':
21893 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21894 return tQWORDS_BEG;
21895
21896 case 'I':
21897 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21898 return tSYMBOLS_BEG;
21899
21900 case 'i':
21901 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21902 return tQSYMBOLS_BEG;
21903
21904 case 'x':
21905 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21906 return tXSTRING_BEG;
21907
21908 case 'r':
21909 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21910 return tREGEXP_BEG;
21911
21912 case 's':
21913 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21914 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21915 return tSYMBEG;
21916
21917 default:
21918 yyerror0("unknown type of %string");
21919 return 0;
21920 }
21921 }
21922 if ((c = nextc(p)) == '=') {
21923 set_yylval_id('%');
21924 SET_LEX_STATE(EXPR_BEG);
21925 return tOP_ASGN;
21926 }
21927 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21928 goto quotation;
21929 }
21930 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21931 pushback(p, c);
21932 return warn_balanced('%', "%%", "string literal");
21933}
21934
21935static int
21936tokadd_ident(struct parser_params *p, int c)
21937{
21938 do {
21939 if (tokadd_mbchar(p, c) == -1) return -1;
21940 c = nextc(p);
21941 } while (parser_is_identchar(p));
21942 pushback(p, c);
21943 return 0;
21944}
21945
21946static ID
21947tokenize_ident(struct parser_params *p)
21948{
21949 ID ident = TOK_INTERN();
21950
21951 set_yylval_name(ident);
21952
21953 return ident;
21954}
21955
21956static int
21957parse_numvar(struct parser_params *p)
21958{
21959 size_t len;
21960 int overflow;
21961 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21962 const unsigned long nth_ref_max =
21963 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21964 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21965 * turned into a Fixnum, in compile.c */
21966
21967 if (overflow || n > nth_ref_max) {
21968 /* compile_error()? */
21969 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21970 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21971 }
21972 else {
21973 return (int)n;
21974 }
21975}
21976
21977static enum yytokentype
21978parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21979{
21980 const char *ptr = p->lex.pcur;
21981 register int c;
21982
21983 SET_LEX_STATE(EXPR_END);
21984 p->lex.ptok = ptr - 1; /* from '$' */
21985 newtok(p);
21986 c = nextc(p);
21987 switch (c) {
21988 case '_': /* $_: last read line string */
21989 c = nextc(p);
21990 if (parser_is_identchar(p)) {
21991 tokadd(p, '$');
21992 tokadd(p, '_');
21993 break;
21994 }
21995 pushback(p, c);
21996 c = '_';
21997 /* fall through */
21998 case '~': /* $~: match-data */
21999 case '*': /* $*: argv */
22000 case '$': /* $$: pid */
22001 case '?': /* $?: last status */
22002 case '!': /* $!: error string */
22003 case '@': /* $@: error position */
22004 case '/': /* $/: input record separator */
22005 case '\\': /* $\: output record separator */
22006 case ';': /* $;: field separator */
22007 case ',': /* $,: output field separator */
22008 case '.': /* $.: last read line number */
22009 case '=': /* $=: ignorecase */
22010 case ':': /* $:: load path */
22011 case '<': /* $<: default input handle */
22012 case '>': /* $>: default output handle */
22013 case '\"': /* $": already loaded files */
22014 tokadd(p, '$');
22015 tokadd(p, c);
22016 goto gvar;
22017
22018 case '-':
22019 tokadd(p, '$');
22020 tokadd(p, c);
22021 c = nextc(p);
22022 if (parser_is_identchar(p)) {
22023 if (tokadd_mbchar(p, c) == -1) return 0;
22024 }
22025 else {
22026 pushback(p, c);
22027 pushback(p, '-');
22028 return '$';
22029 }
22030 gvar:
22031 tokenize_ident(p);
22032 return tGVAR;
22033
22034 case '&': /* $&: last match */
22035 case '`': /* $`: string before last match */
22036 case '\'': /* $': string after last match */
22037 case '+': /* $+: string matches last paren. */
22038 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
22039 tokadd(p, '$');
22040 tokadd(p, c);
22041 goto gvar;
22042 }
22043 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
22044 return tBACK_REF;
22045
22046 case '1': case '2': case '3':
22047 case '4': case '5': case '6':
22048 case '7': case '8': case '9':
22049 tokadd(p, '$');
22050 do {
22051 tokadd(p, c);
22052 c = nextc(p);
22053 } while (c != -1 && ISDIGIT(c));
22054 pushback(p, c);
22055 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
22056 tokfix(p);
22057 c = parse_numvar(p);
22058 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
22059 return tNTH_REF;
22060
22061 default:
22062 if (!parser_is_identchar(p)) {
22063 YYLTYPE loc = RUBY_INIT_YYLLOC();
22064 if (c == -1 || ISSPACE(c)) {
22065 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
22066 }
22067 else {
22068 pushback(p, c);
22069 compile_error(p, "'$%c' is not allowed as a global variable name", c);
22070 }
22071 parser_show_error_line(p, &loc);
22072 set_yylval_noname();
22073 return tGVAR;
22074 }
22075 /* fall through */
22076 case '0':
22077 tokadd(p, '$');
22078 }
22079
22080 if (tokadd_ident(p, c)) return 0;
22081 SET_LEX_STATE(EXPR_END);
22082 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
22083 tokenize_ident(p);
22084 }
22085 else {
22086 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
22087 set_yylval_noname();
22088 }
22089 return tGVAR;
22090}
22091
22092static bool
22093parser_numbered_param(struct parser_params *p, int n)
22094{
22095 if (n < 0) return false;
22096
22097 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
22098 return false;
22099 }
22100 if (p->max_numparam == ORDINAL_PARAM) {
22101 compile_error(p, "ordinary parameter is defined");
22102 return false;
22103 }
22104 struct vtable *args = p->lvtbl->args;
22105 if (p->max_numparam < n) {
22106 p->max_numparam = n;
22107 }
22108 while (n > args->pos) {
22109 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
22110 }
22111 return true;
22112}
22113
22114static enum yytokentype
22115parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
22116{
22117 const char *ptr = p->lex.pcur;
22118 enum yytokentype result = tIVAR;
22119 register int c = nextc(p);
22120 YYLTYPE loc;
22121
22122 p->lex.ptok = ptr - 1; /* from '@' */
22123 newtok(p);
22124 tokadd(p, '@');
22125 if (c == '@') {
22126 result = tCVAR;
22127 tokadd(p, '@');
22128 c = nextc(p);
22129 }
22130 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
22131 if (c == -1 || !parser_is_identchar(p)) {
22132 pushback(p, c);
22133 RUBY_SET_YYLLOC(loc);
22134 if (result == tIVAR) {
22135 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
22136 }
22137 else {
22138 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
22139 }
22140 parser_show_error_line(p, &loc);
22141 set_yylval_noname();
22142 SET_LEX_STATE(EXPR_END);
22143 return result;
22144 }
22145 else if (ISDIGIT(c)) {
22146 pushback(p, c);
22147 RUBY_SET_YYLLOC(loc);
22148 if (result == tIVAR) {
22149 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
22150 }
22151 else {
22152 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
22153 }
22154 parser_show_error_line(p, &loc);
22155 set_yylval_noname();
22156 SET_LEX_STATE(EXPR_END);
22157 return result;
22158 }
22159
22160 if (tokadd_ident(p, c)) return 0;
22161 tokenize_ident(p);
22162 return result;
22163}
22164
22165static enum yytokentype
22166parse_ident(struct parser_params *p, int c, int cmd_state)
22167{
22168 enum yytokentype result;
22169 bool is_ascii = true;
22170 const enum lex_state_e last_state = p->lex.state;
22171 ID ident;
22172 int enforce_keyword_end = 0;
22173
22174 do {
22175 if (!ISASCII(c)) is_ascii = false;
22176 if (tokadd_mbchar(p, c) == -1) return 0;
22177 c = nextc(p);
22178 } while (parser_is_identchar(p));
22179 if ((c == '!' || c == '?') && !peek(p, '=')) {
22180 result = tFID;
22181 tokadd(p, c);
22182 }
22183 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
22184 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
22185 result = tIDENTIFIER;
22186 tokadd(p, c);
22187 }
22188 else {
22189 result = tCONSTANT; /* assume provisionally */
22190 pushback(p, c);
22191 }
22192 tokfix(p);
22193
22194 if (IS_LABEL_POSSIBLE()) {
22195 if (IS_LABEL_SUFFIX(0)) {
22196 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
22197 nextc(p);
22198 tokenize_ident(p);
22199 return tLABEL;
22200 }
22201 }
22202
22203#ifndef RIPPER
22204 if (peek_end_expect_token_locations(p)) {
22205 const rb_code_position_t *end_pos;
22206 int lineno, column;
22207 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
22208
22209 end_pos = peek_end_expect_token_locations(p)->pos;
22210 lineno = end_pos->lineno;
22211 column = end_pos->column;
22212
22213 if (p->debug) {
22214 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
22215 p->ruby_sourceline, beg_pos, lineno, column);
22216 }
22217
22218 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
22219 const struct kwtable *kw;
22220
22221 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
22222 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
22223 enforce_keyword_end = 1;
22224 }
22225 }
22226 }
22227#endif
22228
22229 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
22230 const struct kwtable *kw;
22231
22232 /* See if it is a reserved word. */
22233 kw = rb_reserved_word(tok(p), toklen(p));
22234 if (kw) {
22235 enum lex_state_e state = p->lex.state;
22236 if (IS_lex_state_for(state, EXPR_FNAME)) {
22237 SET_LEX_STATE(EXPR_ENDFN);
22238 set_yylval_name(rb_intern2(tok(p), toklen(p)));
22239 return kw->id[0];
22240 }
22241 SET_LEX_STATE(kw->state);
22242 if (IS_lex_state(EXPR_BEG)) {
22243 p->command_start = TRUE;
22244 }
22245 if (kw->id[0] == keyword_do) {
22246 if (lambda_beginning_p()) {
22247 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
22248 return keyword_do_LAMBDA;
22249 }
22250 if (COND_P()) return keyword_do_cond;
22251 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
22252 return keyword_do_block;
22253 return keyword_do;
22254 }
22255 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
22256 return kw->id[0];
22257 else {
22258 if (kw->id[0] != kw->id[1])
22259 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
22260 return kw->id[1];
22261 }
22262 }
22263 }
22264
22265 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
22266 if (cmd_state) {
22267 SET_LEX_STATE(EXPR_CMDARG);
22268 }
22269 else {
22270 SET_LEX_STATE(EXPR_ARG);
22271 }
22272 }
22273 else if (p->lex.state == EXPR_FNAME) {
22274 SET_LEX_STATE(EXPR_ENDFN);
22275 }
22276 else {
22277 SET_LEX_STATE(EXPR_END);
22278 }
22279
22280 ident = tokenize_ident(p);
22281 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
22282 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
22283 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
22284 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
22285 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
22286 }
22287 return result;
22288}
22289
22290static void
22291warn_cr(struct parser_params *p)
22292{
22293 if (!p->cr_seen) {
22294 p->cr_seen = TRUE;
22295 /* carried over with p->lex.nextline for nextc() */
22296 rb_warn0("encountered \\r in middle of line, treated as a mere space");
22297 }
22298}
22299
22300static enum yytokentype
22301parser_yylex(struct parser_params *p)
22302{
22303 register int c;
22304 int space_seen = 0;
22305 int cmd_state;
22306 int label;
22307 enum lex_state_e last_state;
22308 int fallthru = FALSE;
22309 int token_seen = p->token_seen;
22310
22311 if (p->lex.strterm) {
22312 if (strterm_is_heredoc(p->lex.strterm)) {
22313 token_flush(p);
22314 return here_document(p, &p->lex.strterm->u.heredoc);
22315 }
22316 else {
22317 token_flush(p);
22318 return parse_string(p, &p->lex.strterm->u.literal);
22319 }
22320 }
22321 cmd_state = p->command_start;
22322 p->command_start = FALSE;
22323 p->token_seen = TRUE;
22324#ifndef RIPPER
22325 token_flush(p);
22326#endif
22327 retry:
22328 last_state = p->lex.state;
22329 switch (c = nextc(p)) {
22330 case '\0': /* NUL */
22331 case '\004': /* ^D */
22332 case '\032': /* ^Z */
22333 case -1: /* end of script. */
22334 p->eofp = 1;
22335#ifndef RIPPER
22336 if (p->end_expect_token_locations) {
22337 pop_end_expect_token_locations(p);
22338 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22339 return tDUMNY_END;
22340 }
22341#endif
22342 /* Set location for end-of-input because dispatch_scan_event is not called. */
22343 RUBY_SET_YYLLOC(*p->yylloc);
22344 return END_OF_INPUT;
22345
22346 /* white spaces */
22347 case '\r':
22348 warn_cr(p);
22349 /* fall through */
22350 case ' ': case '\t': case '\f':
22351 case '\13': /* '\v' */
22352 space_seen = 1;
22353 while ((c = nextc(p))) {
22354 switch (c) {
22355 case '\r':
22356 warn_cr(p);
22357 /* fall through */
22358 case ' ': case '\t': case '\f':
22359 case '\13': /* '\v' */
22360 break;
22361 default:
22362 goto outofloop;
22363 }
22364 }
22365 outofloop:
22366 pushback(p, c);
22367 dispatch_scan_event(p, tSP);
22368#ifndef RIPPER
22369 token_flush(p);
22370#endif
22371 goto retry;
22372
22373 case '#': /* it's a comment */
22374 p->token_seen = token_seen;
22375 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22376 /* no magic_comment in shebang line */
22377 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22378 if (comment_at_top(p)) {
22379 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22380 }
22381 }
22382 p->lex.pcur = pcur, p->lex.ptok = ptok;
22383 lex_goto_eol(p);
22384 dispatch_scan_event(p, tCOMMENT);
22385 fallthru = TRUE;
22386 /* fall through */
22387 case '\n':
22388 p->token_seen = token_seen;
22389 rb_parser_string_t *prevline = p->lex.lastline;
22390 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22391 !IS_lex_state(EXPR_LABELED));
22392 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22393 if (!fallthru) {
22394 dispatch_scan_event(p, tIGNORED_NL);
22395 }
22396 fallthru = FALSE;
22397 if (!c && p->ctxt.in_kwarg) {
22398 goto normal_newline;
22399 }
22400 goto retry;
22401 }
22402 while (1) {
22403 switch (c = nextc(p)) {
22404 case ' ': case '\t': case '\f': case '\r':
22405 case '\13': /* '\v' */
22406 space_seen = 1;
22407 break;
22408 case '#':
22409 pushback(p, c);
22410 if (space_seen) {
22411 dispatch_scan_event(p, tSP);
22412 token_flush(p);
22413 }
22414 goto retry;
22415 case 'a':
22416 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22417 goto bol;
22418 case 'o':
22419 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22420 goto bol;
22421 case '|':
22422 if (peek(p, '|')) goto leading_logical;
22423 goto bol;
22424 case '&':
22425 if (peek(p, '&')) {
22426 leading_logical:
22427 pushback(p, c);
22428 dispatch_delayed_token(p, tIGNORED_NL);
22429 cmd_state = FALSE;
22430 goto retry;
22431 }
22432 /* fall through */
22433 case '.': {
22434 dispatch_delayed_token(p, tIGNORED_NL);
22435 if (peek(p, '.') == (c == '&')) {
22436 pushback(p, c);
22437 dispatch_scan_event(p, tSP);
22438 goto retry;
22439 }
22440 }
22441 bol:
22442 default:
22443 p->ruby_sourceline--;
22444 p->lex.nextline = p->lex.lastline;
22445 set_lastline(p, prevline);
22446 case -1: /* EOF no decrement*/
22447 if (c == -1 && space_seen) {
22448 dispatch_scan_event(p, tSP);
22449 }
22450 lex_goto_eol(p);
22451 if (c != -1) {
22452 token_flush(p);
22453 RUBY_SET_YYLLOC(*p->yylloc);
22454 }
22455 goto normal_newline;
22456 }
22457 }
22458 normal_newline:
22459 p->command_start = TRUE;
22460 SET_LEX_STATE(EXPR_BEG);
22461 return '\n';
22462
22463 case '*':
22464 if ((c = nextc(p)) == '*') {
22465 if ((c = nextc(p)) == '=') {
22466 set_yylval_id(idPow);
22467 SET_LEX_STATE(EXPR_BEG);
22468 return tOP_ASGN;
22469 }
22470 pushback(p, c);
22471 if (IS_SPCARG(c)) {
22472 rb_warning0("'**' interpreted as argument prefix");
22473 c = tDSTAR;
22474 }
22475 else if (IS_BEG()) {
22476 c = tDSTAR;
22477 }
22478 else {
22479 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22480 }
22481 }
22482 else {
22483 if (c == '=') {
22484 set_yylval_id('*');
22485 SET_LEX_STATE(EXPR_BEG);
22486 return tOP_ASGN;
22487 }
22488 pushback(p, c);
22489 if (IS_SPCARG(c)) {
22490 rb_warning0("'*' interpreted as argument prefix");
22491 c = tSTAR;
22492 }
22493 else if (IS_BEG()) {
22494 c = tSTAR;
22495 }
22496 else {
22497 c = warn_balanced('*', "*", "argument prefix");
22498 }
22499 }
22500 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22501 return c;
22502
22503 case '!':
22504 c = nextc(p);
22505 if (IS_AFTER_OPERATOR()) {
22506 SET_LEX_STATE(EXPR_ARG);
22507 if (c == '@') {
22508 return '!';
22509 }
22510 }
22511 else {
22512 SET_LEX_STATE(EXPR_BEG);
22513 }
22514 if (c == '=') {
22515 return tNEQ;
22516 }
22517 if (c == '~') {
22518 return tNMATCH;
22519 }
22520 pushback(p, c);
22521 return '!';
22522
22523 case '=':
22524 if (was_bol(p)) {
22525 /* skip embedded rd document */
22526 if (word_match_p(p, "begin", 5)) {
22527 int first_p = TRUE;
22528
22529 lex_goto_eol(p);
22530 dispatch_scan_event(p, tEMBDOC_BEG);
22531 for (;;) {
22532 lex_goto_eol(p);
22533 if (!first_p) {
22534 dispatch_scan_event(p, tEMBDOC);
22535 }
22536 first_p = FALSE;
22537 c = nextc(p);
22538 if (c == -1) {
22539 compile_error(p, "embedded document meets end of file");
22540 return END_OF_INPUT;
22541 }
22542 if (c == '=' && word_match_p(p, "end", 3)) {
22543 break;
22544 }
22545 pushback(p, c);
22546 }
22547 lex_goto_eol(p);
22548 dispatch_scan_event(p, tEMBDOC_END);
22549 goto retry;
22550 }
22551 }
22552
22553 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22554 if ((c = nextc(p)) == '=') {
22555 if ((c = nextc(p)) == '=') {
22556 return tEQQ;
22557 }
22558 pushback(p, c);
22559 return tEQ;
22560 }
22561 if (c == '~') {
22562 return tMATCH;
22563 }
22564 else if (c == '>') {
22565 return tASSOC;
22566 }
22567 pushback(p, c);
22568 return '=';
22569
22570 case '<':
22571 c = nextc(p);
22572 if (c == '<' &&
22573 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22574 !IS_END() &&
22575 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22576 enum yytokentype token = heredoc_identifier(p);
22577 if (token) return token < 0 ? 0 : token;
22578 }
22579 if (IS_AFTER_OPERATOR()) {
22580 SET_LEX_STATE(EXPR_ARG);
22581 }
22582 else {
22583 if (IS_lex_state(EXPR_CLASS))
22584 p->command_start = TRUE;
22585 SET_LEX_STATE(EXPR_BEG);
22586 }
22587 if (c == '=') {
22588 if ((c = nextc(p)) == '>') {
22589 return tCMP;
22590 }
22591 pushback(p, c);
22592 return tLEQ;
22593 }
22594 if (c == '<') {
22595 if ((c = nextc(p)) == '=') {
22596 set_yylval_id(idLTLT);
22597 SET_LEX_STATE(EXPR_BEG);
22598 return tOP_ASGN;
22599 }
22600 pushback(p, c);
22601 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22602 }
22603 pushback(p, c);
22604 return '<';
22605
22606 case '>':
22607 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22608 if ((c = nextc(p)) == '=') {
22609 return tGEQ;
22610 }
22611 if (c == '>') {
22612 if ((c = nextc(p)) == '=') {
22613 set_yylval_id(idGTGT);
22614 SET_LEX_STATE(EXPR_BEG);
22615 return tOP_ASGN;
22616 }
22617 pushback(p, c);
22618 return tRSHFT;
22619 }
22620 pushback(p, c);
22621 return '>';
22622
22623 case '"':
22624 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22625 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22626 p->lex.ptok = p->lex.pcur-1;
22627 return tSTRING_BEG;
22628
22629 case '`':
22630 if (IS_lex_state(EXPR_FNAME)) {
22631 SET_LEX_STATE(EXPR_ENDFN);
22632 return c;
22633 }
22634 if (IS_lex_state(EXPR_DOT)) {
22635 if (cmd_state)
22636 SET_LEX_STATE(EXPR_CMDARG);
22637 else
22638 SET_LEX_STATE(EXPR_ARG);
22639 return c;
22640 }
22641 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22642 return tXSTRING_BEG;
22643
22644 case '\'':
22645 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22646 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22647 p->lex.ptok = p->lex.pcur-1;
22648 return tSTRING_BEG;
22649
22650 case '?':
22651 return parse_qmark(p, space_seen);
22652
22653 case '&':
22654 if ((c = nextc(p)) == '&') {
22655 SET_LEX_STATE(EXPR_BEG);
22656 if ((c = nextc(p)) == '=') {
22657 set_yylval_id(idANDOP);
22658 SET_LEX_STATE(EXPR_BEG);
22659 return tOP_ASGN;
22660 }
22661 pushback(p, c);
22662 return tANDOP;
22663 }
22664 else if (c == '=') {
22665 set_yylval_id('&');
22666 SET_LEX_STATE(EXPR_BEG);
22667 return tOP_ASGN;
22668 }
22669 else if (c == '.') {
22670 set_yylval_id(idANDDOT);
22671 SET_LEX_STATE(EXPR_DOT);
22672 return tANDDOT;
22673 }
22674 pushback(p, c);
22675 if (IS_SPCARG(c)) {
22676 if ((c != ':') ||
22677 (c = peekc_n(p, 1)) == -1 ||
22678 !(c == '\'' || c == '"' ||
22679 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22680 rb_warning0("'&' interpreted as argument prefix");
22681 }
22682 c = tAMPER;
22683 }
22684 else if (IS_BEG()) {
22685 c = tAMPER;
22686 }
22687 else {
22688 c = warn_balanced('&', "&", "argument prefix");
22689 }
22690 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22691 return c;
22692
22693 case '|':
22694 if ((c = nextc(p)) == '|') {
22695 SET_LEX_STATE(EXPR_BEG);
22696 if ((c = nextc(p)) == '=') {
22697 set_yylval_id(idOROP);
22698 SET_LEX_STATE(EXPR_BEG);
22699 return tOP_ASGN;
22700 }
22701 pushback(p, c);
22702 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22703 c = '|';
22704 pushback(p, '|');
22705 return c;
22706 }
22707 return tOROP;
22708 }
22709 if (c == '=') {
22710 set_yylval_id('|');
22711 SET_LEX_STATE(EXPR_BEG);
22712 return tOP_ASGN;
22713 }
22714 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22715 pushback(p, c);
22716 return '|';
22717
22718 case '+':
22719 c = nextc(p);
22720 if (IS_AFTER_OPERATOR()) {
22721 SET_LEX_STATE(EXPR_ARG);
22722 if (c == '@') {
22723 return tUPLUS;
22724 }
22725 pushback(p, c);
22726 return '+';
22727 }
22728 if (c == '=') {
22729 set_yylval_id('+');
22730 SET_LEX_STATE(EXPR_BEG);
22731 return tOP_ASGN;
22732 }
22733 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22734 SET_LEX_STATE(EXPR_BEG);
22735 pushback(p, c);
22736 if (c != -1 && ISDIGIT(c)) {
22737 return parse_numeric(p, '+');
22738 }
22739 return tUPLUS;
22740 }
22741 SET_LEX_STATE(EXPR_BEG);
22742 pushback(p, c);
22743 return warn_balanced('+', "+", "unary operator");
22744
22745 case '-':
22746 c = nextc(p);
22747 if (IS_AFTER_OPERATOR()) {
22748 SET_LEX_STATE(EXPR_ARG);
22749 if (c == '@') {
22750 return tUMINUS;
22751 }
22752 pushback(p, c);
22753 return '-';
22754 }
22755 if (c == '=') {
22756 set_yylval_id('-');
22757 SET_LEX_STATE(EXPR_BEG);
22758 return tOP_ASGN;
22759 }
22760 if (c == '>') {
22761 SET_LEX_STATE(EXPR_ENDFN);
22762 yylval.num = p->lex.lpar_beg;
22763 p->lex.lpar_beg = p->lex.paren_nest;
22764 return tLAMBDA;
22765 }
22766 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22767 SET_LEX_STATE(EXPR_BEG);
22768 pushback(p, c);
22769 if (c != -1 && ISDIGIT(c)) {
22770 return tUMINUS_NUM;
22771 }
22772 return tUMINUS;
22773 }
22774 SET_LEX_STATE(EXPR_BEG);
22775 pushback(p, c);
22776 return warn_balanced('-', "-", "unary operator");
22777
22778 case '.': {
22779 int is_beg = IS_BEG();
22780 SET_LEX_STATE(EXPR_BEG);
22781 if ((c = nextc(p)) == '.') {
22782 if ((c = nextc(p)) == '.') {
22783 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22784 SET_LEX_STATE(EXPR_ENDARG);
22785 return tBDOT3;
22786 }
22787 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22788 rb_warn0("... at EOL, should be parenthesized?");
22789 }
22790 return is_beg ? tBDOT3 : tDOT3;
22791 }
22792 pushback(p, c);
22793 return is_beg ? tBDOT2 : tDOT2;
22794 }
22795 pushback(p, c);
22796 if (c != -1 && ISDIGIT(c)) {
22797 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22798 parse_numeric(p, '.');
22799 if (ISDIGIT(prev)) {
22800 yyerror0("unexpected fraction part after numeric literal");
22801 }
22802 else {
22803 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22804 }
22805 SET_LEX_STATE(EXPR_END);
22806 p->lex.ptok = p->lex.pcur;
22807 goto retry;
22808 }
22809 set_yylval_id('.');
22810 SET_LEX_STATE(EXPR_DOT);
22811 return '.';
22812 }
22813
22814 case '0': case '1': case '2': case '3': case '4':
22815 case '5': case '6': case '7': case '8': case '9':
22816 return parse_numeric(p, c);
22817
22818 case ')':
22819 COND_POP();
22820 CMDARG_POP();
22821 SET_LEX_STATE(EXPR_ENDFN);
22822 p->lex.paren_nest--;
22823 return c;
22824
22825 case ']':
22826 COND_POP();
22827 CMDARG_POP();
22828 SET_LEX_STATE(EXPR_END);
22829 p->lex.paren_nest--;
22830 return c;
22831
22832 case '}':
22833 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22834 if (!p->lex.brace_nest--) return tSTRING_DEND;
22835 COND_POP();
22836 CMDARG_POP();
22837 SET_LEX_STATE(EXPR_END);
22838 p->lex.paren_nest--;
22839 return c;
22840
22841 case ':':
22842 c = nextc(p);
22843 if (c == ':') {
22844 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22845 SET_LEX_STATE(EXPR_BEG);
22846 return tCOLON3;
22847 }
22848 set_yylval_id(idCOLON2);
22849 SET_LEX_STATE(EXPR_DOT);
22850 return tCOLON2;
22851 }
22852 if (IS_END() || ISSPACE(c) || c == '#') {
22853 pushback(p, c);
22854 c = warn_balanced(':', ":", "symbol literal");
22855 SET_LEX_STATE(EXPR_BEG);
22856 return c;
22857 }
22858 switch (c) {
22859 case '\'':
22860 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22861 break;
22862 case '"':
22863 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22864 break;
22865 default:
22866 pushback(p, c);
22867 break;
22868 }
22869 SET_LEX_STATE(EXPR_FNAME);
22870 return tSYMBEG;
22871
22872 case '/':
22873 if (IS_BEG()) {
22874 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22875 return tREGEXP_BEG;
22876 }
22877 if ((c = nextc(p)) == '=') {
22878 set_yylval_id('/');
22879 SET_LEX_STATE(EXPR_BEG);
22880 return tOP_ASGN;
22881 }
22882 pushback(p, c);
22883 if (IS_SPCARG(c)) {
22884 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22885 return tREGEXP_BEG;
22886 }
22887 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22888 return warn_balanced('/', "/", "regexp literal");
22889
22890 case '^':
22891 if ((c = nextc(p)) == '=') {
22892 set_yylval_id('^');
22893 SET_LEX_STATE(EXPR_BEG);
22894 return tOP_ASGN;
22895 }
22896 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22897 pushback(p, c);
22898 return '^';
22899
22900 case ';':
22901 SET_LEX_STATE(EXPR_BEG);
22902 p->command_start = TRUE;
22903 return ';';
22904
22905 case ',':
22906 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22907 return ',';
22908
22909 case '~':
22910 if (IS_AFTER_OPERATOR()) {
22911 if ((c = nextc(p)) != '@') {
22912 pushback(p, c);
22913 }
22914 SET_LEX_STATE(EXPR_ARG);
22915 }
22916 else {
22917 SET_LEX_STATE(EXPR_BEG);
22918 }
22919 return '~';
22920
22921 case '(':
22922 if (IS_BEG()) {
22923 c = tLPAREN;
22924 }
22925 else if (!space_seen) {
22926 /* foo( ... ) => method call, no ambiguity */
22927 }
22928 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22929 c = tLPAREN_ARG;
22930 }
22931 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22932 rb_warning0("parentheses after method name is interpreted as "
22933 "an argument list, not a decomposed argument");
22934 }
22935 p->lex.paren_nest++;
22936 COND_PUSH(0);
22937 CMDARG_PUSH(0);
22938 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22939 return c;
22940
22941 case '[':
22942 p->lex.paren_nest++;
22943 if (IS_AFTER_OPERATOR()) {
22944 if ((c = nextc(p)) == ']') {
22945 p->lex.paren_nest--;
22946 SET_LEX_STATE(EXPR_ARG);
22947 if ((c = nextc(p)) == '=') {
22948 return tASET;
22949 }
22950 pushback(p, c);
22951 return tAREF;
22952 }
22953 pushback(p, c);
22954 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22955 return '[';
22956 }
22957 else if (IS_BEG()) {
22958 c = tLBRACK;
22959 }
22960 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22961 c = tLBRACK;
22962 }
22963 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22964 COND_PUSH(0);
22965 CMDARG_PUSH(0);
22966 return c;
22967
22968 case '{':
22969 ++p->lex.brace_nest;
22970 if (lambda_beginning_p())
22971 c = tLAMBEG;
22972 else if (IS_lex_state(EXPR_LABELED))
22973 c = tLBRACE; /* hash */
22974 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22975 c = '{'; /* block (primary) */
22976 else if (IS_lex_state(EXPR_ENDARG))
22977 c = tLBRACE_ARG; /* block (expr) */
22978 else
22979 c = tLBRACE; /* hash */
22980 if (c != tLBRACE) {
22981 p->command_start = TRUE;
22982 SET_LEX_STATE(EXPR_BEG);
22983 }
22984 else {
22985 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22986 }
22987 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22988 COND_PUSH(0);
22989 CMDARG_PUSH(0);
22990 return c;
22991
22992 case '\\':
22993 c = nextc(p);
22994 if (c == '\n') {
22995 space_seen = 1;
22996 dispatch_scan_event(p, tSP);
22997 goto retry; /* skip \\n */
22998 }
22999 if (c == ' ') return tSP;
23000 if (ISSPACE(c)) return c;
23001 pushback(p, c);
23002 return '\\';
23003
23004 case '%':
23005 return parse_percent(p, space_seen, last_state);
23006
23007 case '$':
23008 return parse_gvar(p, last_state);
23009
23010 case '@':
23011 return parse_atmark(p, last_state);
23012
23013 case '_':
23014 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
23015 p->ruby__end__seen = 1;
23016 p->eofp = 1;
23017#ifdef RIPPER
23018 lex_goto_eol(p);
23019 dispatch_scan_event(p, k__END__);
23020#endif
23021 return END_OF_INPUT;
23022 }
23023 newtok(p);
23024 break;
23025
23026 default:
23027 if (!parser_is_identchar(p)) {
23028 compile_error(p, "Invalid char '\\x%02X' in expression", c);
23029 token_flush(p);
23030 goto retry;
23031 }
23032
23033 newtok(p);
23034 break;
23035 }
23036
23037 return parse_ident(p, c, cmd_state);
23038}
23039
23040static enum yytokentype
23041yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
23042{
23043 enum yytokentype t;
23044
23045 p->lval = lval;
23046 lval->node = 0;
23047 p->yylloc = yylloc;
23048
23049 t = parser_yylex(p);
23050
23051 if (has_delayed_token(p))
23052 dispatch_delayed_token(p, t);
23053 else if (t != END_OF_INPUT)
23054 dispatch_scan_event(p, t);
23055
23056 return t;
23057}
23058
23059#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
23060
23061static NODE*
23062node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
23063{
23064 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
23065
23066 rb_node_init(n, type);
23067 return n;
23068}
23069
23070static NODE *
23071nd_set_loc(NODE *nd, const YYLTYPE *loc)
23072{
23073 nd->nd_loc = *loc;
23074 nd_set_line(nd, loc->beg_pos.lineno);
23075 return nd;
23076}
23077
23078static NODE*
23079node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
23080{
23081 NODE *n = node_new_internal(p, type, size, alignment);
23082
23083 nd_set_loc(n, loc);
23084 nd_set_node_id(n, parser_get_node_id(p));
23085 return n;
23086}
23087
23088#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
23089
23090static rb_node_scope_t *
23091rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23092{
23093 rb_ast_id_table_t *nd_tbl;
23094 nd_tbl = local_tbl(p);
23095 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23096 n->nd_tbl = nd_tbl;
23097 n->nd_body = nd_body;
23098 n->nd_parent = nd_parent;
23099 n->nd_args = nd_args;
23100
23101 return n;
23102}
23103
23104static rb_node_scope_t *
23105rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23106{
23107 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23108 n->nd_tbl = nd_tbl;
23109 n->nd_body = nd_body;
23110 n->nd_parent = nd_parent;
23111 n->nd_args = nd_args;
23112
23113 return n;
23114}
23115
23116static rb_node_defn_t *
23117rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23118{
23119 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
23120 n->nd_mid = nd_mid;
23121 n->nd_defn = nd_defn;
23122
23123 return n;
23124}
23125
23126static rb_node_defs_t *
23127rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23128{
23129 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
23130 n->nd_recv = nd_recv;
23131 n->nd_mid = nd_mid;
23132 n->nd_defn = nd_defn;
23133
23134 return n;
23135}
23136
23137static rb_node_block_t *
23138rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23139{
23140 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
23141 n->nd_head = nd_head;
23142 n->nd_end = (NODE *)n;
23143 n->nd_next = 0;
23144
23145 return n;
23146}
23147
23148static rb_node_for_t *
23149rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *for_keyword_loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *do_keyword_loc, const YYLTYPE *end_keyword_loc)
23150{
23151 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
23152 n->nd_body = nd_body;
23153 n->nd_iter = nd_iter;
23154 n->for_keyword_loc = *for_keyword_loc;
23155 n->in_keyword_loc = *in_keyword_loc;
23156 n->do_keyword_loc = *do_keyword_loc;
23157 n->end_keyword_loc = *end_keyword_loc;
23158
23159 return n;
23160}
23161
23162static rb_node_for_masgn_t *
23163rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
23164{
23165 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
23166 n->nd_var = nd_var;
23167
23168 return n;
23169}
23170
23171static rb_node_retry_t *
23172rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
23173{
23174 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
23175
23176 return n;
23177}
23178
23179static rb_node_begin_t *
23180rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23181{
23182 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
23183 n->nd_body = nd_body;
23184
23185 return n;
23186}
23187
23188static rb_node_rescue_t *
23189rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
23190{
23191 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
23192 n->nd_head = nd_head;
23193 n->nd_resq = nd_resq;
23194 n->nd_else = nd_else;
23195
23196 return n;
23197}
23198
23199static rb_node_resbody_t *
23200rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
23201{
23202 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
23203 n->nd_args = nd_args;
23204 n->nd_exc_var = nd_exc_var;
23205 n->nd_body = nd_body;
23206 n->nd_next = nd_next;
23207
23208 return n;
23209}
23210
23211static rb_node_ensure_t *
23212rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
23213{
23214 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
23215 n->nd_head = nd_head;
23216 n->nd_ensr = nd_ensr;
23217
23218 return n;
23219}
23220
23221static rb_node_and_t *
23222rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23223{
23224 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
23225 n->nd_1st = nd_1st;
23226 n->nd_2nd = nd_2nd;
23227 n->operator_loc = *operator_loc;
23228
23229 return n;
23230}
23231
23232static rb_node_or_t *
23233rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23234{
23235 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
23236 n->nd_1st = nd_1st;
23237 n->nd_2nd = nd_2nd;
23238 n->operator_loc = *operator_loc;
23239
23240 return n;
23241}
23242
23243static rb_node_return_t *
23244rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23245{
23246 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
23247 n->nd_stts = nd_stts;
23248 n->keyword_loc = *keyword_loc;
23249 return n;
23250}
23251
23252static rb_node_yield_t *
23253rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23254{
23255 if (nd_head) no_blockarg(p, nd_head);
23256
23257 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
23258 n->nd_head = nd_head;
23259 n->keyword_loc = *keyword_loc;
23260 n->lparen_loc = *lparen_loc;
23261 n->rparen_loc = *rparen_loc;
23262
23263 return n;
23264}
23265
23266static rb_node_if_t *
23267rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE* if_keyword_loc, const YYLTYPE* then_keyword_loc, const YYLTYPE* end_keyword_loc)
23268{
23269 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
23270 n->nd_cond = nd_cond;
23271 n->nd_body = nd_body;
23272 n->nd_else = nd_else;
23273 n->if_keyword_loc = *if_keyword_loc;
23274 n->then_keyword_loc = *then_keyword_loc;
23275 n->end_keyword_loc = *end_keyword_loc;
23276
23277 return n;
23278}
23279
23280static rb_node_unless_t *
23281rb_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)
23282{
23283 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
23284 n->nd_cond = nd_cond;
23285 n->nd_body = nd_body;
23286 n->nd_else = nd_else;
23287 n->keyword_loc = *keyword_loc;
23288 n->then_keyword_loc = *then_keyword_loc;
23289 n->end_keyword_loc = *end_keyword_loc;
23290
23291 return n;
23292}
23293
23294static rb_node_class_t *
23295rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *inheritance_operator_loc, const YYLTYPE *end_keyword_loc)
23296{
23297 /* Keep the order of node creation */
23298 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23299 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
23300 RNODE_SCOPE(scope)->nd_parent = &n->node;
23301 n->nd_cpath = nd_cpath;
23302 n->nd_body = scope;
23303 n->nd_super = nd_super;
23304 n->class_keyword_loc = *class_keyword_loc;
23305 n->inheritance_operator_loc = *inheritance_operator_loc;
23306 n->end_keyword_loc = *end_keyword_loc;
23307
23308 return n;
23309}
23310
23311static rb_node_sclass_t *
23312rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *operator_loc, const YYLTYPE *end_keyword_loc)
23313{
23314 /* Keep the order of node creation */
23315 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23316 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
23317 RNODE_SCOPE(scope)->nd_parent = &n->node;
23318 n->nd_recv = nd_recv;
23319 n->nd_body = scope;
23320 n->class_keyword_loc = *class_keyword_loc;
23321 n->operator_loc = *operator_loc;
23322 n->end_keyword_loc = *end_keyword_loc;
23323
23324 return n;
23325}
23326
23327static rb_node_module_t *
23328rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *module_keyword_loc, const YYLTYPE *end_keyword_loc)
23329{
23330 /* Keep the order of node creation */
23331 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23332 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23333 RNODE_SCOPE(scope)->nd_parent = &n->node;
23334 n->nd_cpath = nd_cpath;
23335 n->nd_body = scope;
23336 n->module_keyword_loc = *module_keyword_loc;
23337 n->end_keyword_loc = *end_keyword_loc;
23338
23339 return n;
23340}
23341
23342static rb_node_iter_t *
23343rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23344{
23345 /* Keep the order of node creation */
23346 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23347 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23348 RNODE_SCOPE(scope)->nd_parent = &n->node;
23349 n->nd_body = scope;
23350 n->nd_iter = 0;
23351
23352 return n;
23353}
23354
23355static rb_node_lambda_t *
23356rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23357{
23358 /* Keep the order of node creation */
23359 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23360 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23361 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23362 RNODE_SCOPE(scope)->nd_parent = &n->node;
23363 n->nd_body = scope;
23364 n->operator_loc = *operator_loc;
23365 n->opening_loc = *opening_loc;
23366 n->closing_loc = *closing_loc;
23367
23368 return n;
23369}
23370
23371static rb_node_case_t *
23372rb_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)
23373{
23374 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23375 n->nd_head = nd_head;
23376 n->nd_body = nd_body;
23377 n->case_keyword_loc = *case_keyword_loc;
23378 n->end_keyword_loc = *end_keyword_loc;
23379
23380 return n;
23381}
23382
23383static rb_node_case2_t *
23384rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23385{
23386 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23387 n->nd_head = 0;
23388 n->nd_body = nd_body;
23389 n->case_keyword_loc = *case_keyword_loc;
23390 n->end_keyword_loc = *end_keyword_loc;
23391
23392 return n;
23393}
23394
23395static rb_node_case3_t *
23396rb_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)
23397{
23398 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23399 n->nd_head = nd_head;
23400 n->nd_body = nd_body;
23401 n->case_keyword_loc = *case_keyword_loc;
23402 n->end_keyword_loc = *end_keyword_loc;
23403
23404 return n;
23405}
23406
23407static rb_node_when_t *
23408rb_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)
23409{
23410 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23411 n->nd_head = nd_head;
23412 n->nd_body = nd_body;
23413 n->nd_next = nd_next;
23414 n->keyword_loc = *keyword_loc;
23415 n->then_keyword_loc = *then_keyword_loc;
23416
23417 return n;
23418}
23419
23420static rb_node_in_t *
23421rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *operator_loc)
23422{
23423 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23424 n->nd_head = nd_head;
23425 n->nd_body = nd_body;
23426 n->nd_next = nd_next;
23427 n->in_keyword_loc = *in_keyword_loc;
23428 n->then_keyword_loc = *then_keyword_loc;
23429 n->operator_loc = *operator_loc;
23430
23431 return n;
23432}
23433
23434static rb_node_while_t *
23435rb_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)
23436{
23437 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23438 n->nd_cond = nd_cond;
23439 n->nd_body = nd_body;
23440 n->nd_state = nd_state;
23441 n->keyword_loc = *keyword_loc;
23442 n->closing_loc = *closing_loc;
23443
23444 return n;
23445}
23446
23447static rb_node_until_t *
23448rb_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)
23449{
23450 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23451 n->nd_cond = nd_cond;
23452 n->nd_body = nd_body;
23453 n->nd_state = nd_state;
23454 n->keyword_loc = *keyword_loc;
23455 n->closing_loc = *closing_loc;
23456
23457 return n;
23458}
23459
23460static rb_node_colon2_t *
23461rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23462{
23463 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23464 n->nd_head = nd_head;
23465 n->nd_mid = nd_mid;
23466 n->delimiter_loc = *delimiter_loc;
23467 n->name_loc = *name_loc;
23468
23469 return n;
23470}
23471
23472static rb_node_colon3_t *
23473rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23474{
23475 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23476 n->nd_mid = nd_mid;
23477 n->delimiter_loc = *delimiter_loc;
23478 n->name_loc = *name_loc;
23479
23480 return n;
23481}
23482
23483static rb_node_dot2_t *
23484rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23485{
23486 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23487 n->nd_beg = nd_beg;
23488 n->nd_end = nd_end;
23489 n->operator_loc = *operator_loc;
23490
23491 return n;
23492}
23493
23494static rb_node_dot3_t *
23495rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23496{
23497 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23498 n->nd_beg = nd_beg;
23499 n->nd_end = nd_end;
23500 n->operator_loc = *operator_loc;
23501
23502 return n;
23503}
23504
23505static rb_node_self_t *
23506rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23507{
23508 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23509 n->nd_state = 1;
23510
23511 return n;
23512}
23513
23514static rb_node_nil_t *
23515rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23516{
23517 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23518
23519 return n;
23520}
23521
23522static rb_node_true_t *
23523rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23524{
23525 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23526
23527 return n;
23528}
23529
23530static rb_node_false_t *
23531rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23532{
23533 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23534
23535 return n;
23536}
23537
23538static rb_node_super_t *
23539rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23540 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23541{
23542 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23543 n->nd_args = nd_args;
23544 n->keyword_loc = *keyword_loc;
23545 n->lparen_loc = *lparen_loc;
23546 n->rparen_loc = *rparen_loc;
23547
23548 return n;
23549}
23550
23551static rb_node_zsuper_t *
23552rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23553{
23554 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23555
23556 return n;
23557}
23558
23559static rb_node_match2_t *
23560rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23561{
23562 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23563 n->nd_recv = nd_recv;
23564 n->nd_value = nd_value;
23565 n->nd_args = 0;
23566
23567 return n;
23568}
23569
23570static rb_node_match3_t *
23571rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23572{
23573 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23574 n->nd_recv = nd_recv;
23575 n->nd_value = nd_value;
23576
23577 return n;
23578}
23579
23580static rb_node_list_t *
23581rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23582{
23583 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23584}
23585
23586static rb_node_list_t *
23587rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23588{
23589 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23590 n->nd_head = nd_head;
23591 n->as.nd_alen = nd_alen;
23592 n->nd_next = nd_next;
23593
23594 return n;
23595}
23596
23597static rb_node_zlist_t *
23598rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23599{
23600 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23601
23602 return n;
23603}
23604
23605static rb_node_hash_t *
23606rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23607{
23608 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23609 n->nd_head = nd_head;
23610 n->nd_brace = 0;
23611
23612 return n;
23613}
23614
23615static rb_node_masgn_t *
23616rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23617{
23618 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23619 n->nd_head = nd_head;
23620 n->nd_value = 0;
23621 n->nd_args = nd_args;
23622
23623 return n;
23624}
23625
23626static rb_node_gasgn_t *
23627rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23628{
23629 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23630 n->nd_vid = nd_vid;
23631 n->nd_value = nd_value;
23632
23633 return n;
23634}
23635
23636static rb_node_lasgn_t *
23637rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23638{
23639 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23640 n->nd_vid = nd_vid;
23641 n->nd_value = nd_value;
23642
23643 return n;
23644}
23645
23646static rb_node_dasgn_t *
23647rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23648{
23649 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23650 n->nd_vid = nd_vid;
23651 n->nd_value = nd_value;
23652
23653 return n;
23654}
23655
23656static rb_node_iasgn_t *
23657rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23658{
23659 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23660 n->nd_vid = nd_vid;
23661 n->nd_value = nd_value;
23662
23663 return n;
23664}
23665
23666static rb_node_cvasgn_t *
23667rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23668{
23669 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23670 n->nd_vid = nd_vid;
23671 n->nd_value = nd_value;
23672
23673 return n;
23674}
23675
23676static rb_node_op_asgn1_t *
23677rb_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)
23678{
23679 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23680 n->nd_recv = nd_recv;
23681 n->nd_mid = nd_mid;
23682 n->nd_index = index;
23683 n->nd_rvalue = rvalue;
23684 n->call_operator_loc = *call_operator_loc;
23685 n->opening_loc = *opening_loc;
23686 n->closing_loc = *closing_loc;
23687 n->binary_operator_loc = *binary_operator_loc;
23688
23689 return n;
23690}
23691
23692static rb_node_op_asgn2_t *
23693rb_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)
23694{
23695 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23696 n->nd_recv = nd_recv;
23697 n->nd_value = nd_value;
23698 n->nd_vid = nd_vid;
23699 n->nd_mid = nd_mid;
23700 n->nd_aid = nd_aid;
23701 n->call_operator_loc = *call_operator_loc;
23702 n->message_loc = *message_loc;
23703 n->binary_operator_loc = *binary_operator_loc;
23704
23705 return n;
23706}
23707
23708static rb_node_op_asgn_or_t *
23709rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23710{
23711 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23712 n->nd_head = nd_head;
23713 n->nd_value = nd_value;
23714
23715 return n;
23716}
23717
23718static rb_node_op_asgn_and_t *
23719rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23720{
23721 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23722 n->nd_head = nd_head;
23723 n->nd_value = nd_value;
23724
23725 return n;
23726}
23727
23728static rb_node_gvar_t *
23729rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23730{
23731 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23732 n->nd_vid = nd_vid;
23733
23734 return n;
23735}
23736
23737static rb_node_lvar_t *
23738rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23739{
23740 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23741 n->nd_vid = nd_vid;
23742
23743 return n;
23744}
23745
23746static rb_node_dvar_t *
23747rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23748{
23749 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23750 n->nd_vid = nd_vid;
23751
23752 return n;
23753}
23754
23755static rb_node_ivar_t *
23756rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23757{
23758 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23759 n->nd_vid = nd_vid;
23760
23761 return n;
23762}
23763
23764static rb_node_const_t *
23765rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23766{
23767 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23768 n->nd_vid = nd_vid;
23769
23770 return n;
23771}
23772
23773static rb_node_cvar_t *
23774rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23775{
23776 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23777 n->nd_vid = nd_vid;
23778
23779 return n;
23780}
23781
23782static rb_node_nth_ref_t *
23783rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23784{
23785 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23786 n->nd_nth = nd_nth;
23787
23788 return n;
23789}
23790
23791static rb_node_back_ref_t *
23792rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23793{
23794 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23795 n->nd_nth = nd_nth;
23796
23797 return n;
23798}
23799
23800static rb_node_integer_t *
23801rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23802{
23803 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23804 n->val = val;
23805 n->minus = FALSE;
23806 n->base = base;
23807
23808 return n;
23809}
23810
23811static rb_node_float_t *
23812rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23813{
23814 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23815 n->val = val;
23816 n->minus = FALSE;
23817
23818 return n;
23819}
23820
23821static rb_node_rational_t *
23822rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23823{
23824 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23825 n->val = val;
23826 n->minus = FALSE;
23827 n->base = base;
23828 n->seen_point = seen_point;
23829
23830 return n;
23831}
23832
23833static rb_node_imaginary_t *
23834rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23835{
23836 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23837 n->val = val;
23838 n->minus = FALSE;
23839 n->base = base;
23840 n->seen_point = seen_point;
23841 n->type = numeric_type;
23842
23843 return n;
23844}
23845
23846static rb_node_str_t *
23847rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23848{
23849 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23850 n->string = string;
23851
23852 return n;
23853}
23854
23855/* TODO; Use union for NODE_DSTR2 */
23856static rb_node_dstr_t *
23857rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23858{
23859 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23860 n->string = string;
23861 n->as.nd_alen = nd_alen;
23862 n->nd_next = (rb_node_list_t *)nd_next;
23863
23864 return n;
23865}
23866
23867static rb_node_dstr_t *
23868rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23869{
23870 return rb_node_dstr_new0(p, string, 1, 0, loc);
23871}
23872
23873static rb_node_xstr_t *
23874rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23875{
23876 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23877 n->string = string;
23878
23879 return n;
23880}
23881
23882static rb_node_dxstr_t *
23883rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23884{
23885 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23886 n->string = string;
23887 n->as.nd_alen = nd_alen;
23888 n->nd_next = (rb_node_list_t *)nd_next;
23889
23890 return n;
23891}
23892
23893static rb_node_sym_t *
23894rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23895{
23896 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23897 n->string = rb_str_to_parser_string(p, str);
23898
23899 return n;
23900}
23901
23902static rb_node_dsym_t *
23903rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23904{
23905 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23906 n->string = string;
23907 n->as.nd_alen = nd_alen;
23908 n->nd_next = (rb_node_list_t *)nd_next;
23909
23910 return n;
23911}
23912
23913static rb_node_evstr_t *
23914rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23915{
23916 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23917 n->nd_body = nd_body;
23918 n->opening_loc = *opening_loc;
23919 n->closing_loc = *closing_loc;
23920
23921 return n;
23922}
23923
23924static rb_node_regx_t *
23925rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
23926{
23927 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23928 n->string = string;
23929 n->options = options & RE_OPTION_MASK;
23930 n->opening_loc = *opening_loc;
23931 n->content_loc = *content_loc;
23932 n->closing_loc = *closing_loc;
23933
23934 return n;
23935}
23936
23937static rb_node_call_t *
23938rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23939{
23940 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23941 n->nd_recv = nd_recv;
23942 n->nd_mid = nd_mid;
23943 n->nd_args = nd_args;
23944
23945 return n;
23946}
23947
23948static rb_node_opcall_t *
23949rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23950{
23951 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23952 n->nd_recv = nd_recv;
23953 n->nd_mid = nd_mid;
23954 n->nd_args = nd_args;
23955
23956 return n;
23957}
23958
23959static rb_node_fcall_t *
23960rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23961{
23962 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23963 n->nd_mid = nd_mid;
23964 n->nd_args = nd_args;
23965
23966 return n;
23967}
23968
23969static rb_node_qcall_t *
23970rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23971{
23972 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23973 n->nd_recv = nd_recv;
23974 n->nd_mid = nd_mid;
23975 n->nd_args = nd_args;
23976
23977 return n;
23978}
23979
23980static rb_node_vcall_t *
23981rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23982{
23983 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23984 n->nd_mid = nd_mid;
23985
23986 return n;
23987}
23988
23989static rb_node_once_t *
23990rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23991{
23992 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23993 n->nd_body = nd_body;
23994
23995 return n;
23996}
23997
23998static rb_node_args_t *
23999rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
24000{
24001 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
24002 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
24003
24004 return n;
24005}
24006
24007static rb_node_args_aux_t *
24008rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
24009{
24010 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
24011 n->nd_pid = nd_pid;
24012 n->nd_plen = nd_plen;
24013 n->nd_next = 0;
24014
24015 return n;
24016}
24017
24018static rb_node_opt_arg_t *
24019rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24020{
24021 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
24022 n->nd_body = nd_body;
24023 n->nd_next = 0;
24024
24025 return n;
24026}
24027
24028static rb_node_kw_arg_t *
24029rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24030{
24031 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
24032 n->nd_body = nd_body;
24033 n->nd_next = 0;
24034
24035 return n;
24036}
24037
24038static rb_node_postarg_t *
24039rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
24040{
24041 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
24042 n->nd_1st = nd_1st;
24043 n->nd_2nd = nd_2nd;
24044
24045 return n;
24046}
24047
24048static rb_node_argscat_t *
24049rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24050{
24051 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
24052 n->nd_head = nd_head;
24053 n->nd_body = nd_body;
24054
24055 return n;
24056}
24057
24058static rb_node_argspush_t *
24059rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24060{
24061 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
24062 n->nd_head = nd_head;
24063 n->nd_body = nd_body;
24064
24065 return n;
24066}
24067
24068static rb_node_splat_t *
24069rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24070{
24071 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
24072 n->nd_head = nd_head;
24073 n->operator_loc = *operator_loc;
24074
24075 return n;
24076}
24077
24078static rb_node_block_pass_t *
24079rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24080{
24081 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
24082 n->forwarding = 0;
24083 n->nd_head = 0;
24084 n->nd_body = nd_body;
24085 n->operator_loc = *operator_loc;
24086
24087 return n;
24088}
24089
24090static rb_node_alias_t *
24091rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24092{
24093 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
24094 n->nd_1st = nd_1st;
24095 n->nd_2nd = nd_2nd;
24096 n->keyword_loc = *keyword_loc;
24097
24098 return n;
24099}
24100
24101static rb_node_valias_t *
24102rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24103{
24104 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
24105 n->nd_alias = nd_alias;
24106 n->nd_orig = nd_orig;
24107 n->keyword_loc = *keyword_loc;
24108
24109 return n;
24110}
24111
24112static rb_node_undef_t *
24113rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
24114{
24115 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
24116 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
24117 n->keyword_loc = NULL_LOC;
24118 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
24119
24120 return n;
24121}
24122
24123static rb_node_errinfo_t *
24124rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
24125{
24126 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
24127
24128 return n;
24129}
24130
24131static rb_node_defined_t *
24132rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24133{
24134 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
24135 n->nd_head = nd_head;
24136 n->keyword_loc = *keyword_loc;
24137
24138 return n;
24139}
24140
24141static rb_node_postexe_t *
24142rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24143{
24144 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
24145 n->nd_body = nd_body;
24146 n->keyword_loc = *keyword_loc;
24147 n->opening_loc = *opening_loc;
24148 n->closing_loc = *closing_loc;
24149
24150 return n;
24151}
24152
24153static rb_node_attrasgn_t *
24154rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24155{
24156 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
24157 n->nd_recv = nd_recv;
24158 n->nd_mid = nd_mid;
24159 n->nd_args = nd_args;
24160
24161 return n;
24162}
24163
24164static rb_node_aryptn_t *
24165rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
24166{
24167 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
24168 n->nd_pconst = 0;
24169 n->pre_args = pre_args;
24170 n->rest_arg = rest_arg;
24171 n->post_args = post_args;
24172
24173 return n;
24174}
24175
24176static rb_node_hshptn_t *
24177rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
24178{
24179 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
24180 n->nd_pconst = nd_pconst;
24181 n->nd_pkwargs = nd_pkwargs;
24182 n->nd_pkwrestarg = nd_pkwrestarg;
24183
24184 return n;
24185}
24186
24187static rb_node_fndptn_t *
24188rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
24189{
24190 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
24191 n->nd_pconst = 0;
24192 n->pre_rest_arg = pre_rest_arg;
24193 n->args = args;
24194 n->post_rest_arg = post_rest_arg;
24195
24196 return n;
24197}
24198
24199static rb_node_line_t *
24200rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
24201{
24202 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
24203
24204 return n;
24205}
24206
24207static rb_node_file_t *
24208rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24209{
24210 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
24211 n->path = rb_str_to_parser_string(p, str);
24212
24213 return n;
24214}
24215
24216static rb_node_encoding_t *
24217rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
24218{
24219 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
24220 n->enc = p->enc;
24221
24222 return n;
24223}
24224
24225static rb_node_cdecl_t *
24226rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
24227{
24228 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
24229 n->nd_vid = nd_vid;
24230 n->nd_value = nd_value;
24231 n->nd_else = nd_else;
24232 n->shareability = shareability;
24233
24234 return n;
24235}
24236
24237static rb_node_op_cdecl_t *
24238rb_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)
24239{
24240 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
24241 n->nd_head = nd_head;
24242 n->nd_value = nd_value;
24243 n->nd_aid = nd_aid;
24244 n->shareability = shareability;
24245
24246 return n;
24247}
24248
24249static rb_node_error_t *
24250rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
24251{
24252 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
24253
24254 return n;
24255}
24256
24257static rb_node_break_t *
24258rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24259{
24260 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
24261 n->nd_stts = nd_stts;
24262 n->nd_chain = 0;
24263 n->keyword_loc = *keyword_loc;
24264
24265 return n;
24266}
24267
24268static rb_node_next_t *
24269rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24270{
24271 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
24272 n->nd_stts = nd_stts;
24273 n->nd_chain = 0;
24274 n->keyword_loc = *keyword_loc;
24275
24276 return n;
24277}
24278
24279static rb_node_redo_t *
24280rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24281{
24282 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
24283 n->nd_chain = 0;
24284 n->keyword_loc = *keyword_loc;
24285
24286 return n;
24287}
24288
24289static rb_node_def_temp_t *
24290rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
24291{
24292 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
24293 n->save.numparam_save = 0;
24294 n->save.max_numparam = 0;
24295 n->save.ctxt = p->ctxt;
24296 n->nd_def = 0;
24297 n->nd_mid = 0;
24298
24299 return n;
24300}
24301
24302static rb_node_def_temp_t *
24303def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
24304{
24305 n->save.numparam_save = numparam_push(p);
24306 n->save.max_numparam = p->max_numparam;
24307 return n;
24308}
24309
24310#ifndef RIPPER
24311static enum node_type
24312nodetype(NODE *node) /* for debug */
24313{
24314 return (enum node_type)nd_type(node);
24315}
24316
24317static int
24318nodeline(NODE *node)
24319{
24320 return nd_line(node);
24321}
24322#endif
24323
24324static NODE*
24325newline_node(NODE *node)
24326{
24327 if (node) {
24328 node = remove_begin(node);
24329 nd_set_fl_newline(node);
24330 }
24331 return node;
24332}
24333
24334static void
24335fixpos(NODE *node, NODE *orig)
24336{
24337 if (!node) return;
24338 if (!orig) return;
24339 nd_set_line(node, nd_line(orig));
24340}
24341
24342static NODE*
24343block_append(struct parser_params *p, NODE *head, NODE *tail)
24344{
24345 NODE *end, *h = head, *nd;
24346
24347 if (tail == 0) return head;
24348
24349 if (h == 0) return tail;
24350 switch (nd_type(h)) {
24351 default:
24352 h = end = NEW_BLOCK(head, &head->nd_loc);
24353 head = end;
24354 break;
24355 case NODE_BLOCK:
24356 end = RNODE_BLOCK(h)->nd_end;
24357 break;
24358 }
24359
24360 nd = RNODE_BLOCK(end)->nd_head;
24361 switch (nd_type(nd)) {
24362 case NODE_RETURN:
24363 case NODE_BREAK:
24364 case NODE_NEXT:
24365 case NODE_REDO:
24366 case NODE_RETRY:
24367 rb_warning0L(nd_line(tail), "statement not reached");
24368 break;
24369
24370 default:
24371 break;
24372 }
24373
24374 if (!nd_type_p(tail, NODE_BLOCK)) {
24375 tail = NEW_BLOCK(tail, &tail->nd_loc);
24376 }
24377 RNODE_BLOCK(end)->nd_next = tail;
24378 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24379 nd_set_last_loc(head, nd_last_loc(tail));
24380 return head;
24381}
24382
24383/* append item to the list */
24384static NODE*
24385list_append(struct parser_params *p, NODE *list, NODE *item)
24386{
24387 NODE *last;
24388
24389 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24390 if (RNODE_LIST(list)->nd_next) {
24391 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24392 }
24393 else {
24394 last = list;
24395 }
24396
24397 RNODE_LIST(list)->as.nd_alen += 1;
24398 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24399 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24400
24401 nd_set_last_loc(list, nd_last_loc(item));
24402
24403 return list;
24404}
24405
24406/* concat two lists */
24407static NODE*
24408list_concat(NODE *head, NODE *tail)
24409{
24410 NODE *last;
24411
24412 if (RNODE_LIST(head)->nd_next) {
24413 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24414 }
24415 else {
24416 last = head;
24417 }
24418
24419 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24420 RNODE_LIST(last)->nd_next = tail;
24421 if (RNODE_LIST(tail)->nd_next) {
24422 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24423 }
24424 else {
24425 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24426 }
24427
24428 nd_set_last_loc(head, nd_last_loc(tail));
24429
24430 return head;
24431}
24432
24433static int
24434literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24435{
24436 if (!tail) return 1;
24437 if (!rb_parser_enc_compatible(p, head, tail)) {
24438 compile_error(p, "string literal encodings differ (%s / %s)",
24439 rb_enc_name(rb_parser_str_get_encoding(head)),
24440 rb_enc_name(rb_parser_str_get_encoding(tail)));
24441 rb_parser_str_resize(p, head, 0);
24442 rb_parser_str_resize(p, tail, 0);
24443 return 0;
24444 }
24445 rb_parser_str_buf_append(p, head, tail);
24446 return 1;
24447}
24448
24449static rb_parser_string_t *
24450string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24451{
24452 if (htype != NODE_DSTR) return NULL;
24453 if (RNODE_DSTR(head)->nd_next) {
24454 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24455 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24456 }
24457 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24458 ASSUME(lit);
24459 return lit;
24460}
24461
24462#ifndef RIPPER
24463static rb_parser_string_t *
24464rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24465{
24466 rb_parser_string_t *copy;
24467 if (!orig) return NULL;
24468 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24469 copy->coderange = orig->coderange;
24470 copy->enc = orig->enc;
24471 return copy;
24472}
24473#endif
24474
24475/* concat two string literals */
24476static NODE *
24477literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24478{
24479 enum node_type htype;
24480 rb_parser_string_t *lit;
24481
24482 if (!head) return tail;
24483 if (!tail) return head;
24484
24485 htype = nd_type(head);
24486 if (htype == NODE_EVSTR) {
24487 head = new_dstr(p, head, loc);
24488 htype = NODE_DSTR;
24489 }
24490 if (p->heredoc_indent > 0) {
24491 switch (htype) {
24492 case NODE_STR:
24493 head = str2dstr(p, head);
24494 case NODE_DSTR:
24495 return list_append(p, head, tail);
24496 default:
24497 break;
24498 }
24499 }
24500 switch (nd_type(tail)) {
24501 case NODE_STR:
24502 if ((lit = string_literal_head(p, htype, head)) != false) {
24503 htype = NODE_STR;
24504 }
24505 else {
24506 lit = RNODE_DSTR(head)->string;
24507 }
24508 if (htype == NODE_STR) {
24509 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24510 error:
24511 rb_discard_node(p, head);
24512 rb_discard_node(p, tail);
24513 return 0;
24514 }
24515 rb_discard_node(p, tail);
24516 }
24517 else {
24518 list_append(p, head, tail);
24519 }
24520 break;
24521
24522 case NODE_DSTR:
24523 if (htype == NODE_STR) {
24524 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24525 goto error;
24526 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24527 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24528 RNODE_STR(head)->string = NULL;
24529 rb_discard_node(p, head);
24530 head = tail;
24531 }
24532 else if (!RNODE_DSTR(tail)->string) {
24533 append:
24534 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24535 if (!RNODE_DSTR(head)->nd_next) {
24536 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24537 }
24538 else if (RNODE_DSTR(tail)->nd_next) {
24539 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24540 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24541 }
24542 rb_discard_node(p, tail);
24543 }
24544 else if ((lit = string_literal_head(p, htype, head)) != false) {
24545 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24546 goto error;
24547 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24548 RNODE_DSTR(tail)->string = 0;
24549 goto append;
24550 }
24551 else {
24552 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));
24553 RNODE_DSTR(tail)->string = 0;
24554 }
24555 break;
24556
24557 case NODE_EVSTR:
24558 if (htype == NODE_STR) {
24559 head = str2dstr(p, head);
24560 RNODE_DSTR(head)->as.nd_alen = 1;
24561 }
24562 list_append(p, head, tail);
24563 break;
24564 }
24565 return head;
24566}
24567
24568static void
24569nd_copy_flag(NODE *new_node, NODE *old_node)
24570{
24571 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24572 nd_set_line(new_node, nd_line(old_node));
24573 new_node->nd_loc = old_node->nd_loc;
24574 new_node->node_id = old_node->node_id;
24575}
24576
24577static NODE *
24578str2dstr(struct parser_params *p, NODE *node)
24579{
24580 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24581 nd_copy_flag(new_node, node);
24582 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24583 RNODE_DSTR(new_node)->as.nd_alen = 0;
24584 RNODE_DSTR(new_node)->nd_next = 0;
24585 RNODE_STR(node)->string = 0;
24586
24587 return new_node;
24588}
24589
24590static NODE *
24591str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24592{
24593 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24594 nd_copy_flag(new_node, node);
24595 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24596 RNODE_REGX(new_node)->options = options;
24597 nd_set_loc(new_node, loc);
24598 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24599 RNODE_REGX(new_node)->content_loc = *content_loc;
24600 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24601 RNODE_STR(node)->string = 0;
24602
24603 return new_node;
24604}
24605
24606static NODE *
24607evstr2dstr(struct parser_params *p, NODE *node)
24608{
24609 if (nd_type_p(node, NODE_EVSTR)) {
24610 node = new_dstr(p, node, &node->nd_loc);
24611 }
24612 return node;
24613}
24614
24615static NODE *
24616new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24617{
24618 NODE *head = node;
24619
24620 if (node) {
24621 switch (nd_type(node)) {
24622 case NODE_STR:
24623 return str2dstr(p, node);
24624 case NODE_DSTR:
24625 break;
24626 case NODE_EVSTR:
24627 return node;
24628 }
24629 }
24630 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24631}
24632
24633static NODE *
24634new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24635{
24636 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24637 return list_append(p, dstr, node);
24638}
24639
24640static NODE *
24641call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24642 const YYLTYPE *op_loc, const YYLTYPE *loc)
24643{
24644 NODE *expr;
24645 value_expr(p, recv);
24646 value_expr(p, arg1);
24647 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24648 nd_set_line(expr, op_loc->beg_pos.lineno);
24649 return expr;
24650}
24651
24652static NODE *
24653call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24654{
24655 NODE *opcall;
24656 value_expr(p, recv);
24657 opcall = NEW_OPCALL(recv, id, 0, loc);
24658 nd_set_line(opcall, op_loc->beg_pos.lineno);
24659 return opcall;
24660}
24661
24662static NODE *
24663new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24664{
24665 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24666 nd_set_line(qcall, op_loc->beg_pos.lineno);
24667 return qcall;
24668}
24669
24670static NODE*
24671new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24672{
24673 NODE *ret;
24674 if (block) block_dup_check(p, args, block);
24675 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24676 if (block) ret = method_add_block(p, ret, block, loc);
24677 fixpos(ret, recv);
24678 return ret;
24679}
24680
24682new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24683{
24685 body->node = node;
24686 body->opening_loc = *opening_loc;
24687 body->closing_loc = *closing_loc;
24688 return body;
24689}
24690
24691static NODE *
24692command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc)
24693{
24694 NODE **body;
24695 enum node_type type = nd_type(m);
24696 switch (type) {
24697 case NODE_YIELD:
24698 compile_error(p, "block given to yield");
24699 return m;
24700 case NODE_RETURN:
24701 body = &RNODE_RETURN(m)->nd_stts;
24702 break;
24703 case NODE_BREAK:
24704 case NODE_NEXT:
24705 body = &RNODE_EXITS(m)->nd_stts;
24706 break;
24707 case NODE_REDO: /* `redo` has no argument */
24708 compile_error(p, "command_add_block: unexpected node: NODE_REDO");
24709 return m;
24710 case NODE_RETRY: /* `retry` has no argument */
24711 compile_error(p, "command_add_block: unexpected node: NODE_RETRY");
24712 return m;
24713 default:
24714 block_dup_check(p, get_nd_args(p, m), b);
24715 return method_add_block(p, m, b, loc);
24716 }
24717 RUBY_ASSERT(*body, "no argument %s with do_block", parser_node_name(type));
24718 YYLTYPE b_loc = code_loc_gen(&(*body)->nd_loc, loc);
24719 *body = command_add_block(p, *body, b, &b_loc);
24720 m->nd_loc.end_pos = loc->end_pos;
24721 return m;
24722}
24723
24724#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24725
24726static NODE*
24727last_expr_once_body(NODE *node)
24728{
24729 if (!node) return 0;
24730 return nd_once_body(node);
24731}
24732
24733static NODE*
24734match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24735{
24736 NODE *n;
24737 int line = op_loc->beg_pos.lineno;
24738
24739 value_expr(p, node1);
24740 value_expr(p, node2);
24741
24742 if ((n = last_expr_once_body(node1)) != 0) {
24743 switch (nd_type(n)) {
24744 case NODE_DREGX:
24745 {
24746 NODE *match = NEW_MATCH2(node1, node2, loc);
24747 nd_set_line(match, line);
24748 return match;
24749 }
24750
24751 case NODE_REGX:
24752 {
24753 const VALUE lit = rb_node_regx_string_val(n);
24754 if (!NIL_P(lit)) {
24755 NODE *match = NEW_MATCH2(node1, node2, loc);
24756 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24757 nd_set_line(match, line);
24758 return match;
24759 }
24760 }
24761 }
24762 }
24763
24764 if ((n = last_expr_once_body(node2)) != 0) {
24765 NODE *match3;
24766
24767 switch (nd_type(n)) {
24768 case NODE_DREGX:
24769 match3 = NEW_MATCH3(node2, node1, loc);
24770 return match3;
24771 }
24772 }
24773
24774 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24775 nd_set_line(n, line);
24776 return n;
24777}
24778
24779# if WARN_PAST_SCOPE
24780static int
24781past_dvar_p(struct parser_params *p, ID id)
24782{
24783 struct vtable *past = p->lvtbl->past;
24784 while (past) {
24785 if (vtable_included(past, id)) return 1;
24786 past = past->prev;
24787 }
24788 return 0;
24789}
24790# endif
24791
24792static int
24793numparam_nested_p(struct parser_params *p)
24794{
24795 struct local_vars *local = p->lvtbl;
24796 NODE *outer = local->numparam.outer;
24797 NODE *inner = local->numparam.inner;
24798 if (outer || inner) {
24799 NODE *used = outer ? outer : inner;
24800 compile_error(p, "numbered parameter is already used in %s block\n"
24801 "%s:%d: numbered parameter is already used here",
24802 outer ? "outer" : "inner",
24803 p->ruby_sourcefile, nd_line(used));
24804 parser_show_error_line(p, &used->nd_loc);
24805 return 1;
24806 }
24807 return 0;
24808}
24809
24810static int
24811numparam_used_p(struct parser_params *p)
24812{
24813 NODE *numparam = p->lvtbl->numparam.current;
24814 if (numparam) {
24815 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24816 "%s:%d: numbered parameter is already used here",
24817 p->ruby_sourcefile, nd_line(numparam));
24818 parser_show_error_line(p, &numparam->nd_loc);
24819 return 1;
24820 }
24821 return 0;
24822}
24823
24824static int
24825it_used_p(struct parser_params *p)
24826{
24827 NODE *it = p->lvtbl->it;
24828 if (it) {
24829 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24830 "%s:%d: 'it' is already used here",
24831 p->ruby_sourcefile, nd_line(it));
24832 parser_show_error_line(p, &it->nd_loc);
24833 return 1;
24834 }
24835 return 0;
24836}
24837
24838static NODE*
24839gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24840{
24841 ID *vidp = NULL;
24842 NODE *node;
24843 switch (id) {
24844 case keyword_self:
24845 return NEW_SELF(loc);
24846 case keyword_nil:
24847 return NEW_NIL(loc);
24848 case keyword_true:
24849 return NEW_TRUE(loc);
24850 case keyword_false:
24851 return NEW_FALSE(loc);
24852 case keyword__FILE__:
24853 {
24854 VALUE file = p->ruby_sourcefile_string;
24855 if (NIL_P(file))
24856 file = rb_str_new(0, 0);
24857 node = NEW_FILE(file, loc);
24858 }
24859 return node;
24860 case keyword__LINE__:
24861 return NEW_LINE(loc);
24862 case keyword__ENCODING__:
24863 return NEW_ENCODING(loc);
24864
24865 }
24866 switch (id_type(id)) {
24867 case ID_LOCAL:
24868 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24869 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24870 if (vidp) *vidp |= LVAR_USED;
24871 node = NEW_DVAR(id, loc);
24872 return node;
24873 }
24874 if (local_id_ref(p, id, &vidp)) {
24875 if (vidp) *vidp |= LVAR_USED;
24876 node = NEW_LVAR(id, loc);
24877 return node;
24878 }
24879 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24880 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24881 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24882 node = NEW_DVAR(id, loc);
24883 struct local_vars *local = p->lvtbl;
24884 if (!local->numparam.current) local->numparam.current = node;
24885 return node;
24886 }
24887# if WARN_PAST_SCOPE
24888 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24889 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24890 }
24891# endif
24892 /* method call without arguments */
24893 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24894 if (numparam_used_p(p)) return 0;
24895 if (p->max_numparam == ORDINAL_PARAM) {
24896 compile_error(p, "ordinary parameter is defined");
24897 return 0;
24898 }
24899 if (!p->it_id) {
24900 p->it_id = idItImplicit;
24901 vtable_add(p->lvtbl->args, p->it_id);
24902 }
24903 NODE *node = NEW_DVAR(p->it_id, loc);
24904 if (!p->lvtbl->it) p->lvtbl->it = node;
24905 return node;
24906 }
24907 return NEW_VCALL(id, loc);
24908 case ID_GLOBAL:
24909 return NEW_GVAR(id, loc);
24910 case ID_INSTANCE:
24911 return NEW_IVAR(id, loc);
24912 case ID_CONST:
24913 return NEW_CONST(id, loc);
24914 case ID_CLASS:
24915 return NEW_CVAR(id, loc);
24916 }
24917 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24918 return 0;
24919}
24920
24921static rb_node_opt_arg_t *
24922opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24923{
24924 rb_node_opt_arg_t *opts = opt_list;
24925 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24926
24927 while (opts->nd_next) {
24928 opts = opts->nd_next;
24929 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24930 }
24931 opts->nd_next = opt;
24932
24933 return opt_list;
24934}
24935
24936static rb_node_kw_arg_t *
24937kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24938{
24939 if (kwlist) {
24940 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24941 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24942 }
24943 return kwlist;
24944}
24945
24946static NODE *
24947new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24948{
24949 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24950 p->ctxt.has_trailing_semicolon = 0;
24951
24952 NODE *n = expr;
24953 while (n) {
24954 if (nd_type_p(n, NODE_BEGIN)) {
24955 n = RNODE_BEGIN(n)->nd_body;
24956 }
24957 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24958 n = RNODE_BLOCK(n)->nd_head;
24959 }
24960 else {
24961 break;
24962 }
24963 }
24964
24965 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24966 NODE *block = NEW_BLOCK(expr, loc);
24967 return NEW_DEFINED(block, loc, keyword_loc);
24968 }
24969
24970 return NEW_DEFINED(n, loc, keyword_loc);
24971}
24972
24973static NODE*
24974str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24975{
24976 VALUE lit;
24977 rb_parser_string_t *str = RNODE_STR(node)->string;
24978 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24979 yyerror1(loc, "invalid symbol");
24980 lit = STR_NEW0();
24981 }
24982 else {
24983 lit = rb_str_new_parser_string(str);
24984 }
24985 return NEW_SYM(lit, loc);
24986}
24987
24988static NODE*
24989symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24990{
24991 enum node_type type = nd_type(symbol);
24992 switch (type) {
24993 case NODE_DSTR:
24994 nd_set_type(symbol, NODE_DSYM);
24995 break;
24996 case NODE_STR:
24997 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24998 break;
24999 default:
25000 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
25001 }
25002 return list_append(p, symbols, symbol);
25003}
25004
25005static void
25006dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
25007{
25008 if (dreg->string) {
25009 reg_fragment_setenc(p, dreg->string, options);
25010 }
25011 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
25012 NODE *frag = list->nd_head;
25013 if (nd_type_p(frag, NODE_STR)) {
25014 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
25015 }
25016 else if (nd_type_p(frag, NODE_DSTR)) {
25017 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
25018 }
25019 }
25020}
25021
25022static NODE *
25023new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
25024{
25025 if (!node) {
25026 /* Check string is valid regex */
25027 rb_parser_string_t *str = STRING_NEW0();
25028 reg_compile(p, str, options);
25029 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
25030 return node;
25031 }
25032 switch (nd_type(node)) {
25033 case NODE_STR:
25034 {
25035 /* Check string is valid regex */
25036 reg_compile(p, RNODE_STR(node)->string, options);
25037 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
25038 }
25039 break;
25040 default:
25041 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
25042 /* fall through */
25043 case NODE_DSTR:
25044 nd_set_type(node, NODE_DREGX);
25045 nd_set_loc(node, loc);
25046 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
25047 dreg->as.nd_cflag = options & RE_OPTION_MASK;
25048 if (dreg->nd_next) {
25049 dregex_fragment_setenc(p, dreg, options);
25050 }
25051 if (options & RE_OPTION_ONCE) {
25052 node = NEW_ONCE(node, loc);
25053 }
25054 break;
25055 }
25056 return node;
25057}
25058
25059static rb_node_kw_arg_t *
25060new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
25061{
25062 if (!k) return 0;
25063 return NEW_KW_ARG((k), loc);
25064}
25065
25066static NODE *
25067new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25068{
25069 if (!node) {
25070 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
25071 return xstr;
25072 }
25073 switch (nd_type(node)) {
25074 case NODE_STR:
25075 nd_set_type(node, NODE_XSTR);
25076 nd_set_loc(node, loc);
25077 break;
25078 case NODE_DSTR:
25079 nd_set_type(node, NODE_DXSTR);
25080 nd_set_loc(node, loc);
25081 break;
25082 default:
25083 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
25084 break;
25085 }
25086 return node;
25087}
25088
25089static const
25090struct st_hash_type literal_type = {
25091 literal_cmp,
25092 literal_hash,
25093};
25094
25095static int nd_type_st_key_enable_p(NODE *node);
25096
25097static void
25098check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
25099{
25100 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25101 if (!arg || !p->case_labels) return;
25102 if (!nd_type_st_key_enable_p(arg)) return;
25103
25104 if (p->case_labels == CHECK_LITERAL_WHEN) {
25105 p->case_labels = st_init_table(&literal_type);
25106 }
25107 else {
25108 st_data_t line;
25109 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
25110 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
25111 WARN_I((int)nd_line(arg)), WARN_I((int)line));
25112 return;
25113 }
25114 }
25115 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
25116}
25117
25118#ifdef RIPPER
25119static int
25120id_is_var(struct parser_params *p, ID id)
25121{
25122 if (is_notop_id(id)) {
25123 switch (id & ID_SCOPE_MASK) {
25124 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
25125 return 1;
25126 case ID_LOCAL:
25127 if (dyna_in_block(p)) {
25128 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
25129 }
25130 if (local_id(p, id)) return 1;
25131 /* method call without arguments */
25132 return 0;
25133 }
25134 }
25135 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25136 return 0;
25137}
25138#endif
25139
25140static inline enum lex_state_e
25141parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
25142{
25143 if (p->debug) {
25144 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
25145 }
25146 return p->lex.state = ls;
25147}
25148
25149#ifndef RIPPER
25150static void
25151flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
25152{
25153 VALUE mesg = p->debug_buffer;
25154
25155 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
25156 p->debug_buffer = Qnil;
25157 rb_io_puts(1, &mesg, out);
25158 }
25159 if (!NIL_P(str) && RSTRING_LEN(str)) {
25160 rb_io_write(p->debug_output, str);
25161 }
25162}
25163
25164static const char rb_parser_lex_state_names[][8] = {
25165 "BEG", "END", "ENDARG", "ENDFN", "ARG",
25166 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
25167 "LABEL", "LABELED","FITEM",
25168};
25169
25170static VALUE
25171append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
25172{
25173 int i, sep = 0;
25174 unsigned int mask = 1;
25175 static const char none[] = "NONE";
25176
25177 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
25178 if ((unsigned)state & mask) {
25179 if (sep) {
25180 rb_str_cat(buf, "|", 1);
25181 }
25182 sep = 1;
25183 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
25184 }
25185 }
25186 if (!sep) {
25187 rb_str_cat(buf, none, sizeof(none)-1);
25188 }
25189 return buf;
25190}
25191
25192enum lex_state_e
25193rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
25194 enum lex_state_e to, int line)
25195{
25196 VALUE mesg;
25197 mesg = rb_str_new_cstr("lex_state: ");
25198 append_lex_state_name(p, from, mesg);
25199 rb_str_cat_cstr(mesg, " -> ");
25200 append_lex_state_name(p, to, mesg);
25201 rb_str_catf(mesg, " at line %d\n", line);
25202 flush_debug_buffer(p, p->debug_output, mesg);
25203 return to;
25204}
25205
25206VALUE
25207rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
25208{
25209 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
25210}
25211
25212static void
25213append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
25214{
25215 if (stack == 0) {
25216 rb_str_cat_cstr(mesg, "0");
25217 }
25218 else {
25219 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
25220 for (; mask && !(stack & mask); mask >>= 1) continue;
25221 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
25222 }
25223}
25224
25225void
25226rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
25227 const char *name, int line)
25228{
25229 VALUE mesg = rb_sprintf("%s: ", name);
25230 append_bitstack_value(p, stack, mesg);
25231 rb_str_catf(mesg, " at line %d\n", line);
25232 flush_debug_buffer(p, p->debug_output, mesg);
25233}
25234
25235void
25236rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
25237{
25238 va_list ap;
25239 VALUE mesg = rb_str_new_cstr("internal parser error: ");
25240
25241 va_start(ap, fmt);
25242 rb_str_vcatf(mesg, fmt, ap);
25243 va_end(ap);
25244 yyerror0(RSTRING_PTR(mesg));
25245 RB_GC_GUARD(mesg);
25246
25247 mesg = rb_str_new(0, 0);
25248 append_lex_state_name(p, p->lex.state, mesg);
25249 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
25250 rb_str_resize(mesg, 0);
25251 append_bitstack_value(p, p->cond_stack, mesg);
25252 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
25253 rb_str_resize(mesg, 0);
25254 append_bitstack_value(p, p->cmdarg_stack, mesg);
25255 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
25256 if (p->debug_output == rb_ractor_stdout())
25257 p->debug_output = rb_ractor_stderr();
25258 p->debug = TRUE;
25259}
25260
25261static YYLTYPE *
25262rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
25263{
25264 yylloc->beg_pos.lineno = sourceline;
25265 yylloc->beg_pos.column = beg_pos;
25266 yylloc->end_pos.lineno = sourceline;
25267 yylloc->end_pos.column = end_pos;
25268 return yylloc;
25269}
25270
25271YYLTYPE *
25272rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
25273{
25274 int sourceline = here->sourceline;
25275 int beg_pos = (int)here->offset - here->quote
25276 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
25277 int end_pos = (int)here->offset + here->length + here->quote;
25278
25279 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25280}
25281
25282YYLTYPE *
25283rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
25284{
25285 yylloc->beg_pos.lineno = p->delayed.beg_line;
25286 yylloc->beg_pos.column = p->delayed.beg_col;
25287 yylloc->end_pos.lineno = p->delayed.end_line;
25288 yylloc->end_pos.column = p->delayed.end_col;
25289
25290 return yylloc;
25291}
25292
25293YYLTYPE *
25294rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
25295{
25296 int sourceline = p->ruby_sourceline;
25297 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25298 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
25299 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25300}
25301
25302YYLTYPE *
25303rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
25304{
25305 yylloc->end_pos = yylloc->beg_pos;
25306
25307 return yylloc;
25308}
25309
25310YYLTYPE *
25311rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
25312{
25313 int sourceline = p->ruby_sourceline;
25314 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25315 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
25316 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25317}
25318
25319YYLTYPE *
25320rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25321{
25322 int sourceline = p->ruby_sourceline;
25323 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25324 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
25325 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25326}
25327#endif /* !RIPPER */
25328
25329static int
25330assignable0(struct parser_params *p, ID id, const char **err)
25331{
25332 if (!id) return -1;
25333 switch (id) {
25334 case keyword_self:
25335 *err = "Can't change the value of self";
25336 return -1;
25337 case keyword_nil:
25338 *err = "Can't assign to nil";
25339 return -1;
25340 case keyword_true:
25341 *err = "Can't assign to true";
25342 return -1;
25343 case keyword_false:
25344 *err = "Can't assign to false";
25345 return -1;
25346 case keyword__FILE__:
25347 *err = "Can't assign to __FILE__";
25348 return -1;
25349 case keyword__LINE__:
25350 *err = "Can't assign to __LINE__";
25351 return -1;
25352 case keyword__ENCODING__:
25353 *err = "Can't assign to __ENCODING__";
25354 return -1;
25355 }
25356 switch (id_type(id)) {
25357 case ID_LOCAL:
25358 if (dyna_in_block(p)) {
25359 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25360 compile_error(p, "Can't assign to numbered parameter _%d",
25361 NUMPARAM_ID_TO_IDX(id));
25362 return -1;
25363 }
25364 if (dvar_curr(p, id)) return NODE_DASGN;
25365 if (dvar_defined(p, id)) return NODE_DASGN;
25366 if (local_id(p, id)) return NODE_LASGN;
25367 dyna_var(p, id);
25368 return NODE_DASGN;
25369 }
25370 else {
25371 if (!local_id(p, id)) local_var(p, id);
25372 return NODE_LASGN;
25373 }
25374 break;
25375 case ID_GLOBAL: return NODE_GASGN;
25376 case ID_INSTANCE: return NODE_IASGN;
25377 case ID_CONST:
25378 if (!p->ctxt.in_def) return NODE_CDECL;
25379 *err = "dynamic constant assignment";
25380 return -1;
25381 case ID_CLASS: return NODE_CVASGN;
25382 default:
25383 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25384 }
25385 return -1;
25386}
25387
25388static NODE*
25389assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25390{
25391 const char *err = 0;
25392 int node_type = assignable0(p, id, &err);
25393 switch (node_type) {
25394 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25395 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25396 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25397 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25398 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25399 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25400 }
25401/* TODO: FIXME */
25402#ifndef RIPPER
25403 if (err) yyerror1(loc, err);
25404#else
25405 if (err) set_value(assign_error(p, err, p->s_lvalue));
25406#endif
25407 return NEW_ERROR(loc);
25408}
25409
25410static int
25411is_private_local_id(struct parser_params *p, ID name)
25412{
25413 VALUE s;
25414 if (name == idUScore) return 1;
25415 if (!is_local_id(name)) return 0;
25416 s = rb_id2str(name);
25417 if (!s) return 0;
25418 return RSTRING_PTR(s)[0] == '_';
25419}
25420
25421static int
25422shadowing_lvar_0(struct parser_params *p, ID name)
25423{
25424 if (dyna_in_block(p)) {
25425 if (dvar_curr(p, name)) {
25426 if (is_private_local_id(p, name)) return 1;
25427 yyerror0("duplicated argument name");
25428 }
25429 else if (dvar_defined(p, name) || local_id(p, name)) {
25430 vtable_add(p->lvtbl->vars, name);
25431 if (p->lvtbl->used) {
25432 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25433 }
25434 return 0;
25435 }
25436 }
25437 else {
25438 if (local_id(p, name)) {
25439 if (is_private_local_id(p, name)) return 1;
25440 yyerror0("duplicated argument name");
25441 }
25442 }
25443 return 1;
25444}
25445
25446static ID
25447shadowing_lvar(struct parser_params *p, ID name)
25448{
25449 shadowing_lvar_0(p, name);
25450 return name;
25451}
25452
25453static void
25454new_bv(struct parser_params *p, ID name)
25455{
25456 if (!name) return;
25457 if (!is_local_id(name)) {
25458 compile_error(p, "invalid local variable - %"PRIsVALUE,
25459 rb_id2str(name));
25460 return;
25461 }
25462 if (!shadowing_lvar_0(p, name)) return;
25463 dyna_var(p, name);
25464 ID *vidp = 0;
25465 if (dvar_defined_ref(p, name, &vidp)) {
25466 if (vidp) *vidp |= LVAR_USED;
25467 }
25468}
25469
25470static void
25471aryset_check(struct parser_params *p, NODE *args)
25472{
25473 NODE *block = 0, *kwds = 0;
25474 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25475 block = RNODE_BLOCK_PASS(args)->nd_body;
25476 args = RNODE_BLOCK_PASS(args)->nd_head;
25477 }
25478 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25479 args = RNODE_ARGSCAT(args)->nd_body;
25480 }
25481 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25482 kwds = RNODE_ARGSPUSH(args)->nd_body;
25483 }
25484 else {
25485 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25486 next = RNODE_LIST(next)->nd_next) {
25487 kwds = RNODE_LIST(next)->nd_head;
25488 }
25489 }
25490 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25491 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25492 }
25493 if (block) {
25494 yyerror1(&block->nd_loc, "block arg given in index assignment");
25495 }
25496}
25497
25498static NODE *
25499aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25500{
25501 aryset_check(p, idx);
25502 return NEW_ATTRASGN(recv, tASET, idx, loc);
25503}
25504
25505static void
25506block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25507{
25508 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25509 compile_error(p, "both block arg and actual block given");
25510 }
25511}
25512
25513static NODE *
25514attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25515{
25516 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25517 return NEW_ATTRASGN(recv, id, 0, loc);
25518}
25519
25520static VALUE
25521rb_backref_error(struct parser_params *p, NODE *node)
25522{
25523#ifndef RIPPER
25524# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25525#else
25526# define ERR(...) rb_sprintf(__VA_ARGS__)
25527#endif
25528 switch (nd_type(node)) {
25529 case NODE_NTH_REF:
25530 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25531 case NODE_BACK_REF:
25532 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25533 }
25534#undef ERR
25535 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25536}
25537
25538static NODE *
25539arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25540{
25541 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25542 switch (nd_type(node1)) {
25543 case NODE_LIST:
25544 return list_append(p, node1, node2);
25545 case NODE_BLOCK_PASS:
25546 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25547 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25548 return node1;
25549 case NODE_ARGSPUSH:
25550 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25551 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25552 nd_set_type(node1, NODE_ARGSCAT);
25553 return node1;
25554 case NODE_ARGSCAT:
25555 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25556 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25557 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25558 return node1;
25559 }
25560 return NEW_ARGSPUSH(node1, node2, loc);
25561}
25562
25563static NODE *
25564arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25565{
25566 if (!node2) return node1;
25567 switch (nd_type(node1)) {
25568 case NODE_BLOCK_PASS:
25569 if (RNODE_BLOCK_PASS(node1)->nd_head)
25570 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25571 else
25572 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25573 return node1;
25574 case NODE_ARGSPUSH:
25575 if (!nd_type_p(node2, NODE_LIST)) break;
25576 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25577 nd_set_type(node1, NODE_ARGSCAT);
25578 return node1;
25579 case NODE_ARGSCAT:
25580 if (!nd_type_p(node2, NODE_LIST) ||
25581 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25582 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25583 return node1;
25584 }
25585 return NEW_ARGSCAT(node1, node2, loc);
25586}
25587
25588static NODE *
25589last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25590{
25591 NODE *n1;
25592 if ((n1 = splat_array(args)) != 0) {
25593 return list_append(p, n1, last_arg);
25594 }
25595 return arg_append(p, args, last_arg, loc);
25596}
25597
25598static NODE *
25599rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25600{
25601 NODE *n1;
25602 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25603 return list_concat(n1, rest_arg);
25604 }
25605 return arg_concat(p, args, rest_arg, loc);
25606}
25607
25608static NODE *
25609splat_array(NODE* node)
25610{
25611 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25612 if (nd_type_p(node, NODE_LIST)) return node;
25613 return 0;
25614}
25615
25616static void
25617mark_lvar_used(struct parser_params *p, NODE *rhs)
25618{
25619 ID *vidp = NULL;
25620 if (!rhs) return;
25621 switch (nd_type(rhs)) {
25622 case NODE_LASGN:
25623 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25624 if (vidp) *vidp |= LVAR_USED;
25625 }
25626 break;
25627 case NODE_DASGN:
25628 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25629 if (vidp) *vidp |= LVAR_USED;
25630 }
25631 break;
25632#if 0
25633 case NODE_MASGN:
25634 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25635 mark_lvar_used(p, rhs->nd_head);
25636 }
25637 break;
25638#endif
25639 }
25640}
25641
25642static int is_static_content(NODE *node);
25643
25644static NODE *
25645node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25646{
25647 if (!lhs) return 0;
25648
25649 switch (nd_type(lhs)) {
25650 case NODE_CDECL:
25651 case NODE_GASGN:
25652 case NODE_IASGN:
25653 case NODE_LASGN:
25654 case NODE_DASGN:
25655 case NODE_MASGN:
25656 case NODE_CVASGN:
25657 set_nd_value(p, lhs, rhs);
25658 nd_set_loc(lhs, loc);
25659 break;
25660
25661 case NODE_ATTRASGN:
25662 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25663 nd_set_loc(lhs, loc);
25664 break;
25665
25666 default:
25667 /* should not happen */
25668 break;
25669 }
25670
25671 return lhs;
25672}
25673
25674static NODE *
25675value_expr_check(struct parser_params *p, NODE *node)
25676{
25677 NODE *void_node = 0, *vn;
25678
25679 if (!node) {
25680 rb_warning0("empty expression");
25681 }
25682 while (node) {
25683 switch (nd_type(node)) {
25684 case NODE_ENSURE:
25685 vn = RNODE_ENSURE(node)->nd_head;
25686 node = RNODE_ENSURE(node)->nd_ensr;
25687 /* nd_ensr should not be NULL, check it out next */
25688 if (vn && (vn = value_expr_check(p, vn))) {
25689 goto found;
25690 }
25691 break;
25692
25693 case NODE_RESCUE:
25694 /* void only if all children are void */
25695 vn = RNODE_RESCUE(node)->nd_head;
25696 if (!vn || !(vn = value_expr_check(p, vn))) {
25697 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25698 }
25699 if (!void_node) void_node = vn;
25700 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25701 if (!nd_type_p(r, NODE_RESBODY)) {
25702 compile_error(p, "unexpected node");
25703 return NULL;
25704 }
25705 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25706 return NULL;
25707 }
25708 if (!void_node) void_node = vn;
25709 }
25710 node = RNODE_RESCUE(node)->nd_else;
25711 if (!node) return void_node;
25712 break;
25713
25714 case NODE_RETURN:
25715 case NODE_BREAK:
25716 case NODE_NEXT:
25717 case NODE_REDO:
25718 case NODE_RETRY:
25719 goto found;
25720
25721 case NODE_CASE:
25722 case NODE_CASE2:
25723 for (node = RNODE_CASE(node)->nd_body;
25724 node && nd_type_p(node, NODE_WHEN);
25725 node = RNODE_WHEN(node)->nd_next) {
25726 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25727 return NULL;
25728 }
25729 if (!void_node) void_node = vn;
25730 }
25731 break;
25732
25733 case NODE_CASE3:
25734 {
25735 NODE *in = RNODE_CASE3(node)->nd_body;
25736 if (!in || !nd_type_p(in, NODE_IN)) {
25737 compile_error(p, "unexpected node");
25738 return NULL;
25739 }
25740 if (!RNODE_IN(in)->nd_body) {
25741 /* single line pattern matching with "=>" operator */
25742 goto found;
25743 }
25744 do {
25745 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25746 if (!vn) return NULL;
25747 if (!void_node) void_node = vn;
25748 in = RNODE_IN(in)->nd_next;
25749 } while (in && nd_type_p(in, NODE_IN));
25750 node = in; /* else */
25751 }
25752 break;
25753
25754 case NODE_BLOCK:
25755 while (RNODE_BLOCK(node)->nd_next) {
25756 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25757 if (vn) return vn;
25758 node = RNODE_BLOCK(node)->nd_next;
25759 }
25760 node = RNODE_BLOCK(node)->nd_head;
25761 break;
25762
25763 case NODE_BEGIN:
25764 node = RNODE_BEGIN(node)->nd_body;
25765 break;
25766
25767 case NODE_IF:
25768 case NODE_UNLESS:
25769 if (!RNODE_IF(node)->nd_body) {
25770 return NULL;
25771 }
25772 else if (!RNODE_IF(node)->nd_else) {
25773 return NULL;
25774 }
25775 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25776 if (!vn) return NULL;
25777 if (!void_node) void_node = vn;
25778 node = RNODE_IF(node)->nd_else;
25779 break;
25780
25781 case NODE_AND:
25782 case NODE_OR:
25783 node = RNODE_AND(node)->nd_1st;
25784 break;
25785
25786 case NODE_LASGN:
25787 case NODE_DASGN:
25788 case NODE_MASGN:
25789 mark_lvar_used(p, node);
25790 return NULL;
25791
25792 default:
25793 return NULL;
25794 }
25795 }
25796
25797 return NULL;
25798
25799 found:
25800 /* return the first found node */
25801 return void_node ? void_node : node;
25802}
25803
25804static int
25805value_expr(struct parser_params *p, NODE *node)
25806{
25807 NODE *void_node = value_expr_check(p, node);
25808 if (void_node) {
25809 yyerror1(&void_node->nd_loc, "void value expression");
25810 /* or "control never reach"? */
25811 return FALSE;
25812 }
25813 return TRUE;
25814}
25815
25816static void
25817void_expr(struct parser_params *p, NODE *node)
25818{
25819 const char *useless = 0;
25820
25821 if (!RTEST(ruby_verbose)) return;
25822
25823 if (!node || !(node = nd_once_body(node))) return;
25824 switch (nd_type(node)) {
25825 case NODE_OPCALL:
25826 switch (RNODE_OPCALL(node)->nd_mid) {
25827 case '+':
25828 case '-':
25829 case '*':
25830 case '/':
25831 case '%':
25832 case tPOW:
25833 case tUPLUS:
25834 case tUMINUS:
25835 case '|':
25836 case '^':
25837 case '&':
25838 case tCMP:
25839 case '>':
25840 case tGEQ:
25841 case '<':
25842 case tLEQ:
25843 case tEQ:
25844 case tNEQ:
25845 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25846 break;
25847 }
25848 break;
25849
25850 case NODE_LVAR:
25851 case NODE_DVAR:
25852 case NODE_GVAR:
25853 case NODE_IVAR:
25854 case NODE_CVAR:
25855 case NODE_NTH_REF:
25856 case NODE_BACK_REF:
25857 useless = "a variable";
25858 break;
25859 case NODE_CONST:
25860 useless = "a constant";
25861 break;
25862 case NODE_SYM:
25863 case NODE_LINE:
25864 case NODE_FILE:
25865 case NODE_ENCODING:
25866 case NODE_INTEGER:
25867 case NODE_FLOAT:
25868 case NODE_RATIONAL:
25869 case NODE_IMAGINARY:
25870 case NODE_STR:
25871 case NODE_DSTR:
25872 case NODE_REGX:
25873 case NODE_DREGX:
25874 useless = "a literal";
25875 break;
25876 case NODE_COLON2:
25877 case NODE_COLON3:
25878 useless = "::";
25879 break;
25880 case NODE_DOT2:
25881 useless = "..";
25882 break;
25883 case NODE_DOT3:
25884 useless = "...";
25885 break;
25886 case NODE_SELF:
25887 useless = "self";
25888 break;
25889 case NODE_NIL:
25890 useless = "nil";
25891 break;
25892 case NODE_TRUE:
25893 useless = "true";
25894 break;
25895 case NODE_FALSE:
25896 useless = "false";
25897 break;
25898 case NODE_DEFINED:
25899 useless = "defined?";
25900 break;
25901 }
25902
25903 if (useless) {
25904 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25905 }
25906}
25907
25908/* warns useless use of block and returns the last statement node */
25909static NODE *
25910void_stmts(struct parser_params *p, NODE *node)
25911{
25912 NODE *const n = node;
25913 if (!RTEST(ruby_verbose)) return n;
25914 if (!node) return n;
25915 if (!nd_type_p(node, NODE_BLOCK)) return n;
25916
25917 while (RNODE_BLOCK(node)->nd_next) {
25918 void_expr(p, RNODE_BLOCK(node)->nd_head);
25919 node = RNODE_BLOCK(node)->nd_next;
25920 }
25921 return RNODE_BLOCK(node)->nd_head;
25922}
25923
25924static NODE *
25925remove_begin(NODE *node)
25926{
25927 NODE **n = &node, *n1 = node;
25928 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25929 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25930 }
25931 return node;
25932}
25933
25934static void
25935reduce_nodes(struct parser_params *p, NODE **body)
25936{
25937 NODE *node = *body;
25938
25939 if (!node) {
25940 *body = NEW_NIL(&NULL_LOC);
25941 return;
25942 }
25943#define subnodes(type, n1, n2) \
25944 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25945 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25946 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25947
25948 while (node) {
25949 int newline = (int)nd_fl_newline(node);
25950 switch (nd_type(node)) {
25951 end:
25952 case NODE_NIL:
25953 *body = 0;
25954 return;
25955 case NODE_BEGIN:
25956 *body = node = RNODE_BEGIN(node)->nd_body;
25957 if (newline && node) nd_set_fl_newline(node);
25958 continue;
25959 case NODE_BLOCK:
25960 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25961 break;
25962 case NODE_IF:
25963 case NODE_UNLESS:
25964 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25965 return;
25966 case NODE_CASE:
25967 body = &RNODE_CASE(node)->nd_body;
25968 break;
25969 case NODE_WHEN:
25970 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25971 break;
25972 case NODE_ENSURE:
25973 body = &RNODE_ENSURE(node)->nd_head;
25974 break;
25975 case NODE_RESCUE:
25976 newline = 0; // RESBODY should not be a NEWLINE
25977 if (RNODE_RESCUE(node)->nd_else) {
25978 body = &RNODE_RESCUE(node)->nd_resq;
25979 break;
25980 }
25981 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25982 break;
25983 default:
25984 return;
25985 }
25986 node = *body;
25987 if (newline && node) nd_set_fl_newline(node);
25988 }
25989
25990#undef subnodes
25991}
25992
25993static int
25994is_static_content(NODE *node)
25995{
25996 if (!node) return 1;
25997 switch (nd_type(node)) {
25998 case NODE_HASH:
25999 if (!(node = RNODE_HASH(node)->nd_head)) break;
26000 case NODE_LIST:
26001 do {
26002 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
26003 } while ((node = RNODE_LIST(node)->nd_next) != 0);
26004 case NODE_SYM:
26005 case NODE_REGX:
26006 case NODE_LINE:
26007 case NODE_FILE:
26008 case NODE_ENCODING:
26009 case NODE_INTEGER:
26010 case NODE_FLOAT:
26011 case NODE_RATIONAL:
26012 case NODE_IMAGINARY:
26013 case NODE_STR:
26014 case NODE_NIL:
26015 case NODE_TRUE:
26016 case NODE_FALSE:
26017 case NODE_ZLIST:
26018 break;
26019 default:
26020 return 0;
26021 }
26022 return 1;
26023}
26024
26025static int
26026assign_in_cond(struct parser_params *p, NODE *node)
26027{
26028 switch (nd_type(node)) {
26029 case NODE_MASGN:
26030 case NODE_LASGN:
26031 case NODE_DASGN:
26032 case NODE_GASGN:
26033 case NODE_IASGN:
26034 case NODE_CVASGN:
26035 case NODE_CDECL:
26036 break;
26037
26038 default:
26039 return 0;
26040 }
26041
26042 if (!get_nd_value(p, node)) return 1;
26043 if (is_static_content(get_nd_value(p, node))) {
26044 /* reports always */
26045 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
26046 }
26047 return 1;
26048}
26049
26050enum cond_type {
26051 COND_IN_OP,
26052 COND_IN_COND,
26053 COND_IN_FF
26054};
26055
26056#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
26057 switch (t) { \
26058 case COND_IN_OP: break; \
26059 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
26060 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
26061 } \
26062} while (0)
26063
26064static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
26065
26066static NODE*
26067range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26068{
26069 enum node_type type;
26070
26071 if (node == 0) return 0;
26072
26073 type = nd_type(node);
26074 value_expr(p, node);
26075 if (type == NODE_INTEGER) {
26076 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
26077 ID lineno = rb_intern("$.");
26078 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
26079 }
26080 return cond0(p, node, COND_IN_FF, loc, true);
26081}
26082
26083static NODE*
26084cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
26085{
26086 if (node == 0) return 0;
26087 if (!(node = nd_once_body(node))) return 0;
26088 assign_in_cond(p, node);
26089
26090 switch (nd_type(node)) {
26091 case NODE_BEGIN:
26092 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
26093 break;
26094
26095 case NODE_DSTR:
26096 case NODE_EVSTR:
26097 case NODE_STR:
26098 case NODE_FILE:
26099 SWITCH_BY_COND_TYPE(type, warn, "string ");
26100 break;
26101
26102 case NODE_REGX:
26103 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
26104 nd_set_type(node, NODE_MATCH);
26105 break;
26106
26107 case NODE_DREGX:
26108 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
26109
26110 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
26111
26112 case NODE_BLOCK:
26113 {
26114 NODE *end = RNODE_BLOCK(node)->nd_end;
26115 NODE **expr = &RNODE_BLOCK(end)->nd_head;
26116 if (top) top = node == end;
26117 *expr = cond0(p, *expr, type, loc, top);
26118 }
26119 break;
26120
26121 case NODE_AND:
26122 case NODE_OR:
26123 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
26124 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
26125 break;
26126
26127 case NODE_DOT2:
26128 case NODE_DOT3:
26129 if (!top) break;
26130 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
26131 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
26132 switch (nd_type(node)) {
26133 case NODE_DOT2:
26134 nd_set_type(node,NODE_FLIP2);
26135 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
26136 (void)flip2;
26137 break;
26138 case NODE_DOT3:
26139 nd_set_type(node, NODE_FLIP3);
26140 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
26141 (void)flip3;
26142 break;
26143 }
26144 break;
26145
26146 case NODE_SYM:
26147 case NODE_DSYM:
26148 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
26149 break;
26150
26151 case NODE_LINE:
26152 case NODE_ENCODING:
26153 case NODE_INTEGER:
26154 case NODE_FLOAT:
26155 case NODE_RATIONAL:
26156 case NODE_IMAGINARY:
26157 SWITCH_BY_COND_TYPE(type, warning, "");
26158 break;
26159
26160 default:
26161 break;
26162 }
26163 return node;
26164}
26165
26166static NODE*
26167cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26168{
26169 if (node == 0) return 0;
26170 return cond0(p, node, COND_IN_COND, loc, true);
26171}
26172
26173static NODE*
26174method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26175{
26176 if (node == 0) return 0;
26177 return cond0(p, node, COND_IN_OP, loc, true);
26178}
26179
26180static NODE*
26181new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
26182{
26183 YYLTYPE loc = {*pos, *pos};
26184 return NEW_NIL(&loc);
26185}
26186
26187static NODE*
26188new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc, const YYLTYPE* if_keyword_loc, const YYLTYPE* then_keyword_loc, const YYLTYPE* end_keyword_loc)
26189{
26190 if (!cc) return right;
26191 cc = cond0(p, cc, COND_IN_COND, loc, true);
26192 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
26193}
26194
26195static NODE*
26196new_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)
26197{
26198 if (!cc) return right;
26199 cc = cond0(p, cc, COND_IN_COND, loc, true);
26200 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
26201}
26202
26203#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))
26204
26205static NODE*
26206logop(struct parser_params *p, ID id, NODE *left, NODE *right,
26207 const YYLTYPE *op_loc, const YYLTYPE *loc)
26208{
26209 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
26210 NODE *op;
26211 value_expr(p, left);
26212 if (left && nd_type_p(left, type)) {
26213 NODE *node = left, *second;
26214 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26215 node = second;
26216 }
26217 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
26218 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
26219 left->nd_loc.end_pos = loc->end_pos;
26220 return left;
26221 }
26222 op = NEW_AND_OR(type, left, right, loc, op_loc);
26223 nd_set_line(op, op_loc->beg_pos.lineno);
26224 return op;
26225}
26226
26227#undef NEW_AND_OR
26228
26229static void
26230no_blockarg(struct parser_params *p, NODE *node)
26231{
26232 if (nd_type_p(node, NODE_BLOCK_PASS)) {
26233 compile_error(p, "block argument should not be given");
26234 }
26235}
26236
26237static NODE *
26238ret_args(struct parser_params *p, NODE *node)
26239{
26240 if (node) {
26241 no_blockarg(p, node);
26242 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
26243 node = RNODE_LIST(node)->nd_head;
26244 }
26245 }
26246 return node;
26247}
26248
26249static NODE*
26250negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
26251{
26252 switch (nd_type(node)) {
26253 case NODE_INTEGER:
26254 RNODE_INTEGER(node)->minus = TRUE;
26255 break;
26256 case NODE_FLOAT:
26257 RNODE_FLOAT(node)->minus = TRUE;
26258 break;
26259 case NODE_RATIONAL:
26260 RNODE_RATIONAL(node)->minus = TRUE;
26261 break;
26262 case NODE_IMAGINARY:
26263 RNODE_IMAGINARY(node)->minus = TRUE;
26264 break;
26265 }
26266 node->nd_loc = *loc;
26267 return node;
26268}
26269
26270static NODE *
26271arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
26272{
26273 if (node2) {
26274 if (!node1) return (NODE *)node2;
26275 node2->nd_head = node1;
26276 nd_set_first_lineno(node2, nd_first_lineno(node1));
26277 nd_set_first_column(node2, nd_first_column(node1));
26278 return (NODE *)node2;
26279 }
26280 return node1;
26281}
26282
26283static bool
26284args_info_empty_p(struct rb_args_info *args)
26285{
26286 if (args->pre_args_num) return false;
26287 if (args->post_args_num) return false;
26288 if (args->rest_arg) return false;
26289 if (args->opt_args) return false;
26290 if (args->block_arg) return false;
26291 if (args->kw_args) return false;
26292 if (args->kw_rest_arg) return false;
26293 return true;
26294}
26295
26296static rb_node_args_t *
26297new_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)
26298{
26299 struct rb_args_info *args = &tail->nd_ainfo;
26300
26301 if (args->forwarding) {
26302 if (rest_arg) {
26303 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
26304 return tail;
26305 }
26306 rest_arg = idFWD_REST;
26307 }
26308
26309 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
26310 args->pre_init = pre_args ? pre_args->nd_next : 0;
26311
26312 args->post_args_num = post_args ? post_args->nd_plen : 0;
26313 args->post_init = post_args ? post_args->nd_next : 0;
26314 args->first_post_arg = post_args ? post_args->nd_pid : 0;
26315
26316 args->rest_arg = rest_arg;
26317
26318 args->opt_args = opt_args;
26319
26320 nd_set_loc(RNODE(tail), loc);
26321
26322 return tail;
26323}
26324
26325static rb_node_args_t *
26326new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
26327{
26328 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
26329 struct rb_args_info *args = &node->nd_ainfo;
26330 if (p->error_p) return node;
26331
26332 if (block == idNil) {
26333 block = 0;
26334 args->no_blockarg = TRUE;
26335 }
26336 args->block_arg = block;
26337 args->kw_args = kw_args;
26338
26339 if (kw_args) {
26340 /*
26341 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
26342 * variable order: k1, kr1, k2, &b, internal_id, krest
26343 * #=> <reorder>
26344 * variable order: kr1, k1, k2, internal_id, krest, &b
26345 */
26346 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
26347 struct vtable *vtargs = p->lvtbl->args;
26348 rb_node_kw_arg_t *kwn = kw_args;
26349
26350 if (block) block = vtargs->tbl[vtargs->pos-1];
26351 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26352 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26353 while (kwn) {
26354 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26355 --kw_vars;
26356 --required_kw_vars;
26357 kwn = kwn->nd_next;
26358 }
26359
26360 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26361 ID vid = get_nd_vid(p, kwn->nd_body);
26362 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26363 *required_kw_vars++ = vid;
26364 }
26365 else {
26366 *kw_vars++ = vid;
26367 }
26368 }
26369
26370 arg_var(p, kw_bits);
26371 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26372 if (block) arg_var(p, block);
26373
26374 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26375 }
26376 else if (kw_rest_arg == idNil) {
26377 args->no_kwarg = 1;
26378 }
26379 else if (kw_rest_arg) {
26380 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26381 }
26382
26383 return node;
26384}
26385
26386static rb_node_args_t *
26387args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26388{
26389 if (max_numparam > NO_PARAM || it_id) {
26390 if (!args) {
26391 YYLTYPE loc = RUBY_INIT_YYLLOC();
26392 args = new_empty_args_tail(p, 0);
26393 nd_set_loc(RNODE(args), &loc);
26394 }
26395 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26396 }
26397 return args;
26398}
26399
26400static NODE*
26401new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26402{
26403 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26404
26405 if (pre_arg) {
26406 NODE *pre_args = NEW_LIST(pre_arg, loc);
26407 if (RNODE_ARYPTN(aryptn)->pre_args) {
26408 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26409 }
26410 else {
26411 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26412 }
26413 }
26414 return aryptn;
26415}
26416
26417static NODE*
26418new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26419{
26420 if (has_rest) {
26421 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26422 }
26423 else {
26424 rest_arg = NULL;
26425 }
26426 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26427
26428 return node;
26429}
26430
26431static NODE*
26432new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26433{
26434 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26435
26436 return fndptn;
26437}
26438
26439static NODE*
26440new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26441{
26442 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26443 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26444 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26445
26446 return node;
26447}
26448
26449static NODE*
26450new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26451{
26452 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26453 return hshptn;
26454}
26455
26456static NODE*
26457new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26458{
26459 NODE *node, *kw_rest_arg_node;
26460
26461 if (kw_rest_arg == idNil) {
26462 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26463 }
26464 else if (kw_rest_arg) {
26465 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26466 }
26467 else {
26468 kw_rest_arg_node = NULL;
26469 }
26470
26471 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26472
26473 return node;
26474}
26475
26476static NODE*
26477dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26478{
26479 if (!node) {
26480 return NEW_SYM(STR_NEW0(), loc);
26481 }
26482
26483 switch (nd_type(node)) {
26484 case NODE_DSTR:
26485 nd_set_type(node, NODE_DSYM);
26486 nd_set_loc(node, loc);
26487 break;
26488 case NODE_STR:
26489 node = str_to_sym_node(p, node, loc);
26490 break;
26491 default:
26492 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26493 break;
26494 }
26495 return node;
26496}
26497
26498static int
26499nd_type_st_key_enable_p(NODE *node)
26500{
26501 switch (nd_type(node)) {
26502 case NODE_INTEGER:
26503 case NODE_FLOAT:
26504 case NODE_RATIONAL:
26505 case NODE_IMAGINARY:
26506 case NODE_STR:
26507 case NODE_SYM:
26508 case NODE_REGX:
26509 case NODE_LINE:
26510 case NODE_FILE:
26511 case NODE_ENCODING:
26512 return true;
26513 default:
26514 return false;
26515 }
26516}
26517
26518static VALUE
26519nd_value(struct parser_params *p, NODE *node)
26520{
26521 switch (nd_type(node)) {
26522 case NODE_STR:
26523 return rb_node_str_string_val(node);
26524 case NODE_INTEGER:
26525 return rb_node_integer_literal_val(node);
26526 case NODE_FLOAT:
26527 return rb_node_float_literal_val(node);
26528 case NODE_RATIONAL:
26529 return rb_node_rational_literal_val(node);
26530 case NODE_IMAGINARY:
26531 return rb_node_imaginary_literal_val(node);
26532 case NODE_SYM:
26533 return rb_node_sym_string_val(node);
26534 case NODE_REGX:
26535 return rb_node_regx_string_val(node);
26536 case NODE_LINE:
26537 return rb_node_line_lineno_val(node);
26538 case NODE_ENCODING:
26539 return rb_node_encoding_val(node);
26540 case NODE_FILE:
26541 return rb_node_file_path_val(node);
26542 default:
26543 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26545 }
26546}
26547
26548static void
26549warn_duplicate_keys(struct parser_params *p, NODE *hash)
26550{
26551 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26552 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26553 while (hash && RNODE_LIST(hash)->nd_next) {
26554 NODE *head = RNODE_LIST(hash)->nd_head;
26555 NODE *value = RNODE_LIST(hash)->nd_next;
26556 NODE *next = RNODE_LIST(value)->nd_next;
26557 st_data_t key;
26558 st_data_t data;
26559
26560 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26561 if (!head) {
26562 head = value;
26563 }
26564
26565 if (nd_type_st_key_enable_p(head)) {
26566 key = (st_data_t)head;
26567
26568 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26569 rb_warn2L(nd_line((NODE *)data),
26570 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26571 nd_value(p, head), WARN_I(nd_line(head)));
26572 }
26573 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26574 }
26575 hash = next;
26576 }
26577 st_free_table(p->warn_duplicate_keys_table);
26578 p->warn_duplicate_keys_table = NULL;
26579}
26580
26581static NODE *
26582new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26583{
26584 if (hash) warn_duplicate_keys(p, hash);
26585 return NEW_HASH(hash, loc);
26586}
26587
26588static void
26589error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26590{
26591 if (is_private_local_id(p, id)) {
26592 return;
26593 }
26594 if (st_is_member(p->pvtbl, id)) {
26595 yyerror1(loc, "duplicated variable name");
26596 }
26597 else if (p->ctxt.in_alt_pattern && id) {
26598 yyerror1(loc, "variable capture in alternative pattern");
26599 }
26600 else {
26601 p->ctxt.capture_in_pattern = 1;
26602 st_insert(p->pvtbl, (st_data_t)id, 0);
26603 }
26604}
26605
26606static void
26607error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26608{
26609 if (!p->pktbl) {
26610 p->pktbl = st_init_numtable();
26611 }
26612 else if (st_is_member(p->pktbl, key)) {
26613 yyerror1(loc, "duplicated key name");
26614 return;
26615 }
26616 st_insert(p->pktbl, (st_data_t)key, 0);
26617}
26618
26619static NODE *
26620new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26621{
26622 return NEW_HASH(hash, loc);
26623}
26624
26625static NODE *
26626new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26627{
26628 NODE *asgn;
26629
26630 if (lhs) {
26631 ID vid = get_nd_vid(p, lhs);
26632 YYLTYPE lhs_loc = lhs->nd_loc;
26633 if (op == tOROP) {
26634 set_nd_value(p, lhs, rhs);
26635 nd_set_loc(lhs, loc);
26636 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26637 }
26638 else if (op == tANDOP) {
26639 set_nd_value(p, lhs, rhs);
26640 nd_set_loc(lhs, loc);
26641 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26642 }
26643 else {
26644 asgn = lhs;
26645 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26646 set_nd_value(p, asgn, rhs);
26647 nd_set_loc(asgn, loc);
26648 }
26649 }
26650 else {
26651 asgn = NEW_ERROR(loc);
26652 }
26653 return asgn;
26654}
26655
26656static NODE *
26657new_ary_op_assign(struct parser_params *p, NODE *ary,
26658 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26659 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26660{
26661 NODE *asgn;
26662
26663 aryset_check(p, args);
26664 args = make_list(args, args_loc);
26665 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26666 fixpos(asgn, ary);
26667 return asgn;
26668}
26669
26670static NODE *
26671new_attr_op_assign(struct parser_params *p, NODE *lhs,
26672 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26673 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26674{
26675 NODE *asgn;
26676
26677 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26678 fixpos(asgn, lhs);
26679 return asgn;
26680}
26681
26682static NODE *
26683new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26684{
26685 NODE *asgn;
26686
26687 if (lhs) {
26688 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26689 }
26690 else {
26691 asgn = NEW_ERROR(loc);
26692 }
26693 fixpos(asgn, lhs);
26694 return asgn;
26695}
26696
26697static NODE *
26698const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26699{
26700 if (p->ctxt.in_def) {
26701#ifndef RIPPER
26702 yyerror1(loc, "dynamic constant assignment");
26703#else
26704 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26705#endif
26706 }
26707 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26708}
26709
26710#ifdef RIPPER
26711static VALUE
26712assign_error(struct parser_params *p, const char *mesg, VALUE a)
26713{
26714 a = dispatch2(assign_error, ERR_MESG(), a);
26715 ripper_error(p);
26716 return a;
26717}
26718#endif
26719
26720static NODE *
26721new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26722{
26723 NODE *result = head;
26724 if (rescue) {
26725 NODE *tmp = rescue_else ? rescue_else : rescue;
26726 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26727
26728 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26729 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26730 }
26731 if (ensure) {
26732 result = NEW_ENSURE(result, ensure, loc);
26733 }
26734 fixpos(result, head);
26735 return result;
26736}
26737
26738static void
26739warn_unused_var(struct parser_params *p, struct local_vars *local)
26740{
26741 int cnt;
26742
26743 if (!local->used) return;
26744 cnt = local->used->pos;
26745 if (cnt != local->vars->pos) {
26746 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26747 }
26748#ifndef RIPPER
26749 ID *v = local->vars->tbl;
26750 ID *u = local->used->tbl;
26751 for (int i = 0; i < cnt; ++i) {
26752 if (!v[i] || (u[i] & LVAR_USED)) continue;
26753 if (is_private_local_id(p, v[i])) continue;
26754 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26755 }
26756#endif
26757}
26758
26759static void
26760local_push(struct parser_params *p, int toplevel_scope)
26761{
26762 struct local_vars *local;
26763 int inherits_dvars = toplevel_scope && compile_for_eval;
26764 int warn_unused_vars = RTEST(ruby_verbose);
26765
26766 local = ALLOC(struct local_vars);
26767 local->prev = p->lvtbl;
26768 local->args = vtable_alloc(0);
26769 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26770#ifndef RIPPER
26771 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26772 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26773#endif
26774 local->numparam.outer = 0;
26775 local->numparam.inner = 0;
26776 local->numparam.current = 0;
26777 local->it = 0;
26778 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26779
26780# if WARN_PAST_SCOPE
26781 local->past = 0;
26782# endif
26783 CMDARG_PUSH(0);
26784 COND_PUSH(0);
26785 p->lvtbl = local;
26786}
26787
26788static void
26789vtable_chain_free(struct parser_params *p, struct vtable *table)
26790{
26791 while (!DVARS_TERMINAL_P(table)) {
26792 struct vtable *cur_table = table;
26793 table = cur_table->prev;
26794 vtable_free(cur_table);
26795 }
26796}
26797
26798static void
26799local_free(struct parser_params *p, struct local_vars *local)
26800{
26801 vtable_chain_free(p, local->used);
26802
26803# if WARN_PAST_SCOPE
26804 vtable_chain_free(p, local->past);
26805# endif
26806
26807 vtable_chain_free(p, local->args);
26808 vtable_chain_free(p, local->vars);
26809
26810 ruby_xfree_sized(local, sizeof(struct local_vars));
26811}
26812
26813static void
26814local_pop(struct parser_params *p)
26815{
26816 struct local_vars *local = p->lvtbl->prev;
26817 if (p->lvtbl->used) {
26818 warn_unused_var(p, p->lvtbl);
26819 }
26820
26821 local_free(p, p->lvtbl);
26822 p->lvtbl = local;
26823
26824 CMDARG_POP();
26825 COND_POP();
26826}
26827
26828static rb_ast_id_table_t *
26829local_tbl(struct parser_params *p)
26830{
26831 int cnt_args = vtable_size(p->lvtbl->args);
26832 int cnt_vars = vtable_size(p->lvtbl->vars);
26833 int cnt = cnt_args + cnt_vars;
26834 int i, j;
26835 rb_ast_id_table_t *tbl;
26836
26837 if (cnt <= 0) return 0;
26838 tbl = rb_ast_new_local_table(p->ast, cnt);
26839 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26840 /* remove IDs duplicated to warn shadowing */
26841 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26842 ID id = p->lvtbl->vars->tbl[i];
26843 if (!vtable_included(p->lvtbl->args, id)) {
26844 tbl->ids[j++] = id;
26845 }
26846 }
26847 if (j < cnt) {
26848 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26849 }
26850
26851 return tbl;
26852}
26853
26854static void
26855numparam_name(struct parser_params *p, ID id)
26856{
26857 if (!NUMPARAM_ID_P(id)) return;
26858 compile_error(p, "_%d is reserved for numbered parameter",
26859 NUMPARAM_ID_TO_IDX(id));
26860}
26861
26862static void
26863arg_var(struct parser_params *p, ID id)
26864{
26865 numparam_name(p, id);
26866 vtable_add(p->lvtbl->args, id);
26867}
26868
26869static void
26870local_var(struct parser_params *p, ID id)
26871{
26872 numparam_name(p, id);
26873 vtable_add(p->lvtbl->vars, id);
26874 if (p->lvtbl->used) {
26875 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26876 }
26877}
26878
26879#ifndef RIPPER
26880int
26881rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26882{
26883 return rb_local_defined(id, iseq);
26884}
26885#endif
26886
26887static int
26888local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26889{
26890 struct vtable *vars, *args, *used;
26891
26892 vars = p->lvtbl->vars;
26893 args = p->lvtbl->args;
26894 used = p->lvtbl->used;
26895
26896 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26897 vars = vars->prev;
26898 args = args->prev;
26899 if (used) used = used->prev;
26900 }
26901
26902 if (vars && vars->prev == DVARS_INHERIT) {
26903 return rb_parser_local_defined(p, id, p->parent_iseq);
26904 }
26905 else if (vtable_included(args, id)) {
26906 return 1;
26907 }
26908 else {
26909 int i = vtable_included(vars, id);
26910 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26911 return i != 0;
26912 }
26913}
26914
26915static int
26916local_id(struct parser_params *p, ID id)
26917{
26918 return local_id_ref(p, id, NULL);
26919}
26920
26921static int
26922check_forwarding_args(struct parser_params *p)
26923{
26924 if (local_id(p, idFWD_ALL)) return TRUE;
26925 compile_error(p, "unexpected ...");
26926 return FALSE;
26927}
26928
26929static void
26930add_forwarding_args(struct parser_params *p)
26931{
26932 arg_var(p, idFWD_REST);
26933 arg_var(p, idFWD_KWREST);
26934 arg_var(p, idFWD_BLOCK);
26935 arg_var(p, idFWD_ALL);
26936}
26937
26938static void
26939forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26940{
26941 bool conflict = false;
26942
26943 struct vtable *vars, *args;
26944
26945 vars = p->lvtbl->vars;
26946 args = p->lvtbl->args;
26947
26948 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26949 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26950 vars = vars->prev;
26951 args = args->prev;
26952 }
26953
26954 bool found = false;
26955 if (vars && vars->prev == DVARS_INHERIT && !found) {
26956 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26957 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26958 }
26959 else {
26960 found = (vtable_included(args, arg) &&
26961 !(all && vtable_included(args, all)));
26962 }
26963
26964 if (!found) {
26965 compile_error(p, "no anonymous %s parameter", var);
26966 }
26967 else if (conflict) {
26968 compile_error(p, "anonymous %s parameter is also used within block", var);
26969 }
26970}
26971
26972static NODE *
26973new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26974{
26975 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26976 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26977 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26978 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26979 block->forwarding = TRUE;
26980 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26981 return arg_blk_pass(args, block);
26982}
26983
26984static NODE *
26985numparam_push(struct parser_params *p)
26986{
26987 struct local_vars *local = p->lvtbl;
26988 NODE *inner = local->numparam.inner;
26989 if (!local->numparam.outer) {
26990 local->numparam.outer = local->numparam.current;
26991 }
26992 local->numparam.inner = 0;
26993 local->numparam.current = 0;
26994 local->it = 0;
26995 return inner;
26996}
26997
26998static void
26999numparam_pop(struct parser_params *p, NODE *prev_inner)
27000{
27001 struct local_vars *local = p->lvtbl;
27002 if (prev_inner) {
27003 /* prefer first one */
27004 local->numparam.inner = prev_inner;
27005 }
27006 else if (local->numparam.current) {
27007 /* current and inner are exclusive */
27008 local->numparam.inner = local->numparam.current;
27009 }
27010 if (p->max_numparam > NO_PARAM) {
27011 /* current and outer are exclusive */
27012 local->numparam.current = local->numparam.outer;
27013 local->numparam.outer = 0;
27014 }
27015 else {
27016 /* no numbered parameter */
27017 local->numparam.current = 0;
27018 }
27019 local->it = 0;
27020}
27021
27022static const struct vtable *
27023dyna_push(struct parser_params *p)
27024{
27025 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
27026 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
27027 if (p->lvtbl->used) {
27028 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
27029 }
27030 return p->lvtbl->args;
27031}
27032
27033static void
27034dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
27035{
27036 struct vtable *tmp = *vtblp;
27037 *vtblp = tmp->prev;
27038# if WARN_PAST_SCOPE
27039 if (p->past_scope_enabled) {
27040 tmp->prev = p->lvtbl->past;
27041 p->lvtbl->past = tmp;
27042 return;
27043 }
27044# endif
27045 vtable_free(tmp);
27046}
27047
27048static void
27049dyna_pop_1(struct parser_params *p)
27050{
27051 struct vtable *tmp;
27052
27053 if ((tmp = p->lvtbl->used) != 0) {
27054 warn_unused_var(p, p->lvtbl);
27055 p->lvtbl->used = p->lvtbl->used->prev;
27056 vtable_free(tmp);
27057 }
27058 dyna_pop_vtable(p, &p->lvtbl->args);
27059 dyna_pop_vtable(p, &p->lvtbl->vars);
27060}
27061
27062static void
27063dyna_pop(struct parser_params *p, const struct vtable *lvargs)
27064{
27065 while (p->lvtbl->args != lvargs) {
27066 dyna_pop_1(p);
27067 if (!p->lvtbl->args) {
27068 struct local_vars *local = p->lvtbl->prev;
27069 ruby_xfree_sized(p->lvtbl, sizeof(*p->lvtbl));
27070 p->lvtbl = local;
27071 }
27072 }
27073 dyna_pop_1(p);
27074}
27075
27076static int
27077dyna_in_block(struct parser_params *p)
27078{
27079 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
27080}
27081
27082#ifndef RIPPER
27083int
27084dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
27085{
27086 struct vtable *vars, *args, *used;
27087 int i;
27088
27089 args = p->lvtbl->args;
27090 vars = p->lvtbl->vars;
27091 used = p->lvtbl->used;
27092
27093 while (!DVARS_TERMINAL_P(vars)) {
27094 if (vtable_included(args, id)) {
27095 return 1;
27096 }
27097 if ((i = vtable_included(vars, id)) != 0) {
27098 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
27099 return 1;
27100 }
27101 args = args->prev;
27102 vars = vars->prev;
27103 if (!vidrefp) used = 0;
27104 if (used) used = used->prev;
27105 }
27106
27107 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
27108 return rb_dvar_defined(id, p->parent_iseq);
27109 }
27110
27111 return 0;
27112}
27113#endif
27114
27115static int
27116dvar_defined(struct parser_params *p, ID id)
27117{
27118 return dvar_defined_ref(p, id, NULL);
27119}
27120
27121static int
27122dvar_curr(struct parser_params *p, ID id)
27123{
27124 return (vtable_included(p->lvtbl->args, id) ||
27125 vtable_included(p->lvtbl->vars, id));
27126}
27127
27128static void
27129reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
27130{
27131 compile_error(p,
27132 "regexp encoding option '%c' differs from source encoding '%s'",
27133 c, rb_enc_name(rb_parser_str_get_encoding(str)));
27134}
27135
27136#ifndef RIPPER
27137static rb_encoding *
27138find_enc(struct parser_params* p, const char *name)
27139{
27140 int idx = rb_enc_find_index(name);
27141 if (idx < 0) {
27142 rb_bug("unknown encoding name: %s", name);
27143 }
27144
27145 return rb_enc_from_index(idx);
27146}
27147
27148static rb_encoding *
27149kcode_to_enc(struct parser_params* p, int kcode)
27150{
27151 rb_encoding *enc;
27152
27153 switch (kcode) {
27154 case ENC_ASCII8BIT:
27155 enc = rb_ascii8bit_encoding();
27156 break;
27157 case ENC_EUC_JP:
27158 enc = find_enc(p, "EUC-JP");
27159 break;
27160 case ENC_Windows_31J:
27161 enc = find_enc(p, "Windows-31J");
27162 break;
27163 case ENC_UTF8:
27164 enc = rb_utf8_encoding();
27165 break;
27166 default:
27167 enc = NULL;
27168 break;
27169 }
27170
27171 return enc;
27172}
27173
27174int
27175rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27176{
27177 int c = RE_OPTION_ENCODING_IDX(options);
27178
27179 if (c) {
27180 int opt, idx;
27181 rb_encoding *enc;
27182
27183 char_to_option_kcode(c, &opt, &idx);
27184 enc = kcode_to_enc(p, idx);
27185 if (enc != rb_parser_str_get_encoding(str) &&
27186 !rb_parser_is_ascii_string(p, str)) {
27187 goto error;
27188 }
27189 rb_parser_string_set_encoding(str, enc);
27190 }
27191 else if (RE_OPTION_ENCODING_NONE(options)) {
27192 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
27193 !rb_parser_is_ascii_string(p, str)) {
27194 c = 'n';
27195 goto error;
27196 }
27197 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27198 }
27199 else if (rb_is_usascii_enc(p->enc)) {
27200 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27201 }
27202 return 0;
27203
27204 error:
27205 return c;
27206}
27207#endif
27208
27209static void
27210reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27211{
27212 int c = rb_reg_fragment_setenc(p, str, options);
27213 if (c) reg_fragment_enc_error(p, str, c);
27214}
27215
27216#ifndef UNIVERSAL_PARSER
27217typedef struct {
27218 struct parser_params* parser;
27219 rb_encoding *enc;
27220 NODE *succ_block;
27221 const YYLTYPE *loc;
27222 rb_parser_assignable_func assignable;
27224
27225static int
27226reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
27227 int back_num, int *back_refs, OnigRegex regex, void *arg0)
27228{
27230 struct parser_params* p = arg->parser;
27231 rb_encoding *enc = arg->enc;
27232 long len = name_end - name;
27233 const char *s = (const char *)name;
27234
27235 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
27236}
27237
27238static NODE *
27239reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
27240{
27242
27243 arg.parser = p;
27244 arg.enc = rb_enc_get(regexp);
27245 arg.succ_block = 0;
27246 arg.loc = loc;
27247 arg.assignable = assignable;
27248 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
27249
27250 if (!arg.succ_block) return 0;
27251 return RNODE_BLOCK(arg.succ_block)->nd_next;
27252}
27253#endif
27254
27255#ifndef RIPPER
27256NODE *
27257rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
27258{
27259 return assignable(p, id, val, loc);
27260}
27261
27262int
27263rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
27264 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
27265{
27266 ID var;
27267 NODE *node, *succ;
27268
27269 if (!len) return ST_CONTINUE;
27270 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
27271 return ST_CONTINUE;
27272
27273 var = intern_cstr(s, len, enc);
27274 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
27275 if (!lvar_defined(p, var)) return ST_CONTINUE;
27276 }
27277 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
27278 succ = *succ_block;
27279 if (!succ) succ = NEW_ERROR(loc);
27280 succ = block_append(p, succ, node);
27281 *succ_block = succ;
27282 return ST_CONTINUE;
27283}
27284#endif
27285
27286static VALUE
27287parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27288{
27289 VALUE str2;
27290 reg_fragment_setenc(p, str, options);
27291 str2 = rb_str_new_parser_string(str);
27292 return rb_parser_reg_compile(p, str2, options);
27293}
27294
27295#ifndef RIPPER
27296VALUE
27297rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
27298{
27299 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
27300}
27301#endif
27302
27303static VALUE
27304reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27305{
27306 VALUE re;
27307 VALUE err;
27308
27309 err = rb_errinfo();
27310 re = parser_reg_compile(p, str, options);
27311 if (NIL_P(re)) {
27312 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
27313 rb_set_errinfo(err);
27314 compile_error(p, "%"PRIsVALUE, m);
27315 return Qnil;
27316 }
27317 return re;
27318}
27319
27320#ifndef RIPPER
27321void
27322rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
27323{
27324 p->do_print = print;
27325 p->do_loop = loop;
27326 p->do_chomp = chomp;
27327 p->do_split = split;
27328}
27329
27330static NODE *
27331parser_append_options(struct parser_params *p, NODE *node)
27332{
27333 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
27334 const YYLTYPE *const LOC = &default_location;
27335
27336 if (p->do_print) {
27337 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
27338 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
27339 LOC);
27340 node = block_append(p, node, print);
27341 }
27342
27343 if (p->do_loop) {
27344 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27345
27346 if (p->do_split) {
27347 ID ifs = rb_intern("$;");
27348 ID fields = rb_intern("$F");
27349 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27350 NODE *split = NEW_GASGN(fields,
27351 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27352 rb_intern("split"), args, LOC),
27353 LOC);
27354 node = block_append(p, split, node);
27355 }
27356 if (p->do_chomp) {
27357 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27358 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27359 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27360 }
27361
27362 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27363 }
27364
27365 return node;
27366}
27367
27368void
27369rb_init_parse(void)
27370{
27371 /* just to suppress unused-function warnings */
27372 (void)nodetype;
27373 (void)nodeline;
27374}
27375
27376ID
27377internal_id(struct parser_params *p)
27378{
27379 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27380}
27381#endif /* !RIPPER */
27382
27383static void
27384parser_initialize(struct parser_params *p)
27385{
27386 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27387 p->command_start = TRUE;
27388 p->ruby_sourcefile_string = Qnil;
27389 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27390 string_buffer_init(p);
27391 p->node_id = 0;
27392 p->delayed.token = NULL;
27393 p->frozen_string_literal = -1; /* not specified */
27394 rb_source_hash_init(&p->source_hash);
27395#ifndef RIPPER
27396 p->error_buffer = Qfalse;
27397 p->end_expect_token_locations = NULL;
27398 p->token_id = 0;
27399 p->tokens = NULL;
27400#else
27401 p->result = Qnil;
27402 p->parsing_thread = Qnil;
27403 p->s_value = Qnil;
27404 p->s_lvalue = Qnil;
27405 p->s_value_stack = rb_ary_new();
27406#endif
27407 p->debug_buffer = Qnil;
27408 p->debug_output = rb_ractor_stdout();
27409 p->enc = rb_utf8_encoding();
27410 p->exits = 0;
27411}
27412
27413#ifdef RIPPER
27414#define rb_ruby_parser_mark ripper_parser_mark
27415#define rb_ruby_parser_free ripper_parser_free
27416#define rb_ruby_parser_memsize ripper_parser_memsize
27417#endif
27418
27419void
27420rb_ruby_parser_mark(void *ptr)
27421{
27422 struct parser_params *p = (struct parser_params*)ptr;
27423
27424 rb_gc_mark(p->ruby_sourcefile_string);
27425#ifndef RIPPER
27426 rb_gc_mark(p->error_buffer);
27427#else
27428 rb_gc_mark(p->value);
27429 rb_gc_mark(p->result);
27430 rb_gc_mark(p->parsing_thread);
27431 rb_gc_mark(p->s_value);
27432 rb_gc_mark(p->s_lvalue);
27433 rb_gc_mark(p->s_value_stack);
27434#endif
27435 rb_gc_mark(p->debug_buffer);
27436 rb_gc_mark(p->debug_output);
27437}
27438
27439void
27440rb_ruby_parser_free(void *ptr)
27441{
27442 struct parser_params *p = (struct parser_params*)ptr;
27443 struct local_vars *local, *prev;
27444
27445 if (p->ast) {
27446 rb_ast_free(p->ast);
27447 }
27448
27449 if (p->warn_duplicate_keys_table) {
27450 st_free_table(p->warn_duplicate_keys_table);
27451 }
27452
27453#ifndef RIPPER
27454 if (p->tokens) {
27455 rb_parser_ary_free(p, p->tokens);
27456 }
27457#endif
27458
27459 if (p->tokenbuf) {
27460 ruby_xfree_sized(p->tokenbuf, p->toksiz);
27461 }
27462
27463 for (local = p->lvtbl; local; local = prev) {
27464 prev = local->prev;
27465 local_free(p, local);
27466 }
27467
27468 {
27469 token_info *ptinfo;
27470 while ((ptinfo = p->token_info) != 0) {
27471 p->token_info = ptinfo->next;
27472 xfree(ptinfo);
27473 }
27474 }
27475 string_buffer_free(p);
27476
27477 if (p->pvtbl) {
27478 st_free_table(p->pvtbl);
27479 }
27480
27481 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27482 st_free_table(p->case_labels);
27483 }
27484
27485 xfree(p->lex.strterm);
27486 p->lex.strterm = 0;
27487
27488 xfree(ptr);
27489}
27490
27491size_t
27492rb_ruby_parser_memsize(const void *ptr)
27493{
27494 struct parser_params *p = (struct parser_params*)ptr;
27495 struct local_vars *local;
27496 size_t size = sizeof(*p);
27497
27498 size += p->toksiz;
27499 for (local = p->lvtbl; local; local = local->prev) {
27500 size += sizeof(*local);
27501 if (local->vars) size += local->vars->capa * sizeof(ID);
27502 }
27503 return size;
27504}
27505
27506#ifndef RIPPER
27507#undef rb_reserved_word
27508
27509const struct kwtable *
27510rb_reserved_word(const char *str, unsigned int len)
27511{
27512 return reserved_word(str, len);
27513}
27514
27515#ifdef UNIVERSAL_PARSER
27517rb_ruby_parser_allocate(const rb_parser_config_t *config)
27518{
27519 /* parser_initialize expects fields to be set to 0 */
27520 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27521 p->config = config;
27522 return p;
27523}
27524
27526rb_ruby_parser_new(const rb_parser_config_t *config)
27527{
27528 /* parser_initialize expects fields to be set to 0 */
27529 rb_parser_t *p = rb_ruby_parser_allocate(config);
27530 parser_initialize(p);
27531 return p;
27532}
27533#else
27535rb_ruby_parser_allocate(void)
27536{
27537 /* parser_initialize expects fields to be set to 0 */
27538 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27539 return p;
27540}
27541
27543rb_ruby_parser_new(void)
27544{
27545 /* parser_initialize expects fields to be set to 0 */
27546 rb_parser_t *p = rb_ruby_parser_allocate();
27547 parser_initialize(p);
27548 return p;
27549}
27550#endif
27551
27553rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27554{
27555 p->error_buffer = main ? Qfalse : Qnil;
27556 p->parent_iseq = base;
27557 return p;
27558}
27559
27560void
27561rb_ruby_parser_set_script_lines(rb_parser_t *p)
27562{
27563 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27564}
27565
27566void
27567rb_ruby_parser_error_tolerant(rb_parser_t *p)
27568{
27569 p->error_tolerant = 1;
27570}
27571
27572void
27573rb_ruby_parser_keep_tokens(rb_parser_t *p)
27574{
27575 p->keep_tokens = 1;
27576 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27577}
27578
27580rb_ruby_parser_encoding(rb_parser_t *p)
27581{
27582 return p->enc;
27583}
27584
27585int
27586rb_ruby_parser_end_seen_p(rb_parser_t *p)
27587{
27588 return p->ruby__end__seen;
27589}
27590
27591int
27592rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27593{
27594 p->debug = flag;
27595 return flag;
27596}
27597#endif /* !RIPPER */
27598
27599#ifdef RIPPER
27600int
27601rb_ruby_parser_get_yydebug(rb_parser_t *p)
27602{
27603 return p->debug;
27604}
27605
27606void
27607rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27608{
27609 p->value = value;
27610}
27611
27612int
27613rb_ruby_parser_error_p(rb_parser_t *p)
27614{
27615 return p->error_p;
27616}
27617
27618VALUE
27619rb_ruby_parser_debug_output(rb_parser_t *p)
27620{
27621 return p->debug_output;
27622}
27623
27624void
27625rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27626{
27627 p->debug_output = output;
27628}
27629
27630VALUE
27631rb_ruby_parser_parsing_thread(rb_parser_t *p)
27632{
27633 return p->parsing_thread;
27634}
27635
27636void
27637rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27638{
27639 p->parsing_thread = parsing_thread;
27640}
27641
27642void
27643rb_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)
27644{
27645 p->lex.gets = gets;
27646 p->lex.input = input;
27647 p->eofp = 0;
27648 p->ruby_sourcefile_string = sourcefile_string;
27649 p->ruby_sourcefile = sourcefile;
27650 p->ruby_sourceline = sourceline;
27651}
27652
27653VALUE
27654rb_ruby_parser_result(rb_parser_t *p)
27655{
27656 return p->result;
27657}
27658
27660rb_ruby_parser_enc(rb_parser_t *p)
27661{
27662 return p->enc;
27663}
27664
27665VALUE
27666rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27667{
27668 return p->ruby_sourcefile_string;
27669}
27670
27671int
27672rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27673{
27674 return p->ruby_sourceline;
27675}
27676
27677int
27678rb_ruby_parser_lex_state(rb_parser_t *p)
27679{
27680 return p->lex.state;
27681}
27682
27683void
27684rb_ruby_ripper_parse0(rb_parser_t *p)
27685{
27686 parser_prepare(p);
27687 p->ast = rb_ast_new();
27688 ripper_yyparse((void*)p);
27689 rb_ast_free(p->ast);
27690 p->ast = 0;
27691 p->eval_tree = 0;
27692 p->eval_tree_begin = 0;
27693}
27694
27695int
27696rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27697{
27698 return dedent_string(p, string, width);
27699}
27700
27701int
27702rb_ruby_ripper_initialized_p(rb_parser_t *p)
27703{
27704 return p->lex.input != 0;
27705}
27706
27707void
27708rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27709{
27710 parser_initialize(p);
27711}
27712
27713long
27714rb_ruby_ripper_column(rb_parser_t *p)
27715{
27716 return p->lex.ptok - p->lex.pbeg;
27717}
27718
27719long
27720rb_ruby_ripper_token_len(rb_parser_t *p)
27721{
27722 return p->lex.pcur - p->lex.ptok;
27723}
27724
27726rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27727{
27728 return p->lex.lastline;
27729}
27730
27731VALUE
27732rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27733{
27734 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27735}
27736
27737#ifdef UNIVERSAL_PARSER
27739rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27740{
27741 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27742 p->config = config;
27743 return p;
27744}
27745#endif
27746
27747struct parser_params*
27748rb_ruby_ripper_parser_allocate(void)
27749{
27750 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27751}
27752#endif /* RIPPER */
27753
27754#ifndef RIPPER
27755void
27756rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27757{
27758 va_list ap;
27759 VALUE mesg = p->debug_buffer;
27760
27761 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27762 va_start(ap, fmt);
27763 rb_str_vcatf(mesg, fmt, ap);
27764 va_end(ap);
27765 if (char_at_end(p, mesg, 0) == '\n') {
27766 rb_io_write(p->debug_output, mesg);
27767 p->debug_buffer = Qnil;
27768 }
27769}
27770
27771static void
27772parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27773{
27774 va_list ap;
27775 int lineno, column;
27776
27777 if (loc) {
27778 lineno = loc->end_pos.lineno;
27779 column = loc->end_pos.column;
27780 }
27781 else {
27782 lineno = p->ruby_sourceline;
27783 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27784 }
27785
27786 rb_io_flush(p->debug_output);
27787 p->error_p = 1;
27788 va_start(ap, fmt);
27789 p->error_buffer =
27790 rb_syntax_error_append(p->error_buffer,
27791 p->ruby_sourcefile_string,
27792 lineno, column,
27793 p->enc, fmt, ap);
27794 va_end(ap);
27795}
27796
27797static size_t
27798count_char(const char *str, int c)
27799{
27800 int n = 0;
27801 while (str[n] == c) ++n;
27802 return n;
27803}
27804
27805/*
27806 * strip enclosing double-quotes, same as the default yytnamerr except
27807 * for that single-quotes matching back-quotes do not stop stripping.
27808 *
27809 * "\"`class' keyword\"" => "`class' keyword"
27810 */
27811size_t
27812rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27813{
27814 if (*yystr == '"') {
27815 size_t yyn = 0, bquote = 0;
27816 const char *yyp = yystr;
27817
27818 while (*++yyp) {
27819 switch (*yyp) {
27820 case '\'':
27821 if (!bquote) {
27822 bquote = count_char(yyp+1, '\'') + 1;
27823 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27824 yyn += bquote;
27825 yyp += bquote - 1;
27826 break;
27827 }
27828 else {
27829 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27830 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27831 yyn += bquote;
27832 yyp += bquote - 1;
27833 bquote = 0;
27834 break;
27835 }
27836 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27837 if (yyres) memcpy(yyres + yyn, yyp, 3);
27838 yyn += 3;
27839 yyp += 2;
27840 break;
27841 }
27842 goto do_not_strip_quotes;
27843 }
27844
27845 case ',':
27846 goto do_not_strip_quotes;
27847
27848 case '\\':
27849 if (*++yyp != '\\')
27850 goto do_not_strip_quotes;
27851 /* Fall through. */
27852 default:
27853 if (yyres)
27854 yyres[yyn] = *yyp;
27855 yyn++;
27856 break;
27857
27858 case '"':
27859 case '\0':
27860 if (yyres)
27861 yyres[yyn] = '\0';
27862 return yyn;
27863 }
27864 }
27865 do_not_strip_quotes: ;
27866 }
27867
27868 if (!yyres) return strlen(yystr);
27869
27870 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27871}
27872#endif
27873
27874#ifdef RIPPER
27875#define validate(x) (void)(x)
27876
27877static VALUE
27878ripper_dispatch0(struct parser_params *p, ID mid)
27879{
27880 return rb_funcall(p->value, mid, 0);
27881}
27882
27883static VALUE
27884ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27885{
27886 validate(a);
27887 return rb_funcall(p->value, mid, 1, a);
27888}
27889
27890static VALUE
27891ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27892{
27893 validate(a);
27894 validate(b);
27895 return rb_funcall(p->value, mid, 2, a, b);
27896}
27897
27898static VALUE
27899ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27900{
27901 validate(a);
27902 validate(b);
27903 validate(c);
27904 return rb_funcall(p->value, mid, 3, a, b, c);
27905}
27906
27907static VALUE
27908ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27909{
27910 validate(a);
27911 validate(b);
27912 validate(c);
27913 validate(d);
27914 return rb_funcall(p->value, mid, 4, a, b, c, d);
27915}
27916
27917static VALUE
27918ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27919{
27920 validate(a);
27921 validate(b);
27922 validate(c);
27923 validate(d);
27924 validate(e);
27925 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27926}
27927
27928static VALUE
27929ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27930{
27931 validate(a);
27932 validate(b);
27933 validate(c);
27934 validate(d);
27935 validate(e);
27936 validate(f);
27937 validate(g);
27938 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27939}
27940
27941void
27942ripper_error(struct parser_params *p)
27943{
27944 p->error_p = TRUE;
27945}
27946
27947VALUE
27948ripper_value(struct parser_params *p)
27949{
27950 (void)yystpcpy; /* may not used in newer bison */
27951
27952 return p->value;
27953}
27954
27955#endif /* RIPPER */
27956/*
27957 * Local variables:
27958 * mode: c
27959 * c-file-style: "ruby"
27960 * End:
27961 */
#define RUBY_ASSERT(...)
Asserts that the given expression is truthy if and only if RUBY_DEBUG is truthy.
Definition assert.h:219
#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:403
#define ISSPACE
Old name of rb_isspace.
Definition ctype.h:88
#define ALLOC
Old name of RB_ALLOC.
Definition memory.h:400
#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:402
#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:399
#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_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition eval.c:672
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:476
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1429
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1448
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2280
Encoding relates APIs.
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:843
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1123
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1499
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1533
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3648
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1693
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1657
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1515
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:1090
int len
Length of the buffer.
Definition io.h:8
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:223
#define strdup(s)
Just another name of ruby_strdup.
Definition util.h:187
#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:372
#define ALLOCA_N(type, n)
Definition memory.h:292
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition memory.h:360
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:167
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:384
VALUE type(ANYARGS)
ANYARGS-ed function type.
Functions related to nodes in the AST.
static struct re_pattern_buffer * RREGEXP_PTR(VALUE rexp)
Convenient getter function.
Definition rregexp.h:86
#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 lex.c:33
Definition st.h:79
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.
#define RBIMPL_WARNING_PUSH()
Pushes compiler warning state.
#define RBIMPL_WARNING_POP()
Pops compiler warning state.