Ruby 4.1.0dev (2026-10-26 revision 29264f878a52d2c36c75bfca6d04adaefeacbb30)
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, parser_column(p->lex.ptok - p->lex.pbeg)}, \
445 {p->ruby_sourceline, parser_column(p->lex.pcur - p->lex.pbeg)}, \
446 }
447
448/* Saturate instead of wrapping to a column before the line. */
449static inline int
450parser_column(rb_len_t pos)
451{
452#if SIZEOF_INT < SIZEOF_RB_LEN_T
453 if (pos > INT_MAX) return INT_MAX;
454#endif
455 return (int)pos;
456}
457
458#define IS_lex_state_for(x, ls) ((x) & (ls))
459#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
460#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
461#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
462
463# define SET_LEX_STATE(ls) \
464 parser_set_lex_state(p, ls, __LINE__)
465static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
466
467typedef VALUE stack_type;
468
469static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
470
471# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
472# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
473# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
474# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
475# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
476
477/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
478 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
479#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
480#define COND_POP() BITSTACK_POP(cond_stack)
481#define COND_P() BITSTACK_SET_P(cond_stack)
482#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
483
484/* A flag to identify keyword_do_block; "do" keyword after command_call.
485 Example: `foo 1, 2 do`. */
486#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
487#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
488#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
489#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
490
491struct vtable {
492 ID *tbl;
493 int pos;
494 int capa;
495 struct vtable *prev;
496};
497
499 struct vtable *args;
500 struct vtable *vars;
501 struct vtable *used;
502# if WARN_PAST_SCOPE
503 struct vtable *past;
504# endif
505 struct local_vars *prev;
506 struct {
507 NODE *outer, *inner, *current;
508 } numparam;
509 NODE *it;
510};
511
513 NODE *node;
514 YYLTYPE opening_loc;
515 YYLTYPE closing_loc;
517
518enum {
519 ORDINAL_PARAM = -1,
520 NO_PARAM = 0,
521 NUMPARAM_MAX = 9,
522};
523
524#define DVARS_INHERIT ((void*)1)
525#define DVARS_TOPSCOPE NULL
526#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
527
528typedef struct token_info {
529 const char *token;
531 int indent;
532 int nonspc;
533 struct token_info *next;
534} token_info;
535
540
542 struct parser_string_buffer_elem *next;
543 long len; /* Total length of allocated buf */
544 long used; /* Current usage of buf */
545 rb_parser_string_t *buf[FLEX_ARY_LEN];
547
552
553#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
554
555/*
556 Structure of Lexer Buffer:
557
558 lex.pbeg lex.ptok lex.pcur lex.pend
559 | | | |
560 |------------+------------+------------|
561 |<---------->|
562 token
563*/
565 YYSTYPE *lval;
566 YYLTYPE *yylloc;
567
568 struct {
569 rb_strterm_t *strterm;
570 rb_parser_lex_gets_func *gets;
571 rb_parser_input_data input;
572 parser_string_buffer_t string_buffer;
573 rb_parser_string_t *lastline;
574 rb_parser_string_t *nextline;
575 const char *pbeg;
576 const char *pcur;
577 const char *pend;
578 const char *ptok;
579 enum lex_state_e state;
580 /* track the nest level of any parens "()[]{}" */
581 int paren_nest;
582 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
583 int lpar_beg;
584 /* track the nest level of only braces "{}" */
585 int brace_nest;
586 } lex;
587 /* Cache the tail of the and/or chain most recently built by logop(), so a
588 * left-associative chain does not rescan its right branch on every
589 * operator. head is the chain's top node, tail the node whose nd_2nd is the
590 * next insertion point. */
591 struct {
592 NODE *head;
593 NODE *tail;
594 } logop;
595 stack_type cond_stack;
596 stack_type cmdarg_stack;
597 int tokidx;
598 int toksiz;
599 int heredoc_end;
600 int heredoc_indent;
601 int heredoc_line_indent;
602 char *tokenbuf;
603 struct local_vars *lvtbl;
604 st_table *pvtbl;
605 st_table *pktbl;
606 int line_count;
607 int ruby_sourceline; /* current line no. */
608 const char *ruby_sourcefile; /* current source file */
609 VALUE ruby_sourcefile_string;
610 rb_encoding *enc;
612 st_table *case_labels;
613 rb_node_exits_t *exits;
614
615 VALUE debug_buffer;
616 VALUE debug_output;
617
618 struct {
619 rb_parser_string_t *token;
620 int beg_line;
621 int beg_col;
622 int end_line;
623 int end_col;
624 } delayed;
625
626 rb_ast_t *ast;
627 int node_id;
628
629 st_table *warn_duplicate_keys_table;
630
631 int max_numparam;
632 ID it_id;
633
634 struct lex_context ctxt;
635
636 NODE *eval_tree_begin;
637 NODE *eval_tree;
638 const struct rb_iseq_struct *parent_iseq;
639
640#ifdef UNIVERSAL_PARSER
641 const rb_parser_config_t *config;
642#endif
643 /* compile_option */
644 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
645
646 unsigned int command_start:1;
647 unsigned int eofp: 1;
648 unsigned int ruby__end__seen: 1;
649 unsigned int debug: 1;
650 unsigned int has_shebang: 1;
651 unsigned int token_seen: 1;
652 unsigned int token_info_enabled: 1;
653# if WARN_PAST_SCOPE
654 unsigned int past_scope_enabled: 1;
655# endif
656 unsigned int error_p: 1;
657 unsigned int cr_seen: 1;
658
659 /* Streaming hash state of the source bytes read so far. */
660 rb_source_hash_state_t source_hash;
661
662#ifndef RIPPER
663 /* Ruby core only */
664
665 unsigned int do_print: 1;
666 unsigned int do_loop: 1;
667 unsigned int do_chomp: 1;
668 unsigned int do_split: 1;
669 unsigned int error_tolerant: 1;
670 unsigned int keep_tokens: 1;
671
672 VALUE error_buffer;
673 rb_parser_ary_t *debug_lines;
674 /*
675 * Store specific keyword locations to generate dummy end token.
676 * Refer to the tail of list element.
677 */
679 /* id for terms */
680 int token_id;
681 /* Array for term tokens */
682 rb_parser_ary_t *tokens;
683#else
684 /* Ripper only */
685
686 VALUE value;
687 VALUE result;
688 VALUE parsing_thread;
689 VALUE s_value; /* Token VALUE */
690 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
691 VALUE s_value_stack;
692#endif
693};
694
695#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
696#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
697#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
698static int
699numparam_id_p(struct parser_params *p, ID id)
700{
701 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
702 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
703 return idx > 0 && idx <= NUMPARAM_MAX;
704}
705static void numparam_name(struct parser_params *p, ID id);
706
707#ifdef RIPPER
708static void
709after_shift(struct parser_params *p)
710{
711 if (p->debug) {
712 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
713 }
714 rb_ary_push(p->s_value_stack, p->s_value);
715 p->s_value = Qnil;
716}
717
718static void
719before_reduce(int len, struct parser_params *p)
720{
721 // Initialize $$ with $1.
722 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
723}
724
725static void
726after_reduce(int len, struct parser_params *p)
727{
728 for (int i = 0; i < len; i++) {
729 VALUE tos = rb_ary_pop(p->s_value_stack);
730 if (p->debug) {
731 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
732 }
733 }
734 if (p->debug) {
735 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
736 }
737 rb_ary_push(p->s_value_stack, p->s_lvalue);
738 p->s_lvalue = Qnil;
739}
740
741static void
742after_shift_error_token(struct parser_params *p)
743{
744 if (p->debug) {
745 rb_parser_printf(p, "after-shift-error-token:\n");
746 }
747 rb_ary_push(p->s_value_stack, Qnil);
748}
749
750static void
751after_pop_stack(int len, struct parser_params *p)
752{
753 for (int i = 0; i < len; i++) {
754 VALUE tos = rb_ary_pop(p->s_value_stack);
755 if (p->debug) {
756 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
757 }
758 }
759}
760#else
761static void
762after_shift(struct parser_params *p)
763{
764}
765
766static void
767before_reduce(int len, struct parser_params *p)
768{
769}
770
771static void
772after_reduce(int len, struct parser_params *p)
773{
774}
775
776static void
777after_shift_error_token(struct parser_params *p)
778{
779}
780
781static void
782after_pop_stack(int len, struct parser_params *p)
783{
784}
785#endif
786
787#define intern_cstr(n,l,en) rb_intern3(n,l,en)
788
789#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
790
791#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
792#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
793#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
794#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
795#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
796#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
797
798#ifndef RIPPER
799static inline int
800char_at_end(struct parser_params *p, VALUE str, int when_empty)
801{
802 rb_len_t len = RSTRING_LEN(str);
803 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
804}
805#endif
806
807static void
808pop_pvtbl(struct parser_params *p, st_table *tbl)
809{
810 st_free_table(p->pvtbl);
811 p->pvtbl = tbl;
812}
813
814static void
815pop_pktbl(struct parser_params *p, st_table *tbl)
816{
817 if (p->pktbl) st_free_table(p->pktbl);
818 p->pktbl = tbl;
819}
820
821#define STRING_BUF_DEFAULT_LEN 16
822
823static void
824string_buffer_init(struct parser_params *p)
825{
826 parser_string_buffer_t *buf = &p->lex.string_buffer;
827 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
828
829 buf->head = buf->last = xmalloc(size);
830 buf->head->len = STRING_BUF_DEFAULT_LEN;
831 buf->head->used = 0;
832 buf->head->next = NULL;
833}
834
835static void
836string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
837{
838 parser_string_buffer_t *buf = &p->lex.string_buffer;
839
840 if (buf->head->used >= buf->head->len) {
842 long n = buf->head->len * 2;
843 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
844
845 elem = xmalloc(size);
846 elem->len = n;
847 elem->used = 0;
848 elem->next = NULL;
849 buf->last->next = elem;
850 buf->last = elem;
851 }
852 buf->last->buf[buf->last->used++] = str;
853}
854
855static void
856string_buffer_free(struct parser_params *p)
857{
858 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
859
860 while (elem) {
861 parser_string_buffer_elem_t *next_elem = elem->next;
862
863 for (long i = 0; i < elem->used; i++) {
864 rb_parser_string_free(p, elem->buf[i]);
865 }
866
867 xfree(elem);
868 elem = next_elem;
869 }
870}
871
872#ifndef RIPPER
873static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
874
875static void
876debug_end_expect_token_locations(struct parser_params *p, const char *name)
877{
878 if(p->debug) {
879 VALUE mesg = rb_sprintf("%s: [", name);
880 int i = 0;
881 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
882 if (i > 0)
883 rb_str_cat_cstr(mesg, ", ");
884 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
885 i++;
886 }
887 rb_str_cat_cstr(mesg, "]\n");
888 flush_debug_buffer(p, p->debug_output, mesg);
889 }
890}
891
892static void
893push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
894{
895 if(!p->error_tolerant) return;
896
899 locations->pos = pos;
900 locations->prev = p->end_expect_token_locations;
901 p->end_expect_token_locations = locations;
902
903 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
904}
905
906static void
907pop_end_expect_token_locations(struct parser_params *p)
908{
909 if(!p->end_expect_token_locations) return;
910
911 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
912 ruby_xfree_sized(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
913 p->end_expect_token_locations = locations;
914
915 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
916}
917
919peek_end_expect_token_locations(struct parser_params *p)
920{
921 return p->end_expect_token_locations;
922}
923
924static const char *
925parser_token2char(struct parser_params *p, enum yytokentype tok)
926{
927 switch ((int) tok) {
928#define TOKEN2CHAR(tok) case tok: return (#tok);
929#define TOKEN2CHAR2(tok, name) case tok: return (name);
930 TOKEN2CHAR2(' ', "word_sep");
931 TOKEN2CHAR2('!', "!")
932 TOKEN2CHAR2('%', "%");
933 TOKEN2CHAR2('&', "&");
934 TOKEN2CHAR2('*', "*");
935 TOKEN2CHAR2('+', "+");
936 TOKEN2CHAR2('-', "-");
937 TOKEN2CHAR2('/', "/");
938 TOKEN2CHAR2('<', "<");
939 TOKEN2CHAR2('=', "=");
940 TOKEN2CHAR2('>', ">");
941 TOKEN2CHAR2('?', "?");
942 TOKEN2CHAR2('^', "^");
943 TOKEN2CHAR2('|', "|");
944 TOKEN2CHAR2('~', "~");
945 TOKEN2CHAR2(':', ":");
946 TOKEN2CHAR2(',', ",");
947 TOKEN2CHAR2('.', ".");
948 TOKEN2CHAR2(';', ";");
949 TOKEN2CHAR2('`', "`");
950 TOKEN2CHAR2('\n', "nl");
951 TOKEN2CHAR2('{', "\"{\"");
952 TOKEN2CHAR2('}', "\"}\"");
953 TOKEN2CHAR2('[', "\"[\"");
954 TOKEN2CHAR2(']', "\"]\"");
955 TOKEN2CHAR2('(', "\"(\"");
956 TOKEN2CHAR2(')', "\")\"");
957 TOKEN2CHAR2('\\', "backslash");
958 TOKEN2CHAR(keyword_class);
959 TOKEN2CHAR(keyword_module);
960 TOKEN2CHAR(keyword_def);
961 TOKEN2CHAR(keyword_undef);
962 TOKEN2CHAR(keyword_begin);
963 TOKEN2CHAR(keyword_rescue);
964 TOKEN2CHAR(keyword_ensure);
965 TOKEN2CHAR(keyword_end);
966 TOKEN2CHAR(keyword_if);
967 TOKEN2CHAR(keyword_unless);
968 TOKEN2CHAR(keyword_then);
969 TOKEN2CHAR(keyword_elsif);
970 TOKEN2CHAR(keyword_else);
971 TOKEN2CHAR(keyword_case);
972 TOKEN2CHAR(keyword_when);
973 TOKEN2CHAR(keyword_while);
974 TOKEN2CHAR(keyword_until);
975 TOKEN2CHAR(keyword_for);
976 TOKEN2CHAR(keyword_break);
977 TOKEN2CHAR(keyword_next);
978 TOKEN2CHAR(keyword_redo);
979 TOKEN2CHAR(keyword_retry);
980 TOKEN2CHAR(keyword_in);
981 TOKEN2CHAR(keyword_do);
982 TOKEN2CHAR(keyword_do_cond);
983 TOKEN2CHAR(keyword_do_block);
984 TOKEN2CHAR(keyword_do_LAMBDA);
985 TOKEN2CHAR(keyword_return);
986 TOKEN2CHAR(keyword_yield);
987 TOKEN2CHAR(keyword_super);
988 TOKEN2CHAR(keyword_self);
989 TOKEN2CHAR(keyword_nil);
990 TOKEN2CHAR(keyword_true);
991 TOKEN2CHAR(keyword_false);
992 TOKEN2CHAR(keyword_and);
993 TOKEN2CHAR(keyword_or);
994 TOKEN2CHAR(keyword_not);
995 TOKEN2CHAR(modifier_if);
996 TOKEN2CHAR(modifier_unless);
997 TOKEN2CHAR(modifier_while);
998 TOKEN2CHAR(modifier_until);
999 TOKEN2CHAR(modifier_rescue);
1000 TOKEN2CHAR(keyword_alias);
1001 TOKEN2CHAR(keyword_defined);
1002 TOKEN2CHAR(keyword_BEGIN);
1003 TOKEN2CHAR(keyword_END);
1004 TOKEN2CHAR(keyword__LINE__);
1005 TOKEN2CHAR(keyword__FILE__);
1006 TOKEN2CHAR(keyword__ENCODING__);
1007 TOKEN2CHAR(tIDENTIFIER);
1008 TOKEN2CHAR(tFID);
1009 TOKEN2CHAR(tGVAR);
1010 TOKEN2CHAR(tIVAR);
1011 TOKEN2CHAR(tCONSTANT);
1012 TOKEN2CHAR(tCVAR);
1013 TOKEN2CHAR(tLABEL);
1014 TOKEN2CHAR(tINTEGER);
1015 TOKEN2CHAR(tFLOAT);
1016 TOKEN2CHAR(tRATIONAL);
1017 TOKEN2CHAR(tIMAGINARY);
1018 TOKEN2CHAR(tCHAR);
1019 TOKEN2CHAR(tNTH_REF);
1020 TOKEN2CHAR(tBACK_REF);
1021 TOKEN2CHAR(tSTRING_CONTENT);
1022 TOKEN2CHAR(tREGEXP_END);
1023 TOKEN2CHAR(tDUMNY_END);
1024 TOKEN2CHAR(tSP);
1025 TOKEN2CHAR(tUPLUS);
1026 TOKEN2CHAR(tUMINUS);
1027 TOKEN2CHAR(tPOW);
1028 TOKEN2CHAR(tCMP);
1029 TOKEN2CHAR(tEQ);
1030 TOKEN2CHAR(tEQQ);
1031 TOKEN2CHAR(tNEQ);
1032 TOKEN2CHAR(tGEQ);
1033 TOKEN2CHAR(tLEQ);
1034 TOKEN2CHAR(tANDOP);
1035 TOKEN2CHAR(tOROP);
1036 TOKEN2CHAR(tMATCH);
1037 TOKEN2CHAR(tNMATCH);
1038 TOKEN2CHAR(tDOT2);
1039 TOKEN2CHAR(tDOT3);
1040 TOKEN2CHAR(tBDOT2);
1041 TOKEN2CHAR(tBDOT3);
1042 TOKEN2CHAR(tAREF);
1043 TOKEN2CHAR(tASET);
1044 TOKEN2CHAR(tLSHFT);
1045 TOKEN2CHAR(tRSHFT);
1046 TOKEN2CHAR(tANDDOT);
1047 TOKEN2CHAR(tCOLON2);
1048 TOKEN2CHAR(tCOLON3);
1049 TOKEN2CHAR(tOP_ASGN);
1050 TOKEN2CHAR(tASSOC);
1051 TOKEN2CHAR(tLPAREN);
1052 TOKEN2CHAR(tLPAREN_ARG);
1053 TOKEN2CHAR(tLBRACK);
1054 TOKEN2CHAR(tLBRACE);
1055 TOKEN2CHAR(tLBRACE_ARG);
1056 TOKEN2CHAR(tSTAR);
1057 TOKEN2CHAR(tDSTAR);
1058 TOKEN2CHAR(tAMPER);
1059 TOKEN2CHAR(tLAMBDA);
1060 TOKEN2CHAR(tSYMBEG);
1061 TOKEN2CHAR(tSTRING_BEG);
1062 TOKEN2CHAR(tXSTRING_BEG);
1063 TOKEN2CHAR(tREGEXP_BEG);
1064 TOKEN2CHAR(tWORDS_BEG);
1065 TOKEN2CHAR(tQWORDS_BEG);
1066 TOKEN2CHAR(tSYMBOLS_BEG);
1067 TOKEN2CHAR(tQSYMBOLS_BEG);
1068 TOKEN2CHAR(tSTRING_END);
1069 TOKEN2CHAR(tSTRING_DEND);
1070 TOKEN2CHAR(tSTRING_DBEG);
1071 TOKEN2CHAR(tSTRING_DVAR);
1072 TOKEN2CHAR(tLAMBEG);
1073 TOKEN2CHAR(tLABEL_END);
1074 TOKEN2CHAR(tIGNORED_NL);
1075 TOKEN2CHAR(tCOMMENT);
1076 TOKEN2CHAR(tEMBDOC_BEG);
1077 TOKEN2CHAR(tEMBDOC);
1078 TOKEN2CHAR(tEMBDOC_END);
1079 TOKEN2CHAR(tHEREDOC_BEG);
1080 TOKEN2CHAR(tHEREDOC_END);
1081 TOKEN2CHAR(k__END__);
1082 TOKEN2CHAR(tLOWEST);
1083 TOKEN2CHAR(tUMINUS_NUM);
1084 TOKEN2CHAR(tLAST_TOKEN);
1085#undef TOKEN2CHAR
1086#undef TOKEN2CHAR2
1087 }
1088
1089 rb_bug("parser_token2id: unknown token %d", tok);
1090
1091 UNREACHABLE_RETURN(0);
1092}
1093#else
1094static void
1095push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1096{
1097}
1098
1099static void
1100pop_end_expect_token_locations(struct parser_params *p)
1101{
1102}
1103#endif
1104
1105RBIMPL_ATTR_NONNULL((1, 2, 3))
1106static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1107RBIMPL_ATTR_NONNULL((1, 2))
1108static int parser_yyerror0(struct parser_params*, const char*);
1109#define yyerror0(msg) parser_yyerror0(p, (msg))
1110#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1111#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1112#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1113#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1114#define lex_eol_p(p) lex_eol_n_p(p, 0)
1115#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1116#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1117#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1118
1119static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1120static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1121static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1122static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1123static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1124
1125#ifdef RIPPER
1126#define compile_for_eval (0)
1127#else
1128#define compile_for_eval (p->parent_iseq != 0)
1129#endif
1130
1131#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1132
1133#define CALL_Q_P(q) ((q) == tANDDOT)
1134#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1135
1136#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1137
1138static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1139
1140static inline void
1141rb_discard_node(struct parser_params *p, NODE *n)
1142{
1143 rb_ast_delete_node(p->ast, n);
1144}
1145
1146static 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);
1147static 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);
1148static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1149static 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);
1150static 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);
1151static 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);
1152static 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);
1153static 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);
1154static 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);
1155static 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);
1156static 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);
1157static 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);
1158static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1159static 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);
1160static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1161static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1162static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1163static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1164static 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);
1165static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1166static 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);
1167static 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);
1168static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1169static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1170static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1171static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1172static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1173static 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);
1174static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1175static 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);
1176static 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);
1177static 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);
1178static 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);
1179static 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);
1180static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1181static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1182static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1183static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1184static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1185static 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);
1186static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1187static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1188static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1189static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1190static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1191static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1192static 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);
1193static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1194static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1195static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1196static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1197static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1198static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1199static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1200static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1201static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1202static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1203static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1204static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1205static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1206static 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);
1207static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1208static 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);
1209static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1210static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1211static 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);
1212static 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);
1213static 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);
1214static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1215static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1216static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1217static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1218static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1219static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1220static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1221static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1222static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1223static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1224static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1225static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1226static 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);
1227static 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);
1228static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1229static 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);
1230static 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);
1231static 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);
1232static 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);
1233static 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);
1234static 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);
1235static 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);
1236static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1237static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1238static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1239static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1240static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1241static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1242static 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);
1243static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1244static 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);
1245static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1246static 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);
1247static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1248static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1249static 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);
1250static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1251static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1252static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1253
1254#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1255#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1256#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1257#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)
1258#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)
1259#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1260#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1261#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1262#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)
1263#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)
1264#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)
1265#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)
1266#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1267#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)
1268#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1269#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1270#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1271#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1272#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1273#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1274#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1275#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1276#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1277#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1278#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1279#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1280#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1281#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1282#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1283#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)
1284#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)
1285#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1286#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1287#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1288#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1289#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1290#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1291#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1292#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1293#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)
1294#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1295#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1296#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1297#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1298#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1299#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1300#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)
1301#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1302#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1303#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1304#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1305#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1306#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1307#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1308#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1309#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1310#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1311#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1312#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1313#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1314#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1315#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1316#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1317#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1318#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1319#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1320#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1321#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)
1322#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1323#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1324#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1325#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1326#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1327#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1328#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1329#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1330#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1331#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1332#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1333#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1334#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1335#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1336#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1337#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)
1338#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1339#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)
1340#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1341#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1342#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1343#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1344#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1345#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1346#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1347#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1348#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1349#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1350#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)
1351#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1352#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1353#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1354#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)
1355#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1356#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1357#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1358#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1359#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1360#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1361#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1362
1363enum internal_node_type {
1364 NODE_INTERNAL_ONLY = NODE_LAST,
1365 NODE_DEF_TEMP,
1366 NODE_EXITS,
1367 NODE_INTERNAL_LAST
1368};
1369
1370static const char *
1371parser_node_name(int node)
1372{
1373 switch (node) {
1374 case NODE_DEF_TEMP:
1375 return "NODE_DEF_TEMP";
1376 case NODE_EXITS:
1377 return "NODE_EXITS";
1378 default:
1379 return ruby_node_name(node);
1380 }
1381}
1382
1383/* This node is parse.y internal */
1384struct RNode_DEF_TEMP {
1385 NODE node;
1386
1387 /* for NODE_DEFN/NODE_DEFS */
1388
1389 struct RNode *nd_def;
1390 ID nd_mid;
1391
1392 struct {
1393 int max_numparam;
1394 NODE *numparam_save;
1395 struct lex_context ctxt;
1396 } save;
1397};
1398
1399#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1400
1401static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1402static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1403static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1404static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1405static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1406
1407#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1408#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1409#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1410#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1411
1412/* Make a new internal node, which should not be appeared in the
1413 * result AST and does not have node_id and location. */
1414static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1415#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1416
1417static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1418
1419static int
1420parser_get_node_id(struct parser_params *p)
1421{
1422 int node_id = p->node_id;
1423 p->node_id++;
1424 return node_id;
1425}
1426
1427static void
1428anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1429{
1430 if (id == tANDDOT) {
1431 yyerror1(loc, "&. inside multiple assignment destination");
1432 }
1433}
1434
1435static inline void
1436set_line_body(NODE *body, int line)
1437{
1438 if (!body) return;
1439 switch (nd_type(body)) {
1440 case NODE_RESCUE:
1441 case NODE_ENSURE:
1442 nd_set_line(body, line);
1443 }
1444}
1445
1446static void
1447set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1448{
1449 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1450 nd_set_line(node, beg->end_pos.lineno);
1451}
1452
1453static NODE *
1454last_expr_node(NODE *expr)
1455{
1456 while (expr) {
1457 if (nd_type_p(expr, NODE_BLOCK)) {
1458 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1459 }
1460 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1461 expr = RNODE_BEGIN(expr)->nd_body;
1462 }
1463 else {
1464 break;
1465 }
1466 }
1467 return expr;
1468}
1469
1470#ifndef RIPPER
1471#define yyparse ruby_yyparse
1472#endif
1473
1474static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1475static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1476static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1477static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1478static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1479static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1480
1481static NODE *newline_node(NODE*);
1482static void fixpos(NODE*,NODE*);
1483
1484static int value_expr(struct parser_params*,NODE*);
1485static void void_expr(struct parser_params*,NODE*);
1486static NODE *remove_begin(NODE*);
1487static NODE *void_stmts(struct parser_params*,NODE*);
1488static void reduce_nodes(struct parser_params*,NODE**);
1489static void block_dup_check(struct parser_params*,NODE*,NODE*);
1490
1491static NODE *block_append(struct parser_params*,NODE*,NODE*);
1492static NODE *list_append(struct parser_params*,NODE*,NODE*);
1493static NODE *list_concat(NODE*,NODE*);
1494static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1495static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1496static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1497static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1498static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1499static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1500static NODE *str2dstr(struct parser_params*,NODE*);
1501static NODE *evstr2dstr(struct parser_params*,NODE*);
1502static NODE *splat_array(NODE*);
1503static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1504
1505static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1506static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1507static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1508static 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);
1509static 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;}
1510static NODE *command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc);
1511
1512static bool args_info_empty_p(struct rb_args_info *args);
1513static 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*);
1514static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1515#define new_empty_args_tail(p, loc) new_args_tail(p, 0, 0, 0, loc)
1516static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1517static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1518static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1519static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1520static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1521static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1522
1523static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1524static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1525
1526static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1527static void no_blockarg(struct parser_params*,NODE*);
1528static NODE *ret_args(struct parser_params*,NODE*);
1529static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1530static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1531
1532static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1533static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1534
1535static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1536static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1537
1538static VALUE rb_backref_error(struct parser_params*,NODE*);
1539static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1540
1541static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1542static 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);
1543static 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);
1544static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1545static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1546
1547static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1548
1549static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1550static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1551
1552static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1553static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1554
1555static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1556
1557static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1558
1559#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1560
1561static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1562
1563static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1564
1565static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1566
1567static rb_ast_id_table_t *local_tbl(struct parser_params*);
1568
1569static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1570static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1571
1572static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1573static NODE *heredoc_dedent(struct parser_params*,NODE*);
1574
1575static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1576
1577static 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);
1578
1579#ifdef RIPPER
1580#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1581#define set_value(val) (p->s_lvalue = val)
1582static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1583static int id_is_var(struct parser_params *p, ID id);
1584#endif
1585
1586RUBY_SYMBOL_EXPORT_BEGIN
1587VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1588int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1589enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1590VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1591void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1592PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1593YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1594YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1595YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1596YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1597YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1598YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1599void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1600RUBY_SYMBOL_EXPORT_END
1601
1602static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1603static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1604static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1605static VALUE formal_argument_error(struct parser_params*, ID);
1606static ID shadowing_lvar(struct parser_params*,ID);
1607static void new_bv(struct parser_params*,ID);
1608
1609static void local_push(struct parser_params*,int);
1610static void local_pop(struct parser_params*);
1611static void local_var(struct parser_params*, ID);
1612static void arg_var(struct parser_params*, ID);
1613static int local_id(struct parser_params *p, ID id);
1614static int local_id_ref(struct parser_params*, ID, ID **);
1615#define internal_id rb_parser_internal_id
1616ID internal_id(struct parser_params*);
1617static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1618static int check_forwarding_args(struct parser_params*);
1619static void add_forwarding_args(struct parser_params *p);
1620static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1621
1622static const struct vtable *dyna_push(struct parser_params *);
1623static void dyna_pop(struct parser_params*, const struct vtable *);
1624static int dyna_in_block(struct parser_params*);
1625#define dyna_var(p, id) local_var(p, id)
1626static int dvar_defined(struct parser_params*, ID);
1627#define dvar_defined_ref rb_parser_dvar_defined_ref
1628int dvar_defined_ref(struct parser_params*, ID, ID**);
1629static int dvar_curr(struct parser_params*,ID);
1630
1631static int lvar_defined(struct parser_params*, ID);
1632
1633static NODE *numparam_push(struct parser_params *p);
1634static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1635
1636#define METHOD_NOT '!'
1637
1638#define idFWD_REST '*'
1639#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1640#define idFWD_BLOCK '&'
1641#define idFWD_ALL idDot3
1642#define arg_FWD_BLOCK idFWD_BLOCK
1643
1644#define RE_ONIG_OPTION_IGNORECASE 1
1645#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1646#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1647#define RE_OPTION_ONCE (1<<16)
1648#define RE_OPTION_ENCODING_SHIFT 8
1649#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1650#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1651#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1652#define RE_OPTION_MASK 0xff
1653#define RE_OPTION_ARG_ENCODING_NONE 32
1654
1655#define CHECK_LITERAL_WHEN (st_table *)1
1656#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1657
1658#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1659RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1660
1661#define TOKEN2ID(tok) ( \
1662 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1663 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1664 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1665 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1666 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1667 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1668 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1669
1670/****** Ripper *******/
1671
1672#ifdef RIPPER
1673
1674#include "eventids1.h"
1675#include "eventids2.h"
1676
1677extern const struct ripper_parser_ids ripper_parser_ids;
1678
1679static VALUE ripper_dispatch0(struct parser_params*,ID);
1680static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1681static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1682static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1683static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1684static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1685static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1686void ripper_error(struct parser_params *p);
1687
1688#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1689#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1690#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1691#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1692#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1693#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1694#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1695
1696#define yyparse ripper_yyparse
1697
1698static VALUE
1699aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1700{
1701 if (!NIL_P(pre_arg)) {
1702 if (!NIL_P(pre_args)) {
1703 rb_ary_unshift(pre_args, pre_arg);
1704 }
1705 else {
1706 pre_args = rb_ary_new_from_args(1, pre_arg);
1707 }
1708 }
1709 return pre_args;
1710}
1711
1712#define ID2VAL(id) STATIC_ID2SYM(id)
1713#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1714#endif /* RIPPER */
1715
1716#define KWD2EID(t, v) keyword_##t
1717
1718static NODE *
1719new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1720{
1721 body = remove_begin(body);
1722 reduce_nodes(p, &body);
1723 NODE *n = NEW_SCOPE(args, body, parent, loc);
1724 nd_set_line(n, loc->end_pos.lineno);
1725 set_line_body(body, loc->beg_pos.lineno);
1726 return n;
1727}
1728
1729static NODE *
1730rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1731 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1732{
1733 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1734 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1735 loc.beg_pos = arg_loc->beg_pos;
1736 return NEW_RESCUE(arg, rescue, 0, &loc);
1737}
1738
1739static NODE *add_block_exit(struct parser_params *p, NODE *node);
1740static rb_node_exits_t *init_block_exit(struct parser_params *p);
1741static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1742static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1743static void clear_block_exit(struct parser_params *p, bool error);
1744
1745static void
1746next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1747{
1748 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1749}
1750
1751static void
1752restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1753{
1754 /* See: def_name action */
1755 struct lex_context ctxt = temp->save.ctxt;
1756 p->ctxt.in_def = ctxt.in_def;
1757 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1758 p->ctxt.in_rescue = ctxt.in_rescue;
1759 p->max_numparam = temp->save.max_numparam;
1760 numparam_pop(p, temp->save.numparam_save);
1761 clear_block_exit(p, true);
1762}
1763
1764static void
1765endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1766{
1767 if (is_attrset_id(mid)) {
1768 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1769 }
1770 token_info_drop(p, "def", loc->beg_pos);
1771}
1772
1773#define debug_token_line(p, name, line) do { \
1774 if (p->debug) { \
1775 const char *const pcur = p->lex.pcur; \
1776 const char *const ptok = p->lex.ptok; \
1777 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1778 line, p->ruby_sourceline, \
1779 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1780 } \
1781 } while (0)
1782
1783#define begin_definition(k, loc_beg, loc_end) \
1784 do { \
1785 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1786 /* singleton class */ \
1787 p->ctxt.cant_return = !p->ctxt.in_def; \
1788 p->ctxt.in_def = 0; \
1789 } \
1790 else if (p->ctxt.in_def) { \
1791 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1792 yyerror1(&loc, k " definition in method body"); \
1793 } \
1794 else { \
1795 p->ctxt.cant_return = 1; \
1796 } \
1797 local_push(p, 0); \
1798 } while (0)
1799
1800#ifndef RIPPER
1801# define ifndef_ripper(x) (x)
1802# define ifdef_ripper(r,x) (x)
1803#else
1804# define ifndef_ripper(x)
1805# define ifdef_ripper(r,x) (r)
1806#endif
1807
1808# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1809# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1810# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1811# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1812# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1813# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1814# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1815# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1816# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1817# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1818# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1819# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1820# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1821# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1822# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1823# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1824# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1825# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1826# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1827# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1828#ifdef RIPPER
1829extern const ID id_warn, id_warning, id_gets, id_assoc;
1830# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1831# define WARN_S_L(s,l) STR_NEW(s,l)
1832# define WARN_S(s) STR_NEW2(s)
1833# define WARN_I(i) INT2NUM(i)
1834# define WARN_ID(i) rb_id2str(i)
1835# define PRIsWARN PRIsVALUE
1836# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1837# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1838# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1839# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1840# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1841# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1842# define compile_error ripper_compile_error
1843#else
1844# define WARN_S_L(s,l) s
1845# define WARN_S(s) s
1846# define WARN_I(i) i
1847# define WARN_ID(i) rb_id2name(i)
1848# define PRIsWARN PRIsVALUE
1849# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1850# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1851# define WARN_CALL rb_compile_warn
1852# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1853# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1854# define WARNING_CALL rb_compile_warning
1855PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1856# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1857#endif
1858
1859#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1860
1861static NODE *
1862add_block_exit(struct parser_params *p, NODE *node)
1863{
1864 if (!node) {
1865 compile_error(p, "unexpected null node");
1866 return 0;
1867 }
1868 switch (nd_type(node)) {
1869 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1870 default:
1871 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1872 return node;
1873 }
1874 if (!p->ctxt.in_defined) {
1875 rb_node_exits_t *exits = p->exits;
1876 if (exits) {
1877 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1878 exits->nd_stts = node;
1879 }
1880 }
1881 return node;
1882}
1883
1884static rb_node_exits_t *
1885init_block_exit(struct parser_params *p)
1886{
1887 rb_node_exits_t *old = p->exits;
1888 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1889 exits->nd_chain = 0;
1890 exits->nd_stts = RNODE(exits);
1891 p->exits = exits;
1892 return old;
1893}
1894
1895static rb_node_exits_t *
1896allow_block_exit(struct parser_params *p)
1897{
1898 rb_node_exits_t *exits = p->exits;
1899 p->exits = 0;
1900 return exits;
1901}
1902
1903static void
1904restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1905{
1906 p->exits = exits;
1907}
1908
1909static void
1910clear_block_exit(struct parser_params *p, bool error)
1911{
1912 rb_node_exits_t *exits = p->exits;
1913 if (!exits) return;
1914 if (error) {
1915 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1916 switch (nd_type(e)) {
1917 case NODE_BREAK:
1918 yyerror1(&e->nd_loc, "Invalid break");
1919 break;
1920 case NODE_NEXT:
1921 yyerror1(&e->nd_loc, "Invalid next");
1922 break;
1923 case NODE_REDO:
1924 yyerror1(&e->nd_loc, "Invalid redo");
1925 break;
1926 default:
1927 yyerror1(&e->nd_loc, "unexpected node");
1928 goto end_checks; /* no nd_chain */
1929 }
1930 }
1931 end_checks:;
1932 }
1933 exits->nd_stts = RNODE(exits);
1934 exits->nd_chain = 0;
1935}
1936
1937#define WARN_EOL(tok) \
1938 (looking_at_eol_p(p) ? \
1939 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1940 (void)0)
1941static int looking_at_eol_p(struct parser_params *p);
1942
1943static NODE *
1944get_nd_value(struct parser_params *p, NODE *node)
1945{
1946 switch (nd_type(node)) {
1947 case NODE_GASGN:
1948 return RNODE_GASGN(node)->nd_value;
1949 case NODE_IASGN:
1950 return RNODE_IASGN(node)->nd_value;
1951 case NODE_LASGN:
1952 return RNODE_LASGN(node)->nd_value;
1953 case NODE_DASGN:
1954 return RNODE_DASGN(node)->nd_value;
1955 case NODE_MASGN:
1956 return RNODE_MASGN(node)->nd_value;
1957 case NODE_CVASGN:
1958 return RNODE_CVASGN(node)->nd_value;
1959 case NODE_CDECL:
1960 return RNODE_CDECL(node)->nd_value;
1961 default:
1962 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1963 return 0;
1964 }
1965}
1966
1967static void
1968set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1969{
1970 switch (nd_type(node)) {
1971 case NODE_CDECL:
1972 RNODE_CDECL(node)->nd_value = rhs;
1973 break;
1974 case NODE_GASGN:
1975 RNODE_GASGN(node)->nd_value = rhs;
1976 break;
1977 case NODE_IASGN:
1978 RNODE_IASGN(node)->nd_value = rhs;
1979 break;
1980 case NODE_LASGN:
1981 RNODE_LASGN(node)->nd_value = rhs;
1982 break;
1983 case NODE_DASGN:
1984 RNODE_DASGN(node)->nd_value = rhs;
1985 break;
1986 case NODE_MASGN:
1987 RNODE_MASGN(node)->nd_value = rhs;
1988 break;
1989 case NODE_CVASGN:
1990 RNODE_CVASGN(node)->nd_value = rhs;
1991 break;
1992 default:
1993 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1994 break;
1995 }
1996}
1997
1998static ID
1999get_nd_vid(struct parser_params *p, NODE *node)
2000{
2001 switch (nd_type(node)) {
2002 case NODE_CDECL:
2003 return RNODE_CDECL(node)->nd_vid;
2004 case NODE_GASGN:
2005 return RNODE_GASGN(node)->nd_vid;
2006 case NODE_IASGN:
2007 return RNODE_IASGN(node)->nd_vid;
2008 case NODE_LASGN:
2009 return RNODE_LASGN(node)->nd_vid;
2010 case NODE_DASGN:
2011 return RNODE_DASGN(node)->nd_vid;
2012 case NODE_CVASGN:
2013 return RNODE_CVASGN(node)->nd_vid;
2014 default:
2015 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
2016 return 0;
2017 }
2018}
2019
2020static NODE *
2021get_nd_args(struct parser_params *p, NODE *node)
2022{
2023 switch (nd_type(node)) {
2024 case NODE_CALL:
2025 return RNODE_CALL(node)->nd_args;
2026 case NODE_OPCALL:
2027 return RNODE_OPCALL(node)->nd_args;
2028 case NODE_FCALL:
2029 return RNODE_FCALL(node)->nd_args;
2030 case NODE_QCALL:
2031 return RNODE_QCALL(node)->nd_args;
2032 case NODE_SUPER:
2033 return RNODE_SUPER(node)->nd_args;
2034 case NODE_VCALL:
2035 case NODE_ZSUPER:
2036 case NODE_YIELD:
2037 case NODE_RETURN:
2038 case NODE_BREAK:
2039 case NODE_NEXT:
2040 return 0;
2041 default:
2042 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2043 return 0;
2044 }
2045}
2046
2047static st_index_t
2048djb2(const uint8_t *str, size_t len)
2049{
2050 st_index_t hash = 5381;
2051
2052 for (size_t i = 0; i < len; i++) {
2053 hash = ((hash << 5) + hash) + str[i];
2054 }
2055
2056 return hash;
2057}
2058
2059static st_index_t
2060parser_memhash(const void *ptr, rb_len_t len)
2061{
2062 return djb2(ptr, len);
2063}
2064
2065#define PARSER_STRING_PTR(str) (str->ptr)
2066#define PARSER_STRING_LEN(str) (str->len)
2067#define PARSER_STRING_END(str) (&str->ptr[str->len])
2068#define STRING_SIZE(str) ((size_t)str->len + 1)
2069#define STRING_TERM_LEN(str) (1)
2070#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2071#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2072 REALLOC_N(str->ptr, char, (size_t)total + termlen); \
2073 str->len = total; \
2074} while (0)
2075#define STRING_SET_LEN(str, n) do { \
2076 (str)->len = (n); \
2077} while (0)
2078#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2079 ((ptrvar) = str->ptr, \
2080 (lenvar) = str->len)
2081
2082static inline int
2083parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2084{
2085 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2086}
2087
2088static rb_parser_string_t *
2089rb_parser_string_new(rb_parser_t *p, const char *ptr, rb_len_t len)
2090{
2091 rb_parser_string_t *str;
2092
2093 if (len < 0) {
2094 rb_bug("negative string size (or size too big): %"PRIdLEN, len);
2095 }
2096
2097 str = xcalloc(1, sizeof(rb_parser_string_t));
2098 str->ptr = xcalloc(len + 1, sizeof(char));
2099
2100 if (ptr) {
2101 memcpy(PARSER_STRING_PTR(str), ptr, len);
2102 }
2103 STRING_SET_LEN(str, len);
2104 STRING_TERM_FILL(str);
2105 return str;
2106}
2107
2108static rb_parser_string_t *
2109rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, rb_len_t len, rb_encoding *enc)
2110{
2111 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2112 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2113 str->enc = enc;
2114 return str;
2115}
2116
2117#ifndef RIPPER
2118rb_parser_string_t *
2119rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2120{
2121 /* Type check */
2122 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2123 RB_GC_GUARD(str);
2124 return ret;
2125}
2126
2127void
2128rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2129{
2130 if (!str) return;
2131 xfree(PARSER_STRING_PTR(str));
2132 xfree(str);
2133}
2134#endif
2135
2136static st_index_t
2137rb_parser_str_hash(rb_parser_string_t *str)
2138{
2139 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2140}
2141
2142static st_index_t
2143rb_char_p_hash(const char *c)
2144{
2145 return parser_memhash((const void *)c, strlen(c));
2146}
2147
2148static size_t
2149rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2150{
2151 return PARSER_STRING_LEN(str);
2152}
2153
2154#ifndef RIPPER
2155static char *
2156rb_parser_string_end(rb_parser_string_t *str)
2157{
2158 return &str->ptr[str->len];
2159}
2160#endif
2161
2162static void
2163rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2164{
2165 str->enc = enc;
2166}
2167
2168static rb_encoding *
2169rb_parser_str_get_encoding(rb_parser_string_t *str)
2170{
2171 return str->enc;
2172}
2173
2174#ifndef RIPPER
2175static bool
2176PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2177{
2178 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2179}
2180#endif
2181
2182static int
2183PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2184{
2185 return str->coderange;
2186}
2187
2188static void
2189PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2190{
2191 str->coderange = coderange;
2192}
2193
2194static void
2195PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2196{
2197 rb_parser_string_set_encoding(str, enc);
2198 PARSER_ENC_CODERANGE_SET(str, cr);
2199}
2200
2201static void
2202PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2203{
2204 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2205}
2206
2207static bool
2208PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2209{
2210 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2211}
2212
2213static bool
2214PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2215{
2216 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2217}
2218
2219static const char *
2220rb_parser_search_nonascii(const char *p, const char *e)
2221{
2222 const char *s = p;
2223
2224 for (; s < e; s++) {
2225 if (*s & 0x80) return s;
2226 }
2227
2228 return NULL;
2229}
2230
2231static int
2232rb_parser_coderange_scan(struct parser_params *p, const char *ptr, rb_len_t len, rb_encoding *enc)
2233{
2234 const char *e = ptr + len;
2235
2236 if (enc == rb_ascii8bit_encoding()) {
2237 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2238 ptr = rb_parser_search_nonascii(ptr, e);
2239 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2240 }
2241
2242 /* parser string encoding is always asciicompat */
2243 ptr = rb_parser_search_nonascii(ptr, e);
2244 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2245 for (;;) {
2246 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2247 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2248 ptr += MBCLEN_CHARFOUND_LEN(ret);
2249 if (ptr == e) break;
2250 ptr = rb_parser_search_nonascii(ptr, e);
2251 if (!ptr) break;
2252 }
2253
2254 return RB_PARSER_ENC_CODERANGE_VALID;
2255}
2256
2257static int
2258rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2259{
2260 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2261}
2262
2263static int
2264rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2265{
2266 int cr = PARSER_ENC_CODERANGE(str);
2267
2268 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2269 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2270 PARSER_ENC_CODERANGE_SET(str, cr);
2271 }
2272
2273 return cr;
2274}
2275
2276static rb_parser_string_t *
2277rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2278{
2279 if (rb_parser_str_get_encoding(str) == enc)
2280 return str;
2281 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2282 PARSER_ENC_CODERANGE_CLEAR(str);
2283 }
2284 rb_parser_string_set_encoding(str, enc);
2285 return str;
2286}
2287
2288static bool
2289rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2290{
2291 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2292}
2293
2294static rb_encoding *
2295rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2296{
2297 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2298 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2299
2300 if (enc1 == NULL || enc2 == NULL)
2301 return 0;
2302
2303 if (enc1 == enc2) {
2304 return enc1;
2305 }
2306
2307 if (PARSER_STRING_LEN(str2) == 0)
2308 return enc1;
2309 if (PARSER_STRING_LEN(str1) == 0)
2310 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2311
2312 int cr1, cr2;
2313
2314 cr1 = rb_parser_enc_str_coderange(p, str1);
2315 cr2 = rb_parser_enc_str_coderange(p, str2);
2316
2317 if (cr1 != cr2) {
2318 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2319 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2320 }
2321
2322 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2323 return enc1;
2324 }
2325
2326 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2327 return enc2;
2328 }
2329
2330 return 0;
2331}
2332
2333static void
2334rb_parser_str_modify(rb_parser_string_t *str)
2335{
2336 PARSER_ENC_CODERANGE_CLEAR(str);
2337}
2338
2339static void
2340rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, rb_len_t len)
2341{
2342 rb_len_t capa;
2343 const int termlen = STRING_TERM_LEN(str);
2344
2345 if (len > (capa = (rb_len_t)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2346 rb_bug("probable buffer overflow: %"PRIdLEN" for %"PRIdLEN, len, capa);
2347 }
2348
2349 int cr = PARSER_ENC_CODERANGE(str);
2350 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2351 /* Leave unknown. */
2352 }
2353 else if (len > PARSER_STRING_LEN(str)) {
2354 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2355 }
2356 else if (len < PARSER_STRING_LEN(str)) {
2357 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2358 /* ASCII-only string is keeping after truncated. Valid
2359 * and broken may be invalid or valid, leave unknown. */
2360 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2361 }
2362 }
2363
2364 STRING_SET_LEN(str, len);
2365 STRING_TERM_FILL(str);
2366}
2367
2368static rb_parser_string_t *
2369rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, rb_len_t len)
2370{
2371 rb_parser_str_modify(str);
2372 if (len == 0) return 0;
2373
2374 rb_len_t total, olen, off = -1;
2375 char *sptr;
2376 const int termlen = STRING_TERM_LEN(str);
2377
2378 PARSER_STRING_GETMEM(str, sptr, olen);
2379 if (ptr >= sptr && ptr <= sptr + olen) {
2380 off = ptr - sptr;
2381 }
2382
2383 if (olen > RB_LEN_MAX - len) {
2384 compile_error(p, "string sizes too big");
2385 return 0;
2386 }
2387 total = olen + len;
2388 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2389 sptr = PARSER_STRING_PTR(str);
2390 if (off != -1) {
2391 ptr = sptr + off;
2392 }
2393 memcpy(sptr + olen, ptr, len);
2394 STRING_SET_LEN(str, total);
2395 STRING_TERM_FILL(str);
2396
2397 return str;
2398}
2399
2400#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2401#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2402
2403static rb_parser_string_t *
2404rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, rb_len_t len,
2405 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2406{
2407 int str_cr, res_cr;
2408 rb_encoding *str_enc, *res_enc;
2409
2410 str_enc = rb_parser_str_get_encoding(str);
2411 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2412
2413 if (str_enc == ptr_enc) {
2414 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2415 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2416 }
2417 }
2418 else {
2419 /* parser string encoding is always asciicompat */
2420 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2421 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2422 }
2423 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2424 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2425 str_cr = rb_parser_enc_str_coderange(p, str);
2426 }
2427 }
2428 }
2429 if (ptr_cr_ret)
2430 *ptr_cr_ret = ptr_cr;
2431
2432 if (str_enc != ptr_enc &&
2433 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2434 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2435 goto incompatible;
2436 }
2437
2438 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2439 res_enc = str_enc;
2440 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2441 }
2442 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2443 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2444 res_enc = str_enc;
2445 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2446 }
2447 else {
2448 res_enc = ptr_enc;
2449 res_cr = ptr_cr;
2450 }
2451 }
2452 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2453 res_enc = str_enc;
2454 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2455 res_cr = str_cr;
2456 else
2457 res_cr = ptr_cr;
2458 }
2459 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2460 res_enc = str_enc;
2461 res_cr = str_cr;
2462 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2463 }
2464
2465 if (len < 0) {
2466 compile_error(p, "negative string size (or size too big)");
2467 }
2468 parser_str_cat(str, ptr, len);
2469 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2470 return str;
2471
2472 incompatible:
2473 compile_error(p, "incompatible character encodings: %s and %s",
2474 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2475 UNREACHABLE_RETURN(0);
2476
2477}
2478
2479static rb_parser_string_t *
2480rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, rb_len_t len,
2481 rb_encoding *ptr_enc)
2482{
2483 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2484}
2485
2486static rb_parser_string_t *
2487rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2488{
2489 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2490
2491 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2492 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2493
2494 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2495
2496 return str;
2497}
2498
2499static rb_parser_string_t *
2500rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, rb_len_t len)
2501{
2502 if (len < 0) {
2503 rb_bug("negative string size (or size too big)");
2504 }
2505
2506 rb_len_t slen = PARSER_STRING_LEN(str);
2507
2508 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2509 PARSER_ENC_CODERANGE_CLEAR(str);
2510 }
2511
2512 {
2513 rb_len_t capa;
2514 const int termlen = STRING_TERM_LEN(str);
2515
2516 if ((capa = slen) < len) {
2517 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2518 }
2519 else if (len == slen) return str;
2520 STRING_SET_LEN(str, len);
2521 STRING_TERM_FILL(str);
2522 }
2523 return str;
2524}
2525
2526# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2527 ((ptrvar) = str->ptr, \
2528 (lenvar) = str->len, \
2529 (encvar) = str->enc)
2530
2531static int
2532rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2533{
2534 rb_len_t len1, len2;
2535 const char *ptr1, *ptr2;
2536 rb_encoding *enc1, *enc2;
2537
2538 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2539 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2540
2541 return (len1 != len2 ||
2542 enc1 != enc2 ||
2543 memcmp(ptr1, ptr2, len1) != 0);
2544}
2545
2546static void
2547rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2548{
2549 long i;
2550 if (ary->capa < len) {
2551 ary->capa = len;
2552 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2553 for (i = ary->len; i < len; i++) {
2554 ary->data[i] = 0;
2555 }
2556 }
2557}
2558
2559/*
2560 * Do not call this directly.
2561 * Use rb_parser_ary_new_capa_for_XXX() instead.
2562 */
2563static rb_parser_ary_t *
2564parser_ary_new_capa(rb_parser_t *p, long len)
2565{
2566 if (len < 0) {
2567 rb_bug("negative array size (or size too big): %ld", len);
2568 }
2569 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2570 ary->data_type = 0;
2571 ary->len = 0;
2572 ary->capa = len;
2573 if (0 < len) {
2574 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2575 }
2576 else {
2577 ary->data = NULL;
2578 }
2579 return ary;
2580}
2581
2582#ifndef RIPPER
2583static rb_parser_ary_t *
2584rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2585{
2586 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2587 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2588 return ary;
2589}
2590
2591static rb_parser_ary_t *
2592rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2593{
2594 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2595 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2596 return ary;
2597}
2598#endif
2599
2600static rb_parser_ary_t *
2601rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2602{
2603 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2604 ary->data_type = PARSER_ARY_DATA_NODE;
2605 return ary;
2606}
2607
2608/*
2609 * Do not call this directly.
2610 * Use rb_parser_ary_push_XXX() instead.
2611 */
2612static rb_parser_ary_t *
2613parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2614{
2615 if (ary->len == ary->capa) {
2616 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2617 }
2618 ary->data[ary->len++] = val;
2619 return ary;
2620}
2621
2622#ifndef RIPPER
2623static rb_parser_ary_t *
2624rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2625{
2626 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2627 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2628 }
2629 return parser_ary_push(p, ary, val);
2630}
2631
2632static rb_parser_ary_t *
2633rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2634{
2635 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2636 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2637 }
2638 return parser_ary_push(p, ary, val);
2639}
2640#endif
2641
2642static rb_parser_ary_t *
2643rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2644{
2645 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2646 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2647 }
2648 return parser_ary_push(p, ary, val);
2649}
2650
2651#ifndef RIPPER
2652static void
2653rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2654{
2655 if (!token) return;
2656 rb_parser_string_free(p, token->str);
2657 xfree(token);
2658}
2659
2660static void
2661rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2662{
2663# define foreach_ary(ptr) \
2664 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2665 ptr < end_ary_data; ptr++)
2666 switch (ary->data_type) {
2667 case PARSER_ARY_DATA_AST_TOKEN:
2668 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2669 break;
2670 case PARSER_ARY_DATA_SCRIPT_LINE:
2671 foreach_ary(data) {rb_parser_string_free(p, *data);}
2672 break;
2673 case PARSER_ARY_DATA_NODE:
2674 /* Do nothing because nodes are freed when rb_ast_t is freed */
2675 break;
2676 default:
2677 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2678 break;
2679 }
2680# undef foreach_ary
2681 xfree(ary->data);
2682 xfree(ary);
2683}
2684
2685#endif /* !RIPPER */
2686
2687#line 2688 "parse.c"
2688
2689# ifndef YY_CAST
2690# ifdef __cplusplus
2691# define YY_CAST(Type, Val) static_cast<Type> (Val)
2692# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2693# else
2694# define YY_CAST(Type, Val) ((Type) (Val))
2695# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2696# endif
2697# endif
2698# ifndef YY_NULLPTR
2699# if defined __cplusplus
2700# if 201103L <= __cplusplus
2701# define YY_NULLPTR nullptr
2702# else
2703# define YY_NULLPTR 0
2704# endif
2705# else
2706# define YY_NULLPTR ((void*)0)
2707# endif
2708# endif
2709
2710#include "parse.h"
2711/* Symbol kind. */
2712enum yysymbol_kind_t
2713{
2714 YYSYMBOL_YYEMPTY = -2,
2715 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2716 YYSYMBOL_YYerror = 1, /* error */
2717 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2718 YYSYMBOL_keyword_class = 3, /* "'class'" */
2719 YYSYMBOL_keyword_module = 4, /* "'module'" */
2720 YYSYMBOL_keyword_def = 5, /* "'def'" */
2721 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2722 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2723 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2724 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2725 YYSYMBOL_keyword_end = 10, /* "'end'" */
2726 YYSYMBOL_keyword_if = 11, /* "'if'" */
2727 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2728 YYSYMBOL_keyword_then = 13, /* "'then'" */
2729 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2730 YYSYMBOL_keyword_else = 15, /* "'else'" */
2731 YYSYMBOL_keyword_case = 16, /* "'case'" */
2732 YYSYMBOL_keyword_when = 17, /* "'when'" */
2733 YYSYMBOL_keyword_while = 18, /* "'while'" */
2734 YYSYMBOL_keyword_until = 19, /* "'until'" */
2735 YYSYMBOL_keyword_for = 20, /* "'for'" */
2736 YYSYMBOL_keyword_break = 21, /* "'break'" */
2737 YYSYMBOL_keyword_next = 22, /* "'next'" */
2738 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2739 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2740 YYSYMBOL_keyword_in = 25, /* "'in'" */
2741 YYSYMBOL_keyword_do = 26, /* "'do'" */
2742 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2743 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2744 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2745 YYSYMBOL_keyword_return = 30, /* "'return'" */
2746 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2747 YYSYMBOL_keyword_super = 32, /* "'super'" */
2748 YYSYMBOL_keyword_self = 33, /* "'self'" */
2749 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2750 YYSYMBOL_keyword_true = 35, /* "'true'" */
2751 YYSYMBOL_keyword_false = 36, /* "'false'" */
2752 YYSYMBOL_keyword_and = 37, /* "'and'" */
2753 YYSYMBOL_keyword_or = 38, /* "'or'" */
2754 YYSYMBOL_keyword_not = 39, /* "'not'" */
2755 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2756 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2757 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2758 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2759 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2760 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2761 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2762 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2763 YYSYMBOL_keyword_END = 48, /* "'END'" */
2764 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2765 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2766 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2767 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2768 YYSYMBOL_tFID = 53, /* "method" */
2769 YYSYMBOL_tGVAR = 54, /* "global variable" */
2770 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2771 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2772 YYSYMBOL_tCVAR = 57, /* "class variable" */
2773 YYSYMBOL_tLABEL = 58, /* "label" */
2774 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2775 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2776 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2777 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2778 YYSYMBOL_tCHAR = 63, /* "char literal" */
2779 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2780 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2781 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2782 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2783 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2784 YYSYMBOL_69_ = 69, /* '.' */
2785 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2786 YYSYMBOL_tSP = 71, /* "escaped space" */
2787 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2788 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2789 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2790 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2791 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2792 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2793 YYSYMBOL_tPOW = 78, /* "**" */
2794 YYSYMBOL_tCMP = 79, /* "<=>" */
2795 YYSYMBOL_tEQ = 80, /* "==" */
2796 YYSYMBOL_tEQQ = 81, /* "===" */
2797 YYSYMBOL_tNEQ = 82, /* "!=" */
2798 YYSYMBOL_tGEQ = 83, /* ">=" */
2799 YYSYMBOL_tLEQ = 84, /* "<=" */
2800 YYSYMBOL_tANDOP = 85, /* "&&" */
2801 YYSYMBOL_tOROP = 86, /* "||" */
2802 YYSYMBOL_tMATCH = 87, /* "=~" */
2803 YYSYMBOL_tNMATCH = 88, /* "!~" */
2804 YYSYMBOL_tDOT2 = 89, /* ".." */
2805 YYSYMBOL_tDOT3 = 90, /* "..." */
2806 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2807 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2808 YYSYMBOL_tAREF = 93, /* "[]" */
2809 YYSYMBOL_tASET = 94, /* "[]=" */
2810 YYSYMBOL_tLSHFT = 95, /* "<<" */
2811 YYSYMBOL_tRSHFT = 96, /* ">>" */
2812 YYSYMBOL_tANDDOT = 97, /* "&." */
2813 YYSYMBOL_tCOLON2 = 98, /* "::" */
2814 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2815 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2816 YYSYMBOL_tASSOC = 101, /* "=>" */
2817 YYSYMBOL_tLPAREN = 102, /* "(" */
2818 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2819 YYSYMBOL_tLBRACK = 104, /* "[" */
2820 YYSYMBOL_tLBRACE = 105, /* "{" */
2821 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2822 YYSYMBOL_tSTAR = 107, /* "*" */
2823 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2824 YYSYMBOL_tAMPER = 109, /* "&" */
2825 YYSYMBOL_tLAMBDA = 110, /* "->" */
2826 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2827 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2828 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2829 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2830 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2831 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2832 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2833 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2834 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2835 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2836 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2837 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2838 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2839 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2840 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2841 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2842 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2843 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2844 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2845 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2846 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2847 YYSYMBOL_k__END__ = 132, /* k__END__ */
2848 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2849 YYSYMBOL_134_ = 134, /* '=' */
2850 YYSYMBOL_135_ = 135, /* '?' */
2851 YYSYMBOL_136_ = 136, /* ':' */
2852 YYSYMBOL_137_ = 137, /* '>' */
2853 YYSYMBOL_138_ = 138, /* '<' */
2854 YYSYMBOL_139_ = 139, /* '|' */
2855 YYSYMBOL_140_ = 140, /* '^' */
2856 YYSYMBOL_141_ = 141, /* '&' */
2857 YYSYMBOL_142_ = 142, /* '+' */
2858 YYSYMBOL_143_ = 143, /* '-' */
2859 YYSYMBOL_144_ = 144, /* '*' */
2860 YYSYMBOL_145_ = 145, /* '/' */
2861 YYSYMBOL_146_ = 146, /* '%' */
2862 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2863 YYSYMBOL_148_ = 148, /* '!' */
2864 YYSYMBOL_149_ = 149, /* '~' */
2865 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2866 YYSYMBOL_151_ = 151, /* '{' */
2867 YYSYMBOL_152_ = 152, /* '}' */
2868 YYSYMBOL_153_ = 153, /* '[' */
2869 YYSYMBOL_154_n_ = 154, /* '\n' */
2870 YYSYMBOL_155_ = 155, /* ',' */
2871 YYSYMBOL_156_ = 156, /* '`' */
2872 YYSYMBOL_157_ = 157, /* '(' */
2873 YYSYMBOL_158_ = 158, /* ')' */
2874 YYSYMBOL_159_ = 159, /* ']' */
2875 YYSYMBOL_160_ = 160, /* ';' */
2876 YYSYMBOL_161_ = 161, /* ' ' */
2877 YYSYMBOL_YYACCEPT = 162, /* $accept */
2878 YYSYMBOL_option_terms = 163, /* option_terms */
2879 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2880 YYSYMBOL_165_1 = 165, /* $@1 */
2881 YYSYMBOL_program = 166, /* program */
2882 YYSYMBOL_top_stmts = 167, /* top_stmts */
2883 YYSYMBOL_top_stmt = 168, /* top_stmt */
2884 YYSYMBOL_block_open = 169, /* block_open */
2885 YYSYMBOL_begin_block = 170, /* begin_block */
2886 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2887 YYSYMBOL_172_2 = 172, /* $@2 */
2888 YYSYMBOL_173_3 = 173, /* $@3 */
2889 YYSYMBOL_bodystmt = 174, /* bodystmt */
2890 YYSYMBOL_175_4 = 175, /* $@4 */
2891 YYSYMBOL_stmts = 176, /* stmts */
2892 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2893 YYSYMBOL_178_5 = 178, /* $@5 */
2894 YYSYMBOL_allow_exits = 179, /* allow_exits */
2895 YYSYMBOL_k_END = 180, /* k_END */
2896 YYSYMBOL_181_6 = 181, /* $@6 */
2897 YYSYMBOL_stmt = 182, /* stmt */
2898 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2899 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2900 YYSYMBOL_command_asgn = 185, /* command_asgn */
2901 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2902 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2903 YYSYMBOL_endless_command = 188, /* endless_command */
2904 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2905 YYSYMBOL_command_rhs = 190, /* command_rhs */
2906 YYSYMBOL_expr = 191, /* expr */
2907 YYSYMBOL_192_7 = 192, /* $@7 */
2908 YYSYMBOL_193_8 = 193, /* $@8 */
2909 YYSYMBOL_def_name = 194, /* def_name */
2910 YYSYMBOL_defn_head = 195, /* defn_head */
2911 YYSYMBOL_196_9 = 196, /* $@9 */
2912 YYSYMBOL_defs_head = 197, /* defs_head */
2913 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2914 YYSYMBOL_expr_value = 199, /* expr_value */
2915 YYSYMBOL_200_10 = 200, /* $@10 */
2916 YYSYMBOL_201_11 = 201, /* $@11 */
2917 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2918 YYSYMBOL_command_call = 203, /* command_call */
2919 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2920 YYSYMBOL_command_call_value = 205, /* command_call_value */
2921 YYSYMBOL_block_command = 206, /* block_command */
2922 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2923 YYSYMBOL_fcall = 208, /* fcall */
2924 YYSYMBOL_command = 209, /* command */
2925 YYSYMBOL_mlhs = 210, /* mlhs */
2926 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2927 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2928 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2929 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2930 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2931 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2932 YYSYMBOL_lhs = 217, /* lhs */
2933 YYSYMBOL_cname = 218, /* cname */
2934 YYSYMBOL_cpath = 219, /* cpath */
2935 YYSYMBOL_fname = 220, /* fname */
2936 YYSYMBOL_fitem = 221, /* fitem */
2937 YYSYMBOL_undef_list = 222, /* undef_list */
2938 YYSYMBOL_223_12 = 223, /* $@12 */
2939 YYSYMBOL_op = 224, /* op */
2940 YYSYMBOL_reswords = 225, /* reswords */
2941 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2942 YYSYMBOL_arg = 227, /* arg */
2943 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2944 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2945 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2946 YYSYMBOL_ternary = 231, /* ternary */
2947 YYSYMBOL_endless_arg = 232, /* endless_arg */
2948 YYSYMBOL_relop = 233, /* relop */
2949 YYSYMBOL_rel_expr = 234, /* rel_expr */
2950 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2951 YYSYMBOL_begin_defined = 236, /* begin_defined */
2952 YYSYMBOL_after_rescue = 237, /* after_rescue */
2953 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2954 YYSYMBOL_arg_value = 239, /* arg_value */
2955 YYSYMBOL_aref_args = 240, /* aref_args */
2956 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2957 YYSYMBOL_paren_args = 242, /* paren_args */
2958 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2959 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2960 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2961 YYSYMBOL_call_args = 246, /* call_args */
2962 YYSYMBOL_247_13 = 247, /* $@13 */
2963 YYSYMBOL_command_args = 248, /* command_args */
2964 YYSYMBOL_block_arg = 249, /* block_arg */
2965 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2966 YYSYMBOL_args = 251, /* args */
2967 YYSYMBOL_arg_splat = 252, /* arg_splat */
2968 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2969 YYSYMBOL_mrhs = 254, /* mrhs */
2970 YYSYMBOL_primary = 255, /* primary */
2971 YYSYMBOL_256_14 = 256, /* $@14 */
2972 YYSYMBOL_257_15 = 257, /* $@15 */
2973 YYSYMBOL_258_16 = 258, /* @16 */
2974 YYSYMBOL_259_17 = 259, /* @17 */
2975 YYSYMBOL_260_18 = 260, /* $@18 */
2976 YYSYMBOL_261_19 = 261, /* $@19 */
2977 YYSYMBOL_262_20 = 262, /* $@20 */
2978 YYSYMBOL_263_21 = 263, /* $@21 */
2979 YYSYMBOL_264_22 = 264, /* $@22 */
2980 YYSYMBOL_265_23 = 265, /* $@23 */
2981 YYSYMBOL_266_24 = 266, /* $@24 */
2982 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2983 YYSYMBOL_primary_value = 268, /* primary_value */
2984 YYSYMBOL_k_begin = 269, /* k_begin */
2985 YYSYMBOL_k_if = 270, /* k_if */
2986 YYSYMBOL_k_unless = 271, /* k_unless */
2987 YYSYMBOL_k_while = 272, /* k_while */
2988 YYSYMBOL_k_until = 273, /* k_until */
2989 YYSYMBOL_k_case = 274, /* k_case */
2990 YYSYMBOL_k_for = 275, /* k_for */
2991 YYSYMBOL_k_class = 276, /* k_class */
2992 YYSYMBOL_k_module = 277, /* k_module */
2993 YYSYMBOL_k_def = 278, /* k_def */
2994 YYSYMBOL_k_do = 279, /* k_do */
2995 YYSYMBOL_k_do_block = 280, /* k_do_block */
2996 YYSYMBOL_k_rescue = 281, /* k_rescue */
2997 YYSYMBOL_k_ensure = 282, /* k_ensure */
2998 YYSYMBOL_k_when = 283, /* k_when */
2999 YYSYMBOL_k_else = 284, /* k_else */
3000 YYSYMBOL_k_elsif = 285, /* k_elsif */
3001 YYSYMBOL_k_end = 286, /* k_end */
3002 YYSYMBOL_k_return = 287, /* k_return */
3003 YYSYMBOL_k_return_arg = 288, /* k_return_arg */
3004 YYSYMBOL_k_break_arg = 289, /* k_break_arg */
3005 YYSYMBOL_k_next_arg = 290, /* k_next_arg */
3006 YYSYMBOL_k_yield = 291, /* k_yield */
3007 YYSYMBOL_then = 292, /* then */
3008 YYSYMBOL_do = 293, /* do */
3009 YYSYMBOL_if_tail = 294, /* if_tail */
3010 YYSYMBOL_opt_else = 295, /* opt_else */
3011 YYSYMBOL_for_var = 296, /* for_var */
3012 YYSYMBOL_f_marg = 297, /* f_marg */
3013 YYSYMBOL_mlhs_items_f_marg = 298, /* mlhs_items_f_marg */
3014 YYSYMBOL_f_margs = 299, /* f_margs */
3015 YYSYMBOL_f_rest_marg = 300, /* f_rest_marg */
3016 YYSYMBOL_f_any_kwrest = 301, /* f_any_kwrest */
3017 YYSYMBOL_302_25 = 302, /* $@25 */
3018 YYSYMBOL_f_eq = 303, /* f_eq */
3019 YYSYMBOL_f_kw_primary_value = 304, /* f_kw_primary_value */
3020 YYSYMBOL_f_kwarg_primary_value = 305, /* f_kwarg_primary_value */
3021 YYSYMBOL_opt_f_block_arg_none = 306, /* opt_f_block_arg_none */
3022 YYSYMBOL_args_tail_basic_primary_value_none = 307, /* args_tail_basic_primary_value_none */
3023 YYSYMBOL_block_args_tail = 308, /* block_args_tail */
3024 YYSYMBOL_excessed_comma = 309, /* excessed_comma */
3025 YYSYMBOL_f_opt_primary_value = 310, /* f_opt_primary_value */
3026 YYSYMBOL_f_opt_arg_primary_value = 311, /* f_opt_arg_primary_value */
3027 YYSYMBOL_opt_args_tail_block_args_tail_none = 312, /* opt_args_tail_block_args_tail_none */
3028 YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none = 313, /* args-list_primary_value_opt_args_tail_block_args_tail_none */
3029 YYSYMBOL_block_param = 314, /* block_param */
3030 YYSYMBOL_tail_only_args_block_args_tail = 315, /* tail-only-args_block_args_tail */
3031 YYSYMBOL_opt_block_param_def = 316, /* opt_block_param_def */
3032 YYSYMBOL_block_param_def = 317, /* block_param_def */
3033 YYSYMBOL_opt_block_param = 318, /* opt_block_param */
3034 YYSYMBOL_opt_bv_decl = 319, /* opt_bv_decl */
3035 YYSYMBOL_bv_decls = 320, /* bv_decls */
3036 YYSYMBOL_bvar = 321, /* bvar */
3037 YYSYMBOL_max_numparam = 322, /* max_numparam */
3038 YYSYMBOL_numparam = 323, /* numparam */
3039 YYSYMBOL_it_id = 324, /* it_id */
3040 YYSYMBOL_325_26 = 325, /* @26 */
3041 YYSYMBOL_326_27 = 326, /* $@27 */
3042 YYSYMBOL_lambda = 327, /* lambda */
3043 YYSYMBOL_f_larglist = 328, /* f_larglist */
3044 YYSYMBOL_lambda_body = 329, /* lambda_body */
3045 YYSYMBOL_330_28 = 330, /* $@28 */
3046 YYSYMBOL_do_block = 331, /* do_block */
3047 YYSYMBOL_block_call = 332, /* block_call */
3048 YYSYMBOL_method_call = 333, /* method_call */
3049 YYSYMBOL_brace_block = 334, /* brace_block */
3050 YYSYMBOL_335_29 = 335, /* @29 */
3051 YYSYMBOL_brace_body = 336, /* brace_body */
3052 YYSYMBOL_337_30 = 337, /* @30 */
3053 YYSYMBOL_do_body = 338, /* do_body */
3054 YYSYMBOL_case_args = 339, /* case_args */
3055 YYSYMBOL_case_body = 340, /* case_body */
3056 YYSYMBOL_cases = 341, /* cases */
3057 YYSYMBOL_p_pvtbl = 342, /* p_pvtbl */
3058 YYSYMBOL_p_pktbl = 343, /* p_pktbl */
3059 YYSYMBOL_p_in_kwarg = 344, /* p_in_kwarg */
3060 YYSYMBOL_345_31 = 345, /* $@31 */
3061 YYSYMBOL_p_case_body = 346, /* p_case_body */
3062 YYSYMBOL_p_cases = 347, /* p_cases */
3063 YYSYMBOL_p_top_expr = 348, /* p_top_expr */
3064 YYSYMBOL_p_top_expr_body = 349, /* p_top_expr_body */
3065 YYSYMBOL_p_expr = 350, /* p_expr */
3066 YYSYMBOL_p_as = 351, /* p_as */
3067 YYSYMBOL_352_32 = 352, /* $@32 */
3068 YYSYMBOL_p_alt = 353, /* p_alt */
3069 YYSYMBOL_p_lparen = 354, /* p_lparen */
3070 YYSYMBOL_p_lbracket = 355, /* p_lbracket */
3071 YYSYMBOL_p_expr_basic = 356, /* p_expr_basic */
3072 YYSYMBOL_357_33 = 357, /* $@33 */
3073 YYSYMBOL_p_args = 358, /* p_args */
3074 YYSYMBOL_p_args_head = 359, /* p_args_head */
3075 YYSYMBOL_p_args_tail = 360, /* p_args_tail */
3076 YYSYMBOL_p_find = 361, /* p_find */
3077 YYSYMBOL_p_rest = 362, /* p_rest */
3078 YYSYMBOL_p_args_post = 363, /* p_args_post */
3079 YYSYMBOL_p_arg = 364, /* p_arg */
3080 YYSYMBOL_p_kwargs = 365, /* p_kwargs */
3081 YYSYMBOL_p_kwarg = 366, /* p_kwarg */
3082 YYSYMBOL_p_kw = 367, /* p_kw */
3083 YYSYMBOL_p_kw_label = 368, /* p_kw_label */
3084 YYSYMBOL_p_kwrest = 369, /* p_kwrest */
3085 YYSYMBOL_p_kwnorest = 370, /* p_kwnorest */
3086 YYSYMBOL_p_any_kwrest = 371, /* p_any_kwrest */
3087 YYSYMBOL_p_value = 372, /* p_value */
3088 YYSYMBOL_range_expr_p_primitive = 373, /* range_expr_p_primitive */
3089 YYSYMBOL_p_primitive = 374, /* p_primitive */
3090 YYSYMBOL_p_variable = 375, /* p_variable */
3091 YYSYMBOL_p_var_ref = 376, /* p_var_ref */
3092 YYSYMBOL_p_expr_ref = 377, /* p_expr_ref */
3093 YYSYMBOL_p_const = 378, /* p_const */
3094 YYSYMBOL_opt_rescue = 379, /* opt_rescue */
3095 YYSYMBOL_exc_list = 380, /* exc_list */
3096 YYSYMBOL_exc_var = 381, /* exc_var */
3097 YYSYMBOL_opt_ensure = 382, /* opt_ensure */
3098 YYSYMBOL_literal = 383, /* literal */
3099 YYSYMBOL_strings = 384, /* strings */
3100 YYSYMBOL_string = 385, /* string */
3101 YYSYMBOL_string1 = 386, /* string1 */
3102 YYSYMBOL_xstring = 387, /* xstring */
3103 YYSYMBOL_regexp = 388, /* regexp */
3104 YYSYMBOL_nonempty_list__ = 389, /* nonempty_list_' ' */
3105 YYSYMBOL_words_tWORDS_BEG_word_list = 390, /* words_tWORDS_BEG_word_list */
3106 YYSYMBOL_words = 391, /* words */
3107 YYSYMBOL_word_list = 392, /* word_list */
3108 YYSYMBOL_word = 393, /* word */
3109 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 394, /* words_tSYMBOLS_BEG_symbol_list */
3110 YYSYMBOL_symbols = 395, /* symbols */
3111 YYSYMBOL_symbol_list = 396, /* symbol_list */
3112 YYSYMBOL_words_tQWORDS_BEG_qword_list = 397, /* words_tQWORDS_BEG_qword_list */
3113 YYSYMBOL_qwords = 398, /* qwords */
3114 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 399, /* words_tQSYMBOLS_BEG_qsym_list */
3115 YYSYMBOL_qsymbols = 400, /* qsymbols */
3116 YYSYMBOL_qword_list = 401, /* qword_list */
3117 YYSYMBOL_qsym_list = 402, /* qsym_list */
3118 YYSYMBOL_string_contents = 403, /* string_contents */
3119 YYSYMBOL_xstring_contents = 404, /* xstring_contents */
3120 YYSYMBOL_regexp_contents = 405, /* regexp_contents */
3121 YYSYMBOL_string_content = 406, /* string_content */
3122 YYSYMBOL_407_34 = 407, /* @34 */
3123 YYSYMBOL_408_35 = 408, /* @35 */
3124 YYSYMBOL_409_36 = 409, /* @36 */
3125 YYSYMBOL_410_37 = 410, /* @37 */
3126 YYSYMBOL_411_38 = 411, /* @38 */
3127 YYSYMBOL_string_dend = 412, /* string_dend */
3128 YYSYMBOL_string_dvar = 413, /* string_dvar */
3129 YYSYMBOL_symbol = 414, /* symbol */
3130 YYSYMBOL_ssym = 415, /* ssym */
3131 YYSYMBOL_sym = 416, /* sym */
3132 YYSYMBOL_dsym = 417, /* dsym */
3133 YYSYMBOL_numeric = 418, /* numeric */
3134 YYSYMBOL_simple_numeric = 419, /* simple_numeric */
3135 YYSYMBOL_nonlocal_var = 420, /* nonlocal_var */
3136 YYSYMBOL_user_variable = 421, /* user_variable */
3137 YYSYMBOL_keyword_variable = 422, /* keyword_variable */
3138 YYSYMBOL_var_ref = 423, /* var_ref */
3139 YYSYMBOL_var_lhs = 424, /* var_lhs */
3140 YYSYMBOL_backref = 425, /* backref */
3141 YYSYMBOL_426_39 = 426, /* $@39 */
3142 YYSYMBOL_superclass = 427, /* superclass */
3143 YYSYMBOL_f_opt_paren_args = 428, /* f_opt_paren_args */
3144 YYSYMBOL_f_empty_arg = 429, /* f_empty_arg */
3145 YYSYMBOL_f_paren_args = 430, /* f_paren_args */
3146 YYSYMBOL_f_arglist = 431, /* f_arglist */
3147 YYSYMBOL_432_40 = 432, /* @40 */
3148 YYSYMBOL_f_kw_arg_value = 433, /* f_kw_arg_value */
3149 YYSYMBOL_f_kwarg_arg_value = 434, /* f_kwarg_arg_value */
3150 YYSYMBOL_opt_f_block_arg_opt_comma = 435, /* opt_f_block_arg_opt_comma */
3151 YYSYMBOL_args_tail_basic_arg_value_opt_comma = 436, /* args_tail_basic_arg_value_opt_comma */
3152 YYSYMBOL_args_tail = 437, /* args_tail */
3153 YYSYMBOL_args_tail_basic_arg_value_none = 438, /* args_tail_basic_arg_value_none */
3154 YYSYMBOL_largs_tail = 439, /* largs_tail */
3155 YYSYMBOL_f_opt_arg_value = 440, /* f_opt_arg_value */
3156 YYSYMBOL_f_opt_arg_arg_value = 441, /* f_opt_arg_arg_value */
3157 YYSYMBOL_opt_args_tail_args_tail_opt_comma = 442, /* opt_args_tail_args_tail_opt_comma */
3158 YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma = 443, /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
3159 YYSYMBOL_f_args_list_args_tail_opt_comma = 444, /* f_args-list_args_tail_opt_comma */
3160 YYSYMBOL_tail_only_args_args_tail = 445, /* tail-only-args_args_tail */
3161 YYSYMBOL_f_args = 446, /* f_args */
3162 YYSYMBOL_opt_args_tail_largs_tail_none = 447, /* opt_args_tail_largs_tail_none */
3163 YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none = 448, /* args-list_arg_value_opt_args_tail_largs_tail_none */
3164 YYSYMBOL_f_args_list_largs_tail_none = 449, /* f_args-list_largs_tail_none */
3165 YYSYMBOL_tail_only_args_largs_tail = 450, /* tail-only-args_largs_tail */
3166 YYSYMBOL_f_largs = 451, /* f_largs */
3167 YYSYMBOL_args_forward = 452, /* args_forward */
3168 YYSYMBOL_f_bad_arg = 453, /* f_bad_arg */
3169 YYSYMBOL_f_norm_arg = 454, /* f_norm_arg */
3170 YYSYMBOL_f_arg_asgn = 455, /* f_arg_asgn */
3171 YYSYMBOL_f_arg_item = 456, /* f_arg_item */
3172 YYSYMBOL_f_arg = 457, /* f_arg */
3173 YYSYMBOL_f_label = 458, /* f_label */
3174 YYSYMBOL_kwrest_mark = 459, /* kwrest_mark */
3175 YYSYMBOL_f_no_kwarg = 460, /* f_no_kwarg */
3176 YYSYMBOL_f_kwrest = 461, /* f_kwrest */
3177 YYSYMBOL_restarg_mark = 462, /* restarg_mark */
3178 YYSYMBOL_f_rest_arg = 463, /* f_rest_arg */
3179 YYSYMBOL_blkarg_mark = 464, /* blkarg_mark */
3180 YYSYMBOL_f_block_arg = 465, /* f_block_arg */
3181 YYSYMBOL_option__ = 466, /* option_',' */
3182 YYSYMBOL_opt_comma = 467, /* opt_comma */
3183 YYSYMBOL_value_expr_singleton_expr = 468, /* value_expr_singleton_expr */
3184 YYSYMBOL_singleton = 469, /* singleton */
3185 YYSYMBOL_singleton_expr = 470, /* singleton_expr */
3186 YYSYMBOL_471_41 = 471, /* $@41 */
3187 YYSYMBOL_assoc_list = 472, /* assoc_list */
3188 YYSYMBOL_assocs = 473, /* assocs */
3189 YYSYMBOL_assoc = 474, /* assoc */
3190 YYSYMBOL_operation2 = 475, /* operation2 */
3191 YYSYMBOL_operation3 = 476, /* operation3 */
3192 YYSYMBOL_dot_or_colon = 477, /* dot_or_colon */
3193 YYSYMBOL_call_op = 478, /* call_op */
3194 YYSYMBOL_call_op2 = 479, /* call_op2 */
3195 YYSYMBOL_rparen = 480, /* rparen */
3196 YYSYMBOL_rbracket = 481, /* rbracket */
3197 YYSYMBOL_rbrace = 482, /* rbrace */
3198 YYSYMBOL_trailer = 483, /* trailer */
3199 YYSYMBOL_term = 484, /* term */
3200 YYSYMBOL_terms = 485, /* terms */
3201 YYSYMBOL_none = 486 /* none */
3202};
3203typedef enum yysymbol_kind_t yysymbol_kind_t;
3204
3205
3206
3207
3208#ifdef short
3209# undef short
3210#endif
3211
3212/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3213 <limits.h> and (if available) <stdint.h> are included
3214 so that the code can choose integer types of a good width. */
3215
3216#ifndef __PTRDIFF_MAX__
3217# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3218# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3219# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3220# define YY_STDINT_H
3221# endif
3222#endif
3223
3224/* Narrow types that promote to a signed type and that can represent a
3225 signed or unsigned integer of at least N bits. In tables they can
3226 save space and decrease cache pressure. Promoting to a signed type
3227 helps avoid bugs in integer arithmetic. */
3228
3229#ifdef __INT_LEAST8_MAX__
3230typedef __INT_LEAST8_TYPE__ yytype_int8;
3231#elif defined YY_STDINT_H
3232typedef int_least8_t yytype_int8;
3233#else
3234typedef signed char yytype_int8;
3235#endif
3236
3237#ifdef __INT_LEAST16_MAX__
3238typedef __INT_LEAST16_TYPE__ yytype_int16;
3239#elif defined YY_STDINT_H
3240typedef int_least16_t yytype_int16;
3241#else
3242typedef short yytype_int16;
3243#endif
3244
3245/* Work around bug in HP-UX 11.23, which defines these macros
3246 incorrectly for preprocessor constants. This workaround can likely
3247 be removed in 2023, as HPE has promised support for HP-UX 11.23
3248 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3249 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3250#ifdef __hpux
3251# undef UINT_LEAST8_MAX
3252# undef UINT_LEAST16_MAX
3253# define UINT_LEAST8_MAX 255
3254# define UINT_LEAST16_MAX 65535
3255#endif
3256
3257#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3258typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3259#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3260 && UINT_LEAST8_MAX <= INT_MAX)
3261typedef uint_least8_t yytype_uint8;
3262#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3263typedef unsigned char yytype_uint8;
3264#else
3265typedef short yytype_uint8;
3266#endif
3267
3268#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3269typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3270#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3271 && UINT_LEAST16_MAX <= INT_MAX)
3272typedef uint_least16_t yytype_uint16;
3273#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3274typedef unsigned short yytype_uint16;
3275#else
3276typedef int yytype_uint16;
3277#endif
3278
3279#ifndef YYPTRDIFF_T
3280# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3281# define YYPTRDIFF_T __PTRDIFF_TYPE__
3282# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3283# elif defined PTRDIFF_MAX
3284# ifndef ptrdiff_t
3285# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3286# endif
3287# define YYPTRDIFF_T ptrdiff_t
3288# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3289# else
3290# define YYPTRDIFF_T long
3291# define YYPTRDIFF_MAXIMUM LONG_MAX
3292# endif
3293#endif
3294
3295#ifndef YYSIZE_T
3296# ifdef __SIZE_TYPE__
3297# define YYSIZE_T __SIZE_TYPE__
3298# elif defined size_t
3299# define YYSIZE_T size_t
3300# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3301# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3302# define YYSIZE_T size_t
3303# else
3304# define YYSIZE_T unsigned
3305# endif
3306#endif
3307
3308#define YYSIZE_MAXIMUM \
3309 YY_CAST (YYPTRDIFF_T, \
3310 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3311 ? YYPTRDIFF_MAXIMUM \
3312 : YY_CAST (YYSIZE_T, -1)))
3313
3314#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3315
3316
3317/* Stored state numbers (used for stacks). */
3318typedef yytype_int16 yy_state_t;
3319
3320/* State numbers in computations. */
3321typedef int yy_state_fast_t;
3322
3323#ifndef YY_
3324# if defined YYENABLE_NLS && YYENABLE_NLS
3325# if ENABLE_NLS
3326# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3327# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3328# endif
3329# endif
3330# ifndef YY_
3331# define YY_(Msgid) Msgid
3332# endif
3333#endif
3334
3335
3336#ifndef YY_ATTRIBUTE_PURE
3337# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3338# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3339# else
3340# define YY_ATTRIBUTE_PURE
3341# endif
3342#endif
3343
3344#ifndef YY_ATTRIBUTE_UNUSED
3345# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3346# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3347# else
3348# define YY_ATTRIBUTE_UNUSED
3349# endif
3350#endif
3351
3352/* Suppress unused-variable warnings by "using" E. */
3353#if ! defined lint || defined __GNUC__
3354# define YY_USE(E) ((void) (E))
3355#else
3356# define YY_USE(E) /* empty */
3357#endif
3358
3359/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3360#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3361# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3362# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3363 _Pragma ("GCC diagnostic push") \
3364 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3365# else
3366# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3367 _Pragma ("GCC diagnostic push") \
3368 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3369 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3370# endif
3371# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3372 _Pragma ("GCC diagnostic pop")
3373#else
3374# define YY_INITIAL_VALUE(Value) Value
3375#endif
3376#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3377# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3378# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3379#endif
3380#ifndef YY_INITIAL_VALUE
3381# define YY_INITIAL_VALUE(Value) /* Nothing. */
3382#endif
3383
3384#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3385# define YY_IGNORE_USELESS_CAST_BEGIN \
3386 _Pragma ("GCC diagnostic push") \
3387 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3388# define YY_IGNORE_USELESS_CAST_END \
3389 _Pragma ("GCC diagnostic pop")
3390#endif
3391#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3392# define YY_IGNORE_USELESS_CAST_BEGIN
3393# define YY_IGNORE_USELESS_CAST_END
3394#endif
3395
3396
3397#define YY_ASSERT(E) ((void) (0 && (E)))
3398
3399#if 1
3400
3401/* The parser invokes alloca or malloc; define the necessary symbols. */
3402
3403# ifdef YYSTACK_USE_ALLOCA
3404# if YYSTACK_USE_ALLOCA
3405# ifdef __GNUC__
3406# define YYSTACK_ALLOC __builtin_alloca
3407# elif defined __BUILTIN_VA_ARG_INCR
3408# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3409# elif defined _AIX
3410# define YYSTACK_ALLOC __alloca
3411# elif defined _MSC_VER
3412# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3413# define alloca _alloca
3414# else
3415# define YYSTACK_ALLOC alloca
3416# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3417# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3418 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3419# ifndef EXIT_SUCCESS
3420# define EXIT_SUCCESS 0
3421# endif
3422# endif
3423# endif
3424# endif
3425# endif
3426
3427# ifdef YYSTACK_ALLOC
3428 /* Pacify GCC's 'empty if-body' warning. */
3429# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3430# ifndef YYSTACK_ALLOC_MAXIMUM
3431 /* The OS might guarantee only one guard page at the bottom of the stack,
3432 and a page size can be as small as 4096 bytes. So we cannot safely
3433 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3434 to allow for a few compiler-allocated temporary stack slots. */
3435# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3436# endif
3437# else
3438# define YYSTACK_ALLOC YYMALLOC
3439# define YYSTACK_FREE YYFREE
3440# ifndef YYSTACK_ALLOC_MAXIMUM
3441# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3442# endif
3443# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3444 && ! ((defined YYMALLOC || defined malloc) \
3445 && (defined YYFREE || defined free)))
3446# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3447# ifndef EXIT_SUCCESS
3448# define EXIT_SUCCESS 0
3449# endif
3450# endif
3451# ifndef YYMALLOC
3452# define YYMALLOC malloc
3453# if ! defined malloc && ! defined EXIT_SUCCESS
3454void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3455# endif
3456# endif
3457# ifndef YYFREE
3458# define YYFREE free
3459# if ! defined free && ! defined EXIT_SUCCESS
3460void free (void *); /* INFRINGES ON USER NAME SPACE */
3461# endif
3462# endif
3463# endif
3464#endif /* 1 */
3465
3466#if (! defined yyoverflow \
3467 && (! defined __cplusplus \
3468 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3469 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3470
3471/* A type that is properly aligned for any stack member. */
3472union yyalloc
3473{
3474 yy_state_t yyss_alloc;
3475 YYSTYPE yyvs_alloc;
3476 YYLTYPE yyls_alloc;
3477};
3478
3479/* The size of the maximum gap between one aligned stack and the next. */
3480# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3481
3482/* The size of an array large to enough to hold all stacks, each with
3483 N elements. */
3484# define YYSTACK_BYTES(N) \
3485 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3486 + YYSIZEOF (YYLTYPE)) \
3487 + 2 * YYSTACK_GAP_MAXIMUM)
3488
3489# define YYCOPY_NEEDED 1
3490
3491/* Relocate STACK from its old location to the new one. The
3492 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3493 elements in the stack, and YYPTR gives the new location of the
3494 stack. Advance YYPTR to a properly aligned location for the next
3495 stack. */
3496# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3497 do \
3498 { \
3499 YYPTRDIFF_T yynewbytes; \
3500 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3501 Stack = &yyptr->Stack_alloc; \
3502 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3503 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3504 } \
3505 while (0)
3506
3507#endif
3508
3509#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3510/* Copy COUNT objects from SRC to DST. The source and destination do
3511 not overlap. */
3512# ifndef YYCOPY
3513# if defined __GNUC__ && 1 < __GNUC__
3514# define YYCOPY(Dst, Src, Count) \
3515 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3516# else
3517# define YYCOPY(Dst, Src, Count) \
3518 do \
3519 { \
3520 YYPTRDIFF_T yyi; \
3521 for (yyi = 0; yyi < (Count); yyi++) \
3522 (Dst)[yyi] = (Src)[yyi]; \
3523 } \
3524 while (0)
3525# endif
3526# endif
3527#endif /* !YYCOPY_NEEDED */
3528
3529/* YYFINAL -- State number of the termination state. */
3530#define YYFINAL 146
3531/* YYLAST -- Last index in YYTABLE. */
3532#define YYLAST 17051
3533
3534/* YYNTOKENS -- Number of terminals. */
3535#define YYNTOKENS 162
3536/* YYNNTS -- Number of nonterminals. */
3537#define YYNNTS 325
3538/* YYNRULES -- Number of rules. */
3539#define YYNRULES 857
3540/* YYNSTATES -- Number of states. */
3541#define YYNSTATES 1445
3542
3543/* YYMAXUTOK -- Last valid token kind. */
3544#define YYMAXUTOK 361
3545
3546
3547/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3548 as returned by yylex, with out-of-bounds checking. */
3549#define YYTRANSLATE(YYX) \
3550 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3551 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3552 : YYSYMBOL_YYUNDEF)
3553
3554/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3555 as returned by yylex. */
3556static const yytype_uint8 yytranslate[] =
3557{
3558 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3559 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3561 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3562 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3563 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3564 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3567 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3570 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3571 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3572 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3573 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3574 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3575 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3581 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3583 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3584 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3585 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3586 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3587 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3588 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3589 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3590 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3591 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3592 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3593 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3594 147, 150
3595};
3596
3597#if YYDEBUG
3598/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3599static const yytype_int16 yyrline[] =
3600{
3601 0, 3192, 3186, 3192, 3192, 3192, 3192, 3212, 3217, 3222,
3602 3229, 3234, 3241, 3243, 3261, 3257, 3262, 3261, 3273, 3270,
3603 3283, 3288, 3293, 3300, 3302, 3301, 3311, 3313, 3323, 3323,
3604 3328, 3333, 3341, 3350, 3357, 3363, 3369, 3380, 3391, 3400,
3605 3412, 3413, 3418, 3418, 3419, 3430, 3435, 3436, 3443, 3443,
3606 3444, 3444, 3444, 3444, 3444, 3444, 3444, 3444, 3444, 3445,
3607 3445, 3445, 3448, 3449, 3455, 3455, 3455, 3462, 3463, 3470,
3608 3473, 3474, 3479, 3484, 3489, 3495, 3494, 3510, 3509, 3524,
3609 3527, 3538, 3548, 3547, 3561, 3561, 3562, 3568, 3568, 3568,
3610 3575, 3576, 3579, 3579, 3582, 3583, 3590, 3598, 3598, 3598,
3611 3605, 3612, 3621, 3626, 3631, 3636, 3641, 3647, 3653, 3659,
3612 3665, 3673, 3683, 3684, 3691, 3692, 3699, 3704, 3709, 3714,
3613 3714, 3714, 3719, 3724, 3729, 3734, 3739, 3744, 3751, 3752,
3614 3759, 3764, 3772, 3772, 3777, 3782, 3782, 3788, 3793, 3798,
3615 3803, 3811, 3811, 3816, 3821, 3821, 3826, 3831, 3836, 3841,
3616 3849, 3857, 3860, 3865, 3870, 3877, 3877, 3877, 3878, 3883,
3617 3886, 3891, 3894, 3899, 3899, 3907, 3908, 3909, 3910, 3911,
3618 3912, 3913, 3914, 3915, 3916, 3917, 3918, 3919, 3920, 3921,
3619 3922, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 3930, 3931,
3620 3932, 3933, 3934, 3935, 3936, 3939, 3939, 3939, 3940, 3940,
3621 3941, 3941, 3941, 3942, 3942, 3942, 3942, 3943, 3943, 3943,
3622 3943, 3944, 3944, 3944, 3945, 3945, 3945, 3945, 3946, 3946,
3623 3946, 3946, 3947, 3947, 3947, 3947, 3948, 3948, 3948, 3948,
3624 3949, 3949, 3949, 3949, 3950, 3950, 3953, 3953, 3954, 3954,
3625 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3955, 3955, 3955,
3626 3955, 3955, 3955, 3955, 3956, 3961, 3966, 3971, 3976, 3981,
3627 3986, 3991, 3996, 4001, 4006, 4011, 4016, 4021, 4022, 4027,
3628 4032, 4037, 4042, 4047, 4052, 4057, 4062, 4067, 4072, 4077,
3629 4084, 4084, 4084, 4085, 4086, 4089, 4098, 4099, 4105, 4112,
3630 4113, 4114, 4115, 4118, 4123, 4131, 4137, 4144, 4151, 4151,
3631 4154, 4155, 4156, 4161, 4168, 4173, 4182, 4187, 4197, 4209,
3632 4210, 4216, 4217, 4218, 4219, 4224, 4231, 4231, 4236, 4241,
3633 4246, 4252, 4258, 4262, 4262, 4300, 4305, 4313, 4318, 4326,
3634 4331, 4336, 4341, 4349, 4354, 4363, 4364, 4368, 4373, 4378,
3635 4396, 4396, 4396, 4396, 4396, 4396, 4396, 4396, 4397, 4398,
3636 4399, 4405, 4404, 4417, 4417, 4423, 4429, 4434, 4439, 4444,
3637 4450, 4455, 4460, 4465, 4470, 4477, 4482, 4487, 4492, 4493,
3638 4499, 4501, 4513, 4522, 4531, 4540, 4539, 4554, 4553, 4566,
3639 4574, 4574, 4575, 4619, 4618, 4641, 4640, 4660, 4659, 4678,
3640 4676, 4693, 4691, 4706, 4711, 4716, 4721, 4736, 4736, 4739,
3641 4746, 4764, 4771, 4779, 4787, 4794, 4802, 4811, 4820, 4828,
3642 4835, 4842, 4850, 4857, 4863, 4878, 4885, 4890, 4896, 4903,
3643 4909, 4915, 4921, 4928, 4929, 4930, 4933, 4934, 4937, 4939,
3644 4948, 4949, 4956, 4957, 4960, 4965, 4973, 4973, 4973, 4978,
3645 4983, 4988, 4993, 5000, 5006, 5013, 5014, 5021, 5021, 5023,
3646 5023, 5023, 5023, 5023, 5023, 5023, 5023, 5023, 5023, 5023,
3647 5026, 5034, 5034, 5034, 5034, 5034, 5034, 5034, 5034, 5034,
3648 5034, 5034, 5034, 5034, 5034, 5034, 5034, 5034, 5034, 5035,
3649 5041, 5046, 5046, 5049, 5050, 5056, 5066, 5070, 5073, 5078,
3650 5085, 5087, 5091, 5096, 5099, 5105, 5110, 5117, 5123, 5116,
3651 5150, 5157, 5166, 5173, 5172, 5183, 5191, 5197, 5207, 5213,
3652 5218, 5226, 5233, 5244, 5250, 5255, 5261, 5271, 5276, 5284,
3653 5290, 5298, 5300, 5315, 5315, 5336, 5342, 5347, 5353, 5361,
3654 5370, 5371, 5374, 5375, 5377, 5390, 5397, 5405, 5406, 5409,
3655 5410, 5416, 5424, 5425, 5431, 5437, 5442, 5447, 5454, 5457,
3656 5464, 5468, 5467, 5480, 5483, 5490, 5497, 5498, 5499, 5506,
3657 5513, 5520, 5526, 5533, 5540, 5547, 5553, 5558, 5563, 5570,
3658 5569, 5580, 5586, 5594, 5600, 5605, 5610, 5615, 5620, 5623,
3659 5624, 5631, 5636, 5643, 5651, 5657, 5664, 5665, 5672, 5679,
3660 5684, 5689, 5694, 5701, 5703, 5710, 5716, 5728, 5729, 5744,
3661 5749, 5756, 5762, 5763, 5770, 5771, 5771, 5771, 5771, 5771,
3662 5771, 5771, 5772, 5773, 5774, 5777, 5777, 5777, 5777, 5777,
3663 5777, 5777, 5777, 5778, 5783, 5786, 5794, 5806, 5813, 5820,
3664 5825, 5830, 5838, 5858, 5861, 5866, 5870, 5873, 5878, 5881,
3665 5888, 5891, 5892, 5895, 5907, 5908, 5909, 5916, 5929, 5941,
3666 5948, 5948, 5948, 5948, 5952, 5956, 5963, 5965, 5972, 5972,
3667 5976, 5980, 5987, 5987, 5990, 5990, 5994, 5998, 6006, 6010,
3668 6018, 6022, 6030, 6034, 6042, 6046, 6072, 6075, 6074, 6089,
3669 6097, 6101, 6105, 6109, 6125, 6126, 6129, 6134, 6137, 6138,
3670 6141, 6157, 6158, 6161, 6169, 6170, 6178, 6179, 6180, 6181,
3671 6184, 6185, 6186, 6189, 6189, 6190, 6193, 6194, 6195, 6196,
3672 6197, 6198, 6199, 6202, 6212, 6219, 6219, 6226, 6227, 6231,
3673 6230, 6240, 6243, 6244, 6251, 6258, 6268, 6269, 6269, 6286,
3674 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286,
3675 6287, 6296, 6296, 6296, 6296, 6296, 6297, 6388, 6388, 6388,
3676 6388, 6388, 6388, 6388, 6388, 6388, 6388, 6388, 6388, 6388,
3677 6388, 6388, 6388, 6388, 6388, 6388, 6388, 6388, 6388, 6388,
3678 6391, 6391, 6391, 6391, 6391, 6391, 6391, 6391, 6391, 6391,
3679 6391, 6391, 6391, 6391, 6391, 6391, 6391, 6391, 6391, 6391,
3680 6394, 6401, 6410, 6419, 6428, 6439, 6440, 6450, 6457, 6462,
3681 6481, 6483, 6494, 6514, 6515, 6518, 6524, 6530, 6538, 6539,
3682 6542, 6548, 6556, 6557, 6560, 6566, 6571, 6579, 6579, 6579,
3683 6587, 6587, 6617, 6619, 6618, 6631, 6632, 6639, 6641, 6664,
3684 6669, 6674, 6681, 6687, 6692, 6705, 6705, 6705, 6706, 6709,
3685 6710, 6711, 6714, 6715, 6718, 6719, 6722, 6723, 6726, 6729,
3686 6732, 6735, 6736, 6739, 6747, 6754, 6755, 6759
3687};
3688#endif
3689
3691#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3692
3693#if 1
3694/* The user-facing name of the symbol whose (internal) number is
3695 YYSYMBOL. No bounds checking. */
3696static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3697
3698/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3699 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3700static const char *const yytname[] =
3701{
3702 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3703 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3704 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3705 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3706 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3707 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3708 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3709 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3710 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3711 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3712 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3713 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3714 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3715 "\"method\"", "\"global variable\"", "\"instance variable\"",
3716 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3717 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3718 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3719 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3720 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3721 "\"escaped form feed\"", "\"escaped carriage return\"",
3722 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3723 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3724 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3725 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3726 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3727 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3728 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3729 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3730 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3731 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3732 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3733 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3734 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3735 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3736 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3737 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3738 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3739 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3740 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3741 "command_asgn", "op_asgn_command_rhs",
3742 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3743 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3744 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3745 "expr_value_do", "command_call", "value_expr_command_call",
3746 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3747 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3748 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3749 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3750 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3751 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3752 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3753 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3754 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3755 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3756 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3757 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3758 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3759 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3760 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_return_arg",
3761 "k_break_arg", "k_next_arg", "k_yield", "then", "do", "if_tail",
3762 "opt_else", "for_var", "f_marg", "mlhs_items_f_marg", "f_margs",
3763 "f_rest_marg", "f_any_kwrest", "$@25", "f_eq", "f_kw_primary_value",
3764 "f_kwarg_primary_value", "opt_f_block_arg_none",
3765 "args_tail_basic_primary_value_none", "block_args_tail",
3766 "excessed_comma", "f_opt_primary_value", "f_opt_arg_primary_value",
3767 "opt_args_tail_block_args_tail_none",
3768 "args-list_primary_value_opt_args_tail_block_args_tail_none",
3769 "block_param", "tail-only-args_block_args_tail", "opt_block_param_def",
3770 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3771 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3772 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3773 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3774 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3775 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3776 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3777 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3778 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3779 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3780 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3781 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3782 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3783 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3784 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3785 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3786 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3787 "string_contents", "xstring_contents", "regexp_contents",
3788 "string_content", "@34", "@35", "@36", "@37", "@38", "string_dend",
3789 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3790 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3791 "var_ref", "var_lhs", "backref", "$@39", "superclass",
3792 "f_opt_paren_args", "f_empty_arg", "f_paren_args", "f_arglist", "@40",
3793 "f_kw_arg_value", "f_kwarg_arg_value", "opt_f_block_arg_opt_comma",
3794 "args_tail_basic_arg_value_opt_comma", "args_tail",
3795 "args_tail_basic_arg_value_none", "largs_tail", "f_opt_arg_value",
3796 "f_opt_arg_arg_value", "opt_args_tail_args_tail_opt_comma",
3797 "args-list_arg_value_opt_args_tail_args_tail_opt_comma",
3798 "f_args-list_args_tail_opt_comma", "tail-only-args_args_tail", "f_args",
3799 "opt_args_tail_largs_tail_none",
3800 "args-list_arg_value_opt_args_tail_largs_tail_none",
3801 "f_args-list_largs_tail_none", "tail-only-args_largs_tail", "f_largs",
3802 "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item",
3803 "f_arg", "f_label", "kwrest_mark", "f_no_kwarg", "f_kwrest",
3804 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", "option_','",
3805 "opt_comma", "value_expr_singleton_expr", "singleton", "singleton_expr",
3806 "$@41", "assoc_list", "assocs", "assoc", "operation2", "operation3",
3807 "dot_or_colon", "call_op", "call_op2", "rparen", "rbracket", "rbrace",
3808 "trailer", "term", "terms", "none", YY_NULLPTR
3809};
3810
3811static const char *
3812yysymbol_name (yysymbol_kind_t yysymbol)
3813{
3814 return yytname[yysymbol];
3815}
3816#endif
3817
3818#define YYPACT_NINF (-1192)
3819
3820#define yypact_value_is_default(Yyn) \
3821 ((Yyn) == YYPACT_NINF)
3822
3823#define YYTABLE_NINF (-858)
3824
3825#define yytable_value_is_error(Yyn) \
3826 ((Yyn) == YYTABLE_NINF)
3827
3828/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3829 STATE-NUM. */
3830static const yytype_int16 yypact[] =
3831{
3832 -1192, 5502, 145, -1192, -1192, -1192, -1192, 11131, -1192, -1192,
3833 -1192, -1192, -1192, -1192, -1192, 7732, 7888, -1192, -1192, -1192,
3834 -1192, 6952, -1192, -1192, -1192, -1192, 339, 10977, 28, 294,
3835 -1192, -1192, -1192, -1192, 6328, 7108, -1192, -1192, 6484, -1192,
3836 -1192, -1192, -1192, -1192, -1192, -1192, -1192, 13746, 13746, 13746,
3837 13746, 290, 9890, 10048, 12666, 12906, 11432, -1192, 10823, -1192,
3838 -1192, -1192, 300, 300, 300, 300, 1120, 13866, 13746, -1192,
3839 280, -1192, 294, 1437, -1192, -1192, -1192, -1192, -1192, 969,
3840 26, 26, -1192, -1192, 105, 443, 368, -1192, 354, 14466,
3841 -1192, 381, -1192, 4455, -1192, -1192, -1192, -1192, 1056, 74,
3842 -1192, 584, -1192, 12066, 12066, -1192, -1192, 10510, 14584, 14702,
3843 14820, 10668, 8044, 12186, 12186, 12186, 7576, -1192, 642, 109,
3844 -1192, -1192, 423, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3845 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3846 348, 479, -1192, 455, 615, -1192, -1192, -1192, -1192, -1192,
3847 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3848 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3849 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3850 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3851 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3852 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3853 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3854 -1192, -1192, -1192, 421, -1192, -1192, -1192, -1192, -1192, -1192,
3855 12306, -1192, 12186, -1192, -1192, 11807, 13986, 822, -1192, 431,
3856 -1192, 10206, -1192, -1192, -1192, -1192, -1192, 450, 467, 554,
3857 10048, 13746, 26, 26, 105, 501, -1192, 634, -1192, 490,
3858 54, 55, 599, 59, 646, 5253, 5253, 625, -1192, 9890,
3859 572, 280, -1192, 1437, 28, 528, -1192, -1192, 13746, 13746,
3860 13746, -1192, 6142, -1192, 635, 585, 780, -1192, 794, -1192,
3861 -1192, 635, 638, 794, -1192, 28, 737, 1120, 14938, 639,
3862 639, 666, -1192, 678, 702, 760, 791, -1192, -1192, 470,
3863 -1192, -1192, 857, 1065, 643, -1192, 671, 671, 671, 671,
3864 764, -1192, -1192, 903, -1192, -1192, -1192, -1192, -1192, 6019,
3865 10358, 12066, 12066, 12066, 12066, -1192, 13986, 13986, 1921, 741,
3866 -1192, 773, -1192, 1921, 777, -1192, -1192, -1192, -1192, 785,
3867 -1192, -1192, -1192, -1192, -1192, -1192, -1192, 9890, 11550, 739,
3868 -1192, -1192, 13746, 13746, 13746, 13746, 13746, -1192, -1192, 13746,
3869 13746, 13746, 13746, 13746, 13746, 13746, 13746, -1192, 13746, -1192,
3870 -1192, 13746, 13746, 13746, 13746, 13746, 13746, 13746, 13746, 13746,
3871 13746, -1192, -1192, 15425, 12186, 15523, 450, 8826, -1192, 969,
3872 -1192, 117, 117, 12066, 9738, 9738, -1192, 280, 738, 859,
3873 -1192, -1192, 917, 896, 111, 139, 156, 644, 660, 12066,
3874 544, -1192, 789, 936, -1192, -1192, -1192, -1192, 385, 535,
3875 575, 623, 700, 761, 783, 795, 798, -1192, -1192, -1192,
3876 -1192, -1192, 804, -1192, 13746, -1192, -1192, -1192, -1192, -1192,
3877 776, 784, -1192, -1192, 11668, -1192, -1192, -1192, 15327, -1192,
3878 -1192, -1192, -1192, -1192, 13746, 28, -1192, 790, 28, 806,
3879 -1192, -1192, 807, 400, -1192, -1192, -1192, -1192, -1192, 11131,
3880 -1192, -1192, 13746, 821, 92, 863, 865, -1192, 15621, 12186,
3881 15719, -1192, -1192, -1192, 294, 28, -1192, -1192, 5722, 836,
3882 846, -1192, -1192, -1192, 897, 13746, -1192, 12666, -1192, -1192,
3883 12906, -1192, -1192, -1192, 431, 948, -1192, 856, -1192, -1192,
3884 14938, 15817, 12186, 15915, -1192, -1192, -1192, -1192, -1192, -1192,
3885 -1192, -1192, -1192, -1192, -1192, -1192, 1158, 81, 1204, 87,
3886 13746, 16013, 15719, -1192, -1192, 861, -1192, -1192, -1192, -1192,
3887 -1192, 11946, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3888 -1192, -1192, 1512, -1192, -1192, -1192, -1192, -1192, 873, -1192,
3889 -1192, -1192, 877, -1192, -1192, -1192, 880, -1192, -1192, -1192,
3890 28, -1192, -1192, -1192, 888, -1192, 882, 13746, 128, -1192,
3891 -1192, 988, 889, 485, -1192, 14106, 8826, 280, 14106, 8826,
3892 -1192, 899, -1192, -1192, -1192, 131, 131, 13026, 28, 14938,
3893 894, -1192, 13146, -1192, 646, 3922, 3922, 3922, 3922, 4052,
3894 3603, 3922, 3922, 5253, 5253, 934, 934, -1192, 4743, 1223,
3895 1223, 1310, 670, 670, 646, 646, 646, 1071, 1071, 8200,
3896 6640, 8512, 6796, 450, -1192, 28, 916, 655, -1192, 685,
3897 -1192, 7264, -1192, -1192, 131, -1192, 8978, 1041, 9434, 391,
3898 131, 131, 1070, 1048, 161, 16111, 12186, 16209, -1192, -1192,
3899 -1192, 948, -1192, -1192, -1192, -1192, 16307, 12186, 16405, 8826,
3900 13986, -1192, -1192, -1192, -1192, 12426, -1192, -1192, 12786, -1192,
3901 28, -1192, -1192, -1192, -1192, 3888, 14226, 14226, 11131, -1192,
3902 12546, -1192, 12786, -1192, -1192, -1192, 13986, 6142, -1192, -1192,
3903 14346, 14346, 13746, 6172, 312, 450, 28, 261, 357, 450,
3904 13746, 13746, 14226, -1192, 35, -1192, -1192, 13746, -1192, 635,
3905 -1192, 794, -1192, 14938, 856, 562, 569, 28, 219, 482,
3906 -1192, -1192, 1363, -1192, 80, -1192, 300, -1192, -1192, 80,
3907 300, -1192, 646, 7420, -1192, -1192, 1512, 1286, -1192, 928,
3908 28, 935, -1192, 33, -1192, -1192, -1192, 571, -1192, 1921,
3909 -1192, -1192, -1192, 961, 13746, 1921, -1192, -1192, -1192, -1192,
3910 -1192, 2241, -1192, -1192, -1192, 339, 1054, -1192, 6142, 1061,
3911 131, -1192, 1054, 1061, 131, -1192, -1192, 963, -1192, -1192,
3912 -1192, -1192, -1192, 13746, -1192, -1192, -1192, 962, 968, 1090,
3913 -1192, -1192, 856, 14938, 1081, -1192, -1192, 1094, 1011, 4085,
3914 -1192, -1192, -1192, 994, 372, -1192, -1192, 1008, -1192, -1192,
3915 -1192, -1192, 785, 987, 735, 12426, -1192, -1192, -1192, -1192,
3916 785, -1192, 1145, -1192, 1010, -1192, 1139, -1192, -1192, -1192,
3917 -1192, -1192, -1192, 13266, 131, -1192, 1070, 131, 96, 276,
3918 28, 172, 186, 12066, 280, 12066, 8826, 911, 569, -1192,
3919 28, 131, 400, 11285, -1192, 784, -1192, 109, 443, -1192,
3920 4562, -1192, -1192, -1192, -1192, 28, 1002, 400, 13746, 339,
3921 -1192, -1192, 384, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3922 543, -1192, -1192, -1192, -1192, -1192, 671, -1192, 671, 671,
3923 671, 28, -1192, 1512, -1192, 1518, -1192, -1192, 1116, 873,
3924 -1192, -1192, 1009, 1014, -1192, -1192, 1019, -1192, 1040, -1192,
3925 1009, 14106, -1192, -1192, -1192, -1192, -1192, -1192, -1192, 1042,
3926 13386, -1192, 856, 394, -1192, -1192, -1192, 16503, 12186, 16601,
3927 -1192, -1192, 13746, 14226, 14226, 1047, -1192, -1192, -1192, 14226,
3928 14226, -1192, -1192, 13506, 1139, -1192, -1192, -1192, 9738, 12066,
3929 131, -1192, -1192, 131, -1192, 13746, -1192, 251, -1192, -1192,
3930 131, -1192, 244, 391, 8826, 280, 131, -1192, -1192, -1192,
3931 -1192, -1192, -1192, -1192, -1192, 12786, -1192, 14346, 13746, 13746,
3932 -1192, 13746, 13746, 1547, -1192, -1192, -1192, 1049, 1050, -1192,
3933 2241, -1192, 2241, -1192, 1921, -1192, 2241, -1192, -1192, 1054,
3934 1061, 13746, 13746, -1192, -1192, 13746, 1063, 11946, 11946, 14226,
3935 13746, 8356, 8668, 28, 432, 448, 5854, 5854, 6142, -1192,
3936 -1192, -1192, -1192, -1192, 14226, -1192, -1192, -1192, -1192, 962,
3937 -1192, 1101, -1192, 1199, -1192, -1192, 117, -1192, -1192, -1192,
3938 13626, 9130, -1192, -1192, -1192, 131, -1192, -1192, 13746, 1921,
3939 1064, -1192, -1192, 1068, -1192, -1192, 1072, -1192, -1192, -1192,
3940 -1192, -1192, 1073, 1075, -1192, 5145, 1518, 1518, 1009, 1009,
3941 1082, 1009, 6142, 6142, 1086, 1086, 1042, -1192, -1192, 6142,
3942 472, -1192, -1192, -1192, 2254, 2254, 682, -1192, 4905, 502,
3943 1157, -1192, 1276, -1192, -1192, 236, -1192, 1102, -1192, -1192,
3944 -1192, 1092, -1192, 1098, -1192, 15339, -1192, -1192, -1192, -1192,
3945 -1192, 953, -1192, -1192, -1192, 77, -1192, -1192, -1192, -1192,
3946 -1192, -1192, -1192, -1192, -1192, 596, -1192, -1192, -1192, 15056,
3947 117, -1192, -1192, 9738, -1192, -1192, 9586, 8978, 13746, -1192,
3948 867, 5854, 9738, -1192, 28, 33, -1192, -1192, 216, 571,
3949 -1192, 1921, -1192, -1192, 1921, -1192, 2241, -1192, 127, 1050,
3950 -1192, -1192, 2241, -1192, -1192, 2354, 10358, -1192, -1192, 8826,
3951 -1192, -1192, -1192, -1192, 15339, 307, 28, 15247, -1192, 28,
3952 1103, -1192, 1104, -1192, -1192, -1192, 1112, -1192, 12066, -1192,
3953 1209, 15247, -1192, 15339, 453, 1161, 2254, 2254, 682, 515,
3954 592, 5854, 5854, -1192, 1208, -1192, 1045, 119, 166, 194,
3955 8826, 280, -1192, 1010, -1192, -1192, -1192, -1192, 117, 1018,
3956 131, 1107, 1114, -1192, -1192, 10358, -1192, 1064, -1192, 1119,
3957 1123, 1131, 1132, 1119, -1192, -1192, -1192, 1009, 1064, -1192,
3958 1133, -1192, -1192, -1192, 1134, -1192, -1192, -1192, 28, 888,
3959 1137, 15174, 1142, -1192, -1192, -1192, 196, -1192, 1161, 1143,
3960 1147, -1192, -1192, -1192, -1192, -1192, 28, -1192, -1192, 1148,
3961 15339, 1149, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3962 -1192, -1192, -1192, 28, 28, 28, 28, 28, 28, 265,
3963 16699, 12186, 16797, 1145, -1192, 1199, -1192, -1192, 12066, 12066,
3964 -1192, 1319, -1192, 8826, 1154, -1192, 2241, -1192, 2241, -1192,
3965 1921, -1192, 2241, -1192, -1192, -1192, -1192, 571, -1192, 2354,
3966 -1192, -1192, 1155, 15174, 2354, -1192, -1192, 1251, 1053, 862,
3967 -1192, -1192, 15339, -1192, 453, -1192, 15339, -1192, 15247, 657,
3968 -1192, -1192, -1192, -1192, -1192, -1192, 413, 417, 28, 356,
3969 389, -1192, -1192, 9282, -1192, -1192, -1192, 975, -1192, -1192,
3970 131, -1192, 1119, 1119, 1153, 1119, -1192, 1064, -1192, -1192,
3971 1156, 1162, -1192, 1053, 1165, 1166, -1192, 16895, 1156, 1169,
3972 28, 1169, -1192, -1192, 426, 153, 1319, -1192, -1192, -1192,
3973 -1192, 2241, -1192, -1192, -1192, 862, -1192, 862, -1192, 2354,
3974 -1192, 862, -1192, 1159, 1170, -1192, 15339, -1192, -1192, -1192,
3975 -1192, -1192, 1119, 1156, 1156, 1179, 1156, -1192, -1192, -1192,
3976 862, -1192, -1192, 1156, -1192
3977};
3978
3979/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3980 Performed when YYTABLE does not specify something else to do. Zero
3981 means the default is an error. */
3982static const yytype_int16 yydefact[] =
3983{
3984 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3985 401, 404, 26, 26, 26, 420, 421, 395, 396, 418,
3986 422, 323, 707, 706, 708, 709, 64, 0, 64, 0,
3987 857, 711, 710, 712, 97, 99, 701, 700, 98, 702,
3988 696, 697, 698, 699, 644, 717, 718, 0, 0, 0,
3989 0, 0, 0, 0, 857, 857, 126, 497, 670, 670,
3990 672, 674, 0, 0, 0, 0, 0, 0, 0, 6,
3991 3, 8, 0, 10, 43, 49, 40, 58, 61, 46,
3992 727, 727, 70, 91, 323, 90, 0, 112, 0, 116,
3993 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3994 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3995 0, 0, 419, 0, 0, 0, 323, 370, 94, 368,
3996 340, 341, 643, 645, 342, 343, 653, 344, 659, 346,
3997 663, 345, 665, 347, 642, 688, 689, 641, 694, 705,
3998 713, 714, 348, 0, 349, 7, 1, 205, 216, 206,
3999 229, 202, 222, 212, 211, 232, 233, 227, 210, 209,
4000 204, 230, 234, 235, 214, 203, 217, 221, 223, 215,
4001 208, 224, 231, 226, 225, 218, 228, 213, 201, 220,
4002 219, 200, 207, 198, 199, 195, 196, 197, 155, 157,
4003 156, 190, 191, 186, 168, 169, 170, 177, 174, 176,
4004 171, 172, 192, 193, 178, 179, 183, 187, 173, 175,
4005 165, 166, 167, 180, 181, 182, 184, 185, 188, 189,
4006 194, 160, 162, 33, 158, 159, 161, 402, 403, 405,
4007 857, 516, 0, 107, 65, 64, 0, 0, 28, 857,
4008 12, 0, 11, 27, 295, 393, 394, 517, 0, 0,
4009 0, 0, 727, 727, 0, 0, 261, 0, 360, 363,
4010 713, 714, 0, 349, 262, 251, 252, 357, 24, 0,
4011 0, 3, 21, 23, 64, 114, 20, 353, 831, 334,
4012 834, 670, 298, 299, 329, 0, 64, 330, 64, 827,
4013 300, 0, 0, 64, 825, 64, 0, 0, 0, 727,
4014 727, 124, 397, 0, 132, 133, 140, 494, 691, 0,
4015 690, 692, 0, 0, 0, 650, 654, 666, 660, 668,
4016 695, 74, 273, 0, 274, 854, 853, 5, 855, 0,
4017 0, 0, 0, 0, 0, 857, 0, 0, 724, 0,
4018 723, 726, 389, 724, 0, 391, 409, 521, 511, 100,
4019 523, 367, 410, 523, 506, 857, 130, 0, 122, 117,
4020 857, 77, 0, 0, 0, 0, 0, 291, 292, 0,
4021 0, 0, 0, 249, 250, 0, 0, 75, 0, 289,
4022 290, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4023 0, 844, 845, 847, 857, 846, 0, 0, 86, 84,
4024 85, 0, 0, 0, 0, 0, 377, 3, 4, 0,
4025 433, 432, 0, 0, 713, 714, 349, 150, 151, 0,
4026 0, 153, 857, 0, 713, 714, 349, 387, 225, 218,
4027 228, 213, 195, 196, 197, 155, 156, 823, 81, 80,
4028 822, 821, 0, 820, 326, 318, 316, 317, 109, 322,
4029 857, 857, 110, 111, 64, 108, 847, 846, 0, 369,
4030 646, 857, 857, 163, 790, 64, 312, 857, 64, 857,
4031 311, 324, 0, 64, 366, 73, 30, 32, 31, 0,
4032 857, 296, 0, 0, 357, 0, 0, 857, 847, 857,
4033 846, 857, 857, 857, 0, 64, 355, 14, 0, 113,
4034 0, 830, 333, 833, 0, 0, 358, 852, 851, 301,
4035 852, 303, 359, 826, 0, 139, 695, 127, 119, 726,
4036 0, 847, 857, 846, 495, 676, 693, 679, 677, 671,
4037 647, 648, 673, 649, 675, 651, 0, 0, 0, 0,
4038 0, 847, 846, 856, 9, 0, 34, 35, 36, 37,
4039 297, 0, 71, 72, 796, 793, 792, 791, 794, 802,
4040 803, 790, 0, 809, 804, 813, 812, 808, 817, 805,
4041 768, 731, 817, 739, 766, 748, 817, 764, 769, 767,
4042 64, 740, 795, 797, 798, 800, 817, 730, 807, 446,
4043 445, 811, 817, 816, 738, 0, 0, 0, 0, 0,
4044 494, 0, 521, 101, 494, 0, 0, 0, 64, 0,
4045 118, 131, 0, 534, 259, 266, 268, 269, 270, 277,
4046 278, 271, 272, 247, 248, 275, 276, 534, 64, 263,
4047 264, 265, 254, 255, 256, 257, 258, 293, 294, 835,
4048 837, 836, 838, 323, 514, 64, 857, 835, 837, 836,
4049 838, 323, 515, 857, 0, 424, 0, 423, 0, 0,
4050 0, 0, 0, 375, 357, 847, 857, 846, 380, 385,
4051 150, 151, 152, 719, 383, 721, 847, 857, 846, 0,
4052 0, 842, 843, 82, 325, 0, 319, 328, 0, 320,
4053 64, 362, 835, 836, 510, 323, 0, 0, 0, 306,
4054 313, 308, 315, 848, 365, 29, 0, 279, 13, 857,
4055 0, 0, 0, 835, 356, 0, 64, 835, 836, 857,
4056 0, 0, 0, 25, 115, 22, 354, 0, 829, 331,
4057 332, 64, 828, 0, 125, 839, 138, 64, 835, 836,
4058 496, 680, 0, 652, 0, 656, 0, 662, 658, 0,
4059 0, 664, 260, 836, 39, 38, 0, 444, 436, 438,
4060 64, 441, 434, 818, 737, 819, 734, 818, 736, 818,
4061 760, 751, 725, 0, 0, 818, 765, 729, 601, 806,
4062 810, 818, 762, 815, 814, 64, 59, 62, 286, 280,
4063 0, 728, 60, 281, 0, 495, 519, 0, 495, 416,
4064 417, 520, 505, 334, 92, 93, 41, 336, 0, 45,
4065 335, 129, 123, 0, 0, 69, 48, 67, 0, 304,
4066 329, 236, 42, 0, 349, 532, 532, 0, 857, 857,
4067 521, 513, 104, 0, 518, 313, 857, 857, 310, 512,
4068 102, 309, 857, 352, 857, 425, 857, 427, 88, 426,
4069 373, 374, 413, 0, 0, 534, 0, 0, 839, 356,
4070 64, 835, 836, 0, 0, 0, 0, 150, 151, 154,
4071 64, 0, 64, 0, 327, 857, 361, 507, 95, 50,
4072 304, 238, 57, 245, 164, 64, 857, 64, 0, 64,
4073 857, 857, 518, 857, 857, 56, 244, 832, 302, 120,
4074 518, 26, 681, 678, 686, 687, 655, 657, 667, 661,
4075 669, 64, 443, 0, 799, 0, 733, 732, 807, 817,
4076 750, 749, 817, 817, 448, 747, 817, 801, 817, 798,
4077 817, 0, 857, 857, 390, 392, 496, 96, 496, 339,
4078 0, 857, 121, 357, 857, 857, 857, 847, 857, 846,
4079 533, 533, 0, 0, 0, 0, 105, 849, 857, 0,
4080 0, 103, 411, 857, 18, 633, 415, 414, 0, 0,
4081 0, 428, 430, 0, 89, 0, 525, 0, 378, 532,
4082 0, 379, 518, 0, 0, 0, 0, 518, 388, 824,
4083 83, 321, 508, 509, 307, 314, 364, 0, 0, 0,
4084 857, 0, 0, 724, 682, 435, 437, 439, 442, 735,
4085 818, 761, 818, 758, 818, 754, 818, 756, 763, 66,
4086 288, 0, 0, 26, 26, 334, 337, 0, 0, 0,
4087 0, 835, 836, 64, 835, 836, 0, 0, 285, 54,
4088 242, 55, 243, 106, 0, 52, 240, 53, 241, 634,
4089 635, 857, 636, 857, 15, 431, 0, 371, 372, 526,
4090 0, 0, 533, 376, 381, 0, 720, 384, 0, 724,
4091 857, 498, 788, 857, 745, 786, 857, 784, 789, 787,
4092 501, 746, 857, 857, 744, 0, 0, 0, 817, 817,
4093 817, 817, 63, 287, 857, 857, 338, 44, 68, 305,
4094 518, 625, 631, 597, 0, 0, 0, 533, 64, 533,
4095 585, 670, 0, 624, 78, 542, 548, 550, 553, 546,
4096 545, 581, 547, 590, 593, 596, 602, 603, 592, 556,
4097 611, 604, 557, 612, 613, 614, 615, 616, 617, 618,
4098 619, 621, 620, 622, 623, 600, 76, 51, 239, 0,
4099 0, 638, 412, 0, 19, 640, 0, 0, 0, 527,
4100 857, 0, 0, 386, 64, 0, 743, 454, 0, 0,
4101 742, 0, 780, 771, 0, 785, 0, 782, 0, 440,
4102 759, 755, 818, 752, 757, 486, 0, 484, 483, 0,
4103 609, 610, 151, 629, 0, 573, 64, 574, 578, 64,
4104 0, 568, 0, 857, 571, 584, 0, 626, 0, 627,
4105 0, 543, 551, 0, 591, 595, 607, 608, 0, 533,
4106 533, 0, 0, 599, 0, 637, 0, 713, 714, 349,
4107 0, 3, 16, 857, 528, 530, 531, 529, 0, 539,
4108 0, 488, 0, 453, 503, 0, 499, 857, 770, 857,
4109 857, 857, 857, 857, 685, 684, 683, 817, 857, 451,
4110 857, 459, 481, 462, 857, 478, 487, 482, 64, 798,
4111 857, 450, 857, 458, 522, 524, 64, 566, 588, 576,
4112 575, 567, 579, 850, 569, 598, 64, 549, 544, 581,
4113 0, 582, 586, 670, 594, 589, 605, 606, 630, 555,
4114 565, 554, 561, 64, 64, 64, 64, 64, 64, 357,
4115 847, 857, 846, 857, 639, 857, 429, 535, 0, 0,
4116 382, 0, 500, 0, 0, 741, 0, 781, 0, 778,
4117 0, 774, 0, 776, 783, 753, 457, 0, 456, 0,
4118 474, 465, 0, 0, 460, 479, 480, 0, 449, 0,
4119 476, 572, 0, 580, 0, 628, 0, 552, 0, 0,
4120 558, 559, 560, 562, 563, 564, 839, 356, 64, 835,
4121 836, 632, 17, 0, 540, 541, 492, 64, 490, 493,
4122 0, 502, 857, 857, 857, 857, 452, 857, 464, 463,
4123 857, 857, 485, 461, 857, 857, 357, 847, 857, 577,
4124 64, 582, 583, 587, 518, 857, 0, 489, 504, 779,
4125 775, 0, 772, 777, 455, 0, 475, 0, 472, 0,
4126 468, 0, 470, 839, 356, 477, 0, 570, 537, 538,
4127 536, 491, 857, 857, 857, 857, 857, 773, 473, 469,
4128 0, 466, 471, 857, 467
4129};
4130
4131/* YYPGOTO[NTERM-NUM]. */
4132static const yytype_int16 yypgoto[] =
4133{
4134 -1192, -98, 1095, -1192, -1192, -1192, 984, 1265, 850, -38,
4135 -1192, -1192, -570, -1192, 197, 849, -1192, 3, -1192, -1192,
4136 11, -1192, -1192, -531, -1192, -45, -561, -23, -602, -19,
4137 -1192, -1192, 476, 3158, -1192, 3423, -1192, -43, -1192, -1192,
4138 1249, -54, -1192, 753, -1192, -656, 1533, -69, 1253, -132,
4139 30, -458, -62, -1192, 22, 3908, -400, 1275, -35, 6,
4140 -1192, -1192, -3, -1192, -1192, 4988, -1192, -1192, -1192, -1192,
4141 -541, 1289, -1192, 1066, 883, 468, -1192, 195, -1192, 817,
4142 20, 696, -373, -1192, 25, -1192, -49, -613, -386, -22,
4143 -476, -1192, -546, -50, -1192, -1192, -1192, -1192, -1192, -1192,
4144 -1192, -1192, -1192, -1192, -1192, -1192, 1394, -1192, -1192, -1192,
4145 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
4146 -1192, -1192, 428, -1192, -456, 2277, -1192, -1192, -1192, 2416,
4147 -384, 415, 163, -824, -1192, -833, -800, 663, 486, 831,
4148 -1192, 133, 76, -1192, -960, -1192, 237, -1192, -1191, 79,
4149 279, -1192, -1192, -1192, 329, -1192, -1192, 162, -1192, 23,
4150 224, -417, -130, -1192, -1192, 135, -1192, -1192, -1192, 558,
4151 -1192, -1192, -100, -1192, -500, -1192, 1084, -1192, -785, -1192,
4152 -740, -848, -513, -1192, 34, -1192, -1192, -915, -269, -1192,
4153 -1192, -1192, -1192, -1192, 148, -1192, -237, -1192, -816, -984,
4154 -1078, -484, -866, -1096, -1192, 227, -1192, -1192, -919, 230,
4155 -1192, -1192, -653, 235, -1192, -1192, -1192, 136, -1192, -1192,
4156 144, 628, 1115, -1192, 1338, 1568, 1775, 42, -1192, 1824,
4157 -1192, 924, -1192, 1996, -1192, -1192, 2115, -1192, 2287, -1192,
4158 -1192, -58, -1192, -1192, -203, -1192, -1192, -1192, -1192, -1192,
4159 -1192, -1192, 29, -1192, -1192, -1192, -1192, 8, -51, 4158,
4160 254, 1355, 504, 3757, -1192, -1192, 71, -313, 766, -18,
4161 -1192, -733, -788, -522, -1192, 346, -1192, -875, -670, -675,
4162 -463, -1192, -1192, -1192, 1125, -257, -1192, -1192, -1192, 405,
4163 -220, -1187, -472, -242, -727, 704, -308, -233, -1192, -759,
4164 -1192, -362, -1192, 757, -1192, -495, -1192, -1192, -1192, -1192,
4165 -1192, 43, -470, -346, -1192, -1192, -90, 1351, 800, -348,
4166 82, -250, -28, -68, -1
4167};
4168
4169/* YYDEFGOTO[NTERM-NUM]. */
4170static const yytype_int16 yydefgoto[] =
4171{
4172 0, 327, 69, 1, 2, 70, 71, 241, 242, 653,
4173 1156, 1315, 654, 1053, 271, 272, 494, 227, 72, 479,
4174 273, 74, 75, 76, 77, 78, 786, 472, 816, 79,
4175 627, 613, 438, 252, 873, 253, 400, 401, 403, 974,
4176 404, 82, 805, 817, 83, 603, 254, 85, 86, 274,
4177 87, 517, 88, 89, 90, 255, 421, 422, 221, 222,
4178 223, 698, 642, 225, 92, 93, 94, 95, 96, 97,
4179 789, 389, 98, 550, 482, 551, 283, 284, 285, 821,
4180 838, 839, 465, 447, 466, 232, 233, 449, 686, 646,
4181 287, 809, 810, 99, 397, 500, 856, 662, 863, 1162,
4182 866, 864, 679, 596, 599, 100, 257, 102, 103, 104,
4183 105, 106, 107, 108, 109, 110, 111, 350, 353, 963,
4184 1153, 853, 968, 969, 801, 258, 113, 114, 115, 259,
4185 656, 848, 970, 971, 413, 758, 759, 760, 761, 568,
4186 773, 774, 1259, 1260, 1166, 1261, 1388, 1345, 1263, 1264,
4187 1340, 1265, 1266, 1267, 1186, 1187, 1268, 1242, 1377, 1378,
4188 524, 740, 901, 307, 1168, 117, 1071, 1246, 1323, 354,
4189 118, 119, 351, 600, 601, 604, 605, 977, 854, 1237,
4190 950, 1036, 825, 1373, 857, 1430, 1238, 1114, 1278, 1116,
4191 1290, 1117, 1221, 1222, 1118, 1354, 1196, 1197, 1198, 1120,
4192 1121, 1291, 1200, 1122, 1123, 1124, 1125, 1126, 569, 1128,
4193 1129, 1130, 1131, 1132, 1133, 1134, 1135, 964, 1051, 1150,
4194 1154, 120, 121, 122, 123, 124, 125, 316, 126, 127,
4195 536, 744, 128, 129, 538, 130, 131, 132, 133, 537,
4196 539, 309, 313, 314, 529, 742, 741, 902, 1004, 1085,
4197 1256, 903, 134, 135, 310, 136, 137, 138, 139, 260,
4198 261, 142, 262, 263, 865, 674, 339, 340, 341, 342,
4199 343, 571, 572, 764, 573, 920, 1074, 1248, 575, 576,
4200 770, 577, 578, 579, 580, 1172, 1077, 1078, 1079, 1080,
4201 581, 582, 583, 929, 585, 586, 587, 588, 589, 590,
4202 591, 592, 593, 594, 765, 771, 441, 442, 443, 680,
4203 292, 469, 289, 715, 644, 683, 678, 396, 474, 834,
4204 1204, 509, 657, 408, 244
4205};
4206
4207/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4208 positive, shift that token. If negative, reduce the rule whose
4209 number is the opposite. If YYTABLE_NINF, syntax error. */
4210static const yytype_int16 yytable[] =
4211{
4212 145, 312, 329, 236, 224, 239, 302, 311, 919, 406,
4213 468, 395, 73, 321, 270, 277, 228, 229, 658, 459,
4214 672, 645, 973, 308, 224, 570, 790, 359, 457, 794,
4215 570, 730, 286, 238, 917, 349, 226, 792, 511, 302,
4216 732, 231, 328, 513, 446, 446, 446, 643, 927, 651,
4217 768, 276, 276, 290, 294, 224, 226, 793, 302, 302,
4218 302, 402, 734, 345, 407, 689, 822, 455, 445, 445,
4219 445, 980, 874, 766, 320, 874, 439, 766, 301, 328,
4220 1006, 815, 275, 689, 399, 399, 951, 874, 399, 874,
4221 762, 450, 450, 450, 879, 882, 584, 288, 293, 921,
4222 926, 584, 797, 1037, 348, 317, 318, 319, 224, 871,
4223 532, 534, 695, 1170, 826, 1008, 716, 1127, 1127, 1279,
4224 895, -146, 1146, 776, 1199, 1305, 1308, 1254, 1075, 782,
4225 655, 346, -141, 1289, 1379, 346, -141, 495, 448, 452,
4226 453, 799, 565, -397, 719, 146, 525, 746, 1389, 737,
4227 802, 812, 344, 750, -715, -716, 451, 451, 451, 492,
4228 -724, 446, 778, 446, -142, 815, 815, 490, 967, -113,
4229 793, -397, -397, 497, 566, 1218, 956, 719, 855, -142,
4230 779, -149, 234, 338, 961, 445, -148, 445, -141, -142,
4231 -129, 815, 709, -149, 1075, 643, 651, -144, 843, 800,
4232 747, 527, 528, 498, 850, 851, 751, -149, 467, 730,
4233 450, -145, 270, 523, 1161, 1073, 473, 475, 732, 1379,
4234 1119, 1119, 874, 504, 730, 608, -148, -397, 1389, 470,
4235 1219, 270, 732, 542, 1220, 345, 518, 1304, 1307, 1062,
4236 145, 315, 1127, 328, -135, 1244, 1239, 1255, 302, 276,
4237 291, -137, 73, -835, 1006, 141, 347, 471, 1400, 1194,
4238 347, 1203, 230, 508, 655, 508, -132, 231, 276, -143,
4239 508, 325, 514, -141, 348, 451, 869, 326, -148, -141,
4240 1402, 1073, 345, 927, 762, 912, 1179, 1325, 546, 547,
4241 548, 549, 545, 860, -133, 1127, 986, 1210, 1336, 275,
4242 1338, -147, 1127, 1127, 870, 516, 141, 141, 302, 663,
4243 305, -140, 399, 399, 399, 399, -139, 552, 553, 270,
4244 -142, 719, 667, 485, 486, 446, -142, -135, 1076, 276,
4245 955, 1280, 719, 745, 934, 745, 1235, 1210, 935, 1245,
4246 73, -136, 979, 305, 921, 1119, 267, 1292, -149, 445,
4247 234, 1039, 1041, -135, -149, 942, 276, 1045, 1047, 730,
4248 659, 893, 415, 425, 425, 425, 660, 661, 892, -144,
4249 1019, 1299, 1301, -135, -135, 1236, 669, -135, 936, 328,
4250 610, 938, 874, 1073, 399, 446, 1073, 275, 1073, 900,
4251 1020, 1211, 650, 470, 1076, -144, 276, 1009, 978, -134,
4252 399, 981, -145, 276, 276, 325, 1060, 923, 1210, 445,
4253 1247, 326, 891, 928, 1065, 988, 652, 1050, 847, -148,
4254 446, 675, 815, 815, 766, -148, -146, 1414, 815, 815,
4255 -147, -138, 450, -836, 325, 1127, 917, 336, 337, -143,
4256 326, 762, 1147, 762, 445, 240, -147, 927, -715, 687,
4257 687, 1190, 1191, 446, -707, 650, 1020, 894, 518, 1011,
4258 1013, 315, -588, 1015, 730, 1017, 687, 1018, 687, -836,
4259 302, 352, 462, 501, 502, 503, 224, 445, 694, 690,
4260 885, 898, -141, -707, 1000, 705, 1292, 650, 470, 991,
4261 1292, -145, 1403, 234, 493, 141, 235, 451, 815, 1251,
4262 991, 921, 355, -132, 141, 143, -149, -136, 226, 356,
4263 -144, 1103, 982, 815, 1057, 360, -144, 1058, -143, 783,
4264 650, 470, 987, 141, 1063, 732, 787, 584, -148, 787,
4265 1067, 560, 836, 584, 918, 59, 525, 784, 1073, 650,
4266 1073, 907, 1073, -145, 1073, 325, 907, 518, 837, -145,
4267 731, 326, 305, 804, 234, 461, 143, 143, 804, 302,
4268 1403, 564, 755, 1296, 1297, 1293, -144, -146, -134, 791,
4269 -835, -147, 958, -146, -836, 1033, 463, -147, 1387, -716,
4270 -143, 1428, -145, 141, 141, 808, -143, -137, 480, 526,
4271 808, 527, 528, 1061, 832, 276, 670, 446, 276, 927,
4272 671, 643, 840, 651, -706, 827, -143, 230, 446, 1163,
4273 484, 141, 305, -142, 762, 762, -136, 927, 844, 1275,
4274 846, 445, 833, 1073, 235, 1180, 1181, 1183, 1184, 559,
4275 778, 849, 445, -706, -133, 487, -136, -136, -356, 684,
4276 -136, 1083, 804, 804, -708, 687, 878, 454, 1223, 560,
4277 841, 141, 1090, 391, -64, 276, 234, 276, 141, 141,
4278 921, 872, -112, 831, 650, 470, -356, -356, 804, 234,
4279 -97, 899, 1157, -708, -64, 650, 470, -134, 276, 564,
4280 565, 392, 393, 302, 574, 1100, -98, 887, 927, 574,
4281 1072, 904, -709, 833, 841, 224, -137, -134, -134, 491,
4282 728, -134, 729, 391, 884, 291, 1193, 1083, 508, 525,
4283 533, 391, 566, -703, 833, 462, -137, -137, 841, -835,
4284 -137, -709, -356, 525, 362, 493, -836, 226, 875, -704,
4285 496, 392, 488, 949, 670, 831, 505, 394, 1192, 392,
4286 456, -703, -703, 886, 506, 143, 234, 391, 362, -149,
4287 -64, 518, 141, 1380, 143, 836, 1072, -704, -704, -148,
4288 1201, 584, 931, 302, 527, 528, 1230, 1115, 1115, -711,
4289 -140, -713, 584, 143, 305, 392, 521, 992, 527, 528,
4290 -139, 1285, 777, 1081, 1320, 837, 906, 489, 908, -144,
4291 512, 909, 910, 515, 1335, -97, 338, -703, -711, -713,
4292 -713, -97, 807, 1145, 1145, 141, 1023, 820, 1024, 1250,
4293 -135, -98, 1252, -704, 386, 387, 388, -98, 1298, -145,
4294 983, 520, 985, 1272, 795, 1175, 1177, 584, 798, -714,
4295 -710, 522, 535, 143, 143, 958, 984, 833, 439, 1195,
4296 -136, 965, 540, 972, 399, 972, 399, 833, 1277, 1081,
4297 141, 1281, -712, 141, 1317, -713, 1215, -714, -714, -710,
4298 -349, 143, 787, 305, -703, 276, 997, -704, 1399, -143,
4299 224, 1300, 1401, 681, 687, 595, 476, 1271, 886, 446,
4300 729, -712, 967, 291, 852, 687, 477, 478, -349, -349,
4301 -134, 602, 1115, -703, 611, 729, -704, 291, 543, 804,
4302 804, 143, 682, 445, 1003, 804, 804, -722, 143, 143,
4303 141, 598, 141, -714, 554, 664, 555, 556, 557, 558,
4304 559, 668, 897, 525, 1408, 1276, 1056, 673, 1145, 584,
4305 1055, 685, 584, 141, 234, 507, 918, -839, 1368, 688,
4306 560, 808, 1195, 1269, -349, 700, 650, 470, 234, 510,
4307 399, 1081, 1195, 1195, 1081, 849, 1081, 1066, 1363, 1364,
4308 1365, 702, 1052, 525, 562, 703, 719, 276, 1384, 925,
4309 564, 565, 391, 708, 1288, 804, 530, 1391, 527, 528,
4310 -839, 1145, 1395, 276, 1303, 1306, 391, 305, 1145, 1145,
4311 804, -129, 1327, 1329, 1331, 1333, 1334, 710, 939, 711,
4312 392, 541, 143, 566, 726, 391, 336, 337, -839, -839,
4313 833, 733, 362, 754, 392, 665, 530, -357, 527, 528,
4314 1404, 727, -447, 1160, 966, 967, 1094, 1095, 763, 1271,
4315 729, 1271, 767, 392, 676, 769, 1271, 775, 1097, 1098,
4316 780, 1271, 1216, 1217, 781, -357, -357, 1178, 976, 813,
4317 1151, 796, 1155, 1206, 845, 143, 489, 1435, 1318, 1319,
4318 276, 1209, -839, 391, -839, 519, 519, 305, -835, 1167,
4319 666, 835, 1167, 855, 499, 1173, 384, 385, 386, 387,
4320 388, 1173, 1173, 913, 276, 833, 1202, 852, 584, 677,
4321 915, 392, 947, 1188, 1188, 924, 243, 1269, 932, 302,
4322 143, -357, 1269, 143, 918, 933, 1081, 1271, 1081, 1271,
4323 1081, 1271, 1081, 1271, 391, 937, 143, -329, 1232, 1233,
4324 141, 1145, 391, 940, 1240, 1409, 1410, 1412, 1413, 234,
4325 1406, 525, 1271, 1314, 941, 1026, 1312, 943, 944, 367,
4326 368, 1241, 392, 1310, 952, 945, 957, 948, 1274, 362,
4327 392, 1397, 276, 962, 967, 276, 276, 995, 1049, 972,
4328 143, 276, 143, 498, 1010, 1286, 375, 376, 779, 1012,
4329 1059, 1113, 1113, 833, 1014, 1437, 833, 1269, 525, 40,
4330 41, 42, 43, 143, 531, 276, 527, 528, 276, 399,
4331 291, 1081, 1313, 379, 380, 1016, 833, -333, 1311, 1043,
4332 143, 143, 1149, 328, 1086, 1087, 677, 1324, 1152, 1205,
4333 381, 382, 383, 384, 385, 386, 387, 388, -331, 1165,
4334 1096, 302, 141, 1169, 525, 1185, 143, 1171, 1174, 276,
4335 1176, 530, 972, 527, 528, 1359, 1285, 1182, 141, 1113,
4336 1113, 1212, 446, 1113, 276, 1241, 1167, 1213, 1173, 1173,
4337 1173, 1173, 1173, 1214, 691, 1159, 1283, 1167, 1282, 1167,
4338 1113, 1101, 1210, 1341, 1309, 699, 445, 1321, 701, 1341,
4339 525, 1341, 1322, 704, 1326, 1374, 1375, 743, 1328, 527,
4340 528, 141, 141, 833, 833, 833, 1330, 1332, 1337, 1339,
4341 1144, 1144, 1344, 302, 1392, 724, 1113, 1349, 1352, 399,
4342 399, 362, 1353, 1356, 1358, 481, 1381, 1396, 1411, 650,
4343 470, 1415, 965, 544, 1155, 141, -835, 1417, 375, 376,
4344 1419, 1421, 276, 748, 1426, 527, 528, -836, 1207, 1113,
4345 36, 37, 1113, 39, 1440, 1405, 483, 330, 554, 141,
4346 555, 556, 557, 558, 723, 833, 1113, 725, 1113, 990,
4347 1231, 1113, 1113, 1234, 1407, 405, 1113, 1113, 1144, 1144,
4348 806, 410, 1144, 706, 383, 384, 385, 386, 387, 388,
4349 143, 1376, 276, 555, 556, 557, 558, 1202, 1208, 1144,
4350 772, 1173, 1173, 1173, 1173, 427, 1167, 390, 362, 1341,
4351 1341, 877, 1054, 1341, 1341, 101, 1316, 1341, 1064, 1007,
4352 1021, 1022, 1343, 1228, 972, 375, 376, 141, 811, 1027,
4353 141, 141, 1028, 1386, 1030, 1144, 141, 36, 37, 911,
4354 39, 607, 1262, 1394, 1189, 1113, 612, 45, 46, 1431,
4355 1342, 1173, 1341, 1341, 1341, 1341, 993, 606, 1357, 1429,
4356 141, 1294, 1341, 141, 1295, 1287, 101, 101, 1144, 1371,
4357 303, 1144, 384, 385, 386, 387, 388, 143, 143, 1372,
4358 460, 323, 749, 143, 143, 1144, 440, 1144, 597, 458,
4359 1144, 1144, 143, 922, 1164, 1144, 1144, 331, 332, 333,
4360 334, 335, 1427, 303, 141, 930, 0, 1113, 143, 0,
4361 876, 1113, 0, 1113, 0, 0, 0, 323, 323, 141,
4362 0, 323, 412, 423, 423, 0, 0, 323, 323, 323,
4363 0, 0, 0, 881, 883, 0, 0, 0, 0, 0,
4364 916, 0, 0, 0, 916, 425, 0, 696, 697, 0,
4365 0, 143, 143, 143, 84, 0, 0, 881, 883, 896,
4366 0, 0, 0, 0, 1144, 0, 481, 0, 143, 1346,
4367 0, 1350, 0, 712, 0, 0, 0, 720, 721, 722,
4368 914, 1113, 0, 0, 554, 143, 555, 556, 557, 558,
4369 554, 0, 555, 556, 557, 558, 0, 141, 0, 0,
4370 0, 0, 0, 0, 0, 84, 84, 0, 0, 143,
4371 0, 0, 0, 0, 0, 0, 0, 425, 0, 554,
4372 84, 555, 556, 557, 558, 559, 1144, 0, 0, 0,
4373 1144, 0, 1144, 0, 756, 0, 0, 0, 0, 757,
4374 756, 0, 0, 0, 323, 560, 323, 141, 0, 323,
4375 323, 0, 0, 0, 0, 101, 84, 84, 0, 561,
4376 84, 0, 0, 0, 101, 0, 84, 84, 84, 562,
4377 0, 0, 0, 0, 563, 564, 565, 143, 0, 0,
4378 143, 143, 0, 101, 1136, 1136, 143, 0, 0, 1416,
4379 1418, 0, 989, 1420, 1422, 0, 0, 1425, 0, 0,
4380 1144, 0, 0, 0, 0, 994, 0, 996, 566, 0,
4381 143, 567, 303, 143, 0, 0, 0, 0, 0, 0,
4382 0, 0, 0, 0, 1069, 896, 0, 1082, 0, 0,
4383 0, 1005, 1438, 1439, 1441, 1442, 1088, 0, 1089, 842,
4384 1091, 0, 1444, 101, 101, 323, 323, 323, 323, 0,
4385 323, 323, 1136, 1136, 143, 0, 1136, 0, 0, 0,
4386 0, 0, 0, 0, 0, 0, 0, 0, 0, 143,
4387 0, 101, 303, 1136, 0, 0, 0, 0, 0, 0,
4388 1084, 0, 0, 84, 0, 84, 0, 0, 84, 84,
4389 1040, 1042, 0, 1082, 84, 888, 1046, 1048, 0, 0,
4390 0, 0, 0, 84, 0, 0, 0, 0, 323, 1136,
4391 0, 101, 0, 0, 0, 0, 0, 323, 101, 101,
4392 0, 0, 84, 0, 0, 0, 0, 0, 0, 0,
4393 0, 0, 0, 323, 0, 1040, 1042, 0, 1046, 1048,
4394 0, 0, 1136, 0, 0, 1136, 1084, 143, 0, 0,
4395 0, 0, 0, 0, 1070, 0, 0, 0, 0, 1136,
4396 0, 1136, 0, 0, 1136, 1136, 0, 0, 323, 1136,
4397 1136, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4398 0, 1148, 84, 84, 84, 84, 84, 84, 0, 84,
4399 84, 0, 0, 0, 0, 1249, 0, 143, 0, 0,
4400 1253, 0, 0, 323, 0, 1148, 1257, 0, 0, 1270,
4401 84, 0, 101, 0, 953, 954, 0, 0, 0, 0,
4402 1070, 0, 959, 960, 0, 0, 0, 0, 0, 0,
4403 0, 0, 0, 0, 303, 0, 323, 0, 1136, 0,
4404 0, 0, 1243, 0, 0, 0, 1243, 84, 1084, 0,
4405 84, 1084, 0, 1084, 0, 0, 84, 84, 84, 0,
4406 0, 0, 1273, 0, 0, 101, 0, 0, 0, 0,
4407 0, 0, 84, 0, 0, 0, 998, 999, 0, 1001,
4408 1002, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4409 0, 0, 0, 554, 0, 555, 556, 557, 558, 559,
4410 1136, 0, 0, 0, 1136, 0, 1136, 84, 0, 323,
4411 101, 0, 323, 101, 0, 0, 0, 0, 0, 560,
4412 0, 323, 1070, 303, 0, 1070, 823, 1070, 0, 0,
4413 0, 1029, 0, 561, 0, 0, 1258, 0, 0, 0,
4414 1302, 0, 84, 562, 1044, 0, 0, 0, 563, 564,
4415 565, 84, 1382, 0, 1383, 0, 1385, 0, 0, 0,
4416 0, 0, 0, 1390, 0, 0, 0, 0, 0, 0,
4417 101, 0, 101, 1398, 1136, 84, 0, 0, 0, 0,
4418 323, 0, 566, 0, 0, 567, 1068, 0, 0, 0,
4419 0, 323, 0, 101, 323, 0, 1351, 0, 0, 0,
4420 0, 0, 0, 1084, 84, 1084, 1355, 1084, 0, 1084,
4421 823, 823, 0, 0, 1243, 0, 1273, 0, 0, 0,
4422 323, 1273, 0, 1360, 1361, 1362, 1273, 0, 0, 0,
4423 0, 0, 0, 0, 0, 1432, 823, 0, 0, 0,
4424 0, 1433, 0, 1434, 0, 1436, 0, 303, 84, 84,
4425 0, 84, 84, 0, 0, 0, 0, 0, 0, 0,
4426 84, 0, 0, 0, 1443, 84, 0, 0, 0, 0,
4427 0, 1137, 1137, 0, 0, 0, 0, 1070, 0, 1070,
4428 0, 1070, 0, 1070, 0, 0, 0, 0, 1084, 0,
4429 1258, 0, 1273, 0, 1273, 1258, 1273, 0, 1273, 0,
4430 1258, 0, 0, 0, 0, 0, 0, 0, 0, 84,
4431 0, 84, 0, 0, 0, 0, 0, 1273, 0, 84,
4432 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
4433 84, 0, 84, 84, 0, 0, 0, 0, 0, 1137,
4434 1137, 0, 0, 1137, 0, 0, 0, 0, 0, 84,
4435 84, 0, 0, 0, 0, 0, 0, 0, 0, 84,
4436 1137, 0, 1070, 0, 0, 0, 1258, 0, 1258, 0,
4437 1258, 0, 1258, 0, 0, 84, 0, 323, 0, 323,
4438 101, 0, 0, 0, 0, 0, 0, 0, 0, 1284,
4439 0, 1258, 0, 0, 0, 0, 1137, 0, 112, 0,
4440 0, 0, 0, 0, 0, 0, 0, 22, 23, 24,
4441 25, 0, 0, 554, 0, 555, 556, 557, 558, 559,
4442 0, 0, 0, 31, 32, 33, 0, 0, 0, 1137,
4443 0, 0, 1137, 40, 41, 42, 43, 44, 0, 560,
4444 0, 0, 0, 0, 0, 323, 1137, 0, 1137, 112,
4445 112, 1137, 1137, 561, 0, 0, 1137, 1137, 0, 0,
4446 0, 0, 323, 562, 112, 0, 0, 823, 823, 564,
4447 565, 0, 0, 823, 823, 0, 0, 0, 0, 0,
4448 0, 0, 101, 323, 57, 58, 59, 60, 61, 62,
4449 63, 64, 65, 0, 0, 0, 0, 0, 101, 0,
4450 112, 112, 566, 0, 112, 0, 0, 0, 0, 0,
4451 112, 112, 112, 0, 0, 0, 84, 0, 84, 84,
4452 0, 297, 0, 0, 0, 1137, 554, 0, 555, 556,
4453 557, 558, 559, 0, 0, 0, 0, 116, 0, 0,
4454 0, 101, 101, 823, 0, 0, 0, 0, 0, 0,
4455 0, 0, 560, 0, 0, 0, 0, 0, 823, 0,
4456 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4457 0, 0, 0, 0, 0, 101, 562, 0, 0, 0,
4458 0, 563, 564, 565, 84, 0, 0, 1137, 116, 116,
4459 0, 1137, 0, 1137, 0, 0, 0, 0, 0, 101,
4460 0, 84, 0, 116, 0, 0, 84, 84, 0, 0,
4461 0, 0, 84, 84, 0, 566, 0, 0, 567, 0,
4462 0, 84, 84, 0, 0, 0, 0, 112, 0, 112,
4463 0, 0, 112, 112, 0, 0, 0, 84, 112, 116,
4464 116, 0, 0, 116, 0, 0, 0, 112, 0, 116,
4465 116, 116, 0, 0, 0, 0, 0, 0, 0, 0,
4466 0, 1137, 0, 1226, 0, 0, 112, 101, 0, 0,
4467 101, 101, 0, 0, 0, 0, 101, 0, 0, 0,
4468 84, 84, 84, 0, 0, 0, 0, 0, 0, 0,
4469 0, 0, 0, 0, 0, 0, 0, 84, 0, 0,
4470 101, 0, 0, 101, 0, 0, 0, 0, 0, 0,
4471 0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4472 0, 0, 323, 0, 1138, 1138, 112, 112, 112, 112,
4473 112, 112, 0, 112, 112, 0, 0, 0, 84, 0,
4474 0, 0, 0, 0, 101, 0, 0, 0, 0, 0,
4475 0, 0, 0, 0, 112, 0, 0, 0, 0, 101,
4476 0, 0, 0, 0, 0, 0, 116, 0, 116, 0,
4477 0, 116, 116, 0, 0, 0, 0, 116, 0, 0,
4478 0, 0, 0, 0, 0, 1348, 116, 0, 0, 0,
4479 0, 112, 1138, 1138, 112, 0, 1138, 0, 0, 0,
4480 112, 112, 112, 0, 0, 116, 84, 0, 0, 84,
4481 84, 0, 0, 1138, 0, 84, 112, 0, 0, 0,
4482 0, 0, 0, 0, 0, 323, 0, 0, 0, 0,
4483 0, 0, 323, 323, 0, 0, 0, 101, 0, 84,
4484 0, 0, 84, 0, 0, 0, 0, 0, 0, 1138,
4485 0, 112, 0, 0, 0, 0, 0, 1393, 0, 0,
4486 0, 84, 0, 0, 0, 116, 116, 116, 116, 116,
4487 116, 0, 116, 116, 0, 0, 0, 0, 0, 0,
4488 0, 0, 1138, 84, 0, 1138, 112, 101, 0, 0,
4489 0, 0, 0, 116, 0, 112, 0, 0, 84, 1138,
4490 0, 1138, 0, 0, 1138, 1138, 0, 0, 0, 1138,
4491 1138, 0, 0, 0, 0, 0, 0, 0, 0, 112,
4492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4493 116, 1139, 1139, 116, 0, 0, 0, 0, 0, 116,
4494 116, 116, 0, 0, 0, 0, 0, 0, 112, 0,
4495 0, 0, 0, 0, 0, 116, 0, 0, 0, 0,
4496 0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4497 0, 84, 84, 0, 0, 0, 84, 0, 1138, 0,
4498 1140, 1140, 0, 0, 0, 0, 0, 0, 0, 0,
4499 116, 0, 112, 112, 0, 112, 112, 0, 0, 1139,
4500 1139, 0, 0, 1139, 112, 0, 0, 0, 0, 112,
4501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4502 1139, 0, 0, 0, 0, 116, 84, 0, 0, 0,
4503 0, 0, 0, 0, 116, 0, 0, 0, 0, 0,
4504 1138, 0, 0, 0, 1138, 0, 1138, 0, 1140, 1140,
4505 0, 0, 1140, 112, 0, 112, 1139, 0, 116, 0,
4506 0, 0, 0, 112, 0, 0, 0, 0, 0, 1140,
4507 0, 0, 0, 0, 112, 0, 112, 112, 0, 0,
4508 0, 0, 0, 0, 0, 0, 0, 116, 0, 1139,
4509 0, 0, 1139, 112, 112, 0, 0, 0, 0, 0,
4510 0, 0, 0, 112, 0, 1140, 1139, 0, 1139, 0,
4511 0, 1139, 1139, 0, 1138, 0, 1139, 1139, 0, 112,
4512 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4513 0, 116, 116, 0, 116, 116, 0, 0, 1140, 0,
4514 0, 1140, 0, 116, 0, 0, 0, 0, 116, 0,
4515 0, 0, 1141, 1141, 0, 1140, 0, 1140, 0, 0,
4516 1140, 1140, 0, 0, 0, 1140, 1140, 0, 0, 0,
4517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4518 0, 0, 0, 0, 0, 1139, 0, 0, 0, 0,
4519 0, 0, 116, 0, 116, 0, 0, 0, 0, 0,
4520 0, 0, 116, 0, 0, 0, 0, 0, 0, 0,
4521 0, 0, 0, 116, 0, 116, 116, 0, 0, 0,
4522 1141, 1141, 0, 0, 1141, 0, 0, 0, 0, 0,
4523 0, 0, 116, 116, 1140, 0, 0, 0, 0, 0,
4524 0, 1141, 116, 0, 0, 0, 0, 1139, 0, 0,
4525 0, 1139, 0, 1139, 0, 0, 0, 0, 116, 0,
4526 112, 0, 112, 112, 0, 0, 0, 0, 0, 0,
4527 0, 1142, 1142, 0, 0, 0, 0, 1141, 0, 80,
4528 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4529 0, 0, 0, 0, 0, 0, 1140, 0, 0, 0,
4530 1140, 0, 1140, 0, 0, 0, 0, 0, 0, 0,
4531 1141, 0, 0, 1141, 0, 0, 0, 0, 0, 0,
4532 0, 1139, 0, 0, 0, 0, 0, 1141, 112, 1141,
4533 80, 80, 1141, 1141, 299, 0, 0, 1141, 1141, 1142,
4534 1142, 0, 0, 1142, 0, 112, 0, 0, 0, 0,
4535 112, 112, 0, 0, 0, 0, 112, 112, 0, 0,
4536 1142, 0, 0, 0, 0, 112, 112, 299, 0, 0,
4537 1140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4538 0, 112, 0, 0, 0, 0, 299, 299, 299, 0,
4539 0, 80, 80, 80, 0, 0, 1142, 0, 0, 116,
4540 0, 116, 116, 0, 0, 0, 1141, 0, 0, 0,
4541 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4542 0, 0, 0, 0, 112, 112, 112, 0, 0, 1142,
4543 0, 0, 1142, 0, 0, 0, 0, 0, 0, 0,
4544 0, 112, 0, 1143, 1143, 0, 1142, 0, 1142, 0,
4545 0, 1142, 1142, 0, 0, 0, 1142, 1142, 112, 0,
4546 0, 0, 0, 0, 0, 0, 0, 116, 1141, 0,
4547 0, 0, 1141, 0, 1141, 0, 0, 0, 0, 0,
4548 0, 0, 112, 0, 116, 0, 0, 0, 0, 116,
4549 116, 0, 0, 0, 0, 116, 116, 0, 0, 0,
4550 0, 0, 0, 0, 116, 116, 0, 0, 80, 0,
4551 80, 1143, 1143, 0, 0, 1143, 0, 0, 0, 80,
4552 116, 0, 0, 0, 0, 1142, 0, 0, 80, 0,
4553 0, 0, 1143, 0, 0, 0, 0, 0, 0, 0,
4554 0, 0, 1141, 0, 81, 0, 0, 80, 0, 0,
4555 112, 0, 0, 112, 112, 0, 0, 0, 0, 112,
4556 0, 0, 0, 116, 116, 116, 0, 0, 1143, 0,
4557 0, 0, 0, 0, 0, 0, 299, 0, 0, 0,
4558 116, 0, 0, 112, 0, 0, 112, 1142, 0, 0,
4559 0, 1142, 0, 1142, 0, 81, 81, 116, 0, 300,
4560 0, 1143, 0, 0, 1143, 112, 0, 80, 80, 0,
4561 0, 0, 0, 0, 0, 0, 0, 0, 1143, 0,
4562 1143, 116, 0, 1143, 1143, 0, 0, 112, 1143, 1143,
4563 0, 0, 300, 0, 0, 80, 299, 0, 0, 0,
4564 0, 0, 112, 0, 0, 0, 0, 0, 0, 0,
4565 0, 300, 300, 300, 0, 0, 81, 81, 81, 0,
4566 0, 1142, 0, 0, 0, 0, 0, 0, 0, 0,
4567 0, 0, 80, 0, 0, 80, 0, 0, 0, 0,
4568 0, 0, 80, 80, 0, 0, 0, 0, 0, 116,
4569 0, 0, 116, 116, 0, 0, 0, 1143, 116, 0,
4570 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
4571 0, 0, 0, 0, 0, 112, 112, 0, 0, 0,
4572 112, 0, 116, 0, 0, 116, 0, 0, 0, 0,
4573 0, 0, 80, 0, 0, 0, 0, 0, 0, 0,
4574 0, 0, 0, 0, 116, 0, 0, 0, 0, 0,
4575 0, 0, 0, 0, 0, 0, 0, 0, 0, 1143,
4576 0, 0, 0, 1143, 0, 1143, 116, 80, 0, 0,
4577 112, 0, 0, 81, 0, 81, 80, 0, 0, 0,
4578 0, 116, 0, 0, 81, 0, 0, 0, 0, 0,
4579 0, 0, 0, 81, 0, 0, 0, 0, 299, 0,
4580 80, 362, 363, 364, 365, 366, 367, 368, 369, 0,
4581 371, 372, 81, 0, 0, 0, 0, 0, 375, 376,
4582 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4583 0, 0, 0, 1143, 0, 0, 0, 0, 0, 0,
4584 0, 300, 0, 0, 0, 0, 0, 116, 0, 0,
4585 0, 0, 0, 0, 116, 116, 0, 0, 0, 116,
4586 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
4587 0, 0, 81, 81, 80, 0, 0, 80, 144, 0,
4588 0, 0, 0, 0, 0, 0, 0, 299, 0, 0,
4589 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4590 81, 300, 0, 0, 0, 0, 0, 0, 0, 116,
4591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4592 0, 0, 0, 0, 0, 0, 0, 0, 0, 144,
4593 144, 0, 0, 306, 80, 0, 80, 81, 0, 0,
4594 81, 0, 0, 0, 80, 0, 0, 81, 81, 0,
4595 0, 0, 0, 0, 0, 80, 0, 80, 0, 0,
4596 0, 0, 0, 0, 0, 0, 306, 0, 0, 0,
4597 0, 0, 0, 0, 80, 80, 0, 0, 0, 0,
4598 0, 0, 0, 0, 0, 416, 426, 426, 0, 0,
4599 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
4600 80, 0, 0, 0, 0, 0, 0, 0, -857, 0,
4601 0, 299, 0, 0, 0, 0, -857, -857, -857, 0,
4602 0, -857, -857, -857, 0, -857, 0, 0, 0, 91,
4603 0, 0, 81, -857, -857, -857, 0, 0, 0, 0,
4604 0, 81, 0, 0, 0, -857, -857, 0, -857, -857,
4605 -857, -857, -857, 0, 0, 0, 0, 0, 0, 0,
4606 0, 0, 0, 300, 0, 81, 0, 0, 0, 0,
4607 0, 0, 0, 0, 0, 0, -857, -857, 0, 0,
4608 91, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4609 0, 299, 0, 0, 81, 0, 0, 0, 0, 0,
4610 0, 0, 0, 0, 0, -857, -857, 0, 0, 0,
4611 0, 0, 0, 0, 0, 0, 0, 0, 144, 0,
4612 362, -858, -858, -858, -858, 367, 368, 144, -857, -858,
4613 -858, 0, 0, 0, 0, 0, 411, 375, 376, 81,
4614 0, 0, 81, 0, 80, 0, 144, 0, 0, 0,
4615 0, 0, 300, 0, 0, 81, 0, 0, 0, -857,
4616 -857, 0, -857, 0, 0, 230, -857, 0, -857, 0,
4617 0, 0, 0, 0, 0, 306, 0, 0, 0, 379,
4618 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
4619 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4620 0, 81, 0, 0, 0, 0, 144, 144, 0, 81,
4621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4622 81, 0, 81, 0, 0, 0, 80, 0, 0, 0,
4623 0, 80, 80, 0, 144, 306, 0, 80, 80, 81,
4624 81, 0, 0, 0, 0, 0, 80, 0, 0, 946,
4625 362, 363, 364, 365, 366, 367, 368, 0, 0, 371,
4626 372, 0, 80, 0, 0, 81, 0, 375, 376, 91,
4627 0, 0, 0, 0, 144, 0, 300, 0, 91, 140,
4628 0, 144, 144, 362, 363, 364, 365, 366, 367, 368,
4629 369, 370, 371, 372, 373, 374, 0, 91, 0, 0,
4630 375, 376, 0, 0, 0, 80, 80, 80, 0, 379,
4631 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
4632 0, 0, 80, 0, 0, 0, 0, 0, 0, 0,
4633 140, 140, 0, 0, 304, 0, 0, 0, 0, 80,
4634 378, 0, 379, 380, 381, 382, 383, 384, 385, 386,
4635 387, 388, 0, 0, 0, 0, 300, 91, 91, 0,
4636 -298, 0, 0, 80, 0, 0, 0, 304, 0, 0,
4637 0, 0, 0, 0, 0, 144, 0, 0, 0, 0,
4638 0, 0, 0, 0, 0, 91, 414, 424, 424, 424,
4639 0, 0, 0, 0, 0, 0, 0, 306, 0, 0,
4640 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4641 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4642 0, 0, 0, 0, 0, 91, 0, 299, 144, 0,
4643 0, 80, 91, 91, 80, 80, 0, 0, 0, 0,
4644 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4646 0, 0, 0, 0, 80, 0, 0, 80, 0, 0,
4647 0, 0, 0, 144, 0, 0, 144, 0, 0, 0,
4648 0, 0, 0, 0, 0, 0, 306, 0, 0, 824,
4649 0, 81, 0, 0, 0, 0, 81, 81, 0, 0,
4650 0, 0, 81, 81, 0, 0, 0, 0, 80, 0,
4651 0, 81, 0, 0, 0, 0, 0, 0, 0, 140,
4652 0, 0, 0, 80, 0, 0, 91, 81, 140, 0,
4653 0, 0, 0, 144, 0, 144, 0, 0, 0, 0,
4654 0, 0, 0, 0, 0, 0, 0, 140, 0, 299,
4655 0, 0, 0, 0, 0, 0, 144, 0, 0, 0,
4656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4657 81, 81, 81, 824, 824, 0, 304, 0, 0, 91,
4658 0, 0, 0, 0, 0, 0, 0, 81, 0, 80,
4659 0, 0, 0, 0, 0, 0, 0, 0, 0, 824,
4660 361, 80, 0, 0, 81, 0, 0, 140, 140, 0,
4661 306, 0, 0, 0, 0, 0, 0, 0, 0, 905,
4662 0, 299, 0, 0, 91, 0, 0, 91, 81, 0,
4663 0, 0, 0, 0, 0, 140, 304, 0, 0, 0,
4664 818, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4665 0, 80, 0, 362, 363, 364, 365, 366, 367, 368,
4666 369, 370, 371, 372, 373, 374, 0, 0, 0, 0,
4667 375, 376, 0, 0, 0, 140, 377, 0, 0, 0,
4668 0, 0, 140, 140, 91, 0, 91, 0, 0, 0,
4669 306, 0, 300, 0, 0, 0, 81, 0, 0, 81,
4670 81, 0, 0, 0, 0, 81, 0, 91, 0, 0,
4671 378, 0, 379, 380, 381, 382, 383, 384, 385, 386,
4672 387, 388, 0, 0, 818, 818, 946, 0, 0, 81,
4673 0, 0, 81, 0, 0, 0, 0, 0, 0, 0,
4674 0, 0, 0, 144, 0, 0, 0, 0, 0, 0,
4675 818, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4676 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
4677 372, 373, 374, 81, 0, 0, 140, 375, 376, 0,
4678 0, 0, 0, 0, 0, 0, 0, 0, 81, 0,
4679 0, 0, 0, 0, 0, 0, 0, 0, 304, 0,
4680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4681 0, 0, 0, 0, 300, 0, 0, 378, 0, 379,
4682 380, 381, 382, 383, 384, 385, 386, 387, 388, 140,
4683 824, 824, 0, 0, 0, 0, 824, 824, 0, 0,
4684 0, 0, 0, 0, 0, 144, 0, 0, 0, 0,
4685 0, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4686 0, 144, 0, 0, 0, 0, 81, 0, 0, 0,
4687 0, 0, 0, 0, 140, 0, 0, 140, 0, 0,
4688 0, 0, 0, 0, 0, 0, 300, 304, 0, 0,
4689 0, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4690 0, 0, 0, 0, 144, 144, 824, 0, 0, 0,
4691 0, 0, 0, 0, 0, 0, 81, 0, 0, 0,
4692 0, 824, 0, 0, 0, 0, 0, 0, 0, 0,
4693 0, 0, 0, 0, 140, 0, 140, 0, 144, 0,
4694 0, 362, 363, 364, 365, 366, 367, 368, 369, 370,
4695 371, 372, 373, 374, 0, 0, 0, 140, 375, 376,
4696 0, 0, 144, 0, 0, 0, 0, 0, 0, 0,
4697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4698 0, 818, 818, 0, 0, 0, 0, 818, 818, 0,
4699 0, 0, 0, 0, 0, 0, 91, 0, 378, 0,
4700 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
4701 0, 304, 91, 0, 0, 0, 0, 234, 0, 0,
4702 0, 0, 0, 0, 0, 0, 1229, 0, 0, 0,
4703 144, 0, 0, 144, 144, 0, 0, 0, 0, 144,
4704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4705 0, 0, 0, 0, 0, 91, 91, 818, 22, 23,
4706 24, 25, 0, 144, 0, 0, 144, 0, 0, 0,
4707 0, 0, 818, 0, 31, 32, 33, 1101, 0, 0,
4708 0, 1102, 0, 0, 40, 41, 42, 43, 44, 91,
4709 0, 304, 0, 0, 0, 0, 0, 0, 0, 0,
4710 0, 0, 0, 0, 0, 0, 0, 144, 0, 0,
4711 0, 0, 0, 91, 0, 0, 1104, 1105, 0, 0,
4712 0, 0, 144, 0, 1106, 0, 0, 1107, 0, 1108,
4713 1109, 0, 1110, 0, 0, 57, 58, 59, 60, 61,
4714 62, 63, 64, 65, 140, 0, 0, 0, 426, 0,
4715 0, 0, 0, 0, 0, 256, 264, 265, 266, 0,
4716 0, 0, 282, 282, 0, 1112, 0, 0, 0, 0,
4717 0, 0, 297, 0, 0, 322, 324, 1225, 0, 234,
4718 0, 91, 0, 0, 91, 91, 0, 0, 0, 0,
4719 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4720 144, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4721 0, 0, 0, 0, 91, 0, 0, 91, 0, 0,
4722 426, 282, 282, 282, 0, 0, 0, 0, 0, 0,
4723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4724 0, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4725 144, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4726 0, 0, 140, 0, 0, -857, 3, 0, 4, 5,
4727 6, 7, 8, 91, 0, 0, 9, 10, 0, 0,
4728 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
4729 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
4730 24, 25, 0, 0, 26, 140, 140, 0, 0, 0,
4731 27, 28, 268, 30, 31, 32, 33, 34, 35, 36,
4732 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4733 46, 0, 0, 0, 0, 0, 0, 0, 282, 140,
4734 282, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4735 0, 91, 0, 0, 0, 0, 49, 50, 0, 322,
4736 0, 0, 0, 140, 51, 0, 0, 52, 53, 54,
4737 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4738 62, 63, 64, 65, 0, -857, 282, 282, 282, 0,
4739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4740 0, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4741 0, 0, 66, 67, 68, 0, 0, 0, 0, -857,
4742 0, 0, 0, 0, 0, -857, 0, 1227, 0, 0,
4743 0, 140, 0, 0, 140, 140, 0, 0, 0, 0,
4744 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4745 0, 362, 363, 364, 365, 366, 367, 368, 369, 370,
4746 371, 372, -858, -858, 140, 0, 0, 140, 375, 376,
4747 614, 615, 616, 617, 618, 0, 0, 619, 620, 621,
4748 622, 623, 624, 625, 626, 0, 628, 0, 0, 629,
4749 630, 631, 632, 633, 634, 635, 636, 637, 638, 0,
4750 0, 0, 282, 0, 0, 0, 0, 0, 140, 0,
4751 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
4752 0, 0, 0, 140, 0, 0, 0, 0, 0, 0,
4753 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4754 0, 0, 0, 0, 0, 0, 0, 0, 0, 424,
4755 0, 0, 282, 0, 0, 0, 0, 0, 0, 0,
4756 0, 0, 282, 0, 0, 0, 0, 0, 0, 0,
4757 0, 0, 266, 0, 0, 0, 0, 0, 0, 0,
4758 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4759 707, 0, 0, 0, 0, 0, 0, 282, 0, 0,
4760 0, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4761 0, 0, 0, 282, 0, 282, 0, 0, 282, 0,
4762 0, 424, -857, 3, 0, 4, 5, 6, 7, 8,
4763 282, 0, 0, 9, 10, 0, 0, 0, 11, 0,
4764 12, 13, 14, 15, 16, 17, 18, 0, 752, 0,
4765 0, 140, 19, 20, 21, 22, 23, 24, 25, 0,
4766 0, 26, 0, 0, 0, 0, 0, 27, 28, 29,
4767 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4768 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4769 0, 0, 0, 0, 0, 282, 0, 0, 47, 48,
4770 0, 0, 0, 788, 0, 0, 788, 0, 0, 0,
4771 0, 0, 0, 49, 50, 282, 0, 0, 0, 0,
4772 819, 51, 0, 0, 52, 53, 54, 55, 0, 56,
4773 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4774 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4776 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4777 67, 68, 0, 0, 282, 0, -857, 0, 0, 0,
4778 0, 0, -857, 0, 0, 282, 0, 0, 0, 0,
4779 0, 0, 0, 282, 0, 0, 282, 0, 0, 0,
4780 0, 0, 0, 0, 880, 880, 0, 0, 282, 0,
4781 282, 0, 0, 0, 0, 0, 0, 0, 788, 788,
4782 880, 0, 0, 0, 0, 0, 0, 0, 880, 880,
4783 880, 0, 0, 0, 0, 282, 0, 0, 0, 0,
4784 0, 0, -4, 3, 0, 4, 5, 6, 7, 8,
4785 -4, -4, -4, 9, 10, 0, -4, -4, 11, -4,
4786 12, 13, 14, 15, 16, 17, 18, -4, 0, 0,
4787 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4788 0, 26, 282, 0, 0, 0, 0, 27, 28, 268,
4789 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4790 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4791 -4, 282, 0, 0, 0, 0, 0, 0, 47, 48,
4792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4793 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
4794 0, 51, 0, 282, 52, 53, 54, 55, 0, 56,
4795 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4796 65, 282, -4, 0, 0, 0, 0, 0, 0, 0,
4797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4798 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4799 67, 68, 0, 0, -4, 0, 880, 0, 0, 0,
4800 -4, 0, 543, 0, 0, 0, 0, 22, 23, 24,
4801 25, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4802 0, 0, 0, 31, 32, 33, 1101, 0, 0, 0,
4803 1102, 0, 1103, 40, 41, 42, 43, 44, 0, 788,
4804 0, 0, 0, 0, 0, 0, 0, 0, 282, 0,
4805 0, 0, 560, 0, 0, 0, 282, 0, 0, 0,
4806 1038, 880, 880, 0, 0, 1104, 1105, 880, 880, 0,
4807 0, 282, 0, 1106, 0, 0, 1107, 0, 1108, 1109,
4808 0, 1110, 564, 282, 57, 58, 1111, 60, 61, 62,
4809 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4810 0, 0, 0, 282, 0, 788, 880, 880, 0, 880,
4811 880, 0, 0, 0, 1112, 0, 0, 0, 0, 0,
4812 0, 297, 0, 0, 0, 0, 0, 0, 0, 1092,
4813 1093, 0, 0, 282, 0, 0, 0, 880, 1099, -4,
4814 3, 0, 4, 5, 6, 7, 8, 0, 0, 0,
4815 9, 10, 880, 0, 0, 11, 0, 12, 13, 14,
4816 15, 16, 17, 18, 0, 0, 0, 0, 282, 19,
4817 20, 21, 22, 23, 24, 25, 880, 0, 26, 0,
4818 0, 0, 0, 0, 27, 28, 29, 30, 31, 32,
4819 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4820 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
4821 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4822 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4823 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
4824 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
4825 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4826 0, 0, 0, 0, 0, 0, 282, 0, 0, 0,
4827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4828 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4829 0, -4, -839, 0, 0, 0, 0, 0, 0, 543,
4830 -839, -839, -839, 0, 0, -839, -839, -839, 0, -839,
4831 0, 0, 0, 0, 0, 0, 0, -839, -839, -839,
4832 -839, -839, 0, 0, 0, 0, 0, 0, 0, -839,
4833 -839, 0, -839, -839, -839, -839, -839, 0, 0, 0,
4834 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
4835 372, 373, 374, 0, 0, 0, 0, 375, 376, 0,
4836 -839, -839, 0, 0, 0, 0, 0, 0, 0, 0,
4837 -839, -839, -839, -839, -839, -839, -839, -839, -839, -839,
4838 -839, -839, -839, 0, 0, 0, 0, -839, -839, -839,
4839 -839, 0, 890, -839, 0, 0, 0, 378, -839, 379,
4840 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
4841 0, 0, -839, 0, 0, -839, 0, 0, 0, 282,
4842 0, 0, 0, 0, 0, 0, -146, -839, -839, -839,
4843 -839, -839, -839, -839, -839, -839, -839, -839, -839, 0,
4844 0, 0, 0, -839, -839, -839, -839, -839, -703, 0,
4845 -839, -839, -839, 0, 0, 0, -703, -703, -703, 0,
4846 0, -703, -703, -703, 0, -703, 0, 0, 0, 0,
4847 0, 0, 0, -703, 0, -703, -703, -703, 0, 0,
4848 0, 0, 0, 0, 0, -703, -703, 0, -703, -703,
4849 -703, -703, -703, 0, 0, 0, 0, 0, 0, 0,
4850 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4851 0, 0, 0, 0, 0, 0, -703, -703, 0, 0,
4852 0, 0, 0, 0, 0, 0, -703, -703, -703, -703,
4853 -703, -703, -703, -703, -703, -703, -703, -703, -703, 0,
4854 0, 0, 0, -703, -703, -703, -703, 0, -703, -703,
4855 0, 0, 0, 0, -703, 0, 0, 0, 0, 0,
4856 0, 0, 0, 0, 0, 0, 0, 0, -703, 0,
4857 0, -703, 0, 0, 0, 0, 0, 0, 0, 0,
4858 0, 0, -703, -703, -703, -703, -703, -703, -703, -703,
4859 -703, -703, -703, -703, -703, 0, 0, 0, 0, 0,
4860 -703, -703, -703, -703, -704, 0, -703, -703, -703, 0,
4861 0, 0, -704, -704, -704, 0, 0, -704, -704, -704,
4862 0, -704, 0, 0, 0, 0, 0, 0, 0, -704,
4863 0, -704, -704, -704, 0, 0, 0, 0, 0, 0,
4864 0, -704, -704, 0, -704, -704, -704, -704, -704, 0,
4865 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4866 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4867 0, 0, -704, -704, 0, 0, 0, 0, 0, 0,
4868 0, 0, -704, -704, -704, -704, -704, -704, -704, -704,
4869 -704, -704, -704, -704, -704, 0, 0, 0, 0, -704,
4870 -704, -704, -704, 0, -704, -704, 0, 0, 0, 0,
4871 -704, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4872 0, 0, 0, 0, -704, 0, 0, -704, 0, 0,
4873 0, 0, 0, 0, 0, 0, 0, 0, -704, -704,
4874 -704, -704, -704, -704, -704, -704, -704, -704, -704, -704,
4875 -704, 0, 0, 0, 0, 0, -704, -704, -704, -704,
4876 -840, 0, -704, -704, -704, 0, 0, 0, -840, -840,
4877 -840, 0, 0, -840, -840, -840, 0, -840, 0, 0,
4878 0, 0, 0, 0, 0, -840, -840, -840, -840, -840,
4879 0, 0, 0, 0, 0, 0, 0, -840, -840, 0,
4880 -840, -840, -840, -840, -840, 0, 0, 0, 0, 0,
4881 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4882 0, 0, 0, 0, 0, 0, 0, 0, -840, -840,
4883 0, 0, 0, 0, 0, 0, 0, 0, -840, -840,
4884 -840, -840, -840, -840, -840, -840, -840, -840, -840, -840,
4885 -840, 0, 0, 0, 0, -840, -840, -840, -840, 0,
4886 0, -840, 0, 0, 0, 0, -840, 0, 0, 0,
4887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4888 -840, 0, 0, -840, 0, 0, 0, 0, 0, 0,
4889 0, 0, 0, 0, 0, -840, -840, -840, -840, -840,
4890 -840, -840, -840, -840, -840, -840, -840, 0, 0, 0,
4891 0, -840, -840, -840, -840, -840, -841, 0, -840, -840,
4892 -840, 0, 0, 0, -841, -841, -841, 0, 0, -841,
4893 -841, -841, 0, -841, 0, 0, 0, 0, 0, 0,
4894 0, -841, -841, -841, -841, -841, 0, 0, 0, 0,
4895 0, 0, 0, -841, -841, 0, -841, -841, -841, -841,
4896 -841, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4897 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4898 0, 0, 0, 0, -841, -841, 0, 0, 0, 0,
4899 0, 0, 0, 0, -841, -841, -841, -841, -841, -841,
4900 -841, -841, -841, -841, -841, -841, -841, 0, 0, 0,
4901 0, -841, -841, -841, -841, 0, 0, -841, 0, 0,
4902 0, 0, -841, 0, 0, 0, 0, 0, 0, 0,
4903 0, 0, 0, 0, 0, 0, -841, 0, 0, -841,
4904 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4905 0, -841, -841, -841, -841, -841, -841, -841, -841, -841,
4906 -841, -841, -841, 0, 0, 0, 0, -841, -841, -841,
4907 -841, -841, -517, 0, -841, -841, -841, 0, 0, 0,
4908 -517, -517, -517, 0, 0, -517, -517, -517, 0, -517,
4909 0, 0, 0, 0, 0, 0, 0, -517, -517, -517,
4910 -517, 0, 0, 0, 0, 0, 0, 0, 0, -517,
4911 -517, 0, -517, -517, -517, -517, -517, 0, 0, 0,
4912 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4914 -517, -517, 0, 0, 0, 0, 0, 0, 0, 0,
4915 -517, -517, -517, -517, -517, -517, -517, -517, -517, -517,
4916 -517, -517, -517, 0, 0, 0, 0, -517, -517, -517,
4917 -517, 0, 0, -517, 0, 0, 0, 0, -517, 0,
4918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4919 0, 0, -517, 0, 0, 0, 0, 0, 0, 0,
4920 0, 0, 0, 0, 0, 0, 0, -517, 0, -517,
4921 -517, -517, -517, -517, -517, -517, -517, -517, -517, 0,
4922 0, 0, 0, -517, -517, -517, -517, -517, -350, 230,
4923 -517, -517, -517, 0, 0, 0, -350, -350, -350, 0,
4924 0, -350, -350, -350, 0, -350, 0, 0, 0, 0,
4925 0, 0, 0, -350, 0, -350, -350, -350, 0, 0,
4926 0, 0, 0, 0, 0, -350, -350, 0, -350, -350,
4927 -350, -350, -350, 0, 0, 0, 0, 0, 0, 0,
4928 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4929 0, 0, 0, 0, 0, 0, -350, -350, 0, 0,
4930 0, 0, 0, 0, 0, 0, -350, -350, -350, -350,
4931 -350, -350, -350, -350, -350, -350, -350, -350, -350, 0,
4932 0, 0, 0, -350, -350, -350, -350, 0, 0, -350,
4933 0, 0, 0, 0, -350, 0, 0, 0, 0, 0,
4934 0, 0, 0, 0, 0, 0, 0, 0, -350, 0,
4935 0, -350, 0, 0, 0, 0, 0, 0, 0, 0,
4936 0, 0, 0, -350, -350, -350, -350, -350, -350, -350,
4937 -350, -350, -350, -350, -350, 0, 0, 0, 0, 0,
4938 -350, -350, -350, -350, -857, 0, -350, -350, -350, 0,
4939 0, 0, -857, -857, -857, 0, 0, -857, -857, -857,
4940 0, -857, 0, 0, 0, 0, 0, 0, 0, -857,
4941 -857, -857, -857, 0, 0, 0, 0, 0, 0, 0,
4942 0, -857, -857, 0, -857, -857, -857, -857, -857, 0,
4943 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4944 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4945 0, 0, -857, -857, 0, 0, 0, 0, 0, 0,
4946 0, 0, -857, -857, -857, -857, -857, -857, -857, -857,
4947 -857, -857, -857, -857, -857, 0, 0, 0, 0, -857,
4948 -857, -857, -857, 0, 0, -857, 0, 0, 0, 0,
4949 -857, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4950 0, 0, 0, 0, -857, 0, 0, 0, 0, 0,
4951 0, 0, 0, 0, 0, 0, 0, 0, 0, -857,
4952 0, -857, -857, -857, -857, -857, -857, -857, -857, -857,
4953 -857, 0, 0, 0, 0, -857, -857, -857, -857, -857,
4954 -356, 230, -857, -857, -857, 0, 0, 0, -356, -356,
4955 -356, 0, 0, -356, -356, -356, 0, -356, 0, 0,
4956 0, 0, 0, 0, 0, -356, 0, -356, -356, 0,
4957 0, 0, 0, 0, 0, 0, 0, -356, -356, 0,
4958 -356, -356, -356, -356, -356, 0, 0, 0, 0, 0,
4959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4960 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4961 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4962 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4963 -356, 0, 0, 0, 0, -356, -356, -356, -356, 0,
4964 891, -356, 0, 0, 0, 0, -356, 0, 0, 0,
4965 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4966 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4967 0, 0, 0, 0, -147, -356, 0, -356, -356, -356,
4968 -356, -356, -356, -356, -356, -356, -356, 0, 0, 0,
4969 0, 830, -356, -356, -356, -356, -363, 0, -356, -356,
4970 -356, 0, 0, 0, -363, -363, -363, 0, 0, -363,
4971 -363, -363, 0, -363, 0, 0, 0, 0, 0, 0,
4972 0, -363, 0, -363, -363, 0, 0, 0, 0, 0,
4973 0, 0, 0, -363, -363, 0, -363, -363, -363, -363,
4974 -363, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4975 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4976 0, 0, 0, 0, -363, -363, 0, 0, 0, 0,
4977 0, 0, 0, 0, -363, -363, -363, -363, -363, -363,
4978 -363, -363, -363, -363, -363, -363, -363, 0, 0, 0,
4979 0, -363, -363, -363, -363, 0, 0, -363, 0, 0,
4980 0, 0, -363, 0, 0, 0, 0, 0, 0, 0,
4981 0, 0, 0, 0, 0, 0, -363, 0, 0, 0,
4982 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4983 0, -363, 0, -363, -363, -363, -363, -363, -363, -363,
4984 -363, -363, -363, 0, 0, 0, 0, 0, -363, -363,
4985 -363, -363, -393, 454, -363, -363, -363, 0, 0, 0,
4986 -393, -393, -393, 0, 0, -393, -393, -393, 0, -393,
4987 0, 0, 0, 0, 0, 0, 0, -393, 0, -393,
4988 -393, 0, 0, 0, 0, 0, 0, 0, 0, -393,
4989 -393, 0, -393, -393, -393, -393, -393, 0, 0, 0,
4990 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4991 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4992 -393, -393, 0, 0, 0, 0, 0, 0, 0, 0,
4993 -393, -393, -393, -393, -393, -393, -393, -393, -393, -393,
4994 -393, -393, -393, 0, 0, 0, 0, -393, -393, -393,
4995 -393, 0, 0, -393, 0, 0, 0, 0, -393, 0,
4996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4997 0, 0, -393, 0, 0, 0, 0, 0, 0, 0,
4998 0, 0, 0, 0, 0, 0, 0, -393, 0, -393,
4999 -393, -393, -393, -393, -393, -393, -393, -393, -393, 0,
5000 0, 0, 0, 0, -393, -393, -393, -393, -394, 0,
5001 -393, -393, -393, 0, 0, 0, -394, -394, -394, 0,
5002 0, -394, -394, -394, 0, -394, 0, 0, 0, 0,
5003 0, 0, 0, -394, 0, -394, -394, 0, 0, 0,
5004 0, 0, 0, 0, 0, -394, -394, 0, -394, -394,
5005 -394, -394, -394, 0, 0, 0, 0, 0, 0, 0,
5006 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5007 0, 0, 0, 0, 0, 0, -394, -394, 0, 0,
5008 0, 0, 0, 0, 0, 0, -394, -394, -394, -394,
5009 -394, -394, -394, -394, -394, -394, -394, -394, -394, 0,
5010 0, 0, 0, -394, -394, -394, -394, 0, 0, -394,
5011 0, 0, 0, 0, -394, 0, 0, 0, 0, 0,
5012 0, 0, 0, 0, 0, 0, 0, 0, -394, 0,
5013 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5014 0, 0, 0, -394, 0, -394, -394, -394, -394, -394,
5015 -394, -394, -394, -394, -394, 0, 0, 0, 0, 0,
5016 -394, -394, -394, -394, -360, 0, -394, -394, -394, 0,
5017 0, 0, -360, -360, -360, 0, 0, -360, -360, -360,
5018 0, -360, 0, 0, 0, 0, 0, 0, 0, -360,
5019 0, -360, -360, 0, 0, 0, 0, 0, 0, 0,
5020 0, -360, -360, 0, -360, -360, -360, -360, -360, 0,
5021 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5022 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5023 0, 0, -360, -360, 0, 0, 0, 0, 0, 0,
5024 0, 0, -360, -360, -360, -360, -360, -360, -360, -360,
5025 -360, -360, -360, -360, -360, 0, 0, 0, 0, -360,
5026 -360, -360, -360, 0, 0, -360, 0, 0, 0, 0,
5027 -360, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5028 0, 0, 0, 0, -360, 0, 0, 0, 0, 0,
5029 0, 0, 0, 0, 0, 0, 0, 0, 0, -360,
5030 0, -360, -360, -360, -360, -360, -360, -360, -360, -360,
5031 -360, 0, 0, 0, 0, 0, -360, -360, -360, -360,
5032 -839, 0, -360, -360, -360, 0, 0, 0, -839, -839,
5033 -839, 0, 0, 0, -839, -839, 0, -839, 0, 0,
5034 0, 0, 0, 0, 0, -839, -839, 0, 0, 0,
5035 0, 0, 0, 0, 0, 0, 0, -839, -839, 0,
5036 -839, -839, -839, -839, -839, 0, 0, 0, 0, 0,
5037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5038 0, 0, 0, 0, 0, 0, 0, 0, -839, -839,
5039 0, 0, 0, 0, 0, 0, 0, 0, -839, -839,
5040 -839, -839, -839, -839, -839, -839, -839, -839, -839, -839,
5041 -839, 0, 0, 0, 0, -839, -839, -839, -839, 0,
5042 828, -839, 0, 0, 0, 0, 0, 0, 0, 0,
5043 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5044 -839, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5045 0, 0, 0, 0, -146, -839, 0, -839, -839, -839,
5046 -839, -839, -839, -839, -839, -839, -839, 0, 0, 0,
5047 0, -839, -839, -839, -839, -137, -839, 0, -839, 0,
5048 -839, 0, 0, 0, -839, -839, -839, 0, 0, 0,
5049 -839, -839, 0, -839, 0, 0, 0, 0, 0, 0,
5050 0, -839, -839, 0, 0, 0, 0, 0, 0, 0,
5051 0, 0, 0, -839, -839, 0, -839, -839, -839, -839,
5052 -839, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5053 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5054 0, 0, 0, 0, -839, -839, 0, 0, 0, 0,
5055 0, 0, 0, 0, -839, -839, -839, -839, -839, -839,
5056 -839, -839, -839, -839, -839, -839, -839, 0, 0, 0,
5057 0, -839, -839, -839, -839, 0, 828, -839, 0, 0,
5058 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5059 0, 0, 0, 0, 0, 0, -839, 0, 0, 0,
5060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5061 -146, -839, 0, -839, -839, -839, -839, -839, -839, -839,
5062 -839, -839, -839, 0, 0, 0, 0, -839, -839, -839,
5063 -839, -839, -356, 0, -839, 0, -839, 0, 0, 0,
5064 -356, -356, -356, 0, 0, 0, -356, -356, 0, -356,
5065 0, 0, 0, 0, 0, 0, 0, -356, 0, 0,
5066 0, 0, 0, 0, 0, 0, 0, 0, 0, -356,
5067 -356, 0, -356, -356, -356, -356, -356, 0, 0, 0,
5068 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5069 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5070 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
5071 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5072 -356, -356, -356, 0, 0, 0, 0, -356, -356, -356,
5073 -356, 0, 829, -356, 0, 0, 0, 0, 0, 0,
5074 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5075 0, 0, -356, 0, 0, 0, 0, 0, 0, 0,
5076 0, 0, 0, 0, 0, 0, -147, -356, 0, -356,
5077 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
5078 0, 0, 0, 830, -356, -356, -356, -138, -356, 0,
5079 -356, 0, -356, 0, 0, 0, -356, -356, -356, 0,
5080 0, 0, -356, -356, 0, -356, 0, 0, 0, 0,
5081 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5082 0, 0, 0, 0, 0, -356, -356, 0, -356, -356,
5083 -356, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5084 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5085 0, 0, 0, 0, 0, 0, -356, -356, 0, 0,
5086 0, 0, 0, 0, 0, 0, -356, -356, -356, -356,
5087 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
5088 0, 0, 0, -356, -356, -356, -356, 0, 829, -356,
5089 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5090 0, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5092 0, 0, -147, -356, 0, -356, -356, -356, -356, -356,
5093 -356, -356, -356, -356, -356, 0, 0, 0, 0, 830,
5094 -356, -356, -356, -356, 0, 0, -356, 3, -356, 4,
5095 5, 6, 7, 8, -857, -857, -857, 9, 10, 0,
5096 0, -857, 11, 0, 12, 13, 14, 15, 16, 17,
5097 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5098 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5099 0, 27, 28, 268, 30, 31, 32, 33, 34, 35,
5100 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5101 45, 46, 0, 0, -857, 0, 0, 0, 0, 0,
5102 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5103 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5104 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5105 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5106 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5107 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5108 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5109 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5110 -857, 4, 5, 6, 7, 8, -857, 0, -857, 9,
5111 10, 0, -857, -857, 11, 0, 12, 13, 14, 15,
5112 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5113 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5114 0, 0, 0, 27, 28, 268, 30, 31, 32, 33,
5115 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5116 43, 44, 45, 46, 0, 0, -857, 0, 0, 0,
5117 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5118 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5119 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5120 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5121 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5122 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5124 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5125 0, 3, -857, 4, 5, 6, 7, 8, -857, 0,
5126 -857, 9, 10, 0, 0, -857, 11, -857, 12, 13,
5127 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5128 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5129 0, 0, 0, 0, 0, 27, 28, 268, 30, 31,
5130 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5131 41, 42, 43, 44, 45, 46, 0, 0, -857, 0,
5132 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5134 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5135 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5136 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5139 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5140 0, 0, 0, 3, -857, 4, 5, 6, 7, 8,
5141 -857, 0, -857, 9, 10, 0, 0, -857, 11, 0,
5142 12, 13, 14, 15, 16, 17, 18, -857, 0, 0,
5143 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5144 0, 26, 0, 0, 0, 0, 0, 27, 28, 268,
5145 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5146 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5147 -857, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5149 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5150 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5151 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5152 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5153 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5154 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5155 67, 68, 0, 0, 0, 3, -857, 4, 5, 6,
5156 7, 8, -857, 0, -857, 9, 10, 0, 0, -857,
5157 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5158 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5159 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5160 28, 268, 30, 31, 32, 33, 34, 35, 36, 37,
5161 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5162 0, 0, -857, 0, 0, 0, 0, 0, 0, 0,
5163 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5164 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5165 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5166 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5167 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5170 0, 66, 67, 68, 0, 0, 0, 3, -857, 4,
5171 5, 6, 7, 8, -857, -857, -857, 9, 10, 0,
5172 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5173 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5174 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5175 0, 27, 28, 268, 30, 31, 32, 33, 34, 35,
5176 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5177 45, 46, 0, 0, -857, 0, 0, 0, 0, 0,
5178 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5179 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5180 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5181 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5182 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5185 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5186 -857, 4, 5, 6, 7, 8, -857, 0, -857, 9,
5187 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5188 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5189 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5190 0, 0, 0, 27, 28, 268, 30, 31, 32, 33,
5191 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5192 43, 44, 45, 46, 0, 0, -857, 0, 0, 0,
5193 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5194 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5195 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5196 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5197 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5198 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5200 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5201 0, 3, -857, 4, 5, 6, 7, 8, -857, 0,
5202 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5203 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5204 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5205 0, 0, 0, 0, 0, 27, 28, 268, 30, 31,
5206 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5207 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5208 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5210 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5211 0, 0, 269, 53, 54, 55, 0, 56, 0, 0,
5212 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5213 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5214 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5215 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5216 0, 0, 0, 0, -857, 0, 0, 0, -857, 3,
5217 -857, 4, 5, 6, 7, 8, 0, 0, 0, 9,
5218 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5219 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5220 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5221 0, 0, 0, 27, 28, 268, 30, 31, 32, 33,
5222 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5223 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5224 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5225 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5226 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5227 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5228 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5229 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5230 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5231 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5232 0, 0, -857, 0, 0, 0, -857, 3, -857, 4,
5233 5, 6, 7, 8, 0, 0, 0, 9, 10, 0,
5234 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5235 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5236 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5237 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
5238 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5239 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5240 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5241 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5242 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5243 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5244 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5245 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5246 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5247 0, 0, 0, 66, 67, 68, 0, 0, -857, 3,
5248 -857, 4, 5, 6, 7, 8, -857, 0, 0, 9,
5249 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5250 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5251 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5252 0, 0, 0, 27, 28, 268, 30, 31, 32, 33,
5253 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5254 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5255 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5256 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5257 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5258 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5259 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5260 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5261 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5262 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5263 -857, 398, -857, 4, 5, 6, 0, 8, -857, 0,
5264 0, 9, 10, 0, 0, 0, 11, -3, 12, 13,
5265 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5266 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5267 0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5268 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5269 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5270 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5272 0, 49, 50, 0, 0, 0, 0, 0, 0, 249,
5273 0, 0, 250, 53, 54, 55, 0, 0, 0, 0,
5274 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5275 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5276 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5277 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5278 0, 0, 0, 0, 325, 0, 0, 0, 0, 0,
5279 326, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5280 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
5281 166, 167, 168, 169, 170, 0, 0, 0, 171, 172,
5282 173, 428, 429, 430, 431, 178, 179, 180, 0, 0,
5283 0, 0, 0, 181, 182, 183, 184, 432, 433, 434,
5284 435, 189, 36, 37, 436, 39, 0, 0, 0, 0,
5285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5286 0, 0, 0, 0, 191, 192, 193, 194, 195, 196,
5287 197, 198, 199, 0, 0, 200, 201, 0, 0, 0,
5288 0, 202, 203, 204, 205, 0, 0, 0, 0, 0,
5289 0, 0, 0, 0, 0, 206, 207, 0, 0, 0,
5290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5292 0, 0, 0, 0, 0, 208, 209, 210, 211, 212,
5293 213, 214, 215, 216, 217, 0, 218, 219, 0, 0,
5294 0, 0, 0, 0, 220, 437, 147, 148, 149, 150,
5295 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5296 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
5297 0, 0, 0, 171, 172, 173, 174, 175, 176, 177,
5298 178, 179, 180, 0, 0, 0, 0, 0, 181, 182,
5299 183, 184, 185, 186, 187, 188, 189, 36, 37, 190,
5300 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5301 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5302 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5303 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5305 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5306 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5307 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5308 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5309 0, 218, 219, 0, 0, 0, 0, 0, 0, 220,
5310 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5311 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5312 167, 168, 169, 170, 0, 0, 0, 171, 172, 173,
5313 174, 175, 176, 177, 178, 179, 180, 0, 0, 0,
5314 0, 0, 181, 182, 183, 184, 185, 186, 187, 188,
5315 189, 237, 0, 190, 0, 0, 0, 0, 0, 0,
5316 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5317 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5318 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5319 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5320 0, 0, 0, 0, 206, 207, 0, 0, 58, 0,
5321 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5323 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5324 214, 215, 216, 217, 0, 218, 219, 0, 0, 0,
5325 0, 0, 0, 220, 147, 148, 149, 150, 151, 152,
5326 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5327 163, 164, 165, 166, 167, 168, 169, 170, 0, 0,
5328 0, 171, 172, 173, 174, 175, 176, 177, 178, 179,
5329 180, 0, 0, 0, 0, 0, 181, 182, 183, 184,
5330 185, 186, 187, 188, 189, 0, 0, 190, 0, 0,
5331 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5332 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5333 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5334 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5335 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5336 0, 0, 58, 0, 0, 0, 0, 0, 0, 0,
5337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5338 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5339 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5340 219, 0, 0, 0, 0, 0, 0, 220, 147, 148,
5341 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
5342 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
5343 169, 170, 0, 0, 0, 171, 172, 173, 174, 175,
5344 176, 177, 178, 179, 180, 0, 0, 0, 0, 0,
5345 181, 182, 183, 184, 185, 186, 187, 188, 189, 0,
5346 0, 190, 0, 0, 0, 0, 0, 0, 0, 0,
5347 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5348 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5349 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5350 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5351 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5353 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5354 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5355 216, 217, 0, 218, 219, 4, 5, 6, 0, 8,
5356 0, 220, 0, 9, 10, 0, 0, 0, 11, 0,
5357 12, 13, 14, 245, 246, 17, 18, 0, 0, 0,
5358 0, 0, 19, 20, 247, 22, 23, 24, 25, 0,
5359 0, 248, 0, 0, 0, 0, 0, 0, 295, 0,
5360 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5361 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5362 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5363 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5365 0, 296, 0, 0, 250, 53, 54, 55, 0, 0,
5366 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5367 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5368 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5369 14, 245, 246, 17, 18, 0, 0, 0, 0, 297,
5370 19, 20, 247, 22, 23, 24, 25, 298, 0, 248,
5371 0, 0, 0, 0, 0, 0, 295, 0, 0, 31,
5372 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5373 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5374 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5375 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5376 0, 0, 0, 0, 0, 0, 0, 0, 0, 296,
5377 0, 0, 250, 53, 54, 55, 0, 0, 0, 0,
5378 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5379 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5380 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5381 16, 17, 18, 0, 0, 0, 0, 297, 19, 20,
5382 21, 22, 23, 24, 25, 609, 0, 248, 0, 0,
5383 0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5384 34, 35, 36, 37, 38, 39, 278, 40, 41, 42,
5385 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5386 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5387 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5388 50, 0, 0, 0, 0, 0, 0, 249, 0, 0,
5389 250, 53, 54, 55, 0, 279, 280, 444, 57, 58,
5390 281, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5391 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5393 4, 5, 6, 0, 8, 66, 251, 68, 9, 10,
5394 0, 0, 234, 11, 0, 12, 13, 14, 15, 16,
5395 17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
5396 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5397 0, 0, 0, 28, 0, 0, 31, 32, 33, 34,
5398 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5399 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5400 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5401 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5402 0, 0, 0, 0, 0, 0, 249, 0, 0, 250,
5403 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5404 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5406 0, 0, 0, 0, 0, 0, 0, 3, 0, 4,
5407 5, 6, 7, 8, 66, 67, 68, 9, 10, 0,
5408 0, 234, 11, 0, 12, 13, 14, 15, 16, 17,
5409 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5410 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5411 0, 27, 28, 0, 30, 31, 32, 33, 34, 35,
5412 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5413 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5414 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5415 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5416 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5417 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5418 61, 62, 63, 64, 65, 0, 0, 398, 0, 4,
5419 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5420 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5421 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5422 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5423 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5424 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5425 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5426 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5427 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5428 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5429 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5430 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5431 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5432 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5433 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5434 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5435 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5436 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5437 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5438 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5439 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5440 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5441 54, 55, 0, 279, 280, 444, 57, 58, 281, 60,
5442 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5443 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5444 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5445 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5446 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5447 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5448 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5449 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5450 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5451 0, 0, 0, 0, 0, 0, 0, 49, 464, 0,
5452 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5453 54, 55, 0, 279, 280, 444, 57, 58, 281, 60,
5454 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5455 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5456 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5457 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5458 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5459 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5460 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5461 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5462 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5463 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5464 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5465 54, 55, 0, 279, 280, 444, 57, 58, 281, 60,
5466 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5467 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5468 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5469 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5470 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5471 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5472 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5473 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5474 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5475 0, 0, 0, 0, 0, 0, 0, 49, 464, 0,
5476 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5477 54, 55, 0, 279, 280, 444, 57, 58, 281, 60,
5478 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5479 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5480 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5481 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5482 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5483 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5484 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5485 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5486 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5487 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5488 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5489 54, 55, 0, 279, 280, 0, 57, 58, 281, 60,
5490 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5491 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5492 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5493 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5494 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5495 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5496 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5497 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5498 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5499 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5500 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5501 54, 55, 0, 0, 280, 444, 57, 58, 281, 60,
5502 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5503 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5504 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5505 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5506 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5507 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5508 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5509 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5510 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5511 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5512 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5513 54, 55, 0, 0, 280, 0, 57, 58, 281, 60,
5514 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5515 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5516 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5517 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5518 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5519 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5520 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5521 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5522 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5523 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5524 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5525 54, 55, 0, 803, 0, 0, 57, 58, 59, 60,
5526 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5527 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5528 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5529 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5530 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5531 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5532 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5533 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5534 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5535 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5536 0, 0, 0, 0, 0, 814, 0, 0, 250, 53,
5537 54, 55, 0, 803, 0, 0, 57, 58, 59, 60,
5538 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5539 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5540 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5541 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5542 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5543 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5544 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5545 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5546 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5547 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5548 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5549 54, 55, 0, 975, 0, 0, 57, 58, 59, 60,
5550 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5551 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5552 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5553 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5554 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5555 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5556 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5557 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5558 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5559 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5560 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5561 54, 55, 0, 1025, 0, 0, 57, 58, 59, 60,
5562 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5563 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5564 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5565 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5566 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5567 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5568 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5569 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5570 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5571 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5572 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5573 54, 55, 0, 803, 0, 0, 57, 58, 59, 60,
5574 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5575 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5576 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5577 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5578 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5579 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5580 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5581 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5582 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5583 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5584 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5585 54, 55, 0, 1158, 0, 0, 57, 58, 59, 60,
5586 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5587 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5588 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5589 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5590 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5591 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5592 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5593 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5594 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5595 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5596 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5597 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5598 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5599 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5600 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5601 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5602 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5603 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5604 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5605 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5606 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5607 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5608 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5609 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5610 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5611 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5612 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5613 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5614 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5615 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5616 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5617 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5618 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5619 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5620 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5621 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5622 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5623 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5624 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5625 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5626 23, 24, 25, 0, 0, 785, 0, 0, 0, 0,
5627 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5628 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5629 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5630 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5631 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5632 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5633 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5634 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5635 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5636 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5637 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5638 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5639 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5640 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5641 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5642 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5643 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5644 0, 0, 0, 0, 0, 814, 0, 0, 250, 53,
5645 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5646 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5647 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5648 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5649 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5650 23, 24, 25, 0, 0, 889, 0, 0, 0, 0,
5651 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5652 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5653 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5654 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5655 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5656 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5657 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5658 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5659 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5660 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5661 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5662 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5663 0, 0, 295, 0, 0, 31, 32, 33, 34, 35,
5664 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5665 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5666 0, 0, 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, 296, 0, 0, 357, 53,
5669 54, 55, 0, 358, 0, 0, 57, 58, 59, 60,
5670 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5671 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5672 11, 0, 12, 13, 14, 245, 246, 17, 18, 0,
5673 0, 0, 0, 297, 19, 20, 247, 22, 23, 24,
5674 25, 0, 0, 248, 0, 0, 0, 0, 0, 0,
5675 295, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5676 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5677 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
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, 409, 0, 0, 52, 53, 54, 55,
5681 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5682 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5683 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5684 12, 13, 14, 245, 246, 17, 18, 0, 0, 0,
5685 0, 297, 19, 20, 247, 22, 23, 24, 25, 0,
5686 0, 248, 0, 0, 0, 0, 0, 0, 295, 0,
5687 0, 31, 32, 33, 417, 35, 36, 37, 418, 39,
5688 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5689 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 419, 0, 0,
5692 0, 420, 0, 0, 250, 53, 54, 55, 0, 0,
5693 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5694 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5695 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5696 14, 245, 246, 17, 18, 0, 0, 0, 0, 297,
5697 19, 20, 247, 22, 23, 24, 25, 0, 0, 248,
5698 0, 0, 0, 0, 0, 0, 295, 0, 0, 31,
5699 32, 33, 417, 35, 36, 37, 418, 39, 0, 40,
5700 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5701 0, 0, 0, 0, 0, 0, 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, 420,
5704 0, 0, 250, 53, 54, 55, 0, 0, 0, 0,
5705 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5706 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5707 10, 0, 0, 0, 11, 0, 12, 13, 14, 245,
5708 246, 17, 18, 0, 0, 0, 0, 297, 19, 20,
5709 247, 22, 23, 24, 25, 0, 0, 248, 0, 0,
5710 0, 0, 0, 0, 295, 0, 0, 31, 32, 33,
5711 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5712 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5714 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5715 0, 0, 0, 0, 0, 0, 0, 296, 0, 0,
5716 357, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5717 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5718 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5719 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5720 18, 0, 0, 0, 0, 297, 19, 20, 247, 22,
5721 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5722 0, 0, 295, 0, 0, 31, 32, 33, 34, 35,
5723 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5724 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5727 0, 0, 0, 0, 0, 1224, 0, 0, 250, 53,
5728 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5729 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5730 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5731 11, 0, 12, 13, 14, 245, 246, 17, 18, 0,
5732 0, 0, 0, 297, 19, 20, 247, 22, 23, 24,
5733 25, 0, 0, 248, 0, 0, 0, 0, 0, 0,
5734 295, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5735 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5739 0, 0, 0, 1347, 0, 0, 250, 53, 54, 55,
5740 22, 23, 24, 25, 57, 58, 59, 60, 61, 62,
5741 63, 64, 65, 0, 0, 0, 31, 32, 33, 1101,
5742 0, 0, 0, 1102, 0, 0, 40, 41, 42, 43,
5743 44, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5744 0, 297, 0, 0, 0, 0, 0, 0, 0, 0,
5745 0, 0, 0, 0, 0, 0, 0, 0, 1104, 1105,
5746 0, 0, 0, 0, 0, 0, 1106, 0, 0, 1107,
5747 0, 1108, 1109, 0, 1110, 0, 0, 57, 58, 59,
5748 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5749 0, 0, 22, 23, 24, 25, 0, 0, 0, 692,
5750 648, 0, 0, 693, 0, 0, 0, 1112, 31, 32,
5751 33, 1101, 0, 0, 297, 1102, 0, 0, 40, 41,
5752 42, 43, 44, 191, 192, 193, 194, 195, 196, 197,
5753 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5754 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5755 1104, 1105, 0, 0, 206, 207, 0, 0, 1106, 0,
5756 0, 1107, 0, 1108, 1109, 0, 0, 0, 0, 57,
5757 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5758 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5759 214, 215, 216, 217, 0, 218, 219, 639, 640, 1112,
5760 0, 641, 0, 220, 230, 0, 297, 0, 0, 0,
5761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5762 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5763 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5764 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5765 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5766 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5767 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5768 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5769 216, 217, 0, 218, 219, 647, 648, 0, 0, 649,
5770 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5771 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5772 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5773 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5775 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5777 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5778 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5779 0, 218, 219, 713, 640, 0, 0, 714, 0, 220,
5780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5781 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5782 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5783 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5784 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5787 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5788 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5789 219, 717, 648, 0, 0, 718, 0, 220, 0, 0,
5790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5791 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5792 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5793 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5794 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5797 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5798 212, 213, 214, 215, 216, 217, 0, 218, 219, 735,
5799 640, 0, 0, 736, 0, 220, 0, 0, 0, 0,
5800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5801 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5802 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5803 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5804 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5807 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5808 214, 215, 216, 217, 0, 218, 219, 738, 648, 0,
5809 0, 739, 0, 220, 0, 0, 0, 0, 0, 0,
5810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5811 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5812 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5813 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5814 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5816 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5817 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5818 216, 217, 0, 218, 219, 713, 640, 0, 0, 753,
5819 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5820 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5821 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5822 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5823 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5824 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5826 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5827 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5828 0, 218, 219, 858, 640, 0, 0, 859, 0, 220,
5829 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5830 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5831 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5832 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5833 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5834 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5835 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5836 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5837 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5838 219, 861, 648, 0, 0, 862, 0, 220, 0, 0,
5839 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5840 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5841 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5842 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5843 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5846 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5847 212, 213, 214, 215, 216, 217, 0, 218, 219, 867,
5848 640, 0, 0, 868, 0, 220, 0, 0, 0, 0,
5849 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5850 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5851 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5852 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5853 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5854 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5856 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5857 214, 215, 216, 217, 0, 218, 219, 692, 648, 0,
5858 0, 693, 0, 220, 0, 0, 0, 0, 0, 0,
5859 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5860 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5861 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5862 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5863 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5864 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5865 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5866 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5867 216, 217, 0, 218, 219, 1031, 640, 0, 0, 1032,
5868 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5869 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5870 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5871 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5872 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5873 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5874 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5876 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5877 0, 218, 219, 1034, 648, 0, 0, 1035, 0, 220,
5878 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5879 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5880 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5881 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5882 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5883 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5884 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5885 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5886 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5887 219, 1366, 640, 0, 0, 1367, 0, 220, 0, 0,
5888 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5889 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5890 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5891 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5892 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5895 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5896 212, 213, 214, 215, 216, 217, 0, 218, 219, 1369,
5897 648, 0, 0, 1370, 0, 220, 0, 0, 0, 0,
5898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5899 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5900 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5901 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5902 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5903 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5904 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5905 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5906 214, 215, 216, 217, 0, 218, 219, 1423, 640, 0,
5907 0, 1424, 0, 220, 0, 0, 0, 0, 0, 0,
5908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5909 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5910 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5911 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5912 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5915 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5916 216, 217, 0, 218, 219, 0, 0, 0, 0, 0,
5917 0, 220
5918};
5919
5920static const yytype_int16 yycheck[] =
5921{
5922 1, 59, 70, 26, 7, 28, 56, 58, 767, 107,
5923 230, 101, 1, 67, 52, 53, 13, 14, 402, 119,
5924 420, 394, 846, 58, 27, 338, 596, 89, 118, 599,
5925 343, 507, 54, 27, 767, 84, 7, 598, 288, 89,
5926 510, 21, 70, 293, 113, 114, 115, 393, 775, 395,
5927 572, 52, 53, 54, 55, 58, 27, 598, 108, 109,
5928 110, 104, 520, 81, 107, 451, 612, 116, 113, 114,
5929 115, 856, 685, 568, 66, 688, 111, 572, 56, 107,
5930 913, 612, 52, 469, 103, 104, 826, 700, 107, 702,
5931 562, 113, 114, 115, 696, 697, 338, 54, 55, 769,
5932 775, 343, 602, 951, 84, 63, 64, 65, 111, 679,
5933 313, 314, 458, 1073, 627, 915, 489, 1036, 1037, 1197,
5934 722, 25, 1037, 586, 1108, 1221, 1222, 0, 1003, 592,
5935 13, 26, 13, 1211, 1321, 26, 25, 269, 113, 114,
5936 115, 10, 109, 69, 490, 0, 66, 66, 1339, 522,
5937 606, 609, 81, 66, 100, 100, 113, 114, 115, 100,
5938 134, 230, 34, 232, 25, 696, 697, 257, 15, 134,
5939 711, 97, 98, 271, 141, 98, 832, 523, 25, 13,
5940 52, 25, 154, 157, 840, 230, 25, 232, 134, 134,
5941 155, 722, 100, 134, 1069, 541, 542, 25, 654, 68,
5942 119, 121, 122, 271, 660, 661, 119, 13, 230, 685,
5943 232, 25, 250, 303, 1062, 1003, 235, 236, 688, 1406,
5944 1036, 1037, 835, 281, 700, 357, 134, 153, 1419, 230,
5945 153, 269, 702, 323, 157, 253, 298, 1221, 1222, 979,
5946 241, 161, 1161, 271, 25, 29, 1161, 120, 298, 250,
5947 55, 155, 241, 157, 1087, 1, 151, 232, 1354, 1107,
5948 151, 1109, 157, 286, 13, 288, 155, 247, 269, 25,
5949 293, 154, 295, 154, 254, 232, 676, 160, 13, 160,
5950 1358, 1069, 300, 1010, 756, 757, 1086, 1247, 331, 332,
5951 333, 334, 330, 666, 155, 1214, 866, 101, 1258, 269,
5952 1260, 25, 1221, 1222, 677, 297, 52, 53, 358, 407,
5953 56, 155, 331, 332, 333, 334, 155, 336, 337, 357,
5954 154, 667, 412, 252, 253, 394, 160, 155, 1003, 330,
5955 830, 1197, 678, 536, 790, 538, 1160, 101, 794, 123,
5956 329, 155, 855, 89, 1014, 1161, 56, 1213, 154, 394,
5957 154, 953, 954, 134, 160, 813, 357, 959, 960, 835,
5958 403, 100, 108, 109, 110, 111, 404, 405, 716, 13,
5959 931, 1219, 1220, 154, 155, 1160, 419, 158, 795, 407,
5960 358, 798, 995, 1171, 403, 454, 1174, 357, 1176, 737,
5961 931, 155, 395, 394, 1069, 134, 397, 919, 854, 155,
5962 419, 857, 13, 404, 405, 154, 155, 769, 101, 454,
5963 1169, 160, 100, 775, 984, 871, 396, 963, 27, 154,
5964 489, 422, 953, 954, 919, 160, 13, 1387, 959, 960,
5965 13, 155, 454, 157, 154, 1354, 1169, 37, 38, 13,
5966 160, 913, 1044, 915, 489, 151, 134, 1174, 100, 450,
5967 451, 1104, 1105, 522, 69, 458, 997, 100, 520, 922,
5968 923, 161, 155, 926, 940, 928, 467, 930, 469, 157,
5969 520, 28, 100, 278, 279, 280, 479, 522, 458, 454,
5970 700, 731, 134, 98, 100, 479, 1352, 490, 489, 875,
5971 1356, 134, 1358, 154, 100, 241, 157, 454, 1029, 1174,
5972 886, 1171, 134, 155, 250, 1, 134, 25, 479, 155,
5973 154, 58, 860, 1044, 970, 134, 160, 973, 134, 34,
5974 523, 522, 870, 269, 980, 995, 595, 769, 134, 598,
5975 986, 78, 100, 775, 767, 112, 66, 52, 1326, 542,
5976 1328, 744, 1330, 154, 1332, 154, 749, 609, 100, 160,
5977 507, 160, 298, 607, 154, 100, 52, 53, 612, 609,
5978 1426, 108, 551, 1216, 1217, 112, 134, 154, 25, 597,
5979 157, 154, 100, 160, 157, 948, 155, 160, 1337, 100,
5980 154, 1405, 134, 329, 330, 607, 160, 25, 157, 119,
5981 612, 121, 122, 977, 643, 596, 52, 666, 599, 1326,
5982 56, 947, 651, 949, 69, 628, 134, 157, 677, 1065,
5983 56, 357, 358, 134, 1086, 1087, 134, 1344, 656, 1189,
5984 658, 666, 645, 1411, 157, 1088, 1089, 1090, 1091, 58,
5985 34, 659, 677, 98, 155, 134, 154, 155, 69, 444,
5986 158, 1003, 696, 697, 69, 646, 695, 157, 52, 78,
5987 651, 397, 1014, 69, 152, 656, 154, 658, 404, 405,
5988 1330, 680, 134, 643, 667, 666, 97, 98, 722, 154,
5989 26, 733, 1056, 98, 159, 678, 677, 134, 679, 108,
5990 109, 97, 98, 733, 338, 1033, 26, 706, 1415, 343,
5991 1003, 742, 69, 716, 695, 698, 134, 154, 155, 100,
5992 505, 158, 507, 69, 698, 510, 1106, 1069, 731, 66,
5993 67, 69, 141, 69, 737, 100, 154, 155, 719, 157,
5994 158, 98, 153, 66, 78, 100, 157, 698, 685, 69,
5995 158, 97, 98, 823, 52, 715, 101, 153, 56, 97,
5996 98, 97, 98, 700, 159, 241, 154, 69, 78, 134,
5997 158, 813, 498, 1323, 250, 100, 1069, 97, 98, 134,
5998 1108, 1003, 785, 813, 121, 122, 1150, 1036, 1037, 69,
5999 155, 69, 1014, 269, 520, 97, 98, 877, 121, 122,
6000 155, 124, 587, 1003, 1240, 100, 744, 153, 746, 134,
6001 152, 749, 750, 56, 1257, 151, 157, 153, 98, 97,
6002 98, 157, 607, 1036, 1037, 551, 936, 612, 938, 1171,
6003 155, 151, 1174, 153, 144, 145, 146, 157, 1218, 134,
6004 863, 155, 865, 1185, 600, 1082, 1083, 1069, 604, 69,
6005 69, 153, 161, 329, 330, 100, 864, 860, 873, 1108,
6006 155, 842, 78, 844, 863, 846, 865, 870, 1196, 1069,
6007 596, 1199, 69, 599, 1238, 153, 1125, 97, 98, 98,
6008 69, 357, 931, 609, 69, 866, 889, 69, 1352, 134,
6009 873, 1219, 1356, 69, 875, 134, 54, 1185, 835, 948,
6010 685, 98, 15, 688, 17, 886, 64, 65, 97, 98,
6011 155, 106, 1161, 98, 155, 700, 98, 702, 160, 953,
6012 954, 397, 98, 948, 901, 959, 960, 134, 404, 405,
6013 656, 134, 658, 153, 52, 56, 54, 55, 56, 57,
6014 58, 25, 727, 66, 1380, 1194, 969, 138, 1161, 1171,
6015 968, 155, 1174, 679, 154, 155, 1169, 26, 1311, 155,
6016 78, 963, 1211, 1185, 153, 155, 949, 948, 154, 155,
6017 969, 1171, 1221, 1222, 1174, 983, 1176, 985, 1306, 1307,
6018 1308, 155, 963, 66, 102, 158, 1312, 968, 1330, 774,
6019 108, 109, 69, 152, 1211, 1029, 119, 1339, 121, 122,
6020 69, 1214, 1344, 984, 1221, 1222, 69, 733, 1221, 1222,
6021 1044, 155, 1249, 1250, 1251, 1252, 1253, 134, 803, 134,
6022 97, 98, 498, 141, 158, 69, 37, 38, 97, 98,
6023 1033, 155, 78, 152, 97, 98, 119, 69, 121, 122,
6024 1368, 124, 134, 1061, 14, 15, 1023, 1024, 155, 1337,
6025 835, 1339, 155, 97, 98, 155, 1344, 155, 1027, 1028,
6026 52, 1349, 89, 90, 155, 97, 98, 1085, 853, 155,
6027 1051, 152, 1053, 1111, 13, 551, 153, 1419, 40, 41,
6028 1061, 1112, 151, 69, 153, 299, 300, 813, 157, 1070,
6029 153, 155, 1073, 25, 274, 1076, 142, 143, 144, 145,
6030 146, 1082, 1083, 155, 1085, 1108, 1109, 17, 1330, 153,
6031 155, 97, 98, 1094, 1095, 134, 30, 1339, 44, 1149,
6032 596, 153, 1344, 599, 1337, 44, 1326, 1415, 1328, 1417,
6033 1330, 1419, 1332, 1421, 69, 152, 612, 155, 1156, 1157,
6034 866, 1354, 69, 155, 1162, 1382, 1383, 1384, 1385, 154,
6035 155, 66, 1440, 1231, 44, 940, 1226, 56, 44, 83,
6036 84, 1164, 97, 98, 136, 134, 159, 153, 1186, 78,
6037 97, 98, 1153, 8, 15, 1156, 1157, 155, 963, 1160,
6038 656, 1162, 658, 1231, 155, 1208, 95, 96, 52, 155,
6039 975, 1036, 1037, 1196, 155, 1432, 1199, 1419, 66, 59,
6040 60, 61, 62, 679, 119, 1186, 121, 122, 1189, 1208,
6041 995, 1411, 1230, 137, 138, 155, 1219, 155, 153, 152,
6042 696, 697, 101, 1231, 155, 155, 153, 1245, 9, 52,
6043 139, 140, 141, 142, 143, 144, 145, 146, 155, 155,
6044 1025, 1271, 968, 155, 66, 139, 722, 155, 155, 1230,
6045 155, 119, 1233, 121, 122, 1293, 124, 155, 984, 1104,
6046 1105, 139, 1311, 1108, 1245, 1268, 1247, 155, 1249, 1250,
6047 1251, 1252, 1253, 155, 454, 1060, 152, 1258, 155, 1260,
6048 1125, 52, 101, 1264, 56, 465, 1311, 160, 468, 1270,
6049 66, 1272, 158, 473, 155, 1318, 1319, 119, 155, 121,
6050 122, 1027, 1028, 1306, 1307, 1308, 155, 155, 155, 155,
6051 1036, 1037, 155, 1343, 139, 495, 1161, 155, 155, 1318,
6052 1319, 78, 155, 155, 155, 239, 152, 56, 155, 1312,
6053 1311, 155, 1313, 329, 1315, 1061, 157, 155, 95, 96,
6054 155, 155, 1323, 119, 155, 121, 122, 157, 52, 1194,
6055 54, 55, 1197, 57, 155, 1373, 241, 72, 52, 1085,
6056 54, 55, 56, 57, 494, 1368, 1211, 498, 1213, 873,
6057 1153, 1216, 1217, 1158, 1377, 106, 1221, 1222, 1104, 1105,
6058 607, 108, 1108, 480, 141, 142, 143, 144, 145, 146,
6059 866, 52, 1373, 54, 55, 56, 57, 1400, 102, 1125,
6060 580, 1382, 1383, 1384, 1385, 110, 1387, 98, 78, 1390,
6061 1391, 695, 964, 1394, 1395, 1, 1233, 1398, 983, 913,
6062 932, 933, 1269, 1149, 1405, 95, 96, 1153, 608, 941,
6063 1156, 1157, 944, 1337, 946, 1161, 1162, 54, 55, 756,
6064 57, 355, 1185, 1344, 1095, 1290, 360, 64, 65, 1406,
6065 1268, 1432, 1433, 1434, 1435, 1436, 878, 353, 1290, 1405,
6066 1186, 1214, 1443, 1189, 1214, 1210, 52, 53, 1194, 1313,
6067 56, 1197, 142, 143, 144, 145, 146, 953, 954, 1315,
6068 122, 67, 538, 959, 960, 1211, 111, 1213, 343, 118,
6069 1216, 1217, 968, 769, 1069, 1221, 1222, 40, 41, 42,
6070 43, 44, 1400, 89, 1230, 781, -1, 1352, 984, -1,
6071 690, 1356, -1, 1358, -1, -1, -1, 103, 104, 1245,
6072 -1, 107, 108, 109, 110, -1, -1, 113, 114, 115,
6073 -1, -1, -1, 696, 697, -1, -1, -1, -1, -1,
6074 763, -1, -1, -1, 767, 1271, -1, 461, 462, -1,
6075 -1, 1027, 1028, 1029, 1, -1, -1, 720, 721, 722,
6076 -1, -1, -1, -1, 1290, -1, 480, -1, 1044, 1270,
6077 -1, 1272, -1, 487, -1, -1, -1, 491, 492, 493,
6078 760, 1426, -1, -1, 52, 1061, 54, 55, 56, 57,
6079 52, -1, 54, 55, 56, 57, -1, 1323, -1, -1,
6080 -1, -1, -1, -1, -1, 52, 53, -1, -1, 1085,
6081 -1, -1, -1, -1, -1, -1, -1, 1343, -1, 52,
6082 67, 54, 55, 56, 57, 58, 1352, -1, -1, -1,
6083 1356, -1, 1358, -1, 102, -1, -1, -1, -1, 107,
6084 102, -1, -1, -1, 230, 78, 232, 1373, -1, 235,
6085 236, -1, -1, -1, -1, 241, 103, 104, -1, 92,
6086 107, -1, -1, -1, 250, -1, 113, 114, 115, 102,
6087 -1, -1, -1, -1, 107, 108, 109, 1153, -1, -1,
6088 1156, 1157, -1, 269, 1036, 1037, 1162, -1, -1, 1390,
6089 1391, -1, 872, 1394, 1395, -1, -1, 1398, -1, -1,
6090 1426, -1, -1, -1, -1, 885, -1, 887, 141, -1,
6091 1186, 144, 298, 1189, -1, -1, -1, -1, -1, -1,
6092 -1, -1, -1, -1, 157, 888, -1, 1003, -1, -1,
6093 -1, 911, 1433, 1434, 1435, 1436, 1012, -1, 1014, 653,
6094 1016, -1, 1443, 329, 330, 331, 332, 333, 334, -1,
6095 336, 337, 1104, 1105, 1230, -1, 1108, -1, -1, -1,
6096 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1245,
6097 -1, 357, 358, 1125, -1, -1, -1, -1, -1, -1,
6098 1003, -1, -1, 230, -1, 232, -1, -1, 235, 236,
6099 953, 954, -1, 1069, 241, 709, 959, 960, -1, -1,
6100 -1, -1, -1, 250, -1, -1, -1, -1, 394, 1161,
6101 -1, 397, -1, -1, -1, -1, -1, 403, 404, 405,
6102 -1, -1, 269, -1, -1, -1, -1, -1, -1, -1,
6103 -1, -1, -1, 419, -1, 998, 999, -1, 1001, 1002,
6104 -1, -1, 1194, -1, -1, 1197, 1069, 1323, -1, -1,
6105 -1, -1, -1, -1, 1003, -1, -1, -1, -1, 1211,
6106 -1, 1213, -1, -1, 1216, 1217, -1, -1, 454, 1221,
6107 1222, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6108 -1, 1044, 329, 330, 331, 332, 333, 334, -1, 336,
6109 337, -1, -1, -1, -1, 1171, -1, 1373, -1, -1,
6110 1176, -1, -1, 489, -1, 1068, 1182, -1, -1, 1185,
6111 357, -1, 498, -1, 828, 829, -1, -1, -1, -1,
6112 1069, -1, 836, 837, -1, -1, -1, -1, -1, -1,
6113 -1, -1, -1, -1, 520, -1, 522, -1, 1290, -1,
6114 -1, -1, 1165, -1, -1, -1, 1169, 394, 1171, -1,
6115 397, 1174, -1, 1176, -1, -1, 403, 404, 405, -1,
6116 -1, -1, 1185, -1, -1, 551, -1, -1, -1, -1,
6117 -1, -1, 419, -1, -1, -1, 890, 891, -1, 893,
6118 894, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6119 -1, -1, -1, 52, -1, 54, 55, 56, 57, 58,
6120 1352, -1, -1, -1, 1356, -1, 1358, 454, -1, 595,
6121 596, -1, 598, 599, -1, -1, -1, -1, -1, 78,
6122 -1, 607, 1171, 609, -1, 1174, 612, 1176, -1, -1,
6123 -1, 945, -1, 92, -1, -1, 1185, -1, -1, -1,
6124 1220, -1, 489, 102, 958, -1, -1, -1, 107, 108,
6125 109, 498, 1328, -1, 1330, -1, 1332, -1, -1, -1,
6126 -1, -1, -1, 1339, -1, -1, -1, -1, -1, -1,
6127 656, -1, 658, 1349, 1426, 522, -1, -1, -1, -1,
6128 666, -1, 141, -1, -1, 144, 1000, -1, -1, -1,
6129 -1, 677, -1, 679, 680, -1, 1276, -1, -1, -1,
6130 -1, -1, -1, 1326, 551, 1328, 1286, 1330, -1, 1332,
6131 696, 697, -1, -1, 1337, -1, 1339, -1, -1, -1,
6132 706, 1344, -1, 1303, 1304, 1305, 1349, -1, -1, -1,
6133 -1, -1, -1, -1, -1, 1411, 722, -1, -1, -1,
6134 -1, 1417, -1, 1419, -1, 1421, -1, 733, 595, 596,
6135 -1, 598, 599, -1, -1, -1, -1, -1, -1, -1,
6136 607, -1, -1, -1, 1440, 612, -1, -1, -1, -1,
6137 -1, 1036, 1037, -1, -1, -1, -1, 1326, -1, 1328,
6138 -1, 1330, -1, 1332, -1, -1, -1, -1, 1411, -1,
6139 1339, -1, 1415, -1, 1417, 1344, 1419, -1, 1421, -1,
6140 1349, -1, -1, -1, -1, -1, -1, -1, -1, 656,
6141 -1, 658, -1, -1, -1, -1, -1, 1440, -1, 666,
6142 -1, -1, -1, -1, -1, -1, -1, 813, -1, -1,
6143 677, -1, 679, 680, -1, -1, -1, -1, -1, 1104,
6144 1105, -1, -1, 1108, -1, -1, -1, -1, -1, 696,
6145 697, -1, -1, -1, -1, -1, -1, -1, -1, 706,
6146 1125, -1, 1411, -1, -1, -1, 1415, -1, 1417, -1,
6147 1419, -1, 1421, -1, -1, 722, -1, 863, -1, 865,
6148 866, -1, -1, -1, -1, -1, -1, -1, -1, 1203,
6149 -1, 1440, -1, -1, -1, -1, 1161, -1, 1, -1,
6150 -1, -1, -1, -1, -1, -1, -1, 33, 34, 35,
6151 36, -1, -1, 52, -1, 54, 55, 56, 57, 58,
6152 -1, -1, -1, 49, 50, 51, -1, -1, -1, 1194,
6153 -1, -1, 1197, 59, 60, 61, 62, 63, -1, 78,
6154 -1, -1, -1, -1, -1, 931, 1211, -1, 1213, 52,
6155 53, 1216, 1217, 92, -1, -1, 1221, 1222, -1, -1,
6156 -1, -1, 948, 102, 67, -1, -1, 953, 954, 108,
6157 109, -1, -1, 959, 960, -1, -1, -1, -1, -1,
6158 -1, -1, 968, 969, 110, 111, 112, 113, 114, 115,
6159 116, 117, 118, -1, -1, -1, -1, -1, 984, -1,
6160 103, 104, 141, -1, 107, -1, -1, -1, -1, -1,
6161 113, 114, 115, -1, -1, -1, 863, -1, 865, 866,
6162 -1, 147, -1, -1, -1, 1290, 52, -1, 54, 55,
6163 56, 57, 58, -1, -1, -1, -1, 1, -1, -1,
6164 -1, 1027, 1028, 1029, -1, -1, -1, -1, -1, -1,
6165 -1, -1, 78, -1, -1, -1, -1, -1, 1044, -1,
6166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6167 -1, -1, -1, -1, -1, 1061, 102, -1, -1, -1,
6168 -1, 107, 108, 109, 931, -1, -1, 1352, 52, 53,
6169 -1, 1356, -1, 1358, -1, -1, -1, -1, -1, 1085,
6170 -1, 948, -1, 67, -1, -1, 953, 954, -1, -1,
6171 -1, -1, 959, 960, -1, 141, -1, -1, 144, -1,
6172 -1, 968, 969, -1, -1, -1, -1, 230, -1, 232,
6173 -1, -1, 235, 236, -1, -1, -1, 984, 241, 103,
6174 104, -1, -1, 107, -1, -1, -1, 250, -1, 113,
6175 114, 115, -1, -1, -1, -1, -1, -1, -1, -1,
6176 -1, 1426, -1, 1149, -1, -1, 269, 1153, -1, -1,
6177 1156, 1157, -1, -1, -1, -1, 1162, -1, -1, -1,
6178 1027, 1028, 1029, -1, -1, -1, -1, -1, -1, -1,
6179 -1, -1, -1, -1, -1, -1, -1, 1044, -1, -1,
6180 1186, -1, -1, 1189, -1, -1, -1, -1, -1, -1,
6181 -1, -1, -1, -1, 1061, -1, -1, -1, -1, -1,
6182 -1, -1, 1208, -1, 1036, 1037, 329, 330, 331, 332,
6183 333, 334, -1, 336, 337, -1, -1, -1, 1085, -1,
6184 -1, -1, -1, -1, 1230, -1, -1, -1, -1, -1,
6185 -1, -1, -1, -1, 357, -1, -1, -1, -1, 1245,
6186 -1, -1, -1, -1, -1, -1, 230, -1, 232, -1,
6187 -1, 235, 236, -1, -1, -1, -1, 241, -1, -1,
6188 -1, -1, -1, -1, -1, 1271, 250, -1, -1, -1,
6189 -1, 394, 1104, 1105, 397, -1, 1108, -1, -1, -1,
6190 403, 404, 405, -1, -1, 269, 1153, -1, -1, 1156,
6191 1157, -1, -1, 1125, -1, 1162, 419, -1, -1, -1,
6192 -1, -1, -1, -1, -1, 1311, -1, -1, -1, -1,
6193 -1, -1, 1318, 1319, -1, -1, -1, 1323, -1, 1186,
6194 -1, -1, 1189, -1, -1, -1, -1, -1, -1, 1161,
6195 -1, 454, -1, -1, -1, -1, -1, 1343, -1, -1,
6196 -1, 1208, -1, -1, -1, 329, 330, 331, 332, 333,
6197 334, -1, 336, 337, -1, -1, -1, -1, -1, -1,
6198 -1, -1, 1194, 1230, -1, 1197, 489, 1373, -1, -1,
6199 -1, -1, -1, 357, -1, 498, -1, -1, 1245, 1211,
6200 -1, 1213, -1, -1, 1216, 1217, -1, -1, -1, 1221,
6201 1222, -1, -1, -1, -1, -1, -1, -1, -1, 522,
6202 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6203 394, 1036, 1037, 397, -1, -1, -1, -1, -1, 403,
6204 404, 405, -1, -1, -1, -1, -1, -1, 551, -1,
6205 -1, -1, -1, -1, -1, 419, -1, -1, -1, -1,
6206 -1, -1, -1, -1, 1311, -1, -1, -1, -1, -1,
6207 -1, 1318, 1319, -1, -1, -1, 1323, -1, 1290, -1,
6208 1036, 1037, -1, -1, -1, -1, -1, -1, -1, -1,
6209 454, -1, 595, 596, -1, 598, 599, -1, -1, 1104,
6210 1105, -1, -1, 1108, 607, -1, -1, -1, -1, 612,
6211 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6212 1125, -1, -1, -1, -1, 489, 1373, -1, -1, -1,
6213 -1, -1, -1, -1, 498, -1, -1, -1, -1, -1,
6214 1352, -1, -1, -1, 1356, -1, 1358, -1, 1104, 1105,
6215 -1, -1, 1108, 656, -1, 658, 1161, -1, 522, -1,
6216 -1, -1, -1, 666, -1, -1, -1, -1, -1, 1125,
6217 -1, -1, -1, -1, 677, -1, 679, 680, -1, -1,
6218 -1, -1, -1, -1, -1, -1, -1, 551, -1, 1194,
6219 -1, -1, 1197, 696, 697, -1, -1, -1, -1, -1,
6220 -1, -1, -1, 706, -1, 1161, 1211, -1, 1213, -1,
6221 -1, 1216, 1217, -1, 1426, -1, 1221, 1222, -1, 722,
6222 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6223 -1, 595, 596, -1, 598, 599, -1, -1, 1194, -1,
6224 -1, 1197, -1, 607, -1, -1, -1, -1, 612, -1,
6225 -1, -1, 1036, 1037, -1, 1211, -1, 1213, -1, -1,
6226 1216, 1217, -1, -1, -1, 1221, 1222, -1, -1, -1,
6227 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6228 -1, -1, -1, -1, -1, 1290, -1, -1, -1, -1,
6229 -1, -1, 656, -1, 658, -1, -1, -1, -1, -1,
6230 -1, -1, 666, -1, -1, -1, -1, -1, -1, -1,
6231 -1, -1, -1, 677, -1, 679, 680, -1, -1, -1,
6232 1104, 1105, -1, -1, 1108, -1, -1, -1, -1, -1,
6233 -1, -1, 696, 697, 1290, -1, -1, -1, -1, -1,
6234 -1, 1125, 706, -1, -1, -1, -1, 1352, -1, -1,
6235 -1, 1356, -1, 1358, -1, -1, -1, -1, 722, -1,
6236 863, -1, 865, 866, -1, -1, -1, -1, -1, -1,
6237 -1, 1036, 1037, -1, -1, -1, -1, 1161, -1, 1,
6238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6239 -1, -1, -1, -1, -1, -1, 1352, -1, -1, -1,
6240 1356, -1, 1358, -1, -1, -1, -1, -1, -1, -1,
6241 1194, -1, -1, 1197, -1, -1, -1, -1, -1, -1,
6242 -1, 1426, -1, -1, -1, -1, -1, 1211, 931, 1213,
6243 52, 53, 1216, 1217, 56, -1, -1, 1221, 1222, 1104,
6244 1105, -1, -1, 1108, -1, 948, -1, -1, -1, -1,
6245 953, 954, -1, -1, -1, -1, 959, 960, -1, -1,
6246 1125, -1, -1, -1, -1, 968, 969, 89, -1, -1,
6247 1426, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6248 -1, 984, -1, -1, -1, -1, 108, 109, 110, -1,
6249 -1, 113, 114, 115, -1, -1, 1161, -1, -1, 863,
6250 -1, 865, 866, -1, -1, -1, 1290, -1, -1, -1,
6251 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6252 -1, -1, -1, -1, 1027, 1028, 1029, -1, -1, 1194,
6253 -1, -1, 1197, -1, -1, -1, -1, -1, -1, -1,
6254 -1, 1044, -1, 1036, 1037, -1, 1211, -1, 1213, -1,
6255 -1, 1216, 1217, -1, -1, -1, 1221, 1222, 1061, -1,
6256 -1, -1, -1, -1, -1, -1, -1, 931, 1352, -1,
6257 -1, -1, 1356, -1, 1358, -1, -1, -1, -1, -1,
6258 -1, -1, 1085, -1, 948, -1, -1, -1, -1, 953,
6259 954, -1, -1, -1, -1, 959, 960, -1, -1, -1,
6260 -1, -1, -1, -1, 968, 969, -1, -1, 230, -1,
6261 232, 1104, 1105, -1, -1, 1108, -1, -1, -1, 241,
6262 984, -1, -1, -1, -1, 1290, -1, -1, 250, -1,
6263 -1, -1, 1125, -1, -1, -1, -1, -1, -1, -1,
6264 -1, -1, 1426, -1, 1, -1, -1, 269, -1, -1,
6265 1153, -1, -1, 1156, 1157, -1, -1, -1, -1, 1162,
6266 -1, -1, -1, 1027, 1028, 1029, -1, -1, 1161, -1,
6267 -1, -1, -1, -1, -1, -1, 298, -1, -1, -1,
6268 1044, -1, -1, 1186, -1, -1, 1189, 1352, -1, -1,
6269 -1, 1356, -1, 1358, -1, 52, 53, 1061, -1, 56,
6270 -1, 1194, -1, -1, 1197, 1208, -1, 329, 330, -1,
6271 -1, -1, -1, -1, -1, -1, -1, -1, 1211, -1,
6272 1213, 1085, -1, 1216, 1217, -1, -1, 1230, 1221, 1222,
6273 -1, -1, 89, -1, -1, 357, 358, -1, -1, -1,
6274 -1, -1, 1245, -1, -1, -1, -1, -1, -1, -1,
6275 -1, 108, 109, 110, -1, -1, 113, 114, 115, -1,
6276 -1, 1426, -1, -1, -1, -1, -1, -1, -1, -1,
6277 -1, -1, 394, -1, -1, 397, -1, -1, -1, -1,
6278 -1, -1, 404, 405, -1, -1, -1, -1, -1, 1153,
6279 -1, -1, 1156, 1157, -1, -1, -1, 1290, 1162, -1,
6280 -1, -1, -1, -1, -1, -1, -1, -1, 1311, -1,
6281 -1, -1, -1, -1, -1, 1318, 1319, -1, -1, -1,
6282 1323, -1, 1186, -1, -1, 1189, -1, -1, -1, -1,
6283 -1, -1, 454, -1, -1, -1, -1, -1, -1, -1,
6284 -1, -1, -1, -1, 1208, -1, -1, -1, -1, -1,
6285 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1352,
6286 -1, -1, -1, 1356, -1, 1358, 1230, 489, -1, -1,
6287 1373, -1, -1, 230, -1, 232, 498, -1, -1, -1,
6288 -1, 1245, -1, -1, 241, -1, -1, -1, -1, -1,
6289 -1, -1, -1, 250, -1, -1, -1, -1, 520, -1,
6290 522, 78, 79, 80, 81, 82, 83, 84, 85, -1,
6291 87, 88, 269, -1, -1, -1, -1, -1, 95, 96,
6292 -1, -1, -1, -1, -1, -1, -1, -1, -1, 551,
6293 -1, -1, -1, 1426, -1, -1, -1, -1, -1, -1,
6294 -1, 298, -1, -1, -1, -1, -1, 1311, -1, -1,
6295 -1, -1, -1, -1, 1318, 1319, -1, -1, -1, 1323,
6296 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6297 -1, -1, 329, 330, 596, -1, -1, 599, 1, -1,
6298 -1, -1, -1, -1, -1, -1, -1, 609, -1, -1,
6299 612, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6300 357, 358, -1, -1, -1, -1, -1, -1, -1, 1373,
6301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6302 -1, -1, -1, -1, -1, -1, -1, -1, -1, 52,
6303 53, -1, -1, 56, 656, -1, 658, 394, -1, -1,
6304 397, -1, -1, -1, 666, -1, -1, 404, 405, -1,
6305 -1, -1, -1, -1, -1, 677, -1, 679, -1, -1,
6306 -1, -1, -1, -1, -1, -1, 89, -1, -1, -1,
6307 -1, -1, -1, -1, 696, 697, -1, -1, -1, -1,
6308 -1, -1, -1, -1, -1, 108, 109, 110, -1, -1,
6309 -1, -1, -1, -1, -1, -1, -1, 454, -1, -1,
6310 722, -1, -1, -1, -1, -1, -1, -1, 0, -1,
6311 -1, 733, -1, -1, -1, -1, 8, 9, 10, -1,
6312 -1, 13, 14, 15, -1, 17, -1, -1, -1, 1,
6313 -1, -1, 489, 25, 26, 27, -1, -1, -1, -1,
6314 -1, 498, -1, -1, -1, 37, 38, -1, 40, 41,
6315 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6316 -1, -1, -1, 520, -1, 522, -1, -1, -1, -1,
6317 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6318 52, 53, -1, -1, -1, -1, -1, -1, -1, -1,
6319 -1, 813, -1, -1, 551, -1, -1, -1, -1, -1,
6320 -1, -1, -1, -1, -1, 97, 98, -1, -1, -1,
6321 -1, -1, -1, -1, -1, -1, -1, -1, 241, -1,
6322 78, 79, 80, 81, 82, 83, 84, 250, 120, 87,
6323 88, -1, -1, -1, -1, -1, 108, 95, 96, 596,
6324 -1, -1, 599, -1, 866, -1, 269, -1, -1, -1,
6325 -1, -1, 609, -1, -1, 612, -1, -1, -1, 151,
6326 152, -1, 154, -1, -1, 157, 158, -1, 160, -1,
6327 -1, -1, -1, -1, -1, 298, -1, -1, -1, 137,
6328 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6329 -1, -1, -1, -1, -1, -1, -1, -1, -1, 656,
6330 -1, 658, -1, -1, -1, -1, 329, 330, -1, 666,
6331 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6332 677, -1, 679, -1, -1, -1, 948, -1, -1, -1,
6333 -1, 953, 954, -1, 357, 358, -1, 959, 960, 696,
6334 697, -1, -1, -1, -1, -1, 968, -1, -1, 44,
6335 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6336 88, -1, 984, -1, -1, 722, -1, 95, 96, 241,
6337 -1, -1, -1, -1, 397, -1, 733, -1, 250, 1,
6338 -1, 404, 405, 78, 79, 80, 81, 82, 83, 84,
6339 85, 86, 87, 88, 89, 90, -1, 269, -1, -1,
6340 95, 96, -1, -1, -1, 1027, 1028, 1029, -1, 137,
6341 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6342 -1, -1, 1044, -1, -1, -1, -1, -1, -1, -1,
6343 52, 53, -1, -1, 56, -1, -1, -1, -1, 1061,
6344 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6345 145, 146, -1, -1, -1, -1, 813, 329, 330, -1,
6346 155, -1, -1, 1085, -1, -1, -1, 89, -1, -1,
6347 -1, -1, -1, -1, -1, 498, -1, -1, -1, -1,
6348 -1, -1, -1, -1, -1, 357, 108, 109, 110, 111,
6349 -1, -1, -1, -1, -1, -1, -1, 520, -1, -1,
6350 -1, -1, -1, -1, -1, -1, -1, -1, -1, 866,
6351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6352 -1, -1, -1, -1, -1, 397, -1, 1149, 551, -1,
6353 -1, 1153, 404, 405, 1156, 1157, -1, -1, -1, -1,
6354 1162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6356 -1, -1, -1, -1, 1186, -1, -1, 1189, -1, -1,
6357 -1, -1, -1, 596, -1, -1, 599, -1, -1, -1,
6358 -1, -1, -1, -1, -1, -1, 609, -1, -1, 612,
6359 -1, 948, -1, -1, -1, -1, 953, 954, -1, -1,
6360 -1, -1, 959, 960, -1, -1, -1, -1, 1230, -1,
6361 -1, 968, -1, -1, -1, -1, -1, -1, -1, 241,
6362 -1, -1, -1, 1245, -1, -1, 498, 984, 250, -1,
6363 -1, -1, -1, 656, -1, 658, -1, -1, -1, -1,
6364 -1, -1, -1, -1, -1, -1, -1, 269, -1, 1271,
6365 -1, -1, -1, -1, -1, -1, 679, -1, -1, -1,
6366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6367 1027, 1028, 1029, 696, 697, -1, 298, -1, -1, 551,
6368 -1, -1, -1, -1, -1, -1, -1, 1044, -1, 1311,
6369 -1, -1, -1, -1, -1, -1, -1, -1, -1, 722,
6370 25, 1323, -1, -1, 1061, -1, -1, 329, 330, -1,
6371 733, -1, -1, -1, -1, -1, -1, -1, -1, 742,
6372 -1, 1343, -1, -1, 596, -1, -1, 599, 1085, -1,
6373 -1, -1, -1, -1, -1, 357, 358, -1, -1, -1,
6374 612, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6375 -1, 1373, -1, 78, 79, 80, 81, 82, 83, 84,
6376 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6377 95, 96, -1, -1, -1, 397, 101, -1, -1, -1,
6378 -1, -1, 404, 405, 656, -1, 658, -1, -1, -1,
6379 813, -1, 1149, -1, -1, -1, 1153, -1, -1, 1156,
6380 1157, -1, -1, -1, -1, 1162, -1, 679, -1, -1,
6381 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6382 145, 146, -1, -1, 696, 697, 44, -1, -1, 1186,
6383 -1, -1, 1189, -1, -1, -1, -1, -1, -1, -1,
6384 -1, -1, -1, 866, -1, -1, -1, -1, -1, -1,
6385 722, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6386 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6387 88, 89, 90, 1230, -1, -1, 498, 95, 96, -1,
6388 -1, -1, -1, -1, -1, -1, -1, -1, 1245, -1,
6389 -1, -1, -1, -1, -1, -1, -1, -1, 520, -1,
6390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6391 -1, -1, -1, -1, 1271, -1, -1, 135, -1, 137,
6392 138, 139, 140, 141, 142, 143, 144, 145, 146, 551,
6393 953, 954, -1, -1, -1, -1, 959, 960, -1, -1,
6394 -1, -1, -1, -1, -1, 968, -1, -1, -1, -1,
6395 -1, -1, -1, -1, 1311, -1, -1, -1, -1, -1,
6396 -1, 984, -1, -1, -1, -1, 1323, -1, -1, -1,
6397 -1, -1, -1, -1, 596, -1, -1, 599, -1, -1,
6398 -1, -1, -1, -1, -1, -1, 1343, 609, -1, -1,
6399 -1, -1, -1, -1, 866, -1, -1, -1, -1, -1,
6400 -1, -1, -1, -1, 1027, 1028, 1029, -1, -1, -1,
6401 -1, -1, -1, -1, -1, -1, 1373, -1, -1, -1,
6402 -1, 1044, -1, -1, -1, -1, -1, -1, -1, -1,
6403 -1, -1, -1, -1, 656, -1, 658, -1, 1061, -1,
6404 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6405 87, 88, 89, 90, -1, -1, -1, 679, 95, 96,
6406 -1, -1, 1085, -1, -1, -1, -1, -1, -1, -1,
6407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6408 -1, 953, 954, -1, -1, -1, -1, 959, 960, -1,
6409 -1, -1, -1, -1, -1, -1, 968, -1, 135, -1,
6410 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6411 -1, 733, 984, -1, -1, -1, -1, 154, -1, -1,
6412 -1, -1, -1, -1, -1, -1, 1149, -1, -1, -1,
6413 1153, -1, -1, 1156, 1157, -1, -1, -1, -1, 1162,
6414 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6415 -1, -1, -1, -1, -1, 1027, 1028, 1029, 33, 34,
6416 35, 36, -1, 1186, -1, -1, 1189, -1, -1, -1,
6417 -1, -1, 1044, -1, 49, 50, 51, 52, -1, -1,
6418 -1, 56, -1, -1, 59, 60, 61, 62, 63, 1061,
6419 -1, 813, -1, -1, -1, -1, -1, -1, -1, -1,
6420 -1, -1, -1, -1, -1, -1, -1, 1230, -1, -1,
6421 -1, -1, -1, 1085, -1, -1, 91, 92, -1, -1,
6422 -1, -1, 1245, -1, 99, -1, -1, 102, -1, 104,
6423 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6424 115, 116, 117, 118, 866, -1, -1, -1, 1271, -1,
6425 -1, -1, -1, -1, -1, 47, 48, 49, 50, -1,
6426 -1, -1, 54, 55, -1, 140, -1, -1, -1, -1,
6427 -1, -1, 147, -1, -1, 67, 68, 1149, -1, 154,
6428 -1, 1153, -1, -1, 1156, 1157, -1, -1, -1, -1,
6429 1162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6430 1323, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6431 -1, -1, -1, -1, 1186, -1, -1, 1189, -1, -1,
6432 1343, 113, 114, 115, -1, -1, -1, -1, -1, -1,
6433 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6434 -1, -1, -1, -1, -1, -1, 968, -1, -1, -1,
6435 1373, -1, -1, -1, -1, -1, -1, -1, 1230, -1,
6436 -1, -1, 984, -1, -1, 0, 1, -1, 3, 4,
6437 5, 6, 7, 1245, -1, -1, 11, 12, -1, -1,
6438 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6439 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6440 35, 36, -1, -1, 39, 1027, 1028, -1, -1, -1,
6441 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6442 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6443 65, -1, -1, -1, -1, -1, -1, -1, 230, 1061,
6444 232, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6445 -1, 1323, -1, -1, -1, -1, 91, 92, -1, 251,
6446 -1, -1, -1, 1085, 99, -1, -1, 102, 103, 104,
6447 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6448 115, 116, 117, 118, -1, 120, 278, 279, 280, -1,
6449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6450 -1, 1373, -1, -1, -1, -1, -1, -1, -1, -1,
6451 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6452 -1, -1, -1, -1, -1, 160, -1, 1149, -1, -1,
6453 -1, 1153, -1, -1, 1156, 1157, -1, -1, -1, -1,
6454 1162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6455 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6456 87, 88, 89, 90, 1186, -1, -1, 1189, 95, 96,
6457 362, 363, 364, 365, 366, -1, -1, 369, 370, 371,
6458 372, 373, 374, 375, 376, -1, 378, -1, -1, 381,
6459 382, 383, 384, 385, 386, 387, 388, 389, 390, -1,
6460 -1, -1, 394, -1, -1, -1, -1, -1, 1230, -1,
6461 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6462 -1, -1, -1, 1245, -1, -1, -1, -1, -1, -1,
6463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6464 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1271,
6465 -1, -1, 444, -1, -1, -1, -1, -1, -1, -1,
6466 -1, -1, 454, -1, -1, -1, -1, -1, -1, -1,
6467 -1, -1, 464, -1, -1, -1, -1, -1, -1, -1,
6468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6469 482, -1, -1, -1, -1, -1, -1, 489, -1, -1,
6470 -1, 1323, -1, -1, -1, -1, -1, -1, -1, -1,
6471 -1, -1, -1, 505, -1, 507, -1, -1, 510, -1,
6472 -1, 1343, 0, 1, -1, 3, 4, 5, 6, 7,
6473 522, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6474 18, 19, 20, 21, 22, 23, 24, -1, 540, -1,
6475 -1, 1373, 30, 31, 32, 33, 34, 35, 36, -1,
6476 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6477 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6478 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6479 -1, -1, -1, -1, -1, 587, -1, -1, 76, 77,
6480 -1, -1, -1, 595, -1, -1, 598, -1, -1, -1,
6481 -1, -1, -1, 91, 92, 607, -1, -1, -1, -1,
6482 612, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6483 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6484 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6486 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6487 148, 149, -1, -1, 666, -1, 154, -1, -1, -1,
6488 -1, -1, 160, -1, -1, 677, -1, -1, -1, -1,
6489 -1, -1, -1, 685, -1, -1, 688, -1, -1, -1,
6490 -1, -1, -1, -1, 696, 697, -1, -1, 700, -1,
6491 702, -1, -1, -1, -1, -1, -1, -1, 710, 711,
6492 712, -1, -1, -1, -1, -1, -1, -1, 720, 721,
6493 722, -1, -1, -1, -1, 727, -1, -1, -1, -1,
6494 -1, -1, 0, 1, -1, 3, 4, 5, 6, 7,
6495 8, 9, 10, 11, 12, -1, 14, 15, 16, 17,
6496 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
6497 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6498 -1, 39, 774, -1, -1, -1, -1, 45, 46, 47,
6499 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6500 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6501 68, 803, -1, -1, -1, -1, -1, -1, 76, 77,
6502 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6503 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6504 -1, 99, -1, 835, 102, 103, 104, 105, -1, 107,
6505 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6506 118, 853, 120, -1, -1, -1, -1, -1, -1, -1,
6507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6508 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6509 148, 149, -1, -1, 152, -1, 888, -1, -1, -1,
6510 158, -1, 160, -1, -1, -1, -1, 33, 34, 35,
6511 36, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6512 -1, -1, -1, 49, 50, 51, 52, -1, -1, -1,
6513 56, -1, 58, 59, 60, 61, 62, 63, -1, 931,
6514 -1, -1, -1, -1, -1, -1, -1, -1, 940, -1,
6515 -1, -1, 78, -1, -1, -1, 948, -1, -1, -1,
6516 952, 953, 954, -1, -1, 91, 92, 959, 960, -1,
6517 -1, 963, -1, 99, -1, -1, 102, -1, 104, 105,
6518 -1, 107, 108, 975, 110, 111, 112, 113, 114, 115,
6519 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6520 -1, -1, -1, 995, -1, 997, 998, 999, -1, 1001,
6521 1002, -1, -1, -1, 140, -1, -1, -1, -1, -1,
6522 -1, 147, -1, -1, -1, -1, -1, -1, -1, 1021,
6523 1022, -1, -1, 1025, -1, -1, -1, 1029, 1030, 0,
6524 1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
6525 11, 12, 1044, -1, -1, 16, -1, 18, 19, 20,
6526 21, 22, 23, 24, -1, -1, -1, -1, 1060, 30,
6527 31, 32, 33, 34, 35, 36, 1068, -1, 39, -1,
6528 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6529 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6530 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6531 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6532 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6533 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6534 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6535 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6536 -1, -1, -1, -1, -1, -1, 1158, -1, -1, -1,
6537 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6538 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6539 -1, 152, 0, -1, -1, -1, -1, -1, -1, 160,
6540 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6541 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
6542 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6543 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6544 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6545 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6546 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6547 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6548 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6549 98, -1, 100, 101, -1, -1, -1, 135, 106, 137,
6550 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6551 -1, -1, 120, -1, -1, 123, -1, -1, -1, 1311,
6552 -1, -1, -1, -1, -1, -1, 134, 135, 136, 137,
6553 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6554 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6555 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6556 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6557 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6558 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6559 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6560 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6561 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6562 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6563 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6564 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6565 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6566 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6567 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6568 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6569 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6570 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6571 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6572 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6573 -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6574 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6575 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6576 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6577 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6578 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6579 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6580 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6581 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6582 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6583 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6584 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6585 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6586 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6587 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6588 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6589 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6590 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6591 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6592 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6593 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6594 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6595 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6596 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6598 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6599 -1, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6600 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6601 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6602 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6603 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6604 -1, 25, 26, 27, 28, 29, -1, -1, -1, -1,
6605 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6606 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6607 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6608 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6609 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6610 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6611 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6612 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6613 -1, -1, -1, -1, -1, -1, 120, -1, -1, 123,
6614 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6615 -1, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6616 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6617 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6618 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6619 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
6620 28, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6621 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6622 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6623 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6624 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6625 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6626 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6627 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6628 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6629 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6630 -1, -1, -1, -1, -1, -1, -1, 135, -1, 137,
6631 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6632 -1, -1, -1, 151, 152, 153, 154, 155, 0, 157,
6633 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6634 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6635 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6636 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6637 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6638 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6639 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6640 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6641 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6642 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6643 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6644 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6645 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6646 -1, -1, -1, 135, 136, 137, 138, 139, 140, 141,
6647 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6648 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6649 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6650 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6651 26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6652 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6653 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6654 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6655 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6656 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6657 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6658 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6659 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6660 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6662 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6663 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6664 0, 157, 158, 159, 160, -1, -1, -1, 8, 9,
6665 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6666 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6667 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6668 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6669 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6670 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6671 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6672 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6673 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6674 100, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6675 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6676 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 -1, -1, -1, -1, 134, 135, -1, 137, 138, 139,
6678 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6679 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6680 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6681 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6682 -1, 25, -1, 27, 28, -1, -1, -1, -1, -1,
6683 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6684 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6685 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6686 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6687 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6688 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6689 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6690 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6691 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6692 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6693 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6694 144, 145, 146, -1, -1, -1, -1, -1, 152, 153,
6695 154, 155, 0, 157, 158, 159, 160, -1, -1, -1,
6696 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6697 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6698 28, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6699 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6700 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6701 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6702 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6703 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6704 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6705 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6706 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6707 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6708 -1, -1, -1, -1, -1, -1, -1, 135, -1, 137,
6709 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6710 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6711 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6712 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6713 -1, -1, -1, 25, -1, 27, 28, -1, -1, -1,
6714 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6715 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6716 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6717 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6718 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6719 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6720 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6721 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6722 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6723 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6724 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6725 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6726 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6727 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6728 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6729 -1, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6730 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6732 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6733 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6734 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6735 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6736 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6737 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6738 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6740 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6741 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6742 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6743 10, -1, -1, -1, 14, 15, -1, 17, -1, -1,
6744 -1, -1, -1, -1, -1, 25, 26, -1, -1, -1,
6745 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6746 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6747 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6748 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6749 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6750 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6751 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6752 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
6753 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6754 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6755 -1, -1, -1, -1, 134, 135, -1, 137, 138, 139,
6756 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6757 -1, 151, 152, 153, 154, 155, 0, -1, 158, -1,
6758 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6759 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6760 -1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
6761 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6762 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6763 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6764 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6765 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6766 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6767 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6768 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6769 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6770 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6771 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6772 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6773 154, 155, 0, -1, 158, -1, 160, -1, -1, -1,
6774 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6775 -1, -1, -1, -1, -1, -1, -1, 25, -1, -1,
6776 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6777 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6778 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6779 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6780 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6781 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6782 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6783 98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6784 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6785 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6786 -1, -1, -1, -1, -1, -1, 134, 135, -1, 137,
6787 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6788 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6789 158, -1, 160, -1, -1, -1, 8, 9, 10, -1,
6790 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6791 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6792 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6793 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6794 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6795 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6796 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6797 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6798 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6800 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6803 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6804 152, 153, 154, 155, -1, -1, 158, 1, 160, 3,
6805 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
6806 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23,
6807 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6808 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6809 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6810 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6811 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6812 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6813 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6814 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6815 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6816 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6817 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6818 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6819 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6820 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6821 12, -1, 14, 15, 16, -1, 18, 19, 20, 21,
6822 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6823 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6824 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6825 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6826 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6827 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6828 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6829 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6830 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6831 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6833 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6834 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6835 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6836 10, 11, 12, -1, -1, 15, 16, 17, 18, 19,
6837 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6838 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6839 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6840 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6841 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6842 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6843 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6844 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6845 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6846 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6847 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6848 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6849 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6850 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6851 160, -1, 10, 11, 12, -1, -1, 15, 16, -1,
6852 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
6853 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6854 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6855 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6856 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6857 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6858 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6859 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6860 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6861 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6862 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6863 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6864 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6865 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6866 6, 7, 160, -1, 10, 11, 12, -1, -1, 15,
6867 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6868 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6869 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6870 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6871 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6872 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6873 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6874 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6875 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6876 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6877 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6878 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6879 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6880 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6881 4, 5, 6, 7, 160, 9, 10, 11, 12, -1,
6882 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6883 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6884 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6885 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6886 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6887 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6888 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6889 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6890 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6891 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6892 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6894 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6895 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6896 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6897 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6898 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6899 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6900 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6901 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6902 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6903 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6904 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6905 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6906 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6907 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6910 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6911 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6912 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6913 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6914 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6915 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6916 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6917 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6918 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6919 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6920 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6921 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6922 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6923 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6925 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6926 -1, -1, -1, -1, 154, -1, -1, -1, 158, 1,
6927 160, 3, 4, 5, 6, 7, -1, -1, -1, 11,
6928 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6929 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6930 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6931 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6932 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6933 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6934 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6935 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6936 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6937 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6938 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6939 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6940 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6941 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6942 -1, -1, 154, -1, -1, -1, 158, 1, 160, 3,
6943 4, 5, 6, 7, -1, -1, -1, 11, 12, -1,
6944 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6945 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6946 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6947 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6948 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6949 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6950 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6951 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6952 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6953 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6954 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6955 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6956 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6957 -1, -1, -1, 147, 148, 149, -1, -1, 152, 1,
6958 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6959 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6960 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6961 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6962 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6963 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6964 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6965 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6966 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6967 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6968 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6969 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6970 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6971 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6972 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6973 152, 1, 154, 3, 4, 5, -1, 7, 160, -1,
6974 -1, 11, 12, -1, -1, -1, 16, 17, 18, 19,
6975 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6976 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6977 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6978 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6979 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6980 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6981 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6982 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6983 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6984 110, 111, 112, 113, 114, 115, 116, 117, 118, -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, 147, 148, 149,
6988 -1, -1, -1, -1, 154, -1, -1, -1, -1, -1,
6989 160, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6990 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6991 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6992 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6993 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6994 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
6995 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6996 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6997 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6998 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6999 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7000 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7001 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7002 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7003 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
7004 -1, -1, -1, -1, 156, 157, 3, 4, 5, 6,
7005 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
7006 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
7007 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
7008 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
7009 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
7010 57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7011 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7012 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7013 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7015 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7016 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7017 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7018 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7019 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
7020 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
7021 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
7022 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
7023 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
7024 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
7025 53, 54, -1, 56, -1, -1, -1, -1, -1, -1,
7026 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7027 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7028 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7029 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7030 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
7031 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7032 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7033 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7034 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
7035 -1, -1, -1, 156, 3, 4, 5, 6, 7, 8,
7036 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7037 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
7038 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
7039 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
7040 49, 50, 51, 52, 53, -1, -1, 56, -1, -1,
7041 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7042 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7043 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7044 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7045 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7046 -1, -1, 111, -1, -1, -1, -1, -1, -1, -1,
7047 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7048 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7049 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7050 149, -1, -1, -1, -1, -1, -1, 156, 3, 4,
7051 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
7052 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
7053 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
7054 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
7055 45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
7056 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
7057 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7058 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7059 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7060 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7061 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7062 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7063 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7064 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7065 145, 146, -1, 148, 149, 3, 4, 5, -1, 7,
7066 -1, 156, -1, 11, 12, -1, -1, -1, 16, -1,
7067 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7068 -1, -1, 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 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7072 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7073 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7074 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7075 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7076 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7077 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7078 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7079 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7080 30, 31, 32, 33, 34, 35, 36, 155, -1, 39,
7081 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7082 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7083 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7084 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7086 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7087 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7088 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7089 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7090 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7091 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7092 32, 33, 34, 35, 36, 155, -1, 39, -1, -1,
7093 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7094 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
7095 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7096 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
7097 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
7098 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7099 102, 103, 104, 105, -1, 107, 108, 109, 110, 111,
7100 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
7101 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7102 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7103 3, 4, 5, -1, 7, 147, 148, 149, 11, 12,
7104 -1, -1, 154, 16, -1, 18, 19, 20, 21, 22,
7105 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
7106 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7107 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7108 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7109 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7110 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
7111 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
7112 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7113 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7114 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
7115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7116 -1, -1, -1, -1, -1, -1, -1, 1, -1, 3,
7117 4, 5, 6, 7, 147, 148, 149, 11, 12, -1,
7118 -1, 154, 16, -1, 18, 19, 20, 21, 22, 23,
7119 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
7120 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7121 -1, 45, 46, -1, 48, 49, 50, 51, 52, 53,
7122 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7123 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7124 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7125 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7126 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7127 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7128 114, 115, 116, 117, 118, -1, -1, 1, -1, 3,
7129 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7130 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7131 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7132 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7133 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7134 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7135 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7136 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7137 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7138 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7139 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7140 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7141 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7142 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7143 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7144 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7145 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7146 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7147 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7148 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7149 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7150 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7151 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
7152 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7153 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7154 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7155 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7156 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7157 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7158 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7159 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7160 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7161 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7162 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7163 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
7164 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7165 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7166 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7167 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7168 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7169 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7170 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7171 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7172 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7173 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7174 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7175 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
7176 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7177 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7178 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7179 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7180 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7181 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7182 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7183 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7184 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7185 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7186 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7187 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
7188 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7189 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7190 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7191 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7192 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7193 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7194 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7195 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7196 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7197 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7198 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7199 104, 105, -1, 107, 108, -1, 110, 111, 112, 113,
7200 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7201 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7202 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7203 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7204 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7205 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7206 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7207 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7208 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7209 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7210 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7211 104, 105, -1, -1, 108, 109, 110, 111, 112, 113,
7212 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7213 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7214 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7215 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7216 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7217 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7218 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7219 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7220 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7221 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7222 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7223 104, 105, -1, -1, 108, -1, 110, 111, 112, 113,
7224 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7225 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7226 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7227 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7228 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7229 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7230 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7231 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7232 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7233 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7234 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7235 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7236 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7237 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7238 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7239 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7240 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7241 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7242 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7243 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7244 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7245 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7246 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7247 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7248 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7249 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7250 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7251 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7252 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7253 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7254 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7255 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7256 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7257 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7258 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7259 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7260 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7261 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7262 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7263 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7264 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7265 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7266 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7267 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7268 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7269 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7270 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7271 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7272 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7273 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7274 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7275 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7276 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7277 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7278 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7279 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7280 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7281 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7282 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7283 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7284 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7285 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7286 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7287 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7288 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7289 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7290 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7291 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7292 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7293 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7294 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7295 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7296 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7297 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7298 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7299 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7300 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7301 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7302 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7303 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7304 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7305 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7306 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7307 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7308 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7309 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7310 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7311 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7312 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7313 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7314 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7315 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7316 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7317 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7318 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7319 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7320 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7321 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7322 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7323 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7324 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7325 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7326 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7327 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7328 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7329 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7330 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7331 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7332 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7333 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7334 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7335 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7336 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7337 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7338 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7339 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7340 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7341 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7342 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7343 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7344 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7345 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7346 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7347 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7348 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7349 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7350 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7351 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7352 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7353 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7354 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7355 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7356 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7357 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7358 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7359 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7360 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7361 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7362 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7363 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7364 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7365 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7366 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7367 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7368 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7369 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7370 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7371 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7372 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7373 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7374 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7375 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7376 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7378 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7379 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7380 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7381 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7382 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7383 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7384 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7385 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7386 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
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, -1, -1, -1,
7390 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7391 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7392 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7393 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7394 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7395 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7396 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7397 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7398 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7399 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7400 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7401 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
7402 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7403 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7404 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7405 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7406 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7407 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7408 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7409 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7410 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7411 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7413 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7414 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7415 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7416 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7417 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7418 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7419 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7420 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7421 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7422 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7423 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7424 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7425 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7426 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7427 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7428 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7429 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7430 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7431 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7432 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7433 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7434 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7437 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7438 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7439 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7440 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7441 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7442 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7443 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7444 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7445 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
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, -1, -1, -1, -1, -1,
7449 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7450 33, 34, 35, 36, 110, 111, 112, 113, 114, 115,
7451 116, 117, 118, -1, -1, -1, 49, 50, 51, 52,
7452 -1, -1, -1, 56, -1, -1, 59, 60, 61, 62,
7453 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7454 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
7455 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
7456 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7457 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
7458 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
7459 -1, -1, 33, 34, 35, 36, -1, -1, -1, 52,
7460 53, -1, -1, 56, -1, -1, -1, 140, 49, 50,
7461 51, 52, -1, -1, 147, 56, -1, -1, 59, 60,
7462 61, 62, 63, 76, 77, 78, 79, 80, 81, 82,
7463 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7464 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7465 91, 92, -1, -1, 107, 108, -1, -1, 99, -1,
7466 -1, 102, -1, 104, 105, -1, -1, -1, -1, 110,
7467 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7468 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7469 143, 144, 145, 146, -1, 148, 149, 52, 53, 140,
7470 -1, 56, -1, 156, 157, -1, 147, -1, -1, -1,
7471 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7472 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7473 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7474 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7475 -1, -1, 107, 108, -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, -1,
7478 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7479 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7480 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7481 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7482 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7483 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7485 107, 108, -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, -1, -1, -1,
7488 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7489 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7491 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7492 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7493 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7494 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
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, -1, -1, -1, 137, 138,
7498 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7499 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7500 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7501 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7502 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7503 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7504 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7506 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7507 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7508 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7509 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7510 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7511 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7512 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7513 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7514 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7515 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7517 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7518 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7519 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7520 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7521 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7522 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7523 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7524 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7525 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7526 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7527 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7528 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7529 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7530 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7531 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7532 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7533 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7534 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7535 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7536 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7537 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7538 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7539 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7540 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7541 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7542 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7543 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7544 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7545 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7546 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7547 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7548 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7549 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7550 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7551 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7552 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7553 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7554 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7555 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7556 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7557 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7558 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7559 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7560 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7561 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7562 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7563 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7564 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7566 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7567 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7568 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7569 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7570 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7571 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7572 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7573 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7574 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7575 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7576 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7577 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7578 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7579 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7580 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7581 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7583 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7584 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7585 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7586 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7587 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7588 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7589 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7590 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7591 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7592 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7593 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7594 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7595 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7596 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7597 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7599 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7600 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7601 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7602 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7603 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7604 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7605 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7606 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7607 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7608 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7609 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7610 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7611 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7612 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7613 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7614 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7615 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7616 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7617 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7619 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7620 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7621 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7622 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7623 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7625 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7626 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
7627 -1, 156
7628};
7629
7630/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7631 state STATE-NUM. */
7632static const yytype_int16 yystos[] =
7633{
7634 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7635 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7636 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7637 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7638 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7639 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7640 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7641 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7642 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7643 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7644 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7645 277, 278, 287, 288, 289, 290, 291, 327, 332, 333,
7646 383, 384, 385, 386, 387, 388, 390, 391, 394, 395,
7647 397, 398, 399, 400, 414, 415, 417, 418, 419, 420,
7648 421, 422, 423, 424, 425, 486, 0, 3, 4, 5,
7649 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
7650 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
7651 26, 30, 31, 32, 33, 34, 35, 36, 37, 38,
7652 39, 45, 46, 47, 48, 49, 50, 51, 52, 53,
7653 56, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7654 87, 88, 93, 94, 95, 96, 107, 108, 137, 138,
7655 139, 140, 141, 142, 143, 144, 145, 146, 148, 149,
7656 156, 220, 221, 222, 224, 225, 414, 179, 179, 179,
7657 157, 242, 247, 248, 154, 157, 189, 54, 221, 189,
7658 151, 169, 170, 235, 486, 21, 22, 32, 39, 99,
7659 102, 148, 195, 197, 208, 217, 227, 268, 287, 291,
7660 421, 422, 424, 425, 227, 227, 227, 56, 47, 102,
7661 171, 176, 177, 182, 211, 212, 486, 171, 58, 107,
7662 108, 112, 227, 238, 239, 240, 251, 252, 473, 474,
7663 486, 239, 472, 473, 486, 46, 99, 147, 155, 195,
7664 197, 216, 255, 268, 421, 422, 425, 325, 220, 403,
7665 416, 420, 403, 404, 405, 161, 389, 389, 389, 389,
7666 419, 203, 227, 268, 227, 154, 160, 163, 484, 485,
7667 169, 40, 41, 42, 43, 44, 37, 38, 157, 428,
7668 429, 430, 431, 432, 428, 431, 26, 151, 242, 248,
7669 279, 334, 28, 280, 331, 134, 155, 102, 107, 214,
7670 134, 25, 78, 79, 80, 81, 82, 83, 84, 85,
7671 86, 87, 88, 89, 90, 95, 96, 101, 135, 137,
7672 138, 139, 140, 141, 142, 143, 144, 145, 146, 233,
7673 233, 69, 97, 98, 153, 478, 479, 256, 1, 191,
7674 198, 199, 199, 200, 202, 202, 163, 199, 485, 99,
7675 210, 217, 268, 296, 421, 422, 425, 52, 56, 95,
7676 99, 218, 219, 268, 421, 422, 425, 219, 33, 34,
7677 35, 36, 49, 50, 51, 52, 56, 157, 194, 220,
7678 423, 468, 469, 470, 109, 187, 209, 245, 246, 249,
7679 251, 473, 246, 246, 157, 248, 98, 478, 479, 334,
7680 386, 100, 100, 155, 92, 244, 246, 251, 452, 473,
7681 486, 246, 189, 191, 480, 191, 54, 64, 65, 181,
7682 157, 235, 236, 164, 56, 428, 428, 134, 98, 153,
7683 478, 100, 100, 100, 178, 211, 158, 163, 485, 480,
7684 257, 239, 239, 239, 403, 101, 159, 155, 189, 483,
7685 155, 483, 152, 483, 189, 56, 419, 213, 214, 430,
7686 155, 98, 153, 478, 322, 66, 119, 121, 122, 406,
7687 119, 119, 406, 67, 406, 161, 392, 401, 396, 402,
7688 78, 98, 478, 160, 168, 171, 199, 199, 199, 199,
7689 235, 237, 191, 191, 52, 54, 55, 56, 57, 58,
7690 78, 92, 102, 107, 108, 109, 141, 144, 301, 370,
7691 429, 433, 434, 436, 437, 440, 441, 443, 444, 445,
7692 446, 452, 453, 454, 455, 456, 457, 458, 459, 460,
7693 461, 462, 463, 464, 465, 134, 265, 446, 134, 266,
7694 335, 336, 106, 207, 337, 338, 338, 235, 211, 155,
7695 216, 155, 235, 193, 227, 227, 227, 227, 227, 227,
7696 227, 227, 227, 227, 227, 227, 227, 192, 227, 227,
7697 227, 227, 227, 227, 227, 227, 227, 227, 227, 52,
7698 53, 56, 224, 475, 476, 244, 251, 52, 53, 56,
7699 224, 475, 242, 171, 174, 13, 292, 484, 292, 199,
7700 171, 171, 259, 163, 56, 98, 153, 478, 25, 199,
7701 52, 56, 218, 138, 427, 486, 98, 153, 478, 264,
7702 471, 69, 98, 477, 239, 155, 250, 486, 155, 250,
7703 246, 480, 52, 56, 242, 475, 235, 235, 223, 480,
7704 155, 480, 155, 158, 480, 221, 236, 227, 152, 100,
7705 134, 134, 235, 52, 56, 475, 244, 52, 56, 475,
7706 235, 235, 235, 170, 480, 177, 158, 124, 239, 239,
7707 252, 473, 474, 155, 213, 52, 56, 244, 52, 56,
7708 323, 408, 407, 119, 393, 406, 66, 119, 119, 393,
7709 66, 119, 227, 56, 152, 182, 102, 107, 297, 298,
7710 299, 300, 454, 155, 435, 466, 467, 155, 435, 155,
7711 442, 467, 480, 302, 303, 155, 442, 239, 34, 52,
7712 52, 155, 442, 34, 52, 39, 188, 209, 227, 232,
7713 174, 484, 188, 232, 174, 322, 152, 336, 322, 10,
7714 68, 286, 286, 107, 203, 204, 205, 239, 251, 253,
7715 254, 480, 213, 155, 99, 185, 190, 205, 217, 227,
7716 239, 241, 254, 268, 425, 344, 344, 189, 100, 100,
7717 151, 242, 248, 189, 481, 155, 100, 100, 242, 243,
7718 248, 486, 235, 286, 171, 13, 171, 27, 293, 484,
7719 286, 286, 17, 283, 340, 25, 258, 346, 52, 56,
7720 244, 52, 56, 260, 263, 426, 262, 52, 56, 218,
7721 244, 174, 191, 196, 249, 473, 480, 243, 248, 190,
7722 227, 241, 190, 241, 221, 452, 473, 191, 235, 39,
7723 100, 100, 481, 100, 100, 190, 241, 239, 483, 214,
7724 481, 324, 409, 413, 420, 425, 389, 406, 389, 389,
7725 389, 299, 454, 155, 480, 155, 465, 433, 459, 461,
7726 437, 440, 457, 463, 134, 239, 441, 456, 463, 455,
7727 457, 189, 44, 44, 286, 286, 323, 152, 323, 239,
7728 155, 44, 213, 56, 44, 134, 44, 98, 153, 478,
7729 342, 342, 136, 235, 235, 336, 207, 159, 100, 235,
7730 235, 207, 8, 281, 379, 486, 14, 15, 284, 285,
7731 294, 295, 486, 295, 201, 107, 239, 339, 286, 344,
7732 340, 286, 481, 199, 484, 199, 174, 481, 286, 480,
7733 194, 250, 334, 331, 480, 155, 480, 189, 235, 235,
7734 100, 235, 235, 179, 410, 480, 297, 300, 298, 435,
7735 155, 442, 155, 442, 155, 442, 155, 442, 442, 188,
7736 232, 237, 237, 324, 324, 107, 239, 237, 237, 235,
7737 237, 52, 56, 244, 52, 56, 343, 343, 227, 190,
7738 241, 190, 241, 152, 235, 190, 241, 190, 241, 239,
7739 254, 380, 486, 175, 284, 171, 199, 286, 286, 239,
7740 155, 292, 342, 286, 293, 174, 484, 286, 235, 157,
7741 301, 328, 429, 434, 438, 439, 441, 448, 449, 450,
7742 451, 452, 457, 463, 465, 411, 155, 155, 457, 457,
7743 463, 457, 227, 227, 179, 179, 239, 182, 182, 227,
7744 481, 52, 56, 58, 91, 92, 99, 102, 104, 105,
7745 107, 112, 140, 327, 349, 350, 351, 353, 356, 360,
7746 361, 362, 365, 366, 367, 368, 369, 370, 371, 372,
7747 373, 374, 375, 376, 377, 378, 383, 384, 387, 388,
7748 391, 395, 398, 400, 422, 459, 349, 190, 241, 101,
7749 381, 486, 9, 282, 382, 486, 172, 292, 107, 239,
7750 171, 343, 261, 286, 451, 155, 306, 486, 326, 155,
7751 306, 155, 447, 486, 155, 447, 155, 447, 171, 298,
7752 442, 442, 155, 442, 442, 139, 316, 317, 486, 316,
7753 374, 374, 56, 218, 343, 350, 358, 359, 360, 361,
7754 364, 481, 189, 343, 482, 52, 403, 52, 102, 420,
7755 101, 155, 139, 155, 155, 350, 89, 90, 98, 153,
7756 157, 354, 355, 52, 99, 217, 268, 421, 422, 425,
7757 292, 176, 171, 171, 239, 295, 340, 341, 348, 349,
7758 171, 189, 319, 465, 29, 123, 329, 461, 439, 457,
7759 463, 441, 463, 457, 0, 120, 412, 457, 301, 304,
7760 305, 307, 308, 310, 311, 313, 314, 315, 318, 455,
7761 457, 458, 463, 465, 171, 174, 350, 481, 350, 362,
7762 364, 481, 155, 152, 235, 124, 199, 375, 358, 362,
7763 352, 363, 364, 112, 367, 371, 374, 374, 218, 343,
7764 481, 343, 480, 358, 361, 365, 358, 361, 365, 56,
7765 98, 153, 478, 171, 163, 173, 294, 292, 40, 41,
7766 286, 160, 158, 330, 171, 306, 155, 447, 155, 447,
7767 155, 447, 155, 447, 447, 442, 306, 155, 306, 155,
7768 312, 486, 319, 303, 155, 309, 312, 99, 268, 155,
7769 312, 480, 155, 155, 357, 480, 155, 356, 155, 403,
7770 480, 480, 480, 481, 481, 481, 52, 56, 244, 52,
7771 56, 379, 382, 345, 199, 199, 52, 320, 321, 453,
7772 174, 152, 457, 457, 463, 457, 304, 461, 308, 310,
7773 457, 463, 139, 268, 311, 463, 56, 98, 457, 363,
7774 365, 363, 362, 364, 481, 171, 155, 189, 286, 447,
7775 447, 155, 447, 447, 306, 155, 312, 155, 312, 155,
7776 312, 155, 312, 52, 56, 312, 155, 482, 295, 346,
7777 347, 321, 457, 457, 457, 463, 457, 447, 312, 312,
7778 155, 312, 312, 457, 312
7779};
7780
7781/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7782static const yytype_int16 yyr1[] =
7783{
7784 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7785 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7786 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7787 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7788 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7789 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7790 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7791 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7792 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7793 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7794 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7795 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7796 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7797 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7798 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7799 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7800 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7801 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7802 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7803 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7804 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7805 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7806 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7807 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7808 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7809 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7810 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7811 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7812 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7813 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7814 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7815 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7816 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7817 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7818 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7819 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7820 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7821 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7822 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7823 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7824 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7825 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7826 289, 290, 291, 292, 292, 292, 293, 293, 294, 294,
7827 295, 295, 296, 296, 297, 297, 298, 298, 299, 299,
7828 299, 299, 299, 300, 300, 301, 301, 302, 303, 304,
7829 304, 305, 305, 306, 306, 307, 307, 307, 307, 308,
7830 309, 310, 311, 311, 312, 312, 313, 313, 313, 313,
7831 313, 313, 313, 313, 313, 313, 313, 313, 314, 314,
7832 314, 315, 314, 316, 316, 317, 318, 318, 319, 319,
7833 320, 320, 321, 321, 322, 323, 324, 325, 326, 327,
7834 328, 328, 329, 330, 329, 331, 332, 332, 332, 332,
7835 332, 333, 333, 333, 333, 333, 333, 333, 333, 334,
7836 334, 335, 336, 337, 338, 339, 339, 339, 339, 340,
7837 341, 341, 342, 343, 344, 345, 346, 347, 347, 348,
7838 348, 348, 349, 349, 349, 349, 349, 349, 350, 351,
7839 351, 352, 353, 353, 354, 355, 356, 356, 356, 356,
7840 356, 356, 356, 356, 356, 356, 356, 356, 356, 357,
7841 356, 356, 356, 358, 358, 358, 358, 358, 358, 359,
7842 359, 360, 360, 361, 362, 362, 363, 363, 364, 365,
7843 365, 365, 365, 366, 366, 367, 367, 368, 368, 369,
7844 369, 370, 371, 371, 372, 373, 373, 373, 373, 373,
7845 373, 372, 372, 372, 372, 374, 374, 374, 374, 374,
7846 374, 374, 374, 374, 374, 375, 376, 376, 377, 378,
7847 378, 378, 379, 379, 380, 380, 380, 381, 381, 382,
7848 382, 383, 383, 384, 385, 385, 385, 386, 387, 388,
7849 389, 389, 390, 391, 392, 392, 393, 393, 394, 395,
7850 396, 396, 397, 398, 399, 400, 401, 401, 402, 402,
7851 403, 403, 404, 404, 405, 405, 406, 407, 406, 408,
7852 409, 410, 411, 406, 412, 412, 413, 413, 414, 414,
7853 415, 416, 416, 417, 418, 418, 419, 419, 419, 419,
7854 420, 420, 420, 421, 421, 421, 422, 422, 422, 422,
7855 422, 422, 422, 423, 423, 424, 424, 425, 425, 426,
7856 427, 427, 428, 428, 429, 430, 431, 432, 431, 433,
7857 433, 434, 434, 435, 435, 436, 436, 436, 436, 437,
7858 437, 438, 438, 438, 438, 439, 439, 440, 441, 441,
7859 442, 442, 443, 443, 443, 443, 443, 443, 443, 443,
7860 443, 443, 443, 443, 444, 444, 445, 444, 444, 446,
7861 447, 447, 448, 448, 448, 448, 448, 448, 448, 448,
7862 448, 448, 448, 448, 449, 449, 450, 449, 449, 451,
7863 452, 453, 453, 453, 453, 454, 454, 455, 456, 456,
7864 457, 457, 458, 459, 459, 460, 461, 461, 462, 462,
7865 463, 463, 464, 464, 465, 465, 465, 466, 466, 467,
7866 468, 469, 470, 471, 470, 472, 472, 473, 473, 474,
7867 474, 474, 474, 474, 474, 475, 475, 475, 475, 476,
7868 476, 476, 477, 477, 478, 478, 479, 479, 480, 481,
7869 482, 483, 483, 484, 484, 485, 485, 486
7870};
7871
7872/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7873static const yytype_int8 yyr2[] =
7874{
7875 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7876 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7877 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7878 3, 3, 3, 2, 3, 3, 3, 3, 4, 4,
7879 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7880 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7881 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7882 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7883 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7884 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7885 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7886 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7887 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7888 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7889 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7890 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7891 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7892 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7893 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7894 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7895 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7896 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7897 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7898 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7899 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7900 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7901 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7902 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7903 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7904 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7905 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7906 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7907 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7908 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7909 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7910 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7911 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7912 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7913 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7914 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7915 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7916 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7917 1, 1, 1, 1, 1, 2, 1, 1, 1, 5,
7918 1, 2, 1, 1, 1, 3, 1, 3, 1, 3,
7919 5, 1, 3, 2, 1, 1, 1, 0, 2, 2,
7920 1, 1, 3, 2, 1, 4, 2, 2, 1, 1,
7921 1, 3, 1, 3, 2, 1, 6, 8, 4, 6,
7922 4, 6, 4, 6, 2, 4, 2, 4, 1, 2,
7923 2, 1, 1, 1, 1, 4, 0, 1, 1, 4,
7924 1, 3, 1, 1, 0, 0, 0, 0, 0, 9,
7925 4, 1, 3, 0, 4, 3, 2, 4, 5, 5,
7926 3, 2, 4, 4, 3, 3, 2, 1, 4, 3,
7927 3, 0, 7, 0, 7, 1, 2, 3, 4, 5,
7928 1, 1, 0, 0, 0, 0, 9, 1, 1, 1,
7929 3, 3, 1, 2, 3, 1, 1, 1, 1, 3,
7930 1, 0, 4, 1, 2, 2, 1, 1, 4, 4,
7931 4, 3, 4, 4, 4, 3, 3, 3, 2, 0,
7932 6, 2, 4, 1, 1, 2, 2, 4, 1, 2,
7933 3, 1, 3, 5, 2, 1, 1, 3, 1, 3,
7934 1, 2, 1, 1, 3, 2, 1, 1, 3, 2,
7935 1, 2, 1, 1, 1, 3, 3, 2, 2, 2,
7936 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7937 1, 1, 1, 1, 1, 1, 2, 2, 4, 2,
7938 3, 1, 6, 1, 1, 1, 1, 2, 1, 3,
7939 1, 1, 1, 1, 1, 1, 2, 3, 3, 3,
7940 1, 2, 4, 1, 0, 3, 1, 2, 4, 1,
7941 0, 3, 4, 1, 4, 1, 0, 3, 0, 3,
7942 0, 2, 0, 2, 0, 2, 1, 0, 3, 0,
7943 0, 0, 0, 7, 1, 1, 1, 1, 1, 1,
7944 2, 1, 1, 3, 1, 2, 1, 1, 1, 1,
7945 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7946 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
7947 4, 1, 1, 1, 0, 3, 1, 0, 3, 2,
7948 1, 1, 3, 2, 1, 4, 2, 2, 1, 1,
7949 1, 4, 2, 2, 1, 1, 1, 3, 1, 3,
7950 2, 1, 6, 8, 4, 6, 4, 6, 4, 6,
7951 2, 4, 2, 4, 1, 2, 1, 1, 1, 1,
7952 2, 1, 6, 8, 4, 6, 4, 6, 4, 6,
7953 2, 4, 2, 4, 1, 2, 1, 1, 1, 1,
7954 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
7955 1, 3, 1, 1, 1, 1, 2, 1, 1, 1,
7956 2, 1, 1, 1, 2, 2, 1, 0, 1, 1,
7957 1, 1, 1, 0, 4, 1, 2, 1, 3, 3,
7958 2, 1, 4, 2, 1, 1, 1, 1, 1, 1,
7959 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
7960 2, 1, 1, 1, 1, 1, 2, 0
7961};
7962
7963
7964enum { YYENOMEM = -2 };
7965
7966#define yyerrok (yyerrstatus = 0)
7967#define yyclearin (yychar = YYEMPTY)
7968
7969#define YYACCEPT goto yyacceptlab
7970#define YYABORT goto yyabortlab
7971#define YYERROR goto yyerrorlab
7972#define YYNOMEM goto yyexhaustedlab
7973
7974
7975#define YYRECOVERING() (!!yyerrstatus)
7976
7977#define YYBACKUP(Token, Value) \
7978 do \
7979 if (yychar == YYEMPTY) \
7980 { \
7981 yychar = (Token); \
7982 yylval = (Value); \
7983 YYPOPSTACK (yylen); \
7984 yystate = *yyssp; \
7985 goto yybackup; \
7986 } \
7987 else \
7988 { \
7989 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7990 YYERROR; \
7991 } \
7992 while (0)
7993
7994/* Backward compatibility with an undocumented macro.
7995 Use YYerror or YYUNDEF. */
7996#define YYERRCODE YYUNDEF
7997
7998/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7999 If N is 0, then set CURRENT to the empty location which ends
8000 the previous symbol: RHS[0] (always defined). */
8001
8002#ifndef YYLLOC_DEFAULT
8003# define YYLLOC_DEFAULT(Current, Rhs, N) \
8004 do \
8005 if (N) \
8006 { \
8007 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
8008 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
8009 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
8010 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
8011 } \
8012 else \
8013 { \
8014 (Current).first_line = (Current).last_line = \
8015 YYRHSLOC (Rhs, 0).last_line; \
8016 (Current).first_column = (Current).last_column = \
8017 YYRHSLOC (Rhs, 0).last_column; \
8018 } \
8019 while (0)
8020#endif
8021
8022#define YYRHSLOC(Rhs, K) ((Rhs)[K])
8023
8024
8025/* Enable debugging if requested. */
8026#if YYDEBUG
8027
8028# ifndef YYFPRINTF
8029# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
8030# define YYFPRINTF fprintf
8031# endif
8032
8033# define YYDPRINTF(Args) \
8034do { \
8035 if (yydebug) \
8036 YYFPRINTF Args; \
8037} while (0)
8038
8039
8040/* YYLOCATION_PRINT -- Print the location on the stream.
8041 This macro was not mandated originally: define only if we know
8042 we won't break user code: when these are the locations we know. */
8043
8044# ifndef YYLOCATION_PRINT
8045
8046# if defined YY_LOCATION_PRINT
8047
8048 /* Temporary convenience wrapper in case some people defined the
8049 undocumented and private YY_LOCATION_PRINT macros. */
8050# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
8051
8052# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
8053
8054/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
8055
8056YY_ATTRIBUTE_UNUSED
8057static int
8058yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
8059{
8060 int res = 0;
8061 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
8062 if (0 <= yylocp->first_line)
8063 {
8064 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
8065 if (0 <= yylocp->first_column)
8066 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
8067 }
8068 if (0 <= yylocp->last_line)
8069 {
8070 if (yylocp->first_line < yylocp->last_line)
8071 {
8072 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
8073 if (0 <= end_col)
8074 res += YYFPRINTF (yyo, ".%d", end_col);
8075 }
8076 else if (0 <= end_col && yylocp->first_column < end_col)
8077 res += YYFPRINTF (yyo, "-%d", end_col);
8078 }
8079 return res;
8080}
8081
8082# define YYLOCATION_PRINT yy_location_print_
8083
8084 /* Temporary convenience wrapper in case some people defined the
8085 undocumented and private YY_LOCATION_PRINT macros. */
8086# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
8087
8088# else
8089
8090# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
8091 /* Temporary convenience wrapper in case some people defined the
8092 undocumented and private YY_LOCATION_PRINT macros. */
8093# define YY_LOCATION_PRINT YYLOCATION_PRINT
8094
8095# endif
8096# endif /* !defined YYLOCATION_PRINT */
8097
8098
8099# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
8100do { \
8101 if (yydebug) \
8102 { \
8103 YYFPRINTF (stderr, "%s ", Title); \
8104 yy_symbol_print (stderr, \
8105 Kind, Value, Location, p); \
8106 YYFPRINTF (stderr, "\n"); \
8107 } \
8108} while (0)
8109
8110
8111/*-----------------------------------.
8112| Print this symbol's value on YYO. |
8113`-----------------------------------*/
8114
8115static void
8116yy_symbol_value_print (FILE *yyo,
8117 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
8118{
8119 FILE *yyoutput = yyo;
8120 YY_USE (yyoutput);
8121 YY_USE (yylocationp);
8122 YY_USE (p);
8123 if (!yyvaluep)
8124 return;
8125 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
8126switch (yykind)
8127 {
8128 case YYSYMBOL_keyword_class: /* "'class'" */
8129#line 2643 "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_module: /* "'module'" */
8137#line 2643 "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_def: /* "'def'" */
8145#line 2643 "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_undef: /* "'undef'" */
8153#line 2643 "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_begin: /* "'begin'" */
8161#line 2643 "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_rescue: /* "'rescue'" */
8169#line 2643 "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_ensure: /* "'ensure'" */
8177#line 2643 "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_end: /* "'end'" */
8185#line 2643 "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_if: /* "'if'" */
8193#line 2643 "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_unless: /* "'unless'" */
8201#line 2643 "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_then: /* "'then'" */
8209#line 2643 "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_elsif: /* "'elsif'" */
8217#line 2643 "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_else: /* "'else'" */
8225#line 2643 "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_case: /* "'case'" */
8233#line 2643 "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_when: /* "'when'" */
8241#line 2643 "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_while: /* "'while'" */
8249#line 2643 "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_until: /* "'until'" */
8257#line 2643 "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_for: /* "'for'" */
8265#line 2643 "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_break: /* "'break'" */
8273#line 2643 "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_next: /* "'next'" */
8281#line 2643 "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_redo: /* "'redo'" */
8289#line 2643 "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_keyword_retry: /* "'retry'" */
8297#line 2643 "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_keyword_in: /* "'in'" */
8305#line 2643 "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_keyword_do: /* "'do'" */
8313#line 2643 "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_keyword_do_cond: /* "'do' for condition" */
8321#line 2643 "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_keyword_do_block: /* "'do' for block" */
8329#line 2643 "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_do_LAMBDA: /* "'do' for lambda" */
8337#line 2643 "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_return: /* "'return'" */
8345#line 2643 "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_yield: /* "'yield'" */
8353#line 2643 "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_super: /* "'super'" */
8361#line 2643 "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_self: /* "'self'" */
8369#line 2643 "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_nil: /* "'nil'" */
8377#line 2643 "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_true: /* "'true'" */
8385#line 2643 "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_keyword_false: /* "'false'" */
8393#line 2643 "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_keyword_and: /* "'and'" */
8401#line 2643 "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_keyword_or: /* "'or'" */
8409#line 2643 "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_keyword_not: /* "'not'" */
8417#line 2643 "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_modifier_if: /* "'if' modifier" */
8425#line 2643 "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_modifier_unless: /* "'unless' modifier" */
8433#line 2643 "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_modifier_while: /* "'while' modifier" */
8441#line 2643 "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_modifier_until: /* "'until' modifier" */
8449#line 2643 "parse.y"
8450 {
8451 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8452}
8453#line 8454 "parse.c"
8454 break;
8455
8456 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8457#line 2643 "parse.y"
8458 {
8459 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8460}
8461#line 8462 "parse.c"
8462 break;
8463
8464 case YYSYMBOL_keyword_alias: /* "'alias'" */
8465#line 2643 "parse.y"
8466 {
8467 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8468}
8469#line 8470 "parse.c"
8470 break;
8471
8472 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8473#line 2643 "parse.y"
8474 {
8475 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8476}
8477#line 8478 "parse.c"
8478 break;
8479
8480 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8481#line 2643 "parse.y"
8482 {
8483 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8484}
8485#line 8486 "parse.c"
8486 break;
8487
8488 case YYSYMBOL_keyword_END: /* "'END'" */
8489#line 2643 "parse.y"
8490 {
8491 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8492}
8493#line 8494 "parse.c"
8494 break;
8495
8496 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8497#line 2643 "parse.y"
8498 {
8499 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8500}
8501#line 8502 "parse.c"
8502 break;
8503
8504 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8505#line 2643 "parse.y"
8506 {
8507 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8508}
8509#line 8510 "parse.c"
8510 break;
8511
8512 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8513#line 2643 "parse.y"
8514 {
8515 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8516}
8517#line 8518 "parse.c"
8518 break;
8519
8520 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8521#line 2643 "parse.y"
8522 {
8523 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8524}
8525#line 8526 "parse.c"
8526 break;
8527
8528 case YYSYMBOL_tFID: /* "method" */
8529#line 2643 "parse.y"
8530 {
8531 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8532}
8533#line 8534 "parse.c"
8534 break;
8535
8536 case YYSYMBOL_tGVAR: /* "global variable" */
8537#line 2643 "parse.y"
8538 {
8539 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8540}
8541#line 8542 "parse.c"
8542 break;
8543
8544 case YYSYMBOL_tIVAR: /* "instance variable" */
8545#line 2643 "parse.y"
8546 {
8547 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8548}
8549#line 8550 "parse.c"
8550 break;
8551
8552 case YYSYMBOL_tCONSTANT: /* "constant" */
8553#line 2643 "parse.y"
8554 {
8555 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8556}
8557#line 8558 "parse.c"
8558 break;
8559
8560 case YYSYMBOL_tCVAR: /* "class variable" */
8561#line 2643 "parse.y"
8562 {
8563 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8564}
8565#line 8566 "parse.c"
8566 break;
8567
8568 case YYSYMBOL_tLABEL: /* "label" */
8569#line 2643 "parse.y"
8570 {
8571 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8572}
8573#line 8574 "parse.c"
8574 break;
8575
8576 case YYSYMBOL_tINTEGER: /* "integer literal" */
8577#line 2646 "parse.y"
8578 {
8579 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8580 case NODE_INTEGER:
8581 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8582 break;
8583 case NODE_FLOAT:
8584 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8585 break;
8586 case NODE_RATIONAL:
8587 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8588 break;
8589 case NODE_IMAGINARY:
8590 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8591 break;
8592 default:
8593 break;
8594 }
8595}
8596#line 8597 "parse.c"
8597 break;
8598
8599 case YYSYMBOL_tFLOAT: /* "float literal" */
8600#line 2646 "parse.y"
8601 {
8602 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8603 case NODE_INTEGER:
8604 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8605 break;
8606 case NODE_FLOAT:
8607 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8608 break;
8609 case NODE_RATIONAL:
8610 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8611 break;
8612 case NODE_IMAGINARY:
8613 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8614 break;
8615 default:
8616 break;
8617 }
8618}
8619#line 8620 "parse.c"
8620 break;
8621
8622 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8623#line 2646 "parse.y"
8624 {
8625 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8626 case NODE_INTEGER:
8627 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8628 break;
8629 case NODE_FLOAT:
8630 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8631 break;
8632 case NODE_RATIONAL:
8633 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8634 break;
8635 case NODE_IMAGINARY:
8636 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8637 break;
8638 default:
8639 break;
8640 }
8641}
8642#line 8643 "parse.c"
8643 break;
8644
8645 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8646#line 2646 "parse.y"
8647 {
8648 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8649 case NODE_INTEGER:
8650 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8651 break;
8652 case NODE_FLOAT:
8653 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8654 break;
8655 case NODE_RATIONAL:
8656 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8657 break;
8658 case NODE_IMAGINARY:
8659 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8660 break;
8661 default:
8662 break;
8663 }
8664}
8665#line 8666 "parse.c"
8666 break;
8667
8668 case YYSYMBOL_tCHAR: /* "char literal" */
8669#line 2646 "parse.y"
8670 {
8671 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8672 case NODE_INTEGER:
8673 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8674 break;
8675 case NODE_FLOAT:
8676 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8677 break;
8678 case NODE_RATIONAL:
8679 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8680 break;
8681 case NODE_IMAGINARY:
8682 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8683 break;
8684 default:
8685 break;
8686 }
8687}
8688#line 8689 "parse.c"
8689 break;
8690
8691 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8692#line 2664 "parse.y"
8693 {
8694 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8695}
8696#line 8697 "parse.c"
8697 break;
8698
8699 case YYSYMBOL_tBACK_REF: /* "back reference" */
8700#line 2667 "parse.y"
8701 {
8702 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8703}
8704#line 8705 "parse.c"
8705 break;
8706
8707 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8708#line 2646 "parse.y"
8709 {
8710 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8711 case NODE_INTEGER:
8712 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8713 break;
8714 case NODE_FLOAT:
8715 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8716 break;
8717 case NODE_RATIONAL:
8718 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8719 break;
8720 case NODE_IMAGINARY:
8721 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8722 break;
8723 default:
8724 break;
8725 }
8726}
8727#line 8728 "parse.c"
8728 break;
8729
8730 case YYSYMBOL_69_: /* '.' */
8731#line 2643 "parse.y"
8732 {
8733 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8734}
8735#line 8736 "parse.c"
8736 break;
8737
8738 case YYSYMBOL_70_backslash_: /* "backslash" */
8739#line 2643 "parse.y"
8740 {
8741 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8742}
8743#line 8744 "parse.c"
8744 break;
8745
8746 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8747#line 2643 "parse.y"
8748 {
8749 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8750}
8751#line 8752 "parse.c"
8752 break;
8753
8754 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8755#line 2643 "parse.y"
8756 {
8757 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8758}
8759#line 8760 "parse.c"
8760 break;
8761
8762 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8763#line 2643 "parse.y"
8764 {
8765 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8766}
8767#line 8768 "parse.c"
8768 break;
8769
8770 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8771#line 2643 "parse.y"
8772 {
8773 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8774}
8775#line 8776 "parse.c"
8776 break;
8777
8778 case YYSYMBOL_tANDDOT: /* "&." */
8779#line 2643 "parse.y"
8780 {
8781 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8782}
8783#line 8784 "parse.c"
8784 break;
8785
8786 case YYSYMBOL_tCOLON2: /* "::" */
8787#line 2643 "parse.y"
8788 {
8789 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8790}
8791#line 8792 "parse.c"
8792 break;
8793
8794 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8795#line 2643 "parse.y"
8796 {
8797 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8798}
8799#line 8800 "parse.c"
8800 break;
8801
8802 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8803#line 2634 "parse.y"
8804 {
8805 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8806 rb_parser_printf(p, "NODE_SPECIAL");
8807 }
8808 else if (((*yyvaluep).node)) {
8809 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8810 }
8811}
8812#line 8813 "parse.c"
8813 break;
8814
8815 case YYSYMBOL_top_stmts: /* top_stmts */
8816#line 2634 "parse.y"
8817 {
8818 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8819 rb_parser_printf(p, "NODE_SPECIAL");
8820 }
8821 else if (((*yyvaluep).node)) {
8822 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8823 }
8824}
8825#line 8826 "parse.c"
8826 break;
8827
8828 case YYSYMBOL_top_stmt: /* top_stmt */
8829#line 2634 "parse.y"
8830 {
8831 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8832 rb_parser_printf(p, "NODE_SPECIAL");
8833 }
8834 else if (((*yyvaluep).node)) {
8835 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8836 }
8837}
8838#line 8839 "parse.c"
8839 break;
8840
8841 case YYSYMBOL_block_open: /* block_open */
8842#line 2634 "parse.y"
8843 {
8844 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8845 rb_parser_printf(p, "NODE_SPECIAL");
8846 }
8847 else if (((*yyvaluep).node_exits)) {
8848 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8849 }
8850}
8851#line 8852 "parse.c"
8852 break;
8853
8854 case YYSYMBOL_begin_block: /* begin_block */
8855#line 2634 "parse.y"
8856 {
8857 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8858 rb_parser_printf(p, "NODE_SPECIAL");
8859 }
8860 else if (((*yyvaluep).node)) {
8861 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8862 }
8863}
8864#line 8865 "parse.c"
8865 break;
8866
8867 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8868#line 2634 "parse.y"
8869 {
8870 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8871 rb_parser_printf(p, "NODE_SPECIAL");
8872 }
8873 else if (((*yyvaluep).node)) {
8874 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8875 }
8876}
8877#line 8878 "parse.c"
8878 break;
8879
8880 case YYSYMBOL_bodystmt: /* bodystmt */
8881#line 2634 "parse.y"
8882 {
8883 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8884 rb_parser_printf(p, "NODE_SPECIAL");
8885 }
8886 else if (((*yyvaluep).node)) {
8887 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8888 }
8889}
8890#line 8891 "parse.c"
8891 break;
8892
8893 case YYSYMBOL_stmts: /* stmts */
8894#line 2634 "parse.y"
8895 {
8896 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8897 rb_parser_printf(p, "NODE_SPECIAL");
8898 }
8899 else if (((*yyvaluep).node)) {
8900 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8901 }
8902}
8903#line 8904 "parse.c"
8904 break;
8905
8906 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8907#line 2634 "parse.y"
8908 {
8909 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8910 rb_parser_printf(p, "NODE_SPECIAL");
8911 }
8912 else if (((*yyvaluep).node)) {
8913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8914 }
8915}
8916#line 8917 "parse.c"
8917 break;
8918
8919 case YYSYMBOL_allow_exits: /* allow_exits */
8920#line 2634 "parse.y"
8921 {
8922 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8923 rb_parser_printf(p, "NODE_SPECIAL");
8924 }
8925 else if (((*yyvaluep).node_exits)) {
8926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8927 }
8928}
8929#line 8930 "parse.c"
8930 break;
8931
8932 case YYSYMBOL_stmt: /* stmt */
8933#line 2634 "parse.y"
8934 {
8935 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8936 rb_parser_printf(p, "NODE_SPECIAL");
8937 }
8938 else if (((*yyvaluep).node)) {
8939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8940 }
8941}
8942#line 8943 "parse.c"
8943 break;
8944
8945 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8946#line 2634 "parse.y"
8947 {
8948 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8949 rb_parser_printf(p, "NODE_SPECIAL");
8950 }
8951 else if (((*yyvaluep).node)) {
8952 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8953 }
8954}
8955#line 8956 "parse.c"
8956 break;
8957
8958 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8959#line 2634 "parse.y"
8960 {
8961 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8962 rb_parser_printf(p, "NODE_SPECIAL");
8963 }
8964 else if (((*yyvaluep).node)) {
8965 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8966 }
8967}
8968#line 8969 "parse.c"
8969 break;
8970
8971 case YYSYMBOL_command_asgn: /* command_asgn */
8972#line 2634 "parse.y"
8973 {
8974 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8975 rb_parser_printf(p, "NODE_SPECIAL");
8976 }
8977 else if (((*yyvaluep).node)) {
8978 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8979 }
8980}
8981#line 8982 "parse.c"
8982 break;
8983
8984 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8985#line 2634 "parse.y"
8986 {
8987 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8988 rb_parser_printf(p, "NODE_SPECIAL");
8989 }
8990 else if (((*yyvaluep).node)) {
8991 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8992 }
8993}
8994#line 8995 "parse.c"
8995 break;
8996
8997 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8998#line 2634 "parse.y"
8999 {
9000 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9001 rb_parser_printf(p, "NODE_SPECIAL");
9002 }
9003 else if (((*yyvaluep).node)) {
9004 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9005 }
9006}
9007#line 9008 "parse.c"
9008 break;
9009
9010 case YYSYMBOL_endless_command: /* endless_command */
9011#line 2634 "parse.y"
9012 {
9013 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9014 rb_parser_printf(p, "NODE_SPECIAL");
9015 }
9016 else if (((*yyvaluep).node)) {
9017 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9018 }
9019}
9020#line 9021 "parse.c"
9021 break;
9022
9023 case YYSYMBOL_command_rhs: /* command_rhs */
9024#line 2634 "parse.y"
9025 {
9026 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9027 rb_parser_printf(p, "NODE_SPECIAL");
9028 }
9029 else if (((*yyvaluep).node)) {
9030 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9031 }
9032}
9033#line 9034 "parse.c"
9034 break;
9035
9036 case YYSYMBOL_expr: /* expr */
9037#line 2634 "parse.y"
9038 {
9039 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9040 rb_parser_printf(p, "NODE_SPECIAL");
9041 }
9042 else if (((*yyvaluep).node)) {
9043 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9044 }
9045}
9046#line 9047 "parse.c"
9047 break;
9048
9049 case YYSYMBOL_def_name: /* def_name */
9050#line 2643 "parse.y"
9051 {
9052 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9053}
9054#line 9055 "parse.c"
9055 break;
9056
9057 case YYSYMBOL_defn_head: /* defn_head */
9058#line 2634 "parse.y"
9059 {
9060 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9061 rb_parser_printf(p, "NODE_SPECIAL");
9062 }
9063 else if (((*yyvaluep).node_def_temp)) {
9064 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9065 }
9066}
9067#line 9068 "parse.c"
9068 break;
9069
9070 case YYSYMBOL_defs_head: /* defs_head */
9071#line 2634 "parse.y"
9072 {
9073 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9074 rb_parser_printf(p, "NODE_SPECIAL");
9075 }
9076 else if (((*yyvaluep).node_def_temp)) {
9077 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9078 }
9079}
9080#line 9081 "parse.c"
9081 break;
9082
9083 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
9084#line 2634 "parse.y"
9085 {
9086 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9087 rb_parser_printf(p, "NODE_SPECIAL");
9088 }
9089 else if (((*yyvaluep).node)) {
9090 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9091 }
9092}
9093#line 9094 "parse.c"
9094 break;
9095
9096 case YYSYMBOL_expr_value: /* expr_value */
9097#line 2634 "parse.y"
9098 {
9099 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9100 rb_parser_printf(p, "NODE_SPECIAL");
9101 }
9102 else if (((*yyvaluep).node)) {
9103 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9104 }
9105}
9106#line 9107 "parse.c"
9107 break;
9108
9109 case YYSYMBOL_expr_value_do: /* expr_value_do */
9110#line 2634 "parse.y"
9111 {
9112 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9113 rb_parser_printf(p, "NODE_SPECIAL");
9114 }
9115 else if (((*yyvaluep).node)) {
9116 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9117 }
9118}
9119#line 9120 "parse.c"
9120 break;
9121
9122 case YYSYMBOL_command_call: /* command_call */
9123#line 2634 "parse.y"
9124 {
9125 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9126 rb_parser_printf(p, "NODE_SPECIAL");
9127 }
9128 else if (((*yyvaluep).node)) {
9129 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9130 }
9131}
9132#line 9133 "parse.c"
9133 break;
9134
9135 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
9136#line 2634 "parse.y"
9137 {
9138 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9139 rb_parser_printf(p, "NODE_SPECIAL");
9140 }
9141 else if (((*yyvaluep).node)) {
9142 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9143 }
9144}
9145#line 9146 "parse.c"
9146 break;
9147
9148 case YYSYMBOL_command_call_value: /* command_call_value */
9149#line 2634 "parse.y"
9150 {
9151 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9152 rb_parser_printf(p, "NODE_SPECIAL");
9153 }
9154 else if (((*yyvaluep).node)) {
9155 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9156 }
9157}
9158#line 9159 "parse.c"
9159 break;
9160
9161 case YYSYMBOL_block_command: /* block_command */
9162#line 2634 "parse.y"
9163 {
9164 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9165 rb_parser_printf(p, "NODE_SPECIAL");
9166 }
9167 else if (((*yyvaluep).node)) {
9168 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9169 }
9170}
9171#line 9172 "parse.c"
9172 break;
9173
9174 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9175#line 2634 "parse.y"
9176 {
9177 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9178 rb_parser_printf(p, "NODE_SPECIAL");
9179 }
9180 else if (((*yyvaluep).node)) {
9181 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9182 }
9183}
9184#line 9185 "parse.c"
9185 break;
9186
9187 case YYSYMBOL_fcall: /* fcall */
9188#line 2634 "parse.y"
9189 {
9190 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9191 rb_parser_printf(p, "NODE_SPECIAL");
9192 }
9193 else if (((*yyvaluep).node_fcall)) {
9194 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9195 }
9196}
9197#line 9198 "parse.c"
9198 break;
9199
9200 case YYSYMBOL_command: /* command */
9201#line 2634 "parse.y"
9202 {
9203 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9204 rb_parser_printf(p, "NODE_SPECIAL");
9205 }
9206 else if (((*yyvaluep).node)) {
9207 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9208 }
9209}
9210#line 9211 "parse.c"
9211 break;
9212
9213 case YYSYMBOL_mlhs: /* mlhs */
9214#line 2634 "parse.y"
9215 {
9216 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9217 rb_parser_printf(p, "NODE_SPECIAL");
9218 }
9219 else if (((*yyvaluep).node_masgn)) {
9220 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9221 }
9222}
9223#line 9224 "parse.c"
9224 break;
9225
9226 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9227#line 2634 "parse.y"
9228 {
9229 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9230 rb_parser_printf(p, "NODE_SPECIAL");
9231 }
9232 else if (((*yyvaluep).node_masgn)) {
9233 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9234 }
9235}
9236#line 9237 "parse.c"
9237 break;
9238
9239 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9240#line 2634 "parse.y"
9241 {
9242 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9243 rb_parser_printf(p, "NODE_SPECIAL");
9244 }
9245 else if (((*yyvaluep).node_masgn)) {
9246 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9247 }
9248}
9249#line 9250 "parse.c"
9250 break;
9251
9252 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9253#line 2634 "parse.y"
9254 {
9255 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9256 rb_parser_printf(p, "NODE_SPECIAL");
9257 }
9258 else if (((*yyvaluep).node)) {
9259 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9260 }
9261}
9262#line 9263 "parse.c"
9263 break;
9264
9265 case YYSYMBOL_mlhs_item: /* mlhs_item */
9266#line 2634 "parse.y"
9267 {
9268 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9269 rb_parser_printf(p, "NODE_SPECIAL");
9270 }
9271 else if (((*yyvaluep).node)) {
9272 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9273 }
9274}
9275#line 9276 "parse.c"
9276 break;
9277
9278 case YYSYMBOL_mlhs_head: /* mlhs_head */
9279#line 2634 "parse.y"
9280 {
9281 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9282 rb_parser_printf(p, "NODE_SPECIAL");
9283 }
9284 else if (((*yyvaluep).node)) {
9285 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9286 }
9287}
9288#line 9289 "parse.c"
9289 break;
9290
9291 case YYSYMBOL_mlhs_node: /* mlhs_node */
9292#line 2634 "parse.y"
9293 {
9294 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9295 rb_parser_printf(p, "NODE_SPECIAL");
9296 }
9297 else if (((*yyvaluep).node)) {
9298 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9299 }
9300}
9301#line 9302 "parse.c"
9302 break;
9303
9304 case YYSYMBOL_lhs: /* lhs */
9305#line 2634 "parse.y"
9306 {
9307 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9308 rb_parser_printf(p, "NODE_SPECIAL");
9309 }
9310 else if (((*yyvaluep).node)) {
9311 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9312 }
9313}
9314#line 9315 "parse.c"
9315 break;
9316
9317 case YYSYMBOL_cname: /* cname */
9318#line 2643 "parse.y"
9319 {
9320 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9321}
9322#line 9323 "parse.c"
9323 break;
9324
9325 case YYSYMBOL_cpath: /* cpath */
9326#line 2634 "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_fname: /* fname */
9339#line 2643 "parse.y"
9340 {
9341 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9342}
9343#line 9344 "parse.c"
9344 break;
9345
9346 case YYSYMBOL_fitem: /* fitem */
9347#line 2634 "parse.y"
9348 {
9349 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9350 rb_parser_printf(p, "NODE_SPECIAL");
9351 }
9352 else if (((*yyvaluep).node)) {
9353 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9354 }
9355}
9356#line 9357 "parse.c"
9357 break;
9358
9359 case YYSYMBOL_undef_list: /* undef_list */
9360#line 2634 "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_op: /* op */
9373#line 2643 "parse.y"
9374 {
9375 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9376}
9377#line 9378 "parse.c"
9378 break;
9379
9380 case YYSYMBOL_reswords: /* reswords */
9381#line 2643 "parse.y"
9382 {
9383 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9384}
9385#line 9386 "parse.c"
9386 break;
9387
9388 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9389#line 2634 "parse.y"
9390 {
9391 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9392 rb_parser_printf(p, "NODE_SPECIAL");
9393 }
9394 else if (((*yyvaluep).node)) {
9395 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9396 }
9397}
9398#line 9399 "parse.c"
9399 break;
9400
9401 case YYSYMBOL_arg: /* arg */
9402#line 2634 "parse.y"
9403 {
9404 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9405 rb_parser_printf(p, "NODE_SPECIAL");
9406 }
9407 else if (((*yyvaluep).node)) {
9408 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9409 }
9410}
9411#line 9412 "parse.c"
9412 break;
9413
9414 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9415#line 2634 "parse.y"
9416 {
9417 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9418 rb_parser_printf(p, "NODE_SPECIAL");
9419 }
9420 else if (((*yyvaluep).node)) {
9421 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9422 }
9423}
9424#line 9425 "parse.c"
9425 break;
9426
9427 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9428#line 2634 "parse.y"
9429 {
9430 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9431 rb_parser_printf(p, "NODE_SPECIAL");
9432 }
9433 else if (((*yyvaluep).node)) {
9434 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9435 }
9436}
9437#line 9438 "parse.c"
9438 break;
9439
9440 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9441#line 2634 "parse.y"
9442 {
9443 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9444 rb_parser_printf(p, "NODE_SPECIAL");
9445 }
9446 else if (((*yyvaluep).node)) {
9447 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9448 }
9449}
9450#line 9451 "parse.c"
9451 break;
9452
9453 case YYSYMBOL_ternary: /* ternary */
9454#line 2634 "parse.y"
9455 {
9456 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9457 rb_parser_printf(p, "NODE_SPECIAL");
9458 }
9459 else if (((*yyvaluep).node)) {
9460 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9461 }
9462}
9463#line 9464 "parse.c"
9464 break;
9465
9466 case YYSYMBOL_endless_arg: /* endless_arg */
9467#line 2634 "parse.y"
9468 {
9469 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9470 rb_parser_printf(p, "NODE_SPECIAL");
9471 }
9472 else if (((*yyvaluep).node)) {
9473 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9474 }
9475}
9476#line 9477 "parse.c"
9477 break;
9478
9479 case YYSYMBOL_relop: /* relop */
9480#line 2643 "parse.y"
9481 {
9482 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9483}
9484#line 9485 "parse.c"
9485 break;
9486
9487 case YYSYMBOL_rel_expr: /* rel_expr */
9488#line 2634 "parse.y"
9489 {
9490 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9491 rb_parser_printf(p, "NODE_SPECIAL");
9492 }
9493 else if (((*yyvaluep).node)) {
9494 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9495 }
9496}
9497#line 9498 "parse.c"
9498 break;
9499
9500 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9501#line 2634 "parse.y"
9502 {
9503 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9504 rb_parser_printf(p, "NODE_SPECIAL");
9505 }
9506 else if (((*yyvaluep).node)) {
9507 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9508 }
9509}
9510#line 9511 "parse.c"
9511 break;
9512
9513 case YYSYMBOL_arg_value: /* arg_value */
9514#line 2634 "parse.y"
9515 {
9516 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9517 rb_parser_printf(p, "NODE_SPECIAL");
9518 }
9519 else if (((*yyvaluep).node)) {
9520 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9521 }
9522}
9523#line 9524 "parse.c"
9524 break;
9525
9526 case YYSYMBOL_aref_args: /* aref_args */
9527#line 2634 "parse.y"
9528 {
9529 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9530 rb_parser_printf(p, "NODE_SPECIAL");
9531 }
9532 else if (((*yyvaluep).node)) {
9533 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9534 }
9535}
9536#line 9537 "parse.c"
9537 break;
9538
9539 case YYSYMBOL_arg_rhs: /* arg_rhs */
9540#line 2634 "parse.y"
9541 {
9542 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9543 rb_parser_printf(p, "NODE_SPECIAL");
9544 }
9545 else if (((*yyvaluep).node)) {
9546 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9547 }
9548}
9549#line 9550 "parse.c"
9550 break;
9551
9552 case YYSYMBOL_paren_args: /* paren_args */
9553#line 2634 "parse.y"
9554 {
9555 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9556 rb_parser_printf(p, "NODE_SPECIAL");
9557 }
9558 else if (((*yyvaluep).node)) {
9559 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9560 }
9561}
9562#line 9563 "parse.c"
9563 break;
9564
9565 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9566#line 2634 "parse.y"
9567 {
9568 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9569 rb_parser_printf(p, "NODE_SPECIAL");
9570 }
9571 else if (((*yyvaluep).node)) {
9572 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9573 }
9574}
9575#line 9576 "parse.c"
9576 break;
9577
9578 case YYSYMBOL_opt_call_args: /* opt_call_args */
9579#line 2634 "parse.y"
9580 {
9581 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9582 rb_parser_printf(p, "NODE_SPECIAL");
9583 }
9584 else if (((*yyvaluep).node)) {
9585 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9586 }
9587}
9588#line 9589 "parse.c"
9589 break;
9590
9591 case YYSYMBOL_value_expr_command: /* value_expr_command */
9592#line 2634 "parse.y"
9593 {
9594 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9595 rb_parser_printf(p, "NODE_SPECIAL");
9596 }
9597 else if (((*yyvaluep).node)) {
9598 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9599 }
9600}
9601#line 9602 "parse.c"
9602 break;
9603
9604 case YYSYMBOL_call_args: /* call_args */
9605#line 2634 "parse.y"
9606 {
9607 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9608 rb_parser_printf(p, "NODE_SPECIAL");
9609 }
9610 else if (((*yyvaluep).node)) {
9611 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9612 }
9613}
9614#line 9615 "parse.c"
9615 break;
9616
9617 case YYSYMBOL_command_args: /* command_args */
9618#line 2634 "parse.y"
9619 {
9620 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9621 rb_parser_printf(p, "NODE_SPECIAL");
9622 }
9623 else if (((*yyvaluep).node)) {
9624 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9625 }
9626}
9627#line 9628 "parse.c"
9628 break;
9629
9630 case YYSYMBOL_block_arg: /* block_arg */
9631#line 2634 "parse.y"
9632 {
9633 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9634 rb_parser_printf(p, "NODE_SPECIAL");
9635 }
9636 else if (((*yyvaluep).node_block_pass)) {
9637 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9638 }
9639}
9640#line 9641 "parse.c"
9641 break;
9642
9643 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9644#line 2634 "parse.y"
9645 {
9646 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9647 rb_parser_printf(p, "NODE_SPECIAL");
9648 }
9649 else if (((*yyvaluep).node_block_pass)) {
9650 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9651 }
9652}
9653#line 9654 "parse.c"
9654 break;
9655
9656 case YYSYMBOL_args: /* args */
9657#line 2634 "parse.y"
9658 {
9659 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9660 rb_parser_printf(p, "NODE_SPECIAL");
9661 }
9662 else if (((*yyvaluep).node)) {
9663 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9664 }
9665}
9666#line 9667 "parse.c"
9667 break;
9668
9669 case YYSYMBOL_arg_splat: /* arg_splat */
9670#line 2634 "parse.y"
9671 {
9672 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9673 rb_parser_printf(p, "NODE_SPECIAL");
9674 }
9675 else if (((*yyvaluep).node)) {
9676 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9677 }
9678}
9679#line 9680 "parse.c"
9680 break;
9681
9682 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9683#line 2634 "parse.y"
9684 {
9685 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9686 rb_parser_printf(p, "NODE_SPECIAL");
9687 }
9688 else if (((*yyvaluep).node)) {
9689 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9690 }
9691}
9692#line 9693 "parse.c"
9693 break;
9694
9695 case YYSYMBOL_mrhs: /* mrhs */
9696#line 2634 "parse.y"
9697 {
9698 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9699 rb_parser_printf(p, "NODE_SPECIAL");
9700 }
9701 else if (((*yyvaluep).node)) {
9702 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9703 }
9704}
9705#line 9706 "parse.c"
9706 break;
9707
9708 case YYSYMBOL_primary: /* primary */
9709#line 2634 "parse.y"
9710 {
9711 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9712 rb_parser_printf(p, "NODE_SPECIAL");
9713 }
9714 else if (((*yyvaluep).node)) {
9715 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9716 }
9717}
9718#line 9719 "parse.c"
9719 break;
9720
9721 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9722#line 2634 "parse.y"
9723 {
9724 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9725 rb_parser_printf(p, "NODE_SPECIAL");
9726 }
9727 else if (((*yyvaluep).node)) {
9728 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9729 }
9730}
9731#line 9732 "parse.c"
9732 break;
9733
9734 case YYSYMBOL_primary_value: /* primary_value */
9735#line 2634 "parse.y"
9736 {
9737 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9738 rb_parser_printf(p, "NODE_SPECIAL");
9739 }
9740 else if (((*yyvaluep).node)) {
9741 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9742 }
9743}
9744#line 9745 "parse.c"
9745 break;
9746
9747 case YYSYMBOL_k_while: /* k_while */
9748#line 2634 "parse.y"
9749 {
9750 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9751 rb_parser_printf(p, "NODE_SPECIAL");
9752 }
9753 else if (((*yyvaluep).node_exits)) {
9754 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9755 }
9756}
9757#line 9758 "parse.c"
9758 break;
9759
9760 case YYSYMBOL_k_until: /* k_until */
9761#line 2634 "parse.y"
9762 {
9763 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9764 rb_parser_printf(p, "NODE_SPECIAL");
9765 }
9766 else if (((*yyvaluep).node_exits)) {
9767 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9768 }
9769}
9770#line 9771 "parse.c"
9771 break;
9772
9773 case YYSYMBOL_k_for: /* k_for */
9774#line 2634 "parse.y"
9775 {
9776 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9777 rb_parser_printf(p, "NODE_SPECIAL");
9778 }
9779 else if (((*yyvaluep).node_exits)) {
9780 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9781 }
9782}
9783#line 9784 "parse.c"
9784 break;
9785
9786 case YYSYMBOL_k_def: /* k_def */
9787#line 2634 "parse.y"
9788 {
9789 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9790 rb_parser_printf(p, "NODE_SPECIAL");
9791 }
9792 else if (((*yyvaluep).node_def_temp)) {
9793 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9794 }
9795}
9796#line 9797 "parse.c"
9797 break;
9798
9799 case YYSYMBOL_do: /* do */
9800#line 2643 "parse.y"
9801 {
9802 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9803}
9804#line 9805 "parse.c"
9805 break;
9806
9807 case YYSYMBOL_if_tail: /* if_tail */
9808#line 2634 "parse.y"
9809 {
9810 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9811 rb_parser_printf(p, "NODE_SPECIAL");
9812 }
9813 else if (((*yyvaluep).node)) {
9814 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9815 }
9816}
9817#line 9818 "parse.c"
9818 break;
9819
9820 case YYSYMBOL_opt_else: /* opt_else */
9821#line 2634 "parse.y"
9822 {
9823 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9824 rb_parser_printf(p, "NODE_SPECIAL");
9825 }
9826 else if (((*yyvaluep).node)) {
9827 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9828 }
9829}
9830#line 9831 "parse.c"
9831 break;
9832
9833 case YYSYMBOL_for_var: /* for_var */
9834#line 2634 "parse.y"
9835 {
9836 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9837 rb_parser_printf(p, "NODE_SPECIAL");
9838 }
9839 else if (((*yyvaluep).node)) {
9840 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9841 }
9842}
9843#line 9844 "parse.c"
9844 break;
9845
9846 case YYSYMBOL_f_marg: /* f_marg */
9847#line 2634 "parse.y"
9848 {
9849 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9850 rb_parser_printf(p, "NODE_SPECIAL");
9851 }
9852 else if (((*yyvaluep).node)) {
9853 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9854 }
9855}
9856#line 9857 "parse.c"
9857 break;
9858
9859 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9860#line 2634 "parse.y"
9861 {
9862 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9863 rb_parser_printf(p, "NODE_SPECIAL");
9864 }
9865 else if (((*yyvaluep).node)) {
9866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9867 }
9868}
9869#line 9870 "parse.c"
9870 break;
9871
9872 case YYSYMBOL_f_margs: /* f_margs */
9873#line 2634 "parse.y"
9874 {
9875 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9876 rb_parser_printf(p, "NODE_SPECIAL");
9877 }
9878 else if (((*yyvaluep).node_masgn)) {
9879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9880 }
9881}
9882#line 9883 "parse.c"
9883 break;
9884
9885 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9886#line 2634 "parse.y"
9887 {
9888 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9889 rb_parser_printf(p, "NODE_SPECIAL");
9890 }
9891 else if (((*yyvaluep).node)) {
9892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9893 }
9894}
9895#line 9896 "parse.c"
9896 break;
9897
9898 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9899#line 2643 "parse.y"
9900 {
9901 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9902}
9903#line 9904 "parse.c"
9904 break;
9905
9906 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9907#line 2634 "parse.y"
9908 {
9909 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9910 rb_parser_printf(p, "NODE_SPECIAL");
9911 }
9912 else if (((*yyvaluep).node_kw_arg)) {
9913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9914 }
9915}
9916#line 9917 "parse.c"
9917 break;
9918
9919 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9920#line 2634 "parse.y"
9921 {
9922 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9923 rb_parser_printf(p, "NODE_SPECIAL");
9924 }
9925 else if (((*yyvaluep).node_kw_arg)) {
9926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9927 }
9928}
9929#line 9930 "parse.c"
9930 break;
9931
9932 case YYSYMBOL_opt_f_block_arg_none: /* opt_f_block_arg_none */
9933#line 2643 "parse.y"
9934 {
9935 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9936}
9937#line 9938 "parse.c"
9938 break;
9939
9940 case YYSYMBOL_args_tail_basic_primary_value_none: /* args_tail_basic_primary_value_none */
9941#line 2634 "parse.y"
9942 {
9943 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9944 rb_parser_printf(p, "NODE_SPECIAL");
9945 }
9946 else if (((*yyvaluep).node_args)) {
9947 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9948 }
9949}
9950#line 9951 "parse.c"
9951 break;
9952
9953 case YYSYMBOL_block_args_tail: /* block_args_tail */
9954#line 2634 "parse.y"
9955 {
9956 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9957 rb_parser_printf(p, "NODE_SPECIAL");
9958 }
9959 else if (((*yyvaluep).node_args)) {
9960 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9961 }
9962}
9963#line 9964 "parse.c"
9964 break;
9965
9966 case YYSYMBOL_excessed_comma: /* excessed_comma */
9967#line 2643 "parse.y"
9968 {
9969 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9970}
9971#line 9972 "parse.c"
9972 break;
9973
9974 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9975#line 2634 "parse.y"
9976 {
9977 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9978 rb_parser_printf(p, "NODE_SPECIAL");
9979 }
9980 else if (((*yyvaluep).node_opt_arg)) {
9981 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9982 }
9983}
9984#line 9985 "parse.c"
9985 break;
9986
9987 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9988#line 2634 "parse.y"
9989 {
9990 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9991 rb_parser_printf(p, "NODE_SPECIAL");
9992 }
9993 else if (((*yyvaluep).node_opt_arg)) {
9994 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9995 }
9996}
9997#line 9998 "parse.c"
9998 break;
9999
10000 case YYSYMBOL_opt_args_tail_block_args_tail_none: /* opt_args_tail_block_args_tail_none */
10001#line 2634 "parse.y"
10002 {
10003 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10004 rb_parser_printf(p, "NODE_SPECIAL");
10005 }
10006 else if (((*yyvaluep).node_args)) {
10007 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10008 }
10009}
10010#line 10011 "parse.c"
10011 break;
10012
10013 case YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none: /* args-list_primary_value_opt_args_tail_block_args_tail_none */
10014#line 2634 "parse.y"
10015 {
10016 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10017 rb_parser_printf(p, "NODE_SPECIAL");
10018 }
10019 else if (((*yyvaluep).node_args)) {
10020 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10021 }
10022}
10023#line 10024 "parse.c"
10024 break;
10025
10026 case YYSYMBOL_block_param: /* block_param */
10027#line 2634 "parse.y"
10028 {
10029 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10030 rb_parser_printf(p, "NODE_SPECIAL");
10031 }
10032 else if (((*yyvaluep).node_args)) {
10033 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10034 }
10035}
10036#line 10037 "parse.c"
10037 break;
10038
10039 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
10040#line 2634 "parse.y"
10041 {
10042 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10043 rb_parser_printf(p, "NODE_SPECIAL");
10044 }
10045 else if (((*yyvaluep).node_args)) {
10046 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10047 }
10048}
10049#line 10050 "parse.c"
10050 break;
10051
10052 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
10053#line 2634 "parse.y"
10054 {
10055 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10056 rb_parser_printf(p, "NODE_SPECIAL");
10057 }
10058 else if (((*yyvaluep).node_args)) {
10059 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10060 }
10061}
10062#line 10063 "parse.c"
10063 break;
10064
10065 case YYSYMBOL_block_param_def: /* block_param_def */
10066#line 2634 "parse.y"
10067 {
10068 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10069 rb_parser_printf(p, "NODE_SPECIAL");
10070 }
10071 else if (((*yyvaluep).node_args)) {
10072 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10073 }
10074}
10075#line 10076 "parse.c"
10076 break;
10077
10078 case YYSYMBOL_opt_block_param: /* opt_block_param */
10079#line 2634 "parse.y"
10080 {
10081 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10082 rb_parser_printf(p, "NODE_SPECIAL");
10083 }
10084 else if (((*yyvaluep).node_args)) {
10085 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10086 }
10087}
10088#line 10089 "parse.c"
10089 break;
10090
10091 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
10092#line 2643 "parse.y"
10093 {
10094 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10095}
10096#line 10097 "parse.c"
10097 break;
10098
10099 case YYSYMBOL_bv_decls: /* bv_decls */
10100#line 2643 "parse.y"
10101 {
10102 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10103}
10104#line 10105 "parse.c"
10105 break;
10106
10107 case YYSYMBOL_bvar: /* bvar */
10108#line 2643 "parse.y"
10109 {
10110 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10111}
10112#line 10113 "parse.c"
10113 break;
10114
10115 case YYSYMBOL_numparam: /* numparam */
10116#line 2634 "parse.y"
10117 {
10118 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10119 rb_parser_printf(p, "NODE_SPECIAL");
10120 }
10121 else if (((*yyvaluep).node)) {
10122 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10123 }
10124}
10125#line 10126 "parse.c"
10126 break;
10127
10128 case YYSYMBOL_it_id: /* it_id */
10129#line 2643 "parse.y"
10130 {
10131 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10132}
10133#line 10134 "parse.c"
10134 break;
10135
10136 case YYSYMBOL_lambda: /* lambda */
10137#line 2634 "parse.y"
10138 {
10139 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10140 rb_parser_printf(p, "NODE_SPECIAL");
10141 }
10142 else if (((*yyvaluep).node)) {
10143 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10144 }
10145}
10146#line 10147 "parse.c"
10147 break;
10148
10149 case YYSYMBOL_f_larglist: /* f_larglist */
10150#line 2634 "parse.y"
10151 {
10152 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10153 rb_parser_printf(p, "NODE_SPECIAL");
10154 }
10155 else if (((*yyvaluep).node_args)) {
10156 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10157 }
10158}
10159#line 10160 "parse.c"
10160 break;
10161
10162 case YYSYMBOL_do_block: /* do_block */
10163#line 2634 "parse.y"
10164 {
10165 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10166 rb_parser_printf(p, "NODE_SPECIAL");
10167 }
10168 else if (((*yyvaluep).node)) {
10169 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10170 }
10171}
10172#line 10173 "parse.c"
10173 break;
10174
10175 case YYSYMBOL_block_call: /* block_call */
10176#line 2634 "parse.y"
10177 {
10178 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10179 rb_parser_printf(p, "NODE_SPECIAL");
10180 }
10181 else if (((*yyvaluep).node)) {
10182 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10183 }
10184}
10185#line 10186 "parse.c"
10186 break;
10187
10188 case YYSYMBOL_method_call: /* method_call */
10189#line 2634 "parse.y"
10190 {
10191 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10192 rb_parser_printf(p, "NODE_SPECIAL");
10193 }
10194 else if (((*yyvaluep).node)) {
10195 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10196 }
10197}
10198#line 10199 "parse.c"
10199 break;
10200
10201 case YYSYMBOL_brace_block: /* brace_block */
10202#line 2634 "parse.y"
10203 {
10204 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10205 rb_parser_printf(p, "NODE_SPECIAL");
10206 }
10207 else if (((*yyvaluep).node)) {
10208 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10209 }
10210}
10211#line 10212 "parse.c"
10212 break;
10213
10214 case YYSYMBOL_brace_body: /* brace_body */
10215#line 2634 "parse.y"
10216 {
10217 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10218 rb_parser_printf(p, "NODE_SPECIAL");
10219 }
10220 else if (((*yyvaluep).node)) {
10221 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10222 }
10223}
10224#line 10225 "parse.c"
10225 break;
10226
10227 case YYSYMBOL_do_body: /* do_body */
10228#line 2634 "parse.y"
10229 {
10230 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10231 rb_parser_printf(p, "NODE_SPECIAL");
10232 }
10233 else if (((*yyvaluep).node)) {
10234 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10235 }
10236}
10237#line 10238 "parse.c"
10238 break;
10239
10240 case YYSYMBOL_case_args: /* case_args */
10241#line 2634 "parse.y"
10242 {
10243 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10244 rb_parser_printf(p, "NODE_SPECIAL");
10245 }
10246 else if (((*yyvaluep).node)) {
10247 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10248 }
10249}
10250#line 10251 "parse.c"
10251 break;
10252
10253 case YYSYMBOL_case_body: /* case_body */
10254#line 2634 "parse.y"
10255 {
10256 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10257 rb_parser_printf(p, "NODE_SPECIAL");
10258 }
10259 else if (((*yyvaluep).node)) {
10260 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10261 }
10262}
10263#line 10264 "parse.c"
10264 break;
10265
10266 case YYSYMBOL_cases: /* cases */
10267#line 2634 "parse.y"
10268 {
10269 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10270 rb_parser_printf(p, "NODE_SPECIAL");
10271 }
10272 else if (((*yyvaluep).node)) {
10273 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10274 }
10275}
10276#line 10277 "parse.c"
10277 break;
10278
10279 case YYSYMBOL_p_case_body: /* p_case_body */
10280#line 2634 "parse.y"
10281 {
10282 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10283 rb_parser_printf(p, "NODE_SPECIAL");
10284 }
10285 else if (((*yyvaluep).node)) {
10286 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10287 }
10288}
10289#line 10290 "parse.c"
10290 break;
10291
10292 case YYSYMBOL_p_cases: /* p_cases */
10293#line 2634 "parse.y"
10294 {
10295 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10296 rb_parser_printf(p, "NODE_SPECIAL");
10297 }
10298 else if (((*yyvaluep).node)) {
10299 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10300 }
10301}
10302#line 10303 "parse.c"
10303 break;
10304
10305 case YYSYMBOL_p_top_expr: /* p_top_expr */
10306#line 2634 "parse.y"
10307 {
10308 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10309 rb_parser_printf(p, "NODE_SPECIAL");
10310 }
10311 else if (((*yyvaluep).node)) {
10312 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10313 }
10314}
10315#line 10316 "parse.c"
10316 break;
10317
10318 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10319#line 2634 "parse.y"
10320 {
10321 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10322 rb_parser_printf(p, "NODE_SPECIAL");
10323 }
10324 else if (((*yyvaluep).node)) {
10325 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10326 }
10327}
10328#line 10329 "parse.c"
10329 break;
10330
10331 case YYSYMBOL_p_expr: /* p_expr */
10332#line 2634 "parse.y"
10333 {
10334 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10335 rb_parser_printf(p, "NODE_SPECIAL");
10336 }
10337 else if (((*yyvaluep).node)) {
10338 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10339 }
10340}
10341#line 10342 "parse.c"
10342 break;
10343
10344 case YYSYMBOL_p_as: /* p_as */
10345#line 2634 "parse.y"
10346 {
10347 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10348 rb_parser_printf(p, "NODE_SPECIAL");
10349 }
10350 else if (((*yyvaluep).node)) {
10351 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10352 }
10353}
10354#line 10355 "parse.c"
10355 break;
10356
10357 case YYSYMBOL_p_alt: /* p_alt */
10358#line 2634 "parse.y"
10359 {
10360 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10361 rb_parser_printf(p, "NODE_SPECIAL");
10362 }
10363 else if (((*yyvaluep).node)) {
10364 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10365 }
10366}
10367#line 10368 "parse.c"
10368 break;
10369
10370 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10371#line 2634 "parse.y"
10372 {
10373 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10374 rb_parser_printf(p, "NODE_SPECIAL");
10375 }
10376 else if (((*yyvaluep).node)) {
10377 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10378 }
10379}
10380#line 10381 "parse.c"
10381 break;
10382
10383 case YYSYMBOL_p_args: /* p_args */
10384#line 2634 "parse.y"
10385 {
10386 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10387 rb_parser_printf(p, "NODE_SPECIAL");
10388 }
10389 else if (((*yyvaluep).node)) {
10390 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10391 }
10392}
10393#line 10394 "parse.c"
10394 break;
10395
10396 case YYSYMBOL_p_args_head: /* p_args_head */
10397#line 2634 "parse.y"
10398 {
10399 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10400 rb_parser_printf(p, "NODE_SPECIAL");
10401 }
10402 else if (((*yyvaluep).node)) {
10403 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10404 }
10405}
10406#line 10407 "parse.c"
10407 break;
10408
10409 case YYSYMBOL_p_args_tail: /* p_args_tail */
10410#line 2634 "parse.y"
10411 {
10412 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10413 rb_parser_printf(p, "NODE_SPECIAL");
10414 }
10415 else if (((*yyvaluep).node)) {
10416 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10417 }
10418}
10419#line 10420 "parse.c"
10420 break;
10421
10422 case YYSYMBOL_p_find: /* p_find */
10423#line 2634 "parse.y"
10424 {
10425 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10426 rb_parser_printf(p, "NODE_SPECIAL");
10427 }
10428 else if (((*yyvaluep).node)) {
10429 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10430 }
10431}
10432#line 10433 "parse.c"
10433 break;
10434
10435 case YYSYMBOL_p_rest: /* p_rest */
10436#line 2634 "parse.y"
10437 {
10438 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10439 rb_parser_printf(p, "NODE_SPECIAL");
10440 }
10441 else if (((*yyvaluep).node)) {
10442 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10443 }
10444}
10445#line 10446 "parse.c"
10446 break;
10447
10448 case YYSYMBOL_p_args_post: /* p_args_post */
10449#line 2634 "parse.y"
10450 {
10451 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10452 rb_parser_printf(p, "NODE_SPECIAL");
10453 }
10454 else if (((*yyvaluep).node)) {
10455 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10456 }
10457}
10458#line 10459 "parse.c"
10459 break;
10460
10461 case YYSYMBOL_p_arg: /* p_arg */
10462#line 2634 "parse.y"
10463 {
10464 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10465 rb_parser_printf(p, "NODE_SPECIAL");
10466 }
10467 else if (((*yyvaluep).node)) {
10468 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10469 }
10470}
10471#line 10472 "parse.c"
10472 break;
10473
10474 case YYSYMBOL_p_kwargs: /* p_kwargs */
10475#line 2634 "parse.y"
10476 {
10477 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10478 rb_parser_printf(p, "NODE_SPECIAL");
10479 }
10480 else if (((*yyvaluep).node)) {
10481 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10482 }
10483}
10484#line 10485 "parse.c"
10485 break;
10486
10487 case YYSYMBOL_p_kwarg: /* p_kwarg */
10488#line 2634 "parse.y"
10489 {
10490 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10491 rb_parser_printf(p, "NODE_SPECIAL");
10492 }
10493 else if (((*yyvaluep).node)) {
10494 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10495 }
10496}
10497#line 10498 "parse.c"
10498 break;
10499
10500 case YYSYMBOL_p_kw: /* p_kw */
10501#line 2634 "parse.y"
10502 {
10503 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10504 rb_parser_printf(p, "NODE_SPECIAL");
10505 }
10506 else if (((*yyvaluep).node)) {
10507 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10508 }
10509}
10510#line 10511 "parse.c"
10511 break;
10512
10513 case YYSYMBOL_p_kw_label: /* p_kw_label */
10514#line 2643 "parse.y"
10515 {
10516 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10517}
10518#line 10519 "parse.c"
10519 break;
10520
10521 case YYSYMBOL_p_kwrest: /* p_kwrest */
10522#line 2643 "parse.y"
10523 {
10524 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10525}
10526#line 10527 "parse.c"
10527 break;
10528
10529 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10530#line 2643 "parse.y"
10531 {
10532 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10533}
10534#line 10535 "parse.c"
10535 break;
10536
10537 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10538#line 2643 "parse.y"
10539 {
10540 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10541}
10542#line 10543 "parse.c"
10543 break;
10544
10545 case YYSYMBOL_p_value: /* p_value */
10546#line 2634 "parse.y"
10547 {
10548 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10549 rb_parser_printf(p, "NODE_SPECIAL");
10550 }
10551 else if (((*yyvaluep).node)) {
10552 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10553 }
10554}
10555#line 10556 "parse.c"
10556 break;
10557
10558 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10559#line 2634 "parse.y"
10560 {
10561 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10562 rb_parser_printf(p, "NODE_SPECIAL");
10563 }
10564 else if (((*yyvaluep).node)) {
10565 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10566 }
10567}
10568#line 10569 "parse.c"
10569 break;
10570
10571 case YYSYMBOL_p_primitive: /* p_primitive */
10572#line 2634 "parse.y"
10573 {
10574 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10575 rb_parser_printf(p, "NODE_SPECIAL");
10576 }
10577 else if (((*yyvaluep).node)) {
10578 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10579 }
10580}
10581#line 10582 "parse.c"
10582 break;
10583
10584 case YYSYMBOL_p_variable: /* p_variable */
10585#line 2634 "parse.y"
10586 {
10587 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10588 rb_parser_printf(p, "NODE_SPECIAL");
10589 }
10590 else if (((*yyvaluep).node)) {
10591 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10592 }
10593}
10594#line 10595 "parse.c"
10595 break;
10596
10597 case YYSYMBOL_p_var_ref: /* p_var_ref */
10598#line 2634 "parse.y"
10599 {
10600 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10601 rb_parser_printf(p, "NODE_SPECIAL");
10602 }
10603 else if (((*yyvaluep).node)) {
10604 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10605 }
10606}
10607#line 10608 "parse.c"
10608 break;
10609
10610 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10611#line 2634 "parse.y"
10612 {
10613 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10614 rb_parser_printf(p, "NODE_SPECIAL");
10615 }
10616 else if (((*yyvaluep).node)) {
10617 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10618 }
10619}
10620#line 10621 "parse.c"
10621 break;
10622
10623 case YYSYMBOL_p_const: /* p_const */
10624#line 2634 "parse.y"
10625 {
10626 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10627 rb_parser_printf(p, "NODE_SPECIAL");
10628 }
10629 else if (((*yyvaluep).node)) {
10630 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10631 }
10632}
10633#line 10634 "parse.c"
10634 break;
10635
10636 case YYSYMBOL_opt_rescue: /* opt_rescue */
10637#line 2634 "parse.y"
10638 {
10639 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10640 rb_parser_printf(p, "NODE_SPECIAL");
10641 }
10642 else if (((*yyvaluep).node)) {
10643 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10644 }
10645}
10646#line 10647 "parse.c"
10647 break;
10648
10649 case YYSYMBOL_exc_list: /* exc_list */
10650#line 2634 "parse.y"
10651 {
10652 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10653 rb_parser_printf(p, "NODE_SPECIAL");
10654 }
10655 else if (((*yyvaluep).node)) {
10656 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10657 }
10658}
10659#line 10660 "parse.c"
10660 break;
10661
10662 case YYSYMBOL_exc_var: /* exc_var */
10663#line 2634 "parse.y"
10664 {
10665 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10666 rb_parser_printf(p, "NODE_SPECIAL");
10667 }
10668 else if (((*yyvaluep).node)) {
10669 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10670 }
10671}
10672#line 10673 "parse.c"
10673 break;
10674
10675 case YYSYMBOL_opt_ensure: /* opt_ensure */
10676#line 2634 "parse.y"
10677 {
10678 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10679 rb_parser_printf(p, "NODE_SPECIAL");
10680 }
10681 else if (((*yyvaluep).node)) {
10682 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10683 }
10684}
10685#line 10686 "parse.c"
10686 break;
10687
10688 case YYSYMBOL_literal: /* literal */
10689#line 2634 "parse.y"
10690 {
10691 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10692 rb_parser_printf(p, "NODE_SPECIAL");
10693 }
10694 else if (((*yyvaluep).node)) {
10695 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10696 }
10697}
10698#line 10699 "parse.c"
10699 break;
10700
10701 case YYSYMBOL_strings: /* strings */
10702#line 2634 "parse.y"
10703 {
10704 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10705 rb_parser_printf(p, "NODE_SPECIAL");
10706 }
10707 else if (((*yyvaluep).node)) {
10708 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10709 }
10710}
10711#line 10712 "parse.c"
10712 break;
10713
10714 case YYSYMBOL_string: /* string */
10715#line 2634 "parse.y"
10716 {
10717 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10718 rb_parser_printf(p, "NODE_SPECIAL");
10719 }
10720 else if (((*yyvaluep).node)) {
10721 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10722 }
10723}
10724#line 10725 "parse.c"
10725 break;
10726
10727 case YYSYMBOL_string1: /* string1 */
10728#line 2634 "parse.y"
10729 {
10730 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10731 rb_parser_printf(p, "NODE_SPECIAL");
10732 }
10733 else if (((*yyvaluep).node)) {
10734 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10735 }
10736}
10737#line 10738 "parse.c"
10738 break;
10739
10740 case YYSYMBOL_xstring: /* xstring */
10741#line 2634 "parse.y"
10742 {
10743 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10744 rb_parser_printf(p, "NODE_SPECIAL");
10745 }
10746 else if (((*yyvaluep).node)) {
10747 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10748 }
10749}
10750#line 10751 "parse.c"
10751 break;
10752
10753 case YYSYMBOL_regexp: /* regexp */
10754#line 2634 "parse.y"
10755 {
10756 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10757 rb_parser_printf(p, "NODE_SPECIAL");
10758 }
10759 else if (((*yyvaluep).node)) {
10760 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10761 }
10762}
10763#line 10764 "parse.c"
10764 break;
10765
10766 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10767#line 2634 "parse.y"
10768 {
10769 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10770 rb_parser_printf(p, "NODE_SPECIAL");
10771 }
10772 else if (((*yyvaluep).node)) {
10773 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10774 }
10775}
10776#line 10777 "parse.c"
10777 break;
10778
10779 case YYSYMBOL_words: /* words */
10780#line 2634 "parse.y"
10781 {
10782 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10783 rb_parser_printf(p, "NODE_SPECIAL");
10784 }
10785 else if (((*yyvaluep).node)) {
10786 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10787 }
10788}
10789#line 10790 "parse.c"
10790 break;
10791
10792 case YYSYMBOL_word_list: /* word_list */
10793#line 2634 "parse.y"
10794 {
10795 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10796 rb_parser_printf(p, "NODE_SPECIAL");
10797 }
10798 else if (((*yyvaluep).node)) {
10799 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10800 }
10801}
10802#line 10803 "parse.c"
10803 break;
10804
10805 case YYSYMBOL_word: /* word */
10806#line 2634 "parse.y"
10807 {
10808 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10809 rb_parser_printf(p, "NODE_SPECIAL");
10810 }
10811 else if (((*yyvaluep).node)) {
10812 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10813 }
10814}
10815#line 10816 "parse.c"
10816 break;
10817
10818 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10819#line 2634 "parse.y"
10820 {
10821 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10822 rb_parser_printf(p, "NODE_SPECIAL");
10823 }
10824 else if (((*yyvaluep).node)) {
10825 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10826 }
10827}
10828#line 10829 "parse.c"
10829 break;
10830
10831 case YYSYMBOL_symbols: /* symbols */
10832#line 2634 "parse.y"
10833 {
10834 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10835 rb_parser_printf(p, "NODE_SPECIAL");
10836 }
10837 else if (((*yyvaluep).node)) {
10838 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10839 }
10840}
10841#line 10842 "parse.c"
10842 break;
10843
10844 case YYSYMBOL_symbol_list: /* symbol_list */
10845#line 2634 "parse.y"
10846 {
10847 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10848 rb_parser_printf(p, "NODE_SPECIAL");
10849 }
10850 else if (((*yyvaluep).node)) {
10851 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10852 }
10853}
10854#line 10855 "parse.c"
10855 break;
10856
10857 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10858#line 2634 "parse.y"
10859 {
10860 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10861 rb_parser_printf(p, "NODE_SPECIAL");
10862 }
10863 else if (((*yyvaluep).node)) {
10864 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10865 }
10866}
10867#line 10868 "parse.c"
10868 break;
10869
10870 case YYSYMBOL_qwords: /* qwords */
10871#line 2634 "parse.y"
10872 {
10873 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10874 rb_parser_printf(p, "NODE_SPECIAL");
10875 }
10876 else if (((*yyvaluep).node)) {
10877 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10878 }
10879}
10880#line 10881 "parse.c"
10881 break;
10882
10883 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10884#line 2634 "parse.y"
10885 {
10886 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10887 rb_parser_printf(p, "NODE_SPECIAL");
10888 }
10889 else if (((*yyvaluep).node)) {
10890 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10891 }
10892}
10893#line 10894 "parse.c"
10894 break;
10895
10896 case YYSYMBOL_qsymbols: /* qsymbols */
10897#line 2634 "parse.y"
10898 {
10899 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10900 rb_parser_printf(p, "NODE_SPECIAL");
10901 }
10902 else if (((*yyvaluep).node)) {
10903 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10904 }
10905}
10906#line 10907 "parse.c"
10907 break;
10908
10909 case YYSYMBOL_qword_list: /* qword_list */
10910#line 2634 "parse.y"
10911 {
10912 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10913 rb_parser_printf(p, "NODE_SPECIAL");
10914 }
10915 else if (((*yyvaluep).node)) {
10916 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10917 }
10918}
10919#line 10920 "parse.c"
10920 break;
10921
10922 case YYSYMBOL_qsym_list: /* qsym_list */
10923#line 2634 "parse.y"
10924 {
10925 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10926 rb_parser_printf(p, "NODE_SPECIAL");
10927 }
10928 else if (((*yyvaluep).node)) {
10929 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10930 }
10931}
10932#line 10933 "parse.c"
10933 break;
10934
10935 case YYSYMBOL_string_contents: /* string_contents */
10936#line 2634 "parse.y"
10937 {
10938 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10939 rb_parser_printf(p, "NODE_SPECIAL");
10940 }
10941 else if (((*yyvaluep).node)) {
10942 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10943 }
10944}
10945#line 10946 "parse.c"
10946 break;
10947
10948 case YYSYMBOL_xstring_contents: /* xstring_contents */
10949#line 2634 "parse.y"
10950 {
10951 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10952 rb_parser_printf(p, "NODE_SPECIAL");
10953 }
10954 else if (((*yyvaluep).node)) {
10955 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10956 }
10957}
10958#line 10959 "parse.c"
10959 break;
10960
10961 case YYSYMBOL_regexp_contents: /* regexp_contents */
10962#line 2634 "parse.y"
10963 {
10964 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10965 rb_parser_printf(p, "NODE_SPECIAL");
10966 }
10967 else if (((*yyvaluep).node)) {
10968 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10969 }
10970}
10971#line 10972 "parse.c"
10972 break;
10973
10974 case YYSYMBOL_string_content: /* string_content */
10975#line 2634 "parse.y"
10976 {
10977 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10978 rb_parser_printf(p, "NODE_SPECIAL");
10979 }
10980 else if (((*yyvaluep).node)) {
10981 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10982 }
10983}
10984#line 10985 "parse.c"
10985 break;
10986
10987 case YYSYMBOL_string_dvar: /* string_dvar */
10988#line 2634 "parse.y"
10989 {
10990 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10991 rb_parser_printf(p, "NODE_SPECIAL");
10992 }
10993 else if (((*yyvaluep).node)) {
10994 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10995 }
10996}
10997#line 10998 "parse.c"
10998 break;
10999
11000 case YYSYMBOL_symbol: /* symbol */
11001#line 2634 "parse.y"
11002 {
11003 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11004 rb_parser_printf(p, "NODE_SPECIAL");
11005 }
11006 else if (((*yyvaluep).node)) {
11007 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11008 }
11009}
11010#line 11011 "parse.c"
11011 break;
11012
11013 case YYSYMBOL_ssym: /* ssym */
11014#line 2634 "parse.y"
11015 {
11016 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11017 rb_parser_printf(p, "NODE_SPECIAL");
11018 }
11019 else if (((*yyvaluep).node)) {
11020 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11021 }
11022}
11023#line 11024 "parse.c"
11024 break;
11025
11026 case YYSYMBOL_sym: /* sym */
11027#line 2643 "parse.y"
11028 {
11029 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11030}
11031#line 11032 "parse.c"
11032 break;
11033
11034 case YYSYMBOL_dsym: /* dsym */
11035#line 2634 "parse.y"
11036 {
11037 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11038 rb_parser_printf(p, "NODE_SPECIAL");
11039 }
11040 else if (((*yyvaluep).node)) {
11041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11042 }
11043}
11044#line 11045 "parse.c"
11045 break;
11046
11047 case YYSYMBOL_numeric: /* numeric */
11048#line 2634 "parse.y"
11049 {
11050 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11051 rb_parser_printf(p, "NODE_SPECIAL");
11052 }
11053 else if (((*yyvaluep).node)) {
11054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11055 }
11056}
11057#line 11058 "parse.c"
11058 break;
11059
11060 case YYSYMBOL_simple_numeric: /* simple_numeric */
11061#line 2634 "parse.y"
11062 {
11063 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11064 rb_parser_printf(p, "NODE_SPECIAL");
11065 }
11066 else if (((*yyvaluep).node)) {
11067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11068 }
11069}
11070#line 11071 "parse.c"
11071 break;
11072
11073 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
11074#line 2643 "parse.y"
11075 {
11076 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11077}
11078#line 11079 "parse.c"
11079 break;
11080
11081 case YYSYMBOL_user_variable: /* user_variable */
11082#line 2643 "parse.y"
11083 {
11084 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11085}
11086#line 11087 "parse.c"
11087 break;
11088
11089 case YYSYMBOL_keyword_variable: /* keyword_variable */
11090#line 2643 "parse.y"
11091 {
11092 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11093}
11094#line 11095 "parse.c"
11095 break;
11096
11097 case YYSYMBOL_var_ref: /* var_ref */
11098#line 2634 "parse.y"
11099 {
11100 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11101 rb_parser_printf(p, "NODE_SPECIAL");
11102 }
11103 else if (((*yyvaluep).node)) {
11104 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11105 }
11106}
11107#line 11108 "parse.c"
11108 break;
11109
11110 case YYSYMBOL_var_lhs: /* var_lhs */
11111#line 2634 "parse.y"
11112 {
11113 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11114 rb_parser_printf(p, "NODE_SPECIAL");
11115 }
11116 else if (((*yyvaluep).node)) {
11117 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11118 }
11119}
11120#line 11121 "parse.c"
11121 break;
11122
11123 case YYSYMBOL_backref: /* backref */
11124#line 2634 "parse.y"
11125 {
11126 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11127 rb_parser_printf(p, "NODE_SPECIAL");
11128 }
11129 else if (((*yyvaluep).node)) {
11130 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11131 }
11132}
11133#line 11134 "parse.c"
11134 break;
11135
11136 case YYSYMBOL_superclass: /* superclass */
11137#line 2634 "parse.y"
11138 {
11139 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11140 rb_parser_printf(p, "NODE_SPECIAL");
11141 }
11142 else if (((*yyvaluep).node)) {
11143 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11144 }
11145}
11146#line 11147 "parse.c"
11147 break;
11148
11149 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11150#line 2634 "parse.y"
11151 {
11152 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11153 rb_parser_printf(p, "NODE_SPECIAL");
11154 }
11155 else if (((*yyvaluep).node_args)) {
11156 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11157 }
11158}
11159#line 11160 "parse.c"
11160 break;
11161
11162 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11163#line 2634 "parse.y"
11164 {
11165 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11166 rb_parser_printf(p, "NODE_SPECIAL");
11167 }
11168 else if (((*yyvaluep).node_args)) {
11169 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11170 }
11171}
11172#line 11173 "parse.c"
11173 break;
11174
11175 case YYSYMBOL_f_paren_args: /* f_paren_args */
11176#line 2634 "parse.y"
11177 {
11178 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11179 rb_parser_printf(p, "NODE_SPECIAL");
11180 }
11181 else if (((*yyvaluep).node_args)) {
11182 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11183 }
11184}
11185#line 11186 "parse.c"
11186 break;
11187
11188 case YYSYMBOL_f_arglist: /* f_arglist */
11189#line 2634 "parse.y"
11190 {
11191 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11192 rb_parser_printf(p, "NODE_SPECIAL");
11193 }
11194 else if (((*yyvaluep).node_args)) {
11195 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11196 }
11197}
11198#line 11199 "parse.c"
11199 break;
11200
11201 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11202#line 2634 "parse.y"
11203 {
11204 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11205 rb_parser_printf(p, "NODE_SPECIAL");
11206 }
11207 else if (((*yyvaluep).node_kw_arg)) {
11208 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11209 }
11210}
11211#line 11212 "parse.c"
11212 break;
11213
11214 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11215#line 2634 "parse.y"
11216 {
11217 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11218 rb_parser_printf(p, "NODE_SPECIAL");
11219 }
11220 else if (((*yyvaluep).node_kw_arg)) {
11221 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11222 }
11223}
11224#line 11225 "parse.c"
11225 break;
11226
11227 case YYSYMBOL_opt_f_block_arg_opt_comma: /* opt_f_block_arg_opt_comma */
11228#line 2643 "parse.y"
11229 {
11230 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11231}
11232#line 11233 "parse.c"
11233 break;
11234
11235 case YYSYMBOL_args_tail_basic_arg_value_opt_comma: /* args_tail_basic_arg_value_opt_comma */
11236#line 2634 "parse.y"
11237 {
11238 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11239 rb_parser_printf(p, "NODE_SPECIAL");
11240 }
11241 else if (((*yyvaluep).node_args)) {
11242 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11243 }
11244}
11245#line 11246 "parse.c"
11246 break;
11247
11248 case YYSYMBOL_args_tail: /* args_tail */
11249#line 2634 "parse.y"
11250 {
11251 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11252 rb_parser_printf(p, "NODE_SPECIAL");
11253 }
11254 else if (((*yyvaluep).node_args)) {
11255 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11256 }
11257}
11258#line 11259 "parse.c"
11259 break;
11260
11261 case YYSYMBOL_args_tail_basic_arg_value_none: /* args_tail_basic_arg_value_none */
11262#line 2634 "parse.y"
11263 {
11264 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11265 rb_parser_printf(p, "NODE_SPECIAL");
11266 }
11267 else if (((*yyvaluep).node_args)) {
11268 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11269 }
11270}
11271#line 11272 "parse.c"
11272 break;
11273
11274 case YYSYMBOL_largs_tail: /* largs_tail */
11275#line 2634 "parse.y"
11276 {
11277 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11278 rb_parser_printf(p, "NODE_SPECIAL");
11279 }
11280 else if (((*yyvaluep).node_args)) {
11281 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11282 }
11283}
11284#line 11285 "parse.c"
11285 break;
11286
11287 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11288#line 2634 "parse.y"
11289 {
11290 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11291 rb_parser_printf(p, "NODE_SPECIAL");
11292 }
11293 else if (((*yyvaluep).node_opt_arg)) {
11294 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11295 }
11296}
11297#line 11298 "parse.c"
11298 break;
11299
11300 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11301#line 2634 "parse.y"
11302 {
11303 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11304 rb_parser_printf(p, "NODE_SPECIAL");
11305 }
11306 else if (((*yyvaluep).node_opt_arg)) {
11307 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11308 }
11309}
11310#line 11311 "parse.c"
11311 break;
11312
11313 case YYSYMBOL_opt_args_tail_args_tail_opt_comma: /* opt_args_tail_args_tail_opt_comma */
11314#line 2634 "parse.y"
11315 {
11316 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11317 rb_parser_printf(p, "NODE_SPECIAL");
11318 }
11319 else if (((*yyvaluep).node_args)) {
11320 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11321 }
11322}
11323#line 11324 "parse.c"
11324 break;
11325
11326 case YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
11327#line 2634 "parse.y"
11328 {
11329 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11330 rb_parser_printf(p, "NODE_SPECIAL");
11331 }
11332 else if (((*yyvaluep).node_args)) {
11333 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11334 }
11335}
11336#line 11337 "parse.c"
11337 break;
11338
11339 case YYSYMBOL_f_args_list_args_tail_opt_comma: /* f_args-list_args_tail_opt_comma */
11340#line 2634 "parse.y"
11341 {
11342 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11343 rb_parser_printf(p, "NODE_SPECIAL");
11344 }
11345 else if (((*yyvaluep).node_args)) {
11346 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11347 }
11348}
11349#line 11350 "parse.c"
11350 break;
11351
11352 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11353#line 2634 "parse.y"
11354 {
11355 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11356 rb_parser_printf(p, "NODE_SPECIAL");
11357 }
11358 else if (((*yyvaluep).node_args)) {
11359 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11360 }
11361}
11362#line 11363 "parse.c"
11363 break;
11364
11365 case YYSYMBOL_f_args: /* f_args */
11366#line 2634 "parse.y"
11367 {
11368 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11369 rb_parser_printf(p, "NODE_SPECIAL");
11370 }
11371 else if (((*yyvaluep).node_args)) {
11372 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11373 }
11374}
11375#line 11376 "parse.c"
11376 break;
11377
11378 case YYSYMBOL_opt_args_tail_largs_tail_none: /* opt_args_tail_largs_tail_none */
11379#line 2634 "parse.y"
11380 {
11381 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11382 rb_parser_printf(p, "NODE_SPECIAL");
11383 }
11384 else if (((*yyvaluep).node_args)) {
11385 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11386 }
11387}
11388#line 11389 "parse.c"
11389 break;
11390
11391 case YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none: /* args-list_arg_value_opt_args_tail_largs_tail_none */
11392#line 2634 "parse.y"
11393 {
11394 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11395 rb_parser_printf(p, "NODE_SPECIAL");
11396 }
11397 else if (((*yyvaluep).node_args)) {
11398 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11399 }
11400}
11401#line 11402 "parse.c"
11402 break;
11403
11404 case YYSYMBOL_f_args_list_largs_tail_none: /* f_args-list_largs_tail_none */
11405#line 2634 "parse.y"
11406 {
11407 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11408 rb_parser_printf(p, "NODE_SPECIAL");
11409 }
11410 else if (((*yyvaluep).node_args)) {
11411 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11412 }
11413}
11414#line 11415 "parse.c"
11415 break;
11416
11417 case YYSYMBOL_tail_only_args_largs_tail: /* tail-only-args_largs_tail */
11418#line 2634 "parse.y"
11419 {
11420 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11421 rb_parser_printf(p, "NODE_SPECIAL");
11422 }
11423 else if (((*yyvaluep).node_args)) {
11424 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11425 }
11426}
11427#line 11428 "parse.c"
11428 break;
11429
11430 case YYSYMBOL_f_largs: /* f_largs */
11431#line 2634 "parse.y"
11432 {
11433 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11434 rb_parser_printf(p, "NODE_SPECIAL");
11435 }
11436 else if (((*yyvaluep).node_args)) {
11437 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11438 }
11439}
11440#line 11441 "parse.c"
11441 break;
11442
11443 case YYSYMBOL_args_forward: /* args_forward */
11444#line 2643 "parse.y"
11445 {
11446 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11447}
11448#line 11449 "parse.c"
11449 break;
11450
11451 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11452#line 2643 "parse.y"
11453 {
11454 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11455}
11456#line 11457 "parse.c"
11457 break;
11458
11459 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11460#line 2643 "parse.y"
11461 {
11462 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11463}
11464#line 11465 "parse.c"
11465 break;
11466
11467 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11468#line 2643 "parse.y"
11469 {
11470 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11471}
11472#line 11473 "parse.c"
11473 break;
11474
11475 case YYSYMBOL_f_arg_item: /* f_arg_item */
11476#line 2634 "parse.y"
11477 {
11478 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11479 rb_parser_printf(p, "NODE_SPECIAL");
11480 }
11481 else if (((*yyvaluep).node_args_aux)) {
11482 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11483 }
11484}
11485#line 11486 "parse.c"
11486 break;
11487
11488 case YYSYMBOL_f_arg: /* f_arg */
11489#line 2634 "parse.y"
11490 {
11491 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11492 rb_parser_printf(p, "NODE_SPECIAL");
11493 }
11494 else if (((*yyvaluep).node_args_aux)) {
11495 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11496 }
11497}
11498#line 11499 "parse.c"
11499 break;
11500
11501 case YYSYMBOL_f_label: /* f_label */
11502#line 2643 "parse.y"
11503 {
11504 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11505}
11506#line 11507 "parse.c"
11507 break;
11508
11509 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11510#line 2643 "parse.y"
11511 {
11512 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11513}
11514#line 11515 "parse.c"
11515 break;
11516
11517 case YYSYMBOL_f_kwrest: /* f_kwrest */
11518#line 2643 "parse.y"
11519 {
11520 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11521}
11522#line 11523 "parse.c"
11523 break;
11524
11525 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11526#line 2643 "parse.y"
11527 {
11528 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11529}
11530#line 11531 "parse.c"
11531 break;
11532
11533 case YYSYMBOL_f_block_arg: /* f_block_arg */
11534#line 2643 "parse.y"
11535 {
11536 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11537}
11538#line 11539 "parse.c"
11539 break;
11540
11541 case YYSYMBOL_opt_comma: /* opt_comma */
11542#line 2643 "parse.y"
11543 {
11544 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11545}
11546#line 11547 "parse.c"
11547 break;
11548
11549 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11550#line 2634 "parse.y"
11551 {
11552 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11553 rb_parser_printf(p, "NODE_SPECIAL");
11554 }
11555 else if (((*yyvaluep).node)) {
11556 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11557 }
11558}
11559#line 11560 "parse.c"
11560 break;
11561
11562 case YYSYMBOL_singleton: /* singleton */
11563#line 2634 "parse.y"
11564 {
11565 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11566 rb_parser_printf(p, "NODE_SPECIAL");
11567 }
11568 else if (((*yyvaluep).node)) {
11569 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11570 }
11571}
11572#line 11573 "parse.c"
11573 break;
11574
11575 case YYSYMBOL_singleton_expr: /* singleton_expr */
11576#line 2634 "parse.y"
11577 {
11578 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11579 rb_parser_printf(p, "NODE_SPECIAL");
11580 }
11581 else if (((*yyvaluep).node)) {
11582 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11583 }
11584}
11585#line 11586 "parse.c"
11586 break;
11587
11588 case YYSYMBOL_assoc_list: /* assoc_list */
11589#line 2634 "parse.y"
11590 {
11591 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11592 rb_parser_printf(p, "NODE_SPECIAL");
11593 }
11594 else if (((*yyvaluep).node)) {
11595 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11596 }
11597}
11598#line 11599 "parse.c"
11599 break;
11600
11601 case YYSYMBOL_assocs: /* assocs */
11602#line 2634 "parse.y"
11603 {
11604 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11605 rb_parser_printf(p, "NODE_SPECIAL");
11606 }
11607 else if (((*yyvaluep).node)) {
11608 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11609 }
11610}
11611#line 11612 "parse.c"
11612 break;
11613
11614 case YYSYMBOL_assoc: /* assoc */
11615#line 2634 "parse.y"
11616 {
11617 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11618 rb_parser_printf(p, "NODE_SPECIAL");
11619 }
11620 else if (((*yyvaluep).node)) {
11621 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11622 }
11623}
11624#line 11625 "parse.c"
11625 break;
11626
11627 case YYSYMBOL_operation2: /* operation2 */
11628#line 2643 "parse.y"
11629 {
11630 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11631}
11632#line 11633 "parse.c"
11633 break;
11634
11635 case YYSYMBOL_operation3: /* operation3 */
11636#line 2643 "parse.y"
11637 {
11638 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11639}
11640#line 11641 "parse.c"
11641 break;
11642
11643 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11644#line 2643 "parse.y"
11645 {
11646 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11647}
11648#line 11649 "parse.c"
11649 break;
11650
11651 case YYSYMBOL_call_op: /* call_op */
11652#line 2643 "parse.y"
11653 {
11654 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11655}
11656#line 11657 "parse.c"
11657 break;
11658
11659 case YYSYMBOL_call_op2: /* call_op2 */
11660#line 2643 "parse.y"
11661 {
11662 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11663}
11664#line 11665 "parse.c"
11665 break;
11666
11667 case YYSYMBOL_none: /* none */
11668#line 2634 "parse.y"
11669 {
11670 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11671 rb_parser_printf(p, "NODE_SPECIAL");
11672 }
11673 else if (((*yyvaluep).node)) {
11674 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11675 }
11676}
11677#line 11678 "parse.c"
11678 break;
11679
11680 default:
11681 break;
11682 }
11683 YY_IGNORE_MAYBE_UNINITIALIZED_END
11684}
11685
11686
11687/*---------------------------.
11688| Print this symbol on YYO. |
11689`---------------------------*/
11690
11691static void
11692yy_symbol_print (FILE *yyo,
11693 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11694{
11695 YYFPRINTF (yyo, "%s %s (",
11696 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11697
11698 YYLOCATION_PRINT (yyo, yylocationp, p);
11699 YYFPRINTF (yyo, ": ");
11700 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11701 YYFPRINTF (yyo, ")");
11702}
11703
11704/*------------------------------------------------------------------.
11705| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11706| TOP (included). |
11707`------------------------------------------------------------------*/
11708
11709static void
11710yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11711{
11712 YYFPRINTF (stderr, "Stack now");
11713 for (; yybottom <= yytop; yybottom++)
11714 {
11715 int yybot = *yybottom;
11716 YYFPRINTF (stderr, " %d", yybot);
11717 }
11718 YYFPRINTF (stderr, "\n");
11719}
11720
11721# define YY_STACK_PRINT(Bottom, Top, p) \
11722do { \
11723 if (yydebug) \
11724 yy_stack_print ((Bottom), (Top), p); \
11725} while (0)
11726
11727
11728/*------------------------------------------------.
11729| Report that the YYRULE is going to be reduced. |
11730`------------------------------------------------*/
11731
11732static void
11733yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11734 int yyrule, struct parser_params *p)
11735{
11736 int yylno = yyrline[yyrule];
11737 int yynrhs = yyr2[yyrule];
11738 int yyi;
11739 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11740 yyrule - 1, yylno);
11741 /* The symbols being reduced. */
11742 for (yyi = 0; yyi < yynrhs; yyi++)
11743 {
11744 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11745 yy_symbol_print (stderr,
11746 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11747 &yyvsp[(yyi + 1) - (yynrhs)],
11748 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11749 YYFPRINTF (stderr, "\n");
11750 }
11751}
11752
11753# define YY_REDUCE_PRINT(Rule, p) \
11754do { \
11755 if (yydebug) \
11756 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11757} while (0)
11758
11759/* Nonzero means print parse trace. It is left uninitialized so that
11760 multiple parsers can coexist. */
11761#ifndef yydebug
11762int yydebug;
11763#endif
11764#else /* !YYDEBUG */
11765# define YYDPRINTF(Args) ((void) 0)
11766# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11767# define YY_STACK_PRINT(Bottom, Top, p)
11768# define YY_REDUCE_PRINT(Rule, p)
11769#endif /* !YYDEBUG */
11770
11771
11772/* YYINITDEPTH -- initial size of the parser's stacks. */
11773#ifndef YYINITDEPTH
11774# define YYINITDEPTH 200
11775#endif
11776
11777/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11778 if the built-in stack extension method is used).
11779
11780 Do not make this value too large; the results are undefined if
11781 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11782 evaluated with infinite-precision integer arithmetic. */
11783
11784#ifndef YYMAXDEPTH
11785# define YYMAXDEPTH 10000
11786#endif
11787
11788
11789/* Context of a parse error. */
11790typedef struct
11791{
11792 yy_state_t *yyssp;
11793 yysymbol_kind_t yytoken;
11794 YYLTYPE *yylloc;
11795} yypcontext_t;
11796
11797/* Put in YYARG at most YYARGN of the expected tokens given the
11798 current YYCTX, and return the number of tokens stored in YYARG. If
11799 YYARG is null, return the number of expected tokens (guaranteed to
11800 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11801 Return 0 if there are more than YYARGN expected tokens, yet fill
11802 YYARG up to YYARGN. */
11803static int
11804yypcontext_expected_tokens (const yypcontext_t *yyctx,
11805 yysymbol_kind_t yyarg[], int yyargn)
11806{
11807 /* Actual size of YYARG. */
11808 int yycount = 0;
11809 int yyn = yypact[+*yyctx->yyssp];
11810 if (!yypact_value_is_default (yyn))
11811 {
11812 /* Start YYX at -YYN if negative to avoid negative indexes in
11813 YYCHECK. In other words, skip the first -YYN actions for
11814 this state because they are default actions. */
11815 int yyxbegin = yyn < 0 ? -yyn : 0;
11816 /* Stay within bounds of both yycheck and yytname. */
11817 int yychecklim = YYLAST - yyn + 1;
11818 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11819 int yyx;
11820 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11821 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11822 && !yytable_value_is_error (yytable[yyx + yyn]))
11823 {
11824 if (!yyarg)
11825 ++yycount;
11826 else if (yycount == yyargn)
11827 return 0;
11828 else
11829 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11830 }
11831 }
11832 if (yyarg && yycount == 0 && 0 < yyargn)
11833 yyarg[0] = YYSYMBOL_YYEMPTY;
11834 return yycount;
11835}
11836
11837
11838
11839
11840#ifndef yystrlen
11841# if defined __GLIBC__ && defined _STRING_H
11842# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11843# else
11844/* Return the length of YYSTR. */
11845static YYPTRDIFF_T
11846yystrlen (const char *yystr)
11847{
11848 YYPTRDIFF_T yylen;
11849 for (yylen = 0; yystr[yylen]; yylen++)
11850 continue;
11851 return yylen;
11852}
11853# endif
11854#endif
11855
11856#ifndef yystpcpy
11857# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11858# define yystpcpy stpcpy
11859# else
11860/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11861 YYDEST. */
11862static char *
11863yystpcpy (char *yydest, const char *yysrc)
11864{
11865 char *yyd = yydest;
11866 const char *yys = yysrc;
11867
11868 while ((*yyd++ = *yys++) != '\0')
11869 continue;
11870
11871 return yyd - 1;
11872}
11873# endif
11874#endif
11875
11876#ifndef yytnamerr
11877/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11878 quotes and backslashes, so that it's suitable for yyerror. The
11879 heuristic is that double-quoting is unnecessary unless the string
11880 contains an apostrophe, a comma, or backslash (other than
11881 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11882 null, do not copy; instead, return the length of what the result
11883 would have been. */
11884static YYPTRDIFF_T
11885yytnamerr (char *yyres, const char *yystr)
11886{
11887 if (*yystr == '"')
11888 {
11889 YYPTRDIFF_T yyn = 0;
11890 char const *yyp = yystr;
11891 for (;;)
11892 switch (*++yyp)
11893 {
11894 case '\'':
11895 case ',':
11896 goto do_not_strip_quotes;
11897
11898 case '\\':
11899 if (*++yyp != '\\')
11900 goto do_not_strip_quotes;
11901 else
11902 goto append;
11903
11904 append:
11905 default:
11906 if (yyres)
11907 yyres[yyn] = *yyp;
11908 yyn++;
11909 break;
11910
11911 case '"':
11912 if (yyres)
11913 yyres[yyn] = '\0';
11914 return yyn;
11915 }
11916 do_not_strip_quotes: ;
11917 }
11918
11919 if (yyres)
11920 return yystpcpy (yyres, yystr) - yyres;
11921 else
11922 return yystrlen (yystr);
11923}
11924#endif
11925
11926
11927static int
11928yy_syntax_error_arguments (const yypcontext_t *yyctx,
11929 yysymbol_kind_t yyarg[], int yyargn)
11930{
11931 /* Actual size of YYARG. */
11932 int yycount = 0;
11933 /* There are many possibilities here to consider:
11934 - If this state is a consistent state with a default action, then
11935 the only way this function was invoked is if the default action
11936 is an error action. In that case, don't check for expected
11937 tokens because there are none.
11938 - The only way there can be no lookahead present (in yychar) is if
11939 this state is a consistent state with a default action. Thus,
11940 detecting the absence of a lookahead is sufficient to determine
11941 that there is no unexpected or expected token to report. In that
11942 case, just report a simple "syntax error".
11943 - Don't assume there isn't a lookahead just because this state is a
11944 consistent state with a default action. There might have been a
11945 previous inconsistent state, consistent state with a non-default
11946 action, or user semantic action that manipulated yychar.
11947 - Of course, the expected token list depends on states to have
11948 correct lookahead information, and it depends on the parser not
11949 to perform extra reductions after fetching a lookahead from the
11950 scanner and before detecting a syntax error. Thus, state merging
11951 (from LALR or IELR) and default reductions corrupt the expected
11952 token list. However, the list is correct for canonical LR with
11953 one exception: it will still contain any token that will not be
11954 accepted due to an error action in a later state.
11955 */
11956 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11957 {
11958 int yyn;
11959 if (yyarg)
11960 yyarg[yycount] = yyctx->yytoken;
11961 ++yycount;
11962 yyn = yypcontext_expected_tokens (yyctx,
11963 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11964 if (yyn == YYENOMEM)
11965 return YYENOMEM;
11966 else
11967 yycount += yyn;
11968 }
11969 return yycount;
11970}
11971
11972/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11973 about the unexpected token YYTOKEN for the state stack whose top is
11974 YYSSP.
11975
11976 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11977 not large enough to hold the message. In that case, also set
11978 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11979 required number of bytes is too large to store. */
11980static int
11981yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11982 const yypcontext_t *yyctx, struct parser_params *p)
11983{
11984 enum { YYARGS_MAX = 5 };
11985 /* Internationalized format string. */
11986 const char *yyformat = YY_NULLPTR;
11987 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11988 one per "expected"). */
11989 yysymbol_kind_t yyarg[YYARGS_MAX];
11990 /* Cumulated lengths of YYARG. */
11991 YYPTRDIFF_T yysize = 0;
11992
11993 /* Actual size of YYARG. */
11994 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11995 if (yycount == YYENOMEM)
11996 return YYENOMEM;
11997
11998 switch (yycount)
11999 {
12000#define YYCASE_(N, S) \
12001 case N: \
12002 yyformat = S; \
12003 break
12004 default: /* Avoid compiler warnings. */
12005 YYCASE_(0, YY_("syntax error"));
12006 YYCASE_(1, YY_("syntax error, unexpected %s"));
12007 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
12008 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
12009 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
12010 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
12011#undef YYCASE_
12012 }
12013
12014 /* Compute error message size. Don't count the "%s"s, but reserve
12015 room for the terminator. */
12016 yysize = yystrlen (yyformat) - 2 * yycount + 1;
12017 {
12018 int yyi;
12019 for (yyi = 0; yyi < yycount; ++yyi)
12020 {
12021 YYPTRDIFF_T yysize1
12022 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
12023 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
12024 yysize = yysize1;
12025 else
12026 return YYENOMEM;
12027 }
12028 }
12029
12030 if (*yymsg_alloc < yysize)
12031 {
12032 *yymsg_alloc = 2 * yysize;
12033 if (! (yysize <= *yymsg_alloc
12034 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
12035 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
12036 return -1;
12037 }
12038
12039 /* Avoid sprintf, as that infringes on the user's name space.
12040 Don't have undefined behavior even if the translation
12041 produced a string with the wrong number of "%s"s. */
12042 {
12043 char *yyp = *yymsg;
12044 int yyi = 0;
12045 while ((*yyp = *yyformat) != '\0')
12046 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
12047 {
12048 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
12049 yyformat += 2;
12050 }
12051 else
12052 {
12053 ++yyp;
12054 ++yyformat;
12055 }
12056 }
12057 return 0;
12058}
12059
12060
12061/*-----------------------------------------------.
12062| Release the memory associated to this symbol. |
12063`-----------------------------------------------*/
12064
12065static void
12066yydestruct (const char *yymsg,
12067 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
12068{
12069 YY_USE (yyvaluep);
12070 YY_USE (yylocationp);
12071 YY_USE (p);
12072 if (!yymsg)
12073 yymsg = "Deleting";
12074 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
12075
12076 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12077 switch (yykind)
12078 {
12079 case YYSYMBOL_258_16: /* @16 */
12080#line 2671 "parse.y"
12081 {
12082 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
12083}
12084#line 12085 "parse.c"
12085 break;
12086
12087 case YYSYMBOL_259_17: /* @17 */
12088#line 2671 "parse.y"
12089 {
12090 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
12091}
12092#line 12093 "parse.c"
12093 break;
12094
12095 default:
12096 break;
12097 }
12098 YY_IGNORE_MAYBE_UNINITIALIZED_END
12099}
12100
12101
12102
12103
12104
12105
12106/*----------.
12107| yyparse. |
12108`----------*/
12109
12110int
12111yyparse (struct parser_params *p)
12112{
12113/* Lookahead token kind. */
12114int yychar;
12115
12116
12117/* The semantic value of the lookahead symbol. */
12118/* Default value used for initialization, for pacifying older GCCs
12119 or non-GCC compilers. */
12120#ifdef __cplusplus
12121static const YYSTYPE yyval_default = {};
12122(void) yyval_default;
12123#else
12124YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
12125#endif
12126YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
12127
12128/* Location data for the lookahead symbol. */
12129static const YYLTYPE yyloc_default
12130# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
12131 = { 1, 1, 1, 1 }
12132# endif
12133;
12134YYLTYPE yylloc = yyloc_default;
12135
12136 /* Number of syntax errors so far. */
12137 int yynerrs = 0;
12138 YY_USE (yynerrs); /* Silence compiler warning. */
12139
12140 yy_state_fast_t yystate = 0;
12141 /* Number of tokens to shift before error messages enabled. */
12142 int yyerrstatus = 0;
12143
12144 /* Refer to the stacks through separate pointers, to allow yyoverflow
12145 to reallocate them elsewhere. */
12146
12147 /* Their size. */
12148 YYPTRDIFF_T yystacksize = YYINITDEPTH;
12149
12150 /* The state stack: array, bottom, top. */
12151 yy_state_t yyssa[YYINITDEPTH];
12152 yy_state_t *yyss = yyssa;
12153 yy_state_t *yyssp = yyss;
12154
12155 /* The semantic value stack: array, bottom, top. */
12156 YYSTYPE yyvsa[YYINITDEPTH];
12157 YYSTYPE *yyvs = yyvsa;
12158 YYSTYPE *yyvsp = yyvs;
12159
12160 /* The location stack: array, bottom, top. */
12161 YYLTYPE yylsa[YYINITDEPTH];
12162 YYLTYPE *yyls = yylsa;
12163 YYLTYPE *yylsp = yyls;
12164
12165 int yyn;
12166 /* The return value of yyparse. */
12167 int yyresult;
12168 /* Lookahead symbol kind. */
12169 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
12170 /* The variables used to return semantic value and location from the
12171 action routines. */
12172 YYSTYPE yyval;
12173 YYLTYPE yyloc;
12174
12175 /* The locations where the error started and ended. */
12176 YYLTYPE yyerror_range[3];
12177
12178 /* Buffer for error messages, and its allocated size. */
12179 char yymsgbuf[128];
12180 char *yymsg = yymsgbuf;
12181 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
12182
12183#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
12184
12185 /* The number of symbols on the RHS of the reduced rule.
12186 Keep to zero when no symbol should be popped. */
12187 int yylen = 0;
12188
12189 YYDPRINTF ((stderr, "Starting parse\n"));
12190
12191 yychar = YYEMPTY; /* Cause a token to be read. */
12192
12193
12194 /* User initialization code. */
12195#line 2678 "parse.y"
12196 {
12197 RUBY_SET_YYLLOC_OF_NONE(yylloc);
12198}
12199
12200#line 12201 "parse.c"
12201
12202 yylsp[0] = yylloc;
12203 goto yysetstate;
12204
12205
12206/*------------------------------------------------------------.
12207| yynewstate -- push a new state, which is found in yystate. |
12208`------------------------------------------------------------*/
12209yynewstate:
12210 /* In all cases, when you get here, the value and location stacks
12211 have just been pushed. So pushing a state here evens the stacks. */
12212 yyssp++;
12213
12214
12215/*--------------------------------------------------------------------.
12216| yysetstate -- set current state (the top of the stack) to yystate. |
12217`--------------------------------------------------------------------*/
12218yysetstate:
12219 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12220 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12221 YY_IGNORE_USELESS_CAST_BEGIN
12222 *yyssp = YY_CAST (yy_state_t, yystate);
12223 YY_IGNORE_USELESS_CAST_END
12224 YY_STACK_PRINT (yyss, yyssp, p);
12225
12226 if (yyss + yystacksize - 1 <= yyssp)
12227#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12228 YYNOMEM;
12229#else
12230 {
12231 /* Get the current used size of the three stacks, in elements. */
12232 YYPTRDIFF_T yysize = yyssp - yyss + 1;
12233
12234# if defined yyoverflow
12235 {
12236 /* Give user a chance to reallocate the stack. Use copies of
12237 these so that the &'s don't force the real ones into
12238 memory. */
12239 yy_state_t *yyss1 = yyss;
12240 YYSTYPE *yyvs1 = yyvs;
12241 YYLTYPE *yyls1 = yyls;
12242
12243 /* Each stack pointer address is followed by the size of the
12244 data in use in that stack, in bytes. This used to be a
12245 conditional around just the two extra args, but that might
12246 be undefined if yyoverflow is a macro. */
12247 yyoverflow (YY_("memory exhausted"),
12248 &yyss1, yysize * YYSIZEOF (*yyssp),
12249 &yyvs1, yysize * YYSIZEOF (*yyvsp),
12250 &yyls1, yysize * YYSIZEOF (*yylsp),
12251 &yystacksize);
12252 yyss = yyss1;
12253 yyvs = yyvs1;
12254 yyls = yyls1;
12255 }
12256# else /* defined YYSTACK_RELOCATE */
12257 /* Extend the stack our own way. */
12258 if (YYMAXDEPTH <= yystacksize)
12259 YYNOMEM;
12260 yystacksize *= 2;
12261 if (YYMAXDEPTH < yystacksize)
12262 yystacksize = YYMAXDEPTH;
12263
12264 {
12265 yy_state_t *yyss1 = yyss;
12266 union yyalloc *yyptr =
12267 YY_CAST (union yyalloc *,
12268 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12269 if (! yyptr)
12270 YYNOMEM;
12271 YYSTACK_RELOCATE (yyss_alloc, yyss);
12272 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12273 YYSTACK_RELOCATE (yyls_alloc, yyls);
12274# undef YYSTACK_RELOCATE
12275 if (yyss1 != yyssa)
12276 YYSTACK_FREE (yyss1);
12277 }
12278# endif
12279
12280 yyssp = yyss + yysize - 1;
12281 yyvsp = yyvs + yysize - 1;
12282 yylsp = yyls + yysize - 1;
12283
12284 YY_IGNORE_USELESS_CAST_BEGIN
12285 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12286 YY_CAST (long, yystacksize)));
12287 YY_IGNORE_USELESS_CAST_END
12288
12289 if (yyss + yystacksize - 1 <= yyssp)
12290 YYABORT;
12291 }
12292#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12293
12294
12295 if (yystate == YYFINAL)
12296 YYACCEPT;
12297
12298 goto yybackup;
12299
12300
12301/*-----------.
12302| yybackup. |
12303`-----------*/
12304yybackup:
12305 /* Do appropriate processing given the current state. Read a
12306 lookahead token if we need one and don't already have one. */
12307
12308 /* First try to decide what to do without reference to lookahead token. */
12309 yyn = yypact[yystate];
12310 if (yypact_value_is_default (yyn))
12311 goto yydefault;
12312
12313 /* Not known => get a lookahead token if don't already have one. */
12314
12315 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12316 if (yychar == YYEMPTY)
12317 {
12318 YYDPRINTF ((stderr, "Reading a token\n"));
12319 yychar = yylex (&yylval, &yylloc, p);
12320 }
12321
12322 if (yychar <= END_OF_INPUT)
12323 {
12324 yychar = END_OF_INPUT;
12325 yytoken = YYSYMBOL_YYEOF;
12326 YYDPRINTF ((stderr, "Now at end of input.\n"));
12327 }
12328 else if (yychar == YYerror)
12329 {
12330 /* The scanner already issued an error message, process directly
12331 to error recovery. But do not keep the error token as
12332 lookahead, it is too special and may lead us to an endless
12333 loop in error recovery. */
12334 yychar = YYUNDEF;
12335 yytoken = YYSYMBOL_YYerror;
12336 yyerror_range[1] = yylloc;
12337 goto yyerrlab1;
12338 }
12339 else
12340 {
12341 yytoken = YYTRANSLATE (yychar);
12342 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12343 }
12344
12345 /* If the proper action on seeing token YYTOKEN is to reduce or to
12346 detect an error, take that action. */
12347 yyn += yytoken;
12348 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12349 goto yydefault;
12350 yyn = yytable[yyn];
12351 if (yyn <= 0)
12352 {
12353 if (yytable_value_is_error (yyn))
12354 goto yyerrlab;
12355 yyn = -yyn;
12356 goto yyreduce;
12357 }
12358
12359 /* Count tokens shifted since error; after three, turn off error
12360 status. */
12361 if (yyerrstatus)
12362 yyerrstatus--;
12363
12364 /* Shift the lookahead token. */
12365 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12366 yystate = yyn;
12367 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12368 *++yyvsp = yylval;
12369 YY_IGNORE_MAYBE_UNINITIALIZED_END
12370 *++yylsp = yylloc;
12371 /* %after-shift code. */
12372#line 2681 "parse.y"
12373 {after_shift(p);}
12374#line 12375 "parse.c"
12375
12376
12377 /* Discard the shifted token. */
12378 yychar = YYEMPTY;
12379 goto yynewstate;
12380
12381
12382/*-----------------------------------------------------------.
12383| yydefault -- do the default action for the current state. |
12384`-----------------------------------------------------------*/
12385yydefault:
12386 yyn = yydefact[yystate];
12387 if (yyn == 0)
12388 goto yyerrlab;
12389 goto yyreduce;
12390
12391
12392/*-----------------------------.
12393| yyreduce -- do a reduction. |
12394`-----------------------------*/
12395yyreduce:
12396 /* yyn is the number of a rule to reduce with. */
12397 yylen = yyr2[yyn];
12398
12399 /* If YYLEN is nonzero, implement the default value of the action:
12400 '$$ = $1'.
12401
12402 Otherwise, the following line sets YYVAL to garbage.
12403 This behavior is undocumented and Bison
12404 users should not rely upon it. Assigning to YYVAL
12405 unconditionally makes the parser a bit smaller, and it avoids a
12406 GCC warning that YYVAL may be used uninitialized. */
12407 yyval = yyvsp[1-yylen];
12408 /* %before-reduce function. */
12409#line 2682 "parse.y"
12410 {before_reduce(yylen, p);}
12411#line 12412 "parse.c"
12412
12413
12414 /* Default location. */
12415 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12416 yyerror_range[1] = yyloc;
12417 YY_REDUCE_PRINT (yyn, p);
12418 switch (yyn)
12419 {
12420 case 2: /* $@1: %empty */
12421#line 3186 "parse.y"
12422 {
12423 SET_LEX_STATE(EXPR_BEG);
12424 local_push(p, ifndef_ripper(1)+0);
12425 /* jumps are possible in the top-level loop. */
12426 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12427 }
12428#line 12429 "parse.c"
12429 break;
12430
12431 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12432#line 3001 "parse.y"
12433 {
12434 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12435 }
12436#line 12437 "parse.c"
12437 break;
12438
12439 case 6: /* program: $@1 compstmt_top_stmts */
12440#line 3193 "parse.y"
12441 {
12442 if ((yyvsp[0].node) && !compile_for_eval) {
12443 NODE *node = (yyvsp[0].node);
12444 /* last expression should not be void */
12445 if (nd_type_p(node, NODE_BLOCK)) {
12446 while (RNODE_BLOCK(node)->nd_next) {
12447 node = RNODE_BLOCK(node)->nd_next;
12448 }
12449 node = RNODE_BLOCK(node)->nd_head;
12450 }
12451 node = remove_begin(node);
12452 void_expr(p, node);
12453 }
12454 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12455 /*% ripper[final]: program!($:2) %*/
12456 local_pop(p);
12457 }
12458#line 12459 "parse.c"
12459 break;
12460
12461 case 7: /* top_stmts: none */
12462#line 3213 "parse.y"
12463 {
12464 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12465 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12466 }
12467#line 12468 "parse.c"
12468 break;
12469
12470 case 8: /* top_stmts: top_stmt */
12471#line 3218 "parse.y"
12472 {
12473 (yyval.node) = newline_node((yyvsp[0].node));
12474 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12475 }
12476#line 12477 "parse.c"
12477 break;
12478
12479 case 9: /* top_stmts: top_stmts terms top_stmt */
12480#line 3223 "parse.y"
12481 {
12482 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12483 /*% ripper: stmts_add!($:1, $:3) %*/
12484 }
12485#line 12486 "parse.c"
12486 break;
12487
12488 case 10: /* top_stmt: stmt */
12489#line 3230 "parse.y"
12490 {
12491 clear_block_exit(p, true);
12492 (yyval.node) = (yyvsp[0].node);
12493 }
12494#line 12495 "parse.c"
12495 break;
12496
12497 case 11: /* top_stmt: "'BEGIN'" begin_block */
12498#line 3235 "parse.y"
12499 {
12500 (yyval.node) = (yyvsp[0].node);
12501 /*% ripper: $:2 %*/
12502 }
12503#line 12504 "parse.c"
12504 break;
12505
12506 case 12: /* block_open: '{' */
12507#line 3241 "parse.y"
12508 {(yyval.node_exits) = init_block_exit(p);}
12509#line 12510 "parse.c"
12510 break;
12511
12512 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12513#line 3244 "parse.y"
12514 {
12515 restore_block_exit(p, (yyvsp[-2].node_exits));
12516 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12517 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12518 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12519 /*% ripper: BEGIN!($:compstmt) %*/
12520 }
12521#line 12522 "parse.c"
12522 break;
12523
12524 case 14: /* compstmt_stmts: stmts option_terms */
12525#line 3001 "parse.y"
12526 {
12527 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12528 }
12529#line 12530 "parse.c"
12530 break;
12531
12532 case 15: /* $@2: %empty */
12533#line 3257 "parse.y"
12534 {
12535 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12536 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12537 }
12538#line 12539 "parse.c"
12539 break;
12540
12541 case 16: /* $@3: %empty */
12542#line 3262 "parse.y"
12543 {
12544 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12545 }
12546#line 12547 "parse.c"
12547 break;
12548
12549 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12550#line 3266 "parse.y"
12551 {
12552 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12553 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12554 }
12555#line 12556 "parse.c"
12556 break;
12557
12558 case 18: /* $@4: %empty */
12559#line 3273 "parse.y"
12560 {
12561 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12562 }
12563#line 12564 "parse.c"
12564 break;
12565
12566 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12567#line 3277 "parse.y"
12568 {
12569 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12570 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12571 }
12572#line 12573 "parse.c"
12573 break;
12574
12575 case 20: /* stmts: none */
12576#line 3284 "parse.y"
12577 {
12578 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12579 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12580 }
12581#line 12582 "parse.c"
12582 break;
12583
12584 case 21: /* stmts: stmt_or_begin */
12585#line 3289 "parse.y"
12586 {
12587 (yyval.node) = newline_node((yyvsp[0].node));
12588 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12589 }
12590#line 12591 "parse.c"
12591 break;
12592
12593 case 22: /* stmts: stmts terms stmt_or_begin */
12594#line 3294 "parse.y"
12595 {
12596 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12597 /*% ripper: stmts_add!($:1, $:3) %*/
12598 }
12599#line 12600 "parse.c"
12600 break;
12601
12602 case 24: /* $@5: %empty */
12603#line 3302 "parse.y"
12604 {
12605 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12606 }
12607#line 12608 "parse.c"
12608 break;
12609
12610 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12611#line 3306 "parse.y"
12612 {
12613 (yyval.node) = (yyvsp[0].node);
12614 }
12615#line 12616 "parse.c"
12616 break;
12617
12618 case 26: /* allow_exits: %empty */
12619#line 3311 "parse.y"
12620 {(yyval.node_exits) = allow_block_exit(p);}
12621#line 12622 "parse.c"
12622 break;
12623
12624 case 27: /* k_END: "'END'" lex_ctxt */
12625#line 3314 "parse.y"
12626 {
12627 if (p->ctxt.in_def) {
12628 rb_warn0("END in method; use at_exit");
12629 }
12630 (yyval.ctxt) = (yyvsp[0].ctxt);
12631 p->ctxt.in_rescue = before_rescue;
12632 /*% ripper: $:2 %*/
12633 }
12634#line 12635 "parse.c"
12635 break;
12636
12637 case 28: /* $@6: %empty */
12638#line 3323 "parse.y"
12639 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12640#line 12641 "parse.c"
12641 break;
12642
12643 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12644#line 3324 "parse.y"
12645 {
12646 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12647 /*% ripper: alias!($:new, $:old) %*/
12648 }
12649#line 12650 "parse.c"
12650 break;
12651
12652 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12653#line 3329 "parse.y"
12654 {
12655 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12656 /*% ripper: var_alias!($:new, $:old) %*/
12657 }
12658#line 12659 "parse.c"
12659 break;
12660
12661 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12662#line 3334 "parse.y"
12663 {
12664 char buf[2];
12665 buf[0] = '$';
12666 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12667 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12668 /*% ripper: var_alias!($:new, $:old) %*/
12669 }
12670#line 12671 "parse.c"
12671 break;
12672
12673 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12674#line 3342 "parse.y"
12675 {
12676 static const char mesg[] = "can't make alias for the number variables";
12677 /*%%%*/
12678 yyerror1(&(yylsp[0]), mesg);
12679 /*% %*/
12680 (yyval.node) = NEW_ERROR(&(yyloc));
12681 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12682 }
12683#line 12684 "parse.c"
12684 break;
12685
12686 case 33: /* stmt: "'undef'" undef_list */
12687#line 3351 "parse.y"
12688 {
12689 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12690 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12691 (yyval.node) = (yyvsp[0].node);
12692 /*% ripper: undef!($:list) %*/
12693 }
12694#line 12695 "parse.c"
12695 break;
12696
12697 case 34: /* stmt: stmt "'if' modifier" expr_value */
12698#line 3358 "parse.y"
12699 {
12700 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12701 fixpos((yyval.node), (yyvsp[0].node));
12702 /*% ripper: if_mod!($:cond, $:body) %*/
12703 }
12704#line 12705 "parse.c"
12705 break;
12706
12707 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12708#line 3364 "parse.y"
12709 {
12710 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12711 fixpos((yyval.node), (yyvsp[0].node));
12712 /*% ripper: unless_mod!($:cond, $:body) %*/
12713 }
12714#line 12715 "parse.c"
12715 break;
12716
12717 case 36: /* stmt: stmt "'while' modifier" expr_value */
12718#line 3370 "parse.y"
12719 {
12720 clear_block_exit(p, false);
12721 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12722 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12723 }
12724 else {
12725 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12726 }
12727 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12728 }
12729#line 12730 "parse.c"
12730 break;
12731
12732 case 37: /* stmt: stmt "'until' modifier" expr_value */
12733#line 3381 "parse.y"
12734 {
12735 clear_block_exit(p, 0);
12736 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12737 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12738 }
12739 else {
12740 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12741 }
12742 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12743 }
12744#line 12745 "parse.c"
12745 break;
12746
12747 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12748#line 3392 "parse.y"
12749 {
12750 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12751 NODE *resq;
12752 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12753 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12754 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12755 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12756 }
12757#line 12758 "parse.c"
12758 break;
12759
12760 case 39: /* stmt: k_END block_open compstmt_stmts '}' */
12761#line 3401 "parse.y"
12762 {
12763 clear_block_exit(p, true);
12764 restore_block_exit(p, (yyvsp[-2].node_exits));
12765 p->ctxt = (yyvsp[-3].ctxt);
12766 {
12767 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12768 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12769 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12770 }
12771 /*% ripper: END!($:body) %*/
12772 }
12773#line 12774 "parse.c"
12774 break;
12775
12776 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12777#line 3414 "parse.y"
12778 {
12779 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12780 /*% ripper: massign!($:lhs, $:rhs) %*/
12781 }
12782#line 12783 "parse.c"
12783 break;
12784
12785 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12786#line 2936 "parse.y"
12787 {
12788 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12789 /*% ripper: assign!($:1, $:4) %*/
12790 }
12791#line 12792 "parse.c"
12792 break;
12793
12794 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12795#line 3421 "parse.y"
12796 {
12797 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12798 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12799 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12800 loc.beg_pos = (yylsp[-3]).beg_pos;
12801 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12802 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12803 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12804 }
12805#line 12806 "parse.c"
12806 break;
12807
12808 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12809#line 3431 "parse.y"
12810 {
12811 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12812 /*% ripper: massign!($:lhs, $:rhs) %*/
12813 }
12814#line 12815 "parse.c"
12815 break;
12816
12817 case 47: /* stmt: error */
12818#line 3437 "parse.y"
12819 {
12820 (void)yynerrs;
12821 (yyval.node) = NEW_ERROR(&(yyloc));
12822 }
12823#line 12824 "parse.c"
12824 break;
12825
12826 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12827#line 2936 "parse.y"
12828 {
12829 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12830 /*% ripper: assign!($:1, $:4) %*/
12831 }
12832#line 12833 "parse.c"
12833 break;
12834
12835 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12836#line 3071 "parse.y"
12837 {
12838 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12839 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12840 }
12841#line 12842 "parse.c"
12842 break;
12843
12844 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12845#line 3076 "parse.y"
12846 {
12847 (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]));
12848 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12849 }
12850#line 12851 "parse.c"
12851 break;
12852
12853 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12854#line 3081 "parse.y"
12855 {
12856 (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]));
12857 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12858 }
12859#line 12860 "parse.c"
12860 break;
12861
12862 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12863#line 3086 "parse.y"
12864 {
12865 (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]));
12866 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12867 }
12868#line 12869 "parse.c"
12869 break;
12870
12871 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12872#line 3091 "parse.y"
12873 {
12874 (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]));
12875 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12876 }
12877#line 12878 "parse.c"
12878 break;
12879
12880 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12881#line 3096 "parse.y"
12882 {
12883 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12884 (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));
12885 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12886 }
12887#line 12888 "parse.c"
12888 break;
12889
12890 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12891#line 3102 "parse.y"
12892 {
12893 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12894 (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));
12895 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12896 }
12897#line 12898 "parse.c"
12898 break;
12899
12900 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12901#line 3108 "parse.y"
12902 {
12903 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12904 (yyval.node) = NEW_ERROR(&(yyloc));
12905 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12906 }
12907#line 12908 "parse.c"
12908 break;
12909
12910 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12911#line 2976 "parse.y"
12912 {
12913 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12914 restore_defun(p, (yyvsp[-3].node_def_temp));
12915 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12916 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12917 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12918 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12919 /*% ripper: def!($:head, $:args, $:$) %*/
12920 local_pop(p);
12921 }
12922#line 12923 "parse.c"
12923 break;
12924
12925 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12926#line 2987 "parse.y"
12927 {
12928 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12929 restore_defun(p, (yyvsp[-3].node_def_temp));
12930 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12931 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12932 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12933 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12934 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12935 local_pop(p);
12936 }
12937#line 12938 "parse.c"
12938 break;
12939
12940 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12941#line 3450 "parse.y"
12942 {
12943 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12944 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12945 /*% ripper: rescue_mod!($:1, $:4) %*/
12946 }
12947#line 12948 "parse.c"
12948 break;
12949
12950 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12951#line 3456 "parse.y"
12952 {
12953 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12954 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12955 }
12956#line 12957 "parse.c"
12957 break;
12958
12959 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12960#line 3464 "parse.y"
12961 {
12962 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12963 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12964 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12965 /*% ripper: rescue_mod!($:1, $:4) %*/
12966 }
12967#line 12968 "parse.c"
12968 break;
12969
12970 case 71: /* expr: expr "'and'" expr */
12971#line 3475 "parse.y"
12972 {
12973 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12974 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12975 }
12976#line 12977 "parse.c"
12977 break;
12978
12979 case 72: /* expr: expr "'or'" expr */
12980#line 3480 "parse.y"
12981 {
12982 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12983 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12984 }
12985#line 12986 "parse.c"
12986 break;
12987
12988 case 73: /* expr: "'not'" option_'\n' expr */
12989#line 3485 "parse.y"
12990 {
12991 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12992 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12993 }
12994#line 12995 "parse.c"
12995 break;
12996
12997 case 74: /* expr: '!' command_call */
12998#line 3490 "parse.y"
12999 {
13000 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13001 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
13002 }
13003#line 13004 "parse.c"
13004 break;
13005
13006 case 75: /* $@7: %empty */
13007#line 3495 "parse.y"
13008 {
13009 value_expr(p, (yyvsp[-1].node));
13010 }
13011#line 13012 "parse.c"
13012 break;
13013
13014 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
13015#line 3500 "parse.y"
13016 {
13017 pop_pktbl(p, (yyvsp[-1].tbl));
13018 pop_pvtbl(p, (yyvsp[-2].tbl));
13019 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
13020 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
13021 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
13022 (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);
13023 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
13024 }
13025#line 13026 "parse.c"
13026 break;
13027
13028 case 77: /* $@8: %empty */
13029#line 3510 "parse.y"
13030 {
13031 value_expr(p, (yyvsp[-1].node));
13032 }
13033#line 13034 "parse.c"
13034 break;
13035
13036 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
13037#line 3515 "parse.y"
13038 {
13039 pop_pktbl(p, (yyvsp[-1].tbl));
13040 pop_pvtbl(p, (yyvsp[-2].tbl));
13041 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
13042 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
13043 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
13044 (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);
13045 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
13046 }
13047#line 13048 "parse.c"
13048 break;
13049
13050 case 80: /* def_name: fname */
13051#line 3528 "parse.y"
13052 {
13053 numparam_name(p, (yyvsp[0].id));
13054 local_push(p, 0);
13055 p->ctxt.in_def = 1;
13056 p->ctxt.in_rescue = before_rescue;
13057 p->ctxt.cant_return = 0;
13058 (yyval.id) = (yyvsp[0].id);
13059 }
13060#line 13061 "parse.c"
13061 break;
13062
13063 case 81: /* defn_head: k_def def_name */
13064#line 3539 "parse.y"
13065 {
13066 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
13067 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
13068 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
13069 /*% ripper: $:def_name %*/
13070 }
13071#line 13072 "parse.c"
13072 break;
13073
13074 case 82: /* $@9: %empty */
13075#line 3548 "parse.y"
13076 {
13077 SET_LEX_STATE(EXPR_FNAME);
13078 }
13079#line 13080 "parse.c"
13080 break;
13081
13082 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
13083#line 3552 "parse.y"
13084 {
13085 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
13086 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
13087 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
13088 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
13089 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
13090 }
13091#line 13092 "parse.c"
13092 break;
13093
13094 case 84: /* value_expr_expr: expr */
13095#line 3171 "parse.y"
13096 {
13097 value_expr(p, (yyvsp[0].node));
13098 (yyval.node) = (yyvsp[0].node);
13099 }
13100#line 13101 "parse.c"
13101 break;
13102
13103 case 86: /* expr_value: error */
13104#line 3563 "parse.y"
13105 {
13106 (yyval.node) = NEW_ERROR(&(yyloc));
13107 }
13108#line 13109 "parse.c"
13109 break;
13110
13111 case 87: /* $@10: %empty */
13112#line 3568 "parse.y"
13113 {COND_PUSH(1);}
13114#line 13115 "parse.c"
13115 break;
13116
13117 case 88: /* $@11: %empty */
13118#line 3568 "parse.y"
13119 {COND_POP();}
13120#line 13121 "parse.c"
13121 break;
13122
13123 case 89: /* expr_value_do: $@10 expr_value do $@11 */
13124#line 3569 "parse.y"
13125 {
13126 (yyval.node) = (yyvsp[-2].node);
13127 /*% ripper: $:2 %*/
13128 }
13129#line 13130 "parse.c"
13130 break;
13131
13132 case 92: /* value_expr_command_call: command_call */
13133#line 3171 "parse.y"
13134 {
13135 value_expr(p, (yyvsp[0].node));
13136 (yyval.node) = (yyvsp[0].node);
13137 }
13138#line 13139 "parse.c"
13139 break;
13140
13141 case 95: /* block_command: block_call call_op2 operation2 command_args */
13142#line 3584 "parse.y"
13143 {
13144 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13145 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
13146 }
13147#line 13148 "parse.c"
13148 break;
13149
13150 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
13151#line 3591 "parse.y"
13152 {
13153 (yyval.node) = (yyvsp[-1].node);
13154 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
13155 /*% ripper: $:2 %*/
13156 }
13157#line 13158 "parse.c"
13158 break;
13159
13160 case 97: /* fcall: "local variable or method" */
13161#line 3599 "parse.y"
13162 {
13163 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13164 /*% ripper: $:1 %*/
13165 }
13166#line 13167 "parse.c"
13167 break;
13168
13169 case 98: /* fcall: "constant" */
13170#line 3599 "parse.y"
13171 {
13172 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13173 /*% ripper: $:1 %*/
13174 }
13175#line 13176 "parse.c"
13176 break;
13177
13178 case 99: /* fcall: "method" */
13179#line 3599 "parse.y"
13180 {
13181 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13182 /*% ripper: $:1 %*/
13183 }
13184#line 13185 "parse.c"
13185 break;
13186
13187 case 100: /* command: fcall command_args */
13188#line 3606 "parse.y"
13189 {
13190 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
13191 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
13192 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
13193 /*% ripper: command!($:1, $:2) %*/
13194 }
13195#line 13196 "parse.c"
13196 break;
13197
13198 case 101: /* command: fcall command_args cmd_brace_block */
13199#line 3613 "parse.y"
13200 {
13201 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
13202 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
13203 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
13204 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
13205 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
13206 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
13207 }
13208#line 13209 "parse.c"
13209 break;
13210
13211 case 102: /* command: primary_value call_op operation2 command_args */
13212#line 3622 "parse.y"
13213 {
13214 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13215 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13216 }
13217#line 13218 "parse.c"
13218 break;
13219
13220 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
13221#line 3627 "parse.y"
13222 {
13223 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13224 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13225 }
13226#line 13227 "parse.c"
13227 break;
13228
13229 case 104: /* command: primary_value "::" operation2 command_args */
13230#line 3632 "parse.y"
13231 {
13232 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13233 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13234 }
13235#line 13236 "parse.c"
13236 break;
13237
13238 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
13239#line 3637 "parse.y"
13240 {
13241 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13242 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13243 }
13244#line 13245 "parse.c"
13245 break;
13246
13247 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
13248#line 3642 "parse.y"
13249 {
13250 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
13251 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
13252 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
13253 }
13254#line 13255 "parse.c"
13255 break;
13256
13257 case 107: /* command: "'super'" command_args */
13258#line 3648 "parse.y"
13259 {
13260 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13261 fixpos((yyval.node), (yyvsp[0].node));
13262 /*% ripper: super!($:2) %*/
13263 }
13264#line 13265 "parse.c"
13265 break;
13266
13267 case 108: /* command: k_yield command_args */
13268#line 3654 "parse.y"
13269 {
13270 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13271 fixpos((yyval.node), (yyvsp[0].node));
13272 /*% ripper: yield!($:2) %*/
13273 }
13274#line 13275 "parse.c"
13275 break;
13276
13277 case 109: /* command: k_return_arg call_args */
13278#line 3660 "parse.y"
13279 {
13280 CMDARG_POP();
13281 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13282 /*% ripper: return!($:2) %*/
13283 }
13284#line 13285 "parse.c"
13285 break;
13286
13287 case 110: /* command: k_break_arg call_args */
13288#line 3666 "parse.y"
13289 {
13290 CMDARG_POP();
13291 NODE *args = 0;
13292 args = ret_args(p, (yyvsp[0].node));
13293 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13294 /*% ripper: break!($:2) %*/
13295 }
13296#line 13297 "parse.c"
13297 break;
13298
13299 case 111: /* command: k_next_arg call_args */
13300#line 3674 "parse.y"
13301 {
13302 CMDARG_POP();
13303 NODE *args = 0;
13304 args = ret_args(p, (yyvsp[0].node));
13305 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13306 /*% ripper: next!($:2) %*/
13307 }
13308#line 13309 "parse.c"
13309 break;
13310
13311 case 113: /* mlhs: "(" mlhs_inner rparen */
13312#line 3685 "parse.y"
13313 {
13314 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13315 /*% ripper: mlhs_paren!($:2) %*/
13316 }
13317#line 13318 "parse.c"
13318 break;
13319
13320 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13321#line 3693 "parse.y"
13322 {
13323 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13324 /*% ripper: mlhs_paren!($:2) %*/
13325 }
13326#line 13327 "parse.c"
13327 break;
13328
13329 case 116: /* mlhs_basic: mlhs_head */
13330#line 3700 "parse.y"
13331 {
13332 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13333 /*% ripper: $:1 %*/
13334 }
13335#line 13336 "parse.c"
13336 break;
13337
13338 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13339#line 3705 "parse.y"
13340 {
13341 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13342 /*% ripper: mlhs_add!($:1, $:2) %*/
13343 }
13344#line 13345 "parse.c"
13345 break;
13346
13347 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13348#line 3710 "parse.y"
13349 {
13350 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13351 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13352 }
13353#line 13354 "parse.c"
13354 break;
13355
13356 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13357#line 3058 "parse.y"
13358 {
13359 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13360 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13361 }
13362#line 13363 "parse.c"
13363 break;
13364
13365 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13366#line 3063 "parse.y"
13367 {
13368 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13369 /*% ripper: mlhs_add!($:1, $:3) %*/
13370 }
13371#line 13372 "parse.c"
13372 break;
13373
13374 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13375#line 3715 "parse.y"
13376 {
13377 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13378 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13379 }
13380#line 13381 "parse.c"
13381 break;
13382
13383 case 122: /* mlhs_basic: mlhs_head "*" */
13384#line 3720 "parse.y"
13385 {
13386 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13387 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13388 }
13389#line 13390 "parse.c"
13390 break;
13391
13392 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13393#line 3725 "parse.y"
13394 {
13395 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13396 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13397 }
13398#line 13399 "parse.c"
13399 break;
13400
13401 case 124: /* mlhs_basic: "*" mlhs_node */
13402#line 3730 "parse.y"
13403 {
13404 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13405 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13406 }
13407#line 13408 "parse.c"
13408 break;
13409
13410 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13411#line 3735 "parse.y"
13412 {
13413 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13414 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13415 }
13416#line 13417 "parse.c"
13417 break;
13418
13419 case 126: /* mlhs_basic: "*" */
13420#line 3740 "parse.y"
13421 {
13422 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13423 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13424 }
13425#line 13426 "parse.c"
13426 break;
13427
13428 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13429#line 3745 "parse.y"
13430 {
13431 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13432 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13433 }
13434#line 13435 "parse.c"
13435 break;
13436
13437 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13438#line 3753 "parse.y"
13439 {
13440 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13441 /*% ripper: mlhs_paren!($:2) %*/
13442 }
13443#line 13444 "parse.c"
13444 break;
13445
13446 case 130: /* mlhs_head: mlhs_item ',' */
13447#line 3760 "parse.y"
13448 {
13449 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13450 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13451 }
13452#line 13453 "parse.c"
13453 break;
13454
13455 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13456#line 3765 "parse.y"
13457 {
13458 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13459 /*% ripper: mlhs_add!($:1, $:2) %*/
13460 }
13461#line 13462 "parse.c"
13462 break;
13463
13464 case 132: /* mlhs_node: user_variable */
13465#line 3773 "parse.y"
13466 {
13467 /*% ripper: var_field!($:1) %*/
13468 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13469 }
13470#line 13471 "parse.c"
13471 break;
13472
13473 case 133: /* mlhs_node: keyword_variable */
13474#line 3773 "parse.y"
13475 {
13476 /*% ripper: var_field!($:1) %*/
13477 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13478 }
13479#line 13480 "parse.c"
13480 break;
13481
13482 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13483#line 3778 "parse.y"
13484 {
13485 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13486 /*% ripper: aref_field!($:1, $:3) %*/
13487 }
13488#line 13489 "parse.c"
13489 break;
13490
13491 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13492#line 3783 "parse.y"
13493 {
13494 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13495 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13496 /*% ripper: field!($:1, $:2, $:3) %*/
13497 }
13498#line 13499 "parse.c"
13499 break;
13500
13501 case 136: /* mlhs_node: primary_value call_op "constant" */
13502#line 3783 "parse.y"
13503 {
13504 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13505 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13506 /*% ripper: field!($:1, $:2, $:3) %*/
13507 }
13508#line 13509 "parse.c"
13509 break;
13510
13511 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13512#line 3789 "parse.y"
13513 {
13514 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13515 /*% ripper: const_path_field!($:1, $:3) %*/
13516 }
13517#line 13518 "parse.c"
13518 break;
13519
13520 case 138: /* mlhs_node: primary_value "::" "constant" */
13521#line 3794 "parse.y"
13522 {
13523 /*% ripper: const_path_field!($:1, $:3) %*/
13524 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13525 }
13526#line 13527 "parse.c"
13527 break;
13528
13529 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13530#line 3799 "parse.y"
13531 {
13532 /*% ripper: top_const_field!($:2) %*/
13533 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13534 }
13535#line 13536 "parse.c"
13536 break;
13537
13538 case 140: /* mlhs_node: backref */
13539#line 3804 "parse.y"
13540 {
13541 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13542 (yyval.node) = NEW_ERROR(&(yyloc));
13543 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13544 }
13545#line 13546 "parse.c"
13546 break;
13547
13548 case 141: /* lhs: user_variable */
13549#line 3812 "parse.y"
13550 {
13551 /*% ripper: var_field!($:1) %*/
13552 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13553 }
13554#line 13555 "parse.c"
13555 break;
13556
13557 case 142: /* lhs: keyword_variable */
13558#line 3812 "parse.y"
13559 {
13560 /*% ripper: var_field!($:1) %*/
13561 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13562 }
13563#line 13564 "parse.c"
13564 break;
13565
13566 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13567#line 3817 "parse.y"
13568 {
13569 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13570 /*% ripper: aref_field!($:1, $:3) %*/
13571 }
13572#line 13573 "parse.c"
13573 break;
13574
13575 case 144: /* lhs: primary_value call_op "local variable or method" */
13576#line 3822 "parse.y"
13577 {
13578 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13579 /*% ripper: field!($:1, $:2, $:3) %*/
13580 }
13581#line 13582 "parse.c"
13582 break;
13583
13584 case 145: /* lhs: primary_value call_op "constant" */
13585#line 3822 "parse.y"
13586 {
13587 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13588 /*% ripper: field!($:1, $:2, $:3) %*/
13589 }
13590#line 13591 "parse.c"
13591 break;
13592
13593 case 146: /* lhs: primary_value "::" "local variable or method" */
13594#line 3827 "parse.y"
13595 {
13596 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13597 /*% ripper: field!($:1, $:2, $:3) %*/
13598 }
13599#line 13600 "parse.c"
13600 break;
13601
13602 case 147: /* lhs: primary_value "::" "constant" */
13603#line 3832 "parse.y"
13604 {
13605 /*% ripper: const_path_field!($:1, $:3) %*/
13606 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13607 }
13608#line 13609 "parse.c"
13609 break;
13610
13611 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13612#line 3837 "parse.y"
13613 {
13614 /*% ripper: top_const_field!($:2) %*/
13615 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13616 }
13617#line 13618 "parse.c"
13618 break;
13619
13620 case 149: /* lhs: backref */
13621#line 3842 "parse.y"
13622 {
13623 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13624 (yyval.node) = NEW_ERROR(&(yyloc));
13625 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13626 }
13627#line 13628 "parse.c"
13628 break;
13629
13630 case 150: /* cname: "local variable or method" */
13631#line 3850 "parse.y"
13632 {
13633 static const char mesg[] = "class/module name must be CONSTANT";
13634 /*%%%*/
13635 yyerror1(&(yylsp[0]), mesg);
13636 /*% %*/
13637 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13638 }
13639#line 13640 "parse.c"
13640 break;
13641
13642 case 152: /* cpath: ":: at EXPR_BEG" cname */
13643#line 3861 "parse.y"
13644 {
13645 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13646 /*% ripper: top_const_ref!($:2) %*/
13647 }
13648#line 13649 "parse.c"
13649 break;
13650
13651 case 153: /* cpath: cname */
13652#line 3866 "parse.y"
13653 {
13654 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13655 /*% ripper: const_ref!($:1) %*/
13656 }
13657#line 13658 "parse.c"
13658 break;
13659
13660 case 154: /* cpath: primary_value "::" cname */
13661#line 3871 "parse.y"
13662 {
13663 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13664 /*% ripper: const_path_ref!($:1, $:3) %*/
13665 }
13666#line 13667 "parse.c"
13667 break;
13668
13669 case 158: /* fname: op */
13670#line 3879 "parse.y"
13671 {
13672 SET_LEX_STATE(EXPR_ENDFN);
13673 (yyval.id) = (yyvsp[0].id);
13674 }
13675#line 13676 "parse.c"
13676 break;
13677
13678 case 160: /* fitem: fname */
13679#line 3887 "parse.y"
13680 {
13681 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13682 /*% ripper: symbol_literal!($:1) %*/
13683 }
13684#line 13685 "parse.c"
13685 break;
13686
13687 case 162: /* undef_list: fitem */
13688#line 3895 "parse.y"
13689 {
13690 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13691 /*% ripper: rb_ary_new3(1, $:1) %*/
13692 }
13693#line 13694 "parse.c"
13694 break;
13695
13696 case 163: /* $@12: %empty */
13697#line 3899 "parse.y"
13698 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13699#line 13700 "parse.c"
13700 break;
13701
13702 case 164: /* undef_list: undef_list ',' $@12 fitem */
13703#line 3900 "parse.y"
13704 {
13705 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13706 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13707 /*% ripper: rb_ary_push($:1, $:4) %*/
13708 }
13709#line 13710 "parse.c"
13710 break;
13711
13712 case 165: /* op: '|' */
13713#line 3907 "parse.y"
13714 { (yyval.id) = '|'; }
13715#line 13716 "parse.c"
13716 break;
13717
13718 case 166: /* op: '^' */
13719#line 3908 "parse.y"
13720 { (yyval.id) = '^'; }
13721#line 13722 "parse.c"
13722 break;
13723
13724 case 167: /* op: '&' */
13725#line 3909 "parse.y"
13726 { (yyval.id) = '&'; }
13727#line 13728 "parse.c"
13728 break;
13729
13730 case 168: /* op: "<=>" */
13731#line 3910 "parse.y"
13732 { (yyval.id) = tCMP; }
13733#line 13734 "parse.c"
13734 break;
13735
13736 case 169: /* op: "==" */
13737#line 3911 "parse.y"
13738 { (yyval.id) = tEQ; }
13739#line 13740 "parse.c"
13740 break;
13741
13742 case 170: /* op: "===" */
13743#line 3912 "parse.y"
13744 { (yyval.id) = tEQQ; }
13745#line 13746 "parse.c"
13746 break;
13747
13748 case 171: /* op: "=~" */
13749#line 3913 "parse.y"
13750 { (yyval.id) = tMATCH; }
13751#line 13752 "parse.c"
13752 break;
13753
13754 case 172: /* op: "!~" */
13755#line 3914 "parse.y"
13756 { (yyval.id) = tNMATCH; }
13757#line 13758 "parse.c"
13758 break;
13759
13760 case 173: /* op: '>' */
13761#line 3915 "parse.y"
13762 { (yyval.id) = '>'; }
13763#line 13764 "parse.c"
13764 break;
13765
13766 case 174: /* op: ">=" */
13767#line 3916 "parse.y"
13768 { (yyval.id) = tGEQ; }
13769#line 13770 "parse.c"
13770 break;
13771
13772 case 175: /* op: '<' */
13773#line 3917 "parse.y"
13774 { (yyval.id) = '<'; }
13775#line 13776 "parse.c"
13776 break;
13777
13778 case 176: /* op: "<=" */
13779#line 3918 "parse.y"
13780 { (yyval.id) = tLEQ; }
13781#line 13782 "parse.c"
13782 break;
13783
13784 case 177: /* op: "!=" */
13785#line 3919 "parse.y"
13786 { (yyval.id) = tNEQ; }
13787#line 13788 "parse.c"
13788 break;
13789
13790 case 178: /* op: "<<" */
13791#line 3920 "parse.y"
13792 { (yyval.id) = tLSHFT; }
13793#line 13794 "parse.c"
13794 break;
13795
13796 case 179: /* op: ">>" */
13797#line 3921 "parse.y"
13798 { (yyval.id) = tRSHFT; }
13799#line 13800 "parse.c"
13800 break;
13801
13802 case 180: /* op: '+' */
13803#line 3922 "parse.y"
13804 { (yyval.id) = '+'; }
13805#line 13806 "parse.c"
13806 break;
13807
13808 case 181: /* op: '-' */
13809#line 3923 "parse.y"
13810 { (yyval.id) = '-'; }
13811#line 13812 "parse.c"
13812 break;
13813
13814 case 182: /* op: '*' */
13815#line 3924 "parse.y"
13816 { (yyval.id) = '*'; }
13817#line 13818 "parse.c"
13818 break;
13819
13820 case 183: /* op: "*" */
13821#line 3925 "parse.y"
13822 { (yyval.id) = '*'; }
13823#line 13824 "parse.c"
13824 break;
13825
13826 case 184: /* op: '/' */
13827#line 3926 "parse.y"
13828 { (yyval.id) = '/'; }
13829#line 13830 "parse.c"
13830 break;
13831
13832 case 185: /* op: '%' */
13833#line 3927 "parse.y"
13834 { (yyval.id) = '%'; }
13835#line 13836 "parse.c"
13836 break;
13837
13838 case 186: /* op: "**" */
13839#line 3928 "parse.y"
13840 { (yyval.id) = tPOW; }
13841#line 13842 "parse.c"
13842 break;
13843
13844 case 187: /* op: "**arg" */
13845#line 3929 "parse.y"
13846 { (yyval.id) = tDSTAR; }
13847#line 13848 "parse.c"
13848 break;
13849
13850 case 188: /* op: '!' */
13851#line 3930 "parse.y"
13852 { (yyval.id) = '!'; }
13853#line 13854 "parse.c"
13854 break;
13855
13856 case 189: /* op: '~' */
13857#line 3931 "parse.y"
13858 { (yyval.id) = '~'; }
13859#line 13860 "parse.c"
13860 break;
13861
13862 case 190: /* op: "unary+" */
13863#line 3932 "parse.y"
13864 { (yyval.id) = tUPLUS; }
13865#line 13866 "parse.c"
13866 break;
13867
13868 case 191: /* op: "unary-" */
13869#line 3933 "parse.y"
13870 { (yyval.id) = tUMINUS; }
13871#line 13872 "parse.c"
13872 break;
13873
13874 case 192: /* op: "[]" */
13875#line 3934 "parse.y"
13876 { (yyval.id) = tAREF; }
13877#line 13878 "parse.c"
13878 break;
13879
13880 case 193: /* op: "[]=" */
13881#line 3935 "parse.y"
13882 { (yyval.id) = tASET; }
13883#line 13884 "parse.c"
13884 break;
13885
13886 case 194: /* op: '`' */
13887#line 3936 "parse.y"
13888 { (yyval.id) = '`'; }
13889#line 13890 "parse.c"
13890 break;
13891
13892 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13893#line 2936 "parse.y"
13894 {
13895 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13896 /*% ripper: assign!($:1, $:4) %*/
13897 }
13898#line 13899 "parse.c"
13899 break;
13900
13901 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13902#line 3071 "parse.y"
13903 {
13904 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13905 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13906 }
13907#line 13908 "parse.c"
13908 break;
13909
13910 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13911#line 3076 "parse.y"
13912 {
13913 (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]));
13914 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13915 }
13916#line 13917 "parse.c"
13917 break;
13918
13919 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13920#line 3081 "parse.y"
13921 {
13922 (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]));
13923 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13924 }
13925#line 13926 "parse.c"
13926 break;
13927
13928 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13929#line 3086 "parse.y"
13930 {
13931 (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]));
13932 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13933 }
13934#line 13935 "parse.c"
13935 break;
13936
13937 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13938#line 3091 "parse.y"
13939 {
13940 (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]));
13941 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13942 }
13943#line 13944 "parse.c"
13944 break;
13945
13946 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13947#line 3096 "parse.y"
13948 {
13949 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13950 (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));
13951 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13952 }
13953#line 13954 "parse.c"
13954 break;
13955
13956 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13957#line 3102 "parse.y"
13958 {
13959 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13960 (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));
13961 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13962 }
13963#line 13964 "parse.c"
13964 break;
13965
13966 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13967#line 3108 "parse.y"
13968 {
13969 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13970 (yyval.node) = NEW_ERROR(&(yyloc));
13971 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13972 }
13973#line 13974 "parse.c"
13974 break;
13975
13976 case 247: /* range_expr_arg: arg ".." arg */
13977#line 3130 "parse.y"
13978 {
13979 value_expr(p, (yyvsp[-2].node));
13980 value_expr(p, (yyvsp[0].node));
13981 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13982 /*% ripper: dot2!($:1, $:3) %*/
13983 }
13984#line 13985 "parse.c"
13985 break;
13986
13987 case 248: /* range_expr_arg: arg "..." arg */
13988#line 3137 "parse.y"
13989 {
13990 value_expr(p, (yyvsp[-2].node));
13991 value_expr(p, (yyvsp[0].node));
13992 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13993 /*% ripper: dot3!($:1, $:3) %*/
13994 }
13995#line 13996 "parse.c"
13996 break;
13997
13998 case 249: /* range_expr_arg: arg ".." */
13999#line 3144 "parse.y"
14000 {
14001 value_expr(p, (yyvsp[-1].node));
14002 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
14003 /*% ripper: dot2!($:1, Qnil) %*/
14004 }
14005#line 14006 "parse.c"
14006 break;
14007
14008 case 250: /* range_expr_arg: arg "..." */
14009#line 3150 "parse.y"
14010 {
14011 value_expr(p, (yyvsp[-1].node));
14012 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
14013 /*% ripper: dot3!($:1, Qnil) %*/
14014 }
14015#line 14016 "parse.c"
14016 break;
14017
14018 case 251: /* range_expr_arg: "(.." arg */
14019#line 3156 "parse.y"
14020 {
14021 value_expr(p, (yyvsp[0].node));
14022 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14023 /*% ripper: dot2!(Qnil, $:2) %*/
14024 }
14025#line 14026 "parse.c"
14026 break;
14027
14028 case 252: /* range_expr_arg: "(..." arg */
14029#line 3162 "parse.y"
14030 {
14031 value_expr(p, (yyvsp[0].node));
14032 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14033 /*% ripper: dot3!(Qnil, $:2) %*/
14034 }
14035#line 14036 "parse.c"
14036 break;
14037
14038 case 254: /* arg: arg '+' arg */
14039#line 3957 "parse.y"
14040 {
14041 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14042 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
14043 }
14044#line 14045 "parse.c"
14045 break;
14046
14047 case 255: /* arg: arg '-' arg */
14048#line 3962 "parse.y"
14049 {
14050 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14051 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
14052 }
14053#line 14054 "parse.c"
14054 break;
14055
14056 case 256: /* arg: arg '*' arg */
14057#line 3967 "parse.y"
14058 {
14059 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14060 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
14061 }
14062#line 14063 "parse.c"
14063 break;
14064
14065 case 257: /* arg: arg '/' arg */
14066#line 3972 "parse.y"
14067 {
14068 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14069 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
14070 }
14071#line 14072 "parse.c"
14072 break;
14073
14074 case 258: /* arg: arg '%' arg */
14075#line 3977 "parse.y"
14076 {
14077 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14078 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
14079 }
14080#line 14081 "parse.c"
14081 break;
14082
14083 case 259: /* arg: arg "**" arg */
14084#line 3982 "parse.y"
14085 {
14086 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14087 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
14088 }
14089#line 14090 "parse.c"
14090 break;
14091
14092 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
14093#line 3987 "parse.y"
14094 {
14095 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
14096 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
14097 }
14098#line 14099 "parse.c"
14099 break;
14100
14101 case 261: /* arg: "unary+" arg */
14102#line 3992 "parse.y"
14103 {
14104 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
14105 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
14106 }
14107#line 14108 "parse.c"
14108 break;
14109
14110 case 262: /* arg: "unary-" arg */
14111#line 3997 "parse.y"
14112 {
14113 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
14114 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
14115 }
14116#line 14117 "parse.c"
14117 break;
14118
14119 case 263: /* arg: arg '|' arg */
14120#line 4002 "parse.y"
14121 {
14122 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14123 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
14124 }
14125#line 14126 "parse.c"
14126 break;
14127
14128 case 264: /* arg: arg '^' arg */
14129#line 4007 "parse.y"
14130 {
14131 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14132 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
14133 }
14134#line 14135 "parse.c"
14135 break;
14136
14137 case 265: /* arg: arg '&' arg */
14138#line 4012 "parse.y"
14139 {
14140 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14141 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
14142 }
14143#line 14144 "parse.c"
14144 break;
14145
14146 case 266: /* arg: arg "<=>" arg */
14147#line 4017 "parse.y"
14148 {
14149 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14150 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
14151 }
14152#line 14153 "parse.c"
14153 break;
14154
14155 case 268: /* arg: arg "==" arg */
14156#line 4023 "parse.y"
14157 {
14158 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14159 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
14160 }
14161#line 14162 "parse.c"
14162 break;
14163
14164 case 269: /* arg: arg "===" arg */
14165#line 4028 "parse.y"
14166 {
14167 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14168 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
14169 }
14170#line 14171 "parse.c"
14171 break;
14172
14173 case 270: /* arg: arg "!=" arg */
14174#line 4033 "parse.y"
14175 {
14176 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14177 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
14178 }
14179#line 14180 "parse.c"
14180 break;
14181
14182 case 271: /* arg: arg "=~" arg */
14183#line 4038 "parse.y"
14184 {
14185 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14186 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
14187 }
14188#line 14189 "parse.c"
14189 break;
14190
14191 case 272: /* arg: arg "!~" arg */
14192#line 4043 "parse.y"
14193 {
14194 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14195 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
14196 }
14197#line 14198 "parse.c"
14198 break;
14199
14200 case 273: /* arg: '!' arg */
14201#line 4048 "parse.y"
14202 {
14203 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
14204 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
14205 }
14206#line 14207 "parse.c"
14207 break;
14208
14209 case 274: /* arg: '~' arg */
14210#line 4053 "parse.y"
14211 {
14212 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
14213 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
14214 }
14215#line 14216 "parse.c"
14216 break;
14217
14218 case 275: /* arg: arg "<<" arg */
14219#line 4058 "parse.y"
14220 {
14221 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14222 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
14223 }
14224#line 14225 "parse.c"
14225 break;
14226
14227 case 276: /* arg: arg ">>" arg */
14228#line 4063 "parse.y"
14229 {
14230 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14231 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
14232 }
14233#line 14234 "parse.c"
14234 break;
14235
14236 case 277: /* arg: arg "&&" arg */
14237#line 4068 "parse.y"
14238 {
14239 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14240 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
14241 }
14242#line 14243 "parse.c"
14243 break;
14244
14245 case 278: /* arg: arg "||" arg */
14246#line 4073 "parse.y"
14247 {
14248 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14249 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
14250 }
14251#line 14252 "parse.c"
14252 break;
14253
14254 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
14255#line 4078 "parse.y"
14256 {
14257 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
14258 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
14259 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
14260 /*% ripper: defined!($:4) %*/
14261 }
14262#line 14263 "parse.c"
14263 break;
14264
14265 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14266#line 2976 "parse.y"
14267 {
14268 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14269 restore_defun(p, (yyvsp[-3].node_def_temp));
14270 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14271 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14272 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14273 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14274 /*% ripper: def!($:head, $:args, $:$) %*/
14275 local_pop(p);
14276 }
14277#line 14278 "parse.c"
14278 break;
14279
14280 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14281#line 2987 "parse.y"
14282 {
14283 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14284 restore_defun(p, (yyvsp[-3].node_def_temp));
14285 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14286 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14287 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14288 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14289 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14290 local_pop(p);
14291 }
14292#line 14293 "parse.c"
14293 break;
14294
14295 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14296#line 4090 "parse.y"
14297 {
14298 value_expr(p, (yyvsp[-5].node));
14299 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14300 fixpos((yyval.node), (yyvsp[-5].node));
14301 /*% ripper: ifop!($:1, $:3, $:6) %*/
14302 }
14303#line 14304 "parse.c"
14304 break;
14305
14306 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14307#line 4100 "parse.y"
14308 {
14309 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14310 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14311 /*% ripper: rescue_mod!($:1, $:4) %*/
14312 }
14313#line 14314 "parse.c"
14314 break;
14315
14316 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14317#line 4106 "parse.y"
14318 {
14319 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14320 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14321 }
14322#line 14323 "parse.c"
14323 break;
14324
14325 case 289: /* relop: '>' */
14326#line 4112 "parse.y"
14327 {(yyval.id) = '>';}
14328#line 14329 "parse.c"
14329 break;
14330
14331 case 290: /* relop: '<' */
14332#line 4113 "parse.y"
14333 {(yyval.id) = '<';}
14334#line 14335 "parse.c"
14335 break;
14336
14337 case 291: /* relop: ">=" */
14338#line 4114 "parse.y"
14339 {(yyval.id) = idGE;}
14340#line 14341 "parse.c"
14341 break;
14342
14343 case 292: /* relop: "<=" */
14344#line 4115 "parse.y"
14345 {(yyval.id) = idLE;}
14346#line 14347 "parse.c"
14347 break;
14348
14349 case 293: /* rel_expr: arg relop arg */
14350#line 4119 "parse.y"
14351 {
14352 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14353 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14354 }
14355#line 14356 "parse.c"
14356 break;
14357
14358 case 294: /* rel_expr: rel_expr relop arg */
14359#line 4124 "parse.y"
14360 {
14361 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14362 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14363 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14364 }
14365#line 14366 "parse.c"
14366 break;
14367
14368 case 295: /* lex_ctxt: none */
14369#line 4132 "parse.y"
14370 {
14371 (yyval.ctxt) = p->ctxt;
14372 }
14373#line 14374 "parse.c"
14374 break;
14375
14376 case 296: /* begin_defined: lex_ctxt */
14377#line 4138 "parse.y"
14378 {
14379 p->ctxt.in_defined = 1;
14380 (yyval.ctxt) = (yyvsp[0].ctxt);
14381 }
14382#line 14383 "parse.c"
14383 break;
14384
14385 case 297: /* after_rescue: lex_ctxt */
14386#line 4145 "parse.y"
14387 {
14388 p->ctxt.in_rescue = after_rescue;
14389 (yyval.ctxt) = (yyvsp[0].ctxt);
14390 }
14391#line 14392 "parse.c"
14392 break;
14393
14394 case 298: /* value_expr_arg: arg */
14395#line 3171 "parse.y"
14396 {
14397 value_expr(p, (yyvsp[0].node));
14398 (yyval.node) = (yyvsp[0].node);
14399 }
14400#line 14401 "parse.c"
14401 break;
14402
14403 case 302: /* aref_args: args ',' assocs trailer */
14404#line 4157 "parse.y"
14405 {
14406 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14407 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14408 }
14409#line 14410 "parse.c"
14410 break;
14411
14412 case 303: /* aref_args: assocs trailer */
14413#line 4162 "parse.y"
14414 {
14415 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14416 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14417 }
14418#line 14419 "parse.c"
14419 break;
14420
14421 case 304: /* arg_rhs: arg */
14422#line 4169 "parse.y"
14423 {
14424 value_expr(p, (yyvsp[0].node));
14425 (yyval.node) = (yyvsp[0].node);
14426 }
14427#line 14428 "parse.c"
14428 break;
14429
14430 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14431#line 4174 "parse.y"
14432 {
14433 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14434 value_expr(p, (yyvsp[-3].node));
14435 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14436 /*% ripper: rescue_mod!($:1, $:4) %*/
14437 }
14438#line 14439 "parse.c"
14439 break;
14440
14441 case 306: /* paren_args: '(' opt_call_args rparen */
14442#line 4183 "parse.y"
14443 {
14444 (yyval.node) = (yyvsp[-1].node);
14445 /*% ripper: arg_paren!($:2) %*/
14446 }
14447#line 14448 "parse.c"
14448 break;
14449
14450 case 307: /* paren_args: '(' args ',' args_forward rparen */
14451#line 4188 "parse.y"
14452 {
14453 if (!check_forwarding_args(p)) {
14454 (yyval.node) = 0;
14455 }
14456 else {
14457 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14458 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14459 }
14460 }
14461#line 14462 "parse.c"
14462 break;
14463
14464 case 308: /* paren_args: '(' args_forward rparen */
14465#line 4198 "parse.y"
14466 {
14467 if (!check_forwarding_args(p)) {
14468 (yyval.node) = 0;
14469 }
14470 else {
14471 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14472 /*% ripper: arg_paren!($:2) %*/
14473 }
14474 }
14475#line 14476 "parse.c"
14476 break;
14477
14478 case 310: /* opt_paren_args: paren_args */
14479#line 4211 "parse.y"
14480 {
14481 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14482 }
14483#line 14484 "parse.c"
14484 break;
14485
14486 case 314: /* opt_call_args: args ',' assocs ',' */
14487#line 4220 "parse.y"
14488 {
14489 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14490 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14491 }
14492#line 14493 "parse.c"
14493 break;
14494
14495 case 315: /* opt_call_args: assocs ',' */
14496#line 4225 "parse.y"
14497 {
14498 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14499 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14500 }
14501#line 14502 "parse.c"
14502 break;
14503
14504 case 316: /* value_expr_command: command */
14505#line 3171 "parse.y"
14506 {
14507 value_expr(p, (yyvsp[0].node));
14508 (yyval.node) = (yyvsp[0].node);
14509 }
14510#line 14511 "parse.c"
14511 break;
14512
14513 case 317: /* call_args: value_expr_command */
14514#line 4232 "parse.y"
14515 {
14516 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14517 /*% ripper: args_add!(args_new!, $:1) %*/
14518 }
14519#line 14520 "parse.c"
14520 break;
14521
14522 case 318: /* call_args: def_endless_method_endless_command */
14523#line 4237 "parse.y"
14524 {
14525 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14526 /*% ripper: args_add!(args_new!, $:1) %*/
14527 }
14528#line 14529 "parse.c"
14529 break;
14530
14531 case 319: /* call_args: args opt_block_arg */
14532#line 4242 "parse.y"
14533 {
14534 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14535 /*% ripper: args_add_block!($:1, $:2) %*/
14536 }
14537#line 14538 "parse.c"
14538 break;
14539
14540 case 320: /* call_args: assocs opt_block_arg */
14541#line 4247 "parse.y"
14542 {
14543 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14544 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14545 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14546 }
14547#line 14548 "parse.c"
14548 break;
14549
14550 case 321: /* call_args: args ',' assocs opt_block_arg */
14551#line 4253 "parse.y"
14552 {
14553 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14554 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14555 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14556 }
14557#line 14558 "parse.c"
14558 break;
14559
14560 case 323: /* $@13: %empty */
14561#line 4262 "parse.y"
14562 {
14563 /* If call_args starts with a open paren '(' or '[',
14564 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14565 * but the push must be done after CMDARG_PUSH(1).
14566 * So this code makes them consistent by first cancelling
14567 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14568 * and finally redoing CMDARG_PUSH(0).
14569 */
14570 int lookahead = 0;
14571 switch (yychar) {
14572 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14573 lookahead = 1;
14574 }
14575 if (lookahead) CMDARG_POP();
14576 CMDARG_PUSH(1);
14577 if (lookahead) CMDARG_PUSH(0);
14578 }
14579#line 14580 "parse.c"
14580 break;
14581
14582 case 324: /* command_args: $@13 call_args */
14583#line 4280 "parse.y"
14584 {
14585 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14586 * but the push must be done after CMDARG_POP() in the parser.
14587 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14588 * CMDARG_POP() to pop 1 pushed by command_args,
14589 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14590 */
14591 int lookahead = 0;
14592 switch (yychar) {
14593 case tLBRACE_ARG:
14594 lookahead = 1;
14595 }
14596 if (lookahead) CMDARG_POP();
14597 CMDARG_POP();
14598 if (lookahead) CMDARG_PUSH(0);
14599 (yyval.node) = (yyvsp[0].node);
14600 /*% ripper: $:2 %*/
14601 }
14602#line 14603 "parse.c"
14603 break;
14604
14605 case 325: /* block_arg: "&" arg_value */
14606#line 4301 "parse.y"
14607 {
14608 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14609 /*% ripper: $:2 %*/
14610 }
14611#line 14612 "parse.c"
14612 break;
14613
14614 case 326: /* block_arg: "&" */
14615#line 4306 "parse.y"
14616 {
14617 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14618 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14619 /*% ripper: Qnil %*/
14620 }
14621#line 14622 "parse.c"
14622 break;
14623
14624 case 327: /* opt_block_arg: ',' block_arg */
14625#line 4314 "parse.y"
14626 {
14627 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14628 /*% ripper: $:2 %*/
14629 }
14630#line 14631 "parse.c"
14631 break;
14632
14633 case 328: /* opt_block_arg: none */
14634#line 4319 "parse.y"
14635 {
14636 (yyval.node_block_pass) = 0;
14637 /*% ripper: Qfalse %*/
14638 }
14639#line 14640 "parse.c"
14640 break;
14641
14642 case 329: /* args: arg_value */
14643#line 4327 "parse.y"
14644 {
14645 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14646 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14647 }
14648#line 14649 "parse.c"
14649 break;
14650
14651 case 330: /* args: arg_splat */
14652#line 4332 "parse.y"
14653 {
14654 (yyval.node) = (yyvsp[0].node);
14655 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14656 }
14657#line 14658 "parse.c"
14658 break;
14659
14660 case 331: /* args: args ',' arg_value */
14661#line 4337 "parse.y"
14662 {
14663 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14664 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14665 }
14666#line 14667 "parse.c"
14667 break;
14668
14669 case 332: /* args: args ',' arg_splat */
14670#line 4342 "parse.y"
14671 {
14672 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14673 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14674 }
14675#line 14676 "parse.c"
14676 break;
14677
14678 case 333: /* arg_splat: "*" arg_value */
14679#line 4350 "parse.y"
14680 {
14681 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14682 /*% ripper: $:arg_value %*/
14683 }
14684#line 14685 "parse.c"
14685 break;
14686
14687 case 334: /* arg_splat: "*" */
14688#line 4355 "parse.y"
14689 {
14690 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14691 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14692 /*% ripper: Qnil %*/
14693 }
14694#line 14695 "parse.c"
14695 break;
14696
14697 case 337: /* mrhs: args ',' arg_value */
14698#line 4369 "parse.y"
14699 {
14700 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14701 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14702 }
14703#line 14704 "parse.c"
14704 break;
14705
14706 case 338: /* mrhs: args ',' "*" arg_value */
14707#line 4374 "parse.y"
14708 {
14709 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14710 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14711 }
14712#line 14713 "parse.c"
14713 break;
14714
14715 case 339: /* mrhs: "*" arg_value */
14716#line 4379 "parse.y"
14717 {
14718 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14719 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14720 }
14721#line 14722 "parse.c"
14722 break;
14723
14724 case 350: /* primary: "method" */
14725#line 4400 "parse.y"
14726 {
14727 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14728 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14729 }
14730#line 14731 "parse.c"
14731 break;
14732
14733 case 351: /* $@14: %empty */
14734#line 4405 "parse.y"
14735 {
14736 CMDARG_PUSH(0);
14737 }
14738#line 14739 "parse.c"
14739 break;
14740
14741 case 352: /* primary: k_begin $@14 bodystmt k_end */
14742#line 4410 "parse.y"
14743 {
14744 CMDARG_POP();
14745 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14746 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14747 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14748 /*% ripper: begin!($:body) %*/
14749 }
14750#line 14751 "parse.c"
14751 break;
14752
14753 case 353: /* $@15: %empty */
14754#line 4417 "parse.y"
14755 {SET_LEX_STATE(EXPR_ENDARG);}
14756#line 14757 "parse.c"
14757 break;
14758
14759 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14760#line 4418 "parse.y"
14761 {
14762 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14763 (yyval.node) = (yyvsp[-2].node);
14764 /*% ripper: paren!($:body) %*/
14765 }
14766#line 14767 "parse.c"
14767 break;
14768
14769 case 355: /* primary: "(" compstmt_stmts ')' */
14770#line 4424 "parse.y"
14771 {
14772 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14773 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14774 /*% ripper: paren!($:body) %*/
14775 }
14776#line 14777 "parse.c"
14777 break;
14778
14779 case 356: /* primary: primary_value "::" "constant" */
14780#line 4430 "parse.y"
14781 {
14782 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14783 /*% ripper: const_path_ref!($:recv, $:name) %*/
14784 }
14785#line 14786 "parse.c"
14786 break;
14787
14788 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14789#line 4435 "parse.y"
14790 {
14791 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14792 /*% ripper: top_const_ref!($:name) %*/
14793 }
14794#line 14795 "parse.c"
14795 break;
14796
14797 case 358: /* primary: "[" aref_args ']' */
14798#line 4440 "parse.y"
14799 {
14800 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14801 /*% ripper: array!($:args) %*/
14802 }
14803#line 14804 "parse.c"
14804 break;
14805
14806 case 359: /* primary: "{" assoc_list '}' */
14807#line 4445 "parse.y"
14808 {
14809 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14810 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14811 /*% ripper: hash!($:list) %*/
14812 }
14813#line 14814 "parse.c"
14814 break;
14815
14816 case 360: /* primary: k_return */
14817#line 4451 "parse.y"
14818 {
14819 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14820 /*% ripper: return0! %*/
14821 }
14822#line 14823 "parse.c"
14823 break;
14824
14825 case 361: /* primary: k_yield '(' call_args rparen */
14826#line 4456 "parse.y"
14827 {
14828 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14829 /*% ripper: yield!(paren!($:args)) %*/
14830 }
14831#line 14832 "parse.c"
14832 break;
14833
14834 case 362: /* primary: k_yield '(' rparen */
14835#line 4461 "parse.y"
14836 {
14837 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14838 /*% ripper: yield!(paren!(args_new!)) %*/
14839 }
14840#line 14841 "parse.c"
14841 break;
14842
14843 case 363: /* primary: k_yield */
14844#line 4466 "parse.y"
14845 {
14846 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14847 /*% ripper: yield0! %*/
14848 }
14849#line 14850 "parse.c"
14850 break;
14851
14852 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14853#line 4471 "parse.y"
14854 {
14855 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14856 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14857 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14858 /*% ripper: defined!($:arg) %*/
14859 }
14860#line 14861 "parse.c"
14861 break;
14862
14863 case 365: /* primary: "'not'" '(' expr rparen */
14864#line 4478 "parse.y"
14865 {
14866 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14867 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14868 }
14869#line 14870 "parse.c"
14870 break;
14871
14872 case 366: /* primary: "'not'" '(' rparen */
14873#line 4483 "parse.y"
14874 {
14875 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14876 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14877 }
14878#line 14879 "parse.c"
14879 break;
14880
14881 case 367: /* primary: fcall brace_block */
14882#line 4488 "parse.y"
14883 {
14884 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14885 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14886 }
14887#line 14888 "parse.c"
14888 break;
14889
14890 case 369: /* primary: method_call brace_block */
14891#line 4494 "parse.y"
14892 {
14893 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14894 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14895 /*% ripper: method_add_block!($:call, $:block) %*/
14896 }
14897#line 14898 "parse.c"
14898 break;
14899
14900 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14901#line 4504 "parse.y"
14902 {
14903 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14904 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14905
14906 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14907 fixpos((yyval.node), (yyvsp[-4].node));
14908 /*% ripper: if!($:cond, $:body, $:tail) %*/
14909 }
14910#line 14911 "parse.c"
14911 break;
14912
14913 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14914#line 4516 "parse.y"
14915 {
14916 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14917 fixpos((yyval.node), (yyvsp[-4].node));
14918 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14919 }
14920#line 14921 "parse.c"
14921 break;
14922
14923 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14924#line 4524 "parse.y"
14925 {
14926 restore_block_exit(p, (yyvsp[-3].node_exits));
14927 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14928 fixpos((yyval.node), (yyvsp[-2].node));
14929 /*% ripper: while!($:cond, $:body) %*/
14930 }
14931#line 14932 "parse.c"
14932 break;
14933
14934 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14935#line 4533 "parse.y"
14936 {
14937 restore_block_exit(p, (yyvsp[-3].node_exits));
14938 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14939 fixpos((yyval.node), (yyvsp[-2].node));
14940 /*% ripper: until!($:cond, $:body) %*/
14941 }
14942#line 14943 "parse.c"
14943 break;
14944
14945 case 375: /* @16: %empty */
14946#line 4540 "parse.y"
14947 {
14948 (yyval.labels) = p->case_labels;
14949 p->case_labels = CHECK_LITERAL_WHEN;
14950 }
14951#line 14952 "parse.c"
14952 break;
14953
14954 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14955#line 4546 "parse.y"
14956 {
14957 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14958 p->case_labels = (yyvsp[-2].labels);
14959 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14960 fixpos((yyval.node), (yyvsp[-4].node));
14961 /*% ripper: case!($:expr, $:body) %*/
14962 }
14963#line 14964 "parse.c"
14964 break;
14965
14966 case 377: /* @17: %empty */
14967#line 4554 "parse.y"
14968 {
14969 (yyval.labels) = p->case_labels;
14970 p->case_labels = 0;
14971 }
14972#line 14973 "parse.c"
14973 break;
14974
14975 case 378: /* primary: k_case option_terms @17 case_body k_end */
14976#line 4560 "parse.y"
14977 {
14978 if (p->case_labels) st_free_table(p->case_labels);
14979 p->case_labels = (yyvsp[-2].labels);
14980 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14981 /*% ripper: case!(Qnil, $:body) %*/
14982 }
14983#line 14984 "parse.c"
14984 break;
14985
14986 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14987#line 4569 "parse.y"
14988 {
14989 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14990 /*% ripper: case!($:expr, $:body) %*/
14991 }
14992#line 14993 "parse.c"
14993 break;
14994
14995 case 380: /* $@18: %empty */
14996#line 4574 "parse.y"
14997 {COND_PUSH(1);}
14998#line 14999 "parse.c"
14999 break;
15000
15001 case 381: /* $@19: %empty */
15002#line 4574 "parse.y"
15003 {COND_POP();}
15004#line 15005 "parse.c"
15005 break;
15006
15007 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
15008#line 4577 "parse.y"
15009 {
15010 restore_block_exit(p, (yyvsp[-8].node_exits));
15011 /*
15012 * for a, b, c in e
15013 * #=>
15014 * e.each{|*x| a, b, c = x}
15015 *
15016 * for a in e
15017 * #=>
15018 * e.each{|x| a, = x}
15019 */
15020 ID id = internal_id(p);
15021 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
15022 rb_node_args_t *args;
15023 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
15024 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
15025 tbl->ids[0] = id; /* internal id */
15026
15027 switch (nd_type((yyvsp[-7].node))) {
15028 case NODE_LASGN:
15029 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
15030 set_nd_value(p, (yyvsp[-7].node), internal_var);
15031 id = 0;
15032 m->nd_plen = 1;
15033 m->nd_next = (yyvsp[-7].node);
15034 break;
15035 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
15036 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
15037 break;
15038 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
15039 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]));
15040 }
15041 /* {|*internal_id| <m> = internal_id; ... } */
15042 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
15043 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
15044 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
15045 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
15046 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
15047 fixpos((yyval.node), (yyvsp[-7].node));
15048 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
15049 }
15050#line 15051 "parse.c"
15051 break;
15052
15053 case 383: /* $@20: %empty */
15054#line 4619 "parse.y"
15055 {
15056 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
15057 }
15058#line 15059 "parse.c"
15059 break;
15060
15061 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
15062#line 4624 "parse.y"
15063 {
15064 YYLTYPE inheritance_operator_loc = NULL_LOC;
15065 if ((yyvsp[-3].node)) {
15066 inheritance_operator_loc = (yylsp[-3]);
15067 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
15068 }
15069 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
15070 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15071 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
15072 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
15073 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
15074 local_pop(p);
15075 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
15076 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
15077 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
15078 }
15079#line 15080 "parse.c"
15080 break;
15081
15082 case 385: /* $@21: %empty */
15083#line 4641 "parse.y"
15084 {
15085 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
15086 }
15087#line 15088 "parse.c"
15088 break;
15089
15090 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
15091#line 4647 "parse.y"
15092 {
15093 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
15094 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15095 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
15096 fixpos((yyval.node), (yyvsp[-4].node));
15097 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
15098 local_pop(p);
15099 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
15100 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
15101 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
15102 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
15103 }
15104#line 15105 "parse.c"
15105 break;
15106
15107 case 387: /* $@22: %empty */
15108#line 4660 "parse.y"
15109 {
15110 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
15111 }
15112#line 15113 "parse.c"
15113 break;
15114
15115 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
15116#line 4665 "parse.y"
15117 {
15118 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
15119 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15120 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
15121 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
15122 /*% ripper: module!($:cpath, $:bodystmt) %*/
15123 local_pop(p);
15124 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
15125 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
15126 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
15127 }
15128#line 15129 "parse.c"
15129 break;
15130
15131 case 389: /* $@23: %empty */
15132#line 4678 "parse.y"
15133 {
15134 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15135 }
15136#line 15137 "parse.c"
15137 break;
15138
15139 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
15140#line 4683 "parse.y"
15141 {
15142 restore_defun(p, (yyvsp[-4].node_def_temp));
15143 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15144 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15145 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
15146 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
15147 local_pop(p);
15148 }
15149#line 15150 "parse.c"
15150 break;
15151
15152 case 391: /* $@24: %empty */
15153#line 4693 "parse.y"
15154 {
15155 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15156 }
15157#line 15158 "parse.c"
15158 break;
15159
15160 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
15161#line 4698 "parse.y"
15162 {
15163 restore_defun(p, (yyvsp[-4].node_def_temp));
15164 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15165 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15166 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
15167 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
15168 local_pop(p);
15169 }
15170#line 15171 "parse.c"
15171 break;
15172
15173 case 393: /* primary: "'break'" */
15174#line 4707 "parse.y"
15175 {
15176 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
15177 /*% ripper: break!(args_new!) %*/
15178 }
15179#line 15180 "parse.c"
15180 break;
15181
15182 case 394: /* primary: "'next'" */
15183#line 4712 "parse.y"
15184 {
15185 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
15186 /*% ripper: next!(args_new!) %*/
15187 }
15188#line 15189 "parse.c"
15189 break;
15190
15191 case 395: /* primary: "'redo'" */
15192#line 4717 "parse.y"
15193 {
15194 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
15195 /*% ripper: redo! %*/
15196 }
15197#line 15198 "parse.c"
15198 break;
15199
15200 case 396: /* primary: "'retry'" */
15201#line 4722 "parse.y"
15202 {
15203 if (!p->ctxt.in_defined) {
15204 switch (p->ctxt.in_rescue) {
15205 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
15206 case after_rescue: /* ok */ break;
15207 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
15208 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
15209 }
15210 }
15211 (yyval.node) = NEW_RETRY(&(yyloc));
15212 /*% ripper: retry! %*/
15213 }
15214#line 15215 "parse.c"
15215 break;
15216
15217 case 397: /* value_expr_primary: primary */
15218#line 3171 "parse.y"
15219 {
15220 value_expr(p, (yyvsp[0].node));
15221 (yyval.node) = (yyvsp[0].node);
15222 }
15223#line 15224 "parse.c"
15224 break;
15225
15226 case 399: /* k_begin: "'begin'" */
15227#line 4740 "parse.y"
15228 {
15229 token_info_push(p, "begin", &(yyloc));
15230 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15231 }
15232#line 15233 "parse.c"
15233 break;
15234
15235 case 400: /* k_if: "'if'" */
15236#line 4747 "parse.y"
15237 {
15238 WARN_EOL("if");
15239 token_info_push(p, "if", &(yyloc));
15240 if (p->token_info && p->token_info->nonspc &&
15241 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
15242 const char *tok = p->lex.ptok - rb_strlen_lit("if");
15243 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
15244 beg += rb_strlen_lit("else");
15245 while (beg < tok && ISSPACE(*beg)) beg++;
15246 if (beg == tok) {
15247 p->token_info->nonspc = 0;
15248 }
15249 }
15250 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15251 }
15252#line 15253 "parse.c"
15253 break;
15254
15255 case 401: /* k_unless: "'unless'" */
15256#line 4765 "parse.y"
15257 {
15258 token_info_push(p, "unless", &(yyloc));
15259 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15260 }
15261#line 15262 "parse.c"
15262 break;
15263
15264 case 402: /* k_while: "'while'" allow_exits */
15265#line 4772 "parse.y"
15266 {
15267 (yyval.node_exits) = (yyvsp[0].node_exits);
15268 token_info_push(p, "while", &(yyloc));
15269 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15270 }
15271#line 15272 "parse.c"
15272 break;
15273
15274 case 403: /* k_until: "'until'" allow_exits */
15275#line 4780 "parse.y"
15276 {
15277 (yyval.node_exits) = (yyvsp[0].node_exits);
15278 token_info_push(p, "until", &(yyloc));
15279 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15280 }
15281#line 15282 "parse.c"
15282 break;
15283
15284 case 404: /* k_case: "'case'" */
15285#line 4788 "parse.y"
15286 {
15287 token_info_push(p, "case", &(yyloc));
15288 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15289 }
15290#line 15291 "parse.c"
15291 break;
15292
15293 case 405: /* k_for: "'for'" allow_exits */
15294#line 4795 "parse.y"
15295 {
15296 (yyval.node_exits) = (yyvsp[0].node_exits);
15297 token_info_push(p, "for", &(yyloc));
15298 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15299 }
15300#line 15301 "parse.c"
15301 break;
15302
15303 case 406: /* k_class: "'class'" */
15304#line 4803 "parse.y"
15305 {
15306 token_info_push(p, "class", &(yyloc));
15307 (yyval.ctxt) = p->ctxt;
15308 p->ctxt.in_rescue = before_rescue;
15309 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15310 }
15311#line 15312 "parse.c"
15312 break;
15313
15314 case 407: /* k_module: "'module'" */
15315#line 4812 "parse.y"
15316 {
15317 token_info_push(p, "module", &(yyloc));
15318 (yyval.ctxt) = p->ctxt;
15319 p->ctxt.in_rescue = before_rescue;
15320 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15321 }
15322#line 15323 "parse.c"
15323 break;
15324
15325 case 408: /* k_def: "'def'" */
15326#line 4821 "parse.y"
15327 {
15328 token_info_push(p, "def", &(yyloc));
15329 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15330 p->ctxt.in_argdef = 1;
15331 }
15332#line 15333 "parse.c"
15333 break;
15334
15335 case 409: /* k_do: "'do'" */
15336#line 4829 "parse.y"
15337 {
15338 token_info_push(p, "do", &(yyloc));
15339 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15340 }
15341#line 15342 "parse.c"
15342 break;
15343
15344 case 410: /* k_do_block: "'do' for block" */
15345#line 4836 "parse.y"
15346 {
15347 token_info_push(p, "do", &(yyloc));
15348 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15349 }
15350#line 15351 "parse.c"
15351 break;
15352
15353 case 411: /* k_rescue: "'rescue'" */
15354#line 4843 "parse.y"
15355 {
15356 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15357 (yyval.ctxt) = p->ctxt;
15358 p->ctxt.in_rescue = after_rescue;
15359 }
15360#line 15361 "parse.c"
15361 break;
15362
15363 case 412: /* k_ensure: "'ensure'" */
15364#line 4851 "parse.y"
15365 {
15366 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15367 (yyval.ctxt) = p->ctxt;
15368 }
15369#line 15370 "parse.c"
15370 break;
15371
15372 case 413: /* k_when: "'when'" */
15373#line 4858 "parse.y"
15374 {
15375 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15376 }
15377#line 15378 "parse.c"
15378 break;
15379
15380 case 414: /* k_else: "'else'" */
15381#line 4864 "parse.y"
15382 {
15383 token_info *ptinfo_beg = p->token_info;
15384 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15385 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15386 if (same) {
15387 token_info e;
15388 e.next = ptinfo_beg->next;
15389 e.token = "else";
15390 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15391 if (!e.nonspc) *ptinfo_beg = e;
15392 }
15393 }
15394#line 15395 "parse.c"
15395 break;
15396
15397 case 415: /* k_elsif: "'elsif'" */
15398#line 4879 "parse.y"
15399 {
15400 WARN_EOL("elsif");
15401 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15402 }
15403#line 15404 "parse.c"
15404 break;
15405
15406 case 416: /* k_end: "'end'" */
15407#line 4886 "parse.y"
15408 {
15409 token_info_pop(p, "end", &(yyloc));
15410 pop_end_expect_token_locations(p);
15411 }
15412#line 15413 "parse.c"
15413 break;
15414
15415 case 417: /* k_end: "dummy end" */
15416#line 4891 "parse.y"
15417 {
15418 compile_error(p, "syntax error, unexpected end-of-input");
15419 }
15420#line 15421 "parse.c"
15421 break;
15422
15423 case 418: /* k_return: "'return'" */
15424#line 4897 "parse.y"
15425 {
15426 if (p->ctxt.cant_return && !dyna_in_block(p))
15427 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15428 }
15429#line 15430 "parse.c"
15430 break;
15431
15432 case 419: /* k_return_arg: k_return */
15433#line 4904 "parse.y"
15434 {
15435 CMDARG_PUSH(0);
15436 }
15437#line 15438 "parse.c"
15438 break;
15439
15440 case 420: /* k_break_arg: "'break'" */
15441#line 4910 "parse.y"
15442 {
15443 CMDARG_PUSH(0);
15444 }
15445#line 15446 "parse.c"
15446 break;
15447
15448 case 421: /* k_next_arg: "'next'" */
15449#line 4916 "parse.y"
15450 {
15451 CMDARG_PUSH(0);
15452 }
15453#line 15454 "parse.c"
15454 break;
15455
15456 case 422: /* k_yield: "'yield'" */
15457#line 4922 "parse.y"
15458 {
15459 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15460 yyerror1(&(yylsp[0]), "Invalid yield");
15461 }
15462#line 15463 "parse.c"
15463 break;
15464
15465 case 427: /* do: "'do' for condition" */
15466#line 4934 "parse.y"
15467 { (yyval.id) = keyword_do_cond; }
15468#line 15469 "parse.c"
15469 break;
15470
15471 case 429: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15472#line 4941 "parse.y"
15473 {
15474 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15475 fixpos((yyval.node), (yyvsp[-3].node));
15476 /*% ripper: elsif!($:2, $:4, $:5) %*/
15477 }
15478#line 15479 "parse.c"
15479 break;
15480
15481 case 431: /* opt_else: k_else compstmt_stmts */
15482#line 4950 "parse.y"
15483 {
15484 (yyval.node) = (yyvsp[0].node);
15485 /*% ripper: else!($:2) %*/
15486 }
15487#line 15488 "parse.c"
15488 break;
15489
15490 case 434: /* f_marg: f_norm_arg */
15491#line 4961 "parse.y"
15492 {
15493 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15494 mark_lvar_used(p, (yyval.node));
15495 }
15496#line 15497 "parse.c"
15497 break;
15498
15499 case 435: /* f_marg: "(" f_margs rparen */
15500#line 4966 "parse.y"
15501 {
15502 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15503 /*% ripper: mlhs_paren!($:2) %*/
15504 }
15505#line 15506 "parse.c"
15506 break;
15507
15508 case 436: /* mlhs_items_f_marg: f_marg */
15509#line 3058 "parse.y"
15510 {
15511 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15512 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15513 }
15514#line 15515 "parse.c"
15515 break;
15516
15517 case 437: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15518#line 3063 "parse.y"
15519 {
15520 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15521 /*% ripper: mlhs_add!($:1, $:3) %*/
15522 }
15523#line 15524 "parse.c"
15524 break;
15525
15526 case 438: /* f_margs: mlhs_items_f_marg */
15527#line 4974 "parse.y"
15528 {
15529 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15530 /*% ripper: $:1 %*/
15531 }
15532#line 15533 "parse.c"
15533 break;
15534
15535 case 439: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15536#line 4979 "parse.y"
15537 {
15538 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15539 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15540 }
15541#line 15542 "parse.c"
15542 break;
15543
15544 case 440: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15545#line 4984 "parse.y"
15546 {
15547 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15548 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15549 }
15550#line 15551 "parse.c"
15551 break;
15552
15553 case 441: /* f_margs: f_rest_marg */
15554#line 4989 "parse.y"
15555 {
15556 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15557 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15558 }
15559#line 15560 "parse.c"
15560 break;
15561
15562 case 442: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15563#line 4994 "parse.y"
15564 {
15565 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15566 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15567 }
15568#line 15569 "parse.c"
15569 break;
15570
15571 case 443: /* f_rest_marg: "*" f_norm_arg */
15572#line 5001 "parse.y"
15573 {
15574 /*% ripper: $:2 %*/
15575 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15576 mark_lvar_used(p, (yyval.node));
15577 }
15578#line 15579 "parse.c"
15579 break;
15580
15581 case 444: /* f_rest_marg: "*" */
15582#line 5007 "parse.y"
15583 {
15584 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15585 /*% ripper: Qnil %*/
15586 }
15587#line 15588 "parse.c"
15588 break;
15589
15590 case 446: /* f_any_kwrest: f_no_kwarg */
15591#line 5015 "parse.y"
15592 {
15593 (yyval.id) = idNil;
15594 /*% ripper: ID2VAL(idNil) %*/
15595 }
15596#line 15597 "parse.c"
15597 break;
15598
15599 case 447: /* $@25: %empty */
15600#line 5021 "parse.y"
15601 {p->ctxt.in_argdef = 0;}
15602#line 15603 "parse.c"
15603 break;
15604
15605 case 449: /* f_kw_primary_value: f_label primary_value */
15606#line 3030 "parse.y"
15607 {
15608 p->ctxt.in_argdef = 1;
15609 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15610 /*% ripper: [$:$, $:value] %*/
15611 }
15612#line 15613 "parse.c"
15613 break;
15614
15615 case 450: /* f_kw_primary_value: f_label */
15616#line 3036 "parse.y"
15617 {
15618 p->ctxt.in_argdef = 1;
15619 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15620 /*% ripper: [$:$, 0] %*/
15621 }
15622#line 15623 "parse.c"
15623 break;
15624
15625 case 451: /* f_kwarg_primary_value: f_kw_primary_value */
15626#line 3045 "parse.y"
15627 {
15628 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15629 /*% ripper: rb_ary_new3(1, $:1) %*/
15630 }
15631#line 15632 "parse.c"
15632 break;
15633
15634 case 452: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15635#line 3050 "parse.y"
15636 {
15637 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15638 /*% ripper: rb_ary_push($:1, $:3) %*/
15639 }
15640#line 15641 "parse.c"
15641 break;
15642
15643 case 453: /* opt_f_block_arg_none: ',' f_block_arg */
15644#line 2967 "parse.y"
15645 {
15646 (yyval.id) = (yyvsp[0].id);
15647 /*% ripper: $:2 %*/
15648 }
15649#line 15650 "parse.c"
15650 break;
15651
15652 case 455: /* args_tail_basic_primary_value_none: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg_none */
15653#line 2944 "parse.y"
15654 {
15655 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15656 /*% ripper: [$:1, $:3, $:4] %*/
15657 }
15658#line 15659 "parse.c"
15659 break;
15660
15661 case 456: /* args_tail_basic_primary_value_none: f_kwarg_primary_value opt_f_block_arg_none */
15662#line 2949 "parse.y"
15663 {
15664 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15665 /*% ripper: [$:1, Qnil, $:2] %*/
15666 }
15667#line 15668 "parse.c"
15668 break;
15669
15670 case 457: /* args_tail_basic_primary_value_none: f_any_kwrest opt_f_block_arg_none */
15671#line 2954 "parse.y"
15672 {
15673 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15674 /*% ripper: [Qnil, $:1, $:2] %*/
15675 }
15676#line 15677 "parse.c"
15677 break;
15678
15679 case 458: /* args_tail_basic_primary_value_none: f_block_arg */
15680#line 2959 "parse.y"
15681 {
15682 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15683 /*% ripper: [Qnil, Qnil, $:1] %*/
15684 }
15685#line 15686 "parse.c"
15686 break;
15687
15688 case 460: /* excessed_comma: ',' */
15689#line 5027 "parse.y"
15690 {
15691 /* magic number for rest_id in iseq_set_arguments() */
15692 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15693 /*% ripper: excessed_comma! %*/
15694 }
15695#line 15696 "parse.c"
15696 break;
15697
15698 case 461: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15699#line 3008 "parse.y"
15700 {
15701 p->ctxt.in_argdef = 1;
15702 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15703 /*% ripper: [$:$, $:3] %*/
15704 }
15705#line 15706 "parse.c"
15706 break;
15707
15708 case 462: /* f_opt_arg_primary_value: f_opt_primary_value */
15709#line 3017 "parse.y"
15710 {
15711 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15712 /*% ripper: rb_ary_new3(1, $:1) %*/
15713 }
15714#line 15715 "parse.c"
15715 break;
15716
15717 case 463: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15718#line 3022 "parse.y"
15719 {
15720 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15721 /*% ripper: rb_ary_push($:1, $:3) %*/
15722 }
15723#line 15724 "parse.c"
15724 break;
15725
15726 case 464: /* opt_args_tail_block_args_tail_none: ',' block_args_tail */
15727#line 3117 "parse.y"
15728 {
15729 (yyval.node_args) = (yyvsp[0].node_args);
15730 /*% ripper: $:tail %*/
15731 }
15732#line 15733 "parse.c"
15733 break;
15734
15735 case 465: /* opt_args_tail_block_args_tail_none: none */
15736#line 3122 "parse.y"
15737 {
15738 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15739 /*% ripper: [Qnil, Qnil, Qnil] %*/
15740 }
15741#line 15742 "parse.c"
15742 break;
15743
15744 case 466: /* 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 */
15745#line 6308 "parse.y"
15746 {
15747 (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));
15748 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15749 }
15750#line 15751 "parse.c"
15751 break;
15752
15753 case 467: /* 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 */
15754#line 6313 "parse.y"
15755 {
15756 (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));
15757 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15758 }
15759#line 15760 "parse.c"
15760 break;
15761
15762 case 468: /* 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 */
15763#line 6318 "parse.y"
15764 {
15765 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15766 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15767 }
15768#line 15769 "parse.c"
15769 break;
15770
15771 case 469: /* 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 */
15772#line 6323 "parse.y"
15773 {
15774 (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));
15775 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15776 }
15777#line 15778 "parse.c"
15778 break;
15779
15780 case 470: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg opt_args_tail_block_args_tail_none */
15781#line 6328 "parse.y"
15782 {
15783 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15784 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15785 }
15786#line 15787 "parse.c"
15787 break;
15788
15789 case 471: /* 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 */
15790#line 6333 "parse.y"
15791 {
15792 (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));
15793 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15794 }
15795#line 15796 "parse.c"
15796 break;
15797
15798 case 472: /* 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 */
15799#line 6338 "parse.y"
15800 {
15801 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15802 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15803 }
15804#line 15805 "parse.c"
15805 break;
15806
15807 case 473: /* 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 */
15808#line 6343 "parse.y"
15809 {
15810 (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));
15811 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15812 }
15813#line 15814 "parse.c"
15814 break;
15815
15816 case 474: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15817#line 6348 "parse.y"
15818 {
15819 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15820 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15821 }
15822#line 15823 "parse.c"
15823 break;
15824
15825 case 475: /* 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 */
15826#line 6353 "parse.y"
15827 {
15828 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15829 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15830 }
15831#line 15832 "parse.c"
15832 break;
15833
15834 case 476: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg opt_args_tail_block_args_tail_none */
15835#line 6358 "parse.y"
15836 {
15837 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15838 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15839 }
15840#line 15841 "parse.c"
15841 break;
15842
15843 case 477: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15844#line 6363 "parse.y"
15845 {
15846 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15847 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15848 }
15849#line 15850 "parse.c"
15850 break;
15851
15852 case 479: /* block_param: f_arg excessed_comma */
15853#line 5036 "parse.y"
15854 {
15855 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15856 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15857 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15858 }
15859#line 15860 "parse.c"
15860 break;
15861
15862 case 480: /* block_param: f_arg opt_args_tail_block_args_tail_none */
15863#line 5042 "parse.y"
15864 {
15865 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15866 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15867 }
15868#line 15869 "parse.c"
15869 break;
15870
15871 case 481: /* tail-only-args_block_args_tail: block_args_tail */
15872#line 6371 "parse.y"
15873 {
15874 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15875 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15876 }
15877#line 15878 "parse.c"
15878 break;
15879
15880 case 484: /* opt_block_param_def: block_param_def */
15881#line 5051 "parse.y"
15882 {
15883 p->command_start = TRUE;
15884 }
15885#line 15886 "parse.c"
15886 break;
15887
15888 case 485: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15889#line 5057 "parse.y"
15890 {
15891 p->max_numparam = ORDINAL_PARAM;
15892 p->ctxt.in_argdef = 0;
15893 (yyval.node_args) = (yyvsp[-2].node_args);
15894 /*% ripper: block_var!($:2, $:3) %*/
15895 }
15896#line 15897 "parse.c"
15897 break;
15898
15899 case 486: /* opt_block_param: %empty */
15900#line 5066 "parse.y"
15901 {
15902 (yyval.node_args) = 0;
15903 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15904 }
15905#line 15906 "parse.c"
15906 break;
15907
15908 case 488: /* opt_bv_decl: option_'\n' */
15909#line 5074 "parse.y"
15910 {
15911 (yyval.id) = 0;
15912 /*% ripper: Qfalse %*/
15913 }
15914#line 15915 "parse.c"
15915 break;
15916
15917 case 489: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15918#line 5079 "parse.y"
15919 {
15920 (yyval.id) = 0;
15921 /*% ripper: $:3 %*/
15922 }
15923#line 15924 "parse.c"
15924 break;
15925
15926 case 492: /* bvar: "local variable or method" */
15927#line 5092 "parse.y"
15928 {
15929 new_bv(p, (yyvsp[0].id));
15930 /*% ripper: $:1 %*/
15931 }
15932#line 15933 "parse.c"
15933 break;
15934
15935 case 494: /* max_numparam: %empty */
15936#line 5099 "parse.y"
15937 {
15938 (yyval.num) = p->max_numparam;
15939 p->max_numparam = 0;
15940 }
15941#line 15942 "parse.c"
15942 break;
15943
15944 case 495: /* numparam: %empty */
15945#line 5105 "parse.y"
15946 {
15947 (yyval.node) = numparam_push(p);
15948 }
15949#line 15950 "parse.c"
15950 break;
15951
15952 case 496: /* it_id: %empty */
15953#line 5110 "parse.y"
15954 {
15955 (yyval.id) = p->it_id;
15956 p->it_id = 0;
15957 }
15958#line 15959 "parse.c"
15959 break;
15960
15961 case 497: /* @26: %empty */
15962#line 5117 "parse.y"
15963 {
15964 token_info_push(p, "->", &(yylsp[0]));
15965 (yyval.vars) = dyna_push(p);
15966 }
15967#line 15968 "parse.c"
15968 break;
15969
15970 case 498: /* $@27: %empty */
15971#line 5123 "parse.y"
15972 {
15973 CMDARG_PUSH(0);
15974 }
15975#line 15976 "parse.c"
15976 break;
15977
15978 case 499: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15979#line 5127 "parse.y"
15980 {
15981 int max_numparam = p->max_numparam;
15982 ID it_id = p->it_id;
15983 p->lex.lpar_beg = (yyvsp[-8].num);
15984 p->max_numparam = (yyvsp[-6].num);
15985 p->it_id = (yyvsp[-4].id);
15986 restore_block_exit(p, (yyvsp[-3].node_exits));
15987 CMDARG_POP();
15988 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15989 {
15990 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15991 (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);
15992 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15993 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15994 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15995 xfree((yyvsp[0].locations_lambda_body));
15996 }
15997 /*% ripper: lambda!($:args, $:body) %*/
15998 numparam_pop(p, (yyvsp[-5].node));
15999 dyna_pop(p, (yyvsp[-7].vars));
16000 }
16001#line 16002 "parse.c"
16002 break;
16003
16004 case 500: /* f_larglist: '(' f_largs opt_bv_decl ')' */
16005#line 5151 "parse.y"
16006 {
16007 p->ctxt.in_argdef = 0;
16008 (yyval.node_args) = (yyvsp[-2].node_args);
16009 p->max_numparam = ORDINAL_PARAM;
16010 /*% ripper: paren!($:args) %*/
16011 }
16012#line 16013 "parse.c"
16013 break;
16014
16015 case 501: /* f_larglist: f_largs */
16016#line 5158 "parse.y"
16017 {
16018 p->ctxt.in_argdef = 0;
16019 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
16020 p->max_numparam = ORDINAL_PARAM;
16021 (yyval.node_args) = (yyvsp[0].node_args);
16022 }
16023#line 16024 "parse.c"
16024 break;
16025
16026 case 502: /* lambda_body: tLAMBEG compstmt_stmts '}' */
16027#line 5167 "parse.y"
16028 {
16029 token_info_pop(p, "}", &(yylsp[0]));
16030 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
16031 /*% ripper: $:2 %*/
16032 }
16033#line 16034 "parse.c"
16034 break;
16035
16036 case 503: /* $@28: %empty */
16037#line 5173 "parse.y"
16038 {
16039 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
16040 }
16041#line 16042 "parse.c"
16042 break;
16043
16044 case 504: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
16045#line 5177 "parse.y"
16046 {
16047 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
16048 /*% ripper: $:3 %*/
16049 }
16050#line 16051 "parse.c"
16051 break;
16052
16053 case 505: /* do_block: k_do_block do_body k_end */
16054#line 5184 "parse.y"
16055 {
16056 (yyval.node) = (yyvsp[-1].node);
16057 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16058 /*% ripper: $:2 %*/
16059 }
16060#line 16061 "parse.c"
16061 break;
16062
16063 case 506: /* block_call: command do_block */
16064#line 5192 "parse.y"
16065 {
16066 (yyval.node) = command_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16067 fixpos((yyval.node), (yyvsp[-1].node));
16068 /*% ripper: method_add_block!($:1, $:2) %*/
16069 }
16070#line 16071 "parse.c"
16071 break;
16072
16073 case 507: /* block_call: block_call call_op2 operation2 opt_paren_args */
16074#line 5198 "parse.y"
16075 {
16076 bool has_args = (yyvsp[0].node) != 0;
16077 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
16078 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16079 /*% ripper: call!($:1, $:2, $:3) %*/
16080 if (has_args) {
16081 /*% ripper: method_add_arg!($:$, $:4) %*/
16082 }
16083 }
16084#line 16085 "parse.c"
16085 break;
16086
16087 case 508: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
16088#line 5208 "parse.y"
16089 {
16090 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
16091 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
16092 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
16093 }
16094#line 16095 "parse.c"
16095 break;
16096
16097 case 509: /* block_call: block_call call_op2 operation2 command_args do_block */
16098#line 5214 "parse.y"
16099 {
16100 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
16101 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
16102 }
16103#line 16104 "parse.c"
16104 break;
16105
16106 case 510: /* block_call: block_call call_op2 paren_args */
16107#line 5219 "parse.y"
16108 {
16109 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16110 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16111 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16112 }
16113#line 16114 "parse.c"
16114 break;
16115
16116 case 511: /* method_call: fcall paren_args */
16117#line 5227 "parse.y"
16118 {
16119 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
16120 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
16121 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
16122 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
16123 }
16124#line 16125 "parse.c"
16125 break;
16126
16127 case 512: /* method_call: primary_value call_op operation2 opt_paren_args */
16128#line 5234 "parse.y"
16129 {
16130 bool has_args = (yyvsp[0].node) != 0;
16131 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
16132 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16133 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16134 /*% ripper: call!($:1, $:2, $:3) %*/
16135 if (has_args) {
16136 /*% ripper: method_add_arg!($:$, $:4) %*/
16137 }
16138 }
16139#line 16140 "parse.c"
16140 break;
16141
16142 case 513: /* method_call: primary_value "::" operation2 paren_args */
16143#line 5245 "parse.y"
16144 {
16145 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16146 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16147 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
16148 }
16149#line 16150 "parse.c"
16150 break;
16151
16152 case 514: /* method_call: primary_value "::" operation3 */
16153#line 5251 "parse.y"
16154 {
16155 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
16156 /*% ripper: call!($:1, $:2, $:3) %*/
16157 }
16158#line 16159 "parse.c"
16159 break;
16160
16161 case 515: /* method_call: primary_value call_op2 paren_args */
16162#line 5256 "parse.y"
16163 {
16164 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16165 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16166 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16167 }
16168#line 16169 "parse.c"
16169 break;
16170
16171 case 516: /* method_call: "'super'" paren_args */
16172#line 5262 "parse.y"
16173 {
16174 rb_code_location_t lparen_loc = (yylsp[0]);
16175 rb_code_location_t rparen_loc = (yylsp[0]);
16176 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
16177 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
16178
16179 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
16180 /*% ripper: super!($:2) %*/
16181 }
16182#line 16183 "parse.c"
16183 break;
16184
16185 case 517: /* method_call: "'super'" */
16186#line 5272 "parse.y"
16187 {
16188 (yyval.node) = NEW_ZSUPER(&(yyloc));
16189 /*% ripper: zsuper! %*/
16190 }
16191#line 16192 "parse.c"
16192 break;
16193
16194 case 518: /* method_call: primary_value '[' opt_call_args rbracket */
16195#line 5277 "parse.y"
16196 {
16197 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
16198 fixpos((yyval.node), (yyvsp[-3].node));
16199 /*% ripper: aref!($:1, $:3) %*/
16200 }
16201#line 16202 "parse.c"
16202 break;
16203
16204 case 519: /* brace_block: '{' brace_body '}' */
16205#line 5285 "parse.y"
16206 {
16207 (yyval.node) = (yyvsp[-1].node);
16208 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16209 /*% ripper: $:2 %*/
16210 }
16211#line 16212 "parse.c"
16212 break;
16213
16214 case 520: /* brace_block: k_do do_body k_end */
16215#line 5291 "parse.y"
16216 {
16217 (yyval.node) = (yyvsp[-1].node);
16218 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16219 /*% ripper: $:2 %*/
16220 }
16221#line 16222 "parse.c"
16222 break;
16223
16224 case 521: /* @29: %empty */
16225#line 5298 "parse.y"
16226 {(yyval.vars) = dyna_push(p);}
16227#line 16228 "parse.c"
16228 break;
16229
16230 case 522: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
16231#line 5301 "parse.y"
16232 {
16233 int max_numparam = p->max_numparam;
16234 ID it_id = p->it_id;
16235 p->max_numparam = (yyvsp[-5].num);
16236 p->it_id = (yyvsp[-3].id);
16237 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16238 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16239 /*% ripper: brace_block!($:args, $:compstmt) %*/
16240 restore_block_exit(p, (yyvsp[-2].node_exits));
16241 numparam_pop(p, (yyvsp[-4].node));
16242 dyna_pop(p, (yyvsp[-6].vars));
16243 }
16244#line 16245 "parse.c"
16245 break;
16246
16247 case 523: /* @30: %empty */
16248#line 5315 "parse.y"
16249 {
16250 (yyval.vars) = dyna_push(p);
16251 CMDARG_PUSH(0);
16252 }
16253#line 16254 "parse.c"
16254 break;
16255
16256 case 524: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
16257#line 5321 "parse.y"
16258 {
16259 int max_numparam = p->max_numparam;
16260 ID it_id = p->it_id;
16261 p->max_numparam = (yyvsp[-5].num);
16262 p->it_id = (yyvsp[-3].id);
16263 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16264 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16265 /*% ripper: do_block!($:args, $:bodystmt) %*/
16266 CMDARG_POP();
16267 restore_block_exit(p, (yyvsp[-2].node_exits));
16268 numparam_pop(p, (yyvsp[-4].node));
16269 dyna_pop(p, (yyvsp[-6].vars));
16270 }
16271#line 16272 "parse.c"
16272 break;
16273
16274 case 525: /* case_args: arg_value */
16275#line 5337 "parse.y"
16276 {
16277 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16278 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16279 /*% ripper: args_add!(args_new!, $:arg_value) %*/
16280 }
16281#line 16282 "parse.c"
16282 break;
16283
16284 case 526: /* case_args: "*" arg_value */
16285#line 5343 "parse.y"
16286 {
16287 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16288 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16289 }
16290#line 16291 "parse.c"
16291 break;
16292
16293 case 527: /* case_args: case_args ',' arg_value */
16294#line 5348 "parse.y"
16295 {
16296 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16297 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16298 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16299 }
16300#line 16301 "parse.c"
16301 break;
16302
16303 case 528: /* case_args: case_args ',' "*" arg_value */
16304#line 5354 "parse.y"
16305 {
16306 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16307 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16308 }
16309#line 16310 "parse.c"
16310 break;
16311
16312 case 529: /* case_body: k_when case_args then compstmt_stmts cases */
16313#line 5363 "parse.y"
16314 {
16315 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16316 fixpos((yyval.node), (yyvsp[-3].node));
16317 /*% ripper: when!($:2, $:4, $:5) %*/
16318 }
16319#line 16320 "parse.c"
16320 break;
16321
16322 case 532: /* p_pvtbl: %empty */
16323#line 5374 "parse.y"
16324 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16325#line 16326 "parse.c"
16326 break;
16327
16328 case 533: /* p_pktbl: %empty */
16329#line 5375 "parse.y"
16330 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16331#line 16332 "parse.c"
16332 break;
16333
16334 case 534: /* p_in_kwarg: %empty */
16335#line 5377 "parse.y"
16336 {
16337 (yyval.ctxt) = p->ctxt;
16338 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16339 p->command_start = FALSE;
16340 p->ctxt.in_kwarg = 1;
16341 p->ctxt.in_alt_pattern = 0;
16342 p->ctxt.capture_in_pattern = 0;
16343 }
16344#line 16345 "parse.c"
16345 break;
16346
16347 case 535: /* $@31: %empty */
16348#line 5390 "parse.y"
16349 {
16350 pop_pktbl(p, (yyvsp[-2].tbl));
16351 pop_pvtbl(p, (yyvsp[-3].tbl));
16352 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16353 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16354 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16355 }
16356#line 16357 "parse.c"
16357 break;
16358
16359 case 536: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16360#line 5399 "parse.y"
16361 {
16362 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16363 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16364 }
16365#line 16366 "parse.c"
16366 break;
16367
16368 case 540: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16369#line 5411 "parse.y"
16370 {
16371 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16372 fixpos((yyval.node), (yyvsp[0].node));
16373 /*% ripper: if_mod!($:3, $:1) %*/
16374 }
16375#line 16376 "parse.c"
16376 break;
16377
16378 case 541: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16379#line 5417 "parse.y"
16380 {
16381 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16382 fixpos((yyval.node), (yyvsp[0].node));
16383 /*% ripper: unless_mod!($:3, $:1) %*/
16384 }
16385#line 16386 "parse.c"
16386 break;
16387
16388 case 543: /* p_top_expr_body: p_expr ',' */
16389#line 5426 "parse.y"
16390 {
16391 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16392 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16393 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16394 }
16395#line 16396 "parse.c"
16396 break;
16397
16398 case 544: /* p_top_expr_body: p_expr ',' p_args */
16399#line 5432 "parse.y"
16400 {
16401 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16402 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16403 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16404 }
16405#line 16406 "parse.c"
16406 break;
16407
16408 case 545: /* p_top_expr_body: p_find */
16409#line 5438 "parse.y"
16410 {
16411 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16412 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16413 }
16414#line 16415 "parse.c"
16415 break;
16416
16417 case 546: /* p_top_expr_body: p_args_tail */
16418#line 5443 "parse.y"
16419 {
16420 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16421 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16422 }
16423#line 16424 "parse.c"
16424 break;
16425
16426 case 547: /* p_top_expr_body: p_kwargs */
16427#line 5448 "parse.y"
16428 {
16429 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16430 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16431 }
16432#line 16433 "parse.c"
16433 break;
16434
16435 case 549: /* p_as: p_expr "=>" p_variable */
16436#line 5458 "parse.y"
16437 {
16438 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16439 n = list_append(p, n, (yyvsp[0].node));
16440 (yyval.node) = new_hash(p, n, &(yyloc));
16441 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16442 }
16443#line 16444 "parse.c"
16444 break;
16445
16446 case 551: /* $@32: %empty */
16447#line 5468 "parse.y"
16448 {
16449 p->ctxt.in_alt_pattern = 1;
16450 }
16451#line 16452 "parse.c"
16452 break;
16453
16454 case 552: /* p_alt: p_alt '|' $@32 p_expr_basic */
16455#line 5472 "parse.y"
16456 {
16457 if (p->ctxt.capture_in_pattern) {
16458 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16459 }
16460 p->ctxt.in_alt_pattern = 0;
16461 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16462 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16463 }
16464#line 16465 "parse.c"
16465 break;
16466
16467 case 554: /* p_lparen: '(' p_pktbl */
16468#line 5484 "parse.y"
16469 {
16470 (yyval.tbl) = (yyvsp[0].tbl);
16471 /*% ripper: $:2 %*/
16472 }
16473#line 16474 "parse.c"
16474 break;
16475
16476 case 555: /* p_lbracket: '[' p_pktbl */
16477#line 5491 "parse.y"
16478 {
16479 (yyval.tbl) = (yyvsp[0].tbl);
16480 /*% ripper: $:2 %*/
16481 }
16482#line 16483 "parse.c"
16483 break;
16484
16485 case 558: /* p_expr_basic: p_const p_lparen p_args rparen */
16486#line 5500 "parse.y"
16487 {
16488 pop_pktbl(p, (yyvsp[-2].tbl));
16489 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16490 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16491 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16492 }
16493#line 16494 "parse.c"
16494 break;
16495
16496 case 559: /* p_expr_basic: p_const p_lparen p_find rparen */
16497#line 5507 "parse.y"
16498 {
16499 pop_pktbl(p, (yyvsp[-2].tbl));
16500 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16501 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16502 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16503 }
16504#line 16505 "parse.c"
16505 break;
16506
16507 case 560: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16508#line 5514 "parse.y"
16509 {
16510 pop_pktbl(p, (yyvsp[-2].tbl));
16511 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16512 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16513 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16514 }
16515#line 16516 "parse.c"
16516 break;
16517
16518 case 561: /* p_expr_basic: p_const '(' rparen */
16519#line 5521 "parse.y"
16520 {
16521 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16522 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16523 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16524 }
16525#line 16526 "parse.c"
16526 break;
16527
16528 case 562: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16529#line 5527 "parse.y"
16530 {
16531 pop_pktbl(p, (yyvsp[-2].tbl));
16532 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16533 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16534 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16535 }
16536#line 16537 "parse.c"
16537 break;
16538
16539 case 563: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16540#line 5534 "parse.y"
16541 {
16542 pop_pktbl(p, (yyvsp[-2].tbl));
16543 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16544 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16545 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16546 }
16547#line 16548 "parse.c"
16548 break;
16549
16550 case 564: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16551#line 5541 "parse.y"
16552 {
16553 pop_pktbl(p, (yyvsp[-2].tbl));
16554 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16555 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16556 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16557 }
16558#line 16559 "parse.c"
16559 break;
16560
16561 case 565: /* p_expr_basic: p_const '[' rbracket */
16562#line 5548 "parse.y"
16563 {
16564 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16565 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16566 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16567 }
16568#line 16569 "parse.c"
16569 break;
16570
16571 case 566: /* p_expr_basic: "[" p_args rbracket */
16572#line 5554 "parse.y"
16573 {
16574 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16575 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16576 }
16577#line 16578 "parse.c"
16578 break;
16579
16580 case 567: /* p_expr_basic: "[" p_find rbracket */
16581#line 5559 "parse.y"
16582 {
16583 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16584 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16585 }
16586#line 16587 "parse.c"
16587 break;
16588
16589 case 568: /* p_expr_basic: "[" rbracket */
16590#line 5564 "parse.y"
16591 {
16592 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16593 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16594 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16595 }
16596#line 16597 "parse.c"
16597 break;
16598
16599 case 569: /* $@33: %empty */
16600#line 5570 "parse.y"
16601 {
16602 p->ctxt.in_kwarg = 0;
16603 }
16604#line 16605 "parse.c"
16605 break;
16606
16607 case 570: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16608#line 5574 "parse.y"
16609 {
16610 pop_pktbl(p, (yyvsp[-4].tbl));
16611 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16612 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16613 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16614 }
16615#line 16616 "parse.c"
16616 break;
16617
16618 case 571: /* p_expr_basic: "{" rbrace */
16619#line 5581 "parse.y"
16620 {
16621 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16622 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16623 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16624 }
16625#line 16626 "parse.c"
16626 break;
16627
16628 case 572: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16629#line 5587 "parse.y"
16630 {
16631 pop_pktbl(p, (yyvsp[-2].tbl));
16632 (yyval.node) = (yyvsp[-1].node);
16633 /*% ripper: $:p_expr %*/
16634 }
16635#line 16636 "parse.c"
16636 break;
16637
16638 case 573: /* p_args: p_expr */
16639#line 5595 "parse.y"
16640 {
16641 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16642 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16643 /*% ripper: [[$:1], Qnil, Qnil] %*/
16644 }
16645#line 16646 "parse.c"
16646 break;
16647
16648 case 574: /* p_args: p_args_head */
16649#line 5601 "parse.y"
16650 {
16651 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16652 /*% ripper: [$:1, Qnil, Qnil] %*/
16653 }
16654#line 16655 "parse.c"
16655 break;
16656
16657 case 575: /* p_args: p_args_head p_arg */
16658#line 5606 "parse.y"
16659 {
16660 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16661 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16662 }
16663#line 16664 "parse.c"
16664 break;
16665
16666 case 576: /* p_args: p_args_head p_rest */
16667#line 5611 "parse.y"
16668 {
16669 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16670 /*% ripper: [$:1, $:2, Qnil] %*/
16671 }
16672#line 16673 "parse.c"
16673 break;
16674
16675 case 577: /* p_args: p_args_head p_rest ',' p_args_post */
16676#line 5616 "parse.y"
16677 {
16678 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16679 /*% ripper: [$:1, $:2, $:4] %*/
16680 }
16681#line 16682 "parse.c"
16682 break;
16683
16684 case 580: /* p_args_head: p_args_head p_arg ',' */
16685#line 5625 "parse.y"
16686 {
16687 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16688 /*% ripper: rb_ary_concat($:1, $:2) %*/
16689 }
16690#line 16691 "parse.c"
16691 break;
16692
16693 case 581: /* p_args_tail: p_rest */
16694#line 5632 "parse.y"
16695 {
16696 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16697 /*% ripper: [Qnil, $:1, Qnil] %*/
16698 }
16699#line 16700 "parse.c"
16700 break;
16701
16702 case 582: /* p_args_tail: p_rest ',' p_args_post */
16703#line 5637 "parse.y"
16704 {
16705 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16706 /*% ripper: [Qnil, $:1, $:3] %*/
16707 }
16708#line 16709 "parse.c"
16709 break;
16710
16711 case 583: /* p_find: p_rest ',' p_args_post ',' p_rest */
16712#line 5644 "parse.y"
16713 {
16714 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16715 /*% ripper: [$:1, $:3, $:5] %*/
16716 }
16717#line 16718 "parse.c"
16718 break;
16719
16720 case 584: /* p_rest: "*" "local variable or method" */
16721#line 5652 "parse.y"
16722 {
16723 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16724 /*% ripper: var_field!($:2) %*/
16725 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16726 }
16727#line 16728 "parse.c"
16728 break;
16729
16730 case 585: /* p_rest: "*" */
16731#line 5658 "parse.y"
16732 {
16733 (yyval.node) = 0;
16734 /*% ripper: var_field!(Qnil) %*/
16735 }
16736#line 16737 "parse.c"
16737 break;
16738
16739 case 587: /* p_args_post: p_args_post ',' p_arg */
16740#line 5666 "parse.y"
16741 {
16742 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16743 /*% ripper: rb_ary_concat($:1, $:3) %*/
16744 }
16745#line 16746 "parse.c"
16746 break;
16747
16748 case 588: /* p_arg: p_expr */
16749#line 5673 "parse.y"
16750 {
16751 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16752 /*% ripper: [$:1] %*/
16753 }
16754#line 16755 "parse.c"
16755 break;
16756
16757 case 589: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16758#line 5680 "parse.y"
16759 {
16760 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16761 /*% ripper: [$:1, $:3] %*/
16762 }
16763#line 16764 "parse.c"
16764 break;
16765
16766 case 590: /* p_kwargs: p_kwarg */
16767#line 5685 "parse.y"
16768 {
16769 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16770 /*% ripper: [$:1, Qnil] %*/
16771 }
16772#line 16773 "parse.c"
16773 break;
16774
16775 case 591: /* p_kwargs: p_kwarg ',' */
16776#line 5690 "parse.y"
16777 {
16778 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16779 /*% ripper: [$:1, Qnil] %*/
16780 }
16781#line 16782 "parse.c"
16782 break;
16783
16784 case 592: /* p_kwargs: p_any_kwrest */
16785#line 5695 "parse.y"
16786 {
16787 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16788 /*% ripper: [[], $:1] %*/
16789 }
16790#line 16791 "parse.c"
16791 break;
16792
16793 case 594: /* p_kwarg: p_kwarg ',' p_kw */
16794#line 5704 "parse.y"
16795 {
16796 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16797 /*% ripper: rb_ary_push($:1, $:3) %*/
16798 }
16799#line 16800 "parse.c"
16800 break;
16801
16802 case 595: /* p_kw: p_kw_label p_expr */
16803#line 5711 "parse.y"
16804 {
16805 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16806 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16807 /*% ripper: [$:1, $:2] %*/
16808 }
16809#line 16810 "parse.c"
16810 break;
16811
16812 case 596: /* p_kw: p_kw_label */
16813#line 5717 "parse.y"
16814 {
16815 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16816 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16817 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16818 }
16819 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16820 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16821 /*% ripper: [$:1, Qnil] %*/
16822 }
16823#line 16824 "parse.c"
16824 break;
16825
16826 case 598: /* p_kw_label: "string literal" string_contents tLABEL_END */
16827#line 5730 "parse.y"
16828 {
16829 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16830 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16831 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16832 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16833 }
16834 else {
16835 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16836 (yyval.id) = rb_intern_str(STR_NEW0());
16837 }
16838 /*% ripper: $:2 %*/
16839 }
16840#line 16841 "parse.c"
16841 break;
16842
16843 case 599: /* p_kwrest: kwrest_mark "local variable or method" */
16844#line 5745 "parse.y"
16845 {
16846 (yyval.id) = (yyvsp[0].id);
16847 /*% ripper: var_field!($:2) %*/
16848 }
16849#line 16850 "parse.c"
16850 break;
16851
16852 case 600: /* p_kwrest: kwrest_mark */
16853#line 5750 "parse.y"
16854 {
16855 (yyval.id) = 0;
16856 /*% ripper: Qnil %*/
16857 }
16858#line 16859 "parse.c"
16859 break;
16860
16861 case 601: /* p_kwnorest: kwrest_mark "'nil'" */
16862#line 5757 "parse.y"
16863 {
16864 (yyval.id) = 0;
16865 }
16866#line 16867 "parse.c"
16867 break;
16868
16869 case 603: /* p_any_kwrest: p_kwnorest */
16870#line 5764 "parse.y"
16871 {
16872 (yyval.id) = idNil;
16873 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16874 }
16875#line 16876 "parse.c"
16876 break;
16877
16878 case 605: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16879#line 3130 "parse.y"
16880 {
16881 value_expr(p, (yyvsp[-2].node));
16882 value_expr(p, (yyvsp[0].node));
16883 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16884 /*% ripper: dot2!($:1, $:3) %*/
16885 }
16886#line 16887 "parse.c"
16887 break;
16888
16889 case 606: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16890#line 3137 "parse.y"
16891 {
16892 value_expr(p, (yyvsp[-2].node));
16893 value_expr(p, (yyvsp[0].node));
16894 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16895 /*% ripper: dot3!($:1, $:3) %*/
16896 }
16897#line 16898 "parse.c"
16898 break;
16899
16900 case 607: /* range_expr_p_primitive: p_primitive ".." */
16901#line 3144 "parse.y"
16902 {
16903 value_expr(p, (yyvsp[-1].node));
16904 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16905 /*% ripper: dot2!($:1, Qnil) %*/
16906 }
16907#line 16908 "parse.c"
16908 break;
16909
16910 case 608: /* range_expr_p_primitive: p_primitive "..." */
16911#line 3150 "parse.y"
16912 {
16913 value_expr(p, (yyvsp[-1].node));
16914 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16915 /*% ripper: dot3!($:1, Qnil) %*/
16916 }
16917#line 16918 "parse.c"
16918 break;
16919
16920 case 609: /* range_expr_p_primitive: "(.." p_primitive */
16921#line 3156 "parse.y"
16922 {
16923 value_expr(p, (yyvsp[0].node));
16924 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16925 /*% ripper: dot2!(Qnil, $:2) %*/
16926 }
16927#line 16928 "parse.c"
16928 break;
16929
16930 case 610: /* range_expr_p_primitive: "(..." p_primitive */
16931#line 3162 "parse.y"
16932 {
16933 value_expr(p, (yyvsp[0].node));
16934 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16935 /*% ripper: dot3!(Qnil, $:2) %*/
16936 }
16937#line 16938 "parse.c"
16938 break;
16939
16940 case 623: /* p_primitive: keyword_variable */
16941#line 5779 "parse.y"
16942 {
16943 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16944 /*% ripper: var_ref!($:1) %*/
16945 }
16946#line 16947 "parse.c"
16947 break;
16948
16949 case 625: /* p_variable: "local variable or method" */
16950#line 5787 "parse.y"
16951 {
16952 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16953 /*% ripper: var_field!($:1) %*/
16954 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16955 }
16956#line 16957 "parse.c"
16957 break;
16958
16959 case 626: /* p_var_ref: '^' "local variable or method" */
16960#line 5795 "parse.y"
16961 {
16962 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16963 if (!n) {
16964 n = NEW_ERROR(&(yyloc));
16965 }
16966 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16967 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16968 }
16969 (yyval.node) = n;
16970 /*% ripper: var_ref!($:2) %*/
16971 }
16972#line 16973 "parse.c"
16973 break;
16974
16975 case 627: /* p_var_ref: '^' nonlocal_var */
16976#line 5807 "parse.y"
16977 {
16978 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16979 /*% ripper: var_ref!($:2) %*/
16980 }
16981#line 16982 "parse.c"
16982 break;
16983
16984 case 628: /* p_expr_ref: '^' "(" expr_value rparen */
16985#line 5814 "parse.y"
16986 {
16987 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16988 /*% ripper: begin!($:3) %*/
16989 }
16990#line 16991 "parse.c"
16991 break;
16992
16993 case 629: /* p_const: ":: at EXPR_BEG" cname */
16994#line 5821 "parse.y"
16995 {
16996 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16997 /*% ripper: top_const_ref!($:2) %*/
16998 }
16999#line 17000 "parse.c"
17000 break;
17001
17002 case 630: /* p_const: p_const "::" cname */
17003#line 5826 "parse.y"
17004 {
17005 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
17006 /*% ripper: const_path_ref!($:1, $:3) %*/
17007 }
17008#line 17009 "parse.c"
17009 break;
17010
17011 case 631: /* p_const: "constant" */
17012#line 5831 "parse.y"
17013 {
17014 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
17015 /*% ripper: var_ref!($:1) %*/
17016 }
17017#line 17018 "parse.c"
17018 break;
17019
17020 case 632: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
17021#line 5840 "parse.y"
17022 {
17023 NODE *err = (yyvsp[-3].node);
17024 if ((yyvsp[-3].node)) {
17025 err = NEW_ERRINFO(&(yylsp[-3]));
17026 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
17027 }
17028 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17029 if ((yyvsp[-4].node)) {
17030 fixpos((yyval.node), (yyvsp[-4].node));
17031 }
17032 else if ((yyvsp[-3].node)) {
17033 fixpos((yyval.node), (yyvsp[-3].node));
17034 }
17035 else {
17036 fixpos((yyval.node), (yyvsp[-1].node));
17037 }
17038 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
17039 }
17040#line 17041 "parse.c"
17041 break;
17042
17043 case 634: /* exc_list: arg_value */
17044#line 5862 "parse.y"
17045 {
17046 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
17047 /*% ripper: rb_ary_new3(1, $:1) %*/
17048 }
17049#line 17050 "parse.c"
17050 break;
17051
17052 case 635: /* exc_list: mrhs */
17053#line 5867 "parse.y"
17054 {
17055 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
17056 }
17057#line 17058 "parse.c"
17058 break;
17059
17060 case 637: /* exc_var: "=>" lhs */
17061#line 5874 "parse.y"
17062 {
17063 (yyval.node) = (yyvsp[0].node);
17064 /*% ripper: $:2 %*/
17065 }
17066#line 17067 "parse.c"
17067 break;
17068
17069 case 639: /* opt_ensure: k_ensure stmts option_terms */
17070#line 5882 "parse.y"
17071 {
17072 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
17073 (yyval.node) = (yyvsp[-1].node);
17074 void_expr(p, void_stmts(p, (yyval.node)));
17075 /*% ripper: ensure!($:2) %*/
17076 }
17077#line 17078 "parse.c"
17078 break;
17079
17080 case 643: /* strings: string */
17081#line 5896 "parse.y"
17082 {
17083 if (!(yyvsp[0].node)) {
17084 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
17085 }
17086 else {
17087 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
17088 }
17089 /*% ripper: $:1 %*/
17090 }
17091#line 17092 "parse.c"
17092 break;
17093
17094 case 646: /* string: string string1 */
17095#line 5910 "parse.y"
17096 {
17097 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17098 /*% ripper: string_concat!($:1, $:2) %*/
17099 }
17100#line 17101 "parse.c"
17101 break;
17102
17103 case 647: /* string1: "string literal" string_contents "terminator" */
17104#line 5917 "parse.y"
17105 {
17106 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
17107 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
17108 /*% ripper: $:2 %*/
17109 if (p->heredoc_indent > 0) {
17110 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
17111 p->heredoc_indent = 0;
17112 }
17113 /*% ripper: string_literal!($:$) %*/
17114 }
17115#line 17116 "parse.c"
17116 break;
17117
17118 case 648: /* xstring: "backtick literal" xstring_contents "terminator" */
17119#line 5930 "parse.y"
17120 {
17121 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
17122 /*% ripper: $:2 %*/
17123 if (p->heredoc_indent > 0) {
17124 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
17125 p->heredoc_indent = 0;
17126 }
17127 /*% ripper: xstring_literal!($:$) %*/
17128 }
17129#line 17130 "parse.c"
17130 break;
17131
17132 case 649: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
17133#line 5942 "parse.y"
17134 {
17135 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
17136 /*% ripper: regexp_literal!($:2, $:3) %*/
17137 }
17138#line 17139 "parse.c"
17139 break;
17140
17141 case 652: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
17142#line 3179 "parse.y"
17143 {
17144 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17145 /*% ripper: array!($:word_list) %*/
17146 }
17147#line 17148 "parse.c"
17148 break;
17149
17150 case 654: /* word_list: %empty */
17151#line 5952 "parse.y"
17152 {
17153 (yyval.node) = 0;
17154 /*% ripper: words_new! %*/
17155 }
17156#line 17157 "parse.c"
17157 break;
17158
17159 case 655: /* word_list: word_list word nonempty_list_' ' */
17160#line 5957 "parse.y"
17161 {
17162 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17163 /*% ripper: words_add!($:1, $:2) %*/
17164 }
17165#line 17166 "parse.c"
17166 break;
17167
17168 case 657: /* word: word string_content */
17169#line 5966 "parse.y"
17170 {
17171 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17172 /*% ripper: word_add!($:1, $:2) %*/
17173 }
17174#line 17175 "parse.c"
17175 break;
17176
17177 case 658: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
17178#line 3179 "parse.y"
17179 {
17180 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17181 /*% ripper: array!($:word_list) %*/
17182 }
17183#line 17184 "parse.c"
17184 break;
17185
17186 case 660: /* symbol_list: %empty */
17187#line 5976 "parse.y"
17188 {
17189 (yyval.node) = 0;
17190 /*% ripper: symbols_new! %*/
17191 }
17192#line 17193 "parse.c"
17193 break;
17194
17195 case 661: /* symbol_list: symbol_list word nonempty_list_' ' */
17196#line 5981 "parse.y"
17197 {
17198 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17199 /*% ripper: symbols_add!($:1, $:2) %*/
17200 }
17201#line 17202 "parse.c"
17202 break;
17203
17204 case 662: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
17205#line 3179 "parse.y"
17206 {
17207 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17208 /*% ripper: array!($:word_list) %*/
17209 }
17210#line 17211 "parse.c"
17211 break;
17212
17213 case 664: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
17214#line 3179 "parse.y"
17215 {
17216 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17217 /*% ripper: array!($:word_list) %*/
17218 }
17219#line 17220 "parse.c"
17220 break;
17221
17222 case 666: /* qword_list: %empty */
17223#line 5994 "parse.y"
17224 {
17225 (yyval.node) = 0;
17226 /*% ripper: qwords_new! %*/
17227 }
17228#line 17229 "parse.c"
17229 break;
17230
17231 case 667: /* qword_list: qword_list "literal content" nonempty_list_' ' */
17232#line 5999 "parse.y"
17233 {
17234 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17235 /*% ripper: qwords_add!($:1, $:2) %*/
17236 }
17237#line 17238 "parse.c"
17238 break;
17239
17240 case 668: /* qsym_list: %empty */
17241#line 6006 "parse.y"
17242 {
17243 (yyval.node) = 0;
17244 /*% ripper: qsymbols_new! %*/
17245 }
17246#line 17247 "parse.c"
17247 break;
17248
17249 case 669: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
17250#line 6011 "parse.y"
17251 {
17252 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17253 /*% ripper: qsymbols_add!($:1, $:2) %*/
17254 }
17255#line 17256 "parse.c"
17256 break;
17257
17258 case 670: /* string_contents: %empty */
17259#line 6018 "parse.y"
17260 {
17261 (yyval.node) = 0;
17262 /*% ripper: string_content! %*/
17263 }
17264#line 17265 "parse.c"
17265 break;
17266
17267 case 671: /* string_contents: string_contents string_content */
17268#line 6023 "parse.y"
17269 {
17270 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17271 /*% ripper: string_add!($:1, $:2) %*/
17272 }
17273#line 17274 "parse.c"
17274 break;
17275
17276 case 672: /* xstring_contents: %empty */
17277#line 6030 "parse.y"
17278 {
17279 (yyval.node) = 0;
17280 /*% ripper: xstring_new! %*/
17281 }
17282#line 17283 "parse.c"
17283 break;
17284
17285 case 673: /* xstring_contents: xstring_contents string_content */
17286#line 6035 "parse.y"
17287 {
17288 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17289 /*% ripper: xstring_add!($:1, $:2) %*/
17290 }
17291#line 17292 "parse.c"
17292 break;
17293
17294 case 674: /* regexp_contents: %empty */
17295#line 6042 "parse.y"
17296 {
17297 (yyval.node) = 0;
17298 /*% ripper: regexp_new! %*/
17299 }
17300#line 17301 "parse.c"
17301 break;
17302
17303 case 675: /* regexp_contents: regexp_contents string_content */
17304#line 6047 "parse.y"
17305 {
17306 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17307 if (!head) {
17308 (yyval.node) = tail;
17309 }
17310 else if (!tail) {
17311 (yyval.node) = head;
17312 }
17313 else {
17314 switch (nd_type(head)) {
17315 case NODE_STR:
17316 head = str2dstr(p, head);
17317 break;
17318 case NODE_DSTR:
17319 break;
17320 default:
17321 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17322 break;
17323 }
17324 (yyval.node) = list_append(p, head, tail);
17325 }
17326 /*% ripper: regexp_add!($:1, $:2) %*/
17327 }
17328#line 17329 "parse.c"
17329 break;
17330
17331 case 677: /* @34: %empty */
17332#line 6075 "parse.y"
17333 {
17334 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17335 (yyval.strterm) = p->lex.strterm;
17336 p->lex.strterm = 0;
17337 SET_LEX_STATE(EXPR_BEG);
17338 }
17339#line 17340 "parse.c"
17340 break;
17341
17342 case 678: /* string_content: tSTRING_DVAR @34 string_dvar */
17343#line 6082 "parse.y"
17344 {
17345 p->lex.strterm = (yyvsp[-1].strterm);
17346 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17347 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17348 /*% ripper: string_dvar!($:dvar) %*/
17349 }
17350#line 17351 "parse.c"
17351 break;
17352
17353 case 679: /* @35: %empty */
17354#line 6089 "parse.y"
17355 {
17356 CMDARG_PUSH(0);
17357 COND_PUSH(0);
17358 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17359 (yyval.strterm) = p->lex.strterm;
17360 p->lex.strterm = 0;
17361 SET_LEX_STATE(EXPR_BEG);
17362 }
17363#line 17364 "parse.c"
17364 break;
17365
17366 case 680: /* @36: %empty */
17367#line 6097 "parse.y"
17368 {
17369 (yyval.num) = p->lex.brace_nest;
17370 p->lex.brace_nest = 0;
17371 }
17372#line 17373 "parse.c"
17373 break;
17374
17375 case 681: /* @37: %empty */
17376#line 6101 "parse.y"
17377 {
17378 (yyval.num) = p->lex.lpar_beg;
17379 p->lex.lpar_beg = -1;
17380 }
17381#line 17382 "parse.c"
17382 break;
17383
17384 case 682: /* @38: %empty */
17385#line 6105 "parse.y"
17386 {
17387 (yyval.num) = p->heredoc_indent;
17388 p->heredoc_indent = 0;
17389 }
17390#line 17391 "parse.c"
17391 break;
17392
17393 case 683: /* string_content: "'#{'" @35 @36 @37 @38 compstmt_stmts string_dend */
17394#line 6110 "parse.y"
17395 {
17396 COND_POP();
17397 CMDARG_POP();
17398 p->lex.strterm = (yyvsp[-5].strterm);
17399 SET_LEX_STATE((yyvsp[-6].state));
17400 p->lex.brace_nest = (yyvsp[-4].num);
17401 p->lex.lpar_beg = (yyvsp[-3].num);
17402 p->heredoc_indent = (yyvsp[-2].num);
17403 p->heredoc_line_indent = -1;
17404 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17405 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[0]));
17406 /*% ripper: string_embexpr!($:compstmt) %*/
17407 }
17408#line 17409 "parse.c"
17409 break;
17410
17411 case 686: /* string_dvar: nonlocal_var */
17412#line 6130 "parse.y"
17413 {
17414 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17415 /*% ripper: var_ref!($:1) %*/
17416 }
17417#line 17418 "parse.c"
17418 break;
17419
17420 case 690: /* ssym: "symbol literal" sym */
17421#line 6142 "parse.y"
17422 {
17423 SET_LEX_STATE(EXPR_END);
17424 VALUE str = rb_id2str((yyvsp[0].id));
17425 /*
17426 * TODO:
17427 * set_yylval_noname sets invalid id to yylval.
17428 * This branch can be removed once yylval is changed to
17429 * hold lexed string.
17430 */
17431 if (!str) str = STR_NEW0();
17432 (yyval.node) = NEW_SYM(str, &(yyloc));
17433 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17434 }
17435#line 17436 "parse.c"
17436 break;
17437
17438 case 693: /* dsym: "symbol literal" string_contents "terminator" */
17439#line 6162 "parse.y"
17440 {
17441 SET_LEX_STATE(EXPR_END);
17442 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17443 /*% ripper: dyna_symbol!($:2) %*/
17444 }
17445#line 17446 "parse.c"
17446 break;
17447
17448 case 695: /* numeric: tUMINUS_NUM simple_numeric */
17449#line 6171 "parse.y"
17450 {
17451 (yyval.node) = (yyvsp[0].node);
17452 negate_lit(p, (yyval.node), &(yyloc));
17453 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17454 }
17455#line 17456 "parse.c"
17456 break;
17457
17458 case 706: /* keyword_variable: "'nil'" */
17459#line 6193 "parse.y"
17460 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17461#line 17462 "parse.c"
17462 break;
17463
17464 case 707: /* keyword_variable: "'self'" */
17465#line 6194 "parse.y"
17466 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17467#line 17468 "parse.c"
17468 break;
17469
17470 case 708: /* keyword_variable: "'true'" */
17471#line 6195 "parse.y"
17472 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17473#line 17474 "parse.c"
17474 break;
17475
17476 case 709: /* keyword_variable: "'false'" */
17477#line 6196 "parse.y"
17478 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17479#line 17480 "parse.c"
17480 break;
17481
17482 case 710: /* keyword_variable: "'__FILE__'" */
17483#line 6197 "parse.y"
17484 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17485#line 17486 "parse.c"
17486 break;
17487
17488 case 711: /* keyword_variable: "'__LINE__'" */
17489#line 6198 "parse.y"
17490 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17491#line 17492 "parse.c"
17492 break;
17493
17494 case 712: /* keyword_variable: "'__ENCODING__'" */
17495#line 6199 "parse.y"
17496 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17497#line 17498 "parse.c"
17498 break;
17499
17500 case 713: /* var_ref: user_variable */
17501#line 6203 "parse.y"
17502 {
17503 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17504 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17505 /*% ripper: var_ref!($:1) %*/
17506 }
17507 else {
17508 /*% ripper: vcall!($:1) %*/
17509 }
17510 }
17511#line 17512 "parse.c"
17512 break;
17513
17514 case 714: /* var_ref: keyword_variable */
17515#line 6213 "parse.y"
17516 {
17517 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17518 /*% ripper: var_ref!($:1) %*/
17519 }
17520#line 17521 "parse.c"
17521 break;
17522
17523 case 715: /* var_lhs: user_variable */
17524#line 6220 "parse.y"
17525 {
17526 /*% ripper: var_field!($:1) %*/
17527 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17528 }
17529#line 17530 "parse.c"
17530 break;
17531
17532 case 716: /* var_lhs: keyword_variable */
17533#line 6220 "parse.y"
17534 {
17535 /*% ripper: var_field!($:1) %*/
17536 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17537 }
17538#line 17539 "parse.c"
17539 break;
17540
17541 case 719: /* $@39: %empty */
17542#line 6231 "parse.y"
17543 {
17544 SET_LEX_STATE(EXPR_BEG);
17545 p->command_start = TRUE;
17546 }
17547#line 17548 "parse.c"
17548 break;
17549
17550 case 720: /* superclass: '<' $@39 expr_value term */
17551#line 6236 "parse.y"
17552 {
17553 (yyval.node) = (yyvsp[-1].node);
17554 /*% ripper: $:3 %*/
17555 }
17556#line 17557 "parse.c"
17557 break;
17558
17559 case 723: /* f_opt_paren_args: f_empty_arg */
17560#line 6245 "parse.y"
17561 {
17562 p->ctxt.in_argdef = 0;
17563 }
17564#line 17565 "parse.c"
17565 break;
17566
17567 case 724: /* f_empty_arg: %empty */
17568#line 6251 "parse.y"
17569 {
17570 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17571 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17572 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17573 }
17574#line 17575 "parse.c"
17575 break;
17576
17577 case 725: /* f_paren_args: '(' f_args rparen */
17578#line 6259 "parse.y"
17579 {
17580 (yyval.node_args) = (yyvsp[-1].node_args);
17581 /*% ripper: paren!($:2) %*/
17582 SET_LEX_STATE(EXPR_BEG);
17583 p->command_start = TRUE;
17584 p->ctxt.in_argdef = 0;
17585 }
17586#line 17587 "parse.c"
17587 break;
17588
17589 case 727: /* @40: %empty */
17590#line 6269 "parse.y"
17591 {
17592 (yyval.ctxt) = p->ctxt;
17593 p->ctxt.in_kwarg = 1;
17594 p->ctxt.in_argdef = 1;
17595 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17596 }
17597#line 17598 "parse.c"
17598 break;
17599
17600 case 728: /* f_arglist: @40 f_args term */
17601#line 6276 "parse.y"
17602 {
17603 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17604 p->ctxt.in_argdef = 0;
17605 (yyval.node_args) = (yyvsp[-1].node_args);
17606 SET_LEX_STATE(EXPR_BEG);
17607 p->command_start = TRUE;
17608 /*% ripper: $:2 %*/
17609 }
17610#line 17611 "parse.c"
17611 break;
17612
17613 case 729: /* f_kw_arg_value: f_label arg_value */
17614#line 3030 "parse.y"
17615 {
17616 p->ctxt.in_argdef = 1;
17617 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17618 /*% ripper: [$:$, $:value] %*/
17619 }
17620#line 17621 "parse.c"
17621 break;
17622
17623 case 730: /* f_kw_arg_value: f_label */
17624#line 3036 "parse.y"
17625 {
17626 p->ctxt.in_argdef = 1;
17627 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17628 /*% ripper: [$:$, 0] %*/
17629 }
17630#line 17631 "parse.c"
17631 break;
17632
17633 case 731: /* f_kwarg_arg_value: f_kw_arg_value */
17634#line 3045 "parse.y"
17635 {
17636 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17637 /*% ripper: rb_ary_new3(1, $:1) %*/
17638 }
17639#line 17640 "parse.c"
17640 break;
17641
17642 case 732: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17643#line 3050 "parse.y"
17644 {
17645 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17646 /*% ripper: rb_ary_push($:1, $:3) %*/
17647 }
17648#line 17649 "parse.c"
17649 break;
17650
17651 case 733: /* opt_f_block_arg_opt_comma: ',' f_block_arg */
17652#line 2967 "parse.y"
17653 {
17654 (yyval.id) = (yyvsp[0].id);
17655 /*% ripper: $:2 %*/
17656 }
17657#line 17658 "parse.c"
17658 break;
17659
17660 case 735: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_opt_comma */
17661#line 2944 "parse.y"
17662 {
17663 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17664 /*% ripper: [$:1, $:3, $:4] %*/
17665 }
17666#line 17667 "parse.c"
17667 break;
17668
17669 case 736: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value opt_f_block_arg_opt_comma */
17670#line 2949 "parse.y"
17671 {
17672 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17673 /*% ripper: [$:1, Qnil, $:2] %*/
17674 }
17675#line 17676 "parse.c"
17676 break;
17677
17678 case 737: /* args_tail_basic_arg_value_opt_comma: f_any_kwrest opt_f_block_arg_opt_comma */
17679#line 2954 "parse.y"
17680 {
17681 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17682 /*% ripper: [Qnil, $:1, $:2] %*/
17683 }
17684#line 17685 "parse.c"
17685 break;
17686
17687 case 738: /* args_tail_basic_arg_value_opt_comma: f_block_arg */
17688#line 2959 "parse.y"
17689 {
17690 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17691 /*% ripper: [Qnil, Qnil, $:1] %*/
17692 }
17693#line 17694 "parse.c"
17694 break;
17695
17696 case 740: /* args_tail: args_forward */
17697#line 6288 "parse.y"
17698 {
17699 add_forwarding_args(p);
17700 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[0].id), arg_FWD_BLOCK, &(yylsp[0]));
17701 (yyval.node_args)->nd_ainfo.forwarding = 1;
17702 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17703 }
17704#line 17705 "parse.c"
17705 break;
17706
17707 case 741: /* args_tail_basic_arg_value_none: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_none */
17708#line 2944 "parse.y"
17709 {
17710 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17711 /*% ripper: [$:1, $:3, $:4] %*/
17712 }
17713#line 17714 "parse.c"
17714 break;
17715
17716 case 742: /* args_tail_basic_arg_value_none: f_kwarg_arg_value opt_f_block_arg_none */
17717#line 2949 "parse.y"
17718 {
17719 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17720 /*% ripper: [$:1, Qnil, $:2] %*/
17721 }
17722#line 17723 "parse.c"
17723 break;
17724
17725 case 743: /* args_tail_basic_arg_value_none: f_any_kwrest opt_f_block_arg_none */
17726#line 2954 "parse.y"
17727 {
17728 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17729 /*% ripper: [Qnil, $:1, $:2] %*/
17730 }
17731#line 17732 "parse.c"
17732 break;
17733
17734 case 744: /* args_tail_basic_arg_value_none: f_block_arg */
17735#line 2959 "parse.y"
17736 {
17737 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17738 /*% ripper: [Qnil, Qnil, $:1] %*/
17739 }
17740#line 17741 "parse.c"
17741 break;
17742
17743 case 746: /* largs_tail: args_forward */
17744#line 6298 "parse.y"
17745 {
17746 yyerror1(&(yylsp[0]), "unexpected ... in lambda argument");
17747 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17748 (yyval.node_args)->nd_ainfo.forwarding = 1;
17749 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17750 }
17751#line 17752 "parse.c"
17752 break;
17753
17754 case 747: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17755#line 3008 "parse.y"
17756 {
17757 p->ctxt.in_argdef = 1;
17758 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17759 /*% ripper: [$:$, $:3] %*/
17760 }
17761#line 17762 "parse.c"
17762 break;
17763
17764 case 748: /* f_opt_arg_arg_value: f_opt_arg_value */
17765#line 3017 "parse.y"
17766 {
17767 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17768 /*% ripper: rb_ary_new3(1, $:1) %*/
17769 }
17770#line 17771 "parse.c"
17771 break;
17772
17773 case 749: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17774#line 3022 "parse.y"
17775 {
17776 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17777 /*% ripper: rb_ary_push($:1, $:3) %*/
17778 }
17779#line 17780 "parse.c"
17780 break;
17781
17782 case 750: /* opt_args_tail_args_tail_opt_comma: ',' args_tail */
17783#line 3117 "parse.y"
17784 {
17785 (yyval.node_args) = (yyvsp[0].node_args);
17786 /*% ripper: $:tail %*/
17787 }
17788#line 17789 "parse.c"
17789 break;
17790
17791 case 751: /* opt_args_tail_args_tail_opt_comma: opt_comma */
17792#line 3122 "parse.y"
17793 {
17794 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17795 /*% ripper: [Qnil, Qnil, Qnil] %*/
17796 }
17797#line 17798 "parse.c"
17798 break;
17799
17800 case 752: /* 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 */
17801#line 6308 "parse.y"
17802 {
17803 (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));
17804 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17805 }
17806#line 17807 "parse.c"
17807 break;
17808
17809 case 753: /* 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 */
17810#line 6313 "parse.y"
17811 {
17812 (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));
17813 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17814 }
17815#line 17816 "parse.c"
17816 break;
17817
17818 case 754: /* 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 */
17819#line 6318 "parse.y"
17820 {
17821 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17822 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17823 }
17824#line 17825 "parse.c"
17825 break;
17826
17827 case 755: /* 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 */
17828#line 6323 "parse.y"
17829 {
17830 (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));
17831 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17832 }
17833#line 17834 "parse.c"
17834 break;
17835
17836 case 756: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17837#line 6328 "parse.y"
17838 {
17839 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17840 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17841 }
17842#line 17843 "parse.c"
17843 break;
17844
17845 case 757: /* 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 */
17846#line 6333 "parse.y"
17847 {
17848 (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));
17849 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17850 }
17851#line 17852 "parse.c"
17852 break;
17853
17854 case 758: /* 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 */
17855#line 6338 "parse.y"
17856 {
17857 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17858 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17859 }
17860#line 17861 "parse.c"
17861 break;
17862
17863 case 759: /* 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 */
17864#line 6343 "parse.y"
17865 {
17866 (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));
17867 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17868 }
17869#line 17870 "parse.c"
17870 break;
17871
17872 case 760: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17873#line 6348 "parse.y"
17874 {
17875 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17876 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17877 }
17878#line 17879 "parse.c"
17879 break;
17880
17881 case 761: /* 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 */
17882#line 6353 "parse.y"
17883 {
17884 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17885 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17886 }
17887#line 17888 "parse.c"
17888 break;
17889
17890 case 762: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg opt_args_tail_args_tail_opt_comma */
17891#line 6358 "parse.y"
17892 {
17893 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17894 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17895 }
17896#line 17897 "parse.c"
17897 break;
17898
17899 case 763: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17900#line 6363 "parse.y"
17901 {
17902 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17903 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17904 }
17905#line 17906 "parse.c"
17906 break;
17907
17908 case 765: /* f_args-list_args_tail_opt_comma: f_arg opt_args_tail_args_tail_opt_comma */
17909#line 6380 "parse.y"
17910 {
17911 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17912 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17913 }
17914#line 17915 "parse.c"
17915 break;
17916
17917 case 766: /* tail-only-args_args_tail: args_tail */
17918#line 6371 "parse.y"
17919 {
17920 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17921 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17922 }
17923#line 17924 "parse.c"
17924 break;
17925
17926 case 770: /* opt_args_tail_largs_tail_none: ',' largs_tail */
17927#line 3117 "parse.y"
17928 {
17929 (yyval.node_args) = (yyvsp[0].node_args);
17930 /*% ripper: $:tail %*/
17931 }
17932#line 17933 "parse.c"
17933 break;
17934
17935 case 771: /* opt_args_tail_largs_tail_none: none */
17936#line 3122 "parse.y"
17937 {
17938 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17939 /*% ripper: [Qnil, Qnil, Qnil] %*/
17940 }
17941#line 17942 "parse.c"
17942 break;
17943
17944 case 772: /* 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 */
17945#line 6308 "parse.y"
17946 {
17947 (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));
17948 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17949 }
17950#line 17951 "parse.c"
17951 break;
17952
17953 case 773: /* 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 */
17954#line 6313 "parse.y"
17955 {
17956 (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));
17957 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17958 }
17959#line 17960 "parse.c"
17960 break;
17961
17962 case 774: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17963#line 6318 "parse.y"
17964 {
17965 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17966 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17967 }
17968#line 17969 "parse.c"
17969 break;
17970
17971 case 775: /* 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 */
17972#line 6323 "parse.y"
17973 {
17974 (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));
17975 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17976 }
17977#line 17978 "parse.c"
17978 break;
17979
17980 case 776: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg opt_args_tail_largs_tail_none */
17981#line 6328 "parse.y"
17982 {
17983 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17984 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17985 }
17986#line 17987 "parse.c"
17987 break;
17988
17989 case 777: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17990#line 6333 "parse.y"
17991 {
17992 (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));
17993 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17994 }
17995#line 17996 "parse.c"
17996 break;
17997
17998 case 778: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17999#line 6338 "parse.y"
18000 {
18001 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
18002 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
18003 }
18004#line 18005 "parse.c"
18005 break;
18006
18007 case 779: /* 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 */
18008#line 6343 "parse.y"
18009 {
18010 (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));
18011 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
18012 }
18013#line 18014 "parse.c"
18014 break;
18015
18016 case 780: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value opt_args_tail_largs_tail_none */
18017#line 6348 "parse.y"
18018 {
18019 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
18020 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
18021 }
18022#line 18023 "parse.c"
18023 break;
18024
18025 case 781: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
18026#line 6353 "parse.y"
18027 {
18028 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
18029 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
18030 }
18031#line 18032 "parse.c"
18032 break;
18033
18034 case 782: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg opt_args_tail_largs_tail_none */
18035#line 6358 "parse.y"
18036 {
18037 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
18038 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
18039 }
18040#line 18041 "parse.c"
18041 break;
18042
18043 case 783: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
18044#line 6363 "parse.y"
18045 {
18046 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
18047 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
18048 }
18049#line 18050 "parse.c"
18050 break;
18051
18052 case 785: /* f_args-list_largs_tail_none: f_arg opt_args_tail_largs_tail_none */
18053#line 6380 "parse.y"
18054 {
18055 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
18056 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
18057 }
18058#line 18059 "parse.c"
18059 break;
18060
18061 case 786: /* tail-only-args_largs_tail: largs_tail */
18062#line 6371 "parse.y"
18063 {
18064 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
18065 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
18066 }
18067#line 18068 "parse.c"
18068 break;
18069
18070 case 790: /* args_forward: "(..." */
18071#line 6395 "parse.y"
18072 {
18073 (yyval.id) = idFWD_KWREST;
18074 /*% ripper: args_forward! %*/
18075 }
18076#line 18077 "parse.c"
18077 break;
18078
18079 case 791: /* f_bad_arg: "constant" */
18080#line 6402 "parse.y"
18081 {
18082 static const char mesg[] = "formal argument cannot be a constant";
18083 /*%%%*/
18084 yyerror1(&(yylsp[0]), mesg);
18085 /*% %*/
18086 (yyval.id) = 0;
18087 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18088 }
18089#line 18090 "parse.c"
18090 break;
18091
18092 case 792: /* f_bad_arg: "instance variable" */
18093#line 6411 "parse.y"
18094 {
18095 static const char mesg[] = "formal argument cannot be an instance variable";
18096 /*%%%*/
18097 yyerror1(&(yylsp[0]), mesg);
18098 /*% %*/
18099 (yyval.id) = 0;
18100 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18101 }
18102#line 18103 "parse.c"
18103 break;
18104
18105 case 793: /* f_bad_arg: "global variable" */
18106#line 6420 "parse.y"
18107 {
18108 static const char mesg[] = "formal argument cannot be a global variable";
18109 /*%%%*/
18110 yyerror1(&(yylsp[0]), mesg);
18111 /*% %*/
18112 (yyval.id) = 0;
18113 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18114 }
18115#line 18116 "parse.c"
18116 break;
18117
18118 case 794: /* f_bad_arg: "class variable" */
18119#line 6429 "parse.y"
18120 {
18121 static const char mesg[] = "formal argument cannot be a class variable";
18122 /*%%%*/
18123 yyerror1(&(yylsp[0]), mesg);
18124 /*% %*/
18125 (yyval.id) = 0;
18126 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18127 }
18128#line 18129 "parse.c"
18129 break;
18130
18131 case 796: /* f_norm_arg: "local variable or method" */
18132#line 6441 "parse.y"
18133 {
18134 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18135 if (e) {
18136 /*% ripper[error]: param_error!(?e, $:1) %*/
18137 }
18138 p->max_numparam = ORDINAL_PARAM;
18139 }
18140#line 18141 "parse.c"
18141 break;
18142
18143 case 797: /* f_arg_asgn: f_norm_arg */
18144#line 6451 "parse.y"
18145 {
18146 arg_var(p, (yyvsp[0].id));
18147 (yyval.id) = (yyvsp[0].id);
18148 }
18149#line 18150 "parse.c"
18150 break;
18151
18152 case 798: /* f_arg_item: f_arg_asgn */
18153#line 6458 "parse.y"
18154 {
18155 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
18156 /*% ripper: $:1 %*/
18157 }
18158#line 18159 "parse.c"
18159 break;
18160
18161 case 799: /* f_arg_item: "(" f_margs rparen */
18162#line 6463 "parse.y"
18163 {
18164 ID tid = internal_id(p);
18165 YYLTYPE loc;
18166 loc.beg_pos = (yylsp[-1]).beg_pos;
18167 loc.end_pos = (yylsp[-1]).beg_pos;
18168 arg_var(p, tid);
18169 if (dyna_in_block(p)) {
18170 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
18171 }
18172 else {
18173 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
18174 }
18175 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
18176 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
18177 /*% ripper: mlhs_paren!($:2) %*/
18178 }
18179#line 18180 "parse.c"
18180 break;
18181
18182 case 801: /* f_arg: f_arg ',' f_arg_item */
18183#line 6484 "parse.y"
18184 {
18185 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
18186 (yyval.node_args_aux)->nd_plen++;
18187 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
18188 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
18189 /*% ripper: rb_ary_push($:1, $:3) %*/
18190 }
18191#line 18192 "parse.c"
18192 break;
18193
18194 case 802: /* f_label: "label" */
18195#line 6495 "parse.y"
18196 {
18197 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18198 if (e) {
18199 (yyval.id) = 0;
18200 /*% ripper[error]: param_error!(?e, $:1) %*/
18201 }
18202 /*
18203 * Workaround for Prism::ParseTest#test_filepath for
18204 * "unparser/corpus/literal/def.txt"
18205 *
18206 * See the discussion on https://github.com/ruby/ruby/pull/9923
18207 */
18208 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
18209 /*% ripper: $:1 %*/
18210 p->max_numparam = ORDINAL_PARAM;
18211 p->ctxt.in_argdef = 0;
18212 }
18213#line 18214 "parse.c"
18214 break;
18215
18216 case 805: /* f_no_kwarg: p_kwnorest */
18217#line 6519 "parse.y"
18218 {
18219 /*% ripper: nokw_param!(Qnil) %*/
18220 }
18221#line 18222 "parse.c"
18222 break;
18223
18224 case 806: /* f_kwrest: kwrest_mark "local variable or method" */
18225#line 6525 "parse.y"
18226 {
18227 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18228 (yyval.id) = (yyvsp[0].id);
18229 /*% ripper: kwrest_param!($:2) %*/
18230 }
18231#line 18232 "parse.c"
18232 break;
18233
18234 case 807: /* f_kwrest: kwrest_mark */
18235#line 6531 "parse.y"
18236 {
18237 arg_var(p, idFWD_KWREST);
18238 (yyval.id) = idFWD_KWREST;
18239 /*% ripper: kwrest_param!(Qnil) %*/
18240 }
18241#line 18242 "parse.c"
18242 break;
18243
18244 case 810: /* f_rest_arg: restarg_mark "local variable or method" */
18245#line 6543 "parse.y"
18246 {
18247 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18248 (yyval.id) = (yyvsp[0].id);
18249 /*% ripper: rest_param!($:2) %*/
18250 }
18251#line 18252 "parse.c"
18252 break;
18253
18254 case 811: /* f_rest_arg: restarg_mark */
18255#line 6549 "parse.y"
18256 {
18257 arg_var(p, idFWD_REST);
18258 (yyval.id) = idFWD_REST;
18259 /*% ripper: rest_param!(Qnil) %*/
18260 }
18261#line 18262 "parse.c"
18262 break;
18263
18264 case 814: /* f_block_arg: blkarg_mark "local variable or method" */
18265#line 6561 "parse.y"
18266 {
18267 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18268 (yyval.id) = (yyvsp[0].id);
18269 /*% ripper: blockarg!($:2) %*/
18270 }
18271#line 18272 "parse.c"
18272 break;
18273
18274 case 815: /* f_block_arg: blkarg_mark "'nil'" */
18275#line 6567 "parse.y"
18276 {
18277 (yyval.id) = idNil;
18278 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
18279 }
18280#line 18281 "parse.c"
18281 break;
18282
18283 case 816: /* f_block_arg: blkarg_mark */
18284#line 6572 "parse.y"
18285 {
18286 arg_var(p, idFWD_BLOCK);
18287 (yyval.id) = idFWD_BLOCK;
18288 /*% ripper: blockarg!(Qnil) %*/
18289 }
18290#line 18291 "parse.c"
18291 break;
18292
18293 case 819: /* opt_comma: option_',' */
18294#line 6580 "parse.y"
18295 {
18296 (yyval.id) = 0;
18297 /*% ripper: Qnil %*/
18298 }
18299#line 18300 "parse.c"
18300 break;
18301
18302 case 820: /* value_expr_singleton_expr: singleton_expr */
18303#line 3171 "parse.y"
18304 {
18305 value_expr(p, (yyvsp[0].node));
18306 (yyval.node) = (yyvsp[0].node);
18307 }
18308#line 18309 "parse.c"
18309 break;
18310
18311 case 821: /* singleton: value_expr_singleton_expr */
18312#line 6588 "parse.y"
18313 {
18314 NODE *expr = last_expr_node((yyvsp[0].node));
18315 switch (nd_type(expr)) {
18316 case NODE_STR:
18317 case NODE_DSTR:
18318 case NODE_XSTR:
18319 case NODE_DXSTR:
18320 case NODE_REGX:
18321 case NODE_DREGX:
18322 case NODE_SYM:
18323 case NODE_LINE:
18324 case NODE_FILE:
18325 case NODE_ENCODING:
18326 case NODE_INTEGER:
18327 case NODE_FLOAT:
18328 case NODE_RATIONAL:
18329 case NODE_IMAGINARY:
18330 case NODE_DSYM:
18331 case NODE_LIST:
18332 case NODE_ZLIST:
18333 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
18334 break;
18335 default:
18336 break;
18337 }
18338 (yyval.node) = (yyvsp[0].node);
18339 }
18340#line 18341 "parse.c"
18341 break;
18342
18343 case 823: /* $@41: %empty */
18344#line 6619 "parse.y"
18345 {
18346 SET_LEX_STATE(EXPR_BEG);
18347 p->ctxt.in_argdef = 0;
18348 }
18349#line 18350 "parse.c"
18350 break;
18351
18352 case 824: /* singleton_expr: '(' $@41 expr rparen */
18353#line 6624 "parse.y"
18354 {
18355 p->ctxt.in_argdef = 1;
18356 (yyval.node) = (yyvsp[-1].node);
18357 /*% ripper: paren!($:3) %*/
18358 }
18359#line 18360 "parse.c"
18360 break;
18361
18362 case 826: /* assoc_list: assocs trailer */
18363#line 6633 "parse.y"
18364 {
18365 (yyval.node) = (yyvsp[-1].node);
18366 /*% ripper: assoclist_from_args!($:1) %*/
18367 }
18368#line 18369 "parse.c"
18369 break;
18370
18371 case 828: /* assocs: assocs ',' assoc */
18372#line 6642 "parse.y"
18373 {
18374 NODE *assocs = (yyvsp[-2].node);
18375 NODE *tail = (yyvsp[0].node);
18376 if (!assocs) {
18377 assocs = tail;
18378 }
18379 else if (tail) {
18380 NODE *n = RNODE_LIST(tail)->nd_next;
18381 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
18382 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
18383 /* DSTAR */
18384 tail = RNODE_HASH(n)->nd_head;
18385 }
18386 if (tail) {
18387 assocs = list_concat(assocs, tail);
18388 }
18389 }
18390 (yyval.node) = assocs;
18391 /*% ripper: rb_ary_push($:1, $:3) %*/
18392 }
18393#line 18394 "parse.c"
18394 break;
18395
18396 case 829: /* assoc: arg_value "=>" arg_value */
18397#line 6665 "parse.y"
18398 {
18399 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
18400 /*% ripper: assoc_new!($:1, $:3) %*/
18401 }
18402#line 18403 "parse.c"
18403 break;
18404
18405 case 830: /* assoc: "label" arg_value */
18406#line 6670 "parse.y"
18407 {
18408 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
18409 /*% ripper: assoc_new!($:1, $:2) %*/
18410 }
18411#line 18412 "parse.c"
18412 break;
18413
18414 case 831: /* assoc: "label" */
18415#line 6675 "parse.y"
18416 {
18417 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
18418 if (!val) val = NEW_ERROR(&(yyloc));
18419 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
18420 /*% ripper: assoc_new!($:1, Qnil) %*/
18421 }
18422#line 18423 "parse.c"
18423 break;
18424
18425 case 832: /* assoc: "string literal" string_contents tLABEL_END arg_value */
18426#line 6682 "parse.y"
18427 {
18428 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
18429 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
18430 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
18431 }
18432#line 18433 "parse.c"
18433 break;
18434
18435 case 833: /* assoc: "**arg" arg_value */
18436#line 6688 "parse.y"
18437 {
18438 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
18439 /*% ripper: assoc_splat!($:2) %*/
18440 }
18441#line 18442 "parse.c"
18442 break;
18443
18444 case 834: /* assoc: "**arg" */
18445#line 6693 "parse.y"
18446 {
18447 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
18448 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
18449 NEW_LVAR(idFWD_KWREST, &(yyloc)));
18450 /*% ripper: assoc_splat!(Qnil) %*/
18451 }
18452#line 18453 "parse.c"
18453 break;
18454
18455 case 853: /* term: ';' */
18456#line 6740 "parse.y"
18457 {
18458 yyerrok;
18459 token_flush(p);
18460 if (p->ctxt.in_defined) {
18461 p->ctxt.has_trailing_semicolon = 1;
18462 }
18463 }
18464#line 18465 "parse.c"
18465 break;
18466
18467 case 854: /* term: '\n' */
18468#line 6748 "parse.y"
18469 {
18470 (yyloc).end_pos = (yyloc).beg_pos;
18471 token_flush(p);
18472 }
18473#line 18474 "parse.c"
18474 break;
18475
18476 case 856: /* terms: terms ';' */
18477#line 6755 "parse.y"
18478 {yyerrok;}
18479#line 18480 "parse.c"
18480 break;
18481
18482 case 857: /* none: %empty */
18483#line 6759 "parse.y"
18484 {
18485 (yyval.node) = 0;
18486 /*% ripper: Qnil %*/
18487 }
18488#line 18489 "parse.c"
18489 break;
18490
18491
18492#line 18493 "parse.c"
18493
18494 default: break;
18495 }
18496 /* User semantic actions sometimes alter yychar, and that requires
18497 that yytoken be updated with the new translation. We take the
18498 approach of translating immediately before every use of yytoken.
18499 One alternative is translating here after every semantic action,
18500 but that translation would be missed if the semantic action invokes
18501 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18502 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18503 incorrect destructor might then be invoked immediately. In the
18504 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18505 to an incorrect destructor call or verbose syntax error message
18506 before the lookahead is translated. */
18507 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18508
18509 YYPOPSTACK (yylen);
18510 /* %after-reduce function. */
18511#line 2683 "parse.y"
18512 {after_reduce(yylen, p);}
18513#line 18514 "parse.c"
18514
18515 yylen = 0;
18516
18517 *++yyvsp = yyval;
18518 *++yylsp = yyloc;
18519
18520 /* Now 'shift' the result of the reduction. Determine what state
18521 that goes to, based on the state we popped back to and the rule
18522 number reduced by. */
18523 {
18524 const int yylhs = yyr1[yyn] - YYNTOKENS;
18525 const int yyi = yypgoto[yylhs] + *yyssp;
18526 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18527 ? yytable[yyi]
18528 : yydefgoto[yylhs]);
18529 }
18530
18531 goto yynewstate;
18532
18533
18534/*--------------------------------------.
18535| yyerrlab -- here on detecting error. |
18536`--------------------------------------*/
18537yyerrlab:
18538 /* Make sure we have latest lookahead translation. See comments at
18539 user semantic actions for why this is necessary. */
18540 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18541 /* If not already recovering from an error, report this error. */
18542 if (!yyerrstatus)
18543 {
18544 ++yynerrs;
18545 {
18546 yypcontext_t yyctx
18547 = {yyssp, yytoken, &yylloc};
18548 char const *yymsgp = YY_("syntax error");
18549 int yysyntax_error_status;
18550 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18551 if (yysyntax_error_status == 0)
18552 yymsgp = yymsg;
18553 else if (yysyntax_error_status == -1)
18554 {
18555 if (yymsg != yymsgbuf)
18556 YYSTACK_FREE (yymsg);
18557 yymsg = YY_CAST (char *,
18558 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18559 if (yymsg)
18560 {
18561 yysyntax_error_status
18562 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18563 yymsgp = yymsg;
18564 }
18565 else
18566 {
18567 yymsg = yymsgbuf;
18568 yymsg_alloc = sizeof yymsgbuf;
18569 yysyntax_error_status = YYENOMEM;
18570 }
18571 }
18572 yyerror (&yylloc, p, yymsgp);
18573 if (yysyntax_error_status == YYENOMEM)
18574 YYNOMEM;
18575 }
18576 }
18577
18578 yyerror_range[1] = yylloc;
18579 if (yyerrstatus == 3)
18580 {
18581 /* If just tried and failed to reuse lookahead token after an
18582 error, discard it. */
18583
18584 if (yychar <= END_OF_INPUT)
18585 {
18586 /* Return failure if at end of input. */
18587 if (yychar == END_OF_INPUT)
18588 YYABORT;
18589 }
18590 else
18591 {
18592 yydestruct ("Error: discarding",
18593 yytoken, &yylval, &yylloc, p);
18594 yychar = YYEMPTY;
18595 }
18596 }
18597
18598 /* Else will try to reuse lookahead token after shifting the error
18599 token. */
18600 goto yyerrlab1;
18601
18602
18603/*---------------------------------------------------.
18604| yyerrorlab -- error raised explicitly by YYERROR. |
18605`---------------------------------------------------*/
18606yyerrorlab:
18607 /* Pacify compilers when the user code never invokes YYERROR and the
18608 label yyerrorlab therefore never appears in user code. */
18609 if (0)
18610 YYERROR;
18611 ++yynerrs;
18612
18613 /* Do not reclaim the symbols of the rule whose action triggered
18614 this YYERROR. */
18615 YYPOPSTACK (yylen);
18616 /* %after-pop-stack function. */
18617#line 2685 "parse.y"
18618 {after_pop_stack(yylen, p);}
18619#line 18620 "parse.c"
18620
18621 yylen = 0;
18622 YY_STACK_PRINT (yyss, yyssp, p);
18623 yystate = *yyssp;
18624 goto yyerrlab1;
18625
18626
18627/*-------------------------------------------------------------.
18628| yyerrlab1 -- common code for both syntax error and YYERROR. |
18629`-------------------------------------------------------------*/
18630yyerrlab1:
18631 yyerrstatus = 3; /* Each real token shifted decrements this. */
18632
18633 /* Pop stack until we find a state that shifts the error token. */
18634 for (;;)
18635 {
18636 yyn = yypact[yystate];
18637 if (!yypact_value_is_default (yyn))
18638 {
18639 yyn += YYSYMBOL_YYerror;
18640 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18641 {
18642 yyn = yytable[yyn];
18643 if (0 < yyn)
18644 break;
18645 }
18646 }
18647
18648 /* Pop the current state because it cannot handle the error token. */
18649 if (yyssp == yyss)
18650 YYABORT;
18651
18652 yyerror_range[1] = *yylsp;
18653 yydestruct ("Error: popping",
18654 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18655 YYPOPSTACK (1);
18656 /* %after-pop-stack function. */
18657#line 2685 "parse.y"
18658 {after_pop_stack(1, p);}
18659#line 18660 "parse.c"
18660
18661 yystate = *yyssp;
18662 YY_STACK_PRINT (yyss, yyssp, p);
18663 }
18664
18665 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18666 *++yyvsp = yylval;
18667 YY_IGNORE_MAYBE_UNINITIALIZED_END
18668
18669 yyerror_range[2] = yylloc;
18670 ++yylsp;
18671 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18672
18673 /* Shift the error token. */
18674 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18675 /* %after-shift-error-token code. */
18676#line 2684 "parse.y"
18677 {after_shift_error_token(p);}
18678#line 18679 "parse.c"
18679
18680
18681 yystate = yyn;
18682 goto yynewstate;
18683
18684
18685/*-------------------------------------.
18686| yyacceptlab -- YYACCEPT comes here. |
18687`-------------------------------------*/
18688yyacceptlab:
18689 yyresult = 0;
18690 goto yyreturnlab;
18691
18692
18693/*-----------------------------------.
18694| yyabortlab -- YYABORT comes here. |
18695`-----------------------------------*/
18696yyabortlab:
18697 yyresult = 1;
18698 goto yyreturnlab;
18699
18700
18701/*-----------------------------------------------------------.
18702| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18703`-----------------------------------------------------------*/
18704yyexhaustedlab:
18705 yyerror (&yylloc, p, YY_("memory exhausted"));
18706 yyresult = 2;
18707 goto yyreturnlab;
18708
18709
18710/*----------------------------------------------------------.
18711| yyreturnlab -- parsing is finished, clean up and return. |
18712`----------------------------------------------------------*/
18713yyreturnlab:
18714 if (yychar != YYEMPTY)
18715 {
18716 /* Make sure we have latest lookahead translation. See comments at
18717 user semantic actions for why this is necessary. */
18718 yytoken = YYTRANSLATE (yychar);
18719 yydestruct ("Cleanup: discarding lookahead",
18720 yytoken, &yylval, &yylloc, p);
18721 }
18722 /* Do not reclaim the symbols of the rule whose action triggered
18723 this YYABORT or YYACCEPT. */
18724 YYPOPSTACK (yylen);
18725 YY_STACK_PRINT (yyss, yyssp, p);
18726 while (yyssp != yyss)
18727 {
18728 yydestruct ("Cleanup: popping",
18729 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18730 YYPOPSTACK (1);
18731 }
18732#ifndef yyoverflow
18733 if (yyss != yyssa)
18734 YYSTACK_FREE (yyss);
18735#endif
18736 if (yymsg != yymsgbuf)
18737 YYSTACK_FREE (yymsg);
18738 return yyresult;
18739}
18740
18741#line 6764 "parse.y"
18742
18743# undef p
18744# undef yylex
18745# undef yylval
18746# define yylval (*p->lval)
18747
18748static int regx_options(struct parser_params*);
18749static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18750static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18751static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18752static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18753
18754#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18755
18756# define set_yylval_node(x) { \
18757 YYLTYPE _cur_loc; \
18758 rb_parser_set_location(p, &_cur_loc); \
18759 yylval.node = (x); \
18760 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18761}
18762# define set_yylval_str(x) \
18763do { \
18764 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18765 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18766} while(0)
18767# define set_yylval_num(x) { \
18768 yylval.num = (x); \
18769 set_parser_s_value(x); \
18770}
18771# define set_yylval_id(x) (yylval.id = (x))
18772# define set_yylval_name(x) { \
18773 (yylval.id = (x)); \
18774 set_parser_s_value(ID2SYM(x)); \
18775}
18776# define yylval_id() (yylval.id)
18777
18778#define set_yylval_noname() set_yylval_id(keyword_nil)
18779#define has_delayed_token(p) (p->delayed.token != NULL)
18780
18781#ifndef RIPPER
18782#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18783#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18784
18785static bool
18786parser_has_token(struct parser_params *p)
18787{
18788 const char *const pcur = p->lex.pcur;
18789 const char *const ptok = p->lex.ptok;
18790 if (p->keep_tokens && (pcur < ptok)) {
18791 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18792 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18793 }
18794 return pcur > ptok;
18795}
18796
18797static const char *
18798escaped_char(int c)
18799{
18800 switch (c) {
18801 case '"': return "\\\"";
18802 case '\\': return "\\\\";
18803 case '\0': return "\\0";
18804 case '\n': return "\\n";
18805 case '\r': return "\\r";
18806 case '\t': return "\\t";
18807 case '\f': return "\\f";
18808 case '\013': return "\\v";
18809 case '\010': return "\\b";
18810 case '\007': return "\\a";
18811 case '\033': return "\\e";
18812 case '\x7f': return "\\c?";
18813 }
18814 return NULL;
18815}
18816
18817static rb_parser_string_t *
18818rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18819{
18820 rb_encoding *enc = p->enc;
18821 const char *ptr = str->ptr;
18822 const char *pend = ptr + str->len;
18823 const char *prev = ptr;
18824 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18825 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18826
18827 while (ptr < pend) {
18828 unsigned int c;
18829 const char *cc;
18830 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18831 if (!MBCLEN_CHARFOUND_P(n)) {
18832 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18833 n = rb_enc_mbminlen(enc);
18834 if (pend < ptr + n)
18835 n = (int)(pend - ptr);
18836 while (n--) {
18837 c = ((unsigned char)*ptr >> 4) & 0x0f;
18838 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18839 c = *ptr & 0x0f;
18840 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18841 parser_str_cat(result, charbuf, 4);
18842 prev = ++ptr;
18843 }
18844 continue;
18845 }
18846 n = MBCLEN_CHARFOUND_LEN(n);
18847 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18848 ptr += n;
18849 cc = escaped_char(c);
18850 if (cc) {
18851 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18852 parser_str_cat_cstr(result, cc);
18853 prev = ptr;
18854 }
18855 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18856 }
18857 else {
18858 if (ptr - n > prev) {
18859 parser_str_cat(result, prev, ptr - n - prev);
18860 prev = ptr - n;
18861 }
18862 parser_str_cat(result, prev, ptr - prev);
18863 prev = ptr;
18864 }
18865 }
18866 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18867
18868 return result;
18869}
18870
18871static void
18872parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18873{
18875 token->id = p->token_id;
18876 token->type_name = parser_token2char(p, t);
18877 token->str = str;
18878 token->loc.beg_pos = p->yylloc->beg_pos;
18879 token->loc.end_pos = p->yylloc->end_pos;
18880 rb_parser_ary_push_ast_token(p, p->tokens, token);
18881 p->token_id++;
18882
18883 if (p->debug) {
18884 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18885 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18886 line, token->id, token->type_name, str_escaped->ptr,
18887 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18888 token->loc.end_pos.lineno, token->loc.end_pos.column);
18889 rb_parser_string_free(p, str_escaped);
18890 }
18891}
18892
18893static void
18894parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18895{
18896 debug_token_line(p, "parser_dispatch_scan_event", line);
18897
18898 if (!parser_has_token(p)) return;
18899
18900 RUBY_SET_YYLLOC(*p->yylloc);
18901
18902 if (p->keep_tokens) {
18903 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18904 parser_append_tokens(p, str, t, line);
18905 }
18906
18907 token_flush(p);
18908}
18909
18910#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18911static void
18912parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18913{
18914 debug_token_line(p, "parser_dispatch_delayed_token", line);
18915
18916 if (!has_delayed_token(p)) return;
18917
18918 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18919
18920 if (p->keep_tokens) {
18921 /* p->delayed.token is freed by rb_parser_tokens_free */
18922 parser_append_tokens(p, p->delayed.token, t, line);
18923 }
18924 else {
18925 rb_parser_string_free(p, p->delayed.token);
18926 }
18927
18928 p->delayed.token = NULL;
18929}
18930#else
18931#define literal_flush(p, ptr) ((void)(ptr))
18932
18933static int
18934ripper_has_scan_event(struct parser_params *p)
18935{
18936 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18937 return p->lex.pcur > p->lex.ptok;
18938}
18939
18940static VALUE
18941ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18942{
18943 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18944 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18945 RUBY_SET_YYLLOC(*p->yylloc);
18946 token_flush(p);
18947 return rval;
18948}
18949
18950static void
18951ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18952{
18953 if (!ripper_has_scan_event(p)) return;
18954
18955 set_parser_s_value(ripper_scan_event_val(p, t));
18956}
18957#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18958
18959static void
18960ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18961{
18962 /* save and adjust the location to delayed token for callbacks */
18963 int saved_line = p->ruby_sourceline;
18964 const char *saved_tokp = p->lex.ptok;
18965 VALUE s_value, str;
18966
18967 if (!has_delayed_token(p)) return;
18968 p->ruby_sourceline = p->delayed.beg_line;
18969 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18970 str = rb_str_new_mutable_parser_string(p->delayed.token);
18971 rb_parser_string_free(p, p->delayed.token);
18972 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18973 set_parser_s_value(s_value);
18974 p->delayed.token = NULL;
18975 p->ruby_sourceline = saved_line;
18976 p->lex.ptok = saved_tokp;
18977}
18978#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18979#endif /* RIPPER */
18980
18981static inline int
18982is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18983{
18984 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18985}
18986
18987static inline bool
18988peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18989{
18990 const char *ptr = p->lex.pcur + at;
18991 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18992 if (memcmp(ptr, str, len)) return false;
18993 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18994 switch (ptr[len]) {
18995 case '!': case '?': return false;
18996 }
18997 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18998}
18999
19000static inline int
19001parser_is_identchar(struct parser_params *p)
19002{
19003 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
19004}
19005
19006static inline int
19007parser_isascii(struct parser_params *p)
19008{
19009 return ISASCII(*(p->lex.pcur-1));
19010}
19011
19012static void
19013token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
19014{
19015 int column = 1, nonspc = 0, i;
19016 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
19017 if (*ptr == '\t') {
19018 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
19019 }
19020 column++;
19021 if (*ptr != ' ' && *ptr != '\t') {
19022 nonspc = 1;
19023 }
19024 }
19025
19026 ptinfo->beg = loc->beg_pos;
19027 ptinfo->indent = column;
19028 ptinfo->nonspc = nonspc;
19029}
19030
19031static void
19032token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
19033{
19034 token_info *ptinfo;
19035
19036 if (!p->token_info_enabled) return;
19037 ptinfo = ALLOC(token_info);
19038 ptinfo->token = token;
19039 ptinfo->next = p->token_info;
19040 token_info_setup(ptinfo, p->lex.pbeg, loc);
19041
19042 p->token_info = ptinfo;
19043}
19044
19045static void
19046token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
19047{
19048 token_info *ptinfo_beg = p->token_info;
19049
19050 if (!ptinfo_beg) return;
19051
19052 /* indentation check of matched keywords (begin..end, if..end, etc.) */
19053 token_info_warn(p, token, ptinfo_beg, 1, loc);
19054
19055 p->token_info = ptinfo_beg->next;
19056 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
19057}
19058
19059static void
19060token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
19061{
19062 token_info *ptinfo_beg = p->token_info;
19063
19064 if (!ptinfo_beg) return;
19065 p->token_info = ptinfo_beg->next;
19066
19067 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
19068 ptinfo_beg->beg.column != beg_pos.column ||
19069 strcmp(ptinfo_beg->token, token)) {
19070 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
19071 beg_pos.lineno, beg_pos.column, token,
19072 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
19073 ptinfo_beg->token);
19074 }
19075
19076 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
19077}
19078
19079static void
19080token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
19081{
19082 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
19083 if (!p->token_info_enabled) return;
19084 if (!ptinfo_beg) return;
19085 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
19086 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
19087 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
19088 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
19089 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
19090 rb_warn3L(ptinfo_end->beg.lineno,
19091 "mismatched indentations at '%s' with '%s' at %d",
19092 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
19093}
19094
19095static int
19096parser_precise_mbclen(struct parser_params *p, const char *ptr)
19097{
19098 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
19099 if (!MBCLEN_CHARFOUND_P(len)) {
19100 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
19101 return -1;
19102 }
19103 return len;
19104}
19105
19106#ifndef RIPPER
19107static inline void
19108parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19109{
19110 rb_parser_string_t *str;
19111 int lineno = p->ruby_sourceline;
19112 if (!yylloc) {
19113 return;
19114 }
19115 else if (yylloc->beg_pos.lineno == lineno) {
19116 str = p->lex.lastline;
19117 }
19118 else {
19119 return;
19120 }
19121 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
19122}
19123
19124static int
19125parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
19126{
19127#if 0
19128 YYLTYPE current;
19129
19130 if (!yylloc) {
19131 yylloc = RUBY_SET_YYLLOC(current);
19132 }
19133 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
19134 p->ruby_sourceline != yylloc->end_pos.lineno)) {
19135 yylloc = 0;
19136 }
19137#endif
19138 parser_compile_error(p, yylloc, "%s", msg);
19139 parser_show_error_line(p, yylloc);
19140 return 0;
19141}
19142
19143static int
19144parser_yyerror0(struct parser_params *p, const char *msg)
19145{
19146 YYLTYPE current;
19147 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
19148}
19149
19150void
19151ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
19152{
19153 VALUE mesg;
19154 const int max_line_margin = 30;
19155 const char *ptr, *ptr_end, *pt, *pb;
19156 const char *pre = "", *post = "", *pend;
19157 const char *code = "", *caret = "";
19158 const char *lim;
19159 const char *const pbeg = PARSER_STRING_PTR(str);
19160 char *buf;
19161 long len;
19162 int i;
19163
19164 if (!yylloc) return;
19165 pend = rb_parser_string_end(str);
19166 if (pend > pbeg && pend[-1] == '\n') {
19167 if (--pend > pbeg && pend[-1] == '\r') --pend;
19168 }
19169
19170 pt = pend;
19171 if (lineno == yylloc->end_pos.lineno &&
19172 (pend - pbeg) > yylloc->end_pos.column) {
19173 pt = pbeg + yylloc->end_pos.column;
19174 }
19175
19176 ptr = ptr_end = pt;
19177 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
19178 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
19179
19180 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
19181 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
19182
19183 len = ptr_end - ptr;
19184 if (len > 4) {
19185 if (ptr > pbeg) {
19186 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
19187 if (ptr > pbeg) pre = "...";
19188 }
19189 if (ptr_end < pend) {
19190 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
19191 if (ptr_end < pend) post = "...";
19192 }
19193 }
19194 pb = pbeg;
19195 if (lineno == yylloc->beg_pos.lineno) {
19196 pb += yylloc->beg_pos.column;
19197 if (pb > pt) pb = pt;
19198 }
19199 if (pb < ptr) pb = ptr;
19200 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
19201 return;
19202 }
19203 if (RTEST(errbuf)) {
19204 mesg = rb_attr_get(errbuf, idMesg);
19205 if (char_at_end(p, mesg, '\n') != '\n')
19206 rb_str_cat_cstr(mesg, "\n");
19207 }
19208 else {
19209 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
19210 }
19211 if (!errbuf && rb_stderr_tty_p()) {
19212#define CSI_BEGIN "\033["
19213#define CSI_SGR "m"
19214 rb_str_catf(mesg,
19215 CSI_BEGIN""CSI_SGR"%s" /* pre */
19216 CSI_BEGIN"1"CSI_SGR"%.*s"
19217 CSI_BEGIN"1;4"CSI_SGR"%.*s"
19218 CSI_BEGIN";1"CSI_SGR"%.*s"
19219 CSI_BEGIN""CSI_SGR"%s" /* post */
19220 "\n",
19221 pre,
19222 (int)(pb - ptr), ptr,
19223 (int)(pt - pb), pb,
19224 (int)(ptr_end - pt), pt,
19225 post);
19226 }
19227 else {
19228 char *p2;
19229
19230 len = ptr_end - ptr;
19231 lim = pt < pend ? pt : pend;
19232 i = (int)(lim - ptr);
19233 buf = ALLOCA_N(char, i+2);
19234 code = ptr;
19235 caret = p2 = buf;
19236 if (ptr <= pb) {
19237 while (ptr < pb) {
19238 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
19239 }
19240 *p2++ = '^';
19241 ptr++;
19242 }
19243 if (lim > ptr) {
19244 memset(p2, '~', (lim - ptr));
19245 p2 += (lim - ptr);
19246 }
19247 *p2 = '\0';
19248 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
19249 pre, (int)len, code, post,
19250 pre, caret);
19251 }
19252 if (!errbuf) rb_write_error_str(mesg);
19253}
19254#else
19255
19256static int
19257parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
19258{
19259 const char *pcur = 0, *ptok = 0;
19260 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
19261 p->ruby_sourceline == yylloc->end_pos.lineno) {
19262 pcur = p->lex.pcur;
19263 ptok = p->lex.ptok;
19264 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
19265 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
19266 }
19267 parser_yyerror0(p, msg);
19268 if (pcur) {
19269 p->lex.ptok = ptok;
19270 p->lex.pcur = pcur;
19271 }
19272 return 0;
19273}
19274
19275static int
19276parser_yyerror0(struct parser_params *p, const char *msg)
19277{
19278 dispatch1(parse_error, STR_NEW2(msg));
19279 ripper_error(p);
19280 return 0;
19281}
19282
19283static inline void
19284parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19285{
19286}
19287#endif /* !RIPPER */
19288
19289static int
19290vtable_size(const struct vtable *tbl)
19291{
19292 if (!DVARS_TERMINAL_P(tbl)) {
19293 return tbl->pos;
19294 }
19295 else {
19296 return 0;
19297 }
19298}
19299
19300static struct vtable *
19301vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
19302{
19303 struct vtable *tbl = ALLOC(struct vtable);
19304 tbl->pos = 0;
19305 tbl->capa = 8;
19306 tbl->tbl = ALLOC_N(ID, tbl->capa);
19307 tbl->prev = prev;
19308#ifndef RIPPER
19309 if (p->debug) {
19310 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
19311 }
19312#endif
19313 return tbl;
19314}
19315#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
19316
19317static void
19318vtable_free_gen(struct parser_params *p, int line, const char *name,
19319 struct vtable *tbl)
19320{
19321#ifndef RIPPER
19322 if (p->debug) {
19323 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
19324 }
19325#endif
19326 if (!DVARS_TERMINAL_P(tbl)) {
19327 if (tbl->tbl) {
19328 ruby_xfree_sized(tbl->tbl, tbl->capa * sizeof(ID));
19329 }
19330 ruby_xfree_sized(tbl, sizeof(*tbl));
19331 }
19332}
19333#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
19334
19335static void
19336vtable_add_gen(struct parser_params *p, int line, const char *name,
19337 struct vtable *tbl, ID id)
19338{
19339#ifndef RIPPER
19340 if (p->debug) {
19341 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
19342 line, name, (void *)tbl, rb_id2name(id));
19343 }
19344#endif
19345 if (DVARS_TERMINAL_P(tbl)) {
19346 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
19347 return;
19348 }
19349 if (tbl->pos == tbl->capa) {
19350 tbl->capa = tbl->capa * 2;
19351 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
19352 }
19353 tbl->tbl[tbl->pos++] = id;
19354}
19355#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
19356
19357static void
19358vtable_pop_gen(struct parser_params *p, int line, const char *name,
19359 struct vtable *tbl, int n)
19360{
19361 if (p->debug) {
19362 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
19363 line, name, (void *)tbl, n);
19364 }
19365 if (tbl->pos < n) {
19366 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
19367 return;
19368 }
19369 tbl->pos -= n;
19370}
19371#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
19372
19373static int
19374vtable_included(const struct vtable * tbl, ID id)
19375{
19376 int i;
19377
19378 if (!DVARS_TERMINAL_P(tbl)) {
19379 for (i = 0; i < tbl->pos; i++) {
19380 if (tbl->tbl[i] == id) {
19381 return i+1;
19382 }
19383 }
19384 }
19385 return 0;
19386}
19387
19388static void parser_prepare(struct parser_params *p);
19389
19390static int
19391e_option_supplied(struct parser_params *p)
19392{
19393 return strcmp(p->ruby_sourcefile, "-e") == 0;
19394}
19395
19396#ifndef RIPPER
19397static NODE *parser_append_options(struct parser_params *p, NODE *node);
19398
19399static VALUE
19400yycompile0(VALUE arg)
19401{
19402 int n;
19403 NODE *tree;
19404 struct parser_params *p = (struct parser_params *)arg;
19405 int cov = FALSE;
19406
19407 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
19408 cov = TRUE;
19409 }
19410
19411 if (p->debug_lines) {
19412 p->ast->body.script_lines = p->debug_lines;
19413 }
19414
19415 parser_prepare(p);
19416#define RUBY_DTRACE_PARSE_HOOK(name) \
19417 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
19418 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
19419 }
19420 RUBY_DTRACE_PARSE_HOOK(BEGIN);
19421 n = yyparse(p);
19422 RUBY_DTRACE_PARSE_HOOK(END);
19423
19424 p->debug_lines = 0;
19425
19426 xfree(p->lex.strterm);
19427 p->lex.strterm = 0;
19428 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
19429 if (n || p->error_p) {
19430 VALUE mesg = p->error_buffer;
19431 if (!mesg) {
19432 mesg = syntax_error_new();
19433 }
19434 if (!p->error_tolerant) {
19435 rb_set_errinfo(mesg);
19436 return FALSE;
19437 }
19438 }
19439 tree = p->eval_tree;
19440 if (!tree) {
19441 tree = NEW_NIL(&NULL_LOC);
19442 }
19443 else {
19444 rb_parser_ary_t *tokens = p->tokens;
19445 NODE *prelude;
19446 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
19447 prelude = block_append(p, p->eval_tree_begin, body);
19448 RNODE_SCOPE(tree)->nd_body = prelude;
19449 p->ast->body.frozen_string_literal = p->frozen_string_literal;
19450 p->ast->body.coverage_enabled = cov;
19451 if (p->keep_tokens) {
19452 p->ast->node_buffer->tokens = tokens;
19453 p->tokens = NULL;
19454 }
19455 }
19456 p->ast->body.root = tree;
19457 p->ast->body.line_count = p->line_count;
19458 return TRUE;
19459}
19460
19461static rb_ast_t *
19462yycompile(struct parser_params *p, VALUE fname, int line)
19463{
19464 rb_ast_t *ast;
19465 if (NIL_P(fname)) {
19466 p->ruby_sourcefile_string = Qnil;
19467 p->ruby_sourcefile = "(none)";
19468 }
19469 else {
19470 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
19471 p->ruby_sourcefile = StringValueCStr(fname);
19472 }
19473 p->ruby_sourceline = line - 1;
19474
19475 p->lvtbl = NULL;
19476
19477 p->ast = ast = rb_ast_new();
19478 compile_callback(yycompile0, (VALUE)p);
19479 ast->body.source_hash = rb_source_hash_finalize(&p->source_hash);
19480 ast->body.has_source_hash = 1;
19481 p->ast = 0;
19482
19483 while (p->lvtbl) {
19484 local_pop(p);
19485 }
19486
19487 return ast;
19488}
19489#endif /* !RIPPER */
19490
19491static rb_encoding *
19492must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19493{
19494 rb_encoding *enc = rb_parser_str_get_encoding(s);
19495 if (!rb_enc_asciicompat(enc)) {
19496 rb_raise(rb_eArgError, "invalid source encoding");
19497 }
19498 return enc;
19499}
19500
19501static rb_parser_string_t *
19502lex_getline(struct parser_params *p)
19503{
19504 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19505 if (!line) return 0;
19506 p->line_count++;
19507 rb_source_hash_update(&p->source_hash, (const uint8_t *)line->ptr, (size_t)line->len);
19508 string_buffer_append(p, line);
19509 must_be_ascii_compatible(p, line);
19510 return line;
19511}
19512
19513#ifndef RIPPER
19514rb_ast_t*
19515rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19516{
19517 p->lex.gets = gets;
19518 p->lex.input = input;
19519 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19520
19521 return yycompile(p, fname, line);
19522}
19523#endif /* !RIPPER */
19524
19525#define STR_FUNC_ESCAPE 0x01
19526#define STR_FUNC_EXPAND 0x02
19527#define STR_FUNC_REGEXP 0x04
19528#define STR_FUNC_QWORDS 0x08
19529#define STR_FUNC_SYMBOL 0x10
19530#define STR_FUNC_INDENT 0x20
19531#define STR_FUNC_LABEL 0x40
19532#define STR_FUNC_LIST 0x4000
19533#define STR_FUNC_TERM 0x8000
19534
19535enum string_type {
19536 str_label = STR_FUNC_LABEL,
19537 str_squote = (0),
19538 str_dquote = (STR_FUNC_EXPAND),
19539 str_xquote = (STR_FUNC_EXPAND),
19540 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19541 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19542 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19543 str_ssym = (STR_FUNC_SYMBOL),
19544 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19545};
19546
19547static rb_parser_string_t *
19548parser_str_new(struct parser_params *p, const char *ptr, rb_len_t len, rb_encoding *enc, int func, rb_encoding *enc0)
19549{
19550 rb_parser_string_t *pstr;
19551
19552 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19553
19554 if (!(func & STR_FUNC_REGEXP)) {
19555 if (rb_parser_is_ascii_string(p, pstr)) {
19556 }
19557 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19558 /* everything is valid in ASCII-8BIT */
19559 enc = rb_ascii8bit_encoding();
19560 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19561 }
19562 }
19563
19564 return pstr;
19565}
19566
19567static int
19568strterm_is_heredoc(rb_strterm_t *strterm)
19569{
19570 return strterm->heredoc;
19571}
19572
19573static rb_strterm_t *
19574new_strterm(struct parser_params *p, int func, int term, int paren)
19575{
19576 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19577 strterm->u.literal.func = func;
19578 strterm->u.literal.term = term;
19579 strterm->u.literal.paren = paren;
19580 return strterm;
19581}
19582
19583static rb_strterm_t *
19584new_heredoc(struct parser_params *p)
19585{
19586 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19587 strterm->heredoc = true;
19588 return strterm;
19589}
19590
19591#define peek(p,c) peek_n(p, (c), 0)
19592#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19593#define peekc(p) peekc_n(p, 0)
19594#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19595
19596#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19597static void
19598parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19599{
19600 debug_token_line(p, "add_delayed_token", line);
19601
19602 if (tok < end) {
19603 if (has_delayed_token(p)) {
19604 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19605 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19606 int end_col = (next_line ? 0 : p->delayed.end_col);
19607 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19608 dispatch_delayed_token(p, tSTRING_CONTENT);
19609 }
19610 }
19611 if (!has_delayed_token(p)) {
19612 p->delayed.token = rb_parser_string_new(p, 0, 0);
19613 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19614 p->delayed.beg_line = p->ruby_sourceline;
19615 p->delayed.beg_col = rb_len2int(tok - p->lex.pbeg);
19616 }
19617 parser_str_cat(p->delayed.token, tok, end - tok);
19618 p->delayed.end_line = p->ruby_sourceline;
19619 p->delayed.end_col = rb_len2int(end - p->lex.pbeg);
19620 p->lex.ptok = end;
19621 }
19622}
19623
19624static void
19625set_lastline(struct parser_params *p, rb_parser_string_t *str)
19626{
19627 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19628 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19629 p->lex.lastline = str;
19630}
19631
19632static int
19633nextline(struct parser_params *p, int set_encoding)
19634{
19635 rb_parser_string_t *str = p->lex.nextline;
19636 p->lex.nextline = 0;
19637 if (!str) {
19638 if (p->eofp)
19639 return -1;
19640
19641 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19642 goto end_of_input;
19643 }
19644
19645 if (!p->lex.input || !(str = lex_getline(p))) {
19646 end_of_input:
19647 p->eofp = 1;
19648 lex_goto_eol(p);
19649 return -1;
19650 }
19651#ifndef RIPPER
19652 if (p->debug_lines) {
19653 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19654 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19655 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19656 }
19657#endif
19658 p->cr_seen = FALSE;
19659 }
19660 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19661 /* after here-document without terminator */
19662 goto end_of_input;
19663 }
19664 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19665 if (p->heredoc_end > 0) {
19666 p->ruby_sourceline = p->heredoc_end;
19667 p->heredoc_end = 0;
19668 }
19669 p->ruby_sourceline++;
19670 set_lastline(p, str);
19671 token_flush(p);
19672 return 0;
19673}
19674
19675static int
19676parser_cr(struct parser_params *p, int c)
19677{
19678 if (peek(p, '\n')) {
19679 p->lex.pcur++;
19680 c = '\n';
19681 }
19682 return c;
19683}
19684
19685static inline int
19686nextc0(struct parser_params *p, int set_encoding)
19687{
19688 int c;
19689
19690 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19691 if (nextline(p, set_encoding)) return -1;
19692 }
19693 c = (unsigned char)*p->lex.pcur++;
19694 if (UNLIKELY(c == '\r')) {
19695 c = parser_cr(p, c);
19696 }
19697
19698 return c;
19699}
19700#define nextc(p) nextc0(p, TRUE)
19701
19702static void
19703pushback(struct parser_params *p, int c)
19704{
19705 if (c == -1) return;
19706 p->eofp = 0;
19707 p->lex.pcur--;
19708 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19709 p->lex.pcur--;
19710 }
19711}
19712
19713#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19714
19715#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19716#define tok(p) (p)->tokenbuf
19717#define toklen(p) (p)->tokidx
19718
19719static int
19720looking_at_eol_p(struct parser_params *p)
19721{
19722 const char *ptr = p->lex.pcur;
19723 while (!lex_eol_ptr_p(p, ptr)) {
19724 int c = (unsigned char)*ptr++;
19725 int eol = (c == '\n' || c == '#');
19726 if (eol || !ISSPACE(c)) {
19727 return eol;
19728 }
19729 }
19730 return TRUE;
19731}
19732
19733static char*
19734newtok(struct parser_params *p)
19735{
19736 p->tokidx = 0;
19737 if (!p->tokenbuf) {
19738 p->toksiz = 60;
19739 p->tokenbuf = ALLOC_N(char, 60);
19740 }
19741 if (p->toksiz > 4096) {
19742 p->toksiz = 60;
19743 REALLOC_N(p->tokenbuf, char, 60);
19744 }
19745 return p->tokenbuf;
19746}
19747
19748static char *
19749tokspace(struct parser_params *p, int n)
19750{
19751 p->tokidx += n;
19752
19753 if (p->tokidx >= p->toksiz) {
19754 do {p->toksiz *= 2;} while (p->toksiz <= p->tokidx);
19755 REALLOC_N(p->tokenbuf, char, p->toksiz);
19756 }
19757 return &p->tokenbuf[p->tokidx-n];
19758}
19759
19760static void
19761tokadd(struct parser_params *p, int c)
19762{
19763 p->tokenbuf[p->tokidx++] = (char)c;
19764 if (p->tokidx >= p->toksiz) {
19765 p->toksiz *= 2;
19766 REALLOC_N(p->tokenbuf, char, p->toksiz);
19767 }
19768}
19769
19770static int
19771tok_hex(struct parser_params *p, size_t *numlen)
19772{
19773 int c;
19774
19775 c = (int)ruby_scan_digits(p->lex.pcur, 2, 16, numlen, &c);
19776 if (!*numlen) {
19777 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19778 yyerror0("invalid hex escape");
19779 dispatch_scan_event(p, tSTRING_CONTENT);
19780 return 0;
19781 }
19782 p->lex.pcur += *numlen;
19783 return c;
19784}
19785
19786#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19787
19788static int
19789escaped_control_code(int c)
19790{
19791 int c2 = 0;
19792 switch (c) {
19793 case ' ':
19794 c2 = 's';
19795 break;
19796 case '\n':
19797 c2 = 'n';
19798 break;
19799 case '\t':
19800 c2 = 't';
19801 break;
19802 case '\v':
19803 c2 = 'v';
19804 break;
19805 case '\r':
19806 c2 = 'r';
19807 break;
19808 case '\f':
19809 c2 = 'f';
19810 break;
19811 }
19812 return c2;
19813}
19814
19815#define WARN_SPACE_CHAR(c, prefix) \
19816 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19817
19818static int
19819tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19820 int regexp_literal, const char *begin)
19821{
19822 const int wide = !begin;
19823 size_t numlen = wide ? p->lex.pend - p->lex.pcur : 4;
19824 int ov, codepoint = (int)ruby_scan_digits(p->lex.pcur, numlen, 16, &numlen, &ov);
19825
19826 p->lex.pcur += numlen;
19827 if (p->lex.strterm == NULL ||
19828 strterm_is_heredoc(p->lex.strterm) ||
19829 (p->lex.strterm->u.literal.func != str_regexp)) {
19830 if (!begin) begin = p->lex.pcur;
19831 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19832 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19833 yyerror0("invalid Unicode escape");
19834 dispatch_scan_event(p, tSTRING_CONTENT);
19835 return wide && numlen > 0;
19836 }
19837 if (codepoint > 0x10ffff) {
19838 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19839 yyerror0("invalid Unicode codepoint (too large)");
19840 dispatch_scan_event(p, tSTRING_CONTENT);
19841 return wide;
19842 }
19843 if ((codepoint & 0xfffff800) == 0xd800) {
19844 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19845 yyerror0("invalid Unicode codepoint");
19846 dispatch_scan_event(p, tSTRING_CONTENT);
19847 return wide;
19848 }
19849 }
19850 if (regexp_literal) {
19851 tokcopy(p, (int)numlen);
19852 }
19853 else if (codepoint >= 0x80) {
19854 rb_encoding *utf8 = rb_utf8_encoding();
19855 if (*encp && utf8 != *encp) {
19856 YYLTYPE loc = RUBY_INIT_YYLLOC();
19857 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19858 parser_show_error_line(p, &loc);
19859 return wide;
19860 }
19861 *encp = utf8;
19862 tokaddmbc(p, codepoint, *encp);
19863 }
19864 else {
19865 tokadd(p, codepoint);
19866 }
19867 return TRUE;
19868}
19869
19870static int tokadd_mbchar(struct parser_params *p, int c);
19871
19872static int
19873tokskip_mbchar(struct parser_params *p)
19874{
19875 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19876 if (len > 0) {
19877 p->lex.pcur += len - 1;
19878 }
19879 return len;
19880}
19881
19882/* return value is for ?\u3042 */
19883static void
19884tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19885 int term, int symbol_literal, int regexp_literal)
19886{
19887 /*
19888 * If `term` is not -1, then we allow multiple codepoints in \u{}
19889 * upto `term` byte, otherwise we're parsing a character literal.
19890 * And then add the codepoints to the current token.
19891 */
19892 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19893
19894 const int open_brace = '{', close_brace = '}';
19895
19896 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19897
19898 if (peek(p, open_brace)) { /* handle \u{...} form */
19899 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19900 /*
19901 * Skip parsing validation code and copy bytes as-is until term or
19902 * closing brace, in order to correctly handle extended regexps where
19903 * invalid unicode escapes are allowed in comments. The regexp parser
19904 * does its own validation and will catch any issues.
19905 */
19906 tokadd(p, open_brace);
19907 ++p->lex.pcur;
19908 while (!lex_eol_p(p)) {
19909 int c = peekc(p);
19910 if (c == close_brace) {
19911 tokadd(p, c);
19912 ++p->lex.pcur;
19913 break;
19914 }
19915 else if (c == term) {
19916 break;
19917 }
19918 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19919 tokadd(p, c);
19920 c = *++p->lex.pcur;
19921 }
19922 ++p->lex.pcur;
19923 tokadd_mbchar(p, c);
19924 }
19925 }
19926 else {
19927 const char *second = NULL;
19928 int c, last = nextc(p);
19929 if (lex_eol_p(p)) goto unterminated;
19930 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19931 while (c != close_brace) {
19932 if (c == term) goto unterminated;
19933 if (second == multiple_codepoints)
19934 second = p->lex.pcur;
19935 if (regexp_literal) tokadd(p, last);
19936 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19937 break;
19938 }
19939 while (ISSPACE(c = peekc(p))) {
19940 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19941 last = c;
19942 }
19943 if (term == -1 && !second)
19944 second = multiple_codepoints;
19945 }
19946
19947 if (c != close_brace) {
19948 unterminated:
19949 flush_string_content(p, rb_utf8_encoding(), 0);
19950 yyerror0("unterminated Unicode escape");
19951 dispatch_scan_event(p, tSTRING_CONTENT);
19952 return;
19953 }
19954 if (second && second != multiple_codepoints) {
19955 const char *pcur = p->lex.pcur;
19956 p->lex.pcur = second;
19957 dispatch_scan_event(p, tSTRING_CONTENT);
19958 token_flush(p);
19959 p->lex.pcur = pcur;
19960 yyerror0(multiple_codepoints);
19961 token_flush(p);
19962 }
19963
19964 if (regexp_literal) tokadd(p, close_brace);
19965 nextc(p);
19966 }
19967 }
19968 else { /* handle \uxxxx form */
19969 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19970 token_flush(p);
19971 return;
19972 }
19973 }
19974}
19975
19976#define ESCAPE_CONTROL 1
19977#define ESCAPE_META 2
19978
19979static int
19980read_escape(struct parser_params *p, int flags, const char *begin)
19981{
19982 int c;
19983 size_t numlen;
19984
19985 switch (c = nextc(p)) {
19986 case '\\': /* Backslash */
19987 return c;
19988
19989 case 'n': /* newline */
19990 return '\n';
19991
19992 case 't': /* horizontal tab */
19993 return '\t';
19994
19995 case 'r': /* carriage-return */
19996 return '\r';
19997
19998 case 'f': /* form-feed */
19999 return '\f';
20000
20001 case 'v': /* vertical tab */
20002 return '\13';
20003
20004 case 'a': /* alarm(bell) */
20005 return '\007';
20006
20007 case 'e': /* escape */
20008 return 033;
20009
20010 case '0': case '1': case '2': case '3': /* octal constant */
20011 case '4': case '5': case '6': case '7':
20012 pushback(p, c);
20013 int ov;
20014 c = (int)ruby_scan_digits(p->lex.pcur, 3, 8, &numlen, &ov);
20015 p->lex.pcur += numlen;
20016 return c;
20017
20018 case 'x': /* hex constant */
20019 c = tok_hex(p, &numlen);
20020 if (numlen == 0) return 0;
20021 return c;
20022
20023 case 'b': /* backspace */
20024 return '\010';
20025
20026 case 's': /* space */
20027 return ' ';
20028
20029 case 'M':
20030 if (flags & ESCAPE_META) goto eof;
20031 if ((c = nextc(p)) != '-') {
20032 goto eof;
20033 }
20034 if ((c = nextc(p)) == '\\') {
20035 switch (peekc(p)) {
20036 case 'u': case 'U':
20037 nextc(p);
20038 goto eof;
20039 }
20040 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
20041 }
20042 else if (c == -1) goto eof;
20043 else if (!ISASCII(c)) {
20044 tokskip_mbchar(p);
20045 goto eof;
20046 }
20047 else {
20048 int c2 = escaped_control_code(c);
20049 if (c2) {
20050 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
20051 WARN_SPACE_CHAR(c2, "\\M-");
20052 }
20053 else {
20054 WARN_SPACE_CHAR(c2, "\\C-\\M-");
20055 }
20056 }
20057 else if (ISCNTRL(c)) goto eof;
20058 return ((c & 0xff) | 0x80);
20059 }
20060
20061 case 'C':
20062 if ((c = nextc(p)) != '-') {
20063 goto eof;
20064 }
20065 case 'c':
20066 if (flags & ESCAPE_CONTROL) goto eof;
20067 if ((c = nextc(p))== '\\') {
20068 switch (peekc(p)) {
20069 case 'u': case 'U':
20070 nextc(p);
20071 goto eof;
20072 }
20073 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
20074 }
20075 else if (c == '?')
20076 return 0177;
20077 else if (c == -1) goto eof;
20078 else if (!ISASCII(c)) {
20079 tokskip_mbchar(p);
20080 goto eof;
20081 }
20082 else {
20083 int c2 = escaped_control_code(c);
20084 if (c2) {
20085 if (ISCNTRL(c)) {
20086 if (flags & ESCAPE_META) {
20087 WARN_SPACE_CHAR(c2, "\\M-");
20088 }
20089 else {
20090 WARN_SPACE_CHAR(c2, "");
20091 }
20092 }
20093 else {
20094 if (flags & ESCAPE_META) {
20095 WARN_SPACE_CHAR(c2, "\\M-\\C-");
20096 }
20097 else {
20098 WARN_SPACE_CHAR(c2, "\\C-");
20099 }
20100 }
20101 }
20102 else if (ISCNTRL(c)) goto eof;
20103 }
20104 return c & 0x9f;
20105
20106 eof:
20107 case -1:
20108 flush_string_content(p, p->enc, p->lex.pcur - begin);
20109 yyerror0("Invalid escape character syntax");
20110 dispatch_scan_event(p, tSTRING_CONTENT);
20111 return '\0';
20112
20113 default:
20114 if (!ISASCII(c)) {
20115 tokskip_mbchar(p);
20116 goto eof;
20117 }
20118 return c;
20119 }
20120}
20121
20122static void
20123tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
20124{
20125 int len = rb_enc_codelen(c, enc);
20126 rb_enc_mbcput(c, tokspace(p, len), enc);
20127}
20128
20129static int
20130tokadd_escape(struct parser_params *p)
20131{
20132 int c;
20133 size_t numlen;
20134 const char *begin = p->lex.pcur;
20135
20136 switch (c = nextc(p)) {
20137 case '\n':
20138 return 0; /* just ignore */
20139
20140 case '0': case '1': case '2': case '3': /* octal constant */
20141 case '4': case '5': case '6': case '7':
20142 {
20143 int ov;
20144 ruby_scan_digits(--p->lex.pcur, 3, 8, &numlen, &ov);
20145 if (numlen == 0) goto eof;
20146 p->lex.pcur += numlen;
20147 tokcopy(p, (int)numlen + 1);
20148 }
20149 return 0;
20150
20151 case 'x': /* hex constant */
20152 {
20153 tok_hex(p, &numlen);
20154 if (numlen == 0) return -1;
20155 tokcopy(p, (int)numlen + 2);
20156 }
20157 return 0;
20158
20159 eof:
20160 case -1:
20161 flush_string_content(p, p->enc, p->lex.pcur - begin);
20162 yyerror0("Invalid escape character syntax");
20163 token_flush(p);
20164 return -1;
20165
20166 default:
20167 tokadd(p, '\\');
20168 tokadd(p, c);
20169 }
20170 return 0;
20171}
20172
20173static int
20174char_to_option(int c)
20175{
20176 int val;
20177
20178 switch (c) {
20179 case 'i':
20180 val = RE_ONIG_OPTION_IGNORECASE;
20181 break;
20182 case 'x':
20183 val = RE_ONIG_OPTION_EXTEND;
20184 break;
20185 case 'm':
20186 val = RE_ONIG_OPTION_MULTILINE;
20187 break;
20188 default:
20189 val = 0;
20190 break;
20191 }
20192 return val;
20193}
20194
20195#define ARG_ENCODING_FIXED 16
20196#define ARG_ENCODING_NONE 32
20197#define ENC_ASCII8BIT 1
20198#define ENC_EUC_JP 2
20199#define ENC_Windows_31J 3
20200#define ENC_UTF8 4
20201
20202static int
20203char_to_option_kcode(int c, int *option, int *kcode)
20204{
20205 *option = 0;
20206
20207 switch (c) {
20208 case 'n':
20209 *kcode = ENC_ASCII8BIT;
20210 return (*option = ARG_ENCODING_NONE);
20211 case 'e':
20212 *kcode = ENC_EUC_JP;
20213 break;
20214 case 's':
20215 *kcode = ENC_Windows_31J;
20216 break;
20217 case 'u':
20218 *kcode = ENC_UTF8;
20219 break;
20220 default:
20221 *kcode = -1;
20222 return (*option = char_to_option(c));
20223 }
20224 *option = ARG_ENCODING_FIXED;
20225 return 1;
20226}
20227
20228static int
20229regx_options(struct parser_params *p)
20230{
20231 int kcode = 0;
20232 int kopt = 0;
20233 int options = 0;
20234 int c, opt, kc;
20235
20236 newtok(p);
20237 while (c = nextc(p), ISALPHA(c)) {
20238 if (c == 'o') {
20239 options |= RE_OPTION_ONCE;
20240 }
20241 else if (char_to_option_kcode(c, &opt, &kc)) {
20242 if (kc >= 0) {
20243 if (kc != ENC_ASCII8BIT) kcode = c;
20244 kopt = opt;
20245 }
20246 else {
20247 options |= opt;
20248 }
20249 }
20250 else {
20251 tokadd(p, c);
20252 }
20253 }
20254 options |= kopt;
20255 pushback(p, c);
20256 if (toklen(p)) {
20257 YYLTYPE loc = RUBY_INIT_YYLLOC();
20258 tokfix(p);
20259 compile_error(p, "unknown regexp option%s - %*s",
20260 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
20261 parser_show_error_line(p, &loc);
20262 }
20263 return options | RE_OPTION_ENCODING(kcode);
20264}
20265
20266static int
20267tokadd_mbchar(struct parser_params *p, int c)
20268{
20269 int len = parser_precise_mbclen(p, p->lex.pcur-1);
20270 if (len < 0) return -1;
20271 tokadd(p, c);
20272 p->lex.pcur += --len;
20273 if (len > 0) tokcopy(p, len);
20274 return c;
20275}
20276
20277static inline int
20278simple_re_meta(int c)
20279{
20280 switch (c) {
20281 case '$': case '*': case '+': case '.':
20282 case '?': case '^': case '|':
20283 case ')': case ']': case '}': case '>':
20284 return TRUE;
20285 default:
20286 return FALSE;
20287 }
20288}
20289
20290static int
20291parser_update_heredoc_indent(struct parser_params *p, int c)
20292{
20293 if (p->heredoc_line_indent == -1) {
20294 if (c == '\n') p->heredoc_line_indent = 0;
20295 }
20296 else {
20297 if (c == ' ') {
20298 p->heredoc_line_indent++;
20299 return TRUE;
20300 }
20301 else if (c == '\t') {
20302 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
20303 p->heredoc_line_indent = w * TAB_WIDTH;
20304 return TRUE;
20305 }
20306 else if (c != '\n') {
20307 if (p->heredoc_indent > p->heredoc_line_indent) {
20308 p->heredoc_indent = p->heredoc_line_indent;
20309 }
20310 p->heredoc_line_indent = -1;
20311 }
20312 else {
20313 /* Whitespace only line has no indentation */
20314 p->heredoc_line_indent = 0;
20315 }
20316 }
20317 return FALSE;
20318}
20319
20320static void
20321parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
20322{
20323 YYLTYPE loc = RUBY_INIT_YYLLOC();
20324 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
20325 compile_error(p, "%s mixed within %s source", n1, n2);
20326 parser_show_error_line(p, &loc);
20327}
20328
20329static void
20330parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
20331{
20332 const char *pos = p->lex.pcur;
20333 p->lex.pcur = beg;
20334 parser_mixed_error(p, enc1, enc2);
20335 p->lex.pcur = pos;
20336}
20337
20338static inline char
20339nibble_char_upper(unsigned int c)
20340{
20341 c &= 0xf;
20342 return c + (c < 10 ? '0' : 'A' - 10);
20343}
20344
20345static int
20346tokadd_string(struct parser_params *p,
20347 int func, int term, int paren, long *nest,
20348 rb_encoding **encp, rb_encoding **enc)
20349{
20350 int c;
20351 bool erred = false;
20352#ifdef RIPPER
20353 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
20354 int top_of_line = FALSE;
20355#endif
20356
20357#define mixed_error(enc1, enc2) \
20358 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
20359#define mixed_escape(beg, enc1, enc2) \
20360 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
20361
20362 while ((c = nextc(p)) != -1) {
20363 if (p->heredoc_indent > 0) {
20364 parser_update_heredoc_indent(p, c);
20365 }
20366#ifdef RIPPER
20367 if (top_of_line && heredoc_end == p->ruby_sourceline) {
20368 pushback(p, c);
20369 break;
20370 }
20371#endif
20372
20373 if (paren && c == paren) {
20374 ++*nest;
20375 }
20376 else if (c == term) {
20377 if (!nest || !*nest) {
20378 pushback(p, c);
20379 break;
20380 }
20381 --*nest;
20382 }
20383 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
20384 unsigned char c2 = *p->lex.pcur;
20385 if (c2 == '$' || c2 == '@' || c2 == '{') {
20386 pushback(p, c);
20387 break;
20388 }
20389 }
20390 else if (c == '\\') {
20391 c = nextc(p);
20392 switch (c) {
20393 case '\n':
20394 if (func & STR_FUNC_QWORDS) break;
20395 if (func & STR_FUNC_EXPAND) {
20396 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
20397 continue;
20398 if (c == term) {
20399 c = '\\';
20400 goto terminate;
20401 }
20402 }
20403 tokadd(p, '\\');
20404 break;
20405
20406 case '\\':
20407 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
20408 break;
20409
20410 case 'u':
20411 if ((func & STR_FUNC_EXPAND) == 0) {
20412 tokadd(p, '\\');
20413 break;
20414 }
20415 tokadd_utf8(p, enc, term,
20416 func & STR_FUNC_SYMBOL,
20417 func & STR_FUNC_REGEXP);
20418 continue;
20419
20420 default:
20421 if (c == -1) return -1;
20422 if (!ISASCII(c)) {
20423 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
20424 goto non_ascii;
20425 }
20426 if (func & STR_FUNC_REGEXP) {
20427 switch (c) {
20428 case 'c':
20429 case 'C':
20430 case 'M': {
20431 pushback(p, c);
20432 c = read_escape(p, 0, p->lex.pcur - 1);
20433
20434 char *t = tokspace(p, rb_strlen_lit("\\x00"));
20435 *t++ = '\\';
20436 *t++ = 'x';
20437 *t++ = nibble_char_upper(c >> 4);
20438 *t++ = nibble_char_upper(c);
20439 continue;
20440 }
20441 }
20442
20443 if (c == term && !simple_re_meta(c)) {
20444 tokadd(p, c);
20445 continue;
20446 }
20447 pushback(p, c);
20448 if ((c = tokadd_escape(p)) < 0)
20449 return -1;
20450 if (*enc && *enc != *encp) {
20451 mixed_escape(p->lex.ptok+2, *enc, *encp);
20452 }
20453 continue;
20454 }
20455 else if (func & STR_FUNC_EXPAND) {
20456 pushback(p, c);
20457 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
20458 c = read_escape(p, 0, p->lex.pcur - 1);
20459 }
20460 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20461 /* ignore backslashed spaces in %w */
20462 }
20463 else if (c != term && !(paren && c == paren)) {
20464 tokadd(p, '\\');
20465 pushback(p, c);
20466 continue;
20467 }
20468 }
20469 }
20470 else if (!parser_isascii(p)) {
20471 non_ascii:
20472 if (!*enc) {
20473 *enc = *encp;
20474 }
20475 else if (*enc != *encp) {
20476 mixed_error(*enc, *encp);
20477 continue;
20478 }
20479 if (tokadd_mbchar(p, c) == -1) return -1;
20480 continue;
20481 }
20482 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20483 pushback(p, c);
20484 break;
20485 }
20486 if (c & 0x80) {
20487 if (!*enc) {
20488 *enc = *encp;
20489 }
20490 else if (*enc != *encp) {
20491 mixed_error(*enc, *encp);
20492 continue;
20493 }
20494 }
20495 tokadd(p, c);
20496#ifdef RIPPER
20497 top_of_line = (c == '\n');
20498#endif
20499 }
20500 terminate:
20501 if (*enc) *encp = *enc;
20502 return c;
20503}
20504
20505#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20506
20507static void
20508flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20509{
20510 p->lex.pcur -= back;
20511 if (has_delayed_token(p)) {
20512 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20513 if (len > 0) {
20514 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20515 p->delayed.end_line = p->ruby_sourceline;
20516 p->delayed.end_col = rb_len2int(p->lex.pcur - p->lex.pbeg);
20517 }
20518 dispatch_delayed_token(p, tSTRING_CONTENT);
20519 p->lex.ptok = p->lex.pcur;
20520 }
20521 dispatch_scan_event(p, tSTRING_CONTENT);
20522 p->lex.pcur += back;
20523}
20524
20525/* this can be shared with ripper, since it's independent from struct
20526 * parser_params. */
20527#ifndef RIPPER
20528#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20529#define SPECIAL_PUNCT(idx) ( \
20530 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20531 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20532 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20533 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20534 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20535 BIT('0', idx))
20536const uint_least32_t ruby_global_name_punct_bits[] = {
20537 SPECIAL_PUNCT(0),
20538 SPECIAL_PUNCT(1),
20539 SPECIAL_PUNCT(2),
20540};
20541#undef BIT
20542#undef SPECIAL_PUNCT
20543#endif
20544
20545static enum yytokentype
20546parser_peek_variable_name(struct parser_params *p)
20547{
20548 int c;
20549 const char *ptr = p->lex.pcur;
20550
20551 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20552 c = *ptr++;
20553 switch (c) {
20554 case '$':
20555 if ((c = *ptr) == '-') {
20556 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20557 c = *ptr;
20558 }
20559 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20560 return tSTRING_DVAR;
20561 }
20562 break;
20563 case '@':
20564 if ((c = *ptr) == '@') {
20565 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20566 c = *ptr;
20567 }
20568 break;
20569 case '{':
20570 p->lex.pcur = ptr;
20571 p->command_start = TRUE;
20572 yylval.state = p->lex.state;
20573 return tSTRING_DBEG;
20574 default:
20575 return 0;
20576 }
20577 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20578 return tSTRING_DVAR;
20579 return 0;
20580}
20581
20582#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20583#define IS_END() IS_lex_state(EXPR_END_ANY)
20584#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20585#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20586#define IS_LABEL_POSSIBLE() (\
20587 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20588 IS_ARG())
20589#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20590#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20591
20592static inline enum yytokentype
20593parser_string_term(struct parser_params *p, int func)
20594{
20595 xfree(p->lex.strterm);
20596 p->lex.strterm = 0;
20597 if (func & STR_FUNC_REGEXP) {
20598 set_yylval_num(regx_options(p));
20599 dispatch_scan_event(p, tREGEXP_END);
20600 SET_LEX_STATE(EXPR_END);
20601 return tREGEXP_END;
20602 }
20603 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20604 nextc(p);
20605 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20606 return tLABEL_END;
20607 }
20608 SET_LEX_STATE(EXPR_END);
20609 return tSTRING_END;
20610}
20611
20612static enum yytokentype
20613parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20614{
20615 int func = quote->func;
20616 int term = quote->term;
20617 int paren = quote->paren;
20618 int c, space = 0;
20619 rb_encoding *enc = p->enc;
20620 rb_encoding *base_enc = 0;
20621 rb_parser_string_t *lit;
20622
20623 if (func & STR_FUNC_TERM) {
20624 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20625 SET_LEX_STATE(EXPR_END);
20626 xfree(p->lex.strterm);
20627 p->lex.strterm = 0;
20628 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20629 }
20630 c = nextc(p);
20631 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20632 while (c != '\n' && ISSPACE(c = nextc(p)));
20633 space = 1;
20634 }
20635 if (func & STR_FUNC_LIST) {
20636 quote->func &= ~STR_FUNC_LIST;
20637 space = 1;
20638 }
20639 if (c == term && !quote->nest) {
20640 if (func & STR_FUNC_QWORDS) {
20641 quote->func |= STR_FUNC_TERM;
20642 pushback(p, c); /* dispatch the term at tSTRING_END */
20643 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20644 return ' ';
20645 }
20646 return parser_string_term(p, func);
20647 }
20648 if (space) {
20649 if (!ISSPACE(c)) pushback(p, c);
20650 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20651 return ' ';
20652 }
20653 newtok(p);
20654 if ((func & STR_FUNC_EXPAND) && c == '#') {
20655 enum yytokentype t = parser_peek_variable_name(p);
20656 if (t) return t;
20657 tokadd(p, '#');
20658 c = nextc(p);
20659 }
20660 pushback(p, c);
20661 if (tokadd_string(p, func, term, paren, &quote->nest,
20662 &enc, &base_enc) == -1) {
20663 if (p->eofp) {
20664#ifndef RIPPER
20665# define unterminated_literal(mesg) yyerror0(mesg)
20666#else
20667# define unterminated_literal(mesg) compile_error(p, mesg)
20668#endif
20669 literal_flush(p, p->lex.pcur);
20670 if (func & STR_FUNC_QWORDS) {
20671 /* no content to add, bailing out here */
20672 unterminated_literal("unterminated list meets end of file");
20673 xfree(p->lex.strterm);
20674 p->lex.strterm = 0;
20675 return tSTRING_END;
20676 }
20677 if (func & STR_FUNC_REGEXP) {
20678 unterminated_literal("unterminated regexp meets end of file");
20679 }
20680 else {
20681 unterminated_literal("unterminated string meets end of file");
20682 }
20683 quote->func |= STR_FUNC_TERM;
20684 }
20685 }
20686
20687 tokfix(p);
20688 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20689 set_yylval_str(lit);
20690 flush_string_content(p, enc, 0);
20691
20692 return tSTRING_CONTENT;
20693}
20694
20695static enum yytokentype
20696heredoc_identifier(struct parser_params *p)
20697{
20698 /*
20699 * term_len is length of `<<"END"` except `END`,
20700 * in this case term_len is 4 (<, <, " and ").
20701 */
20702 rb_len_t len, offset = p->lex.pcur - p->lex.pbeg;
20703 int c = nextc(p), term, func = 0, quote = 0;
20704 enum yytokentype token = tSTRING_BEG;
20705 int indent = 0;
20706
20707 if (c == '-') {
20708 c = nextc(p);
20709 func = STR_FUNC_INDENT;
20710 offset++;
20711 }
20712 else if (c == '~') {
20713 c = nextc(p);
20714 func = STR_FUNC_INDENT;
20715 offset++;
20716 indent = INT_MAX;
20717 }
20718 switch (c) {
20719 case '\'':
20720 func |= str_squote; goto quoted;
20721 case '"':
20722 func |= str_dquote; goto quoted;
20723 case '`':
20724 token = tXSTRING_BEG;
20725 func |= str_xquote; goto quoted;
20726
20727 quoted:
20728 quote++;
20729 offset++;
20730 term = c;
20731 len = 0;
20732 while ((c = nextc(p)) != term) {
20733 if (c == -1 || c == '\r' || c == '\n') {
20734 yyerror0("unterminated here document identifier");
20735 return -1;
20736 }
20737 }
20738 break;
20739
20740 default:
20741 if (!parser_is_identchar(p)) {
20742 pushback(p, c);
20743 if (func & STR_FUNC_INDENT) {
20744 pushback(p, indent > 0 ? '~' : '-');
20745 }
20746 return 0;
20747 }
20748 func |= str_dquote;
20749 do {
20750 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20751 if (n < 0) return 0;
20752 p->lex.pcur += --n;
20753 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20754 pushback(p, c);
20755 break;
20756 }
20757
20758 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20759 if ((rb_ulen_t)len >= HERETERM_LENGTH_MAX)
20760 yyerror0("too long here document identifier");
20761 dispatch_scan_event(p, tHEREDOC_BEG);
20762 lex_goto_eol(p);
20763
20764 p->lex.strterm = new_heredoc(p);
20765 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20766 here->offset = offset;
20767 here->sourceline = p->ruby_sourceline;
20768 here->length = (unsigned)len;
20769 here->quote = quote;
20770 here->func = func;
20771 here->lastline = p->lex.lastline;
20772
20773 token_flush(p);
20774 p->heredoc_indent = indent;
20775 p->heredoc_line_indent = 0;
20776 return token;
20777}
20778
20779static void
20780heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20781{
20782 rb_parser_string_t *line;
20783 rb_strterm_t *term = p->lex.strterm;
20784
20785 p->lex.strterm = 0;
20786 line = here->lastline;
20787 p->lex.lastline = line;
20788 p->lex.pbeg = PARSER_STRING_PTR(line);
20789 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20790 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20791 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20792 p->heredoc_end = p->ruby_sourceline;
20793 p->ruby_sourceline = (int)here->sourceline;
20794 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20795 p->eofp = 0;
20796 xfree(term);
20797}
20798
20799static int
20800dedent_string_column(const char *str, rb_len_t len, int width)
20801{
20802 int i, col = 0;
20803
20804 for (i = 0; i < len && col < width; i++) {
20805 if (str[i] == ' ') {
20806 col++;
20807 }
20808 else if (str[i] == '\t') {
20809 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20810 if (n > width) break;
20811 col = n;
20812 }
20813 else {
20814 break;
20815 }
20816 }
20817
20818 return i;
20819}
20820
20821static int
20822dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20823{
20824 char *str;
20825 rb_len_t len;
20826 int i;
20827
20828 len = PARSER_STRING_LEN(string);
20829 str = PARSER_STRING_PTR(string);
20830
20831 i = dedent_string_column(str, len, width);
20832 if (!i) return 0;
20833
20834 rb_parser_str_modify(string);
20835 str = PARSER_STRING_PTR(string);
20836 if (PARSER_STRING_LEN(string) != len)
20837 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20838 MEMMOVE(str, str + i, char, len - i);
20839 rb_parser_str_set_len(p, string, len - i);
20840 return i;
20841}
20842
20843static NODE *
20844heredoc_dedent(struct parser_params *p, NODE *root)
20845{
20846 NODE *node, *str_node, *prev_node;
20847 int indent = p->heredoc_indent;
20848 rb_parser_string_t *prev_lit = 0;
20849
20850 if (indent <= 0) return root;
20851 if (!root) return root;
20852
20853 prev_node = node = str_node = root;
20854 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20855
20856 while (str_node) {
20857 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20858 if (nd_fl_newline(str_node)) {
20859 dedent_string(p, lit, indent);
20860 }
20861 if (!prev_lit) {
20862 prev_lit = lit;
20863 }
20864 else if (!literal_concat0(p, prev_lit, lit)) {
20865 return 0;
20866 }
20867 else {
20868 NODE *end = RNODE_LIST(node)->as.nd_end;
20869 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20870 if (!node) {
20871 if (nd_type_p(prev_node, NODE_DSTR))
20872 nd_set_type(prev_node, NODE_STR);
20873 break;
20874 }
20875 RNODE_LIST(node)->as.nd_end = end;
20876 goto next_str;
20877 }
20878
20879 str_node = 0;
20880 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20881 next_str:
20882 if (!nd_type_p(node, NODE_LIST)) break;
20883 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20884 enum node_type type = nd_type(str_node);
20885 if (type == NODE_STR || type == NODE_DSTR) break;
20886 prev_lit = 0;
20887 str_node = 0;
20888 }
20889 }
20890 }
20891 return root;
20892}
20893
20894static int
20895whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20896{
20897 const char *beg = p->lex.pbeg;
20898 const char *ptr = p->lex.pend;
20899
20900 if (ptr - beg < len) return FALSE;
20901 if (ptr > beg && ptr[-1] == '\n') {
20902 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20903 if (ptr - beg < len) return FALSE;
20904 }
20905 if (strncmp(eos, ptr -= len, len)) return FALSE;
20906 if (indent) {
20907 while (beg < ptr && ISSPACE(*beg)) beg++;
20908 }
20909 return beg == ptr;
20910}
20911
20912static int
20913word_match_p(struct parser_params *p, const char *word, long len)
20914{
20915 if (strncmp(p->lex.pcur, word, len)) return 0;
20916 if (lex_eol_n_p(p, len)) return 1;
20917 int c = (unsigned char)p->lex.pcur[len];
20918 if (ISSPACE(c)) return 1;
20919 switch (c) {
20920 case '\0': case '\004': case '\032': return 1;
20921 }
20922 return 0;
20923}
20924
20925#define NUM_SUFFIX_R (1<<0)
20926#define NUM_SUFFIX_I (1<<1)
20927#define NUM_SUFFIX_ALL 3
20928
20929static int
20930number_literal_suffix(struct parser_params *p, int mask)
20931{
20932 int c, result = 0;
20933 const char *lastp = p->lex.pcur;
20934
20935 while ((c = nextc(p)) != -1) {
20936 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20937 result |= (mask & NUM_SUFFIX_I);
20938 mask &= ~NUM_SUFFIX_I;
20939 /* r after i, rational of complex is disallowed */
20940 mask &= ~NUM_SUFFIX_R;
20941 continue;
20942 }
20943 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20944 result |= (mask & NUM_SUFFIX_R);
20945 mask &= ~NUM_SUFFIX_R;
20946 continue;
20947 }
20948 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20949 p->lex.pcur = lastp;
20950 return 0;
20951 }
20952 pushback(p, c);
20953 break;
20954 }
20955 return result;
20956}
20957
20958static enum yytokentype
20959set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20960{
20961 enum rb_numeric_type numeric_type = integer_literal;
20962
20963 if (type == tFLOAT) {
20964 numeric_type = float_literal;
20965 }
20966
20967 if (suffix & NUM_SUFFIX_R) {
20968 type = tRATIONAL;
20969 numeric_type = rational_literal;
20970 }
20971 if (suffix & NUM_SUFFIX_I) {
20972 type = tIMAGINARY;
20973 }
20974
20975 switch (type) {
20976 case tINTEGER:
20977 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20978 break;
20979 case tFLOAT:
20980 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20981 break;
20982 case tRATIONAL:
20983 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20984 break;
20985 case tIMAGINARY:
20986 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20987 (void)numeric_type; /* for ripper */
20988 break;
20989 default:
20990 rb_bug("unexpected token: %d", type);
20991 }
20992 SET_LEX_STATE(EXPR_END);
20993 return type;
20994}
20995
20996#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20997static void
20998parser_dispatch_heredoc_end(struct parser_params *p, int line)
20999{
21000 if (has_delayed_token(p))
21001 dispatch_delayed_token(p, tSTRING_CONTENT);
21002
21003#ifdef RIPPER
21004 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
21005 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
21006#else
21007 if (p->keep_tokens) {
21008 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
21009 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
21010 parser_append_tokens(p, str, tHEREDOC_END, line);
21011 }
21012#endif
21013
21014 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
21015 lex_goto_eol(p);
21016 token_flush(p);
21017}
21018
21019static enum yytokentype
21020here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
21021{
21022 int c, func, indent = 0;
21023 const char *eos, *ptr, *ptr_end;
21024 long len;
21025 rb_parser_string_t *str = 0;
21026 rb_encoding *enc = p->enc;
21027 rb_encoding *base_enc = 0;
21028 int bol;
21029#ifdef RIPPER
21030 VALUE s_value;
21031#endif
21032
21033 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
21034 len = here->length;
21035 indent = (func = here->func) & STR_FUNC_INDENT;
21036
21037 if ((c = nextc(p)) == -1) {
21038 error:
21039#ifdef RIPPER
21040 if (!has_delayed_token(p)) {
21041 dispatch_scan_event(p, tSTRING_CONTENT);
21042 }
21043 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
21044 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
21045 if (!(func & STR_FUNC_REGEXP)) {
21046 int cr = ENC_CODERANGE_UNKNOWN;
21047 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
21048 if (cr != ENC_CODERANGE_7BIT &&
21049 rb_is_usascii_enc(p->enc) &&
21050 enc != rb_utf8_encoding()) {
21051 enc = rb_ascii8bit_encoding();
21052 }
21053 }
21054 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
21055 }
21056 dispatch_delayed_token(p, tSTRING_CONTENT);
21057 }
21058 else {
21059 dispatch_delayed_token(p, tSTRING_CONTENT);
21060 dispatch_scan_event(p, tSTRING_CONTENT);
21061 }
21062 lex_goto_eol(p);
21063#endif
21064 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21065 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
21066 (int)len, eos);
21067 token_flush(p);
21068 SET_LEX_STATE(EXPR_END);
21069 return tSTRING_END;
21070 }
21071 bol = was_bol(p);
21072 if (!bol) {
21073 /* not beginning of line, cannot be the terminator */
21074 }
21075 else if (p->heredoc_line_indent == -1) {
21076 /* `heredoc_line_indent == -1` means
21077 * - "after an interpolation in the same line", or
21078 * - "in a continuing line"
21079 */
21080 p->heredoc_line_indent = 0;
21081 }
21082 else if (whole_match_p(p, eos, len, indent)) {
21083 dispatch_heredoc_end(p);
21084 restore:
21085 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21086 token_flush(p);
21087 SET_LEX_STATE(EXPR_END);
21088 return tSTRING_END;
21089 }
21090
21091 if (!(func & STR_FUNC_EXPAND)) {
21092 do {
21093 ptr = PARSER_STRING_PTR(p->lex.lastline);
21094 ptr_end = p->lex.pend;
21095 if (ptr_end > ptr) {
21096 switch (ptr_end[-1]) {
21097 case '\n':
21098 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
21099 ptr_end++;
21100 break;
21101 }
21102 case '\r':
21103 --ptr_end;
21104 }
21105 }
21106
21107 if (p->heredoc_indent > 0) {
21108 long i = 0;
21109 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
21110 i++;
21111 p->heredoc_line_indent = 0;
21112 }
21113
21114 if (str)
21115 parser_str_cat(str, ptr, ptr_end - ptr);
21116 else
21117 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
21118 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
21119 lex_goto_eol(p);
21120 if (p->heredoc_indent > 0) {
21121 goto flush_str;
21122 }
21123 if (nextc(p) == -1) {
21124 if (str) {
21125 rb_parser_string_free(p, str);
21126 str = 0;
21127 }
21128 goto error;
21129 }
21130 } while (!whole_match_p(p, eos, len, indent));
21131 }
21132 else {
21133 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
21134 newtok(p);
21135 if (c == '#') {
21136 enum yytokentype t = parser_peek_variable_name(p);
21137 if (p->heredoc_line_indent != -1) {
21138 if (p->heredoc_indent > p->heredoc_line_indent) {
21139 p->heredoc_indent = p->heredoc_line_indent;
21140 }
21141 p->heredoc_line_indent = -1;
21142 }
21143 if (t) return t;
21144 tokadd(p, '#');
21145 c = nextc(p);
21146 }
21147 do {
21148 pushback(p, c);
21149 enc = p->enc;
21150 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
21151 if (p->eofp) goto error;
21152 goto restore;
21153 }
21154 if (c != '\n') {
21155 if (c == '\\') p->heredoc_line_indent = -1;
21156 flush:
21157 str = STR_NEW3(tok(p), toklen(p), enc, func);
21158 flush_str:
21159 set_yylval_str(str);
21160#ifndef RIPPER
21161 if (bol) nd_set_fl_newline(yylval.node);
21162#endif
21163 flush_string_content(p, enc, 0);
21164 return tSTRING_CONTENT;
21165 }
21166 tokadd(p, nextc(p));
21167 if (p->heredoc_indent > 0) {
21168 lex_goto_eol(p);
21169 goto flush;
21170 }
21171 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
21172 if ((c = nextc(p)) == -1) goto error;
21173 } while (!whole_match_p(p, eos, len, indent));
21174 str = STR_NEW3(tok(p), toklen(p), enc, func);
21175 }
21176 dispatch_heredoc_end(p);
21177 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21178 token_flush(p);
21179 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
21180#ifdef RIPPER
21181 /* Preserve s_value for set_yylval_str */
21182 s_value = p->s_value;
21183#endif
21184 set_yylval_str(str);
21185#ifdef RIPPER
21186 set_parser_s_value(s_value);
21187#endif
21188
21189#ifndef RIPPER
21190 if (bol) nd_set_fl_newline(yylval.node);
21191#endif
21192 return tSTRING_CONTENT;
21193}
21194
21195#include "lex.c"
21196
21197static int
21198arg_ambiguous(struct parser_params *p, char c)
21199{
21200#ifndef RIPPER
21201 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
21202#else
21203 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
21204#endif
21205 return TRUE;
21206}
21207
21208/* returns true value if formal argument error;
21209 * Qtrue, or error message if ripper */
21210static VALUE
21211formal_argument_error(struct parser_params *p, ID id)
21212{
21213 switch (id_type(id)) {
21214 case ID_LOCAL:
21215 break;
21216#ifndef RIPPER
21217# define ERR(mesg) (yyerror0(mesg), Qtrue)
21218#else
21219# define ERR(mesg) WARN_S(mesg)
21220#endif
21221 case ID_CONST:
21222 return ERR("formal argument cannot be a constant");
21223 case ID_INSTANCE:
21224 return ERR("formal argument cannot be an instance variable");
21225 case ID_GLOBAL:
21226 return ERR("formal argument cannot be a global variable");
21227 case ID_CLASS:
21228 return ERR("formal argument cannot be a class variable");
21229 default:
21230 return ERR("formal argument must be local variable");
21231#undef ERR
21232 }
21233 shadowing_lvar(p, id);
21234
21235 return Qfalse;
21236}
21237
21238static int
21239lvar_defined(struct parser_params *p, ID id)
21240{
21241 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
21242}
21243
21244/* emacsen -*- hack */
21245static long
21246parser_encode_length(struct parser_params *p, const char *name, long len)
21247{
21248 long nlen;
21249
21250 if (len > 5 && name[nlen = len - 5] == '-') {
21251 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
21252 return nlen;
21253 }
21254 if (len > 4 && name[nlen = len - 4] == '-') {
21255 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
21256 return nlen;
21257 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
21258 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
21259 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
21260 return nlen;
21261 }
21262 return len;
21263}
21264
21265static void
21266parser_set_encode(struct parser_params *p, const char *name)
21267{
21268 rb_encoding *enc;
21269 VALUE excargs[3];
21270 int idx = 0;
21271
21272 const char *wrong = 0;
21273 switch (*name) {
21274 case 'e': case 'E': wrong = "external"; break;
21275 case 'i': case 'I': wrong = "internal"; break;
21276 case 'f': case 'F': wrong = "filesystem"; break;
21277 case 'l': case 'L': wrong = "locale"; break;
21278 }
21279 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
21280 idx = rb_enc_find_index(name);
21281 if (idx < 0) {
21282 unknown:
21283 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
21284 error:
21285 excargs[0] = rb_eArgError;
21286 excargs[2] = rb_make_backtrace();
21287 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
21288 VALUE exc = rb_make_exception(3, excargs);
21289 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
21290
21291 rb_ast_free(p->ast);
21292 p->ast = NULL;
21293
21294 rb_exc_raise(exc);
21295 }
21296 enc = rb_enc_from_index(idx);
21297 if (!rb_enc_asciicompat(enc)) {
21298 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
21299 goto error;
21300 }
21301 p->enc = enc;
21302#ifndef RIPPER
21303 if (p->debug_lines) {
21304 long i;
21305 for (i = 0; i < p->debug_lines->len; i++) {
21306 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
21307 }
21308 }
21309#endif
21310}
21311
21312static bool
21313comment_at_top(struct parser_params *p)
21314{
21315 if (p->token_seen) return false;
21316 return (p->line_count == (p->has_shebang ? 2 : 1));
21317}
21318
21319typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
21320typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
21321
21322static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
21323
21324static void
21325magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
21326{
21327 if (!comment_at_top(p)) {
21328 return;
21329 }
21330 parser_set_encode(p, val);
21331}
21332
21333static int
21334parser_get_bool(struct parser_params *p, const char *name, const char *val)
21335{
21336 switch (*val) {
21337 case 't': case 'T':
21338 if (STRCASECMP(val, "true") == 0) {
21339 return TRUE;
21340 }
21341 break;
21342 case 'f': case 'F':
21343 if (STRCASECMP(val, "false") == 0) {
21344 return FALSE;
21345 }
21346 break;
21347 }
21348 return parser_invalid_pragma_value(p, name, val);
21349}
21350
21351static int
21352parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
21353{
21354 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
21355 return -1;
21356}
21357
21358static void
21359parser_set_token_info(struct parser_params *p, const char *name, const char *val)
21360{
21361 int b = parser_get_bool(p, name, val);
21362 if (b >= 0) p->token_info_enabled = b;
21363}
21364
21365static void
21366parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
21367{
21368 int b;
21369
21370 if (p->token_seen) {
21371 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
21372 return;
21373 }
21374
21375 b = parser_get_bool(p, name, val);
21376 if (b < 0) return;
21377
21378 p->frozen_string_literal = b;
21379}
21380
21381static void
21382parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
21383{
21384 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
21385 if (*s == ' ' || *s == '\t') continue;
21386 if (*s == '#') break;
21387 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
21388 return;
21389 }
21390
21391 switch (*val) {
21392 case 'n': case 'N':
21393 if (STRCASECMP(val, "none") == 0) {
21394 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
21395 return;
21396 }
21397 break;
21398 case 'l': case 'L':
21399 if (STRCASECMP(val, "literal") == 0) {
21400 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
21401 return;
21402 }
21403 break;
21404 case 'e': case 'E':
21405 if (STRCASECMP(val, "experimental_copy") == 0) {
21406 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
21407 return;
21408 }
21409 if (STRCASECMP(val, "experimental_everything") == 0) {
21410 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
21411 return;
21412 }
21413 break;
21414 }
21415 parser_invalid_pragma_value(p, name, val);
21416}
21417
21418# if WARN_PAST_SCOPE
21419static void
21420parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
21421{
21422 int b = parser_get_bool(p, name, val);
21423 if (b >= 0) p->past_scope_enabled = b;
21424}
21425# endif
21426
21428 const char *name;
21429 rb_magic_comment_setter_t func;
21430 rb_magic_comment_length_t length;
21431};
21432
21433static const struct magic_comment magic_comments[] = {
21434 {"coding", magic_comment_encoding, parser_encode_length},
21435 {"encoding", magic_comment_encoding, parser_encode_length},
21436 {"frozen_string_literal", parser_set_frozen_string_literal},
21437 {"shareable_constant_value", parser_set_shareable_constant_value},
21438 {"warn_indent", parser_set_token_info},
21439# if WARN_PAST_SCOPE
21440 {"warn_past_scope", parser_set_past_scope},
21441# endif
21442};
21443
21444static const char *
21445magic_comment_marker(const char *str, long len)
21446{
21447 long i = 2;
21448
21449 while (i < len) {
21450 switch (str[i]) {
21451 case '-':
21452 if (str[i-1] == '*' && str[i-2] == '-') {
21453 return str + i + 1;
21454 }
21455 i += 2;
21456 break;
21457 case '*':
21458 if (i + 1 >= len) return 0;
21459 if (str[i+1] != '-') {
21460 i += 4;
21461 }
21462 else if (str[i-1] != '-') {
21463 i += 2;
21464 }
21465 else {
21466 return str + i + 2;
21467 }
21468 break;
21469 default:
21470 i += 3;
21471 break;
21472 }
21473 }
21474 return 0;
21475}
21476
21477static int
21478parser_magic_comment(struct parser_params *p, const char *str, long len)
21479{
21480 int indicator = 0;
21481 VALUE name = 0, val = 0;
21482 const char *beg, *end, *vbeg, *vend;
21483#define str_copy(_s, _p, _n) ((_s) \
21484 ? (void)(rb_str_resize((_s), (_n)), \
21485 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21486 : (void)((_s) = STR_NEW((_p), (_n))))
21487
21488 if (len <= 7) return FALSE;
21489 if (!!(beg = magic_comment_marker(str, len))) {
21490 if (!(end = magic_comment_marker(beg, str + len - beg)))
21491 return FALSE;
21492 indicator = TRUE;
21493 str = beg;
21494 len = end - beg - 3;
21495 }
21496
21497 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21498 while (len > 0) {
21499 const struct magic_comment *mc = magic_comments;
21500 char *s;
21501 int i;
21502 long n = 0;
21503
21504 for (; len > 0 && *str; str++, --len) {
21505 switch (*str) {
21506 case '\'': case '"': case ':': case ';':
21507 continue;
21508 }
21509 if (!ISSPACE(*str)) break;
21510 }
21511 for (beg = str; len > 0; str++, --len) {
21512 switch (*str) {
21513 case '\'': case '"': case ':': case ';':
21514 break;
21515 default:
21516 if (ISSPACE(*str)) break;
21517 continue;
21518 }
21519 break;
21520 }
21521 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21522 if (!len) break;
21523 if (*str != ':') {
21524 if (!indicator) return FALSE;
21525 continue;
21526 }
21527
21528 do str++; while (--len > 0 && ISSPACE(*str));
21529 if (!len) break;
21530 const char *tok_beg = str;
21531 if (*str == '"') {
21532 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21533 if (*str == '\\') {
21534 --len;
21535 ++str;
21536 }
21537 }
21538 vend = str;
21539 if (len) {
21540 --len;
21541 ++str;
21542 }
21543 }
21544 else {
21545 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21546 vend = str;
21547 }
21548 const char *tok_end = str;
21549 if (indicator) {
21550 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21551 }
21552 else {
21553 while (len > 0 && (ISSPACE(*str))) --len, str++;
21554 if (len) return FALSE;
21555 }
21556
21557 n = end - beg;
21558 str_copy(name, beg, n);
21559 s = RSTRING_PTR(name);
21560 for (i = 0; i < n; ++i) {
21561 if (s[i] == '-') s[i] = '_';
21562 }
21563 do {
21564 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21565 n = vend - vbeg;
21566 if (mc->length) {
21567 n = (*mc->length)(p, vbeg, n);
21568 }
21569 str_copy(val, vbeg, n);
21570 p->lex.ptok = tok_beg;
21571 p->lex.pcur = tok_end;
21572 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21573 break;
21574 }
21575 } while (++mc < magic_comments + numberof(magic_comments));
21576#ifdef RIPPER
21577 str_copy(val, vbeg, vend - vbeg);
21578 dispatch2(magic_comment, name, val);
21579#endif
21580 }
21581
21582 return TRUE;
21583}
21584
21585static void
21586set_file_encoding(struct parser_params *p, const char *str, const char *send)
21587{
21588 int sep = 0;
21589 const char *beg = str;
21590 VALUE s;
21591
21592 for (;;) {
21593 if (send - str <= 6) return;
21594 switch (str[6]) {
21595 case 'C': case 'c': str += 6; continue;
21596 case 'O': case 'o': str += 5; continue;
21597 case 'D': case 'd': str += 4; continue;
21598 case 'I': case 'i': str += 3; continue;
21599 case 'N': case 'n': str += 2; continue;
21600 case 'G': case 'g': str += 1; continue;
21601 case '=': case ':':
21602 sep = 1;
21603 str += 6;
21604 break;
21605 default:
21606 str += 6;
21607 if (ISSPACE(*str)) break;
21608 continue;
21609 }
21610 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21611 sep = 0;
21612 }
21613 for (;;) {
21614 do {
21615 if (++str >= send) return;
21616 } while (ISSPACE(*str));
21617 if (sep) break;
21618 if (*str != '=' && *str != ':') return;
21619 sep = 1;
21620 str++;
21621 }
21622 beg = str;
21623 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21624 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21625 p->lex.ptok = beg;
21626 p->lex.pcur = str;
21627 parser_set_encode(p, RSTRING_PTR(s));
21628 rb_str_resize(s, 0);
21629}
21630
21631static void
21632parser_prepare(struct parser_params *p)
21633{
21634 int c = nextc0(p, FALSE);
21635 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21636 switch (c) {
21637 case '#':
21638 if (peek(p, '!')) p->has_shebang = 1;
21639 break;
21640 case 0xef: /* UTF-8 BOM marker */
21641 if (!lex_eol_n_p(p, 2) &&
21642 (unsigned char)p->lex.pcur[0] == 0xbb &&
21643 (unsigned char)p->lex.pcur[1] == 0xbf) {
21644 p->enc = rb_utf8_encoding();
21645 p->lex.pcur += 2;
21646#ifndef RIPPER
21647 if (p->debug_lines) {
21648 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21649 }
21650#endif
21651 p->lex.pbeg = p->lex.pcur;
21652 token_flush(p);
21653 return;
21654 }
21655 break;
21656 case -1: /* end of script. */
21657 return;
21658 }
21659 pushback(p, c);
21660 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21661}
21662
21663#ifndef RIPPER
21664#define ambiguous_operator(tok, op, syn) ( \
21665 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21666 rb_warning0("even though it seems like "syn""))
21667#else
21668#define ambiguous_operator(tok, op, syn) \
21669 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21670#endif
21671#define warn_balanced(tok, op, syn) ((void) \
21672 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21673 space_seen && !ISSPACE(c) && \
21674 (ambiguous_operator(tok, op, syn), 0)), \
21675 (enum yytokentype)(tok))
21676
21677static enum yytokentype
21678no_digits(struct parser_params *p)
21679{
21680 yyerror0("numeric literal without digits");
21681 if (peek(p, '_')) nextc(p);
21682 /* dummy 0, for tUMINUS_NUM at numeric */
21683 return set_number_literal(p, tINTEGER, 0, 10, 0);
21684}
21685
21686static enum yytokentype
21687parse_numeric(struct parser_params *p, int c)
21688{
21689 int is_float, seen_point, seen_e, nondigit;
21690 int suffix;
21691
21692 is_float = seen_point = seen_e = nondigit = 0;
21693 SET_LEX_STATE(EXPR_END);
21694 newtok(p);
21695 if (c == '-' || c == '+') {
21696 tokadd(p, c);
21697 c = nextc(p);
21698 }
21699 if (c == '0') {
21700 int start = toklen(p);
21701 c = nextc(p);
21702 if (c == 'x' || c == 'X') {
21703 /* hexadecimal */
21704 c = nextc(p);
21705 if (c != -1 && ISXDIGIT(c)) {
21706 do {
21707 if (c == '_') {
21708 if (nondigit) break;
21709 nondigit = c;
21710 continue;
21711 }
21712 if (!ISXDIGIT(c)) break;
21713 nondigit = 0;
21714 tokadd(p, c);
21715 } while ((c = nextc(p)) != -1);
21716 }
21717 pushback(p, c);
21718 tokfix(p);
21719 if (toklen(p) == start) {
21720 return no_digits(p);
21721 }
21722 else if (nondigit) goto trailing_uc;
21723 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21724 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21725 }
21726 if (c == 'b' || c == 'B') {
21727 /* binary */
21728 c = nextc(p);
21729 if (c == '0' || c == '1') {
21730 do {
21731 if (c == '_') {
21732 if (nondigit) break;
21733 nondigit = c;
21734 continue;
21735 }
21736 if (c != '0' && c != '1') break;
21737 nondigit = 0;
21738 tokadd(p, c);
21739 } while ((c = nextc(p)) != -1);
21740 }
21741 pushback(p, c);
21742 tokfix(p);
21743 if (toklen(p) == start) {
21744 return no_digits(p);
21745 }
21746 else if (nondigit) goto trailing_uc;
21747 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21748 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21749 }
21750 if (c == 'd' || c == 'D') {
21751 /* decimal */
21752 c = nextc(p);
21753 if (c != -1 && ISDIGIT(c)) {
21754 do {
21755 if (c == '_') {
21756 if (nondigit) break;
21757 nondigit = c;
21758 continue;
21759 }
21760 if (!ISDIGIT(c)) break;
21761 nondigit = 0;
21762 tokadd(p, c);
21763 } while ((c = nextc(p)) != -1);
21764 }
21765 pushback(p, c);
21766 tokfix(p);
21767 if (toklen(p) == start) {
21768 return no_digits(p);
21769 }
21770 else if (nondigit) goto trailing_uc;
21771 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21772 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21773 }
21774 if (c == '_') {
21775 /* 0_0 */
21776 goto octal_number;
21777 }
21778 if (c == 'o' || c == 'O') {
21779 /* prefixed octal */
21780 c = nextc(p);
21781 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21782 tokfix(p);
21783 return no_digits(p);
21784 }
21785 }
21786 if (c >= '0' && c <= '7') {
21787 /* octal */
21788 octal_number:
21789 do {
21790 if (c == '_') {
21791 if (nondigit) break;
21792 nondigit = c;
21793 continue;
21794 }
21795 if (c < '0' || c > '9') break;
21796 if (c > '7') goto invalid_octal;
21797 nondigit = 0;
21798 tokadd(p, c);
21799 } while ((c = nextc(p)) != -1);
21800 if (toklen(p) > start) {
21801 pushback(p, c);
21802 tokfix(p);
21803 if (nondigit) goto trailing_uc;
21804 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21805 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21806 }
21807 if (nondigit) {
21808 pushback(p, c);
21809 goto trailing_uc;
21810 }
21811 }
21812 if (c > '7' && c <= '9') {
21813 invalid_octal:
21814 yyerror0("Invalid octal digit");
21815 }
21816 else if (c == '.' || c == 'e' || c == 'E') {
21817 tokadd(p, '0');
21818 }
21819 else {
21820 pushback(p, c);
21821 tokfix(p);
21822 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21823 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21824 }
21825 }
21826
21827 for (;;) {
21828 switch (c) {
21829 case '0': case '1': case '2': case '3': case '4':
21830 case '5': case '6': case '7': case '8': case '9':
21831 nondigit = 0;
21832 tokadd(p, c);
21833 break;
21834
21835 case '.':
21836 if (nondigit) goto trailing_uc;
21837 if (seen_point || seen_e) {
21838 goto decode_num;
21839 }
21840 else {
21841 int c0 = nextc(p);
21842 if (c0 == -1 || !ISDIGIT(c0)) {
21843 pushback(p, c0);
21844 goto decode_num;
21845 }
21846 c = c0;
21847 }
21848 seen_point = toklen(p);
21849 tokadd(p, '.');
21850 tokadd(p, c);
21851 is_float++;
21852 nondigit = 0;
21853 break;
21854
21855 case 'e':
21856 case 'E':
21857 if (nondigit) {
21858 pushback(p, c);
21859 c = nondigit;
21860 goto decode_num;
21861 }
21862 if (seen_e) {
21863 goto decode_num;
21864 }
21865 nondigit = c;
21866 c = nextc(p);
21867 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21868 pushback(p, c);
21869 c = nondigit;
21870 nondigit = 0;
21871 goto decode_num;
21872 }
21873 tokadd(p, nondigit);
21874 seen_e++;
21875 is_float++;
21876 tokadd(p, c);
21877 nondigit = (c == '-' || c == '+') ? c : 0;
21878 break;
21879
21880 case '_': /* `_' in number just ignored */
21881 if (nondigit) goto decode_num;
21882 nondigit = c;
21883 break;
21884
21885 default:
21886 goto decode_num;
21887 }
21888 c = nextc(p);
21889 }
21890
21891 decode_num:
21892 pushback(p, c);
21893 if (nondigit) {
21894 trailing_uc:
21895 literal_flush(p, p->lex.pcur - 1);
21896 YYLTYPE loc = RUBY_INIT_YYLLOC();
21897 compile_error(p, "trailing '%c' in number", nondigit);
21898 parser_show_error_line(p, &loc);
21899 }
21900 tokfix(p);
21901 if (is_float) {
21902 enum yytokentype type = tFLOAT;
21903
21904 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21905 if (suffix & NUM_SUFFIX_R) {
21906 type = tRATIONAL;
21907 }
21908 else {
21909 errno = 0;
21910 strtod(tok(p), 0);
21911 if (errno == ERANGE) {
21912 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21913 errno = 0;
21914 }
21915 }
21916 return set_number_literal(p, type, suffix, 0, seen_point);
21917 }
21918 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21919 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21920}
21921
21922static enum yytokentype
21923parse_qmark(struct parser_params *p, int space_seen)
21924{
21925 rb_encoding *enc;
21926 register int c;
21927 rb_parser_string_t *lit;
21928 const char *start = p->lex.pcur;
21929
21930 if (IS_END()) {
21931 SET_LEX_STATE(EXPR_VALUE);
21932 return '?';
21933 }
21934 c = nextc(p);
21935 if (c == -1) {
21936 compile_error(p, "incomplete character syntax");
21937 return 0;
21938 }
21939 if (rb_enc_isspace(c, p->enc)) {
21940 if (!IS_ARG()) {
21941 int c2 = escaped_control_code(c);
21942 if (c2) {
21943 WARN_SPACE_CHAR(c2, "?");
21944 }
21945 }
21946 ternary:
21947 pushback(p, c);
21948 SET_LEX_STATE(EXPR_VALUE);
21949 return '?';
21950 }
21951 newtok(p);
21952 enc = p->enc;
21953 int w = parser_precise_mbclen(p, start);
21954 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21955 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21956 if (space_seen) {
21957 const char *ptr = start;
21958 do {
21959 int n = parser_precise_mbclen(p, ptr);
21960 if (n < 0) return -1;
21961 ptr += n;
21962 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21963 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21964 " a conditional operator, put a space after '?'",
21965 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21966 }
21967 goto ternary;
21968 }
21969 else if (c == '\\') {
21970 if (peek(p, 'u')) {
21971 nextc(p);
21972 enc = rb_utf8_encoding();
21973 tokadd_utf8(p, &enc, -1, 0, 0);
21974 }
21975 else if (!ISASCII(c = peekc(p)) && c != -1) {
21976 nextc(p);
21977 if (tokadd_mbchar(p, c) == -1) return 0;
21978 }
21979 else {
21980 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21981 tokadd(p, c);
21982 }
21983 }
21984 else {
21985 if (tokadd_mbchar(p, c) == -1) return 0;
21986 }
21987 tokfix(p);
21988 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21989 set_yylval_str(lit);
21990 SET_LEX_STATE(EXPR_END);
21991 return tCHAR;
21992}
21993
21994static enum yytokentype
21995parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21996{
21997 register int c;
21998 const char *ptok = p->lex.pcur;
21999
22000 if (IS_BEG()) {
22001 int term;
22002 int paren;
22003
22004 c = nextc(p);
22005 quotation:
22006 if (c == -1) goto unterminated;
22007 if (!ISALNUM(c)) {
22008 term = c;
22009 if (!ISASCII(c)) goto unknown;
22010 c = 'Q';
22011 }
22012 else {
22013 term = nextc(p);
22014 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
22015 unknown:
22016 pushback(p, term);
22017 c = parser_precise_mbclen(p, p->lex.pcur);
22018 if (c < 0) return 0;
22019 p->lex.pcur += c;
22020 yyerror0("unknown type of %string");
22021 return 0;
22022 }
22023 }
22024 if (term == -1) {
22025 unterminated:
22026 compile_error(p, "unterminated quoted string meets end of file");
22027 return 0;
22028 }
22029 paren = term;
22030 if (term == '(') term = ')';
22031 else if (term == '[') term = ']';
22032 else if (term == '{') term = '}';
22033 else if (term == '<') term = '>';
22034 else paren = 0;
22035
22036 p->lex.ptok = ptok-1;
22037 switch (c) {
22038 case 'Q':
22039 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
22040 return tSTRING_BEG;
22041
22042 case 'q':
22043 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
22044 return tSTRING_BEG;
22045
22046 case 'W':
22047 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
22048 return tWORDS_BEG;
22049
22050 case 'w':
22051 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
22052 return tQWORDS_BEG;
22053
22054 case 'I':
22055 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
22056 return tSYMBOLS_BEG;
22057
22058 case 'i':
22059 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
22060 return tQSYMBOLS_BEG;
22061
22062 case 'x':
22063 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
22064 return tXSTRING_BEG;
22065
22066 case 'r':
22067 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
22068 return tREGEXP_BEG;
22069
22070 case 's':
22071 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
22072 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
22073 return tSYMBEG;
22074
22075 default:
22076 yyerror0("unknown type of %string");
22077 return 0;
22078 }
22079 }
22080 if ((c = nextc(p)) == '=') {
22081 set_yylval_id('%');
22082 SET_LEX_STATE(EXPR_BEG);
22083 return tOP_ASGN;
22084 }
22085 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
22086 goto quotation;
22087 }
22088 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22089 pushback(p, c);
22090 return warn_balanced('%', "%%", "string literal");
22091}
22092
22093static int
22094tokadd_ident(struct parser_params *p, int c)
22095{
22096 do {
22097 if (tokadd_mbchar(p, c) == -1) return -1;
22098 c = nextc(p);
22099 } while (parser_is_identchar(p));
22100 pushback(p, c);
22101 return 0;
22102}
22103
22104static ID
22105tokenize_ident(struct parser_params *p)
22106{
22107 ID ident = TOK_INTERN();
22108
22109 set_yylval_name(ident);
22110
22111 return ident;
22112}
22113
22114static int
22115parse_numvar(struct parser_params *p)
22116{
22117 size_t len;
22118 int overflow;
22119 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
22120 const unsigned long nth_ref_max =
22121 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
22122 /* NTH_REF is left-shifted to be ORed with back-ref flag and
22123 * turned into a Fixnum, in compile.c */
22124
22125 if (overflow || n > nth_ref_max) {
22126 /* compile_error()? */
22127 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
22128 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
22129 }
22130 else {
22131 return (int)n;
22132 }
22133}
22134
22135static enum yytokentype
22136parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
22137{
22138 const char *ptr = p->lex.pcur;
22139 register int c;
22140
22141 SET_LEX_STATE(EXPR_END);
22142 p->lex.ptok = ptr - 1; /* from '$' */
22143 newtok(p);
22144 c = nextc(p);
22145 switch (c) {
22146 case '_': /* $_: last read line string */
22147 c = nextc(p);
22148 if (parser_is_identchar(p)) {
22149 tokadd(p, '$');
22150 tokadd(p, '_');
22151 break;
22152 }
22153 pushback(p, c);
22154 c = '_';
22155 /* fall through */
22156 case '~': /* $~: match-data */
22157 case '*': /* $*: argv */
22158 case '$': /* $$: pid */
22159 case '?': /* $?: last status */
22160 case '!': /* $!: error string */
22161 case '@': /* $@: error position */
22162 case '/': /* $/: input record separator */
22163 case '\\': /* $\: output record separator */
22164 case ';': /* $;: field separator */
22165 case ',': /* $,: output field separator */
22166 case '.': /* $.: last read line number */
22167 case '=': /* $=: ignorecase */
22168 case ':': /* $:: load path */
22169 case '<': /* $<: default input handle */
22170 case '>': /* $>: default output handle */
22171 case '\"': /* $": already loaded files */
22172 tokadd(p, '$');
22173 tokadd(p, c);
22174 goto gvar;
22175
22176 case '-':
22177 tokadd(p, '$');
22178 tokadd(p, c);
22179 c = nextc(p);
22180 if (parser_is_identchar(p)) {
22181 if (tokadd_mbchar(p, c) == -1) return 0;
22182 }
22183 else {
22184 pushback(p, c);
22185 pushback(p, '-');
22186 return '$';
22187 }
22188 gvar:
22189 tokenize_ident(p);
22190 return tGVAR;
22191
22192 case '&': /* $&: last match */
22193 case '`': /* $`: string before last match */
22194 case '\'': /* $': string after last match */
22195 case '+': /* $+: string matches last paren. */
22196 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
22197 tokadd(p, '$');
22198 tokadd(p, c);
22199 goto gvar;
22200 }
22201 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
22202 return tBACK_REF;
22203
22204 case '1': case '2': case '3':
22205 case '4': case '5': case '6':
22206 case '7': case '8': case '9':
22207 tokadd(p, '$');
22208 do {
22209 tokadd(p, c);
22210 c = nextc(p);
22211 } while (c != -1 && ISDIGIT(c));
22212 pushback(p, c);
22213 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
22214 tokfix(p);
22215 c = parse_numvar(p);
22216 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
22217 return tNTH_REF;
22218
22219 default:
22220 if (!parser_is_identchar(p)) {
22221 YYLTYPE loc = RUBY_INIT_YYLLOC();
22222 if (c == -1 || ISSPACE(c)) {
22223 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
22224 }
22225 else {
22226 pushback(p, c);
22227 compile_error(p, "'$%c' is not allowed as a global variable name", c);
22228 }
22229 parser_show_error_line(p, &loc);
22230 set_yylval_noname();
22231 return tGVAR;
22232 }
22233 /* fall through */
22234 case '0':
22235 tokadd(p, '$');
22236 }
22237
22238 if (tokadd_ident(p, c)) return 0;
22239 SET_LEX_STATE(EXPR_END);
22240 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
22241 tokenize_ident(p);
22242 }
22243 else {
22244 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
22245 set_yylval_noname();
22246 }
22247 return tGVAR;
22248}
22249
22250static bool
22251parser_numbered_param(struct parser_params *p, int n)
22252{
22253 if (n < 0) return false;
22254
22255 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
22256 return false;
22257 }
22258 if (p->max_numparam == ORDINAL_PARAM) {
22259 compile_error(p, "ordinary parameter is defined");
22260 return false;
22261 }
22262 struct vtable *args = p->lvtbl->args;
22263 if (p->max_numparam < n) {
22264 p->max_numparam = n;
22265 }
22266 while (n > args->pos) {
22267 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
22268 }
22269 return true;
22270}
22271
22272static enum yytokentype
22273parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
22274{
22275 const char *ptr = p->lex.pcur;
22276 enum yytokentype result = tIVAR;
22277 register int c = nextc(p);
22278 YYLTYPE loc;
22279
22280 p->lex.ptok = ptr - 1; /* from '@' */
22281 newtok(p);
22282 tokadd(p, '@');
22283 if (c == '@') {
22284 result = tCVAR;
22285 tokadd(p, '@');
22286 c = nextc(p);
22287 }
22288 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
22289 if (c == -1 || !parser_is_identchar(p)) {
22290 pushback(p, c);
22291 RUBY_SET_YYLLOC(loc);
22292 if (result == tIVAR) {
22293 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
22294 }
22295 else {
22296 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
22297 }
22298 parser_show_error_line(p, &loc);
22299 set_yylval_noname();
22300 SET_LEX_STATE(EXPR_END);
22301 return result;
22302 }
22303 else if (ISDIGIT(c)) {
22304 pushback(p, c);
22305 RUBY_SET_YYLLOC(loc);
22306 if (result == tIVAR) {
22307 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
22308 }
22309 else {
22310 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
22311 }
22312 parser_show_error_line(p, &loc);
22313 set_yylval_noname();
22314 SET_LEX_STATE(EXPR_END);
22315 return result;
22316 }
22317
22318 if (tokadd_ident(p, c)) return 0;
22319 tokenize_ident(p);
22320 return result;
22321}
22322
22323static enum yytokentype
22324parse_ident(struct parser_params *p, int c, int cmd_state)
22325{
22326 enum yytokentype result;
22327 bool is_ascii = true;
22328 const enum lex_state_e last_state = p->lex.state;
22329 ID ident;
22330 int enforce_keyword_end = 0;
22331
22332 do {
22333 if (!ISASCII(c)) is_ascii = false;
22334 if (tokadd_mbchar(p, c) == -1) return 0;
22335 c = nextc(p);
22336 } while (parser_is_identchar(p));
22337 if ((c == '!' || c == '?') && !peek(p, '=')) {
22338 result = tFID;
22339 tokadd(p, c);
22340 }
22341 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
22342 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
22343 result = tIDENTIFIER;
22344 tokadd(p, c);
22345 }
22346 else {
22347 result = tCONSTANT; /* assume provisionally */
22348 pushback(p, c);
22349 }
22350 tokfix(p);
22351
22352 if (IS_LABEL_POSSIBLE()) {
22353 if (IS_LABEL_SUFFIX(0)) {
22354 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
22355 nextc(p);
22356 tokenize_ident(p);
22357 return tLABEL;
22358 }
22359 }
22360
22361#ifndef RIPPER
22362 if (peek_end_expect_token_locations(p)) {
22363 const rb_code_position_t *end_pos;
22364 int lineno, column;
22365 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
22366
22367 end_pos = peek_end_expect_token_locations(p)->pos;
22368 lineno = end_pos->lineno;
22369 column = end_pos->column;
22370
22371 if (p->debug) {
22372 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
22373 p->ruby_sourceline, beg_pos, lineno, column);
22374 }
22375
22376 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
22377 const struct kwtable *kw;
22378
22379 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
22380 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
22381 enforce_keyword_end = 1;
22382 }
22383 }
22384 }
22385#endif
22386
22387 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
22388 const struct kwtable *kw;
22389
22390 /* See if it is a reserved word. */
22391 kw = rb_reserved_word(tok(p), toklen(p));
22392 if (kw) {
22393 enum lex_state_e state = p->lex.state;
22394 if (IS_lex_state_for(state, EXPR_FNAME)) {
22395 SET_LEX_STATE(EXPR_ENDFN);
22396 set_yylval_name(rb_intern2(tok(p), toklen(p)));
22397 return kw->id[0];
22398 }
22399 SET_LEX_STATE(kw->state);
22400 if (IS_lex_state(EXPR_BEG)) {
22401 p->command_start = TRUE;
22402 }
22403 if (kw->id[0] == keyword_do) {
22404 if (lambda_beginning_p()) {
22405 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
22406 return keyword_do_LAMBDA;
22407 }
22408 if (COND_P()) return keyword_do_cond;
22409 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
22410 return keyword_do_block;
22411 return keyword_do;
22412 }
22413 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
22414 return kw->id[0];
22415 else {
22416 if (kw->id[0] != kw->id[1])
22417 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
22418 return kw->id[1];
22419 }
22420 }
22421 }
22422
22423 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
22424 if (cmd_state) {
22425 SET_LEX_STATE(EXPR_CMDARG);
22426 }
22427 else {
22428 SET_LEX_STATE(EXPR_ARG);
22429 }
22430 }
22431 else if (p->lex.state == EXPR_FNAME) {
22432 SET_LEX_STATE(EXPR_ENDFN);
22433 }
22434 else {
22435 SET_LEX_STATE(EXPR_END);
22436 }
22437
22438 ident = tokenize_ident(p);
22439 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
22440 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
22441 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
22442 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
22443 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
22444 }
22445 return result;
22446}
22447
22448static void
22449warn_cr(struct parser_params *p)
22450{
22451 if (!p->cr_seen) {
22452 p->cr_seen = TRUE;
22453 /* carried over with p->lex.nextline for nextc() */
22454 rb_warn0("encountered \\r in middle of line, treated as a mere space");
22455 }
22456}
22457
22458static enum yytokentype
22459parser_yylex(struct parser_params *p)
22460{
22461 register int c;
22462 int space_seen = 0;
22463 int cmd_state;
22464 int label;
22465 enum lex_state_e last_state;
22466 int fallthru = FALSE;
22467 int token_seen = p->token_seen;
22468
22469 if (p->lex.strterm) {
22470 if (strterm_is_heredoc(p->lex.strterm)) {
22471 token_flush(p);
22472 return here_document(p, &p->lex.strterm->u.heredoc);
22473 }
22474 else {
22475 token_flush(p);
22476 return parse_string(p, &p->lex.strterm->u.literal);
22477 }
22478 }
22479 cmd_state = p->command_start;
22480 p->command_start = FALSE;
22481 p->token_seen = TRUE;
22482#ifndef RIPPER
22483 token_flush(p);
22484#endif
22485 retry:
22486 last_state = p->lex.state;
22487 switch (c = nextc(p)) {
22488 case '\0': /* NUL */
22489 case '\004': /* ^D */
22490 case '\032': /* ^Z */
22491 case -1: /* end of script. */
22492 p->eofp = 1;
22493#ifndef RIPPER
22494 if (p->end_expect_token_locations) {
22495 pop_end_expect_token_locations(p);
22496 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22497 return tDUMNY_END;
22498 }
22499#endif
22500 /* Set location for end-of-input because dispatch_scan_event is not called. */
22501 RUBY_SET_YYLLOC(*p->yylloc);
22502 return END_OF_INPUT;
22503
22504 /* white spaces */
22505 case '\r':
22506 warn_cr(p);
22507 /* fall through */
22508 case ' ': case '\t': case '\f':
22509 case '\13': /* '\v' */
22510 space_seen = 1;
22511 while ((c = nextc(p))) {
22512 switch (c) {
22513 case '\r':
22514 warn_cr(p);
22515 /* fall through */
22516 case ' ': case '\t': case '\f':
22517 case '\13': /* '\v' */
22518 break;
22519 default:
22520 goto outofloop;
22521 }
22522 }
22523 outofloop:
22524 pushback(p, c);
22525 dispatch_scan_event(p, tSP);
22526#ifndef RIPPER
22527 token_flush(p);
22528#endif
22529 goto retry;
22530
22531 case '#': /* it's a comment */
22532 p->token_seen = token_seen;
22533 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22534 /* no magic_comment in shebang line */
22535 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22536 if (comment_at_top(p)) {
22537 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22538 }
22539 }
22540 p->lex.pcur = pcur, p->lex.ptok = ptok;
22541 lex_goto_eol(p);
22542 dispatch_scan_event(p, tCOMMENT);
22543 fallthru = TRUE;
22544 /* fall through */
22545 case '\n':
22546 p->token_seen = token_seen;
22547 rb_parser_string_t *prevline = p->lex.lastline;
22548 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22549 !IS_lex_state(EXPR_LABELED));
22550 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22551 if (!fallthru) {
22552 dispatch_scan_event(p, tIGNORED_NL);
22553 }
22554 fallthru = FALSE;
22555 if (!c && p->ctxt.in_kwarg) {
22556 goto normal_newline;
22557 }
22558 goto retry;
22559 }
22560 while (1) {
22561 switch (c = nextc(p)) {
22562 case ' ': case '\t': case '\f': case '\r':
22563 case '\13': /* '\v' */
22564 space_seen = 1;
22565 break;
22566 case '#':
22567 pushback(p, c);
22568 if (space_seen) {
22569 dispatch_scan_event(p, tSP);
22570 token_flush(p);
22571 }
22572 goto retry;
22573 case 'a':
22574 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22575 goto bol;
22576 case 'o':
22577 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22578 goto bol;
22579 case '|':
22580 if (peek(p, '|')) goto leading_logical;
22581 goto bol;
22582 case '&':
22583 if (peek(p, '&')) {
22584 leading_logical:
22585 pushback(p, c);
22586 dispatch_delayed_token(p, tIGNORED_NL);
22587 cmd_state = FALSE;
22588 goto retry;
22589 }
22590 /* fall through */
22591 case '.': {
22592 dispatch_delayed_token(p, tIGNORED_NL);
22593 if (peek(p, '.') == (c == '&')) {
22594 pushback(p, c);
22595 dispatch_scan_event(p, tSP);
22596 goto retry;
22597 }
22598 }
22599 bol:
22600 default:
22601 p->ruby_sourceline--;
22602 p->lex.nextline = p->lex.lastline;
22603 set_lastline(p, prevline);
22604 case -1: /* EOF no decrement*/
22605 if (c == -1 && space_seen) {
22606 dispatch_scan_event(p, tSP);
22607 }
22608 lex_goto_eol(p);
22609 if (c != -1) {
22610 token_flush(p);
22611 RUBY_SET_YYLLOC(*p->yylloc);
22612 }
22613 goto normal_newline;
22614 }
22615 }
22616 normal_newline:
22617 p->command_start = TRUE;
22618 SET_LEX_STATE(EXPR_BEG);
22619 return '\n';
22620
22621 case '*':
22622 if ((c = nextc(p)) == '*') {
22623 if ((c = nextc(p)) == '=') {
22624 set_yylval_id(idPow);
22625 SET_LEX_STATE(EXPR_BEG);
22626 return tOP_ASGN;
22627 }
22628 pushback(p, c);
22629 if (IS_SPCARG(c)) {
22630 rb_warning0("'**' interpreted as argument prefix");
22631 c = tDSTAR;
22632 }
22633 else if (IS_BEG()) {
22634 c = tDSTAR;
22635 }
22636 else {
22637 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22638 }
22639 }
22640 else {
22641 if (c == '=') {
22642 set_yylval_id('*');
22643 SET_LEX_STATE(EXPR_BEG);
22644 return tOP_ASGN;
22645 }
22646 pushback(p, c);
22647 if (IS_SPCARG(c)) {
22648 rb_warning0("'*' interpreted as argument prefix");
22649 c = tSTAR;
22650 }
22651 else if (IS_BEG()) {
22652 c = tSTAR;
22653 }
22654 else {
22655 c = warn_balanced('*', "*", "argument prefix");
22656 }
22657 }
22658 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22659 return c;
22660
22661 case '!':
22662 c = nextc(p);
22663 if (IS_AFTER_OPERATOR()) {
22664 SET_LEX_STATE(EXPR_ARG);
22665 if (c == '@') {
22666 return '!';
22667 }
22668 }
22669 else {
22670 SET_LEX_STATE(EXPR_BEG);
22671 }
22672 if (c == '=') {
22673 return tNEQ;
22674 }
22675 if (c == '~') {
22676 return tNMATCH;
22677 }
22678 pushback(p, c);
22679 return '!';
22680
22681 case '=':
22682 if (was_bol(p)) {
22683 /* skip embedded rd document */
22684 if (word_match_p(p, "begin", 5)) {
22685 int first_p = TRUE;
22686
22687 lex_goto_eol(p);
22688 dispatch_scan_event(p, tEMBDOC_BEG);
22689 for (;;) {
22690 lex_goto_eol(p);
22691 if (!first_p) {
22692 dispatch_scan_event(p, tEMBDOC);
22693 }
22694 first_p = FALSE;
22695 c = nextc(p);
22696 if (c == -1) {
22697 compile_error(p, "embedded document meets end of file");
22698 return END_OF_INPUT;
22699 }
22700 if (c == '=' && word_match_p(p, "end", 3)) {
22701 break;
22702 }
22703 pushback(p, c);
22704 }
22705 lex_goto_eol(p);
22706 dispatch_scan_event(p, tEMBDOC_END);
22707 goto retry;
22708 }
22709 }
22710
22711 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22712 if ((c = nextc(p)) == '=') {
22713 if ((c = nextc(p)) == '=') {
22714 return tEQQ;
22715 }
22716 pushback(p, c);
22717 return tEQ;
22718 }
22719 if (c == '~') {
22720 return tMATCH;
22721 }
22722 else if (c == '>') {
22723 return tASSOC;
22724 }
22725 pushback(p, c);
22726 return '=';
22727
22728 case '<':
22729 c = nextc(p);
22730 if (c == '<' &&
22731 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22732 !IS_END() &&
22733 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22734 enum yytokentype token = heredoc_identifier(p);
22735 if (token) return token < 0 ? 0 : token;
22736 }
22737 if (IS_AFTER_OPERATOR()) {
22738 SET_LEX_STATE(EXPR_ARG);
22739 }
22740 else {
22741 if (IS_lex_state(EXPR_CLASS))
22742 p->command_start = TRUE;
22743 SET_LEX_STATE(EXPR_BEG);
22744 }
22745 if (c == '=') {
22746 if ((c = nextc(p)) == '>') {
22747 return tCMP;
22748 }
22749 pushback(p, c);
22750 return tLEQ;
22751 }
22752 if (c == '<') {
22753 if ((c = nextc(p)) == '=') {
22754 set_yylval_id(idLTLT);
22755 SET_LEX_STATE(EXPR_BEG);
22756 return tOP_ASGN;
22757 }
22758 pushback(p, c);
22759 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22760 }
22761 pushback(p, c);
22762 return '<';
22763
22764 case '>':
22765 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22766 if ((c = nextc(p)) == '=') {
22767 return tGEQ;
22768 }
22769 if (c == '>') {
22770 if ((c = nextc(p)) == '=') {
22771 set_yylval_id(idGTGT);
22772 SET_LEX_STATE(EXPR_BEG);
22773 return tOP_ASGN;
22774 }
22775 pushback(p, c);
22776 return tRSHFT;
22777 }
22778 pushback(p, c);
22779 return '>';
22780
22781 case '"':
22782 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22783 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22784 p->lex.ptok = p->lex.pcur-1;
22785 return tSTRING_BEG;
22786
22787 case '`':
22788 if (IS_lex_state(EXPR_FNAME)) {
22789 SET_LEX_STATE(EXPR_ENDFN);
22790 return c;
22791 }
22792 if (IS_lex_state(EXPR_DOT)) {
22793 if (cmd_state)
22794 SET_LEX_STATE(EXPR_CMDARG);
22795 else
22796 SET_LEX_STATE(EXPR_ARG);
22797 return c;
22798 }
22799 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22800 return tXSTRING_BEG;
22801
22802 case '\'':
22803 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22804 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22805 p->lex.ptok = p->lex.pcur-1;
22806 return tSTRING_BEG;
22807
22808 case '?':
22809 return parse_qmark(p, space_seen);
22810
22811 case '&':
22812 if ((c = nextc(p)) == '&') {
22813 SET_LEX_STATE(EXPR_BEG);
22814 if ((c = nextc(p)) == '=') {
22815 set_yylval_id(idANDOP);
22816 SET_LEX_STATE(EXPR_BEG);
22817 return tOP_ASGN;
22818 }
22819 pushback(p, c);
22820 return tANDOP;
22821 }
22822 else if (c == '=') {
22823 set_yylval_id('&');
22824 SET_LEX_STATE(EXPR_BEG);
22825 return tOP_ASGN;
22826 }
22827 else if (c == '.') {
22828 set_yylval_id(idANDDOT);
22829 SET_LEX_STATE(EXPR_DOT);
22830 return tANDDOT;
22831 }
22832 pushback(p, c);
22833 if (IS_SPCARG(c)) {
22834 if ((c != ':') ||
22835 (c = peekc_n(p, 1)) == -1 ||
22836 !(c == '\'' || c == '"' ||
22837 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22838 rb_warning0("'&' interpreted as argument prefix");
22839 }
22840 c = tAMPER;
22841 }
22842 else if (IS_BEG()) {
22843 c = tAMPER;
22844 }
22845 else {
22846 c = warn_balanced('&', "&", "argument prefix");
22847 }
22848 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22849 return c;
22850
22851 case '|':
22852 if ((c = nextc(p)) == '|') {
22853 SET_LEX_STATE(EXPR_BEG);
22854 if ((c = nextc(p)) == '=') {
22855 set_yylval_id(idOROP);
22856 SET_LEX_STATE(EXPR_BEG);
22857 return tOP_ASGN;
22858 }
22859 pushback(p, c);
22860 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22861 c = '|';
22862 pushback(p, '|');
22863 return c;
22864 }
22865 return tOROP;
22866 }
22867 if (c == '=') {
22868 set_yylval_id('|');
22869 SET_LEX_STATE(EXPR_BEG);
22870 return tOP_ASGN;
22871 }
22872 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22873 pushback(p, c);
22874 return '|';
22875
22876 case '+':
22877 c = nextc(p);
22878 if (IS_AFTER_OPERATOR()) {
22879 SET_LEX_STATE(EXPR_ARG);
22880 if (c == '@') {
22881 return tUPLUS;
22882 }
22883 pushback(p, c);
22884 return '+';
22885 }
22886 if (c == '=') {
22887 set_yylval_id('+');
22888 SET_LEX_STATE(EXPR_BEG);
22889 return tOP_ASGN;
22890 }
22891 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22892 SET_LEX_STATE(EXPR_BEG);
22893 pushback(p, c);
22894 if (c != -1 && ISDIGIT(c)) {
22895 return parse_numeric(p, '+');
22896 }
22897 return tUPLUS;
22898 }
22899 SET_LEX_STATE(EXPR_BEG);
22900 pushback(p, c);
22901 return warn_balanced('+', "+", "unary operator");
22902
22903 case '-':
22904 c = nextc(p);
22905 if (IS_AFTER_OPERATOR()) {
22906 SET_LEX_STATE(EXPR_ARG);
22907 if (c == '@') {
22908 return tUMINUS;
22909 }
22910 pushback(p, c);
22911 return '-';
22912 }
22913 if (c == '=') {
22914 set_yylval_id('-');
22915 SET_LEX_STATE(EXPR_BEG);
22916 return tOP_ASGN;
22917 }
22918 if (c == '>') {
22919 SET_LEX_STATE(EXPR_ENDFN);
22920 yylval.num = p->lex.lpar_beg;
22921 p->lex.lpar_beg = p->lex.paren_nest;
22922 return tLAMBDA;
22923 }
22924 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22925 SET_LEX_STATE(EXPR_BEG);
22926 pushback(p, c);
22927 if (c != -1 && ISDIGIT(c)) {
22928 return tUMINUS_NUM;
22929 }
22930 return tUMINUS;
22931 }
22932 SET_LEX_STATE(EXPR_BEG);
22933 pushback(p, c);
22934 return warn_balanced('-', "-", "unary operator");
22935
22936 case '.': {
22937 int is_beg = IS_BEG();
22938 SET_LEX_STATE(EXPR_BEG);
22939 if ((c = nextc(p)) == '.') {
22940 if ((c = nextc(p)) == '.') {
22941 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22942 SET_LEX_STATE(EXPR_ENDARG);
22943 return tBDOT3;
22944 }
22945 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22946 rb_warn0("... at EOL, should be parenthesized?");
22947 }
22948 return is_beg ? tBDOT3 : tDOT3;
22949 }
22950 pushback(p, c);
22951 return is_beg ? tBDOT2 : tDOT2;
22952 }
22953 pushback(p, c);
22954 if (c != -1 && ISDIGIT(c)) {
22955 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22956 parse_numeric(p, '.');
22957 if (ISDIGIT(prev)) {
22958 yyerror0("unexpected fraction part after numeric literal");
22959 }
22960 else {
22961 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22962 }
22963 set_yylval_id(idNULL);
22964 SET_LEX_STATE(EXPR_END);
22965 p->lex.ptok = p->lex.pcur;
22966 goto retry;
22967 }
22968 set_yylval_id('.');
22969 SET_LEX_STATE(EXPR_DOT);
22970 return '.';
22971 }
22972
22973 case '0': case '1': case '2': case '3': case '4':
22974 case '5': case '6': case '7': case '8': case '9':
22975 return parse_numeric(p, c);
22976
22977 case ')':
22978 COND_POP();
22979 CMDARG_POP();
22980 SET_LEX_STATE(EXPR_ENDFN);
22981 p->lex.paren_nest--;
22982 return c;
22983
22984 case ']':
22985 COND_POP();
22986 CMDARG_POP();
22987 SET_LEX_STATE(EXPR_END);
22988 p->lex.paren_nest--;
22989 return c;
22990
22991 case '}':
22992 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22993 if (!p->lex.brace_nest--) return tSTRING_DEND;
22994 COND_POP();
22995 CMDARG_POP();
22996 SET_LEX_STATE(EXPR_END);
22997 p->lex.paren_nest--;
22998 return c;
22999
23000 case ':':
23001 c = nextc(p);
23002 if (c == ':') {
23003 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
23004 SET_LEX_STATE(EXPR_BEG);
23005 return tCOLON3;
23006 }
23007 set_yylval_id(idCOLON2);
23008 SET_LEX_STATE(EXPR_DOT);
23009 return tCOLON2;
23010 }
23011 if (IS_END() || ISSPACE(c) || c == '#') {
23012 pushback(p, c);
23013 c = warn_balanced(':', ":", "symbol literal");
23014 SET_LEX_STATE(EXPR_BEG);
23015 return c;
23016 }
23017 switch (c) {
23018 case '\'':
23019 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
23020 break;
23021 case '"':
23022 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
23023 break;
23024 default:
23025 pushback(p, c);
23026 break;
23027 }
23028 SET_LEX_STATE(EXPR_FNAME);
23029 return tSYMBEG;
23030
23031 case '/':
23032 if (IS_BEG()) {
23033 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
23034 return tREGEXP_BEG;
23035 }
23036 if ((c = nextc(p)) == '=') {
23037 set_yylval_id('/');
23038 SET_LEX_STATE(EXPR_BEG);
23039 return tOP_ASGN;
23040 }
23041 pushback(p, c);
23042 if (IS_SPCARG(c)) {
23043 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
23044 return tREGEXP_BEG;
23045 }
23046 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
23047 return warn_balanced('/', "/", "regexp literal");
23048
23049 case '^':
23050 if ((c = nextc(p)) == '=') {
23051 set_yylval_id('^');
23052 SET_LEX_STATE(EXPR_BEG);
23053 return tOP_ASGN;
23054 }
23055 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
23056 pushback(p, c);
23057 return '^';
23058
23059 case ';':
23060 SET_LEX_STATE(EXPR_BEG);
23061 p->command_start = TRUE;
23062 return ';';
23063
23064 case ',':
23065 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23066 return ',';
23067
23068 case '~':
23069 if (IS_AFTER_OPERATOR()) {
23070 if ((c = nextc(p)) != '@') {
23071 pushback(p, c);
23072 }
23073 SET_LEX_STATE(EXPR_ARG);
23074 }
23075 else {
23076 SET_LEX_STATE(EXPR_BEG);
23077 }
23078 return '~';
23079
23080 case '(':
23081 if (IS_BEG()) {
23082 c = tLPAREN;
23083 }
23084 else if (!space_seen) {
23085 /* foo( ... ) => method call, no ambiguity */
23086 }
23087 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
23088 c = tLPAREN_ARG;
23089 }
23090 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
23091 rb_warning0("parentheses after method name is interpreted as "
23092 "an argument list, not a decomposed argument");
23093 }
23094 p->lex.paren_nest++;
23095 COND_PUSH(0);
23096 CMDARG_PUSH(0);
23097 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23098 return c;
23099
23100 case '[':
23101 p->lex.paren_nest++;
23102 if (IS_AFTER_OPERATOR()) {
23103 if ((c = nextc(p)) == ']') {
23104 p->lex.paren_nest--;
23105 SET_LEX_STATE(EXPR_ARG);
23106 if ((c = nextc(p)) == '=') {
23107 return tASET;
23108 }
23109 pushback(p, c);
23110 return tAREF;
23111 }
23112 pushback(p, c);
23113 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
23114 return '[';
23115 }
23116 else if (IS_BEG()) {
23117 c = tLBRACK;
23118 }
23119 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
23120 c = tLBRACK;
23121 }
23122 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23123 COND_PUSH(0);
23124 CMDARG_PUSH(0);
23125 return c;
23126
23127 case '{':
23128 ++p->lex.brace_nest;
23129 if (lambda_beginning_p())
23130 c = tLAMBEG;
23131 else if (IS_lex_state(EXPR_LABELED))
23132 c = tLBRACE; /* hash */
23133 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
23134 c = '{'; /* block (primary) */
23135 else if (IS_lex_state(EXPR_ENDARG))
23136 c = tLBRACE_ARG; /* block (expr) */
23137 else
23138 c = tLBRACE; /* hash */
23139 if (c != tLBRACE) {
23140 p->command_start = TRUE;
23141 SET_LEX_STATE(EXPR_BEG);
23142 }
23143 else {
23144 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23145 }
23146 ++p->lex.paren_nest; /* after lambda_beginning_p() */
23147 COND_PUSH(0);
23148 CMDARG_PUSH(0);
23149 return c;
23150
23151 case '\\':
23152 c = nextc(p);
23153 if (c == '\n') {
23154 space_seen = 1;
23155 dispatch_scan_event(p, tSP);
23156 goto retry; /* skip \\n */
23157 }
23158 if (c == ' ') return tSP;
23159 if (ISSPACE(c)) return c;
23160 pushback(p, c);
23161 return '\\';
23162
23163 case '%':
23164 return parse_percent(p, space_seen, last_state);
23165
23166 case '$':
23167 return parse_gvar(p, last_state);
23168
23169 case '@':
23170 return parse_atmark(p, last_state);
23171
23172 case '_':
23173 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
23174 p->ruby__end__seen = 1;
23175 p->eofp = 1;
23176#ifdef RIPPER
23177 lex_goto_eol(p);
23178 dispatch_scan_event(p, k__END__);
23179#endif
23180 return END_OF_INPUT;
23181 }
23182 newtok(p);
23183 break;
23184
23185 default:
23186 if (!parser_is_identchar(p)) {
23187 compile_error(p, "Invalid char '\\x%02X' in expression", c);
23188 token_flush(p);
23189 goto retry;
23190 }
23191
23192 newtok(p);
23193 break;
23194 }
23195
23196 return parse_ident(p, c, cmd_state);
23197}
23198
23199static enum yytokentype
23200yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
23201{
23202 enum yytokentype t;
23203
23204 p->lval = lval;
23205 lval->node = 0;
23206 p->yylloc = yylloc;
23207
23208 t = parser_yylex(p);
23209
23210 if (has_delayed_token(p))
23211 dispatch_delayed_token(p, t);
23212 else if (t != END_OF_INPUT)
23213 dispatch_scan_event(p, t);
23214
23215 return t;
23216}
23217
23218#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
23219
23220static NODE*
23221node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
23222{
23223 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
23224
23225 rb_node_init(n, type);
23226 return n;
23227}
23228
23229static NODE *
23230nd_set_loc(NODE *nd, const YYLTYPE *loc)
23231{
23232 nd->nd_loc = *loc;
23233 nd_set_line(nd, loc->beg_pos.lineno);
23234 return nd;
23235}
23236
23237static NODE*
23238node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
23239{
23240 NODE *n = node_new_internal(p, type, size, alignment);
23241
23242 nd_set_loc(n, loc);
23243 nd_set_node_id(n, parser_get_node_id(p));
23244 return n;
23245}
23246
23247#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
23248
23249static rb_node_scope_t *
23250rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23251{
23252 rb_ast_id_table_t *nd_tbl;
23253 nd_tbl = local_tbl(p);
23254 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23255 n->nd_tbl = nd_tbl;
23256 n->nd_body = nd_body;
23257 n->nd_parent = nd_parent;
23258 n->nd_args = nd_args;
23259
23260 return n;
23261}
23262
23263static rb_node_scope_t *
23264rb_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)
23265{
23266 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23267 n->nd_tbl = nd_tbl;
23268 n->nd_body = nd_body;
23269 n->nd_parent = nd_parent;
23270 n->nd_args = nd_args;
23271
23272 return n;
23273}
23274
23275static rb_node_defn_t *
23276rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23277{
23278 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
23279 n->nd_mid = nd_mid;
23280 n->nd_defn = nd_defn;
23281
23282 return n;
23283}
23284
23285static rb_node_defs_t *
23286rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23287{
23288 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
23289 n->nd_recv = nd_recv;
23290 n->nd_mid = nd_mid;
23291 n->nd_defn = nd_defn;
23292
23293 return n;
23294}
23295
23296static rb_node_block_t *
23297rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23298{
23299 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
23300 n->nd_head = nd_head;
23301 n->nd_end = (NODE *)n;
23302 n->nd_next = 0;
23303
23304 return n;
23305}
23306
23307static rb_node_for_t *
23308rb_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)
23309{
23310 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
23311 n->nd_body = nd_body;
23312 n->nd_iter = nd_iter;
23313 n->for_keyword_loc = *for_keyword_loc;
23314 n->in_keyword_loc = *in_keyword_loc;
23315 n->do_keyword_loc = *do_keyword_loc;
23316 n->end_keyword_loc = *end_keyword_loc;
23317
23318 return n;
23319}
23320
23321static rb_node_for_masgn_t *
23322rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
23323{
23324 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
23325 n->nd_var = nd_var;
23326
23327 return n;
23328}
23329
23330static rb_node_retry_t *
23331rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
23332{
23333 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
23334
23335 return n;
23336}
23337
23338static rb_node_begin_t *
23339rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23340{
23341 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
23342 n->nd_body = nd_body;
23343
23344 return n;
23345}
23346
23347static rb_node_rescue_t *
23348rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
23349{
23350 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
23351 n->nd_head = nd_head;
23352 n->nd_resq = nd_resq;
23353 n->nd_else = nd_else;
23354
23355 return n;
23356}
23357
23358static rb_node_resbody_t *
23359rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
23360{
23361 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
23362 n->nd_args = nd_args;
23363 n->nd_exc_var = nd_exc_var;
23364 n->nd_body = nd_body;
23365 n->nd_next = nd_next;
23366
23367 return n;
23368}
23369
23370static rb_node_ensure_t *
23371rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
23372{
23373 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
23374 n->nd_head = nd_head;
23375 n->nd_ensr = nd_ensr;
23376
23377 return n;
23378}
23379
23380static rb_node_and_t *
23381rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23382{
23383 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
23384 n->nd_1st = nd_1st;
23385 n->nd_2nd = nd_2nd;
23386 n->operator_loc = *operator_loc;
23387
23388 return n;
23389}
23390
23391static rb_node_or_t *
23392rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23393{
23394 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
23395 n->nd_1st = nd_1st;
23396 n->nd_2nd = nd_2nd;
23397 n->operator_loc = *operator_loc;
23398
23399 return n;
23400}
23401
23402static rb_node_return_t *
23403rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23404{
23405 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
23406 n->nd_stts = nd_stts;
23407 n->keyword_loc = *keyword_loc;
23408 return n;
23409}
23410
23411static rb_node_yield_t *
23412rb_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)
23413{
23414 if (nd_head) no_blockarg(p, nd_head);
23415
23416 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
23417 n->nd_head = nd_head;
23418 n->keyword_loc = *keyword_loc;
23419 n->lparen_loc = *lparen_loc;
23420 n->rparen_loc = *rparen_loc;
23421
23422 return n;
23423}
23424
23425static rb_node_if_t *
23426rb_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)
23427{
23428 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
23429 n->nd_cond = nd_cond;
23430 n->nd_body = nd_body;
23431 n->nd_else = nd_else;
23432 n->if_keyword_loc = *if_keyword_loc;
23433 n->then_keyword_loc = *then_keyword_loc;
23434 n->end_keyword_loc = *end_keyword_loc;
23435
23436 return n;
23437}
23438
23439static rb_node_unless_t *
23440rb_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)
23441{
23442 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
23443 n->nd_cond = nd_cond;
23444 n->nd_body = nd_body;
23445 n->nd_else = nd_else;
23446 n->keyword_loc = *keyword_loc;
23447 n->then_keyword_loc = *then_keyword_loc;
23448 n->end_keyword_loc = *end_keyword_loc;
23449
23450 return n;
23451}
23452
23453static rb_node_class_t *
23454rb_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)
23455{
23456 /* Keep the order of node creation */
23457 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23458 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
23459 RNODE_SCOPE(scope)->nd_parent = &n->node;
23460 n->nd_cpath = nd_cpath;
23461 n->nd_body = scope;
23462 n->nd_super = nd_super;
23463 n->class_keyword_loc = *class_keyword_loc;
23464 n->inheritance_operator_loc = *inheritance_operator_loc;
23465 n->end_keyword_loc = *end_keyword_loc;
23466
23467 return n;
23468}
23469
23470static rb_node_sclass_t *
23471rb_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)
23472{
23473 /* Keep the order of node creation */
23474 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23475 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
23476 RNODE_SCOPE(scope)->nd_parent = &n->node;
23477 n->nd_recv = nd_recv;
23478 n->nd_body = scope;
23479 n->class_keyword_loc = *class_keyword_loc;
23480 n->operator_loc = *operator_loc;
23481 n->end_keyword_loc = *end_keyword_loc;
23482
23483 return n;
23484}
23485
23486static rb_node_module_t *
23487rb_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)
23488{
23489 /* Keep the order of node creation */
23490 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23491 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23492 RNODE_SCOPE(scope)->nd_parent = &n->node;
23493 n->nd_cpath = nd_cpath;
23494 n->nd_body = scope;
23495 n->module_keyword_loc = *module_keyword_loc;
23496 n->end_keyword_loc = *end_keyword_loc;
23497
23498 return n;
23499}
23500
23501static rb_node_iter_t *
23502rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23503{
23504 /* Keep the order of node creation */
23505 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23506 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23507 RNODE_SCOPE(scope)->nd_parent = &n->node;
23508 n->nd_body = scope;
23509 n->nd_iter = 0;
23510
23511 return n;
23512}
23513
23514static rb_node_lambda_t *
23515rb_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)
23516{
23517 /* Keep the order of node creation */
23518 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23519 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23520 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23521 RNODE_SCOPE(scope)->nd_parent = &n->node;
23522 n->nd_body = scope;
23523 n->operator_loc = *operator_loc;
23524 n->opening_loc = *opening_loc;
23525 n->closing_loc = *closing_loc;
23526
23527 return n;
23528}
23529
23530static rb_node_case_t *
23531rb_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)
23532{
23533 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23534 n->nd_head = nd_head;
23535 n->nd_body = nd_body;
23536 n->case_keyword_loc = *case_keyword_loc;
23537 n->end_keyword_loc = *end_keyword_loc;
23538
23539 return n;
23540}
23541
23542static rb_node_case2_t *
23543rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23544{
23545 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23546 n->nd_head = 0;
23547 n->nd_body = nd_body;
23548 n->case_keyword_loc = *case_keyword_loc;
23549 n->end_keyword_loc = *end_keyword_loc;
23550
23551 return n;
23552}
23553
23554static rb_node_case3_t *
23555rb_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)
23556{
23557 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23558 n->nd_head = nd_head;
23559 n->nd_body = nd_body;
23560 n->case_keyword_loc = *case_keyword_loc;
23561 n->end_keyword_loc = *end_keyword_loc;
23562
23563 return n;
23564}
23565
23566static rb_node_when_t *
23567rb_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)
23568{
23569 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23570 n->nd_head = nd_head;
23571 n->nd_body = nd_body;
23572 n->nd_next = nd_next;
23573 n->keyword_loc = *keyword_loc;
23574 n->then_keyword_loc = *then_keyword_loc;
23575
23576 return n;
23577}
23578
23579static rb_node_in_t *
23580rb_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)
23581{
23582 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23583 n->nd_head = nd_head;
23584 n->nd_body = nd_body;
23585 n->nd_next = nd_next;
23586 n->in_keyword_loc = *in_keyword_loc;
23587 n->then_keyword_loc = *then_keyword_loc;
23588 n->operator_loc = *operator_loc;
23589
23590 return n;
23591}
23592
23593static rb_node_while_t *
23594rb_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)
23595{
23596 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23597 n->nd_cond = nd_cond;
23598 n->nd_body = nd_body;
23599 n->nd_state = nd_state;
23600 n->keyword_loc = *keyword_loc;
23601 n->closing_loc = *closing_loc;
23602
23603 return n;
23604}
23605
23606static rb_node_until_t *
23607rb_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)
23608{
23609 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23610 n->nd_cond = nd_cond;
23611 n->nd_body = nd_body;
23612 n->nd_state = nd_state;
23613 n->keyword_loc = *keyword_loc;
23614 n->closing_loc = *closing_loc;
23615
23616 return n;
23617}
23618
23619static rb_node_colon2_t *
23620rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23621{
23622 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23623 n->nd_head = nd_head;
23624 n->nd_mid = nd_mid;
23625 n->delimiter_loc = *delimiter_loc;
23626 n->name_loc = *name_loc;
23627
23628 return n;
23629}
23630
23631static rb_node_colon3_t *
23632rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23633{
23634 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23635 n->nd_mid = nd_mid;
23636 n->delimiter_loc = *delimiter_loc;
23637 n->name_loc = *name_loc;
23638
23639 return n;
23640}
23641
23642static rb_node_dot2_t *
23643rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23644{
23645 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23646 n->nd_beg = nd_beg;
23647 n->nd_end = nd_end;
23648 n->operator_loc = *operator_loc;
23649
23650 return n;
23651}
23652
23653static rb_node_dot3_t *
23654rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23655{
23656 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23657 n->nd_beg = nd_beg;
23658 n->nd_end = nd_end;
23659 n->operator_loc = *operator_loc;
23660
23661 return n;
23662}
23663
23664static rb_node_self_t *
23665rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23666{
23667 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23668 n->nd_state = 1;
23669
23670 return n;
23671}
23672
23673static rb_node_nil_t *
23674rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23675{
23676 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23677
23678 return n;
23679}
23680
23681static rb_node_true_t *
23682rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23683{
23684 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23685
23686 return n;
23687}
23688
23689static rb_node_false_t *
23690rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23691{
23692 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23693
23694 return n;
23695}
23696
23697static rb_node_super_t *
23698rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23699 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23700{
23701 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23702 n->nd_args = nd_args;
23703 n->keyword_loc = *keyword_loc;
23704 n->lparen_loc = *lparen_loc;
23705 n->rparen_loc = *rparen_loc;
23706
23707 return n;
23708}
23709
23710static rb_node_zsuper_t *
23711rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23712{
23713 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23714
23715 return n;
23716}
23717
23718static rb_node_match2_t *
23719rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23720{
23721 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23722 n->nd_recv = nd_recv;
23723 n->nd_value = nd_value;
23724 n->nd_args = 0;
23725
23726 return n;
23727}
23728
23729static rb_node_match3_t *
23730rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23731{
23732 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23733 n->nd_recv = nd_recv;
23734 n->nd_value = nd_value;
23735
23736 return n;
23737}
23738
23739static rb_node_list_t *
23740rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23741{
23742 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23743}
23744
23745static rb_node_list_t *
23746rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23747{
23748 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23749 n->nd_head = nd_head;
23750 n->as.nd_alen = nd_alen;
23751 n->nd_next = nd_next;
23752
23753 return n;
23754}
23755
23756static rb_node_zlist_t *
23757rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23758{
23759 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23760
23761 return n;
23762}
23763
23764static rb_node_hash_t *
23765rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23766{
23767 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23768 n->nd_head = nd_head;
23769 n->nd_brace = 0;
23770
23771 return n;
23772}
23773
23774static rb_node_masgn_t *
23775rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23776{
23777 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23778 n->nd_head = nd_head;
23779 n->nd_value = 0;
23780 n->nd_args = nd_args;
23781
23782 return n;
23783}
23784
23785static rb_node_gasgn_t *
23786rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23787{
23788 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23789 n->nd_vid = nd_vid;
23790 n->nd_value = nd_value;
23791
23792 return n;
23793}
23794
23795static rb_node_lasgn_t *
23796rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23797{
23798 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23799 n->nd_vid = nd_vid;
23800 n->nd_value = nd_value;
23801
23802 return n;
23803}
23804
23805static rb_node_dasgn_t *
23806rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23807{
23808 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23809 n->nd_vid = nd_vid;
23810 n->nd_value = nd_value;
23811
23812 return n;
23813}
23814
23815static rb_node_iasgn_t *
23816rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23817{
23818 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23819 n->nd_vid = nd_vid;
23820 n->nd_value = nd_value;
23821
23822 return n;
23823}
23824
23825static rb_node_cvasgn_t *
23826rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23827{
23828 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23829 n->nd_vid = nd_vid;
23830 n->nd_value = nd_value;
23831
23832 return n;
23833}
23834
23835static rb_node_op_asgn1_t *
23836rb_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)
23837{
23838 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23839 n->nd_recv = nd_recv;
23840 n->nd_mid = nd_mid;
23841 n->nd_index = index;
23842 n->nd_rvalue = rvalue;
23843 n->call_operator_loc = *call_operator_loc;
23844 n->opening_loc = *opening_loc;
23845 n->closing_loc = *closing_loc;
23846 n->binary_operator_loc = *binary_operator_loc;
23847
23848 return n;
23849}
23850
23851static rb_node_op_asgn2_t *
23852rb_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)
23853{
23854 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23855 n->nd_recv = nd_recv;
23856 n->nd_value = nd_value;
23857 n->nd_vid = nd_vid;
23858 n->nd_mid = nd_mid;
23859 n->nd_aid = nd_aid;
23860 n->call_operator_loc = *call_operator_loc;
23861 n->message_loc = *message_loc;
23862 n->binary_operator_loc = *binary_operator_loc;
23863
23864 return n;
23865}
23866
23867static rb_node_op_asgn_or_t *
23868rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23869{
23870 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23871 n->nd_head = nd_head;
23872 n->nd_value = nd_value;
23873
23874 return n;
23875}
23876
23877static rb_node_op_asgn_and_t *
23878rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23879{
23880 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23881 n->nd_head = nd_head;
23882 n->nd_value = nd_value;
23883
23884 return n;
23885}
23886
23887static rb_node_gvar_t *
23888rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23889{
23890 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23891 n->nd_vid = nd_vid;
23892
23893 return n;
23894}
23895
23896static rb_node_lvar_t *
23897rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23898{
23899 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23900 n->nd_vid = nd_vid;
23901
23902 return n;
23903}
23904
23905static rb_node_dvar_t *
23906rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23907{
23908 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23909 n->nd_vid = nd_vid;
23910
23911 return n;
23912}
23913
23914static rb_node_ivar_t *
23915rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23916{
23917 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23918 n->nd_vid = nd_vid;
23919
23920 return n;
23921}
23922
23923static rb_node_const_t *
23924rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23925{
23926 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23927 n->nd_vid = nd_vid;
23928
23929 return n;
23930}
23931
23932static rb_node_cvar_t *
23933rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23934{
23935 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23936 n->nd_vid = nd_vid;
23937
23938 return n;
23939}
23940
23941static rb_node_nth_ref_t *
23942rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23943{
23944 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23945 n->nd_nth = nd_nth;
23946
23947 return n;
23948}
23949
23950static rb_node_back_ref_t *
23951rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23952{
23953 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23954 n->nd_nth = nd_nth;
23955
23956 return n;
23957}
23958
23959static rb_node_integer_t *
23960rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23961{
23962 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23963 n->val = val;
23964 n->minus = FALSE;
23965 n->base = base;
23966
23967 return n;
23968}
23969
23970static rb_node_float_t *
23971rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23972{
23973 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23974 n->val = val;
23975 n->minus = FALSE;
23976
23977 return n;
23978}
23979
23980static rb_node_rational_t *
23981rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23982{
23983 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23984 n->val = val;
23985 n->minus = FALSE;
23986 n->base = base;
23987 n->seen_point = seen_point;
23988
23989 return n;
23990}
23991
23992static rb_node_imaginary_t *
23993rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23994{
23995 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23996 n->val = val;
23997 n->minus = FALSE;
23998 n->base = base;
23999 n->seen_point = seen_point;
24000 n->type = numeric_type;
24001
24002 return n;
24003}
24004
24005static rb_node_str_t *
24006rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
24007{
24008 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
24009 n->string = string;
24010
24011 return n;
24012}
24013
24014/* TODO; Use union for NODE_DSTR2 */
24015static rb_node_dstr_t *
24016rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
24017{
24018 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
24019 n->string = string;
24020 n->as.nd_alen = nd_alen;
24021 n->nd_next = (rb_node_list_t *)nd_next;
24022
24023 return n;
24024}
24025
24026static rb_node_dstr_t *
24027rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
24028{
24029 return rb_node_dstr_new0(p, string, 1, 0, loc);
24030}
24031
24032static rb_node_xstr_t *
24033rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
24034{
24035 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
24036 n->string = string;
24037
24038 return n;
24039}
24040
24041static rb_node_dxstr_t *
24042rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
24043{
24044 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
24045 n->string = string;
24046 n->as.nd_alen = nd_alen;
24047 n->nd_next = (rb_node_list_t *)nd_next;
24048
24049 return n;
24050}
24051
24052static rb_node_sym_t *
24053rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24054{
24055 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
24056 n->string = rb_str_to_parser_string(p, str);
24057
24058 return n;
24059}
24060
24061static rb_node_dsym_t *
24062rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
24063{
24064 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
24065 n->string = string;
24066 n->as.nd_alen = nd_alen;
24067 n->nd_next = (rb_node_list_t *)nd_next;
24068
24069 return n;
24070}
24071
24072static rb_node_evstr_t *
24073rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24074{
24075 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
24076 n->nd_body = nd_body;
24077 n->opening_loc = *opening_loc;
24078 n->closing_loc = *closing_loc;
24079
24080 return n;
24081}
24082
24083static rb_node_regx_t *
24084rb_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)
24085{
24086 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
24087 n->string = string;
24088 n->options = options & RE_OPTION_MASK;
24089 n->opening_loc = *opening_loc;
24090 n->content_loc = *content_loc;
24091 n->closing_loc = *closing_loc;
24092
24093 return n;
24094}
24095
24096static rb_node_call_t *
24097rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24098{
24099 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
24100 n->nd_recv = nd_recv;
24101 n->nd_mid = nd_mid;
24102 n->nd_args = nd_args;
24103
24104 return n;
24105}
24106
24107static rb_node_opcall_t *
24108rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24109{
24110 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
24111 n->nd_recv = nd_recv;
24112 n->nd_mid = nd_mid;
24113 n->nd_args = nd_args;
24114
24115 return n;
24116}
24117
24118static rb_node_fcall_t *
24119rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24120{
24121 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
24122 n->nd_mid = nd_mid;
24123 n->nd_args = nd_args;
24124
24125 return n;
24126}
24127
24128static rb_node_qcall_t *
24129rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24130{
24131 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
24132 n->nd_recv = nd_recv;
24133 n->nd_mid = nd_mid;
24134 n->nd_args = nd_args;
24135
24136 return n;
24137}
24138
24139static rb_node_vcall_t *
24140rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
24141{
24142 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
24143 n->nd_mid = nd_mid;
24144
24145 return n;
24146}
24147
24148static rb_node_once_t *
24149rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24150{
24151 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
24152 n->nd_body = nd_body;
24153
24154 return n;
24155}
24156
24157static rb_node_args_t *
24158rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
24159{
24160 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
24161 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
24162
24163 return n;
24164}
24165
24166static rb_node_args_aux_t *
24167rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
24168{
24169 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
24170 n->nd_pid = nd_pid;
24171 n->nd_plen = nd_plen;
24172 n->nd_next = 0;
24173
24174 return n;
24175}
24176
24177static rb_node_opt_arg_t *
24178rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24179{
24180 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
24181 n->nd_body = nd_body;
24182 n->nd_next = 0;
24183
24184 return n;
24185}
24186
24187static rb_node_kw_arg_t *
24188rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24189{
24190 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
24191 n->nd_body = nd_body;
24192 n->nd_next = 0;
24193
24194 return n;
24195}
24196
24197static rb_node_postarg_t *
24198rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
24199{
24200 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
24201 n->nd_1st = nd_1st;
24202 n->nd_2nd = nd_2nd;
24203
24204 return n;
24205}
24206
24207static rb_node_argscat_t *
24208rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24209{
24210 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
24211 n->nd_head = nd_head;
24212 n->nd_body = nd_body;
24213
24214 return n;
24215}
24216
24217static rb_node_argspush_t *
24218rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24219{
24220 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
24221 n->nd_head = nd_head;
24222 n->nd_body = nd_body;
24223
24224 return n;
24225}
24226
24227static rb_node_splat_t *
24228rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24229{
24230 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
24231 n->nd_head = nd_head;
24232 n->operator_loc = *operator_loc;
24233
24234 return n;
24235}
24236
24237static rb_node_block_pass_t *
24238rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24239{
24240 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
24241 n->forwarding = 0;
24242 n->nd_head = 0;
24243 n->nd_body = nd_body;
24244 n->operator_loc = *operator_loc;
24245
24246 return n;
24247}
24248
24249static rb_node_alias_t *
24250rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24251{
24252 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
24253 n->nd_1st = nd_1st;
24254 n->nd_2nd = nd_2nd;
24255 n->keyword_loc = *keyword_loc;
24256
24257 return n;
24258}
24259
24260static rb_node_valias_t *
24261rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24262{
24263 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
24264 n->nd_alias = nd_alias;
24265 n->nd_orig = nd_orig;
24266 n->keyword_loc = *keyword_loc;
24267
24268 return n;
24269}
24270
24271static rb_node_undef_t *
24272rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
24273{
24274 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
24275 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
24276 n->keyword_loc = NULL_LOC;
24277 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
24278
24279 return n;
24280}
24281
24282static rb_node_errinfo_t *
24283rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
24284{
24285 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
24286
24287 return n;
24288}
24289
24290static rb_node_defined_t *
24291rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24292{
24293 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
24294 n->nd_head = nd_head;
24295 n->keyword_loc = *keyword_loc;
24296
24297 return n;
24298}
24299
24300static rb_node_postexe_t *
24301rb_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)
24302{
24303 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
24304 n->nd_body = nd_body;
24305 n->keyword_loc = *keyword_loc;
24306 n->opening_loc = *opening_loc;
24307 n->closing_loc = *closing_loc;
24308
24309 return n;
24310}
24311
24312static rb_node_attrasgn_t *
24313rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24314{
24315 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
24316 n->nd_recv = nd_recv;
24317 n->nd_mid = nd_mid;
24318 n->nd_args = nd_args;
24319
24320 return n;
24321}
24322
24323static rb_node_aryptn_t *
24324rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
24325{
24326 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
24327 n->nd_pconst = 0;
24328 n->pre_args = pre_args;
24329 n->rest_arg = rest_arg;
24330 n->post_args = post_args;
24331
24332 return n;
24333}
24334
24335static rb_node_hshptn_t *
24336rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
24337{
24338 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
24339 n->nd_pconst = nd_pconst;
24340 n->nd_pkwargs = nd_pkwargs;
24341 n->nd_pkwrestarg = nd_pkwrestarg;
24342
24343 return n;
24344}
24345
24346static rb_node_fndptn_t *
24347rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
24348{
24349 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
24350 n->nd_pconst = 0;
24351 n->pre_rest_arg = pre_rest_arg;
24352 n->args = args;
24353 n->post_rest_arg = post_rest_arg;
24354
24355 return n;
24356}
24357
24358static rb_node_line_t *
24359rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
24360{
24361 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
24362
24363 return n;
24364}
24365
24366static rb_node_file_t *
24367rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24368{
24369 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
24370 n->path = rb_str_to_parser_string(p, str);
24371
24372 return n;
24373}
24374
24375static rb_node_encoding_t *
24376rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
24377{
24378 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
24379 n->enc = p->enc;
24380
24381 return n;
24382}
24383
24384static rb_node_cdecl_t *
24385rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
24386{
24387 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
24388 n->nd_vid = nd_vid;
24389 n->nd_value = nd_value;
24390 n->nd_else = nd_else;
24391 n->shareability = shareability;
24392
24393 return n;
24394}
24395
24396static rb_node_op_cdecl_t *
24397rb_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)
24398{
24399 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
24400 n->nd_head = nd_head;
24401 n->nd_value = nd_value;
24402 n->nd_aid = nd_aid;
24403 n->shareability = shareability;
24404
24405 return n;
24406}
24407
24408static rb_node_error_t *
24409rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
24410{
24411 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
24412
24413 return n;
24414}
24415
24416static rb_node_break_t *
24417rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24418{
24419 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
24420 n->nd_stts = nd_stts;
24421 n->nd_chain = 0;
24422 n->keyword_loc = *keyword_loc;
24423
24424 return n;
24425}
24426
24427static rb_node_next_t *
24428rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24429{
24430 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
24431 n->nd_stts = nd_stts;
24432 n->nd_chain = 0;
24433 n->keyword_loc = *keyword_loc;
24434
24435 return n;
24436}
24437
24438static rb_node_redo_t *
24439rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24440{
24441 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
24442 n->nd_chain = 0;
24443 n->keyword_loc = *keyword_loc;
24444
24445 return n;
24446}
24447
24448static rb_node_def_temp_t *
24449rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
24450{
24451 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
24452 n->save.numparam_save = 0;
24453 n->save.max_numparam = 0;
24454 n->save.ctxt = p->ctxt;
24455 n->nd_def = 0;
24456 n->nd_mid = 0;
24457
24458 return n;
24459}
24460
24461static rb_node_def_temp_t *
24462def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
24463{
24464 n->save.numparam_save = numparam_push(p);
24465 n->save.max_numparam = p->max_numparam;
24466 return n;
24467}
24468
24469#ifndef RIPPER
24470static enum node_type
24471nodetype(NODE *node) /* for debug */
24472{
24473 return (enum node_type)nd_type(node);
24474}
24475
24476static int
24477nodeline(NODE *node)
24478{
24479 return nd_line(node);
24480}
24481#endif
24482
24483static NODE*
24484newline_node(NODE *node)
24485{
24486 if (node) {
24487 node = remove_begin(node);
24488 nd_set_fl_newline(node);
24489 }
24490 return node;
24491}
24492
24493static void
24494fixpos(NODE *node, NODE *orig)
24495{
24496 if (!node) return;
24497 if (!orig) return;
24498 nd_set_line(node, nd_line(orig));
24499}
24500
24501static NODE*
24502block_append(struct parser_params *p, NODE *head, NODE *tail)
24503{
24504 NODE *end, *h = head, *nd;
24505
24506 if (tail == 0) return head;
24507
24508 if (h == 0) return tail;
24509 switch (nd_type(h)) {
24510 default:
24511 h = end = NEW_BLOCK(head, &head->nd_loc);
24512 head = end;
24513 break;
24514 case NODE_BLOCK:
24515 end = RNODE_BLOCK(h)->nd_end;
24516 break;
24517 }
24518
24519 nd = RNODE_BLOCK(end)->nd_head;
24520 switch (nd_type(nd)) {
24521 case NODE_RETURN:
24522 case NODE_BREAK:
24523 case NODE_NEXT:
24524 case NODE_REDO:
24525 case NODE_RETRY:
24526 rb_warning0L(nd_line(tail), "statement not reached");
24527 break;
24528
24529 default:
24530 break;
24531 }
24532
24533 if (!nd_type_p(tail, NODE_BLOCK)) {
24534 tail = NEW_BLOCK(tail, &tail->nd_loc);
24535 }
24536 RNODE_BLOCK(end)->nd_next = tail;
24537 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24538 nd_set_last_loc(head, nd_last_loc(tail));
24539 return head;
24540}
24541
24542/* append item to the list */
24543static NODE*
24544list_append(struct parser_params *p, NODE *list, NODE *item)
24545{
24546 NODE *last;
24547
24548 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24549 if (RNODE_LIST(list)->nd_next) {
24550 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24551 }
24552 else {
24553 last = list;
24554 }
24555
24556 RNODE_LIST(list)->as.nd_alen += 1;
24557 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24558 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24559
24560 nd_set_last_loc(list, nd_last_loc(item));
24561
24562 return list;
24563}
24564
24565/* concat two lists */
24566static NODE*
24567list_concat(NODE *head, NODE *tail)
24568{
24569 NODE *last;
24570
24571 if (RNODE_LIST(head)->nd_next) {
24572 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24573 }
24574 else {
24575 last = head;
24576 }
24577
24578 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24579 RNODE_LIST(last)->nd_next = tail;
24580 if (RNODE_LIST(tail)->nd_next) {
24581 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24582 }
24583 else {
24584 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24585 }
24586
24587 nd_set_last_loc(head, nd_last_loc(tail));
24588
24589 return head;
24590}
24591
24592static int
24593literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24594{
24595 if (!tail) return 1;
24596 if (!rb_parser_enc_compatible(p, head, tail)) {
24597 compile_error(p, "string literal encodings differ (%s / %s)",
24598 rb_enc_name(rb_parser_str_get_encoding(head)),
24599 rb_enc_name(rb_parser_str_get_encoding(tail)));
24600 rb_parser_str_resize(p, head, 0);
24601 rb_parser_str_resize(p, tail, 0);
24602 return 0;
24603 }
24604 rb_parser_str_buf_append(p, head, tail);
24605 return 1;
24606}
24607
24608static rb_parser_string_t *
24609string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24610{
24611 if (htype != NODE_DSTR) return NULL;
24612 if (RNODE_DSTR(head)->nd_next) {
24613 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24614 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24615 }
24616 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24617 ASSUME(lit);
24618 return lit;
24619}
24620
24621#ifndef RIPPER
24622static rb_parser_string_t *
24623rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24624{
24625 rb_parser_string_t *copy;
24626 if (!orig) return NULL;
24627 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24628 copy->coderange = orig->coderange;
24629 copy->enc = orig->enc;
24630 return copy;
24631}
24632#endif
24633
24634/* concat two string literals */
24635static NODE *
24636literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24637{
24638 enum node_type htype;
24639 rb_parser_string_t *lit;
24640
24641 if (!head) return tail;
24642 if (!tail) return head;
24643
24644 htype = nd_type(head);
24645 if (htype == NODE_EVSTR) {
24646 head = new_dstr(p, head, loc);
24647 htype = NODE_DSTR;
24648 }
24649 if (p->heredoc_indent > 0) {
24650 switch (htype) {
24651 case NODE_STR:
24652 head = str2dstr(p, head);
24653 case NODE_DSTR:
24654 return list_append(p, head, tail);
24655 default:
24656 break;
24657 }
24658 }
24659 switch (nd_type(tail)) {
24660 case NODE_STR:
24661 if ((lit = string_literal_head(p, htype, head)) != false) {
24662 htype = NODE_STR;
24663 }
24664 else {
24665 lit = RNODE_DSTR(head)->string;
24666 }
24667 if (htype == NODE_STR) {
24668 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24669 error:
24670 rb_discard_node(p, head);
24671 rb_discard_node(p, tail);
24672 return 0;
24673 }
24674 rb_discard_node(p, tail);
24675 }
24676 else {
24677 list_append(p, head, tail);
24678 }
24679 break;
24680
24681 case NODE_DSTR:
24682 if (htype == NODE_STR) {
24683 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24684 goto error;
24685 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24686 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24687 RNODE_STR(head)->string = NULL;
24688 rb_discard_node(p, head);
24689 head = tail;
24690 }
24691 else if (!RNODE_DSTR(tail)->string) {
24692 append:
24693 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24694 if (!RNODE_DSTR(head)->nd_next) {
24695 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24696 }
24697 else if (RNODE_DSTR(tail)->nd_next) {
24698 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24699 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24700 }
24701 rb_discard_node(p, tail);
24702 }
24703 else if ((lit = string_literal_head(p, htype, head)) != false) {
24704 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24705 goto error;
24706 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24707 RNODE_DSTR(tail)->string = 0;
24708 goto append;
24709 }
24710 else {
24711 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));
24712 RNODE_DSTR(tail)->string = 0;
24713 }
24714 break;
24715
24716 case NODE_EVSTR:
24717 if (htype == NODE_STR) {
24718 head = str2dstr(p, head);
24719 RNODE_DSTR(head)->as.nd_alen = 1;
24720 }
24721 list_append(p, head, tail);
24722 break;
24723 }
24724 return head;
24725}
24726
24727static void
24728nd_copy_flag(NODE *new_node, NODE *old_node)
24729{
24730 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24731 nd_set_line(new_node, nd_line(old_node));
24732 new_node->nd_loc = old_node->nd_loc;
24733 new_node->node_id = old_node->node_id;
24734}
24735
24736static NODE *
24737str2dstr(struct parser_params *p, NODE *node)
24738{
24739 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24740 nd_copy_flag(new_node, node);
24741 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24742 RNODE_DSTR(new_node)->as.nd_alen = 0;
24743 RNODE_DSTR(new_node)->nd_next = 0;
24744 RNODE_STR(node)->string = 0;
24745
24746 return new_node;
24747}
24748
24749static NODE *
24750str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24751{
24752 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24753 nd_copy_flag(new_node, node);
24754 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24755 RNODE_REGX(new_node)->options = options;
24756 nd_set_loc(new_node, loc);
24757 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24758 RNODE_REGX(new_node)->content_loc = *content_loc;
24759 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24760 RNODE_STR(node)->string = 0;
24761
24762 return new_node;
24763}
24764
24765static NODE *
24766evstr2dstr(struct parser_params *p, NODE *node)
24767{
24768 if (nd_type_p(node, NODE_EVSTR)) {
24769 node = new_dstr(p, node, &node->nd_loc);
24770 }
24771 return node;
24772}
24773
24774static NODE *
24775new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24776{
24777 NODE *head = node;
24778
24779 if (node) {
24780 switch (nd_type(node)) {
24781 case NODE_STR:
24782 return str2dstr(p, node);
24783 case NODE_DSTR:
24784 break;
24785 case NODE_EVSTR:
24786 return node;
24787 }
24788 }
24789 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24790}
24791
24792static NODE *
24793new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24794{
24795 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24796 return list_append(p, dstr, node);
24797}
24798
24799static NODE *
24800call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24801 const YYLTYPE *op_loc, const YYLTYPE *loc)
24802{
24803 NODE *expr;
24804 value_expr(p, recv);
24805 value_expr(p, arg1);
24806 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24807 nd_set_line(expr, op_loc->beg_pos.lineno);
24808 return expr;
24809}
24810
24811static NODE *
24812call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24813{
24814 NODE *opcall;
24815 value_expr(p, recv);
24816 opcall = NEW_OPCALL(recv, id, 0, loc);
24817 nd_set_line(opcall, op_loc->beg_pos.lineno);
24818 return opcall;
24819}
24820
24821static NODE *
24822new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24823{
24824 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24825 nd_set_line(qcall, op_loc->beg_pos.lineno);
24826 return qcall;
24827}
24828
24829static NODE*
24830new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24831{
24832 NODE *ret;
24833 if (block) block_dup_check(p, args, block);
24834 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24835 if (block) ret = method_add_block(p, ret, block, loc);
24836 fixpos(ret, recv);
24837 return ret;
24838}
24839
24841new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24842{
24844 body->node = node;
24845 body->opening_loc = *opening_loc;
24846 body->closing_loc = *closing_loc;
24847 return body;
24848}
24849
24850static NODE *
24851command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc)
24852{
24853 NODE **body;
24854 enum node_type type = nd_type(m);
24855 switch (type) {
24856 case NODE_YIELD:
24857 compile_error(p, "block given to yield");
24858 return m;
24859 case NODE_RETURN:
24860 body = &RNODE_RETURN(m)->nd_stts;
24861 break;
24862 case NODE_BREAK:
24863 case NODE_NEXT:
24864 body = &RNODE_EXITS(m)->nd_stts;
24865 break;
24866 case NODE_REDO: /* `redo` has no argument */
24867 compile_error(p, "command_add_block: unexpected node: NODE_REDO");
24868 return m;
24869 case NODE_RETRY: /* `retry` has no argument */
24870 compile_error(p, "command_add_block: unexpected node: NODE_RETRY");
24871 return m;
24872 default:
24873 block_dup_check(p, get_nd_args(p, m), b);
24874 return method_add_block(p, m, b, loc);
24875 }
24876 RUBY_ASSERT(*body, "no argument %s with do_block", parser_node_name(type));
24877 YYLTYPE b_loc = code_loc_gen(&(*body)->nd_loc, loc);
24878 *body = command_add_block(p, *body, b, &b_loc);
24879 m->nd_loc.end_pos = loc->end_pos;
24880 return m;
24881}
24882
24883#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24884
24885static NODE*
24886last_expr_once_body(NODE *node)
24887{
24888 if (!node) return 0;
24889 return nd_once_body(node);
24890}
24891
24892static NODE*
24893match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24894{
24895 NODE *n;
24896 int line = op_loc->beg_pos.lineno;
24897
24898 value_expr(p, node1);
24899 value_expr(p, node2);
24900
24901 if ((n = last_expr_once_body(node1)) != 0) {
24902 switch (nd_type(n)) {
24903 case NODE_DREGX:
24904 {
24905 NODE *match = NEW_MATCH2(node1, node2, loc);
24906 nd_set_line(match, line);
24907 return match;
24908 }
24909
24910 case NODE_REGX:
24911 {
24912 const VALUE lit = rb_node_regx_string_val(n);
24913 if (!NIL_P(lit)) {
24914 NODE *match = NEW_MATCH2(node1, node2, loc);
24915 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24916 nd_set_line(match, line);
24917 return match;
24918 }
24919 }
24920 }
24921 }
24922
24923 if ((n = last_expr_once_body(node2)) != 0) {
24924 NODE *match3;
24925
24926 switch (nd_type(n)) {
24927 case NODE_DREGX:
24928 match3 = NEW_MATCH3(node2, node1, loc);
24929 return match3;
24930 }
24931 }
24932
24933 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24934 nd_set_line(n, line);
24935 return n;
24936}
24937
24938# if WARN_PAST_SCOPE
24939static int
24940past_dvar_p(struct parser_params *p, ID id)
24941{
24942 struct vtable *past = p->lvtbl->past;
24943 while (past) {
24944 if (vtable_included(past, id)) return 1;
24945 past = past->prev;
24946 }
24947 return 0;
24948}
24949# endif
24950
24951static int
24952numparam_nested_p(struct parser_params *p)
24953{
24954 struct local_vars *local = p->lvtbl;
24955 NODE *outer = local->numparam.outer;
24956 NODE *inner = local->numparam.inner;
24957 if (outer || inner) {
24958 NODE *used = outer ? outer : inner;
24959 compile_error(p, "numbered parameter is already used in %s block\n"
24960 "%s:%d: numbered parameter is already used here",
24961 outer ? "outer" : "inner",
24962 p->ruby_sourcefile, nd_line(used));
24963 parser_show_error_line(p, &used->nd_loc);
24964 return 1;
24965 }
24966 return 0;
24967}
24968
24969static int
24970numparam_used_p(struct parser_params *p)
24971{
24972 NODE *numparam = p->lvtbl->numparam.current;
24973 if (numparam) {
24974 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24975 "%s:%d: numbered parameter is already used here",
24976 p->ruby_sourcefile, nd_line(numparam));
24977 parser_show_error_line(p, &numparam->nd_loc);
24978 return 1;
24979 }
24980 return 0;
24981}
24982
24983static int
24984it_used_p(struct parser_params *p)
24985{
24986 NODE *it = p->lvtbl->it;
24987 if (it) {
24988 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24989 "%s:%d: 'it' is already used here",
24990 p->ruby_sourcefile, nd_line(it));
24991 parser_show_error_line(p, &it->nd_loc);
24992 return 1;
24993 }
24994 return 0;
24995}
24996
24997static NODE*
24998gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24999{
25000 ID *vidp = NULL;
25001 NODE *node;
25002 switch (id) {
25003 case keyword_self:
25004 return NEW_SELF(loc);
25005 case keyword_nil:
25006 return NEW_NIL(loc);
25007 case keyword_true:
25008 return NEW_TRUE(loc);
25009 case keyword_false:
25010 return NEW_FALSE(loc);
25011 case keyword__FILE__:
25012 {
25013 VALUE file = p->ruby_sourcefile_string;
25014 if (NIL_P(file))
25015 file = rb_str_new(0, 0);
25016 node = NEW_FILE(file, loc);
25017 }
25018 return node;
25019 case keyword__LINE__:
25020 return NEW_LINE(loc);
25021 case keyword__ENCODING__:
25022 return NEW_ENCODING(loc);
25023
25024 }
25025 switch (id_type(id)) {
25026 case ID_LOCAL:
25027 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
25028 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
25029 if (vidp) *vidp |= LVAR_USED;
25030 node = NEW_DVAR(id, loc);
25031 return node;
25032 }
25033 if (local_id_ref(p, id, &vidp)) {
25034 if (vidp) *vidp |= LVAR_USED;
25035 node = NEW_LVAR(id, loc);
25036 return node;
25037 }
25038 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
25039 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
25040 if (numparam_nested_p(p) || it_used_p(p)) return 0;
25041 node = NEW_DVAR(id, loc);
25042 struct local_vars *local = p->lvtbl;
25043 if (!local->numparam.current) local->numparam.current = node;
25044 return node;
25045 }
25046# if WARN_PAST_SCOPE
25047 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
25048 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
25049 }
25050# endif
25051 /* method call without arguments */
25052 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
25053 if (numparam_used_p(p)) return 0;
25054 if (p->max_numparam == ORDINAL_PARAM) {
25055 compile_error(p, "ordinary parameter is defined");
25056 return 0;
25057 }
25058 if (!p->it_id) {
25059 p->it_id = idItImplicit;
25060 vtable_add(p->lvtbl->args, p->it_id);
25061 }
25062 NODE *node = NEW_DVAR(p->it_id, loc);
25063 if (!p->lvtbl->it) p->lvtbl->it = node;
25064 return node;
25065 }
25066 return NEW_VCALL(id, loc);
25067 case ID_GLOBAL:
25068 return NEW_GVAR(id, loc);
25069 case ID_INSTANCE:
25070 return NEW_IVAR(id, loc);
25071 case ID_CONST:
25072 return NEW_CONST(id, loc);
25073 case ID_CLASS:
25074 return NEW_CVAR(id, loc);
25075 }
25076 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25077 return 0;
25078}
25079
25080static rb_node_opt_arg_t *
25081opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
25082{
25083 rb_node_opt_arg_t *opts = opt_list;
25084 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
25085
25086 while (opts->nd_next) {
25087 opts = opts->nd_next;
25088 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
25089 }
25090 opts->nd_next = opt;
25091
25092 return opt_list;
25093}
25094
25095static rb_node_kw_arg_t *
25096kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
25097{
25098 if (kwlist) {
25099 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
25100 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
25101 }
25102 return kwlist;
25103}
25104
25105static NODE *
25106new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
25107{
25108 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
25109 p->ctxt.has_trailing_semicolon = 0;
25110
25111 NODE *n = expr;
25112 while (n) {
25113 if (nd_type_p(n, NODE_BEGIN)) {
25114 n = RNODE_BEGIN(n)->nd_body;
25115 }
25116 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
25117 n = RNODE_BLOCK(n)->nd_head;
25118 }
25119 else {
25120 break;
25121 }
25122 }
25123
25124 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
25125 NODE *block = NEW_BLOCK(expr, loc);
25126 return NEW_DEFINED(block, loc, keyword_loc);
25127 }
25128
25129 return NEW_DEFINED(n, loc, keyword_loc);
25130}
25131
25132static NODE*
25133str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25134{
25135 VALUE lit;
25136 rb_parser_string_t *str = RNODE_STR(node)->string;
25137 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
25138 yyerror1(loc, "invalid symbol");
25139 lit = STR_NEW0();
25140 }
25141 else {
25142 lit = rb_str_new_parser_string(str);
25143 }
25144 return NEW_SYM(lit, loc);
25145}
25146
25147static NODE*
25148symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
25149{
25150 enum node_type type = nd_type(symbol);
25151 switch (type) {
25152 case NODE_DSTR:
25153 nd_set_type(symbol, NODE_DSYM);
25154 break;
25155 case NODE_STR:
25156 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
25157 break;
25158 default:
25159 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
25160 }
25161 return list_append(p, symbols, symbol);
25162}
25163
25164static void
25165dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
25166{
25167 if (dreg->string) {
25168 reg_fragment_setenc(p, dreg->string, options);
25169 }
25170 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
25171 NODE *frag = list->nd_head;
25172 if (nd_type_p(frag, NODE_STR)) {
25173 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
25174 }
25175 else if (nd_type_p(frag, NODE_DSTR)) {
25176 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
25177 }
25178 }
25179}
25180
25181static NODE *
25182new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
25183{
25184 if (!node) {
25185 /* Check string is valid regex */
25186 rb_parser_string_t *str = STRING_NEW0();
25187 reg_compile(p, str, options);
25188 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
25189 return node;
25190 }
25191 switch (nd_type(node)) {
25192 case NODE_STR:
25193 {
25194 /* Check string is valid regex */
25195 reg_compile(p, RNODE_STR(node)->string, options);
25196 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
25197 }
25198 break;
25199 default:
25200 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
25201 /* fall through */
25202 case NODE_DSTR:
25203 nd_set_type(node, NODE_DREGX);
25204 nd_set_loc(node, loc);
25205 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
25206 dreg->as.nd_cflag = options & RE_OPTION_MASK;
25207 if (dreg->nd_next) {
25208 dregex_fragment_setenc(p, dreg, options);
25209 }
25210 if (options & RE_OPTION_ONCE) {
25211 node = NEW_ONCE(node, loc);
25212 }
25213 break;
25214 }
25215 return node;
25216}
25217
25218static rb_node_kw_arg_t *
25219new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
25220{
25221 if (!k) return 0;
25222 return NEW_KW_ARG((k), loc);
25223}
25224
25225static NODE *
25226new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25227{
25228 if (!node) {
25229 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
25230 return xstr;
25231 }
25232 switch (nd_type(node)) {
25233 case NODE_STR:
25234 nd_set_type(node, NODE_XSTR);
25235 nd_set_loc(node, loc);
25236 break;
25237 case NODE_DSTR:
25238 nd_set_type(node, NODE_DXSTR);
25239 nd_set_loc(node, loc);
25240 break;
25241 default:
25242 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
25243 break;
25244 }
25245 return node;
25246}
25247
25248static const
25249struct st_hash_type literal_type = {
25250 literal_cmp,
25251 literal_hash,
25252};
25253
25254static int nd_type_st_key_enable_p(NODE *node);
25255
25256static void
25257check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
25258{
25259 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25260 if (!arg || !p->case_labels) return;
25261 if (!nd_type_st_key_enable_p(arg)) return;
25262
25263 if (p->case_labels == CHECK_LITERAL_WHEN) {
25264 p->case_labels = st_init_table(&literal_type);
25265 }
25266 else {
25267 st_data_t line;
25268 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
25269 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
25270 WARN_I((int)nd_line(arg)), WARN_I((int)line));
25271 return;
25272 }
25273 }
25274 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
25275}
25276
25277#ifdef RIPPER
25278static int
25279id_is_var(struct parser_params *p, ID id)
25280{
25281 if (is_notop_id(id)) {
25282 switch (id & ID_SCOPE_MASK) {
25283 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
25284 return 1;
25285 case ID_LOCAL:
25286 if (dyna_in_block(p)) {
25287 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
25288 }
25289 if (local_id(p, id)) return 1;
25290 /* method call without arguments */
25291 return 0;
25292 }
25293 }
25294 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25295 return 0;
25296}
25297#endif
25298
25299static inline enum lex_state_e
25300parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
25301{
25302 if (p->debug) {
25303 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
25304 }
25305 return p->lex.state = ls;
25306}
25307
25308#ifndef RIPPER
25309static void
25310flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
25311{
25312 VALUE mesg = p->debug_buffer;
25313
25314 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
25315 p->debug_buffer = Qnil;
25316 rb_io_puts(1, &mesg, out);
25317 }
25318 if (!NIL_P(str) && RSTRING_LEN(str)) {
25319 rb_io_write(p->debug_output, str);
25320 }
25321}
25322
25323static const char rb_parser_lex_state_names[][8] = {
25324 "BEG", "END", "ENDARG", "ENDFN", "ARG",
25325 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
25326 "LABEL", "LABELED","FITEM",
25327};
25328
25329static VALUE
25330append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
25331{
25332 int i, sep = 0;
25333 unsigned int mask = 1;
25334 static const char none[] = "NONE";
25335
25336 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
25337 if ((unsigned)state & mask) {
25338 if (sep) {
25339 rb_str_cat(buf, "|", 1);
25340 }
25341 sep = 1;
25342 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
25343 }
25344 }
25345 if (!sep) {
25346 rb_str_cat(buf, none, sizeof(none)-1);
25347 }
25348 return buf;
25349}
25350
25351enum lex_state_e
25352rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
25353 enum lex_state_e to, int line)
25354{
25355 VALUE mesg;
25356 mesg = rb_str_new_cstr("lex_state: ");
25357 append_lex_state_name(p, from, mesg);
25358 rb_str_cat_cstr(mesg, " -> ");
25359 append_lex_state_name(p, to, mesg);
25360 rb_str_catf(mesg, " at line %d\n", line);
25361 flush_debug_buffer(p, p->debug_output, mesg);
25362 return to;
25363}
25364
25365VALUE
25366rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
25367{
25368 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
25369}
25370
25371static void
25372append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
25373{
25374 if (stack == 0) {
25375 rb_str_cat_cstr(mesg, "0");
25376 }
25377 else {
25378 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
25379 for (; mask && !(stack & mask); mask >>= 1) continue;
25380 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
25381 }
25382}
25383
25384void
25385rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
25386 const char *name, int line)
25387{
25388 VALUE mesg = rb_sprintf("%s: ", name);
25389 append_bitstack_value(p, stack, mesg);
25390 rb_str_catf(mesg, " at line %d\n", line);
25391 flush_debug_buffer(p, p->debug_output, mesg);
25392}
25393
25394void
25395rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
25396{
25397 va_list ap;
25398 VALUE mesg = rb_str_new_cstr("internal parser error: ");
25399
25400 va_start(ap, fmt);
25401 rb_str_vcatf(mesg, fmt, ap);
25402 va_end(ap);
25403 yyerror0(RSTRING_PTR(mesg));
25404 RB_GC_GUARD(mesg);
25405
25406 mesg = rb_str_new(0, 0);
25407 append_lex_state_name(p, p->lex.state, mesg);
25408 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
25409 rb_str_resize(mesg, 0);
25410 append_bitstack_value(p, p->cond_stack, mesg);
25411 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
25412 rb_str_resize(mesg, 0);
25413 append_bitstack_value(p, p->cmdarg_stack, mesg);
25414 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
25415 if (p->debug_output == rb_ractor_stdout())
25416 p->debug_output = rb_ractor_stderr();
25417 p->debug = TRUE;
25418}
25419
25420static YYLTYPE *
25421rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
25422{
25423 yylloc->beg_pos.lineno = sourceline;
25424 yylloc->beg_pos.column = beg_pos;
25425 yylloc->end_pos.lineno = sourceline;
25426 yylloc->end_pos.column = end_pos;
25427 return yylloc;
25428}
25429
25430YYLTYPE *
25431rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
25432{
25433 int sourceline = here->sourceline;
25434 int beg_pos = parser_column(here->offset - here->quote
25435 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT)));
25436 int end_pos = parser_column(here->offset + here->length + here->quote);
25437
25438 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25439}
25440
25441YYLTYPE *
25442rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
25443{
25444 yylloc->beg_pos.lineno = p->delayed.beg_line;
25445 yylloc->beg_pos.column = p->delayed.beg_col;
25446 yylloc->end_pos.lineno = p->delayed.end_line;
25447 yylloc->end_pos.column = p->delayed.end_col;
25448
25449 return yylloc;
25450}
25451
25452YYLTYPE *
25453rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
25454{
25455 int sourceline = p->ruby_sourceline;
25456 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25457 int end_pos = parser_column(p->lex.pend - p->lex.pbeg);
25458 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25459}
25460
25461YYLTYPE *
25462rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
25463{
25464 yylloc->end_pos = yylloc->beg_pos;
25465
25466 return yylloc;
25467}
25468
25469YYLTYPE *
25470rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
25471{
25472 int sourceline = p->ruby_sourceline;
25473 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25474 int end_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25475 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25476}
25477
25478YYLTYPE *
25479rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25480{
25481 int sourceline = p->ruby_sourceline;
25482 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25483 int end_pos = parser_column(p->lex.pcur - p->lex.pbeg);
25484 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25485}
25486#endif /* !RIPPER */
25487
25488static int
25489assignable0(struct parser_params *p, ID id, const char **err)
25490{
25491 if (!id) return -1;
25492 switch (id) {
25493 case keyword_self:
25494 *err = "Can't change the value of self";
25495 return -1;
25496 case keyword_nil:
25497 *err = "Can't assign to nil";
25498 return -1;
25499 case keyword_true:
25500 *err = "Can't assign to true";
25501 return -1;
25502 case keyword_false:
25503 *err = "Can't assign to false";
25504 return -1;
25505 case keyword__FILE__:
25506 *err = "Can't assign to __FILE__";
25507 return -1;
25508 case keyword__LINE__:
25509 *err = "Can't assign to __LINE__";
25510 return -1;
25511 case keyword__ENCODING__:
25512 *err = "Can't assign to __ENCODING__";
25513 return -1;
25514 }
25515 switch (id_type(id)) {
25516 case ID_LOCAL:
25517 if (dyna_in_block(p)) {
25518 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25519 compile_error(p, "Can't assign to numbered parameter _%d",
25520 NUMPARAM_ID_TO_IDX(id));
25521 return -1;
25522 }
25523 if (dvar_curr(p, id)) return NODE_DASGN;
25524 if (dvar_defined(p, id)) return NODE_DASGN;
25525 if (local_id(p, id)) return NODE_LASGN;
25526 dyna_var(p, id);
25527 return NODE_DASGN;
25528 }
25529 else {
25530 if (!local_id(p, id)) local_var(p, id);
25531 return NODE_LASGN;
25532 }
25533 break;
25534 case ID_GLOBAL: return NODE_GASGN;
25535 case ID_INSTANCE: return NODE_IASGN;
25536 case ID_CONST:
25537 if (!p->ctxt.in_def) return NODE_CDECL;
25538 *err = "dynamic constant assignment";
25539 return -1;
25540 case ID_CLASS: return NODE_CVASGN;
25541 default:
25542 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25543 }
25544 return -1;
25545}
25546
25547static NODE*
25548assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25549{
25550 const char *err = 0;
25551 int node_type = assignable0(p, id, &err);
25552 switch (node_type) {
25553 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25554 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25555 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25556 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25557 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25558 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25559 }
25560/* TODO: FIXME */
25561#ifndef RIPPER
25562 if (err) yyerror1(loc, err);
25563#else
25564 if (err) set_value(assign_error(p, err, p->s_lvalue));
25565#endif
25566 return NEW_ERROR(loc);
25567}
25568
25569static int
25570is_private_local_id(struct parser_params *p, ID name)
25571{
25572 VALUE s;
25573 if (name == idUScore) return 1;
25574 if (!is_local_id(name)) return 0;
25575 s = rb_id2str(name);
25576 if (!s) return 0;
25577 return RSTRING_PTR(s)[0] == '_';
25578}
25579
25580static int
25581shadowing_lvar_0(struct parser_params *p, ID name)
25582{
25583 if (dyna_in_block(p)) {
25584 if (dvar_curr(p, name)) {
25585 if (is_private_local_id(p, name)) return 1;
25586 yyerror0("duplicated argument name");
25587 }
25588 else if (dvar_defined(p, name) || local_id(p, name)) {
25589 vtable_add(p->lvtbl->vars, name);
25590 if (p->lvtbl->used) {
25591 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25592 }
25593 return 0;
25594 }
25595 }
25596 else {
25597 if (local_id(p, name)) {
25598 if (is_private_local_id(p, name)) return 1;
25599 yyerror0("duplicated argument name");
25600 }
25601 }
25602 return 1;
25603}
25604
25605static ID
25606shadowing_lvar(struct parser_params *p, ID name)
25607{
25608 shadowing_lvar_0(p, name);
25609 return name;
25610}
25611
25612static void
25613new_bv(struct parser_params *p, ID name)
25614{
25615 if (!name) return;
25616 if (!is_local_id(name)) {
25617 compile_error(p, "invalid local variable - %"PRIsVALUE,
25618 rb_id2str(name));
25619 return;
25620 }
25621 if (!shadowing_lvar_0(p, name)) return;
25622 dyna_var(p, name);
25623 ID *vidp = 0;
25624 if (dvar_defined_ref(p, name, &vidp)) {
25625 if (vidp) *vidp |= LVAR_USED;
25626 }
25627}
25628
25629static void
25630aryset_check(struct parser_params *p, NODE *args)
25631{
25632 NODE *block = 0, *kwds = 0;
25633 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25634 block = RNODE_BLOCK_PASS(args)->nd_body;
25635 args = RNODE_BLOCK_PASS(args)->nd_head;
25636 }
25637 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25638 args = RNODE_ARGSCAT(args)->nd_body;
25639 }
25640 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25641 kwds = RNODE_ARGSPUSH(args)->nd_body;
25642 }
25643 else {
25644 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25645 next = RNODE_LIST(next)->nd_next) {
25646 kwds = RNODE_LIST(next)->nd_head;
25647 }
25648 }
25649 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25650 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25651 }
25652 if (block) {
25653 yyerror1(&block->nd_loc, "block arg given in index assignment");
25654 }
25655}
25656
25657static NODE *
25658aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25659{
25660 aryset_check(p, idx);
25661 return NEW_ATTRASGN(recv, tASET, idx, loc);
25662}
25663
25664static void
25665block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25666{
25667 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25668 compile_error(p, "both block arg and actual block given");
25669 }
25670}
25671
25672static NODE *
25673attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25674{
25675 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25676 return NEW_ATTRASGN(recv, id, 0, loc);
25677}
25678
25679static VALUE
25680rb_backref_error(struct parser_params *p, NODE *node)
25681{
25682#ifndef RIPPER
25683# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25684#else
25685# define ERR(...) rb_sprintf(__VA_ARGS__)
25686#endif
25687 switch (nd_type(node)) {
25688 case NODE_NTH_REF:
25689 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25690 case NODE_BACK_REF:
25691 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25692 }
25693#undef ERR
25694 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25695}
25696
25697static NODE *
25698arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25699{
25700 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25701 switch (nd_type(node1)) {
25702 case NODE_LIST:
25703 return list_append(p, node1, node2);
25704 case NODE_BLOCK_PASS:
25705 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25706 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25707 return node1;
25708 case NODE_ARGSPUSH:
25709 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25710 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25711 nd_set_type(node1, NODE_ARGSCAT);
25712 return node1;
25713 case NODE_ARGSCAT:
25714 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25715 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25716 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25717 return node1;
25718 }
25719 return NEW_ARGSPUSH(node1, node2, loc);
25720}
25721
25722static NODE *
25723arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25724{
25725 if (!node2) return node1;
25726 switch (nd_type(node1)) {
25727 case NODE_BLOCK_PASS:
25728 if (RNODE_BLOCK_PASS(node1)->nd_head)
25729 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25730 else
25731 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25732 return node1;
25733 case NODE_ARGSPUSH:
25734 if (!nd_type_p(node2, NODE_LIST)) break;
25735 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25736 nd_set_type(node1, NODE_ARGSCAT);
25737 return node1;
25738 case NODE_ARGSCAT:
25739 if (!nd_type_p(node2, NODE_LIST) ||
25740 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25741 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25742 return node1;
25743 }
25744 return NEW_ARGSCAT(node1, node2, loc);
25745}
25746
25747static NODE *
25748last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25749{
25750 NODE *n1;
25751 if ((n1 = splat_array(args)) != 0) {
25752 return list_append(p, n1, last_arg);
25753 }
25754 return arg_append(p, args, last_arg, loc);
25755}
25756
25757static NODE *
25758rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25759{
25760 NODE *n1;
25761 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25762 return list_concat(n1, rest_arg);
25763 }
25764 return arg_concat(p, args, rest_arg, loc);
25765}
25766
25767static NODE *
25768splat_array(NODE* node)
25769{
25770 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25771 if (nd_type_p(node, NODE_LIST)) return node;
25772 return 0;
25773}
25774
25775static void
25776mark_lvar_used(struct parser_params *p, NODE *rhs)
25777{
25778 ID *vidp = NULL;
25779 if (!rhs) return;
25780 switch (nd_type(rhs)) {
25781 case NODE_LASGN:
25782 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25783 if (vidp) *vidp |= LVAR_USED;
25784 }
25785 break;
25786 case NODE_DASGN:
25787 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25788 if (vidp) *vidp |= LVAR_USED;
25789 }
25790 break;
25791#if 0
25792 case NODE_MASGN:
25793 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25794 mark_lvar_used(p, rhs->nd_head);
25795 }
25796 break;
25797#endif
25798 }
25799}
25800
25801static int is_static_content(NODE *node);
25802
25803static NODE *
25804node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25805{
25806 if (!lhs) return 0;
25807
25808 switch (nd_type(lhs)) {
25809 case NODE_CDECL:
25810 case NODE_GASGN:
25811 case NODE_IASGN:
25812 case NODE_LASGN:
25813 case NODE_DASGN:
25814 case NODE_MASGN:
25815 case NODE_CVASGN:
25816 set_nd_value(p, lhs, rhs);
25817 nd_set_loc(lhs, loc);
25818 break;
25819
25820 case NODE_ATTRASGN:
25821 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25822 nd_set_loc(lhs, loc);
25823 break;
25824
25825 default:
25826 /* should not happen */
25827 break;
25828 }
25829
25830 return lhs;
25831}
25832
25833static NODE *
25834value_expr_check(struct parser_params *p, NODE *node)
25835{
25836 NODE *void_node = 0, *vn;
25837
25838 if (!node) {
25839 rb_warning0("empty expression");
25840 }
25841 while (node) {
25842 switch (nd_type(node)) {
25843 case NODE_ENSURE:
25844 vn = RNODE_ENSURE(node)->nd_head;
25845 node = RNODE_ENSURE(node)->nd_ensr;
25846 /* nd_ensr should not be NULL, check it out next */
25847 if (vn && (vn = value_expr_check(p, vn))) {
25848 goto found;
25849 }
25850 break;
25851
25852 case NODE_RESCUE:
25853 /* void only if all children are void */
25854 vn = RNODE_RESCUE(node)->nd_head;
25855 if (!vn || !(vn = value_expr_check(p, vn))) {
25856 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25857 }
25858 if (!void_node) void_node = vn;
25859 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25860 if (!nd_type_p(r, NODE_RESBODY)) {
25861 compile_error(p, "unexpected node");
25862 return NULL;
25863 }
25864 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25865 return NULL;
25866 }
25867 if (!void_node) void_node = vn;
25868 }
25869 node = RNODE_RESCUE(node)->nd_else;
25870 if (!node) return void_node;
25871 break;
25872
25873 case NODE_RETURN:
25874 case NODE_BREAK:
25875 case NODE_NEXT:
25876 case NODE_REDO:
25877 case NODE_RETRY:
25878 goto found;
25879
25880 case NODE_CASE:
25881 case NODE_CASE2:
25882 for (node = RNODE_CASE(node)->nd_body;
25883 node && nd_type_p(node, NODE_WHEN);
25884 node = RNODE_WHEN(node)->nd_next) {
25885 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25886 return NULL;
25887 }
25888 if (!void_node) void_node = vn;
25889 }
25890 break;
25891
25892 case NODE_CASE3:
25893 {
25894 NODE *in = RNODE_CASE3(node)->nd_body;
25895 if (!in || !nd_type_p(in, NODE_IN)) {
25896 compile_error(p, "unexpected node");
25897 return NULL;
25898 }
25899 if (!RNODE_IN(in)->nd_body) {
25900 /* single line pattern matching with "=>" operator */
25901 goto found;
25902 }
25903 do {
25904 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25905 if (!vn) return NULL;
25906 if (!void_node) void_node = vn;
25907 in = RNODE_IN(in)->nd_next;
25908 } while (in && nd_type_p(in, NODE_IN));
25909 node = in; /* else */
25910 }
25911 break;
25912
25913 case NODE_BLOCK:
25914 while (RNODE_BLOCK(node)->nd_next) {
25915 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25916 if (vn) return vn;
25917 node = RNODE_BLOCK(node)->nd_next;
25918 }
25919 node = RNODE_BLOCK(node)->nd_head;
25920 break;
25921
25922 case NODE_BEGIN:
25923 node = RNODE_BEGIN(node)->nd_body;
25924 break;
25925
25926 case NODE_IF:
25927 case NODE_UNLESS:
25928 if (!RNODE_IF(node)->nd_body) {
25929 return NULL;
25930 }
25931 else if (!RNODE_IF(node)->nd_else) {
25932 return NULL;
25933 }
25934 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25935 if (!vn) return NULL;
25936 if (!void_node) void_node = vn;
25937 node = RNODE_IF(node)->nd_else;
25938 break;
25939
25940 case NODE_AND:
25941 case NODE_OR:
25942 /* The left operand was already checked for a value when logop()
25943 * built this node, so stop here instead of re-reporting the same
25944 * void value once per operator in a chain. */
25945 return NULL;
25946
25947 case NODE_LASGN:
25948 case NODE_DASGN:
25949 case NODE_MASGN:
25950 mark_lvar_used(p, node);
25951 return NULL;
25952
25953 default:
25954 return NULL;
25955 }
25956 }
25957
25958 return NULL;
25959
25960 found:
25961 /* return the first found node */
25962 return void_node ? void_node : node;
25963}
25964
25965static int
25966value_expr(struct parser_params *p, NODE *node)
25967{
25968 NODE *void_node = value_expr_check(p, node);
25969 if (void_node) {
25970 yyerror1(&void_node->nd_loc, "void value expression");
25971 /* or "control never reach"? */
25972 return FALSE;
25973 }
25974 return TRUE;
25975}
25976
25977static void
25978void_expr(struct parser_params *p, NODE *node)
25979{
25980 const char *useless = 0;
25981
25982 if (!RTEST(ruby_verbose)) return;
25983
25984 if (!node || !(node = nd_once_body(node))) return;
25985 switch (nd_type(node)) {
25986 case NODE_OPCALL:
25987 switch (RNODE_OPCALL(node)->nd_mid) {
25988 case '+':
25989 case '-':
25990 case '*':
25991 case '/':
25992 case '%':
25993 case tPOW:
25994 case tUPLUS:
25995 case tUMINUS:
25996 case '|':
25997 case '^':
25998 case '&':
25999 case tCMP:
26000 case '>':
26001 case tGEQ:
26002 case '<':
26003 case tLEQ:
26004 case tEQ:
26005 case tNEQ:
26006 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
26007 break;
26008 }
26009 break;
26010
26011 case NODE_LVAR:
26012 case NODE_DVAR:
26013 case NODE_GVAR:
26014 case NODE_IVAR:
26015 case NODE_CVAR:
26016 case NODE_NTH_REF:
26017 case NODE_BACK_REF:
26018 useless = "a variable";
26019 break;
26020 case NODE_CONST:
26021 useless = "a constant";
26022 break;
26023 case NODE_SYM:
26024 case NODE_LINE:
26025 case NODE_FILE:
26026 case NODE_ENCODING:
26027 case NODE_INTEGER:
26028 case NODE_FLOAT:
26029 case NODE_RATIONAL:
26030 case NODE_IMAGINARY:
26031 case NODE_STR:
26032 case NODE_DSTR:
26033 case NODE_REGX:
26034 case NODE_DREGX:
26035 useless = "a literal";
26036 break;
26037 case NODE_COLON2:
26038 case NODE_COLON3:
26039 useless = "::";
26040 break;
26041 case NODE_DOT2:
26042 useless = "..";
26043 break;
26044 case NODE_DOT3:
26045 useless = "...";
26046 break;
26047 case NODE_SELF:
26048 useless = "self";
26049 break;
26050 case NODE_NIL:
26051 useless = "nil";
26052 break;
26053 case NODE_TRUE:
26054 useless = "true";
26055 break;
26056 case NODE_FALSE:
26057 useless = "false";
26058 break;
26059 case NODE_DEFINED:
26060 useless = "defined?";
26061 break;
26062 }
26063
26064 if (useless) {
26065 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
26066 }
26067}
26068
26069/* warns useless use of block and returns the last statement node */
26070static NODE *
26071void_stmts(struct parser_params *p, NODE *node)
26072{
26073 NODE *const n = node;
26074 if (!RTEST(ruby_verbose)) return n;
26075 if (!node) return n;
26076 if (!nd_type_p(node, NODE_BLOCK)) return n;
26077
26078 while (RNODE_BLOCK(node)->nd_next) {
26079 void_expr(p, RNODE_BLOCK(node)->nd_head);
26080 node = RNODE_BLOCK(node)->nd_next;
26081 }
26082 return RNODE_BLOCK(node)->nd_head;
26083}
26084
26085static NODE *
26086remove_begin(NODE *node)
26087{
26088 NODE **n = &node, *n1 = node;
26089 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
26090 *n = n1 = RNODE_BEGIN(n1)->nd_body;
26091 }
26092 return node;
26093}
26094
26095static void
26096reduce_nodes(struct parser_params *p, NODE **body)
26097{
26098 NODE *node = *body;
26099
26100 if (!node) {
26101 *body = NEW_NIL(&NULL_LOC);
26102 return;
26103 }
26104#define subnodes(type, n1, n2) \
26105 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
26106 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
26107 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
26108
26109 while (node) {
26110 int newline = (int)nd_fl_newline(node);
26111 switch (nd_type(node)) {
26112 case NODE_NIL:
26113 // Keep an explicit nil in a method's tail (value) position when it
26114 // is on its own line, so it still emits a :line event and records
26115 // line coverage for that line. [Bug #22302]
26116 if (newline) return;
26117 end:
26118 *body = 0;
26119 return;
26120 case NODE_BEGIN:
26121 *body = node = RNODE_BEGIN(node)->nd_body;
26122 if (newline && node) nd_set_fl_newline(node);
26123 continue;
26124 case NODE_BLOCK:
26125 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
26126 break;
26127 case NODE_IF:
26128 case NODE_UNLESS:
26129 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
26130 return;
26131 case NODE_CASE:
26132 body = &RNODE_CASE(node)->nd_body;
26133 break;
26134 case NODE_WHEN:
26135 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
26136 break;
26137 case NODE_ENSURE:
26138 body = &RNODE_ENSURE(node)->nd_head;
26139 break;
26140 case NODE_RESCUE:
26141 newline = 0; // RESBODY should not be a NEWLINE
26142 if (RNODE_RESCUE(node)->nd_else) {
26143 body = &RNODE_RESCUE(node)->nd_resq;
26144 break;
26145 }
26146 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
26147 break;
26148 default:
26149 return;
26150 }
26151 node = *body;
26152 if (newline && node) nd_set_fl_newline(node);
26153 }
26154
26155#undef subnodes
26156}
26157
26158static int
26159is_static_content(NODE *node)
26160{
26161 if (!node) return 1;
26162 switch (nd_type(node)) {
26163 case NODE_HASH:
26164 if (!(node = RNODE_HASH(node)->nd_head)) break;
26165 case NODE_LIST:
26166 do {
26167 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
26168 } while ((node = RNODE_LIST(node)->nd_next) != 0);
26169 case NODE_SYM:
26170 case NODE_REGX:
26171 case NODE_LINE:
26172 case NODE_FILE:
26173 case NODE_ENCODING:
26174 case NODE_INTEGER:
26175 case NODE_FLOAT:
26176 case NODE_RATIONAL:
26177 case NODE_IMAGINARY:
26178 case NODE_STR:
26179 case NODE_NIL:
26180 case NODE_TRUE:
26181 case NODE_FALSE:
26182 case NODE_ZLIST:
26183 break;
26184 default:
26185 return 0;
26186 }
26187 return 1;
26188}
26189
26190static int
26191assign_in_cond(struct parser_params *p, NODE *node)
26192{
26193 switch (nd_type(node)) {
26194 case NODE_MASGN:
26195 case NODE_LASGN:
26196 case NODE_DASGN:
26197 case NODE_GASGN:
26198 case NODE_IASGN:
26199 case NODE_CVASGN:
26200 case NODE_CDECL:
26201 break;
26202
26203 default:
26204 return 0;
26205 }
26206
26207 if (!get_nd_value(p, node)) return 1;
26208 if (is_static_content(get_nd_value(p, node))) {
26209 /* reports always */
26210 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
26211 }
26212 return 1;
26213}
26214
26215enum cond_type {
26216 COND_IN_OP,
26217 COND_IN_COND,
26218 COND_IN_FF
26219};
26220
26221#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
26222 switch (t) { \
26223 case COND_IN_OP: break; \
26224 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
26225 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
26226 } \
26227} while (0)
26228
26229static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
26230
26231static NODE*
26232range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26233{
26234 enum node_type type;
26235
26236 if (node == 0) return 0;
26237
26238 type = nd_type(node);
26239 value_expr(p, node);
26240 if (type == NODE_INTEGER) {
26241 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
26242 ID lineno = rb_intern("$.");
26243 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
26244 }
26245 return cond0(p, node, COND_IN_FF, loc, true);
26246}
26247
26248static NODE*
26249cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
26250{
26251 if (node == 0) return 0;
26252 if (!(node = nd_once_body(node))) return 0;
26253 assign_in_cond(p, node);
26254
26255 switch (nd_type(node)) {
26256 case NODE_BEGIN:
26257 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
26258 break;
26259
26260 case NODE_DSTR:
26261 case NODE_EVSTR:
26262 case NODE_STR:
26263 case NODE_FILE:
26264 SWITCH_BY_COND_TYPE(type, warn, "string ");
26265 break;
26266
26267 case NODE_REGX:
26268 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
26269 nd_set_type(node, NODE_MATCH);
26270 break;
26271
26272 case NODE_DREGX:
26273 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
26274
26275 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
26276
26277 case NODE_BLOCK:
26278 {
26279 NODE *end = RNODE_BLOCK(node)->nd_end;
26280 NODE **expr = &RNODE_BLOCK(end)->nd_head;
26281 if (top) top = node == end;
26282 *expr = cond0(p, *expr, type, loc, top);
26283 }
26284 break;
26285
26286 case NODE_AND:
26287 case NODE_OR:
26288 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
26289 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
26290 break;
26291
26292 case NODE_DOT2:
26293 case NODE_DOT3:
26294 if (!top) break;
26295 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
26296 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
26297 switch (nd_type(node)) {
26298 case NODE_DOT2:
26299 nd_set_type(node,NODE_FLIP2);
26300 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
26301 (void)flip2;
26302 break;
26303 case NODE_DOT3:
26304 nd_set_type(node, NODE_FLIP3);
26305 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
26306 (void)flip3;
26307 break;
26308 }
26309 break;
26310
26311 case NODE_SYM:
26312 case NODE_DSYM:
26313 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
26314 break;
26315
26316 case NODE_LINE:
26317 case NODE_ENCODING:
26318 case NODE_INTEGER:
26319 case NODE_FLOAT:
26320 case NODE_RATIONAL:
26321 case NODE_IMAGINARY:
26322 SWITCH_BY_COND_TYPE(type, warning, "");
26323 break;
26324
26325 default:
26326 break;
26327 }
26328 return node;
26329}
26330
26331static NODE*
26332cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26333{
26334 if (node == 0) return 0;
26335 return cond0(p, node, COND_IN_COND, loc, true);
26336}
26337
26338static NODE*
26339method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26340{
26341 if (node == 0) return 0;
26342 return cond0(p, node, COND_IN_OP, loc, true);
26343}
26344
26345static NODE*
26346new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
26347{
26348 YYLTYPE loc = {*pos, *pos};
26349 return NEW_NIL(&loc);
26350}
26351
26352static NODE*
26353new_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)
26354{
26355 if (!cc) return right;
26356 cc = cond0(p, cc, COND_IN_COND, loc, true);
26357 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
26358}
26359
26360static NODE*
26361new_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)
26362{
26363 if (!cc) return right;
26364 cc = cond0(p, cc, COND_IN_COND, loc, true);
26365 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
26366}
26367
26368#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))
26369
26370/* A cached logop tail is usable only if it is still a node of the chain's type
26371 * whose nd_2nd is the insertion point, i.e. not itself another node of that
26372 * type. This rejects a stale cache left over from an earlier parse. */
26373static int
26374logop_valid_tail(NODE *tail, enum node_type type)
26375{
26376 NODE *second;
26377 return tail && nd_type_p(tail, type) &&
26378 ((second = RNODE_AND(tail)->nd_2nd) == 0 || !nd_type_p(second, type));
26379}
26380
26381static NODE*
26382logop(struct parser_params *p, ID id, NODE *left, NODE *right,
26383 const YYLTYPE *op_loc, const YYLTYPE *loc)
26384{
26385 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
26386 NODE *op;
26387 /* Snapshot the cache from the previous logop() call before overwriting it. */
26388 NODE *prev_head = p->logop.head;
26389 NODE *prev_tail = p->logop.tail;
26390 NODE *node, *second;
26391 value_expr(p, left);
26392 if (left && nd_type_p(left, type)) {
26393 /* The insertion point is the far end of left's right branch.
26394 * Reusing the cached tail keeps a chain such as `a && a && ... && a`
26395 * linear instead of rescanning the whole branch on every operator. The
26396 * cache is validated (its nd_2nd is not another node of the same type)
26397 * so a stale entry falls back to the scan. */
26398 if (left == prev_head && logop_valid_tail(prev_tail, type)) {
26399 node = prev_tail;
26400 }
26401 else {
26402 node = left;
26403 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26404 node = second;
26405 }
26406 }
26407 second = RNODE_AND(node)->nd_2nd;
26408 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
26409 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
26410 left->nd_loc.end_pos = loc->end_pos;
26411 p->logop.head = left;
26412 p->logop.tail = RNODE_AND(node)->nd_2nd;
26413 return left;
26414 }
26415 op = NEW_AND_OR(type, left, right, loc, op_loc);
26416 nd_set_line(op, op_loc->beg_pos.lineno);
26417 /* Record where the next operator will extend op, mirroring the scan the
26418 * chained branch above would perform: if right is itself a chain of the
26419 * same type (from parentheses), its far end; otherwise op itself. */
26420 p->logop.head = op;
26421 if (right == prev_head && logop_valid_tail(prev_tail, type)) {
26422 p->logop.tail = prev_tail;
26423 }
26424 else if (right && nd_type_p(right, type)) {
26425 node = right;
26426 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26427 node = second;
26428 }
26429 p->logop.tail = node;
26430 }
26431 else {
26432 p->logop.tail = op;
26433 }
26434 return op;
26435}
26436
26437#undef NEW_AND_OR
26438
26439static void
26440no_blockarg(struct parser_params *p, NODE *node)
26441{
26442 if (nd_type_p(node, NODE_BLOCK_PASS)) {
26443 compile_error(p, "block argument should not be given");
26444 }
26445}
26446
26447static NODE *
26448ret_args(struct parser_params *p, NODE *node)
26449{
26450 if (node) {
26451 no_blockarg(p, node);
26452 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
26453 node = RNODE_LIST(node)->nd_head;
26454 }
26455 }
26456 return node;
26457}
26458
26459static NODE*
26460negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
26461{
26462 switch (nd_type(node)) {
26463 case NODE_INTEGER:
26464 RNODE_INTEGER(node)->minus = TRUE;
26465 break;
26466 case NODE_FLOAT:
26467 RNODE_FLOAT(node)->minus = TRUE;
26468 break;
26469 case NODE_RATIONAL:
26470 RNODE_RATIONAL(node)->minus = TRUE;
26471 break;
26472 case NODE_IMAGINARY:
26473 RNODE_IMAGINARY(node)->minus = TRUE;
26474 break;
26475 }
26476 node->nd_loc = *loc;
26477 return node;
26478}
26479
26480static NODE *
26481arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
26482{
26483 if (node2) {
26484 if (!node1) return (NODE *)node2;
26485 node2->nd_head = node1;
26486 nd_set_first_lineno(node2, nd_first_lineno(node1));
26487 nd_set_first_column(node2, nd_first_column(node1));
26488 return (NODE *)node2;
26489 }
26490 return node1;
26491}
26492
26493static bool
26494args_info_empty_p(struct rb_args_info *args)
26495{
26496 if (args->pre_args_num) return false;
26497 if (args->post_args_num) return false;
26498 if (args->rest_arg) return false;
26499 if (args->opt_args) return false;
26500 if (args->block_arg) return false;
26501 if (args->kw_args) return false;
26502 if (args->kw_rest_arg) return false;
26503 return true;
26504}
26505
26506static rb_node_args_t *
26507new_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)
26508{
26509 struct rb_args_info *args = &tail->nd_ainfo;
26510
26511 if (args->forwarding) {
26512 if (rest_arg) {
26513 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
26514 return tail;
26515 }
26516 rest_arg = idFWD_REST;
26517 }
26518
26519 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
26520 args->pre_init = pre_args ? pre_args->nd_next : 0;
26521
26522 args->post_args_num = post_args ? post_args->nd_plen : 0;
26523 args->post_init = post_args ? post_args->nd_next : 0;
26524 args->first_post_arg = post_args ? post_args->nd_pid : 0;
26525
26526 args->rest_arg = rest_arg;
26527
26528 args->opt_args = opt_args;
26529
26530 nd_set_loc(RNODE(tail), loc);
26531
26532 return tail;
26533}
26534
26535static rb_node_args_t *
26536new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
26537{
26538 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
26539 struct rb_args_info *args = &node->nd_ainfo;
26540 if (p->error_p) return node;
26541
26542 if (block == idNil) {
26543 block = 0;
26544 args->no_blockarg = TRUE;
26545 }
26546 args->block_arg = block;
26547 args->kw_args = kw_args;
26548
26549 if (kw_args) {
26550 /*
26551 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
26552 * variable order: k1, kr1, k2, &b, internal_id, krest
26553 * #=> <reorder>
26554 * variable order: kr1, k1, k2, internal_id, krest, &b
26555 */
26556 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
26557 struct vtable *vtargs = p->lvtbl->args;
26558 rb_node_kw_arg_t *kwn = kw_args;
26559
26560 if (block) block = vtargs->tbl[vtargs->pos-1];
26561 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26562 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26563 while (kwn) {
26564 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26565 --kw_vars;
26566 --required_kw_vars;
26567 kwn = kwn->nd_next;
26568 }
26569
26570 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26571 ID vid = get_nd_vid(p, kwn->nd_body);
26572 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26573 *required_kw_vars++ = vid;
26574 }
26575 else {
26576 *kw_vars++ = vid;
26577 }
26578 }
26579
26580 arg_var(p, kw_bits);
26581 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26582 if (block) arg_var(p, block);
26583
26584 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26585 }
26586 else if (kw_rest_arg == idNil) {
26587 args->no_kwarg = 1;
26588 }
26589 else if (kw_rest_arg) {
26590 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26591 }
26592
26593 return node;
26594}
26595
26596static rb_node_args_t *
26597args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26598{
26599 if (max_numparam > NO_PARAM || it_id) {
26600 if (!args) {
26601 YYLTYPE loc = RUBY_INIT_YYLLOC();
26602 args = new_empty_args_tail(p, 0);
26603 nd_set_loc(RNODE(args), &loc);
26604 }
26605 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26606 }
26607 return args;
26608}
26609
26610static NODE*
26611new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26612{
26613 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26614
26615 if (pre_arg) {
26616 NODE *pre_args = NEW_LIST(pre_arg, loc);
26617 if (RNODE_ARYPTN(aryptn)->pre_args) {
26618 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26619 }
26620 else {
26621 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26622 }
26623 }
26624 return aryptn;
26625}
26626
26627static NODE*
26628new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26629{
26630 if (has_rest) {
26631 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26632 }
26633 else {
26634 rest_arg = NULL;
26635 }
26636 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26637
26638 return node;
26639}
26640
26641static NODE*
26642new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26643{
26644 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26645
26646 return fndptn;
26647}
26648
26649static NODE*
26650new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26651{
26652 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26653 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26654 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26655
26656 return node;
26657}
26658
26659static NODE*
26660new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26661{
26662 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26663 return hshptn;
26664}
26665
26666static NODE*
26667new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26668{
26669 NODE *node, *kw_rest_arg_node;
26670
26671 if (kw_rest_arg == idNil) {
26672 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26673 }
26674 else if (kw_rest_arg) {
26675 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26676 }
26677 else {
26678 kw_rest_arg_node = NULL;
26679 }
26680
26681 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26682
26683 return node;
26684}
26685
26686static NODE*
26687dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26688{
26689 if (!node) {
26690 return NEW_SYM(STR_NEW0(), loc);
26691 }
26692
26693 switch (nd_type(node)) {
26694 case NODE_DSTR:
26695 nd_set_type(node, NODE_DSYM);
26696 nd_set_loc(node, loc);
26697 break;
26698 case NODE_STR:
26699 node = str_to_sym_node(p, node, loc);
26700 break;
26701 default:
26702 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26703 break;
26704 }
26705 return node;
26706}
26707
26708static int
26709nd_type_st_key_enable_p(NODE *node)
26710{
26711 switch (nd_type(node)) {
26712 case NODE_INTEGER:
26713 case NODE_FLOAT:
26714 case NODE_RATIONAL:
26715 case NODE_IMAGINARY:
26716 case NODE_STR:
26717 case NODE_SYM:
26718 case NODE_REGX:
26719 case NODE_LINE:
26720 case NODE_FILE:
26721 case NODE_ENCODING:
26722 return true;
26723 default:
26724 return false;
26725 }
26726}
26727
26728static VALUE
26729nd_value(struct parser_params *p, NODE *node)
26730{
26731 switch (nd_type(node)) {
26732 case NODE_STR:
26733 return rb_node_str_string_val(node);
26734 case NODE_INTEGER:
26735 return rb_node_integer_literal_val(node);
26736 case NODE_FLOAT:
26737 return rb_node_float_literal_val(node);
26738 case NODE_RATIONAL:
26739 return rb_node_rational_literal_val(node);
26740 case NODE_IMAGINARY:
26741 return rb_node_imaginary_literal_val(node);
26742 case NODE_SYM:
26743 return rb_node_sym_string_val(node);
26744 case NODE_REGX:
26745 return rb_node_regx_string_val(node);
26746 case NODE_LINE:
26747 return rb_node_line_lineno_val(node);
26748 case NODE_ENCODING:
26749 return rb_node_encoding_val(node);
26750 case NODE_FILE:
26751 return rb_node_file_path_val(node);
26752 default:
26753 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26755 }
26756}
26757
26758static void
26759warn_duplicate_keys(struct parser_params *p, NODE *hash)
26760{
26761 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26762 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26763 while (hash && RNODE_LIST(hash)->nd_next) {
26764 NODE *head = RNODE_LIST(hash)->nd_head;
26765 NODE *value = RNODE_LIST(hash)->nd_next;
26766 NODE *next = RNODE_LIST(value)->nd_next;
26767 st_data_t key;
26768 st_data_t data;
26769
26770 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26771 if (!head) {
26772 head = value;
26773 }
26774
26775 if (nd_type_st_key_enable_p(head)) {
26776 key = (st_data_t)head;
26777
26778 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26779 rb_warn2L(nd_line((NODE *)data),
26780 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26781 nd_value(p, head), WARN_I(nd_line(head)));
26782 }
26783 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26784 }
26785 hash = next;
26786 }
26787 st_free_table(p->warn_duplicate_keys_table);
26788 p->warn_duplicate_keys_table = NULL;
26789}
26790
26791static NODE *
26792new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26793{
26794 if (hash) warn_duplicate_keys(p, hash);
26795 return NEW_HASH(hash, loc);
26796}
26797
26798static void
26799error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26800{
26801 if (is_private_local_id(p, id)) {
26802 return;
26803 }
26804 if (st_is_member(p->pvtbl, id)) {
26805 yyerror1(loc, "duplicated variable name");
26806 }
26807 else if (p->ctxt.in_alt_pattern && id) {
26808 yyerror1(loc, "variable capture in alternative pattern");
26809 }
26810 else {
26811 p->ctxt.capture_in_pattern = 1;
26812 st_insert(p->pvtbl, (st_data_t)id, 0);
26813 }
26814}
26815
26816static void
26817error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26818{
26819 if (!p->pktbl) {
26820 p->pktbl = st_init_numtable();
26821 }
26822 else if (st_is_member(p->pktbl, key)) {
26823 yyerror1(loc, "duplicated key name");
26824 return;
26825 }
26826 st_insert(p->pktbl, (st_data_t)key, 0);
26827}
26828
26829static NODE *
26830new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26831{
26832 return NEW_HASH(hash, loc);
26833}
26834
26835static NODE *
26836new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26837{
26838 NODE *asgn;
26839
26840 if (lhs) {
26841 ID vid = get_nd_vid(p, lhs);
26842 YYLTYPE lhs_loc = lhs->nd_loc;
26843 /* A constant read can raise NameError. Prism has no separate read node
26844 * for `Const op= value` and reports the whole expression, so give the
26845 * NODE_CONST the location of the whole operator assignment as well,
26846 * for consistent Thread::Backtrace::Location#source_range between both
26847 * parsers. */
26848 const YYLTYPE *read_loc = nd_type_p(lhs, NODE_CDECL) ? loc : &lhs_loc;
26849 if (op == tOROP) {
26850 set_nd_value(p, lhs, rhs);
26851 nd_set_loc(lhs, loc);
26852 asgn = NEW_OP_ASGN_OR(gettable(p, vid, read_loc), lhs, loc);
26853 }
26854 else if (op == tANDOP) {
26855 set_nd_value(p, lhs, rhs);
26856 nd_set_loc(lhs, loc);
26857 asgn = NEW_OP_ASGN_AND(gettable(p, vid, read_loc), lhs, loc);
26858 }
26859 else {
26860 asgn = lhs;
26861 rhs = NEW_CALL(gettable(p, vid, read_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26862 set_nd_value(p, asgn, rhs);
26863 nd_set_loc(asgn, loc);
26864 }
26865 }
26866 else {
26867 asgn = NEW_ERROR(loc);
26868 }
26869 return asgn;
26870}
26871
26872static NODE *
26873new_ary_op_assign(struct parser_params *p, NODE *ary,
26874 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26875 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26876{
26877 NODE *asgn;
26878
26879 aryset_check(p, args);
26880 args = make_list(args, args_loc);
26881 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26882 fixpos(asgn, ary);
26883 return asgn;
26884}
26885
26886static NODE *
26887new_attr_op_assign(struct parser_params *p, NODE *lhs,
26888 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26889 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26890{
26891 NODE *asgn;
26892
26893 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26894 fixpos(asgn, lhs);
26895 return asgn;
26896}
26897
26898static NODE *
26899new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26900{
26901 NODE *asgn;
26902
26903 if (lhs) {
26904 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26905 }
26906 else {
26907 asgn = NEW_ERROR(loc);
26908 }
26909 fixpos(asgn, lhs);
26910 return asgn;
26911}
26912
26913static NODE *
26914const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26915{
26916 if (p->ctxt.in_def) {
26917#ifndef RIPPER
26918 yyerror1(loc, "dynamic constant assignment");
26919#else
26920 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26921#endif
26922 }
26923 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26924}
26925
26926#ifdef RIPPER
26927static VALUE
26928assign_error(struct parser_params *p, const char *mesg, VALUE a)
26929{
26930 a = dispatch2(assign_error, ERR_MESG(), a);
26931 ripper_error(p);
26932 return a;
26933}
26934#endif
26935
26936static NODE *
26937new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26938{
26939 NODE *result = head;
26940 if (rescue) {
26941 NODE *tmp = rescue_else ? rescue_else : rescue;
26942 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26943
26944 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26945 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26946 }
26947 if (ensure) {
26948 result = NEW_ENSURE(result, ensure, loc);
26949 }
26950 fixpos(result, head);
26951 return result;
26952}
26953
26954static void
26955warn_unused_var(struct parser_params *p, struct local_vars *local)
26956{
26957 int cnt;
26958
26959 if (!local->used) return;
26960 cnt = local->used->pos;
26961 if (cnt != local->vars->pos) {
26962 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26963 }
26964#ifndef RIPPER
26965 ID *v = local->vars->tbl;
26966 ID *u = local->used->tbl;
26967 for (int i = 0; i < cnt; ++i) {
26968 if (!v[i] || (u[i] & LVAR_USED)) continue;
26969 if (is_private_local_id(p, v[i])) continue;
26970 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26971 }
26972#endif
26973}
26974
26975static void
26976local_push(struct parser_params *p, int toplevel_scope)
26977{
26978 struct local_vars *local;
26979 int inherits_dvars = toplevel_scope && compile_for_eval;
26980 int warn_unused_vars = RTEST(ruby_verbose);
26981
26982 local = ALLOC(struct local_vars);
26983 local->prev = p->lvtbl;
26984 local->args = vtable_alloc(0);
26985 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26986#ifndef RIPPER
26987 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26988 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26989#endif
26990 local->numparam.outer = 0;
26991 local->numparam.inner = 0;
26992 local->numparam.current = 0;
26993 local->it = 0;
26994 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26995
26996# if WARN_PAST_SCOPE
26997 local->past = 0;
26998# endif
26999 CMDARG_PUSH(0);
27000 COND_PUSH(0);
27001 p->lvtbl = local;
27002}
27003
27004static void
27005vtable_chain_free(struct parser_params *p, struct vtable *table)
27006{
27007 while (!DVARS_TERMINAL_P(table)) {
27008 struct vtable *cur_table = table;
27009 table = cur_table->prev;
27010 vtable_free(cur_table);
27011 }
27012}
27013
27014static void
27015local_free(struct parser_params *p, struct local_vars *local)
27016{
27017 vtable_chain_free(p, local->used);
27018
27019# if WARN_PAST_SCOPE
27020 vtable_chain_free(p, local->past);
27021# endif
27022
27023 vtable_chain_free(p, local->args);
27024 vtable_chain_free(p, local->vars);
27025
27026 ruby_xfree_sized(local, sizeof(struct local_vars));
27027}
27028
27029static void
27030local_pop(struct parser_params *p)
27031{
27032 struct local_vars *local = p->lvtbl->prev;
27033 if (p->lvtbl->used) {
27034 warn_unused_var(p, p->lvtbl);
27035 }
27036
27037 local_free(p, p->lvtbl);
27038 p->lvtbl = local;
27039
27040 CMDARG_POP();
27041 COND_POP();
27042}
27043
27044static rb_ast_id_table_t *
27045local_tbl(struct parser_params *p)
27046{
27047 int cnt_args = vtable_size(p->lvtbl->args);
27048 int cnt_vars = vtable_size(p->lvtbl->vars);
27049 int cnt = cnt_args + cnt_vars;
27050 int i, j;
27051 rb_ast_id_table_t *tbl;
27052
27053 if (cnt <= 0) return 0;
27054 tbl = rb_ast_new_local_table(p->ast, cnt);
27055 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
27056 /* remove IDs duplicated to warn shadowing */
27057 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
27058 ID id = p->lvtbl->vars->tbl[i];
27059 if (!vtable_included(p->lvtbl->args, id)) {
27060 tbl->ids[j++] = id;
27061 }
27062 }
27063 if (j < cnt) {
27064 tbl = rb_ast_resize_latest_local_table(p->ast, j);
27065 }
27066
27067 return tbl;
27068}
27069
27070static void
27071numparam_name(struct parser_params *p, ID id)
27072{
27073 if (!NUMPARAM_ID_P(id)) return;
27074 compile_error(p, "_%d is reserved for numbered parameter",
27075 NUMPARAM_ID_TO_IDX(id));
27076}
27077
27078static void
27079arg_var(struct parser_params *p, ID id)
27080{
27081 numparam_name(p, id);
27082 vtable_add(p->lvtbl->args, id);
27083}
27084
27085static void
27086local_var(struct parser_params *p, ID id)
27087{
27088 numparam_name(p, id);
27089 vtable_add(p->lvtbl->vars, id);
27090 if (p->lvtbl->used) {
27091 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
27092 }
27093}
27094
27095#ifndef RIPPER
27096int
27097rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
27098{
27099 return rb_local_defined(id, iseq);
27100}
27101#endif
27102
27103static int
27104local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
27105{
27106 struct vtable *vars, *args, *used;
27107
27108 vars = p->lvtbl->vars;
27109 args = p->lvtbl->args;
27110 used = p->lvtbl->used;
27111
27112 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
27113 vars = vars->prev;
27114 args = args->prev;
27115 if (used) used = used->prev;
27116 }
27117
27118 if (vars && vars->prev == DVARS_INHERIT) {
27119 return rb_parser_local_defined(p, id, p->parent_iseq);
27120 }
27121 else if (vtable_included(args, id)) {
27122 return 1;
27123 }
27124 else {
27125 int i = vtable_included(vars, id);
27126 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
27127 return i != 0;
27128 }
27129}
27130
27131static int
27132local_id(struct parser_params *p, ID id)
27133{
27134 return local_id_ref(p, id, NULL);
27135}
27136
27137static int
27138check_forwarding_args(struct parser_params *p)
27139{
27140 if (local_id(p, idFWD_ALL)) return TRUE;
27141 compile_error(p, "unexpected ...");
27142 return FALSE;
27143}
27144
27145static void
27146add_forwarding_args(struct parser_params *p)
27147{
27148 arg_var(p, idFWD_REST);
27149 arg_var(p, idFWD_KWREST);
27150 arg_var(p, idFWD_BLOCK);
27151 arg_var(p, idFWD_ALL);
27152}
27153
27154static void
27155forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
27156{
27157 bool conflict = false;
27158
27159 struct vtable *vars, *args;
27160
27161 vars = p->lvtbl->vars;
27162 args = p->lvtbl->args;
27163
27164 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
27165 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
27166 vars = vars->prev;
27167 args = args->prev;
27168 }
27169
27170 bool found = false;
27171 if (vars && vars->prev == DVARS_INHERIT && !found) {
27172 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
27173 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
27174 }
27175 else {
27176 found = (vtable_included(args, arg) &&
27177 !(all && vtable_included(args, all)));
27178 }
27179
27180 if (!found) {
27181 compile_error(p, "no anonymous %s parameter", var);
27182 }
27183 else if (conflict) {
27184 compile_error(p, "anonymous %s parameter is also used within block", var);
27185 }
27186}
27187
27188static NODE *
27189new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
27190{
27191 NODE *rest = NEW_LVAR(idFWD_REST, loc);
27192 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
27193 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
27194 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
27195 block->forwarding = TRUE;
27196 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
27197 return arg_blk_pass(args, block);
27198}
27199
27200static NODE *
27201numparam_push(struct parser_params *p)
27202{
27203 struct local_vars *local = p->lvtbl;
27204 NODE *inner = local->numparam.inner;
27205 if (!local->numparam.outer) {
27206 local->numparam.outer = local->numparam.current;
27207 }
27208 local->numparam.inner = 0;
27209 local->numparam.current = 0;
27210 local->it = 0;
27211 return inner;
27212}
27213
27214static void
27215numparam_pop(struct parser_params *p, NODE *prev_inner)
27216{
27217 struct local_vars *local = p->lvtbl;
27218 if (prev_inner) {
27219 /* prefer first one */
27220 local->numparam.inner = prev_inner;
27221 }
27222 else if (local->numparam.current) {
27223 /* current and inner are exclusive */
27224 local->numparam.inner = local->numparam.current;
27225 }
27226 if (p->max_numparam > NO_PARAM) {
27227 /* current and outer are exclusive */
27228 local->numparam.current = local->numparam.outer;
27229 local->numparam.outer = 0;
27230 }
27231 else {
27232 /* no numbered parameter */
27233 local->numparam.current = 0;
27234 }
27235 local->it = 0;
27236}
27237
27238static const struct vtable *
27239dyna_push(struct parser_params *p)
27240{
27241 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
27242 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
27243 if (p->lvtbl->used) {
27244 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
27245 }
27246 return p->lvtbl->args;
27247}
27248
27249static void
27250dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
27251{
27252 struct vtable *tmp = *vtblp;
27253 *vtblp = tmp->prev;
27254# if WARN_PAST_SCOPE
27255 if (p->past_scope_enabled) {
27256 tmp->prev = p->lvtbl->past;
27257 p->lvtbl->past = tmp;
27258 return;
27259 }
27260# endif
27261 vtable_free(tmp);
27262}
27263
27264static void
27265dyna_pop_1(struct parser_params *p)
27266{
27267 struct vtable *tmp;
27268
27269 if ((tmp = p->lvtbl->used) != 0) {
27270 warn_unused_var(p, p->lvtbl);
27271 p->lvtbl->used = p->lvtbl->used->prev;
27272 vtable_free(tmp);
27273 }
27274 dyna_pop_vtable(p, &p->lvtbl->args);
27275 dyna_pop_vtable(p, &p->lvtbl->vars);
27276}
27277
27278static void
27279dyna_pop(struct parser_params *p, const struct vtable *lvargs)
27280{
27281 while (p->lvtbl->args != lvargs) {
27282 dyna_pop_1(p);
27283 if (!p->lvtbl->args) {
27284 struct local_vars *local = p->lvtbl->prev;
27285 ruby_xfree_sized(p->lvtbl, sizeof(*p->lvtbl));
27286 p->lvtbl = local;
27287 }
27288 }
27289 dyna_pop_1(p);
27290}
27291
27292static int
27293dyna_in_block(struct parser_params *p)
27294{
27295 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
27296}
27297
27298#ifndef RIPPER
27299int
27300dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
27301{
27302 struct vtable *vars, *args, *used;
27303 int i;
27304
27305 args = p->lvtbl->args;
27306 vars = p->lvtbl->vars;
27307 used = p->lvtbl->used;
27308
27309 while (!DVARS_TERMINAL_P(vars)) {
27310 if (vtable_included(args, id)) {
27311 return 1;
27312 }
27313 if ((i = vtable_included(vars, id)) != 0) {
27314 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
27315 return 1;
27316 }
27317 args = args->prev;
27318 vars = vars->prev;
27319 if (!vidrefp) used = 0;
27320 if (used) used = used->prev;
27321 }
27322
27323 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
27324 return rb_dvar_defined(id, p->parent_iseq);
27325 }
27326
27327 return 0;
27328}
27329#endif
27330
27331static int
27332dvar_defined(struct parser_params *p, ID id)
27333{
27334 return dvar_defined_ref(p, id, NULL);
27335}
27336
27337static int
27338dvar_curr(struct parser_params *p, ID id)
27339{
27340 return (vtable_included(p->lvtbl->args, id) ||
27341 vtable_included(p->lvtbl->vars, id));
27342}
27343
27344static void
27345reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
27346{
27347 compile_error(p,
27348 "regexp encoding option '%c' differs from source encoding '%s'",
27349 c, rb_enc_name(rb_parser_str_get_encoding(str)));
27350}
27351
27352#ifndef RIPPER
27353static rb_encoding *
27354find_enc(struct parser_params* p, const char *name)
27355{
27356 int idx = rb_enc_find_index(name);
27357 if (idx < 0) {
27358 rb_bug("unknown encoding name: %s", name);
27359 }
27360
27361 return rb_enc_from_index(idx);
27362}
27363
27364static rb_encoding *
27365kcode_to_enc(struct parser_params* p, int kcode)
27366{
27367 rb_encoding *enc;
27368
27369 switch (kcode) {
27370 case ENC_ASCII8BIT:
27371 enc = rb_ascii8bit_encoding();
27372 break;
27373 case ENC_EUC_JP:
27374 enc = find_enc(p, "EUC-JP");
27375 break;
27376 case ENC_Windows_31J:
27377 enc = find_enc(p, "Windows-31J");
27378 break;
27379 case ENC_UTF8:
27380 enc = rb_utf8_encoding();
27381 break;
27382 default:
27383 enc = NULL;
27384 break;
27385 }
27386
27387 return enc;
27388}
27389
27390int
27391rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27392{
27393 int c = RE_OPTION_ENCODING_IDX(options);
27394
27395 if (c) {
27396 int opt, idx;
27397 rb_encoding *enc;
27398
27399 char_to_option_kcode(c, &opt, &idx);
27400 enc = kcode_to_enc(p, idx);
27401 if (enc != rb_parser_str_get_encoding(str) &&
27402 !rb_parser_is_ascii_string(p, str)) {
27403 goto error;
27404 }
27405 rb_parser_string_set_encoding(str, enc);
27406 }
27407 else if (RE_OPTION_ENCODING_NONE(options)) {
27408 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
27409 !rb_parser_is_ascii_string(p, str)) {
27410 c = 'n';
27411 goto error;
27412 }
27413 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27414 }
27415 else if (rb_is_usascii_enc(p->enc)) {
27416 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27417 }
27418 return 0;
27419
27420 error:
27421 return c;
27422}
27423#endif
27424
27425static void
27426reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27427{
27428 int c = rb_reg_fragment_setenc(p, str, options);
27429 if (c) reg_fragment_enc_error(p, str, c);
27430}
27431
27432#ifndef UNIVERSAL_PARSER
27433typedef struct {
27434 struct parser_params* parser;
27435 rb_encoding *enc;
27436 NODE *succ_block;
27437 const YYLTYPE *loc;
27438 rb_parser_assignable_func assignable;
27440
27441static int
27442reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
27443 int back_num, int *back_refs, OnigRegex regex, void *arg0)
27444{
27446 struct parser_params* p = arg->parser;
27447 rb_encoding *enc = arg->enc;
27448 long len = name_end - name;
27449 const char *s = (const char *)name;
27450
27451 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
27452}
27453
27454static NODE *
27455reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
27456{
27458
27459 arg.parser = p;
27460 arg.enc = rb_enc_get(regexp);
27461 arg.succ_block = 0;
27462 arg.loc = loc;
27463 arg.assignable = assignable;
27464 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
27465
27466 if (!arg.succ_block) return 0;
27467 return RNODE_BLOCK(arg.succ_block)->nd_next;
27468}
27469#endif
27470
27471#ifndef RIPPER
27472NODE *
27473rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
27474{
27475 return assignable(p, id, val, loc);
27476}
27477
27478int
27479rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
27480 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
27481{
27482 ID var;
27483 NODE *node, *succ;
27484
27485 if (!len) return ST_CONTINUE;
27486 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
27487 return ST_CONTINUE;
27488
27489 var = intern_cstr(s, len, enc);
27490 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
27491 if (!lvar_defined(p, var)) return ST_CONTINUE;
27492 }
27493 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
27494 succ = *succ_block;
27495 if (!succ) succ = NEW_ERROR(loc);
27496 succ = block_append(p, succ, node);
27497 *succ_block = succ;
27498 return ST_CONTINUE;
27499}
27500#endif
27501
27502static VALUE
27503parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27504{
27505 VALUE str2;
27506 reg_fragment_setenc(p, str, options);
27507 str2 = rb_str_new_parser_string(str);
27508 return rb_parser_reg_compile(p, str2, options);
27509}
27510
27511#ifndef RIPPER
27512VALUE
27513rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
27514{
27515 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
27516}
27517#endif
27518
27519static VALUE
27520reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27521{
27522 VALUE re;
27523 VALUE err;
27524
27525 err = rb_errinfo();
27526 re = parser_reg_compile(p, str, options);
27527 if (NIL_P(re)) {
27528 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
27529 rb_set_errinfo(err);
27530 compile_error(p, "%"PRIsVALUE, m);
27531 return Qnil;
27532 }
27533 return re;
27534}
27535
27536#ifndef RIPPER
27537void
27538rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
27539{
27540 p->do_print = print;
27541 p->do_loop = loop;
27542 p->do_chomp = chomp;
27543 p->do_split = split;
27544}
27545
27546static NODE *
27547parser_append_options(struct parser_params *p, NODE *node)
27548{
27549 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
27550 const YYLTYPE *const LOC = &default_location;
27551
27552 if (p->do_print) {
27553 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
27554 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
27555 LOC);
27556 node = block_append(p, node, print);
27557 }
27558
27559 if (p->do_loop) {
27560 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27561
27562 if (p->do_split) {
27563 ID ifs = rb_intern("$;");
27564 ID fields = rb_intern("$F");
27565 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27566 NODE *split = NEW_GASGN(fields,
27567 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27568 rb_intern("split"), args, LOC),
27569 LOC);
27570 node = block_append(p, split, node);
27571 }
27572 if (p->do_chomp) {
27573 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27574 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27575 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27576 }
27577
27578 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27579 }
27580
27581 return node;
27582}
27583
27584void
27585rb_init_parse(void)
27586{
27587 /* just to suppress unused-function warnings */
27588 (void)nodetype;
27589 (void)nodeline;
27590}
27591
27592ID
27593internal_id(struct parser_params *p)
27594{
27595 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27596}
27597#endif /* !RIPPER */
27598
27599static void
27600parser_initialize(struct parser_params *p)
27601{
27602 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27603 p->command_start = TRUE;
27604 p->ruby_sourcefile_string = Qnil;
27605 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27606 string_buffer_init(p);
27607 p->node_id = 0;
27608 p->delayed.token = NULL;
27609 p->frozen_string_literal = -1; /* not specified */
27610 rb_source_hash_init(&p->source_hash);
27611#ifndef RIPPER
27612 p->error_buffer = Qfalse;
27613 p->end_expect_token_locations = NULL;
27614 p->token_id = 0;
27615 p->tokens = NULL;
27616#else
27617 p->result = Qnil;
27618 p->parsing_thread = Qnil;
27619 p->s_value = Qnil;
27620 p->s_lvalue = Qnil;
27621 p->s_value_stack = rb_ary_new();
27622#endif
27623 p->debug_buffer = Qnil;
27624 p->debug_output = rb_ractor_stdout();
27625 p->enc = rb_utf8_encoding();
27626 p->exits = 0;
27627}
27628
27629#ifdef RIPPER
27630#define rb_ruby_parser_mark ripper_parser_mark
27631#define rb_ruby_parser_free ripper_parser_free
27632#define rb_ruby_parser_memsize ripper_parser_memsize
27633#endif
27634
27635void
27636rb_ruby_parser_mark(void *ptr)
27637{
27638 struct parser_params *p = (struct parser_params*)ptr;
27639
27640 rb_gc_mark(p->ruby_sourcefile_string);
27641#ifndef RIPPER
27642 rb_gc_mark(p->error_buffer);
27643#else
27644 rb_gc_mark(p->value);
27645 rb_gc_mark(p->result);
27646 rb_gc_mark(p->parsing_thread);
27647 rb_gc_mark(p->s_value);
27648 rb_gc_mark(p->s_lvalue);
27649 rb_gc_mark(p->s_value_stack);
27650#endif
27651 rb_gc_mark(p->debug_buffer);
27652 rb_gc_mark(p->debug_output);
27653}
27654
27655void
27656rb_ruby_parser_free(void *ptr)
27657{
27658 struct parser_params *p = (struct parser_params*)ptr;
27659 struct local_vars *local, *prev;
27660
27661 if (p->ast) {
27662 rb_ast_free(p->ast);
27663 }
27664
27665 if (p->warn_duplicate_keys_table) {
27666 st_free_table(p->warn_duplicate_keys_table);
27667 }
27668
27669#ifndef RIPPER
27670 if (p->tokens) {
27671 rb_parser_ary_free(p, p->tokens);
27672 }
27673#endif
27674
27675 if (p->tokenbuf) {
27676 ruby_xfree_sized(p->tokenbuf, p->toksiz);
27677 }
27678
27679 for (local = p->lvtbl; local; local = prev) {
27680 prev = local->prev;
27681 local_free(p, local);
27682 }
27683
27684 {
27685 token_info *ptinfo;
27686 while ((ptinfo = p->token_info) != 0) {
27687 p->token_info = ptinfo->next;
27688 xfree(ptinfo);
27689 }
27690 }
27691 string_buffer_free(p);
27692
27693 if (p->pvtbl) {
27694 st_free_table(p->pvtbl);
27695 }
27696
27697 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27698 st_free_table(p->case_labels);
27699 }
27700
27701 xfree(p->lex.strterm);
27702 p->lex.strterm = 0;
27703
27704 xfree(ptr);
27705}
27706
27707size_t
27708rb_ruby_parser_memsize(const void *ptr)
27709{
27710 struct parser_params *p = (struct parser_params*)ptr;
27711 struct local_vars *local;
27712 size_t size = sizeof(*p);
27713
27714 size += p->toksiz;
27715 for (local = p->lvtbl; local; local = local->prev) {
27716 size += sizeof(*local);
27717 if (local->vars) size += local->vars->capa * sizeof(ID);
27718 }
27719 return size;
27720}
27721
27722#ifndef RIPPER
27723#undef rb_reserved_word
27724
27725const struct kwtable *
27726rb_reserved_word(const char *str, unsigned int len)
27727{
27728 return reserved_word(str, len);
27729}
27730
27731#ifdef UNIVERSAL_PARSER
27733rb_ruby_parser_allocate(const rb_parser_config_t *config)
27734{
27735 /* parser_initialize expects fields to be set to 0 */
27736 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27737 p->config = config;
27738 return p;
27739}
27740
27742rb_ruby_parser_new(const rb_parser_config_t *config)
27743{
27744 /* parser_initialize expects fields to be set to 0 */
27745 rb_parser_t *p = rb_ruby_parser_allocate(config);
27746 parser_initialize(p);
27747 return p;
27748}
27749#else
27751rb_ruby_parser_allocate(void)
27752{
27753 /* parser_initialize expects fields to be set to 0 */
27754 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27755 return p;
27756}
27757
27759rb_ruby_parser_new(void)
27760{
27761 /* parser_initialize expects fields to be set to 0 */
27762 rb_parser_t *p = rb_ruby_parser_allocate();
27763 parser_initialize(p);
27764 return p;
27765}
27766#endif
27767
27769rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27770{
27771 p->error_buffer = main ? Qfalse : Qnil;
27772 p->parent_iseq = base;
27773 return p;
27774}
27775
27776void
27777rb_ruby_parser_set_script_lines(rb_parser_t *p)
27778{
27779 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27780}
27781
27782void
27783rb_ruby_parser_error_tolerant(rb_parser_t *p)
27784{
27785 p->error_tolerant = 1;
27786}
27787
27788void
27789rb_ruby_parser_keep_tokens(rb_parser_t *p)
27790{
27791 p->keep_tokens = 1;
27792 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27793}
27794
27796rb_ruby_parser_encoding(rb_parser_t *p)
27797{
27798 return p->enc;
27799}
27800
27801int
27802rb_ruby_parser_end_seen_p(rb_parser_t *p)
27803{
27804 return p->ruby__end__seen;
27805}
27806
27807int
27808rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27809{
27810 p->debug = flag;
27811 return flag;
27812}
27813#endif /* !RIPPER */
27814
27815#ifdef RIPPER
27816int
27817rb_ruby_parser_get_yydebug(rb_parser_t *p)
27818{
27819 return p->debug;
27820}
27821
27822void
27823rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27824{
27825 p->value = value;
27826}
27827
27828int
27829rb_ruby_parser_error_p(rb_parser_t *p)
27830{
27831 return p->error_p;
27832}
27833
27834VALUE
27835rb_ruby_parser_debug_output(rb_parser_t *p)
27836{
27837 return p->debug_output;
27838}
27839
27840void
27841rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27842{
27843 p->debug_output = output;
27844}
27845
27846VALUE
27847rb_ruby_parser_parsing_thread(rb_parser_t *p)
27848{
27849 return p->parsing_thread;
27850}
27851
27852void
27853rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27854{
27855 p->parsing_thread = parsing_thread;
27856}
27857
27858void
27859rb_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)
27860{
27861 p->lex.gets = gets;
27862 p->lex.input = input;
27863 p->eofp = 0;
27864 p->ruby_sourcefile_string = sourcefile_string;
27865 p->ruby_sourcefile = sourcefile;
27866 p->ruby_sourceline = sourceline;
27867}
27868
27869VALUE
27870rb_ruby_parser_result(rb_parser_t *p)
27871{
27872 return p->result;
27873}
27874
27876rb_ruby_parser_enc(rb_parser_t *p)
27877{
27878 return p->enc;
27879}
27880
27881VALUE
27882rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27883{
27884 return p->ruby_sourcefile_string;
27885}
27886
27887int
27888rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27889{
27890 return p->ruby_sourceline;
27891}
27892
27893int
27894rb_ruby_parser_lex_state(rb_parser_t *p)
27895{
27896 return p->lex.state;
27897}
27898
27899void
27900rb_ruby_ripper_parse0(rb_parser_t *p)
27901{
27902 parser_prepare(p);
27903 p->ast = rb_ast_new();
27904 ripper_yyparse((void*)p);
27905 rb_ast_free(p->ast);
27906 p->ast = 0;
27907 p->eval_tree = 0;
27908 p->eval_tree_begin = 0;
27909}
27910
27911int
27912rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27913{
27914 return dedent_string(p, string, width);
27915}
27916
27917int
27918rb_ruby_ripper_initialized_p(rb_parser_t *p)
27919{
27920 return p->lex.input != 0;
27921}
27922
27923void
27924rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27925{
27926 parser_initialize(p);
27927}
27928
27929long
27930rb_ruby_ripper_column(rb_parser_t *p)
27931{
27932 return p->lex.ptok - p->lex.pbeg;
27933}
27934
27935long
27936rb_ruby_ripper_token_len(rb_parser_t *p)
27937{
27938 return p->lex.pcur - p->lex.ptok;
27939}
27940
27942rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27943{
27944 return p->lex.lastline;
27945}
27946
27947VALUE
27948rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27949{
27950 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27951}
27952
27953#ifdef UNIVERSAL_PARSER
27955rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27956{
27957 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27958 p->config = config;
27959 return p;
27960}
27961#endif
27962
27963struct parser_params*
27964rb_ruby_ripper_parser_allocate(void)
27965{
27966 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27967}
27968#endif /* RIPPER */
27969
27970#ifndef RIPPER
27971void
27972rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27973{
27974 va_list ap;
27975 VALUE mesg = p->debug_buffer;
27976
27977 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27978 va_start(ap, fmt);
27979 rb_str_vcatf(mesg, fmt, ap);
27980 va_end(ap);
27981 if (char_at_end(p, mesg, 0) == '\n') {
27982 rb_io_write(p->debug_output, mesg);
27983 p->debug_buffer = Qnil;
27984 }
27985}
27986
27987static void
27988parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27989{
27990 va_list ap;
27991 int lineno, column;
27992
27993 if (loc) {
27994 lineno = loc->end_pos.lineno;
27995 column = loc->end_pos.column;
27996 }
27997 else {
27998 lineno = p->ruby_sourceline;
27999 column = rb_len2int(p->lex.pcur - p->lex.pbeg);
28000 }
28001
28002 rb_io_flush(p->debug_output);
28003 p->error_p = 1;
28004 va_start(ap, fmt);
28005 p->error_buffer =
28006 rb_syntax_error_append(p->error_buffer,
28007 p->ruby_sourcefile_string,
28008 lineno, column,
28009 p->enc, fmt, ap);
28010 va_end(ap);
28011}
28012
28013static size_t
28014count_char(const char *str, int c)
28015{
28016 int n = 0;
28017 while (str[n] == c) ++n;
28018 return n;
28019}
28020
28021/*
28022 * strip enclosing double-quotes, same as the default yytnamerr except
28023 * for that single-quotes matching back-quotes do not stop stripping.
28024 *
28025 * "\"`class' keyword\"" => "`class' keyword"
28026 */
28027size_t
28028rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
28029{
28030 if (*yystr == '"') {
28031 size_t yyn = 0, bquote = 0;
28032 const char *yyp = yystr;
28033
28034 while (*++yyp) {
28035 switch (*yyp) {
28036 case '\'':
28037 if (!bquote) {
28038 bquote = count_char(yyp+1, '\'') + 1;
28039 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
28040 yyn += bquote;
28041 yyp += bquote - 1;
28042 break;
28043 }
28044 else {
28045 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
28046 if (yyres) memcpy(yyres + yyn, yyp, bquote);
28047 yyn += bquote;
28048 yyp += bquote - 1;
28049 bquote = 0;
28050 break;
28051 }
28052 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
28053 if (yyres) memcpy(yyres + yyn, yyp, 3);
28054 yyn += 3;
28055 yyp += 2;
28056 break;
28057 }
28058 goto do_not_strip_quotes;
28059 }
28060
28061 case ',':
28062 goto do_not_strip_quotes;
28063
28064 case '\\':
28065 if (*++yyp != '\\')
28066 goto do_not_strip_quotes;
28067 /* Fall through. */
28068 default:
28069 if (yyres)
28070 yyres[yyn] = *yyp;
28071 yyn++;
28072 break;
28073
28074 case '"':
28075 case '\0':
28076 if (yyres)
28077 yyres[yyn] = '\0';
28078 return yyn;
28079 }
28080 }
28081 do_not_strip_quotes: ;
28082 }
28083
28084 if (!yyres) return strlen(yystr);
28085
28086 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
28087}
28088#endif
28089
28090#ifdef RIPPER
28091#define validate(x) (void)(x)
28092
28093static VALUE
28094ripper_dispatch0(struct parser_params *p, ID mid)
28095{
28096 return rb_funcall(p->value, mid, 0);
28097}
28098
28099static VALUE
28100ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
28101{
28102 validate(a);
28103 return rb_funcall(p->value, mid, 1, a);
28104}
28105
28106static VALUE
28107ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
28108{
28109 validate(a);
28110 validate(b);
28111 return rb_funcall(p->value, mid, 2, a, b);
28112}
28113
28114static VALUE
28115ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
28116{
28117 validate(a);
28118 validate(b);
28119 validate(c);
28120 return rb_funcall(p->value, mid, 3, a, b, c);
28121}
28122
28123static VALUE
28124ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
28125{
28126 validate(a);
28127 validate(b);
28128 validate(c);
28129 validate(d);
28130 return rb_funcall(p->value, mid, 4, a, b, c, d);
28131}
28132
28133static VALUE
28134ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
28135{
28136 validate(a);
28137 validate(b);
28138 validate(c);
28139 validate(d);
28140 validate(e);
28141 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
28142}
28143
28144static VALUE
28145ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
28146{
28147 validate(a);
28148 validate(b);
28149 validate(c);
28150 validate(d);
28151 validate(e);
28152 validate(f);
28153 validate(g);
28154 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
28155}
28156
28157void
28158ripper_error(struct parser_params *p)
28159{
28160 p->error_p = TRUE;
28161}
28162
28163VALUE
28164ripper_value(struct parser_params *p)
28165{
28166 (void)yystpcpy; /* may not used in newer bison */
28167
28168 return p->value;
28169}
28170
28171#endif /* RIPPER */
28172/*
28173 * Local variables:
28174 * mode: c
28175 * c-file-style: "ruby"
28176 * End:
28177 */
#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:678
#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:1455
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1474
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2315
Encoding relates APIs.
rb_len_t 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:858
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1124
VALUE rb_ary_entry(VALUE ary, rb_len_t off)
Queries an element of an array.
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.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1523
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1557
VALUE rb_str_cat(VALUE dst, const char *src, rb_len_t srclen)
Destructively appends the passed contents to the string.
Definition string.c:3706
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1717
#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:1681
#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:1539
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:1091
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_len2int
Just another name of rb_len2int_inline.
Definition len_t.h:37
#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.
std::string_view constant(const pm_parser_t *parser PRISM_LIFETIMEBOUND, pm_constant_id_t constant_id) noexcept
The name of the constant with the given id, which must not be zero.
Definition parser.hpp:64
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
long rb_len_t
A signed integer type for lengths and indices of objects such as String and Array.
Definition value.h:142
unsigned long rb_ulen_t
An unsigned integer type that has the same width with rb_len_t.
Definition value.h:145
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.