Ruby 4.0.7p0 (2026-09-15 revision 229531a6cfbf07e3caef30dbac24a2a3f3fed482)
parse.c
1/* A Bison parser, made by Lrama 0.7.1. */
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
85#include <errno.h>
86
87#ifdef UNIVERSAL_PARSER
88
89#include "internal/ruby_parser.h"
90#include "parser_node.h"
91#include "universal_parser.c"
92
93#ifdef RIPPER
94#define STATIC_ID2SYM p->config->static_id2sym
95#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
96#endif
97
98#else
99
100#include "internal.h"
101#include "internal/compile.h"
102#include "internal/compilers.h"
103#include "internal/complex.h"
104#include "internal/encoding.h"
105#include "internal/error.h"
106#include "internal/hash.h"
107#include "internal/io.h"
108#include "internal/numeric.h"
109#include "internal/parse.h"
110#include "internal/rational.h"
111#include "internal/re.h"
112#include "internal/ruby_parser.h"
113#include "internal/symbol.h"
114#include "internal/thread.h"
115#include "internal/variable.h"
116#include "node.h"
117#include "parser_node.h"
118#include "probes.h"
119#include "regenc.h"
120#include "ruby/encoding.h"
121#include "ruby/regex.h"
122#include "ruby/ruby.h"
123#include "ruby/st.h"
124#include "ruby/util.h"
125#include "ruby/ractor.h"
126#include "symbol.h"
127
128#ifndef RIPPER
129static VALUE
130syntax_error_new(void)
131{
133}
134#endif
135
136static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
137
138#define compile_callback rb_suppress_tracing
139#endif /* !UNIVERSAL_PARSER */
140
141#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
142#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
143
144static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
145
146#ifndef RIPPER
147static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
148#endif
149
150static int
151node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
152{
153 return (n1->minus != n2->minus ||
154 n1->base != n2->base ||
155 strcmp(n1->val, n2->val));
156}
157
158static int
159node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
160{
161 return (n1->minus != n2->minus ||
162 strcmp(n1->val, n2->val));
163}
164
165static int
166node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
167{
168 return (n1->minus != n2->minus ||
169 n1->base != n2->base ||
170 n1->seen_point != n2->seen_point ||
171 strcmp(n1->val, n2->val));
172}
173
174static int
175node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
176{
177 return (n1->minus != n2->minus ||
178 n1->base != n2->base ||
179 n1->seen_point != n2->seen_point ||
180 n1->type != n2->type ||
181 strcmp(n1->val, n2->val));
182}
183
184static int
185rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
186{
187 return (n1->options != n2->options ||
188 rb_parser_string_hash_cmp(n1->string, n2->string));
189}
190
191static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
192static st_index_t rb_char_p_hash(const char *c);
193
194static int
195literal_cmp(st_data_t val, st_data_t lit)
196{
197 if (val == lit) return 0;
198
199 NODE *node_val = RNODE(val);
200 NODE *node_lit = RNODE(lit);
201 enum node_type type_val = nd_type(node_val);
202 enum node_type type_lit = nd_type(node_lit);
203
204 if (type_val != type_lit) {
205 return -1;
206 }
207
208 switch (type_lit) {
209 case NODE_INTEGER:
210 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
211 case NODE_FLOAT:
212 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
213 case NODE_RATIONAL:
214 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
215 case NODE_IMAGINARY:
216 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
217 case NODE_STR:
218 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
219 case NODE_SYM:
220 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
221 case NODE_REGX:
222 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
223 case NODE_LINE:
224 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
225 case NODE_FILE:
226 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
227 case NODE_ENCODING:
228 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
229 default:
230#ifdef UNIVERSAL_PARSER
231 abort();
232#else
233 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
234#endif
235 }
236}
237
238static st_index_t
239literal_hash(st_data_t a)
240{
241 NODE *node = (NODE *)a;
242 enum node_type type = nd_type(node);
243
244 switch (type) {
245 case NODE_INTEGER:
246 return rb_char_p_hash(RNODE_INTEGER(node)->val);
247 case NODE_FLOAT:
248 return rb_char_p_hash(RNODE_FLOAT(node)->val);
249 case NODE_RATIONAL:
250 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
251 case NODE_IMAGINARY:
252 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
253 case NODE_STR:
254 return rb_parser_str_hash(RNODE_STR(node)->string);
255 case NODE_SYM:
256 return rb_parser_str_hash(RNODE_SYM(node)->string);
257 case NODE_REGX:
258 return rb_parser_str_hash(RNODE_REGX(node)->string);
259 case NODE_LINE:
260 return (st_index_t)node->nd_loc.beg_pos.lineno;
261 case NODE_FILE:
262 return rb_parser_str_hash(RNODE_FILE(node)->path);
263 case NODE_ENCODING:
264 return (st_index_t)RNODE_ENCODING(node)->enc;
265 default:
266#ifdef UNIVERSAL_PARSER
267 abort();
268#else
269 rb_bug("unexpected node: %s", ruby_node_name(type));
270#endif
271 }
272}
273
274static inline int
275parse_isascii(int c)
276{
277 return '\0' <= c && c <= '\x7f';
278}
279
280#undef ISASCII
281#define ISASCII parse_isascii
282
283static inline int
284parse_isspace(int c)
285{
286 return c == ' ' || ('\t' <= c && c <= '\r');
287}
288
289#undef ISSPACE
290#define ISSPACE parse_isspace
291
292static inline int
293parse_iscntrl(int c)
294{
295 return ('\0' <= c && c < ' ') || c == '\x7f';
296}
297
298#undef ISCNTRL
299#define ISCNTRL(c) parse_iscntrl(c)
300
301static inline int
302parse_isupper(int c)
303{
304 return 'A' <= c && c <= 'Z';
305}
306
307static inline int
308parse_islower(int c)
309{
310 return 'a' <= c && c <= 'z';
311}
312
313static inline int
314parse_isalpha(int c)
315{
316 return parse_isupper(c) || parse_islower(c);
317}
318
319#undef ISALPHA
320#define ISALPHA(c) parse_isalpha(c)
321
322static inline int
323parse_isdigit(int c)
324{
325 return '0' <= c && c <= '9';
326}
327
328#undef ISDIGIT
329#define ISDIGIT(c) parse_isdigit(c)
330
331static inline int
332parse_isalnum(int c)
333{
334 return ISALPHA(c) || ISDIGIT(c);
335}
336
337#undef ISALNUM
338#define ISALNUM(c) parse_isalnum(c)
339
340static inline int
341parse_isxdigit(int c)
342{
343 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
344}
345
346#undef ISXDIGIT
347#define ISXDIGIT(c) parse_isxdigit(c)
348
349#include "parser_st.h"
350
351#undef STRCASECMP
352#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
353
354#undef STRNCASECMP
355#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
356
357#ifdef RIPPER
358#include "ripper_init.h"
359#endif
360
361enum rescue_context {
362 before_rescue,
363 after_rescue,
364 after_else,
365 after_ensure,
366};
367
369 unsigned int in_defined: 1;
370 unsigned int in_kwarg: 1;
371 unsigned int in_argdef: 1;
372 unsigned int in_def: 1;
373 unsigned int in_class: 1;
374 unsigned int has_trailing_semicolon: 1;
375 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
376 BITFIELD(enum rescue_context, in_rescue, 2);
377 unsigned int cant_return: 1;
378 unsigned int in_alt_pattern: 1;
379 unsigned int capture_in_pattern: 1;
380};
381
382typedef struct RNode_DEF_TEMP rb_node_def_temp_t;
383
384#if defined(__GNUC__) && !defined(__clang__)
385// Suppress "parameter passing for argument of type 'struct
386// lex_context' changed" notes. `struct lex_context` is file scope,
387// and has no ABI compatibility issue.
391// Not sure why effective even after popped.
392#endif
393
394#include "parse.h"
395
396#define NO_LEX_CTXT (struct lex_context){0}
397
398#ifndef WARN_PAST_SCOPE
399# define WARN_PAST_SCOPE 0
400#endif
401
402#define TAB_WIDTH 8
403
404#define yydebug (p->debug) /* disable the global variable definition */
405
406#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
407#define YY_LOCATION_PRINT(File, loc, p) \
408 rb_parser_printf(p, "%d.%d-%d.%d", \
409 (loc).beg_pos.lineno, (loc).beg_pos.column,\
410 (loc).end_pos.lineno, (loc).end_pos.column)
411#define YYLLOC_DEFAULT(Current, Rhs, N) \
412 do \
413 if (N) \
414 { \
415 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
416 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
417 } \
418 else \
419 { \
420 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
421 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
422 } \
423 while (0)
424#define YY_(Msgid) \
425 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
426 "nesting too deep" : (Msgid))
427
428#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
429 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
430#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
431 rb_parser_set_location_of_delayed_token(p, &(Current))
432#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
433 rb_parser_set_location_of_heredoc_end(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
435 rb_parser_set_location_of_dummy_end(p, &(Current))
436#define RUBY_SET_YYLLOC_OF_NONE(Current) \
437 rb_parser_set_location_of_none(p, &(Current))
438#define RUBY_SET_YYLLOC(Current) \
439 rb_parser_set_location(p, &(Current))
440#define RUBY_INIT_YYLLOC() \
441 { \
442 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
443 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
444 }
445
446#define IS_lex_state_for(x, ls) ((x) & (ls))
447#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
448#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
449#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
450
451# define SET_LEX_STATE(ls) \
452 parser_set_lex_state(p, ls, __LINE__)
453static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
454
455typedef VALUE stack_type;
456
457static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
458
459# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
460# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
461# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
462# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
463# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
464
465/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
466 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
467#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
468#define COND_POP() BITSTACK_POP(cond_stack)
469#define COND_P() BITSTACK_SET_P(cond_stack)
470#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
471
472/* A flag to identify keyword_do_block; "do" keyword after command_call.
473 Example: `foo 1, 2 do`. */
474#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
475#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
476#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
477#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
478
479struct vtable {
480 ID *tbl;
481 int pos;
482 int capa;
483 struct vtable *prev;
484};
485
487 struct vtable *args;
488 struct vtable *vars;
489 struct vtable *used;
490# if WARN_PAST_SCOPE
491 struct vtable *past;
492# endif
493 struct local_vars *prev;
494 struct {
495 NODE *outer, *inner, *current;
496 } numparam;
497 NODE *it;
498};
499
501 NODE *node;
502 YYLTYPE opening_loc;
503 YYLTYPE closing_loc;
505
506enum {
507 ORDINAL_PARAM = -1,
508 NO_PARAM = 0,
509 NUMPARAM_MAX = 9,
510};
511
512#define DVARS_INHERIT ((void*)1)
513#define DVARS_TOPSCOPE NULL
514#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
515
516typedef struct token_info {
517 const char *token;
518 rb_code_position_t beg;
519 int indent;
520 int nonspc;
521 struct token_info *next;
522} token_info;
523
525 const rb_code_position_t *pos;
526 struct end_expect_token_locations *prev;
527} end_expect_token_locations_t;
528
530 struct parser_string_buffer_elem *next;
531 long len; /* Total length of allocated buf */
532 long used; /* Current usage of buf */
533 rb_parser_string_t *buf[FLEX_ARY_LEN];
534} parser_string_buffer_elem_t;
535
536typedef struct parser_string_buffer {
537 parser_string_buffer_elem_t *head;
538 parser_string_buffer_elem_t *last;
539} parser_string_buffer_t;
540
541#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
542
543/*
544 Structure of Lexer Buffer:
545
546 lex.pbeg lex.ptok lex.pcur lex.pend
547 | | | |
548 |------------+------------+------------|
549 |<---------->|
550 token
551*/
553 YYSTYPE *lval;
554 YYLTYPE *yylloc;
555
556 struct {
557 rb_strterm_t *strterm;
558 rb_parser_lex_gets_func *gets;
559 rb_parser_input_data input;
560 parser_string_buffer_t string_buffer;
561 rb_parser_string_t *lastline;
562 rb_parser_string_t *nextline;
563 const char *pbeg;
564 const char *pcur;
565 const char *pend;
566 const char *ptok;
567 enum lex_state_e state;
568 /* track the nest level of any parens "()[]{}" */
569 int paren_nest;
570 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
571 int lpar_beg;
572 /* track the nest level of only braces "{}" */
573 int brace_nest;
574 } lex;
575 stack_type cond_stack;
576 stack_type cmdarg_stack;
577 int tokidx;
578 int toksiz;
579 int heredoc_end;
580 int heredoc_indent;
581 int heredoc_line_indent;
582 char *tokenbuf;
583 struct local_vars *lvtbl;
584 st_table *pvtbl;
585 st_table *pktbl;
586 int line_count;
587 int ruby_sourceline; /* current line no. */
588 const char *ruby_sourcefile; /* current source file */
589 VALUE ruby_sourcefile_string;
590 rb_encoding *enc;
591 token_info *token_info;
592 st_table *case_labels;
593 rb_node_exits_t *exits;
594
595 VALUE debug_buffer;
596 VALUE debug_output;
597
598 struct {
599 rb_parser_string_t *token;
600 int beg_line;
601 int beg_col;
602 int end_line;
603 int end_col;
604 } delayed;
605
606 rb_ast_t *ast;
607 int node_id;
608
609 st_table *warn_duplicate_keys_table;
610
611 int max_numparam;
612 ID it_id;
613
614 struct lex_context ctxt;
615
616 NODE *eval_tree_begin;
617 NODE *eval_tree;
618 const struct rb_iseq_struct *parent_iseq;
619
620#ifdef UNIVERSAL_PARSER
621 const rb_parser_config_t *config;
622#endif
623 /* compile_option */
624 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
625
626 unsigned int command_start:1;
627 unsigned int eofp: 1;
628 unsigned int ruby__end__seen: 1;
629 unsigned int debug: 1;
630 unsigned int has_shebang: 1;
631 unsigned int token_seen: 1;
632 unsigned int token_info_enabled: 1;
633# if WARN_PAST_SCOPE
634 unsigned int past_scope_enabled: 1;
635# endif
636 unsigned int error_p: 1;
637 unsigned int cr_seen: 1;
638
639#ifndef RIPPER
640 /* Ruby core only */
641
642 unsigned int do_print: 1;
643 unsigned int do_loop: 1;
644 unsigned int do_chomp: 1;
645 unsigned int do_split: 1;
646 unsigned int error_tolerant: 1;
647 unsigned int keep_tokens: 1;
648
649 VALUE error_buffer;
650 rb_parser_ary_t *debug_lines;
651 /*
652 * Store specific keyword locations to generate dummy end token.
653 * Refer to the tail of list element.
654 */
655 end_expect_token_locations_t *end_expect_token_locations;
656 /* id for terms */
657 int token_id;
658 /* Array for term tokens */
659 rb_parser_ary_t *tokens;
660#else
661 /* Ripper only */
662
663 VALUE value;
664 VALUE result;
665 VALUE parsing_thread;
666 VALUE s_value; /* Token VALUE */
667 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
668 VALUE s_value_stack;
669#endif
670};
671
672#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
673#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
674#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
675static int
676numparam_id_p(struct parser_params *p, ID id)
677{
678 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
679 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
680 return idx > 0 && idx <= NUMPARAM_MAX;
681}
682static void numparam_name(struct parser_params *p, ID id);
683
684#ifdef RIPPER
685static void
686after_shift(struct parser_params *p)
687{
688 if (p->debug) {
689 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
690 }
691 rb_ary_push(p->s_value_stack, p->s_value);
692 p->s_value = Qnil;
693}
694
695static void
696before_reduce(int len, struct parser_params *p)
697{
698 // Initialize $$ with $1.
699 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
700}
701
702static void
703after_reduce(int len, struct parser_params *p)
704{
705 for (int i = 0; i < len; i++) {
706 VALUE tos = rb_ary_pop(p->s_value_stack);
707 if (p->debug) {
708 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
709 }
710 }
711 if (p->debug) {
712 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
713 }
714 rb_ary_push(p->s_value_stack, p->s_lvalue);
715 p->s_lvalue = Qnil;
716}
717
718static void
719after_shift_error_token(struct parser_params *p)
720{
721 if (p->debug) {
722 rb_parser_printf(p, "after-shift-error-token:\n");
723 }
724 rb_ary_push(p->s_value_stack, Qnil);
725}
726
727static void
728after_pop_stack(int len, struct parser_params *p)
729{
730 for (int i = 0; i < len; i++) {
731 VALUE tos = rb_ary_pop(p->s_value_stack);
732 if (p->debug) {
733 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
734 }
735 }
736}
737#else
738static void
739after_shift(struct parser_params *p)
740{
741}
742
743static void
744before_reduce(int len, struct parser_params *p)
745{
746}
747
748static void
749after_reduce(int len, struct parser_params *p)
750{
751}
752
753static void
754after_shift_error_token(struct parser_params *p)
755{
756}
757
758static void
759after_pop_stack(int len, struct parser_params *p)
760{
761}
762#endif
763
764#define intern_cstr(n,l,en) rb_intern3(n,l,en)
765
766#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
767
768#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
769#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
770#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
771#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
772#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
773#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
774
775#ifndef RIPPER
776static inline int
777char_at_end(struct parser_params *p, VALUE str, int when_empty)
778{
779 long len = RSTRING_LEN(str);
780 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
781}
782#endif
783
784static void
785pop_pvtbl(struct parser_params *p, st_table *tbl)
786{
787 st_free_table(p->pvtbl);
788 p->pvtbl = tbl;
789}
790
791static void
792pop_pktbl(struct parser_params *p, st_table *tbl)
793{
794 if (p->pktbl) st_free_table(p->pktbl);
795 p->pktbl = tbl;
796}
797
798#define STRING_BUF_DEFAULT_LEN 16
799
800static void
801string_buffer_init(struct parser_params *p)
802{
803 parser_string_buffer_t *buf = &p->lex.string_buffer;
804 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
805
806 buf->head = buf->last = xmalloc(size);
807 buf->head->len = STRING_BUF_DEFAULT_LEN;
808 buf->head->used = 0;
809 buf->head->next = NULL;
810}
811
812static void
813string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
814{
815 parser_string_buffer_t *buf = &p->lex.string_buffer;
816
817 if (buf->head->used >= buf->head->len) {
818 parser_string_buffer_elem_t *elem;
819 long n = buf->head->len * 2;
820 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
821
822 elem = xmalloc(size);
823 elem->len = n;
824 elem->used = 0;
825 elem->next = NULL;
826 buf->last->next = elem;
827 buf->last = elem;
828 }
829 buf->last->buf[buf->last->used++] = str;
830}
831
832static void
833string_buffer_free(struct parser_params *p)
834{
835 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
836
837 while (elem) {
838 parser_string_buffer_elem_t *next_elem = elem->next;
839
840 for (long i = 0; i < elem->used; i++) {
841 rb_parser_string_free(p, elem->buf[i]);
842 }
843
844 xfree(elem);
845 elem = next_elem;
846 }
847}
848
849#ifndef RIPPER
850static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
851
852static void
853debug_end_expect_token_locations(struct parser_params *p, const char *name)
854{
855 if(p->debug) {
856 VALUE mesg = rb_sprintf("%s: [", name);
857 int i = 0;
858 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
859 if (i > 0)
860 rb_str_cat_cstr(mesg, ", ");
861 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
862 i++;
863 }
864 rb_str_cat_cstr(mesg, "]\n");
865 flush_debug_buffer(p, p->debug_output, mesg);
866 }
867}
868
869static void
870push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
871{
872 if(!p->error_tolerant) return;
873
874 end_expect_token_locations_t *locations;
875 locations = ALLOC(end_expect_token_locations_t);
876 locations->pos = pos;
877 locations->prev = p->end_expect_token_locations;
878 p->end_expect_token_locations = locations;
879
880 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
881}
882
883static void
884pop_end_expect_token_locations(struct parser_params *p)
885{
886 if(!p->end_expect_token_locations) return;
887
888 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
889 ruby_sized_xfree(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
890 p->end_expect_token_locations = locations;
891
892 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
893}
894
895static end_expect_token_locations_t *
896peek_end_expect_token_locations(struct parser_params *p)
897{
898 return p->end_expect_token_locations;
899}
900
901static const char *
902parser_token2char(struct parser_params *p, enum yytokentype tok)
903{
904 switch ((int) tok) {
905#define TOKEN2CHAR(tok) case tok: return (#tok);
906#define TOKEN2CHAR2(tok, name) case tok: return (name);
907 TOKEN2CHAR2(' ', "word_sep");
908 TOKEN2CHAR2('!', "!")
909 TOKEN2CHAR2('%', "%");
910 TOKEN2CHAR2('&', "&");
911 TOKEN2CHAR2('*', "*");
912 TOKEN2CHAR2('+', "+");
913 TOKEN2CHAR2('-', "-");
914 TOKEN2CHAR2('/', "/");
915 TOKEN2CHAR2('<', "<");
916 TOKEN2CHAR2('=', "=");
917 TOKEN2CHAR2('>', ">");
918 TOKEN2CHAR2('?', "?");
919 TOKEN2CHAR2('^', "^");
920 TOKEN2CHAR2('|', "|");
921 TOKEN2CHAR2('~', "~");
922 TOKEN2CHAR2(':', ":");
923 TOKEN2CHAR2(',', ",");
924 TOKEN2CHAR2('.', ".");
925 TOKEN2CHAR2(';', ";");
926 TOKEN2CHAR2('`', "`");
927 TOKEN2CHAR2('\n', "nl");
928 TOKEN2CHAR2('{', "\"{\"");
929 TOKEN2CHAR2('}', "\"}\"");
930 TOKEN2CHAR2('[', "\"[\"");
931 TOKEN2CHAR2(']', "\"]\"");
932 TOKEN2CHAR2('(', "\"(\"");
933 TOKEN2CHAR2(')', "\")\"");
934 TOKEN2CHAR2('\\', "backslash");
935 TOKEN2CHAR(keyword_class);
936 TOKEN2CHAR(keyword_module);
937 TOKEN2CHAR(keyword_def);
938 TOKEN2CHAR(keyword_undef);
939 TOKEN2CHAR(keyword_begin);
940 TOKEN2CHAR(keyword_rescue);
941 TOKEN2CHAR(keyword_ensure);
942 TOKEN2CHAR(keyword_end);
943 TOKEN2CHAR(keyword_if);
944 TOKEN2CHAR(keyword_unless);
945 TOKEN2CHAR(keyword_then);
946 TOKEN2CHAR(keyword_elsif);
947 TOKEN2CHAR(keyword_else);
948 TOKEN2CHAR(keyword_case);
949 TOKEN2CHAR(keyword_when);
950 TOKEN2CHAR(keyword_while);
951 TOKEN2CHAR(keyword_until);
952 TOKEN2CHAR(keyword_for);
953 TOKEN2CHAR(keyword_break);
954 TOKEN2CHAR(keyword_next);
955 TOKEN2CHAR(keyword_redo);
956 TOKEN2CHAR(keyword_retry);
957 TOKEN2CHAR(keyword_in);
958 TOKEN2CHAR(keyword_do);
959 TOKEN2CHAR(keyword_do_cond);
960 TOKEN2CHAR(keyword_do_block);
961 TOKEN2CHAR(keyword_do_LAMBDA);
962 TOKEN2CHAR(keyword_return);
963 TOKEN2CHAR(keyword_yield);
964 TOKEN2CHAR(keyword_super);
965 TOKEN2CHAR(keyword_self);
966 TOKEN2CHAR(keyword_nil);
967 TOKEN2CHAR(keyword_true);
968 TOKEN2CHAR(keyword_false);
969 TOKEN2CHAR(keyword_and);
970 TOKEN2CHAR(keyword_or);
971 TOKEN2CHAR(keyword_not);
972 TOKEN2CHAR(modifier_if);
973 TOKEN2CHAR(modifier_unless);
974 TOKEN2CHAR(modifier_while);
975 TOKEN2CHAR(modifier_until);
976 TOKEN2CHAR(modifier_rescue);
977 TOKEN2CHAR(keyword_alias);
978 TOKEN2CHAR(keyword_defined);
979 TOKEN2CHAR(keyword_BEGIN);
980 TOKEN2CHAR(keyword_END);
981 TOKEN2CHAR(keyword__LINE__);
982 TOKEN2CHAR(keyword__FILE__);
983 TOKEN2CHAR(keyword__ENCODING__);
984 TOKEN2CHAR(tIDENTIFIER);
985 TOKEN2CHAR(tFID);
986 TOKEN2CHAR(tGVAR);
987 TOKEN2CHAR(tIVAR);
988 TOKEN2CHAR(tCONSTANT);
989 TOKEN2CHAR(tCVAR);
990 TOKEN2CHAR(tLABEL);
991 TOKEN2CHAR(tINTEGER);
992 TOKEN2CHAR(tFLOAT);
993 TOKEN2CHAR(tRATIONAL);
994 TOKEN2CHAR(tIMAGINARY);
995 TOKEN2CHAR(tCHAR);
996 TOKEN2CHAR(tNTH_REF);
997 TOKEN2CHAR(tBACK_REF);
998 TOKEN2CHAR(tSTRING_CONTENT);
999 TOKEN2CHAR(tREGEXP_END);
1000 TOKEN2CHAR(tDUMNY_END);
1001 TOKEN2CHAR(tSP);
1002 TOKEN2CHAR(tUPLUS);
1003 TOKEN2CHAR(tUMINUS);
1004 TOKEN2CHAR(tPOW);
1005 TOKEN2CHAR(tCMP);
1006 TOKEN2CHAR(tEQ);
1007 TOKEN2CHAR(tEQQ);
1008 TOKEN2CHAR(tNEQ);
1009 TOKEN2CHAR(tGEQ);
1010 TOKEN2CHAR(tLEQ);
1011 TOKEN2CHAR(tANDOP);
1012 TOKEN2CHAR(tOROP);
1013 TOKEN2CHAR(tMATCH);
1014 TOKEN2CHAR(tNMATCH);
1015 TOKEN2CHAR(tDOT2);
1016 TOKEN2CHAR(tDOT3);
1017 TOKEN2CHAR(tBDOT2);
1018 TOKEN2CHAR(tBDOT3);
1019 TOKEN2CHAR(tAREF);
1020 TOKEN2CHAR(tASET);
1021 TOKEN2CHAR(tLSHFT);
1022 TOKEN2CHAR(tRSHFT);
1023 TOKEN2CHAR(tANDDOT);
1024 TOKEN2CHAR(tCOLON2);
1025 TOKEN2CHAR(tCOLON3);
1026 TOKEN2CHAR(tOP_ASGN);
1027 TOKEN2CHAR(tASSOC);
1028 TOKEN2CHAR(tLPAREN);
1029 TOKEN2CHAR(tLPAREN_ARG);
1030 TOKEN2CHAR(tLBRACK);
1031 TOKEN2CHAR(tLBRACE);
1032 TOKEN2CHAR(tLBRACE_ARG);
1033 TOKEN2CHAR(tSTAR);
1034 TOKEN2CHAR(tDSTAR);
1035 TOKEN2CHAR(tAMPER);
1036 TOKEN2CHAR(tLAMBDA);
1037 TOKEN2CHAR(tSYMBEG);
1038 TOKEN2CHAR(tSTRING_BEG);
1039 TOKEN2CHAR(tXSTRING_BEG);
1040 TOKEN2CHAR(tREGEXP_BEG);
1041 TOKEN2CHAR(tWORDS_BEG);
1042 TOKEN2CHAR(tQWORDS_BEG);
1043 TOKEN2CHAR(tSYMBOLS_BEG);
1044 TOKEN2CHAR(tQSYMBOLS_BEG);
1045 TOKEN2CHAR(tSTRING_END);
1046 TOKEN2CHAR(tSTRING_DEND);
1047 TOKEN2CHAR(tSTRING_DBEG);
1048 TOKEN2CHAR(tSTRING_DVAR);
1049 TOKEN2CHAR(tLAMBEG);
1050 TOKEN2CHAR(tLABEL_END);
1051 TOKEN2CHAR(tIGNORED_NL);
1052 TOKEN2CHAR(tCOMMENT);
1053 TOKEN2CHAR(tEMBDOC_BEG);
1054 TOKEN2CHAR(tEMBDOC);
1055 TOKEN2CHAR(tEMBDOC_END);
1056 TOKEN2CHAR(tHEREDOC_BEG);
1057 TOKEN2CHAR(tHEREDOC_END);
1058 TOKEN2CHAR(k__END__);
1059 TOKEN2CHAR(tLOWEST);
1060 TOKEN2CHAR(tUMINUS_NUM);
1061 TOKEN2CHAR(tLAST_TOKEN);
1062#undef TOKEN2CHAR
1063#undef TOKEN2CHAR2
1064 }
1065
1066 rb_bug("parser_token2id: unknown token %d", tok);
1067
1069}
1070#else
1071static void
1072push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1073{
1074}
1075
1076static void
1077pop_end_expect_token_locations(struct parser_params *p)
1078{
1079}
1080#endif
1081
1082RBIMPL_ATTR_NONNULL((1, 2, 3))
1083static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1084RBIMPL_ATTR_NONNULL((1, 2))
1085static int parser_yyerror0(struct parser_params*, const char*);
1086#define yyerror0(msg) parser_yyerror0(p, (msg))
1087#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1088#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1089#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1090#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1091#define lex_eol_p(p) lex_eol_n_p(p, 0)
1092#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1093#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1094#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1095
1096static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1097static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1098static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1099static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1100static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1101
1102#ifdef RIPPER
1103#define compile_for_eval (0)
1104#else
1105#define compile_for_eval (p->parent_iseq != 0)
1106#endif
1107
1108#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1109
1110#define CALL_Q_P(q) ((q) == tANDDOT)
1111#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1112
1113#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1114
1115static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1116
1117static inline void
1118rb_discard_node(struct parser_params *p, NODE *n)
1119{
1120 rb_ast_delete_node(p->ast, n);
1121}
1122
1123static 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);
1124static 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);
1125static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1126static 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);
1127static 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);
1128static 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);
1129static 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);
1130static 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);
1131static 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);
1132static 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);
1133static 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);
1134static 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);
1135static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1136static 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);
1137static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1138static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1139static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1140static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1141static 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);
1142static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1143static 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);
1144static 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);
1145static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1146static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1147static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1148static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1149static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1150static 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);
1151static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1152static 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);
1153static 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);
1154static 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);
1155static 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);
1156static 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);
1157static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1158static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1159static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1160static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1161static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1162static 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);
1163static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1164static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1165static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1166static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1167static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1168static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1169static 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);
1170static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1171static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1172static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1173static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1174static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1175static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1176static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1177static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1178static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1179static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1180static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1181static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1182static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1183static 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);
1184static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1185static 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);
1186static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1187static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1188static 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);
1189static 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);
1190static 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);
1191static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1192static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1193static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1194static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1195static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1196static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1197static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1198static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1199static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1200static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1201static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1202static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1203static 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);
1204static 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);
1205static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1206static 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);
1207static 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);
1208static 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);
1209static 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);
1210static 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);
1211static 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);
1212static 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);
1213static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1214static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1215static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1216static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1217static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1218static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1219static 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);
1220static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1221static 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);
1222static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1223static 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);
1224static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1225static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1226static 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);
1227static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1228static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1229static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1230
1231#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1232#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1233#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1234#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)
1235#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)
1236#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1237#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1238#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1239#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)
1240#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)
1241#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)
1242#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)
1243#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1244#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)
1245#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1246#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1247#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1248#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1249#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1250#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1251#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1252#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1253#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1254#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1255#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1256#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1257#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1258#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1259#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1260#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)
1261#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)
1262#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1263#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1264#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1265#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1266#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1267#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1268#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1269#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1270#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)
1271#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1272#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1273#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1274#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1275#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1276#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1277#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)
1278#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1279#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1280#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1281#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1282#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1283#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1284#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1285#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1286#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1287#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1288#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1289#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1290#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1291#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1292#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1293#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1294#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1295#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1296#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1297#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1298#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)
1299#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1300#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1301#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1302#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1303#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1304#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1305#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1306#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1307#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1308#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1309#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1310#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1311#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1312#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1313#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1314#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)
1315#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1316#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)
1317#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1318#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1319#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1320#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1321#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1322#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1323#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1324#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1325#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1326#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1327#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)
1328#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1329#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1330#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1331#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)
1332#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1333#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1334#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1335#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1336#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1337#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1338#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1339
1340enum internal_node_type {
1341 NODE_INTERNAL_ONLY = NODE_LAST,
1342 NODE_DEF_TEMP,
1343 NODE_EXITS,
1344 NODE_INTERNAL_LAST
1345};
1346
1347static const char *
1348parser_node_name(int node)
1349{
1350 switch (node) {
1351 case NODE_DEF_TEMP:
1352 return "NODE_DEF_TEMP";
1353 case NODE_EXITS:
1354 return "NODE_EXITS";
1355 default:
1356 return ruby_node_name(node);
1357 }
1358}
1359
1360/* This node is parse.y internal */
1362 NODE node;
1363
1364 /* for NODE_DEFN/NODE_DEFS */
1365
1366 struct RNode *nd_def;
1367 ID nd_mid;
1368
1369 struct {
1370 int max_numparam;
1371 NODE *numparam_save;
1372 struct lex_context ctxt;
1373 } save;
1374};
1375
1376#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1377
1378static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1379static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1380static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1381static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1382static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1383
1384#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1385#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1386#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1387#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1388
1389/* Make a new internal node, which should not be appeared in the
1390 * result AST and does not have node_id and location. */
1391static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1392#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1393
1394static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1395
1396static int
1397parser_get_node_id(struct parser_params *p)
1398{
1399 int node_id = p->node_id;
1400 p->node_id++;
1401 return node_id;
1402}
1403
1404static void
1405anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1406{
1407 if (id == tANDDOT) {
1408 yyerror1(loc, "&. inside multiple assignment destination");
1409 }
1410}
1411
1412static inline void
1413set_line_body(NODE *body, int line)
1414{
1415 if (!body) return;
1416 switch (nd_type(body)) {
1417 case NODE_RESCUE:
1418 case NODE_ENSURE:
1419 nd_set_line(body, line);
1420 }
1421}
1422
1423static void
1424set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1425{
1426 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1427 nd_set_line(node, beg->end_pos.lineno);
1428}
1429
1430static NODE *
1431last_expr_node(NODE *expr)
1432{
1433 while (expr) {
1434 if (nd_type_p(expr, NODE_BLOCK)) {
1435 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1436 }
1437 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1438 expr = RNODE_BEGIN(expr)->nd_body;
1439 }
1440 else {
1441 break;
1442 }
1443 }
1444 return expr;
1445}
1446
1447#ifndef RIPPER
1448#define yyparse ruby_yyparse
1449#endif
1450
1451static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1452static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1453static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1454static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1455static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1456static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1457
1458static NODE *newline_node(NODE*);
1459static void fixpos(NODE*,NODE*);
1460
1461static int value_expr(struct parser_params*,NODE*);
1462static void void_expr(struct parser_params*,NODE*);
1463static NODE *remove_begin(NODE*);
1464static NODE *void_stmts(struct parser_params*,NODE*);
1465static void reduce_nodes(struct parser_params*,NODE**);
1466static void block_dup_check(struct parser_params*,NODE*,NODE*);
1467
1468static NODE *block_append(struct parser_params*,NODE*,NODE*);
1469static NODE *list_append(struct parser_params*,NODE*,NODE*);
1470static NODE *list_concat(NODE*,NODE*);
1471static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1472static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1473static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1474static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1475static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1476static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1477static NODE *str2dstr(struct parser_params*,NODE*);
1478static NODE *evstr2dstr(struct parser_params*,NODE*);
1479static NODE *splat_array(NODE*);
1480static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1481
1482static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1483static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1484static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1485static 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);
1486static 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;}
1487static NODE *command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc);
1488
1489static bool args_info_empty_p(struct rb_args_info *args);
1490static 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*);
1491static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1492static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1493static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1494static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1495static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1496static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1497static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1498
1499static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1500static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1501
1502static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1503static void no_blockarg(struct parser_params*,NODE*);
1504static NODE *ret_args(struct parser_params*,NODE*);
1505static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1506static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1507
1508static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1509static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1510
1511static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1512static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1513
1514static VALUE rb_backref_error(struct parser_params*,NODE*);
1515static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1516
1517static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1518static 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);
1519static 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);
1520static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1521static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1522
1523static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1524
1525static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1526static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1527
1528static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1529static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1530
1531static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1532
1533static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1534
1535#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1536
1537static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1538
1539static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1540
1541static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1542
1543static rb_ast_id_table_t *local_tbl(struct parser_params*);
1544
1545static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1546static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1547
1548static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1549static NODE *heredoc_dedent(struct parser_params*,NODE*);
1550
1551static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1552
1553static 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);
1554
1555#ifdef RIPPER
1556#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1557#define set_value(val) (p->s_lvalue = val)
1558static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1559static int id_is_var(struct parser_params *p, ID id);
1560#endif
1561
1562RUBY_SYMBOL_EXPORT_BEGIN
1563VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1564int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1565enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1566VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1567void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1568PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1569YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1570YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1571YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1572YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1573YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1574YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1575void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1576RUBY_SYMBOL_EXPORT_END
1577
1578static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1579static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1580static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1581static VALUE formal_argument_error(struct parser_params*, ID);
1582static ID shadowing_lvar(struct parser_params*,ID);
1583static void new_bv(struct parser_params*,ID);
1584
1585static void local_push(struct parser_params*,int);
1586static void local_pop(struct parser_params*);
1587static void local_var(struct parser_params*, ID);
1588static void arg_var(struct parser_params*, ID);
1589static int local_id(struct parser_params *p, ID id);
1590static int local_id_ref(struct parser_params*, ID, ID **);
1591#define internal_id rb_parser_internal_id
1592ID internal_id(struct parser_params*);
1593static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1594static int check_forwarding_args(struct parser_params*);
1595static void add_forwarding_args(struct parser_params *p);
1596static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1597
1598static const struct vtable *dyna_push(struct parser_params *);
1599static void dyna_pop(struct parser_params*, const struct vtable *);
1600static int dyna_in_block(struct parser_params*);
1601#define dyna_var(p, id) local_var(p, id)
1602static int dvar_defined(struct parser_params*, ID);
1603#define dvar_defined_ref rb_parser_dvar_defined_ref
1604int dvar_defined_ref(struct parser_params*, ID, ID**);
1605static int dvar_curr(struct parser_params*,ID);
1606
1607static int lvar_defined(struct parser_params*, ID);
1608
1609static NODE *numparam_push(struct parser_params *p);
1610static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1611
1612#define METHOD_NOT '!'
1613
1614#define idFWD_REST '*'
1615#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1616#define idFWD_BLOCK '&'
1617#define idFWD_ALL idDot3
1618#define arg_FWD_BLOCK idFWD_BLOCK
1619
1620#define RE_ONIG_OPTION_IGNORECASE 1
1621#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1622#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1623#define RE_OPTION_ONCE (1<<16)
1624#define RE_OPTION_ENCODING_SHIFT 8
1625#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1626#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1627#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1628#define RE_OPTION_MASK 0xff
1629#define RE_OPTION_ARG_ENCODING_NONE 32
1630
1631#define CHECK_LITERAL_WHEN (st_table *)1
1632#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1633
1634#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1635RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1636
1637#define TOKEN2ID(tok) ( \
1638 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1639 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1640 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1641 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1642 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1643 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1644 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1645
1646/****** Ripper *******/
1647
1648#ifdef RIPPER
1649
1650#include "eventids1.h"
1651#include "eventids2.h"
1652
1653extern const struct ripper_parser_ids ripper_parser_ids;
1654
1655static VALUE ripper_dispatch0(struct parser_params*,ID);
1656static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1657static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1658static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1659static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1660static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1661static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1662void ripper_error(struct parser_params *p);
1663
1664#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1665#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1666#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1667#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1668#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1669#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1670#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1671
1672#define yyparse ripper_yyparse
1673
1674static VALUE
1675aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1676{
1677 if (!NIL_P(pre_arg)) {
1678 if (!NIL_P(pre_args)) {
1679 rb_ary_unshift(pre_args, pre_arg);
1680 }
1681 else {
1682 pre_args = rb_ary_new_from_args(1, pre_arg);
1683 }
1684 }
1685 return pre_args;
1686}
1687
1688#define ID2VAL(id) STATIC_ID2SYM(id)
1689#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1690#endif /* RIPPER */
1691
1692#define KWD2EID(t, v) keyword_##t
1693
1694static NODE *
1695new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1696{
1697 body = remove_begin(body);
1698 reduce_nodes(p, &body);
1699 NODE *n = NEW_SCOPE(args, body, parent, loc);
1700 nd_set_line(n, loc->end_pos.lineno);
1701 set_line_body(body, loc->beg_pos.lineno);
1702 return n;
1703}
1704
1705static NODE *
1706rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1707 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1708{
1709 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1710 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1711 loc.beg_pos = arg_loc->beg_pos;
1712 return NEW_RESCUE(arg, rescue, 0, &loc);
1713}
1714
1715static NODE *add_block_exit(struct parser_params *p, NODE *node);
1716static rb_node_exits_t *init_block_exit(struct parser_params *p);
1717static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1718static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1719static void clear_block_exit(struct parser_params *p, bool error);
1720
1721static void
1722next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1723{
1724 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1725}
1726
1727static void
1728restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1729{
1730 /* See: def_name action */
1731 struct lex_context ctxt = temp->save.ctxt;
1732 p->ctxt.in_def = ctxt.in_def;
1733 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1734 p->ctxt.in_rescue = ctxt.in_rescue;
1735 p->max_numparam = temp->save.max_numparam;
1736 numparam_pop(p, temp->save.numparam_save);
1737 clear_block_exit(p, true);
1738}
1739
1740static void
1741endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1742{
1743 if (is_attrset_id(mid)) {
1744 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1745 }
1746 token_info_drop(p, "def", loc->beg_pos);
1747}
1748
1749#define debug_token_line(p, name, line) do { \
1750 if (p->debug) { \
1751 const char *const pcur = p->lex.pcur; \
1752 const char *const ptok = p->lex.ptok; \
1753 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1754 line, p->ruby_sourceline, \
1755 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1756 } \
1757 } while (0)
1758
1759#define begin_definition(k, loc_beg, loc_end) \
1760 do { \
1761 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1762 /* singleton class */ \
1763 p->ctxt.cant_return = !p->ctxt.in_def; \
1764 p->ctxt.in_def = 0; \
1765 } \
1766 else if (p->ctxt.in_def) { \
1767 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1768 yyerror1(&loc, k " definition in method body"); \
1769 } \
1770 else { \
1771 p->ctxt.cant_return = 1; \
1772 } \
1773 local_push(p, 0); \
1774 } while (0)
1775
1776#ifndef RIPPER
1777# define ifndef_ripper(x) (x)
1778# define ifdef_ripper(r,x) (x)
1779#else
1780# define ifndef_ripper(x)
1781# define ifdef_ripper(r,x) (r)
1782#endif
1783
1784# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1785# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1786# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1787# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1788# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1789# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1790# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1791# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1792# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1793# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1794# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1795# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1796# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1797# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1798# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1799# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1800# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1801# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1802# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1803# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1804#ifdef RIPPER
1805extern const ID id_warn, id_warning, id_gets, id_assoc;
1806# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1807# define WARN_S_L(s,l) STR_NEW(s,l)
1808# define WARN_S(s) STR_NEW2(s)
1809# define WARN_I(i) INT2NUM(i)
1810# define WARN_ID(i) rb_id2str(i)
1811# define PRIsWARN PRIsVALUE
1812# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1813# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1814# ifdef HAVE_VA_ARGS_MACRO
1815# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1816# else
1817# define WARN_CALL rb_funcall
1818# endif
1819# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1820# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1821# ifdef HAVE_VA_ARGS_MACRO
1822# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1823# else
1824# define WARNING_CALL rb_funcall
1825# endif
1826# define compile_error ripper_compile_error
1827#else
1828# define WARN_S_L(s,l) s
1829# define WARN_S(s) s
1830# define WARN_I(i) i
1831# define WARN_ID(i) rb_id2name(i)
1832# define PRIsWARN PRIsVALUE
1833# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1834# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1835# define WARN_CALL rb_compile_warn
1836# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1837# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1838# define WARNING_CALL rb_compile_warning
1839PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1840# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1841#endif
1842
1843#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1844
1845static NODE *
1846add_block_exit(struct parser_params *p, NODE *node)
1847{
1848 if (!node) {
1849 compile_error(p, "unexpected null node");
1850 return 0;
1851 }
1852 switch (nd_type(node)) {
1853 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1854 default:
1855 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1856 return node;
1857 }
1858 if (!p->ctxt.in_defined) {
1859 rb_node_exits_t *exits = p->exits;
1860 if (exits) {
1861 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1862 exits->nd_stts = node;
1863 }
1864 }
1865 return node;
1866}
1867
1868static rb_node_exits_t *
1869init_block_exit(struct parser_params *p)
1870{
1871 rb_node_exits_t *old = p->exits;
1872 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1873 exits->nd_chain = 0;
1874 exits->nd_stts = RNODE(exits);
1875 p->exits = exits;
1876 return old;
1877}
1878
1879static rb_node_exits_t *
1880allow_block_exit(struct parser_params *p)
1881{
1882 rb_node_exits_t *exits = p->exits;
1883 p->exits = 0;
1884 return exits;
1885}
1886
1887static void
1888restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1889{
1890 p->exits = exits;
1891}
1892
1893static void
1894clear_block_exit(struct parser_params *p, bool error)
1895{
1896 rb_node_exits_t *exits = p->exits;
1897 if (!exits) return;
1898 if (error) {
1899 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1900 switch (nd_type(e)) {
1901 case NODE_BREAK:
1902 yyerror1(&e->nd_loc, "Invalid break");
1903 break;
1904 case NODE_NEXT:
1905 yyerror1(&e->nd_loc, "Invalid next");
1906 break;
1907 case NODE_REDO:
1908 yyerror1(&e->nd_loc, "Invalid redo");
1909 break;
1910 default:
1911 yyerror1(&e->nd_loc, "unexpected node");
1912 goto end_checks; /* no nd_chain */
1913 }
1914 }
1915 end_checks:;
1916 }
1917 exits->nd_stts = RNODE(exits);
1918 exits->nd_chain = 0;
1919}
1920
1921#define WARN_EOL(tok) \
1922 (looking_at_eol_p(p) ? \
1923 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1924 (void)0)
1925static int looking_at_eol_p(struct parser_params *p);
1926
1927static NODE *
1928get_nd_value(struct parser_params *p, NODE *node)
1929{
1930 switch (nd_type(node)) {
1931 case NODE_GASGN:
1932 return RNODE_GASGN(node)->nd_value;
1933 case NODE_IASGN:
1934 return RNODE_IASGN(node)->nd_value;
1935 case NODE_LASGN:
1936 return RNODE_LASGN(node)->nd_value;
1937 case NODE_DASGN:
1938 return RNODE_DASGN(node)->nd_value;
1939 case NODE_MASGN:
1940 return RNODE_MASGN(node)->nd_value;
1941 case NODE_CVASGN:
1942 return RNODE_CVASGN(node)->nd_value;
1943 case NODE_CDECL:
1944 return RNODE_CDECL(node)->nd_value;
1945 default:
1946 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1947 return 0;
1948 }
1949}
1950
1951static void
1952set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1953{
1954 switch (nd_type(node)) {
1955 case NODE_CDECL:
1956 RNODE_CDECL(node)->nd_value = rhs;
1957 break;
1958 case NODE_GASGN:
1959 RNODE_GASGN(node)->nd_value = rhs;
1960 break;
1961 case NODE_IASGN:
1962 RNODE_IASGN(node)->nd_value = rhs;
1963 break;
1964 case NODE_LASGN:
1965 RNODE_LASGN(node)->nd_value = rhs;
1966 break;
1967 case NODE_DASGN:
1968 RNODE_DASGN(node)->nd_value = rhs;
1969 break;
1970 case NODE_MASGN:
1971 RNODE_MASGN(node)->nd_value = rhs;
1972 break;
1973 case NODE_CVASGN:
1974 RNODE_CVASGN(node)->nd_value = rhs;
1975 break;
1976 default:
1977 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1978 break;
1979 }
1980}
1981
1982static ID
1983get_nd_vid(struct parser_params *p, NODE *node)
1984{
1985 switch (nd_type(node)) {
1986 case NODE_CDECL:
1987 return RNODE_CDECL(node)->nd_vid;
1988 case NODE_GASGN:
1989 return RNODE_GASGN(node)->nd_vid;
1990 case NODE_IASGN:
1991 return RNODE_IASGN(node)->nd_vid;
1992 case NODE_LASGN:
1993 return RNODE_LASGN(node)->nd_vid;
1994 case NODE_DASGN:
1995 return RNODE_DASGN(node)->nd_vid;
1996 case NODE_CVASGN:
1997 return RNODE_CVASGN(node)->nd_vid;
1998 default:
1999 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
2000 return 0;
2001 }
2002}
2003
2004static NODE *
2005get_nd_args(struct parser_params *p, NODE *node)
2006{
2007 switch (nd_type(node)) {
2008 case NODE_CALL:
2009 return RNODE_CALL(node)->nd_args;
2010 case NODE_OPCALL:
2011 return RNODE_OPCALL(node)->nd_args;
2012 case NODE_FCALL:
2013 return RNODE_FCALL(node)->nd_args;
2014 case NODE_QCALL:
2015 return RNODE_QCALL(node)->nd_args;
2016 case NODE_SUPER:
2017 return RNODE_SUPER(node)->nd_args;
2018 case NODE_VCALL:
2019 case NODE_ZSUPER:
2020 case NODE_YIELD:
2021 case NODE_RETURN:
2022 case NODE_BREAK:
2023 case NODE_NEXT:
2024 return 0;
2025 default:
2026 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2027 return 0;
2028 }
2029}
2030
2031static st_index_t
2032djb2(const uint8_t *str, size_t len)
2033{
2034 st_index_t hash = 5381;
2035
2036 for (size_t i = 0; i < len; i++) {
2037 hash = ((hash << 5) + hash) + str[i];
2038 }
2039
2040 return hash;
2041}
2042
2043static st_index_t
2044parser_memhash(const void *ptr, long len)
2045{
2046 return djb2(ptr, len);
2047}
2048
2049#define PARSER_STRING_PTR(str) (str->ptr)
2050#define PARSER_STRING_LEN(str) (str->len)
2051#define PARSER_STRING_END(str) (&str->ptr[str->len])
2052#define STRING_SIZE(str) ((size_t)str->len + 1)
2053#define STRING_TERM_LEN(str) (1)
2054#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2055#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2056 SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2057 str->len = total; \
2058} while (0)
2059#define STRING_SET_LEN(str, n) do { \
2060 (str)->len = (n); \
2061} while (0)
2062#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2063 ((ptrvar) = str->ptr, \
2064 (lenvar) = str->len)
2065
2066static inline int
2067parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2068{
2069 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2070}
2071
2072static rb_parser_string_t *
2073rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2074{
2075 rb_parser_string_t *str;
2076
2077 if (len < 0) {
2078 rb_bug("negative string size (or size too big): %ld", len);
2079 }
2080
2081 str = xcalloc(1, sizeof(rb_parser_string_t));
2082 str->ptr = xcalloc(len + 1, sizeof(char));
2083
2084 if (ptr) {
2085 memcpy(PARSER_STRING_PTR(str), ptr, len);
2086 }
2087 STRING_SET_LEN(str, len);
2088 STRING_TERM_FILL(str);
2089 return str;
2090}
2091
2092static rb_parser_string_t *
2093rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2094{
2095 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2096 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2097 str->enc = enc;
2098 return str;
2099}
2100
2101#ifndef RIPPER
2102rb_parser_string_t *
2103rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2104{
2105 /* Type check */
2106 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2107 RB_GC_GUARD(str);
2108 return ret;
2109}
2110
2111void
2112rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2113{
2114 if (!str) return;
2115 xfree(PARSER_STRING_PTR(str));
2116 xfree(str);
2117}
2118#endif
2119
2120static st_index_t
2121rb_parser_str_hash(rb_parser_string_t *str)
2122{
2123 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2124}
2125
2126static st_index_t
2127rb_char_p_hash(const char *c)
2128{
2129 return parser_memhash((const void *)c, strlen(c));
2130}
2131
2132static size_t
2133rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2134{
2135 return PARSER_STRING_LEN(str);
2136}
2137
2138#ifndef RIPPER
2139static char *
2140rb_parser_string_end(rb_parser_string_t *str)
2141{
2142 return &str->ptr[str->len];
2143}
2144#endif
2145
2146static void
2147rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2148{
2149 str->enc = enc;
2150}
2151
2152static rb_encoding *
2153rb_parser_str_get_encoding(rb_parser_string_t *str)
2154{
2155 return str->enc;
2156}
2157
2158#ifndef RIPPER
2159static bool
2160PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2161{
2162 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2163}
2164#endif
2165
2166static int
2167PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2168{
2169 return str->coderange;
2170}
2171
2172static void
2173PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2174{
2175 str->coderange = coderange;
2176}
2177
2178static void
2179PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2180{
2181 rb_parser_string_set_encoding(str, enc);
2182 PARSER_ENC_CODERANGE_SET(str, cr);
2183}
2184
2185static void
2186PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2187{
2188 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2189}
2190
2191static bool
2192PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2193{
2194 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2195}
2196
2197static bool
2198PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2199{
2200 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2201}
2202
2203static const char *
2204rb_parser_search_nonascii(const char *p, const char *e)
2205{
2206 const char *s = p;
2207
2208 for (; s < e; s++) {
2209 if (*s & 0x80) return s;
2210 }
2211
2212 return NULL;
2213}
2214
2215static int
2216rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2217{
2218 const char *e = ptr + len;
2219
2220 if (enc == rb_ascii8bit_encoding()) {
2221 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2222 ptr = rb_parser_search_nonascii(ptr, e);
2223 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2224 }
2225
2226 /* parser string encoding is always asciicompat */
2227 ptr = rb_parser_search_nonascii(ptr, e);
2228 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2229 for (;;) {
2230 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2231 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2232 ptr += MBCLEN_CHARFOUND_LEN(ret);
2233 if (ptr == e) break;
2234 ptr = rb_parser_search_nonascii(ptr, e);
2235 if (!ptr) break;
2236 }
2237
2238 return RB_PARSER_ENC_CODERANGE_VALID;
2239}
2240
2241static int
2242rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2243{
2244 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2245}
2246
2247static int
2248rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2249{
2250 int cr = PARSER_ENC_CODERANGE(str);
2251
2252 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2253 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2254 PARSER_ENC_CODERANGE_SET(str, cr);
2255 }
2256
2257 return cr;
2258}
2259
2260static rb_parser_string_t *
2261rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2262{
2263 if (rb_parser_str_get_encoding(str) == enc)
2264 return str;
2265 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2266 PARSER_ENC_CODERANGE_CLEAR(str);
2267 }
2268 rb_parser_string_set_encoding(str, enc);
2269 return str;
2270}
2271
2272static bool
2273rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2274{
2275 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2276}
2277
2278static rb_encoding *
2279rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2280{
2281 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2282 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2283
2284 if (enc1 == NULL || enc2 == NULL)
2285 return 0;
2286
2287 if (enc1 == enc2) {
2288 return enc1;
2289 }
2290
2291 if (PARSER_STRING_LEN(str2) == 0)
2292 return enc1;
2293 if (PARSER_STRING_LEN(str1) == 0)
2294 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2295
2296 int cr1, cr2;
2297
2298 cr1 = rb_parser_enc_str_coderange(p, str1);
2299 cr2 = rb_parser_enc_str_coderange(p, str2);
2300
2301 if (cr1 != cr2) {
2302 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2303 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2304 }
2305
2306 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2307 return enc1;
2308 }
2309
2310 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2311 return enc2;
2312 }
2313
2314 return 0;
2315}
2316
2317static void
2318rb_parser_str_modify(rb_parser_string_t *str)
2319{
2320 PARSER_ENC_CODERANGE_CLEAR(str);
2321}
2322
2323static void
2324rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2325{
2326 long capa;
2327 const int termlen = STRING_TERM_LEN(str);
2328
2329 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2330 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2331 }
2332
2333 int cr = PARSER_ENC_CODERANGE(str);
2334 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2335 /* Leave unknown. */
2336 }
2337 else if (len > PARSER_STRING_LEN(str)) {
2338 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2339 }
2340 else if (len < PARSER_STRING_LEN(str)) {
2341 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2342 /* ASCII-only string is keeping after truncated. Valid
2343 * and broken may be invalid or valid, leave unknown. */
2344 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2345 }
2346 }
2347
2348 STRING_SET_LEN(str, len);
2349 STRING_TERM_FILL(str);
2350}
2351
2352static rb_parser_string_t *
2353rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2354{
2355 rb_parser_str_modify(str);
2356 if (len == 0) return 0;
2357
2358 long total, olen, off = -1;
2359 char *sptr;
2360 const int termlen = STRING_TERM_LEN(str);
2361
2362 PARSER_STRING_GETMEM(str, sptr, olen);
2363 if (ptr >= sptr && ptr <= sptr + olen) {
2364 off = ptr - sptr;
2365 }
2366
2367 if (olen > LONG_MAX - len) {
2368 compile_error(p, "string sizes too big");
2369 return 0;
2370 }
2371 total = olen + len;
2372 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2373 sptr = PARSER_STRING_PTR(str);
2374 if (off != -1) {
2375 ptr = sptr + off;
2376 }
2377 memcpy(sptr + olen, ptr, len);
2378 STRING_SET_LEN(str, total);
2379 STRING_TERM_FILL(str);
2380
2381 return str;
2382}
2383
2384#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2385#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2386
2387static rb_parser_string_t *
2388rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2389 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2390{
2391 int str_cr, res_cr;
2392 rb_encoding *str_enc, *res_enc;
2393
2394 str_enc = rb_parser_str_get_encoding(str);
2395 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2396
2397 if (str_enc == ptr_enc) {
2398 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2399 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2400 }
2401 }
2402 else {
2403 /* parser string encoding is always asciicompat */
2404 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2405 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2406 }
2407 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2408 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2409 str_cr = rb_parser_enc_str_coderange(p, str);
2410 }
2411 }
2412 }
2413 if (ptr_cr_ret)
2414 *ptr_cr_ret = ptr_cr;
2415
2416 if (str_enc != ptr_enc &&
2417 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2418 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2419 goto incompatible;
2420 }
2421
2422 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2423 res_enc = str_enc;
2424 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2425 }
2426 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2427 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2428 res_enc = str_enc;
2429 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2430 }
2431 else {
2432 res_enc = ptr_enc;
2433 res_cr = ptr_cr;
2434 }
2435 }
2436 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2437 res_enc = str_enc;
2438 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2439 res_cr = str_cr;
2440 else
2441 res_cr = ptr_cr;
2442 }
2443 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2444 res_enc = str_enc;
2445 res_cr = str_cr;
2446 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2447 }
2448
2449 if (len < 0) {
2450 compile_error(p, "negative string size (or size too big)");
2451 }
2452 parser_str_cat(str, ptr, len);
2453 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2454 return str;
2455
2456 incompatible:
2457 compile_error(p, "incompatible character encodings: %s and %s",
2458 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2460
2461}
2462
2463static rb_parser_string_t *
2464rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2465 rb_encoding *ptr_enc)
2466{
2467 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2468}
2469
2470static rb_parser_string_t *
2471rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2472{
2473 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2474
2475 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2476 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2477
2478 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2479
2480 return str;
2481}
2482
2483static rb_parser_string_t *
2484rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2485{
2486 if (len < 0) {
2487 rb_bug("negative string size (or size too big)");
2488 }
2489
2490 long slen = PARSER_STRING_LEN(str);
2491
2492 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2493 PARSER_ENC_CODERANGE_CLEAR(str);
2494 }
2495
2496 {
2497 long capa;
2498 const int termlen = STRING_TERM_LEN(str);
2499
2500 if ((capa = slen) < len) {
2501 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2502 }
2503 else if (len == slen) return str;
2504 STRING_SET_LEN(str, len);
2505 STRING_TERM_FILL(str);
2506 }
2507 return str;
2508}
2509
2510# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2511 ((ptrvar) = str->ptr, \
2512 (lenvar) = str->len, \
2513 (encvar) = str->enc)
2514
2515static int
2516rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2517{
2518 long len1, len2;
2519 const char *ptr1, *ptr2;
2520 rb_encoding *enc1, *enc2;
2521
2522 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2523 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2524
2525 return (len1 != len2 ||
2526 enc1 != enc2 ||
2527 memcmp(ptr1, ptr2, len1) != 0);
2528}
2529
2530static void
2531rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2532{
2533 long i;
2534 if (ary->capa < len) {
2535 ary->capa = len;
2536 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2537 for (i = ary->len; i < len; i++) {
2538 ary->data[i] = 0;
2539 }
2540 }
2541}
2542
2543/*
2544 * Do not call this directly.
2545 * Use rb_parser_ary_new_capa_for_XXX() instead.
2546 */
2547static rb_parser_ary_t *
2548parser_ary_new_capa(rb_parser_t *p, long len)
2549{
2550 if (len < 0) {
2551 rb_bug("negative array size (or size too big): %ld", len);
2552 }
2553 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2554 ary->data_type = 0;
2555 ary->len = 0;
2556 ary->capa = len;
2557 if (0 < len) {
2558 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2559 }
2560 else {
2561 ary->data = NULL;
2562 }
2563 return ary;
2564}
2565
2566#ifndef RIPPER
2567static rb_parser_ary_t *
2568rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2569{
2570 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2571 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2572 return ary;
2573}
2574
2575static rb_parser_ary_t *
2576rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2577{
2578 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2579 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2580 return ary;
2581}
2582#endif
2583
2584static rb_parser_ary_t *
2585rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2586{
2587 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2588 ary->data_type = PARSER_ARY_DATA_NODE;
2589 return ary;
2590}
2591
2592/*
2593 * Do not call this directly.
2594 * Use rb_parser_ary_push_XXX() instead.
2595 */
2596static rb_parser_ary_t *
2597parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2598{
2599 if (ary->len == ary->capa) {
2600 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2601 }
2602 ary->data[ary->len++] = val;
2603 return ary;
2604}
2605
2606#ifndef RIPPER
2607static rb_parser_ary_t *
2608rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2609{
2610 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2611 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2612 }
2613 return parser_ary_push(p, ary, val);
2614}
2615
2616static rb_parser_ary_t *
2617rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2618{
2619 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2620 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2621 }
2622 return parser_ary_push(p, ary, val);
2623}
2624#endif
2625
2626static rb_parser_ary_t *
2627rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2628{
2629 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2630 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2631 }
2632 return parser_ary_push(p, ary, val);
2633}
2634
2635#ifndef RIPPER
2636static void
2637rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2638{
2639 if (!token) return;
2640 rb_parser_string_free(p, token->str);
2641 xfree(token);
2642}
2643
2644static void
2645rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2646{
2647# define foreach_ary(ptr) \
2648 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2649 ptr < end_ary_data; ptr++)
2650 switch (ary->data_type) {
2651 case PARSER_ARY_DATA_AST_TOKEN:
2652 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2653 break;
2654 case PARSER_ARY_DATA_SCRIPT_LINE:
2655 foreach_ary(data) {rb_parser_string_free(p, *data);}
2656 break;
2657 case PARSER_ARY_DATA_NODE:
2658 /* Do nothing because nodes are freed when rb_ast_t is freed */
2659 break;
2660 default:
2661 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2662 break;
2663 }
2664# undef foreach_ary
2665 xfree(ary->data);
2666 xfree(ary);
2667}
2668
2669#endif /* !RIPPER */
2670
2671#line 2672 "parse.c"
2672
2673# ifndef YY_CAST
2674# ifdef __cplusplus
2675# define YY_CAST(Type, Val) static_cast<Type> (Val)
2676# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2677# else
2678# define YY_CAST(Type, Val) ((Type) (Val))
2679# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2680# endif
2681# endif
2682# ifndef YY_NULLPTR
2683# if defined __cplusplus
2684# if 201103L <= __cplusplus
2685# define YY_NULLPTR nullptr
2686# else
2687# define YY_NULLPTR 0
2688# endif
2689# else
2690# define YY_NULLPTR ((void*)0)
2691# endif
2692# endif
2693
2694#include "parse.h"
2695/* Symbol kind. */
2696enum yysymbol_kind_t
2697{
2698 YYSYMBOL_YYEMPTY = -2,
2699 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2700 YYSYMBOL_YYerror = 1, /* error */
2701 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2702 YYSYMBOL_keyword_class = 3, /* "'class'" */
2703 YYSYMBOL_keyword_module = 4, /* "'module'" */
2704 YYSYMBOL_keyword_def = 5, /* "'def'" */
2705 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2706 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2707 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2708 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2709 YYSYMBOL_keyword_end = 10, /* "'end'" */
2710 YYSYMBOL_keyword_if = 11, /* "'if'" */
2711 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2712 YYSYMBOL_keyword_then = 13, /* "'then'" */
2713 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2714 YYSYMBOL_keyword_else = 15, /* "'else'" */
2715 YYSYMBOL_keyword_case = 16, /* "'case'" */
2716 YYSYMBOL_keyword_when = 17, /* "'when'" */
2717 YYSYMBOL_keyword_while = 18, /* "'while'" */
2718 YYSYMBOL_keyword_until = 19, /* "'until'" */
2719 YYSYMBOL_keyword_for = 20, /* "'for'" */
2720 YYSYMBOL_keyword_break = 21, /* "'break'" */
2721 YYSYMBOL_keyword_next = 22, /* "'next'" */
2722 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2723 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2724 YYSYMBOL_keyword_in = 25, /* "'in'" */
2725 YYSYMBOL_keyword_do = 26, /* "'do'" */
2726 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2727 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2728 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2729 YYSYMBOL_keyword_return = 30, /* "'return'" */
2730 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2731 YYSYMBOL_keyword_super = 32, /* "'super'" */
2732 YYSYMBOL_keyword_self = 33, /* "'self'" */
2733 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2734 YYSYMBOL_keyword_true = 35, /* "'true'" */
2735 YYSYMBOL_keyword_false = 36, /* "'false'" */
2736 YYSYMBOL_keyword_and = 37, /* "'and'" */
2737 YYSYMBOL_keyword_or = 38, /* "'or'" */
2738 YYSYMBOL_keyword_not = 39, /* "'not'" */
2739 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2740 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2741 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2742 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2743 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2744 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2745 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2746 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2747 YYSYMBOL_keyword_END = 48, /* "'END'" */
2748 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2749 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2750 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2751 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2752 YYSYMBOL_tFID = 53, /* "method" */
2753 YYSYMBOL_tGVAR = 54, /* "global variable" */
2754 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2755 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2756 YYSYMBOL_tCVAR = 57, /* "class variable" */
2757 YYSYMBOL_tLABEL = 58, /* "label" */
2758 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2759 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2760 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2761 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2762 YYSYMBOL_tCHAR = 63, /* "char literal" */
2763 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2764 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2765 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2766 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2767 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2768 YYSYMBOL_69_ = 69, /* '.' */
2769 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2770 YYSYMBOL_tSP = 71, /* "escaped space" */
2771 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2772 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2773 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2774 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2775 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2776 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2777 YYSYMBOL_tPOW = 78, /* "**" */
2778 YYSYMBOL_tCMP = 79, /* "<=>" */
2779 YYSYMBOL_tEQ = 80, /* "==" */
2780 YYSYMBOL_tEQQ = 81, /* "===" */
2781 YYSYMBOL_tNEQ = 82, /* "!=" */
2782 YYSYMBOL_tGEQ = 83, /* ">=" */
2783 YYSYMBOL_tLEQ = 84, /* "<=" */
2784 YYSYMBOL_tANDOP = 85, /* "&&" */
2785 YYSYMBOL_tOROP = 86, /* "||" */
2786 YYSYMBOL_tMATCH = 87, /* "=~" */
2787 YYSYMBOL_tNMATCH = 88, /* "!~" */
2788 YYSYMBOL_tDOT2 = 89, /* ".." */
2789 YYSYMBOL_tDOT3 = 90, /* "..." */
2790 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2791 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2792 YYSYMBOL_tAREF = 93, /* "[]" */
2793 YYSYMBOL_tASET = 94, /* "[]=" */
2794 YYSYMBOL_tLSHFT = 95, /* "<<" */
2795 YYSYMBOL_tRSHFT = 96, /* ">>" */
2796 YYSYMBOL_tANDDOT = 97, /* "&." */
2797 YYSYMBOL_tCOLON2 = 98, /* "::" */
2798 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2799 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2800 YYSYMBOL_tASSOC = 101, /* "=>" */
2801 YYSYMBOL_tLPAREN = 102, /* "(" */
2802 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2803 YYSYMBOL_tLBRACK = 104, /* "[" */
2804 YYSYMBOL_tLBRACE = 105, /* "{" */
2805 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2806 YYSYMBOL_tSTAR = 107, /* "*" */
2807 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2808 YYSYMBOL_tAMPER = 109, /* "&" */
2809 YYSYMBOL_tLAMBDA = 110, /* "->" */
2810 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2811 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2812 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2813 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2814 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2815 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2816 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2817 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2818 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2819 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2820 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2821 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2822 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2823 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2824 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2825 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2826 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2827 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2828 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2829 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2830 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2831 YYSYMBOL_k__END__ = 132, /* k__END__ */
2832 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2833 YYSYMBOL_134_ = 134, /* '=' */
2834 YYSYMBOL_135_ = 135, /* '?' */
2835 YYSYMBOL_136_ = 136, /* ':' */
2836 YYSYMBOL_137_ = 137, /* '>' */
2837 YYSYMBOL_138_ = 138, /* '<' */
2838 YYSYMBOL_139_ = 139, /* '|' */
2839 YYSYMBOL_140_ = 140, /* '^' */
2840 YYSYMBOL_141_ = 141, /* '&' */
2841 YYSYMBOL_142_ = 142, /* '+' */
2842 YYSYMBOL_143_ = 143, /* '-' */
2843 YYSYMBOL_144_ = 144, /* '*' */
2844 YYSYMBOL_145_ = 145, /* '/' */
2845 YYSYMBOL_146_ = 146, /* '%' */
2846 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2847 YYSYMBOL_148_ = 148, /* '!' */
2848 YYSYMBOL_149_ = 149, /* '~' */
2849 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2850 YYSYMBOL_151_ = 151, /* '{' */
2851 YYSYMBOL_152_ = 152, /* '}' */
2852 YYSYMBOL_153_ = 153, /* '[' */
2853 YYSYMBOL_154_n_ = 154, /* '\n' */
2854 YYSYMBOL_155_ = 155, /* ',' */
2855 YYSYMBOL_156_ = 156, /* '`' */
2856 YYSYMBOL_157_ = 157, /* '(' */
2857 YYSYMBOL_158_ = 158, /* ')' */
2858 YYSYMBOL_159_ = 159, /* ']' */
2859 YYSYMBOL_160_ = 160, /* ';' */
2860 YYSYMBOL_161_ = 161, /* ' ' */
2861 YYSYMBOL_YYACCEPT = 162, /* $accept */
2862 YYSYMBOL_option_terms = 163, /* option_terms */
2863 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2864 YYSYMBOL_165_1 = 165, /* $@1 */
2865 YYSYMBOL_program = 166, /* program */
2866 YYSYMBOL_top_stmts = 167, /* top_stmts */
2867 YYSYMBOL_top_stmt = 168, /* top_stmt */
2868 YYSYMBOL_block_open = 169, /* block_open */
2869 YYSYMBOL_begin_block = 170, /* begin_block */
2870 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2871 YYSYMBOL_172_2 = 172, /* $@2 */
2872 YYSYMBOL_173_3 = 173, /* $@3 */
2873 YYSYMBOL_bodystmt = 174, /* bodystmt */
2874 YYSYMBOL_175_4 = 175, /* $@4 */
2875 YYSYMBOL_stmts = 176, /* stmts */
2876 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2877 YYSYMBOL_178_5 = 178, /* $@5 */
2878 YYSYMBOL_allow_exits = 179, /* allow_exits */
2879 YYSYMBOL_k_END = 180, /* k_END */
2880 YYSYMBOL_181_6 = 181, /* $@6 */
2881 YYSYMBOL_stmt = 182, /* stmt */
2882 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2883 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2884 YYSYMBOL_command_asgn = 185, /* command_asgn */
2885 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2886 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2887 YYSYMBOL_endless_command = 188, /* endless_command */
2888 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2889 YYSYMBOL_command_rhs = 190, /* command_rhs */
2890 YYSYMBOL_expr = 191, /* expr */
2891 YYSYMBOL_192_7 = 192, /* $@7 */
2892 YYSYMBOL_193_8 = 193, /* $@8 */
2893 YYSYMBOL_def_name = 194, /* def_name */
2894 YYSYMBOL_defn_head = 195, /* defn_head */
2895 YYSYMBOL_196_9 = 196, /* $@9 */
2896 YYSYMBOL_defs_head = 197, /* defs_head */
2897 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2898 YYSYMBOL_expr_value = 199, /* expr_value */
2899 YYSYMBOL_200_10 = 200, /* $@10 */
2900 YYSYMBOL_201_11 = 201, /* $@11 */
2901 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2902 YYSYMBOL_command_call = 203, /* command_call */
2903 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2904 YYSYMBOL_command_call_value = 205, /* command_call_value */
2905 YYSYMBOL_block_command = 206, /* block_command */
2906 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2907 YYSYMBOL_fcall = 208, /* fcall */
2908 YYSYMBOL_command = 209, /* command */
2909 YYSYMBOL_mlhs = 210, /* mlhs */
2910 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2911 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2912 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2913 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2914 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2915 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2916 YYSYMBOL_lhs = 217, /* lhs */
2917 YYSYMBOL_cname = 218, /* cname */
2918 YYSYMBOL_cpath = 219, /* cpath */
2919 YYSYMBOL_fname = 220, /* fname */
2920 YYSYMBOL_fitem = 221, /* fitem */
2921 YYSYMBOL_undef_list = 222, /* undef_list */
2922 YYSYMBOL_223_12 = 223, /* $@12 */
2923 YYSYMBOL_op = 224, /* op */
2924 YYSYMBOL_reswords = 225, /* reswords */
2925 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2926 YYSYMBOL_arg = 227, /* arg */
2927 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2928 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2929 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2930 YYSYMBOL_ternary = 231, /* ternary */
2931 YYSYMBOL_endless_arg = 232, /* endless_arg */
2932 YYSYMBOL_relop = 233, /* relop */
2933 YYSYMBOL_rel_expr = 234, /* rel_expr */
2934 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2935 YYSYMBOL_begin_defined = 236, /* begin_defined */
2936 YYSYMBOL_after_rescue = 237, /* after_rescue */
2937 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2938 YYSYMBOL_arg_value = 239, /* arg_value */
2939 YYSYMBOL_aref_args = 240, /* aref_args */
2940 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2941 YYSYMBOL_paren_args = 242, /* paren_args */
2942 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2943 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2944 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2945 YYSYMBOL_call_args = 246, /* call_args */
2946 YYSYMBOL_247_13 = 247, /* $@13 */
2947 YYSYMBOL_command_args = 248, /* command_args */
2948 YYSYMBOL_block_arg = 249, /* block_arg */
2949 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2950 YYSYMBOL_args = 251, /* args */
2951 YYSYMBOL_arg_splat = 252, /* arg_splat */
2952 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2953 YYSYMBOL_mrhs = 254, /* mrhs */
2954 YYSYMBOL_primary = 255, /* primary */
2955 YYSYMBOL_256_14 = 256, /* $@14 */
2956 YYSYMBOL_257_15 = 257, /* $@15 */
2957 YYSYMBOL_258_16 = 258, /* @16 */
2958 YYSYMBOL_259_17 = 259, /* @17 */
2959 YYSYMBOL_260_18 = 260, /* $@18 */
2960 YYSYMBOL_261_19 = 261, /* $@19 */
2961 YYSYMBOL_262_20 = 262, /* $@20 */
2962 YYSYMBOL_263_21 = 263, /* $@21 */
2963 YYSYMBOL_264_22 = 264, /* $@22 */
2964 YYSYMBOL_265_23 = 265, /* $@23 */
2965 YYSYMBOL_266_24 = 266, /* $@24 */
2966 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2967 YYSYMBOL_primary_value = 268, /* primary_value */
2968 YYSYMBOL_k_begin = 269, /* k_begin */
2969 YYSYMBOL_k_if = 270, /* k_if */
2970 YYSYMBOL_k_unless = 271, /* k_unless */
2971 YYSYMBOL_k_while = 272, /* k_while */
2972 YYSYMBOL_k_until = 273, /* k_until */
2973 YYSYMBOL_k_case = 274, /* k_case */
2974 YYSYMBOL_k_for = 275, /* k_for */
2975 YYSYMBOL_k_class = 276, /* k_class */
2976 YYSYMBOL_k_module = 277, /* k_module */
2977 YYSYMBOL_k_def = 278, /* k_def */
2978 YYSYMBOL_k_do = 279, /* k_do */
2979 YYSYMBOL_k_do_block = 280, /* k_do_block */
2980 YYSYMBOL_k_rescue = 281, /* k_rescue */
2981 YYSYMBOL_k_ensure = 282, /* k_ensure */
2982 YYSYMBOL_k_when = 283, /* k_when */
2983 YYSYMBOL_k_else = 284, /* k_else */
2984 YYSYMBOL_k_elsif = 285, /* k_elsif */
2985 YYSYMBOL_k_end = 286, /* k_end */
2986 YYSYMBOL_k_return = 287, /* k_return */
2987 YYSYMBOL_k_yield = 288, /* k_yield */
2988 YYSYMBOL_then = 289, /* then */
2989 YYSYMBOL_do = 290, /* do */
2990 YYSYMBOL_if_tail = 291, /* if_tail */
2991 YYSYMBOL_opt_else = 292, /* opt_else */
2992 YYSYMBOL_for_var = 293, /* for_var */
2993 YYSYMBOL_f_marg = 294, /* f_marg */
2994 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
2995 YYSYMBOL_f_margs = 296, /* f_margs */
2996 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2997 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2998 YYSYMBOL_299_25 = 299, /* $@25 */
2999 YYSYMBOL_f_eq = 300, /* f_eq */
3000 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3001 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3002 YYSYMBOL_args_tail_basic_primary_value = 303, /* args_tail_basic_primary_value */
3003 YYSYMBOL_block_args_tail = 304, /* block_args_tail */
3004 YYSYMBOL_excessed_comma = 305, /* excessed_comma */
3005 YYSYMBOL_f_opt_primary_value = 306, /* f_opt_primary_value */
3006 YYSYMBOL_f_opt_arg_primary_value = 307, /* f_opt_arg_primary_value */
3007 YYSYMBOL_opt_args_tail_block_args_tail = 308, /* opt_args_tail_block_args_tail */
3008 YYSYMBOL_block_param = 309, /* block_param */
3009 YYSYMBOL_opt_block_param_def = 310, /* opt_block_param_def */
3010 YYSYMBOL_block_param_def = 311, /* block_param_def */
3011 YYSYMBOL_opt_block_param = 312, /* opt_block_param */
3012 YYSYMBOL_opt_bv_decl = 313, /* opt_bv_decl */
3013 YYSYMBOL_bv_decls = 314, /* bv_decls */
3014 YYSYMBOL_bvar = 315, /* bvar */
3015 YYSYMBOL_max_numparam = 316, /* max_numparam */
3016 YYSYMBOL_numparam = 317, /* numparam */
3017 YYSYMBOL_it_id = 318, /* it_id */
3018 YYSYMBOL_319_26 = 319, /* @26 */
3019 YYSYMBOL_320_27 = 320, /* $@27 */
3020 YYSYMBOL_lambda = 321, /* lambda */
3021 YYSYMBOL_f_larglist = 322, /* f_larglist */
3022 YYSYMBOL_lambda_body = 323, /* lambda_body */
3023 YYSYMBOL_324_28 = 324, /* $@28 */
3024 YYSYMBOL_do_block = 325, /* do_block */
3025 YYSYMBOL_block_call = 326, /* block_call */
3026 YYSYMBOL_method_call = 327, /* method_call */
3027 YYSYMBOL_brace_block = 328, /* brace_block */
3028 YYSYMBOL_329_29 = 329, /* @29 */
3029 YYSYMBOL_brace_body = 330, /* brace_body */
3030 YYSYMBOL_331_30 = 331, /* @30 */
3031 YYSYMBOL_do_body = 332, /* do_body */
3032 YYSYMBOL_case_args = 333, /* case_args */
3033 YYSYMBOL_case_body = 334, /* case_body */
3034 YYSYMBOL_cases = 335, /* cases */
3035 YYSYMBOL_p_pvtbl = 336, /* p_pvtbl */
3036 YYSYMBOL_p_pktbl = 337, /* p_pktbl */
3037 YYSYMBOL_p_in_kwarg = 338, /* p_in_kwarg */
3038 YYSYMBOL_339_31 = 339, /* $@31 */
3039 YYSYMBOL_p_case_body = 340, /* p_case_body */
3040 YYSYMBOL_p_cases = 341, /* p_cases */
3041 YYSYMBOL_p_top_expr = 342, /* p_top_expr */
3042 YYSYMBOL_p_top_expr_body = 343, /* p_top_expr_body */
3043 YYSYMBOL_p_expr = 344, /* p_expr */
3044 YYSYMBOL_p_as = 345, /* p_as */
3045 YYSYMBOL_346_32 = 346, /* $@32 */
3046 YYSYMBOL_p_alt = 347, /* p_alt */
3047 YYSYMBOL_p_lparen = 348, /* p_lparen */
3048 YYSYMBOL_p_lbracket = 349, /* p_lbracket */
3049 YYSYMBOL_p_expr_basic = 350, /* p_expr_basic */
3050 YYSYMBOL_351_33 = 351, /* $@33 */
3051 YYSYMBOL_p_args = 352, /* p_args */
3052 YYSYMBOL_p_args_head = 353, /* p_args_head */
3053 YYSYMBOL_p_args_tail = 354, /* p_args_tail */
3054 YYSYMBOL_p_find = 355, /* p_find */
3055 YYSYMBOL_p_rest = 356, /* p_rest */
3056 YYSYMBOL_p_args_post = 357, /* p_args_post */
3057 YYSYMBOL_p_arg = 358, /* p_arg */
3058 YYSYMBOL_p_kwargs = 359, /* p_kwargs */
3059 YYSYMBOL_p_kwarg = 360, /* p_kwarg */
3060 YYSYMBOL_p_kw = 361, /* p_kw */
3061 YYSYMBOL_p_kw_label = 362, /* p_kw_label */
3062 YYSYMBOL_p_kwrest = 363, /* p_kwrest */
3063 YYSYMBOL_p_kwnorest = 364, /* p_kwnorest */
3064 YYSYMBOL_p_any_kwrest = 365, /* p_any_kwrest */
3065 YYSYMBOL_p_value = 366, /* p_value */
3066 YYSYMBOL_range_expr_p_primitive = 367, /* range_expr_p_primitive */
3067 YYSYMBOL_p_primitive = 368, /* p_primitive */
3068 YYSYMBOL_p_variable = 369, /* p_variable */
3069 YYSYMBOL_p_var_ref = 370, /* p_var_ref */
3070 YYSYMBOL_p_expr_ref = 371, /* p_expr_ref */
3071 YYSYMBOL_p_const = 372, /* p_const */
3072 YYSYMBOL_opt_rescue = 373, /* opt_rescue */
3073 YYSYMBOL_exc_list = 374, /* exc_list */
3074 YYSYMBOL_exc_var = 375, /* exc_var */
3075 YYSYMBOL_opt_ensure = 376, /* opt_ensure */
3076 YYSYMBOL_literal = 377, /* literal */
3077 YYSYMBOL_strings = 378, /* strings */
3078 YYSYMBOL_string = 379, /* string */
3079 YYSYMBOL_string1 = 380, /* string1 */
3080 YYSYMBOL_xstring = 381, /* xstring */
3081 YYSYMBOL_regexp = 382, /* regexp */
3082 YYSYMBOL_nonempty_list__ = 383, /* nonempty_list_' ' */
3083 YYSYMBOL_words_tWORDS_BEG_word_list = 384, /* words_tWORDS_BEG_word_list */
3084 YYSYMBOL_words = 385, /* words */
3085 YYSYMBOL_word_list = 386, /* word_list */
3086 YYSYMBOL_word = 387, /* word */
3087 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 388, /* words_tSYMBOLS_BEG_symbol_list */
3088 YYSYMBOL_symbols = 389, /* symbols */
3089 YYSYMBOL_symbol_list = 390, /* symbol_list */
3090 YYSYMBOL_words_tQWORDS_BEG_qword_list = 391, /* words_tQWORDS_BEG_qword_list */
3091 YYSYMBOL_qwords = 392, /* qwords */
3092 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 393, /* words_tQSYMBOLS_BEG_qsym_list */
3093 YYSYMBOL_qsymbols = 394, /* qsymbols */
3094 YYSYMBOL_qword_list = 395, /* qword_list */
3095 YYSYMBOL_qsym_list = 396, /* qsym_list */
3096 YYSYMBOL_string_contents = 397, /* string_contents */
3097 YYSYMBOL_xstring_contents = 398, /* xstring_contents */
3098 YYSYMBOL_regexp_contents = 399, /* regexp_contents */
3099 YYSYMBOL_string_content = 400, /* string_content */
3100 YYSYMBOL_401_34 = 401, /* @34 */
3101 YYSYMBOL_402_35 = 402, /* @35 */
3102 YYSYMBOL_403_36 = 403, /* @36 */
3103 YYSYMBOL_404_37 = 404, /* @37 */
3104 YYSYMBOL_405_38 = 405, /* @38 */
3105 YYSYMBOL_string_dend = 406, /* string_dend */
3106 YYSYMBOL_string_dvar = 407, /* string_dvar */
3107 YYSYMBOL_symbol = 408, /* symbol */
3108 YYSYMBOL_ssym = 409, /* ssym */
3109 YYSYMBOL_sym = 410, /* sym */
3110 YYSYMBOL_dsym = 411, /* dsym */
3111 YYSYMBOL_numeric = 412, /* numeric */
3112 YYSYMBOL_simple_numeric = 413, /* simple_numeric */
3113 YYSYMBOL_nonlocal_var = 414, /* nonlocal_var */
3114 YYSYMBOL_user_variable = 415, /* user_variable */
3115 YYSYMBOL_keyword_variable = 416, /* keyword_variable */
3116 YYSYMBOL_var_ref = 417, /* var_ref */
3117 YYSYMBOL_var_lhs = 418, /* var_lhs */
3118 YYSYMBOL_backref = 419, /* backref */
3119 YYSYMBOL_420_39 = 420, /* $@39 */
3120 YYSYMBOL_superclass = 421, /* superclass */
3121 YYSYMBOL_f_opt_paren_args = 422, /* f_opt_paren_args */
3122 YYSYMBOL_f_paren_args = 423, /* f_paren_args */
3123 YYSYMBOL_f_arglist = 424, /* f_arglist */
3124 YYSYMBOL_425_40 = 425, /* @40 */
3125 YYSYMBOL_f_kw_arg_value = 426, /* f_kw_arg_value */
3126 YYSYMBOL_f_kwarg_arg_value = 427, /* f_kwarg_arg_value */
3127 YYSYMBOL_args_tail_basic_arg_value = 428, /* args_tail_basic_arg_value */
3128 YYSYMBOL_args_tail = 429, /* args_tail */
3129 YYSYMBOL_f_opt_arg_value = 430, /* f_opt_arg_value */
3130 YYSYMBOL_f_opt_arg_arg_value = 431, /* f_opt_arg_arg_value */
3131 YYSYMBOL_opt_args_tail_args_tail = 432, /* opt_args_tail_args_tail */
3132 YYSYMBOL_f_args = 433, /* f_args */
3133 YYSYMBOL_args_forward = 434, /* args_forward */
3134 YYSYMBOL_f_bad_arg = 435, /* f_bad_arg */
3135 YYSYMBOL_f_norm_arg = 436, /* f_norm_arg */
3136 YYSYMBOL_f_arg_asgn = 437, /* f_arg_asgn */
3137 YYSYMBOL_f_arg_item = 438, /* f_arg_item */
3138 YYSYMBOL_f_arg = 439, /* f_arg */
3139 YYSYMBOL_f_label = 440, /* f_label */
3140 YYSYMBOL_kwrest_mark = 441, /* kwrest_mark */
3141 YYSYMBOL_f_no_kwarg = 442, /* f_no_kwarg */
3142 YYSYMBOL_f_kwrest = 443, /* f_kwrest */
3143 YYSYMBOL_restarg_mark = 444, /* restarg_mark */
3144 YYSYMBOL_f_rest_arg = 445, /* f_rest_arg */
3145 YYSYMBOL_blkarg_mark = 446, /* blkarg_mark */
3146 YYSYMBOL_f_block_arg = 447, /* f_block_arg */
3147 YYSYMBOL_opt_f_block_arg = 448, /* opt_f_block_arg */
3148 YYSYMBOL_value_expr_singleton_expr = 449, /* value_expr_singleton_expr */
3149 YYSYMBOL_singleton = 450, /* singleton */
3150 YYSYMBOL_singleton_expr = 451, /* singleton_expr */
3151 YYSYMBOL_452_41 = 452, /* $@41 */
3152 YYSYMBOL_assoc_list = 453, /* assoc_list */
3153 YYSYMBOL_assocs = 454, /* assocs */
3154 YYSYMBOL_assoc = 455, /* assoc */
3155 YYSYMBOL_operation2 = 456, /* operation2 */
3156 YYSYMBOL_operation3 = 457, /* operation3 */
3157 YYSYMBOL_dot_or_colon = 458, /* dot_or_colon */
3158 YYSYMBOL_call_op = 459, /* call_op */
3159 YYSYMBOL_call_op2 = 460, /* call_op2 */
3160 YYSYMBOL_rparen = 461, /* rparen */
3161 YYSYMBOL_rbracket = 462, /* rbracket */
3162 YYSYMBOL_rbrace = 463, /* rbrace */
3163 YYSYMBOL_trailer = 464, /* trailer */
3164 YYSYMBOL_term = 465, /* term */
3165 YYSYMBOL_terms = 466, /* terms */
3166 YYSYMBOL_none = 467 /* none */
3167};
3168typedef enum yysymbol_kind_t yysymbol_kind_t;
3169
3170
3171
3172
3173#ifdef short
3174# undef short
3175#endif
3176
3177/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3178 <limits.h> and (if available) <stdint.h> are included
3179 so that the code can choose integer types of a good width. */
3180
3181#ifndef __PTRDIFF_MAX__
3182# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3183# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3184# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3185# define YY_STDINT_H
3186# endif
3187#endif
3188
3189/* Narrow types that promote to a signed type and that can represent a
3190 signed or unsigned integer of at least N bits. In tables they can
3191 save space and decrease cache pressure. Promoting to a signed type
3192 helps avoid bugs in integer arithmetic. */
3193
3194#ifdef __INT_LEAST8_MAX__
3195typedef __INT_LEAST8_TYPE__ yytype_int8;
3196#elif defined YY_STDINT_H
3197typedef int_least8_t yytype_int8;
3198#else
3199typedef signed char yytype_int8;
3200#endif
3201
3202#ifdef __INT_LEAST16_MAX__
3203typedef __INT_LEAST16_TYPE__ yytype_int16;
3204#elif defined YY_STDINT_H
3205typedef int_least16_t yytype_int16;
3206#else
3207typedef short yytype_int16;
3208#endif
3209
3210/* Work around bug in HP-UX 11.23, which defines these macros
3211 incorrectly for preprocessor constants. This workaround can likely
3212 be removed in 2023, as HPE has promised support for HP-UX 11.23
3213 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3214 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3215#ifdef __hpux
3216# undef UINT_LEAST8_MAX
3217# undef UINT_LEAST16_MAX
3218# define UINT_LEAST8_MAX 255
3219# define UINT_LEAST16_MAX 65535
3220#endif
3221
3222#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3223typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3224#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3225 && UINT_LEAST8_MAX <= INT_MAX)
3226typedef uint_least8_t yytype_uint8;
3227#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3228typedef unsigned char yytype_uint8;
3229#else
3230typedef short yytype_uint8;
3231#endif
3232
3233#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3234typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3235#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3236 && UINT_LEAST16_MAX <= INT_MAX)
3237typedef uint_least16_t yytype_uint16;
3238#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3239typedef unsigned short yytype_uint16;
3240#else
3241typedef int yytype_uint16;
3242#endif
3243
3244#ifndef YYPTRDIFF_T
3245# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3246# define YYPTRDIFF_T __PTRDIFF_TYPE__
3247# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3248# elif defined PTRDIFF_MAX
3249# ifndef ptrdiff_t
3250# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3251# endif
3252# define YYPTRDIFF_T ptrdiff_t
3253# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3254# else
3255# define YYPTRDIFF_T long
3256# define YYPTRDIFF_MAXIMUM LONG_MAX
3257# endif
3258#endif
3259
3260#ifndef YYSIZE_T
3261# ifdef __SIZE_TYPE__
3262# define YYSIZE_T __SIZE_TYPE__
3263# elif defined size_t
3264# define YYSIZE_T size_t
3265# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3266# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3267# define YYSIZE_T size_t
3268# else
3269# define YYSIZE_T unsigned
3270# endif
3271#endif
3272
3273#define YYSIZE_MAXIMUM \
3274 YY_CAST (YYPTRDIFF_T, \
3275 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3276 ? YYPTRDIFF_MAXIMUM \
3277 : YY_CAST (YYSIZE_T, -1)))
3278
3279#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3280
3281
3282/* Stored state numbers (used for stacks). */
3283typedef yytype_int16 yy_state_t;
3284
3285/* State numbers in computations. */
3286typedef int yy_state_fast_t;
3287
3288#ifndef YY_
3289# if defined YYENABLE_NLS && YYENABLE_NLS
3290# if ENABLE_NLS
3291# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3292# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3293# endif
3294# endif
3295# ifndef YY_
3296# define YY_(Msgid) Msgid
3297# endif
3298#endif
3299
3300
3301#ifndef YY_ATTRIBUTE_PURE
3302# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3303# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3304# else
3305# define YY_ATTRIBUTE_PURE
3306# endif
3307#endif
3308
3309#ifndef YY_ATTRIBUTE_UNUSED
3310# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3311# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3312# else
3313# define YY_ATTRIBUTE_UNUSED
3314# endif
3315#endif
3316
3317/* Suppress unused-variable warnings by "using" E. */
3318#if ! defined lint || defined __GNUC__
3319# define YY_USE(E) ((void) (E))
3320#else
3321# define YY_USE(E) /* empty */
3322#endif
3323
3324/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3325#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3326# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3327# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3328 _Pragma ("GCC diagnostic push") \
3329 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3330# else
3331# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3332 _Pragma ("GCC diagnostic push") \
3333 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3334 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3335# endif
3336# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3337 _Pragma ("GCC diagnostic pop")
3338#else
3339# define YY_INITIAL_VALUE(Value) Value
3340#endif
3341#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3342# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3343# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3344#endif
3345#ifndef YY_INITIAL_VALUE
3346# define YY_INITIAL_VALUE(Value) /* Nothing. */
3347#endif
3348
3349#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3350# define YY_IGNORE_USELESS_CAST_BEGIN \
3351 _Pragma ("GCC diagnostic push") \
3352 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3353# define YY_IGNORE_USELESS_CAST_END \
3354 _Pragma ("GCC diagnostic pop")
3355#endif
3356#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3357# define YY_IGNORE_USELESS_CAST_BEGIN
3358# define YY_IGNORE_USELESS_CAST_END
3359#endif
3360
3361
3362#define YY_ASSERT(E) ((void) (0 && (E)))
3363
3364#if 1
3365
3366/* The parser invokes alloca or malloc; define the necessary symbols. */
3367
3368# ifdef YYSTACK_USE_ALLOCA
3369# if YYSTACK_USE_ALLOCA
3370# ifdef __GNUC__
3371# define YYSTACK_ALLOC __builtin_alloca
3372# elif defined __BUILTIN_VA_ARG_INCR
3373# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3374# elif defined _AIX
3375# define YYSTACK_ALLOC __alloca
3376# elif defined _MSC_VER
3377# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3378# define alloca _alloca
3379# else
3380# define YYSTACK_ALLOC alloca
3381# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3382# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3383 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3384# ifndef EXIT_SUCCESS
3385# define EXIT_SUCCESS 0
3386# endif
3387# endif
3388# endif
3389# endif
3390# endif
3391
3392# ifdef YYSTACK_ALLOC
3393 /* Pacify GCC's 'empty if-body' warning. */
3394# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3395# ifndef YYSTACK_ALLOC_MAXIMUM
3396 /* The OS might guarantee only one guard page at the bottom of the stack,
3397 and a page size can be as small as 4096 bytes. So we cannot safely
3398 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3399 to allow for a few compiler-allocated temporary stack slots. */
3400# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3401# endif
3402# else
3403# define YYSTACK_ALLOC YYMALLOC
3404# define YYSTACK_FREE YYFREE
3405# ifndef YYSTACK_ALLOC_MAXIMUM
3406# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3407# endif
3408# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3409 && ! ((defined YYMALLOC || defined malloc) \
3410 && (defined YYFREE || defined free)))
3411# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3412# ifndef EXIT_SUCCESS
3413# define EXIT_SUCCESS 0
3414# endif
3415# endif
3416# ifndef YYMALLOC
3417# define YYMALLOC malloc
3418# if ! defined malloc && ! defined EXIT_SUCCESS
3419void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3420# endif
3421# endif
3422# ifndef YYFREE
3423# define YYFREE free
3424# if ! defined free && ! defined EXIT_SUCCESS
3425void free (void *); /* INFRINGES ON USER NAME SPACE */
3426# endif
3427# endif
3428# endif
3429#endif /* 1 */
3430
3431#if (! defined yyoverflow \
3432 && (! defined __cplusplus \
3433 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3434 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3435
3436/* A type that is properly aligned for any stack member. */
3437union yyalloc
3438{
3439 yy_state_t yyss_alloc;
3440 YYSTYPE yyvs_alloc;
3441 YYLTYPE yyls_alloc;
3442};
3443
3444/* The size of the maximum gap between one aligned stack and the next. */
3445# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3446
3447/* The size of an array large to enough to hold all stacks, each with
3448 N elements. */
3449# define YYSTACK_BYTES(N) \
3450 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3451 + YYSIZEOF (YYLTYPE)) \
3452 + 2 * YYSTACK_GAP_MAXIMUM)
3453
3454# define YYCOPY_NEEDED 1
3455
3456/* Relocate STACK from its old location to the new one. The
3457 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3458 elements in the stack, and YYPTR gives the new location of the
3459 stack. Advance YYPTR to a properly aligned location for the next
3460 stack. */
3461# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3462 do \
3463 { \
3464 YYPTRDIFF_T yynewbytes; \
3465 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3466 Stack = &yyptr->Stack_alloc; \
3467 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3468 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3469 } \
3470 while (0)
3471
3472#endif
3473
3474#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3475/* Copy COUNT objects from SRC to DST. The source and destination do
3476 not overlap. */
3477# ifndef YYCOPY
3478# if defined __GNUC__ && 1 < __GNUC__
3479# define YYCOPY(Dst, Src, Count) \
3480 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3481# else
3482# define YYCOPY(Dst, Src, Count) \
3483 do \
3484 { \
3485 YYPTRDIFF_T yyi; \
3486 for (yyi = 0; yyi < (Count); yyi++) \
3487 (Dst)[yyi] = (Src)[yyi]; \
3488 } \
3489 while (0)
3490# endif
3491# endif
3492#endif /* !YYCOPY_NEEDED */
3493
3494/* YYFINAL -- State number of the termination state. */
3495#define YYFINAL 143
3496/* YYLAST -- Last index in YYTABLE. */
3497#define YYLAST 16481
3498
3499/* YYNTOKENS -- Number of terminals. */
3500#define YYNTOKENS 162
3501/* YYNNTS -- Number of nonterminals. */
3502#define YYNNTS 306
3503/* YYNRULES -- Number of rules. */
3504#define YYNRULES 816
3505/* YYNSTATES -- Number of states. */
3506#define YYNSTATES 1379
3507
3508/* YYMAXUTOK -- Last valid token kind. */
3509#define YYMAXUTOK 361
3510
3511
3512/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3513 as returned by yylex, with out-of-bounds checking. */
3514#define YYTRANSLATE(YYX) \
3515 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3516 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3517 : YYSYMBOL_YYUNDEF)
3518
3519/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3520 as returned by yylex. */
3521static const yytype_uint8 yytranslate[] =
3522{
3523 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3524 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3526 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3527 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3528 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3529 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3532 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3535 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3536 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3537 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3538 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3548 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3549 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3550 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3551 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3552 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3553 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3554 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3555 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3556 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3557 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3558 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3559 147, 150
3560};
3561
3562#if YYDEBUG
3563/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3564static const yytype_int16 yyrline[] =
3565{
3566 0, 3167, 3161, 3167, 3167, 3167, 3167, 3187, 3192, 3197,
3567 3204, 3209, 3216, 3218, 3236, 3232, 3237, 3236, 3248, 3245,
3568 3258, 3263, 3268, 3275, 3277, 3276, 3286, 3288, 3295, 3295,
3569 3300, 3305, 3313, 3322, 3329, 3335, 3341, 3352, 3363, 3372,
3570 3386, 3387, 3392, 3392, 3393, 3404, 3409, 3410, 3417, 3417,
3571 3418, 3418, 3418, 3418, 3418, 3418, 3418, 3418, 3418, 3419,
3572 3419, 3419, 3422, 3423, 3429, 3429, 3429, 3436, 3437, 3444,
3573 3447, 3448, 3453, 3458, 3463, 3469, 3468, 3484, 3483, 3498,
3574 3501, 3512, 3522, 3521, 3535, 3535, 3536, 3542, 3542, 3542,
3575 3549, 3550, 3553, 3553, 3556, 3557, 3564, 3572, 3572, 3572,
3576 3579, 3586, 3595, 3600, 3605, 3610, 3615, 3621, 3627, 3633,
3577 3638, 3645, 3654, 3655, 3662, 3663, 3670, 3675, 3680, 3685,
3578 3685, 3685, 3690, 3695, 3700, 3705, 3710, 3715, 3722, 3723,
3579 3730, 3735, 3743, 3743, 3748, 3753, 3753, 3759, 3764, 3769,
3580 3774, 3782, 3782, 3787, 3792, 3792, 3797, 3802, 3807, 3812,
3581 3820, 3828, 3831, 3836, 3841, 3848, 3848, 3848, 3849, 3854,
3582 3857, 3862, 3865, 3870, 3870, 3878, 3879, 3880, 3881, 3882,
3583 3883, 3884, 3885, 3886, 3887, 3888, 3889, 3890, 3891, 3892,
3584 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900, 3901, 3902,
3585 3903, 3904, 3905, 3906, 3907, 3910, 3910, 3910, 3911, 3911,
3586 3912, 3912, 3912, 3913, 3913, 3913, 3913, 3914, 3914, 3914,
3587 3914, 3915, 3915, 3915, 3916, 3916, 3916, 3916, 3917, 3917,
3588 3917, 3917, 3918, 3918, 3918, 3918, 3919, 3919, 3919, 3919,
3589 3920, 3920, 3920, 3920, 3921, 3921, 3924, 3924, 3925, 3925,
3590 3925, 3925, 3925, 3925, 3925, 3925, 3925, 3926, 3926, 3926,
3591 3926, 3926, 3926, 3926, 3927, 3932, 3937, 3942, 3947, 3952,
3592 3957, 3962, 3967, 3972, 3977, 3982, 3987, 3992, 3993, 3998,
3593 4003, 4008, 4013, 4018, 4023, 4028, 4033, 4038, 4043, 4048,
3594 4055, 4055, 4055, 4056, 4057, 4060, 4069, 4070, 4076, 4083,
3595 4084, 4085, 4086, 4089, 4094, 4102, 4108, 4115, 4122, 4122,
3596 4125, 4126, 4127, 4132, 4139, 4144, 4153, 4158, 4168, 4180,
3597 4181, 4187, 4188, 4189, 4190, 4195, 4202, 4202, 4207, 4212,
3598 4217, 4223, 4229, 4233, 4233, 4271, 4276, 4284, 4289, 4297,
3599 4302, 4307, 4312, 4320, 4325, 4334, 4335, 4339, 4344, 4349,
3600 4367, 4367, 4367, 4367, 4367, 4367, 4367, 4367, 4368, 4369,
3601 4370, 4376, 4375, 4388, 4388, 4394, 4400, 4405, 4410, 4415,
3602 4421, 4426, 4431, 4436, 4441, 4448, 4453, 4458, 4463, 4464,
3603 4470, 4472, 4484, 4493, 4502, 4511, 4510, 4525, 4524, 4537,
3604 4545, 4545, 4546, 4590, 4589, 4612, 4611, 4631, 4630, 4649,
3605 4647, 4664, 4662, 4677, 4682, 4687, 4692, 4707, 4707, 4710,
3606 4717, 4735, 4742, 4750, 4758, 4765, 4773, 4782, 4791, 4799,
3607 4806, 4813, 4821, 4828, 4834, 4849, 4856, 4861, 4867, 4874,
3608 4881, 4882, 4883, 4886, 4887, 4890, 4892, 4901, 4902, 4909,
3609 4910, 4913, 4918, 4926, 4926, 4926, 4931, 4936, 4941, 4946,
3610 4953, 4959, 4966, 4967, 4974, 4974, 4976, 4976, 4976, 4976,
3611 4976, 4976, 4976, 4976, 4976, 4979, 4987, 4987, 4987, 4987,
3612 4987, 4987, 4992, 4997, 5002, 5007, 5012, 5018, 5023, 5028,
3613 5033, 5038, 5043, 5048, 5053, 5058, 5065, 5066, 5072, 5082,
3614 5086, 5089, 5094, 5101, 5103, 5107, 5112, 5115, 5121, 5126,
3615 5133, 5139, 5132, 5166, 5173, 5182, 5189, 5188, 5199, 5207,
3616 5213, 5223, 5229, 5234, 5242, 5249, 5260, 5266, 5271, 5277,
3617 5287, 5292, 5300, 5306, 5314, 5316, 5331, 5331, 5352, 5358,
3618 5363, 5369, 5377, 5386, 5387, 5390, 5391, 5393, 5406, 5413,
3619 5421, 5422, 5425, 5426, 5432, 5440, 5441, 5447, 5453, 5458,
3620 5463, 5470, 5473, 5480, 5484, 5483, 5496, 5499, 5506, 5513,
3621 5514, 5515, 5522, 5529, 5536, 5542, 5549, 5556, 5563, 5569,
3622 5574, 5579, 5586, 5585, 5596, 5602, 5610, 5616, 5621, 5626,
3623 5631, 5636, 5639, 5640, 5647, 5652, 5659, 5667, 5673, 5680,
3624 5681, 5688, 5695, 5700, 5705, 5710, 5717, 5719, 5726, 5732,
3625 5744, 5745, 5760, 5765, 5772, 5778, 5779, 5786, 5787, 5787,
3626 5787, 5787, 5787, 5787, 5787, 5788, 5789, 5790, 5793, 5793,
3627 5793, 5793, 5793, 5793, 5793, 5793, 5794, 5799, 5802, 5810,
3628 5822, 5829, 5836, 5841, 5846, 5854, 5874, 5877, 5882, 5886,
3629 5889, 5894, 5897, 5904, 5907, 5908, 5911, 5923, 5924, 5925,
3630 5932, 5945, 5957, 5964, 5964, 5964, 5964, 5968, 5972, 5979,
3631 5981, 5988, 5988, 5992, 5996, 6003, 6003, 6006, 6006, 6010,
3632 6014, 6022, 6026, 6034, 6038, 6046, 6050, 6058, 6062, 6088,
3633 6091, 6090, 6105, 6113, 6117, 6121, 6125, 6141, 6142, 6145,
3634 6150, 6153, 6154, 6157, 6173, 6174, 6177, 6185, 6186, 6194,
3635 6195, 6196, 6197, 6200, 6201, 6202, 6205, 6205, 6206, 6209,
3636 6210, 6211, 6212, 6213, 6214, 6215, 6218, 6228, 6235, 6235,
3637 6242, 6243, 6247, 6246, 6256, 6259, 6260, 6269, 6279, 6280,
3638 6280, 6297, 6297, 6297, 6297, 6297, 6297, 6297, 6297, 6297,
3639 6298, 6315, 6315, 6315, 6315, 6315, 6315, 6320, 6325, 6330,
3640 6335, 6340, 6345, 6350, 6355, 6360, 6365, 6370, 6375, 6380,
3641 6386, 6393, 6400, 6409, 6418, 6427, 6438, 6439, 6449, 6456,
3642 6461, 6480, 6482, 6493, 6513, 6514, 6517, 6523, 6529, 6537,
3643 6538, 6541, 6547, 6555, 6556, 6559, 6565, 6573, 6578, 6582,
3644 6582, 6612, 6614, 6613, 6626, 6627, 6634, 6636, 6659, 6664,
3645 6669, 6676, 6682, 6687, 6700, 6700, 6700, 6701, 6704, 6705,
3646 6706, 6709, 6710, 6713, 6714, 6717, 6718, 6721, 6724, 6727,
3647 6730, 6731, 6734, 6742, 6749, 6750, 6754
3648};
3649#endif
3650
3652#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3653
3654#if 1
3655/* The user-facing name of the symbol whose (internal) number is
3656 YYSYMBOL. No bounds checking. */
3657static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3658
3659/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3660 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3661static const char *const yytname[] =
3662{
3663 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3664 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3665 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3666 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3667 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3668 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3669 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3670 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3671 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3672 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3673 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3674 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3675 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3676 "\"method\"", "\"global variable\"", "\"instance variable\"",
3677 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3678 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3679 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3680 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3681 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3682 "\"escaped form feed\"", "\"escaped carriage return\"",
3683 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3684 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3685 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3686 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3687 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3688 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3689 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3690 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3691 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3692 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3693 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3694 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3695 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3696 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3697 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3698 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3699 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3700 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3701 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3702 "command_asgn", "op_asgn_command_rhs",
3703 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3704 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3705 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3706 "expr_value_do", "command_call", "value_expr_command_call",
3707 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3708 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3709 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3710 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3711 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3712 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3713 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3714 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3715 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3716 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3717 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3718 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3719 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3720 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3721 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3722 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3723 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3724 "f_kw_primary_value", "f_kwarg_primary_value",
3725 "args_tail_basic_primary_value", "block_args_tail", "excessed_comma",
3726 "f_opt_primary_value", "f_opt_arg_primary_value",
3727 "opt_args_tail_block_args_tail", "block_param", "opt_block_param_def",
3728 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3729 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3730 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3731 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3732 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3733 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3734 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3735 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3736 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3737 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3738 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3739 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3740 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3741 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3742 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3743 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3744 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3745 "string_contents", "xstring_contents", "regexp_contents",
3746 "string_content", "@34", "@35", "@36", "@37", "@38", "string_dend",
3747 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3748 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3749 "var_ref", "var_lhs", "backref", "$@39", "superclass",
3750 "f_opt_paren_args", "f_paren_args", "f_arglist", "@40", "f_kw_arg_value",
3751 "f_kwarg_arg_value", "args_tail_basic_arg_value", "args_tail",
3752 "f_opt_arg_value", "f_opt_arg_arg_value", "opt_args_tail_args_tail",
3753 "f_args", "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn",
3754 "f_arg_item", "f_arg", "f_label", "kwrest_mark", "f_no_kwarg",
3755 "f_kwrest", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
3756 "opt_f_block_arg", "value_expr_singleton_expr", "singleton",
3757 "singleton_expr", "$@41", "assoc_list", "assocs", "assoc", "operation2",
3758 "operation3", "dot_or_colon", "call_op", "call_op2", "rparen",
3759 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3760};
3761
3762static const char *
3763yysymbol_name (yysymbol_kind_t yysymbol)
3764{
3765 return yytname[yysymbol];
3766}
3767#endif
3768
3769#define YYPACT_NINF (-1145)
3770
3771#define yypact_value_is_default(Yyn) \
3772 ((Yyn) == YYPACT_NINF)
3773
3774#define YYTABLE_NINF (-817)
3775
3776#define yytable_value_is_error(Yyn) \
3777 ((Yyn) == YYTABLE_NINF)
3778
3779/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3780 STATE-NUM. */
3781static const yytype_int16 yypact[] =
3782{
3783 -1145, 5956, 149, -1145, -1145, -1145, -1145, 10569, -1145, -1145,
3784 -1145, -1145, -1145, -1145, -1145, 11624, 11624, -1145, -1145, -1145,
3785 -1145, 6858, -1145, -1145, -1145, -1145, 134, 10415, 41, 37,
3786 -1145, -1145, -1145, -1145, 6234, 7014, -1145, -1145, 6390, -1145,
3787 -1145, -1145, -1145, -1145, -1145, -1145, -1145, 13184, 13184, 13184,
3788 13184, 197, 9328, 9486, 12104, 12344, 10870, -1145, 10261, -1145,
3789 -1145, -1145, 176, 176, 176, 176, 1105, 13304, 13184, -1145,
3790 317, -1145, -1145, 1233, -1145, -1145, -1145, -1145, -1145, 642,
3791 9, 9, -1145, -1145, 91, 389, 280, -1145, 272, 13904,
3792 -1145, 304, -1145, 3550, -1145, -1145, -1145, -1145, 861, 552,
3793 -1145, 718, -1145, 11504, 11504, -1145, -1145, 9948, 14022, 14140,
3794 14258, 10106, 11624, 7482, -1145, 626, 112, -1145, -1145, 337,
3795 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3796 -1145, -1145, -1145, -1145, -1145, -1145, -1145, 46, 610, -1145,
3797 374, 689, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3798 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3799 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3800 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3801 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3802 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3803 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3804 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3805 338, -1145, -1145, -1145, -1145, -1145, -1145, 364, 13184, 482,
3806 9486, 13184, 13184, 13184, -1145, 13184, -1145, -1145, 412, 6204,
3807 -1145, 450, -1145, -1145, -1145, 408, -1145, 733, 74, 87,
3808 468, 355, 428, -1145, -1145, 11744, -1145, 11624, -1145, -1145,
3809 11245, 13424, 900, -1145, 429, -1145, 9644, -1145, -1145, -1145,
3810 -1145, -1145, 434, 9, 9, 91, -1145, 738, -1145, 439,
3811 550, 6360, 6360, 714, -1145, 9328, 477, 317, -1145, 1233,
3812 41, 489, -1145, -1145, 505, 807, 835, -1145, 450, 507,
3813 835, -1145, 41, 629, 1105, 14376, 555, 555, 547, -1145,
3814 742, 763, 765, 810, -1145, -1145, 523, -1145, -1145, 798,
3815 1118, 381, -1145, 546, 546, 546, 546, 640, -1145, -1145,
3816 -1145, -1145, -1145, -1145, -1145, 6108, 564, 11504, 11504, 11504,
3817 11504, -1145, 13424, 13424, 1435, 587, 603, -1145, 1435, -1145,
3818 608, -1145, -1145, -1145, -1145, 639, -1145, -1145, -1145, -1145,
3819 -1145, -1145, -1145, 9328, 10988, 606, -1145, -1145, 13184, 13184,
3820 13184, 13184, 13184, -1145, -1145, 13184, 13184, 13184, 13184, 13184,
3821 13184, 13184, 13184, -1145, 13184, -1145, -1145, 13184, 13184, 13184,
3822 13184, 13184, 13184, 13184, 13184, 13184, 13184, -1145, -1145, 14855,
3823 11624, 14953, 434, 8264, -1145, 642, -1145, 117, 117, 11504,
3824 9176, 9176, -1145, 317, 607, 728, -1145, -1145, 904, 775,
3825 86, 101, 138, 701, 796, 11504, 749, -1145, 656, 910,
3826 -1145, -1145, -1145, -1145, 125, 347, 388, 427, 534, 541,
3827 631, 637, 651, -1145, -1145, -1145, -1145, -1145, 682, -1145,
3828 -1145, 11106, -1145, -1145, -1145, 14757, -1145, -1145, -1145, -1145,
3829 -1145, -1145, 382, -1145, -1145, -1145, 638, -1145, 13184, 11864,
3830 -1145, -1145, 15051, 11624, 15149, -1145, -1145, 12224, -1145, 13184,
3831 41, -1145, 663, 41, 669, -1145, -1145, 693, 97, -1145,
3832 -1145, -1145, -1145, -1145, 10569, -1145, -1145, 13184, 695, 725,
3833 732, 15247, 15149, -1145, 37, 41, -1145, -1145, 5563, 737,
3834 730, -1145, 12104, -1145, -1145, 12344, -1145, -1145, -1145, 429,
3835 942, -1145, 741, -1145, -1145, 14376, 15345, 11624, 15443, -1145,
3836 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
3837 -1145, 1161, 96, 1169, 111, 13184, -1145, -1145, 9796, -1145,
3838 -1145, -1145, -1145, -1145, 11384, -1145, -1145, -1145, -1145, -1145,
3839 -1145, -1145, -1145, -1145, -1145, 1268, -1145, -1145, -1145, -1145,
3840 -1145, 743, -1145, -1145, 746, -1145, -1145, -1145, 757, 41,
3841 -1145, -1145, -1145, 739, -1145, 760, 13184, 322, -1145, -1145,
3842 875, 778, 886, -1145, 13544, 8264, 317, 13544, 8264, -1145,
3843 824, -1145, -1145, -1145, 113, 113, 12464, 41, 14376, 802,
3844 -1145, 12584, -1145, 550, 1950, 1950, 1950, 1950, 2662, 3004,
3845 1950, 1950, 6360, 6360, 1120, 1120, -1145, 3584, 1304, 1304,
3846 1453, 58, 58, 550, 550, 550, 1078, 1078, 7638, 6546,
3847 7950, 6702, 434, -1145, 41, 825, 719, -1145, 805, -1145,
3848 7170, -1145, -1145, 113, -1145, 8416, 970, 8872, 60, 113,
3849 113, 997, 962, 150, 15541, 11624, 15639, -1145, -1145, -1145,
3850 942, -1145, -1145, -1145, -1145, 15737, 11624, 15835, 8264, 13424,
3851 -1145, -1145, -1145, 41, -1145, -1145, -1145, -1145, 3346, 13664,
3852 13664, 10569, -1145, 13184, 13184, -1145, 450, -1145, -1145, 428,
3853 5243, 7326, 41, 395, 432, 13184, 13184, -1145, -1145, 11984,
3854 -1145, 12224, -1145, -1145, -1145, 13424, 6204, -1145, 13784, 13784,
3855 71, 434, 434, 13664, -1145, 488, -1145, -1145, 835, 14376,
3856 741, 454, 685, 41, 386, 472, -1145, -1145, 1194, -1145,
3857 414, -1145, 176, -1145, -1145, 414, 176, -1145, 550, 867,
3858 -1145, 1268, 1337, -1145, 882, 41, 887, -1145, 109, -1145,
3859 -1145, 90, -1145, 1435, -1145, -1145, 918, 13184, 1435, -1145,
3860 -1145, -1145, -1145, -1145, 1288, -1145, -1145, 134, 1000, -1145,
3861 6204, 1021, 113, -1145, 1000, 1021, 113, -1145, -1145, 915,
3862 -1145, -1145, -1145, -1145, -1145, 13184, -1145, -1145, -1145, 916,
3863 917, 1033, -1145, -1145, 741, 14376, 1030, -1145, -1145, 1046,
3864 960, 7605, -1145, -1145, -1145, 963, 465, -1145, -1145, 965,
3865 -1145, -1145, -1145, -1145, 639, 939, 837, 11864, -1145, -1145,
3866 -1145, -1145, 639, -1145, 1101, -1145, 989, -1145, 1098, -1145,
3867 -1145, -1145, -1145, -1145, -1145, 12704, 113, -1145, 997, 113,
3868 264, 295, 41, 164, 181, 11504, 317, 11504, 8264, 897,
3869 685, -1145, 41, 113, 97, 10723, -1145, 112, 389, -1145,
3870 4701, -1145, -1145, -1145, -1145, 13184, -1145, -1145, -1145, -1145,
3871 490, -1145, -1145, 41, 977, 97, 134, -1145, -1145, -1145,
3872 -1145, 503, -1145, -1145, -1145, -1145, -1145, 546, -1145, 546,
3873 546, 546, -1145, 41, -1145, 1268, -1145, 1363, -1145, -1145,
3874 1068, 743, -1145, -1145, 981, 982, -1145, -1145, 986, -1145,
3875 991, -1145, 981, 13544, -1145, -1145, -1145, -1145, -1145, -1145,
3876 -1145, 992, 12824, -1145, 741, 500, -1145, -1145, -1145, 15933,
3877 11624, 16031, -1145, -1145, 13184, 13664, 13664, 975, -1145, -1145,
3878 -1145, 13664, 13664, -1145, -1145, 12944, 1098, -1145, -1145, -1145,
3879 9176, 11504, 113, -1145, -1145, 113, -1145, 13184, -1145, 147,
3880 -1145, -1145, 113, -1145, 184, 60, 8264, 317, 113, -1145,
3881 -1145, -1145, -1145, -1145, -1145, 13184, 13184, -1145, 13184, 13184,
3882 -1145, 12224, -1145, 13784, 1510, -1145, -1145, -1145, 998, 1002,
3883 -1145, 1288, -1145, 1288, -1145, 1435, -1145, 1288, -1145, -1145,
3884 1000, 1021, 13184, 13184, -1145, -1145, 13184, 1003, 11384, 11384,
3885 13664, 13184, 7794, 8106, 41, 519, 529, 5384, 5384, 6204,
3886 -1145, -1145, -1145, -1145, -1145, 13664, -1145, -1145, -1145, -1145,
3887 916, -1145, 1054, -1145, 1151, -1145, -1145, 117, -1145, -1145,
3888 -1145, 13064, 8568, -1145, -1145, -1145, 113, -1145, -1145, 13184,
3889 1435, -1145, -1145, 5804, 1363, 1363, 981, 981, 1020, 981,
3890 6204, 6204, 1038, 1038, 992, -1145, -1145, 6204, 533, -1145,
3891 -1145, -1145, 2073, 2073, 769, -1145, 4837, 312, 1131, -1145,
3892 1067, -1145, -1145, 268, -1145, 1049, -1145, -1145, -1145, 1034,
3893 -1145, 1035, -1145, 14685, -1145, -1145, -1145, -1145, -1145, 933,
3894 -1145, -1145, -1145, 29, -1145, -1145, -1145, -1145, -1145, -1145,
3895 -1145, -1145, -1145, 667, -1145, -1145, -1145, 14494, 117, -1145,
3896 -1145, 9176, -1145, -1145, 9024, 8416, 13184, -1145, 758, 5384,
3897 9176, -1145, 41, 102, 119, 1002, -1145, -1145, 1288, -1145,
3898 -1145, 1658, 9796, -1145, -1145, 8264, -1145, -1145, -1145, -1145,
3899 14685, 287, 41, 3934, -1145, 41, 1037, -1145, 1042, -1145,
3900 -1145, -1145, 954, -1145, 11504, -1145, 1149, 3934, -1145, 14685,
3901 375, 1106, 2073, 2073, 769, 253, 675, 5384, 5384, -1145,
3902 1146, -1145, 972, 126, 213, 225, 8264, 317, -1145, 989,
3903 -1145, -1145, -1145, -1145, 117, 988, 113, 1052, 1055, -1145,
3904 9796, -1145, -1145, -1145, -1145, 981, 743, -1145, 1059, -1145,
3905 -1145, -1145, 1060, -1145, 41, 739, 1070, 14612, 1073, -1145,
3906 -1145, -1145, 56, -1145, 1106, 1087, 1088, -1145, -1145, -1145,
3907 -1145, -1145, 41, -1145, -1145, 1091, 14685, 1097, -1145, -1145,
3908 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, 41,
3909 41, 41, 41, 41, 41, 241, 16129, 11624, 16227, 1101,
3910 -1145, 1151, -1145, -1145, 11504, 11504, -1145, 1399, -1145, 8264,
3911 1109, -1145, -1145, 90, -1145, 1658, -1145, 1129, 14612, 1658,
3912 -1145, -1145, 1213, 990, 1420, -1145, -1145, 14685, -1145, 375,
3913 -1145, 14685, -1145, 3934, 496, -1145, -1145, -1145, -1145, -1145,
3914 -1145, 172, 194, 41, 283, 305, -1145, -1145, 8720, -1145,
3915 -1145, -1145, 901, -1145, -1145, 113, -1145, -1145, 743, -1145,
3916 -1145, 1115, 1124, -1145, 990, 1126, 1137, -1145, 16325, 1115,
3917 1138, 41, 1138, -1145, -1145, 308, 334, 1399, -1145, -1145,
3918 -1145, 1420, -1145, 1420, -1145, 1658, -1145, 1420, -1145, 1127,
3919 1141, -1145, 14685, -1145, -1145, -1145, -1145, -1145, 1115, 1115,
3920 1140, 1115, -1145, -1145, 1420, -1145, -1145, 1115, -1145
3921};
3922
3923/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3924 Performed when YYTABLE does not specify something else to do. Zero
3925 means the default is an error. */
3926static const yytype_int16 yydefact[] =
3927{
3928 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3929 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3930 419, 323, 700, 699, 701, 702, 64, 0, 64, 0,
3931 816, 704, 703, 705, 97, 99, 694, 693, 98, 695,
3932 689, 690, 691, 692, 637, 710, 711, 0, 0, 0,
3933 0, 0, 0, 0, 816, 816, 126, 490, 663, 663,
3934 665, 667, 0, 0, 0, 0, 0, 0, 0, 6,
3935 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3936 719, 719, 70, 91, 323, 90, 0, 112, 0, 116,
3937 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3938 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3939 0, 0, 360, 323, 370, 94, 368, 340, 341, 636,
3940 638, 342, 343, 646, 344, 652, 346, 656, 345, 658,
3941 347, 635, 681, 682, 634, 687, 698, 706, 707, 348,
3942 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3943 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3944 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3945 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3946 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3947 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3948 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3949 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3950 33, 158, 159, 161, 402, 403, 405, 0, 790, 0,
3951 0, 334, 793, 326, 663, 0, 318, 316, 0, 298,
3952 299, 329, 317, 110, 322, 816, 330, 0, 706, 707,
3953 0, 349, 816, 786, 111, 816, 509, 0, 107, 65,
3954 64, 0, 0, 28, 816, 12, 0, 11, 27, 295,
3955 393, 394, 510, 719, 719, 0, 261, 0, 360, 363,
3956 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3957 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
3958 64, 784, 64, 0, 0, 0, 719, 719, 124, 397,
3959 0, 132, 133, 140, 487, 684, 0, 683, 685, 0,
3960 0, 0, 643, 647, 659, 653, 661, 688, 74, 273,
3961 274, 813, 812, 5, 814, 0, 0, 0, 0, 0,
3962 0, 816, 0, 0, 750, 0, 718, 389, 750, 716,
3963 0, 391, 409, 514, 504, 100, 516, 367, 410, 516,
3964 499, 816, 130, 0, 122, 117, 816, 77, 0, 0,
3965 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
3966 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
3967 0, 0, 0, 0, 0, 0, 0, 803, 804, 806,
3968 816, 805, 0, 0, 86, 84, 85, 0, 0, 0,
3969 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
3970 706, 707, 349, 150, 151, 0, 0, 153, 816, 0,
3971 706, 707, 349, 387, 225, 218, 228, 213, 195, 196,
3972 197, 155, 156, 782, 81, 80, 781, 780, 0, 779,
3973 109, 64, 108, 806, 805, 0, 369, 639, 816, 816,
3974 163, 789, 357, 333, 792, 325, 0, 816, 0, 0,
3975 319, 328, 806, 816, 805, 816, 816, 0, 320, 751,
3976 64, 312, 816, 64, 816, 311, 324, 0, 64, 366,
3977 73, 30, 32, 31, 0, 816, 296, 0, 0, 0,
3978 0, 806, 805, 816, 0, 64, 355, 14, 0, 113,
3979 0, 358, 811, 810, 301, 811, 303, 359, 785, 0,
3980 139, 688, 127, 119, 718, 0, 806, 816, 805, 488,
3981 669, 686, 672, 670, 664, 640, 641, 666, 642, 668,
3982 644, 0, 0, 0, 0, 0, 815, 9, 0, 34,
3983 35, 36, 37, 297, 0, 71, 72, 757, 754, 753,
3984 752, 755, 763, 764, 751, 0, 770, 765, 774, 773,
3985 769, 816, 766, 723, 816, 729, 749, 732, 735, 64,
3986 730, 756, 758, 759, 761, 735, 722, 768, 443, 442,
3987 772, 735, 776, 728, 0, 0, 0, 0, 0, 487,
3988 0, 514, 101, 487, 0, 0, 0, 64, 0, 118,
3989 131, 0, 527, 259, 266, 268, 269, 270, 277, 278,
3990 271, 272, 247, 248, 275, 276, 527, 64, 263, 264,
3991 265, 254, 255, 256, 257, 258, 293, 294, 794, 796,
3992 795, 797, 323, 507, 64, 816, 794, 796, 795, 797,
3993 323, 508, 816, 0, 421, 0, 420, 0, 0, 0,
3994 0, 0, 375, 357, 806, 816, 805, 380, 385, 150,
3995 151, 152, 712, 383, 714, 806, 816, 805, 0, 0,
3996 801, 802, 82, 64, 362, 794, 795, 503, 323, 0,
3997 0, 0, 816, 0, 0, 788, 331, 327, 332, 816,
3998 794, 795, 64, 794, 795, 0, 0, 787, 306, 313,
3999 308, 315, 807, 365, 29, 0, 279, 13, 0, 0,
4000 356, 0, 816, 0, 25, 115, 22, 354, 64, 0,
4001 125, 798, 138, 64, 794, 795, 489, 673, 0, 645,
4002 0, 649, 0, 655, 651, 0, 0, 657, 260, 0,
4003 38, 0, 441, 433, 435, 64, 438, 431, 0, 727,
4004 778, 0, 726, 0, 745, 717, 0, 0, 0, 742,
4005 721, 594, 767, 771, 0, 747, 775, 64, 59, 62,
4006 286, 280, 0, 720, 60, 281, 0, 488, 512, 0,
4007 488, 416, 417, 513, 498, 334, 92, 93, 41, 336,
4008 0, 45, 335, 129, 123, 0, 0, 69, 48, 67,
4009 0, 304, 329, 236, 42, 0, 349, 525, 525, 0,
4010 816, 816, 514, 506, 104, 0, 511, 313, 816, 816,
4011 310, 505, 102, 309, 816, 352, 816, 422, 816, 424,
4012 88, 423, 373, 374, 413, 0, 0, 527, 0, 0,
4013 798, 356, 64, 794, 795, 0, 0, 0, 0, 150,
4014 151, 154, 64, 0, 64, 0, 361, 500, 95, 50,
4015 304, 238, 57, 245, 164, 0, 791, 321, 816, 816,
4016 511, 816, 816, 64, 816, 64, 64, 56, 244, 302,
4017 120, 511, 26, 674, 671, 679, 680, 648, 650, 660,
4018 654, 662, 39, 64, 440, 0, 760, 0, 777, 724,
4019 768, 816, 734, 733, 735, 735, 445, 731, 735, 762,
4020 735, 759, 735, 0, 816, 816, 390, 392, 489, 96,
4021 489, 339, 0, 816, 121, 357, 816, 816, 816, 806,
4022 816, 805, 526, 526, 0, 0, 0, 0, 105, 808,
4023 816, 0, 0, 103, 411, 816, 18, 626, 415, 414,
4024 0, 0, 0, 425, 427, 0, 89, 0, 518, 0,
4025 378, 525, 0, 379, 511, 0, 0, 0, 0, 511,
4026 388, 783, 83, 501, 502, 0, 0, 816, 0, 0,
4027 307, 314, 364, 0, 750, 675, 432, 434, 436, 439,
4028 725, 0, 746, 0, 743, 0, 738, 0, 740, 748,
4029 66, 288, 0, 0, 26, 26, 334, 337, 0, 0,
4030 0, 0, 794, 795, 64, 794, 795, 0, 0, 285,
4031 54, 242, 55, 243, 106, 0, 52, 240, 53, 241,
4032 627, 628, 816, 629, 816, 15, 428, 0, 371, 372,
4033 519, 0, 0, 526, 376, 381, 0, 713, 384, 0,
4034 750, 491, 494, 0, 0, 0, 735, 735, 735, 735,
4035 63, 287, 816, 816, 338, 44, 68, 305, 511, 618,
4036 624, 590, 0, 0, 0, 526, 64, 526, 578, 663,
4037 0, 617, 78, 535, 541, 543, 546, 539, 538, 574,
4038 540, 583, 586, 589, 595, 596, 585, 549, 604, 597,
4039 550, 605, 606, 607, 608, 609, 610, 611, 612, 614,
4040 613, 615, 616, 593, 76, 51, 239, 0, 0, 631,
4041 412, 0, 19, 633, 0, 0, 0, 520, 816, 0,
4042 0, 386, 64, 0, 0, 437, 744, 739, 0, 736,
4043 741, 479, 0, 477, 476, 0, 602, 603, 151, 622,
4044 0, 566, 64, 567, 571, 64, 0, 561, 0, 816,
4045 564, 577, 0, 619, 0, 620, 0, 536, 544, 0,
4046 584, 588, 600, 601, 0, 526, 526, 0, 0, 592,
4047 0, 630, 0, 706, 707, 349, 0, 3, 16, 816,
4048 521, 523, 524, 522, 0, 532, 0, 481, 0, 496,
4049 0, 492, 678, 677, 676, 735, 816, 448, 816, 454,
4050 475, 457, 460, 480, 64, 759, 460, 447, 460, 453,
4051 515, 517, 64, 559, 581, 569, 568, 560, 572, 809,
4052 562, 591, 64, 542, 537, 574, 0, 575, 579, 663,
4053 587, 582, 598, 599, 623, 548, 558, 547, 554, 64,
4054 64, 64, 64, 64, 64, 357, 806, 816, 805, 816,
4055 632, 816, 426, 528, 0, 0, 382, 0, 493, 0,
4056 0, 737, 452, 0, 451, 0, 471, 0, 0, 455,
4057 466, 468, 0, 446, 0, 473, 565, 0, 573, 0,
4058 621, 0, 545, 0, 0, 551, 552, 553, 555, 556,
4059 557, 798, 356, 64, 794, 795, 625, 17, 0, 533,
4060 534, 485, 64, 483, 486, 0, 495, 449, 816, 459,
4061 458, 460, 460, 478, 456, 460, 460, 357, 806, 460,
4062 570, 64, 575, 576, 580, 511, 816, 0, 482, 497,
4063 450, 0, 472, 0, 469, 0, 463, 0, 465, 798,
4064 356, 474, 0, 563, 530, 531, 529, 484, 460, 460,
4065 460, 460, 470, 464, 0, 461, 467, 460, 462
4066};
4067
4068/* YYPGOTO[NTERM-NUM]. */
4069static const yytype_int16 yypgoto[] =
4070{
4071 -1145, -104, 1039, -1145, -1145, -1145, 964, -1145, 799, -17,
4072 -1145, -1145, -466, -1145, 173, 803, -1145, -2, -1145, -1145,
4073 6, -1145, -1145, -254, -1145, 0, -518, 144, -565, -64,
4074 -1145, -1145, 442, 2796, -1145, 3210, -1145, -78, -1145, -1145,
4075 1206, -42, -1145, 709, -1145, -448, 1320, -10, 1210, -163,
4076 14, -435, -41, -1145, 18, 3905, -406, 1209, -39, -4,
4077 -1145, -1145, 17, -1145, -1145, 4762, -1145, -1145, -1145, -1145,
4078 -526, 1229, -1145, 47, 833, 167, -1145, 1935, -1145, 566,
4079 20, 643, -382, -1145, 53, -1145, -57, -396, -214, 30,
4080 -351, -1145, -535, -47, -1145, -1145, -1145, -1145, -1145, -1145,
4081 -1145, -1145, -1145, -1145, -1145, -1145, 1096, -1145, -1145, -1145,
4082 -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145, -1145,
4083 -1145, -1145, 376, -1145, 282, 2058, 2282, -395, 359, 131,
4084 -773, -1145, -813, -824, 586, 436, -308, -1145, 114, 64,
4085 -1145, -1145, 198, -1145, -1144, 61, 132, -1145, 275, -1145,
4086 -1145, 128, -1145, 7, 238, -643, -194, -1145, -1145, 453,
4087 -1145, -1145, -1145, 487, -1145, -1145, -95, -1145, -480, -1145,
4088 1004, -1145, -798, -1145, -722, -863, -541, -1145, 13, -1145,
4089 -1145, -872, -172, -1145, -1145, -1145, -1145, -1145, 118, -1145,
4090 -73, -1145, -836, -688, -1057, -452, -764, -955, -1145, 191,
4091 -1145, -1145, -784, 196, -1145, -1145, -469, 202, -1145, -1145,
4092 -1145, 105, -1145, -1145, 108, 545, 715, -1145, 1264, 781,
4093 1122, 50, -1145, 1421, -1145, 841, -1145, 1681, -1145, -1145,
4094 1867, -1145, 1882, -1145, -1145, -58, -1145, -1145, -227, -1145,
4095 -1145, -1145, -1145, -1145, -1145, -1145, 40, -1145, -1145, -1145,
4096 -1145, 34, -54, 3474, -1, 1274, 4036, 3597, -1145, -1145,
4097 8, 777, 59, -1145, 625, -1145, -1145, -291, -681, 620,
4098 -490, -320, -221, -1110, -516, -334, -735, -547, -405, -471,
4099 -1145, -724, -1145, -599, -1145, -383, -543, -1145, -1145, -1145,
4100 -1145, -1145, 43, -399, -369, -1145, -1145, -93, 1280, -153,
4101 148, 57, -236, -53, -68, 98
4102};
4103
4104/* YYDEFGOTO[NTERM-NUM]. */
4105static const yytype_int16 yydefgoto[] =
4106{
4107 0, 333, 69, 1, 2, 70, 71, 266, 267, 652,
4108 1134, 1271, 653, 1044, 287, 288, 504, 224, 72, 494,
4109 289, 74, 75, 76, 77, 78, 778, 487, 808, 79,
4110 626, 612, 444, 273, 865, 274, 406, 407, 409, 966,
4111 410, 82, 797, 809, 83, 602, 275, 85, 86, 290,
4112 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4113 220, 691, 641, 222, 92, 93, 94, 95, 96, 97,
4114 781, 395, 98, 553, 497, 554, 240, 241, 294, 813,
4115 830, 831, 480, 242, 481, 257, 258, 244, 470, 645,
4116 246, 801, 802, 99, 403, 510, 848, 661, 855, 1140,
4117 858, 856, 678, 595, 598, 100, 277, 102, 103, 104,
4118 105, 106, 107, 108, 109, 110, 111, 356, 359, 955,
4119 1131, 845, 960, 961, 793, 278, 279, 655, 840, 962,
4120 963, 419, 753, 754, 755, 756, 571, 766, 767, 1217,
4121 1218, 1219, 1329, 1290, 1221, 1222, 1286, 1223, 1152, 1153,
4122 1224, 1208, 1322, 1323, 529, 736, 892, 314, 1143, 114,
4123 1061, 1211, 1279, 360, 115, 116, 357, 599, 600, 603,
4124 604, 969, 846, 1203, 942, 1027, 817, 1318, 849, 1366,
4125 1204, 1092, 1234, 1094, 1246, 1095, 1187, 1188, 1096, 1299,
4126 1162, 1163, 1164, 1098, 1099, 1247, 1166, 1100, 1101, 1102,
4127 1103, 1104, 572, 1106, 1107, 1108, 1109, 1110, 1111, 1112,
4128 1113, 956, 1042, 1128, 1132, 117, 118, 119, 120, 121,
4129 122, 323, 123, 124, 541, 740, 125, 126, 543, 127,
4130 128, 129, 130, 542, 544, 316, 320, 321, 534, 738,
4131 737, 893, 995, 1063, 1214, 894, 131, 132, 317, 133,
4132 134, 135, 136, 248, 249, 139, 250, 251, 857, 673,
4133 345, 346, 347, 348, 573, 574, 575, 912, 577, 578,
4134 764, 579, 580, 581, 582, 921, 584, 585, 586, 587,
4135 588, 589, 590, 591, 592, 593, 759, 447, 448, 449,
4136 679, 299, 484, 253, 721, 643, 682, 677, 402, 489,
4137 826, 1170, 514, 656, 414, 269
4138};
4139
4140/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4141 positive, shift that token. If negative, reduce the rule whose
4142 number is the opposite. If YYTABLE_NINF, syntax error. */
4143static const yytype_int16 yytable[] =
4144{
4145 138, 319, 335, 412, 318, 237, 237, 73, 401, 309,
4146 583, 225, 226, 657, 583, 236, 236, 334, 644, 315,
4147 671, 456, 454, 263, 221, 328, 408, 355, 596, 413,
4148 642, 762, 650, 919, 483, 286, 293, 911, 478, 405,
4149 405, 256, 309, 405, 221, 245, 245, 223, 365, 757,
4150 972, 138, 138, 576, 334, 312, 452, 576, 252, 252,
4151 516, 309, 309, 309, 518, 965, 291, 223, 243, 254,
4152 336, 785, 445, 697, 308, 221, 814, 268, 707, 784,
4153 1028, 697, 913, 999, 295, 818, 688, 839, 312, 350,
4154 730, 702, 997, 537, 539, 769, 943, 296, 300, 142,
4155 327, 775, 237, 642, 354, 650, 1235, 421, 431, 431,
4156 431, -141, 236, 324, 325, 326, 707, 352, 698, 1212,
4157 1245, 789, 505, 791, 869, 872, -142, 1184, 221, 782,
4158 654, 1209, 786, 722, 342, 343, 368, 509, 352, -141,
4159 351, 1330, 245, -816, 928, 733, -708, 930, 562, 143,
4160 292, 292, 297, 301, 474, 252, 1124, 1176, 887, 722,
4161 654, 698, 742, -149, 915, 450, 344, 1324, 563, 920,
4162 261, 879, 264, 804, -708, -148, 466, 746, 349, 349,
4163 -141, 792, 1185, 507, 502, -146, 1186, -709, 265, -144,
4164 1139, 1097, 1097, 785, -700, 259, 488, 490, 567, 568,
4165 607, -132, 392, 393, 394, -147, -145, -147, -141, -143,
4166 259, 1330, 863, 286, 331, 743, 914, 528, 568, 508,
4167 332, -142, 1160, -700, 1169, 1210, -142, 922, -795, 138,
4168 747, 569, 1261, 1264, 334, 757, 904, 1324, -149, 1213,
4169 1145, -132, 353, 1105, 1105, 237, 1343, 237, 255, 1053,
4170 569, 259, 997, 283, -148, 236, -133, 236, 309, 549,
4171 550, 551, 552, 353, 523, 138, 919, 1205, 286, 861,
4172 478, 331, 73, 405, 405, 405, 405, 332, 555, 556,
4173 -141, 499, 500, 852, 138, 482, -141, 245, 259, -146,
4174 910, 260, 256, -140, 862, 354, -144, 722, 684, 291,
4175 252, 331, 1051, 1097, 312, -139, 971, 332, 722, 662,
4176 486, 496, 707, 697, 741, 697, 741, 309, -145, -135,
4177 -147, -143, 1255, 1257, 913, 666, -146, 708, 292, -794,
4178 710, 658, -146, 351, 138, 713, -136, 322, 521, -134,
4179 1202, 73, 947, 471, 1341, 405, 286, 668, -147, 959,
4180 471, -795, 725, 485, -147, 1105, 771, 807, 698, 847,
4181 334, 405, 138, 312, 142, 1201, 351, -142, 1000, 1176,
4182 934, 349, 349, -142, 772, 908, 948, 291, 908, -149,
4183 1030, 1032, 609, 292, 953, -149, 1036, 1038, 1176, 757,
4184 237, 757, 978, 659, 660, -148, 1105, 1011, 1165, 1236,
4185 236, -148, 138, 1105, 1105, 1010, 1068, 259, 606, 138,
4186 138, -135, -64, 611, 361, 1248, -699, 358, 649, -137,
4187 1041, -794, 651, 1177, 1002, 1004, 765, 362, 1006, 583,
4188 1008, 697, 1009, 1081, 583, 807, 807, -144, 366, 513,
4189 513, 237, -581, -144, 513, -699, 519, 530, 538, 59,
4190 -138, 236, -795, 563, 803, 476, 1066, -701, 1067, -145,
4191 1069, 292, -143, 237, -64, -145, 259, 1011, -143, 807,
4192 1125, 331, 649, 236, 458, 687, 698, 332, 309, -137,
4193 530, 245, 692, 567, 523, 877, -701, 1249, 883, -149,
4194 714, 649, 889, 460, 252, 881, -702, -136, 485, 1260,
4195 1263, 292, 532, 533, 683, 689, 690, 138, 292, 292,
4196 1056, 221, 699, 898, 694, 1105, -148, 237, 898, 649,
4197 -135, 260, 705, 706, 312, -702, 674, 236, -134, -144,
4198 866, 749, 882, 1248, 223, 532, 533, 1248, 462, 1344,
4199 -135, -135, 496, 783, -135, 649, 467, 138, 757, 757,
4200 723, 468, 1228, 138, 919, 728, 1123, 1123, 1024, 1328,
4201 750, 309, 530, 469, 796, 459, -145, 523, 475, 796,
4202 642, 485, 650, 1364, 1052, 322, 1146, 1147, 1149, 1150,
4203 471, 698, 471, 477, 779, 824, 495, 779, -137, 530,
4204 987, 255, 707, 832, 138, 697, 451, 138, 1344, -149,
4205 503, 1215, 906, -704, 1226, 841, -136, 312, -137, -137,
4206 -703, -794, -137, 1156, 1157, 864, 919, 532, 533, 828,
4207 1241, -397, -113, -112, -143, 485, -136, -136, 368, 829,
4208 -136, 868, -704, 950, -148, 506, 800, -134, 836, -703,
4209 838, 800, 531, -129, 532, 533, 292, 796, 796, -397,
4210 -397, 885, 1135, -144, 138, 237, 138, -134, -134, 517,
4211 583, -134, 823, -145, 511, 236, 237, -143, 1123, 760,
4212 877, 583, 760, 1282, 1062, 1284, 236, 138, 1159, 342,
4213 343, 796, 309, 649, 895, 520, 1332, 874, 890, 1231,
4214 1336, 807, 807, 292, 649, 397, 292, 807, 807, 834,
4215 -705, 771, 525, 576, 530, -397, -696, 540, 221, 1123,
4216 -709, 981, 344, 1252, 1253, 548, 1123, 1123, 545, 1189,
4217 -697, 594, 941, 398, 453, 1281, 583, -97, 312, -705,
4218 990, 223, 992, 1196, 1014, -696, 1015, -715, 1331, 875,
4219 1142, 823, 597, 471, -142, 601, 1227, 1339, 833, -697,
4220 996, 680, 884, 292, -356, 292, 1370, 535, 309, 532,
4221 533, 610, 693, 485, 523, -133, 807, 546, 1229, 576,
4222 -696, 819, 983, 959, 485, 844, 292, 975, 1254, 977,
4223 681, 807, -356, -356, 663, 1350, 833, 397, 825, 459,
4224 897, 405, 899, 405, 672, 900, 901, 471, -696, -696,
4225 667, 669, 397, 976, 312, 670, 1368, 397, 1369, 1273,
4226 1371, 397, 910, 1325, 503, 398, 399, 1225, 709, 828,
4227 833, 669, -98, -149, 711, 1158, 445, 1377, 1123, 259,
4228 398, 472, -706, -64, -707, 398, 501, 787, -356, 398,
4229 526, 790, -795, 1216, -140, 1340, 825, 717, -148, 1342,
4230 880, 712, -97, -144, -696, 1093, 1093, 138, -97, 718,
4231 -706, -706, -707, -707, 530, -697, 719, 945, 946, -139,
4232 884, 400, 513, -444, -135, 951, 952, 825, 1227, -349,
4233 1227, 891, 221, 1047, 1227, 1313, 473, 794, 727, 1227,
4234 994, 473, -129, -697, -697, 527, 729, 405, 758, 722,
4235 908, 761, 1229, 796, 796, 829, 1229, -349, -349, 796,
4236 796, 1229, 763, 779, 1161, 768, -706, 535, -707, 532,
4237 533, 923, 841, -798, 1057, 985, 986, 773, 988, 989,
4238 237, 1181, 957, 774, 964, 835, 964, 950, 776, -145,
4239 236, 842, 843, 1046, 373, 374, 1227, -98, 1227, -697,
4240 1227, 1225, 1227, -98, 491, 1225, 292, 805, 649, 138,
4241 -136, 259, 512, -349, 492, 493, -798, 1093, 1229, 1227,
4242 1229, -143, 1229, 397, 1229, 138, 788, 1216, 796, 397,
4243 827, 1216, 471, 837, 1020, 800, 1216, 847, 1232, 259,
4244 515, 1229, -134, 796, -798, -798, 825, 1035, 385, 386,
4245 974, 398, 664, 958, 959, 1161, 825, 398, 675, 760,
4246 979, -357, 1072, 1073, 844, 1161, 1161, 138, 138, 902,
4247 530, 1225, 1182, 1183, 1075, 1076, 1122, 1122, 1274, 1275,
4248 993, 1172, 397, 1258, 1059, 1138, 1175, 905, 485, -357,
4249 -357, 397, 907, 1216, 924, 1216, 1144, 1216, -798, 1216,
4250 -798, 138, 916, 1043, -794, 259, 1347, 665, 292, 397,
4251 398, 939, 138, 676, 926, 925, 1216, 929, 927, 398,
4252 1266, -329, 932, 535, 292, 532, 533, 933, 1241, 1296,
4253 309, 1122, 1122, 524, 524, 1122, 935, 398, 1338, 1300,
4254 936, 1012, 1013, 1270, 937, -357, 1242, 101, 949, 1268,
4255 1018, 944, 1122, 1019, 1244, 1021, 1305, 1306, 1307, 954,
4256 405, 247, 247, 959, 1259, 1262, 940, 1198, 1199, 1173,
4257 772, 36, 37, 1206, 39, 1267, 1194, 1034, 970, 508,
4258 138, 973, 991, 138, 138, 1230, 1001, 1003, 1122, 138,
4259 1129, 1005, 1133, 676, 334, 980, 1007, -333, 101, 101,
4260 292, 138, 310, 1064, 138, 1127, 368, 1065, -331, 1122,
4261 1130, 292, 1122, 247, 40, 41, 42, 43, 825, 1174,
4262 1154, 1154, 1078, 381, 382, 1148, 1122, 1151, 1122, 1269,
4263 309, 1122, 1122, 1171, 530, 310, 1122, 1122, 1178, 1179,
4264 1180, 1304, 1238, 1280, 1239, 138, 1319, 1320, 368, 247,
4265 247, 1079, 1265, 247, 418, 429, 429, 1176, 247, 138,
4266 405, 405, 1277, 1278, 1283, 1285, 1240, 387, 388, 389,
4267 390, 391, 392, 393, 394, 1289, 431, 530, 1294, 292,
4268 825, 1168, 292, 292, 1167, 530, 964, 536, 292, 532,
4269 533, 309, 1297, 1298, 1048, 1122, 1301, 1049, 36, 37,
4270 292, 39, 1303, 292, 1054, 871, 873, 237, 45, 46,
4271 1058, 1326, 390, 391, 392, 393, 394, 236, 1333, 1337,
4272 1351, 871, 873, 337, 338, 339, 340, 341, 138, 1353,
4273 739, 1355, 532, 533, -794, 649, 1207, 431, 744, 888,
4274 532, 533, 1357, 1362, 292, 1374, 1122, 964, -795, 547,
4275 1122, 1346, 1122, 724, 1197, 498, 825, 982, 292, 825,
4276 1233, 726, 411, 1237, 760, 798, 760, 138, 416, 433,
4277 557, 84, 558, 559, 560, 561, 101, 396, 715, 825,
4278 1272, 867, 1045, 1256, 1055, 84, 84, 903, 1141, 1288,
4279 557, 998, 558, 559, 560, 561, 562, 1327, 1155, 1220,
4280 1335, 247, 1287, 247, 1367, 984, 247, 247, 1291, 1365,
4281 1295, 1122, 101, 605, 1302, 485, 563, 957, 1207, 1133,
4282 751, 1250, 84, 84, 1316, 752, 1251, 292, 1243, 1317,
4283 564, 101, 368, 457, 745, 446, 909, 84, 918, 557,
4284 565, 558, 559, 560, 561, 455, 567, 568, 1363, 381,
4285 382, 310, 0, 0, 0, 0, 825, 825, 825, 0,
4286 1308, 1309, 1310, 0, 0, 557, 292, 558, 559, 560,
4287 561, 0, 0, 84, 84, 0, 760, 84, 0, 569,
4288 0, 101, 84, 247, 247, 247, 247, 0, 247, 247,
4289 0, 888, 0, 0, 964, 389, 390, 391, 392, 393,
4290 394, 1321, 0, 558, 559, 560, 561, 825, 0, 101,
4291 310, 1345, 0, 1352, 1354, 751, 1348, 1356, 1358, 0,
4292 0, 1361, 557, 0, 558, 559, 560, 561, 562, 0,
4293 1091, 1091, 0, 0, 0, 1168, 0, 557, 1276, 558,
4294 559, 560, 561, 562, 0, 0, 247, 0, 563, 101,
4295 1372, 1373, 1375, 1376, 0, 247, 101, 101, 0, 1378,
4296 0, 1031, 1033, 563, 0, 0, 0, 1037, 1039, 0,
4297 0, 247, 565, 0, 0, 0, 0, 564, 567, 568,
4298 0, 368, 0, 0, 0, 1091, 1091, 565, 0, 1091,
4299 0, 0, 566, 567, 568, 0, 0, 247, 381, 382,
4300 84, 1031, 1033, 0, 1037, 1039, 1091, 0, 0, 0,
4301 0, 569, 557, 0, 558, 559, 560, 561, 562, 247,
4302 0, 0, 1114, 1114, 0, 84, 569, 84, 0, 570,
4303 84, 84, 0, 0, 0, 0, 84, 0, 563, 0,
4304 0, 0, 1091, 0, 0, 390, 391, 392, 393, 394,
4305 0, 1126, 564, 0, 101, 84, 0, 1349, 0, 0,
4306 0, 0, 565, 1091, 0, 0, 1091, 566, 567, 568,
4307 0, 310, 0, 247, 0, 1126, 0, 1114, 1114, 0,
4308 1091, 1114, 1091, 0, 0, 1091, 1091, 0, 0, 0,
4309 1091, 1091, 0, 0, 101, 0, 0, 0, 1114, 0,
4310 101, 569, 0, 0, 570, 84, 0, 84, 84, 84,
4311 84, 0, 84, 84, 0, 0, 0, 1060, 0, 0,
4312 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4313 0, 0, 0, 84, 1114, 0, 0, 0, 0, 0,
4314 247, 101, 0, 247, 101, 0, 0, 0, 0, 1091,
4315 0, 0, 247, 0, 310, 1114, 0, 815, 1114, 0,
4316 557, 0, 558, 559, 560, 561, 562, 0, 0, 0,
4317 84, 0, 1114, 84, 1114, 0, 0, 1114, 1114, 84,
4318 84, 84, 1114, 1114, 0, 0, 563, 0, 0, 0,
4319 0, 0, 1115, 1115, 0, 84, 0, 0, 0, 0,
4320 1091, 101, 0, 101, 1091, 0, 1091, 0, 0, 0,
4321 565, 247, 0, 0, 0, 566, 567, 568, 0, 0,
4322 0, 84, 247, 0, 101, 247, 0, 0, 0, 0,
4323 0, 0, 0, 0, 0, 815, 815, 0, 0, 0,
4324 0, 1114, 0, 84, 0, 0, 0, 1115, 1115, 569,
4325 0, 1115, 570, 0, 0, 0, 0, 0, 1116, 1116,
4326 0, 247, 0, 0, 0, 1091, 0, 0, 1115, 815,
4327 0, 0, 0, 0, 0, 310, 0, 0, 84, 0,
4328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4329 0, 0, 1114, 0, 0, 0, 1114, 84, 1114, 0,
4330 0, 0, 0, 0, 1115, 0, 0, 0, 0, 0,
4331 0, 0, 0, 1116, 1116, 0, 0, 1116, 84, 0,
4332 0, 0, 0, 0, 84, 1115, 0, 0, 1115, 0,
4333 0, 0, 0, 0, 1116, 0, 0, 0, 0, 0,
4334 0, 0, 1115, 0, 1115, 0, 0, 1115, 1115, 0,
4335 0, 310, 1115, 1115, 0, 0, 0, 1114, 0, 0,
4336 0, 0, 0, 0, 84, 84, 0, 84, 84, 0,
4337 1116, 0, 0, 0, 0, 0, 84, 0, 0, 0,
4338 0, 84, 0, 0, 0, 0, 0, 0, 0, 0,
4339 0, 1116, 0, 0, 1116, 0, 0, 0, 0, 0,
4340 0, 247, 0, 247, 101, 0, 0, 0, 1116, 0,
4341 1116, 1115, 0, 1116, 1116, 0, 0, 0, 1116, 1116,
4342 0, 0, 0, 0, 0, 84, 0, 84, 0, 0,
4343 0, 0, 0, 0, 0, 84, 0, 0, 0, 0,
4344 298, 0, 0, 0, 0, 0, 84, 0, 84, 84,
4345 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,
4346 84, 0, 1115, 0, 0, 0, 1115, 0, 1115, 247,
4347 0, 0, 0, 0, 0, 0, 0, 1116, 368, -817,
4348 -817, -817, -817, 373, 374, 84, 247, -817, -817, 0,
4349 0, 815, 815, 84, 0, 381, 382, 815, 815, 0,
4350 0, 0, 0, 0, 0, 0, 101, 247, 0, 112,
4351 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4352 0, 0, 101, 112, 112, 0, 0, 1115, 1116, 0,
4353 0, 0, 1116, 0, 1116, 0, 0, 385, 386, 387,
4354 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4355 0, 0, 0, 0, 0, 0, 22, 23, 24, 25,
4356 112, 112, 0, 0, 101, 101, 815, 0, 0, 0,
4357 0, 0, 31, 32, 33, 112, 0, 0, 0, 0,
4358 0, 815, 40, 41, 42, 43, 44, 0, 0, 0,
4359 0, 0, 0, 1116, 0, 0, 0, 0, 101, 1117,
4360 1117, 0, 0, 0, 0, 0, 0, 0, 0, 101,
4361 0, 112, 112, 461, 0, 112, 463, 464, 465, 0,
4362 112, 0, 0, 0, 0, 84, 0, 84, 84, 0,
4363 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4364 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
4365 0, 0, 0, 0, 1117, 1117, 0, 0, 1117, 0,
4366 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4367 304, 0, 0, 1192, 0, 1117, 0, 101, 0, 0,
4368 101, 101, 0, 0, 0, 0, 101, 0, 0, 0,
4369 0, 0, 0, 84, 0, 0, 0, 0, 101, 0,
4370 0, 101, 0, 0, 0, 0, 0, 0, 0, 0,
4371 84, 1117, 0, 0, 0, 84, 84, 0, 0, 0,
4372 247, 84, 84, 0, 0, 0, 0, 0, 0, 0,
4373 84, 84, 1117, 113, 0, 1117, 0, 0, 112, 0,
4374 0, 0, 101, 0, 0, 0, 84, 113, 113, 1117,
4375 0, 1117, 0, 0, 1117, 1117, 101, 0, 0, 1117,
4376 1117, 0, 0, 112, 0, 112, 0, 0, 112, 112,
4377 0, 0, 0, 1293, 112, 0, 0, 0, 0, 0,
4378 0, 0, 0, 0, 113, 113, 0, 0, 84, 84,
4379 84, 0, 0, 112, 0, 0, 0, 0, 0, 113,
4380 0, 0, 0, 0, 0, 84, 0, 0, 0, 0,
4381 0, 0, 0, 247, 0, 0, 0, 0, 1117, 0,
4382 247, 247, 84, 0, 0, 101, 0, 0, 0, 0,
4383 0, 0, 0, 84, 1334, 113, 113, 0, 0, 113,
4384 0, 0, 0, 112, 113, 112, 112, 112, 112, 0,
4385 112, 112, 0, 695, 696, 0, 0, 0, 0, 0,
4386 0, 0, 298, 0, 101, 0, 0, 0, 0, 1117,
4387 0, 112, 0, 1117, 0, 1117, 0, 0, 0, 0,
4388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4389 0, 0, 0, 0, 0, 0, 0, 696, 1118, 1118,
4390 298, 84, 0, 0, 84, 84, 0, 0, 112, 0,
4391 84, 112, 0, 0, 0, 0, 0, 112, 112, 112,
4392 0, 0, 84, 0, 0, 84, 0, 0, 0, 0,
4393 0, 0, 0, 112, 1117, 0, 0, 0, 0, 0,
4394 0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4395 0, 0, 0, 1118, 1118, 0, 0, 1118, 0, 112,
4396 0, 0, 113, 0, 0, 0, 84, 0, 0, 0,
4397 0, 770, 0, 0, 1118, 0, 0, 0, 0, 0,
4398 84, 112, 0, 0, 0, 0, 0, 113, 0, 113,
4399 0, 799, 113, 113, 0, 0, 812, 0, 113, 0,
4400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4401 1118, 0, 0, 0, 0, 0, 112, 113, 0, 0,
4402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4403 0, 1118, 0, 0, 1118, 112, 0, 84, 0, 0,
4404 0, 0, 0, 0, 84, 84, 0, 0, 1118, 84,
4405 1118, 0, 0, 1118, 1118, 0, 112, 0, 1118, 1118,
4406 0, 0, 112, 0, 0, 0, 0, 113, 0, 113,
4407 113, 113, 113, 0, 113, 113, 0, 0, 876, 0,
4408 0, 0, 0, 0, 0, 0, 0, 0, 84, 0,
4409 0, 0, 0, 0, 696, 113, 298, 0, 0, 0,
4410 0, 0, 112, 112, 0, 112, 112, 0, 0, 0,
4411 0, 0, 0, 0, 112, 0, 0, 1118, 0, 112,
4412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4413 0, 0, 113, 0, 0, 113, 0, 0, 0, 0,
4414 0, 113, 113, 113, 0, 0, 0, 0, 0, 0,
4415 0, 0, 917, 0, 0, 0, 0, 113, 1119, 1119,
4416 0, 0, 0, 112, 0, 112, 0, 0, 1118, 0,
4417 0, 0, 1118, 112, 1118, 0, 0, 0, 0, 0,
4418 931, 0, 0, 113, 112, 0, 112, 112, 0, 0,
4419 368, 369, 370, 371, 372, 373, 374, 112, 112, 377,
4420 378, 0, 0, 0, 0, 113, 0, 381, 382, 0,
4421 0, 0, 696, 1119, 1119, 0, 0, 1119, 0, 0,
4422 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4423 968, 112, 0, 1118, 1119, 0, 0, 0, 0, 0,
4424 113, 0, 0, 0, 0, 0, 0, 80, 0, 385,
4425 386, 387, 388, 389, 390, 391, 392, 393, 394, 113,
4426 0, 80, 80, 0, 0, 0, 0, 0, 0, 0,
4427 1119, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4428 113, 0, 0, 0, 0, 0, 113, 0, 0, 0,
4429 0, 1119, 0, 0, 1119, 0, 0, 0, 80, 80,
4430 0, 0, 306, 0, 0, 0, 0, 0, 1119, 0,
4431 1119, 0, 0, 1119, 1119, 0, 0, 1017, 1119, 1119,
4432 0, 0, 0, 0, 0, 0, 113, 113, 0, 113,
4433 113, 0, 0, 0, 0, 306, 0, 0, 113, 0,
4434 1040, 0, 0, 113, 1120, 1120, 0, 0, 0, 0,
4435 0, 0, 1050, 0, 306, 306, 306, 0, 80, 1121,
4436 1121, 0, 0, 112, 0, 112, 112, 0, 0, 0,
4437 0, 0, 0, 0, 0, 0, 298, 1119, 0, 0,
4438 0, 0, 0, 0, 0, 0, 0, 113, 0, 113,
4439 0, 0, 0, 0, 0, 0, 0, 113, 0, 1120,
4440 1120, 1074, 0, 1120, 0, 0, 0, 0, 113, 0,
4441 113, 113, 0, 0, 1121, 1121, 0, 0, 1121, 0,
4442 1120, 113, 113, 0, 0, 0, 0, 0, 1119, 0,
4443 0, 112, 1119, 0, 1119, 1121, 1137, 0, 0, 0,
4444 0, 0, 0, 0, 0, 0, 0, 113, 112, 0,
4445 0, 0, 0, 112, 112, 113, 1120, 0, 0, 112,
4446 112, 0, 0, 0, 0, 0, 0, 0, 112, 112,
4447 0, 1121, 0, 0, 0, 0, 80, 1120, 0, 0,
4448 1120, 0, 0, 0, 112, 0, 0, 0, 0, 0,
4449 0, 0, 1121, 1119, 1120, 1121, 1120, 0, 0, 1120,
4450 1120, 80, 0, 80, 1120, 1120, 0, 0, 0, 1121,
4451 0, 1121, 80, 0, 1121, 1121, 0, 0, 0, 1121,
4452 1121, 1200, 0, 0, 0, 0, 112, 112, 112, 0,
4453 0, 80, 368, 369, 370, 371, 372, 373, 374, 375,
4454 0, 377, 378, 112, 0, 0, 0, 0, 0, 381,
4455 382, 306, 0, 0, 0, 0, 0, 0, 0, 0,
4456 112, 0, 0, 1120, 0, 0, 0, 0, 0, 0,
4457 0, 112, 0, 0, 0, 0, 0, 0, 1121, 0,
4458 0, 80, 0, 0, 0, 0, 0, 113, 0, 113,
4459 113, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4460 394, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4461 306, 0, 0, 0, 1120, 0, 0, 0, 1120, 0,
4462 1120, 0, 0, 0, 0, 0, 0, 0, 0, 1121,
4463 0, 0, 0, 1121, 0, 1121, 0, 0, 0, 112,
4464 0, 0, 112, 112, 0, 0, 80, 0, 112, 80,
4465 0, 0, 0, 0, 0, 113, 80, 80, 0, 0,
4466 112, 81, 0, 112, 0, 0, 0, 0, 0, 0,
4467 0, 0, 113, 0, 0, 81, 81, 113, 113, 1120,
4468 0, 0, 112, 113, 113, 0, 0, 0, 0, 0,
4469 0, 0, 113, 113, 1121, 0, 0, 80, 0, 0,
4470 0, 0, 0, 0, 112, 0, 0, 0, 113, 0,
4471 0, 0, 81, 81, 0, 0, 307, 0, 112, 80,
4472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4473 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4474 0, 0, 0, 0, 0, 0, 0, 0, 0, 307,
4475 113, 113, 113, 0, 80, 0, 0, 0, 0, 0,
4476 0, 0, 0, 0, 0, 0, 0, 113, 307, 307,
4477 307, 306, 81, 80, 0, 112, 0, 0, 0, 0,
4478 0, 0, 112, 112, 113, 0, 0, 112, 0, 0,
4479 0, 0, 0, 0, 80, 113, -816, 0, 0, 0,
4480 80, 0, 0, 0, -816, -816, -816, 0, 0, -816,
4481 -816, -816, 0, -816, 0, 0, 0, 0, 0, 0,
4482 0, -816, -816, -816, 0, 0, 112, 0, 0, 0,
4483 0, 0, 0, -816, -816, 0, -816, -816, -816, -816,
4484 -816, 80, 0, 0, 80, 0, 0, 0, 0, 0,
4485 0, 0, 0, 0, 306, 0, 0, 80, 0, 0,
4486 0, 0, 0, 113, -816, -816, 113, 113, 0, 0,
4487 0, 0, 113, 0, 0, 0, 0, 0, 0, 0,
4488 0, 0, 0, 0, 113, 0, 0, 113, 0, 0,
4489 81, 0, 0, -816, -816, 0, 0, 0, 0, 0,
4490 0, 80, 0, 80, 0, 0, 113, 0, 0, 0,
4491 0, 80, 0, 0, 0, 81, -816, 81, 0, 0,
4492 0, 0, 80, 0, 80, 137, 81, 0, 113, 0,
4493 0, 0, 0, 0, 0, 80, 80, 0, 0, 0,
4494 0, 0, 113, 0, 0, 81, 0, -816, -816, 0,
4495 -816, 0, 0, 255, -816, 0, -816, 0, 0, 0,
4496 0, 0, 0, 0, 0, 307, 0, 0, 0, 80,
4497 0, 0, 0, 0, 0, 306, 137, 137, 0, 0,
4498 311, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4499 0, 0, 0, 0, 0, 81, 0, 0, 0, 113,
4500 0, 0, 0, 0, 0, 0, 113, 113, 0, 0,
4501 0, 113, 0, 311, 0, 0, 0, 0, 0, 0,
4502 0, 0, 0, 81, 307, 367, 0, 0, 0, 0,
4503 0, 0, 420, 430, 430, 430, 0, 0, 0, 0,
4504 0, 0, 0, 0, 0, 0, 0, 0, 141, 0,
4505 113, 306, 0, 0, 0, 0, 0, 0, 0, 0,
4506 81, 0, 0, 81, 0, 0, 0, 0, 0, 0,
4507 81, 81, 0, 0, 0, 0, 0, 0, 368, 369,
4508 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4509 380, 0, 0, 0, 0, 381, 382, 0, 0, 141,
4510 141, 383, 0, 313, 80, 0, 0, 0, 0, 0,
4511 0, 81, 368, 369, 370, 371, 372, 373, 374, 375,
4512 376, 377, 378, 379, 380, 0, 0, 0, 0, 381,
4513 382, 0, 0, 81, 0, 384, 313, 385, 386, 387,
4514 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4515 0, 0, 0, 0, 137, 422, 432, 432, 0, 0,
4516 0, 0, 0, 0, 0, 0, 0, 0, 81, 384,
4517 0, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4518 394, 0, 0, 0, 0, 307, 80, 81, 259, 0,
4519 137, 80, 80, 0, 0, 0, 0, 80, 80, 0,
4520 0, 0, 0, 0, 0, 0, 80, 0, 81, 137,
4521 0, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4522 0, 0, 80, 0, 0, 0, 0, 0, 0, 311,
4523 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4525 0, 0, 0, 0, 0, 81, 0, 0, 81, 137,
4526 0, 0, 0, 0, 80, 80, 80, 0, 307, 0,
4527 0, 81, 0, 0, 0, 0, 0, 141, 0, 0,
4528 0, 80, 0, 0, 0, 0, 0, 137, 311, 0,
4529 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4530 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4531 0, 0, 0, 141, 0, 81, 0, 81, 0, 0,
4532 0, 0, 0, 0, 0, 81, 0, 137, 0, 0,
4533 0, 0, 141, 0, 137, 137, 81, 0, 81, 0,
4534 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4535 81, 0, 313, 0, 0, 0, 91, 0, 0, 0,
4536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4537 0, 0, 0, 306, 0, 0, 0, 80, 0, 0,
4538 80, 80, 141, 81, 0, 0, 80, 0, 0, 307,
4539 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4540 0, 80, 0, 0, 0, 0, 0, 91, 91, 0,
4541 141, 313, 0, 0, 0, 0, 0, 22, 23, 24,
4542 25, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4543 0, 0, 137, 31, 32, 33, 1079, 0, 0, 0,
4544 1080, 0, 80, 40, 41, 42, 43, 44, 0, 311,
4545 141, 0, 0, 0, 0, 0, 80, 141, 141, 0,
4546 0, 0, 0, 417, 0, 307, 0, 0, 0, 0,
4547 0, 0, 137, 306, 0, 1082, 1083, 0, 137, 0,
4548 0, 0, 0, 1084, 0, 0, 1085, 140, 1086, 1087,
4549 0, 1088, 0, 0, 57, 58, 59, 60, 61, 62,
4550 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4551 0, 0, 0, 80, 0, 0, 0, 0, 81, 137,
4552 0, 0, 137, 0, 1090, 80, 0, 0, 0, 0,
4553 0, 304, 311, 0, 306, 0, 0, 0, 140, 140,
4554 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4555 0, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4556 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4557 0, 0, 313, 0, 0, 0, 0, 0, 0, 137,
4558 0, 137, 0, 0, 0, 91, 0, 0, 0, 0,
4559 0, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4560 81, 141, 137, 0, 0, 81, 81, 0, 0, 0,
4561 0, 81, 81, 0, 0, 0, 0, 0, 0, 0,
4562 81, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4563 0, 0, 0, 0, 0, 0, 81, 0, 0, 0,
4564 91, 0, 141, 0, 0, 141, 0, 0, 0, 0,
4565 0, 0, 0, 311, 0, 313, 0, 0, 816, 0,
4566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4567 0, 0, 0, 0, 0, 0, 0, 0, 81, 81,
4568 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4569 91, 0, 0, 0, 0, 81, 0, 0, 0, 0,
4570 0, 0, 141, 0, 141, 0, 0, 0, 0, 0,
4571 0, 0, 81, 0, 0, 0, 140, 0, 91, 0,
4572 0, 0, 0, 81, 0, 141, 0, 0, 0, 311,
4573 0, 0, 0, 0, 0, 0, 816, 816, 0, 0,
4574 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4575 0, 0, 140, 0, 0, 0, 0, 0, 91, 0,
4576 0, 0, 0, 0, 0, 91, 91, 0, 0, 0,
4577 816, 140, 0, 0, 0, 0, 313, 0, 0, 0,
4578 0, 0, 137, 0, 0, 896, 0, 307, 0, 0,
4579 0, 81, 0, 0, 81, 81, 0, 0, 0, 0,
4580 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4581 0, 0, 81, 0, 0, 81, 0, 0, 0, 0,
4582 0, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4584 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4585 0, 0, 313, 0, 0, 0, 81, 0, 0, 0,
4586 0, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4587 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4588 0, 0, 0, 0, 137, 0, 0, 307, 0, 140,
4589 0, 0, 0, 0, 0, 0, 140, 140, 0, 0,
4590 137, 0, 0, 91, 0, 141, 0, 0, 0, 91,
4591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4592 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
4593 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4594 0, 0, 137, 137, 0, 0, 0, 0, 307, 0,
4595 91, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4596 0, 0, 0, 0, 0, 0, 810, 0, 0, 0,
4597 0, 0, 0, 0, 0, 0, 137, 0, 81, 0,
4598 0, 0, 0, 0, 0, 0, 0, 137, 0, 0,
4599 0, 0, 816, 816, 140, 0, 0, 0, 816, 816,
4600 0, 0, 0, 0, 0, 0, 0, 141, 0, 0,
4601 91, 0, 91, 0, 0, 0, 0, 0, 0, 0,
4602 0, 0, 0, 141, 0, 0, 0, 0, 0, 0,
4603 0, 0, 0, 91, 140, 0, 0, 0, 0, 0,
4604 140, 0, 0, 0, 810, 810, 0, 0, 0, 0,
4605 0, 1193, 0, 0, 0, 137, 0, 0, 137, 137,
4606 0, 0, 0, 0, 137, 141, 141, 816, 0, 0,
4607 0, 0, 0, 0, 0, 0, 137, 0, 810, 137,
4608 0, 140, 816, 0, 140, 0, 0, 0, 0, 0,
4609 0, 0, 0, 0, 0, 0, 0, 140, 0, 141,
4610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4611 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4612 137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4613 0, 0, 0, 0, 137, 0, 0, 0, 0, 0,
4614 0, 140, 0, 140, 0, 0, 0, 0, 0, 0,
4615 0, 430, 0, 0, 0, 0, 0, 0, 0, 0,
4616 0, 0, 0, 0, 140, 0, 0, 0, 0, 0,
4617 0, 0, 0, 0, 1195, 140, 140, 0, 141, 0,
4618 0, 141, 141, 0, 0, 0, 0, 141, 0, 0,
4619 0, 0, 0, 0, 0, 938, 0, 0, 0, 141,
4620 0, 0, 141, 137, 0, 0, 0, 0, 0, 140,
4621 0, 0, 430, 91, 0, 0, 0, 0, 0, 0,
4622 0, 0, 0, 0, 0, 0, 0, 239, 239, 368,
4623 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4624 379, 380, 137, 141, 0, 0, 381, 382, 0, 0,
4625 0, 0, 0, 0, 0, 0, 0, 141, 0, 276,
4626 280, 281, 282, 0, 0, 0, 239, 239, 0, 0,
4627 0, 0, 0, 0, 432, 0, 0, 0, 0, 329,
4628 330, 0, 0, 0, 0, 0, 384, 0, 385, 386,
4629 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4630 810, 810, 0, 0, 0, 0, 810, 810, 0, 0,
4631 0, 0, 0, 0, 0, 91, 0, 0, 0, 0,
4632 22, 23, 24, 25, 239, 0, 141, 0, 0, 0,
4633 0, 91, 0, 0, 0, 432, 31, 32, 33, 1079,
4634 0, 0, 0, 1080, 140, 0, 40, 41, 42, 43,
4635 44, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4636 0, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4637 0, 0, 0, 91, 91, 810, 0, 0, 1082, 1083,
4638 0, 0, 0, 0, 0, 0, 1084, 0, 0, 1085,
4639 810, 1086, 1087, 0, 1088, 0, 0, 57, 58, 59,
4640 60, 61, 62, 63, 64, 65, 0, 91, 0, 0,
4641 0, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4642 0, 0, 0, 0, 0, 0, 0, 1090, 0, 0,
4643 0, 140, 140, 0, 304, 0, 0, 140, 140, 0,
4644 239, 259, 0, 239, 239, 239, 140, 329, 0, 0,
4645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4646 0, 0, 140, 0, 0, 0, 0, 239, 0, 239,
4647 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4648 0, 0, 1191, 0, 0, 0, 91, 0, 0, 91,
4649 91, 0, 0, 0, 0, 91, 0, 0, 0, 0,
4650 0, 0, 0, 0, 140, 140, 140, 91, 0, 0,
4651 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4652 0, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4653 0, 0, 0, 0, 0, 0, 0, 0, 140, 0,
4654 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4655 0, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4656 0, 0, 0, 0, 0, 91, 0, 0, 0, 0,
4657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4658 613, 614, 615, 616, 617, 0, 0, 618, 619, 620,
4659 621, 622, 623, 624, 625, 0, 627, 0, 0, 628,
4660 629, 630, 631, 632, 633, 634, 635, 636, 637, 0,
4661 0, 0, 239, 0, 0, 0, 0, 140, 0, 0,
4662 140, 140, 0, 0, 0, 0, 140, 0, 0, 0,
4663 0, 0, 0, 0, 91, 0, 0, 0, 140, 0,
4664 0, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4666 0, 0, 0, 239, 0, 0, 0, 0, 0, 0,
4667 0, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4668 239, 239, 140, 0, 0, 239, 0, 0, 0, 239,
4669 0, 282, 0, -798, 0, 0, 140, 0, 0, 0,
4670 0, -798, -798, -798, 0, 0, -798, -798, -798, 716,
4671 -798, 0, 0, 0, 0, 0, 0, 0, -798, -798,
4672 -798, -798, -798, 0, 239, 0, 0, 239, 0, 0,
4673 -798, -798, 0, -798, -798, -798, -798, -798, 0, 239,
4674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4675 0, 0, 0, 0, 0, 0, 0, 748, 0, 0,
4676 0, -798, -798, 0, 0, 140, 0, 0, 0, 0,
4677 0, -798, -798, -798, -798, -798, -798, -798, -798, -798,
4678 -798, -798, -798, -798, 0, 0, 0, 0, -798, -798,
4679 -798, -798, 0, 878, -798, 0, 0, 0, 239, -798,
4680 0, 0, 0, 0, 140, 0, 780, 0, 0, 780,
4681 0, 0, 0, -798, 0, 0, -798, 0, 239, 0,
4682 0, 0, 0, 811, 0, 0, 0, -146, -798, -798,
4683 -798, -798, -798, -798, -798, -798, -798, -798, -798, -798,
4684 0, 0, 0, 0, -798, -798, -798, -798, -798, 0,
4685 0, -798, -798, -798, 0, 0, 0, 0, 0, 0,
4686 0, 0, 0, 0, 0, 0, 0, 22, 23, 24,
4687 25, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4688 0, 0, 0, 31, 32, 33, 1079, 0, 239, 0,
4689 1080, 0, 1081, 40, 41, 42, 43, 44, 0, 0,
4690 0, 870, 870, 0, 0, 239, 870, 0, 0, 0,
4691 0, 0, 563, 0, 0, 0, 0, 870, 870, 0,
4692 0, 239, 0, 239, 0, 1082, 1083, 0, 0, 0,
4693 780, 780, 0, 1084, 0, 870, 1085, 0, 1086, 1087,
4694 0, 1088, 567, 0, 57, 58, 1089, 60, 61, 62,
4695 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4696 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4697 0, 0, 0, 0, 1090, 0, 0, 0, 0, 239,
4698 0, 304, 0, 0, 0, 0, 0, 0, 0, 0,
4699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4700 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4701 0, 0, 0, -4, 3, 0, 4, 5, 6, 7,
4702 8, -4, -4, -4, 9, 10, 0, -4, -4, 11,
4703 -4, 12, 13, 14, 15, 16, 17, 18, -4, 239,
4704 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4705 0, 0, 26, 0, 0, 0, 0, 239, 27, 28,
4706 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4707 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4708 0, -4, 0, 0, 0, 0, 0, 870, 0, 47,
4709 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4710 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4711 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
4712 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4713 64, 65, 0, -4, 0, 780, 0, 0, 0, 0,
4714 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4715 0, 0, 239, 0, 0, 0, 1029, 870, 870, 0,
4716 66, 67, 68, 870, 870, -4, 0, 239, 0, 0,
4717 0, -4, 0, 546, 0, 0, 0, 0, 0, 239,
4718 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4719 0, 0, 0, 0, 0, 0, 0, 870, 870, 0,
4720 870, 870, 0, 239, 0, 780, 0, 0, 0, 0,
4721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4722 0, 0, 0, 0, 1070, 1071, 0, 0, 239, 0,
4723 0, 0, 870, 1077, 0, 0, 0, 0, 0, 0,
4724 0, 0, 0, 0, 0, 0, 0, 870, 0, 0,
4725 0, 0, 0, 0, -816, 3, 0, 4, 5, 6,
4726 7, 8, 0, 239, 0, 9, 10, 0, 0, 0,
4727 11, 870, 12, 13, 14, 15, 16, 17, 18, 0,
4728 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4729 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4730 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4731 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4732 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4733 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4734 0, 0, 0, 0, 0, 49, 50, 0, 239, 0,
4735 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4736 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4737 63, 64, 65, 0, -816, 0, 0, 0, 0, 0,
4738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4740 0, 66, 67, 68, 0, 0, -816, 3, -816, 4,
4741 5, 6, 7, 8, -816, 0, 0, 9, 10, 0,
4742 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
4743 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4744 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4745 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
4746 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4747 45, 46, 0, 0, 0, 0, 0, 0, 0, 239,
4748 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4749 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4750 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4751 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4752 61, 62, 63, 64, 65, 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, 0,
4755 0, 0, 0, 66, 67, 68, 0, 0, -4, 3,
4756 -816, 4, 5, 6, 7, 8, -816, 0, 0, 9,
4757 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4758 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4759 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4760 0, 0, 0, 27, 28, 29, 30, 31, 32, 33,
4761 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4762 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
4763 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4764 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4765 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4766 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4767 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4768 0, 0, 0, 0, -696, 0, 0, 0, 0, 0,
4769 0, 0, -696, -696, -696, 0, 0, -696, -696, -696,
4770 0, -696, 0, 0, 0, 66, 67, 68, 0, -696,
4771 -4, -696, -696, -696, 0, 0, 0, 0, 546, 0,
4772 0, -696, -696, 0, -696, -696, -696, -696, -696, 0,
4773 0, 0, 368, 369, 370, 371, 372, 373, 374, 375,
4774 376, 377, 378, 379, 380, 0, 0, 0, 0, 381,
4775 382, 0, -696, -696, 0, 0, 0, 0, 0, 0,
4776 0, 0, -696, -696, -696, -696, -696, -696, -696, -696,
4777 -696, -696, -696, -696, -696, 0, 0, 0, 0, -696,
4778 -696, -696, -696, 0, -696, -696, 0, 0, 0, 384,
4779 -696, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4780 394, 0, 0, 0, -696, 0, 0, -696, 0, 0,
4781 0, 0, 0, 0, 0, 0, 0, 0, -696, -696,
4782 -696, -696, -696, -696, -696, -696, -696, -696, -696, -696,
4783 -696, 0, 0, 0, 0, 0, -696, -696, -696, -696,
4784 -697, 0, -696, -696, -696, 0, 0, 0, -697, -697,
4785 -697, 0, 0, -697, -697, -697, 0, -697, 0, 0,
4786 0, 0, 0, 0, 0, -697, 0, -697, -697, -697,
4787 0, 0, 0, 0, 0, 0, 0, -697, -697, 0,
4788 -697, -697, -697, -697, -697, 0, 0, 0, 368, 369,
4789 370, 371, 372, 373, 374, 375, 376, 377, 378, -817,
4790 -817, 0, 0, 0, 0, 381, 382, 0, -697, -697,
4791 0, 0, 0, 0, 0, 0, 0, 0, -697, -697,
4792 -697, -697, -697, -697, -697, -697, -697, -697, -697, -697,
4793 -697, 0, 0, 0, 0, -697, -697, -697, -697, 0,
4794 -697, -697, 0, 0, 0, 0, -697, 385, 386, 387,
4795 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4796 -697, 0, 0, -697, 0, 0, 0, 0, 0, 0,
4797 0, 0, 0, 0, -697, -697, -697, -697, -697, -697,
4798 -697, -697, -697, -697, -697, -697, -697, 0, 0, 0,
4799 0, 0, -697, -697, -697, -697, -799, 0, -697, -697,
4800 -697, 0, 0, 0, -799, -799, -799, 0, 0, -799,
4801 -799, -799, 0, -799, 0, 0, 0, 0, 0, 0,
4802 0, -799, -799, -799, -799, -799, 0, 0, 0, 0,
4803 0, 0, 0, -799, -799, 0, -799, -799, -799, -799,
4804 -799, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4806 0, 0, 0, 0, -799, -799, 0, 0, 0, 0,
4807 0, 0, 0, 0, -799, -799, -799, -799, -799, -799,
4808 -799, -799, -799, -799, -799, -799, -799, 0, 0, 0,
4809 0, -799, -799, -799, -799, 0, 0, -799, 0, 0,
4810 0, 0, -799, 0, 0, 0, 0, 0, 0, 0,
4811 0, 0, 0, 0, 0, 0, -799, 0, 0, -799,
4812 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4813 0, -799, -799, -799, -799, -799, -799, -799, -799, -799,
4814 -799, -799, -799, 0, 0, 0, 0, -799, -799, -799,
4815 -799, -799, -800, 0, -799, -799, -799, 0, 0, 0,
4816 -800, -800, -800, 0, 0, -800, -800, -800, 0, -800,
4817 0, 0, 0, 0, 0, 0, 0, -800, -800, -800,
4818 -800, -800, 0, 0, 0, 0, 0, 0, 0, -800,
4819 -800, 0, -800, -800, -800, -800, -800, 0, 0, 0,
4820 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4821 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4822 -800, -800, 0, 0, 0, 0, 0, 0, 0, 0,
4823 -800, -800, -800, -800, -800, -800, -800, -800, -800, -800,
4824 -800, -800, -800, 0, 0, 0, 0, -800, -800, -800,
4825 -800, 0, 0, -800, 0, 0, 0, 0, -800, 0,
4826 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4827 0, 0, -800, 0, 0, -800, 0, 0, 0, 0,
4828 0, 0, 0, 0, 0, 0, 0, -800, -800, -800,
4829 -800, -800, -800, -800, -800, -800, -800, -800, -800, 0,
4830 0, 0, 0, -800, -800, -800, -800, -800, -510, 0,
4831 -800, -800, -800, 0, 0, 0, -510, -510, -510, 0,
4832 0, -510, -510, -510, 0, -510, 0, 0, 0, 0,
4833 0, 0, 0, -510, -510, -510, -510, 0, 0, 0,
4834 0, 0, 0, 0, 0, -510, -510, 0, -510, -510,
4835 -510, -510, -510, 0, 0, 0, 0, 0, 0, 0,
4836 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4837 0, 0, 0, 0, 0, 0, -510, -510, 0, 0,
4838 0, 0, 0, 0, 0, 0, -510, -510, -510, -510,
4839 -510, -510, -510, -510, -510, -510, -510, -510, -510, 0,
4840 0, 0, 0, -510, -510, -510, -510, 0, 0, -510,
4841 0, 0, 0, 0, -510, 0, 0, 0, 0, 0,
4842 0, 0, 0, 0, 0, 0, 0, 0, -510, 0,
4843 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4844 0, 0, 0, -510, 0, -510, -510, -510, -510, -510,
4845 -510, -510, -510, -510, -510, 0, 0, 0, 0, -510,
4846 -510, -510, -510, -510, -350, 255, -510, -510, -510, 0,
4847 0, 0, -350, -350, -350, 0, 0, -350, -350, -350,
4848 0, -350, 0, 0, 0, 0, 0, 0, 0, -350,
4849 0, -350, -350, -350, 0, 0, 0, 0, 0, 0,
4850 0, -350, -350, 0, -350, -350, -350, -350, -350, 0,
4851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4852 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4853 0, 0, -350, -350, 0, 0, 0, 0, 0, 0,
4854 0, 0, -350, -350, -350, -350, -350, -350, -350, -350,
4855 -350, -350, -350, -350, -350, 0, 0, 0, 0, -350,
4856 -350, -350, -350, 0, 0, -350, 0, 0, 0, 0,
4857 -350, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4858 0, 0, 0, 0, -350, 0, 0, -350, 0, 0,
4859 0, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4860 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4861 -350, 0, 0, 0, 0, 0, -350, -350, -350, -350,
4862 -816, 0, -350, -350, -350, 0, 0, 0, -816, -816,
4863 -816, 0, 0, -816, -816, -816, 0, -816, 0, 0,
4864 0, 0, 0, 0, 0, -816, -816, -816, -816, 0,
4865 0, 0, 0, 0, 0, 0, 0, -816, -816, 0,
4866 -816, -816, -816, -816, -816, 0, 0, 0, 0, 0,
4867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4868 0, 0, 0, 0, 0, 0, 0, 0, -816, -816,
4869 0, 0, 0, 0, 0, 0, 0, 0, -816, -816,
4870 -816, -816, -816, -816, -816, -816, -816, -816, -816, -816,
4871 -816, 0, 0, 0, 0, -816, -816, -816, -816, 0,
4872 0, -816, 0, 0, 0, 0, -816, 0, 0, 0,
4873 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4874 -816, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4875 0, 0, 0, 0, 0, -816, 0, -816, -816, -816,
4876 -816, -816, -816, -816, -816, -816, -816, 0, 0, 0,
4877 0, -816, -816, -816, -816, -816, -356, 255, -816, -816,
4878 -816, 0, 0, 0, -356, -356, -356, 0, 0, -356,
4879 -356, -356, 0, -356, 0, 0, 0, 0, 0, 0,
4880 0, -356, 0, -356, -356, 0, 0, 0, 0, 0,
4881 0, 0, 0, -356, -356, 0, -356, -356, -356, -356,
4882 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4883 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4884 0, 0, 0, 0, -356, -356, 0, 0, 0, 0,
4885 0, 0, 0, 0, -356, -356, -356, -356, -356, -356,
4886 -356, -356, -356, -356, -356, -356, -356, 0, 0, 0,
4887 0, -356, -356, -356, -356, 0, 879, -356, 0, 0,
4888 0, 0, -356, 0, 0, 0, 0, 0, 0, 0,
4889 0, 0, 0, 0, 0, 0, -356, 0, 0, 0,
4890 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4891 -147, -356, 0, -356, -356, -356, -356, -356, -356, -356,
4892 -356, -356, -356, 0, 0, 0, 0, 822, -356, -356,
4893 -356, -356, -363, 0, -356, -356, -356, 0, 0, 0,
4894 -363, -363, -363, 0, 0, -363, -363, -363, 0, -363,
4895 0, 0, 0, 0, 0, 0, 0, -363, 0, -363,
4896 -363, 0, 0, 0, 0, 0, 0, 0, 0, -363,
4897 -363, 0, -363, -363, -363, -363, -363, 0, 0, 0,
4898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4899 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4900 -363, -363, 0, 0, 0, 0, 0, 0, 0, 0,
4901 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
4902 -363, -363, -363, 0, 0, 0, 0, -363, -363, -363,
4903 -363, 0, 0, -363, 0, 0, 0, 0, -363, 0,
4904 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4905 0, 0, -363, 0, 0, 0, 0, 0, 0, 0,
4906 0, 0, 0, 0, 0, 0, 0, -363, 0, -363,
4907 -363, -363, -363, -363, -363, -363, -363, -363, -363, 0,
4908 0, 0, 0, 0, -363, -363, -363, -363, -798, 451,
4909 -363, -363, -363, 0, 0, 0, -798, -798, -798, 938,
4910 0, 0, -798, -798, 0, -798, 0, 0, 0, 0,
4911 0, 0, 0, -798, -798, 0, 0, 0, 0, 0,
4912 0, 0, 0, 0, 0, -798, -798, 0, -798, -798,
4913 -798, -798, -798, 368, 369, 370, 371, 372, 373, 374,
4914 375, 376, 377, 378, 379, 380, 0, 0, 0, 0,
4915 381, 382, 0, 0, 0, 0, -798, -798, 0, 0,
4916 0, 0, 0, 0, 0, 0, -798, -798, -798, -798,
4917 -798, -798, -798, -798, -798, -798, -798, -798, -798, 0,
4918 0, 0, 0, -798, -798, -798, -798, 0, 820, -798,
4919 384, 0, 385, 386, 387, 388, 389, 390, 391, 392,
4920 393, 394, 0, 0, 0, 0, 0, 0, -798, 0,
4921 -298, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4922 0, 0, -146, -798, 0, -798, -798, -798, -798, -798,
4923 -798, -798, -798, -798, -798, 0, 0, 0, 0, -798,
4924 -798, -798, -798, -137, -798, 0, -798, 0, -798, 0,
4925 0, 0, -798, -798, -798, 0, 0, 0, -798, -798,
4926 0, -798, 0, 0, 0, 0, 0, 0, 0, -798,
4927 -798, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4928 0, -798, -798, 0, -798, -798, -798, -798, -798, 0,
4929 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4930 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4931 0, 0, -798, -798, 0, 0, 0, 0, 0, 0,
4932 0, 0, -798, -798, -798, -798, -798, -798, -798, -798,
4933 -798, -798, -798, -798, -798, 0, 0, 0, 0, -798,
4934 -798, -798, -798, 0, 820, -798, 0, 0, 0, 0,
4935 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4936 0, 0, 0, 0, -798, 0, 0, 0, 0, 0,
4937 0, 0, 0, 0, 0, 0, 0, 0, -146, -798,
4938 0, -798, -798, -798, -798, -798, -798, -798, -798, -798,
4939 -798, 0, 0, 0, 0, -798, -798, -798, -798, -798,
4940 -356, 0, -798, 0, -798, 0, 0, 0, -356, -356,
4941 -356, 0, 0, 0, -356, -356, 0, -356, 0, 0,
4942 0, 0, 0, 0, 0, -356, 0, 0, 0, 0,
4943 0, 0, 0, 0, 0, 0, 0, -356, -356, 0,
4944 -356, -356, -356, -356, -356, 0, 0, 0, 0, 0,
4945 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4946 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4947 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4948 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4949 -356, 0, 0, 0, 0, -356, -356, -356, -356, 0,
4950 821, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4951 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4952 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4953 0, 0, 0, 0, -147, -356, 0, -356, -356, -356,
4954 -356, -356, -356, -356, -356, -356, -356, 0, 0, 0,
4955 0, 822, -356, -356, -356, -138, -356, 0, -356, 0,
4956 -356, 0, 0, 0, -356, -356, -356, 0, 0, 0,
4957 -356, -356, 0, -356, 0, 0, 0, 0, 0, 0,
4958 0, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4959 0, 0, 0, -356, -356, 0, -356, -356, -356, -356,
4960 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4961 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4962 0, 0, 0, 0, -356, -356, 0, 0, 0, 0,
4963 0, 0, 0, 0, -356, -356, -356, -356, -356, -356,
4964 -356, -356, -356, -356, -356, -356, -356, 0, 0, 0,
4965 0, -356, -356, -356, -356, 0, 821, -356, 0, 0,
4966 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4967 0, 0, 0, 0, 0, 0, -356, 0, 0, 0,
4968 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4969 -147, -356, 0, -356, -356, -356, -356, -356, -356, -356,
4970 -356, -356, -356, 0, 0, 0, 0, 822, -356, -356,
4971 -356, -356, 0, 0, -356, 3, -356, 4, 5, 6,
4972 7, 8, -816, -816, -816, 9, 10, 0, 0, -816,
4973 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4974 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4975 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4976 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4977 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4978 0, 0, -816, 0, 0, 0, 0, 0, 0, 0,
4979 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4980 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4981 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4982 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4983 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4984 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4985 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4986 0, 66, 67, 68, 0, 0, 0, 3, -816, 4,
4987 5, 6, 7, 8, -816, 0, -816, 9, 10, 0,
4988 -816, -816, 11, 0, 12, 13, 14, 15, 16, 17,
4989 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4990 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4991 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
4992 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4993 45, 46, 0, 0, -816, 0, 0, 0, 0, 0,
4994 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4995 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4996 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4997 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4998 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4999 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5000 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5001 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5002 -816, 4, 5, 6, 7, 8, -816, 0, -816, 9,
5003 10, 0, 0, -816, 11, -816, 12, 13, 14, 15,
5004 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5005 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5006 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5007 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5008 43, 44, 45, 46, 0, 0, -816, 0, 0, 0,
5009 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5010 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5011 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5012 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5013 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5014 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5016 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5017 0, 3, -816, 4, 5, 6, 7, 8, -816, 0,
5018 -816, 9, 10, 0, 0, -816, 11, 0, 12, 13,
5019 14, 15, 16, 17, 18, -816, 0, 0, 0, 0,
5020 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5021 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
5022 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5023 41, 42, 43, 44, 45, 46, 0, 0, -816, 0,
5024 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5025 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5026 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5027 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5028 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5029 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5030 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5031 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5032 0, 0, 0, 3, -816, 4, 5, 6, 7, 8,
5033 -816, 0, -816, 9, 10, 0, 0, -816, 11, 0,
5034 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5035 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5036 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5037 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5038 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5039 -816, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5040 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5041 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5042 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5043 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5044 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5045 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5046 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5047 67, 68, 0, 0, 0, 3, -816, 4, 5, 6,
5048 7, 8, -816, -816, -816, 9, 10, 0, 0, 0,
5049 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5050 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5051 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5052 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5053 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5054 0, 0, -816, 0, 0, 0, 0, 0, 0, 0,
5055 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5056 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5057 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5058 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5059 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5062 0, 66, 67, 68, 0, 0, 0, 3, -816, 4,
5063 5, 6, 7, 8, -816, 0, -816, 9, 10, 0,
5064 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5065 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5066 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5067 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5068 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5069 45, 46, 0, 0, -816, 0, 0, 0, 0, 0,
5070 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5071 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5072 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5073 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5074 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5075 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5076 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5077 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5078 -816, 4, 5, 6, 7, 8, -816, 0, 0, 9,
5079 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5080 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5081 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5082 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5083 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5084 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5085 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5086 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5087 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5088 285, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5089 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5092 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5093 0, 0, -816, 0, 0, 0, -816, 3, -816, 4,
5094 5, 6, 7, 8, 0, 0, 0, 9, 10, 0,
5095 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5096 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5097 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5098 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5099 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5100 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5101 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5102 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5103 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5104 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5105 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5107 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5108 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5109 -816, 0, 0, 0, -816, 3, -816, 4, 5, 6,
5110 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5111 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5112 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5113 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5114 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
5115 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5117 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5118 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5119 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5120 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5121 63, 64, 65, 0, 0, 0, 0, 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, 66, 67, 68, 0, 0, -816, 3, -816, 4,
5125 5, 6, 7, 8, -816, 0, 0, 9, 10, 0,
5126 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5127 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5128 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5129 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5130 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5131 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5132 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5133 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5134 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5135 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5136 61, 62, 63, 64, 65, 0, 0, 0, 0, 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, 66, 67, 68, 0, 0, -816, 404,
5140 -816, 4, 5, 6, 0, 8, -816, 0, 0, 9,
5141 10, 0, 0, 0, 11, -3, 12, 13, 14, 15,
5142 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5143 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5144 0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5145 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5146 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5147 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5148 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5149 50, 0, 0, 0, 0, 0, 0, 229, 0, 0,
5150 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5151 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5152 0, 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, 66, 67, 68, 0, 0,
5155 0, 0, 331, 0, 0, 0, 0, 0, 332, 144,
5156 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5157 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5158 165, 166, 167, 0, 0, 0, 168, 169, 170, 434,
5159 435, 436, 437, 175, 176, 177, 0, 0, 0, 0,
5160 0, 178, 179, 180, 181, 438, 439, 440, 441, 186,
5161 36, 37, 442, 39, 0, 0, 0, 0, 0, 0,
5162 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5163 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5164 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5165 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5166 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5169 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5170 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5171 0, 0, 217, 443, 144, 145, 146, 147, 148, 149,
5172 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5173 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5174 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
5175 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5176 182, 183, 184, 185, 186, 36, 37, 187, 39, 0,
5177 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5178 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5179 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5180 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5181 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5182 0, 0, 0, 0, 0, 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, 205, 206,
5185 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5186 216, 0, 0, 0, 0, 0, 0, 217, 144, 145,
5187 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5188 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
5189 166, 167, 0, 0, 0, 168, 169, 170, 171, 172,
5190 173, 174, 175, 176, 177, 0, 0, 0, 0, 0,
5191 178, 179, 180, 181, 182, 183, 184, 185, 186, 262,
5192 0, 187, 0, 0, 0, 0, 0, 0, 0, 0,
5193 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5194 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5195 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5196 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5197 0, 0, 203, 204, 0, 0, 58, 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, 205, 206, 207, 208, 209, 210, 211, 212,
5201 213, 214, 0, 215, 216, 0, 0, 0, 0, 0,
5202 0, 217, 144, 145, 146, 147, 148, 149, 150, 151,
5203 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
5204 162, 163, 164, 165, 166, 167, 0, 0, 0, 168,
5205 169, 170, 171, 172, 173, 174, 175, 176, 177, 0,
5206 0, 0, 0, 0, 178, 179, 180, 181, 182, 183,
5207 184, 185, 186, 0, 0, 187, 0, 0, 0, 0,
5208 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5209 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5210 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5211 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5212 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5213 58, 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, 205, 206, 207, 208,
5216 209, 210, 211, 212, 213, 214, 0, 215, 216, 0,
5217 0, 0, 0, 0, 0, 217, 144, 145, 146, 147,
5218 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5219 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5220 0, 0, 0, 168, 169, 170, 171, 172, 173, 174,
5221 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5222 180, 181, 182, 183, 184, 185, 186, 0, 0, 187,
5223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5224 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5225 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5226 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5228 203, 204, 0, 0, 0, 0, 0, 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 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5232 0, 215, 216, 4, 5, 6, 0, 8, 0, 217,
5233 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5234 14, 270, 271, 17, 18, 0, 0, 0, 0, 0,
5235 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5236 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5237 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5238 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5241 0, 0, 0, 0, 0, 0, 0, 0, 0, 303,
5242 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5243 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5244 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5245 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5246 271, 17, 18, 0, 0, 0, 0, 304, 19, 20,
5247 272, 22, 23, 24, 25, 305, 0, 227, 0, 0,
5248 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5249 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5250 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5253 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
5254 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5255 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5256 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5257 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5258 18, 0, 0, 0, 0, 304, 19, 20, 21, 22,
5259 23, 24, 25, 608, 0, 227, 0, 0, 0, 0,
5260 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5261 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5262 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5263 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5264 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5265 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5266 54, 55, 0, 231, 232, 233, 57, 58, 234, 60,
5267 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5268 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5269 0, 0, 0, 0, 0, 0, 0, 0, 4, 5,
5270 6, 0, 8, 66, 235, 68, 9, 10, 0, 0,
5271 259, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5272 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5273 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5274 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5275 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5276 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5277 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5278 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5279 0, 0, 0, 0, 229, 0, 0, 230, 53, 54,
5280 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5281 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5282 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5283 0, 0, 0, 0, 0, 3, 0, 4, 5, 6,
5284 7, 8, 66, 67, 68, 9, 10, 0, 0, 259,
5285 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5286 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5287 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5288 28, 0, 30, 31, 32, 33, 34, 35, 36, 37,
5289 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5291 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5292 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5293 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5294 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5295 63, 64, 65, 0, 0, 404, 0, 4, 5, 6,
5296 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5297 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5298 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5299 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
5300 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5301 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5302 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5303 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5304 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5305 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5306 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5307 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5308 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5309 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5310 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5311 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5312 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5313 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5314 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5315 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5316 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5317 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5318 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5319 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5320 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5321 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5322 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5323 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5324 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5325 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5326 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5327 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5328 0, 0, 0, 0, 0, 49, 479, 0, 0, 0,
5329 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5330 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5331 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5332 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5333 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5334 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5335 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5336 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5337 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5338 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5339 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5340 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5341 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5342 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5343 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5344 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5345 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5346 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5347 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5348 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5349 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5351 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5352 0, 0, 0, 0, 0, 49, 479, 0, 0, 0,
5353 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5354 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5355 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5356 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5357 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5358 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5359 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5360 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5361 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5362 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5363 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5364 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5365 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5366 0, 231, 232, 0, 57, 58, 234, 60, 61, 62,
5367 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5368 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5369 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5370 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5371 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5372 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5373 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5374 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5375 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5376 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5377 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5378 0, 0, 232, 233, 57, 58, 234, 60, 61, 62,
5379 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5380 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5381 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5382 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5383 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5384 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5385 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5387 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5388 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5389 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5390 0, 0, 232, 0, 57, 58, 234, 60, 61, 62,
5391 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5392 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5393 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5394 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5395 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5396 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5397 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5399 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5400 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5401 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5402 0, 795, 0, 0, 57, 58, 59, 60, 61, 62,
5403 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5404 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5405 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5406 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5407 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5408 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5409 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5411 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5412 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5413 0, 0, 0, 806, 0, 0, 230, 53, 54, 55,
5414 0, 795, 0, 0, 57, 58, 59, 60, 61, 62,
5415 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5416 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5417 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5418 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5419 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5420 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5421 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5423 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5424 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5425 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5426 0, 967, 0, 0, 57, 58, 59, 60, 61, 62,
5427 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5428 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5429 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5430 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5431 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5432 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5433 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5435 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5436 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5437 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5438 0, 1016, 0, 0, 57, 58, 59, 60, 61, 62,
5439 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5440 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5441 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5442 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5443 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5444 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5445 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5446 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5447 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5448 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5449 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5450 0, 795, 0, 0, 57, 58, 59, 60, 61, 62,
5451 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5452 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5453 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5454 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5455 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5456 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5457 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5458 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5459 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5460 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5461 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5462 0, 1136, 0, 0, 57, 58, 59, 60, 61, 62,
5463 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5464 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5465 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5466 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5467 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5468 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5469 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5470 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5471 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5472 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5473 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5474 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5475 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5476 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5477 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5478 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5479 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5480 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5481 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5482 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5483 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5484 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5485 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5486 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5487 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5488 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5489 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5490 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5491 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
5492 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5493 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5495 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5496 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5497 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5498 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5499 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5500 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5501 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5502 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5503 25, 0, 0, 777, 0, 0, 0, 0, 0, 0,
5504 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5505 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5506 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5507 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5508 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5509 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5510 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5511 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5512 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5513 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5514 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5515 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5516 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5517 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5518 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5519 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5520 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5521 0, 0, 0, 806, 0, 0, 230, 53, 54, 55,
5522 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5523 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5524 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5525 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5526 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5527 25, 0, 0, 886, 0, 0, 0, 0, 0, 0,
5528 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5529 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5530 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5531 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5532 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5533 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5534 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5535 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5536 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5537 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5538 0, 66, 235, 68, 19, 20, 272, 22, 23, 24,
5539 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5540 302, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5541 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5542 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5545 0, 0, 0, 303, 0, 0, 363, 53, 54, 55,
5546 0, 364, 0, 0, 57, 58, 59, 60, 61, 62,
5547 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5548 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5549 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5550 0, 304, 19, 20, 272, 22, 23, 24, 25, 0,
5551 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5552 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5553 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5554 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5557 0, 415, 0, 0, 52, 53, 54, 55, 0, 56,
5558 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5559 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5560 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5561 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5562 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5563 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5564 32, 33, 423, 35, 36, 37, 424, 39, 0, 40,
5565 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5567 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5568 0, 0, 0, 0, 0, 425, 0, 0, 0, 426,
5569 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5570 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5571 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5572 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5573 271, 17, 18, 0, 0, 0, 0, 304, 19, 20,
5574 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5575 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5576 423, 35, 36, 37, 424, 39, 0, 40, 41, 42,
5577 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5579 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5580 0, 0, 0, 0, 0, 0, 0, 426, 0, 0,
5581 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5582 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5583 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5584 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5585 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5586 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5587 0, 0, 302, 0, 0, 31, 32, 33, 34, 35,
5588 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5589 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5592 0, 0, 0, 0, 0, 303, 0, 0, 363, 53,
5593 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5594 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5595 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5596 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5597 0, 0, 0, 304, 19, 20, 272, 22, 23, 24,
5598 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5599 302, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5600 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5601 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5603 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5604 0, 0, 0, 1190, 0, 0, 230, 53, 54, 55,
5605 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5606 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5607 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5608 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5609 0, 304, 19, 20, 272, 22, 23, 24, 25, 0,
5610 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5611 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5612 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5613 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5614 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5615 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5616 0, 1292, 0, 0, 230, 53, 54, 55, 22, 23,
5617 24, 25, 57, 58, 59, 60, 61, 62, 63, 64,
5618 65, 0, 0, 0, 31, 32, 33, 1079, 0, 0,
5619 0, 1080, 0, 0, 40, 41, 42, 43, 44, 0,
5620 0, 0, 0, 0, 0, 0, 0, 0, 0, 304,
5621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5622 0, 0, 0, 0, 0, 0, 1082, 1083, 0, 0,
5623 0, 0, 0, 0, 1084, 0, 0, 1085, 0, 1086,
5624 1087, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5625 62, 63, 64, 65, 0, 0, 0, 0, 0, 685,
5626 647, 0, 0, 686, 0, 0, 0, 0, 0, 0,
5627 0, 0, 0, 0, 0, 1090, 0, 0, 0, 0,
5628 0, 0, 304, 188, 189, 190, 191, 192, 193, 194,
5629 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5630 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5631 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5634 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5635 211, 212, 213, 214, 0, 215, 216, 638, 639, 0,
5636 0, 640, 0, 217, 255, 0, 0, 0, 0, 0,
5637 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5638 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5639 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5640 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5641 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5644 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5645 213, 214, 0, 215, 216, 646, 647, 0, 0, 648,
5646 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5647 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5648 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5649 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5651 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5652 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5653 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5654 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5655 0, 215, 216, 700, 639, 0, 0, 701, 0, 217,
5656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5657 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5658 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5659 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5660 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5663 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5664 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5665 216, 703, 647, 0, 0, 704, 0, 217, 0, 0,
5666 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5667 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5668 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5669 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5670 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5671 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5673 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5674 209, 210, 211, 212, 213, 214, 0, 215, 216, 700,
5675 639, 0, 0, 720, 0, 217, 0, 0, 0, 0,
5676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5677 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5678 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5679 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5680 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5683 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5684 211, 212, 213, 214, 0, 215, 216, 731, 639, 0,
5685 0, 732, 0, 217, 0, 0, 0, 0, 0, 0,
5686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5687 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5688 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5689 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5690 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5693 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5694 213, 214, 0, 215, 216, 734, 647, 0, 0, 735,
5695 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5696 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5697 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5698 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5700 203, 204, 0, 0, 0, 0, 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 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5704 0, 215, 216, 850, 639, 0, 0, 851, 0, 217,
5705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5706 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5707 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5708 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5709 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5712 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5713 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5714 216, 853, 647, 0, 0, 854, 0, 217, 0, 0,
5715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5716 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5717 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5718 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5719 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5722 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5723 209, 210, 211, 212, 213, 214, 0, 215, 216, 859,
5724 639, 0, 0, 860, 0, 217, 0, 0, 0, 0,
5725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5726 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5727 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5728 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5729 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5732 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5733 211, 212, 213, 214, 0, 215, 216, 685, 647, 0,
5734 0, 686, 0, 217, 0, 0, 0, 0, 0, 0,
5735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5736 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5737 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5738 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5739 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5742 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5743 213, 214, 0, 215, 216, 1022, 639, 0, 0, 1023,
5744 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5745 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5746 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5747 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5749 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5752 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5753 0, 215, 216, 1025, 647, 0, 0, 1026, 0, 217,
5754 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5755 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5756 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5757 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5758 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5760 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5761 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5762 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5763 216, 1311, 639, 0, 0, 1312, 0, 217, 0, 0,
5764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5765 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5766 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5767 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5768 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5771 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5772 209, 210, 211, 212, 213, 214, 0, 215, 216, 1314,
5773 647, 0, 0, 1315, 0, 217, 0, 0, 0, 0,
5774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5775 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5776 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5777 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5778 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5781 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5782 211, 212, 213, 214, 0, 215, 216, 1359, 639, 0,
5783 0, 1360, 0, 217, 0, 0, 0, 0, 0, 0,
5784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5785 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5786 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5787 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5788 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5791 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5792 213, 214, 0, 215, 216, 0, 0, 0, 0, 0,
5793 0, 217
5794};
5795
5796static const yytype_int16 yycheck[] =
5797{
5798 1, 59, 70, 107, 58, 15, 16, 1, 101, 56,
5799 344, 13, 14, 408, 348, 15, 16, 70, 400, 58,
5800 426, 116, 115, 27, 7, 67, 104, 84, 348, 107,
5801 399, 574, 401, 768, 255, 52, 53, 761, 252, 103,
5802 104, 21, 89, 107, 27, 15, 16, 7, 89, 565,
5803 848, 52, 53, 344, 107, 56, 113, 348, 15, 16,
5804 296, 108, 109, 110, 300, 838, 52, 27, 15, 16,
5805 72, 597, 111, 469, 56, 58, 611, 30, 477, 597,
5806 943, 477, 763, 907, 54, 626, 455, 27, 89, 81,
5807 525, 473, 905, 320, 321, 585, 818, 54, 55, 1,
5808 66, 591, 112, 472, 84, 474, 1163, 108, 109, 110,
5809 111, 25, 112, 63, 64, 65, 515, 26, 469, 0,
5810 1177, 601, 285, 10, 689, 690, 25, 98, 111, 595,
5811 13, 29, 598, 502, 37, 38, 78, 290, 26, 13,
5812 81, 1285, 112, 134, 787, 527, 100, 790, 58, 0,
5813 52, 53, 54, 55, 247, 112, 1028, 101, 723, 528,
5814 13, 512, 66, 25, 763, 112, 157, 1277, 78, 768,
5815 26, 100, 28, 608, 100, 25, 234, 66, 80, 81,
5816 134, 68, 153, 287, 277, 13, 157, 100, 151, 25,
5817 1053, 1027, 1028, 719, 69, 154, 260, 261, 108, 109,
5818 363, 155, 144, 145, 146, 134, 25, 13, 134, 25,
5819 154, 1355, 678, 230, 154, 119, 763, 310, 109, 287,
5820 160, 134, 1085, 98, 1087, 123, 13, 774, 157, 230,
5821 119, 141, 1187, 1188, 287, 751, 752, 1347, 13, 120,
5822 1064, 155, 151, 1027, 1028, 255, 1303, 257, 157, 971,
5823 141, 154, 1065, 56, 13, 255, 155, 257, 305, 337,
5824 338, 339, 340, 151, 305, 266, 1001, 1139, 285, 675,
5825 484, 154, 266, 337, 338, 339, 340, 160, 342, 343,
5826 154, 273, 274, 665, 285, 255, 160, 257, 154, 25,
5827 761, 157, 272, 155, 676, 275, 13, 666, 451, 285,
5828 257, 154, 155, 1139, 305, 155, 847, 160, 677, 413,
5829 257, 264, 711, 709, 541, 711, 543, 364, 13, 155,
5830 25, 13, 1185, 1186, 1005, 418, 154, 480, 230, 157,
5831 483, 409, 160, 274, 335, 488, 155, 161, 304, 155,
5832 1138, 335, 822, 245, 1299, 409, 363, 425, 154, 15,
5833 252, 157, 505, 255, 160, 1139, 34, 611, 709, 25,
5834 413, 425, 363, 364, 266, 1138, 307, 154, 911, 101,
5835 805, 273, 274, 160, 52, 758, 824, 363, 761, 154,
5836 945, 946, 364, 285, 832, 160, 951, 952, 101, 905,
5837 400, 907, 858, 410, 411, 154, 1180, 923, 1086, 1163,
5838 400, 160, 403, 1187, 1188, 923, 1005, 154, 361, 410,
5839 411, 25, 159, 366, 134, 1179, 69, 28, 401, 155,
5840 955, 157, 402, 155, 914, 915, 579, 155, 918, 763,
5841 920, 827, 922, 58, 768, 689, 690, 154, 134, 295,
5842 296, 451, 155, 160, 300, 98, 302, 66, 67, 112,
5843 155, 451, 157, 78, 607, 100, 1003, 69, 1005, 154,
5844 1007, 363, 154, 473, 152, 160, 154, 993, 160, 723,
5845 1035, 154, 455, 473, 100, 455, 827, 160, 525, 25,
5846 66, 451, 100, 108, 525, 699, 98, 112, 709, 134,
5847 494, 474, 728, 155, 451, 100, 69, 25, 400, 1187,
5848 1188, 403, 121, 122, 451, 458, 459, 508, 410, 411,
5849 976, 494, 469, 740, 467, 1299, 134, 527, 745, 502,
5850 134, 157, 475, 476, 525, 98, 428, 527, 25, 134,
5851 683, 548, 100, 1297, 494, 121, 122, 1301, 56, 1303,
5852 154, 155, 495, 596, 158, 528, 134, 548, 1064, 1065,
5853 503, 101, 1151, 554, 1289, 512, 1027, 1028, 940, 1283,
5854 554, 608, 66, 155, 606, 100, 134, 608, 100, 611,
5855 939, 473, 941, 1346, 969, 161, 1066, 1067, 1068, 1069,
5856 482, 932, 484, 155, 594, 642, 157, 597, 134, 66,
5857 100, 157, 991, 650, 595, 991, 157, 598, 1362, 134,
5858 100, 1148, 755, 69, 1151, 658, 134, 608, 154, 155,
5859 69, 157, 158, 1082, 1083, 679, 1351, 121, 122, 100,
5860 124, 69, 134, 134, 134, 527, 154, 155, 78, 100,
5861 158, 688, 98, 100, 134, 158, 606, 134, 655, 98,
5862 657, 611, 119, 155, 121, 122, 548, 689, 690, 97,
5863 98, 715, 1047, 134, 655, 665, 657, 154, 155, 152,
5864 994, 158, 642, 134, 159, 665, 676, 134, 1139, 571,
5865 884, 1005, 574, 1216, 994, 1218, 676, 678, 1084, 37,
5866 38, 723, 729, 666, 738, 56, 1285, 691, 729, 1155,
5867 1289, 945, 946, 595, 677, 69, 598, 951, 952, 652,
5868 69, 34, 155, 994, 66, 153, 69, 161, 691, 1180,
5869 100, 864, 157, 1182, 1183, 151, 1187, 1188, 78, 52,
5870 69, 134, 815, 97, 98, 1215, 1060, 26, 729, 98,
5871 883, 691, 885, 1128, 928, 98, 930, 134, 1285, 692,
5872 1060, 721, 134, 645, 134, 106, 1151, 1294, 650, 98,
5873 903, 69, 709, 655, 69, 657, 1355, 119, 805, 121,
5874 122, 155, 124, 665, 805, 155, 1020, 160, 1151, 1060,
5875 69, 627, 867, 15, 676, 17, 678, 855, 1184, 857,
5876 98, 1035, 97, 98, 56, 1328, 688, 69, 644, 100,
5877 740, 855, 742, 857, 138, 745, 746, 699, 97, 98,
5878 25, 52, 69, 856, 805, 56, 1353, 69, 1355, 1204,
5879 1357, 69, 1283, 1279, 100, 97, 98, 1151, 155, 100,
5880 722, 52, 26, 134, 155, 56, 865, 1374, 1299, 154,
5881 97, 98, 69, 158, 69, 97, 98, 599, 153, 97,
5882 98, 603, 157, 1151, 155, 1297, 702, 152, 134, 1301,
5883 702, 158, 151, 134, 153, 1027, 1028, 858, 157, 134,
5884 97, 98, 97, 98, 66, 69, 134, 820, 821, 155,
5885 827, 153, 728, 134, 155, 828, 829, 733, 1283, 69,
5886 1285, 733, 865, 961, 1289, 1267, 153, 605, 158, 1294,
5887 892, 153, 155, 97, 98, 153, 155, 961, 155, 1268,
5888 1283, 155, 1285, 945, 946, 100, 1289, 97, 98, 951,
5889 952, 1294, 155, 923, 1086, 155, 153, 119, 153, 121,
5890 122, 777, 975, 26, 977, 878, 879, 52, 881, 882,
5891 940, 1103, 834, 155, 836, 653, 838, 100, 52, 134,
5892 940, 659, 660, 960, 83, 84, 1351, 151, 1353, 153,
5893 1355, 1285, 1357, 157, 54, 1289, 858, 155, 941, 960,
5894 155, 154, 155, 153, 64, 65, 69, 1139, 1351, 1374,
5895 1353, 134, 1355, 69, 1357, 976, 152, 1285, 1020, 69,
5896 155, 1289, 884, 13, 937, 955, 1294, 25, 1160, 154,
5897 155, 1374, 155, 1035, 97, 98, 852, 950, 137, 138,
5898 852, 97, 98, 14, 15, 1177, 862, 97, 98, 911,
5899 862, 69, 1014, 1015, 17, 1187, 1188, 1018, 1019, 152,
5900 66, 1355, 89, 90, 1018, 1019, 1027, 1028, 40, 41,
5901 886, 1089, 69, 1186, 987, 1052, 1090, 155, 940, 97,
5902 98, 69, 155, 1351, 44, 1353, 1063, 1355, 151, 1357,
5903 153, 1052, 134, 955, 157, 154, 155, 153, 960, 69,
5904 97, 98, 1063, 153, 782, 44, 1374, 152, 786, 97,
5905 98, 155, 155, 119, 976, 121, 122, 44, 124, 1232,
5906 1127, 1082, 1083, 306, 307, 1086, 56, 97, 98, 1242,
5907 44, 924, 925, 1197, 134, 153, 1174, 1, 159, 1192,
5908 933, 136, 1103, 936, 1177, 938, 1259, 1260, 1261, 8,
5909 1174, 15, 16, 15, 1187, 1188, 153, 1134, 1135, 52,
5910 52, 54, 55, 1140, 57, 153, 1127, 152, 846, 1197,
5911 1131, 849, 155, 1134, 1135, 1152, 155, 155, 1139, 1140,
5912 1042, 155, 1044, 153, 1197, 863, 155, 155, 52, 53,
5913 1052, 1152, 56, 155, 1155, 101, 78, 155, 155, 1160,
5914 9, 1063, 1163, 67, 59, 60, 61, 62, 1024, 102,
5915 1072, 1073, 1024, 95, 96, 155, 1177, 139, 1179, 1196,
5916 1227, 1182, 1183, 52, 66, 89, 1187, 1188, 139, 155,
5917 155, 1249, 155, 1210, 152, 1196, 1274, 1275, 78, 103,
5918 104, 52, 56, 107, 108, 109, 110, 101, 112, 1210,
5919 1274, 1275, 160, 158, 155, 155, 1169, 139, 140, 141,
5920 142, 143, 144, 145, 146, 155, 1227, 66, 155, 1131,
5921 1086, 1087, 1134, 1135, 1086, 66, 1138, 119, 1140, 121,
5922 122, 1288, 155, 155, 962, 1246, 155, 965, 54, 55,
5923 1152, 57, 155, 1155, 972, 689, 690, 1267, 64, 65,
5924 978, 152, 142, 143, 144, 145, 146, 1267, 139, 56,
5925 155, 705, 706, 40, 41, 42, 43, 44, 1279, 155,
5926 119, 155, 121, 122, 157, 1268, 1142, 1288, 119, 723,
5927 121, 122, 155, 155, 1196, 155, 1297, 1199, 157, 335,
5928 1301, 1318, 1303, 504, 1131, 266, 1162, 865, 1210, 1165,
5929 1162, 508, 106, 1165, 1216, 606, 1218, 1318, 108, 110,
5930 52, 1, 54, 55, 56, 57, 230, 98, 495, 1185,
5931 1199, 688, 956, 1185, 975, 15, 16, 751, 1056, 1225,
5932 52, 905, 54, 55, 56, 57, 58, 1283, 1073, 1151,
5933 1289, 255, 1224, 257, 1347, 868, 260, 261, 1226, 1346,
5934 1228, 1362, 266, 359, 1246, 1267, 78, 1269, 1224, 1271,
5935 102, 1180, 52, 53, 1269, 107, 1180, 1279, 1176, 1271,
5936 92, 285, 78, 119, 543, 111, 761, 67, 768, 52,
5937 102, 54, 55, 56, 57, 115, 108, 109, 1341, 95,
5938 96, 305, -1, -1, -1, -1, 1262, 1263, 1264, -1,
5939 1262, 1263, 1264, -1, -1, 52, 1318, 54, 55, 56,
5940 57, -1, -1, 103, 104, -1, 1328, 107, -1, 141,
5941 -1, 335, 112, 337, 338, 339, 340, -1, 342, 343,
5942 -1, 875, -1, -1, 1346, 141, 142, 143, 144, 145,
5943 146, 52, -1, 54, 55, 56, 57, 1313, -1, 363,
5944 364, 1313, -1, 1331, 1332, 102, 1322, 1335, 1336, -1,
5945 -1, 1339, 52, -1, 54, 55, 56, 57, 58, -1,
5946 1027, 1028, -1, -1, -1, 1341, -1, 52, 1206, 54,
5947 55, 56, 57, 58, -1, -1, 400, -1, 78, 403,
5948 1368, 1369, 1370, 1371, -1, 409, 410, 411, -1, 1377,
5949 -1, 945, 946, 78, -1, -1, -1, 951, 952, -1,
5950 -1, 425, 102, -1, -1, -1, -1, 92, 108, 109,
5951 -1, 78, -1, -1, -1, 1082, 1083, 102, -1, 1086,
5952 -1, -1, 107, 108, 109, -1, -1, 451, 95, 96,
5953 230, 985, 986, -1, 988, 989, 1103, -1, -1, -1,
5954 -1, 141, 52, -1, 54, 55, 56, 57, 58, 473,
5955 -1, -1, 1027, 1028, -1, 255, 141, 257, -1, 144,
5956 260, 261, -1, -1, -1, -1, 266, -1, 78, -1,
5957 -1, -1, 1139, -1, -1, 142, 143, 144, 145, 146,
5958 -1, 1035, 92, -1, 508, 285, -1, 1325, -1, -1,
5959 -1, -1, 102, 1160, -1, -1, 1163, 107, 108, 109,
5960 -1, 525, -1, 527, -1, 1059, -1, 1082, 1083, -1,
5961 1177, 1086, 1179, -1, -1, 1182, 1183, -1, -1, -1,
5962 1187, 1188, -1, -1, 548, -1, -1, -1, 1103, -1,
5963 554, 141, -1, -1, 144, 335, -1, 337, 338, 339,
5964 340, -1, 342, 343, -1, -1, -1, 157, -1, -1,
5965 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5966 -1, -1, -1, 363, 1139, -1, -1, -1, -1, -1,
5967 594, 595, -1, 597, 598, -1, -1, -1, -1, 1246,
5968 -1, -1, 606, -1, 608, 1160, -1, 611, 1163, -1,
5969 52, -1, 54, 55, 56, 57, 58, -1, -1, -1,
5970 400, -1, 1177, 403, 1179, -1, -1, 1182, 1183, 409,
5971 410, 411, 1187, 1188, -1, -1, 78, -1, -1, -1,
5972 -1, -1, 1027, 1028, -1, 425, -1, -1, -1, -1,
5973 1297, 655, -1, 657, 1301, -1, 1303, -1, -1, -1,
5974 102, 665, -1, -1, -1, 107, 108, 109, -1, -1,
5975 -1, 451, 676, -1, 678, 679, -1, -1, -1, -1,
5976 -1, -1, -1, -1, -1, 689, 690, -1, -1, -1,
5977 -1, 1246, -1, 473, -1, -1, -1, 1082, 1083, 141,
5978 -1, 1086, 144, -1, -1, -1, -1, -1, 1027, 1028,
5979 -1, 715, -1, -1, -1, 1362, -1, -1, 1103, 723,
5980 -1, -1, -1, -1, -1, 729, -1, -1, 508, -1,
5981 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5982 -1, -1, 1297, -1, -1, -1, 1301, 527, 1303, -1,
5983 -1, -1, -1, -1, 1139, -1, -1, -1, -1, -1,
5984 -1, -1, -1, 1082, 1083, -1, -1, 1086, 548, -1,
5985 -1, -1, -1, -1, 554, 1160, -1, -1, 1163, -1,
5986 -1, -1, -1, -1, 1103, -1, -1, -1, -1, -1,
5987 -1, -1, 1177, -1, 1179, -1, -1, 1182, 1183, -1,
5988 -1, 805, 1187, 1188, -1, -1, -1, 1362, -1, -1,
5989 -1, -1, -1, -1, 594, 595, -1, 597, 598, -1,
5990 1139, -1, -1, -1, -1, -1, 606, -1, -1, -1,
5991 -1, 611, -1, -1, -1, -1, -1, -1, -1, -1,
5992 -1, 1160, -1, -1, 1163, -1, -1, -1, -1, -1,
5993 -1, 855, -1, 857, 858, -1, -1, -1, 1177, -1,
5994 1179, 1246, -1, 1182, 1183, -1, -1, -1, 1187, 1188,
5995 -1, -1, -1, -1, -1, 655, -1, 657, -1, -1,
5996 -1, -1, -1, -1, -1, 665, -1, -1, -1, -1,
5997 55, -1, -1, -1, -1, -1, 676, -1, 678, 679,
5998 -1, -1, -1, -1, -1, -1, -1, -1, -1, 689,
5999 690, -1, 1297, -1, -1, -1, 1301, -1, 1303, 923,
6000 -1, -1, -1, -1, -1, -1, -1, 1246, 78, 79,
6001 80, 81, 82, 83, 84, 715, 940, 87, 88, -1,
6002 -1, 945, 946, 723, -1, 95, 96, 951, 952, -1,
6003 -1, -1, -1, -1, -1, -1, 960, 961, -1, 1,
6004 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6005 -1, -1, 976, 15, 16, -1, -1, 1362, 1297, -1,
6006 -1, -1, 1301, -1, 1303, -1, -1, 137, 138, 139,
6007 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6008 -1, -1, -1, -1, -1, -1, 33, 34, 35, 36,
6009 52, 53, -1, -1, 1018, 1019, 1020, -1, -1, -1,
6010 -1, -1, 49, 50, 51, 67, -1, -1, -1, -1,
6011 -1, 1035, 59, 60, 61, 62, 63, -1, -1, -1,
6012 -1, -1, -1, 1362, -1, -1, -1, -1, 1052, 1027,
6013 1028, -1, -1, -1, -1, -1, -1, -1, -1, 1063,
6014 -1, 103, 104, 228, -1, 107, 231, 232, 233, -1,
6015 112, -1, -1, -1, -1, 855, -1, 857, 858, -1,
6016 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6017 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6018 -1, -1, -1, -1, 1082, 1083, -1, -1, 1086, -1,
6019 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6020 147, -1, -1, 1127, -1, 1103, -1, 1131, -1, -1,
6021 1134, 1135, -1, -1, -1, -1, 1140, -1, -1, -1,
6022 -1, -1, -1, 923, -1, -1, -1, -1, 1152, -1,
6023 -1, 1155, -1, -1, -1, -1, -1, -1, -1, -1,
6024 940, 1139, -1, -1, -1, 945, 946, -1, -1, -1,
6025 1174, 951, 952, -1, -1, -1, -1, -1, -1, -1,
6026 960, 961, 1160, 1, -1, 1163, -1, -1, 230, -1,
6027 -1, -1, 1196, -1, -1, -1, 976, 15, 16, 1177,
6028 -1, 1179, -1, -1, 1182, 1183, 1210, -1, -1, 1187,
6029 1188, -1, -1, 255, -1, 257, -1, -1, 260, 261,
6030 -1, -1, -1, 1227, 266, -1, -1, -1, -1, -1,
6031 -1, -1, -1, -1, 52, 53, -1, -1, 1018, 1019,
6032 1020, -1, -1, 285, -1, -1, -1, -1, -1, 67,
6033 -1, -1, -1, -1, -1, 1035, -1, -1, -1, -1,
6034 -1, -1, -1, 1267, -1, -1, -1, -1, 1246, -1,
6035 1274, 1275, 1052, -1, -1, 1279, -1, -1, -1, -1,
6036 -1, -1, -1, 1063, 1288, 103, 104, -1, -1, 107,
6037 -1, -1, -1, 335, 112, 337, 338, 339, 340, -1,
6038 342, 343, -1, 468, 469, -1, -1, -1, -1, -1,
6039 -1, -1, 477, -1, 1318, -1, -1, -1, -1, 1297,
6040 -1, 363, -1, 1301, -1, 1303, -1, -1, -1, -1,
6041 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6042 -1, -1, -1, -1, -1, -1, -1, 512, 1027, 1028,
6043 515, 1131, -1, -1, 1134, 1135, -1, -1, 400, -1,
6044 1140, 403, -1, -1, -1, -1, -1, 409, 410, 411,
6045 -1, -1, 1152, -1, -1, 1155, -1, -1, -1, -1,
6046 -1, -1, -1, 425, 1362, -1, -1, -1, -1, -1,
6047 -1, -1, -1, -1, 1174, -1, -1, -1, -1, -1,
6048 -1, -1, -1, 1082, 1083, -1, -1, 1086, -1, 451,
6049 -1, -1, 230, -1, -1, -1, 1196, -1, -1, -1,
6050 -1, 586, -1, -1, 1103, -1, -1, -1, -1, -1,
6051 1210, 473, -1, -1, -1, -1, -1, 255, -1, 257,
6052 -1, 606, 260, 261, -1, -1, 611, -1, 266, -1,
6053 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6054 1139, -1, -1, -1, -1, -1, 508, 285, -1, -1,
6055 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6056 -1, 1160, -1, -1, 1163, 527, -1, 1267, -1, -1,
6057 -1, -1, -1, -1, 1274, 1275, -1, -1, 1177, 1279,
6058 1179, -1, -1, 1182, 1183, -1, 548, -1, 1187, 1188,
6059 -1, -1, 554, -1, -1, -1, -1, 335, -1, 337,
6060 338, 339, 340, -1, 342, 343, -1, -1, 693, -1,
6061 -1, -1, -1, -1, -1, -1, -1, -1, 1318, -1,
6062 -1, -1, -1, -1, 709, 363, 711, -1, -1, -1,
6063 -1, -1, 594, 595, -1, 597, 598, -1, -1, -1,
6064 -1, -1, -1, -1, 606, -1, -1, 1246, -1, 611,
6065 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6066 -1, -1, 400, -1, -1, 403, -1, -1, -1, -1,
6067 -1, 409, 410, 411, -1, -1, -1, -1, -1, -1,
6068 -1, -1, 767, -1, -1, -1, -1, 425, 1027, 1028,
6069 -1, -1, -1, 655, -1, 657, -1, -1, 1297, -1,
6070 -1, -1, 1301, 665, 1303, -1, -1, -1, -1, -1,
6071 795, -1, -1, 451, 676, -1, 678, 679, -1, -1,
6072 78, 79, 80, 81, 82, 83, 84, 689, 690, 87,
6073 88, -1, -1, -1, -1, 473, -1, 95, 96, -1,
6074 -1, -1, 827, 1082, 1083, -1, -1, 1086, -1, -1,
6075 -1, -1, -1, 715, -1, -1, -1, -1, -1, -1,
6076 845, 723, -1, 1362, 1103, -1, -1, -1, -1, -1,
6077 508, -1, -1, -1, -1, -1, -1, 1, -1, 137,
6078 138, 139, 140, 141, 142, 143, 144, 145, 146, 527,
6079 -1, 15, 16, -1, -1, -1, -1, -1, -1, -1,
6080 1139, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6081 548, -1, -1, -1, -1, -1, 554, -1, -1, -1,
6082 -1, 1160, -1, -1, 1163, -1, -1, -1, 52, 53,
6083 -1, -1, 56, -1, -1, -1, -1, -1, 1177, -1,
6084 1179, -1, -1, 1182, 1183, -1, -1, 932, 1187, 1188,
6085 -1, -1, -1, -1, -1, -1, 594, 595, -1, 597,
6086 598, -1, -1, -1, -1, 89, -1, -1, 606, -1,
6087 955, -1, -1, 611, 1027, 1028, -1, -1, -1, -1,
6088 -1, -1, 967, -1, 108, 109, 110, -1, 112, 1027,
6089 1028, -1, -1, 855, -1, 857, 858, -1, -1, -1,
6090 -1, -1, -1, -1, -1, -1, 991, 1246, -1, -1,
6091 -1, -1, -1, -1, -1, -1, -1, 655, -1, 657,
6092 -1, -1, -1, -1, -1, -1, -1, 665, -1, 1082,
6093 1083, 1016, -1, 1086, -1, -1, -1, -1, 676, -1,
6094 678, 679, -1, -1, 1082, 1083, -1, -1, 1086, -1,
6095 1103, 689, 690, -1, -1, -1, -1, -1, 1297, -1,
6096 -1, 923, 1301, -1, 1303, 1103, 1051, -1, -1, -1,
6097 -1, -1, -1, -1, -1, -1, -1, 715, 940, -1,
6098 -1, -1, -1, 945, 946, 723, 1139, -1, -1, 951,
6099 952, -1, -1, -1, -1, -1, -1, -1, 960, 961,
6100 -1, 1139, -1, -1, -1, -1, 230, 1160, -1, -1,
6101 1163, -1, -1, -1, 976, -1, -1, -1, -1, -1,
6102 -1, -1, 1160, 1362, 1177, 1163, 1179, -1, -1, 1182,
6103 1183, 255, -1, 257, 1187, 1188, -1, -1, -1, 1177,
6104 -1, 1179, 266, -1, 1182, 1183, -1, -1, -1, 1187,
6105 1188, 1136, -1, -1, -1, -1, 1018, 1019, 1020, -1,
6106 -1, 285, 78, 79, 80, 81, 82, 83, 84, 85,
6107 -1, 87, 88, 1035, -1, -1, -1, -1, -1, 95,
6108 96, 305, -1, -1, -1, -1, -1, -1, -1, -1,
6109 1052, -1, -1, 1246, -1, -1, -1, -1, -1, -1,
6110 -1, 1063, -1, -1, -1, -1, -1, -1, 1246, -1,
6111 -1, 335, -1, -1, -1, -1, -1, 855, -1, 857,
6112 858, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6113 146, -1, -1, -1, -1, -1, -1, -1, -1, 363,
6114 364, -1, -1, -1, 1297, -1, -1, -1, 1301, -1,
6115 1303, -1, -1, -1, -1, -1, -1, -1, -1, 1297,
6116 -1, -1, -1, 1301, -1, 1303, -1, -1, -1, 1131,
6117 -1, -1, 1134, 1135, -1, -1, 400, -1, 1140, 403,
6118 -1, -1, -1, -1, -1, 923, 410, 411, -1, -1,
6119 1152, 1, -1, 1155, -1, -1, -1, -1, -1, -1,
6120 -1, -1, 940, -1, -1, 15, 16, 945, 946, 1362,
6121 -1, -1, 1174, 951, 952, -1, -1, -1, -1, -1,
6122 -1, -1, 960, 961, 1362, -1, -1, 451, -1, -1,
6123 -1, -1, -1, -1, 1196, -1, -1, -1, 976, -1,
6124 -1, -1, 52, 53, -1, -1, 56, -1, 1210, 473,
6125 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6126 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6127 -1, -1, -1, -1, -1, -1, -1, -1, -1, 89,
6128 1018, 1019, 1020, -1, 508, -1, -1, -1, -1, -1,
6129 -1, -1, -1, -1, -1, -1, -1, 1035, 108, 109,
6130 110, 525, 112, 527, -1, 1267, -1, -1, -1, -1,
6131 -1, -1, 1274, 1275, 1052, -1, -1, 1279, -1, -1,
6132 -1, -1, -1, -1, 548, 1063, 0, -1, -1, -1,
6133 554, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6134 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6135 -1, 25, 26, 27, -1, -1, 1318, -1, -1, -1,
6136 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6137 44, 595, -1, -1, 598, -1, -1, -1, -1, -1,
6138 -1, -1, -1, -1, 608, -1, -1, 611, -1, -1,
6139 -1, -1, -1, 1131, 68, 69, 1134, 1135, -1, -1,
6140 -1, -1, 1140, -1, -1, -1, -1, -1, -1, -1,
6141 -1, -1, -1, -1, 1152, -1, -1, 1155, -1, -1,
6142 230, -1, -1, 97, 98, -1, -1, -1, -1, -1,
6143 -1, 655, -1, 657, -1, -1, 1174, -1, -1, -1,
6144 -1, 665, -1, -1, -1, 255, 120, 257, -1, -1,
6145 -1, -1, 676, -1, 678, 1, 266, -1, 1196, -1,
6146 -1, -1, -1, -1, -1, 689, 690, -1, -1, -1,
6147 -1, -1, 1210, -1, -1, 285, -1, 151, 152, -1,
6148 154, -1, -1, 157, 158, -1, 160, -1, -1, -1,
6149 -1, -1, -1, -1, -1, 305, -1, -1, -1, 723,
6150 -1, -1, -1, -1, -1, 729, 52, 53, -1, -1,
6151 56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6152 -1, -1, -1, -1, -1, 335, -1, -1, -1, 1267,
6153 -1, -1, -1, -1, -1, -1, 1274, 1275, -1, -1,
6154 -1, 1279, -1, 89, -1, -1, -1, -1, -1, -1,
6155 -1, -1, -1, 363, 364, 25, -1, -1, -1, -1,
6156 -1, -1, 108, 109, 110, 111, -1, -1, -1, -1,
6157 -1, -1, -1, -1, -1, -1, -1, -1, 1, -1,
6158 1318, 805, -1, -1, -1, -1, -1, -1, -1, -1,
6159 400, -1, -1, 403, -1, -1, -1, -1, -1, -1,
6160 410, 411, -1, -1, -1, -1, -1, -1, 78, 79,
6161 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6162 90, -1, -1, -1, -1, 95, 96, -1, -1, 52,
6163 53, 101, -1, 56, 858, -1, -1, -1, -1, -1,
6164 -1, 451, 78, 79, 80, 81, 82, 83, 84, 85,
6165 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6166 96, -1, -1, 473, -1, 135, 89, 137, 138, 139,
6167 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6168 -1, -1, -1, -1, 230, 108, 109, 110, -1, -1,
6169 -1, -1, -1, -1, -1, -1, -1, -1, 508, 135,
6170 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6171 146, -1, -1, -1, -1, 525, 940, 527, 154, -1,
6172 266, 945, 946, -1, -1, -1, -1, 951, 952, -1,
6173 -1, -1, -1, -1, -1, -1, 960, -1, 548, 285,
6174 -1, -1, -1, -1, 554, -1, -1, -1, -1, -1,
6175 -1, -1, 976, -1, -1, -1, -1, -1, -1, 305,
6176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6177 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6178 -1, -1, -1, -1, -1, 595, -1, -1, 598, 335,
6179 -1, -1, -1, -1, 1018, 1019, 1020, -1, 608, -1,
6180 -1, 611, -1, -1, -1, -1, -1, 230, -1, -1,
6181 -1, 1035, -1, -1, -1, -1, -1, 363, 364, -1,
6182 -1, -1, -1, -1, -1, -1, -1, -1, 1052, -1,
6183 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1063,
6184 -1, -1, -1, 266, -1, 655, -1, 657, -1, -1,
6185 -1, -1, -1, -1, -1, 665, -1, 403, -1, -1,
6186 -1, -1, 285, -1, 410, 411, 676, -1, 678, -1,
6187 -1, -1, -1, -1, -1, -1, -1, -1, -1, 689,
6188 690, -1, 305, -1, -1, -1, 1, -1, -1, -1,
6189 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6190 -1, -1, -1, 1127, -1, -1, -1, 1131, -1, -1,
6191 1134, 1135, 335, 723, -1, -1, 1140, -1, -1, 729,
6192 -1, -1, -1, -1, -1, -1, -1, -1, 1152, -1,
6193 -1, 1155, -1, -1, -1, -1, -1, 52, 53, -1,
6194 363, 364, -1, -1, -1, -1, -1, 33, 34, 35,
6195 36, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6196 -1, -1, 508, 49, 50, 51, 52, -1, -1, -1,
6197 56, -1, 1196, 59, 60, 61, 62, 63, -1, 525,
6198 403, -1, -1, -1, -1, -1, 1210, 410, 411, -1,
6199 -1, -1, -1, 108, -1, 805, -1, -1, -1, -1,
6200 -1, -1, 548, 1227, -1, 91, 92, -1, 554, -1,
6201 -1, -1, -1, 99, -1, -1, 102, 1, 104, 105,
6202 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6203 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6204 -1, -1, -1, 1267, -1, -1, -1, -1, 858, 595,
6205 -1, -1, 598, -1, 140, 1279, -1, -1, -1, -1,
6206 -1, 147, 608, -1, 1288, -1, -1, -1, 52, 53,
6207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6208 -1, -1, -1, -1, -1, 508, -1, -1, -1, -1,
6209 -1, -1, -1, -1, 1318, -1, -1, -1, -1, -1,
6210 -1, -1, 525, -1, -1, -1, -1, -1, -1, 655,
6211 -1, 657, -1, -1, -1, 230, -1, -1, -1, -1,
6212 -1, -1, -1, -1, -1, 548, -1, -1, -1, -1,
6213 940, 554, 678, -1, -1, 945, 946, -1, -1, -1,
6214 -1, 951, 952, -1, -1, -1, -1, -1, -1, -1,
6215 960, 266, -1, -1, -1, -1, -1, -1, -1, -1,
6216 -1, -1, -1, -1, -1, -1, 976, -1, -1, -1,
6217 285, -1, 595, -1, -1, 598, -1, -1, -1, -1,
6218 -1, -1, -1, 729, -1, 608, -1, -1, 611, -1,
6219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6220 -1, -1, -1, -1, -1, -1, -1, -1, 1018, 1019,
6221 1020, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6222 335, -1, -1, -1, -1, 1035, -1, -1, -1, -1,
6223 -1, -1, 655, -1, 657, -1, -1, -1, -1, -1,
6224 -1, -1, 1052, -1, -1, -1, 230, -1, 363, -1,
6225 -1, -1, -1, 1063, -1, 678, -1, -1, -1, 805,
6226 -1, -1, -1, -1, -1, -1, 689, 690, -1, -1,
6227 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6228 -1, -1, 266, -1, -1, -1, -1, -1, 403, -1,
6229 -1, -1, -1, -1, -1, 410, 411, -1, -1, -1,
6230 723, 285, -1, -1, -1, -1, 729, -1, -1, -1,
6231 -1, -1, 858, -1, -1, 738, -1, 1127, -1, -1,
6232 -1, 1131, -1, -1, 1134, 1135, -1, -1, -1, -1,
6233 1140, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6234 -1, -1, 1152, -1, -1, 1155, -1, -1, -1, -1,
6235 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1,
6236 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6237 -1, -1, -1, -1, -1, -1, -1, -1, -1, 363,
6238 -1, -1, 805, -1, -1, -1, 1196, -1, -1, -1,
6239 -1, -1, -1, 508, -1, -1, -1, -1, -1, -1,
6240 1210, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6241 -1, -1, -1, -1, 960, -1, -1, 1227, -1, 403,
6242 -1, -1, -1, -1, -1, -1, 410, 411, -1, -1,
6243 976, -1, -1, 548, -1, 858, -1, -1, -1, 554,
6244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6245 -1, -1, -1, -1, -1, -1, -1, 1267, -1, -1,
6246 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1279,
6247 -1, -1, 1018, 1019, -1, -1, -1, -1, 1288, -1,
6248 595, -1, -1, 598, -1, -1, -1, -1, -1, -1,
6249 -1, -1, -1, -1, -1, -1, 611, -1, -1, -1,
6250 -1, -1, -1, -1, -1, -1, 1052, -1, 1318, -1,
6251 -1, -1, -1, -1, -1, -1, -1, 1063, -1, -1,
6252 -1, -1, 945, 946, 508, -1, -1, -1, 951, 952,
6253 -1, -1, -1, -1, -1, -1, -1, 960, -1, -1,
6254 655, -1, 657, -1, -1, -1, -1, -1, -1, -1,
6255 -1, -1, -1, 976, -1, -1, -1, -1, -1, -1,
6256 -1, -1, -1, 678, 548, -1, -1, -1, -1, -1,
6257 554, -1, -1, -1, 689, 690, -1, -1, -1, -1,
6258 -1, 1127, -1, -1, -1, 1131, -1, -1, 1134, 1135,
6259 -1, -1, -1, -1, 1140, 1018, 1019, 1020, -1, -1,
6260 -1, -1, -1, -1, -1, -1, 1152, -1, 723, 1155,
6261 -1, 595, 1035, -1, 598, -1, -1, -1, -1, -1,
6262 -1, -1, -1, -1, -1, -1, -1, 611, -1, 1052,
6263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6264 1063, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6265 1196, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6266 -1, -1, -1, -1, 1210, -1, -1, -1, -1, -1,
6267 -1, 655, -1, 657, -1, -1, -1, -1, -1, -1,
6268 -1, 1227, -1, -1, -1, -1, -1, -1, -1, -1,
6269 -1, -1, -1, -1, 678, -1, -1, -1, -1, -1,
6270 -1, -1, -1, -1, 1127, 689, 690, -1, 1131, -1,
6271 -1, 1134, 1135, -1, -1, -1, -1, 1140, -1, -1,
6272 -1, -1, -1, -1, -1, 44, -1, -1, -1, 1152,
6273 -1, -1, 1155, 1279, -1, -1, -1, -1, -1, 723,
6274 -1, -1, 1288, 858, -1, -1, -1, -1, -1, -1,
6275 -1, -1, -1, -1, -1, -1, -1, 15, 16, 78,
6276 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6277 89, 90, 1318, 1196, -1, -1, 95, 96, -1, -1,
6278 -1, -1, -1, -1, -1, -1, -1, 1210, -1, 47,
6279 48, 49, 50, -1, -1, -1, 54, 55, -1, -1,
6280 -1, -1, -1, -1, 1227, -1, -1, -1, -1, 67,
6281 68, -1, -1, -1, -1, -1, 135, -1, 137, 138,
6282 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6283 945, 946, -1, -1, -1, -1, 951, 952, -1, -1,
6284 -1, -1, -1, -1, -1, 960, -1, -1, -1, -1,
6285 33, 34, 35, 36, 112, -1, 1279, -1, -1, -1,
6286 -1, 976, -1, -1, -1, 1288, 49, 50, 51, 52,
6287 -1, -1, -1, 56, 858, -1, 59, 60, 61, 62,
6288 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6289 -1, -1, -1, -1, -1, 1318, -1, -1, -1, -1,
6290 -1, -1, -1, 1018, 1019, 1020, -1, -1, 91, 92,
6291 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6292 1035, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6293 113, 114, 115, 116, 117, 118, -1, 1052, -1, -1,
6294 -1, -1, -1, -1, -1, -1, -1, -1, 1063, -1,
6295 -1, -1, -1, -1, -1, -1, -1, 140, -1, -1,
6296 -1, 945, 946, -1, 147, -1, -1, 951, 952, -1,
6297 228, 154, -1, 231, 232, 233, 960, 235, -1, -1,
6298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6299 -1, -1, 976, -1, -1, -1, -1, 255, -1, 257,
6300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6301 -1, -1, 1127, -1, -1, -1, 1131, -1, -1, 1134,
6302 1135, -1, -1, -1, -1, 1140, -1, -1, -1, -1,
6303 -1, -1, -1, -1, 1018, 1019, 1020, 1152, -1, -1,
6304 1155, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6305 -1, 1035, -1, -1, -1, -1, -1, -1, -1, -1,
6306 -1, -1, -1, -1, -1, -1, -1, -1, 1052, -1,
6307 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1063,
6308 -1, 1196, -1, -1, -1, -1, -1, -1, -1, -1,
6309 -1, -1, -1, -1, -1, 1210, -1, -1, -1, -1,
6310 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6311 368, 369, 370, 371, 372, -1, -1, 375, 376, 377,
6312 378, 379, 380, 381, 382, -1, 384, -1, -1, 387,
6313 388, 389, 390, 391, 392, 393, 394, 395, 396, -1,
6314 -1, -1, 400, -1, -1, -1, -1, 1131, -1, -1,
6315 1134, 1135, -1, -1, -1, -1, 1140, -1, -1, -1,
6316 -1, -1, -1, -1, 1279, -1, -1, -1, 1152, -1,
6317 -1, 1155, -1, -1, -1, -1, -1, -1, -1, -1,
6318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6319 -1, -1, -1, 451, -1, -1, -1, -1, -1, -1,
6320 -1, -1, -1, 1318, -1, -1, -1, -1, -1, -1,
6321 468, 469, 1196, -1, -1, 473, -1, -1, -1, 477,
6322 -1, 479, -1, 0, -1, -1, 1210, -1, -1, -1,
6323 -1, 8, 9, 10, -1, -1, 13, 14, 15, 497,
6324 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6325 27, 28, 29, -1, 512, -1, -1, 515, -1, -1,
6326 37, 38, -1, 40, 41, 42, 43, 44, -1, 527,
6327 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6328 -1, -1, -1, -1, -1, -1, -1, 545, -1, -1,
6329 -1, 68, 69, -1, -1, 1279, -1, -1, -1, -1,
6330 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6331 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6332 97, 98, -1, 100, 101, -1, -1, -1, 586, 106,
6333 -1, -1, -1, -1, 1318, -1, 594, -1, -1, 597,
6334 -1, -1, -1, 120, -1, -1, 123, -1, 606, -1,
6335 -1, -1, -1, 611, -1, -1, -1, 134, 135, 136,
6336 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6337 -1, -1, -1, -1, 151, 152, 153, 154, 155, -1,
6338 -1, 158, 159, 160, -1, -1, -1, -1, -1, -1,
6339 -1, -1, -1, -1, -1, -1, -1, 33, 34, 35,
6340 36, -1, -1, -1, -1, -1, -1, 665, -1, -1,
6341 -1, -1, -1, 49, 50, 51, 52, -1, 676, -1,
6342 56, -1, 58, 59, 60, 61, 62, 63, -1, -1,
6343 -1, 689, 690, -1, -1, 693, 694, -1, -1, -1,
6344 -1, -1, 78, -1, -1, -1, -1, 705, 706, -1,
6345 -1, 709, -1, 711, -1, 91, 92, -1, -1, -1,
6346 718, 719, -1, 99, -1, 723, 102, -1, 104, 105,
6347 -1, 107, 108, -1, 110, 111, 112, 113, 114, 115,
6348 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6350 -1, -1, -1, -1, 140, -1, -1, -1, -1, 767,
6351 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
6352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6353 -1, -1, -1, -1, -1, -1, -1, 795, -1, -1,
6354 -1, -1, -1, 0, 1, -1, 3, 4, 5, 6,
6355 7, 8, 9, 10, 11, 12, -1, 14, 15, 16,
6356 17, 18, 19, 20, 21, 22, 23, 24, 25, 827,
6357 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6358 -1, -1, 39, -1, -1, -1, -1, 845, 45, 46,
6359 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6360 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6361 -1, 68, -1, -1, -1, -1, -1, 875, -1, 76,
6362 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6363 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6364 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6365 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6366 117, 118, -1, 120, -1, 923, -1, -1, -1, -1,
6367 -1, -1, -1, -1, 932, -1, -1, -1, -1, -1,
6368 -1, -1, 940, -1, -1, -1, 944, 945, 946, -1,
6369 147, 148, 149, 951, 952, 152, -1, 955, -1, -1,
6370 -1, 158, -1, 160, -1, -1, -1, -1, -1, 967,
6371 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6372 -1, -1, -1, -1, -1, -1, -1, 985, 986, -1,
6373 988, 989, -1, 991, -1, 993, -1, -1, -1, -1,
6374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6375 -1, -1, -1, -1, 1012, 1013, -1, -1, 1016, -1,
6376 -1, -1, 1020, 1021, -1, -1, -1, -1, -1, -1,
6377 -1, -1, -1, -1, -1, -1, -1, 1035, -1, -1,
6378 -1, -1, -1, -1, 0, 1, -1, 3, 4, 5,
6379 6, 7, -1, 1051, -1, 11, 12, -1, -1, -1,
6380 16, 1059, 18, 19, 20, 21, 22, 23, 24, -1,
6381 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6382 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6383 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6384 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6386 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6387 -1, -1, -1, -1, -1, 91, 92, -1, 1136, -1,
6388 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6389 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6390 116, 117, 118, -1, 120, -1, -1, -1, -1, -1,
6391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6392 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6393 -1, 147, 148, 149, -1, -1, 0, 1, 154, 3,
6394 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6395 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6396 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6397 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6398 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6399 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6400 64, 65, -1, -1, -1, -1, -1, -1, -1, 1267,
6401 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6402 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6403 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6404 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6405 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6406 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6408 -1, -1, -1, 147, 148, 149, -1, -1, 0, 1,
6409 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6410 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6411 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6412 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6413 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6414 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6415 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6416 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6417 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6418 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6419 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6420 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6421 -1, -1, -1, -1, 0, -1, -1, -1, -1, -1,
6422 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6423 -1, 17, -1, -1, -1, 147, 148, 149, -1, 25,
6424 152, 27, 28, 29, -1, -1, -1, -1, 160, -1,
6425 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6426 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6427 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6428 96, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6429 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6430 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6431 96, 97, 98, -1, 100, 101, -1, -1, -1, 135,
6432 106, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6433 146, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6434 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6435 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6436 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6437 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6438 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6439 -1, -1, -1, -1, -1, 25, -1, 27, 28, 29,
6440 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6441 40, 41, 42, 43, 44, -1, -1, -1, 78, 79,
6442 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6443 90, -1, -1, -1, -1, 95, 96, -1, 68, 69,
6444 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6445 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6446 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6447 100, 101, -1, -1, -1, -1, 106, 137, 138, 139,
6448 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6449 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6450 -1, -1, -1, -1, 134, 135, 136, 137, 138, 139,
6451 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6452 -1, -1, 152, 153, 154, 155, 0, -1, 158, 159,
6453 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6454 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6455 -1, 25, 26, 27, 28, 29, -1, -1, -1, -1,
6456 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6457 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6459 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6460 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6461 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6462 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6463 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6464 -1, -1, -1, -1, -1, -1, 120, -1, -1, 123,
6465 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6466 -1, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6467 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6468 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6469 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6470 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
6471 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6472 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6473 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6474 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6475 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6476 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6477 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6478 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6479 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6480 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6481 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6482 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6483 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6484 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6485 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6486 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6487 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6488 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6490 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6491 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6492 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6493 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6494 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6495 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6496 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6497 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6498 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6499 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6500 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6501 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6502 -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6503 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6504 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6506 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6507 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6508 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6509 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6510 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6511 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6512 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6513 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6514 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6515 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6516 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6517 -1, -1, -1, -1, -1, 25, 26, 27, 28, -1,
6518 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6519 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6520 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6521 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6522 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6523 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6524 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6525 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6526 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6527 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6528 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6529 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6530 -1, 151, 152, 153, 154, 155, 0, 157, 158, 159,
6531 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6532 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6533 -1, 25, -1, 27, 28, -1, -1, -1, -1, -1,
6534 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6535 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6536 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6537 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6538 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6539 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6540 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6541 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6542 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6543 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6544 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6545 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6546 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6547 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6548 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6549 28, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6550 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6551 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6552 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6553 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6554 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6555 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6556 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6557 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6558 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6559 -1, -1, -1, -1, -1, -1, -1, 135, -1, 137,
6560 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6561 -1, -1, -1, -1, 152, 153, 154, 155, 0, 157,
6562 158, 159, 160, -1, -1, -1, 8, 9, 10, 44,
6563 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6564 -1, -1, -1, 25, 26, -1, -1, -1, -1, -1,
6565 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6566 42, 43, 44, 78, 79, 80, 81, 82, 83, 84,
6567 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6568 95, 96, -1, -1, -1, -1, 68, 69, -1, -1,
6569 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6570 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6571 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6572 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6573 145, 146, -1, -1, -1, -1, -1, -1, 120, -1,
6574 155, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6575 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6576 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6577 152, 153, 154, 155, 0, -1, 158, -1, 160, -1,
6578 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
6579 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6580 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6581 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6584 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6585 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6586 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6587 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6588 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6589 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6590 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6591 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6592 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6593 0, -1, 158, -1, 160, -1, -1, -1, 8, 9,
6594 10, -1, -1, -1, 14, 15, -1, 17, -1, -1,
6595 -1, -1, -1, -1, -1, 25, -1, -1, -1, -1,
6596 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6597 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6599 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6600 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6601 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6602 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6603 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
6604 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6605 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6606 -1, -1, -1, -1, 134, 135, -1, 137, 138, 139,
6607 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6608 -1, 151, 152, 153, 154, 155, 0, -1, 158, -1,
6609 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6610 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6611 -1, 25, -1, -1, -1, -1, -1, -1, -1, -1,
6612 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6613 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6614 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6615 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6616 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6617 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6618 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6619 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6620 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6622 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6623 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6624 154, 155, -1, -1, 158, 1, 160, 3, 4, 5,
6625 6, 7, 8, 9, 10, 11, 12, -1, -1, 15,
6626 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6627 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6628 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6629 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6630 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6631 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6632 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6633 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6634 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6635 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6636 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6637 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6638 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6639 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6640 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6641 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
6642 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6643 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6644 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6645 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6646 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6647 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6648 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6649 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6650 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6651 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6652 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6653 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6654 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6655 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6656 12, -1, -1, 15, 16, 17, 18, 19, 20, 21,
6657 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6658 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6659 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6660 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6661 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6662 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6663 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6664 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6665 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6666 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6667 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6668 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6669 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6670 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6671 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
6672 20, 21, 22, 23, 24, 25, -1, -1, -1, -1,
6673 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6674 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6675 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6676 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6677 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6678 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6679 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6680 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6681 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6682 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6683 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6684 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6685 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6686 160, -1, 10, 11, 12, -1, -1, 15, 16, -1,
6687 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6688 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6689 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6690 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6691 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6692 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6694 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6695 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6696 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6697 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6698 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6699 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6700 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6701 6, 7, 160, 9, 10, 11, 12, -1, -1, -1,
6702 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6703 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6704 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6705 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6706 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6707 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6708 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6709 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6710 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6711 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6712 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6713 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6714 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6715 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6716 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6717 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6718 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6719 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6720 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6721 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6722 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6723 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6724 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6725 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6726 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6727 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6728 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6729 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6730 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6731 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6732 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6733 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6734 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6735 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6736 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6737 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6738 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6740 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6741 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6742 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6743 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6744 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6745 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6746 -1, -1, 154, -1, -1, -1, 158, 1, 160, 3,
6747 4, 5, 6, 7, -1, -1, -1, 11, 12, -1,
6748 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6749 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6750 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6751 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6752 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6753 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6754 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6755 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6756 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6757 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6758 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6759 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6760 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6761 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6762 154, -1, -1, -1, 158, 1, 160, 3, 4, 5,
6763 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6764 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6765 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6766 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6767 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6768 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6770 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6771 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6772 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6773 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6774 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6775 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6776 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6777 -1, 147, 148, 149, -1, -1, 152, 1, 154, 3,
6778 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6779 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6780 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6781 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6782 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6783 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6784 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6785 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6786 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6787 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6788 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6789 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6790 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6791 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6792 -1, -1, -1, 147, 148, 149, -1, -1, 152, 1,
6793 154, 3, 4, 5, -1, 7, 160, -1, -1, 11,
6794 12, -1, -1, -1, 16, 17, 18, 19, 20, 21,
6795 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6796 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6797 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6798 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6799 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6800 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6802 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6803 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6804 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6805 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6806 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6807 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6808 -1, -1, 154, -1, -1, -1, -1, -1, 160, 3,
6809 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6810 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6811 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6812 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6813 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6814 54, 55, 56, 57, -1, -1, -1, -1, -1, -1,
6815 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6816 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6817 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6818 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6819 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
6820 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6821 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6822 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6823 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6824 -1, -1, 156, 157, 3, 4, 5, 6, 7, 8,
6825 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6826 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6827 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6828 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6829 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6830 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6831 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6832 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6833 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6834 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6835 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6836 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6837 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6838 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6839 149, -1, -1, -1, -1, -1, -1, 156, 3, 4,
6840 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
6841 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6842 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
6843 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
6844 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6845 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
6846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6847 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6848 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
6849 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
6850 -1, -1, 107, 108, -1, -1, 111, -1, -1, -1,
6851 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6852 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6853 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6854 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
6855 -1, 156, 3, 4, 5, 6, 7, 8, 9, 10,
6856 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6857 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6858 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6859 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6860 51, 52, 53, -1, -1, 56, -1, -1, -1, -1,
6861 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6862 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6863 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6864 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6865 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
6866 111, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6867 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6868 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
6869 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
6870 -1, -1, -1, -1, -1, 156, 3, 4, 5, 6,
6871 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6872 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6873 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6874 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6875 47, 48, 49, 50, 51, 52, 53, -1, -1, 56,
6876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6877 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6878 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6879 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6880 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6881 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6882 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6883 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6884 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6885 -1, 148, 149, 3, 4, 5, -1, 7, -1, 156,
6886 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6887 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6888 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6889 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6890 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6891 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6892 -1, -1, -1, -1, -1, -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, 99,
6895 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6896 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6897 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6898 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6899 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
6900 32, 33, 34, 35, 36, 155, -1, 39, -1, -1,
6901 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6902 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6903 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6904 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6905 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6906 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6907 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6908 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
6909 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6910 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6911 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
6912 34, 35, 36, 155, -1, 39, -1, -1, -1, -1,
6913 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6914 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6915 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6916 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6917 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6918 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6919 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
6920 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6921 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6922 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
6923 5, -1, 7, 147, 148, 149, 11, 12, -1, -1,
6924 154, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6925 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6926 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6927 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6928 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6929 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6930 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6931 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6932 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6933 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6934 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6935 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6936 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
6937 6, 7, 147, 148, 149, 11, 12, -1, -1, 154,
6938 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6939 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6940 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6941 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
6942 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6943 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6944 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6945 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6946 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6947 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6948 116, 117, 118, -1, -1, 1, -1, 3, 4, 5,
6949 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6950 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6951 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6952 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6953 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6954 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6955 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6956 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6957 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6958 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6959 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
6960 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6961 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6962 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6963 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6964 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6965 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6966 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6967 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6968 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6969 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6970 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6971 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6972 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6973 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6974 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6975 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6976 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6977 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6978 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6979 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6980 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6981 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6982 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6983 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6984 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6985 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6986 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6987 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6988 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6989 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6990 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6991 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6992 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6993 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6994 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6995 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6996 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6997 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6998 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6999 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7000 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7001 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7002 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7003 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7004 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7005 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7006 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7007 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
7008 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7009 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7010 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7011 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7012 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7013 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7014 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7016 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7017 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7018 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7019 -1, 107, 108, -1, 110, 111, 112, 113, 114, 115,
7020 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7021 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7022 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7023 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7024 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7025 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7026 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7027 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7028 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7029 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7030 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7031 -1, -1, 108, 109, 110, 111, 112, 113, 114, 115,
7032 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7033 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7034 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7035 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7036 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7037 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7038 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7039 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7040 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7041 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7042 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7043 -1, -1, 108, -1, 110, 111, 112, 113, 114, 115,
7044 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7045 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7046 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7047 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7048 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7049 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7050 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7051 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7052 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7053 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7054 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7055 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7056 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7057 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7058 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7059 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7060 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7061 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7062 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7063 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7064 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7065 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7066 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7067 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7068 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7069 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7070 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7071 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7072 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7073 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7074 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7075 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7076 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7077 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7078 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7079 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7080 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7081 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7082 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7083 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7084 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7085 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7086 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7087 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7088 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7089 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7090 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7091 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7092 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7093 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7094 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7095 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7096 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7097 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7098 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7099 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7100 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7101 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7102 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7103 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7104 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7105 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7106 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7107 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7108 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7109 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7110 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7111 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7112 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7113 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7114 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7115 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7116 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7117 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7118 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7119 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7120 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7121 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7122 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7123 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7124 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7125 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7126 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7127 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7128 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7129 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7130 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7131 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7132 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7133 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7134 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7135 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7136 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7137 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7138 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7139 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7140 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7141 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7142 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7143 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7144 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7145 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7146 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7147 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7148 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7149 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7150 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7151 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7152 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7153 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7154 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7155 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7156 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7157 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7158 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7159 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7160 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7161 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7162 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7163 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7164 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7165 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7166 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7167 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7168 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7169 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7170 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7172 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7173 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7174 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7175 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7176 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7177 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7178 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7179 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7180 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7181 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7182 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7183 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7184 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7185 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7186 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7187 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7188 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7189 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7190 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7191 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7192 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7193 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7194 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7195 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7196 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7198 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7199 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7200 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7201 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7202 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7203 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7204 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7205 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7206 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7208 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7209 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7210 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7211 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7212 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7213 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7214 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7215 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7216 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7217 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7218 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7220 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7221 -1, -1, -1, -1, -1, 95, -1, -1, -1, 99,
7222 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7223 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7224 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7225 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7226 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7227 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7228 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7229 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7230 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7231 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7232 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7233 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7234 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7235 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7236 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7237 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7238 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7239 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7240 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7241 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7242 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7243 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7245 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7246 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7247 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7248 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7249 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7250 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7251 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7252 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7253 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7256 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7257 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7258 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7259 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7260 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7261 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7262 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7263 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7264 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7265 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7266 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7267 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7268 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7269 -1, 99, -1, -1, 102, 103, 104, 105, 33, 34,
7270 35, 36, 110, 111, 112, 113, 114, 115, 116, 117,
7271 118, -1, -1, -1, 49, 50, 51, 52, -1, -1,
7272 -1, 56, -1, -1, 59, 60, 61, 62, 63, -1,
7273 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
7274 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7275 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
7276 -1, -1, -1, -1, 99, -1, -1, 102, -1, 104,
7277 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7278 115, 116, 117, 118, -1, -1, -1, -1, -1, 52,
7279 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
7280 -1, -1, -1, -1, -1, 140, -1, -1, -1, -1,
7281 -1, -1, 147, 76, 77, 78, 79, 80, 81, 82,
7282 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7283 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7284 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7285 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7286 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7287 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7288 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7289 -1, 56, -1, 156, 157, -1, -1, -1, -1, -1,
7290 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7291 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7292 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7293 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7294 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7295 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7296 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7297 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7298 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7299 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7300 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7301 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7302 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7303 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7304 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7305 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7306 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7307 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7308 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7309 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7310 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7311 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7312 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7313 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7314 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7315 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7316 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7317 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7318 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7319 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7320 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7321 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7322 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7323 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7326 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7327 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7328 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7329 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7330 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7331 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7332 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7333 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7334 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7335 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7336 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7337 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7338 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7339 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7340 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7341 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7342 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7343 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7344 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7345 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7346 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7347 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7348 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7349 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7350 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7351 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7353 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7356 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7357 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7358 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7359 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7360 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7361 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7362 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7363 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7364 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7365 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7366 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7367 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7368 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7369 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7370 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7371 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7372 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7373 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7375 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7376 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7377 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7379 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7380 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7381 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7382 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7383 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7384 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7385 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7386 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7387 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7388 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7389 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7390 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7391 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7392 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7394 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7395 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7396 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7397 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7398 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7399 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7400 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7402 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7403 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7404 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7405 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7406 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7408 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7409 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7410 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7411 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7414 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7415 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7416 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7418 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7419 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7420 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7421 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7422 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7423 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7424 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7425 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7426 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7428 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7429 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7430 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7431 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7432 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7433 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7434 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7435 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7436 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7437 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7438 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7439 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7440 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7441 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7442 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7443 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7444 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7445 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
7446 -1, 156
7447};
7448
7449/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7450 state STATE-NUM. */
7451static const yytype_int16 yystos[] =
7452{
7453 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7454 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7455 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7456 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7457 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7458 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7459 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7460 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7461 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7462 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7463 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7464 277, 278, 287, 288, 321, 326, 327, 377, 378, 379,
7465 380, 381, 382, 384, 385, 388, 389, 391, 392, 393,
7466 394, 408, 409, 411, 412, 413, 414, 415, 416, 417,
7467 418, 419, 467, 0, 3, 4, 5, 6, 7, 8,
7468 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7469 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7470 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7471 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7472 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7473 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7474 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7475 222, 224, 225, 408, 179, 179, 179, 39, 58, 99,
7476 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7477 238, 239, 245, 246, 249, 251, 252, 268, 415, 416,
7478 418, 419, 454, 455, 246, 157, 242, 247, 248, 154,
7479 157, 189, 54, 221, 189, 151, 169, 170, 235, 467,
7480 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7481 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7482 211, 212, 467, 171, 240, 251, 454, 467, 239, 453,
7483 454, 467, 46, 99, 147, 155, 195, 197, 216, 255,
7484 268, 415, 416, 419, 319, 220, 397, 410, 414, 397,
7485 398, 399, 161, 383, 383, 383, 383, 413, 203, 227,
7486 227, 154, 160, 163, 465, 466, 179, 40, 41, 42,
7487 43, 44, 37, 38, 157, 422, 423, 424, 425, 467,
7488 422, 424, 26, 151, 242, 248, 279, 328, 28, 280,
7489 325, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7490 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7491 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7492 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7493 153, 459, 460, 256, 1, 191, 198, 199, 199, 200,
7494 202, 202, 163, 199, 466, 99, 210, 217, 268, 293,
7495 415, 416, 419, 52, 56, 95, 99, 218, 219, 268,
7496 415, 416, 419, 219, 33, 34, 35, 36, 49, 50,
7497 51, 52, 56, 157, 194, 220, 417, 449, 450, 451,
7498 246, 157, 248, 98, 459, 460, 328, 380, 100, 100,
7499 155, 239, 56, 239, 239, 239, 397, 134, 101, 155,
7500 250, 467, 98, 153, 459, 100, 100, 155, 250, 92,
7501 244, 246, 251, 434, 454, 467, 246, 189, 191, 461,
7502 191, 54, 64, 65, 181, 157, 235, 236, 164, 422,
7503 422, 98, 459, 100, 178, 211, 158, 163, 466, 461,
7504 257, 159, 155, 189, 464, 155, 464, 152, 464, 189,
7505 56, 413, 213, 214, 423, 155, 98, 153, 459, 316,
7506 66, 119, 121, 122, 400, 119, 119, 400, 67, 400,
7507 161, 386, 395, 390, 396, 78, 160, 168, 151, 199,
7508 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7509 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7510 144, 298, 364, 426, 427, 428, 429, 430, 431, 433,
7511 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
7512 444, 445, 446, 447, 134, 265, 433, 134, 266, 329,
7513 330, 106, 207, 331, 332, 332, 235, 211, 155, 216,
7514 155, 235, 193, 227, 227, 227, 227, 227, 227, 227,
7515 227, 227, 227, 227, 227, 227, 192, 227, 227, 227,
7516 227, 227, 227, 227, 227, 227, 227, 227, 52, 53,
7517 56, 224, 456, 457, 244, 251, 52, 53, 56, 224,
7518 456, 242, 171, 174, 13, 289, 465, 289, 199, 171,
7519 171, 259, 163, 56, 98, 153, 459, 25, 199, 52,
7520 56, 218, 138, 421, 467, 98, 153, 459, 264, 452,
7521 69, 98, 458, 246, 461, 52, 56, 242, 456, 235,
7522 235, 223, 100, 124, 235, 239, 239, 249, 252, 454,
7523 52, 56, 244, 52, 56, 235, 235, 455, 461, 155,
7524 461, 155, 158, 461, 221, 236, 227, 152, 134, 134,
7525 56, 456, 456, 235, 170, 461, 177, 158, 454, 155,
7526 213, 52, 56, 244, 52, 56, 317, 402, 401, 119,
7527 387, 400, 66, 119, 119, 387, 66, 119, 227, 171,
7528 182, 102, 107, 294, 295, 296, 297, 436, 155, 448,
7529 467, 155, 448, 155, 432, 461, 299, 300, 155, 432,
7530 239, 34, 52, 52, 155, 432, 52, 39, 188, 209,
7531 227, 232, 174, 465, 188, 232, 174, 316, 152, 330,
7532 316, 10, 68, 286, 286, 107, 203, 204, 205, 239,
7533 251, 253, 254, 461, 213, 155, 99, 185, 190, 205,
7534 217, 227, 239, 241, 254, 268, 419, 338, 338, 189,
7535 100, 100, 151, 242, 248, 189, 462, 155, 100, 100,
7536 242, 243, 248, 467, 235, 286, 171, 13, 171, 27,
7537 290, 465, 286, 286, 17, 283, 334, 25, 258, 340,
7538 52, 56, 244, 52, 56, 260, 263, 420, 262, 52,
7539 56, 218, 244, 174, 191, 196, 461, 243, 248, 190,
7540 227, 241, 190, 241, 221, 235, 239, 250, 100, 100,
7541 462, 100, 100, 434, 454, 191, 39, 190, 241, 464,
7542 214, 462, 318, 403, 407, 414, 419, 383, 400, 383,
7543 383, 383, 152, 296, 436, 155, 461, 155, 447, 426,
7544 441, 443, 429, 430, 439, 445, 134, 239, 431, 438,
7545 445, 437, 439, 189, 44, 44, 286, 286, 317, 152,
7546 317, 239, 155, 44, 213, 56, 44, 134, 44, 98,
7547 153, 459, 336, 336, 136, 235, 235, 330, 207, 159,
7548 100, 235, 235, 207, 8, 281, 373, 467, 14, 15,
7549 284, 285, 291, 292, 467, 292, 201, 107, 239, 333,
7550 286, 338, 334, 286, 462, 199, 465, 199, 174, 462,
7551 286, 461, 194, 328, 325, 235, 235, 100, 235, 235,
7552 461, 155, 461, 189, 179, 404, 461, 294, 297, 295,
7553 448, 155, 432, 155, 432, 155, 432, 155, 432, 432,
7554 188, 232, 237, 237, 318, 318, 107, 239, 237, 237,
7555 235, 237, 52, 56, 244, 52, 56, 337, 337, 227,
7556 190, 241, 190, 241, 152, 235, 190, 241, 190, 241,
7557 239, 254, 374, 467, 175, 284, 171, 199, 286, 286,
7558 239, 155, 289, 336, 286, 290, 174, 465, 286, 235,
7559 157, 322, 433, 405, 155, 155, 439, 439, 445, 439,
7560 227, 227, 179, 179, 239, 182, 182, 227, 462, 52,
7561 56, 58, 91, 92, 99, 102, 104, 105, 107, 112,
7562 140, 321, 343, 344, 345, 347, 350, 354, 355, 356,
7563 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
7564 369, 370, 371, 372, 377, 378, 381, 382, 385, 389,
7565 392, 394, 416, 441, 343, 190, 241, 101, 375, 467,
7566 9, 282, 376, 467, 172, 289, 107, 239, 171, 337,
7567 261, 286, 433, 320, 171, 295, 432, 432, 155, 432,
7568 432, 139, 310, 311, 467, 310, 368, 368, 56, 218,
7569 337, 344, 352, 353, 354, 355, 358, 462, 189, 337,
7570 463, 52, 397, 52, 102, 414, 101, 155, 139, 155,
7571 155, 344, 89, 90, 98, 153, 157, 348, 349, 52,
7572 99, 217, 268, 415, 416, 419, 289, 176, 171, 171,
7573 239, 292, 334, 335, 342, 343, 171, 189, 313, 29,
7574 123, 323, 0, 120, 406, 439, 298, 301, 302, 303,
7575 304, 306, 307, 309, 312, 437, 439, 440, 445, 447,
7576 171, 174, 344, 462, 344, 356, 358, 462, 155, 152,
7577 235, 124, 199, 369, 352, 356, 346, 357, 358, 112,
7578 361, 365, 368, 368, 218, 337, 462, 337, 461, 352,
7579 355, 359, 352, 355, 359, 56, 98, 153, 459, 171,
7580 163, 173, 291, 289, 40, 41, 286, 160, 158, 324,
7581 171, 432, 448, 155, 448, 155, 308, 313, 300, 155,
7582 305, 308, 99, 268, 155, 308, 461, 155, 155, 351,
7583 461, 155, 350, 155, 397, 461, 461, 461, 462, 462,
7584 462, 52, 56, 244, 52, 56, 373, 376, 339, 199,
7585 199, 52, 314, 315, 435, 174, 152, 301, 443, 304,
7586 306, 439, 445, 139, 268, 307, 445, 56, 98, 439,
7587 357, 359, 357, 356, 358, 462, 171, 155, 189, 286,
7588 448, 155, 308, 155, 308, 155, 308, 155, 308, 52,
7589 56, 308, 155, 463, 292, 340, 341, 315, 439, 439,
7590 445, 439, 308, 308, 155, 308, 308, 439, 308
7591};
7592
7593/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7594static const yytype_int16 yyr1[] =
7595{
7596 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7597 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7598 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7599 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7600 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7601 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7602 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7603 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7604 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7605 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7606 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7607 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7608 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7609 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7610 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7611 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7612 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7613 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7614 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7615 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7616 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7617 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7618 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7619 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7620 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7621 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7622 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7623 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7624 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7625 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7626 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7627 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7628 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7629 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7630 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7631 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7632 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7633 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7634 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7635 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7636 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7637 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7638 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7639 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7640 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7641 303, 303, 303, 303, 304, 305, 306, 307, 307, 308,
7642 308, 309, 309, 309, 309, 309, 309, 309, 309, 309,
7643 309, 309, 309, 309, 309, 309, 310, 310, 311, 312,
7644 312, 313, 313, 314, 314, 315, 315, 316, 317, 318,
7645 319, 320, 321, 322, 322, 323, 324, 323, 325, 326,
7646 326, 326, 326, 326, 327, 327, 327, 327, 327, 327,
7647 327, 327, 328, 328, 329, 330, 331, 332, 333, 333,
7648 333, 333, 334, 335, 335, 336, 337, 338, 339, 340,
7649 341, 341, 342, 342, 342, 343, 343, 343, 343, 343,
7650 343, 344, 345, 345, 346, 347, 347, 348, 349, 350,
7651 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
7652 350, 350, 351, 350, 350, 350, 352, 352, 352, 352,
7653 352, 352, 353, 353, 354, 354, 355, 356, 356, 357,
7654 357, 358, 359, 359, 359, 359, 360, 360, 361, 361,
7655 362, 362, 363, 363, 364, 365, 365, 366, 367, 367,
7656 367, 367, 367, 367, 366, 366, 366, 366, 368, 368,
7657 368, 368, 368, 368, 368, 368, 368, 368, 369, 370,
7658 370, 371, 372, 372, 372, 373, 373, 374, 374, 374,
7659 375, 375, 376, 376, 377, 377, 378, 379, 379, 379,
7660 380, 381, 382, 383, 383, 384, 385, 386, 386, 387,
7661 387, 388, 389, 390, 390, 391, 392, 393, 394, 395,
7662 395, 396, 396, 397, 397, 398, 398, 399, 399, 400,
7663 401, 400, 402, 403, 404, 405, 400, 406, 406, 407,
7664 407, 408, 408, 409, 410, 410, 411, 412, 412, 413,
7665 413, 413, 413, 414, 414, 414, 415, 415, 415, 416,
7666 416, 416, 416, 416, 416, 416, 417, 417, 418, 418,
7667 419, 419, 420, 421, 421, 422, 422, 423, 424, 425,
7668 424, 426, 426, 427, 427, 428, 428, 428, 428, 429,
7669 429, 430, 431, 431, 432, 432, 433, 433, 433, 433,
7670 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
7671 433, 434, 435, 435, 435, 435, 436, 436, 437, 438,
7672 438, 439, 439, 440, 441, 441, 442, 443, 443, 444,
7673 444, 445, 445, 446, 446, 447, 447, 448, 448, 449,
7674 450, 451, 452, 451, 453, 453, 454, 454, 455, 455,
7675 455, 455, 455, 455, 456, 456, 456, 456, 457, 457,
7676 457, 458, 458, 459, 459, 460, 460, 461, 462, 463,
7677 464, 464, 465, 465, 466, 466, 467
7678};
7679
7680/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7681static const yytype_int8 yyr2[] =
7682{
7683 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7684 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7685 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7686 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7687 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7688 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7689 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7690 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7691 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7692 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7693 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7694 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7695 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7696 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7697 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7698 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7699 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7700 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7701 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7702 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7703 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7704 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7705 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7706 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7707 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7708 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7709 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7710 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7711 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7712 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7713 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7714 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7715 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7716 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7717 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7718 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7719 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7720 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7721 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7722 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7723 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7724 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7725 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7726 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7727 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7728 4, 2, 2, 1, 1, 1, 3, 1, 3, 2,
7729 0, 6, 8, 4, 6, 4, 2, 6, 2, 4,
7730 6, 2, 4, 2, 4, 1, 1, 1, 4, 0,
7731 1, 1, 4, 1, 3, 1, 1, 0, 0, 0,
7732 0, 0, 9, 4, 1, 3, 0, 4, 3, 2,
7733 4, 5, 5, 3, 2, 4, 4, 3, 3, 2,
7734 1, 4, 3, 3, 0, 7, 0, 7, 1, 2,
7735 3, 4, 5, 1, 1, 0, 0, 0, 0, 9,
7736 1, 1, 1, 3, 3, 1, 2, 3, 1, 1,
7737 1, 1, 3, 1, 0, 4, 1, 2, 2, 1,
7738 1, 4, 4, 4, 3, 4, 4, 4, 3, 3,
7739 3, 2, 0, 6, 2, 4, 1, 1, 2, 2,
7740 4, 1, 2, 3, 1, 3, 5, 2, 1, 1,
7741 3, 1, 3, 1, 2, 1, 1, 3, 2, 1,
7742 1, 3, 2, 1, 2, 1, 1, 1, 3, 3,
7743 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
7744 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
7745 2, 4, 2, 3, 1, 6, 1, 1, 1, 1,
7746 2, 1, 3, 1, 1, 1, 1, 1, 1, 2,
7747 3, 3, 3, 1, 2, 4, 1, 0, 3, 1,
7748 2, 4, 1, 0, 3, 4, 1, 4, 1, 0,
7749 3, 0, 3, 0, 2, 0, 2, 0, 2, 1,
7750 0, 3, 0, 0, 0, 0, 7, 1, 1, 1,
7751 1, 1, 1, 2, 1, 1, 3, 1, 2, 1,
7752 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7753 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7754 1, 1, 0, 4, 1, 1, 1, 3, 1, 0,
7755 3, 2, 1, 1, 3, 4, 2, 2, 1, 1,
7756 1, 3, 1, 3, 2, 0, 6, 8, 4, 6,
7757 4, 6, 2, 4, 6, 2, 4, 2, 4, 1,
7758 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7759 3, 1, 3, 1, 1, 1, 1, 2, 1, 1,
7760 1, 2, 1, 1, 1, 2, 1, 2, 1, 1,
7761 1, 1, 0, 4, 1, 2, 1, 3, 3, 2,
7762 1, 4, 2, 1, 1, 1, 1, 1, 1, 1,
7763 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
7764 1, 1, 1, 1, 1, 2, 0
7765};
7766
7767
7768enum { YYENOMEM = -2 };
7769
7770#define yyerrok (yyerrstatus = 0)
7771#define yyclearin (yychar = YYEMPTY)
7772
7773#define YYACCEPT goto yyacceptlab
7774#define YYABORT goto yyabortlab
7775#define YYERROR goto yyerrorlab
7776#define YYNOMEM goto yyexhaustedlab
7777
7778
7779#define YYRECOVERING() (!!yyerrstatus)
7780
7781#define YYBACKUP(Token, Value) \
7782 do \
7783 if (yychar == YYEMPTY) \
7784 { \
7785 yychar = (Token); \
7786 yylval = (Value); \
7787 YYPOPSTACK (yylen); \
7788 yystate = *yyssp; \
7789 goto yybackup; \
7790 } \
7791 else \
7792 { \
7793 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7794 YYERROR; \
7795 } \
7796 while (0)
7797
7798/* Backward compatibility with an undocumented macro.
7799 Use YYerror or YYUNDEF. */
7800#define YYERRCODE YYUNDEF
7801
7802/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7803 If N is 0, then set CURRENT to the empty location which ends
7804 the previous symbol: RHS[0] (always defined). */
7805
7806#ifndef YYLLOC_DEFAULT
7807# define YYLLOC_DEFAULT(Current, Rhs, N) \
7808 do \
7809 if (N) \
7810 { \
7811 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7812 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7813 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7814 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7815 } \
7816 else \
7817 { \
7818 (Current).first_line = (Current).last_line = \
7819 YYRHSLOC (Rhs, 0).last_line; \
7820 (Current).first_column = (Current).last_column = \
7821 YYRHSLOC (Rhs, 0).last_column; \
7822 } \
7823 while (0)
7824#endif
7825
7826#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7827
7828
7829/* Enable debugging if requested. */
7830#if YYDEBUG
7831
7832# ifndef YYFPRINTF
7833# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7834# define YYFPRINTF fprintf
7835# endif
7836
7837# define YYDPRINTF(Args) \
7838do { \
7839 if (yydebug) \
7840 YYFPRINTF Args; \
7841} while (0)
7842
7843
7844/* YYLOCATION_PRINT -- Print the location on the stream.
7845 This macro was not mandated originally: define only if we know
7846 we won't break user code: when these are the locations we know. */
7847
7848# ifndef YYLOCATION_PRINT
7849
7850# if defined YY_LOCATION_PRINT
7851
7852 /* Temporary convenience wrapper in case some people defined the
7853 undocumented and private YY_LOCATION_PRINT macros. */
7854# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7855
7856# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7857
7858/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7859
7860YY_ATTRIBUTE_UNUSED
7861static int
7862yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7863{
7864 int res = 0;
7865 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7866 if (0 <= yylocp->first_line)
7867 {
7868 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7869 if (0 <= yylocp->first_column)
7870 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7871 }
7872 if (0 <= yylocp->last_line)
7873 {
7874 if (yylocp->first_line < yylocp->last_line)
7875 {
7876 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7877 if (0 <= end_col)
7878 res += YYFPRINTF (yyo, ".%d", end_col);
7879 }
7880 else if (0 <= end_col && yylocp->first_column < end_col)
7881 res += YYFPRINTF (yyo, "-%d", end_col);
7882 }
7883 return res;
7884}
7885
7886# define YYLOCATION_PRINT yy_location_print_
7887
7888 /* Temporary convenience wrapper in case some people defined the
7889 undocumented and private YY_LOCATION_PRINT macros. */
7890# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7891
7892# else
7893
7894# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7895 /* Temporary convenience wrapper in case some people defined the
7896 undocumented and private YY_LOCATION_PRINT macros. */
7897# define YY_LOCATION_PRINT YYLOCATION_PRINT
7898
7899# endif
7900# endif /* !defined YYLOCATION_PRINT */
7901
7902
7903# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7904do { \
7905 if (yydebug) \
7906 { \
7907 YYFPRINTF (stderr, "%s ", Title); \
7908 yy_symbol_print (stderr, \
7909 Kind, Value, Location, p); \
7910 YYFPRINTF (stderr, "\n"); \
7911 } \
7912} while (0)
7913
7914
7915/*-----------------------------------.
7916| Print this symbol's value on YYO. |
7917`-----------------------------------*/
7918
7919static void
7920yy_symbol_value_print (FILE *yyo,
7921 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7922{
7923 FILE *yyoutput = yyo;
7924 YY_USE (yyoutput);
7925 YY_USE (yylocationp);
7926 YY_USE (p);
7927 if (!yyvaluep)
7928 return;
7929 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7930switch (yykind)
7931 {
7932 case YYSYMBOL_keyword_class: /* "'class'" */
7933#line 2627 "parse.y"
7934 {
7935 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7936}
7937#line 7938 "parse.c"
7938 break;
7939
7940 case YYSYMBOL_keyword_module: /* "'module'" */
7941#line 2627 "parse.y"
7942 {
7943 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7944}
7945#line 7946 "parse.c"
7946 break;
7947
7948 case YYSYMBOL_keyword_def: /* "'def'" */
7949#line 2627 "parse.y"
7950 {
7951 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7952}
7953#line 7954 "parse.c"
7954 break;
7955
7956 case YYSYMBOL_keyword_undef: /* "'undef'" */
7957#line 2627 "parse.y"
7958 {
7959 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7960}
7961#line 7962 "parse.c"
7962 break;
7963
7964 case YYSYMBOL_keyword_begin: /* "'begin'" */
7965#line 2627 "parse.y"
7966 {
7967 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7968}
7969#line 7970 "parse.c"
7970 break;
7971
7972 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
7973#line 2627 "parse.y"
7974 {
7975 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7976}
7977#line 7978 "parse.c"
7978 break;
7979
7980 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
7981#line 2627 "parse.y"
7982 {
7983 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7984}
7985#line 7986 "parse.c"
7986 break;
7987
7988 case YYSYMBOL_keyword_end: /* "'end'" */
7989#line 2627 "parse.y"
7990 {
7991 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7992}
7993#line 7994 "parse.c"
7994 break;
7995
7996 case YYSYMBOL_keyword_if: /* "'if'" */
7997#line 2627 "parse.y"
7998 {
7999 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8000}
8001#line 8002 "parse.c"
8002 break;
8003
8004 case YYSYMBOL_keyword_unless: /* "'unless'" */
8005#line 2627 "parse.y"
8006 {
8007 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8008}
8009#line 8010 "parse.c"
8010 break;
8011
8012 case YYSYMBOL_keyword_then: /* "'then'" */
8013#line 2627 "parse.y"
8014 {
8015 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8016}
8017#line 8018 "parse.c"
8018 break;
8019
8020 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
8021#line 2627 "parse.y"
8022 {
8023 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8024}
8025#line 8026 "parse.c"
8026 break;
8027
8028 case YYSYMBOL_keyword_else: /* "'else'" */
8029#line 2627 "parse.y"
8030 {
8031 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8032}
8033#line 8034 "parse.c"
8034 break;
8035
8036 case YYSYMBOL_keyword_case: /* "'case'" */
8037#line 2627 "parse.y"
8038 {
8039 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8040}
8041#line 8042 "parse.c"
8042 break;
8043
8044 case YYSYMBOL_keyword_when: /* "'when'" */
8045#line 2627 "parse.y"
8046 {
8047 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8048}
8049#line 8050 "parse.c"
8050 break;
8051
8052 case YYSYMBOL_keyword_while: /* "'while'" */
8053#line 2627 "parse.y"
8054 {
8055 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8056}
8057#line 8058 "parse.c"
8058 break;
8059
8060 case YYSYMBOL_keyword_until: /* "'until'" */
8061#line 2627 "parse.y"
8062 {
8063 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8064}
8065#line 8066 "parse.c"
8066 break;
8067
8068 case YYSYMBOL_keyword_for: /* "'for'" */
8069#line 2627 "parse.y"
8070 {
8071 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8072}
8073#line 8074 "parse.c"
8074 break;
8075
8076 case YYSYMBOL_keyword_break: /* "'break'" */
8077#line 2627 "parse.y"
8078 {
8079 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8080}
8081#line 8082 "parse.c"
8082 break;
8083
8084 case YYSYMBOL_keyword_next: /* "'next'" */
8085#line 2627 "parse.y"
8086 {
8087 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8088}
8089#line 8090 "parse.c"
8090 break;
8091
8092 case YYSYMBOL_keyword_redo: /* "'redo'" */
8093#line 2627 "parse.y"
8094 {
8095 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8096}
8097#line 8098 "parse.c"
8098 break;
8099
8100 case YYSYMBOL_keyword_retry: /* "'retry'" */
8101#line 2627 "parse.y"
8102 {
8103 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8104}
8105#line 8106 "parse.c"
8106 break;
8107
8108 case YYSYMBOL_keyword_in: /* "'in'" */
8109#line 2627 "parse.y"
8110 {
8111 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8112}
8113#line 8114 "parse.c"
8114 break;
8115
8116 case YYSYMBOL_keyword_do: /* "'do'" */
8117#line 2627 "parse.y"
8118 {
8119 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8120}
8121#line 8122 "parse.c"
8122 break;
8123
8124 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8125#line 2627 "parse.y"
8126 {
8127 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8128}
8129#line 8130 "parse.c"
8130 break;
8131
8132 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8133#line 2627 "parse.y"
8134 {
8135 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8136}
8137#line 8138 "parse.c"
8138 break;
8139
8140 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8141#line 2627 "parse.y"
8142 {
8143 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8144}
8145#line 8146 "parse.c"
8146 break;
8147
8148 case YYSYMBOL_keyword_return: /* "'return'" */
8149#line 2627 "parse.y"
8150 {
8151 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8152}
8153#line 8154 "parse.c"
8154 break;
8155
8156 case YYSYMBOL_keyword_yield: /* "'yield'" */
8157#line 2627 "parse.y"
8158 {
8159 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8160}
8161#line 8162 "parse.c"
8162 break;
8163
8164 case YYSYMBOL_keyword_super: /* "'super'" */
8165#line 2627 "parse.y"
8166 {
8167 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8168}
8169#line 8170 "parse.c"
8170 break;
8171
8172 case YYSYMBOL_keyword_self: /* "'self'" */
8173#line 2627 "parse.y"
8174 {
8175 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8176}
8177#line 8178 "parse.c"
8178 break;
8179
8180 case YYSYMBOL_keyword_nil: /* "'nil'" */
8181#line 2627 "parse.y"
8182 {
8183 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8184}
8185#line 8186 "parse.c"
8186 break;
8187
8188 case YYSYMBOL_keyword_true: /* "'true'" */
8189#line 2627 "parse.y"
8190 {
8191 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8192}
8193#line 8194 "parse.c"
8194 break;
8195
8196 case YYSYMBOL_keyword_false: /* "'false'" */
8197#line 2627 "parse.y"
8198 {
8199 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8200}
8201#line 8202 "parse.c"
8202 break;
8203
8204 case YYSYMBOL_keyword_and: /* "'and'" */
8205#line 2627 "parse.y"
8206 {
8207 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8208}
8209#line 8210 "parse.c"
8210 break;
8211
8212 case YYSYMBOL_keyword_or: /* "'or'" */
8213#line 2627 "parse.y"
8214 {
8215 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8216}
8217#line 8218 "parse.c"
8218 break;
8219
8220 case YYSYMBOL_keyword_not: /* "'not'" */
8221#line 2627 "parse.y"
8222 {
8223 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8224}
8225#line 8226 "parse.c"
8226 break;
8227
8228 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8229#line 2627 "parse.y"
8230 {
8231 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8232}
8233#line 8234 "parse.c"
8234 break;
8235
8236 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8237#line 2627 "parse.y"
8238 {
8239 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8240}
8241#line 8242 "parse.c"
8242 break;
8243
8244 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8245#line 2627 "parse.y"
8246 {
8247 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8248}
8249#line 8250 "parse.c"
8250 break;
8251
8252 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8253#line 2627 "parse.y"
8254 {
8255 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8256}
8257#line 8258 "parse.c"
8258 break;
8259
8260 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8261#line 2627 "parse.y"
8262 {
8263 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8264}
8265#line 8266 "parse.c"
8266 break;
8267
8268 case YYSYMBOL_keyword_alias: /* "'alias'" */
8269#line 2627 "parse.y"
8270 {
8271 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8272}
8273#line 8274 "parse.c"
8274 break;
8275
8276 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8277#line 2627 "parse.y"
8278 {
8279 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8280}
8281#line 8282 "parse.c"
8282 break;
8283
8284 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8285#line 2627 "parse.y"
8286 {
8287 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8288}
8289#line 8290 "parse.c"
8290 break;
8291
8292 case YYSYMBOL_keyword_END: /* "'END'" */
8293#line 2627 "parse.y"
8294 {
8295 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8296}
8297#line 8298 "parse.c"
8298 break;
8299
8300 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8301#line 2627 "parse.y"
8302 {
8303 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8304}
8305#line 8306 "parse.c"
8306 break;
8307
8308 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8309#line 2627 "parse.y"
8310 {
8311 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8312}
8313#line 8314 "parse.c"
8314 break;
8315
8316 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8317#line 2627 "parse.y"
8318 {
8319 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8320}
8321#line 8322 "parse.c"
8322 break;
8323
8324 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8325#line 2627 "parse.y"
8326 {
8327 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8328}
8329#line 8330 "parse.c"
8330 break;
8331
8332 case YYSYMBOL_tFID: /* "method" */
8333#line 2627 "parse.y"
8334 {
8335 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8336}
8337#line 8338 "parse.c"
8338 break;
8339
8340 case YYSYMBOL_tGVAR: /* "global variable" */
8341#line 2627 "parse.y"
8342 {
8343 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8344}
8345#line 8346 "parse.c"
8346 break;
8347
8348 case YYSYMBOL_tIVAR: /* "instance variable" */
8349#line 2627 "parse.y"
8350 {
8351 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8352}
8353#line 8354 "parse.c"
8354 break;
8355
8356 case YYSYMBOL_tCONSTANT: /* "constant" */
8357#line 2627 "parse.y"
8358 {
8359 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8360}
8361#line 8362 "parse.c"
8362 break;
8363
8364 case YYSYMBOL_tCVAR: /* "class variable" */
8365#line 2627 "parse.y"
8366 {
8367 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8368}
8369#line 8370 "parse.c"
8370 break;
8371
8372 case YYSYMBOL_tLABEL: /* "label" */
8373#line 2627 "parse.y"
8374 {
8375 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8376}
8377#line 8378 "parse.c"
8378 break;
8379
8380 case YYSYMBOL_tINTEGER: /* "integer literal" */
8381#line 2630 "parse.y"
8382 {
8383 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8384 case NODE_INTEGER:
8385 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8386 break;
8387 case NODE_FLOAT:
8388 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8389 break;
8390 case NODE_RATIONAL:
8391 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8392 break;
8393 case NODE_IMAGINARY:
8394 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8395 break;
8396 default:
8397 break;
8398 }
8399}
8400#line 8401 "parse.c"
8401 break;
8402
8403 case YYSYMBOL_tFLOAT: /* "float literal" */
8404#line 2630 "parse.y"
8405 {
8406 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8407 case NODE_INTEGER:
8408 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8409 break;
8410 case NODE_FLOAT:
8411 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8412 break;
8413 case NODE_RATIONAL:
8414 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8415 break;
8416 case NODE_IMAGINARY:
8417 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8418 break;
8419 default:
8420 break;
8421 }
8422}
8423#line 8424 "parse.c"
8424 break;
8425
8426 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8427#line 2630 "parse.y"
8428 {
8429 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8430 case NODE_INTEGER:
8431 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8432 break;
8433 case NODE_FLOAT:
8434 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8435 break;
8436 case NODE_RATIONAL:
8437 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8438 break;
8439 case NODE_IMAGINARY:
8440 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8441 break;
8442 default:
8443 break;
8444 }
8445}
8446#line 8447 "parse.c"
8447 break;
8448
8449 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8450#line 2630 "parse.y"
8451 {
8452 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8453 case NODE_INTEGER:
8454 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8455 break;
8456 case NODE_FLOAT:
8457 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8458 break;
8459 case NODE_RATIONAL:
8460 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8461 break;
8462 case NODE_IMAGINARY:
8463 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8464 break;
8465 default:
8466 break;
8467 }
8468}
8469#line 8470 "parse.c"
8470 break;
8471
8472 case YYSYMBOL_tCHAR: /* "char literal" */
8473#line 2630 "parse.y"
8474 {
8475 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8476 case NODE_INTEGER:
8477 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8478 break;
8479 case NODE_FLOAT:
8480 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8481 break;
8482 case NODE_RATIONAL:
8483 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8484 break;
8485 case NODE_IMAGINARY:
8486 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8487 break;
8488 default:
8489 break;
8490 }
8491}
8492#line 8493 "parse.c"
8493 break;
8494
8495 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8496#line 2648 "parse.y"
8497 {
8498 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8499}
8500#line 8501 "parse.c"
8501 break;
8502
8503 case YYSYMBOL_tBACK_REF: /* "back reference" */
8504#line 2651 "parse.y"
8505 {
8506 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8507}
8508#line 8509 "parse.c"
8509 break;
8510
8511 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8512#line 2630 "parse.y"
8513 {
8514 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8515 case NODE_INTEGER:
8516 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8517 break;
8518 case NODE_FLOAT:
8519 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8520 break;
8521 case NODE_RATIONAL:
8522 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8523 break;
8524 case NODE_IMAGINARY:
8525 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8526 break;
8527 default:
8528 break;
8529 }
8530}
8531#line 8532 "parse.c"
8532 break;
8533
8534 case YYSYMBOL_69_: /* '.' */
8535#line 2627 "parse.y"
8536 {
8537 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8538}
8539#line 8540 "parse.c"
8540 break;
8541
8542 case YYSYMBOL_70_backslash_: /* "backslash" */
8543#line 2627 "parse.y"
8544 {
8545 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8546}
8547#line 8548 "parse.c"
8548 break;
8549
8550 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8551#line 2627 "parse.y"
8552 {
8553 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8554}
8555#line 8556 "parse.c"
8556 break;
8557
8558 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8559#line 2627 "parse.y"
8560 {
8561 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8562}
8563#line 8564 "parse.c"
8564 break;
8565
8566 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8567#line 2627 "parse.y"
8568 {
8569 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8570}
8571#line 8572 "parse.c"
8572 break;
8573
8574 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8575#line 2627 "parse.y"
8576 {
8577 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8578}
8579#line 8580 "parse.c"
8580 break;
8581
8582 case YYSYMBOL_tANDDOT: /* "&." */
8583#line 2627 "parse.y"
8584 {
8585 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8586}
8587#line 8588 "parse.c"
8588 break;
8589
8590 case YYSYMBOL_tCOLON2: /* "::" */
8591#line 2627 "parse.y"
8592 {
8593 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8594}
8595#line 8596 "parse.c"
8596 break;
8597
8598 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8599#line 2627 "parse.y"
8600 {
8601 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8602}
8603#line 8604 "parse.c"
8604 break;
8605
8606 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8607#line 2618 "parse.y"
8608 {
8609 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8610 rb_parser_printf(p, "NODE_SPECIAL");
8611 }
8612 else if (((*yyvaluep).node)) {
8613 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8614 }
8615}
8616#line 8617 "parse.c"
8617 break;
8618
8619 case YYSYMBOL_top_stmts: /* top_stmts */
8620#line 2618 "parse.y"
8621 {
8622 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8623 rb_parser_printf(p, "NODE_SPECIAL");
8624 }
8625 else if (((*yyvaluep).node)) {
8626 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8627 }
8628}
8629#line 8630 "parse.c"
8630 break;
8631
8632 case YYSYMBOL_top_stmt: /* top_stmt */
8633#line 2618 "parse.y"
8634 {
8635 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8636 rb_parser_printf(p, "NODE_SPECIAL");
8637 }
8638 else if (((*yyvaluep).node)) {
8639 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8640 }
8641}
8642#line 8643 "parse.c"
8643 break;
8644
8645 case YYSYMBOL_block_open: /* block_open */
8646#line 2618 "parse.y"
8647 {
8648 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8649 rb_parser_printf(p, "NODE_SPECIAL");
8650 }
8651 else if (((*yyvaluep).node_exits)) {
8652 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8653 }
8654}
8655#line 8656 "parse.c"
8656 break;
8657
8658 case YYSYMBOL_begin_block: /* begin_block */
8659#line 2618 "parse.y"
8660 {
8661 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8662 rb_parser_printf(p, "NODE_SPECIAL");
8663 }
8664 else if (((*yyvaluep).node)) {
8665 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8666 }
8667}
8668#line 8669 "parse.c"
8669 break;
8670
8671 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8672#line 2618 "parse.y"
8673 {
8674 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8675 rb_parser_printf(p, "NODE_SPECIAL");
8676 }
8677 else if (((*yyvaluep).node)) {
8678 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8679 }
8680}
8681#line 8682 "parse.c"
8682 break;
8683
8684 case YYSYMBOL_bodystmt: /* bodystmt */
8685#line 2618 "parse.y"
8686 {
8687 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8688 rb_parser_printf(p, "NODE_SPECIAL");
8689 }
8690 else if (((*yyvaluep).node)) {
8691 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8692 }
8693}
8694#line 8695 "parse.c"
8695 break;
8696
8697 case YYSYMBOL_stmts: /* stmts */
8698#line 2618 "parse.y"
8699 {
8700 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8701 rb_parser_printf(p, "NODE_SPECIAL");
8702 }
8703 else if (((*yyvaluep).node)) {
8704 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8705 }
8706}
8707#line 8708 "parse.c"
8708 break;
8709
8710 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8711#line 2618 "parse.y"
8712 {
8713 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8714 rb_parser_printf(p, "NODE_SPECIAL");
8715 }
8716 else if (((*yyvaluep).node)) {
8717 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8718 }
8719}
8720#line 8721 "parse.c"
8721 break;
8722
8723 case YYSYMBOL_allow_exits: /* allow_exits */
8724#line 2618 "parse.y"
8725 {
8726 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8727 rb_parser_printf(p, "NODE_SPECIAL");
8728 }
8729 else if (((*yyvaluep).node_exits)) {
8730 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8731 }
8732}
8733#line 8734 "parse.c"
8734 break;
8735
8736 case YYSYMBOL_stmt: /* stmt */
8737#line 2618 "parse.y"
8738 {
8739 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8740 rb_parser_printf(p, "NODE_SPECIAL");
8741 }
8742 else if (((*yyvaluep).node)) {
8743 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8744 }
8745}
8746#line 8747 "parse.c"
8747 break;
8748
8749 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8750#line 2618 "parse.y"
8751 {
8752 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8753 rb_parser_printf(p, "NODE_SPECIAL");
8754 }
8755 else if (((*yyvaluep).node)) {
8756 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8757 }
8758}
8759#line 8760 "parse.c"
8760 break;
8761
8762 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8763#line 2618 "parse.y"
8764 {
8765 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8766 rb_parser_printf(p, "NODE_SPECIAL");
8767 }
8768 else if (((*yyvaluep).node)) {
8769 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8770 }
8771}
8772#line 8773 "parse.c"
8773 break;
8774
8775 case YYSYMBOL_command_asgn: /* command_asgn */
8776#line 2618 "parse.y"
8777 {
8778 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8779 rb_parser_printf(p, "NODE_SPECIAL");
8780 }
8781 else if (((*yyvaluep).node)) {
8782 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8783 }
8784}
8785#line 8786 "parse.c"
8786 break;
8787
8788 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8789#line 2618 "parse.y"
8790 {
8791 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8792 rb_parser_printf(p, "NODE_SPECIAL");
8793 }
8794 else if (((*yyvaluep).node)) {
8795 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8796 }
8797}
8798#line 8799 "parse.c"
8799 break;
8800
8801 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8802#line 2618 "parse.y"
8803 {
8804 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8805 rb_parser_printf(p, "NODE_SPECIAL");
8806 }
8807 else if (((*yyvaluep).node)) {
8808 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8809 }
8810}
8811#line 8812 "parse.c"
8812 break;
8813
8814 case YYSYMBOL_endless_command: /* endless_command */
8815#line 2618 "parse.y"
8816 {
8817 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8818 rb_parser_printf(p, "NODE_SPECIAL");
8819 }
8820 else if (((*yyvaluep).node)) {
8821 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8822 }
8823}
8824#line 8825 "parse.c"
8825 break;
8826
8827 case YYSYMBOL_command_rhs: /* command_rhs */
8828#line 2618 "parse.y"
8829 {
8830 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8831 rb_parser_printf(p, "NODE_SPECIAL");
8832 }
8833 else if (((*yyvaluep).node)) {
8834 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8835 }
8836}
8837#line 8838 "parse.c"
8838 break;
8839
8840 case YYSYMBOL_expr: /* expr */
8841#line 2618 "parse.y"
8842 {
8843 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8844 rb_parser_printf(p, "NODE_SPECIAL");
8845 }
8846 else if (((*yyvaluep).node)) {
8847 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8848 }
8849}
8850#line 8851 "parse.c"
8851 break;
8852
8853 case YYSYMBOL_def_name: /* def_name */
8854#line 2627 "parse.y"
8855 {
8856 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8857}
8858#line 8859 "parse.c"
8859 break;
8860
8861 case YYSYMBOL_defn_head: /* defn_head */
8862#line 2618 "parse.y"
8863 {
8864 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8865 rb_parser_printf(p, "NODE_SPECIAL");
8866 }
8867 else if (((*yyvaluep).node_def_temp)) {
8868 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8869 }
8870}
8871#line 8872 "parse.c"
8872 break;
8873
8874 case YYSYMBOL_defs_head: /* defs_head */
8875#line 2618 "parse.y"
8876 {
8877 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8878 rb_parser_printf(p, "NODE_SPECIAL");
8879 }
8880 else if (((*yyvaluep).node_def_temp)) {
8881 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8882 }
8883}
8884#line 8885 "parse.c"
8885 break;
8886
8887 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8888#line 2618 "parse.y"
8889 {
8890 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8891 rb_parser_printf(p, "NODE_SPECIAL");
8892 }
8893 else if (((*yyvaluep).node)) {
8894 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8895 }
8896}
8897#line 8898 "parse.c"
8898 break;
8899
8900 case YYSYMBOL_expr_value: /* expr_value */
8901#line 2618 "parse.y"
8902 {
8903 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8904 rb_parser_printf(p, "NODE_SPECIAL");
8905 }
8906 else if (((*yyvaluep).node)) {
8907 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8908 }
8909}
8910#line 8911 "parse.c"
8911 break;
8912
8913 case YYSYMBOL_expr_value_do: /* expr_value_do */
8914#line 2618 "parse.y"
8915 {
8916 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8917 rb_parser_printf(p, "NODE_SPECIAL");
8918 }
8919 else if (((*yyvaluep).node)) {
8920 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8921 }
8922}
8923#line 8924 "parse.c"
8924 break;
8925
8926 case YYSYMBOL_command_call: /* command_call */
8927#line 2618 "parse.y"
8928 {
8929 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8930 rb_parser_printf(p, "NODE_SPECIAL");
8931 }
8932 else if (((*yyvaluep).node)) {
8933 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8934 }
8935}
8936#line 8937 "parse.c"
8937 break;
8938
8939 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
8940#line 2618 "parse.y"
8941 {
8942 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8943 rb_parser_printf(p, "NODE_SPECIAL");
8944 }
8945 else if (((*yyvaluep).node)) {
8946 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8947 }
8948}
8949#line 8950 "parse.c"
8950 break;
8951
8952 case YYSYMBOL_command_call_value: /* command_call_value */
8953#line 2618 "parse.y"
8954 {
8955 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8956 rb_parser_printf(p, "NODE_SPECIAL");
8957 }
8958 else if (((*yyvaluep).node)) {
8959 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8960 }
8961}
8962#line 8963 "parse.c"
8963 break;
8964
8965 case YYSYMBOL_block_command: /* block_command */
8966#line 2618 "parse.y"
8967 {
8968 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8969 rb_parser_printf(p, "NODE_SPECIAL");
8970 }
8971 else if (((*yyvaluep).node)) {
8972 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8973 }
8974}
8975#line 8976 "parse.c"
8976 break;
8977
8978 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
8979#line 2618 "parse.y"
8980 {
8981 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8982 rb_parser_printf(p, "NODE_SPECIAL");
8983 }
8984 else if (((*yyvaluep).node)) {
8985 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8986 }
8987}
8988#line 8989 "parse.c"
8989 break;
8990
8991 case YYSYMBOL_fcall: /* fcall */
8992#line 2618 "parse.y"
8993 {
8994 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8995 rb_parser_printf(p, "NODE_SPECIAL");
8996 }
8997 else if (((*yyvaluep).node_fcall)) {
8998 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8999 }
9000}
9001#line 9002 "parse.c"
9002 break;
9003
9004 case YYSYMBOL_command: /* command */
9005#line 2618 "parse.y"
9006 {
9007 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9008 rb_parser_printf(p, "NODE_SPECIAL");
9009 }
9010 else if (((*yyvaluep).node)) {
9011 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9012 }
9013}
9014#line 9015 "parse.c"
9015 break;
9016
9017 case YYSYMBOL_mlhs: /* mlhs */
9018#line 2618 "parse.y"
9019 {
9020 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9021 rb_parser_printf(p, "NODE_SPECIAL");
9022 }
9023 else if (((*yyvaluep).node_masgn)) {
9024 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9025 }
9026}
9027#line 9028 "parse.c"
9028 break;
9029
9030 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9031#line 2618 "parse.y"
9032 {
9033 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9034 rb_parser_printf(p, "NODE_SPECIAL");
9035 }
9036 else if (((*yyvaluep).node_masgn)) {
9037 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9038 }
9039}
9040#line 9041 "parse.c"
9041 break;
9042
9043 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9044#line 2618 "parse.y"
9045 {
9046 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9047 rb_parser_printf(p, "NODE_SPECIAL");
9048 }
9049 else if (((*yyvaluep).node_masgn)) {
9050 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9051 }
9052}
9053#line 9054 "parse.c"
9054 break;
9055
9056 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9057#line 2618 "parse.y"
9058 {
9059 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9060 rb_parser_printf(p, "NODE_SPECIAL");
9061 }
9062 else if (((*yyvaluep).node)) {
9063 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9064 }
9065}
9066#line 9067 "parse.c"
9067 break;
9068
9069 case YYSYMBOL_mlhs_item: /* mlhs_item */
9070#line 2618 "parse.y"
9071 {
9072 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9073 rb_parser_printf(p, "NODE_SPECIAL");
9074 }
9075 else if (((*yyvaluep).node)) {
9076 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9077 }
9078}
9079#line 9080 "parse.c"
9080 break;
9081
9082 case YYSYMBOL_mlhs_head: /* mlhs_head */
9083#line 2618 "parse.y"
9084 {
9085 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9086 rb_parser_printf(p, "NODE_SPECIAL");
9087 }
9088 else if (((*yyvaluep).node)) {
9089 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9090 }
9091}
9092#line 9093 "parse.c"
9093 break;
9094
9095 case YYSYMBOL_mlhs_node: /* mlhs_node */
9096#line 2618 "parse.y"
9097 {
9098 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9099 rb_parser_printf(p, "NODE_SPECIAL");
9100 }
9101 else if (((*yyvaluep).node)) {
9102 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9103 }
9104}
9105#line 9106 "parse.c"
9106 break;
9107
9108 case YYSYMBOL_lhs: /* lhs */
9109#line 2618 "parse.y"
9110 {
9111 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9112 rb_parser_printf(p, "NODE_SPECIAL");
9113 }
9114 else if (((*yyvaluep).node)) {
9115 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9116 }
9117}
9118#line 9119 "parse.c"
9119 break;
9120
9121 case YYSYMBOL_cname: /* cname */
9122#line 2627 "parse.y"
9123 {
9124 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9125}
9126#line 9127 "parse.c"
9127 break;
9128
9129 case YYSYMBOL_cpath: /* cpath */
9130#line 2618 "parse.y"
9131 {
9132 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9133 rb_parser_printf(p, "NODE_SPECIAL");
9134 }
9135 else if (((*yyvaluep).node)) {
9136 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9137 }
9138}
9139#line 9140 "parse.c"
9140 break;
9141
9142 case YYSYMBOL_fname: /* fname */
9143#line 2627 "parse.y"
9144 {
9145 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9146}
9147#line 9148 "parse.c"
9148 break;
9149
9150 case YYSYMBOL_fitem: /* fitem */
9151#line 2618 "parse.y"
9152 {
9153 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9154 rb_parser_printf(p, "NODE_SPECIAL");
9155 }
9156 else if (((*yyvaluep).node)) {
9157 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9158 }
9159}
9160#line 9161 "parse.c"
9161 break;
9162
9163 case YYSYMBOL_undef_list: /* undef_list */
9164#line 2618 "parse.y"
9165 {
9166 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9167 rb_parser_printf(p, "NODE_SPECIAL");
9168 }
9169 else if (((*yyvaluep).node)) {
9170 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9171 }
9172}
9173#line 9174 "parse.c"
9174 break;
9175
9176 case YYSYMBOL_op: /* op */
9177#line 2627 "parse.y"
9178 {
9179 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9180}
9181#line 9182 "parse.c"
9182 break;
9183
9184 case YYSYMBOL_reswords: /* reswords */
9185#line 2627 "parse.y"
9186 {
9187 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9188}
9189#line 9190 "parse.c"
9190 break;
9191
9192 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9193#line 2618 "parse.y"
9194 {
9195 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9196 rb_parser_printf(p, "NODE_SPECIAL");
9197 }
9198 else if (((*yyvaluep).node)) {
9199 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9200 }
9201}
9202#line 9203 "parse.c"
9203 break;
9204
9205 case YYSYMBOL_arg: /* arg */
9206#line 2618 "parse.y"
9207 {
9208 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9209 rb_parser_printf(p, "NODE_SPECIAL");
9210 }
9211 else if (((*yyvaluep).node)) {
9212 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9213 }
9214}
9215#line 9216 "parse.c"
9216 break;
9217
9218 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9219#line 2618 "parse.y"
9220 {
9221 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9222 rb_parser_printf(p, "NODE_SPECIAL");
9223 }
9224 else if (((*yyvaluep).node)) {
9225 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9226 }
9227}
9228#line 9229 "parse.c"
9229 break;
9230
9231 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9232#line 2618 "parse.y"
9233 {
9234 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9235 rb_parser_printf(p, "NODE_SPECIAL");
9236 }
9237 else if (((*yyvaluep).node)) {
9238 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9239 }
9240}
9241#line 9242 "parse.c"
9242 break;
9243
9244 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9245#line 2618 "parse.y"
9246 {
9247 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9248 rb_parser_printf(p, "NODE_SPECIAL");
9249 }
9250 else if (((*yyvaluep).node)) {
9251 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9252 }
9253}
9254#line 9255 "parse.c"
9255 break;
9256
9257 case YYSYMBOL_ternary: /* ternary */
9258#line 2618 "parse.y"
9259 {
9260 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9261 rb_parser_printf(p, "NODE_SPECIAL");
9262 }
9263 else if (((*yyvaluep).node)) {
9264 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9265 }
9266}
9267#line 9268 "parse.c"
9268 break;
9269
9270 case YYSYMBOL_endless_arg: /* endless_arg */
9271#line 2618 "parse.y"
9272 {
9273 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9274 rb_parser_printf(p, "NODE_SPECIAL");
9275 }
9276 else if (((*yyvaluep).node)) {
9277 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9278 }
9279}
9280#line 9281 "parse.c"
9281 break;
9282
9283 case YYSYMBOL_relop: /* relop */
9284#line 2627 "parse.y"
9285 {
9286 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9287}
9288#line 9289 "parse.c"
9289 break;
9290
9291 case YYSYMBOL_rel_expr: /* rel_expr */
9292#line 2618 "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_value_expr_arg: /* value_expr_arg */
9305#line 2618 "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_arg_value: /* arg_value */
9318#line 2618 "parse.y"
9319 {
9320 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9321 rb_parser_printf(p, "NODE_SPECIAL");
9322 }
9323 else if (((*yyvaluep).node)) {
9324 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9325 }
9326}
9327#line 9328 "parse.c"
9328 break;
9329
9330 case YYSYMBOL_aref_args: /* aref_args */
9331#line 2618 "parse.y"
9332 {
9333 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9334 rb_parser_printf(p, "NODE_SPECIAL");
9335 }
9336 else if (((*yyvaluep).node)) {
9337 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9338 }
9339}
9340#line 9341 "parse.c"
9341 break;
9342
9343 case YYSYMBOL_arg_rhs: /* arg_rhs */
9344#line 2618 "parse.y"
9345 {
9346 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9347 rb_parser_printf(p, "NODE_SPECIAL");
9348 }
9349 else if (((*yyvaluep).node)) {
9350 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9351 }
9352}
9353#line 9354 "parse.c"
9354 break;
9355
9356 case YYSYMBOL_paren_args: /* paren_args */
9357#line 2618 "parse.y"
9358 {
9359 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9360 rb_parser_printf(p, "NODE_SPECIAL");
9361 }
9362 else if (((*yyvaluep).node)) {
9363 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9364 }
9365}
9366#line 9367 "parse.c"
9367 break;
9368
9369 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9370#line 2618 "parse.y"
9371 {
9372 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9373 rb_parser_printf(p, "NODE_SPECIAL");
9374 }
9375 else if (((*yyvaluep).node)) {
9376 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9377 }
9378}
9379#line 9380 "parse.c"
9380 break;
9381
9382 case YYSYMBOL_opt_call_args: /* opt_call_args */
9383#line 2618 "parse.y"
9384 {
9385 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9386 rb_parser_printf(p, "NODE_SPECIAL");
9387 }
9388 else if (((*yyvaluep).node)) {
9389 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9390 }
9391}
9392#line 9393 "parse.c"
9393 break;
9394
9395 case YYSYMBOL_value_expr_command: /* value_expr_command */
9396#line 2618 "parse.y"
9397 {
9398 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9399 rb_parser_printf(p, "NODE_SPECIAL");
9400 }
9401 else if (((*yyvaluep).node)) {
9402 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9403 }
9404}
9405#line 9406 "parse.c"
9406 break;
9407
9408 case YYSYMBOL_call_args: /* call_args */
9409#line 2618 "parse.y"
9410 {
9411 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9412 rb_parser_printf(p, "NODE_SPECIAL");
9413 }
9414 else if (((*yyvaluep).node)) {
9415 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9416 }
9417}
9418#line 9419 "parse.c"
9419 break;
9420
9421 case YYSYMBOL_command_args: /* command_args */
9422#line 2618 "parse.y"
9423 {
9424 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9425 rb_parser_printf(p, "NODE_SPECIAL");
9426 }
9427 else if (((*yyvaluep).node)) {
9428 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9429 }
9430}
9431#line 9432 "parse.c"
9432 break;
9433
9434 case YYSYMBOL_block_arg: /* block_arg */
9435#line 2618 "parse.y"
9436 {
9437 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9438 rb_parser_printf(p, "NODE_SPECIAL");
9439 }
9440 else if (((*yyvaluep).node_block_pass)) {
9441 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9442 }
9443}
9444#line 9445 "parse.c"
9445 break;
9446
9447 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9448#line 2618 "parse.y"
9449 {
9450 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9451 rb_parser_printf(p, "NODE_SPECIAL");
9452 }
9453 else if (((*yyvaluep).node_block_pass)) {
9454 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9455 }
9456}
9457#line 9458 "parse.c"
9458 break;
9459
9460 case YYSYMBOL_args: /* args */
9461#line 2618 "parse.y"
9462 {
9463 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9464 rb_parser_printf(p, "NODE_SPECIAL");
9465 }
9466 else if (((*yyvaluep).node)) {
9467 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9468 }
9469}
9470#line 9471 "parse.c"
9471 break;
9472
9473 case YYSYMBOL_arg_splat: /* arg_splat */
9474#line 2618 "parse.y"
9475 {
9476 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9477 rb_parser_printf(p, "NODE_SPECIAL");
9478 }
9479 else if (((*yyvaluep).node)) {
9480 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9481 }
9482}
9483#line 9484 "parse.c"
9484 break;
9485
9486 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9487#line 2618 "parse.y"
9488 {
9489 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9490 rb_parser_printf(p, "NODE_SPECIAL");
9491 }
9492 else if (((*yyvaluep).node)) {
9493 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9494 }
9495}
9496#line 9497 "parse.c"
9497 break;
9498
9499 case YYSYMBOL_mrhs: /* mrhs */
9500#line 2618 "parse.y"
9501 {
9502 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9503 rb_parser_printf(p, "NODE_SPECIAL");
9504 }
9505 else if (((*yyvaluep).node)) {
9506 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9507 }
9508}
9509#line 9510 "parse.c"
9510 break;
9511
9512 case YYSYMBOL_primary: /* primary */
9513#line 2618 "parse.y"
9514 {
9515 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9516 rb_parser_printf(p, "NODE_SPECIAL");
9517 }
9518 else if (((*yyvaluep).node)) {
9519 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9520 }
9521}
9522#line 9523 "parse.c"
9523 break;
9524
9525 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9526#line 2618 "parse.y"
9527 {
9528 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9529 rb_parser_printf(p, "NODE_SPECIAL");
9530 }
9531 else if (((*yyvaluep).node)) {
9532 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9533 }
9534}
9535#line 9536 "parse.c"
9536 break;
9537
9538 case YYSYMBOL_primary_value: /* primary_value */
9539#line 2618 "parse.y"
9540 {
9541 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9542 rb_parser_printf(p, "NODE_SPECIAL");
9543 }
9544 else if (((*yyvaluep).node)) {
9545 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9546 }
9547}
9548#line 9549 "parse.c"
9549 break;
9550
9551 case YYSYMBOL_k_while: /* k_while */
9552#line 2618 "parse.y"
9553 {
9554 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9555 rb_parser_printf(p, "NODE_SPECIAL");
9556 }
9557 else if (((*yyvaluep).node_exits)) {
9558 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9559 }
9560}
9561#line 9562 "parse.c"
9562 break;
9563
9564 case YYSYMBOL_k_until: /* k_until */
9565#line 2618 "parse.y"
9566 {
9567 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9568 rb_parser_printf(p, "NODE_SPECIAL");
9569 }
9570 else if (((*yyvaluep).node_exits)) {
9571 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9572 }
9573}
9574#line 9575 "parse.c"
9575 break;
9576
9577 case YYSYMBOL_k_for: /* k_for */
9578#line 2618 "parse.y"
9579 {
9580 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9581 rb_parser_printf(p, "NODE_SPECIAL");
9582 }
9583 else if (((*yyvaluep).node_exits)) {
9584 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9585 }
9586}
9587#line 9588 "parse.c"
9588 break;
9589
9590 case YYSYMBOL_k_def: /* k_def */
9591#line 2618 "parse.y"
9592 {
9593 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9594 rb_parser_printf(p, "NODE_SPECIAL");
9595 }
9596 else if (((*yyvaluep).node_def_temp)) {
9597 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9598 }
9599}
9600#line 9601 "parse.c"
9601 break;
9602
9603 case YYSYMBOL_do: /* do */
9604#line 2627 "parse.y"
9605 {
9606 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9607}
9608#line 9609 "parse.c"
9609 break;
9610
9611 case YYSYMBOL_if_tail: /* if_tail */
9612#line 2618 "parse.y"
9613 {
9614 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9615 rb_parser_printf(p, "NODE_SPECIAL");
9616 }
9617 else if (((*yyvaluep).node)) {
9618 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9619 }
9620}
9621#line 9622 "parse.c"
9622 break;
9623
9624 case YYSYMBOL_opt_else: /* opt_else */
9625#line 2618 "parse.y"
9626 {
9627 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9628 rb_parser_printf(p, "NODE_SPECIAL");
9629 }
9630 else if (((*yyvaluep).node)) {
9631 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9632 }
9633}
9634#line 9635 "parse.c"
9635 break;
9636
9637 case YYSYMBOL_for_var: /* for_var */
9638#line 2618 "parse.y"
9639 {
9640 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9641 rb_parser_printf(p, "NODE_SPECIAL");
9642 }
9643 else if (((*yyvaluep).node)) {
9644 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9645 }
9646}
9647#line 9648 "parse.c"
9648 break;
9649
9650 case YYSYMBOL_f_marg: /* f_marg */
9651#line 2618 "parse.y"
9652 {
9653 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9654 rb_parser_printf(p, "NODE_SPECIAL");
9655 }
9656 else if (((*yyvaluep).node)) {
9657 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9658 }
9659}
9660#line 9661 "parse.c"
9661 break;
9662
9663 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9664#line 2618 "parse.y"
9665 {
9666 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9667 rb_parser_printf(p, "NODE_SPECIAL");
9668 }
9669 else if (((*yyvaluep).node)) {
9670 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9671 }
9672}
9673#line 9674 "parse.c"
9674 break;
9675
9676 case YYSYMBOL_f_margs: /* f_margs */
9677#line 2618 "parse.y"
9678 {
9679 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9680 rb_parser_printf(p, "NODE_SPECIAL");
9681 }
9682 else if (((*yyvaluep).node_masgn)) {
9683 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9684 }
9685}
9686#line 9687 "parse.c"
9687 break;
9688
9689 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9690#line 2618 "parse.y"
9691 {
9692 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9693 rb_parser_printf(p, "NODE_SPECIAL");
9694 }
9695 else if (((*yyvaluep).node)) {
9696 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9697 }
9698}
9699#line 9700 "parse.c"
9700 break;
9701
9702 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9703#line 2627 "parse.y"
9704 {
9705 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9706}
9707#line 9708 "parse.c"
9708 break;
9709
9710 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9711#line 2618 "parse.y"
9712 {
9713 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9714 rb_parser_printf(p, "NODE_SPECIAL");
9715 }
9716 else if (((*yyvaluep).node_kw_arg)) {
9717 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9718 }
9719}
9720#line 9721 "parse.c"
9721 break;
9722
9723 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9724#line 2618 "parse.y"
9725 {
9726 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9727 rb_parser_printf(p, "NODE_SPECIAL");
9728 }
9729 else if (((*yyvaluep).node_kw_arg)) {
9730 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9731 }
9732}
9733#line 9734 "parse.c"
9734 break;
9735
9736 case YYSYMBOL_args_tail_basic_primary_value: /* args_tail_basic_primary_value */
9737#line 2618 "parse.y"
9738 {
9739 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9740 rb_parser_printf(p, "NODE_SPECIAL");
9741 }
9742 else if (((*yyvaluep).node_args)) {
9743 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9744 }
9745}
9746#line 9747 "parse.c"
9747 break;
9748
9749 case YYSYMBOL_block_args_tail: /* block_args_tail */
9750#line 2618 "parse.y"
9751 {
9752 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9753 rb_parser_printf(p, "NODE_SPECIAL");
9754 }
9755 else if (((*yyvaluep).node_args)) {
9756 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9757 }
9758}
9759#line 9760 "parse.c"
9760 break;
9761
9762 case YYSYMBOL_excessed_comma: /* excessed_comma */
9763#line 2627 "parse.y"
9764 {
9765 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9766}
9767#line 9768 "parse.c"
9768 break;
9769
9770 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9771#line 2618 "parse.y"
9772 {
9773 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9774 rb_parser_printf(p, "NODE_SPECIAL");
9775 }
9776 else if (((*yyvaluep).node_opt_arg)) {
9777 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9778 }
9779}
9780#line 9781 "parse.c"
9781 break;
9782
9783 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9784#line 2618 "parse.y"
9785 {
9786 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9787 rb_parser_printf(p, "NODE_SPECIAL");
9788 }
9789 else if (((*yyvaluep).node_opt_arg)) {
9790 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9791 }
9792}
9793#line 9794 "parse.c"
9794 break;
9795
9796 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9797#line 2618 "parse.y"
9798 {
9799 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9800 rb_parser_printf(p, "NODE_SPECIAL");
9801 }
9802 else if (((*yyvaluep).node_args)) {
9803 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9804 }
9805}
9806#line 9807 "parse.c"
9807 break;
9808
9809 case YYSYMBOL_block_param: /* block_param */
9810#line 2618 "parse.y"
9811 {
9812 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9813 rb_parser_printf(p, "NODE_SPECIAL");
9814 }
9815 else if (((*yyvaluep).node_args)) {
9816 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9817 }
9818}
9819#line 9820 "parse.c"
9820 break;
9821
9822 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9823#line 2618 "parse.y"
9824 {
9825 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9826 rb_parser_printf(p, "NODE_SPECIAL");
9827 }
9828 else if (((*yyvaluep).node_args)) {
9829 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9830 }
9831}
9832#line 9833 "parse.c"
9833 break;
9834
9835 case YYSYMBOL_block_param_def: /* block_param_def */
9836#line 2618 "parse.y"
9837 {
9838 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9839 rb_parser_printf(p, "NODE_SPECIAL");
9840 }
9841 else if (((*yyvaluep).node_args)) {
9842 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9843 }
9844}
9845#line 9846 "parse.c"
9846 break;
9847
9848 case YYSYMBOL_opt_block_param: /* opt_block_param */
9849#line 2618 "parse.y"
9850 {
9851 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9852 rb_parser_printf(p, "NODE_SPECIAL");
9853 }
9854 else if (((*yyvaluep).node_args)) {
9855 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9856 }
9857}
9858#line 9859 "parse.c"
9859 break;
9860
9861 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9862#line 2627 "parse.y"
9863 {
9864 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9865}
9866#line 9867 "parse.c"
9867 break;
9868
9869 case YYSYMBOL_bv_decls: /* bv_decls */
9870#line 2627 "parse.y"
9871 {
9872 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9873}
9874#line 9875 "parse.c"
9875 break;
9876
9877 case YYSYMBOL_bvar: /* bvar */
9878#line 2627 "parse.y"
9879 {
9880 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9881}
9882#line 9883 "parse.c"
9883 break;
9884
9885 case YYSYMBOL_numparam: /* numparam */
9886#line 2618 "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_it_id: /* it_id */
9899#line 2627 "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_lambda: /* lambda */
9907#line 2618 "parse.y"
9908 {
9909 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9910 rb_parser_printf(p, "NODE_SPECIAL");
9911 }
9912 else if (((*yyvaluep).node)) {
9913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9914 }
9915}
9916#line 9917 "parse.c"
9917 break;
9918
9919 case YYSYMBOL_f_larglist: /* f_larglist */
9920#line 2618 "parse.y"
9921 {
9922 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9923 rb_parser_printf(p, "NODE_SPECIAL");
9924 }
9925 else if (((*yyvaluep).node_args)) {
9926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9927 }
9928}
9929#line 9930 "parse.c"
9930 break;
9931
9932 case YYSYMBOL_do_block: /* do_block */
9933#line 2618 "parse.y"
9934 {
9935 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9936 rb_parser_printf(p, "NODE_SPECIAL");
9937 }
9938 else if (((*yyvaluep).node)) {
9939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9940 }
9941}
9942#line 9943 "parse.c"
9943 break;
9944
9945 case YYSYMBOL_block_call: /* block_call */
9946#line 2618 "parse.y"
9947 {
9948 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9949 rb_parser_printf(p, "NODE_SPECIAL");
9950 }
9951 else if (((*yyvaluep).node)) {
9952 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9953 }
9954}
9955#line 9956 "parse.c"
9956 break;
9957
9958 case YYSYMBOL_method_call: /* method_call */
9959#line 2618 "parse.y"
9960 {
9961 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9962 rb_parser_printf(p, "NODE_SPECIAL");
9963 }
9964 else if (((*yyvaluep).node)) {
9965 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9966 }
9967}
9968#line 9969 "parse.c"
9969 break;
9970
9971 case YYSYMBOL_brace_block: /* brace_block */
9972#line 2618 "parse.y"
9973 {
9974 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9975 rb_parser_printf(p, "NODE_SPECIAL");
9976 }
9977 else if (((*yyvaluep).node)) {
9978 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9979 }
9980}
9981#line 9982 "parse.c"
9982 break;
9983
9984 case YYSYMBOL_brace_body: /* brace_body */
9985#line 2618 "parse.y"
9986 {
9987 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9988 rb_parser_printf(p, "NODE_SPECIAL");
9989 }
9990 else if (((*yyvaluep).node)) {
9991 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9992 }
9993}
9994#line 9995 "parse.c"
9995 break;
9996
9997 case YYSYMBOL_do_body: /* do_body */
9998#line 2618 "parse.y"
9999 {
10000 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10001 rb_parser_printf(p, "NODE_SPECIAL");
10002 }
10003 else if (((*yyvaluep).node)) {
10004 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10005 }
10006}
10007#line 10008 "parse.c"
10008 break;
10009
10010 case YYSYMBOL_case_args: /* case_args */
10011#line 2618 "parse.y"
10012 {
10013 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10014 rb_parser_printf(p, "NODE_SPECIAL");
10015 }
10016 else if (((*yyvaluep).node)) {
10017 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10018 }
10019}
10020#line 10021 "parse.c"
10021 break;
10022
10023 case YYSYMBOL_case_body: /* case_body */
10024#line 2618 "parse.y"
10025 {
10026 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10027 rb_parser_printf(p, "NODE_SPECIAL");
10028 }
10029 else if (((*yyvaluep).node)) {
10030 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10031 }
10032}
10033#line 10034 "parse.c"
10034 break;
10035
10036 case YYSYMBOL_cases: /* cases */
10037#line 2618 "parse.y"
10038 {
10039 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10040 rb_parser_printf(p, "NODE_SPECIAL");
10041 }
10042 else if (((*yyvaluep).node)) {
10043 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10044 }
10045}
10046#line 10047 "parse.c"
10047 break;
10048
10049 case YYSYMBOL_p_case_body: /* p_case_body */
10050#line 2618 "parse.y"
10051 {
10052 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10053 rb_parser_printf(p, "NODE_SPECIAL");
10054 }
10055 else if (((*yyvaluep).node)) {
10056 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10057 }
10058}
10059#line 10060 "parse.c"
10060 break;
10061
10062 case YYSYMBOL_p_cases: /* p_cases */
10063#line 2618 "parse.y"
10064 {
10065 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10066 rb_parser_printf(p, "NODE_SPECIAL");
10067 }
10068 else if (((*yyvaluep).node)) {
10069 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10070 }
10071}
10072#line 10073 "parse.c"
10073 break;
10074
10075 case YYSYMBOL_p_top_expr: /* p_top_expr */
10076#line 2618 "parse.y"
10077 {
10078 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10079 rb_parser_printf(p, "NODE_SPECIAL");
10080 }
10081 else if (((*yyvaluep).node)) {
10082 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10083 }
10084}
10085#line 10086 "parse.c"
10086 break;
10087
10088 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10089#line 2618 "parse.y"
10090 {
10091 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10092 rb_parser_printf(p, "NODE_SPECIAL");
10093 }
10094 else if (((*yyvaluep).node)) {
10095 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10096 }
10097}
10098#line 10099 "parse.c"
10099 break;
10100
10101 case YYSYMBOL_p_expr: /* p_expr */
10102#line 2618 "parse.y"
10103 {
10104 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10105 rb_parser_printf(p, "NODE_SPECIAL");
10106 }
10107 else if (((*yyvaluep).node)) {
10108 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10109 }
10110}
10111#line 10112 "parse.c"
10112 break;
10113
10114 case YYSYMBOL_p_as: /* p_as */
10115#line 2618 "parse.y"
10116 {
10117 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10118 rb_parser_printf(p, "NODE_SPECIAL");
10119 }
10120 else if (((*yyvaluep).node)) {
10121 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10122 }
10123}
10124#line 10125 "parse.c"
10125 break;
10126
10127 case YYSYMBOL_p_alt: /* p_alt */
10128#line 2618 "parse.y"
10129 {
10130 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10131 rb_parser_printf(p, "NODE_SPECIAL");
10132 }
10133 else if (((*yyvaluep).node)) {
10134 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10135 }
10136}
10137#line 10138 "parse.c"
10138 break;
10139
10140 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10141#line 2618 "parse.y"
10142 {
10143 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10144 rb_parser_printf(p, "NODE_SPECIAL");
10145 }
10146 else if (((*yyvaluep).node)) {
10147 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10148 }
10149}
10150#line 10151 "parse.c"
10151 break;
10152
10153 case YYSYMBOL_p_args: /* p_args */
10154#line 2618 "parse.y"
10155 {
10156 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10157 rb_parser_printf(p, "NODE_SPECIAL");
10158 }
10159 else if (((*yyvaluep).node)) {
10160 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10161 }
10162}
10163#line 10164 "parse.c"
10164 break;
10165
10166 case YYSYMBOL_p_args_head: /* p_args_head */
10167#line 2618 "parse.y"
10168 {
10169 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10170 rb_parser_printf(p, "NODE_SPECIAL");
10171 }
10172 else if (((*yyvaluep).node)) {
10173 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10174 }
10175}
10176#line 10177 "parse.c"
10177 break;
10178
10179 case YYSYMBOL_p_args_tail: /* p_args_tail */
10180#line 2618 "parse.y"
10181 {
10182 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10183 rb_parser_printf(p, "NODE_SPECIAL");
10184 }
10185 else if (((*yyvaluep).node)) {
10186 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10187 }
10188}
10189#line 10190 "parse.c"
10190 break;
10191
10192 case YYSYMBOL_p_find: /* p_find */
10193#line 2618 "parse.y"
10194 {
10195 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10196 rb_parser_printf(p, "NODE_SPECIAL");
10197 }
10198 else if (((*yyvaluep).node)) {
10199 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10200 }
10201}
10202#line 10203 "parse.c"
10203 break;
10204
10205 case YYSYMBOL_p_rest: /* p_rest */
10206#line 2618 "parse.y"
10207 {
10208 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10209 rb_parser_printf(p, "NODE_SPECIAL");
10210 }
10211 else if (((*yyvaluep).node)) {
10212 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10213 }
10214}
10215#line 10216 "parse.c"
10216 break;
10217
10218 case YYSYMBOL_p_args_post: /* p_args_post */
10219#line 2618 "parse.y"
10220 {
10221 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10222 rb_parser_printf(p, "NODE_SPECIAL");
10223 }
10224 else if (((*yyvaluep).node)) {
10225 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10226 }
10227}
10228#line 10229 "parse.c"
10229 break;
10230
10231 case YYSYMBOL_p_arg: /* p_arg */
10232#line 2618 "parse.y"
10233 {
10234 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10235 rb_parser_printf(p, "NODE_SPECIAL");
10236 }
10237 else if (((*yyvaluep).node)) {
10238 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10239 }
10240}
10241#line 10242 "parse.c"
10242 break;
10243
10244 case YYSYMBOL_p_kwargs: /* p_kwargs */
10245#line 2618 "parse.y"
10246 {
10247 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10248 rb_parser_printf(p, "NODE_SPECIAL");
10249 }
10250 else if (((*yyvaluep).node)) {
10251 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10252 }
10253}
10254#line 10255 "parse.c"
10255 break;
10256
10257 case YYSYMBOL_p_kwarg: /* p_kwarg */
10258#line 2618 "parse.y"
10259 {
10260 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10261 rb_parser_printf(p, "NODE_SPECIAL");
10262 }
10263 else if (((*yyvaluep).node)) {
10264 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10265 }
10266}
10267#line 10268 "parse.c"
10268 break;
10269
10270 case YYSYMBOL_p_kw: /* p_kw */
10271#line 2618 "parse.y"
10272 {
10273 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10274 rb_parser_printf(p, "NODE_SPECIAL");
10275 }
10276 else if (((*yyvaluep).node)) {
10277 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10278 }
10279}
10280#line 10281 "parse.c"
10281 break;
10282
10283 case YYSYMBOL_p_kw_label: /* p_kw_label */
10284#line 2627 "parse.y"
10285 {
10286 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10287}
10288#line 10289 "parse.c"
10289 break;
10290
10291 case YYSYMBOL_p_kwrest: /* p_kwrest */
10292#line 2627 "parse.y"
10293 {
10294 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10295}
10296#line 10297 "parse.c"
10297 break;
10298
10299 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10300#line 2627 "parse.y"
10301 {
10302 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10303}
10304#line 10305 "parse.c"
10305 break;
10306
10307 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10308#line 2627 "parse.y"
10309 {
10310 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10311}
10312#line 10313 "parse.c"
10313 break;
10314
10315 case YYSYMBOL_p_value: /* p_value */
10316#line 2618 "parse.y"
10317 {
10318 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10319 rb_parser_printf(p, "NODE_SPECIAL");
10320 }
10321 else if (((*yyvaluep).node)) {
10322 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10323 }
10324}
10325#line 10326 "parse.c"
10326 break;
10327
10328 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10329#line 2618 "parse.y"
10330 {
10331 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10332 rb_parser_printf(p, "NODE_SPECIAL");
10333 }
10334 else if (((*yyvaluep).node)) {
10335 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10336 }
10337}
10338#line 10339 "parse.c"
10339 break;
10340
10341 case YYSYMBOL_p_primitive: /* p_primitive */
10342#line 2618 "parse.y"
10343 {
10344 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10345 rb_parser_printf(p, "NODE_SPECIAL");
10346 }
10347 else if (((*yyvaluep).node)) {
10348 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10349 }
10350}
10351#line 10352 "parse.c"
10352 break;
10353
10354 case YYSYMBOL_p_variable: /* p_variable */
10355#line 2618 "parse.y"
10356 {
10357 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10358 rb_parser_printf(p, "NODE_SPECIAL");
10359 }
10360 else if (((*yyvaluep).node)) {
10361 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10362 }
10363}
10364#line 10365 "parse.c"
10365 break;
10366
10367 case YYSYMBOL_p_var_ref: /* p_var_ref */
10368#line 2618 "parse.y"
10369 {
10370 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10371 rb_parser_printf(p, "NODE_SPECIAL");
10372 }
10373 else if (((*yyvaluep).node)) {
10374 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10375 }
10376}
10377#line 10378 "parse.c"
10378 break;
10379
10380 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10381#line 2618 "parse.y"
10382 {
10383 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10384 rb_parser_printf(p, "NODE_SPECIAL");
10385 }
10386 else if (((*yyvaluep).node)) {
10387 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10388 }
10389}
10390#line 10391 "parse.c"
10391 break;
10392
10393 case YYSYMBOL_p_const: /* p_const */
10394#line 2618 "parse.y"
10395 {
10396 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10397 rb_parser_printf(p, "NODE_SPECIAL");
10398 }
10399 else if (((*yyvaluep).node)) {
10400 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10401 }
10402}
10403#line 10404 "parse.c"
10404 break;
10405
10406 case YYSYMBOL_opt_rescue: /* opt_rescue */
10407#line 2618 "parse.y"
10408 {
10409 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10410 rb_parser_printf(p, "NODE_SPECIAL");
10411 }
10412 else if (((*yyvaluep).node)) {
10413 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10414 }
10415}
10416#line 10417 "parse.c"
10417 break;
10418
10419 case YYSYMBOL_exc_list: /* exc_list */
10420#line 2618 "parse.y"
10421 {
10422 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10423 rb_parser_printf(p, "NODE_SPECIAL");
10424 }
10425 else if (((*yyvaluep).node)) {
10426 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10427 }
10428}
10429#line 10430 "parse.c"
10430 break;
10431
10432 case YYSYMBOL_exc_var: /* exc_var */
10433#line 2618 "parse.y"
10434 {
10435 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10436 rb_parser_printf(p, "NODE_SPECIAL");
10437 }
10438 else if (((*yyvaluep).node)) {
10439 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10440 }
10441}
10442#line 10443 "parse.c"
10443 break;
10444
10445 case YYSYMBOL_opt_ensure: /* opt_ensure */
10446#line 2618 "parse.y"
10447 {
10448 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10449 rb_parser_printf(p, "NODE_SPECIAL");
10450 }
10451 else if (((*yyvaluep).node)) {
10452 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10453 }
10454}
10455#line 10456 "parse.c"
10456 break;
10457
10458 case YYSYMBOL_literal: /* literal */
10459#line 2618 "parse.y"
10460 {
10461 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10462 rb_parser_printf(p, "NODE_SPECIAL");
10463 }
10464 else if (((*yyvaluep).node)) {
10465 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10466 }
10467}
10468#line 10469 "parse.c"
10469 break;
10470
10471 case YYSYMBOL_strings: /* strings */
10472#line 2618 "parse.y"
10473 {
10474 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10475 rb_parser_printf(p, "NODE_SPECIAL");
10476 }
10477 else if (((*yyvaluep).node)) {
10478 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10479 }
10480}
10481#line 10482 "parse.c"
10482 break;
10483
10484 case YYSYMBOL_string: /* string */
10485#line 2618 "parse.y"
10486 {
10487 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10488 rb_parser_printf(p, "NODE_SPECIAL");
10489 }
10490 else if (((*yyvaluep).node)) {
10491 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10492 }
10493}
10494#line 10495 "parse.c"
10495 break;
10496
10497 case YYSYMBOL_string1: /* string1 */
10498#line 2618 "parse.y"
10499 {
10500 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10501 rb_parser_printf(p, "NODE_SPECIAL");
10502 }
10503 else if (((*yyvaluep).node)) {
10504 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10505 }
10506}
10507#line 10508 "parse.c"
10508 break;
10509
10510 case YYSYMBOL_xstring: /* xstring */
10511#line 2618 "parse.y"
10512 {
10513 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10514 rb_parser_printf(p, "NODE_SPECIAL");
10515 }
10516 else if (((*yyvaluep).node)) {
10517 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10518 }
10519}
10520#line 10521 "parse.c"
10521 break;
10522
10523 case YYSYMBOL_regexp: /* regexp */
10524#line 2618 "parse.y"
10525 {
10526 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10527 rb_parser_printf(p, "NODE_SPECIAL");
10528 }
10529 else if (((*yyvaluep).node)) {
10530 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10531 }
10532}
10533#line 10534 "parse.c"
10534 break;
10535
10536 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10537#line 2618 "parse.y"
10538 {
10539 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10540 rb_parser_printf(p, "NODE_SPECIAL");
10541 }
10542 else if (((*yyvaluep).node)) {
10543 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10544 }
10545}
10546#line 10547 "parse.c"
10547 break;
10548
10549 case YYSYMBOL_words: /* words */
10550#line 2618 "parse.y"
10551 {
10552 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10553 rb_parser_printf(p, "NODE_SPECIAL");
10554 }
10555 else if (((*yyvaluep).node)) {
10556 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10557 }
10558}
10559#line 10560 "parse.c"
10560 break;
10561
10562 case YYSYMBOL_word_list: /* word_list */
10563#line 2618 "parse.y"
10564 {
10565 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10566 rb_parser_printf(p, "NODE_SPECIAL");
10567 }
10568 else if (((*yyvaluep).node)) {
10569 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10570 }
10571}
10572#line 10573 "parse.c"
10573 break;
10574
10575 case YYSYMBOL_word: /* word */
10576#line 2618 "parse.y"
10577 {
10578 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10579 rb_parser_printf(p, "NODE_SPECIAL");
10580 }
10581 else if (((*yyvaluep).node)) {
10582 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10583 }
10584}
10585#line 10586 "parse.c"
10586 break;
10587
10588 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10589#line 2618 "parse.y"
10590 {
10591 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10592 rb_parser_printf(p, "NODE_SPECIAL");
10593 }
10594 else if (((*yyvaluep).node)) {
10595 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10596 }
10597}
10598#line 10599 "parse.c"
10599 break;
10600
10601 case YYSYMBOL_symbols: /* symbols */
10602#line 2618 "parse.y"
10603 {
10604 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10605 rb_parser_printf(p, "NODE_SPECIAL");
10606 }
10607 else if (((*yyvaluep).node)) {
10608 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10609 }
10610}
10611#line 10612 "parse.c"
10612 break;
10613
10614 case YYSYMBOL_symbol_list: /* symbol_list */
10615#line 2618 "parse.y"
10616 {
10617 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10618 rb_parser_printf(p, "NODE_SPECIAL");
10619 }
10620 else if (((*yyvaluep).node)) {
10621 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10622 }
10623}
10624#line 10625 "parse.c"
10625 break;
10626
10627 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10628#line 2618 "parse.y"
10629 {
10630 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10631 rb_parser_printf(p, "NODE_SPECIAL");
10632 }
10633 else if (((*yyvaluep).node)) {
10634 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10635 }
10636}
10637#line 10638 "parse.c"
10638 break;
10639
10640 case YYSYMBOL_qwords: /* qwords */
10641#line 2618 "parse.y"
10642 {
10643 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10644 rb_parser_printf(p, "NODE_SPECIAL");
10645 }
10646 else if (((*yyvaluep).node)) {
10647 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10648 }
10649}
10650#line 10651 "parse.c"
10651 break;
10652
10653 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10654#line 2618 "parse.y"
10655 {
10656 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10657 rb_parser_printf(p, "NODE_SPECIAL");
10658 }
10659 else if (((*yyvaluep).node)) {
10660 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10661 }
10662}
10663#line 10664 "parse.c"
10664 break;
10665
10666 case YYSYMBOL_qsymbols: /* qsymbols */
10667#line 2618 "parse.y"
10668 {
10669 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10670 rb_parser_printf(p, "NODE_SPECIAL");
10671 }
10672 else if (((*yyvaluep).node)) {
10673 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10674 }
10675}
10676#line 10677 "parse.c"
10677 break;
10678
10679 case YYSYMBOL_qword_list: /* qword_list */
10680#line 2618 "parse.y"
10681 {
10682 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10683 rb_parser_printf(p, "NODE_SPECIAL");
10684 }
10685 else if (((*yyvaluep).node)) {
10686 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10687 }
10688}
10689#line 10690 "parse.c"
10690 break;
10691
10692 case YYSYMBOL_qsym_list: /* qsym_list */
10693#line 2618 "parse.y"
10694 {
10695 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10696 rb_parser_printf(p, "NODE_SPECIAL");
10697 }
10698 else if (((*yyvaluep).node)) {
10699 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10700 }
10701}
10702#line 10703 "parse.c"
10703 break;
10704
10705 case YYSYMBOL_string_contents: /* string_contents */
10706#line 2618 "parse.y"
10707 {
10708 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10709 rb_parser_printf(p, "NODE_SPECIAL");
10710 }
10711 else if (((*yyvaluep).node)) {
10712 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10713 }
10714}
10715#line 10716 "parse.c"
10716 break;
10717
10718 case YYSYMBOL_xstring_contents: /* xstring_contents */
10719#line 2618 "parse.y"
10720 {
10721 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10722 rb_parser_printf(p, "NODE_SPECIAL");
10723 }
10724 else if (((*yyvaluep).node)) {
10725 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10726 }
10727}
10728#line 10729 "parse.c"
10729 break;
10730
10731 case YYSYMBOL_regexp_contents: /* regexp_contents */
10732#line 2618 "parse.y"
10733 {
10734 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10735 rb_parser_printf(p, "NODE_SPECIAL");
10736 }
10737 else if (((*yyvaluep).node)) {
10738 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10739 }
10740}
10741#line 10742 "parse.c"
10742 break;
10743
10744 case YYSYMBOL_string_content: /* string_content */
10745#line 2618 "parse.y"
10746 {
10747 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10748 rb_parser_printf(p, "NODE_SPECIAL");
10749 }
10750 else if (((*yyvaluep).node)) {
10751 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10752 }
10753}
10754#line 10755 "parse.c"
10755 break;
10756
10757 case YYSYMBOL_string_dvar: /* string_dvar */
10758#line 2618 "parse.y"
10759 {
10760 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10761 rb_parser_printf(p, "NODE_SPECIAL");
10762 }
10763 else if (((*yyvaluep).node)) {
10764 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10765 }
10766}
10767#line 10768 "parse.c"
10768 break;
10769
10770 case YYSYMBOL_symbol: /* symbol */
10771#line 2618 "parse.y"
10772 {
10773 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10774 rb_parser_printf(p, "NODE_SPECIAL");
10775 }
10776 else if (((*yyvaluep).node)) {
10777 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10778 }
10779}
10780#line 10781 "parse.c"
10781 break;
10782
10783 case YYSYMBOL_ssym: /* ssym */
10784#line 2618 "parse.y"
10785 {
10786 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10787 rb_parser_printf(p, "NODE_SPECIAL");
10788 }
10789 else if (((*yyvaluep).node)) {
10790 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10791 }
10792}
10793#line 10794 "parse.c"
10794 break;
10795
10796 case YYSYMBOL_sym: /* sym */
10797#line 2627 "parse.y"
10798 {
10799 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10800}
10801#line 10802 "parse.c"
10802 break;
10803
10804 case YYSYMBOL_dsym: /* dsym */
10805#line 2618 "parse.y"
10806 {
10807 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10808 rb_parser_printf(p, "NODE_SPECIAL");
10809 }
10810 else if (((*yyvaluep).node)) {
10811 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10812 }
10813}
10814#line 10815 "parse.c"
10815 break;
10816
10817 case YYSYMBOL_numeric: /* numeric */
10818#line 2618 "parse.y"
10819 {
10820 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10821 rb_parser_printf(p, "NODE_SPECIAL");
10822 }
10823 else if (((*yyvaluep).node)) {
10824 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10825 }
10826}
10827#line 10828 "parse.c"
10828 break;
10829
10830 case YYSYMBOL_simple_numeric: /* simple_numeric */
10831#line 2618 "parse.y"
10832 {
10833 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10834 rb_parser_printf(p, "NODE_SPECIAL");
10835 }
10836 else if (((*yyvaluep).node)) {
10837 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10838 }
10839}
10840#line 10841 "parse.c"
10841 break;
10842
10843 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10844#line 2627 "parse.y"
10845 {
10846 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10847}
10848#line 10849 "parse.c"
10849 break;
10850
10851 case YYSYMBOL_user_variable: /* user_variable */
10852#line 2627 "parse.y"
10853 {
10854 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10855}
10856#line 10857 "parse.c"
10857 break;
10858
10859 case YYSYMBOL_keyword_variable: /* keyword_variable */
10860#line 2627 "parse.y"
10861 {
10862 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10863}
10864#line 10865 "parse.c"
10865 break;
10866
10867 case YYSYMBOL_var_ref: /* var_ref */
10868#line 2618 "parse.y"
10869 {
10870 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10871 rb_parser_printf(p, "NODE_SPECIAL");
10872 }
10873 else if (((*yyvaluep).node)) {
10874 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10875 }
10876}
10877#line 10878 "parse.c"
10878 break;
10879
10880 case YYSYMBOL_var_lhs: /* var_lhs */
10881#line 2618 "parse.y"
10882 {
10883 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10884 rb_parser_printf(p, "NODE_SPECIAL");
10885 }
10886 else if (((*yyvaluep).node)) {
10887 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10888 }
10889}
10890#line 10891 "parse.c"
10891 break;
10892
10893 case YYSYMBOL_backref: /* backref */
10894#line 2618 "parse.y"
10895 {
10896 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10897 rb_parser_printf(p, "NODE_SPECIAL");
10898 }
10899 else if (((*yyvaluep).node)) {
10900 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10901 }
10902}
10903#line 10904 "parse.c"
10904 break;
10905
10906 case YYSYMBOL_superclass: /* superclass */
10907#line 2618 "parse.y"
10908 {
10909 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10910 rb_parser_printf(p, "NODE_SPECIAL");
10911 }
10912 else if (((*yyvaluep).node)) {
10913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10914 }
10915}
10916#line 10917 "parse.c"
10917 break;
10918
10919 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
10920#line 2618 "parse.y"
10921 {
10922 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10923 rb_parser_printf(p, "NODE_SPECIAL");
10924 }
10925 else if (((*yyvaluep).node_args)) {
10926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10927 }
10928}
10929#line 10930 "parse.c"
10930 break;
10931
10932 case YYSYMBOL_f_paren_args: /* f_paren_args */
10933#line 2618 "parse.y"
10934 {
10935 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10936 rb_parser_printf(p, "NODE_SPECIAL");
10937 }
10938 else if (((*yyvaluep).node_args)) {
10939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10940 }
10941}
10942#line 10943 "parse.c"
10943 break;
10944
10945 case YYSYMBOL_f_arglist: /* f_arglist */
10946#line 2618 "parse.y"
10947 {
10948 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10949 rb_parser_printf(p, "NODE_SPECIAL");
10950 }
10951 else if (((*yyvaluep).node_args)) {
10952 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10953 }
10954}
10955#line 10956 "parse.c"
10956 break;
10957
10958 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
10959#line 2618 "parse.y"
10960 {
10961 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10962 rb_parser_printf(p, "NODE_SPECIAL");
10963 }
10964 else if (((*yyvaluep).node_kw_arg)) {
10965 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10966 }
10967}
10968#line 10969 "parse.c"
10969 break;
10970
10971 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
10972#line 2618 "parse.y"
10973 {
10974 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10975 rb_parser_printf(p, "NODE_SPECIAL");
10976 }
10977 else if (((*yyvaluep).node_kw_arg)) {
10978 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10979 }
10980}
10981#line 10982 "parse.c"
10982 break;
10983
10984 case YYSYMBOL_args_tail_basic_arg_value: /* args_tail_basic_arg_value */
10985#line 2618 "parse.y"
10986 {
10987 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10988 rb_parser_printf(p, "NODE_SPECIAL");
10989 }
10990 else if (((*yyvaluep).node_args)) {
10991 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10992 }
10993}
10994#line 10995 "parse.c"
10995 break;
10996
10997 case YYSYMBOL_args_tail: /* args_tail */
10998#line 2618 "parse.y"
10999 {
11000 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11001 rb_parser_printf(p, "NODE_SPECIAL");
11002 }
11003 else if (((*yyvaluep).node_args)) {
11004 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11005 }
11006}
11007#line 11008 "parse.c"
11008 break;
11009
11010 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11011#line 2618 "parse.y"
11012 {
11013 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11014 rb_parser_printf(p, "NODE_SPECIAL");
11015 }
11016 else if (((*yyvaluep).node_opt_arg)) {
11017 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11018 }
11019}
11020#line 11021 "parse.c"
11021 break;
11022
11023 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11024#line 2618 "parse.y"
11025 {
11026 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11027 rb_parser_printf(p, "NODE_SPECIAL");
11028 }
11029 else if (((*yyvaluep).node_opt_arg)) {
11030 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11031 }
11032}
11033#line 11034 "parse.c"
11034 break;
11035
11036 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
11037#line 2618 "parse.y"
11038 {
11039 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11040 rb_parser_printf(p, "NODE_SPECIAL");
11041 }
11042 else if (((*yyvaluep).node_args)) {
11043 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11044 }
11045}
11046#line 11047 "parse.c"
11047 break;
11048
11049 case YYSYMBOL_f_args: /* f_args */
11050#line 2618 "parse.y"
11051 {
11052 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11053 rb_parser_printf(p, "NODE_SPECIAL");
11054 }
11055 else if (((*yyvaluep).node_args)) {
11056 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11057 }
11058}
11059#line 11060 "parse.c"
11060 break;
11061
11062 case YYSYMBOL_args_forward: /* args_forward */
11063#line 2627 "parse.y"
11064 {
11065 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11066}
11067#line 11068 "parse.c"
11068 break;
11069
11070 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11071#line 2627 "parse.y"
11072 {
11073 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11074}
11075#line 11076 "parse.c"
11076 break;
11077
11078 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11079#line 2627 "parse.y"
11080 {
11081 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11082}
11083#line 11084 "parse.c"
11084 break;
11085
11086 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11087#line 2627 "parse.y"
11088 {
11089 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11090}
11091#line 11092 "parse.c"
11092 break;
11093
11094 case YYSYMBOL_f_arg_item: /* f_arg_item */
11095#line 2618 "parse.y"
11096 {
11097 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11098 rb_parser_printf(p, "NODE_SPECIAL");
11099 }
11100 else if (((*yyvaluep).node_args_aux)) {
11101 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11102 }
11103}
11104#line 11105 "parse.c"
11105 break;
11106
11107 case YYSYMBOL_f_arg: /* f_arg */
11108#line 2618 "parse.y"
11109 {
11110 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11111 rb_parser_printf(p, "NODE_SPECIAL");
11112 }
11113 else if (((*yyvaluep).node_args_aux)) {
11114 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11115 }
11116}
11117#line 11118 "parse.c"
11118 break;
11119
11120 case YYSYMBOL_f_label: /* f_label */
11121#line 2627 "parse.y"
11122 {
11123 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11124}
11125#line 11126 "parse.c"
11126 break;
11127
11128 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11129#line 2627 "parse.y"
11130 {
11131 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11132}
11133#line 11134 "parse.c"
11134 break;
11135
11136 case YYSYMBOL_f_kwrest: /* f_kwrest */
11137#line 2627 "parse.y"
11138 {
11139 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11140}
11141#line 11142 "parse.c"
11142 break;
11143
11144 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11145#line 2627 "parse.y"
11146 {
11147 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11148}
11149#line 11150 "parse.c"
11150 break;
11151
11152 case YYSYMBOL_f_block_arg: /* f_block_arg */
11153#line 2627 "parse.y"
11154 {
11155 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11156}
11157#line 11158 "parse.c"
11158 break;
11159
11160 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
11161#line 2627 "parse.y"
11162 {
11163 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11164}
11165#line 11166 "parse.c"
11166 break;
11167
11168 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11169#line 2618 "parse.y"
11170 {
11171 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11172 rb_parser_printf(p, "NODE_SPECIAL");
11173 }
11174 else if (((*yyvaluep).node)) {
11175 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11176 }
11177}
11178#line 11179 "parse.c"
11179 break;
11180
11181 case YYSYMBOL_singleton: /* singleton */
11182#line 2618 "parse.y"
11183 {
11184 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11185 rb_parser_printf(p, "NODE_SPECIAL");
11186 }
11187 else if (((*yyvaluep).node)) {
11188 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11189 }
11190}
11191#line 11192 "parse.c"
11192 break;
11193
11194 case YYSYMBOL_singleton_expr: /* singleton_expr */
11195#line 2618 "parse.y"
11196 {
11197 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11198 rb_parser_printf(p, "NODE_SPECIAL");
11199 }
11200 else if (((*yyvaluep).node)) {
11201 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11202 }
11203}
11204#line 11205 "parse.c"
11205 break;
11206
11207 case YYSYMBOL_assoc_list: /* assoc_list */
11208#line 2618 "parse.y"
11209 {
11210 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11211 rb_parser_printf(p, "NODE_SPECIAL");
11212 }
11213 else if (((*yyvaluep).node)) {
11214 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11215 }
11216}
11217#line 11218 "parse.c"
11218 break;
11219
11220 case YYSYMBOL_assocs: /* assocs */
11221#line 2618 "parse.y"
11222 {
11223 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11224 rb_parser_printf(p, "NODE_SPECIAL");
11225 }
11226 else if (((*yyvaluep).node)) {
11227 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11228 }
11229}
11230#line 11231 "parse.c"
11231 break;
11232
11233 case YYSYMBOL_assoc: /* assoc */
11234#line 2618 "parse.y"
11235 {
11236 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11237 rb_parser_printf(p, "NODE_SPECIAL");
11238 }
11239 else if (((*yyvaluep).node)) {
11240 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11241 }
11242}
11243#line 11244 "parse.c"
11244 break;
11245
11246 case YYSYMBOL_operation2: /* operation2 */
11247#line 2627 "parse.y"
11248 {
11249 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11250}
11251#line 11252 "parse.c"
11252 break;
11253
11254 case YYSYMBOL_operation3: /* operation3 */
11255#line 2627 "parse.y"
11256 {
11257 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11258}
11259#line 11260 "parse.c"
11260 break;
11261
11262 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11263#line 2627 "parse.y"
11264 {
11265 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11266}
11267#line 11268 "parse.c"
11268 break;
11269
11270 case YYSYMBOL_call_op: /* call_op */
11271#line 2627 "parse.y"
11272 {
11273 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11274}
11275#line 11276 "parse.c"
11276 break;
11277
11278 case YYSYMBOL_call_op2: /* call_op2 */
11279#line 2627 "parse.y"
11280 {
11281 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11282}
11283#line 11284 "parse.c"
11284 break;
11285
11286 case YYSYMBOL_none: /* none */
11287#line 2618 "parse.y"
11288 {
11289 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11290 rb_parser_printf(p, "NODE_SPECIAL");
11291 }
11292 else if (((*yyvaluep).node)) {
11293 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11294 }
11295}
11296#line 11297 "parse.c"
11297 break;
11298
11299 default:
11300 break;
11301 }
11302 YY_IGNORE_MAYBE_UNINITIALIZED_END
11303}
11304
11305
11306/*---------------------------.
11307| Print this symbol on YYO. |
11308`---------------------------*/
11309
11310static void
11311yy_symbol_print (FILE *yyo,
11312 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11313{
11314 YYFPRINTF (yyo, "%s %s (",
11315 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11316
11317 YYLOCATION_PRINT (yyo, yylocationp, p);
11318 YYFPRINTF (yyo, ": ");
11319 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11320 YYFPRINTF (yyo, ")");
11321}
11322
11323/*------------------------------------------------------------------.
11324| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11325| TOP (included). |
11326`------------------------------------------------------------------*/
11327
11328static void
11329yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11330{
11331 YYFPRINTF (stderr, "Stack now");
11332 for (; yybottom <= yytop; yybottom++)
11333 {
11334 int yybot = *yybottom;
11335 YYFPRINTF (stderr, " %d", yybot);
11336 }
11337 YYFPRINTF (stderr, "\n");
11338}
11339
11340# define YY_STACK_PRINT(Bottom, Top, p) \
11341do { \
11342 if (yydebug) \
11343 yy_stack_print ((Bottom), (Top), p); \
11344} while (0)
11345
11346
11347/*------------------------------------------------.
11348| Report that the YYRULE is going to be reduced. |
11349`------------------------------------------------*/
11350
11351static void
11352yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11353 int yyrule, struct parser_params *p)
11354{
11355 int yylno = yyrline[yyrule];
11356 int yynrhs = yyr2[yyrule];
11357 int yyi;
11358 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11359 yyrule - 1, yylno);
11360 /* The symbols being reduced. */
11361 for (yyi = 0; yyi < yynrhs; yyi++)
11362 {
11363 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11364 yy_symbol_print (stderr,
11365 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11366 &yyvsp[(yyi + 1) - (yynrhs)],
11367 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11368 YYFPRINTF (stderr, "\n");
11369 }
11370}
11371
11372# define YY_REDUCE_PRINT(Rule, p) \
11373do { \
11374 if (yydebug) \
11375 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11376} while (0)
11377
11378/* Nonzero means print parse trace. It is left uninitialized so that
11379 multiple parsers can coexist. */
11380#ifndef yydebug
11381int yydebug;
11382#endif
11383#else /* !YYDEBUG */
11384# define YYDPRINTF(Args) ((void) 0)
11385# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11386# define YY_STACK_PRINT(Bottom, Top, p)
11387# define YY_REDUCE_PRINT(Rule, p)
11388#endif /* !YYDEBUG */
11389
11390
11391/* YYINITDEPTH -- initial size of the parser's stacks. */
11392#ifndef YYINITDEPTH
11393# define YYINITDEPTH 200
11394#endif
11395
11396/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11397 if the built-in stack extension method is used).
11398
11399 Do not make this value too large; the results are undefined if
11400 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11401 evaluated with infinite-precision integer arithmetic. */
11402
11403#ifndef YYMAXDEPTH
11404# define YYMAXDEPTH 10000
11405#endif
11406
11407
11408/* Context of a parse error. */
11409typedef struct
11410{
11411 yy_state_t *yyssp;
11412 yysymbol_kind_t yytoken;
11413 YYLTYPE *yylloc;
11414} yypcontext_t;
11415
11416/* Put in YYARG at most YYARGN of the expected tokens given the
11417 current YYCTX, and return the number of tokens stored in YYARG. If
11418 YYARG is null, return the number of expected tokens (guaranteed to
11419 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11420 Return 0 if there are more than YYARGN expected tokens, yet fill
11421 YYARG up to YYARGN. */
11422static int
11423yypcontext_expected_tokens (const yypcontext_t *yyctx,
11424 yysymbol_kind_t yyarg[], int yyargn)
11425{
11426 /* Actual size of YYARG. */
11427 int yycount = 0;
11428 int yyn = yypact[+*yyctx->yyssp];
11429 if (!yypact_value_is_default (yyn))
11430 {
11431 /* Start YYX at -YYN if negative to avoid negative indexes in
11432 YYCHECK. In other words, skip the first -YYN actions for
11433 this state because they are default actions. */
11434 int yyxbegin = yyn < 0 ? -yyn : 0;
11435 /* Stay within bounds of both yycheck and yytname. */
11436 int yychecklim = YYLAST - yyn + 1;
11437 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11438 int yyx;
11439 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11440 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11441 && !yytable_value_is_error (yytable[yyx + yyn]))
11442 {
11443 if (!yyarg)
11444 ++yycount;
11445 else if (yycount == yyargn)
11446 return 0;
11447 else
11448 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11449 }
11450 }
11451 if (yyarg && yycount == 0 && 0 < yyargn)
11452 yyarg[0] = YYSYMBOL_YYEMPTY;
11453 return yycount;
11454}
11455
11456
11457
11458
11459#ifndef yystrlen
11460# if defined __GLIBC__ && defined _STRING_H
11461# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11462# else
11463/* Return the length of YYSTR. */
11464static YYPTRDIFF_T
11465yystrlen (const char *yystr)
11466{
11467 YYPTRDIFF_T yylen;
11468 for (yylen = 0; yystr[yylen]; yylen++)
11469 continue;
11470 return yylen;
11471}
11472# endif
11473#endif
11474
11475#ifndef yystpcpy
11476# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11477# define yystpcpy stpcpy
11478# else
11479/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11480 YYDEST. */
11481static char *
11482yystpcpy (char *yydest, const char *yysrc)
11483{
11484 char *yyd = yydest;
11485 const char *yys = yysrc;
11486
11487 while ((*yyd++ = *yys++) != '\0')
11488 continue;
11489
11490 return yyd - 1;
11491}
11492# endif
11493#endif
11494
11495#ifndef yytnamerr
11496/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11497 quotes and backslashes, so that it's suitable for yyerror. The
11498 heuristic is that double-quoting is unnecessary unless the string
11499 contains an apostrophe, a comma, or backslash (other than
11500 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11501 null, do not copy; instead, return the length of what the result
11502 would have been. */
11503static YYPTRDIFF_T
11504yytnamerr (char *yyres, const char *yystr)
11505{
11506 if (*yystr == '"')
11507 {
11508 YYPTRDIFF_T yyn = 0;
11509 char const *yyp = yystr;
11510 for (;;)
11511 switch (*++yyp)
11512 {
11513 case '\'':
11514 case ',':
11515 goto do_not_strip_quotes;
11516
11517 case '\\':
11518 if (*++yyp != '\\')
11519 goto do_not_strip_quotes;
11520 else
11521 goto append;
11522
11523 append:
11524 default:
11525 if (yyres)
11526 yyres[yyn] = *yyp;
11527 yyn++;
11528 break;
11529
11530 case '"':
11531 if (yyres)
11532 yyres[yyn] = '\0';
11533 return yyn;
11534 }
11535 do_not_strip_quotes: ;
11536 }
11537
11538 if (yyres)
11539 return yystpcpy (yyres, yystr) - yyres;
11540 else
11541 return yystrlen (yystr);
11542}
11543#endif
11544
11545
11546static int
11547yy_syntax_error_arguments (const yypcontext_t *yyctx,
11548 yysymbol_kind_t yyarg[], int yyargn)
11549{
11550 /* Actual size of YYARG. */
11551 int yycount = 0;
11552 /* There are many possibilities here to consider:
11553 - If this state is a consistent state with a default action, then
11554 the only way this function was invoked is if the default action
11555 is an error action. In that case, don't check for expected
11556 tokens because there are none.
11557 - The only way there can be no lookahead present (in yychar) is if
11558 this state is a consistent state with a default action. Thus,
11559 detecting the absence of a lookahead is sufficient to determine
11560 that there is no unexpected or expected token to report. In that
11561 case, just report a simple "syntax error".
11562 - Don't assume there isn't a lookahead just because this state is a
11563 consistent state with a default action. There might have been a
11564 previous inconsistent state, consistent state with a non-default
11565 action, or user semantic action that manipulated yychar.
11566 - Of course, the expected token list depends on states to have
11567 correct lookahead information, and it depends on the parser not
11568 to perform extra reductions after fetching a lookahead from the
11569 scanner and before detecting a syntax error. Thus, state merging
11570 (from LALR or IELR) and default reductions corrupt the expected
11571 token list. However, the list is correct for canonical LR with
11572 one exception: it will still contain any token that will not be
11573 accepted due to an error action in a later state.
11574 */
11575 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11576 {
11577 int yyn;
11578 if (yyarg)
11579 yyarg[yycount] = yyctx->yytoken;
11580 ++yycount;
11581 yyn = yypcontext_expected_tokens (yyctx,
11582 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11583 if (yyn == YYENOMEM)
11584 return YYENOMEM;
11585 else
11586 yycount += yyn;
11587 }
11588 return yycount;
11589}
11590
11591/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11592 about the unexpected token YYTOKEN for the state stack whose top is
11593 YYSSP.
11594
11595 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11596 not large enough to hold the message. In that case, also set
11597 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11598 required number of bytes is too large to store. */
11599static int
11600yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11601 const yypcontext_t *yyctx, struct parser_params *p)
11602{
11603 enum { YYARGS_MAX = 5 };
11604 /* Internationalized format string. */
11605 const char *yyformat = YY_NULLPTR;
11606 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11607 one per "expected"). */
11608 yysymbol_kind_t yyarg[YYARGS_MAX];
11609 /* Cumulated lengths of YYARG. */
11610 YYPTRDIFF_T yysize = 0;
11611
11612 /* Actual size of YYARG. */
11613 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11614 if (yycount == YYENOMEM)
11615 return YYENOMEM;
11616
11617 switch (yycount)
11618 {
11619#define YYCASE_(N, S) \
11620 case N: \
11621 yyformat = S; \
11622 break
11623 default: /* Avoid compiler warnings. */
11624 YYCASE_(0, YY_("syntax error"));
11625 YYCASE_(1, YY_("syntax error, unexpected %s"));
11626 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11627 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11628 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11629 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11630#undef YYCASE_
11631 }
11632
11633 /* Compute error message size. Don't count the "%s"s, but reserve
11634 room for the terminator. */
11635 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11636 {
11637 int yyi;
11638 for (yyi = 0; yyi < yycount; ++yyi)
11639 {
11640 YYPTRDIFF_T yysize1
11641 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11642 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11643 yysize = yysize1;
11644 else
11645 return YYENOMEM;
11646 }
11647 }
11648
11649 if (*yymsg_alloc < yysize)
11650 {
11651 *yymsg_alloc = 2 * yysize;
11652 if (! (yysize <= *yymsg_alloc
11653 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11654 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11655 return -1;
11656 }
11657
11658 /* Avoid sprintf, as that infringes on the user's name space.
11659 Don't have undefined behavior even if the translation
11660 produced a string with the wrong number of "%s"s. */
11661 {
11662 char *yyp = *yymsg;
11663 int yyi = 0;
11664 while ((*yyp = *yyformat) != '\0')
11665 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11666 {
11667 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11668 yyformat += 2;
11669 }
11670 else
11671 {
11672 ++yyp;
11673 ++yyformat;
11674 }
11675 }
11676 return 0;
11677}
11678
11679
11680/*-----------------------------------------------.
11681| Release the memory associated to this symbol. |
11682`-----------------------------------------------*/
11683
11684static void
11685yydestruct (const char *yymsg,
11686 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11687{
11688 YY_USE (yyvaluep);
11689 YY_USE (yylocationp);
11690 YY_USE (p);
11691 if (!yymsg)
11692 yymsg = "Deleting";
11693 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11694
11695 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11696 switch (yykind)
11697 {
11698 case YYSYMBOL_258_16: /* @16 */
11699#line 2655 "parse.y"
11700 {
11701 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11702}
11703#line 11704 "parse.c"
11704 break;
11705
11706 case YYSYMBOL_259_17: /* @17 */
11707#line 2655 "parse.y"
11708 {
11709 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11710}
11711#line 11712 "parse.c"
11712 break;
11713
11714 default:
11715 break;
11716 }
11717 YY_IGNORE_MAYBE_UNINITIALIZED_END
11718}
11719
11720
11721
11722
11723
11724
11725/*----------.
11726| yyparse. |
11727`----------*/
11728
11729int
11730yyparse (struct parser_params *p)
11731{
11732/* Lookahead token kind. */
11733int yychar;
11734
11735
11736/* The semantic value of the lookahead symbol. */
11737/* Default value used for initialization, for pacifying older GCCs
11738 or non-GCC compilers. */
11739#ifdef __cplusplus
11740static const YYSTYPE yyval_default = {};
11741(void) yyval_default;
11742#else
11743YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11744#endif
11745YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11746
11747/* Location data for the lookahead symbol. */
11748static const YYLTYPE yyloc_default
11749# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11750 = { 1, 1, 1, 1 }
11751# endif
11752;
11753YYLTYPE yylloc = yyloc_default;
11754
11755 /* Number of syntax errors so far. */
11756 int yynerrs = 0;
11757 YY_USE (yynerrs); /* Silence compiler warning. */
11758
11759 yy_state_fast_t yystate = 0;
11760 /* Number of tokens to shift before error messages enabled. */
11761 int yyerrstatus = 0;
11762
11763 /* Refer to the stacks through separate pointers, to allow yyoverflow
11764 to reallocate them elsewhere. */
11765
11766 /* Their size. */
11767 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11768
11769 /* The state stack: array, bottom, top. */
11770 yy_state_t yyssa[YYINITDEPTH];
11771 yy_state_t *yyss = yyssa;
11772 yy_state_t *yyssp = yyss;
11773
11774 /* The semantic value stack: array, bottom, top. */
11775 YYSTYPE yyvsa[YYINITDEPTH];
11776 YYSTYPE *yyvs = yyvsa;
11777 YYSTYPE *yyvsp = yyvs;
11778
11779 /* The location stack: array, bottom, top. */
11780 YYLTYPE yylsa[YYINITDEPTH];
11781 YYLTYPE *yyls = yylsa;
11782 YYLTYPE *yylsp = yyls;
11783
11784 int yyn;
11785 /* The return value of yyparse. */
11786 int yyresult;
11787 /* Lookahead symbol kind. */
11788 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11789 /* The variables used to return semantic value and location from the
11790 action routines. */
11791 YYSTYPE yyval;
11792 YYLTYPE yyloc;
11793
11794 /* The locations where the error started and ended. */
11795 YYLTYPE yyerror_range[3];
11796
11797 /* Buffer for error messages, and its allocated size. */
11798 char yymsgbuf[128];
11799 char *yymsg = yymsgbuf;
11800 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11801
11802#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11803
11804 /* The number of symbols on the RHS of the reduced rule.
11805 Keep to zero when no symbol should be popped. */
11806 int yylen = 0;
11807
11808 YYDPRINTF ((stderr, "Starting parse\n"));
11809
11810 yychar = YYEMPTY; /* Cause a token to be read. */
11811
11812
11813 /* User initialization code. */
11814#line 2662 "parse.y"
11815 {
11816 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11817}
11818
11819#line 11820 "parse.c"
11820
11821 yylsp[0] = yylloc;
11822 goto yysetstate;
11823
11824
11825/*------------------------------------------------------------.
11826| yynewstate -- push a new state, which is found in yystate. |
11827`------------------------------------------------------------*/
11828yynewstate:
11829 /* In all cases, when you get here, the value and location stacks
11830 have just been pushed. So pushing a state here evens the stacks. */
11831 yyssp++;
11832
11833
11834/*--------------------------------------------------------------------.
11835| yysetstate -- set current state (the top of the stack) to yystate. |
11836`--------------------------------------------------------------------*/
11837yysetstate:
11838 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11839 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11840 YY_IGNORE_USELESS_CAST_BEGIN
11841 *yyssp = YY_CAST (yy_state_t, yystate);
11842 YY_IGNORE_USELESS_CAST_END
11843 YY_STACK_PRINT (yyss, yyssp, p);
11844
11845 if (yyss + yystacksize - 1 <= yyssp)
11846#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11847 YYNOMEM;
11848#else
11849 {
11850 /* Get the current used size of the three stacks, in elements. */
11851 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11852
11853# if defined yyoverflow
11854 {
11855 /* Give user a chance to reallocate the stack. Use copies of
11856 these so that the &'s don't force the real ones into
11857 memory. */
11858 yy_state_t *yyss1 = yyss;
11859 YYSTYPE *yyvs1 = yyvs;
11860 YYLTYPE *yyls1 = yyls;
11861
11862 /* Each stack pointer address is followed by the size of the
11863 data in use in that stack, in bytes. This used to be a
11864 conditional around just the two extra args, but that might
11865 be undefined if yyoverflow is a macro. */
11866 yyoverflow (YY_("memory exhausted"),
11867 &yyss1, yysize * YYSIZEOF (*yyssp),
11868 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11869 &yyls1, yysize * YYSIZEOF (*yylsp),
11870 &yystacksize);
11871 yyss = yyss1;
11872 yyvs = yyvs1;
11873 yyls = yyls1;
11874 }
11875# else /* defined YYSTACK_RELOCATE */
11876 /* Extend the stack our own way. */
11877 if (YYMAXDEPTH <= yystacksize)
11878 YYNOMEM;
11879 yystacksize *= 2;
11880 if (YYMAXDEPTH < yystacksize)
11881 yystacksize = YYMAXDEPTH;
11882
11883 {
11884 yy_state_t *yyss1 = yyss;
11885 union yyalloc *yyptr =
11886 YY_CAST (union yyalloc *,
11887 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11888 if (! yyptr)
11889 YYNOMEM;
11890 YYSTACK_RELOCATE (yyss_alloc, yyss);
11891 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11892 YYSTACK_RELOCATE (yyls_alloc, yyls);
11893# undef YYSTACK_RELOCATE
11894 if (yyss1 != yyssa)
11895 YYSTACK_FREE (yyss1);
11896 }
11897# endif
11898
11899 yyssp = yyss + yysize - 1;
11900 yyvsp = yyvs + yysize - 1;
11901 yylsp = yyls + yysize - 1;
11902
11903 YY_IGNORE_USELESS_CAST_BEGIN
11904 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11905 YY_CAST (long, yystacksize)));
11906 YY_IGNORE_USELESS_CAST_END
11907
11908 if (yyss + yystacksize - 1 <= yyssp)
11909 YYABORT;
11910 }
11911#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11912
11913
11914 if (yystate == YYFINAL)
11915 YYACCEPT;
11916
11917 goto yybackup;
11918
11919
11920/*-----------.
11921| yybackup. |
11922`-----------*/
11923yybackup:
11924 /* Do appropriate processing given the current state. Read a
11925 lookahead token if we need one and don't already have one. */
11926
11927 /* First try to decide what to do without reference to lookahead token. */
11928 yyn = yypact[yystate];
11929 if (yypact_value_is_default (yyn))
11930 goto yydefault;
11931
11932 /* Not known => get a lookahead token if don't already have one. */
11933
11934 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11935 if (yychar == YYEMPTY)
11936 {
11937 YYDPRINTF ((stderr, "Reading a token\n"));
11938 yychar = yylex (&yylval, &yylloc, p);
11939 }
11940
11941 if (yychar <= END_OF_INPUT)
11942 {
11943 yychar = END_OF_INPUT;
11944 yytoken = YYSYMBOL_YYEOF;
11945 YYDPRINTF ((stderr, "Now at end of input.\n"));
11946 }
11947 else if (yychar == YYerror)
11948 {
11949 /* The scanner already issued an error message, process directly
11950 to error recovery. But do not keep the error token as
11951 lookahead, it is too special and may lead us to an endless
11952 loop in error recovery. */
11953 yychar = YYUNDEF;
11954 yytoken = YYSYMBOL_YYerror;
11955 yyerror_range[1] = yylloc;
11956 goto yyerrlab1;
11957 }
11958 else
11959 {
11960 yytoken = YYTRANSLATE (yychar);
11961 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11962 }
11963
11964 /* If the proper action on seeing token YYTOKEN is to reduce or to
11965 detect an error, take that action. */
11966 yyn += yytoken;
11967 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11968 goto yydefault;
11969 yyn = yytable[yyn];
11970 if (yyn <= 0)
11971 {
11972 if (yytable_value_is_error (yyn))
11973 goto yyerrlab;
11974 yyn = -yyn;
11975 goto yyreduce;
11976 }
11977
11978 /* Count tokens shifted since error; after three, turn off error
11979 status. */
11980 if (yyerrstatus)
11981 yyerrstatus--;
11982
11983 /* Shift the lookahead token. */
11984 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11985 yystate = yyn;
11986 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11987 *++yyvsp = yylval;
11988 YY_IGNORE_MAYBE_UNINITIALIZED_END
11989 *++yylsp = yylloc;
11990 /* %after-shift code. */
11991#line 2665 "parse.y"
11992 {after_shift(p);}
11993#line 11994 "parse.c"
11994
11995
11996 /* Discard the shifted token. */
11997 yychar = YYEMPTY;
11998 goto yynewstate;
11999
12000
12001/*-----------------------------------------------------------.
12002| yydefault -- do the default action for the current state. |
12003`-----------------------------------------------------------*/
12004yydefault:
12005 yyn = yydefact[yystate];
12006 if (yyn == 0)
12007 goto yyerrlab;
12008 goto yyreduce;
12009
12010
12011/*-----------------------------.
12012| yyreduce -- do a reduction. |
12013`-----------------------------*/
12014yyreduce:
12015 /* yyn is the number of a rule to reduce with. */
12016 yylen = yyr2[yyn];
12017
12018 /* If YYLEN is nonzero, implement the default value of the action:
12019 '$$ = $1'.
12020
12021 Otherwise, the following line sets YYVAL to garbage.
12022 This behavior is undocumented and Bison
12023 users should not rely upon it. Assigning to YYVAL
12024 unconditionally makes the parser a bit smaller, and it avoids a
12025 GCC warning that YYVAL may be used uninitialized. */
12026 yyval = yyvsp[1-yylen];
12027 /* %before-reduce function. */
12028#line 2666 "parse.y"
12029 {before_reduce(yylen, p);}
12030#line 12031 "parse.c"
12031
12032
12033 /* Default location. */
12034 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12035 yyerror_range[1] = yyloc;
12036 YY_REDUCE_PRINT (yyn, p);
12037 switch (yyn)
12038 {
12039 case 2: /* $@1: %empty */
12040#line 3161 "parse.y"
12041 {
12042 SET_LEX_STATE(EXPR_BEG);
12043 local_push(p, ifndef_ripper(1)+0);
12044 /* jumps are possible in the top-level loop. */
12045 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12046 }
12047#line 12048 "parse.c"
12048 break;
12049
12050 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12051#line 2976 "parse.y"
12052 {
12053 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12054 }
12055#line 12056 "parse.c"
12056 break;
12057
12058 case 6: /* program: $@1 compstmt_top_stmts */
12059#line 3168 "parse.y"
12060 {
12061 if ((yyvsp[0].node) && !compile_for_eval) {
12062 NODE *node = (yyvsp[0].node);
12063 /* last expression should not be void */
12064 if (nd_type_p(node, NODE_BLOCK)) {
12065 while (RNODE_BLOCK(node)->nd_next) {
12066 node = RNODE_BLOCK(node)->nd_next;
12067 }
12068 node = RNODE_BLOCK(node)->nd_head;
12069 }
12070 node = remove_begin(node);
12071 void_expr(p, node);
12072 }
12073 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12074 /*% ripper[final]: program!($:2) %*/
12075 local_pop(p);
12076 }
12077#line 12078 "parse.c"
12078 break;
12079
12080 case 7: /* top_stmts: none */
12081#line 3188 "parse.y"
12082 {
12083 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12084 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12085 }
12086#line 12087 "parse.c"
12087 break;
12088
12089 case 8: /* top_stmts: top_stmt */
12090#line 3193 "parse.y"
12091 {
12092 (yyval.node) = newline_node((yyvsp[0].node));
12093 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12094 }
12095#line 12096 "parse.c"
12096 break;
12097
12098 case 9: /* top_stmts: top_stmts terms top_stmt */
12099#line 3198 "parse.y"
12100 {
12101 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12102 /*% ripper: stmts_add!($:1, $:3) %*/
12103 }
12104#line 12105 "parse.c"
12105 break;
12106
12107 case 10: /* top_stmt: stmt */
12108#line 3205 "parse.y"
12109 {
12110 clear_block_exit(p, true);
12111 (yyval.node) = (yyvsp[0].node);
12112 }
12113#line 12114 "parse.c"
12114 break;
12115
12116 case 11: /* top_stmt: "'BEGIN'" begin_block */
12117#line 3210 "parse.y"
12118 {
12119 (yyval.node) = (yyvsp[0].node);
12120 /*% ripper: $:2 %*/
12121 }
12122#line 12123 "parse.c"
12123 break;
12124
12125 case 12: /* block_open: '{' */
12126#line 3216 "parse.y"
12127 {(yyval.node_exits) = init_block_exit(p);}
12128#line 12129 "parse.c"
12129 break;
12130
12131 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12132#line 3219 "parse.y"
12133 {
12134 restore_block_exit(p, (yyvsp[-2].node_exits));
12135 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12136 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12137 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12138 /*% ripper: BEGIN!($:2) %*/
12139 }
12140#line 12141 "parse.c"
12141 break;
12142
12143 case 14: /* compstmt_stmts: stmts option_terms */
12144#line 2976 "parse.y"
12145 {
12146 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12147 }
12148#line 12149 "parse.c"
12149 break;
12150
12151 case 15: /* $@2: %empty */
12152#line 3232 "parse.y"
12153 {
12154 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12155 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12156 }
12157#line 12158 "parse.c"
12158 break;
12159
12160 case 16: /* $@3: %empty */
12161#line 3237 "parse.y"
12162 {
12163 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12164 }
12165#line 12166 "parse.c"
12166 break;
12167
12168 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12169#line 3241 "parse.y"
12170 {
12171 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12172 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12173 }
12174#line 12175 "parse.c"
12175 break;
12176
12177 case 18: /* $@4: %empty */
12178#line 3248 "parse.y"
12179 {
12180 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12181 }
12182#line 12183 "parse.c"
12183 break;
12184
12185 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12186#line 3252 "parse.y"
12187 {
12188 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12189 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12190 }
12191#line 12192 "parse.c"
12192 break;
12193
12194 case 20: /* stmts: none */
12195#line 3259 "parse.y"
12196 {
12197 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12198 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12199 }
12200#line 12201 "parse.c"
12201 break;
12202
12203 case 21: /* stmts: stmt_or_begin */
12204#line 3264 "parse.y"
12205 {
12206 (yyval.node) = newline_node((yyvsp[0].node));
12207 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12208 }
12209#line 12210 "parse.c"
12210 break;
12211
12212 case 22: /* stmts: stmts terms stmt_or_begin */
12213#line 3269 "parse.y"
12214 {
12215 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12216 /*% ripper: stmts_add!($:1, $:3) %*/
12217 }
12218#line 12219 "parse.c"
12219 break;
12220
12221 case 24: /* $@5: %empty */
12222#line 3277 "parse.y"
12223 {
12224 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12225 }
12226#line 12227 "parse.c"
12227 break;
12228
12229 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12230#line 3281 "parse.y"
12231 {
12232 (yyval.node) = (yyvsp[0].node);
12233 }
12234#line 12235 "parse.c"
12235 break;
12236
12237 case 26: /* allow_exits: %empty */
12238#line 3286 "parse.y"
12239 {(yyval.node_exits) = allow_block_exit(p);}
12240#line 12241 "parse.c"
12241 break;
12242
12243 case 27: /* k_END: "'END'" lex_ctxt */
12244#line 3289 "parse.y"
12245 {
12246 (yyval.ctxt) = (yyvsp[0].ctxt);
12247 p->ctxt.in_rescue = before_rescue;
12248 /*% ripper: $:2 %*/
12249 }
12250#line 12251 "parse.c"
12251 break;
12252
12253 case 28: /* $@6: %empty */
12254#line 3295 "parse.y"
12255 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12256#line 12257 "parse.c"
12257 break;
12258
12259 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12260#line 3296 "parse.y"
12261 {
12262 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12263 /*% ripper: alias!($:2, $:4) %*/
12264 }
12265#line 12266 "parse.c"
12266 break;
12267
12268 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12269#line 3301 "parse.y"
12270 {
12271 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12272 /*% ripper: var_alias!($:2, $:3) %*/
12273 }
12274#line 12275 "parse.c"
12275 break;
12276
12277 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12278#line 3306 "parse.y"
12279 {
12280 char buf[2];
12281 buf[0] = '$';
12282 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12283 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12284 /*% ripper: var_alias!($:2, $:3) %*/
12285 }
12286#line 12287 "parse.c"
12287 break;
12288
12289 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12290#line 3314 "parse.y"
12291 {
12292 static const char mesg[] = "can't make alias for the number variables";
12293 /*%%%*/
12294 yyerror1(&(yylsp[0]), mesg);
12295 /*% %*/
12296 (yyval.node) = NEW_ERROR(&(yyloc));
12297 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
12298 }
12299#line 12300 "parse.c"
12300 break;
12301
12302 case 33: /* stmt: "'undef'" undef_list */
12303#line 3323 "parse.y"
12304 {
12305 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12306 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12307 (yyval.node) = (yyvsp[0].node);
12308 /*% ripper: undef!($:2) %*/
12309 }
12310#line 12311 "parse.c"
12311 break;
12312
12313 case 34: /* stmt: stmt "'if' modifier" expr_value */
12314#line 3330 "parse.y"
12315 {
12316 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12317 fixpos((yyval.node), (yyvsp[0].node));
12318 /*% ripper: if_mod!($:3, $:1) %*/
12319 }
12320#line 12321 "parse.c"
12321 break;
12322
12323 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12324#line 3336 "parse.y"
12325 {
12326 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12327 fixpos((yyval.node), (yyvsp[0].node));
12328 /*% ripper: unless_mod!($:3, $:1) %*/
12329 }
12330#line 12331 "parse.c"
12331 break;
12332
12333 case 36: /* stmt: stmt "'while' modifier" expr_value */
12334#line 3342 "parse.y"
12335 {
12336 clear_block_exit(p, false);
12337 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12338 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12339 }
12340 else {
12341 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12342 }
12343 /*% ripper: while_mod!($:3, $:1) %*/
12344 }
12345#line 12346 "parse.c"
12346 break;
12347
12348 case 37: /* stmt: stmt "'until' modifier" expr_value */
12349#line 3353 "parse.y"
12350 {
12351 clear_block_exit(p, false);
12352 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12353 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12354 }
12355 else {
12356 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12357 }
12358 /*% ripper: until_mod!($:3, $:1) %*/
12359 }
12360#line 12361 "parse.c"
12361 break;
12362
12363 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12364#line 3364 "parse.y"
12365 {
12366 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12367 NODE *resq;
12368 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12369 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12370 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12371 /*% ripper: rescue_mod!($:1, $:4) %*/
12372 }
12373#line 12374 "parse.c"
12374 break;
12375
12376 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12377#line 3373 "parse.y"
12378 {
12379 if (p->ctxt.in_def) {
12380 rb_warn0("END in method; use at_exit");
12381 }
12382 restore_block_exit(p, (yyvsp[-3].node_exits));
12383 p->ctxt = (yyvsp[-4].ctxt);
12384 {
12385 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12386 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12387 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12388 }
12389 /*% ripper: END!($:compstmt) %*/
12390 }
12391#line 12392 "parse.c"
12392 break;
12393
12394 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12395#line 3388 "parse.y"
12396 {
12397 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12398 /*% ripper: massign!($:1, $:4) %*/
12399 }
12400#line 12401 "parse.c"
12401 break;
12402
12403 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12404#line 2920 "parse.y"
12405 {
12406 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12407 /*% ripper: assign!($:1, $:4) %*/
12408 }
12409#line 12410 "parse.c"
12410 break;
12411
12412 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12413#line 3395 "parse.y"
12414 {
12415 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12416 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12417 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12418 loc.beg_pos = (yylsp[-3]).beg_pos;
12419 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12420 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12421 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12422 }
12423#line 12424 "parse.c"
12424 break;
12425
12426 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12427#line 3405 "parse.y"
12428 {
12429 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12430 /*% ripper: massign!($:1, $:4) %*/
12431 }
12432#line 12433 "parse.c"
12433 break;
12434
12435 case 47: /* stmt: error */
12436#line 3411 "parse.y"
12437 {
12438 (void)yynerrs;
12439 (yyval.node) = NEW_ERROR(&(yyloc));
12440 }
12441#line 12442 "parse.c"
12442 break;
12443
12444 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12445#line 2920 "parse.y"
12446 {
12447 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12448 /*% ripper: assign!($:1, $:4) %*/
12449 }
12450#line 12451 "parse.c"
12451 break;
12452
12453 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12454#line 3046 "parse.y"
12455 {
12456 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12457 /*% ripper: opassign!($:1, $:2, $:4) %*/
12458 }
12459#line 12460 "parse.c"
12460 break;
12461
12462 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12463#line 3051 "parse.y"
12464 {
12465 (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]));
12466 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12467 }
12468#line 12469 "parse.c"
12469 break;
12470
12471 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12472#line 3056 "parse.y"
12473 {
12474 (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]));
12475 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12476 }
12477#line 12478 "parse.c"
12478 break;
12479
12480 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12481#line 3061 "parse.y"
12482 {
12483 (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]));
12484 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12485 }
12486#line 12487 "parse.c"
12487 break;
12488
12489 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12490#line 3066 "parse.y"
12491 {
12492 (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]));
12493 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12494 }
12495#line 12496 "parse.c"
12496 break;
12497
12498 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12499#line 3071 "parse.y"
12500 {
12501 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12502 (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));
12503 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12504 }
12505#line 12506 "parse.c"
12506 break;
12507
12508 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12509#line 3077 "parse.y"
12510 {
12511 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12512 (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));
12513 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
12514 }
12515#line 12516 "parse.c"
12516 break;
12517
12518 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12519#line 3083 "parse.y"
12520 {
12521 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12522 (yyval.node) = NEW_ERROR(&(yyloc));
12523 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12524 }
12525#line 12526 "parse.c"
12526 break;
12527
12528 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12529#line 2951 "parse.y"
12530 {
12531 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12532 restore_defun(p, (yyvsp[-3].node_def_temp));
12533 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12534 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12535 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12536 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12537 /*% ripper: def!($:head, $:args, $:$) %*/
12538 local_pop(p);
12539 }
12540#line 12541 "parse.c"
12541 break;
12542
12543 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12544#line 2962 "parse.y"
12545 {
12546 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12547 restore_defun(p, (yyvsp[-3].node_def_temp));
12548 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12549 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12550 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12551 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12552 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12553 local_pop(p);
12554 }
12555#line 12556 "parse.c"
12556 break;
12557
12558 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12559#line 3424 "parse.y"
12560 {
12561 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12562 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12563 /*% ripper: rescue_mod!($:1, $:4) %*/
12564 }
12565#line 12566 "parse.c"
12566 break;
12567
12568 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12569#line 3430 "parse.y"
12570 {
12571 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12572 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12573 }
12574#line 12575 "parse.c"
12575 break;
12576
12577 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12578#line 3438 "parse.y"
12579 {
12580 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12581 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12582 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12583 /*% ripper: rescue_mod!($:1, $:4) %*/
12584 }
12585#line 12586 "parse.c"
12586 break;
12587
12588 case 71: /* expr: expr "'and'" expr */
12589#line 3449 "parse.y"
12590 {
12591 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12592 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12593 }
12594#line 12595 "parse.c"
12595 break;
12596
12597 case 72: /* expr: expr "'or'" expr */
12598#line 3454 "parse.y"
12599 {
12600 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12601 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12602 }
12603#line 12604 "parse.c"
12604 break;
12605
12606 case 73: /* expr: "'not'" option_'\n' expr */
12607#line 3459 "parse.y"
12608 {
12609 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12610 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12611 }
12612#line 12613 "parse.c"
12613 break;
12614
12615 case 74: /* expr: '!' command_call */
12616#line 3464 "parse.y"
12617 {
12618 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12619 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12620 }
12621#line 12622 "parse.c"
12622 break;
12623
12624 case 75: /* $@7: %empty */
12625#line 3469 "parse.y"
12626 {
12627 value_expr(p, (yyvsp[-1].node));
12628 }
12629#line 12630 "parse.c"
12630 break;
12631
12632 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12633#line 3474 "parse.y"
12634 {
12635 pop_pktbl(p, (yyvsp[-1].tbl));
12636 pop_pvtbl(p, (yyvsp[-2].tbl));
12637 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12638 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12639 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12640 (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);
12641 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12642 }
12643#line 12644 "parse.c"
12644 break;
12645
12646 case 77: /* $@8: %empty */
12647#line 3484 "parse.y"
12648 {
12649 value_expr(p, (yyvsp[-1].node));
12650 }
12651#line 12652 "parse.c"
12652 break;
12653
12654 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12655#line 3489 "parse.y"
12656 {
12657 pop_pktbl(p, (yyvsp[-1].tbl));
12658 pop_pvtbl(p, (yyvsp[-2].tbl));
12659 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12660 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12661 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12662 (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);
12663 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12664 }
12665#line 12666 "parse.c"
12666 break;
12667
12668 case 80: /* def_name: fname */
12669#line 3502 "parse.y"
12670 {
12671 numparam_name(p, (yyvsp[0].id));
12672 local_push(p, 0);
12673 p->ctxt.in_def = 1;
12674 p->ctxt.in_rescue = before_rescue;
12675 p->ctxt.cant_return = 0;
12676 (yyval.id) = (yyvsp[0].id);
12677 }
12678#line 12679 "parse.c"
12679 break;
12680
12681 case 81: /* defn_head: k_def def_name */
12682#line 3513 "parse.y"
12683 {
12684 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12685 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12686 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12687 /*% ripper: $:def_name %*/
12688 }
12689#line 12690 "parse.c"
12690 break;
12691
12692 case 82: /* $@9: %empty */
12693#line 3522 "parse.y"
12694 {
12695 SET_LEX_STATE(EXPR_FNAME);
12696 }
12697#line 12698 "parse.c"
12698 break;
12699
12700 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12701#line 3526 "parse.y"
12702 {
12703 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12704 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12705 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12706 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12707 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12708 }
12709#line 12710 "parse.c"
12710 break;
12711
12712 case 84: /* value_expr_expr: expr */
12713#line 3146 "parse.y"
12714 {
12715 value_expr(p, (yyvsp[0].node));
12716 (yyval.node) = (yyvsp[0].node);
12717 }
12718#line 12719 "parse.c"
12719 break;
12720
12721 case 86: /* expr_value: error */
12722#line 3537 "parse.y"
12723 {
12724 (yyval.node) = NEW_ERROR(&(yyloc));
12725 }
12726#line 12727 "parse.c"
12727 break;
12728
12729 case 87: /* $@10: %empty */
12730#line 3542 "parse.y"
12731 {COND_PUSH(1);}
12732#line 12733 "parse.c"
12733 break;
12734
12735 case 88: /* $@11: %empty */
12736#line 3542 "parse.y"
12737 {COND_POP();}
12738#line 12739 "parse.c"
12739 break;
12740
12741 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12742#line 3543 "parse.y"
12743 {
12744 (yyval.node) = (yyvsp[-2].node);
12745 /*% ripper: $:2 %*/
12746 }
12747#line 12748 "parse.c"
12748 break;
12749
12750 case 92: /* value_expr_command_call: command_call */
12751#line 3146 "parse.y"
12752 {
12753 value_expr(p, (yyvsp[0].node));
12754 (yyval.node) = (yyvsp[0].node);
12755 }
12756#line 12757 "parse.c"
12757 break;
12758
12759 case 95: /* block_command: block_call call_op2 operation2 command_args */
12760#line 3558 "parse.y"
12761 {
12762 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12763 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12764 }
12765#line 12766 "parse.c"
12766 break;
12767
12768 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
12769#line 3565 "parse.y"
12770 {
12771 (yyval.node) = (yyvsp[-1].node);
12772 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12773 /*% ripper: $:2 %*/
12774 }
12775#line 12776 "parse.c"
12776 break;
12777
12778 case 97: /* fcall: "local variable or method" */
12779#line 3573 "parse.y"
12780 {
12781 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12782 /*% ripper: $:1 %*/
12783 }
12784#line 12785 "parse.c"
12785 break;
12786
12787 case 98: /* fcall: "constant" */
12788#line 3573 "parse.y"
12789 {
12790 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12791 /*% ripper: $:1 %*/
12792 }
12793#line 12794 "parse.c"
12794 break;
12795
12796 case 99: /* fcall: "method" */
12797#line 3573 "parse.y"
12798 {
12799 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12800 /*% ripper: $:1 %*/
12801 }
12802#line 12803 "parse.c"
12803 break;
12804
12805 case 100: /* command: fcall command_args */
12806#line 3580 "parse.y"
12807 {
12808 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12809 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12810 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12811 /*% ripper: command!($:1, $:2) %*/
12812 }
12813#line 12814 "parse.c"
12814 break;
12815
12816 case 101: /* command: fcall command_args cmd_brace_block */
12817#line 3587 "parse.y"
12818 {
12819 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12820 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12821 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12822 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12823 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12824 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12825 }
12826#line 12827 "parse.c"
12827 break;
12828
12829 case 102: /* command: primary_value call_op operation2 command_args */
12830#line 3596 "parse.y"
12831 {
12832 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12833 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12834 }
12835#line 12836 "parse.c"
12836 break;
12837
12838 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12839#line 3601 "parse.y"
12840 {
12841 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12842 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12843 }
12844#line 12845 "parse.c"
12845 break;
12846
12847 case 104: /* command: primary_value "::" operation2 command_args */
12848#line 3606 "parse.y"
12849 {
12850 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12851 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12852 }
12853#line 12854 "parse.c"
12854 break;
12855
12856 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12857#line 3611 "parse.y"
12858 {
12859 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12860 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12861 }
12862#line 12863 "parse.c"
12863 break;
12864
12865 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
12866#line 3616 "parse.y"
12867 {
12868 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12869 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12870 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12871 }
12872#line 12873 "parse.c"
12873 break;
12874
12875 case 107: /* command: "'super'" command_args */
12876#line 3622 "parse.y"
12877 {
12878 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12879 fixpos((yyval.node), (yyvsp[0].node));
12880 /*% ripper: super!($:2) %*/
12881 }
12882#line 12883 "parse.c"
12883 break;
12884
12885 case 108: /* command: k_yield command_args */
12886#line 3628 "parse.y"
12887 {
12888 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12889 fixpos((yyval.node), (yyvsp[0].node));
12890 /*% ripper: yield!($:2) %*/
12891 }
12892#line 12893 "parse.c"
12893 break;
12894
12895 case 109: /* command: k_return call_args */
12896#line 3634 "parse.y"
12897 {
12898 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12899 /*% ripper: return!($:2) %*/
12900 }
12901#line 12902 "parse.c"
12902 break;
12903
12904 case 110: /* command: "'break'" call_args */
12905#line 3639 "parse.y"
12906 {
12907 NODE *args = 0;
12908 args = ret_args(p, (yyvsp[0].node));
12909 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12910 /*% ripper: break!($:2) %*/
12911 }
12912#line 12913 "parse.c"
12913 break;
12914
12915 case 111: /* command: "'next'" call_args */
12916#line 3646 "parse.y"
12917 {
12918 NODE *args = 0;
12919 args = ret_args(p, (yyvsp[0].node));
12920 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12921 /*% ripper: next!($:2) %*/
12922 }
12923#line 12924 "parse.c"
12924 break;
12925
12926 case 113: /* mlhs: "(" mlhs_inner rparen */
12927#line 3656 "parse.y"
12928 {
12929 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12930 /*% ripper: mlhs_paren!($:2) %*/
12931 }
12932#line 12933 "parse.c"
12933 break;
12934
12935 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
12936#line 3664 "parse.y"
12937 {
12938 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12939 /*% ripper: mlhs_paren!($:2) %*/
12940 }
12941#line 12942 "parse.c"
12942 break;
12943
12944 case 116: /* mlhs_basic: mlhs_head */
12945#line 3671 "parse.y"
12946 {
12947 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12948 /*% ripper: $:1 %*/
12949 }
12950#line 12951 "parse.c"
12951 break;
12952
12953 case 117: /* mlhs_basic: mlhs_head mlhs_item */
12954#line 3676 "parse.y"
12955 {
12956 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12957 /*% ripper: mlhs_add!($:1, $:2) %*/
12958 }
12959#line 12960 "parse.c"
12960 break;
12961
12962 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
12963#line 3681 "parse.y"
12964 {
12965 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12966 /*% ripper: mlhs_add_star!($:1, $:3) %*/
12967 }
12968#line 12969 "parse.c"
12969 break;
12970
12971 case 119: /* mlhs_items_mlhs_item: mlhs_item */
12972#line 3033 "parse.y"
12973 {
12974 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12975 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12976 }
12977#line 12978 "parse.c"
12978 break;
12979
12980 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
12981#line 3038 "parse.y"
12982 {
12983 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12984 /*% ripper: mlhs_add!($:1, $:3) %*/
12985 }
12986#line 12987 "parse.c"
12987 break;
12988
12989 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
12990#line 3686 "parse.y"
12991 {
12992 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12993 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12994 }
12995#line 12996 "parse.c"
12996 break;
12997
12998 case 122: /* mlhs_basic: mlhs_head "*" */
12999#line 3691 "parse.y"
13000 {
13001 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13002 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13003 }
13004#line 13005 "parse.c"
13005 break;
13006
13007 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13008#line 3696 "parse.y"
13009 {
13010 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13011 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13012 }
13013#line 13014 "parse.c"
13014 break;
13015
13016 case 124: /* mlhs_basic: "*" mlhs_node */
13017#line 3701 "parse.y"
13018 {
13019 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13020 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13021 }
13022#line 13023 "parse.c"
13023 break;
13024
13025 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13026#line 3706 "parse.y"
13027 {
13028 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13029 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13030 }
13031#line 13032 "parse.c"
13032 break;
13033
13034 case 126: /* mlhs_basic: "*" */
13035#line 3711 "parse.y"
13036 {
13037 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13038 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13039 }
13040#line 13041 "parse.c"
13041 break;
13042
13043 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13044#line 3716 "parse.y"
13045 {
13046 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13047 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13048 }
13049#line 13050 "parse.c"
13050 break;
13051
13052 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13053#line 3724 "parse.y"
13054 {
13055 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13056 /*% ripper: mlhs_paren!($:2) %*/
13057 }
13058#line 13059 "parse.c"
13059 break;
13060
13061 case 130: /* mlhs_head: mlhs_item ',' */
13062#line 3731 "parse.y"
13063 {
13064 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13065 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13066 }
13067#line 13068 "parse.c"
13068 break;
13069
13070 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13071#line 3736 "parse.y"
13072 {
13073 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13074 /*% ripper: mlhs_add!($:1, $:2) %*/
13075 }
13076#line 13077 "parse.c"
13077 break;
13078
13079 case 132: /* mlhs_node: user_variable */
13080#line 3744 "parse.y"
13081 {
13082 /*% ripper: var_field!($:1) %*/
13083 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13084 }
13085#line 13086 "parse.c"
13086 break;
13087
13088 case 133: /* mlhs_node: keyword_variable */
13089#line 3744 "parse.y"
13090 {
13091 /*% ripper: var_field!($:1) %*/
13092 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13093 }
13094#line 13095 "parse.c"
13095 break;
13096
13097 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13098#line 3749 "parse.y"
13099 {
13100 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13101 /*% ripper: aref_field!($:1, $:3) %*/
13102 }
13103#line 13104 "parse.c"
13104 break;
13105
13106 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13107#line 3754 "parse.y"
13108 {
13109 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13110 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13111 /*% ripper: field!($:1, $:2, $:3) %*/
13112 }
13113#line 13114 "parse.c"
13114 break;
13115
13116 case 136: /* mlhs_node: primary_value call_op "constant" */
13117#line 3754 "parse.y"
13118 {
13119 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13120 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13121 /*% ripper: field!($:1, $:2, $:3) %*/
13122 }
13123#line 13124 "parse.c"
13124 break;
13125
13126 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13127#line 3760 "parse.y"
13128 {
13129 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13130 /*% ripper: const_path_field!($:1, $:3) %*/
13131 }
13132#line 13133 "parse.c"
13133 break;
13134
13135 case 138: /* mlhs_node: primary_value "::" "constant" */
13136#line 3765 "parse.y"
13137 {
13138 /*% ripper: const_path_field!($:1, $:3) %*/
13139 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13140 }
13141#line 13142 "parse.c"
13142 break;
13143
13144 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13145#line 3770 "parse.y"
13146 {
13147 /*% ripper: top_const_field!($:2) %*/
13148 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13149 }
13150#line 13151 "parse.c"
13151 break;
13152
13153 case 140: /* mlhs_node: backref */
13154#line 3775 "parse.y"
13155 {
13156 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13157 (yyval.node) = NEW_ERROR(&(yyloc));
13158 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13159 }
13160#line 13161 "parse.c"
13161 break;
13162
13163 case 141: /* lhs: user_variable */
13164#line 3783 "parse.y"
13165 {
13166 /*% ripper: var_field!($:1) %*/
13167 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13168 }
13169#line 13170 "parse.c"
13170 break;
13171
13172 case 142: /* lhs: keyword_variable */
13173#line 3783 "parse.y"
13174 {
13175 /*% ripper: var_field!($:1) %*/
13176 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13177 }
13178#line 13179 "parse.c"
13179 break;
13180
13181 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13182#line 3788 "parse.y"
13183 {
13184 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13185 /*% ripper: aref_field!($:1, $:3) %*/
13186 }
13187#line 13188 "parse.c"
13188 break;
13189
13190 case 144: /* lhs: primary_value call_op "local variable or method" */
13191#line 3793 "parse.y"
13192 {
13193 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13194 /*% ripper: field!($:1, $:2, $:3) %*/
13195 }
13196#line 13197 "parse.c"
13197 break;
13198
13199 case 145: /* lhs: primary_value call_op "constant" */
13200#line 3793 "parse.y"
13201 {
13202 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13203 /*% ripper: field!($:1, $:2, $:3) %*/
13204 }
13205#line 13206 "parse.c"
13206 break;
13207
13208 case 146: /* lhs: primary_value "::" "local variable or method" */
13209#line 3798 "parse.y"
13210 {
13211 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13212 /*% ripper: field!($:1, $:2, $:3) %*/
13213 }
13214#line 13215 "parse.c"
13215 break;
13216
13217 case 147: /* lhs: primary_value "::" "constant" */
13218#line 3803 "parse.y"
13219 {
13220 /*% ripper: const_path_field!($:1, $:3) %*/
13221 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13222 }
13223#line 13224 "parse.c"
13224 break;
13225
13226 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13227#line 3808 "parse.y"
13228 {
13229 /*% ripper: top_const_field!($:2) %*/
13230 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13231 }
13232#line 13233 "parse.c"
13233 break;
13234
13235 case 149: /* lhs: backref */
13236#line 3813 "parse.y"
13237 {
13238 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13239 (yyval.node) = NEW_ERROR(&(yyloc));
13240 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13241 }
13242#line 13243 "parse.c"
13243 break;
13244
13245 case 150: /* cname: "local variable or method" */
13246#line 3821 "parse.y"
13247 {
13248 static const char mesg[] = "class/module name must be CONSTANT";
13249 /*%%%*/
13250 yyerror1(&(yylsp[0]), mesg);
13251 /*% %*/
13252 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13253 }
13254#line 13255 "parse.c"
13255 break;
13256
13257 case 152: /* cpath: ":: at EXPR_BEG" cname */
13258#line 3832 "parse.y"
13259 {
13260 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13261 /*% ripper: top_const_ref!($:2) %*/
13262 }
13263#line 13264 "parse.c"
13264 break;
13265
13266 case 153: /* cpath: cname */
13267#line 3837 "parse.y"
13268 {
13269 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13270 /*% ripper: const_ref!($:1) %*/
13271 }
13272#line 13273 "parse.c"
13273 break;
13274
13275 case 154: /* cpath: primary_value "::" cname */
13276#line 3842 "parse.y"
13277 {
13278 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13279 /*% ripper: const_path_ref!($:1, $:3) %*/
13280 }
13281#line 13282 "parse.c"
13282 break;
13283
13284 case 158: /* fname: op */
13285#line 3850 "parse.y"
13286 {
13287 SET_LEX_STATE(EXPR_ENDFN);
13288 (yyval.id) = (yyvsp[0].id);
13289 }
13290#line 13291 "parse.c"
13291 break;
13292
13293 case 160: /* fitem: fname */
13294#line 3858 "parse.y"
13295 {
13296 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13297 /*% ripper: symbol_literal!($:1) %*/
13298 }
13299#line 13300 "parse.c"
13300 break;
13301
13302 case 162: /* undef_list: fitem */
13303#line 3866 "parse.y"
13304 {
13305 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13306 /*% ripper: rb_ary_new3(1, $:1) %*/
13307 }
13308#line 13309 "parse.c"
13309 break;
13310
13311 case 163: /* $@12: %empty */
13312#line 3870 "parse.y"
13313 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13314#line 13315 "parse.c"
13315 break;
13316
13317 case 164: /* undef_list: undef_list ',' $@12 fitem */
13318#line 3871 "parse.y"
13319 {
13320 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13321 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13322 /*% ripper: rb_ary_push($:1, $:4) %*/
13323 }
13324#line 13325 "parse.c"
13325 break;
13326
13327 case 165: /* op: '|' */
13328#line 3878 "parse.y"
13329 { (yyval.id) = '|'; }
13330#line 13331 "parse.c"
13331 break;
13332
13333 case 166: /* op: '^' */
13334#line 3879 "parse.y"
13335 { (yyval.id) = '^'; }
13336#line 13337 "parse.c"
13337 break;
13338
13339 case 167: /* op: '&' */
13340#line 3880 "parse.y"
13341 { (yyval.id) = '&'; }
13342#line 13343 "parse.c"
13343 break;
13344
13345 case 168: /* op: "<=>" */
13346#line 3881 "parse.y"
13347 { (yyval.id) = tCMP; }
13348#line 13349 "parse.c"
13349 break;
13350
13351 case 169: /* op: "==" */
13352#line 3882 "parse.y"
13353 { (yyval.id) = tEQ; }
13354#line 13355 "parse.c"
13355 break;
13356
13357 case 170: /* op: "===" */
13358#line 3883 "parse.y"
13359 { (yyval.id) = tEQQ; }
13360#line 13361 "parse.c"
13361 break;
13362
13363 case 171: /* op: "=~" */
13364#line 3884 "parse.y"
13365 { (yyval.id) = tMATCH; }
13366#line 13367 "parse.c"
13367 break;
13368
13369 case 172: /* op: "!~" */
13370#line 3885 "parse.y"
13371 { (yyval.id) = tNMATCH; }
13372#line 13373 "parse.c"
13373 break;
13374
13375 case 173: /* op: '>' */
13376#line 3886 "parse.y"
13377 { (yyval.id) = '>'; }
13378#line 13379 "parse.c"
13379 break;
13380
13381 case 174: /* op: ">=" */
13382#line 3887 "parse.y"
13383 { (yyval.id) = tGEQ; }
13384#line 13385 "parse.c"
13385 break;
13386
13387 case 175: /* op: '<' */
13388#line 3888 "parse.y"
13389 { (yyval.id) = '<'; }
13390#line 13391 "parse.c"
13391 break;
13392
13393 case 176: /* op: "<=" */
13394#line 3889 "parse.y"
13395 { (yyval.id) = tLEQ; }
13396#line 13397 "parse.c"
13397 break;
13398
13399 case 177: /* op: "!=" */
13400#line 3890 "parse.y"
13401 { (yyval.id) = tNEQ; }
13402#line 13403 "parse.c"
13403 break;
13404
13405 case 178: /* op: "<<" */
13406#line 3891 "parse.y"
13407 { (yyval.id) = tLSHFT; }
13408#line 13409 "parse.c"
13409 break;
13410
13411 case 179: /* op: ">>" */
13412#line 3892 "parse.y"
13413 { (yyval.id) = tRSHFT; }
13414#line 13415 "parse.c"
13415 break;
13416
13417 case 180: /* op: '+' */
13418#line 3893 "parse.y"
13419 { (yyval.id) = '+'; }
13420#line 13421 "parse.c"
13421 break;
13422
13423 case 181: /* op: '-' */
13424#line 3894 "parse.y"
13425 { (yyval.id) = '-'; }
13426#line 13427 "parse.c"
13427 break;
13428
13429 case 182: /* op: '*' */
13430#line 3895 "parse.y"
13431 { (yyval.id) = '*'; }
13432#line 13433 "parse.c"
13433 break;
13434
13435 case 183: /* op: "*" */
13436#line 3896 "parse.y"
13437 { (yyval.id) = '*'; }
13438#line 13439 "parse.c"
13439 break;
13440
13441 case 184: /* op: '/' */
13442#line 3897 "parse.y"
13443 { (yyval.id) = '/'; }
13444#line 13445 "parse.c"
13445 break;
13446
13447 case 185: /* op: '%' */
13448#line 3898 "parse.y"
13449 { (yyval.id) = '%'; }
13450#line 13451 "parse.c"
13451 break;
13452
13453 case 186: /* op: "**" */
13454#line 3899 "parse.y"
13455 { (yyval.id) = tPOW; }
13456#line 13457 "parse.c"
13457 break;
13458
13459 case 187: /* op: "**arg" */
13460#line 3900 "parse.y"
13461 { (yyval.id) = tDSTAR; }
13462#line 13463 "parse.c"
13463 break;
13464
13465 case 188: /* op: '!' */
13466#line 3901 "parse.y"
13467 { (yyval.id) = '!'; }
13468#line 13469 "parse.c"
13469 break;
13470
13471 case 189: /* op: '~' */
13472#line 3902 "parse.y"
13473 { (yyval.id) = '~'; }
13474#line 13475 "parse.c"
13475 break;
13476
13477 case 190: /* op: "unary+" */
13478#line 3903 "parse.y"
13479 { (yyval.id) = tUPLUS; }
13480#line 13481 "parse.c"
13481 break;
13482
13483 case 191: /* op: "unary-" */
13484#line 3904 "parse.y"
13485 { (yyval.id) = tUMINUS; }
13486#line 13487 "parse.c"
13487 break;
13488
13489 case 192: /* op: "[]" */
13490#line 3905 "parse.y"
13491 { (yyval.id) = tAREF; }
13492#line 13493 "parse.c"
13493 break;
13494
13495 case 193: /* op: "[]=" */
13496#line 3906 "parse.y"
13497 { (yyval.id) = tASET; }
13498#line 13499 "parse.c"
13499 break;
13500
13501 case 194: /* op: '`' */
13502#line 3907 "parse.y"
13503 { (yyval.id) = '`'; }
13504#line 13505 "parse.c"
13505 break;
13506
13507 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13508#line 2920 "parse.y"
13509 {
13510 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13511 /*% ripper: assign!($:1, $:4) %*/
13512 }
13513#line 13514 "parse.c"
13514 break;
13515
13516 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13517#line 3046 "parse.y"
13518 {
13519 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13520 /*% ripper: opassign!($:1, $:2, $:4) %*/
13521 }
13522#line 13523 "parse.c"
13523 break;
13524
13525 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13526#line 3051 "parse.y"
13527 {
13528 (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]));
13529 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13530 }
13531#line 13532 "parse.c"
13532 break;
13533
13534 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13535#line 3056 "parse.y"
13536 {
13537 (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]));
13538 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13539 }
13540#line 13541 "parse.c"
13541 break;
13542
13543 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13544#line 3061 "parse.y"
13545 {
13546 (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]));
13547 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13548 }
13549#line 13550 "parse.c"
13550 break;
13551
13552 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13553#line 3066 "parse.y"
13554 {
13555 (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]));
13556 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13557 }
13558#line 13559 "parse.c"
13559 break;
13560
13561 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13562#line 3071 "parse.y"
13563 {
13564 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13565 (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));
13566 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13567 }
13568#line 13569 "parse.c"
13569 break;
13570
13571 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13572#line 3077 "parse.y"
13573 {
13574 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13575 (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));
13576 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13577 }
13578#line 13579 "parse.c"
13579 break;
13580
13581 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13582#line 3083 "parse.y"
13583 {
13584 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13585 (yyval.node) = NEW_ERROR(&(yyloc));
13586 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13587 }
13588#line 13589 "parse.c"
13589 break;
13590
13591 case 247: /* range_expr_arg: arg ".." arg */
13592#line 3105 "parse.y"
13593 {
13594 value_expr(p, (yyvsp[-2].node));
13595 value_expr(p, (yyvsp[0].node));
13596 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13597 /*% ripper: dot2!($:1, $:3) %*/
13598 }
13599#line 13600 "parse.c"
13600 break;
13601
13602 case 248: /* range_expr_arg: arg "..." arg */
13603#line 3112 "parse.y"
13604 {
13605 value_expr(p, (yyvsp[-2].node));
13606 value_expr(p, (yyvsp[0].node));
13607 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13608 /*% ripper: dot3!($:1, $:3) %*/
13609 }
13610#line 13611 "parse.c"
13611 break;
13612
13613 case 249: /* range_expr_arg: arg ".." */
13614#line 3119 "parse.y"
13615 {
13616 value_expr(p, (yyvsp[-1].node));
13617 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13618 /*% ripper: dot2!($:1, Qnil) %*/
13619 }
13620#line 13621 "parse.c"
13621 break;
13622
13623 case 250: /* range_expr_arg: arg "..." */
13624#line 3125 "parse.y"
13625 {
13626 value_expr(p, (yyvsp[-1].node));
13627 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13628 /*% ripper: dot3!($:1, Qnil) %*/
13629 }
13630#line 13631 "parse.c"
13631 break;
13632
13633 case 251: /* range_expr_arg: "(.." arg */
13634#line 3131 "parse.y"
13635 {
13636 value_expr(p, (yyvsp[0].node));
13637 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13638 /*% ripper: dot2!(Qnil, $:2) %*/
13639 }
13640#line 13641 "parse.c"
13641 break;
13642
13643 case 252: /* range_expr_arg: "(..." arg */
13644#line 3137 "parse.y"
13645 {
13646 value_expr(p, (yyvsp[0].node));
13647 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13648 /*% ripper: dot3!(Qnil, $:2) %*/
13649 }
13650#line 13651 "parse.c"
13651 break;
13652
13653 case 254: /* arg: arg '+' arg */
13654#line 3928 "parse.y"
13655 {
13656 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13657 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13658 }
13659#line 13660 "parse.c"
13660 break;
13661
13662 case 255: /* arg: arg '-' arg */
13663#line 3933 "parse.y"
13664 {
13665 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13666 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13667 }
13668#line 13669 "parse.c"
13669 break;
13670
13671 case 256: /* arg: arg '*' arg */
13672#line 3938 "parse.y"
13673 {
13674 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13675 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13676 }
13677#line 13678 "parse.c"
13678 break;
13679
13680 case 257: /* arg: arg '/' arg */
13681#line 3943 "parse.y"
13682 {
13683 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13684 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13685 }
13686#line 13687 "parse.c"
13687 break;
13688
13689 case 258: /* arg: arg '%' arg */
13690#line 3948 "parse.y"
13691 {
13692 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13693 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13694 }
13695#line 13696 "parse.c"
13696 break;
13697
13698 case 259: /* arg: arg "**" arg */
13699#line 3953 "parse.y"
13700 {
13701 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13702 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13703 }
13704#line 13705 "parse.c"
13705 break;
13706
13707 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13708#line 3958 "parse.y"
13709 {
13710 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13711 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13712 }
13713#line 13714 "parse.c"
13714 break;
13715
13716 case 261: /* arg: "unary+" arg */
13717#line 3963 "parse.y"
13718 {
13719 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13720 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13721 }
13722#line 13723 "parse.c"
13723 break;
13724
13725 case 262: /* arg: "unary-" arg */
13726#line 3968 "parse.y"
13727 {
13728 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13729 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13730 }
13731#line 13732 "parse.c"
13732 break;
13733
13734 case 263: /* arg: arg '|' arg */
13735#line 3973 "parse.y"
13736 {
13737 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13738 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13739 }
13740#line 13741 "parse.c"
13741 break;
13742
13743 case 264: /* arg: arg '^' arg */
13744#line 3978 "parse.y"
13745 {
13746 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13747 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13748 }
13749#line 13750 "parse.c"
13750 break;
13751
13752 case 265: /* arg: arg '&' arg */
13753#line 3983 "parse.y"
13754 {
13755 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13756 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13757 }
13758#line 13759 "parse.c"
13759 break;
13760
13761 case 266: /* arg: arg "<=>" arg */
13762#line 3988 "parse.y"
13763 {
13764 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13765 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13766 }
13767#line 13768 "parse.c"
13768 break;
13769
13770 case 268: /* arg: arg "==" arg */
13771#line 3994 "parse.y"
13772 {
13773 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13774 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13775 }
13776#line 13777 "parse.c"
13777 break;
13778
13779 case 269: /* arg: arg "===" arg */
13780#line 3999 "parse.y"
13781 {
13782 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13783 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13784 }
13785#line 13786 "parse.c"
13786 break;
13787
13788 case 270: /* arg: arg "!=" arg */
13789#line 4004 "parse.y"
13790 {
13791 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13792 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13793 }
13794#line 13795 "parse.c"
13795 break;
13796
13797 case 271: /* arg: arg "=~" arg */
13798#line 4009 "parse.y"
13799 {
13800 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13801 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13802 }
13803#line 13804 "parse.c"
13804 break;
13805
13806 case 272: /* arg: arg "!~" arg */
13807#line 4014 "parse.y"
13808 {
13809 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13810 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13811 }
13812#line 13813 "parse.c"
13813 break;
13814
13815 case 273: /* arg: '!' arg */
13816#line 4019 "parse.y"
13817 {
13818 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13819 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13820 }
13821#line 13822 "parse.c"
13822 break;
13823
13824 case 274: /* arg: '~' arg */
13825#line 4024 "parse.y"
13826 {
13827 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13828 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13829 }
13830#line 13831 "parse.c"
13831 break;
13832
13833 case 275: /* arg: arg "<<" arg */
13834#line 4029 "parse.y"
13835 {
13836 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13837 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13838 }
13839#line 13840 "parse.c"
13840 break;
13841
13842 case 276: /* arg: arg ">>" arg */
13843#line 4034 "parse.y"
13844 {
13845 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13846 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13847 }
13848#line 13849 "parse.c"
13849 break;
13850
13851 case 277: /* arg: arg "&&" arg */
13852#line 4039 "parse.y"
13853 {
13854 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13855 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13856 }
13857#line 13858 "parse.c"
13858 break;
13859
13860 case 278: /* arg: arg "||" arg */
13861#line 4044 "parse.y"
13862 {
13863 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13864 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13865 }
13866#line 13867 "parse.c"
13867 break;
13868
13869 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
13870#line 4049 "parse.y"
13871 {
13872 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13873 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
13874 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
13875 /*% ripper: defined!($:4) %*/
13876 }
13877#line 13878 "parse.c"
13878 break;
13879
13880 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
13881#line 2951 "parse.y"
13882 {
13883 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13884 restore_defun(p, (yyvsp[-3].node_def_temp));
13885 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13886 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13887 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13888 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13889 /*% ripper: def!($:head, $:args, $:$) %*/
13890 local_pop(p);
13891 }
13892#line 13893 "parse.c"
13893 break;
13894
13895 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
13896#line 2962 "parse.y"
13897 {
13898 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13899 restore_defun(p, (yyvsp[-3].node_def_temp));
13900 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13901 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13902 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13903 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13904 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13905 local_pop(p);
13906 }
13907#line 13908 "parse.c"
13908 break;
13909
13910 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
13911#line 4061 "parse.y"
13912 {
13913 value_expr(p, (yyvsp[-5].node));
13914 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
13915 fixpos((yyval.node), (yyvsp[-5].node));
13916 /*% ripper: ifop!($:1, $:3, $:6) %*/
13917 }
13918#line 13919 "parse.c"
13919 break;
13920
13921 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13922#line 4071 "parse.y"
13923 {
13924 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13925 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13926 /*% ripper: rescue_mod!($:1, $:4) %*/
13927 }
13928#line 13929 "parse.c"
13929 break;
13930
13931 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
13932#line 4077 "parse.y"
13933 {
13934 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13935 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13936 }
13937#line 13938 "parse.c"
13938 break;
13939
13940 case 289: /* relop: '>' */
13941#line 4083 "parse.y"
13942 {(yyval.id) = '>';}
13943#line 13944 "parse.c"
13944 break;
13945
13946 case 290: /* relop: '<' */
13947#line 4084 "parse.y"
13948 {(yyval.id) = '<';}
13949#line 13950 "parse.c"
13950 break;
13951
13952 case 291: /* relop: ">=" */
13953#line 4085 "parse.y"
13954 {(yyval.id) = idGE;}
13955#line 13956 "parse.c"
13956 break;
13957
13958 case 292: /* relop: "<=" */
13959#line 4086 "parse.y"
13960 {(yyval.id) = idLE;}
13961#line 13962 "parse.c"
13962 break;
13963
13964 case 293: /* rel_expr: arg relop arg */
13965#line 4090 "parse.y"
13966 {
13967 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13968 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13969 }
13970#line 13971 "parse.c"
13971 break;
13972
13973 case 294: /* rel_expr: rel_expr relop arg */
13974#line 4095 "parse.y"
13975 {
13976 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13977 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13978 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13979 }
13980#line 13981 "parse.c"
13981 break;
13982
13983 case 295: /* lex_ctxt: none */
13984#line 4103 "parse.y"
13985 {
13986 (yyval.ctxt) = p->ctxt;
13987 }
13988#line 13989 "parse.c"
13989 break;
13990
13991 case 296: /* begin_defined: lex_ctxt */
13992#line 4109 "parse.y"
13993 {
13994 p->ctxt.in_defined = 1;
13995 (yyval.ctxt) = (yyvsp[0].ctxt);
13996 }
13997#line 13998 "parse.c"
13998 break;
13999
14000 case 297: /* after_rescue: lex_ctxt */
14001#line 4116 "parse.y"
14002 {
14003 p->ctxt.in_rescue = after_rescue;
14004 (yyval.ctxt) = (yyvsp[0].ctxt);
14005 }
14006#line 14007 "parse.c"
14007 break;
14008
14009 case 298: /* value_expr_arg: arg */
14010#line 3146 "parse.y"
14011 {
14012 value_expr(p, (yyvsp[0].node));
14013 (yyval.node) = (yyvsp[0].node);
14014 }
14015#line 14016 "parse.c"
14016 break;
14017
14018 case 302: /* aref_args: args ',' assocs trailer */
14019#line 4128 "parse.y"
14020 {
14021 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14022 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14023 }
14024#line 14025 "parse.c"
14025 break;
14026
14027 case 303: /* aref_args: assocs trailer */
14028#line 4133 "parse.y"
14029 {
14030 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14031 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14032 }
14033#line 14034 "parse.c"
14034 break;
14035
14036 case 304: /* arg_rhs: arg */
14037#line 4140 "parse.y"
14038 {
14039 value_expr(p, (yyvsp[0].node));
14040 (yyval.node) = (yyvsp[0].node);
14041 }
14042#line 14043 "parse.c"
14043 break;
14044
14045 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14046#line 4145 "parse.y"
14047 {
14048 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14049 value_expr(p, (yyvsp[-3].node));
14050 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14051 /*% ripper: rescue_mod!($:1, $:4) %*/
14052 }
14053#line 14054 "parse.c"
14054 break;
14055
14056 case 306: /* paren_args: '(' opt_call_args rparen */
14057#line 4154 "parse.y"
14058 {
14059 (yyval.node) = (yyvsp[-1].node);
14060 /*% ripper: arg_paren!($:2) %*/
14061 }
14062#line 14063 "parse.c"
14063 break;
14064
14065 case 307: /* paren_args: '(' args ',' args_forward rparen */
14066#line 4159 "parse.y"
14067 {
14068 if (!check_forwarding_args(p)) {
14069 (yyval.node) = 0;
14070 }
14071 else {
14072 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14073 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14074 }
14075 }
14076#line 14077 "parse.c"
14077 break;
14078
14079 case 308: /* paren_args: '(' args_forward rparen */
14080#line 4169 "parse.y"
14081 {
14082 if (!check_forwarding_args(p)) {
14083 (yyval.node) = 0;
14084 }
14085 else {
14086 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14087 /*% ripper: arg_paren!($:2) %*/
14088 }
14089 }
14090#line 14091 "parse.c"
14091 break;
14092
14093 case 310: /* opt_paren_args: paren_args */
14094#line 4182 "parse.y"
14095 {
14096 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14097 }
14098#line 14099 "parse.c"
14099 break;
14100
14101 case 314: /* opt_call_args: args ',' assocs ',' */
14102#line 4191 "parse.y"
14103 {
14104 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14105 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14106 }
14107#line 14108 "parse.c"
14108 break;
14109
14110 case 315: /* opt_call_args: assocs ',' */
14111#line 4196 "parse.y"
14112 {
14113 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14114 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14115 }
14116#line 14117 "parse.c"
14117 break;
14118
14119 case 316: /* value_expr_command: command */
14120#line 3146 "parse.y"
14121 {
14122 value_expr(p, (yyvsp[0].node));
14123 (yyval.node) = (yyvsp[0].node);
14124 }
14125#line 14126 "parse.c"
14126 break;
14127
14128 case 317: /* call_args: value_expr_command */
14129#line 4203 "parse.y"
14130 {
14131 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14132 /*% ripper: args_add!(args_new!, $:1) %*/
14133 }
14134#line 14135 "parse.c"
14135 break;
14136
14137 case 318: /* call_args: def_endless_method_endless_command */
14138#line 4208 "parse.y"
14139 {
14140 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14141 /*% ripper: args_add!(args_new!, $:1) %*/
14142 }
14143#line 14144 "parse.c"
14144 break;
14145
14146 case 319: /* call_args: args opt_block_arg */
14147#line 4213 "parse.y"
14148 {
14149 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14150 /*% ripper: args_add_block!($:1, $:2) %*/
14151 }
14152#line 14153 "parse.c"
14153 break;
14154
14155 case 320: /* call_args: assocs opt_block_arg */
14156#line 4218 "parse.y"
14157 {
14158 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14159 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14160 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14161 }
14162#line 14163 "parse.c"
14163 break;
14164
14165 case 321: /* call_args: args ',' assocs opt_block_arg */
14166#line 4224 "parse.y"
14167 {
14168 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14169 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14170 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14171 }
14172#line 14173 "parse.c"
14173 break;
14174
14175 case 323: /* $@13: %empty */
14176#line 4233 "parse.y"
14177 {
14178 /* If call_args starts with a open paren '(' or '[',
14179 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14180 * but the push must be done after CMDARG_PUSH(1).
14181 * So this code makes them consistent by first cancelling
14182 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14183 * and finally redoing CMDARG_PUSH(0).
14184 */
14185 int lookahead = 0;
14186 switch (yychar) {
14187 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14188 lookahead = 1;
14189 }
14190 if (lookahead) CMDARG_POP();
14191 CMDARG_PUSH(1);
14192 if (lookahead) CMDARG_PUSH(0);
14193 }
14194#line 14195 "parse.c"
14195 break;
14196
14197 case 324: /* command_args: $@13 call_args */
14198#line 4251 "parse.y"
14199 {
14200 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14201 * but the push must be done after CMDARG_POP() in the parser.
14202 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14203 * CMDARG_POP() to pop 1 pushed by command_args,
14204 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14205 */
14206 int lookahead = 0;
14207 switch (yychar) {
14208 case tLBRACE_ARG:
14209 lookahead = 1;
14210 }
14211 if (lookahead) CMDARG_POP();
14212 CMDARG_POP();
14213 if (lookahead) CMDARG_PUSH(0);
14214 (yyval.node) = (yyvsp[0].node);
14215 /*% ripper: $:2 %*/
14216 }
14217#line 14218 "parse.c"
14218 break;
14219
14220 case 325: /* block_arg: "&" arg_value */
14221#line 4272 "parse.y"
14222 {
14223 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14224 /*% ripper: $:2 %*/
14225 }
14226#line 14227 "parse.c"
14227 break;
14228
14229 case 326: /* block_arg: "&" */
14230#line 4277 "parse.y"
14231 {
14232 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14233 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14234 /*% ripper: Qnil %*/
14235 }
14236#line 14237 "parse.c"
14237 break;
14238
14239 case 327: /* opt_block_arg: ',' block_arg */
14240#line 4285 "parse.y"
14241 {
14242 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14243 /*% ripper: $:2 %*/
14244 }
14245#line 14246 "parse.c"
14246 break;
14247
14248 case 328: /* opt_block_arg: none */
14249#line 4290 "parse.y"
14250 {
14251 (yyval.node_block_pass) = 0;
14252 /*% ripper: Qfalse %*/
14253 }
14254#line 14255 "parse.c"
14255 break;
14256
14257 case 329: /* args: arg_value */
14258#line 4298 "parse.y"
14259 {
14260 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14261 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14262 }
14263#line 14264 "parse.c"
14264 break;
14265
14266 case 330: /* args: arg_splat */
14267#line 4303 "parse.y"
14268 {
14269 (yyval.node) = (yyvsp[0].node);
14270 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14271 }
14272#line 14273 "parse.c"
14273 break;
14274
14275 case 331: /* args: args ',' arg_value */
14276#line 4308 "parse.y"
14277 {
14278 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14279 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14280 }
14281#line 14282 "parse.c"
14282 break;
14283
14284 case 332: /* args: args ',' arg_splat */
14285#line 4313 "parse.y"
14286 {
14287 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14288 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14289 }
14290#line 14291 "parse.c"
14291 break;
14292
14293 case 333: /* arg_splat: "*" arg_value */
14294#line 4321 "parse.y"
14295 {
14296 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14297 /*% ripper: $:arg_value %*/
14298 }
14299#line 14300 "parse.c"
14300 break;
14301
14302 case 334: /* arg_splat: "*" */
14303#line 4326 "parse.y"
14304 {
14305 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14306 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14307 /*% ripper: Qnil %*/
14308 }
14309#line 14310 "parse.c"
14310 break;
14311
14312 case 337: /* mrhs: args ',' arg_value */
14313#line 4340 "parse.y"
14314 {
14315 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14316 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14317 }
14318#line 14319 "parse.c"
14319 break;
14320
14321 case 338: /* mrhs: args ',' "*" arg_value */
14322#line 4345 "parse.y"
14323 {
14324 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14325 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14326 }
14327#line 14328 "parse.c"
14328 break;
14329
14330 case 339: /* mrhs: "*" arg_value */
14331#line 4350 "parse.y"
14332 {
14333 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14334 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14335 }
14336#line 14337 "parse.c"
14337 break;
14338
14339 case 350: /* primary: "method" */
14340#line 4371 "parse.y"
14341 {
14342 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14343 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
14344 }
14345#line 14346 "parse.c"
14346 break;
14347
14348 case 351: /* $@14: %empty */
14349#line 4376 "parse.y"
14350 {
14351 CMDARG_PUSH(0);
14352 }
14353#line 14354 "parse.c"
14354 break;
14355
14356 case 352: /* primary: k_begin $@14 bodystmt k_end */
14357#line 4381 "parse.y"
14358 {
14359 CMDARG_POP();
14360 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14361 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14362 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14363 /*% ripper: begin!($:3) %*/
14364 }
14365#line 14366 "parse.c"
14366 break;
14367
14368 case 353: /* $@15: %empty */
14369#line 4388 "parse.y"
14370 {SET_LEX_STATE(EXPR_ENDARG);}
14371#line 14372 "parse.c"
14372 break;
14373
14374 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14375#line 4389 "parse.y"
14376 {
14377 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14378 (yyval.node) = (yyvsp[-2].node);
14379 /*% ripper: paren!($:2) %*/
14380 }
14381#line 14382 "parse.c"
14382 break;
14383
14384 case 355: /* primary: "(" compstmt_stmts ')' */
14385#line 4395 "parse.y"
14386 {
14387 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14388 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14389 /*% ripper: paren!($:2) %*/
14390 }
14391#line 14392 "parse.c"
14392 break;
14393
14394 case 356: /* primary: primary_value "::" "constant" */
14395#line 4401 "parse.y"
14396 {
14397 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14398 /*% ripper: const_path_ref!($:1, $:3) %*/
14399 }
14400#line 14401 "parse.c"
14401 break;
14402
14403 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14404#line 4406 "parse.y"
14405 {
14406 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14407 /*% ripper: top_const_ref!($:2) %*/
14408 }
14409#line 14410 "parse.c"
14410 break;
14411
14412 case 358: /* primary: "[" aref_args ']' */
14413#line 4411 "parse.y"
14414 {
14415 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14416 /*% ripper: array!($:2) %*/
14417 }
14418#line 14419 "parse.c"
14419 break;
14420
14421 case 359: /* primary: "{" assoc_list '}' */
14422#line 4416 "parse.y"
14423 {
14424 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14425 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14426 /*% ripper: hash!($:2) %*/
14427 }
14428#line 14429 "parse.c"
14429 break;
14430
14431 case 360: /* primary: k_return */
14432#line 4422 "parse.y"
14433 {
14434 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14435 /*% ripper: return0! %*/
14436 }
14437#line 14438 "parse.c"
14438 break;
14439
14440 case 361: /* primary: k_yield '(' call_args rparen */
14441#line 4427 "parse.y"
14442 {
14443 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14444 /*% ripper: yield!(paren!($:3)) %*/
14445 }
14446#line 14447 "parse.c"
14447 break;
14448
14449 case 362: /* primary: k_yield '(' rparen */
14450#line 4432 "parse.y"
14451 {
14452 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14453 /*% ripper: yield!(paren!(args_new!)) %*/
14454 }
14455#line 14456 "parse.c"
14456 break;
14457
14458 case 363: /* primary: k_yield */
14459#line 4437 "parse.y"
14460 {
14461 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14462 /*% ripper: yield0! %*/
14463 }
14464#line 14465 "parse.c"
14465 break;
14466
14467 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14468#line 4442 "parse.y"
14469 {
14470 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14471 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14472 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14473 /*% ripper: defined!($:5) %*/
14474 }
14475#line 14476 "parse.c"
14476 break;
14477
14478 case 365: /* primary: "'not'" '(' expr rparen */
14479#line 4449 "parse.y"
14480 {
14481 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14482 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14483 }
14484#line 14485 "parse.c"
14485 break;
14486
14487 case 366: /* primary: "'not'" '(' rparen */
14488#line 4454 "parse.y"
14489 {
14490 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14491 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14492 }
14493#line 14494 "parse.c"
14494 break;
14495
14496 case 367: /* primary: fcall brace_block */
14497#line 4459 "parse.y"
14498 {
14499 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14500 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14501 }
14502#line 14503 "parse.c"
14503 break;
14504
14505 case 369: /* primary: method_call brace_block */
14506#line 4465 "parse.y"
14507 {
14508 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14509 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14510 /*% ripper: method_add_block!($:1, $:2) %*/
14511 }
14512#line 14513 "parse.c"
14513 break;
14514
14515 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14516#line 4475 "parse.y"
14517 {
14518 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14519 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14520
14521 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14522 fixpos((yyval.node), (yyvsp[-4].node));
14523 /*% ripper: if!($:2, $:4, $:5) %*/
14524 }
14525#line 14526 "parse.c"
14526 break;
14527
14528 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14529#line 4487 "parse.y"
14530 {
14531 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14532 fixpos((yyval.node), (yyvsp[-4].node));
14533 /*% ripper: unless!($:2, $:4, $:5) %*/
14534 }
14535#line 14536 "parse.c"
14536 break;
14537
14538 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14539#line 4495 "parse.y"
14540 {
14541 restore_block_exit(p, (yyvsp[-3].node_exits));
14542 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14543 fixpos((yyval.node), (yyvsp[-2].node));
14544 /*% ripper: while!($:2, $:3) %*/
14545 }
14546#line 14547 "parse.c"
14547 break;
14548
14549 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14550#line 4504 "parse.y"
14551 {
14552 restore_block_exit(p, (yyvsp[-3].node_exits));
14553 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14554 fixpos((yyval.node), (yyvsp[-2].node));
14555 /*% ripper: until!($:2, $:3) %*/
14556 }
14557#line 14558 "parse.c"
14558 break;
14559
14560 case 375: /* @16: %empty */
14561#line 4511 "parse.y"
14562 {
14563 (yyval.labels) = p->case_labels;
14564 p->case_labels = CHECK_LITERAL_WHEN;
14565 }
14566#line 14567 "parse.c"
14567 break;
14568
14569 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14570#line 4517 "parse.y"
14571 {
14572 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14573 p->case_labels = (yyvsp[-2].labels);
14574 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14575 fixpos((yyval.node), (yyvsp[-4].node));
14576 /*% ripper: case!($:2, $:5) %*/
14577 }
14578#line 14579 "parse.c"
14579 break;
14580
14581 case 377: /* @17: %empty */
14582#line 4525 "parse.y"
14583 {
14584 (yyval.labels) = p->case_labels;
14585 p->case_labels = 0;
14586 }
14587#line 14588 "parse.c"
14588 break;
14589
14590 case 378: /* primary: k_case option_terms @17 case_body k_end */
14591#line 4531 "parse.y"
14592 {
14593 if (p->case_labels) st_free_table(p->case_labels);
14594 p->case_labels = (yyvsp[-2].labels);
14595 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14596 /*% ripper: case!(Qnil, $:4) %*/
14597 }
14598#line 14599 "parse.c"
14599 break;
14600
14601 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14602#line 4540 "parse.y"
14603 {
14604 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14605 /*% ripper: case!($:2, $:4) %*/
14606 }
14607#line 14608 "parse.c"
14608 break;
14609
14610 case 380: /* $@18: %empty */
14611#line 4545 "parse.y"
14612 {COND_PUSH(1);}
14613#line 14614 "parse.c"
14614 break;
14615
14616 case 381: /* $@19: %empty */
14617#line 4545 "parse.y"
14618 {COND_POP();}
14619#line 14620 "parse.c"
14620 break;
14621
14622 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14623#line 4548 "parse.y"
14624 {
14625 restore_block_exit(p, (yyvsp[-8].node_exits));
14626 /*
14627 * for a, b, c in e
14628 * #=>
14629 * e.each{|*x| a, b, c = x}
14630 *
14631 * for a in e
14632 * #=>
14633 * e.each{|x| a, = x}
14634 */
14635 ID id = internal_id(p);
14636 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14637 rb_node_args_t *args;
14638 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14639 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14640 tbl->ids[0] = id; /* internal id */
14641
14642 switch (nd_type((yyvsp[-7].node))) {
14643 case NODE_LASGN:
14644 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14645 set_nd_value(p, (yyvsp[-7].node), internal_var);
14646 id = 0;
14647 m->nd_plen = 1;
14648 m->nd_next = (yyvsp[-7].node);
14649 break;
14650 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14651 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14652 break;
14653 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14654 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]));
14655 }
14656 /* {|*internal_id| <m> = internal_id; ... } */
14657 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-7])), &(yylsp[-7]));
14658 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14659 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14660 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14661 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14662 fixpos((yyval.node), (yyvsp[-7].node));
14663 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14664 }
14665#line 14666 "parse.c"
14666 break;
14667
14668 case 383: /* $@20: %empty */
14669#line 4590 "parse.y"
14670 {
14671 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14672 }
14673#line 14674 "parse.c"
14674 break;
14675
14676 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14677#line 4595 "parse.y"
14678 {
14679 YYLTYPE inheritance_operator_loc = NULL_LOC;
14680 if ((yyvsp[-3].node)) {
14681 inheritance_operator_loc = (yylsp[-3]);
14682 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14683 }
14684 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14685 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14686 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14687 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14688 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14689 local_pop(p);
14690 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14691 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14692 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14693 }
14694#line 14695 "parse.c"
14695 break;
14696
14697 case 385: /* $@21: %empty */
14698#line 4612 "parse.y"
14699 {
14700 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14701 }
14702#line 14703 "parse.c"
14703 break;
14704
14705 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14706#line 4618 "parse.y"
14707 {
14708 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14709 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14710 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14711 fixpos((yyval.node), (yyvsp[-4].node));
14712 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14713 local_pop(p);
14714 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14715 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14716 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14717 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14718 }
14719#line 14720 "parse.c"
14720 break;
14721
14722 case 387: /* $@22: %empty */
14723#line 4631 "parse.y"
14724 {
14725 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14726 }
14727#line 14728 "parse.c"
14728 break;
14729
14730 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14731#line 4636 "parse.y"
14732 {
14733 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14734 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14735 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14736 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14737 /*% ripper: module!($:cpath, $:bodystmt) %*/
14738 local_pop(p);
14739 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14740 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14741 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14742 }
14743#line 14744 "parse.c"
14744 break;
14745
14746 case 389: /* $@23: %empty */
14747#line 4649 "parse.y"
14748 {
14749 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14750 }
14751#line 14752 "parse.c"
14752 break;
14753
14754 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14755#line 4654 "parse.y"
14756 {
14757 restore_defun(p, (yyvsp[-4].node_def_temp));
14758 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14759 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14760 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14761 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14762 local_pop(p);
14763 }
14764#line 14765 "parse.c"
14765 break;
14766
14767 case 391: /* $@24: %empty */
14768#line 4664 "parse.y"
14769 {
14770 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14771 }
14772#line 14773 "parse.c"
14773 break;
14774
14775 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14776#line 4669 "parse.y"
14777 {
14778 restore_defun(p, (yyvsp[-4].node_def_temp));
14779 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14780 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14781 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14782 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14783 local_pop(p);
14784 }
14785#line 14786 "parse.c"
14786 break;
14787
14788 case 393: /* primary: "'break'" */
14789#line 4678 "parse.y"
14790 {
14791 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14792 /*% ripper: break!(args_new!) %*/
14793 }
14794#line 14795 "parse.c"
14795 break;
14796
14797 case 394: /* primary: "'next'" */
14798#line 4683 "parse.y"
14799 {
14800 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14801 /*% ripper: next!(args_new!) %*/
14802 }
14803#line 14804 "parse.c"
14804 break;
14805
14806 case 395: /* primary: "'redo'" */
14807#line 4688 "parse.y"
14808 {
14809 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14810 /*% ripper: redo! %*/
14811 }
14812#line 14813 "parse.c"
14813 break;
14814
14815 case 396: /* primary: "'retry'" */
14816#line 4693 "parse.y"
14817 {
14818 if (!p->ctxt.in_defined) {
14819 switch (p->ctxt.in_rescue) {
14820 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14821 case after_rescue: /* ok */ break;
14822 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14823 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14824 }
14825 }
14826 (yyval.node) = NEW_RETRY(&(yyloc));
14827 /*% ripper: retry! %*/
14828 }
14829#line 14830 "parse.c"
14830 break;
14831
14832 case 397: /* value_expr_primary: primary */
14833#line 3146 "parse.y"
14834 {
14835 value_expr(p, (yyvsp[0].node));
14836 (yyval.node) = (yyvsp[0].node);
14837 }
14838#line 14839 "parse.c"
14839 break;
14840
14841 case 399: /* k_begin: "'begin'" */
14842#line 4711 "parse.y"
14843 {
14844 token_info_push(p, "begin", &(yyloc));
14845 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14846 }
14847#line 14848 "parse.c"
14848 break;
14849
14850 case 400: /* k_if: "'if'" */
14851#line 4718 "parse.y"
14852 {
14853 WARN_EOL("if");
14854 token_info_push(p, "if", &(yyloc));
14855 if (p->token_info && p->token_info->nonspc &&
14856 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14857 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14858 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14859 beg += rb_strlen_lit("else");
14860 while (beg < tok && ISSPACE(*beg)) beg++;
14861 if (beg == tok) {
14862 p->token_info->nonspc = 0;
14863 }
14864 }
14865 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14866 }
14867#line 14868 "parse.c"
14868 break;
14869
14870 case 401: /* k_unless: "'unless'" */
14871#line 4736 "parse.y"
14872 {
14873 token_info_push(p, "unless", &(yyloc));
14874 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14875 }
14876#line 14877 "parse.c"
14877 break;
14878
14879 case 402: /* k_while: "'while'" allow_exits */
14880#line 4743 "parse.y"
14881 {
14882 (yyval.node_exits) = (yyvsp[0].node_exits);
14883 token_info_push(p, "while", &(yyloc));
14884 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14885 }
14886#line 14887 "parse.c"
14887 break;
14888
14889 case 403: /* k_until: "'until'" allow_exits */
14890#line 4751 "parse.y"
14891 {
14892 (yyval.node_exits) = (yyvsp[0].node_exits);
14893 token_info_push(p, "until", &(yyloc));
14894 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14895 }
14896#line 14897 "parse.c"
14897 break;
14898
14899 case 404: /* k_case: "'case'" */
14900#line 4759 "parse.y"
14901 {
14902 token_info_push(p, "case", &(yyloc));
14903 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14904 }
14905#line 14906 "parse.c"
14906 break;
14907
14908 case 405: /* k_for: "'for'" allow_exits */
14909#line 4766 "parse.y"
14910 {
14911 (yyval.node_exits) = (yyvsp[0].node_exits);
14912 token_info_push(p, "for", &(yyloc));
14913 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14914 }
14915#line 14916 "parse.c"
14916 break;
14917
14918 case 406: /* k_class: "'class'" */
14919#line 4774 "parse.y"
14920 {
14921 token_info_push(p, "class", &(yyloc));
14922 (yyval.ctxt) = p->ctxt;
14923 p->ctxt.in_rescue = before_rescue;
14924 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14925 }
14926#line 14927 "parse.c"
14927 break;
14928
14929 case 407: /* k_module: "'module'" */
14930#line 4783 "parse.y"
14931 {
14932 token_info_push(p, "module", &(yyloc));
14933 (yyval.ctxt) = p->ctxt;
14934 p->ctxt.in_rescue = before_rescue;
14935 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14936 }
14937#line 14938 "parse.c"
14938 break;
14939
14940 case 408: /* k_def: "'def'" */
14941#line 4792 "parse.y"
14942 {
14943 token_info_push(p, "def", &(yyloc));
14944 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14945 p->ctxt.in_argdef = 1;
14946 }
14947#line 14948 "parse.c"
14948 break;
14949
14950 case 409: /* k_do: "'do'" */
14951#line 4800 "parse.y"
14952 {
14953 token_info_push(p, "do", &(yyloc));
14954 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14955 }
14956#line 14957 "parse.c"
14957 break;
14958
14959 case 410: /* k_do_block: "'do' for block" */
14960#line 4807 "parse.y"
14961 {
14962 token_info_push(p, "do", &(yyloc));
14963 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14964 }
14965#line 14966 "parse.c"
14966 break;
14967
14968 case 411: /* k_rescue: "'rescue'" */
14969#line 4814 "parse.y"
14970 {
14971 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14972 (yyval.ctxt) = p->ctxt;
14973 p->ctxt.in_rescue = after_rescue;
14974 }
14975#line 14976 "parse.c"
14976 break;
14977
14978 case 412: /* k_ensure: "'ensure'" */
14979#line 4822 "parse.y"
14980 {
14981 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14982 (yyval.ctxt) = p->ctxt;
14983 }
14984#line 14985 "parse.c"
14985 break;
14986
14987 case 413: /* k_when: "'when'" */
14988#line 4829 "parse.y"
14989 {
14990 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14991 }
14992#line 14993 "parse.c"
14993 break;
14994
14995 case 414: /* k_else: "'else'" */
14996#line 4835 "parse.y"
14997 {
14998 token_info *ptinfo_beg = p->token_info;
14999 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15000 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15001 if (same) {
15002 token_info e;
15003 e.next = ptinfo_beg->next;
15004 e.token = "else";
15005 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15006 if (!e.nonspc) *ptinfo_beg = e;
15007 }
15008 }
15009#line 15010 "parse.c"
15010 break;
15011
15012 case 415: /* k_elsif: "'elsif'" */
15013#line 4850 "parse.y"
15014 {
15015 WARN_EOL("elsif");
15016 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15017 }
15018#line 15019 "parse.c"
15019 break;
15020
15021 case 416: /* k_end: "'end'" */
15022#line 4857 "parse.y"
15023 {
15024 token_info_pop(p, "end", &(yyloc));
15025 pop_end_expect_token_locations(p);
15026 }
15027#line 15028 "parse.c"
15028 break;
15029
15030 case 417: /* k_end: "dummy end" */
15031#line 4862 "parse.y"
15032 {
15033 compile_error(p, "syntax error, unexpected end-of-input");
15034 }
15035#line 15036 "parse.c"
15036 break;
15037
15038 case 418: /* k_return: "'return'" */
15039#line 4868 "parse.y"
15040 {
15041 if (p->ctxt.cant_return && !dyna_in_block(p))
15042 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15043 }
15044#line 15045 "parse.c"
15045 break;
15046
15047 case 419: /* k_yield: "'yield'" */
15048#line 4875 "parse.y"
15049 {
15050 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15051 yyerror1(&(yylsp[0]), "Invalid yield");
15052 }
15053#line 15054 "parse.c"
15054 break;
15055
15056 case 424: /* do: "'do' for condition" */
15057#line 4887 "parse.y"
15058 { (yyval.id) = keyword_do_cond; }
15059#line 15060 "parse.c"
15060 break;
15061
15062 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15063#line 4894 "parse.y"
15064 {
15065 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15066 fixpos((yyval.node), (yyvsp[-3].node));
15067 /*% ripper: elsif!($:2, $:4, $:5) %*/
15068 }
15069#line 15070 "parse.c"
15070 break;
15071
15072 case 428: /* opt_else: k_else compstmt_stmts */
15073#line 4903 "parse.y"
15074 {
15075 (yyval.node) = (yyvsp[0].node);
15076 /*% ripper: else!($:2) %*/
15077 }
15078#line 15079 "parse.c"
15079 break;
15080
15081 case 431: /* f_marg: f_norm_arg */
15082#line 4914 "parse.y"
15083 {
15084 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15085 mark_lvar_used(p, (yyval.node));
15086 }
15087#line 15088 "parse.c"
15088 break;
15089
15090 case 432: /* f_marg: "(" f_margs rparen */
15091#line 4919 "parse.y"
15092 {
15093 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15094 /*% ripper: mlhs_paren!($:2) %*/
15095 }
15096#line 15097 "parse.c"
15097 break;
15098
15099 case 433: /* mlhs_items_f_marg: f_marg */
15100#line 3033 "parse.y"
15101 {
15102 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15103 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15104 }
15105#line 15106 "parse.c"
15106 break;
15107
15108 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15109#line 3038 "parse.y"
15110 {
15111 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15112 /*% ripper: mlhs_add!($:1, $:3) %*/
15113 }
15114#line 15115 "parse.c"
15115 break;
15116
15117 case 435: /* f_margs: mlhs_items_f_marg */
15118#line 4927 "parse.y"
15119 {
15120 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15121 /*% ripper: $:1 %*/
15122 }
15123#line 15124 "parse.c"
15124 break;
15125
15126 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15127#line 4932 "parse.y"
15128 {
15129 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15130 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15131 }
15132#line 15133 "parse.c"
15133 break;
15134
15135 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15136#line 4937 "parse.y"
15137 {
15138 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15139 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15140 }
15141#line 15142 "parse.c"
15142 break;
15143
15144 case 438: /* f_margs: f_rest_marg */
15145#line 4942 "parse.y"
15146 {
15147 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15148 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15149 }
15150#line 15151 "parse.c"
15151 break;
15152
15153 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15154#line 4947 "parse.y"
15155 {
15156 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15157 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15158 }
15159#line 15160 "parse.c"
15160 break;
15161
15162 case 440: /* f_rest_marg: "*" f_norm_arg */
15163#line 4954 "parse.y"
15164 {
15165 /*% ripper: $:2 %*/
15166 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15167 mark_lvar_used(p, (yyval.node));
15168 }
15169#line 15170 "parse.c"
15170 break;
15171
15172 case 441: /* f_rest_marg: "*" */
15173#line 4960 "parse.y"
15174 {
15175 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15176 /*% ripper: Qnil %*/
15177 }
15178#line 15179 "parse.c"
15179 break;
15180
15181 case 443: /* f_any_kwrest: f_no_kwarg */
15182#line 4968 "parse.y"
15183 {
15184 (yyval.id) = idNil;
15185 /*% ripper: ID2VAL(idNil) %*/
15186 }
15187#line 15188 "parse.c"
15188 break;
15189
15190 case 444: /* $@25: %empty */
15191#line 4974 "parse.y"
15192 {p->ctxt.in_argdef = 0;}
15193#line 15194 "parse.c"
15194 break;
15195
15196 case 446: /* f_kw_primary_value: f_label primary_value */
15197#line 3005 "parse.y"
15198 {
15199 p->ctxt.in_argdef = 1;
15200 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15201 /*% ripper: [$:$, $:value] %*/
15202 }
15203#line 15204 "parse.c"
15204 break;
15205
15206 case 447: /* f_kw_primary_value: f_label */
15207#line 3011 "parse.y"
15208 {
15209 p->ctxt.in_argdef = 1;
15210 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15211 /*% ripper: [$:$, 0] %*/
15212 }
15213#line 15214 "parse.c"
15214 break;
15215
15216 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15217#line 3020 "parse.y"
15218 {
15219 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15220 /*% ripper: rb_ary_new3(1, $:1) %*/
15221 }
15222#line 15223 "parse.c"
15223 break;
15224
15225 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15226#line 3025 "parse.y"
15227 {
15228 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15229 /*% ripper: rb_ary_push($:1, $:3) %*/
15230 }
15231#line 15232 "parse.c"
15232 break;
15233
15234 case 450: /* args_tail_basic_primary_value: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
15235#line 2928 "parse.y"
15236 {
15237 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15238 /*% ripper: [$:1, $:3, $:4] %*/
15239 }
15240#line 15241 "parse.c"
15241 break;
15242
15243 case 451: /* args_tail_basic_primary_value: f_kwarg_primary_value opt_f_block_arg */
15244#line 2933 "parse.y"
15245 {
15246 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15247 /*% ripper: [$:1, Qnil, $:2] %*/
15248 }
15249#line 15250 "parse.c"
15250 break;
15251
15252 case 452: /* args_tail_basic_primary_value: f_any_kwrest opt_f_block_arg */
15253#line 2938 "parse.y"
15254 {
15255 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15256 /*% ripper: [Qnil, $:1, $:2] %*/
15257 }
15258#line 15259 "parse.c"
15259 break;
15260
15261 case 453: /* args_tail_basic_primary_value: f_block_arg */
15262#line 2943 "parse.y"
15263 {
15264 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15265 /*% ripper: [Qnil, Qnil, $:1] %*/
15266 }
15267#line 15268 "parse.c"
15268 break;
15269
15270 case 455: /* excessed_comma: ',' */
15271#line 4980 "parse.y"
15272 {
15273 /* magic number for rest_id in iseq_set_arguments() */
15274 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15275 /*% ripper: excessed_comma! %*/
15276 }
15277#line 15278 "parse.c"
15278 break;
15279
15280 case 456: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15281#line 2983 "parse.y"
15282 {
15283 p->ctxt.in_argdef = 1;
15284 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15285 /*% ripper: [$:$, $:3] %*/
15286 }
15287#line 15288 "parse.c"
15288 break;
15289
15290 case 457: /* f_opt_arg_primary_value: f_opt_primary_value */
15291#line 2992 "parse.y"
15292 {
15293 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15294 /*% ripper: rb_ary_new3(1, $:1) %*/
15295 }
15296#line 15297 "parse.c"
15297 break;
15298
15299 case 458: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15300#line 2997 "parse.y"
15301 {
15302 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15303 /*% ripper: rb_ary_push($:1, $:3) %*/
15304 }
15305#line 15306 "parse.c"
15306 break;
15307
15308 case 459: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15309#line 3092 "parse.y"
15310 {
15311 (yyval.node_args) = (yyvsp[0].node_args);
15312 /*% ripper: $:2 %*/
15313 }
15314#line 15315 "parse.c"
15315 break;
15316
15317 case 460: /* opt_args_tail_block_args_tail: %empty */
15318#line 3097 "parse.y"
15319 {
15320 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15321 /*% ripper: [Qnil, Qnil, Qnil] %*/
15322 }
15323#line 15324 "parse.c"
15324 break;
15325
15326 case 461: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15327#line 4988 "parse.y"
15328 {
15329 (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));
15330 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
15331 }
15332#line 15333 "parse.c"
15333 break;
15334
15335 case 462: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15336#line 4993 "parse.y"
15337 {
15338 (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));
15339 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
15340 }
15341#line 15342 "parse.c"
15342 break;
15343
15344 case 463: /* block_param: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail */
15345#line 4998 "parse.y"
15346 {
15347 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15348 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
15349 }
15350#line 15351 "parse.c"
15351 break;
15352
15353 case 464: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15354#line 5003 "parse.y"
15355 {
15356 (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));
15357 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
15358 }
15359#line 15360 "parse.c"
15360 break;
15361
15362 case 465: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
15363#line 5008 "parse.y"
15364 {
15365 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15366 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
15367 }
15368#line 15369 "parse.c"
15369 break;
15370
15371 case 466: /* block_param: f_arg excessed_comma */
15372#line 5013 "parse.y"
15373 {
15374 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15375 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15376 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
15377 }
15378#line 15379 "parse.c"
15379 break;
15380
15381 case 467: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15382#line 5019 "parse.y"
15383 {
15384 (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));
15385 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
15386 }
15387#line 15388 "parse.c"
15388 break;
15389
15390 case 468: /* block_param: f_arg opt_args_tail_block_args_tail */
15391#line 5024 "parse.y"
15392 {
15393 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15394 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
15395 }
15396#line 15397 "parse.c"
15397 break;
15398
15399 case 469: /* block_param: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15400#line 5029 "parse.y"
15401 {
15402 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15403 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
15404 }
15405#line 15406 "parse.c"
15406 break;
15407
15408 case 470: /* block_param: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15409#line 5034 "parse.y"
15410 {
15411 (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));
15412 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
15413 }
15414#line 15415 "parse.c"
15415 break;
15416
15417 case 471: /* block_param: f_opt_arg_primary_value opt_args_tail_block_args_tail */
15418#line 5039 "parse.y"
15419 {
15420 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15421 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
15422 }
15423#line 15424 "parse.c"
15424 break;
15425
15426 case 472: /* block_param: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15427#line 5044 "parse.y"
15428 {
15429 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15430 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
15431 }
15432#line 15433 "parse.c"
15433 break;
15434
15435 case 473: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
15436#line 5049 "parse.y"
15437 {
15438 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15439 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
15440 }
15441#line 15442 "parse.c"
15442 break;
15443
15444 case 474: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15445#line 5054 "parse.y"
15446 {
15447 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15448 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
15449 }
15450#line 15451 "parse.c"
15451 break;
15452
15453 case 475: /* block_param: block_args_tail */
15454#line 5059 "parse.y"
15455 {
15456 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15457 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
15458 }
15459#line 15460 "parse.c"
15460 break;
15461
15462 case 477: /* opt_block_param_def: block_param_def */
15463#line 5067 "parse.y"
15464 {
15465 p->command_start = TRUE;
15466 }
15467#line 15468 "parse.c"
15468 break;
15469
15470 case 478: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15471#line 5073 "parse.y"
15472 {
15473 p->max_numparam = ORDINAL_PARAM;
15474 p->ctxt.in_argdef = 0;
15475 (yyval.node_args) = (yyvsp[-2].node_args);
15476 /*% ripper: block_var!($:2, $:3) %*/
15477 }
15478#line 15479 "parse.c"
15479 break;
15480
15481 case 479: /* opt_block_param: %empty */
15482#line 5082 "parse.y"
15483 {
15484 (yyval.node_args) = 0;
15485 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15486 }
15487#line 15488 "parse.c"
15488 break;
15489
15490 case 481: /* opt_bv_decl: option_'\n' */
15491#line 5090 "parse.y"
15492 {
15493 (yyval.id) = 0;
15494 /*% ripper: Qfalse %*/
15495 }
15496#line 15497 "parse.c"
15497 break;
15498
15499 case 482: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15500#line 5095 "parse.y"
15501 {
15502 (yyval.id) = 0;
15503 /*% ripper: $:3 %*/
15504 }
15505#line 15506 "parse.c"
15506 break;
15507
15508 case 485: /* bvar: "local variable or method" */
15509#line 5108 "parse.y"
15510 {
15511 new_bv(p, (yyvsp[0].id));
15512 /*% ripper: $:1 %*/
15513 }
15514#line 15515 "parse.c"
15515 break;
15516
15517 case 487: /* max_numparam: %empty */
15518#line 5115 "parse.y"
15519 {
15520 (yyval.num) = p->max_numparam;
15521 p->max_numparam = 0;
15522 }
15523#line 15524 "parse.c"
15524 break;
15525
15526 case 488: /* numparam: %empty */
15527#line 5121 "parse.y"
15528 {
15529 (yyval.node) = numparam_push(p);
15530 }
15531#line 15532 "parse.c"
15532 break;
15533
15534 case 489: /* it_id: %empty */
15535#line 5126 "parse.y"
15536 {
15537 (yyval.id) = p->it_id;
15538 p->it_id = 0;
15539 }
15540#line 15541 "parse.c"
15541 break;
15542
15543 case 490: /* @26: %empty */
15544#line 5133 "parse.y"
15545 {
15546 token_info_push(p, "->", &(yylsp[0]));
15547 (yyval.vars) = dyna_push(p);
15548 }
15549#line 15550 "parse.c"
15550 break;
15551
15552 case 491: /* $@27: %empty */
15553#line 5139 "parse.y"
15554 {
15555 CMDARG_PUSH(0);
15556 }
15557#line 15558 "parse.c"
15558 break;
15559
15560 case 492: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15561#line 5143 "parse.y"
15562 {
15563 int max_numparam = p->max_numparam;
15564 ID it_id = p->it_id;
15565 p->lex.lpar_beg = (yyvsp[-8].num);
15566 p->max_numparam = (yyvsp[-6].num);
15567 p->it_id = (yyvsp[-4].id);
15568 restore_block_exit(p, (yyvsp[-3].node_exits));
15569 CMDARG_POP();
15570 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15571 {
15572 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15573 (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);
15574 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15575 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15576 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15577 xfree((yyvsp[0].locations_lambda_body));
15578 }
15579 /*% ripper: lambda!($:args, $:body) %*/
15580 numparam_pop(p, (yyvsp[-5].node));
15581 dyna_pop(p, (yyvsp[-7].vars));
15582 }
15583#line 15584 "parse.c"
15584 break;
15585
15586 case 493: /* f_larglist: '(' f_args opt_bv_decl ')' */
15587#line 5167 "parse.y"
15588 {
15589 p->ctxt.in_argdef = 0;
15590 (yyval.node_args) = (yyvsp[-2].node_args);
15591 p->max_numparam = ORDINAL_PARAM;
15592 /*% ripper: paren!($:2) %*/
15593 }
15594#line 15595 "parse.c"
15595 break;
15596
15597 case 494: /* f_larglist: f_args */
15598#line 5174 "parse.y"
15599 {
15600 p->ctxt.in_argdef = 0;
15601 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15602 p->max_numparam = ORDINAL_PARAM;
15603 (yyval.node_args) = (yyvsp[0].node_args);
15604 }
15605#line 15606 "parse.c"
15606 break;
15607
15608 case 495: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15609#line 5183 "parse.y"
15610 {
15611 token_info_pop(p, "}", &(yylsp[0]));
15612 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15613 /*% ripper: $:2 %*/
15614 }
15615#line 15616 "parse.c"
15616 break;
15617
15618 case 496: /* $@28: %empty */
15619#line 5189 "parse.y"
15620 {
15621 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15622 }
15623#line 15624 "parse.c"
15624 break;
15625
15626 case 497: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15627#line 5193 "parse.y"
15628 {
15629 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15630 /*% ripper: $:3 %*/
15631 }
15632#line 15633 "parse.c"
15633 break;
15634
15635 case 498: /* do_block: k_do_block do_body k_end */
15636#line 5200 "parse.y"
15637 {
15638 (yyval.node) = (yyvsp[-1].node);
15639 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15640 /*% ripper: $:2 %*/
15641 }
15642#line 15643 "parse.c"
15643 break;
15644
15645 case 499: /* block_call: command do_block */
15646#line 5208 "parse.y"
15647 {
15648 (yyval.node) = command_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15649 fixpos((yyval.node), (yyvsp[-1].node));
15650 /*% ripper: method_add_block!($:1, $:2) %*/
15651 }
15652#line 15653 "parse.c"
15653 break;
15654
15655 case 500: /* block_call: block_call call_op2 operation2 opt_paren_args */
15656#line 5214 "parse.y"
15657 {
15658 bool has_args = (yyvsp[0].node) != 0;
15659 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15660 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15661 /*% ripper: call!($:1, $:2, $:3) %*/
15662 if (has_args) {
15663 /*% ripper: method_add_arg!($:$, $:4) %*/
15664 }
15665 }
15666#line 15667 "parse.c"
15667 break;
15668
15669 case 501: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15670#line 5224 "parse.y"
15671 {
15672 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15673 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15674 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15675 }
15676#line 15677 "parse.c"
15677 break;
15678
15679 case 502: /* block_call: block_call call_op2 operation2 command_args do_block */
15680#line 5230 "parse.y"
15681 {
15682 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15683 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15684 }
15685#line 15686 "parse.c"
15686 break;
15687
15688 case 503: /* block_call: block_call call_op2 paren_args */
15689#line 5235 "parse.y"
15690 {
15691 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15692 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15693 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15694 }
15695#line 15696 "parse.c"
15696 break;
15697
15698 case 504: /* method_call: fcall paren_args */
15699#line 5243 "parse.y"
15700 {
15701 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15702 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15703 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15704 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15705 }
15706#line 15707 "parse.c"
15707 break;
15708
15709 case 505: /* method_call: primary_value call_op operation2 opt_paren_args */
15710#line 5250 "parse.y"
15711 {
15712 bool has_args = (yyvsp[0].node) != 0;
15713 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15714 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15715 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15716 /*% ripper: call!($:1, $:2, $:3) %*/
15717 if (has_args) {
15718 /*% ripper: method_add_arg!($:$, $:4) %*/
15719 }
15720 }
15721#line 15722 "parse.c"
15722 break;
15723
15724 case 506: /* method_call: primary_value "::" operation2 paren_args */
15725#line 5261 "parse.y"
15726 {
15727 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15728 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15729 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15730 }
15731#line 15732 "parse.c"
15732 break;
15733
15734 case 507: /* method_call: primary_value "::" operation3 */
15735#line 5267 "parse.y"
15736 {
15737 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15738 /*% ripper: call!($:1, $:2, $:3) %*/
15739 }
15740#line 15741 "parse.c"
15741 break;
15742
15743 case 508: /* method_call: primary_value call_op2 paren_args */
15744#line 5272 "parse.y"
15745 {
15746 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15747 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15748 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15749 }
15750#line 15751 "parse.c"
15751 break;
15752
15753 case 509: /* method_call: "'super'" paren_args */
15754#line 5278 "parse.y"
15755 {
15756 rb_code_location_t lparen_loc = (yylsp[0]);
15757 rb_code_location_t rparen_loc = (yylsp[0]);
15758 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15759 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15760
15761 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15762 /*% ripper: super!($:2) %*/
15763 }
15764#line 15765 "parse.c"
15765 break;
15766
15767 case 510: /* method_call: "'super'" */
15768#line 5288 "parse.y"
15769 {
15770 (yyval.node) = NEW_ZSUPER(&(yyloc));
15771 /*% ripper: zsuper! %*/
15772 }
15773#line 15774 "parse.c"
15774 break;
15775
15776 case 511: /* method_call: primary_value '[' opt_call_args rbracket */
15777#line 5293 "parse.y"
15778 {
15779 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15780 fixpos((yyval.node), (yyvsp[-3].node));
15781 /*% ripper: aref!($:1, $:3) %*/
15782 }
15783#line 15784 "parse.c"
15784 break;
15785
15786 case 512: /* brace_block: '{' brace_body '}' */
15787#line 5301 "parse.y"
15788 {
15789 (yyval.node) = (yyvsp[-1].node);
15790 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15791 /*% ripper: $:2 %*/
15792 }
15793#line 15794 "parse.c"
15794 break;
15795
15796 case 513: /* brace_block: k_do do_body k_end */
15797#line 5307 "parse.y"
15798 {
15799 (yyval.node) = (yyvsp[-1].node);
15800 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15801 /*% ripper: $:2 %*/
15802 }
15803#line 15804 "parse.c"
15804 break;
15805
15806 case 514: /* @29: %empty */
15807#line 5314 "parse.y"
15808 {(yyval.vars) = dyna_push(p);}
15809#line 15810 "parse.c"
15810 break;
15811
15812 case 515: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
15813#line 5317 "parse.y"
15814 {
15815 int max_numparam = p->max_numparam;
15816 ID it_id = p->it_id;
15817 p->max_numparam = (yyvsp[-5].num);
15818 p->it_id = (yyvsp[-3].id);
15819 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15820 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15821 /*% ripper: brace_block!($:args, $:compstmt) %*/
15822 restore_block_exit(p, (yyvsp[-2].node_exits));
15823 numparam_pop(p, (yyvsp[-4].node));
15824 dyna_pop(p, (yyvsp[-6].vars));
15825 }
15826#line 15827 "parse.c"
15827 break;
15828
15829 case 516: /* @30: %empty */
15830#line 5331 "parse.y"
15831 {
15832 (yyval.vars) = dyna_push(p);
15833 CMDARG_PUSH(0);
15834 }
15835#line 15836 "parse.c"
15836 break;
15837
15838 case 517: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
15839#line 5337 "parse.y"
15840 {
15841 int max_numparam = p->max_numparam;
15842 ID it_id = p->it_id;
15843 p->max_numparam = (yyvsp[-5].num);
15844 p->it_id = (yyvsp[-3].id);
15845 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15846 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15847 /*% ripper: do_block!($:args, $:bodystmt) %*/
15848 CMDARG_POP();
15849 restore_block_exit(p, (yyvsp[-2].node_exits));
15850 numparam_pop(p, (yyvsp[-4].node));
15851 dyna_pop(p, (yyvsp[-6].vars));
15852 }
15853#line 15854 "parse.c"
15854 break;
15855
15856 case 518: /* case_args: arg_value */
15857#line 5353 "parse.y"
15858 {
15859 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15860 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15861 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15862 }
15863#line 15864 "parse.c"
15864 break;
15865
15866 case 519: /* case_args: "*" arg_value */
15867#line 5359 "parse.y"
15868 {
15869 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15870 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15871 }
15872#line 15873 "parse.c"
15873 break;
15874
15875 case 520: /* case_args: case_args ',' arg_value */
15876#line 5364 "parse.y"
15877 {
15878 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15879 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15880 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15881 }
15882#line 15883 "parse.c"
15883 break;
15884
15885 case 521: /* case_args: case_args ',' "*" arg_value */
15886#line 5370 "parse.y"
15887 {
15888 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15889 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15890 }
15891#line 15892 "parse.c"
15892 break;
15893
15894 case 522: /* case_body: k_when case_args then compstmt_stmts cases */
15895#line 5379 "parse.y"
15896 {
15897 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15898 fixpos((yyval.node), (yyvsp[-3].node));
15899 /*% ripper: when!($:2, $:4, $:5) %*/
15900 }
15901#line 15902 "parse.c"
15902 break;
15903
15904 case 525: /* p_pvtbl: %empty */
15905#line 5390 "parse.y"
15906 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15907#line 15908 "parse.c"
15908 break;
15909
15910 case 526: /* p_pktbl: %empty */
15911#line 5391 "parse.y"
15912 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15913#line 15914 "parse.c"
15914 break;
15915
15916 case 527: /* p_in_kwarg: %empty */
15917#line 5393 "parse.y"
15918 {
15919 (yyval.ctxt) = p->ctxt;
15920 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15921 p->command_start = FALSE;
15922 p->ctxt.in_kwarg = 1;
15923 p->ctxt.in_alt_pattern = 0;
15924 p->ctxt.capture_in_pattern = 0;
15925 }
15926#line 15927 "parse.c"
15927 break;
15928
15929 case 528: /* $@31: %empty */
15930#line 5406 "parse.y"
15931 {
15932 pop_pktbl(p, (yyvsp[-2].tbl));
15933 pop_pvtbl(p, (yyvsp[-3].tbl));
15934 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15935 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
15936 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
15937 }
15938#line 15939 "parse.c"
15939 break;
15940
15941 case 529: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
15942#line 5415 "parse.y"
15943 {
15944 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
15945 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15946 }
15947#line 15948 "parse.c"
15948 break;
15949
15950 case 533: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15951#line 5427 "parse.y"
15952 {
15953 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15954 fixpos((yyval.node), (yyvsp[0].node));
15955 /*% ripper: if_mod!($:3, $:1) %*/
15956 }
15957#line 15958 "parse.c"
15958 break;
15959
15960 case 534: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15961#line 5433 "parse.y"
15962 {
15963 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15964 fixpos((yyval.node), (yyvsp[0].node));
15965 /*% ripper: unless_mod!($:3, $:1) %*/
15966 }
15967#line 15968 "parse.c"
15968 break;
15969
15970 case 536: /* p_top_expr_body: p_expr ',' */
15971#line 5442 "parse.y"
15972 {
15973 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15974 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15975 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15976 }
15977#line 15978 "parse.c"
15978 break;
15979
15980 case 537: /* p_top_expr_body: p_expr ',' p_args */
15981#line 5448 "parse.y"
15982 {
15983 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15984 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15985 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15986 }
15987#line 15988 "parse.c"
15988 break;
15989
15990 case 538: /* p_top_expr_body: p_find */
15991#line 5454 "parse.y"
15992 {
15993 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15994 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15995 }
15996#line 15997 "parse.c"
15997 break;
15998
15999 case 539: /* p_top_expr_body: p_args_tail */
16000#line 5459 "parse.y"
16001 {
16002 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16003 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16004 }
16005#line 16006 "parse.c"
16006 break;
16007
16008 case 540: /* p_top_expr_body: p_kwargs */
16009#line 5464 "parse.y"
16010 {
16011 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16012 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16013 }
16014#line 16015 "parse.c"
16015 break;
16016
16017 case 542: /* p_as: p_expr "=>" p_variable */
16018#line 5474 "parse.y"
16019 {
16020 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16021 n = list_append(p, n, (yyvsp[0].node));
16022 (yyval.node) = new_hash(p, n, &(yyloc));
16023 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16024 }
16025#line 16026 "parse.c"
16026 break;
16027
16028 case 544: /* $@32: %empty */
16029#line 5484 "parse.y"
16030 {
16031 p->ctxt.in_alt_pattern = 1;
16032 }
16033#line 16034 "parse.c"
16034 break;
16035
16036 case 545: /* p_alt: p_alt '|' $@32 p_expr_basic */
16037#line 5488 "parse.y"
16038 {
16039 if (p->ctxt.capture_in_pattern) {
16040 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16041 }
16042 p->ctxt.in_alt_pattern = 0;
16043 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16044 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16045 }
16046#line 16047 "parse.c"
16047 break;
16048
16049 case 547: /* p_lparen: '(' p_pktbl */
16050#line 5500 "parse.y"
16051 {
16052 (yyval.tbl) = (yyvsp[0].tbl);
16053 /*% ripper: $:2 %*/
16054 }
16055#line 16056 "parse.c"
16056 break;
16057
16058 case 548: /* p_lbracket: '[' p_pktbl */
16059#line 5507 "parse.y"
16060 {
16061 (yyval.tbl) = (yyvsp[0].tbl);
16062 /*% ripper: $:2 %*/
16063 }
16064#line 16065 "parse.c"
16065 break;
16066
16067 case 551: /* p_expr_basic: p_const p_lparen p_args rparen */
16068#line 5516 "parse.y"
16069 {
16070 pop_pktbl(p, (yyvsp[-2].tbl));
16071 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16072 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16073 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16074 }
16075#line 16076 "parse.c"
16076 break;
16077
16078 case 552: /* p_expr_basic: p_const p_lparen p_find rparen */
16079#line 5523 "parse.y"
16080 {
16081 pop_pktbl(p, (yyvsp[-2].tbl));
16082 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16083 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16084 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16085 }
16086#line 16087 "parse.c"
16087 break;
16088
16089 case 553: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16090#line 5530 "parse.y"
16091 {
16092 pop_pktbl(p, (yyvsp[-2].tbl));
16093 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16094 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16095 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16096 }
16097#line 16098 "parse.c"
16098 break;
16099
16100 case 554: /* p_expr_basic: p_const '(' rparen */
16101#line 5537 "parse.y"
16102 {
16103 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16104 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16105 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16106 }
16107#line 16108 "parse.c"
16108 break;
16109
16110 case 555: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16111#line 5543 "parse.y"
16112 {
16113 pop_pktbl(p, (yyvsp[-2].tbl));
16114 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16115 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16116 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16117 }
16118#line 16119 "parse.c"
16119 break;
16120
16121 case 556: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16122#line 5550 "parse.y"
16123 {
16124 pop_pktbl(p, (yyvsp[-2].tbl));
16125 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16126 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16127 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16128 }
16129#line 16130 "parse.c"
16130 break;
16131
16132 case 557: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16133#line 5557 "parse.y"
16134 {
16135 pop_pktbl(p, (yyvsp[-2].tbl));
16136 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16137 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16138 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16139 }
16140#line 16141 "parse.c"
16141 break;
16142
16143 case 558: /* p_expr_basic: p_const '[' rbracket */
16144#line 5564 "parse.y"
16145 {
16146 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16147 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16148 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
16149 }
16150#line 16151 "parse.c"
16151 break;
16152
16153 case 559: /* p_expr_basic: "[" p_args rbracket */
16154#line 5570 "parse.y"
16155 {
16156 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16157 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16158 }
16159#line 16160 "parse.c"
16160 break;
16161
16162 case 560: /* p_expr_basic: "[" p_find rbracket */
16163#line 5575 "parse.y"
16164 {
16165 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16166 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16167 }
16168#line 16169 "parse.c"
16169 break;
16170
16171 case 561: /* p_expr_basic: "[" rbracket */
16172#line 5580 "parse.y"
16173 {
16174 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16175 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16176 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16177 }
16178#line 16179 "parse.c"
16179 break;
16180
16181 case 562: /* $@33: %empty */
16182#line 5586 "parse.y"
16183 {
16184 p->ctxt.in_kwarg = 0;
16185 }
16186#line 16187 "parse.c"
16187 break;
16188
16189 case 563: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16190#line 5590 "parse.y"
16191 {
16192 pop_pktbl(p, (yyvsp[-4].tbl));
16193 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16194 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16195 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16196 }
16197#line 16198 "parse.c"
16198 break;
16199
16200 case 564: /* p_expr_basic: "{" rbrace */
16201#line 5597 "parse.y"
16202 {
16203 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16204 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16205 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16206 }
16207#line 16208 "parse.c"
16208 break;
16209
16210 case 565: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16211#line 5603 "parse.y"
16212 {
16213 pop_pktbl(p, (yyvsp[-2].tbl));
16214 (yyval.node) = (yyvsp[-1].node);
16215 /*% ripper: $:p_expr %*/
16216 }
16217#line 16218 "parse.c"
16218 break;
16219
16220 case 566: /* p_args: p_expr */
16221#line 5611 "parse.y"
16222 {
16223 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16224 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16225 /*% ripper: [[$:1], Qnil, Qnil] %*/
16226 }
16227#line 16228 "parse.c"
16228 break;
16229
16230 case 567: /* p_args: p_args_head */
16231#line 5617 "parse.y"
16232 {
16233 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16234 /*% ripper: [$:1, Qnil, Qnil] %*/
16235 }
16236#line 16237 "parse.c"
16237 break;
16238
16239 case 568: /* p_args: p_args_head p_arg */
16240#line 5622 "parse.y"
16241 {
16242 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16243 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16244 }
16245#line 16246 "parse.c"
16246 break;
16247
16248 case 569: /* p_args: p_args_head p_rest */
16249#line 5627 "parse.y"
16250 {
16251 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16252 /*% ripper: [$:1, $:2, Qnil] %*/
16253 }
16254#line 16255 "parse.c"
16255 break;
16256
16257 case 570: /* p_args: p_args_head p_rest ',' p_args_post */
16258#line 5632 "parse.y"
16259 {
16260 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16261 /*% ripper: [$:1, $:2, $:4] %*/
16262 }
16263#line 16264 "parse.c"
16264 break;
16265
16266 case 573: /* p_args_head: p_args_head p_arg ',' */
16267#line 5641 "parse.y"
16268 {
16269 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16270 /*% ripper: rb_ary_concat($:1, $:2) %*/
16271 }
16272#line 16273 "parse.c"
16273 break;
16274
16275 case 574: /* p_args_tail: p_rest */
16276#line 5648 "parse.y"
16277 {
16278 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16279 /*% ripper: [Qnil, $:1, Qnil] %*/
16280 }
16281#line 16282 "parse.c"
16282 break;
16283
16284 case 575: /* p_args_tail: p_rest ',' p_args_post */
16285#line 5653 "parse.y"
16286 {
16287 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16288 /*% ripper: [Qnil, $:1, $:3] %*/
16289 }
16290#line 16291 "parse.c"
16291 break;
16292
16293 case 576: /* p_find: p_rest ',' p_args_post ',' p_rest */
16294#line 5660 "parse.y"
16295 {
16296 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16297 /*% ripper: [$:1, $:3, $:5] %*/
16298 }
16299#line 16300 "parse.c"
16300 break;
16301
16302 case 577: /* p_rest: "*" "local variable or method" */
16303#line 5668 "parse.y"
16304 {
16305 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16306 /*% ripper: var_field!($:2) %*/
16307 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16308 }
16309#line 16310 "parse.c"
16310 break;
16311
16312 case 578: /* p_rest: "*" */
16313#line 5674 "parse.y"
16314 {
16315 (yyval.node) = 0;
16316 /*% ripper: var_field!(Qnil) %*/
16317 }
16318#line 16319 "parse.c"
16319 break;
16320
16321 case 580: /* p_args_post: p_args_post ',' p_arg */
16322#line 5682 "parse.y"
16323 {
16324 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16325 /*% ripper: rb_ary_concat($:1, $:3) %*/
16326 }
16327#line 16328 "parse.c"
16328 break;
16329
16330 case 581: /* p_arg: p_expr */
16331#line 5689 "parse.y"
16332 {
16333 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16334 /*% ripper: [$:1] %*/
16335 }
16336#line 16337 "parse.c"
16337 break;
16338
16339 case 582: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16340#line 5696 "parse.y"
16341 {
16342 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16343 /*% ripper: [$:1, $:3] %*/
16344 }
16345#line 16346 "parse.c"
16346 break;
16347
16348 case 583: /* p_kwargs: p_kwarg */
16349#line 5701 "parse.y"
16350 {
16351 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16352 /*% ripper: [$:1, Qnil] %*/
16353 }
16354#line 16355 "parse.c"
16355 break;
16356
16357 case 584: /* p_kwargs: p_kwarg ',' */
16358#line 5706 "parse.y"
16359 {
16360 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16361 /*% ripper: [$:1, Qnil] %*/
16362 }
16363#line 16364 "parse.c"
16364 break;
16365
16366 case 585: /* p_kwargs: p_any_kwrest */
16367#line 5711 "parse.y"
16368 {
16369 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16370 /*% ripper: [[], $:1] %*/
16371 }
16372#line 16373 "parse.c"
16373 break;
16374
16375 case 587: /* p_kwarg: p_kwarg ',' p_kw */
16376#line 5720 "parse.y"
16377 {
16378 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16379 /*% ripper: rb_ary_push($:1, $:3) %*/
16380 }
16381#line 16382 "parse.c"
16382 break;
16383
16384 case 588: /* p_kw: p_kw_label p_expr */
16385#line 5727 "parse.y"
16386 {
16387 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16388 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16389 /*% ripper: [$:1, $:2] %*/
16390 }
16391#line 16392 "parse.c"
16392 break;
16393
16394 case 589: /* p_kw: p_kw_label */
16395#line 5733 "parse.y"
16396 {
16397 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16398 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16399 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16400 }
16401 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16402 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16403 /*% ripper: [$:1, Qnil] %*/
16404 }
16405#line 16406 "parse.c"
16406 break;
16407
16408 case 591: /* p_kw_label: "string literal" string_contents tLABEL_END */
16409#line 5746 "parse.y"
16410 {
16411 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16412 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16413 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16414 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16415 }
16416 else {
16417 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16418 (yyval.id) = rb_intern_str(STR_NEW0());
16419 }
16420 /*% ripper: $:2 %*/
16421 }
16422#line 16423 "parse.c"
16423 break;
16424
16425 case 592: /* p_kwrest: kwrest_mark "local variable or method" */
16426#line 5761 "parse.y"
16427 {
16428 (yyval.id) = (yyvsp[0].id);
16429 /*% ripper: var_field!($:2) %*/
16430 }
16431#line 16432 "parse.c"
16432 break;
16433
16434 case 593: /* p_kwrest: kwrest_mark */
16435#line 5766 "parse.y"
16436 {
16437 (yyval.id) = 0;
16438 /*% ripper: Qnil %*/
16439 }
16440#line 16441 "parse.c"
16441 break;
16442
16443 case 594: /* p_kwnorest: kwrest_mark "'nil'" */
16444#line 5773 "parse.y"
16445 {
16446 (yyval.id) = 0;
16447 }
16448#line 16449 "parse.c"
16449 break;
16450
16451 case 596: /* p_any_kwrest: p_kwnorest */
16452#line 5780 "parse.y"
16453 {
16454 (yyval.id) = idNil;
16455 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16456 }
16457#line 16458 "parse.c"
16458 break;
16459
16460 case 598: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16461#line 3105 "parse.y"
16462 {
16463 value_expr(p, (yyvsp[-2].node));
16464 value_expr(p, (yyvsp[0].node));
16465 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16466 /*% ripper: dot2!($:1, $:3) %*/
16467 }
16468#line 16469 "parse.c"
16469 break;
16470
16471 case 599: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16472#line 3112 "parse.y"
16473 {
16474 value_expr(p, (yyvsp[-2].node));
16475 value_expr(p, (yyvsp[0].node));
16476 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16477 /*% ripper: dot3!($:1, $:3) %*/
16478 }
16479#line 16480 "parse.c"
16480 break;
16481
16482 case 600: /* range_expr_p_primitive: p_primitive ".." */
16483#line 3119 "parse.y"
16484 {
16485 value_expr(p, (yyvsp[-1].node));
16486 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16487 /*% ripper: dot2!($:1, Qnil) %*/
16488 }
16489#line 16490 "parse.c"
16490 break;
16491
16492 case 601: /* range_expr_p_primitive: p_primitive "..." */
16493#line 3125 "parse.y"
16494 {
16495 value_expr(p, (yyvsp[-1].node));
16496 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16497 /*% ripper: dot3!($:1, Qnil) %*/
16498 }
16499#line 16500 "parse.c"
16500 break;
16501
16502 case 602: /* range_expr_p_primitive: "(.." p_primitive */
16503#line 3131 "parse.y"
16504 {
16505 value_expr(p, (yyvsp[0].node));
16506 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16507 /*% ripper: dot2!(Qnil, $:2) %*/
16508 }
16509#line 16510 "parse.c"
16510 break;
16511
16512 case 603: /* range_expr_p_primitive: "(..." p_primitive */
16513#line 3137 "parse.y"
16514 {
16515 value_expr(p, (yyvsp[0].node));
16516 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16517 /*% ripper: dot3!(Qnil, $:2) %*/
16518 }
16519#line 16520 "parse.c"
16520 break;
16521
16522 case 616: /* p_primitive: keyword_variable */
16523#line 5795 "parse.y"
16524 {
16525 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16526 /*% ripper: var_ref!($:1) %*/
16527 }
16528#line 16529 "parse.c"
16529 break;
16530
16531 case 618: /* p_variable: "local variable or method" */
16532#line 5803 "parse.y"
16533 {
16534 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16535 /*% ripper: var_field!($:1) %*/
16536 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16537 }
16538#line 16539 "parse.c"
16539 break;
16540
16541 case 619: /* p_var_ref: '^' "local variable or method" */
16542#line 5811 "parse.y"
16543 {
16544 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16545 if (!n) {
16546 n = NEW_ERROR(&(yyloc));
16547 }
16548 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16549 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16550 }
16551 (yyval.node) = n;
16552 /*% ripper: var_ref!($:2) %*/
16553 }
16554#line 16555 "parse.c"
16555 break;
16556
16557 case 620: /* p_var_ref: '^' nonlocal_var */
16558#line 5823 "parse.y"
16559 {
16560 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16561 /*% ripper: var_ref!($:2) %*/
16562 }
16563#line 16564 "parse.c"
16564 break;
16565
16566 case 621: /* p_expr_ref: '^' "(" expr_value rparen */
16567#line 5830 "parse.y"
16568 {
16569 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16570 /*% ripper: begin!($:3) %*/
16571 }
16572#line 16573 "parse.c"
16573 break;
16574
16575 case 622: /* p_const: ":: at EXPR_BEG" cname */
16576#line 5837 "parse.y"
16577 {
16578 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16579 /*% ripper: top_const_ref!($:2) %*/
16580 }
16581#line 16582 "parse.c"
16582 break;
16583
16584 case 623: /* p_const: p_const "::" cname */
16585#line 5842 "parse.y"
16586 {
16587 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16588 /*% ripper: const_path_ref!($:1, $:3) %*/
16589 }
16590#line 16591 "parse.c"
16591 break;
16592
16593 case 624: /* p_const: "constant" */
16594#line 5847 "parse.y"
16595 {
16596 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16597 /*% ripper: var_ref!($:1) %*/
16598 }
16599#line 16600 "parse.c"
16600 break;
16601
16602 case 625: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16603#line 5856 "parse.y"
16604 {
16605 NODE *err = (yyvsp[-3].node);
16606 if ((yyvsp[-3].node)) {
16607 err = NEW_ERRINFO(&(yylsp[-3]));
16608 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16609 }
16610 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16611 if ((yyvsp[-4].node)) {
16612 fixpos((yyval.node), (yyvsp[-4].node));
16613 }
16614 else if ((yyvsp[-3].node)) {
16615 fixpos((yyval.node), (yyvsp[-3].node));
16616 }
16617 else {
16618 fixpos((yyval.node), (yyvsp[-1].node));
16619 }
16620 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16621 }
16622#line 16623 "parse.c"
16623 break;
16624
16625 case 627: /* exc_list: arg_value */
16626#line 5878 "parse.y"
16627 {
16628 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16629 /*% ripper: rb_ary_new3(1, $:1) %*/
16630 }
16631#line 16632 "parse.c"
16632 break;
16633
16634 case 628: /* exc_list: mrhs */
16635#line 5883 "parse.y"
16636 {
16637 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16638 }
16639#line 16640 "parse.c"
16640 break;
16641
16642 case 630: /* exc_var: "=>" lhs */
16643#line 5890 "parse.y"
16644 {
16645 (yyval.node) = (yyvsp[0].node);
16646 /*% ripper: $:2 %*/
16647 }
16648#line 16649 "parse.c"
16649 break;
16650
16651 case 632: /* opt_ensure: k_ensure stmts option_terms */
16652#line 5898 "parse.y"
16653 {
16654 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16655 (yyval.node) = (yyvsp[-1].node);
16656 void_expr(p, void_stmts(p, (yyval.node)));
16657 /*% ripper: ensure!($:2) %*/
16658 }
16659#line 16660 "parse.c"
16660 break;
16661
16662 case 636: /* strings: string */
16663#line 5912 "parse.y"
16664 {
16665 if (!(yyvsp[0].node)) {
16666 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16667 }
16668 else {
16669 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16670 }
16671 /*% ripper: $:1 %*/
16672 }
16673#line 16674 "parse.c"
16674 break;
16675
16676 case 639: /* string: string string1 */
16677#line 5926 "parse.y"
16678 {
16679 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16680 /*% ripper: string_concat!($:1, $:2) %*/
16681 }
16682#line 16683 "parse.c"
16683 break;
16684
16685 case 640: /* string1: "string literal" string_contents "terminator" */
16686#line 5933 "parse.y"
16687 {
16688 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16689 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16690 /*% ripper: $:2 %*/
16691 if (p->heredoc_indent > 0) {
16692 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16693 p->heredoc_indent = 0;
16694 }
16695 /*% ripper: string_literal!($:$) %*/
16696 }
16697#line 16698 "parse.c"
16698 break;
16699
16700 case 641: /* xstring: "backtick literal" xstring_contents "terminator" */
16701#line 5946 "parse.y"
16702 {
16703 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16704 /*% ripper: $:2 %*/
16705 if (p->heredoc_indent > 0) {
16706 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16707 p->heredoc_indent = 0;
16708 }
16709 /*% ripper: xstring_literal!($:$) %*/
16710 }
16711#line 16712 "parse.c"
16712 break;
16713
16714 case 642: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16715#line 5958 "parse.y"
16716 {
16717 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16718 /*% ripper: regexp_literal!($:2, $:3) %*/
16719 }
16720#line 16721 "parse.c"
16721 break;
16722
16723 case 645: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16724#line 3154 "parse.y"
16725 {
16726 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16727 /*% ripper: array!($:3) %*/
16728 }
16729#line 16730 "parse.c"
16730 break;
16731
16732 case 647: /* word_list: %empty */
16733#line 5968 "parse.y"
16734 {
16735 (yyval.node) = 0;
16736 /*% ripper: words_new! %*/
16737 }
16738#line 16739 "parse.c"
16739 break;
16740
16741 case 648: /* word_list: word_list word nonempty_list_' ' */
16742#line 5973 "parse.y"
16743 {
16744 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16745 /*% ripper: words_add!($:1, $:2) %*/
16746 }
16747#line 16748 "parse.c"
16748 break;
16749
16750 case 650: /* word: word string_content */
16751#line 5982 "parse.y"
16752 {
16753 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16754 /*% ripper: word_add!($:1, $:2) %*/
16755 }
16756#line 16757 "parse.c"
16757 break;
16758
16759 case 651: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16760#line 3154 "parse.y"
16761 {
16762 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16763 /*% ripper: array!($:3) %*/
16764 }
16765#line 16766 "parse.c"
16766 break;
16767
16768 case 653: /* symbol_list: %empty */
16769#line 5992 "parse.y"
16770 {
16771 (yyval.node) = 0;
16772 /*% ripper: symbols_new! %*/
16773 }
16774#line 16775 "parse.c"
16775 break;
16776
16777 case 654: /* symbol_list: symbol_list word nonempty_list_' ' */
16778#line 5997 "parse.y"
16779 {
16780 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16781 /*% ripper: symbols_add!($:1, $:2) %*/
16782 }
16783#line 16784 "parse.c"
16784 break;
16785
16786 case 655: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16787#line 3154 "parse.y"
16788 {
16789 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16790 /*% ripper: array!($:3) %*/
16791 }
16792#line 16793 "parse.c"
16793 break;
16794
16795 case 657: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16796#line 3154 "parse.y"
16797 {
16798 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16799 /*% ripper: array!($:3) %*/
16800 }
16801#line 16802 "parse.c"
16802 break;
16803
16804 case 659: /* qword_list: %empty */
16805#line 6010 "parse.y"
16806 {
16807 (yyval.node) = 0;
16808 /*% ripper: qwords_new! %*/
16809 }
16810#line 16811 "parse.c"
16811 break;
16812
16813 case 660: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16814#line 6015 "parse.y"
16815 {
16816 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16817 /*% ripper: qwords_add!($:1, $:2) %*/
16818 }
16819#line 16820 "parse.c"
16820 break;
16821
16822 case 661: /* qsym_list: %empty */
16823#line 6022 "parse.y"
16824 {
16825 (yyval.node) = 0;
16826 /*% ripper: qsymbols_new! %*/
16827 }
16828#line 16829 "parse.c"
16829 break;
16830
16831 case 662: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16832#line 6027 "parse.y"
16833 {
16834 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16835 /*% ripper: qsymbols_add!($:1, $:2) %*/
16836 }
16837#line 16838 "parse.c"
16838 break;
16839
16840 case 663: /* string_contents: %empty */
16841#line 6034 "parse.y"
16842 {
16843 (yyval.node) = 0;
16844 /*% ripper: string_content! %*/
16845 }
16846#line 16847 "parse.c"
16847 break;
16848
16849 case 664: /* string_contents: string_contents string_content */
16850#line 6039 "parse.y"
16851 {
16852 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16853 /*% ripper: string_add!($:1, $:2) %*/
16854 }
16855#line 16856 "parse.c"
16856 break;
16857
16858 case 665: /* xstring_contents: %empty */
16859#line 6046 "parse.y"
16860 {
16861 (yyval.node) = 0;
16862 /*% ripper: xstring_new! %*/
16863 }
16864#line 16865 "parse.c"
16865 break;
16866
16867 case 666: /* xstring_contents: xstring_contents string_content */
16868#line 6051 "parse.y"
16869 {
16870 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16871 /*% ripper: xstring_add!($:1, $:2) %*/
16872 }
16873#line 16874 "parse.c"
16874 break;
16875
16876 case 667: /* regexp_contents: %empty */
16877#line 6058 "parse.y"
16878 {
16879 (yyval.node) = 0;
16880 /*% ripper: regexp_new! %*/
16881 }
16882#line 16883 "parse.c"
16883 break;
16884
16885 case 668: /* regexp_contents: regexp_contents string_content */
16886#line 6063 "parse.y"
16887 {
16888 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16889 if (!head) {
16890 (yyval.node) = tail;
16891 }
16892 else if (!tail) {
16893 (yyval.node) = head;
16894 }
16895 else {
16896 switch (nd_type(head)) {
16897 case NODE_STR:
16898 head = str2dstr(p, head);
16899 break;
16900 case NODE_DSTR:
16901 break;
16902 default:
16903 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16904 break;
16905 }
16906 (yyval.node) = list_append(p, head, tail);
16907 }
16908 /*% ripper: regexp_add!($:1, $:2) %*/
16909 }
16910#line 16911 "parse.c"
16911 break;
16912
16913 case 670: /* @34: %empty */
16914#line 6091 "parse.y"
16915 {
16916 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16917 (yyval.strterm) = p->lex.strterm;
16918 p->lex.strterm = 0;
16919 SET_LEX_STATE(EXPR_BEG);
16920 }
16921#line 16922 "parse.c"
16922 break;
16923
16924 case 671: /* string_content: tSTRING_DVAR @34 string_dvar */
16925#line 6098 "parse.y"
16926 {
16927 p->lex.strterm = (yyvsp[-1].strterm);
16928 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
16929 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16930 /*% ripper: string_dvar!($:3) %*/
16931 }
16932#line 16933 "parse.c"
16933 break;
16934
16935 case 672: /* @35: %empty */
16936#line 6105 "parse.y"
16937 {
16938 CMDARG_PUSH(0);
16939 COND_PUSH(0);
16940 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16941 (yyval.strterm) = p->lex.strterm;
16942 p->lex.strterm = 0;
16943 SET_LEX_STATE(EXPR_BEG);
16944 }
16945#line 16946 "parse.c"
16946 break;
16947
16948 case 673: /* @36: %empty */
16949#line 6113 "parse.y"
16950 {
16951 (yyval.num) = p->lex.brace_nest;
16952 p->lex.brace_nest = 0;
16953 }
16954#line 16955 "parse.c"
16955 break;
16956
16957 case 674: /* @37: %empty */
16958#line 6117 "parse.y"
16959 {
16960 (yyval.num) = p->lex.lpar_beg;
16961 p->lex.lpar_beg = -1;
16962 }
16963#line 16964 "parse.c"
16964 break;
16965
16966 case 675: /* @38: %empty */
16967#line 6121 "parse.y"
16968 {
16969 (yyval.num) = p->heredoc_indent;
16970 p->heredoc_indent = 0;
16971 }
16972#line 16973 "parse.c"
16973 break;
16974
16975 case 676: /* string_content: "'#{'" @35 @36 @37 @38 compstmt_stmts string_dend */
16976#line 6126 "parse.y"
16977 {
16978 COND_POP();
16979 CMDARG_POP();
16980 p->lex.strterm = (yyvsp[-5].strterm);
16981 SET_LEX_STATE((yyvsp[-6].state));
16982 p->lex.brace_nest = (yyvsp[-4].num);
16983 p->lex.lpar_beg = (yyvsp[-3].num);
16984 p->heredoc_indent = (yyvsp[-2].num);
16985 p->heredoc_line_indent = -1;
16986 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16987 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[0]));
16988 /*% ripper: string_embexpr!($:compstmt) %*/
16989 }
16990#line 16991 "parse.c"
16991 break;
16992
16993 case 679: /* string_dvar: nonlocal_var */
16994#line 6146 "parse.y"
16995 {
16996 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16997 /*% ripper: var_ref!($:1) %*/
16998 }
16999#line 17000 "parse.c"
17000 break;
17001
17002 case 683: /* ssym: "symbol literal" sym */
17003#line 6158 "parse.y"
17004 {
17005 SET_LEX_STATE(EXPR_END);
17006 VALUE str = rb_id2str((yyvsp[0].id));
17007 /*
17008 * TODO:
17009 * set_yylval_noname sets invalid id to yylval.
17010 * This branch can be removed once yylval is changed to
17011 * hold lexed string.
17012 */
17013 if (!str) str = STR_NEW0();
17014 (yyval.node) = NEW_SYM(str, &(yyloc));
17015 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17016 }
17017#line 17018 "parse.c"
17018 break;
17019
17020 case 686: /* dsym: "symbol literal" string_contents "terminator" */
17021#line 6178 "parse.y"
17022 {
17023 SET_LEX_STATE(EXPR_END);
17024 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17025 /*% ripper: dyna_symbol!($:2) %*/
17026 }
17027#line 17028 "parse.c"
17028 break;
17029
17030 case 688: /* numeric: tUMINUS_NUM simple_numeric */
17031#line 6187 "parse.y"
17032 {
17033 (yyval.node) = (yyvsp[0].node);
17034 negate_lit(p, (yyval.node), &(yyloc));
17035 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17036 }
17037#line 17038 "parse.c"
17038 break;
17039
17040 case 699: /* keyword_variable: "'nil'" */
17041#line 6209 "parse.y"
17042 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17043#line 17044 "parse.c"
17044 break;
17045
17046 case 700: /* keyword_variable: "'self'" */
17047#line 6210 "parse.y"
17048 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17049#line 17050 "parse.c"
17050 break;
17051
17052 case 701: /* keyword_variable: "'true'" */
17053#line 6211 "parse.y"
17054 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17055#line 17056 "parse.c"
17056 break;
17057
17058 case 702: /* keyword_variable: "'false'" */
17059#line 6212 "parse.y"
17060 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17061#line 17062 "parse.c"
17062 break;
17063
17064 case 703: /* keyword_variable: "'__FILE__'" */
17065#line 6213 "parse.y"
17066 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17067#line 17068 "parse.c"
17068 break;
17069
17070 case 704: /* keyword_variable: "'__LINE__'" */
17071#line 6214 "parse.y"
17072 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17073#line 17074 "parse.c"
17074 break;
17075
17076 case 705: /* keyword_variable: "'__ENCODING__'" */
17077#line 6215 "parse.y"
17078 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17079#line 17080 "parse.c"
17080 break;
17081
17082 case 706: /* var_ref: user_variable */
17083#line 6219 "parse.y"
17084 {
17085 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17086 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17087 /*% ripper: var_ref!($:1) %*/
17088 }
17089 else {
17090 /*% ripper: vcall!($:1) %*/
17091 }
17092 }
17093#line 17094 "parse.c"
17094 break;
17095
17096 case 707: /* var_ref: keyword_variable */
17097#line 6229 "parse.y"
17098 {
17099 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17100 /*% ripper: var_ref!($:1) %*/
17101 }
17102#line 17103 "parse.c"
17103 break;
17104
17105 case 708: /* var_lhs: user_variable */
17106#line 6236 "parse.y"
17107 {
17108 /*% ripper: var_field!($:1) %*/
17109 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17110 }
17111#line 17112 "parse.c"
17112 break;
17113
17114 case 709: /* var_lhs: keyword_variable */
17115#line 6236 "parse.y"
17116 {
17117 /*% ripper: var_field!($:1) %*/
17118 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17119 }
17120#line 17121 "parse.c"
17121 break;
17122
17123 case 712: /* $@39: %empty */
17124#line 6247 "parse.y"
17125 {
17126 SET_LEX_STATE(EXPR_BEG);
17127 p->command_start = TRUE;
17128 }
17129#line 17130 "parse.c"
17130 break;
17131
17132 case 713: /* superclass: '<' $@39 expr_value term */
17133#line 6252 "parse.y"
17134 {
17135 (yyval.node) = (yyvsp[-1].node);
17136 /*% ripper: $:3 %*/
17137 }
17138#line 17139 "parse.c"
17139 break;
17140
17141 case 716: /* f_opt_paren_args: none */
17142#line 6261 "parse.y"
17143 {
17144 p->ctxt.in_argdef = 0;
17145 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
17146 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
17147 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17148 }
17149#line 17150 "parse.c"
17150 break;
17151
17152 case 717: /* f_paren_args: '(' f_args rparen */
17153#line 6270 "parse.y"
17154 {
17155 (yyval.node_args) = (yyvsp[-1].node_args);
17156 /*% ripper: paren!($:2) %*/
17157 SET_LEX_STATE(EXPR_BEG);
17158 p->command_start = TRUE;
17159 p->ctxt.in_argdef = 0;
17160 }
17161#line 17162 "parse.c"
17162 break;
17163
17164 case 719: /* @40: %empty */
17165#line 6280 "parse.y"
17166 {
17167 (yyval.ctxt) = p->ctxt;
17168 p->ctxt.in_kwarg = 1;
17169 p->ctxt.in_argdef = 1;
17170 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17171 }
17172#line 17173 "parse.c"
17173 break;
17174
17175 case 720: /* f_arglist: @40 f_args term */
17176#line 6287 "parse.y"
17177 {
17178 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17179 p->ctxt.in_argdef = 0;
17180 (yyval.node_args) = (yyvsp[-1].node_args);
17181 SET_LEX_STATE(EXPR_BEG);
17182 p->command_start = TRUE;
17183 /*% ripper: $:2 %*/
17184 }
17185#line 17186 "parse.c"
17186 break;
17187
17188 case 721: /* f_kw_arg_value: f_label arg_value */
17189#line 3005 "parse.y"
17190 {
17191 p->ctxt.in_argdef = 1;
17192 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17193 /*% ripper: [$:$, $:value] %*/
17194 }
17195#line 17196 "parse.c"
17196 break;
17197
17198 case 722: /* f_kw_arg_value: f_label */
17199#line 3011 "parse.y"
17200 {
17201 p->ctxt.in_argdef = 1;
17202 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17203 /*% ripper: [$:$, 0] %*/
17204 }
17205#line 17206 "parse.c"
17206 break;
17207
17208 case 723: /* f_kwarg_arg_value: f_kw_arg_value */
17209#line 3020 "parse.y"
17210 {
17211 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17212 /*% ripper: rb_ary_new3(1, $:1) %*/
17213 }
17214#line 17215 "parse.c"
17215 break;
17216
17217 case 724: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17218#line 3025 "parse.y"
17219 {
17220 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17221 /*% ripper: rb_ary_push($:1, $:3) %*/
17222 }
17223#line 17224 "parse.c"
17224 break;
17225
17226 case 725: /* args_tail_basic_arg_value: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
17227#line 2928 "parse.y"
17228 {
17229 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17230 /*% ripper: [$:1, $:3, $:4] %*/
17231 }
17232#line 17233 "parse.c"
17233 break;
17234
17235 case 726: /* args_tail_basic_arg_value: f_kwarg_arg_value opt_f_block_arg */
17236#line 2933 "parse.y"
17237 {
17238 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17239 /*% ripper: [$:1, Qnil, $:2] %*/
17240 }
17241#line 17242 "parse.c"
17242 break;
17243
17244 case 727: /* args_tail_basic_arg_value: f_any_kwrest opt_f_block_arg */
17245#line 2938 "parse.y"
17246 {
17247 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17248 /*% ripper: [Qnil, $:1, $:2] %*/
17249 }
17250#line 17251 "parse.c"
17251 break;
17252
17253 case 728: /* args_tail_basic_arg_value: f_block_arg */
17254#line 2943 "parse.y"
17255 {
17256 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17257 /*% ripper: [Qnil, Qnil, $:1] %*/
17258 }
17259#line 17260 "parse.c"
17260 break;
17261
17262 case 730: /* args_tail: args_forward */
17263#line 6299 "parse.y"
17264 {
17265 ID fwd = (yyvsp[0].id);
17266 if (lambda_beginning_p() ||
17267 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
17268 yyerror0("unexpected ... in lambda argument");
17269 fwd = 0;
17270 }
17271 else {
17272 add_forwarding_args(p);
17273 }
17274 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
17275 (yyval.node_args)->nd_ainfo.forwarding = 1;
17276 /*% ripper: [Qnil, $:1, Qnil] %*/
17277 }
17278#line 17279 "parse.c"
17279 break;
17280
17281 case 731: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17282#line 2983 "parse.y"
17283 {
17284 p->ctxt.in_argdef = 1;
17285 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17286 /*% ripper: [$:$, $:3] %*/
17287 }
17288#line 17289 "parse.c"
17289 break;
17290
17291 case 732: /* f_opt_arg_arg_value: f_opt_arg_value */
17292#line 2992 "parse.y"
17293 {
17294 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17295 /*% ripper: rb_ary_new3(1, $:1) %*/
17296 }
17297#line 17298 "parse.c"
17298 break;
17299
17300 case 733: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17301#line 2997 "parse.y"
17302 {
17303 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17304 /*% ripper: rb_ary_push($:1, $:3) %*/
17305 }
17306#line 17307 "parse.c"
17307 break;
17308
17309 case 734: /* opt_args_tail_args_tail: ',' args_tail */
17310#line 3092 "parse.y"
17311 {
17312 (yyval.node_args) = (yyvsp[0].node_args);
17313 /*% ripper: $:2 %*/
17314 }
17315#line 17316 "parse.c"
17316 break;
17317
17318 case 735: /* opt_args_tail_args_tail: %empty */
17319#line 3097 "parse.y"
17320 {
17321 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17322 /*% ripper: [Qnil, Qnil, Qnil] %*/
17323 }
17324#line 17325 "parse.c"
17325 break;
17326
17327 case 736: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17328#line 6316 "parse.y"
17329 {
17330 (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));
17331 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
17332 }
17333#line 17334 "parse.c"
17334 break;
17335
17336 case 737: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17337#line 6321 "parse.y"
17338 {
17339 (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));
17340 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
17341 }
17342#line 17343 "parse.c"
17343 break;
17344
17345 case 738: /* f_args: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail */
17346#line 6326 "parse.y"
17347 {
17348 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17349 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
17350 }
17351#line 17352 "parse.c"
17352 break;
17353
17354 case 739: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17355#line 6331 "parse.y"
17356 {
17357 (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));
17358 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
17359 }
17360#line 17361 "parse.c"
17361 break;
17362
17363 case 740: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
17364#line 6336 "parse.y"
17365 {
17366 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17367 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
17368 }
17369#line 17370 "parse.c"
17370 break;
17371
17372 case 741: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17373#line 6341 "parse.y"
17374 {
17375 (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));
17376 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
17377 }
17378#line 17379 "parse.c"
17379 break;
17380
17381 case 742: /* f_args: f_arg opt_args_tail_args_tail */
17382#line 6346 "parse.y"
17383 {
17384 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17385 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
17386 }
17387#line 17388 "parse.c"
17388 break;
17389
17390 case 743: /* f_args: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17391#line 6351 "parse.y"
17392 {
17393 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17394 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
17395 }
17396#line 17397 "parse.c"
17397 break;
17398
17399 case 744: /* f_args: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17400#line 6356 "parse.y"
17401 {
17402 (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));
17403 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
17404 }
17405#line 17406 "parse.c"
17406 break;
17407
17408 case 745: /* f_args: f_opt_arg_arg_value opt_args_tail_args_tail */
17409#line 6361 "parse.y"
17410 {
17411 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17412 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
17413 }
17414#line 17415 "parse.c"
17415 break;
17416
17417 case 746: /* f_args: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17418#line 6366 "parse.y"
17419 {
17420 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17421 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
17422 }
17423#line 17424 "parse.c"
17424 break;
17425
17426 case 747: /* f_args: f_rest_arg opt_args_tail_args_tail */
17427#line 6371 "parse.y"
17428 {
17429 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17430 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
17431 }
17432#line 17433 "parse.c"
17433 break;
17434
17435 case 748: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
17436#line 6376 "parse.y"
17437 {
17438 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17439 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
17440 }
17441#line 17442 "parse.c"
17442 break;
17443
17444 case 749: /* f_args: args_tail */
17445#line 6381 "parse.y"
17446 {
17447 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17448 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
17449 }
17450#line 17451 "parse.c"
17451 break;
17452
17453 case 750: /* f_args: %empty */
17454#line 6386 "parse.y"
17455 {
17456 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17457 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
17458 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17459 }
17460#line 17461 "parse.c"
17461 break;
17462
17463 case 751: /* args_forward: "(..." */
17464#line 6394 "parse.y"
17465 {
17466 (yyval.id) = idFWD_KWREST;
17467 /*% ripper: args_forward! %*/
17468 }
17469#line 17470 "parse.c"
17470 break;
17471
17472 case 752: /* f_bad_arg: "constant" */
17473#line 6401 "parse.y"
17474 {
17475 static const char mesg[] = "formal argument cannot be a constant";
17476 /*%%%*/
17477 yyerror1(&(yylsp[0]), mesg);
17478 /*% %*/
17479 (yyval.id) = 0;
17480 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17481 }
17482#line 17483 "parse.c"
17483 break;
17484
17485 case 753: /* f_bad_arg: "instance variable" */
17486#line 6410 "parse.y"
17487 {
17488 static const char mesg[] = "formal argument cannot be an instance variable";
17489 /*%%%*/
17490 yyerror1(&(yylsp[0]), mesg);
17491 /*% %*/
17492 (yyval.id) = 0;
17493 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17494 }
17495#line 17496 "parse.c"
17496 break;
17497
17498 case 754: /* f_bad_arg: "global variable" */
17499#line 6419 "parse.y"
17500 {
17501 static const char mesg[] = "formal argument cannot be a global variable";
17502 /*%%%*/
17503 yyerror1(&(yylsp[0]), mesg);
17504 /*% %*/
17505 (yyval.id) = 0;
17506 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17507 }
17508#line 17509 "parse.c"
17509 break;
17510
17511 case 755: /* f_bad_arg: "class variable" */
17512#line 6428 "parse.y"
17513 {
17514 static const char mesg[] = "formal argument cannot be a class variable";
17515 /*%%%*/
17516 yyerror1(&(yylsp[0]), mesg);
17517 /*% %*/
17518 (yyval.id) = 0;
17519 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17520 }
17521#line 17522 "parse.c"
17522 break;
17523
17524 case 757: /* f_norm_arg: "local variable or method" */
17525#line 6440 "parse.y"
17526 {
17527 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17528 if (e) {
17529 /*% ripper[error]: param_error!(?e, $:1) %*/
17530 }
17531 p->max_numparam = ORDINAL_PARAM;
17532 }
17533#line 17534 "parse.c"
17534 break;
17535
17536 case 758: /* f_arg_asgn: f_norm_arg */
17537#line 6450 "parse.y"
17538 {
17539 arg_var(p, (yyvsp[0].id));
17540 (yyval.id) = (yyvsp[0].id);
17541 }
17542#line 17543 "parse.c"
17543 break;
17544
17545 case 759: /* f_arg_item: f_arg_asgn */
17546#line 6457 "parse.y"
17547 {
17548 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17549 /*% ripper: $:1 %*/
17550 }
17551#line 17552 "parse.c"
17552 break;
17553
17554 case 760: /* f_arg_item: "(" f_margs rparen */
17555#line 6462 "parse.y"
17556 {
17557 ID tid = internal_id(p);
17558 YYLTYPE loc;
17559 loc.beg_pos = (yylsp[-1]).beg_pos;
17560 loc.end_pos = (yylsp[-1]).beg_pos;
17561 arg_var(p, tid);
17562 if (dyna_in_block(p)) {
17563 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17564 }
17565 else {
17566 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17567 }
17568 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17569 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17570 /*% ripper: mlhs_paren!($:2) %*/
17571 }
17572#line 17573 "parse.c"
17573 break;
17574
17575 case 762: /* f_arg: f_arg ',' f_arg_item */
17576#line 6483 "parse.y"
17577 {
17578 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17579 (yyval.node_args_aux)->nd_plen++;
17580 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17581 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17582 /*% ripper: rb_ary_push($:1, $:3) %*/
17583 }
17584#line 17585 "parse.c"
17585 break;
17586
17587 case 763: /* f_label: "label" */
17588#line 6494 "parse.y"
17589 {
17590 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17591 if (e) {
17592 (yyval.id) = 0;
17593 /*% ripper[error]: param_error!(?e, $:1) %*/
17594 }
17595 /*
17596 * Workaround for Prism::ParseTest#test_filepath for
17597 * "unparser/corpus/literal/def.txt"
17598 *
17599 * See the discussion on https://github.com/ruby/ruby/pull/9923
17600 */
17601 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17602 /*% ripper: $:1 %*/
17603 p->max_numparam = ORDINAL_PARAM;
17604 p->ctxt.in_argdef = 0;
17605 }
17606#line 17607 "parse.c"
17607 break;
17608
17609 case 766: /* f_no_kwarg: p_kwnorest */
17610#line 6518 "parse.y"
17611 {
17612 /*% ripper: nokw_param!(Qnil) %*/
17613 }
17614#line 17615 "parse.c"
17615 break;
17616
17617 case 767: /* f_kwrest: kwrest_mark "local variable or method" */
17618#line 6524 "parse.y"
17619 {
17620 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17621 (yyval.id) = (yyvsp[0].id);
17622 /*% ripper: kwrest_param!($:2) %*/
17623 }
17624#line 17625 "parse.c"
17625 break;
17626
17627 case 768: /* f_kwrest: kwrest_mark */
17628#line 6530 "parse.y"
17629 {
17630 arg_var(p, idFWD_KWREST);
17631 (yyval.id) = idFWD_KWREST;
17632 /*% ripper: kwrest_param!(Qnil) %*/
17633 }
17634#line 17635 "parse.c"
17635 break;
17636
17637 case 771: /* f_rest_arg: restarg_mark "local variable or method" */
17638#line 6542 "parse.y"
17639 {
17640 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17641 (yyval.id) = (yyvsp[0].id);
17642 /*% ripper: rest_param!($:2) %*/
17643 }
17644#line 17645 "parse.c"
17645 break;
17646
17647 case 772: /* f_rest_arg: restarg_mark */
17648#line 6548 "parse.y"
17649 {
17650 arg_var(p, idFWD_REST);
17651 (yyval.id) = idFWD_REST;
17652 /*% ripper: rest_param!(Qnil) %*/
17653 }
17654#line 17655 "parse.c"
17655 break;
17656
17657 case 775: /* f_block_arg: blkarg_mark "local variable or method" */
17658#line 6560 "parse.y"
17659 {
17660 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17661 (yyval.id) = (yyvsp[0].id);
17662 /*% ripper: blockarg!($:2) %*/
17663 }
17664#line 17665 "parse.c"
17665 break;
17666
17667 case 776: /* f_block_arg: blkarg_mark */
17668#line 6566 "parse.y"
17669 {
17670 arg_var(p, idFWD_BLOCK);
17671 (yyval.id) = idFWD_BLOCK;
17672 /*% ripper: blockarg!(Qnil) %*/
17673 }
17674#line 17675 "parse.c"
17675 break;
17676
17677 case 777: /* opt_f_block_arg: ',' f_block_arg */
17678#line 6574 "parse.y"
17679 {
17680 (yyval.id) = (yyvsp[0].id);
17681 /*% ripper: $:2 %*/
17682 }
17683#line 17684 "parse.c"
17684 break;
17685
17686 case 779: /* value_expr_singleton_expr: singleton_expr */
17687#line 3146 "parse.y"
17688 {
17689 value_expr(p, (yyvsp[0].node));
17690 (yyval.node) = (yyvsp[0].node);
17691 }
17692#line 17693 "parse.c"
17693 break;
17694
17695 case 780: /* singleton: value_expr_singleton_expr */
17696#line 6583 "parse.y"
17697 {
17698 NODE *expr = last_expr_node((yyvsp[0].node));
17699 switch (nd_type(expr)) {
17700 case NODE_STR:
17701 case NODE_DSTR:
17702 case NODE_XSTR:
17703 case NODE_DXSTR:
17704 case NODE_REGX:
17705 case NODE_DREGX:
17706 case NODE_SYM:
17707 case NODE_LINE:
17708 case NODE_FILE:
17709 case NODE_ENCODING:
17710 case NODE_INTEGER:
17711 case NODE_FLOAT:
17712 case NODE_RATIONAL:
17713 case NODE_IMAGINARY:
17714 case NODE_DSYM:
17715 case NODE_LIST:
17716 case NODE_ZLIST:
17717 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17718 break;
17719 default:
17720 break;
17721 }
17722 (yyval.node) = (yyvsp[0].node);
17723 }
17724#line 17725 "parse.c"
17725 break;
17726
17727 case 782: /* $@41: %empty */
17728#line 6614 "parse.y"
17729 {
17730 SET_LEX_STATE(EXPR_BEG);
17731 p->ctxt.in_argdef = 0;
17732 }
17733#line 17734 "parse.c"
17734 break;
17735
17736 case 783: /* singleton_expr: '(' $@41 expr rparen */
17737#line 6619 "parse.y"
17738 {
17739 p->ctxt.in_argdef = 1;
17740 (yyval.node) = (yyvsp[-1].node);
17741 /*% ripper: paren!($:3) %*/
17742 }
17743#line 17744 "parse.c"
17744 break;
17745
17746 case 785: /* assoc_list: assocs trailer */
17747#line 6628 "parse.y"
17748 {
17749 (yyval.node) = (yyvsp[-1].node);
17750 /*% ripper: assoclist_from_args!($:1) %*/
17751 }
17752#line 17753 "parse.c"
17753 break;
17754
17755 case 787: /* assocs: assocs ',' assoc */
17756#line 6637 "parse.y"
17757 {
17758 NODE *assocs = (yyvsp[-2].node);
17759 NODE *tail = (yyvsp[0].node);
17760 if (!assocs) {
17761 assocs = tail;
17762 }
17763 else if (tail) {
17764 NODE *n = RNODE_LIST(tail)->nd_next;
17765 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17766 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17767 /* DSTAR */
17768 tail = RNODE_HASH(n)->nd_head;
17769 }
17770 if (tail) {
17771 assocs = list_concat(assocs, tail);
17772 }
17773 }
17774 (yyval.node) = assocs;
17775 /*% ripper: rb_ary_push($:1, $:3) %*/
17776 }
17777#line 17778 "parse.c"
17778 break;
17779
17780 case 788: /* assoc: arg_value "=>" arg_value */
17781#line 6660 "parse.y"
17782 {
17783 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17784 /*% ripper: assoc_new!($:1, $:3) %*/
17785 }
17786#line 17787 "parse.c"
17787 break;
17788
17789 case 789: /* assoc: "label" arg_value */
17790#line 6665 "parse.y"
17791 {
17792 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17793 /*% ripper: assoc_new!($:1, $:2) %*/
17794 }
17795#line 17796 "parse.c"
17796 break;
17797
17798 case 790: /* assoc: "label" */
17799#line 6670 "parse.y"
17800 {
17801 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17802 if (!val) val = NEW_ERROR(&(yyloc));
17803 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17804 /*% ripper: assoc_new!($:1, Qnil) %*/
17805 }
17806#line 17807 "parse.c"
17807 break;
17808
17809 case 791: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17810#line 6677 "parse.y"
17811 {
17812 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17813 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17814 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17815 }
17816#line 17817 "parse.c"
17817 break;
17818
17819 case 792: /* assoc: "**arg" arg_value */
17820#line 6683 "parse.y"
17821 {
17822 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17823 /*% ripper: assoc_splat!($:2) %*/
17824 }
17825#line 17826 "parse.c"
17826 break;
17827
17828 case 793: /* assoc: "**arg" */
17829#line 6688 "parse.y"
17830 {
17831 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17832 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17833 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17834 /*% ripper: assoc_splat!(Qnil) %*/
17835 }
17836#line 17837 "parse.c"
17837 break;
17838
17839 case 812: /* term: ';' */
17840#line 6735 "parse.y"
17841 {
17842 yyerrok;
17843 token_flush(p);
17844 if (p->ctxt.in_defined) {
17845 p->ctxt.has_trailing_semicolon = 1;
17846 }
17847 }
17848#line 17849 "parse.c"
17849 break;
17850
17851 case 813: /* term: '\n' */
17852#line 6743 "parse.y"
17853 {
17854 (yyloc).end_pos = (yyloc).beg_pos;
17855 token_flush(p);
17856 }
17857#line 17858 "parse.c"
17858 break;
17859
17860 case 815: /* terms: terms ';' */
17861#line 6750 "parse.y"
17862 {yyerrok;}
17863#line 17864 "parse.c"
17864 break;
17865
17866 case 816: /* none: %empty */
17867#line 6754 "parse.y"
17868 {
17869 (yyval.node) = 0;
17870 /*% ripper: Qnil %*/
17871 }
17872#line 17873 "parse.c"
17873 break;
17874
17875
17876#line 17877 "parse.c"
17877
17878 default: break;
17879 }
17880 /* User semantic actions sometimes alter yychar, and that requires
17881 that yytoken be updated with the new translation. We take the
17882 approach of translating immediately before every use of yytoken.
17883 One alternative is translating here after every semantic action,
17884 but that translation would be missed if the semantic action invokes
17885 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17886 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17887 incorrect destructor might then be invoked immediately. In the
17888 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17889 to an incorrect destructor call or verbose syntax error message
17890 before the lookahead is translated. */
17891 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17892
17893 YYPOPSTACK (yylen);
17894 /* %after-reduce function. */
17895#line 2667 "parse.y"
17896 {after_reduce(yylen, p);}
17897#line 17898 "parse.c"
17898
17899 yylen = 0;
17900
17901 *++yyvsp = yyval;
17902 *++yylsp = yyloc;
17903
17904 /* Now 'shift' the result of the reduction. Determine what state
17905 that goes to, based on the state we popped back to and the rule
17906 number reduced by. */
17907 {
17908 const int yylhs = yyr1[yyn] - YYNTOKENS;
17909 const int yyi = yypgoto[yylhs] + *yyssp;
17910 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17911 ? yytable[yyi]
17912 : yydefgoto[yylhs]);
17913 }
17914
17915 goto yynewstate;
17916
17917
17918/*--------------------------------------.
17919| yyerrlab -- here on detecting error. |
17920`--------------------------------------*/
17921yyerrlab:
17922 /* Make sure we have latest lookahead translation. See comments at
17923 user semantic actions for why this is necessary. */
17924 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17925 /* If not already recovering from an error, report this error. */
17926 if (!yyerrstatus)
17927 {
17928 ++yynerrs;
17929 {
17930 yypcontext_t yyctx
17931 = {yyssp, yytoken, &yylloc};
17932 char const *yymsgp = YY_("syntax error");
17933 int yysyntax_error_status;
17934 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17935 if (yysyntax_error_status == 0)
17936 yymsgp = yymsg;
17937 else if (yysyntax_error_status == -1)
17938 {
17939 if (yymsg != yymsgbuf)
17940 YYSTACK_FREE (yymsg);
17941 yymsg = YY_CAST (char *,
17942 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17943 if (yymsg)
17944 {
17945 yysyntax_error_status
17946 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17947 yymsgp = yymsg;
17948 }
17949 else
17950 {
17951 yymsg = yymsgbuf;
17952 yymsg_alloc = sizeof yymsgbuf;
17953 yysyntax_error_status = YYENOMEM;
17954 }
17955 }
17956 yyerror (&yylloc, p, yymsgp);
17957 if (yysyntax_error_status == YYENOMEM)
17958 YYNOMEM;
17959 }
17960 }
17961
17962 yyerror_range[1] = yylloc;
17963 if (yyerrstatus == 3)
17964 {
17965 /* If just tried and failed to reuse lookahead token after an
17966 error, discard it. */
17967
17968 if (yychar <= END_OF_INPUT)
17969 {
17970 /* Return failure if at end of input. */
17971 if (yychar == END_OF_INPUT)
17972 YYABORT;
17973 }
17974 else
17975 {
17976 yydestruct ("Error: discarding",
17977 yytoken, &yylval, &yylloc, p);
17978 yychar = YYEMPTY;
17979 }
17980 }
17981
17982 /* Else will try to reuse lookahead token after shifting the error
17983 token. */
17984 goto yyerrlab1;
17985
17986
17987/*---------------------------------------------------.
17988| yyerrorlab -- error raised explicitly by YYERROR. |
17989`---------------------------------------------------*/
17990yyerrorlab:
17991 /* Pacify compilers when the user code never invokes YYERROR and the
17992 label yyerrorlab therefore never appears in user code. */
17993 if (0)
17994 YYERROR;
17995 ++yynerrs;
17996
17997 /* Do not reclaim the symbols of the rule whose action triggered
17998 this YYERROR. */
17999 YYPOPSTACK (yylen);
18000 /* %after-pop-stack function. */
18001#line 2669 "parse.y"
18002 {after_pop_stack(yylen, p);}
18003#line 18004 "parse.c"
18004
18005 yylen = 0;
18006 YY_STACK_PRINT (yyss, yyssp, p);
18007 yystate = *yyssp;
18008 goto yyerrlab1;
18009
18010
18011/*-------------------------------------------------------------.
18012| yyerrlab1 -- common code for both syntax error and YYERROR. |
18013`-------------------------------------------------------------*/
18014yyerrlab1:
18015 yyerrstatus = 3; /* Each real token shifted decrements this. */
18016
18017 /* Pop stack until we find a state that shifts the error token. */
18018 for (;;)
18019 {
18020 yyn = yypact[yystate];
18021 if (!yypact_value_is_default (yyn))
18022 {
18023 yyn += YYSYMBOL_YYerror;
18024 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18025 {
18026 yyn = yytable[yyn];
18027 if (0 < yyn)
18028 break;
18029 }
18030 }
18031
18032 /* Pop the current state because it cannot handle the error token. */
18033 if (yyssp == yyss)
18034 YYABORT;
18035
18036 yyerror_range[1] = *yylsp;
18037 yydestruct ("Error: popping",
18038 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18039 YYPOPSTACK (1);
18040 /* %after-pop-stack function. */
18041#line 2669 "parse.y"
18042 {after_pop_stack(1, p);}
18043#line 18044 "parse.c"
18044
18045 yystate = *yyssp;
18046 YY_STACK_PRINT (yyss, yyssp, p);
18047 }
18048
18049 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18050 *++yyvsp = yylval;
18051 YY_IGNORE_MAYBE_UNINITIALIZED_END
18052
18053 yyerror_range[2] = yylloc;
18054 ++yylsp;
18055 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18056
18057 /* Shift the error token. */
18058 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18059 /* %after-shift-error-token code. */
18060#line 2668 "parse.y"
18061 {after_shift_error_token(p);}
18062#line 18063 "parse.c"
18063
18064
18065 yystate = yyn;
18066 goto yynewstate;
18067
18068
18069/*-------------------------------------.
18070| yyacceptlab -- YYACCEPT comes here. |
18071`-------------------------------------*/
18072yyacceptlab:
18073 yyresult = 0;
18074 goto yyreturnlab;
18075
18076
18077/*-----------------------------------.
18078| yyabortlab -- YYABORT comes here. |
18079`-----------------------------------*/
18080yyabortlab:
18081 yyresult = 1;
18082 goto yyreturnlab;
18083
18084
18085/*-----------------------------------------------------------.
18086| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18087`-----------------------------------------------------------*/
18088yyexhaustedlab:
18089 yyerror (&yylloc, p, YY_("memory exhausted"));
18090 yyresult = 2;
18091 goto yyreturnlab;
18092
18093
18094/*----------------------------------------------------------.
18095| yyreturnlab -- parsing is finished, clean up and return. |
18096`----------------------------------------------------------*/
18097yyreturnlab:
18098 if (yychar != YYEMPTY)
18099 {
18100 /* Make sure we have latest lookahead translation. See comments at
18101 user semantic actions for why this is necessary. */
18102 yytoken = YYTRANSLATE (yychar);
18103 yydestruct ("Cleanup: discarding lookahead",
18104 yytoken, &yylval, &yylloc, p);
18105 }
18106 /* Do not reclaim the symbols of the rule whose action triggered
18107 this YYABORT or YYACCEPT. */
18108 YYPOPSTACK (yylen);
18109 YY_STACK_PRINT (yyss, yyssp, p);
18110 while (yyssp != yyss)
18111 {
18112 yydestruct ("Cleanup: popping",
18113 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18114 YYPOPSTACK (1);
18115 }
18116#ifndef yyoverflow
18117 if (yyss != yyssa)
18118 YYSTACK_FREE (yyss);
18119#endif
18120 if (yymsg != yymsgbuf)
18121 YYSTACK_FREE (yymsg);
18122 return yyresult;
18123}
18124
18125#line 6759 "parse.y"
18126
18127# undef p
18128# undef yylex
18129# undef yylval
18130# define yylval (*p->lval)
18131
18132static int regx_options(struct parser_params*);
18133static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18134static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18135static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18136static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18137
18138#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18139
18140# define set_yylval_node(x) { \
18141 YYLTYPE _cur_loc; \
18142 rb_parser_set_location(p, &_cur_loc); \
18143 yylval.node = (x); \
18144 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18145}
18146# define set_yylval_str(x) \
18147do { \
18148 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18149 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18150} while(0)
18151# define set_yylval_num(x) { \
18152 yylval.num = (x); \
18153 set_parser_s_value(x); \
18154}
18155# define set_yylval_id(x) (yylval.id = (x))
18156# define set_yylval_name(x) { \
18157 (yylval.id = (x)); \
18158 set_parser_s_value(ID2SYM(x)); \
18159}
18160# define yylval_id() (yylval.id)
18161
18162#define set_yylval_noname() set_yylval_id(keyword_nil)
18163#define has_delayed_token(p) (p->delayed.token != NULL)
18164
18165#ifndef RIPPER
18166#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18167#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18168
18169static bool
18170parser_has_token(struct parser_params *p)
18171{
18172 const char *const pcur = p->lex.pcur;
18173 const char *const ptok = p->lex.ptok;
18174 if (p->keep_tokens && (pcur < ptok)) {
18175 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18176 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18177 }
18178 return pcur > ptok;
18179}
18180
18181static const char *
18182escaped_char(int c)
18183{
18184 switch (c) {
18185 case '"': return "\\\"";
18186 case '\\': return "\\\\";
18187 case '\0': return "\\0";
18188 case '\n': return "\\n";
18189 case '\r': return "\\r";
18190 case '\t': return "\\t";
18191 case '\f': return "\\f";
18192 case '\013': return "\\v";
18193 case '\010': return "\\b";
18194 case '\007': return "\\a";
18195 case '\033': return "\\e";
18196 case '\x7f': return "\\c?";
18197 }
18198 return NULL;
18199}
18200
18201static rb_parser_string_t *
18202rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18203{
18204 rb_encoding *enc = p->enc;
18205 const char *ptr = str->ptr;
18206 const char *pend = ptr + str->len;
18207 const char *prev = ptr;
18208 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18209 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18210
18211 while (ptr < pend) {
18212 unsigned int c;
18213 const char *cc;
18214 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18215 if (!MBCLEN_CHARFOUND_P(n)) {
18216 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18217 n = rb_enc_mbminlen(enc);
18218 if (pend < ptr + n)
18219 n = (int)(pend - ptr);
18220 while (n--) {
18221 c = *ptr & 0xf0 >> 4;
18222 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18223 c = *ptr & 0x0f;
18224 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18225 parser_str_cat(result, charbuf, 4);
18226 prev = ++ptr;
18227 }
18228 continue;
18229 }
18230 n = MBCLEN_CHARFOUND_LEN(n);
18231 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18232 ptr += n;
18233 cc = escaped_char(c);
18234 if (cc) {
18235 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18236 parser_str_cat_cstr(result, cc);
18237 prev = ptr;
18238 }
18239 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18240 }
18241 else {
18242 if (ptr - n > prev) {
18243 parser_str_cat(result, prev, ptr - n - prev);
18244 prev = ptr - n;
18245 }
18246 parser_str_cat(result, prev, ptr - prev);
18247 prev = ptr;
18248 }
18249 }
18250 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18251
18252 return result;
18253}
18254
18255static void
18256parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18257{
18258 rb_parser_ast_token_t *token = xcalloc(1, sizeof(rb_parser_ast_token_t));
18259 token->id = p->token_id;
18260 token->type_name = parser_token2char(p, t);
18261 token->str = str;
18262 token->loc.beg_pos = p->yylloc->beg_pos;
18263 token->loc.end_pos = p->yylloc->end_pos;
18264 rb_parser_ary_push_ast_token(p, p->tokens, token);
18265 p->token_id++;
18266
18267 if (p->debug) {
18268 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18269 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18270 line, token->id, token->type_name, str_escaped->ptr,
18271 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18272 token->loc.end_pos.lineno, token->loc.end_pos.column);
18273 rb_parser_string_free(p, str_escaped);
18274 }
18275}
18276
18277static void
18278parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18279{
18280 debug_token_line(p, "parser_dispatch_scan_event", line);
18281
18282 if (!parser_has_token(p)) return;
18283
18284 RUBY_SET_YYLLOC(*p->yylloc);
18285
18286 if (p->keep_tokens) {
18287 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18288 parser_append_tokens(p, str, t, line);
18289 }
18290
18291 token_flush(p);
18292}
18293
18294#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18295static void
18296parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18297{
18298 debug_token_line(p, "parser_dispatch_delayed_token", line);
18299
18300 if (!has_delayed_token(p)) return;
18301
18302 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18303
18304 if (p->keep_tokens) {
18305 /* p->delayed.token is freed by rb_parser_tokens_free */
18306 parser_append_tokens(p, p->delayed.token, t, line);
18307 }
18308 else {
18309 rb_parser_string_free(p, p->delayed.token);
18310 }
18311
18312 p->delayed.token = NULL;
18313}
18314#else
18315#define literal_flush(p, ptr) ((void)(ptr))
18316
18317static int
18318ripper_has_scan_event(struct parser_params *p)
18319{
18320 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18321 return p->lex.pcur > p->lex.ptok;
18322}
18323
18324static VALUE
18325ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18326{
18327 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18328 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18329 RUBY_SET_YYLLOC(*p->yylloc);
18330 token_flush(p);
18331 return rval;
18332}
18333
18334static void
18335ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18336{
18337 if (!ripper_has_scan_event(p)) return;
18338
18339 set_parser_s_value(ripper_scan_event_val(p, t));
18340}
18341#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18342
18343static void
18344ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18345{
18346 /* save and adjust the location to delayed token for callbacks */
18347 int saved_line = p->ruby_sourceline;
18348 const char *saved_tokp = p->lex.ptok;
18349 VALUE s_value, str;
18350
18351 if (!has_delayed_token(p)) return;
18352 p->ruby_sourceline = p->delayed.beg_line;
18353 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18354 str = rb_str_new_mutable_parser_string(p->delayed.token);
18355 rb_parser_string_free(p, p->delayed.token);
18356 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18357 set_parser_s_value(s_value);
18358 p->delayed.token = NULL;
18359 p->ruby_sourceline = saved_line;
18360 p->lex.ptok = saved_tokp;
18361}
18362#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18363#endif /* RIPPER */
18364
18365static inline int
18366is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18367{
18368 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18369}
18370
18371static inline bool
18372peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18373{
18374 const char *ptr = p->lex.pcur + at;
18375 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18376 if (memcmp(ptr, str, len)) return false;
18377 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18378 switch (ptr[len]) {
18379 case '!': case '?': return false;
18380 }
18381 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18382}
18383
18384static inline int
18385parser_is_identchar(struct parser_params *p)
18386{
18387 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18388}
18389
18390static inline int
18391parser_isascii(struct parser_params *p)
18392{
18393 return ISASCII(*(p->lex.pcur-1));
18394}
18395
18396static void
18397token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18398{
18399 int column = 1, nonspc = 0, i;
18400 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18401 if (*ptr == '\t') {
18402 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18403 }
18404 column++;
18405 if (*ptr != ' ' && *ptr != '\t') {
18406 nonspc = 1;
18407 }
18408 }
18409
18410 ptinfo->beg = loc->beg_pos;
18411 ptinfo->indent = column;
18412 ptinfo->nonspc = nonspc;
18413}
18414
18415static void
18416token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18417{
18418 token_info *ptinfo;
18419
18420 if (!p->token_info_enabled) return;
18421 ptinfo = ALLOC(token_info);
18422 ptinfo->token = token;
18423 ptinfo->next = p->token_info;
18424 token_info_setup(ptinfo, p->lex.pbeg, loc);
18425
18426 p->token_info = ptinfo;
18427}
18428
18429static void
18430token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18431{
18432 token_info *ptinfo_beg = p->token_info;
18433
18434 if (!ptinfo_beg) return;
18435
18436 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18437 token_info_warn(p, token, ptinfo_beg, 1, loc);
18438
18439 p->token_info = ptinfo_beg->next;
18440 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18441}
18442
18443static void
18444token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18445{
18446 token_info *ptinfo_beg = p->token_info;
18447
18448 if (!ptinfo_beg) return;
18449 p->token_info = ptinfo_beg->next;
18450
18451 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18452 ptinfo_beg->beg.column != beg_pos.column ||
18453 strcmp(ptinfo_beg->token, token)) {
18454 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18455 beg_pos.lineno, beg_pos.column, token,
18456 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18457 ptinfo_beg->token);
18458 }
18459
18460 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18461}
18462
18463static void
18464token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18465{
18466 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18467 if (!p->token_info_enabled) return;
18468 if (!ptinfo_beg) return;
18469 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18470 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18471 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18472 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18473 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18474 rb_warn3L(ptinfo_end->beg.lineno,
18475 "mismatched indentations at '%s' with '%s' at %d",
18476 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18477}
18478
18479static int
18480parser_precise_mbclen(struct parser_params *p, const char *ptr)
18481{
18482 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18483 if (!MBCLEN_CHARFOUND_P(len)) {
18484 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18485 return -1;
18486 }
18487 return len;
18488}
18489
18490#ifndef RIPPER
18491static inline void
18492parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18493{
18494 rb_parser_string_t *str;
18495 int lineno = p->ruby_sourceline;
18496 if (!yylloc) {
18497 return;
18498 }
18499 else if (yylloc->beg_pos.lineno == lineno) {
18500 str = p->lex.lastline;
18501 }
18502 else {
18503 return;
18504 }
18505 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18506}
18507
18508static int
18509parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18510{
18511#if 0
18512 YYLTYPE current;
18513
18514 if (!yylloc) {
18515 yylloc = RUBY_SET_YYLLOC(current);
18516 }
18517 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18518 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18519 yylloc = 0;
18520 }
18521#endif
18522 parser_compile_error(p, yylloc, "%s", msg);
18523 parser_show_error_line(p, yylloc);
18524 return 0;
18525}
18526
18527static int
18528parser_yyerror0(struct parser_params *p, const char *msg)
18529{
18530 YYLTYPE current;
18531 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18532}
18533
18534void
18535ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18536{
18537 VALUE mesg;
18538 const int max_line_margin = 30;
18539 const char *ptr, *ptr_end, *pt, *pb;
18540 const char *pre = "", *post = "", *pend;
18541 const char *code = "", *caret = "";
18542 const char *lim;
18543 const char *const pbeg = PARSER_STRING_PTR(str);
18544 char *buf;
18545 long len;
18546 int i;
18547
18548 if (!yylloc) return;
18549 pend = rb_parser_string_end(str);
18550 if (pend > pbeg && pend[-1] == '\n') {
18551 if (--pend > pbeg && pend[-1] == '\r') --pend;
18552 }
18553
18554 pt = pend;
18555 if (lineno == yylloc->end_pos.lineno &&
18556 (pend - pbeg) > yylloc->end_pos.column) {
18557 pt = pbeg + yylloc->end_pos.column;
18558 }
18559
18560 ptr = ptr_end = pt;
18561 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18562 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18563
18564 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18565 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18566
18567 len = ptr_end - ptr;
18568 if (len > 4) {
18569 if (ptr > pbeg) {
18570 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18571 if (ptr > pbeg) pre = "...";
18572 }
18573 if (ptr_end < pend) {
18574 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18575 if (ptr_end < pend) post = "...";
18576 }
18577 }
18578 pb = pbeg;
18579 if (lineno == yylloc->beg_pos.lineno) {
18580 pb += yylloc->beg_pos.column;
18581 if (pb > pt) pb = pt;
18582 }
18583 if (pb < ptr) pb = ptr;
18584 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18585 return;
18586 }
18587 if (RTEST(errbuf)) {
18588 mesg = rb_attr_get(errbuf, idMesg);
18589 if (char_at_end(p, mesg, '\n') != '\n')
18590 rb_str_cat_cstr(mesg, "\n");
18591 }
18592 else {
18593 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18594 }
18595 if (!errbuf && rb_stderr_tty_p()) {
18596#define CSI_BEGIN "\033["
18597#define CSI_SGR "m"
18598 rb_str_catf(mesg,
18599 CSI_BEGIN""CSI_SGR"%s" /* pre */
18600 CSI_BEGIN"1"CSI_SGR"%.*s"
18601 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18602 CSI_BEGIN";1"CSI_SGR"%.*s"
18603 CSI_BEGIN""CSI_SGR"%s" /* post */
18604 "\n",
18605 pre,
18606 (int)(pb - ptr), ptr,
18607 (int)(pt - pb), pb,
18608 (int)(ptr_end - pt), pt,
18609 post);
18610 }
18611 else {
18612 char *p2;
18613
18614 len = ptr_end - ptr;
18615 lim = pt < pend ? pt : pend;
18616 i = (int)(lim - ptr);
18617 buf = ALLOCA_N(char, i+2);
18618 code = ptr;
18619 caret = p2 = buf;
18620 if (ptr <= pb) {
18621 while (ptr < pb) {
18622 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18623 }
18624 *p2++ = '^';
18625 ptr++;
18626 }
18627 if (lim > ptr) {
18628 memset(p2, '~', (lim - ptr));
18629 p2 += (lim - ptr);
18630 }
18631 *p2 = '\0';
18632 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18633 pre, (int)len, code, post,
18634 pre, caret);
18635 }
18636 if (!errbuf) rb_write_error_str(mesg);
18637}
18638#else
18639
18640static int
18641parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18642{
18643 const char *pcur = 0, *ptok = 0;
18644 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18645 p->ruby_sourceline == yylloc->end_pos.lineno) {
18646 pcur = p->lex.pcur;
18647 ptok = p->lex.ptok;
18648 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18649 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18650 }
18651 parser_yyerror0(p, msg);
18652 if (pcur) {
18653 p->lex.ptok = ptok;
18654 p->lex.pcur = pcur;
18655 }
18656 return 0;
18657}
18658
18659static int
18660parser_yyerror0(struct parser_params *p, const char *msg)
18661{
18662 dispatch1(parse_error, STR_NEW2(msg));
18663 ripper_error(p);
18664 return 0;
18665}
18666
18667static inline void
18668parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18669{
18670}
18671#endif /* !RIPPER */
18672
18673static int
18674vtable_size(const struct vtable *tbl)
18675{
18676 if (!DVARS_TERMINAL_P(tbl)) {
18677 return tbl->pos;
18678 }
18679 else {
18680 return 0;
18681 }
18682}
18683
18684static struct vtable *
18685vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18686{
18687 struct vtable *tbl = ALLOC(struct vtable);
18688 tbl->pos = 0;
18689 tbl->capa = 8;
18690 tbl->tbl = ALLOC_N(ID, tbl->capa);
18691 tbl->prev = prev;
18692#ifndef RIPPER
18693 if (p->debug) {
18694 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18695 }
18696#endif
18697 return tbl;
18698}
18699#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18700
18701static void
18702vtable_free_gen(struct parser_params *p, int line, const char *name,
18703 struct vtable *tbl)
18704{
18705#ifndef RIPPER
18706 if (p->debug) {
18707 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18708 }
18709#endif
18710 if (!DVARS_TERMINAL_P(tbl)) {
18711 if (tbl->tbl) {
18712 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18713 }
18714 ruby_sized_xfree(tbl, sizeof(*tbl));
18715 }
18716}
18717#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18718
18719static void
18720vtable_add_gen(struct parser_params *p, int line, const char *name,
18721 struct vtable *tbl, ID id)
18722{
18723#ifndef RIPPER
18724 if (p->debug) {
18725 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18726 line, name, (void *)tbl, rb_id2name(id));
18727 }
18728#endif
18729 if (DVARS_TERMINAL_P(tbl)) {
18730 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18731 return;
18732 }
18733 if (tbl->pos == tbl->capa) {
18734 tbl->capa = tbl->capa * 2;
18735 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18736 }
18737 tbl->tbl[tbl->pos++] = id;
18738}
18739#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18740
18741static void
18742vtable_pop_gen(struct parser_params *p, int line, const char *name,
18743 struct vtable *tbl, int n)
18744{
18745 if (p->debug) {
18746 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18747 line, name, (void *)tbl, n);
18748 }
18749 if (tbl->pos < n) {
18750 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18751 return;
18752 }
18753 tbl->pos -= n;
18754}
18755#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18756
18757static int
18758vtable_included(const struct vtable * tbl, ID id)
18759{
18760 int i;
18761
18762 if (!DVARS_TERMINAL_P(tbl)) {
18763 for (i = 0; i < tbl->pos; i++) {
18764 if (tbl->tbl[i] == id) {
18765 return i+1;
18766 }
18767 }
18768 }
18769 return 0;
18770}
18771
18772static void parser_prepare(struct parser_params *p);
18773
18774static int
18775e_option_supplied(struct parser_params *p)
18776{
18777 return strcmp(p->ruby_sourcefile, "-e") == 0;
18778}
18779
18780#ifndef RIPPER
18781static NODE *parser_append_options(struct parser_params *p, NODE *node);
18782
18783static VALUE
18784yycompile0(VALUE arg)
18785{
18786 int n;
18787 NODE *tree;
18788 struct parser_params *p = (struct parser_params *)arg;
18789 int cov = FALSE;
18790
18791 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18792 cov = TRUE;
18793 }
18794
18795 if (p->debug_lines) {
18796 p->ast->body.script_lines = p->debug_lines;
18797 }
18798
18799 parser_prepare(p);
18800#define RUBY_DTRACE_PARSE_HOOK(name) \
18801 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18802 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18803 }
18804 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18805 n = yyparse(p);
18806 RUBY_DTRACE_PARSE_HOOK(END);
18807
18808 p->debug_lines = 0;
18809
18810 xfree(p->lex.strterm);
18811 p->lex.strterm = 0;
18812 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18813 if (n || p->error_p) {
18814 VALUE mesg = p->error_buffer;
18815 if (!mesg) {
18816 mesg = syntax_error_new();
18817 }
18818 if (!p->error_tolerant) {
18819 rb_set_errinfo(mesg);
18820 return FALSE;
18821 }
18822 }
18823 tree = p->eval_tree;
18824 if (!tree) {
18825 tree = NEW_NIL(&NULL_LOC);
18826 }
18827 else {
18828 rb_parser_ary_t *tokens = p->tokens;
18829 NODE *prelude;
18830 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18831 prelude = block_append(p, p->eval_tree_begin, body);
18832 RNODE_SCOPE(tree)->nd_body = prelude;
18833 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18834 p->ast->body.coverage_enabled = cov;
18835 if (p->keep_tokens) {
18836 p->ast->node_buffer->tokens = tokens;
18837 p->tokens = NULL;
18838 }
18839 }
18840 p->ast->body.root = tree;
18841 p->ast->body.line_count = p->line_count;
18842 return TRUE;
18843}
18844
18845static rb_ast_t *
18846yycompile(struct parser_params *p, VALUE fname, int line)
18847{
18848 rb_ast_t *ast;
18849 if (NIL_P(fname)) {
18850 p->ruby_sourcefile_string = Qnil;
18851 p->ruby_sourcefile = "(none)";
18852 }
18853 else {
18854 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18855 p->ruby_sourcefile = StringValueCStr(fname);
18856 }
18857 p->ruby_sourceline = line - 1;
18858
18859 p->lvtbl = NULL;
18860
18861 p->ast = ast = rb_ast_new();
18862 compile_callback(yycompile0, (VALUE)p);
18863 p->ast = 0;
18864
18865 while (p->lvtbl) {
18866 local_pop(p);
18867 }
18868
18869 return ast;
18870}
18871#endif /* !RIPPER */
18872
18873static rb_encoding *
18874must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18875{
18876 rb_encoding *enc = rb_parser_str_get_encoding(s);
18877 if (!rb_enc_asciicompat(enc)) {
18878 rb_raise(rb_eArgError, "invalid source encoding");
18879 }
18880 return enc;
18881}
18882
18883static rb_parser_string_t *
18884lex_getline(struct parser_params *p)
18885{
18886 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18887 if (!line) return 0;
18888 p->line_count++;
18889 string_buffer_append(p, line);
18890 must_be_ascii_compatible(p, line);
18891 return line;
18892}
18893
18894#ifndef RIPPER
18895rb_ast_t*
18896rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18897{
18898 p->lex.gets = gets;
18899 p->lex.input = input;
18900 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18901
18902 return yycompile(p, fname, line);
18903}
18904#endif /* !RIPPER */
18905
18906#define STR_FUNC_ESCAPE 0x01
18907#define STR_FUNC_EXPAND 0x02
18908#define STR_FUNC_REGEXP 0x04
18909#define STR_FUNC_QWORDS 0x08
18910#define STR_FUNC_SYMBOL 0x10
18911#define STR_FUNC_INDENT 0x20
18912#define STR_FUNC_LABEL 0x40
18913#define STR_FUNC_LIST 0x4000
18914#define STR_FUNC_TERM 0x8000
18915
18916enum string_type {
18917 str_label = STR_FUNC_LABEL,
18918 str_squote = (0),
18919 str_dquote = (STR_FUNC_EXPAND),
18920 str_xquote = (STR_FUNC_EXPAND),
18921 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18922 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18923 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18924 str_ssym = (STR_FUNC_SYMBOL),
18925 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18926};
18927
18928static rb_parser_string_t *
18929parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18930{
18931 rb_parser_string_t *pstr;
18932
18933 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18934
18935 if (!(func & STR_FUNC_REGEXP)) {
18936 if (rb_parser_is_ascii_string(p, pstr)) {
18937 }
18938 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18939 /* everything is valid in ASCII-8BIT */
18940 enc = rb_ascii8bit_encoding();
18941 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18942 }
18943 }
18944
18945 return pstr;
18946}
18947
18948static int
18949strterm_is_heredoc(rb_strterm_t *strterm)
18950{
18951 return strterm->heredoc;
18952}
18953
18954static rb_strterm_t *
18955new_strterm(struct parser_params *p, int func, int term, int paren)
18956{
18957 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18958 strterm->u.literal.func = func;
18959 strterm->u.literal.term = term;
18960 strterm->u.literal.paren = paren;
18961 return strterm;
18962}
18963
18964static rb_strterm_t *
18965new_heredoc(struct parser_params *p)
18966{
18967 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18968 strterm->heredoc = true;
18969 return strterm;
18970}
18971
18972#define peek(p,c) peek_n(p, (c), 0)
18973#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18974#define peekc(p) peekc_n(p, 0)
18975#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18976
18977#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18978static void
18979parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18980{
18981 debug_token_line(p, "add_delayed_token", line);
18982
18983 if (tok < end) {
18984 if (has_delayed_token(p)) {
18985 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18986 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18987 int end_col = (next_line ? 0 : p->delayed.end_col);
18988 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18989 dispatch_delayed_token(p, tSTRING_CONTENT);
18990 }
18991 }
18992 if (!has_delayed_token(p)) {
18993 p->delayed.token = rb_parser_string_new(p, 0, 0);
18994 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18995 p->delayed.beg_line = p->ruby_sourceline;
18996 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18997 }
18998 parser_str_cat(p->delayed.token, tok, end - tok);
18999 p->delayed.end_line = p->ruby_sourceline;
19000 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19001 p->lex.ptok = end;
19002 }
19003}
19004
19005static void
19006set_lastline(struct parser_params *p, rb_parser_string_t *str)
19007{
19008 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19009 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19010 p->lex.lastline = str;
19011}
19012
19013static int
19014nextline(struct parser_params *p, int set_encoding)
19015{
19016 rb_parser_string_t *str = p->lex.nextline;
19017 p->lex.nextline = 0;
19018 if (!str) {
19019 if (p->eofp)
19020 return -1;
19021
19022 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19023 goto end_of_input;
19024 }
19025
19026 if (!p->lex.input || !(str = lex_getline(p))) {
19027 end_of_input:
19028 p->eofp = 1;
19029 lex_goto_eol(p);
19030 return -1;
19031 }
19032#ifndef RIPPER
19033 if (p->debug_lines) {
19034 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19035 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19036 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19037 }
19038#endif
19039 p->cr_seen = FALSE;
19040 }
19041 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19042 /* after here-document without terminator */
19043 goto end_of_input;
19044 }
19045 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19046 if (p->heredoc_end > 0) {
19047 p->ruby_sourceline = p->heredoc_end;
19048 p->heredoc_end = 0;
19049 }
19050 p->ruby_sourceline++;
19051 set_lastline(p, str);
19052 token_flush(p);
19053 return 0;
19054}
19055
19056static int
19057parser_cr(struct parser_params *p, int c)
19058{
19059 if (peek(p, '\n')) {
19060 p->lex.pcur++;
19061 c = '\n';
19062 }
19063 return c;
19064}
19065
19066static inline int
19067nextc0(struct parser_params *p, int set_encoding)
19068{
19069 int c;
19070
19071 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19072 if (nextline(p, set_encoding)) return -1;
19073 }
19074 c = (unsigned char)*p->lex.pcur++;
19075 if (UNLIKELY(c == '\r')) {
19076 c = parser_cr(p, c);
19077 }
19078
19079 return c;
19080}
19081#define nextc(p) nextc0(p, TRUE)
19082
19083static void
19084pushback(struct parser_params *p, int c)
19085{
19086 if (c == -1) return;
19087 p->eofp = 0;
19088 p->lex.pcur--;
19089 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19090 p->lex.pcur--;
19091 }
19092}
19093
19094#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19095
19096#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19097#define tok(p) (p)->tokenbuf
19098#define toklen(p) (p)->tokidx
19099
19100static int
19101looking_at_eol_p(struct parser_params *p)
19102{
19103 const char *ptr = p->lex.pcur;
19104 while (!lex_eol_ptr_p(p, ptr)) {
19105 int c = (unsigned char)*ptr++;
19106 int eol = (c == '\n' || c == '#');
19107 if (eol || !ISSPACE(c)) {
19108 return eol;
19109 }
19110 }
19111 return TRUE;
19112}
19113
19114static char*
19115newtok(struct parser_params *p)
19116{
19117 p->tokidx = 0;
19118 if (!p->tokenbuf) {
19119 p->toksiz = 60;
19120 p->tokenbuf = ALLOC_N(char, 60);
19121 }
19122 if (p->toksiz > 4096) {
19123 p->toksiz = 60;
19124 REALLOC_N(p->tokenbuf, char, 60);
19125 }
19126 return p->tokenbuf;
19127}
19128
19129static char *
19130tokspace(struct parser_params *p, int n)
19131{
19132 p->tokidx += n;
19133
19134 if (p->tokidx >= p->toksiz) {
19135 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19136 REALLOC_N(p->tokenbuf, char, p->toksiz);
19137 }
19138 return &p->tokenbuf[p->tokidx-n];
19139}
19140
19141static void
19142tokadd(struct parser_params *p, int c)
19143{
19144 p->tokenbuf[p->tokidx++] = (char)c;
19145 if (p->tokidx >= p->toksiz) {
19146 p->toksiz *= 2;
19147 REALLOC_N(p->tokenbuf, char, p->toksiz);
19148 }
19149}
19150
19151static int
19152tok_hex(struct parser_params *p, size_t *numlen)
19153{
19154 int c;
19155
19156 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19157 if (!*numlen) {
19158 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19159 yyerror0("invalid hex escape");
19160 dispatch_scan_event(p, tSTRING_CONTENT);
19161 return 0;
19162 }
19163 p->lex.pcur += *numlen;
19164 return c;
19165}
19166
19167#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19168
19169static int
19170escaped_control_code(int c)
19171{
19172 int c2 = 0;
19173 switch (c) {
19174 case ' ':
19175 c2 = 's';
19176 break;
19177 case '\n':
19178 c2 = 'n';
19179 break;
19180 case '\t':
19181 c2 = 't';
19182 break;
19183 case '\v':
19184 c2 = 'v';
19185 break;
19186 case '\r':
19187 c2 = 'r';
19188 break;
19189 case '\f':
19190 c2 = 'f';
19191 break;
19192 }
19193 return c2;
19194}
19195
19196#define WARN_SPACE_CHAR(c, prefix) \
19197 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19198
19199static int
19200tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19201 int regexp_literal, const char *begin)
19202{
19203 const int wide = !begin;
19204 size_t numlen;
19205 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19206
19207 p->lex.pcur += numlen;
19208 if (p->lex.strterm == NULL ||
19209 strterm_is_heredoc(p->lex.strterm) ||
19210 (p->lex.strterm->u.literal.func != str_regexp)) {
19211 if (!begin) begin = p->lex.pcur;
19212 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19213 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19214 yyerror0("invalid Unicode escape");
19215 dispatch_scan_event(p, tSTRING_CONTENT);
19216 return wide && numlen > 0;
19217 }
19218 if (codepoint > 0x10ffff) {
19219 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19220 yyerror0("invalid Unicode codepoint (too large)");
19221 dispatch_scan_event(p, tSTRING_CONTENT);
19222 return wide;
19223 }
19224 if ((codepoint & 0xfffff800) == 0xd800) {
19225 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19226 yyerror0("invalid Unicode codepoint");
19227 dispatch_scan_event(p, tSTRING_CONTENT);
19228 return wide;
19229 }
19230 }
19231 if (regexp_literal) {
19232 tokcopy(p, (int)numlen);
19233 }
19234 else if (codepoint >= 0x80) {
19235 rb_encoding *utf8 = rb_utf8_encoding();
19236 if (*encp && utf8 != *encp) {
19237 YYLTYPE loc = RUBY_INIT_YYLLOC();
19238 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19239 parser_show_error_line(p, &loc);
19240 return wide;
19241 }
19242 *encp = utf8;
19243 tokaddmbc(p, codepoint, *encp);
19244 }
19245 else {
19246 tokadd(p, codepoint);
19247 }
19248 return TRUE;
19249}
19250
19251static int tokadd_mbchar(struct parser_params *p, int c);
19252
19253static int
19254tokskip_mbchar(struct parser_params *p)
19255{
19256 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19257 if (len > 0) {
19258 p->lex.pcur += len - 1;
19259 }
19260 return len;
19261}
19262
19263/* return value is for ?\u3042 */
19264static void
19265tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19266 int term, int symbol_literal, int regexp_literal)
19267{
19268 /*
19269 * If `term` is not -1, then we allow multiple codepoints in \u{}
19270 * upto `term` byte, otherwise we're parsing a character literal.
19271 * And then add the codepoints to the current token.
19272 */
19273 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19274
19275 const int open_brace = '{', close_brace = '}';
19276
19277 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19278
19279 if (peek(p, open_brace)) { /* handle \u{...} form */
19280 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19281 /*
19282 * Skip parsing validation code and copy bytes as-is until term or
19283 * closing brace, in order to correctly handle extended regexps where
19284 * invalid unicode escapes are allowed in comments. The regexp parser
19285 * does its own validation and will catch any issues.
19286 */
19287 tokadd(p, open_brace);
19288 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19289 int c = peekc(p);
19290 if (c == close_brace) {
19291 tokadd(p, c);
19292 ++p->lex.pcur;
19293 break;
19294 }
19295 else if (c == term) {
19296 break;
19297 }
19298 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19299 tokadd(p, c);
19300 c = *++p->lex.pcur;
19301 }
19302 tokadd_mbchar(p, c);
19303 }
19304 }
19305 else {
19306 const char *second = NULL;
19307 int c, last = nextc(p);
19308 if (lex_eol_p(p)) goto unterminated;
19309 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19310 while (c != close_brace) {
19311 if (c == term) goto unterminated;
19312 if (second == multiple_codepoints)
19313 second = p->lex.pcur;
19314 if (regexp_literal) tokadd(p, last);
19315 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19316 break;
19317 }
19318 while (ISSPACE(c = peekc(p))) {
19319 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19320 last = c;
19321 }
19322 if (term == -1 && !second)
19323 second = multiple_codepoints;
19324 }
19325
19326 if (c != close_brace) {
19327 unterminated:
19328 flush_string_content(p, rb_utf8_encoding(), 0);
19329 yyerror0("unterminated Unicode escape");
19330 dispatch_scan_event(p, tSTRING_CONTENT);
19331 return;
19332 }
19333 if (second && second != multiple_codepoints) {
19334 const char *pcur = p->lex.pcur;
19335 p->lex.pcur = second;
19336 dispatch_scan_event(p, tSTRING_CONTENT);
19337 token_flush(p);
19338 p->lex.pcur = pcur;
19339 yyerror0(multiple_codepoints);
19340 token_flush(p);
19341 }
19342
19343 if (regexp_literal) tokadd(p, close_brace);
19344 nextc(p);
19345 }
19346 }
19347 else { /* handle \uxxxx form */
19348 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19349 token_flush(p);
19350 return;
19351 }
19352 }
19353}
19354
19355#define ESCAPE_CONTROL 1
19356#define ESCAPE_META 2
19357
19358static int
19359read_escape(struct parser_params *p, int flags, const char *begin)
19360{
19361 int c;
19362 size_t numlen;
19363
19364 switch (c = nextc(p)) {
19365 case '\\': /* Backslash */
19366 return c;
19367
19368 case 'n': /* newline */
19369 return '\n';
19370
19371 case 't': /* horizontal tab */
19372 return '\t';
19373
19374 case 'r': /* carriage-return */
19375 return '\r';
19376
19377 case 'f': /* form-feed */
19378 return '\f';
19379
19380 case 'v': /* vertical tab */
19381 return '\13';
19382
19383 case 'a': /* alarm(bell) */
19384 return '\007';
19385
19386 case 'e': /* escape */
19387 return 033;
19388
19389 case '0': case '1': case '2': case '3': /* octal constant */
19390 case '4': case '5': case '6': case '7':
19391 pushback(p, c);
19392 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19393 p->lex.pcur += numlen;
19394 return c;
19395
19396 case 'x': /* hex constant */
19397 c = tok_hex(p, &numlen);
19398 if (numlen == 0) return 0;
19399 return c;
19400
19401 case 'b': /* backspace */
19402 return '\010';
19403
19404 case 's': /* space */
19405 return ' ';
19406
19407 case 'M':
19408 if (flags & ESCAPE_META) goto eof;
19409 if ((c = nextc(p)) != '-') {
19410 goto eof;
19411 }
19412 if ((c = nextc(p)) == '\\') {
19413 switch (peekc(p)) {
19414 case 'u': case 'U':
19415 nextc(p);
19416 goto eof;
19417 }
19418 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19419 }
19420 else if (c == -1) goto eof;
19421 else if (!ISASCII(c)) {
19422 tokskip_mbchar(p);
19423 goto eof;
19424 }
19425 else {
19426 int c2 = escaped_control_code(c);
19427 if (c2) {
19428 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19429 WARN_SPACE_CHAR(c2, "\\M-");
19430 }
19431 else {
19432 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19433 }
19434 }
19435 else if (ISCNTRL(c)) goto eof;
19436 return ((c & 0xff) | 0x80);
19437 }
19438
19439 case 'C':
19440 if ((c = nextc(p)) != '-') {
19441 goto eof;
19442 }
19443 case 'c':
19444 if (flags & ESCAPE_CONTROL) goto eof;
19445 if ((c = nextc(p))== '\\') {
19446 switch (peekc(p)) {
19447 case 'u': case 'U':
19448 nextc(p);
19449 goto eof;
19450 }
19451 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19452 }
19453 else if (c == '?')
19454 return 0177;
19455 else if (c == -1) goto eof;
19456 else if (!ISASCII(c)) {
19457 tokskip_mbchar(p);
19458 goto eof;
19459 }
19460 else {
19461 int c2 = escaped_control_code(c);
19462 if (c2) {
19463 if (ISCNTRL(c)) {
19464 if (flags & ESCAPE_META) {
19465 WARN_SPACE_CHAR(c2, "\\M-");
19466 }
19467 else {
19468 WARN_SPACE_CHAR(c2, "");
19469 }
19470 }
19471 else {
19472 if (flags & ESCAPE_META) {
19473 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19474 }
19475 else {
19476 WARN_SPACE_CHAR(c2, "\\C-");
19477 }
19478 }
19479 }
19480 else if (ISCNTRL(c)) goto eof;
19481 }
19482 return c & 0x9f;
19483
19484 eof:
19485 case -1:
19486 flush_string_content(p, p->enc, p->lex.pcur - begin);
19487 yyerror0("Invalid escape character syntax");
19488 dispatch_scan_event(p, tSTRING_CONTENT);
19489 return '\0';
19490
19491 default:
19492 if (!ISASCII(c)) {
19493 tokskip_mbchar(p);
19494 goto eof;
19495 }
19496 return c;
19497 }
19498}
19499
19500static void
19501tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19502{
19503 int len = rb_enc_codelen(c, enc);
19504 rb_enc_mbcput(c, tokspace(p, len), enc);
19505}
19506
19507static int
19508tokadd_escape(struct parser_params *p)
19509{
19510 int c;
19511 size_t numlen;
19512 const char *begin = p->lex.pcur;
19513
19514 switch (c = nextc(p)) {
19515 case '\n':
19516 return 0; /* just ignore */
19517
19518 case '0': case '1': case '2': case '3': /* octal constant */
19519 case '4': case '5': case '6': case '7':
19520 {
19521 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19522 if (numlen == 0) goto eof;
19523 p->lex.pcur += numlen;
19524 tokcopy(p, (int)numlen + 1);
19525 }
19526 return 0;
19527
19528 case 'x': /* hex constant */
19529 {
19530 tok_hex(p, &numlen);
19531 if (numlen == 0) return -1;
19532 tokcopy(p, (int)numlen + 2);
19533 }
19534 return 0;
19535
19536 eof:
19537 case -1:
19538 flush_string_content(p, p->enc, p->lex.pcur - begin);
19539 yyerror0("Invalid escape character syntax");
19540 token_flush(p);
19541 return -1;
19542
19543 default:
19544 tokadd(p, '\\');
19545 tokadd(p, c);
19546 }
19547 return 0;
19548}
19549
19550static int
19551char_to_option(int c)
19552{
19553 int val;
19554
19555 switch (c) {
19556 case 'i':
19557 val = RE_ONIG_OPTION_IGNORECASE;
19558 break;
19559 case 'x':
19560 val = RE_ONIG_OPTION_EXTEND;
19561 break;
19562 case 'm':
19563 val = RE_ONIG_OPTION_MULTILINE;
19564 break;
19565 default:
19566 val = 0;
19567 break;
19568 }
19569 return val;
19570}
19571
19572#define ARG_ENCODING_FIXED 16
19573#define ARG_ENCODING_NONE 32
19574#define ENC_ASCII8BIT 1
19575#define ENC_EUC_JP 2
19576#define ENC_Windows_31J 3
19577#define ENC_UTF8 4
19578
19579static int
19580char_to_option_kcode(int c, int *option, int *kcode)
19581{
19582 *option = 0;
19583
19584 switch (c) {
19585 case 'n':
19586 *kcode = ENC_ASCII8BIT;
19587 return (*option = ARG_ENCODING_NONE);
19588 case 'e':
19589 *kcode = ENC_EUC_JP;
19590 break;
19591 case 's':
19592 *kcode = ENC_Windows_31J;
19593 break;
19594 case 'u':
19595 *kcode = ENC_UTF8;
19596 break;
19597 default:
19598 *kcode = -1;
19599 return (*option = char_to_option(c));
19600 }
19601 *option = ARG_ENCODING_FIXED;
19602 return 1;
19603}
19604
19605static int
19606regx_options(struct parser_params *p)
19607{
19608 int kcode = 0;
19609 int kopt = 0;
19610 int options = 0;
19611 int c, opt, kc;
19612
19613 newtok(p);
19614 while (c = nextc(p), ISALPHA(c)) {
19615 if (c == 'o') {
19616 options |= RE_OPTION_ONCE;
19617 }
19618 else if (char_to_option_kcode(c, &opt, &kc)) {
19619 if (kc >= 0) {
19620 if (kc != ENC_ASCII8BIT) kcode = c;
19621 kopt = opt;
19622 }
19623 else {
19624 options |= opt;
19625 }
19626 }
19627 else {
19628 tokadd(p, c);
19629 }
19630 }
19631 options |= kopt;
19632 pushback(p, c);
19633 if (toklen(p)) {
19634 YYLTYPE loc = RUBY_INIT_YYLLOC();
19635 tokfix(p);
19636 compile_error(p, "unknown regexp option%s - %*s",
19637 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19638 parser_show_error_line(p, &loc);
19639 }
19640 return options | RE_OPTION_ENCODING(kcode);
19641}
19642
19643static int
19644tokadd_mbchar(struct parser_params *p, int c)
19645{
19646 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19647 if (len < 0) return -1;
19648 tokadd(p, c);
19649 p->lex.pcur += --len;
19650 if (len > 0) tokcopy(p, len);
19651 return c;
19652}
19653
19654static inline int
19655simple_re_meta(int c)
19656{
19657 switch (c) {
19658 case '$': case '*': case '+': case '.':
19659 case '?': case '^': case '|':
19660 case ')': case ']': case '}': case '>':
19661 return TRUE;
19662 default:
19663 return FALSE;
19664 }
19665}
19666
19667static int
19668parser_update_heredoc_indent(struct parser_params *p, int c)
19669{
19670 if (p->heredoc_line_indent == -1) {
19671 if (c == '\n') p->heredoc_line_indent = 0;
19672 }
19673 else {
19674 if (c == ' ') {
19675 p->heredoc_line_indent++;
19676 return TRUE;
19677 }
19678 else if (c == '\t') {
19679 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19680 p->heredoc_line_indent = w * TAB_WIDTH;
19681 return TRUE;
19682 }
19683 else if (c != '\n') {
19684 if (p->heredoc_indent > p->heredoc_line_indent) {
19685 p->heredoc_indent = p->heredoc_line_indent;
19686 }
19687 p->heredoc_line_indent = -1;
19688 }
19689 else {
19690 /* Whitespace only line has no indentation */
19691 p->heredoc_line_indent = 0;
19692 }
19693 }
19694 return FALSE;
19695}
19696
19697static void
19698parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19699{
19700 YYLTYPE loc = RUBY_INIT_YYLLOC();
19701 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19702 compile_error(p, "%s mixed within %s source", n1, n2);
19703 parser_show_error_line(p, &loc);
19704}
19705
19706static void
19707parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19708{
19709 const char *pos = p->lex.pcur;
19710 p->lex.pcur = beg;
19711 parser_mixed_error(p, enc1, enc2);
19712 p->lex.pcur = pos;
19713}
19714
19715static inline char
19716nibble_char_upper(unsigned int c)
19717{
19718 c &= 0xf;
19719 return c + (c < 10 ? '0' : 'A' - 10);
19720}
19721
19722static int
19723tokadd_string(struct parser_params *p,
19724 int func, int term, int paren, long *nest,
19725 rb_encoding **encp, rb_encoding **enc)
19726{
19727 int c;
19728 bool erred = false;
19729#ifdef RIPPER
19730 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19731 int top_of_line = FALSE;
19732#endif
19733
19734#define mixed_error(enc1, enc2) \
19735 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19736#define mixed_escape(beg, enc1, enc2) \
19737 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19738
19739 while ((c = nextc(p)) != -1) {
19740 if (p->heredoc_indent > 0) {
19741 parser_update_heredoc_indent(p, c);
19742 }
19743#ifdef RIPPER
19744 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19745 pushback(p, c);
19746 break;
19747 }
19748#endif
19749
19750 if (paren && c == paren) {
19751 ++*nest;
19752 }
19753 else if (c == term) {
19754 if (!nest || !*nest) {
19755 pushback(p, c);
19756 break;
19757 }
19758 --*nest;
19759 }
19760 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19761 unsigned char c2 = *p->lex.pcur;
19762 if (c2 == '$' || c2 == '@' || c2 == '{') {
19763 pushback(p, c);
19764 break;
19765 }
19766 }
19767 else if (c == '\\') {
19768 c = nextc(p);
19769 switch (c) {
19770 case '\n':
19771 if (func & STR_FUNC_QWORDS) break;
19772 if (func & STR_FUNC_EXPAND) {
19773 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19774 continue;
19775 if (c == term) {
19776 c = '\\';
19777 goto terminate;
19778 }
19779 }
19780 tokadd(p, '\\');
19781 break;
19782
19783 case '\\':
19784 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19785 break;
19786
19787 case 'u':
19788 if ((func & STR_FUNC_EXPAND) == 0) {
19789 tokadd(p, '\\');
19790 break;
19791 }
19792 tokadd_utf8(p, enc, term,
19793 func & STR_FUNC_SYMBOL,
19794 func & STR_FUNC_REGEXP);
19795 continue;
19796
19797 default:
19798 if (c == -1) return -1;
19799 if (!ISASCII(c)) {
19800 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19801 goto non_ascii;
19802 }
19803 if (func & STR_FUNC_REGEXP) {
19804 switch (c) {
19805 case 'c':
19806 case 'C':
19807 case 'M': {
19808 pushback(p, c);
19809 c = read_escape(p, 0, p->lex.pcur - 1);
19810
19811 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19812 *t++ = '\\';
19813 *t++ = 'x';
19814 *t++ = nibble_char_upper(c >> 4);
19815 *t++ = nibble_char_upper(c);
19816 continue;
19817 }
19818 }
19819
19820 if (c == term && !simple_re_meta(c)) {
19821 tokadd(p, c);
19822 continue;
19823 }
19824 pushback(p, c);
19825 if ((c = tokadd_escape(p)) < 0)
19826 return -1;
19827 if (*enc && *enc != *encp) {
19828 mixed_escape(p->lex.ptok+2, *enc, *encp);
19829 }
19830 continue;
19831 }
19832 else if (func & STR_FUNC_EXPAND) {
19833 pushback(p, c);
19834 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19835 c = read_escape(p, 0, p->lex.pcur - 1);
19836 }
19837 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19838 /* ignore backslashed spaces in %w */
19839 }
19840 else if (c != term && !(paren && c == paren)) {
19841 tokadd(p, '\\');
19842 pushback(p, c);
19843 continue;
19844 }
19845 }
19846 }
19847 else if (!parser_isascii(p)) {
19848 non_ascii:
19849 if (!*enc) {
19850 *enc = *encp;
19851 }
19852 else if (*enc != *encp) {
19853 mixed_error(*enc, *encp);
19854 continue;
19855 }
19856 if (tokadd_mbchar(p, c) == -1) return -1;
19857 continue;
19858 }
19859 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19860 pushback(p, c);
19861 break;
19862 }
19863 if (c & 0x80) {
19864 if (!*enc) {
19865 *enc = *encp;
19866 }
19867 else if (*enc != *encp) {
19868 mixed_error(*enc, *encp);
19869 continue;
19870 }
19871 }
19872 tokadd(p, c);
19873#ifdef RIPPER
19874 top_of_line = (c == '\n');
19875#endif
19876 }
19877 terminate:
19878 if (*enc) *encp = *enc;
19879 return c;
19880}
19881
19882#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19883
19884static void
19885flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19886{
19887 p->lex.pcur -= back;
19888 if (has_delayed_token(p)) {
19889 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19890 if (len > 0) {
19891 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19892 p->delayed.end_line = p->ruby_sourceline;
19893 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19894 }
19895 dispatch_delayed_token(p, tSTRING_CONTENT);
19896 p->lex.ptok = p->lex.pcur;
19897 }
19898 dispatch_scan_event(p, tSTRING_CONTENT);
19899 p->lex.pcur += back;
19900}
19901
19902/* this can be shared with ripper, since it's independent from struct
19903 * parser_params. */
19904#ifndef RIPPER
19905#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19906#define SPECIAL_PUNCT(idx) ( \
19907 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19908 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19909 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19910 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19911 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19912 BIT('0', idx))
19913const uint_least32_t ruby_global_name_punct_bits[] = {
19914 SPECIAL_PUNCT(0),
19915 SPECIAL_PUNCT(1),
19916 SPECIAL_PUNCT(2),
19917};
19918#undef BIT
19919#undef SPECIAL_PUNCT
19920#endif
19921
19922static enum yytokentype
19923parser_peek_variable_name(struct parser_params *p)
19924{
19925 int c;
19926 const char *ptr = p->lex.pcur;
19927
19928 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19929 c = *ptr++;
19930 switch (c) {
19931 case '$':
19932 if ((c = *ptr) == '-') {
19933 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19934 c = *ptr;
19935 }
19936 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19937 return tSTRING_DVAR;
19938 }
19939 break;
19940 case '@':
19941 if ((c = *ptr) == '@') {
19942 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19943 c = *ptr;
19944 }
19945 break;
19946 case '{':
19947 p->lex.pcur = ptr;
19948 p->command_start = TRUE;
19949 yylval.state = p->lex.state;
19950 return tSTRING_DBEG;
19951 default:
19952 return 0;
19953 }
19954 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19955 return tSTRING_DVAR;
19956 return 0;
19957}
19958
19959#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19960#define IS_END() IS_lex_state(EXPR_END_ANY)
19961#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19962#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19963#define IS_LABEL_POSSIBLE() (\
19964 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19965 IS_ARG())
19966#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19967#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19968
19969static inline enum yytokentype
19970parser_string_term(struct parser_params *p, int func)
19971{
19972 xfree(p->lex.strterm);
19973 p->lex.strterm = 0;
19974 if (func & STR_FUNC_REGEXP) {
19975 set_yylval_num(regx_options(p));
19976 dispatch_scan_event(p, tREGEXP_END);
19977 SET_LEX_STATE(EXPR_END);
19978 return tREGEXP_END;
19979 }
19980 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19981 nextc(p);
19982 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19983 return tLABEL_END;
19984 }
19985 SET_LEX_STATE(EXPR_END);
19986 return tSTRING_END;
19987}
19988
19989static enum yytokentype
19990parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19991{
19992 int func = quote->func;
19993 int term = quote->term;
19994 int paren = quote->paren;
19995 int c, space = 0;
19996 rb_encoding *enc = p->enc;
19997 rb_encoding *base_enc = 0;
19998 rb_parser_string_t *lit;
19999
20000 if (func & STR_FUNC_TERM) {
20001 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20002 SET_LEX_STATE(EXPR_END);
20003 xfree(p->lex.strterm);
20004 p->lex.strterm = 0;
20005 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20006 }
20007 c = nextc(p);
20008 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20009 while (c != '\n' && ISSPACE(c = nextc(p)));
20010 space = 1;
20011 }
20012 if (func & STR_FUNC_LIST) {
20013 quote->func &= ~STR_FUNC_LIST;
20014 space = 1;
20015 }
20016 if (c == term && !quote->nest) {
20017 if (func & STR_FUNC_QWORDS) {
20018 quote->func |= STR_FUNC_TERM;
20019 pushback(p, c); /* dispatch the term at tSTRING_END */
20020 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20021 return ' ';
20022 }
20023 return parser_string_term(p, func);
20024 }
20025 if (space) {
20026 if (!ISSPACE(c)) pushback(p, c);
20027 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20028 return ' ';
20029 }
20030 newtok(p);
20031 if ((func & STR_FUNC_EXPAND) && c == '#') {
20032 enum yytokentype t = parser_peek_variable_name(p);
20033 if (t) return t;
20034 tokadd(p, '#');
20035 c = nextc(p);
20036 }
20037 pushback(p, c);
20038 if (tokadd_string(p, func, term, paren, &quote->nest,
20039 &enc, &base_enc) == -1) {
20040 if (p->eofp) {
20041#ifndef RIPPER
20042# define unterminated_literal(mesg) yyerror0(mesg)
20043#else
20044# define unterminated_literal(mesg) compile_error(p, mesg)
20045#endif
20046 literal_flush(p, p->lex.pcur);
20047 if (func & STR_FUNC_QWORDS) {
20048 /* no content to add, bailing out here */
20049 unterminated_literal("unterminated list meets end of file");
20050 xfree(p->lex.strterm);
20051 p->lex.strterm = 0;
20052 return tSTRING_END;
20053 }
20054 if (func & STR_FUNC_REGEXP) {
20055 unterminated_literal("unterminated regexp meets end of file");
20056 }
20057 else {
20058 unterminated_literal("unterminated string meets end of file");
20059 }
20060 quote->func |= STR_FUNC_TERM;
20061 }
20062 }
20063
20064 tokfix(p);
20065 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20066 set_yylval_str(lit);
20067 flush_string_content(p, enc, 0);
20068
20069 return tSTRING_CONTENT;
20070}
20071
20072static enum yytokentype
20073heredoc_identifier(struct parser_params *p)
20074{
20075 /*
20076 * term_len is length of `<<"END"` except `END`,
20077 * in this case term_len is 4 (<, <, " and ").
20078 */
20079 long len, offset = p->lex.pcur - p->lex.pbeg;
20080 int c = nextc(p), term, func = 0, quote = 0;
20081 enum yytokentype token = tSTRING_BEG;
20082 int indent = 0;
20083
20084 if (c == '-') {
20085 c = nextc(p);
20086 func = STR_FUNC_INDENT;
20087 offset++;
20088 }
20089 else if (c == '~') {
20090 c = nextc(p);
20091 func = STR_FUNC_INDENT;
20092 offset++;
20093 indent = INT_MAX;
20094 }
20095 switch (c) {
20096 case '\'':
20097 func |= str_squote; goto quoted;
20098 case '"':
20099 func |= str_dquote; goto quoted;
20100 case '`':
20101 token = tXSTRING_BEG;
20102 func |= str_xquote; goto quoted;
20103
20104 quoted:
20105 quote++;
20106 offset++;
20107 term = c;
20108 len = 0;
20109 while ((c = nextc(p)) != term) {
20110 if (c == -1 || c == '\r' || c == '\n') {
20111 yyerror0("unterminated here document identifier");
20112 return -1;
20113 }
20114 }
20115 break;
20116
20117 default:
20118 if (!parser_is_identchar(p)) {
20119 pushback(p, c);
20120 if (func & STR_FUNC_INDENT) {
20121 pushback(p, indent > 0 ? '~' : '-');
20122 }
20123 return 0;
20124 }
20125 func |= str_dquote;
20126 do {
20127 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20128 if (n < 0) return 0;
20129 p->lex.pcur += --n;
20130 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20131 pushback(p, c);
20132 break;
20133 }
20134
20135 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20136 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20137 yyerror0("too long here document identifier");
20138 dispatch_scan_event(p, tHEREDOC_BEG);
20139 lex_goto_eol(p);
20140
20141 p->lex.strterm = new_heredoc(p);
20142 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20143 here->offset = offset;
20144 here->sourceline = p->ruby_sourceline;
20145 here->length = (unsigned)len;
20146 here->quote = quote;
20147 here->func = func;
20148 here->lastline = p->lex.lastline;
20149
20150 token_flush(p);
20151 p->heredoc_indent = indent;
20152 p->heredoc_line_indent = 0;
20153 return token;
20154}
20155
20156static void
20157heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20158{
20159 rb_parser_string_t *line;
20160 rb_strterm_t *term = p->lex.strterm;
20161
20162 p->lex.strterm = 0;
20163 line = here->lastline;
20164 p->lex.lastline = line;
20165 p->lex.pbeg = PARSER_STRING_PTR(line);
20166 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20167 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20168 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20169 p->heredoc_end = p->ruby_sourceline;
20170 p->ruby_sourceline = (int)here->sourceline;
20171 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20172 p->eofp = 0;
20173 xfree(term);
20174}
20175
20176static int
20177dedent_string_column(const char *str, long len, int width)
20178{
20179 int i, col = 0;
20180
20181 for (i = 0; i < len && col < width; i++) {
20182 if (str[i] == ' ') {
20183 col++;
20184 }
20185 else if (str[i] == '\t') {
20186 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20187 if (n > width) break;
20188 col = n;
20189 }
20190 else {
20191 break;
20192 }
20193 }
20194
20195 return i;
20196}
20197
20198static int
20199dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20200{
20201 char *str;
20202 long len;
20203 int i;
20204
20205 len = PARSER_STRING_LEN(string);
20206 str = PARSER_STRING_PTR(string);
20207
20208 i = dedent_string_column(str, len, width);
20209 if (!i) return 0;
20210
20211 rb_parser_str_modify(string);
20212 str = PARSER_STRING_PTR(string);
20213 if (PARSER_STRING_LEN(string) != len)
20214 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20215 MEMMOVE(str, str + i, char, len - i);
20216 rb_parser_str_set_len(p, string, len - i);
20217 return i;
20218}
20219
20220static NODE *
20221heredoc_dedent(struct parser_params *p, NODE *root)
20222{
20223 NODE *node, *str_node, *prev_node;
20224 int indent = p->heredoc_indent;
20225 rb_parser_string_t *prev_lit = 0;
20226
20227 if (indent <= 0) return root;
20228 if (!root) return root;
20229
20230 prev_node = node = str_node = root;
20231 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20232
20233 while (str_node) {
20234 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20235 if (nd_fl_newline(str_node)) {
20236 dedent_string(p, lit, indent);
20237 }
20238 if (!prev_lit) {
20239 prev_lit = lit;
20240 }
20241 else if (!literal_concat0(p, prev_lit, lit)) {
20242 return 0;
20243 }
20244 else {
20245 NODE *end = RNODE_LIST(node)->as.nd_end;
20246 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20247 if (!node) {
20248 if (nd_type_p(prev_node, NODE_DSTR))
20249 nd_set_type(prev_node, NODE_STR);
20250 break;
20251 }
20252 RNODE_LIST(node)->as.nd_end = end;
20253 goto next_str;
20254 }
20255
20256 str_node = 0;
20257 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20258 next_str:
20259 if (!nd_type_p(node, NODE_LIST)) break;
20260 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20261 enum node_type type = nd_type(str_node);
20262 if (type == NODE_STR || type == NODE_DSTR) break;
20263 prev_lit = 0;
20264 str_node = 0;
20265 }
20266 }
20267 }
20268 return root;
20269}
20270
20271static int
20272whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20273{
20274 const char *beg = p->lex.pbeg;
20275 const char *ptr = p->lex.pend;
20276
20277 if (ptr - beg < len) return FALSE;
20278 if (ptr > beg && ptr[-1] == '\n') {
20279 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20280 if (ptr - beg < len) return FALSE;
20281 }
20282 if (strncmp(eos, ptr -= len, len)) return FALSE;
20283 if (indent) {
20284 while (beg < ptr && ISSPACE(*beg)) beg++;
20285 }
20286 return beg == ptr;
20287}
20288
20289static int
20290word_match_p(struct parser_params *p, const char *word, long len)
20291{
20292 if (strncmp(p->lex.pcur, word, len)) return 0;
20293 if (lex_eol_n_p(p, len)) return 1;
20294 int c = (unsigned char)p->lex.pcur[len];
20295 if (ISSPACE(c)) return 1;
20296 switch (c) {
20297 case '\0': case '\004': case '\032': return 1;
20298 }
20299 return 0;
20300}
20301
20302#define NUM_SUFFIX_R (1<<0)
20303#define NUM_SUFFIX_I (1<<1)
20304#define NUM_SUFFIX_ALL 3
20305
20306static int
20307number_literal_suffix(struct parser_params *p, int mask)
20308{
20309 int c, result = 0;
20310 const char *lastp = p->lex.pcur;
20311
20312 while ((c = nextc(p)) != -1) {
20313 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20314 result |= (mask & NUM_SUFFIX_I);
20315 mask &= ~NUM_SUFFIX_I;
20316 /* r after i, rational of complex is disallowed */
20317 mask &= ~NUM_SUFFIX_R;
20318 continue;
20319 }
20320 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20321 result |= (mask & NUM_SUFFIX_R);
20322 mask &= ~NUM_SUFFIX_R;
20323 continue;
20324 }
20325 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20326 p->lex.pcur = lastp;
20327 return 0;
20328 }
20329 pushback(p, c);
20330 break;
20331 }
20332 return result;
20333}
20334
20335static enum yytokentype
20336set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20337{
20338 enum rb_numeric_type numeric_type = integer_literal;
20339
20340 if (type == tFLOAT) {
20341 numeric_type = float_literal;
20342 }
20343
20344 if (suffix & NUM_SUFFIX_R) {
20345 type = tRATIONAL;
20346 numeric_type = rational_literal;
20347 }
20348 if (suffix & NUM_SUFFIX_I) {
20349 type = tIMAGINARY;
20350 }
20351
20352 switch (type) {
20353 case tINTEGER:
20354 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20355 break;
20356 case tFLOAT:
20357 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20358 break;
20359 case tRATIONAL:
20360 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20361 break;
20362 case tIMAGINARY:
20363 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20364 (void)numeric_type; /* for ripper */
20365 break;
20366 default:
20367 rb_bug("unexpected token: %d", type);
20368 }
20369 SET_LEX_STATE(EXPR_END);
20370 return type;
20371}
20372
20373#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20374static void
20375parser_dispatch_heredoc_end(struct parser_params *p, int line)
20376{
20377 if (has_delayed_token(p))
20378 dispatch_delayed_token(p, tSTRING_CONTENT);
20379
20380#ifdef RIPPER
20381 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20382 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20383#else
20384 if (p->keep_tokens) {
20385 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20386 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20387 parser_append_tokens(p, str, tHEREDOC_END, line);
20388 }
20389#endif
20390
20391 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20392 lex_goto_eol(p);
20393 token_flush(p);
20394}
20395
20396static enum yytokentype
20397here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20398{
20399 int c, func, indent = 0;
20400 const char *eos, *ptr, *ptr_end;
20401 long len;
20402 rb_parser_string_t *str = 0;
20403 rb_encoding *enc = p->enc;
20404 rb_encoding *base_enc = 0;
20405 int bol;
20406#ifdef RIPPER
20407 VALUE s_value;
20408#endif
20409
20410 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20411 len = here->length;
20412 indent = (func = here->func) & STR_FUNC_INDENT;
20413
20414 if ((c = nextc(p)) == -1) {
20415 error:
20416#ifdef RIPPER
20417 if (!has_delayed_token(p)) {
20418 dispatch_scan_event(p, tSTRING_CONTENT);
20419 }
20420 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20421 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20422 if (!(func & STR_FUNC_REGEXP)) {
20423 int cr = ENC_CODERANGE_UNKNOWN;
20424 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20425 if (cr != ENC_CODERANGE_7BIT &&
20426 rb_is_usascii_enc(p->enc) &&
20427 enc != rb_utf8_encoding()) {
20428 enc = rb_ascii8bit_encoding();
20429 }
20430 }
20431 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20432 }
20433 dispatch_delayed_token(p, tSTRING_CONTENT);
20434 }
20435 else {
20436 dispatch_delayed_token(p, tSTRING_CONTENT);
20437 dispatch_scan_event(p, tSTRING_CONTENT);
20438 }
20439 lex_goto_eol(p);
20440#endif
20441 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20442 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20443 (int)len, eos);
20444 token_flush(p);
20445 SET_LEX_STATE(EXPR_END);
20446 return tSTRING_END;
20447 }
20448 bol = was_bol(p);
20449 if (!bol) {
20450 /* not beginning of line, cannot be the terminator */
20451 }
20452 else if (p->heredoc_line_indent == -1) {
20453 /* `heredoc_line_indent == -1` means
20454 * - "after an interpolation in the same line", or
20455 * - "in a continuing line"
20456 */
20457 p->heredoc_line_indent = 0;
20458 }
20459 else if (whole_match_p(p, eos, len, indent)) {
20460 dispatch_heredoc_end(p);
20461 restore:
20462 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20463 token_flush(p);
20464 SET_LEX_STATE(EXPR_END);
20465 return tSTRING_END;
20466 }
20467
20468 if (!(func & STR_FUNC_EXPAND)) {
20469 do {
20470 ptr = PARSER_STRING_PTR(p->lex.lastline);
20471 ptr_end = p->lex.pend;
20472 if (ptr_end > ptr) {
20473 switch (ptr_end[-1]) {
20474 case '\n':
20475 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20476 ptr_end++;
20477 break;
20478 }
20479 case '\r':
20480 --ptr_end;
20481 }
20482 }
20483
20484 if (p->heredoc_indent > 0) {
20485 long i = 0;
20486 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20487 i++;
20488 p->heredoc_line_indent = 0;
20489 }
20490
20491 if (str)
20492 parser_str_cat(str, ptr, ptr_end - ptr);
20493 else
20494 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20495 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20496 lex_goto_eol(p);
20497 if (p->heredoc_indent > 0) {
20498 goto flush_str;
20499 }
20500 if (nextc(p) == -1) {
20501 if (str) {
20502 rb_parser_string_free(p, str);
20503 str = 0;
20504 }
20505 goto error;
20506 }
20507 } while (!whole_match_p(p, eos, len, indent));
20508 }
20509 else {
20510 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20511 newtok(p);
20512 if (c == '#') {
20513 enum yytokentype t = parser_peek_variable_name(p);
20514 if (p->heredoc_line_indent != -1) {
20515 if (p->heredoc_indent > p->heredoc_line_indent) {
20516 p->heredoc_indent = p->heredoc_line_indent;
20517 }
20518 p->heredoc_line_indent = -1;
20519 }
20520 if (t) return t;
20521 tokadd(p, '#');
20522 c = nextc(p);
20523 }
20524 do {
20525 pushback(p, c);
20526 enc = p->enc;
20527 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20528 if (p->eofp) goto error;
20529 goto restore;
20530 }
20531 if (c != '\n') {
20532 if (c == '\\') p->heredoc_line_indent = -1;
20533 flush:
20534 str = STR_NEW3(tok(p), toklen(p), enc, func);
20535 flush_str:
20536 set_yylval_str(str);
20537#ifndef RIPPER
20538 if (bol) nd_set_fl_newline(yylval.node);
20539#endif
20540 flush_string_content(p, enc, 0);
20541 return tSTRING_CONTENT;
20542 }
20543 tokadd(p, nextc(p));
20544 if (p->heredoc_indent > 0) {
20545 lex_goto_eol(p);
20546 goto flush;
20547 }
20548 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20549 if ((c = nextc(p)) == -1) goto error;
20550 } while (!whole_match_p(p, eos, len, indent));
20551 str = STR_NEW3(tok(p), toklen(p), enc, func);
20552 }
20553 dispatch_heredoc_end(p);
20554 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20555 token_flush(p);
20556 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20557#ifdef RIPPER
20558 /* Preserve s_value for set_yylval_str */
20559 s_value = p->s_value;
20560#endif
20561 set_yylval_str(str);
20562#ifdef RIPPER
20563 set_parser_s_value(s_value);
20564#endif
20565
20566#ifndef RIPPER
20567 if (bol) nd_set_fl_newline(yylval.node);
20568#endif
20569 return tSTRING_CONTENT;
20570}
20571
20572#include "lex.c"
20573
20574static int
20575arg_ambiguous(struct parser_params *p, char c)
20576{
20577#ifndef RIPPER
20578 if (c == '/') {
20579 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20580 }
20581 else {
20582 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20583 }
20584#else
20585 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20586#endif
20587 return TRUE;
20588}
20589
20590/* returns true value if formal argument error;
20591 * Qtrue, or error message if ripper */
20592static VALUE
20593formal_argument_error(struct parser_params *p, ID id)
20594{
20595 switch (id_type(id)) {
20596 case ID_LOCAL:
20597 break;
20598#ifndef RIPPER
20599# define ERR(mesg) (yyerror0(mesg), Qtrue)
20600#else
20601# define ERR(mesg) WARN_S(mesg)
20602#endif
20603 case ID_CONST:
20604 return ERR("formal argument cannot be a constant");
20605 case ID_INSTANCE:
20606 return ERR("formal argument cannot be an instance variable");
20607 case ID_GLOBAL:
20608 return ERR("formal argument cannot be a global variable");
20609 case ID_CLASS:
20610 return ERR("formal argument cannot be a class variable");
20611 default:
20612 return ERR("formal argument must be local variable");
20613#undef ERR
20614 }
20615 shadowing_lvar(p, id);
20616
20617 return Qfalse;
20618}
20619
20620static int
20621lvar_defined(struct parser_params *p, ID id)
20622{
20623 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20624}
20625
20626/* emacsen -*- hack */
20627static long
20628parser_encode_length(struct parser_params *p, const char *name, long len)
20629{
20630 long nlen;
20631
20632 if (len > 5 && name[nlen = len - 5] == '-') {
20633 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20634 return nlen;
20635 }
20636 if (len > 4 && name[nlen = len - 4] == '-') {
20637 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20638 return nlen;
20639 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20640 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20641 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20642 return nlen;
20643 }
20644 return len;
20645}
20646
20647static void
20648parser_set_encode(struct parser_params *p, const char *name)
20649{
20650 rb_encoding *enc;
20651 VALUE excargs[3];
20652 int idx = 0;
20653
20654 const char *wrong = 0;
20655 switch (*name) {
20656 case 'e': case 'E': wrong = "external"; break;
20657 case 'i': case 'I': wrong = "internal"; break;
20658 case 'f': case 'F': wrong = "filesystem"; break;
20659 case 'l': case 'L': wrong = "locale"; break;
20660 }
20661 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20662 idx = rb_enc_find_index(name);
20663 if (idx < 0) {
20664 unknown:
20665 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20666 error:
20667 excargs[0] = rb_eArgError;
20668 excargs[2] = rb_make_backtrace();
20669 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20670 VALUE exc = rb_make_exception(3, excargs);
20671 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20672
20673 rb_ast_free(p->ast);
20674 p->ast = NULL;
20675
20676 rb_exc_raise(exc);
20677 }
20678 enc = rb_enc_from_index(idx);
20679 if (!rb_enc_asciicompat(enc)) {
20680 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20681 goto error;
20682 }
20683 p->enc = enc;
20684#ifndef RIPPER
20685 if (p->debug_lines) {
20686 long i;
20687 for (i = 0; i < p->debug_lines->len; i++) {
20688 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20689 }
20690 }
20691#endif
20692}
20693
20694static bool
20695comment_at_top(struct parser_params *p)
20696{
20697 if (p->token_seen) return false;
20698 return (p->line_count == (p->has_shebang ? 2 : 1));
20699}
20700
20701typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20702typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20703
20704static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20705
20706static void
20707magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20708{
20709 if (!comment_at_top(p)) {
20710 return;
20711 }
20712 parser_set_encode(p, val);
20713}
20714
20715static int
20716parser_get_bool(struct parser_params *p, const char *name, const char *val)
20717{
20718 switch (*val) {
20719 case 't': case 'T':
20720 if (STRCASECMP(val, "true") == 0) {
20721 return TRUE;
20722 }
20723 break;
20724 case 'f': case 'F':
20725 if (STRCASECMP(val, "false") == 0) {
20726 return FALSE;
20727 }
20728 break;
20729 }
20730 return parser_invalid_pragma_value(p, name, val);
20731}
20732
20733static int
20734parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20735{
20736 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20737 return -1;
20738}
20739
20740static void
20741parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20742{
20743 int b = parser_get_bool(p, name, val);
20744 if (b >= 0) p->token_info_enabled = b;
20745}
20746
20747static void
20748parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20749{
20750 int b;
20751
20752 if (p->token_seen) {
20753 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20754 return;
20755 }
20756
20757 b = parser_get_bool(p, name, val);
20758 if (b < 0) return;
20759
20760 p->frozen_string_literal = b;
20761}
20762
20763static void
20764parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20765{
20766 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20767 if (*s == ' ' || *s == '\t') continue;
20768 if (*s == '#') break;
20769 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20770 return;
20771 }
20772
20773 switch (*val) {
20774 case 'n': case 'N':
20775 if (STRCASECMP(val, "none") == 0) {
20776 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20777 return;
20778 }
20779 break;
20780 case 'l': case 'L':
20781 if (STRCASECMP(val, "literal") == 0) {
20782 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20783 return;
20784 }
20785 break;
20786 case 'e': case 'E':
20787 if (STRCASECMP(val, "experimental_copy") == 0) {
20788 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20789 return;
20790 }
20791 if (STRCASECMP(val, "experimental_everything") == 0) {
20792 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20793 return;
20794 }
20795 break;
20796 }
20797 parser_invalid_pragma_value(p, name, val);
20798}
20799
20800# if WARN_PAST_SCOPE
20801static void
20802parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20803{
20804 int b = parser_get_bool(p, name, val);
20805 if (b >= 0) p->past_scope_enabled = b;
20806}
20807# endif
20808
20810 const char *name;
20811 rb_magic_comment_setter_t func;
20812 rb_magic_comment_length_t length;
20813};
20814
20815static const struct magic_comment magic_comments[] = {
20816 {"coding", magic_comment_encoding, parser_encode_length},
20817 {"encoding", magic_comment_encoding, parser_encode_length},
20818 {"frozen_string_literal", parser_set_frozen_string_literal},
20819 {"shareable_constant_value", parser_set_shareable_constant_value},
20820 {"warn_indent", parser_set_token_info},
20821# if WARN_PAST_SCOPE
20822 {"warn_past_scope", parser_set_past_scope},
20823# endif
20824};
20825
20826static const char *
20827magic_comment_marker(const char *str, long len)
20828{
20829 long i = 2;
20830
20831 while (i < len) {
20832 switch (str[i]) {
20833 case '-':
20834 if (str[i-1] == '*' && str[i-2] == '-') {
20835 return str + i + 1;
20836 }
20837 i += 2;
20838 break;
20839 case '*':
20840 if (i + 1 >= len) return 0;
20841 if (str[i+1] != '-') {
20842 i += 4;
20843 }
20844 else if (str[i-1] != '-') {
20845 i += 2;
20846 }
20847 else {
20848 return str + i + 2;
20849 }
20850 break;
20851 default:
20852 i += 3;
20853 break;
20854 }
20855 }
20856 return 0;
20857}
20858
20859static int
20860parser_magic_comment(struct parser_params *p, const char *str, long len)
20861{
20862 int indicator = 0;
20863 VALUE name = 0, val = 0;
20864 const char *beg, *end, *vbeg, *vend;
20865#define str_copy(_s, _p, _n) ((_s) \
20866 ? (void)(rb_str_resize((_s), (_n)), \
20867 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20868 : (void)((_s) = STR_NEW((_p), (_n))))
20869
20870 if (len <= 7) return FALSE;
20871 if (!!(beg = magic_comment_marker(str, len))) {
20872 if (!(end = magic_comment_marker(beg, str + len - beg)))
20873 return FALSE;
20874 indicator = TRUE;
20875 str = beg;
20876 len = end - beg - 3;
20877 }
20878
20879 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20880 while (len > 0) {
20881 const struct magic_comment *mc = magic_comments;
20882 char *s;
20883 int i;
20884 long n = 0;
20885
20886 for (; len > 0 && *str; str++, --len) {
20887 switch (*str) {
20888 case '\'': case '"': case ':': case ';':
20889 continue;
20890 }
20891 if (!ISSPACE(*str)) break;
20892 }
20893 for (beg = str; len > 0; str++, --len) {
20894 switch (*str) {
20895 case '\'': case '"': case ':': case ';':
20896 break;
20897 default:
20898 if (ISSPACE(*str)) break;
20899 continue;
20900 }
20901 break;
20902 }
20903 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20904 if (!len) break;
20905 if (*str != ':') {
20906 if (!indicator) return FALSE;
20907 continue;
20908 }
20909
20910 do str++; while (--len > 0 && ISSPACE(*str));
20911 if (!len) break;
20912 const char *tok_beg = str;
20913 if (*str == '"') {
20914 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20915 if (*str == '\\') {
20916 --len;
20917 ++str;
20918 }
20919 }
20920 vend = str;
20921 if (len) {
20922 --len;
20923 ++str;
20924 }
20925 }
20926 else {
20927 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20928 vend = str;
20929 }
20930 const char *tok_end = str;
20931 if (indicator) {
20932 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20933 }
20934 else {
20935 while (len > 0 && (ISSPACE(*str))) --len, str++;
20936 if (len) return FALSE;
20937 }
20938
20939 n = end - beg;
20940 str_copy(name, beg, n);
20941 s = RSTRING_PTR(name);
20942 for (i = 0; i < n; ++i) {
20943 if (s[i] == '-') s[i] = '_';
20944 }
20945 do {
20946 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20947 n = vend - vbeg;
20948 if (mc->length) {
20949 n = (*mc->length)(p, vbeg, n);
20950 }
20951 str_copy(val, vbeg, n);
20952 p->lex.ptok = tok_beg;
20953 p->lex.pcur = tok_end;
20954 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20955 break;
20956 }
20957 } while (++mc < magic_comments + numberof(magic_comments));
20958#ifdef RIPPER
20959 str_copy(val, vbeg, vend - vbeg);
20960 dispatch2(magic_comment, name, val);
20961#endif
20962 }
20963
20964 return TRUE;
20965}
20966
20967static void
20968set_file_encoding(struct parser_params *p, const char *str, const char *send)
20969{
20970 int sep = 0;
20971 const char *beg = str;
20972 VALUE s;
20973
20974 for (;;) {
20975 if (send - str <= 6) return;
20976 switch (str[6]) {
20977 case 'C': case 'c': str += 6; continue;
20978 case 'O': case 'o': str += 5; continue;
20979 case 'D': case 'd': str += 4; continue;
20980 case 'I': case 'i': str += 3; continue;
20981 case 'N': case 'n': str += 2; continue;
20982 case 'G': case 'g': str += 1; continue;
20983 case '=': case ':':
20984 sep = 1;
20985 str += 6;
20986 break;
20987 default:
20988 str += 6;
20989 if (ISSPACE(*str)) break;
20990 continue;
20991 }
20992 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20993 sep = 0;
20994 }
20995 for (;;) {
20996 do {
20997 if (++str >= send) return;
20998 } while (ISSPACE(*str));
20999 if (sep) break;
21000 if (*str != '=' && *str != ':') return;
21001 sep = 1;
21002 str++;
21003 }
21004 beg = str;
21005 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21006 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21007 p->lex.ptok = beg;
21008 p->lex.pcur = str;
21009 parser_set_encode(p, RSTRING_PTR(s));
21010 rb_str_resize(s, 0);
21011}
21012
21013static void
21014parser_prepare(struct parser_params *p)
21015{
21016 int c = nextc0(p, FALSE);
21017 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21018 switch (c) {
21019 case '#':
21020 if (peek(p, '!')) p->has_shebang = 1;
21021 break;
21022 case 0xef: /* UTF-8 BOM marker */
21023 if (!lex_eol_n_p(p, 2) &&
21024 (unsigned char)p->lex.pcur[0] == 0xbb &&
21025 (unsigned char)p->lex.pcur[1] == 0xbf) {
21026 p->enc = rb_utf8_encoding();
21027 p->lex.pcur += 2;
21028#ifndef RIPPER
21029 if (p->debug_lines) {
21030 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21031 }
21032#endif
21033 p->lex.pbeg = p->lex.pcur;
21034 token_flush(p);
21035 return;
21036 }
21037 break;
21038 case -1: /* end of script. */
21039 return;
21040 }
21041 pushback(p, c);
21042 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21043}
21044
21045#ifndef RIPPER
21046#define ambiguous_operator(tok, op, syn) ( \
21047 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21048 rb_warning0("even though it seems like "syn""))
21049#else
21050#define ambiguous_operator(tok, op, syn) \
21051 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21052#endif
21053#define warn_balanced(tok, op, syn) ((void) \
21054 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21055 space_seen && !ISSPACE(c) && \
21056 (ambiguous_operator(tok, op, syn), 0)), \
21057 (enum yytokentype)(tok))
21058
21059static enum yytokentype
21060no_digits(struct parser_params *p)
21061{
21062 yyerror0("numeric literal without digits");
21063 if (peek(p, '_')) nextc(p);
21064 /* dummy 0, for tUMINUS_NUM at numeric */
21065 return set_number_literal(p, tINTEGER, 0, 10, 0);
21066}
21067
21068static enum yytokentype
21069parse_numeric(struct parser_params *p, int c)
21070{
21071 int is_float, seen_point, seen_e, nondigit;
21072 int suffix;
21073
21074 is_float = seen_point = seen_e = nondigit = 0;
21075 SET_LEX_STATE(EXPR_END);
21076 newtok(p);
21077 if (c == '-' || c == '+') {
21078 tokadd(p, c);
21079 c = nextc(p);
21080 }
21081 if (c == '0') {
21082 int start = toklen(p);
21083 c = nextc(p);
21084 if (c == 'x' || c == 'X') {
21085 /* hexadecimal */
21086 c = nextc(p);
21087 if (c != -1 && ISXDIGIT(c)) {
21088 do {
21089 if (c == '_') {
21090 if (nondigit) break;
21091 nondigit = c;
21092 continue;
21093 }
21094 if (!ISXDIGIT(c)) break;
21095 nondigit = 0;
21096 tokadd(p, c);
21097 } while ((c = nextc(p)) != -1);
21098 }
21099 pushback(p, c);
21100 tokfix(p);
21101 if (toklen(p) == start) {
21102 return no_digits(p);
21103 }
21104 else if (nondigit) goto trailing_uc;
21105 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21106 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21107 }
21108 if (c == 'b' || c == 'B') {
21109 /* binary */
21110 c = nextc(p);
21111 if (c == '0' || c == '1') {
21112 do {
21113 if (c == '_') {
21114 if (nondigit) break;
21115 nondigit = c;
21116 continue;
21117 }
21118 if (c != '0' && c != '1') break;
21119 nondigit = 0;
21120 tokadd(p, c);
21121 } while ((c = nextc(p)) != -1);
21122 }
21123 pushback(p, c);
21124 tokfix(p);
21125 if (toklen(p) == start) {
21126 return no_digits(p);
21127 }
21128 else if (nondigit) goto trailing_uc;
21129 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21130 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21131 }
21132 if (c == 'd' || c == 'D') {
21133 /* decimal */
21134 c = nextc(p);
21135 if (c != -1 && ISDIGIT(c)) {
21136 do {
21137 if (c == '_') {
21138 if (nondigit) break;
21139 nondigit = c;
21140 continue;
21141 }
21142 if (!ISDIGIT(c)) break;
21143 nondigit = 0;
21144 tokadd(p, c);
21145 } while ((c = nextc(p)) != -1);
21146 }
21147 pushback(p, c);
21148 tokfix(p);
21149 if (toklen(p) == start) {
21150 return no_digits(p);
21151 }
21152 else if (nondigit) goto trailing_uc;
21153 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21154 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21155 }
21156 if (c == '_') {
21157 /* 0_0 */
21158 goto octal_number;
21159 }
21160 if (c == 'o' || c == 'O') {
21161 /* prefixed octal */
21162 c = nextc(p);
21163 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21164 tokfix(p);
21165 return no_digits(p);
21166 }
21167 }
21168 if (c >= '0' && c <= '7') {
21169 /* octal */
21170 octal_number:
21171 do {
21172 if (c == '_') {
21173 if (nondigit) break;
21174 nondigit = c;
21175 continue;
21176 }
21177 if (c < '0' || c > '9') break;
21178 if (c > '7') goto invalid_octal;
21179 nondigit = 0;
21180 tokadd(p, c);
21181 } while ((c = nextc(p)) != -1);
21182 if (toklen(p) > start) {
21183 pushback(p, c);
21184 tokfix(p);
21185 if (nondigit) goto trailing_uc;
21186 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21187 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21188 }
21189 if (nondigit) {
21190 pushback(p, c);
21191 goto trailing_uc;
21192 }
21193 }
21194 if (c > '7' && c <= '9') {
21195 invalid_octal:
21196 yyerror0("Invalid octal digit");
21197 }
21198 else if (c == '.' || c == 'e' || c == 'E') {
21199 tokadd(p, '0');
21200 }
21201 else {
21202 pushback(p, c);
21203 tokfix(p);
21204 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21205 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21206 }
21207 }
21208
21209 for (;;) {
21210 switch (c) {
21211 case '0': case '1': case '2': case '3': case '4':
21212 case '5': case '6': case '7': case '8': case '9':
21213 nondigit = 0;
21214 tokadd(p, c);
21215 break;
21216
21217 case '.':
21218 if (nondigit) goto trailing_uc;
21219 if (seen_point || seen_e) {
21220 goto decode_num;
21221 }
21222 else {
21223 int c0 = nextc(p);
21224 if (c0 == -1 || !ISDIGIT(c0)) {
21225 pushback(p, c0);
21226 goto decode_num;
21227 }
21228 c = c0;
21229 }
21230 seen_point = toklen(p);
21231 tokadd(p, '.');
21232 tokadd(p, c);
21233 is_float++;
21234 nondigit = 0;
21235 break;
21236
21237 case 'e':
21238 case 'E':
21239 if (nondigit) {
21240 pushback(p, c);
21241 c = nondigit;
21242 goto decode_num;
21243 }
21244 if (seen_e) {
21245 goto decode_num;
21246 }
21247 nondigit = c;
21248 c = nextc(p);
21249 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21250 pushback(p, c);
21251 c = nondigit;
21252 nondigit = 0;
21253 goto decode_num;
21254 }
21255 tokadd(p, nondigit);
21256 seen_e++;
21257 is_float++;
21258 tokadd(p, c);
21259 nondigit = (c == '-' || c == '+') ? c : 0;
21260 break;
21261
21262 case '_': /* `_' in number just ignored */
21263 if (nondigit) goto decode_num;
21264 nondigit = c;
21265 break;
21266
21267 default:
21268 goto decode_num;
21269 }
21270 c = nextc(p);
21271 }
21272
21273 decode_num:
21274 pushback(p, c);
21275 if (nondigit) {
21276 trailing_uc:
21277 literal_flush(p, p->lex.pcur - 1);
21278 YYLTYPE loc = RUBY_INIT_YYLLOC();
21279 compile_error(p, "trailing '%c' in number", nondigit);
21280 parser_show_error_line(p, &loc);
21281 }
21282 tokfix(p);
21283 if (is_float) {
21284 enum yytokentype type = tFLOAT;
21285
21286 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21287 if (suffix & NUM_SUFFIX_R) {
21288 type = tRATIONAL;
21289 }
21290 else {
21291 strtod(tok(p), 0);
21292 if (errno == ERANGE) {
21293 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21294 errno = 0;
21295 }
21296 }
21297 return set_number_literal(p, type, suffix, 0, seen_point);
21298 }
21299 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21300 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21301}
21302
21303static enum yytokentype
21304parse_qmark(struct parser_params *p, int space_seen)
21305{
21306 rb_encoding *enc;
21307 register int c;
21308 rb_parser_string_t *lit;
21309 const char *start = p->lex.pcur;
21310
21311 if (IS_END()) {
21312 SET_LEX_STATE(EXPR_VALUE);
21313 return '?';
21314 }
21315 c = nextc(p);
21316 if (c == -1) {
21317 compile_error(p, "incomplete character syntax");
21318 return 0;
21319 }
21320 if (rb_enc_isspace(c, p->enc)) {
21321 if (!IS_ARG()) {
21322 int c2 = escaped_control_code(c);
21323 if (c2) {
21324 WARN_SPACE_CHAR(c2, "?");
21325 }
21326 }
21327 ternary:
21328 pushback(p, c);
21329 SET_LEX_STATE(EXPR_VALUE);
21330 return '?';
21331 }
21332 newtok(p);
21333 enc = p->enc;
21334 int w = parser_precise_mbclen(p, start);
21335 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21336 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21337 if (space_seen) {
21338 const char *ptr = start;
21339 do {
21340 int n = parser_precise_mbclen(p, ptr);
21341 if (n < 0) return -1;
21342 ptr += n;
21343 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21344 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21345 " a conditional operator, put a space after '?'",
21346 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21347 }
21348 goto ternary;
21349 }
21350 else if (c == '\\') {
21351 if (peek(p, 'u')) {
21352 nextc(p);
21353 enc = rb_utf8_encoding();
21354 tokadd_utf8(p, &enc, -1, 0, 0);
21355 }
21356 else if (!ISASCII(c = peekc(p)) && c != -1) {
21357 nextc(p);
21358 if (tokadd_mbchar(p, c) == -1) return 0;
21359 }
21360 else {
21361 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21362 tokadd(p, c);
21363 }
21364 }
21365 else {
21366 if (tokadd_mbchar(p, c) == -1) return 0;
21367 }
21368 tokfix(p);
21369 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21370 set_yylval_str(lit);
21371 SET_LEX_STATE(EXPR_END);
21372 return tCHAR;
21373}
21374
21375static enum yytokentype
21376parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21377{
21378 register int c;
21379 const char *ptok = p->lex.pcur;
21380
21381 if (IS_BEG()) {
21382 int term;
21383 int paren;
21384
21385 c = nextc(p);
21386 quotation:
21387 if (c == -1) goto unterminated;
21388 if (!ISALNUM(c)) {
21389 term = c;
21390 if (!ISASCII(c)) goto unknown;
21391 c = 'Q';
21392 }
21393 else {
21394 term = nextc(p);
21395 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21396 unknown:
21397 pushback(p, term);
21398 c = parser_precise_mbclen(p, p->lex.pcur);
21399 if (c < 0) return 0;
21400 p->lex.pcur += c;
21401 yyerror0("unknown type of %string");
21402 return 0;
21403 }
21404 }
21405 if (term == -1) {
21406 unterminated:
21407 compile_error(p, "unterminated quoted string meets end of file");
21408 return 0;
21409 }
21410 paren = term;
21411 if (term == '(') term = ')';
21412 else if (term == '[') term = ']';
21413 else if (term == '{') term = '}';
21414 else if (term == '<') term = '>';
21415 else paren = 0;
21416
21417 p->lex.ptok = ptok-1;
21418 switch (c) {
21419 case 'Q':
21420 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21421 return tSTRING_BEG;
21422
21423 case 'q':
21424 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21425 return tSTRING_BEG;
21426
21427 case 'W':
21428 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21429 return tWORDS_BEG;
21430
21431 case 'w':
21432 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21433 return tQWORDS_BEG;
21434
21435 case 'I':
21436 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21437 return tSYMBOLS_BEG;
21438
21439 case 'i':
21440 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21441 return tQSYMBOLS_BEG;
21442
21443 case 'x':
21444 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21445 return tXSTRING_BEG;
21446
21447 case 'r':
21448 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21449 return tREGEXP_BEG;
21450
21451 case 's':
21452 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21453 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21454 return tSYMBEG;
21455
21456 default:
21457 yyerror0("unknown type of %string");
21458 return 0;
21459 }
21460 }
21461 if ((c = nextc(p)) == '=') {
21462 set_yylval_id('%');
21463 SET_LEX_STATE(EXPR_BEG);
21464 return tOP_ASGN;
21465 }
21466 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21467 goto quotation;
21468 }
21469 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21470 pushback(p, c);
21471 return warn_balanced('%', "%%", "string literal");
21472}
21473
21474static int
21475tokadd_ident(struct parser_params *p, int c)
21476{
21477 do {
21478 if (tokadd_mbchar(p, c) == -1) return -1;
21479 c = nextc(p);
21480 } while (parser_is_identchar(p));
21481 pushback(p, c);
21482 return 0;
21483}
21484
21485static ID
21486tokenize_ident(struct parser_params *p)
21487{
21488 ID ident = TOK_INTERN();
21489
21490 set_yylval_name(ident);
21491
21492 return ident;
21493}
21494
21495static int
21496parse_numvar(struct parser_params *p)
21497{
21498 size_t len;
21499 int overflow;
21500 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21501 const unsigned long nth_ref_max =
21503 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21504 * turned into a Fixnum, in compile.c */
21505
21506 if (overflow || n > nth_ref_max) {
21507 /* compile_error()? */
21508 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21509 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21510 }
21511 else {
21512 return (int)n;
21513 }
21514}
21515
21516static enum yytokentype
21517parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21518{
21519 const char *ptr = p->lex.pcur;
21520 register int c;
21521
21522 SET_LEX_STATE(EXPR_END);
21523 p->lex.ptok = ptr - 1; /* from '$' */
21524 newtok(p);
21525 c = nextc(p);
21526 switch (c) {
21527 case '_': /* $_: last read line string */
21528 c = nextc(p);
21529 if (parser_is_identchar(p)) {
21530 tokadd(p, '$');
21531 tokadd(p, '_');
21532 break;
21533 }
21534 pushback(p, c);
21535 c = '_';
21536 /* fall through */
21537 case '~': /* $~: match-data */
21538 case '*': /* $*: argv */
21539 case '$': /* $$: pid */
21540 case '?': /* $?: last status */
21541 case '!': /* $!: error string */
21542 case '@': /* $@: error position */
21543 case '/': /* $/: input record separator */
21544 case '\\': /* $\: output record separator */
21545 case ';': /* $;: field separator */
21546 case ',': /* $,: output field separator */
21547 case '.': /* $.: last read line number */
21548 case '=': /* $=: ignorecase */
21549 case ':': /* $:: load path */
21550 case '<': /* $<: default input handle */
21551 case '>': /* $>: default output handle */
21552 case '\"': /* $": already loaded files */
21553 tokadd(p, '$');
21554 tokadd(p, c);
21555 goto gvar;
21556
21557 case '-':
21558 tokadd(p, '$');
21559 tokadd(p, c);
21560 c = nextc(p);
21561 if (parser_is_identchar(p)) {
21562 if (tokadd_mbchar(p, c) == -1) return 0;
21563 }
21564 else {
21565 pushback(p, c);
21566 pushback(p, '-');
21567 return '$';
21568 }
21569 gvar:
21570 tokenize_ident(p);
21571 return tGVAR;
21572
21573 case '&': /* $&: last match */
21574 case '`': /* $`: string before last match */
21575 case '\'': /* $': string after last match */
21576 case '+': /* $+: string matches last paren. */
21577 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21578 tokadd(p, '$');
21579 tokadd(p, c);
21580 goto gvar;
21581 }
21582 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21583 return tBACK_REF;
21584
21585 case '1': case '2': case '3':
21586 case '4': case '5': case '6':
21587 case '7': case '8': case '9':
21588 tokadd(p, '$');
21589 do {
21590 tokadd(p, c);
21591 c = nextc(p);
21592 } while (c != -1 && ISDIGIT(c));
21593 pushback(p, c);
21594 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21595 tokfix(p);
21596 c = parse_numvar(p);
21597 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21598 return tNTH_REF;
21599
21600 default:
21601 if (!parser_is_identchar(p)) {
21602 YYLTYPE loc = RUBY_INIT_YYLLOC();
21603 if (c == -1 || ISSPACE(c)) {
21604 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21605 }
21606 else {
21607 pushback(p, c);
21608 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21609 }
21610 parser_show_error_line(p, &loc);
21611 set_yylval_noname();
21612 return tGVAR;
21613 }
21614 /* fall through */
21615 case '0':
21616 tokadd(p, '$');
21617 }
21618
21619 if (tokadd_ident(p, c)) return 0;
21620 SET_LEX_STATE(EXPR_END);
21621 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21622 tokenize_ident(p);
21623 }
21624 else {
21625 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21626 set_yylval_noname();
21627 }
21628 return tGVAR;
21629}
21630
21631static bool
21632parser_numbered_param(struct parser_params *p, int n)
21633{
21634 if (n < 0) return false;
21635
21636 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21637 return false;
21638 }
21639 if (p->max_numparam == ORDINAL_PARAM) {
21640 compile_error(p, "ordinary parameter is defined");
21641 return false;
21642 }
21643 struct vtable *args = p->lvtbl->args;
21644 if (p->max_numparam < n) {
21645 p->max_numparam = n;
21646 }
21647 while (n > args->pos) {
21648 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21649 }
21650 return true;
21651}
21652
21653static enum yytokentype
21654parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21655{
21656 const char *ptr = p->lex.pcur;
21657 enum yytokentype result = tIVAR;
21658 register int c = nextc(p);
21659 YYLTYPE loc;
21660
21661 p->lex.ptok = ptr - 1; /* from '@' */
21662 newtok(p);
21663 tokadd(p, '@');
21664 if (c == '@') {
21665 result = tCVAR;
21666 tokadd(p, '@');
21667 c = nextc(p);
21668 }
21669 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21670 if (c == -1 || !parser_is_identchar(p)) {
21671 pushback(p, c);
21672 RUBY_SET_YYLLOC(loc);
21673 if (result == tIVAR) {
21674 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21675 }
21676 else {
21677 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21678 }
21679 parser_show_error_line(p, &loc);
21680 set_yylval_noname();
21681 SET_LEX_STATE(EXPR_END);
21682 return result;
21683 }
21684 else if (ISDIGIT(c)) {
21685 pushback(p, c);
21686 RUBY_SET_YYLLOC(loc);
21687 if (result == tIVAR) {
21688 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21689 }
21690 else {
21691 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21692 }
21693 parser_show_error_line(p, &loc);
21694 set_yylval_noname();
21695 SET_LEX_STATE(EXPR_END);
21696 return result;
21697 }
21698
21699 if (tokadd_ident(p, c)) return 0;
21700 tokenize_ident(p);
21701 return result;
21702}
21703
21704static enum yytokentype
21705parse_ident(struct parser_params *p, int c, int cmd_state)
21706{
21707 enum yytokentype result;
21708 bool is_ascii = true;
21709 const enum lex_state_e last_state = p->lex.state;
21710 ID ident;
21711 int enforce_keyword_end = 0;
21712
21713 do {
21714 if (!ISASCII(c)) is_ascii = false;
21715 if (tokadd_mbchar(p, c) == -1) return 0;
21716 c = nextc(p);
21717 } while (parser_is_identchar(p));
21718 if ((c == '!' || c == '?') && !peek(p, '=')) {
21719 result = tFID;
21720 tokadd(p, c);
21721 }
21722 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21723 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21724 result = tIDENTIFIER;
21725 tokadd(p, c);
21726 }
21727 else {
21728 result = tCONSTANT; /* assume provisionally */
21729 pushback(p, c);
21730 }
21731 tokfix(p);
21732
21733 if (IS_LABEL_POSSIBLE()) {
21734 if (IS_LABEL_SUFFIX(0)) {
21735 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21736 nextc(p);
21737 tokenize_ident(p);
21738 return tLABEL;
21739 }
21740 }
21741
21742#ifndef RIPPER
21743 if (peek_end_expect_token_locations(p)) {
21744 const rb_code_position_t *end_pos;
21745 int lineno, column;
21746 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21747
21748 end_pos = peek_end_expect_token_locations(p)->pos;
21749 lineno = end_pos->lineno;
21750 column = end_pos->column;
21751
21752 if (p->debug) {
21753 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21754 p->ruby_sourceline, beg_pos, lineno, column);
21755 }
21756
21757 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21758 const struct kwtable *kw;
21759
21760 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21761 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21762 enforce_keyword_end = 1;
21763 }
21764 }
21765 }
21766#endif
21767
21768 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21769 const struct kwtable *kw;
21770
21771 /* See if it is a reserved word. */
21772 kw = rb_reserved_word(tok(p), toklen(p));
21773 if (kw) {
21774 enum lex_state_e state = p->lex.state;
21775 if (IS_lex_state_for(state, EXPR_FNAME)) {
21776 SET_LEX_STATE(EXPR_ENDFN);
21777 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21778 return kw->id[0];
21779 }
21780 SET_LEX_STATE(kw->state);
21781 if (IS_lex_state(EXPR_BEG)) {
21782 p->command_start = TRUE;
21783 }
21784 if (kw->id[0] == keyword_do) {
21785 if (lambda_beginning_p()) {
21786 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21787 return keyword_do_LAMBDA;
21788 }
21789 if (COND_P()) return keyword_do_cond;
21790 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21791 return keyword_do_block;
21792 return keyword_do;
21793 }
21794 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21795 return kw->id[0];
21796 else {
21797 if (kw->id[0] != kw->id[1])
21798 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21799 return kw->id[1];
21800 }
21801 }
21802 }
21803
21804 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21805 if (cmd_state) {
21806 SET_LEX_STATE(EXPR_CMDARG);
21807 }
21808 else {
21809 SET_LEX_STATE(EXPR_ARG);
21810 }
21811 }
21812 else if (p->lex.state == EXPR_FNAME) {
21813 SET_LEX_STATE(EXPR_ENDFN);
21814 }
21815 else {
21816 SET_LEX_STATE(EXPR_END);
21817 }
21818
21819 ident = tokenize_ident(p);
21820 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21821 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21822 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21823 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21824 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21825 }
21826 return result;
21827}
21828
21829static void
21830warn_cr(struct parser_params *p)
21831{
21832 if (!p->cr_seen) {
21833 p->cr_seen = TRUE;
21834 /* carried over with p->lex.nextline for nextc() */
21835 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21836 }
21837}
21838
21839static enum yytokentype
21840parser_yylex(struct parser_params *p)
21841{
21842 register int c;
21843 int space_seen = 0;
21844 int cmd_state;
21845 int label;
21846 enum lex_state_e last_state;
21847 int fallthru = FALSE;
21848 int token_seen = p->token_seen;
21849
21850 if (p->lex.strterm) {
21851 if (strterm_is_heredoc(p->lex.strterm)) {
21852 token_flush(p);
21853 return here_document(p, &p->lex.strterm->u.heredoc);
21854 }
21855 else {
21856 token_flush(p);
21857 return parse_string(p, &p->lex.strterm->u.literal);
21858 }
21859 }
21860 cmd_state = p->command_start;
21861 p->command_start = FALSE;
21862 p->token_seen = TRUE;
21863#ifndef RIPPER
21864 token_flush(p);
21865#endif
21866 retry:
21867 last_state = p->lex.state;
21868 switch (c = nextc(p)) {
21869 case '\0': /* NUL */
21870 case '\004': /* ^D */
21871 case '\032': /* ^Z */
21872 case -1: /* end of script. */
21873 p->eofp = 1;
21874#ifndef RIPPER
21875 if (p->end_expect_token_locations) {
21876 pop_end_expect_token_locations(p);
21877 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21878 return tDUMNY_END;
21879 }
21880#endif
21881 /* Set location for end-of-input because dispatch_scan_event is not called. */
21882 RUBY_SET_YYLLOC(*p->yylloc);
21883 return END_OF_INPUT;
21884
21885 /* white spaces */
21886 case '\r':
21887 warn_cr(p);
21888 /* fall through */
21889 case ' ': case '\t': case '\f':
21890 case '\13': /* '\v' */
21891 space_seen = 1;
21892 while ((c = nextc(p))) {
21893 switch (c) {
21894 case '\r':
21895 warn_cr(p);
21896 /* fall through */
21897 case ' ': case '\t': case '\f':
21898 case '\13': /* '\v' */
21899 break;
21900 default:
21901 goto outofloop;
21902 }
21903 }
21904 outofloop:
21905 pushback(p, c);
21906 dispatch_scan_event(p, tSP);
21907#ifndef RIPPER
21908 token_flush(p);
21909#endif
21910 goto retry;
21911
21912 case '#': /* it's a comment */
21913 p->token_seen = token_seen;
21914 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21915 /* no magic_comment in shebang line */
21916 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21917 if (comment_at_top(p)) {
21918 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21919 }
21920 }
21921 p->lex.pcur = pcur, p->lex.ptok = ptok;
21922 lex_goto_eol(p);
21923 dispatch_scan_event(p, tCOMMENT);
21924 fallthru = TRUE;
21925 /* fall through */
21926 case '\n':
21927 p->token_seen = token_seen;
21928 rb_parser_string_t *prevline = p->lex.lastline;
21929 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21930 !IS_lex_state(EXPR_LABELED));
21931 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21932 if (!fallthru) {
21933 dispatch_scan_event(p, tIGNORED_NL);
21934 }
21935 fallthru = FALSE;
21936 if (!c && p->ctxt.in_kwarg) {
21937 goto normal_newline;
21938 }
21939 goto retry;
21940 }
21941 while (1) {
21942 switch (c = nextc(p)) {
21943 case ' ': case '\t': case '\f': case '\r':
21944 case '\13': /* '\v' */
21945 space_seen = 1;
21946 break;
21947 case '#':
21948 pushback(p, c);
21949 if (space_seen) {
21950 dispatch_scan_event(p, tSP);
21951 token_flush(p);
21952 }
21953 goto retry;
21954 case 'a':
21955 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
21956 goto bol;
21957 case 'o':
21958 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
21959 goto bol;
21960 case '|':
21961 if (peek(p, '|')) goto leading_logical;
21962 goto bol;
21963 case '&':
21964 if (peek(p, '&')) {
21965 leading_logical:
21966 pushback(p, c);
21967 dispatch_delayed_token(p, tIGNORED_NL);
21968 cmd_state = FALSE;
21969 goto retry;
21970 }
21971 /* fall through */
21972 case '.': {
21973 dispatch_delayed_token(p, tIGNORED_NL);
21974 if (peek(p, '.') == (c == '&')) {
21975 pushback(p, c);
21976 dispatch_scan_event(p, tSP);
21977 goto retry;
21978 }
21979 }
21980 bol:
21981 default:
21982 p->ruby_sourceline--;
21983 p->lex.nextline = p->lex.lastline;
21984 set_lastline(p, prevline);
21985 case -1: /* EOF no decrement*/
21986 if (c == -1 && space_seen) {
21987 dispatch_scan_event(p, tSP);
21988 }
21989 lex_goto_eol(p);
21990 if (c != -1) {
21991 token_flush(p);
21992 RUBY_SET_YYLLOC(*p->yylloc);
21993 }
21994 goto normal_newline;
21995 }
21996 }
21997 normal_newline:
21998 p->command_start = TRUE;
21999 SET_LEX_STATE(EXPR_BEG);
22000 return '\n';
22001
22002 case '*':
22003 if ((c = nextc(p)) == '*') {
22004 if ((c = nextc(p)) == '=') {
22005 set_yylval_id(idPow);
22006 SET_LEX_STATE(EXPR_BEG);
22007 return tOP_ASGN;
22008 }
22009 pushback(p, c);
22010 if (IS_SPCARG(c)) {
22011 rb_warning0("'**' interpreted as argument prefix");
22012 c = tDSTAR;
22013 }
22014 else if (IS_BEG()) {
22015 c = tDSTAR;
22016 }
22017 else {
22018 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22019 }
22020 }
22021 else {
22022 if (c == '=') {
22023 set_yylval_id('*');
22024 SET_LEX_STATE(EXPR_BEG);
22025 return tOP_ASGN;
22026 }
22027 pushback(p, c);
22028 if (IS_SPCARG(c)) {
22029 rb_warning0("'*' interpreted as argument prefix");
22030 c = tSTAR;
22031 }
22032 else if (IS_BEG()) {
22033 c = tSTAR;
22034 }
22035 else {
22036 c = warn_balanced('*', "*", "argument prefix");
22037 }
22038 }
22039 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22040 return c;
22041
22042 case '!':
22043 c = nextc(p);
22044 if (IS_AFTER_OPERATOR()) {
22045 SET_LEX_STATE(EXPR_ARG);
22046 if (c == '@') {
22047 return '!';
22048 }
22049 }
22050 else {
22051 SET_LEX_STATE(EXPR_BEG);
22052 }
22053 if (c == '=') {
22054 return tNEQ;
22055 }
22056 if (c == '~') {
22057 return tNMATCH;
22058 }
22059 pushback(p, c);
22060 return '!';
22061
22062 case '=':
22063 if (was_bol(p)) {
22064 /* skip embedded rd document */
22065 if (word_match_p(p, "begin", 5)) {
22066 int first_p = TRUE;
22067
22068 lex_goto_eol(p);
22069 dispatch_scan_event(p, tEMBDOC_BEG);
22070 for (;;) {
22071 lex_goto_eol(p);
22072 if (!first_p) {
22073 dispatch_scan_event(p, tEMBDOC);
22074 }
22075 first_p = FALSE;
22076 c = nextc(p);
22077 if (c == -1) {
22078 compile_error(p, "embedded document meets end of file");
22079 return END_OF_INPUT;
22080 }
22081 if (c == '=' && word_match_p(p, "end", 3)) {
22082 break;
22083 }
22084 pushback(p, c);
22085 }
22086 lex_goto_eol(p);
22087 dispatch_scan_event(p, tEMBDOC_END);
22088 goto retry;
22089 }
22090 }
22091
22092 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22093 if ((c = nextc(p)) == '=') {
22094 if ((c = nextc(p)) == '=') {
22095 return tEQQ;
22096 }
22097 pushback(p, c);
22098 return tEQ;
22099 }
22100 if (c == '~') {
22101 return tMATCH;
22102 }
22103 else if (c == '>') {
22104 return tASSOC;
22105 }
22106 pushback(p, c);
22107 return '=';
22108
22109 case '<':
22110 c = nextc(p);
22111 if (c == '<' &&
22112 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22113 !IS_END() &&
22114 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22115 enum yytokentype token = heredoc_identifier(p);
22116 if (token) return token < 0 ? 0 : token;
22117 }
22118 if (IS_AFTER_OPERATOR()) {
22119 SET_LEX_STATE(EXPR_ARG);
22120 }
22121 else {
22122 if (IS_lex_state(EXPR_CLASS))
22123 p->command_start = TRUE;
22124 SET_LEX_STATE(EXPR_BEG);
22125 }
22126 if (c == '=') {
22127 if ((c = nextc(p)) == '>') {
22128 return tCMP;
22129 }
22130 pushback(p, c);
22131 return tLEQ;
22132 }
22133 if (c == '<') {
22134 if ((c = nextc(p)) == '=') {
22135 set_yylval_id(idLTLT);
22136 SET_LEX_STATE(EXPR_BEG);
22137 return tOP_ASGN;
22138 }
22139 pushback(p, c);
22140 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22141 }
22142 pushback(p, c);
22143 return '<';
22144
22145 case '>':
22146 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22147 if ((c = nextc(p)) == '=') {
22148 return tGEQ;
22149 }
22150 if (c == '>') {
22151 if ((c = nextc(p)) == '=') {
22152 set_yylval_id(idGTGT);
22153 SET_LEX_STATE(EXPR_BEG);
22154 return tOP_ASGN;
22155 }
22156 pushback(p, c);
22157 return tRSHFT;
22158 }
22159 pushback(p, c);
22160 return '>';
22161
22162 case '"':
22163 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22164 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22165 p->lex.ptok = p->lex.pcur-1;
22166 return tSTRING_BEG;
22167
22168 case '`':
22169 if (IS_lex_state(EXPR_FNAME)) {
22170 SET_LEX_STATE(EXPR_ENDFN);
22171 return c;
22172 }
22173 if (IS_lex_state(EXPR_DOT)) {
22174 if (cmd_state)
22175 SET_LEX_STATE(EXPR_CMDARG);
22176 else
22177 SET_LEX_STATE(EXPR_ARG);
22178 return c;
22179 }
22180 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22181 return tXSTRING_BEG;
22182
22183 case '\'':
22184 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22185 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22186 p->lex.ptok = p->lex.pcur-1;
22187 return tSTRING_BEG;
22188
22189 case '?':
22190 return parse_qmark(p, space_seen);
22191
22192 case '&':
22193 if ((c = nextc(p)) == '&') {
22194 SET_LEX_STATE(EXPR_BEG);
22195 if ((c = nextc(p)) == '=') {
22196 set_yylval_id(idANDOP);
22197 SET_LEX_STATE(EXPR_BEG);
22198 return tOP_ASGN;
22199 }
22200 pushback(p, c);
22201 return tANDOP;
22202 }
22203 else if (c == '=') {
22204 set_yylval_id('&');
22205 SET_LEX_STATE(EXPR_BEG);
22206 return tOP_ASGN;
22207 }
22208 else if (c == '.') {
22209 set_yylval_id(idANDDOT);
22210 SET_LEX_STATE(EXPR_DOT);
22211 return tANDDOT;
22212 }
22213 pushback(p, c);
22214 if (IS_SPCARG(c)) {
22215 if ((c != ':') ||
22216 (c = peekc_n(p, 1)) == -1 ||
22217 !(c == '\'' || c == '"' ||
22218 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22219 rb_warning0("'&' interpreted as argument prefix");
22220 }
22221 c = tAMPER;
22222 }
22223 else if (IS_BEG()) {
22224 c = tAMPER;
22225 }
22226 else {
22227 c = warn_balanced('&', "&", "argument prefix");
22228 }
22229 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22230 return c;
22231
22232 case '|':
22233 if ((c = nextc(p)) == '|') {
22234 SET_LEX_STATE(EXPR_BEG);
22235 if ((c = nextc(p)) == '=') {
22236 set_yylval_id(idOROP);
22237 SET_LEX_STATE(EXPR_BEG);
22238 return tOP_ASGN;
22239 }
22240 pushback(p, c);
22241 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22242 c = '|';
22243 pushback(p, '|');
22244 return c;
22245 }
22246 return tOROP;
22247 }
22248 if (c == '=') {
22249 set_yylval_id('|');
22250 SET_LEX_STATE(EXPR_BEG);
22251 return tOP_ASGN;
22252 }
22253 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22254 pushback(p, c);
22255 return '|';
22256
22257 case '+':
22258 c = nextc(p);
22259 if (IS_AFTER_OPERATOR()) {
22260 SET_LEX_STATE(EXPR_ARG);
22261 if (c == '@') {
22262 return tUPLUS;
22263 }
22264 pushback(p, c);
22265 return '+';
22266 }
22267 if (c == '=') {
22268 set_yylval_id('+');
22269 SET_LEX_STATE(EXPR_BEG);
22270 return tOP_ASGN;
22271 }
22272 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22273 SET_LEX_STATE(EXPR_BEG);
22274 pushback(p, c);
22275 if (c != -1 && ISDIGIT(c)) {
22276 return parse_numeric(p, '+');
22277 }
22278 return tUPLUS;
22279 }
22280 SET_LEX_STATE(EXPR_BEG);
22281 pushback(p, c);
22282 return warn_balanced('+', "+", "unary operator");
22283
22284 case '-':
22285 c = nextc(p);
22286 if (IS_AFTER_OPERATOR()) {
22287 SET_LEX_STATE(EXPR_ARG);
22288 if (c == '@') {
22289 return tUMINUS;
22290 }
22291 pushback(p, c);
22292 return '-';
22293 }
22294 if (c == '=') {
22295 set_yylval_id('-');
22296 SET_LEX_STATE(EXPR_BEG);
22297 return tOP_ASGN;
22298 }
22299 if (c == '>') {
22300 SET_LEX_STATE(EXPR_ENDFN);
22301 yylval.num = p->lex.lpar_beg;
22302 p->lex.lpar_beg = p->lex.paren_nest;
22303 return tLAMBDA;
22304 }
22305 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22306 SET_LEX_STATE(EXPR_BEG);
22307 pushback(p, c);
22308 if (c != -1 && ISDIGIT(c)) {
22309 return tUMINUS_NUM;
22310 }
22311 return tUMINUS;
22312 }
22313 SET_LEX_STATE(EXPR_BEG);
22314 pushback(p, c);
22315 return warn_balanced('-', "-", "unary operator");
22316
22317 case '.': {
22318 int is_beg = IS_BEG();
22319 SET_LEX_STATE(EXPR_BEG);
22320 if ((c = nextc(p)) == '.') {
22321 if ((c = nextc(p)) == '.') {
22322 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22323 SET_LEX_STATE(EXPR_ENDARG);
22324 return tBDOT3;
22325 }
22326 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22327 rb_warn0("... at EOL, should be parenthesized?");
22328 }
22329 return is_beg ? tBDOT3 : tDOT3;
22330 }
22331 pushback(p, c);
22332 return is_beg ? tBDOT2 : tDOT2;
22333 }
22334 pushback(p, c);
22335 if (c != -1 && ISDIGIT(c)) {
22336 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22337 parse_numeric(p, '.');
22338 if (ISDIGIT(prev)) {
22339 yyerror0("unexpected fraction part after numeric literal");
22340 }
22341 else {
22342 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22343 }
22344 SET_LEX_STATE(EXPR_END);
22345 p->lex.ptok = p->lex.pcur;
22346 goto retry;
22347 }
22348 set_yylval_id('.');
22349 SET_LEX_STATE(EXPR_DOT);
22350 return '.';
22351 }
22352
22353 case '0': case '1': case '2': case '3': case '4':
22354 case '5': case '6': case '7': case '8': case '9':
22355 return parse_numeric(p, c);
22356
22357 case ')':
22358 COND_POP();
22359 CMDARG_POP();
22360 SET_LEX_STATE(EXPR_ENDFN);
22361 p->lex.paren_nest--;
22362 return c;
22363
22364 case ']':
22365 COND_POP();
22366 CMDARG_POP();
22367 SET_LEX_STATE(EXPR_END);
22368 p->lex.paren_nest--;
22369 return c;
22370
22371 case '}':
22372 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22373 if (!p->lex.brace_nest--) return tSTRING_DEND;
22374 COND_POP();
22375 CMDARG_POP();
22376 SET_LEX_STATE(EXPR_END);
22377 p->lex.paren_nest--;
22378 return c;
22379
22380 case ':':
22381 c = nextc(p);
22382 if (c == ':') {
22383 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22384 SET_LEX_STATE(EXPR_BEG);
22385 return tCOLON3;
22386 }
22387 set_yylval_id(idCOLON2);
22388 SET_LEX_STATE(EXPR_DOT);
22389 return tCOLON2;
22390 }
22391 if (IS_END() || ISSPACE(c) || c == '#') {
22392 pushback(p, c);
22393 c = warn_balanced(':', ":", "symbol literal");
22394 SET_LEX_STATE(EXPR_BEG);
22395 return c;
22396 }
22397 switch (c) {
22398 case '\'':
22399 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22400 break;
22401 case '"':
22402 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22403 break;
22404 default:
22405 pushback(p, c);
22406 break;
22407 }
22408 SET_LEX_STATE(EXPR_FNAME);
22409 return tSYMBEG;
22410
22411 case '/':
22412 if (IS_BEG()) {
22413 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22414 return tREGEXP_BEG;
22415 }
22416 if ((c = nextc(p)) == '=') {
22417 set_yylval_id('/');
22418 SET_LEX_STATE(EXPR_BEG);
22419 return tOP_ASGN;
22420 }
22421 pushback(p, c);
22422 if (IS_SPCARG(c)) {
22423 arg_ambiguous(p, '/');
22424 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22425 return tREGEXP_BEG;
22426 }
22427 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22428 return warn_balanced('/', "/", "regexp literal");
22429
22430 case '^':
22431 if ((c = nextc(p)) == '=') {
22432 set_yylval_id('^');
22433 SET_LEX_STATE(EXPR_BEG);
22434 return tOP_ASGN;
22435 }
22436 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22437 pushback(p, c);
22438 return '^';
22439
22440 case ';':
22441 SET_LEX_STATE(EXPR_BEG);
22442 p->command_start = TRUE;
22443 return ';';
22444
22445 case ',':
22446 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22447 return ',';
22448
22449 case '~':
22450 if (IS_AFTER_OPERATOR()) {
22451 if ((c = nextc(p)) != '@') {
22452 pushback(p, c);
22453 }
22454 SET_LEX_STATE(EXPR_ARG);
22455 }
22456 else {
22457 SET_LEX_STATE(EXPR_BEG);
22458 }
22459 return '~';
22460
22461 case '(':
22462 if (IS_BEG()) {
22463 c = tLPAREN;
22464 }
22465 else if (!space_seen) {
22466 /* foo( ... ) => method call, no ambiguity */
22467 }
22468 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22469 c = tLPAREN_ARG;
22470 }
22471 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22472 rb_warning0("parentheses after method name is interpreted as "
22473 "an argument list, not a decomposed argument");
22474 }
22475 p->lex.paren_nest++;
22476 COND_PUSH(0);
22477 CMDARG_PUSH(0);
22478 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22479 return c;
22480
22481 case '[':
22482 p->lex.paren_nest++;
22483 if (IS_AFTER_OPERATOR()) {
22484 if ((c = nextc(p)) == ']') {
22485 p->lex.paren_nest--;
22486 SET_LEX_STATE(EXPR_ARG);
22487 if ((c = nextc(p)) == '=') {
22488 return tASET;
22489 }
22490 pushback(p, c);
22491 return tAREF;
22492 }
22493 pushback(p, c);
22494 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22495 return '[';
22496 }
22497 else if (IS_BEG()) {
22498 c = tLBRACK;
22499 }
22500 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22501 c = tLBRACK;
22502 }
22503 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22504 COND_PUSH(0);
22505 CMDARG_PUSH(0);
22506 return c;
22507
22508 case '{':
22509 ++p->lex.brace_nest;
22510 if (lambda_beginning_p())
22511 c = tLAMBEG;
22512 else if (IS_lex_state(EXPR_LABELED))
22513 c = tLBRACE; /* hash */
22514 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22515 c = '{'; /* block (primary) */
22516 else if (IS_lex_state(EXPR_ENDARG))
22517 c = tLBRACE_ARG; /* block (expr) */
22518 else
22519 c = tLBRACE; /* hash */
22520 if (c != tLBRACE) {
22521 p->command_start = TRUE;
22522 SET_LEX_STATE(EXPR_BEG);
22523 }
22524 else {
22525 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22526 }
22527 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22528 COND_PUSH(0);
22529 CMDARG_PUSH(0);
22530 return c;
22531
22532 case '\\':
22533 c = nextc(p);
22534 if (c == '\n') {
22535 space_seen = 1;
22536 dispatch_scan_event(p, tSP);
22537 goto retry; /* skip \\n */
22538 }
22539 if (c == ' ') return tSP;
22540 if (ISSPACE(c)) return c;
22541 pushback(p, c);
22542 return '\\';
22543
22544 case '%':
22545 return parse_percent(p, space_seen, last_state);
22546
22547 case '$':
22548 return parse_gvar(p, last_state);
22549
22550 case '@':
22551 return parse_atmark(p, last_state);
22552
22553 case '_':
22554 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22555 p->ruby__end__seen = 1;
22556 p->eofp = 1;
22557#ifdef RIPPER
22558 lex_goto_eol(p);
22559 dispatch_scan_event(p, k__END__);
22560#endif
22561 return END_OF_INPUT;
22562 }
22563 newtok(p);
22564 break;
22565
22566 default:
22567 if (!parser_is_identchar(p)) {
22568 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22569 token_flush(p);
22570 goto retry;
22571 }
22572
22573 newtok(p);
22574 break;
22575 }
22576
22577 return parse_ident(p, c, cmd_state);
22578}
22579
22580static enum yytokentype
22581yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22582{
22583 enum yytokentype t;
22584
22585 p->lval = lval;
22586 lval->node = 0;
22587 p->yylloc = yylloc;
22588
22589 t = parser_yylex(p);
22590
22591 if (has_delayed_token(p))
22592 dispatch_delayed_token(p, t);
22593 else if (t != END_OF_INPUT)
22594 dispatch_scan_event(p, t);
22595
22596 return t;
22597}
22598
22599#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22600
22601static NODE*
22602node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22603{
22604 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22605
22606 rb_node_init(n, type);
22607 return n;
22608}
22609
22610static NODE *
22611nd_set_loc(NODE *nd, const YYLTYPE *loc)
22612{
22613 nd->nd_loc = *loc;
22614 nd_set_line(nd, loc->beg_pos.lineno);
22615 return nd;
22616}
22617
22618static NODE*
22619node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22620{
22621 NODE *n = node_new_internal(p, type, size, alignment);
22622
22623 nd_set_loc(n, loc);
22624 nd_set_node_id(n, parser_get_node_id(p));
22625 return n;
22626}
22627
22628#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22629
22630static rb_node_scope_t *
22631rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
22632{
22633 rb_ast_id_table_t *nd_tbl;
22634 nd_tbl = local_tbl(p);
22635 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22636 n->nd_tbl = nd_tbl;
22637 n->nd_body = nd_body;
22638 n->nd_parent = nd_parent;
22639 n->nd_args = nd_args;
22640
22641 return n;
22642}
22643
22644static rb_node_scope_t *
22645rb_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)
22646{
22647 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22648 n->nd_tbl = nd_tbl;
22649 n->nd_body = nd_body;
22650 n->nd_parent = nd_parent;
22651 n->nd_args = nd_args;
22652
22653 return n;
22654}
22655
22656static rb_node_defn_t *
22657rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22658{
22659 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22660 n->nd_mid = nd_mid;
22661 n->nd_defn = nd_defn;
22662
22663 return n;
22664}
22665
22666static rb_node_defs_t *
22667rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22668{
22669 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22670 n->nd_recv = nd_recv;
22671 n->nd_mid = nd_mid;
22672 n->nd_defn = nd_defn;
22673
22674 return n;
22675}
22676
22677static rb_node_block_t *
22678rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22679{
22680 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22681 n->nd_head = nd_head;
22682 n->nd_end = (NODE *)n;
22683 n->nd_next = 0;
22684
22685 return n;
22686}
22687
22688static rb_node_for_t *
22689rb_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)
22690{
22691 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22692 n->nd_body = nd_body;
22693 n->nd_iter = nd_iter;
22694 n->for_keyword_loc = *for_keyword_loc;
22695 n->in_keyword_loc = *in_keyword_loc;
22696 n->do_keyword_loc = *do_keyword_loc;
22697 n->end_keyword_loc = *end_keyword_loc;
22698
22699 return n;
22700}
22701
22702static rb_node_for_masgn_t *
22703rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22704{
22705 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22706 n->nd_var = nd_var;
22707
22708 return n;
22709}
22710
22711static rb_node_retry_t *
22712rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22713{
22714 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22715
22716 return n;
22717}
22718
22719static rb_node_begin_t *
22720rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22721{
22722 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22723 n->nd_body = nd_body;
22724
22725 return n;
22726}
22727
22728static rb_node_rescue_t *
22729rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22730{
22731 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22732 n->nd_head = nd_head;
22733 n->nd_resq = nd_resq;
22734 n->nd_else = nd_else;
22735
22736 return n;
22737}
22738
22739static rb_node_resbody_t *
22740rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22741{
22742 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22743 n->nd_args = nd_args;
22744 n->nd_exc_var = nd_exc_var;
22745 n->nd_body = nd_body;
22746 n->nd_next = nd_next;
22747
22748 return n;
22749}
22750
22751static rb_node_ensure_t *
22752rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22753{
22754 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22755 n->nd_head = nd_head;
22756 n->nd_ensr = nd_ensr;
22757
22758 return n;
22759}
22760
22761static rb_node_and_t *
22762rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22763{
22764 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22765 n->nd_1st = nd_1st;
22766 n->nd_2nd = nd_2nd;
22767 n->operator_loc = *operator_loc;
22768
22769 return n;
22770}
22771
22772static rb_node_or_t *
22773rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22774{
22775 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22776 n->nd_1st = nd_1st;
22777 n->nd_2nd = nd_2nd;
22778 n->operator_loc = *operator_loc;
22779
22780 return n;
22781}
22782
22783static rb_node_return_t *
22784rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22785{
22786 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22787 n->nd_stts = nd_stts;
22788 n->keyword_loc = *keyword_loc;
22789 return n;
22790}
22791
22792static rb_node_yield_t *
22793rb_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)
22794{
22795 if (nd_head) no_blockarg(p, nd_head);
22796
22797 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22798 n->nd_head = nd_head;
22799 n->keyword_loc = *keyword_loc;
22800 n->lparen_loc = *lparen_loc;
22801 n->rparen_loc = *rparen_loc;
22802
22803 return n;
22804}
22805
22806static rb_node_if_t *
22807rb_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)
22808{
22809 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22810 n->nd_cond = nd_cond;
22811 n->nd_body = nd_body;
22812 n->nd_else = nd_else;
22813 n->if_keyword_loc = *if_keyword_loc;
22814 n->then_keyword_loc = *then_keyword_loc;
22815 n->end_keyword_loc = *end_keyword_loc;
22816
22817 return n;
22818}
22819
22820static rb_node_unless_t *
22821rb_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)
22822{
22823 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22824 n->nd_cond = nd_cond;
22825 n->nd_body = nd_body;
22826 n->nd_else = nd_else;
22827 n->keyword_loc = *keyword_loc;
22828 n->then_keyword_loc = *then_keyword_loc;
22829 n->end_keyword_loc = *end_keyword_loc;
22830
22831 return n;
22832}
22833
22834static rb_node_class_t *
22835rb_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)
22836{
22837 /* Keep the order of node creation */
22838 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22839 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22840 RNODE_SCOPE(scope)->nd_parent = &n->node;
22841 n->nd_cpath = nd_cpath;
22842 n->nd_body = scope;
22843 n->nd_super = nd_super;
22844 n->class_keyword_loc = *class_keyword_loc;
22845 n->inheritance_operator_loc = *inheritance_operator_loc;
22846 n->end_keyword_loc = *end_keyword_loc;
22847
22848 return n;
22849}
22850
22851static rb_node_sclass_t *
22852rb_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)
22853{
22854 /* Keep the order of node creation */
22855 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22856 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22857 RNODE_SCOPE(scope)->nd_parent = &n->node;
22858 n->nd_recv = nd_recv;
22859 n->nd_body = scope;
22860 n->class_keyword_loc = *class_keyword_loc;
22861 n->operator_loc = *operator_loc;
22862 n->end_keyword_loc = *end_keyword_loc;
22863
22864 return n;
22865}
22866
22867static rb_node_module_t *
22868rb_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)
22869{
22870 /* Keep the order of node creation */
22871 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22872 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22873 RNODE_SCOPE(scope)->nd_parent = &n->node;
22874 n->nd_cpath = nd_cpath;
22875 n->nd_body = scope;
22876 n->module_keyword_loc = *module_keyword_loc;
22877 n->end_keyword_loc = *end_keyword_loc;
22878
22879 return n;
22880}
22881
22882static rb_node_iter_t *
22883rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22884{
22885 /* Keep the order of node creation */
22886 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22887 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22888 RNODE_SCOPE(scope)->nd_parent = &n->node;
22889 n->nd_body = scope;
22890 n->nd_iter = 0;
22891
22892 return n;
22893}
22894
22895static rb_node_lambda_t *
22896rb_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)
22897{
22898 /* Keep the order of node creation */
22899 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22900 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
22901 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
22902 RNODE_SCOPE(scope)->nd_parent = &n->node;
22903 n->nd_body = scope;
22904 n->operator_loc = *operator_loc;
22905 n->opening_loc = *opening_loc;
22906 n->closing_loc = *closing_loc;
22907
22908 return n;
22909}
22910
22911static rb_node_case_t *
22912rb_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)
22913{
22914 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22915 n->nd_head = nd_head;
22916 n->nd_body = nd_body;
22917 n->case_keyword_loc = *case_keyword_loc;
22918 n->end_keyword_loc = *end_keyword_loc;
22919
22920 return n;
22921}
22922
22923static rb_node_case2_t *
22924rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22925{
22926 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22927 n->nd_head = 0;
22928 n->nd_body = nd_body;
22929 n->case_keyword_loc = *case_keyword_loc;
22930 n->end_keyword_loc = *end_keyword_loc;
22931
22932 return n;
22933}
22934
22935static rb_node_case3_t *
22936rb_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)
22937{
22938 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22939 n->nd_head = nd_head;
22940 n->nd_body = nd_body;
22941 n->case_keyword_loc = *case_keyword_loc;
22942 n->end_keyword_loc = *end_keyword_loc;
22943
22944 return n;
22945}
22946
22947static rb_node_when_t *
22948rb_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)
22949{
22950 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22951 n->nd_head = nd_head;
22952 n->nd_body = nd_body;
22953 n->nd_next = nd_next;
22954 n->keyword_loc = *keyword_loc;
22955 n->then_keyword_loc = *then_keyword_loc;
22956
22957 return n;
22958}
22959
22960static rb_node_in_t *
22961rb_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)
22962{
22963 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22964 n->nd_head = nd_head;
22965 n->nd_body = nd_body;
22966 n->nd_next = nd_next;
22967 n->in_keyword_loc = *in_keyword_loc;
22968 n->then_keyword_loc = *then_keyword_loc;
22969 n->operator_loc = *operator_loc;
22970
22971 return n;
22972}
22973
22974static rb_node_while_t *
22975rb_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)
22976{
22977 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22978 n->nd_cond = nd_cond;
22979 n->nd_body = nd_body;
22980 n->nd_state = nd_state;
22981 n->keyword_loc = *keyword_loc;
22982 n->closing_loc = *closing_loc;
22983
22984 return n;
22985}
22986
22987static rb_node_until_t *
22988rb_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)
22989{
22990 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22991 n->nd_cond = nd_cond;
22992 n->nd_body = nd_body;
22993 n->nd_state = nd_state;
22994 n->keyword_loc = *keyword_loc;
22995 n->closing_loc = *closing_loc;
22996
22997 return n;
22998}
22999
23000static rb_node_colon2_t *
23001rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23002{
23003 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23004 n->nd_head = nd_head;
23005 n->nd_mid = nd_mid;
23006 n->delimiter_loc = *delimiter_loc;
23007 n->name_loc = *name_loc;
23008
23009 return n;
23010}
23011
23012static rb_node_colon3_t *
23013rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23014{
23015 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23016 n->nd_mid = nd_mid;
23017 n->delimiter_loc = *delimiter_loc;
23018 n->name_loc = *name_loc;
23019
23020 return n;
23021}
23022
23023static rb_node_dot2_t *
23024rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23025{
23026 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23027 n->nd_beg = nd_beg;
23028 n->nd_end = nd_end;
23029 n->operator_loc = *operator_loc;
23030
23031 return n;
23032}
23033
23034static rb_node_dot3_t *
23035rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23036{
23037 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23038 n->nd_beg = nd_beg;
23039 n->nd_end = nd_end;
23040 n->operator_loc = *operator_loc;
23041
23042 return n;
23043}
23044
23045static rb_node_self_t *
23046rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23047{
23048 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23049 n->nd_state = 1;
23050
23051 return n;
23052}
23053
23054static rb_node_nil_t *
23055rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23056{
23057 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23058
23059 return n;
23060}
23061
23062static rb_node_true_t *
23063rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23064{
23065 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23066
23067 return n;
23068}
23069
23070static rb_node_false_t *
23071rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23072{
23073 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23074
23075 return n;
23076}
23077
23078static rb_node_super_t *
23079rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23080 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23081{
23082 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23083 n->nd_args = nd_args;
23084 n->keyword_loc = *keyword_loc;
23085 n->lparen_loc = *lparen_loc;
23086 n->rparen_loc = *rparen_loc;
23087
23088 return n;
23089}
23090
23091static rb_node_zsuper_t *
23092rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23093{
23094 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23095
23096 return n;
23097}
23098
23099static rb_node_match2_t *
23100rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23101{
23102 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23103 n->nd_recv = nd_recv;
23104 n->nd_value = nd_value;
23105 n->nd_args = 0;
23106
23107 return n;
23108}
23109
23110static rb_node_match3_t *
23111rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23112{
23113 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23114 n->nd_recv = nd_recv;
23115 n->nd_value = nd_value;
23116
23117 return n;
23118}
23119
23120/* TODO: Use union for NODE_LIST2 */
23121static rb_node_list_t *
23122rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23123{
23124 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23125 n->nd_head = nd_head;
23126 n->as.nd_alen = 1;
23127 n->nd_next = 0;
23128
23129 return n;
23130}
23131
23132static rb_node_list_t *
23133rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23134{
23135 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23136 n->nd_head = nd_head;
23137 n->as.nd_alen = nd_alen;
23138 n->nd_next = nd_next;
23139
23140 return n;
23141}
23142
23143static rb_node_zlist_t *
23144rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23145{
23146 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23147
23148 return n;
23149}
23150
23151static rb_node_hash_t *
23152rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23153{
23154 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23155 n->nd_head = nd_head;
23156 n->nd_brace = 0;
23157
23158 return n;
23159}
23160
23161static rb_node_masgn_t *
23162rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23163{
23164 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23165 n->nd_head = nd_head;
23166 n->nd_value = 0;
23167 n->nd_args = nd_args;
23168
23169 return n;
23170}
23171
23172static rb_node_gasgn_t *
23173rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23174{
23175 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23176 n->nd_vid = nd_vid;
23177 n->nd_value = nd_value;
23178
23179 return n;
23180}
23181
23182static rb_node_lasgn_t *
23183rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23184{
23185 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23186 n->nd_vid = nd_vid;
23187 n->nd_value = nd_value;
23188
23189 return n;
23190}
23191
23192static rb_node_dasgn_t *
23193rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23194{
23195 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23196 n->nd_vid = nd_vid;
23197 n->nd_value = nd_value;
23198
23199 return n;
23200}
23201
23202static rb_node_iasgn_t *
23203rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23204{
23205 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23206 n->nd_vid = nd_vid;
23207 n->nd_value = nd_value;
23208
23209 return n;
23210}
23211
23212static rb_node_cvasgn_t *
23213rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23214{
23215 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23216 n->nd_vid = nd_vid;
23217 n->nd_value = nd_value;
23218
23219 return n;
23220}
23221
23222static rb_node_op_asgn1_t *
23223rb_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)
23224{
23225 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23226 n->nd_recv = nd_recv;
23227 n->nd_mid = nd_mid;
23228 n->nd_index = index;
23229 n->nd_rvalue = rvalue;
23230 n->call_operator_loc = *call_operator_loc;
23231 n->opening_loc = *opening_loc;
23232 n->closing_loc = *closing_loc;
23233 n->binary_operator_loc = *binary_operator_loc;
23234
23235 return n;
23236}
23237
23238static rb_node_op_asgn2_t *
23239rb_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)
23240{
23241 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23242 n->nd_recv = nd_recv;
23243 n->nd_value = nd_value;
23244 n->nd_vid = nd_vid;
23245 n->nd_mid = nd_mid;
23246 n->nd_aid = nd_aid;
23247 n->call_operator_loc = *call_operator_loc;
23248 n->message_loc = *message_loc;
23249 n->binary_operator_loc = *binary_operator_loc;
23250
23251 return n;
23252}
23253
23254static rb_node_op_asgn_or_t *
23255rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23256{
23257 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23258 n->nd_head = nd_head;
23259 n->nd_value = nd_value;
23260
23261 return n;
23262}
23263
23264static rb_node_op_asgn_and_t *
23265rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23266{
23267 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23268 n->nd_head = nd_head;
23269 n->nd_value = nd_value;
23270
23271 return n;
23272}
23273
23274static rb_node_gvar_t *
23275rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23276{
23277 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23278 n->nd_vid = nd_vid;
23279
23280 return n;
23281}
23282
23283static rb_node_lvar_t *
23284rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23285{
23286 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23287 n->nd_vid = nd_vid;
23288
23289 return n;
23290}
23291
23292static rb_node_dvar_t *
23293rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23294{
23295 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23296 n->nd_vid = nd_vid;
23297
23298 return n;
23299}
23300
23301static rb_node_ivar_t *
23302rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23303{
23304 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23305 n->nd_vid = nd_vid;
23306
23307 return n;
23308}
23309
23310static rb_node_const_t *
23311rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23312{
23313 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23314 n->nd_vid = nd_vid;
23315
23316 return n;
23317}
23318
23319static rb_node_cvar_t *
23320rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23321{
23322 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23323 n->nd_vid = nd_vid;
23324
23325 return n;
23326}
23327
23328static rb_node_nth_ref_t *
23329rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23330{
23331 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23332 n->nd_nth = nd_nth;
23333
23334 return n;
23335}
23336
23337static rb_node_back_ref_t *
23338rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23339{
23340 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23341 n->nd_nth = nd_nth;
23342
23343 return n;
23344}
23345
23346static rb_node_integer_t *
23347rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23348{
23349 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23350 n->val = val;
23351 n->minus = FALSE;
23352 n->base = base;
23353
23354 return n;
23355}
23356
23357static rb_node_float_t *
23358rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23359{
23360 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23361 n->val = val;
23362 n->minus = FALSE;
23363
23364 return n;
23365}
23366
23367static rb_node_rational_t *
23368rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23369{
23370 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23371 n->val = val;
23372 n->minus = FALSE;
23373 n->base = base;
23374 n->seen_point = seen_point;
23375
23376 return n;
23377}
23378
23379static rb_node_imaginary_t *
23380rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23381{
23382 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23383 n->val = val;
23384 n->minus = FALSE;
23385 n->base = base;
23386 n->seen_point = seen_point;
23387 n->type = numeric_type;
23388
23389 return n;
23390}
23391
23392static rb_node_str_t *
23393rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23394{
23395 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23396 n->string = string;
23397
23398 return n;
23399}
23400
23401/* TODO; Use union for NODE_DSTR2 */
23402static rb_node_dstr_t *
23403rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23404{
23405 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23406 n->string = string;
23407 n->as.nd_alen = nd_alen;
23408 n->nd_next = (rb_node_list_t *)nd_next;
23409
23410 return n;
23411}
23412
23413static rb_node_dstr_t *
23414rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23415{
23416 return rb_node_dstr_new0(p, string, 1, 0, loc);
23417}
23418
23419static rb_node_xstr_t *
23420rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23421{
23422 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23423 n->string = string;
23424
23425 return n;
23426}
23427
23428static rb_node_dxstr_t *
23429rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23430{
23431 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23432 n->string = string;
23433 n->as.nd_alen = nd_alen;
23434 n->nd_next = (rb_node_list_t *)nd_next;
23435
23436 return n;
23437}
23438
23439static rb_node_sym_t *
23440rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23441{
23442 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23443 n->string = rb_str_to_parser_string(p, str);
23444
23445 return n;
23446}
23447
23448static rb_node_dsym_t *
23449rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23450{
23451 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23452 n->string = string;
23453 n->as.nd_alen = nd_alen;
23454 n->nd_next = (rb_node_list_t *)nd_next;
23455
23456 return n;
23457}
23458
23459static rb_node_evstr_t *
23460rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23461{
23462 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23463 n->nd_body = nd_body;
23464 n->opening_loc = *opening_loc;
23465 n->closing_loc = *closing_loc;
23466
23467 return n;
23468}
23469
23470static rb_node_regx_t *
23471rb_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)
23472{
23473 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23474 n->string = string;
23475 n->options = options & RE_OPTION_MASK;
23476 n->opening_loc = *opening_loc;
23477 n->content_loc = *content_loc;
23478 n->closing_loc = *closing_loc;
23479
23480 return n;
23481}
23482
23483static rb_node_call_t *
23484rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23485{
23486 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23487 n->nd_recv = nd_recv;
23488 n->nd_mid = nd_mid;
23489 n->nd_args = nd_args;
23490
23491 return n;
23492}
23493
23494static rb_node_opcall_t *
23495rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23496{
23497 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23498 n->nd_recv = nd_recv;
23499 n->nd_mid = nd_mid;
23500 n->nd_args = nd_args;
23501
23502 return n;
23503}
23504
23505static rb_node_fcall_t *
23506rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23507{
23508 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23509 n->nd_mid = nd_mid;
23510 n->nd_args = nd_args;
23511
23512 return n;
23513}
23514
23515static rb_node_qcall_t *
23516rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23517{
23518 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23519 n->nd_recv = nd_recv;
23520 n->nd_mid = nd_mid;
23521 n->nd_args = nd_args;
23522
23523 return n;
23524}
23525
23526static rb_node_vcall_t *
23527rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23528{
23529 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23530 n->nd_mid = nd_mid;
23531
23532 return n;
23533}
23534
23535static rb_node_once_t *
23536rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23537{
23538 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23539 n->nd_body = nd_body;
23540
23541 return n;
23542}
23543
23544static rb_node_args_t *
23545rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23546{
23547 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23548 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23549
23550 return n;
23551}
23552
23553static rb_node_args_aux_t *
23554rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23555{
23556 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23557 n->nd_pid = nd_pid;
23558 n->nd_plen = nd_plen;
23559 n->nd_next = 0;
23560
23561 return n;
23562}
23563
23564static rb_node_opt_arg_t *
23565rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23566{
23567 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23568 n->nd_body = nd_body;
23569 n->nd_next = 0;
23570
23571 return n;
23572}
23573
23574static rb_node_kw_arg_t *
23575rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23576{
23577 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23578 n->nd_body = nd_body;
23579 n->nd_next = 0;
23580
23581 return n;
23582}
23583
23584static rb_node_postarg_t *
23585rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23586{
23587 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23588 n->nd_1st = nd_1st;
23589 n->nd_2nd = nd_2nd;
23590
23591 return n;
23592}
23593
23594static rb_node_argscat_t *
23595rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23596{
23597 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23598 n->nd_head = nd_head;
23599 n->nd_body = nd_body;
23600
23601 return n;
23602}
23603
23604static rb_node_argspush_t *
23605rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23606{
23607 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23608 n->nd_head = nd_head;
23609 n->nd_body = nd_body;
23610
23611 return n;
23612}
23613
23614static rb_node_splat_t *
23615rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23616{
23617 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23618 n->nd_head = nd_head;
23619 n->operator_loc = *operator_loc;
23620
23621 return n;
23622}
23623
23624static rb_node_block_pass_t *
23625rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23626{
23627 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23628 n->forwarding = 0;
23629 n->nd_head = 0;
23630 n->nd_body = nd_body;
23631 n->operator_loc = *operator_loc;
23632
23633 return n;
23634}
23635
23636static rb_node_alias_t *
23637rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23638{
23639 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23640 n->nd_1st = nd_1st;
23641 n->nd_2nd = nd_2nd;
23642 n->keyword_loc = *keyword_loc;
23643
23644 return n;
23645}
23646
23647static rb_node_valias_t *
23648rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23649{
23650 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23651 n->nd_alias = nd_alias;
23652 n->nd_orig = nd_orig;
23653 n->keyword_loc = *keyword_loc;
23654
23655 return n;
23656}
23657
23658static rb_node_undef_t *
23659rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23660{
23661 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23662 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23663 n->keyword_loc = NULL_LOC;
23664 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23665
23666 return n;
23667}
23668
23669static rb_node_errinfo_t *
23670rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23671{
23672 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23673
23674 return n;
23675}
23676
23677static rb_node_defined_t *
23678rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23679{
23680 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23681 n->nd_head = nd_head;
23682 n->keyword_loc = *keyword_loc;
23683
23684 return n;
23685}
23686
23687static rb_node_postexe_t *
23688rb_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)
23689{
23690 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23691 n->nd_body = nd_body;
23692 n->keyword_loc = *keyword_loc;
23693 n->opening_loc = *opening_loc;
23694 n->closing_loc = *closing_loc;
23695
23696 return n;
23697}
23698
23699static rb_node_attrasgn_t *
23700rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23701{
23702 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23703 n->nd_recv = nd_recv;
23704 n->nd_mid = nd_mid;
23705 n->nd_args = nd_args;
23706
23707 return n;
23708}
23709
23710static rb_node_aryptn_t *
23711rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23712{
23713 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23714 n->nd_pconst = 0;
23715 n->pre_args = pre_args;
23716 n->rest_arg = rest_arg;
23717 n->post_args = post_args;
23718
23719 return n;
23720}
23721
23722static rb_node_hshptn_t *
23723rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23724{
23725 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23726 n->nd_pconst = nd_pconst;
23727 n->nd_pkwargs = nd_pkwargs;
23728 n->nd_pkwrestarg = nd_pkwrestarg;
23729
23730 return n;
23731}
23732
23733static rb_node_fndptn_t *
23734rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23735{
23736 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23737 n->nd_pconst = 0;
23738 n->pre_rest_arg = pre_rest_arg;
23739 n->args = args;
23740 n->post_rest_arg = post_rest_arg;
23741
23742 return n;
23743}
23744
23745static rb_node_line_t *
23746rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23747{
23748 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23749
23750 return n;
23751}
23752
23753static rb_node_file_t *
23754rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23755{
23756 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23757 n->path = rb_str_to_parser_string(p, str);
23758
23759 return n;
23760}
23761
23762static rb_node_encoding_t *
23763rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23764{
23765 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23766 n->enc = p->enc;
23767
23768 return n;
23769}
23770
23771static rb_node_cdecl_t *
23772rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23773{
23774 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23775 n->nd_vid = nd_vid;
23776 n->nd_value = nd_value;
23777 n->nd_else = nd_else;
23778 n->shareability = shareability;
23779
23780 return n;
23781}
23782
23783static rb_node_op_cdecl_t *
23784rb_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)
23785{
23786 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23787 n->nd_head = nd_head;
23788 n->nd_value = nd_value;
23789 n->nd_aid = nd_aid;
23790 n->shareability = shareability;
23791
23792 return n;
23793}
23794
23795static rb_node_error_t *
23796rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23797{
23798 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23799
23800 return n;
23801}
23802
23803static rb_node_break_t *
23804rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23805{
23806 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23807 n->nd_stts = nd_stts;
23808 n->nd_chain = 0;
23809 n->keyword_loc = *keyword_loc;
23810
23811 return n;
23812}
23813
23814static rb_node_next_t *
23815rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23816{
23817 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23818 n->nd_stts = nd_stts;
23819 n->nd_chain = 0;
23820 n->keyword_loc = *keyword_loc;
23821
23822 return n;
23823}
23824
23825static rb_node_redo_t *
23826rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23827{
23828 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23829 n->nd_chain = 0;
23830 n->keyword_loc = *keyword_loc;
23831
23832 return n;
23833}
23834
23835static rb_node_def_temp_t *
23836rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23837{
23838 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23839 n->save.numparam_save = 0;
23840 n->save.max_numparam = 0;
23841 n->save.ctxt = p->ctxt;
23842 n->nd_def = 0;
23843 n->nd_mid = 0;
23844
23845 return n;
23846}
23847
23848static rb_node_def_temp_t *
23849def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23850{
23851 n->save.numparam_save = numparam_push(p);
23852 n->save.max_numparam = p->max_numparam;
23853 return n;
23854}
23855
23856#ifndef RIPPER
23857static enum node_type
23858nodetype(NODE *node) /* for debug */
23859{
23860 return (enum node_type)nd_type(node);
23861}
23862
23863static int
23864nodeline(NODE *node)
23865{
23866 return nd_line(node);
23867}
23868#endif
23869
23870static NODE*
23871newline_node(NODE *node)
23872{
23873 if (node) {
23874 node = remove_begin(node);
23875 nd_set_fl_newline(node);
23876 }
23877 return node;
23878}
23879
23880static void
23881fixpos(NODE *node, NODE *orig)
23882{
23883 if (!node) return;
23884 if (!orig) return;
23885 nd_set_line(node, nd_line(orig));
23886}
23887
23888static NODE*
23889block_append(struct parser_params *p, NODE *head, NODE *tail)
23890{
23891 NODE *end, *h = head, *nd;
23892
23893 if (tail == 0) return head;
23894
23895 if (h == 0) return tail;
23896 switch (nd_type(h)) {
23897 default:
23898 h = end = NEW_BLOCK(head, &head->nd_loc);
23899 head = end;
23900 break;
23901 case NODE_BLOCK:
23902 end = RNODE_BLOCK(h)->nd_end;
23903 break;
23904 }
23905
23906 nd = RNODE_BLOCK(end)->nd_head;
23907 switch (nd_type(nd)) {
23908 case NODE_RETURN:
23909 case NODE_BREAK:
23910 case NODE_NEXT:
23911 case NODE_REDO:
23912 case NODE_RETRY:
23913 rb_warning0L(nd_line(tail), "statement not reached");
23914 break;
23915
23916 default:
23917 break;
23918 }
23919
23920 if (!nd_type_p(tail, NODE_BLOCK)) {
23921 tail = NEW_BLOCK(tail, &tail->nd_loc);
23922 }
23923 RNODE_BLOCK(end)->nd_next = tail;
23924 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23925 nd_set_last_loc(head, nd_last_loc(tail));
23926 return head;
23927}
23928
23929/* append item to the list */
23930static NODE*
23931list_append(struct parser_params *p, NODE *list, NODE *item)
23932{
23933 NODE *last;
23934
23935 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23936 if (RNODE_LIST(list)->nd_next) {
23937 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23938 }
23939 else {
23940 last = list;
23941 }
23942
23943 RNODE_LIST(list)->as.nd_alen += 1;
23944 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23945 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23946
23947 nd_set_last_loc(list, nd_last_loc(item));
23948
23949 return list;
23950}
23951
23952/* concat two lists */
23953static NODE*
23954list_concat(NODE *head, NODE *tail)
23955{
23956 NODE *last;
23957
23958 if (RNODE_LIST(head)->nd_next) {
23959 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23960 }
23961 else {
23962 last = head;
23963 }
23964
23965 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23966 RNODE_LIST(last)->nd_next = tail;
23967 if (RNODE_LIST(tail)->nd_next) {
23968 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23969 }
23970 else {
23971 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23972 }
23973
23974 nd_set_last_loc(head, nd_last_loc(tail));
23975
23976 return head;
23977}
23978
23979static int
23980literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23981{
23982 if (!tail) return 1;
23983 if (!rb_parser_enc_compatible(p, head, tail)) {
23984 compile_error(p, "string literal encodings differ (%s / %s)",
23985 rb_enc_name(rb_parser_str_get_encoding(head)),
23986 rb_enc_name(rb_parser_str_get_encoding(tail)));
23987 rb_parser_str_resize(p, head, 0);
23988 rb_parser_str_resize(p, tail, 0);
23989 return 0;
23990 }
23991 rb_parser_str_buf_append(p, head, tail);
23992 return 1;
23993}
23994
23995static rb_parser_string_t *
23996string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23997{
23998 if (htype != NODE_DSTR) return NULL;
23999 if (RNODE_DSTR(head)->nd_next) {
24000 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24001 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24002 }
24003 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24004 ASSUME(lit);
24005 return lit;
24006}
24007
24008#ifndef RIPPER
24009static rb_parser_string_t *
24010rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24011{
24012 rb_parser_string_t *copy;
24013 if (!orig) return NULL;
24014 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24015 copy->coderange = orig->coderange;
24016 copy->enc = orig->enc;
24017 return copy;
24018}
24019#endif
24020
24021/* concat two string literals */
24022static NODE *
24023literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24024{
24025 enum node_type htype;
24026 rb_parser_string_t *lit;
24027
24028 if (!head) return tail;
24029 if (!tail) return head;
24030
24031 htype = nd_type(head);
24032 if (htype == NODE_EVSTR) {
24033 head = new_dstr(p, head, loc);
24034 htype = NODE_DSTR;
24035 }
24036 if (p->heredoc_indent > 0) {
24037 switch (htype) {
24038 case NODE_STR:
24039 head = str2dstr(p, head);
24040 case NODE_DSTR:
24041 return list_append(p, head, tail);
24042 default:
24043 break;
24044 }
24045 }
24046 switch (nd_type(tail)) {
24047 case NODE_STR:
24048 if ((lit = string_literal_head(p, htype, head)) != false) {
24049 htype = NODE_STR;
24050 }
24051 else {
24052 lit = RNODE_DSTR(head)->string;
24053 }
24054 if (htype == NODE_STR) {
24055 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24056 error:
24057 rb_discard_node(p, head);
24058 rb_discard_node(p, tail);
24059 return 0;
24060 }
24061 rb_discard_node(p, tail);
24062 }
24063 else {
24064 list_append(p, head, tail);
24065 }
24066 break;
24067
24068 case NODE_DSTR:
24069 if (htype == NODE_STR) {
24070 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24071 goto error;
24072 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24073 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24074 RNODE_STR(head)->string = NULL;
24075 rb_discard_node(p, head);
24076 head = tail;
24077 }
24078 else if (!RNODE_DSTR(tail)->string) {
24079 append:
24080 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24081 if (!RNODE_DSTR(head)->nd_next) {
24082 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24083 }
24084 else if (RNODE_DSTR(tail)->nd_next) {
24085 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24086 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24087 }
24088 rb_discard_node(p, tail);
24089 }
24090 else if ((lit = string_literal_head(p, htype, head)) != false) {
24091 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24092 goto error;
24093 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24094 RNODE_DSTR(tail)->string = 0;
24095 goto append;
24096 }
24097 else {
24098 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));
24099 RNODE_DSTR(tail)->string = 0;
24100 }
24101 break;
24102
24103 case NODE_EVSTR:
24104 if (htype == NODE_STR) {
24105 head = str2dstr(p, head);
24106 RNODE_DSTR(head)->as.nd_alen = 1;
24107 }
24108 list_append(p, head, tail);
24109 break;
24110 }
24111 return head;
24112}
24113
24114static void
24115nd_copy_flag(NODE *new_node, NODE *old_node)
24116{
24117 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24118 nd_set_line(new_node, nd_line(old_node));
24119 new_node->nd_loc = old_node->nd_loc;
24120 new_node->node_id = old_node->node_id;
24121}
24122
24123static NODE *
24124str2dstr(struct parser_params *p, NODE *node)
24125{
24126 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24127 nd_copy_flag(new_node, node);
24128 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24129 RNODE_DSTR(new_node)->as.nd_alen = 0;
24130 RNODE_DSTR(new_node)->nd_next = 0;
24131 RNODE_STR(node)->string = 0;
24132
24133 return new_node;
24134}
24135
24136static NODE *
24137str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24138{
24139 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24140 nd_copy_flag(new_node, node);
24141 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24142 RNODE_REGX(new_node)->options = options;
24143 nd_set_loc(new_node, loc);
24144 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24145 RNODE_REGX(new_node)->content_loc = *content_loc;
24146 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24147 RNODE_STR(node)->string = 0;
24148
24149 return new_node;
24150}
24151
24152static NODE *
24153evstr2dstr(struct parser_params *p, NODE *node)
24154{
24155 if (nd_type_p(node, NODE_EVSTR)) {
24156 node = new_dstr(p, node, &node->nd_loc);
24157 }
24158 return node;
24159}
24160
24161static NODE *
24162new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24163{
24164 NODE *head = node;
24165
24166 if (node) {
24167 switch (nd_type(node)) {
24168 case NODE_STR:
24169 return str2dstr(p, node);
24170 case NODE_DSTR:
24171 break;
24172 case NODE_EVSTR:
24173 return node;
24174 }
24175 }
24176 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24177}
24178
24179static NODE *
24180new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24181{
24182 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24183 return list_append(p, dstr, node);
24184}
24185
24186static NODE *
24187call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24188 const YYLTYPE *op_loc, const YYLTYPE *loc)
24189{
24190 NODE *expr;
24191 value_expr(p, recv);
24192 value_expr(p, arg1);
24193 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24194 nd_set_line(expr, op_loc->beg_pos.lineno);
24195 return expr;
24196}
24197
24198static NODE *
24199call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24200{
24201 NODE *opcall;
24202 value_expr(p, recv);
24203 opcall = NEW_OPCALL(recv, id, 0, loc);
24204 nd_set_line(opcall, op_loc->beg_pos.lineno);
24205 return opcall;
24206}
24207
24208static NODE *
24209new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24210{
24211 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24212 nd_set_line(qcall, op_loc->beg_pos.lineno);
24213 return qcall;
24214}
24215
24216static NODE*
24217new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24218{
24219 NODE *ret;
24220 if (block) block_dup_check(p, args, block);
24221 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24222 if (block) ret = method_add_block(p, ret, block, loc);
24223 fixpos(ret, recv);
24224 return ret;
24225}
24226
24228new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24229{
24231 body->node = node;
24232 body->opening_loc = *opening_loc;
24233 body->closing_loc = *closing_loc;
24234 return body;
24235}
24236
24237static NODE *
24238command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc)
24239{
24240 NODE **body;
24241 enum node_type type = nd_type(m);
24242 switch (type) {
24243 case NODE_YIELD:
24244 compile_error(p, "block given to yield");
24245 return m;
24246 case NODE_RETURN:
24247 body = &RNODE_RETURN(m)->nd_stts;
24248 break;
24249 case NODE_BREAK:
24250 case NODE_NEXT:
24251 body = &RNODE_EXITS(m)->nd_stts;
24252 break;
24253 case NODE_REDO: /* `redo` has no argument */
24254 compile_error(p, "command_add_block: unexpected node: NODE_REDO");
24255 return m;
24256 case NODE_RETRY: /* `retry` has no argument */
24257 compile_error(p, "command_add_block: unexpected node: NODE_RETRY");
24258 return m;
24259 default:
24260 block_dup_check(p, get_nd_args(p, m), b);
24261 return method_add_block(p, m, b, loc);
24262 }
24263 RUBY_ASSERT(*body, "no argument %s with do_block", parser_node_name(type));
24264 YYLTYPE b_loc = code_loc_gen(&(*body)->nd_loc, loc);
24265 *body = command_add_block(p, *body, b, &b_loc);
24266 m->nd_loc.end_pos = loc->end_pos;
24267 return m;
24268}
24269
24270#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24271
24272static NODE*
24273last_expr_once_body(NODE *node)
24274{
24275 if (!node) return 0;
24276 return nd_once_body(node);
24277}
24278
24279static NODE*
24280match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24281{
24282 NODE *n;
24283 int line = op_loc->beg_pos.lineno;
24284
24285 value_expr(p, node1);
24286 value_expr(p, node2);
24287
24288 if ((n = last_expr_once_body(node1)) != 0) {
24289 switch (nd_type(n)) {
24290 case NODE_DREGX:
24291 {
24292 NODE *match = NEW_MATCH2(node1, node2, loc);
24293 nd_set_line(match, line);
24294 return match;
24295 }
24296
24297 case NODE_REGX:
24298 {
24299 const VALUE lit = rb_node_regx_string_val(n);
24300 if (!NIL_P(lit)) {
24301 NODE *match = NEW_MATCH2(node1, node2, loc);
24302 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24303 nd_set_line(match, line);
24304 return match;
24305 }
24306 }
24307 }
24308 }
24309
24310 if ((n = last_expr_once_body(node2)) != 0) {
24311 NODE *match3;
24312
24313 switch (nd_type(n)) {
24314 case NODE_DREGX:
24315 match3 = NEW_MATCH3(node2, node1, loc);
24316 return match3;
24317 }
24318 }
24319
24320 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24321 nd_set_line(n, line);
24322 return n;
24323}
24324
24325# if WARN_PAST_SCOPE
24326static int
24327past_dvar_p(struct parser_params *p, ID id)
24328{
24329 struct vtable *past = p->lvtbl->past;
24330 while (past) {
24331 if (vtable_included(past, id)) return 1;
24332 past = past->prev;
24333 }
24334 return 0;
24335}
24336# endif
24337
24338static int
24339numparam_nested_p(struct parser_params *p)
24340{
24341 struct local_vars *local = p->lvtbl;
24342 NODE *outer = local->numparam.outer;
24343 NODE *inner = local->numparam.inner;
24344 if (outer || inner) {
24345 NODE *used = outer ? outer : inner;
24346 compile_error(p, "numbered parameter is already used in %s block\n"
24347 "%s:%d: numbered parameter is already used here",
24348 outer ? "outer" : "inner",
24349 p->ruby_sourcefile, nd_line(used));
24350 parser_show_error_line(p, &used->nd_loc);
24351 return 1;
24352 }
24353 return 0;
24354}
24355
24356static int
24357numparam_used_p(struct parser_params *p)
24358{
24359 NODE *numparam = p->lvtbl->numparam.current;
24360 if (numparam) {
24361 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24362 "%s:%d: numbered parameter is already used here",
24363 p->ruby_sourcefile, nd_line(numparam));
24364 parser_show_error_line(p, &numparam->nd_loc);
24365 return 1;
24366 }
24367 return 0;
24368}
24369
24370static int
24371it_used_p(struct parser_params *p)
24372{
24373 NODE *it = p->lvtbl->it;
24374 if (it) {
24375 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24376 "%s:%d: 'it' is already used here",
24377 p->ruby_sourcefile, nd_line(it));
24378 parser_show_error_line(p, &it->nd_loc);
24379 return 1;
24380 }
24381 return 0;
24382}
24383
24384static NODE*
24385gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24386{
24387 ID *vidp = NULL;
24388 NODE *node;
24389 switch (id) {
24390 case keyword_self:
24391 return NEW_SELF(loc);
24392 case keyword_nil:
24393 return NEW_NIL(loc);
24394 case keyword_true:
24395 return NEW_TRUE(loc);
24396 case keyword_false:
24397 return NEW_FALSE(loc);
24398 case keyword__FILE__:
24399 {
24400 VALUE file = p->ruby_sourcefile_string;
24401 if (NIL_P(file))
24402 file = rb_str_new(0, 0);
24403 node = NEW_FILE(file, loc);
24404 }
24405 return node;
24406 case keyword__LINE__:
24407 return NEW_LINE(loc);
24408 case keyword__ENCODING__:
24409 return NEW_ENCODING(loc);
24410
24411 }
24412 switch (id_type(id)) {
24413 case ID_LOCAL:
24414 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24415 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24416 if (vidp) *vidp |= LVAR_USED;
24417 node = NEW_DVAR(id, loc);
24418 return node;
24419 }
24420 if (local_id_ref(p, id, &vidp)) {
24421 if (vidp) *vidp |= LVAR_USED;
24422 node = NEW_LVAR(id, loc);
24423 return node;
24424 }
24425 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24426 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24427 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24428 node = NEW_DVAR(id, loc);
24429 struct local_vars *local = p->lvtbl;
24430 if (!local->numparam.current) local->numparam.current = node;
24431 return node;
24432 }
24433# if WARN_PAST_SCOPE
24434 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24435 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24436 }
24437# endif
24438 /* method call without arguments */
24439 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24440 if (numparam_used_p(p)) return 0;
24441 if (p->max_numparam == ORDINAL_PARAM) {
24442 compile_error(p, "ordinary parameter is defined");
24443 return 0;
24444 }
24445 if (!p->it_id) {
24446 p->it_id = idItImplicit;
24447 vtable_add(p->lvtbl->args, p->it_id);
24448 }
24449 NODE *node = NEW_DVAR(p->it_id, loc);
24450 if (!p->lvtbl->it) p->lvtbl->it = node;
24451 return node;
24452 }
24453 return NEW_VCALL(id, loc);
24454 case ID_GLOBAL:
24455 return NEW_GVAR(id, loc);
24456 case ID_INSTANCE:
24457 return NEW_IVAR(id, loc);
24458 case ID_CONST:
24459 return NEW_CONST(id, loc);
24460 case ID_CLASS:
24461 return NEW_CVAR(id, loc);
24462 }
24463 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24464 return 0;
24465}
24466
24467static rb_node_opt_arg_t *
24468opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24469{
24470 rb_node_opt_arg_t *opts = opt_list;
24471 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24472
24473 while (opts->nd_next) {
24474 opts = opts->nd_next;
24475 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24476 }
24477 opts->nd_next = opt;
24478
24479 return opt_list;
24480}
24481
24482static rb_node_kw_arg_t *
24483kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24484{
24485 if (kwlist) {
24486 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24487 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24488 }
24489 return kwlist;
24490}
24491
24492static NODE *
24493new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24494{
24495 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24496 p->ctxt.has_trailing_semicolon = 0;
24497
24498 NODE *n = expr;
24499 while (n) {
24500 if (nd_type_p(n, NODE_BEGIN)) {
24501 n = RNODE_BEGIN(n)->nd_body;
24502 }
24503 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24504 n = RNODE_BLOCK(n)->nd_head;
24505 }
24506 else {
24507 break;
24508 }
24509 }
24510
24511 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24512 NODE *block = NEW_BLOCK(expr, loc);
24513 return NEW_DEFINED(block, loc, keyword_loc);
24514 }
24515
24516 return NEW_DEFINED(n, loc, keyword_loc);
24517}
24518
24519static NODE*
24520str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24521{
24522 VALUE lit;
24523 rb_parser_string_t *str = RNODE_STR(node)->string;
24524 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24525 yyerror1(loc, "invalid symbol");
24526 lit = STR_NEW0();
24527 }
24528 else {
24529 lit = rb_str_new_parser_string(str);
24530 }
24531 return NEW_SYM(lit, loc);
24532}
24533
24534static NODE*
24535symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24536{
24537 enum node_type type = nd_type(symbol);
24538 switch (type) {
24539 case NODE_DSTR:
24540 nd_set_type(symbol, NODE_DSYM);
24541 break;
24542 case NODE_STR:
24543 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24544 break;
24545 default:
24546 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24547 }
24548 return list_append(p, symbols, symbol);
24549}
24550
24551static void
24552dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24553{
24554 if (dreg->string) {
24555 reg_fragment_setenc(p, dreg->string, options);
24556 }
24557 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24558 NODE *frag = list->nd_head;
24559 if (nd_type_p(frag, NODE_STR)) {
24560 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24561 }
24562 else if (nd_type_p(frag, NODE_DSTR)) {
24563 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24564 }
24565 }
24566}
24567
24568static NODE *
24569new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24570{
24571 if (!node) {
24572 /* Check string is valid regex */
24573 rb_parser_string_t *str = STRING_NEW0();
24574 reg_compile(p, str, options);
24575 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24576 return node;
24577 }
24578 switch (nd_type(node)) {
24579 case NODE_STR:
24580 {
24581 /* Check string is valid regex */
24582 reg_compile(p, RNODE_STR(node)->string, options);
24583 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24584 }
24585 break;
24586 default:
24587 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24588 /* fall through */
24589 case NODE_DSTR:
24590 nd_set_type(node, NODE_DREGX);
24591 nd_set_loc(node, loc);
24592 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24593 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24594 if (dreg->nd_next) {
24595 dregex_fragment_setenc(p, dreg, options);
24596 }
24597 if (options & RE_OPTION_ONCE) {
24598 node = NEW_ONCE(node, loc);
24599 }
24600 break;
24601 }
24602 return node;
24603}
24604
24605static rb_node_kw_arg_t *
24606new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24607{
24608 if (!k) return 0;
24609 return NEW_KW_ARG((k), loc);
24610}
24611
24612static NODE *
24613new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24614{
24615 if (!node) {
24616 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24617 return xstr;
24618 }
24619 switch (nd_type(node)) {
24620 case NODE_STR:
24621 nd_set_type(node, NODE_XSTR);
24622 nd_set_loc(node, loc);
24623 break;
24624 case NODE_DSTR:
24625 nd_set_type(node, NODE_DXSTR);
24626 nd_set_loc(node, loc);
24627 break;
24628 default:
24629 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24630 break;
24631 }
24632 return node;
24633}
24634
24635static const
24636struct st_hash_type literal_type = {
24637 literal_cmp,
24638 literal_hash,
24639};
24640
24641static int nd_type_st_key_enable_p(NODE *node);
24642
24643static void
24644check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24645{
24646 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24647 if (!arg || !p->case_labels) return;
24648 if (!nd_type_st_key_enable_p(arg)) return;
24649
24650 if (p->case_labels == CHECK_LITERAL_WHEN) {
24651 p->case_labels = st_init_table(&literal_type);
24652 }
24653 else {
24654 st_data_t line;
24655 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24656 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24657 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24658 return;
24659 }
24660 }
24661 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24662}
24663
24664#ifdef RIPPER
24665static int
24666id_is_var(struct parser_params *p, ID id)
24667{
24668 if (is_notop_id(id)) {
24669 switch (id & ID_SCOPE_MASK) {
24670 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24671 return 1;
24672 case ID_LOCAL:
24673 if (dyna_in_block(p)) {
24674 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24675 }
24676 if (local_id(p, id)) return 1;
24677 /* method call without arguments */
24678 return 0;
24679 }
24680 }
24681 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24682 return 0;
24683}
24684#endif
24685
24686static inline enum lex_state_e
24687parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24688{
24689 if (p->debug) {
24690 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24691 }
24692 return p->lex.state = ls;
24693}
24694
24695#ifndef RIPPER
24696static void
24697flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24698{
24699 VALUE mesg = p->debug_buffer;
24700
24701 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24702 p->debug_buffer = Qnil;
24703 rb_io_puts(1, &mesg, out);
24704 }
24705 if (!NIL_P(str) && RSTRING_LEN(str)) {
24706 rb_io_write(p->debug_output, str);
24707 }
24708}
24709
24710static const char rb_parser_lex_state_names[][8] = {
24711 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24712 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24713 "LABEL", "LABELED","FITEM",
24714};
24715
24716static VALUE
24717append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24718{
24719 int i, sep = 0;
24720 unsigned int mask = 1;
24721 static const char none[] = "NONE";
24722
24723 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24724 if ((unsigned)state & mask) {
24725 if (sep) {
24726 rb_str_cat(buf, "|", 1);
24727 }
24728 sep = 1;
24729 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24730 }
24731 }
24732 if (!sep) {
24733 rb_str_cat(buf, none, sizeof(none)-1);
24734 }
24735 return buf;
24736}
24737
24738enum lex_state_e
24739rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24740 enum lex_state_e to, int line)
24741{
24742 VALUE mesg;
24743 mesg = rb_str_new_cstr("lex_state: ");
24744 append_lex_state_name(p, from, mesg);
24745 rb_str_cat_cstr(mesg, " -> ");
24746 append_lex_state_name(p, to, mesg);
24747 rb_str_catf(mesg, " at line %d\n", line);
24748 flush_debug_buffer(p, p->debug_output, mesg);
24749 return to;
24750}
24751
24752VALUE
24753rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24754{
24755 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24756}
24757
24758static void
24759append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24760{
24761 if (stack == 0) {
24762 rb_str_cat_cstr(mesg, "0");
24763 }
24764 else {
24765 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24766 for (; mask && !(stack & mask); mask >>= 1) continue;
24767 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24768 }
24769}
24770
24771void
24772rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24773 const char *name, int line)
24774{
24775 VALUE mesg = rb_sprintf("%s: ", name);
24776 append_bitstack_value(p, stack, mesg);
24777 rb_str_catf(mesg, " at line %d\n", line);
24778 flush_debug_buffer(p, p->debug_output, mesg);
24779}
24780
24781void
24782rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24783{
24784 va_list ap;
24785 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24786
24787 va_start(ap, fmt);
24788 rb_str_vcatf(mesg, fmt, ap);
24789 va_end(ap);
24790 yyerror0(RSTRING_PTR(mesg));
24791 RB_GC_GUARD(mesg);
24792
24793 mesg = rb_str_new(0, 0);
24794 append_lex_state_name(p, p->lex.state, mesg);
24795 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24796 rb_str_resize(mesg, 0);
24797 append_bitstack_value(p, p->cond_stack, mesg);
24798 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24799 rb_str_resize(mesg, 0);
24800 append_bitstack_value(p, p->cmdarg_stack, mesg);
24801 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24802 if (p->debug_output == rb_ractor_stdout())
24803 p->debug_output = rb_ractor_stderr();
24804 p->debug = TRUE;
24805}
24806
24807static YYLTYPE *
24808rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24809{
24810 yylloc->beg_pos.lineno = sourceline;
24811 yylloc->beg_pos.column = beg_pos;
24812 yylloc->end_pos.lineno = sourceline;
24813 yylloc->end_pos.column = end_pos;
24814 return yylloc;
24815}
24816
24817YYLTYPE *
24818rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24819{
24820 int sourceline = here->sourceline;
24821 int beg_pos = (int)here->offset - here->quote
24822 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24823 int end_pos = (int)here->offset + here->length + here->quote;
24824
24825 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24826}
24827
24828YYLTYPE *
24829rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24830{
24831 yylloc->beg_pos.lineno = p->delayed.beg_line;
24832 yylloc->beg_pos.column = p->delayed.beg_col;
24833 yylloc->end_pos.lineno = p->delayed.end_line;
24834 yylloc->end_pos.column = p->delayed.end_col;
24835
24836 return yylloc;
24837}
24838
24839YYLTYPE *
24840rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24841{
24842 int sourceline = p->ruby_sourceline;
24843 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24844 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24845 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24846}
24847
24848YYLTYPE *
24849rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24850{
24851 yylloc->end_pos = yylloc->beg_pos;
24852
24853 return yylloc;
24854}
24855
24856YYLTYPE *
24857rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24858{
24859 int sourceline = p->ruby_sourceline;
24860 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24861 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24862 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24863}
24864
24865YYLTYPE *
24866rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24867{
24868 int sourceline = p->ruby_sourceline;
24869 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24870 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24871 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24872}
24873#endif /* !RIPPER */
24874
24875static int
24876assignable0(struct parser_params *p, ID id, const char **err)
24877{
24878 if (!id) return -1;
24879 switch (id) {
24880 case keyword_self:
24881 *err = "Can't change the value of self";
24882 return -1;
24883 case keyword_nil:
24884 *err = "Can't assign to nil";
24885 return -1;
24886 case keyword_true:
24887 *err = "Can't assign to true";
24888 return -1;
24889 case keyword_false:
24890 *err = "Can't assign to false";
24891 return -1;
24892 case keyword__FILE__:
24893 *err = "Can't assign to __FILE__";
24894 return -1;
24895 case keyword__LINE__:
24896 *err = "Can't assign to __LINE__";
24897 return -1;
24898 case keyword__ENCODING__:
24899 *err = "Can't assign to __ENCODING__";
24900 return -1;
24901 }
24902 switch (id_type(id)) {
24903 case ID_LOCAL:
24904 if (dyna_in_block(p)) {
24905 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24906 compile_error(p, "Can't assign to numbered parameter _%d",
24907 NUMPARAM_ID_TO_IDX(id));
24908 return -1;
24909 }
24910 if (dvar_curr(p, id)) return NODE_DASGN;
24911 if (dvar_defined(p, id)) return NODE_DASGN;
24912 if (local_id(p, id)) return NODE_LASGN;
24913 dyna_var(p, id);
24914 return NODE_DASGN;
24915 }
24916 else {
24917 if (!local_id(p, id)) local_var(p, id);
24918 return NODE_LASGN;
24919 }
24920 break;
24921 case ID_GLOBAL: return NODE_GASGN;
24922 case ID_INSTANCE: return NODE_IASGN;
24923 case ID_CONST:
24924 if (!p->ctxt.in_def) return NODE_CDECL;
24925 *err = "dynamic constant assignment";
24926 return -1;
24927 case ID_CLASS: return NODE_CVASGN;
24928 default:
24929 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24930 }
24931 return -1;
24932}
24933
24934static NODE*
24935assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24936{
24937 const char *err = 0;
24938 int node_type = assignable0(p, id, &err);
24939 switch (node_type) {
24940 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24941 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24942 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24943 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24944 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24945 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24946 }
24947/* TODO: FIXME */
24948#ifndef RIPPER
24949 if (err) yyerror1(loc, err);
24950#else
24951 if (err) set_value(assign_error(p, err, p->s_lvalue));
24952#endif
24953 return NEW_ERROR(loc);
24954}
24955
24956static int
24957is_private_local_id(struct parser_params *p, ID name)
24958{
24959 VALUE s;
24960 if (name == idUScore) return 1;
24961 if (!is_local_id(name)) return 0;
24962 s = rb_id2str(name);
24963 if (!s) return 0;
24964 return RSTRING_PTR(s)[0] == '_';
24965}
24966
24967static int
24968shadowing_lvar_0(struct parser_params *p, ID name)
24969{
24970 if (dyna_in_block(p)) {
24971 if (dvar_curr(p, name)) {
24972 if (is_private_local_id(p, name)) return 1;
24973 yyerror0("duplicated argument name");
24974 }
24975 else if (dvar_defined(p, name) || local_id(p, name)) {
24976 vtable_add(p->lvtbl->vars, name);
24977 if (p->lvtbl->used) {
24978 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24979 }
24980 return 0;
24981 }
24982 }
24983 else {
24984 if (local_id(p, name)) {
24985 if (is_private_local_id(p, name)) return 1;
24986 yyerror0("duplicated argument name");
24987 }
24988 }
24989 return 1;
24990}
24991
24992static ID
24993shadowing_lvar(struct parser_params *p, ID name)
24994{
24995 shadowing_lvar_0(p, name);
24996 return name;
24997}
24998
24999static void
25000new_bv(struct parser_params *p, ID name)
25001{
25002 if (!name) return;
25003 if (!is_local_id(name)) {
25004 compile_error(p, "invalid local variable - %"PRIsVALUE,
25005 rb_id2str(name));
25006 return;
25007 }
25008 if (!shadowing_lvar_0(p, name)) return;
25009 dyna_var(p, name);
25010 ID *vidp = 0;
25011 if (dvar_defined_ref(p, name, &vidp)) {
25012 if (vidp) *vidp |= LVAR_USED;
25013 }
25014}
25015
25016static void
25017aryset_check(struct parser_params *p, NODE *args)
25018{
25019 NODE *block = 0, *kwds = 0;
25020 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25021 block = RNODE_BLOCK_PASS(args)->nd_body;
25022 args = RNODE_BLOCK_PASS(args)->nd_head;
25023 }
25024 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25025 args = RNODE_ARGSCAT(args)->nd_body;
25026 }
25027 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25028 kwds = RNODE_ARGSPUSH(args)->nd_body;
25029 }
25030 else {
25031 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25032 next = RNODE_LIST(next)->nd_next) {
25033 kwds = RNODE_LIST(next)->nd_head;
25034 }
25035 }
25036 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25037 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25038 }
25039 if (block) {
25040 yyerror1(&block->nd_loc, "block arg given in index assignment");
25041 }
25042}
25043
25044static NODE *
25045aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25046{
25047 aryset_check(p, idx);
25048 return NEW_ATTRASGN(recv, tASET, idx, loc);
25049}
25050
25051static void
25052block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25053{
25054 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25055 compile_error(p, "both block arg and actual block given");
25056 }
25057}
25058
25059static NODE *
25060attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25061{
25062 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25063 return NEW_ATTRASGN(recv, id, 0, loc);
25064}
25065
25066static VALUE
25067rb_backref_error(struct parser_params *p, NODE *node)
25068{
25069#ifndef RIPPER
25070# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25071#else
25072# define ERR(...) rb_sprintf(__VA_ARGS__)
25073#endif
25074 switch (nd_type(node)) {
25075 case NODE_NTH_REF:
25076 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25077 case NODE_BACK_REF:
25078 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25079 }
25080#undef ERR
25081 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25082}
25083
25084static NODE *
25085arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25086{
25087 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25088 switch (nd_type(node1)) {
25089 case NODE_LIST:
25090 return list_append(p, node1, node2);
25091 case NODE_BLOCK_PASS:
25092 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25093 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25094 return node1;
25095 case NODE_ARGSPUSH:
25096 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25097 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25098 nd_set_type(node1, NODE_ARGSCAT);
25099 return node1;
25100 case NODE_ARGSCAT:
25101 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25102 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25103 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25104 return node1;
25105 }
25106 return NEW_ARGSPUSH(node1, node2, loc);
25107}
25108
25109static NODE *
25110arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25111{
25112 if (!node2) return node1;
25113 switch (nd_type(node1)) {
25114 case NODE_BLOCK_PASS:
25115 if (RNODE_BLOCK_PASS(node1)->nd_head)
25116 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25117 else
25118 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25119 return node1;
25120 case NODE_ARGSPUSH:
25121 if (!nd_type_p(node2, NODE_LIST)) break;
25122 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25123 nd_set_type(node1, NODE_ARGSCAT);
25124 return node1;
25125 case NODE_ARGSCAT:
25126 if (!nd_type_p(node2, NODE_LIST) ||
25127 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25128 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25129 return node1;
25130 }
25131 return NEW_ARGSCAT(node1, node2, loc);
25132}
25133
25134static NODE *
25135last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25136{
25137 NODE *n1;
25138 if ((n1 = splat_array(args)) != 0) {
25139 return list_append(p, n1, last_arg);
25140 }
25141 return arg_append(p, args, last_arg, loc);
25142}
25143
25144static NODE *
25145rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25146{
25147 NODE *n1;
25148 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25149 return list_concat(n1, rest_arg);
25150 }
25151 return arg_concat(p, args, rest_arg, loc);
25152}
25153
25154static NODE *
25155splat_array(NODE* node)
25156{
25157 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25158 if (nd_type_p(node, NODE_LIST)) return node;
25159 return 0;
25160}
25161
25162static void
25163mark_lvar_used(struct parser_params *p, NODE *rhs)
25164{
25165 ID *vidp = NULL;
25166 if (!rhs) return;
25167 switch (nd_type(rhs)) {
25168 case NODE_LASGN:
25169 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25170 if (vidp) *vidp |= LVAR_USED;
25171 }
25172 break;
25173 case NODE_DASGN:
25174 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25175 if (vidp) *vidp |= LVAR_USED;
25176 }
25177 break;
25178#if 0
25179 case NODE_MASGN:
25180 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25181 mark_lvar_used(p, rhs->nd_head);
25182 }
25183 break;
25184#endif
25185 }
25186}
25187
25188static int is_static_content(NODE *node);
25189
25190static NODE *
25191node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25192{
25193 if (!lhs) return 0;
25194
25195 switch (nd_type(lhs)) {
25196 case NODE_CDECL:
25197 case NODE_GASGN:
25198 case NODE_IASGN:
25199 case NODE_LASGN:
25200 case NODE_DASGN:
25201 case NODE_MASGN:
25202 case NODE_CVASGN:
25203 set_nd_value(p, lhs, rhs);
25204 nd_set_loc(lhs, loc);
25205 break;
25206
25207 case NODE_ATTRASGN:
25208 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25209 nd_set_loc(lhs, loc);
25210 break;
25211
25212 default:
25213 /* should not happen */
25214 break;
25215 }
25216
25217 return lhs;
25218}
25219
25220static NODE *
25221value_expr_check(struct parser_params *p, NODE *node)
25222{
25223 NODE *void_node = 0, *vn;
25224
25225 if (!node) {
25226 rb_warning0("empty expression");
25227 }
25228 while (node) {
25229 switch (nd_type(node)) {
25230 case NODE_ENSURE:
25231 vn = RNODE_ENSURE(node)->nd_head;
25232 node = RNODE_ENSURE(node)->nd_ensr;
25233 /* nd_ensr should not be NULL, check it out next */
25234 if (vn && (vn = value_expr_check(p, vn))) {
25235 goto found;
25236 }
25237 break;
25238
25239 case NODE_RESCUE:
25240 /* void only if all children are void */
25241 vn = RNODE_RESCUE(node)->nd_head;
25242 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
25243 if (!void_node) void_node = vn;
25244 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25245 if (!nd_type_p(r, NODE_RESBODY)) {
25246 compile_error(p, "unexpected node");
25247 return NULL;
25248 }
25249 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25250 void_node = 0;
25251 break;
25252 }
25253 if (!void_node) void_node = vn;
25254 }
25255 node = RNODE_RESCUE(node)->nd_else;
25256 if (!node) return void_node;
25257 break;
25258
25259 case NODE_RETURN:
25260 case NODE_BREAK:
25261 case NODE_NEXT:
25262 case NODE_REDO:
25263 case NODE_RETRY:
25264 goto found;
25265
25266 case NODE_CASE3:
25267 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
25268 compile_error(p, "unexpected node");
25269 return NULL;
25270 }
25271 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
25272 return NULL;
25273 }
25274 /* single line pattern matching with "=>" operator */
25275 goto found;
25276
25277 case NODE_BLOCK:
25278 while (RNODE_BLOCK(node)->nd_next) {
25279 node = RNODE_BLOCK(node)->nd_next;
25280 }
25281 node = RNODE_BLOCK(node)->nd_head;
25282 break;
25283
25284 case NODE_BEGIN:
25285 node = RNODE_BEGIN(node)->nd_body;
25286 break;
25287
25288 case NODE_IF:
25289 case NODE_UNLESS:
25290 if (!RNODE_IF(node)->nd_body) {
25291 return NULL;
25292 }
25293 else if (!RNODE_IF(node)->nd_else) {
25294 return NULL;
25295 }
25296 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25297 if (!vn) return NULL;
25298 if (!void_node) void_node = vn;
25299 node = RNODE_IF(node)->nd_else;
25300 break;
25301
25302 case NODE_AND:
25303 case NODE_OR:
25304 node = RNODE_AND(node)->nd_1st;
25305 break;
25306
25307 case NODE_LASGN:
25308 case NODE_DASGN:
25309 case NODE_MASGN:
25310 mark_lvar_used(p, node);
25311 return NULL;
25312
25313 default:
25314 return NULL;
25315 }
25316 }
25317
25318 return NULL;
25319
25320 found:
25321 /* return the first found node */
25322 return void_node ? void_node : node;
25323}
25324
25325static int
25326value_expr(struct parser_params *p, NODE *node)
25327{
25328 NODE *void_node = value_expr_check(p, node);
25329 if (void_node) {
25330 yyerror1(&void_node->nd_loc, "void value expression");
25331 /* or "control never reach"? */
25332 return FALSE;
25333 }
25334 return TRUE;
25335}
25336
25337static void
25338void_expr(struct parser_params *p, NODE *node)
25339{
25340 const char *useless = 0;
25341
25342 if (!RTEST(ruby_verbose)) return;
25343
25344 if (!node || !(node = nd_once_body(node))) return;
25345 switch (nd_type(node)) {
25346 case NODE_OPCALL:
25347 switch (RNODE_OPCALL(node)->nd_mid) {
25348 case '+':
25349 case '-':
25350 case '*':
25351 case '/':
25352 case '%':
25353 case tPOW:
25354 case tUPLUS:
25355 case tUMINUS:
25356 case '|':
25357 case '^':
25358 case '&':
25359 case tCMP:
25360 case '>':
25361 case tGEQ:
25362 case '<':
25363 case tLEQ:
25364 case tEQ:
25365 case tNEQ:
25366 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25367 break;
25368 }
25369 break;
25370
25371 case NODE_LVAR:
25372 case NODE_DVAR:
25373 case NODE_GVAR:
25374 case NODE_IVAR:
25375 case NODE_CVAR:
25376 case NODE_NTH_REF:
25377 case NODE_BACK_REF:
25378 useless = "a variable";
25379 break;
25380 case NODE_CONST:
25381 useless = "a constant";
25382 break;
25383 case NODE_SYM:
25384 case NODE_LINE:
25385 case NODE_FILE:
25386 case NODE_ENCODING:
25387 case NODE_INTEGER:
25388 case NODE_FLOAT:
25389 case NODE_RATIONAL:
25390 case NODE_IMAGINARY:
25391 case NODE_STR:
25392 case NODE_DSTR:
25393 case NODE_REGX:
25394 case NODE_DREGX:
25395 useless = "a literal";
25396 break;
25397 case NODE_COLON2:
25398 case NODE_COLON3:
25399 useless = "::";
25400 break;
25401 case NODE_DOT2:
25402 useless = "..";
25403 break;
25404 case NODE_DOT3:
25405 useless = "...";
25406 break;
25407 case NODE_SELF:
25408 useless = "self";
25409 break;
25410 case NODE_NIL:
25411 useless = "nil";
25412 break;
25413 case NODE_TRUE:
25414 useless = "true";
25415 break;
25416 case NODE_FALSE:
25417 useless = "false";
25418 break;
25419 case NODE_DEFINED:
25420 useless = "defined?";
25421 break;
25422 }
25423
25424 if (useless) {
25425 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25426 }
25427}
25428
25429/* warns useless use of block and returns the last statement node */
25430static NODE *
25431void_stmts(struct parser_params *p, NODE *node)
25432{
25433 NODE *const n = node;
25434 if (!RTEST(ruby_verbose)) return n;
25435 if (!node) return n;
25436 if (!nd_type_p(node, NODE_BLOCK)) return n;
25437
25438 while (RNODE_BLOCK(node)->nd_next) {
25439 void_expr(p, RNODE_BLOCK(node)->nd_head);
25440 node = RNODE_BLOCK(node)->nd_next;
25441 }
25442 return RNODE_BLOCK(node)->nd_head;
25443}
25444
25445static NODE *
25446remove_begin(NODE *node)
25447{
25448 NODE **n = &node, *n1 = node;
25449 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25450 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25451 }
25452 return node;
25453}
25454
25455static void
25456reduce_nodes(struct parser_params *p, NODE **body)
25457{
25458 NODE *node = *body;
25459
25460 if (!node) {
25461 *body = NEW_NIL(&NULL_LOC);
25462 return;
25463 }
25464#define subnodes(type, n1, n2) \
25465 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25466 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25467 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25468
25469 while (node) {
25470 int newline = (int)nd_fl_newline(node);
25471 switch (nd_type(node)) {
25472 end:
25473 case NODE_NIL:
25474 *body = 0;
25475 return;
25476 case NODE_BEGIN:
25477 *body = node = RNODE_BEGIN(node)->nd_body;
25478 if (newline && node) nd_set_fl_newline(node);
25479 continue;
25480 case NODE_BLOCK:
25481 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25482 break;
25483 case NODE_IF:
25484 case NODE_UNLESS:
25485 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25486 return;
25487 case NODE_CASE:
25488 body = &RNODE_CASE(node)->nd_body;
25489 break;
25490 case NODE_WHEN:
25491 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25492 break;
25493 case NODE_ENSURE:
25494 body = &RNODE_ENSURE(node)->nd_head;
25495 break;
25496 case NODE_RESCUE:
25497 newline = 0; // RESBODY should not be a NEWLINE
25498 if (RNODE_RESCUE(node)->nd_else) {
25499 body = &RNODE_RESCUE(node)->nd_resq;
25500 break;
25501 }
25502 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25503 break;
25504 default:
25505 return;
25506 }
25507 node = *body;
25508 if (newline && node) nd_set_fl_newline(node);
25509 }
25510
25511#undef subnodes
25512}
25513
25514static int
25515is_static_content(NODE *node)
25516{
25517 if (!node) return 1;
25518 switch (nd_type(node)) {
25519 case NODE_HASH:
25520 if (!(node = RNODE_HASH(node)->nd_head)) break;
25521 case NODE_LIST:
25522 do {
25523 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25524 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25525 case NODE_SYM:
25526 case NODE_REGX:
25527 case NODE_LINE:
25528 case NODE_FILE:
25529 case NODE_ENCODING:
25530 case NODE_INTEGER:
25531 case NODE_FLOAT:
25532 case NODE_RATIONAL:
25533 case NODE_IMAGINARY:
25534 case NODE_STR:
25535 case NODE_NIL:
25536 case NODE_TRUE:
25537 case NODE_FALSE:
25538 case NODE_ZLIST:
25539 break;
25540 default:
25541 return 0;
25542 }
25543 return 1;
25544}
25545
25546static int
25547assign_in_cond(struct parser_params *p, NODE *node)
25548{
25549 switch (nd_type(node)) {
25550 case NODE_MASGN:
25551 case NODE_LASGN:
25552 case NODE_DASGN:
25553 case NODE_GASGN:
25554 case NODE_IASGN:
25555 case NODE_CVASGN:
25556 case NODE_CDECL:
25557 break;
25558
25559 default:
25560 return 0;
25561 }
25562
25563 if (!get_nd_value(p, node)) return 1;
25564 if (is_static_content(get_nd_value(p, node))) {
25565 /* reports always */
25566 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25567 }
25568 return 1;
25569}
25570
25571enum cond_type {
25572 COND_IN_OP,
25573 COND_IN_COND,
25574 COND_IN_FF
25575};
25576
25577#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25578 switch (t) { \
25579 case COND_IN_OP: break; \
25580 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25581 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25582 } \
25583} while (0)
25584
25585static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25586
25587static NODE*
25588range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25589{
25590 enum node_type type;
25591
25592 if (node == 0) return 0;
25593
25594 type = nd_type(node);
25595 value_expr(p, node);
25596 if (type == NODE_INTEGER) {
25597 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25598 ID lineno = rb_intern("$.");
25599 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25600 }
25601 return cond0(p, node, COND_IN_FF, loc, true);
25602}
25603
25604static NODE*
25605cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25606{
25607 if (node == 0) return 0;
25608 if (!(node = nd_once_body(node))) return 0;
25609 assign_in_cond(p, node);
25610
25611 switch (nd_type(node)) {
25612 case NODE_BEGIN:
25613 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25614 break;
25615
25616 case NODE_DSTR:
25617 case NODE_EVSTR:
25618 case NODE_STR:
25619 case NODE_FILE:
25620 SWITCH_BY_COND_TYPE(type, warn, "string ");
25621 break;
25622
25623 case NODE_REGX:
25624 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25625 nd_set_type(node, NODE_MATCH);
25626 break;
25627
25628 case NODE_DREGX:
25629 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25630
25631 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25632
25633 case NODE_BLOCK:
25634 {
25635 NODE *end = RNODE_BLOCK(node)->nd_end;
25636 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25637 if (top) top = node == end;
25638 *expr = cond0(p, *expr, type, loc, top);
25639 }
25640 break;
25641
25642 case NODE_AND:
25643 case NODE_OR:
25644 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25645 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25646 break;
25647
25648 case NODE_DOT2:
25649 case NODE_DOT3:
25650 if (!top) break;
25651 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25652 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25653 switch (nd_type(node)) {
25654 case NODE_DOT2:
25655 nd_set_type(node,NODE_FLIP2);
25656 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25657 (void)flip2;
25658 break;
25659 case NODE_DOT3:
25660 nd_set_type(node, NODE_FLIP3);
25661 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25662 (void)flip3;
25663 break;
25664 }
25665 break;
25666
25667 case NODE_SYM:
25668 case NODE_DSYM:
25669 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25670 break;
25671
25672 case NODE_LINE:
25673 case NODE_ENCODING:
25674 case NODE_INTEGER:
25675 case NODE_FLOAT:
25676 case NODE_RATIONAL:
25677 case NODE_IMAGINARY:
25678 SWITCH_BY_COND_TYPE(type, warning, "");
25679 break;
25680
25681 default:
25682 break;
25683 }
25684 return node;
25685}
25686
25687static NODE*
25688cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25689{
25690 if (node == 0) return 0;
25691 return cond0(p, node, COND_IN_COND, loc, true);
25692}
25693
25694static NODE*
25695method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25696{
25697 if (node == 0) return 0;
25698 return cond0(p, node, COND_IN_OP, loc, true);
25699}
25700
25701static NODE*
25702new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25703{
25704 YYLTYPE loc = {*pos, *pos};
25705 return NEW_NIL(&loc);
25706}
25707
25708static NODE*
25709new_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)
25710{
25711 if (!cc) return right;
25712 cc = cond0(p, cc, COND_IN_COND, loc, true);
25713 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25714}
25715
25716static NODE*
25717new_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)
25718{
25719 if (!cc) return right;
25720 cc = cond0(p, cc, COND_IN_COND, loc, true);
25721 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25722}
25723
25724#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))
25725
25726static NODE*
25727logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25728 const YYLTYPE *op_loc, const YYLTYPE *loc)
25729{
25730 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25731 NODE *op;
25732 value_expr(p, left);
25733 if (left && nd_type_p(left, type)) {
25734 NODE *node = left, *second;
25735 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25736 node = second;
25737 }
25738 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25739 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25740 left->nd_loc.end_pos = loc->end_pos;
25741 return left;
25742 }
25743 op = NEW_AND_OR(type, left, right, loc, op_loc);
25744 nd_set_line(op, op_loc->beg_pos.lineno);
25745 return op;
25746}
25747
25748#undef NEW_AND_OR
25749
25750static void
25751no_blockarg(struct parser_params *p, NODE *node)
25752{
25753 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25754 compile_error(p, "block argument should not be given");
25755 }
25756}
25757
25758static NODE *
25759ret_args(struct parser_params *p, NODE *node)
25760{
25761 if (node) {
25762 no_blockarg(p, node);
25763 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25764 node = RNODE_LIST(node)->nd_head;
25765 }
25766 }
25767 return node;
25768}
25769
25770static NODE*
25771negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
25772{
25773 switch (nd_type(node)) {
25774 case NODE_INTEGER:
25775 RNODE_INTEGER(node)->minus = TRUE;
25776 break;
25777 case NODE_FLOAT:
25778 RNODE_FLOAT(node)->minus = TRUE;
25779 break;
25780 case NODE_RATIONAL:
25781 RNODE_RATIONAL(node)->minus = TRUE;
25782 break;
25783 case NODE_IMAGINARY:
25784 RNODE_IMAGINARY(node)->minus = TRUE;
25785 break;
25786 }
25787 node->nd_loc = *loc;
25788 return node;
25789}
25790
25791static NODE *
25792arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25793{
25794 if (node2) {
25795 if (!node1) return (NODE *)node2;
25796 node2->nd_head = node1;
25797 nd_set_first_lineno(node2, nd_first_lineno(node1));
25798 nd_set_first_column(node2, nd_first_column(node1));
25799 return (NODE *)node2;
25800 }
25801 return node1;
25802}
25803
25804static bool
25805args_info_empty_p(struct rb_args_info *args)
25806{
25807 if (args->pre_args_num) return false;
25808 if (args->post_args_num) return false;
25809 if (args->rest_arg) return false;
25810 if (args->opt_args) return false;
25811 if (args->block_arg) return false;
25812 if (args->kw_args) return false;
25813 if (args->kw_rest_arg) return false;
25814 return true;
25815}
25816
25817static rb_node_args_t *
25818new_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)
25819{
25820 struct rb_args_info *args = &tail->nd_ainfo;
25821
25822 if (args->forwarding) {
25823 if (rest_arg) {
25824 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25825 return tail;
25826 }
25827 rest_arg = idFWD_REST;
25828 }
25829
25830 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25831 args->pre_init = pre_args ? pre_args->nd_next : 0;
25832
25833 args->post_args_num = post_args ? post_args->nd_plen : 0;
25834 args->post_init = post_args ? post_args->nd_next : 0;
25835 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25836
25837 args->rest_arg = rest_arg;
25838
25839 args->opt_args = opt_args;
25840
25841 nd_set_loc(RNODE(tail), loc);
25842
25843 return tail;
25844}
25845
25846static rb_node_args_t *
25847new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25848{
25849 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25850 struct rb_args_info *args = &node->nd_ainfo;
25851 if (p->error_p) return node;
25852
25853 args->block_arg = block;
25854 args->kw_args = kw_args;
25855
25856 if (kw_args) {
25857 /*
25858 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25859 * variable order: k1, kr1, k2, &b, internal_id, krest
25860 * #=> <reorder>
25861 * variable order: kr1, k1, k2, internal_id, krest, &b
25862 */
25863 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25864 struct vtable *vtargs = p->lvtbl->args;
25865 rb_node_kw_arg_t *kwn = kw_args;
25866
25867 if (block) block = vtargs->tbl[vtargs->pos-1];
25868 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25869 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25870 while (kwn) {
25871 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25872 --kw_vars;
25873 --required_kw_vars;
25874 kwn = kwn->nd_next;
25875 }
25876
25877 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25878 ID vid = get_nd_vid(p, kwn->nd_body);
25879 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25880 *required_kw_vars++ = vid;
25881 }
25882 else {
25883 *kw_vars++ = vid;
25884 }
25885 }
25886
25887 arg_var(p, kw_bits);
25888 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25889 if (block) arg_var(p, block);
25890
25891 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25892 }
25893 else if (kw_rest_arg == idNil) {
25894 args->no_kwarg = 1;
25895 }
25896 else if (kw_rest_arg) {
25897 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25898 }
25899
25900 return node;
25901}
25902
25903static rb_node_args_t *
25904args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25905{
25906 if (max_numparam > NO_PARAM || it_id) {
25907 if (!args) {
25908 YYLTYPE loc = RUBY_INIT_YYLLOC();
25909 args = new_args_tail(p, 0, 0, 0, 0);
25910 nd_set_loc(RNODE(args), &loc);
25911 }
25912 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25913 }
25914 return args;
25915}
25916
25917static NODE*
25918new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25919{
25920 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25921
25922 if (pre_arg) {
25923 NODE *pre_args = NEW_LIST(pre_arg, loc);
25924 if (RNODE_ARYPTN(aryptn)->pre_args) {
25925 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25926 }
25927 else {
25928 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25929 }
25930 }
25931 return aryptn;
25932}
25933
25934static NODE*
25935new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25936{
25937 if (has_rest) {
25938 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25939 }
25940 else {
25941 rest_arg = NULL;
25942 }
25943 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25944
25945 return node;
25946}
25947
25948static NODE*
25949new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25950{
25951 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25952
25953 return fndptn;
25954}
25955
25956static NODE*
25957new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25958{
25959 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25960 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25961 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25962
25963 return node;
25964}
25965
25966static NODE*
25967new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25968{
25969 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25970 return hshptn;
25971}
25972
25973static NODE*
25974new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25975{
25976 NODE *node, *kw_rest_arg_node;
25977
25978 if (kw_rest_arg == idNil) {
25979 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25980 }
25981 else if (kw_rest_arg) {
25982 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25983 }
25984 else {
25985 kw_rest_arg_node = NULL;
25986 }
25987
25988 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25989
25990 return node;
25991}
25992
25993static NODE*
25994dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25995{
25996 if (!node) {
25997 return NEW_SYM(STR_NEW0(), loc);
25998 }
25999
26000 switch (nd_type(node)) {
26001 case NODE_DSTR:
26002 nd_set_type(node, NODE_DSYM);
26003 nd_set_loc(node, loc);
26004 break;
26005 case NODE_STR:
26006 node = str_to_sym_node(p, node, loc);
26007 break;
26008 default:
26009 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26010 break;
26011 }
26012 return node;
26013}
26014
26015static int
26016nd_type_st_key_enable_p(NODE *node)
26017{
26018 switch (nd_type(node)) {
26019 case NODE_INTEGER:
26020 case NODE_FLOAT:
26021 case NODE_RATIONAL:
26022 case NODE_IMAGINARY:
26023 case NODE_STR:
26024 case NODE_SYM:
26025 case NODE_REGX:
26026 case NODE_LINE:
26027 case NODE_FILE:
26028 case NODE_ENCODING:
26029 return true;
26030 default:
26031 return false;
26032 }
26033}
26034
26035static VALUE
26036nd_value(struct parser_params *p, NODE *node)
26037{
26038 switch (nd_type(node)) {
26039 case NODE_STR:
26040 return rb_node_str_string_val(node);
26041 case NODE_INTEGER:
26042 return rb_node_integer_literal_val(node);
26043 case NODE_FLOAT:
26044 return rb_node_float_literal_val(node);
26045 case NODE_RATIONAL:
26046 return rb_node_rational_literal_val(node);
26047 case NODE_IMAGINARY:
26048 return rb_node_imaginary_literal_val(node);
26049 case NODE_SYM:
26050 return rb_node_sym_string_val(node);
26051 case NODE_REGX:
26052 return rb_node_regx_string_val(node);
26053 case NODE_LINE:
26054 return rb_node_line_lineno_val(node);
26055 case NODE_ENCODING:
26056 return rb_node_encoding_val(node);
26057 case NODE_FILE:
26058 return rb_node_file_path_val(node);
26059 default:
26060 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26062 }
26063}
26064
26065static void
26066warn_duplicate_keys(struct parser_params *p, NODE *hash)
26067{
26068 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26069 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26070 while (hash && RNODE_LIST(hash)->nd_next) {
26071 NODE *head = RNODE_LIST(hash)->nd_head;
26072 NODE *value = RNODE_LIST(hash)->nd_next;
26073 NODE *next = RNODE_LIST(value)->nd_next;
26074 st_data_t key;
26075 st_data_t data;
26076
26077 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26078 if (!head) {
26079 head = value;
26080 }
26081
26082 if (nd_type_st_key_enable_p(head)) {
26083 key = (st_data_t)head;
26084
26085 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26086 rb_warn2L(nd_line((NODE *)data),
26087 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26088 nd_value(p, head), WARN_I(nd_line(head)));
26089 }
26090 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26091 }
26092 hash = next;
26093 }
26094 st_free_table(p->warn_duplicate_keys_table);
26095 p->warn_duplicate_keys_table = NULL;
26096}
26097
26098static NODE *
26099new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26100{
26101 if (hash) warn_duplicate_keys(p, hash);
26102 return NEW_HASH(hash, loc);
26103}
26104
26105static void
26106error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26107{
26108 if (is_private_local_id(p, id)) {
26109 return;
26110 }
26111 if (st_is_member(p->pvtbl, id)) {
26112 yyerror1(loc, "duplicated variable name");
26113 }
26114 else if (p->ctxt.in_alt_pattern && id) {
26115 yyerror1(loc, "variable capture in alternative pattern");
26116 }
26117 else {
26118 p->ctxt.capture_in_pattern = 1;
26119 st_insert(p->pvtbl, (st_data_t)id, 0);
26120 }
26121}
26122
26123static void
26124error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26125{
26126 if (!p->pktbl) {
26127 p->pktbl = st_init_numtable();
26128 }
26129 else if (st_is_member(p->pktbl, key)) {
26130 yyerror1(loc, "duplicated key name");
26131 return;
26132 }
26133 st_insert(p->pktbl, (st_data_t)key, 0);
26134}
26135
26136static NODE *
26137new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26138{
26139 return NEW_HASH(hash, loc);
26140}
26141
26142static NODE *
26143new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26144{
26145 NODE *asgn;
26146
26147 if (lhs) {
26148 ID vid = get_nd_vid(p, lhs);
26149 YYLTYPE lhs_loc = lhs->nd_loc;
26150 if (op == tOROP) {
26151 set_nd_value(p, lhs, rhs);
26152 nd_set_loc(lhs, loc);
26153 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26154 }
26155 else if (op == tANDOP) {
26156 set_nd_value(p, lhs, rhs);
26157 nd_set_loc(lhs, loc);
26158 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26159 }
26160 else {
26161 asgn = lhs;
26162 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26163 set_nd_value(p, asgn, rhs);
26164 nd_set_loc(asgn, loc);
26165 }
26166 }
26167 else {
26168 asgn = NEW_ERROR(loc);
26169 }
26170 return asgn;
26171}
26172
26173static NODE *
26174new_ary_op_assign(struct parser_params *p, NODE *ary,
26175 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26176 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26177{
26178 NODE *asgn;
26179
26180 aryset_check(p, args);
26181 args = make_list(args, args_loc);
26182 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26183 fixpos(asgn, ary);
26184 return asgn;
26185}
26186
26187static NODE *
26188new_attr_op_assign(struct parser_params *p, NODE *lhs,
26189 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26190 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26191{
26192 NODE *asgn;
26193
26194 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26195 fixpos(asgn, lhs);
26196 return asgn;
26197}
26198
26199static NODE *
26200new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26201{
26202 NODE *asgn;
26203
26204 if (lhs) {
26205 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26206 }
26207 else {
26208 asgn = NEW_ERROR(loc);
26209 }
26210 fixpos(asgn, lhs);
26211 return asgn;
26212}
26213
26214static NODE *
26215const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26216{
26217 if (p->ctxt.in_def) {
26218#ifndef RIPPER
26219 yyerror1(loc, "dynamic constant assignment");
26220#else
26221 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26222#endif
26223 }
26224 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26225}
26226
26227#ifdef RIPPER
26228static VALUE
26229assign_error(struct parser_params *p, const char *mesg, VALUE a)
26230{
26231 a = dispatch2(assign_error, ERR_MESG(), a);
26232 ripper_error(p);
26233 return a;
26234}
26235#endif
26236
26237static NODE *
26238new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26239{
26240 NODE *result = head;
26241 if (rescue) {
26242 NODE *tmp = rescue_else ? rescue_else : rescue;
26243 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26244
26245 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26246 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26247 }
26248 if (ensure) {
26249 result = NEW_ENSURE(result, ensure, loc);
26250 }
26251 fixpos(result, head);
26252 return result;
26253}
26254
26255static void
26256warn_unused_var(struct parser_params *p, struct local_vars *local)
26257{
26258 int cnt;
26259
26260 if (!local->used) return;
26261 cnt = local->used->pos;
26262 if (cnt != local->vars->pos) {
26263 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26264 }
26265#ifndef RIPPER
26266 ID *v = local->vars->tbl;
26267 ID *u = local->used->tbl;
26268 for (int i = 0; i < cnt; ++i) {
26269 if (!v[i] || (u[i] & LVAR_USED)) continue;
26270 if (is_private_local_id(p, v[i])) continue;
26271 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26272 }
26273#endif
26274}
26275
26276static void
26277local_push(struct parser_params *p, int toplevel_scope)
26278{
26279 struct local_vars *local;
26280 int inherits_dvars = toplevel_scope && compile_for_eval;
26281 int warn_unused_vars = RTEST(ruby_verbose);
26282
26283 local = ALLOC(struct local_vars);
26284 local->prev = p->lvtbl;
26285 local->args = vtable_alloc(0);
26286 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26287#ifndef RIPPER
26288 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26289 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26290#endif
26291 local->numparam.outer = 0;
26292 local->numparam.inner = 0;
26293 local->numparam.current = 0;
26294 local->it = 0;
26295 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26296
26297# if WARN_PAST_SCOPE
26298 local->past = 0;
26299# endif
26300 CMDARG_PUSH(0);
26301 COND_PUSH(0);
26302 p->lvtbl = local;
26303}
26304
26305static void
26306vtable_chain_free(struct parser_params *p, struct vtable *table)
26307{
26308 while (!DVARS_TERMINAL_P(table)) {
26309 struct vtable *cur_table = table;
26310 table = cur_table->prev;
26311 vtable_free(cur_table);
26312 }
26313}
26314
26315static void
26316local_free(struct parser_params *p, struct local_vars *local)
26317{
26318 vtable_chain_free(p, local->used);
26319
26320# if WARN_PAST_SCOPE
26321 vtable_chain_free(p, local->past);
26322# endif
26323
26324 vtable_chain_free(p, local->args);
26325 vtable_chain_free(p, local->vars);
26326
26327 ruby_sized_xfree(local, sizeof(struct local_vars));
26328}
26329
26330static void
26331local_pop(struct parser_params *p)
26332{
26333 struct local_vars *local = p->lvtbl->prev;
26334 if (p->lvtbl->used) {
26335 warn_unused_var(p, p->lvtbl);
26336 }
26337
26338 local_free(p, p->lvtbl);
26339 p->lvtbl = local;
26340
26341 CMDARG_POP();
26342 COND_POP();
26343}
26344
26345static rb_ast_id_table_t *
26346local_tbl(struct parser_params *p)
26347{
26348 int cnt_args = vtable_size(p->lvtbl->args);
26349 int cnt_vars = vtable_size(p->lvtbl->vars);
26350 int cnt = cnt_args + cnt_vars;
26351 int i, j;
26352 rb_ast_id_table_t *tbl;
26353
26354 if (cnt <= 0) return 0;
26355 tbl = rb_ast_new_local_table(p->ast, cnt);
26356 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26357 /* remove IDs duplicated to warn shadowing */
26358 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26359 ID id = p->lvtbl->vars->tbl[i];
26360 if (!vtable_included(p->lvtbl->args, id)) {
26361 tbl->ids[j++] = id;
26362 }
26363 }
26364 if (j < cnt) {
26365 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26366 }
26367
26368 return tbl;
26369}
26370
26371static void
26372numparam_name(struct parser_params *p, ID id)
26373{
26374 if (!NUMPARAM_ID_P(id)) return;
26375 compile_error(p, "_%d is reserved for numbered parameter",
26376 NUMPARAM_ID_TO_IDX(id));
26377}
26378
26379static void
26380arg_var(struct parser_params *p, ID id)
26381{
26382 numparam_name(p, id);
26383 vtable_add(p->lvtbl->args, id);
26384}
26385
26386static void
26387local_var(struct parser_params *p, ID id)
26388{
26389 numparam_name(p, id);
26390 vtable_add(p->lvtbl->vars, id);
26391 if (p->lvtbl->used) {
26392 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26393 }
26394}
26395
26396#ifndef RIPPER
26397int
26398rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26399{
26400 return rb_local_defined(id, iseq);
26401}
26402#endif
26403
26404static int
26405local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26406{
26407 struct vtable *vars, *args, *used;
26408
26409 vars = p->lvtbl->vars;
26410 args = p->lvtbl->args;
26411 used = p->lvtbl->used;
26412
26413 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26414 vars = vars->prev;
26415 args = args->prev;
26416 if (used) used = used->prev;
26417 }
26418
26419 if (vars && vars->prev == DVARS_INHERIT) {
26420 return rb_parser_local_defined(p, id, p->parent_iseq);
26421 }
26422 else if (vtable_included(args, id)) {
26423 return 1;
26424 }
26425 else {
26426 int i = vtable_included(vars, id);
26427 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26428 return i != 0;
26429 }
26430}
26431
26432static int
26433local_id(struct parser_params *p, ID id)
26434{
26435 return local_id_ref(p, id, NULL);
26436}
26437
26438static int
26439check_forwarding_args(struct parser_params *p)
26440{
26441 if (local_id(p, idFWD_ALL)) return TRUE;
26442 compile_error(p, "unexpected ...");
26443 return FALSE;
26444}
26445
26446static void
26447add_forwarding_args(struct parser_params *p)
26448{
26449 arg_var(p, idFWD_REST);
26450 arg_var(p, idFWD_KWREST);
26451 arg_var(p, idFWD_BLOCK);
26452 arg_var(p, idFWD_ALL);
26453}
26454
26455static void
26456forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26457{
26458 bool conflict = false;
26459
26460 struct vtable *vars, *args;
26461
26462 vars = p->lvtbl->vars;
26463 args = p->lvtbl->args;
26464
26465 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26466 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26467 vars = vars->prev;
26468 args = args->prev;
26469 }
26470
26471 bool found = false;
26472 if (vars && vars->prev == DVARS_INHERIT && !found) {
26473 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26474 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26475 }
26476 else {
26477 found = (vtable_included(args, arg) &&
26478 !(all && vtable_included(args, all)));
26479 }
26480
26481 if (!found) {
26482 compile_error(p, "no anonymous %s parameter", var);
26483 }
26484 else if (conflict) {
26485 compile_error(p, "anonymous %s parameter is also used within block", var);
26486 }
26487}
26488
26489static NODE *
26490new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26491{
26492 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26493 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26494 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26495 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26496 block->forwarding = TRUE;
26497 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26498 return arg_blk_pass(args, block);
26499}
26500
26501static NODE *
26502numparam_push(struct parser_params *p)
26503{
26504 struct local_vars *local = p->lvtbl;
26505 NODE *inner = local->numparam.inner;
26506 if (!local->numparam.outer) {
26507 local->numparam.outer = local->numparam.current;
26508 }
26509 local->numparam.inner = 0;
26510 local->numparam.current = 0;
26511 local->it = 0;
26512 return inner;
26513}
26514
26515static void
26516numparam_pop(struct parser_params *p, NODE *prev_inner)
26517{
26518 struct local_vars *local = p->lvtbl;
26519 if (prev_inner) {
26520 /* prefer first one */
26521 local->numparam.inner = prev_inner;
26522 }
26523 else if (local->numparam.current) {
26524 /* current and inner are exclusive */
26525 local->numparam.inner = local->numparam.current;
26526 }
26527 if (p->max_numparam > NO_PARAM) {
26528 /* current and outer are exclusive */
26529 local->numparam.current = local->numparam.outer;
26530 local->numparam.outer = 0;
26531 }
26532 else {
26533 /* no numbered parameter */
26534 local->numparam.current = 0;
26535 }
26536 local->it = 0;
26537}
26538
26539static const struct vtable *
26540dyna_push(struct parser_params *p)
26541{
26542 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26543 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26544 if (p->lvtbl->used) {
26545 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26546 }
26547 return p->lvtbl->args;
26548}
26549
26550static void
26551dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26552{
26553 struct vtable *tmp = *vtblp;
26554 *vtblp = tmp->prev;
26555# if WARN_PAST_SCOPE
26556 if (p->past_scope_enabled) {
26557 tmp->prev = p->lvtbl->past;
26558 p->lvtbl->past = tmp;
26559 return;
26560 }
26561# endif
26562 vtable_free(tmp);
26563}
26564
26565static void
26566dyna_pop_1(struct parser_params *p)
26567{
26568 struct vtable *tmp;
26569
26570 if ((tmp = p->lvtbl->used) != 0) {
26571 warn_unused_var(p, p->lvtbl);
26572 p->lvtbl->used = p->lvtbl->used->prev;
26573 vtable_free(tmp);
26574 }
26575 dyna_pop_vtable(p, &p->lvtbl->args);
26576 dyna_pop_vtable(p, &p->lvtbl->vars);
26577}
26578
26579static void
26580dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26581{
26582 while (p->lvtbl->args != lvargs) {
26583 dyna_pop_1(p);
26584 if (!p->lvtbl->args) {
26585 struct local_vars *local = p->lvtbl->prev;
26586 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26587 p->lvtbl = local;
26588 }
26589 }
26590 dyna_pop_1(p);
26591}
26592
26593static int
26594dyna_in_block(struct parser_params *p)
26595{
26596 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26597}
26598
26599#ifndef RIPPER
26600int
26601dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26602{
26603 struct vtable *vars, *args, *used;
26604 int i;
26605
26606 args = p->lvtbl->args;
26607 vars = p->lvtbl->vars;
26608 used = p->lvtbl->used;
26609
26610 while (!DVARS_TERMINAL_P(vars)) {
26611 if (vtable_included(args, id)) {
26612 return 1;
26613 }
26614 if ((i = vtable_included(vars, id)) != 0) {
26615 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26616 return 1;
26617 }
26618 args = args->prev;
26619 vars = vars->prev;
26620 if (!vidrefp) used = 0;
26621 if (used) used = used->prev;
26622 }
26623
26624 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26625 return rb_dvar_defined(id, p->parent_iseq);
26626 }
26627
26628 return 0;
26629}
26630#endif
26631
26632static int
26633dvar_defined(struct parser_params *p, ID id)
26634{
26635 return dvar_defined_ref(p, id, NULL);
26636}
26637
26638static int
26639dvar_curr(struct parser_params *p, ID id)
26640{
26641 return (vtable_included(p->lvtbl->args, id) ||
26642 vtable_included(p->lvtbl->vars, id));
26643}
26644
26645static void
26646reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26647{
26648 compile_error(p,
26649 "regexp encoding option '%c' differs from source encoding '%s'",
26650 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26651}
26652
26653#ifndef RIPPER
26654static rb_encoding *
26655find_enc(struct parser_params* p, const char *name)
26656{
26657 int idx = rb_enc_find_index(name);
26658 if (idx < 0) {
26659 rb_bug("unknown encoding name: %s", name);
26660 }
26661
26662 return rb_enc_from_index(idx);
26663}
26664
26665static rb_encoding *
26666kcode_to_enc(struct parser_params* p, int kcode)
26667{
26668 rb_encoding *enc;
26669
26670 switch (kcode) {
26671 case ENC_ASCII8BIT:
26672 enc = rb_ascii8bit_encoding();
26673 break;
26674 case ENC_EUC_JP:
26675 enc = find_enc(p, "EUC-JP");
26676 break;
26677 case ENC_Windows_31J:
26678 enc = find_enc(p, "Windows-31J");
26679 break;
26680 case ENC_UTF8:
26681 enc = rb_utf8_encoding();
26682 break;
26683 default:
26684 enc = NULL;
26685 break;
26686 }
26687
26688 return enc;
26689}
26690
26691int
26692rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26693{
26694 int c = RE_OPTION_ENCODING_IDX(options);
26695
26696 if (c) {
26697 int opt, idx;
26698 rb_encoding *enc;
26699
26700 char_to_option_kcode(c, &opt, &idx);
26701 enc = kcode_to_enc(p, idx);
26702 if (enc != rb_parser_str_get_encoding(str) &&
26703 !rb_parser_is_ascii_string(p, str)) {
26704 goto error;
26705 }
26706 rb_parser_string_set_encoding(str, enc);
26707 }
26708 else if (RE_OPTION_ENCODING_NONE(options)) {
26709 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26710 !rb_parser_is_ascii_string(p, str)) {
26711 c = 'n';
26712 goto error;
26713 }
26714 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26715 }
26716 else if (rb_is_usascii_enc(p->enc)) {
26717 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26718 }
26719 return 0;
26720
26721 error:
26722 return c;
26723}
26724#endif
26725
26726static void
26727reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26728{
26729 int c = rb_reg_fragment_setenc(p, str, options);
26730 if (c) reg_fragment_enc_error(p, str, c);
26731}
26732
26733#ifndef UNIVERSAL_PARSER
26734typedef struct {
26735 struct parser_params* parser;
26736 rb_encoding *enc;
26737 NODE *succ_block;
26738 const YYLTYPE *loc;
26739 rb_parser_assignable_func assignable;
26741
26742static int
26743reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26744 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26745{
26747 struct parser_params* p = arg->parser;
26748 rb_encoding *enc = arg->enc;
26749 long len = name_end - name;
26750 const char *s = (const char *)name;
26751
26752 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26753}
26754
26755static NODE *
26756reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26757{
26759
26760 arg.parser = p;
26761 arg.enc = rb_enc_get(regexp);
26762 arg.succ_block = 0;
26763 arg.loc = loc;
26764 arg.assignable = assignable;
26765 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26766
26767 if (!arg.succ_block) return 0;
26768 return RNODE_BLOCK(arg.succ_block)->nd_next;
26769}
26770#endif
26771
26772#ifndef RIPPER
26773NODE *
26774rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26775{
26776 return assignable(p, id, val, loc);
26777}
26778
26779int
26780rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26781 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26782{
26783 ID var;
26784 NODE *node, *succ;
26785
26786 if (!len) return ST_CONTINUE;
26787 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26788 return ST_CONTINUE;
26789
26790 var = intern_cstr(s, len, enc);
26791 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26792 if (!lvar_defined(p, var)) return ST_CONTINUE;
26793 }
26794 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26795 succ = *succ_block;
26796 if (!succ) succ = NEW_ERROR(loc);
26797 succ = block_append(p, succ, node);
26798 *succ_block = succ;
26799 return ST_CONTINUE;
26800}
26801#endif
26802
26803static VALUE
26804parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26805{
26806 VALUE str2;
26807 reg_fragment_setenc(p, str, options);
26808 str2 = rb_str_new_parser_string(str);
26809 return rb_parser_reg_compile(p, str2, options);
26810}
26811
26812#ifndef RIPPER
26813VALUE
26814rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26815{
26816 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26817}
26818#endif
26819
26820static VALUE
26821reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26822{
26823 VALUE re;
26824 VALUE err;
26825
26826 err = rb_errinfo();
26827 re = parser_reg_compile(p, str, options);
26828 if (NIL_P(re)) {
26829 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26830 rb_set_errinfo(err);
26831 compile_error(p, "%"PRIsVALUE, m);
26832 return Qnil;
26833 }
26834 return re;
26835}
26836
26837#ifndef RIPPER
26838void
26839rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26840{
26841 p->do_print = print;
26842 p->do_loop = loop;
26843 p->do_chomp = chomp;
26844 p->do_split = split;
26845}
26846
26847static NODE *
26848parser_append_options(struct parser_params *p, NODE *node)
26849{
26850 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26851 const YYLTYPE *const LOC = &default_location;
26852
26853 if (p->do_print) {
26854 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26855 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26856 LOC);
26857 node = block_append(p, node, print);
26858 }
26859
26860 if (p->do_loop) {
26861 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26862
26863 if (p->do_split) {
26864 ID ifs = rb_intern("$;");
26865 ID fields = rb_intern("$F");
26866 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26867 NODE *split = NEW_GASGN(fields,
26868 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26869 rb_intern("split"), args, LOC),
26870 LOC);
26871 node = block_append(p, split, node);
26872 }
26873 if (p->do_chomp) {
26874 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26875 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26876 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26877 }
26878
26879 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26880 }
26881
26882 return node;
26883}
26884
26885void
26886rb_init_parse(void)
26887{
26888 /* just to suppress unused-function warnings */
26889 (void)nodetype;
26890 (void)nodeline;
26891}
26892
26893ID
26894internal_id(struct parser_params *p)
26895{
26896 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26897}
26898#endif /* !RIPPER */
26899
26900static void
26901parser_initialize(struct parser_params *p)
26902{
26903 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26904 p->command_start = TRUE;
26905 p->ruby_sourcefile_string = Qnil;
26906 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26907 string_buffer_init(p);
26908 p->node_id = 0;
26909 p->delayed.token = NULL;
26910 p->frozen_string_literal = -1; /* not specified */
26911#ifndef RIPPER
26912 p->error_buffer = Qfalse;
26913 p->end_expect_token_locations = NULL;
26914 p->token_id = 0;
26915 p->tokens = NULL;
26916#else
26917 p->result = Qnil;
26918 p->parsing_thread = Qnil;
26919 p->s_value = Qnil;
26920 p->s_lvalue = Qnil;
26921 p->s_value_stack = rb_ary_new();
26922#endif
26923 p->debug_buffer = Qnil;
26924 p->debug_output = rb_ractor_stdout();
26925 p->enc = rb_utf8_encoding();
26926 p->exits = 0;
26927}
26928
26929#ifdef RIPPER
26930#define rb_ruby_parser_mark ripper_parser_mark
26931#define rb_ruby_parser_free ripper_parser_free
26932#define rb_ruby_parser_memsize ripper_parser_memsize
26933#endif
26934
26935void
26936rb_ruby_parser_mark(void *ptr)
26937{
26938 struct parser_params *p = (struct parser_params*)ptr;
26939
26940 rb_gc_mark(p->ruby_sourcefile_string);
26941#ifndef RIPPER
26942 rb_gc_mark(p->error_buffer);
26943#else
26944 rb_gc_mark(p->value);
26945 rb_gc_mark(p->result);
26946 rb_gc_mark(p->parsing_thread);
26947 rb_gc_mark(p->s_value);
26948 rb_gc_mark(p->s_lvalue);
26949 rb_gc_mark(p->s_value_stack);
26950#endif
26951 rb_gc_mark(p->debug_buffer);
26952 rb_gc_mark(p->debug_output);
26953}
26954
26955void
26956rb_ruby_parser_free(void *ptr)
26957{
26958 struct parser_params *p = (struct parser_params*)ptr;
26959 struct local_vars *local, *prev;
26960
26961 if (p->ast) {
26962 rb_ast_free(p->ast);
26963 }
26964
26965 if (p->warn_duplicate_keys_table) {
26966 st_free_table(p->warn_duplicate_keys_table);
26967 }
26968
26969#ifndef RIPPER
26970 if (p->tokens) {
26971 rb_parser_ary_free(p, p->tokens);
26972 }
26973#endif
26974
26975 if (p->tokenbuf) {
26976 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26977 }
26978
26979 for (local = p->lvtbl; local; local = prev) {
26980 prev = local->prev;
26981 local_free(p, local);
26982 }
26983
26984 {
26985 token_info *ptinfo;
26986 while ((ptinfo = p->token_info) != 0) {
26987 p->token_info = ptinfo->next;
26988 xfree(ptinfo);
26989 }
26990 }
26991 string_buffer_free(p);
26992
26993 if (p->pvtbl) {
26994 st_free_table(p->pvtbl);
26995 }
26996
26997 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26998 st_free_table(p->case_labels);
26999 }
27000
27001 xfree(p->lex.strterm);
27002 p->lex.strterm = 0;
27003
27004 xfree(ptr);
27005}
27006
27007size_t
27008rb_ruby_parser_memsize(const void *ptr)
27009{
27010 struct parser_params *p = (struct parser_params*)ptr;
27011 struct local_vars *local;
27012 size_t size = sizeof(*p);
27013
27014 size += p->toksiz;
27015 for (local = p->lvtbl; local; local = local->prev) {
27016 size += sizeof(*local);
27017 if (local->vars) size += local->vars->capa * sizeof(ID);
27018 }
27019 return size;
27020}
27021
27022#ifndef RIPPER
27023#undef rb_reserved_word
27024
27025const struct kwtable *
27026rb_reserved_word(const char *str, unsigned int len)
27027{
27028 return reserved_word(str, len);
27029}
27030
27031#ifdef UNIVERSAL_PARSER
27032rb_parser_t *
27033rb_ruby_parser_allocate(const rb_parser_config_t *config)
27034{
27035 /* parser_initialize expects fields to be set to 0 */
27036 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27037 p->config = config;
27038 return p;
27039}
27040
27041rb_parser_t *
27042rb_ruby_parser_new(const rb_parser_config_t *config)
27043{
27044 /* parser_initialize expects fields to be set to 0 */
27045 rb_parser_t *p = rb_ruby_parser_allocate(config);
27046 parser_initialize(p);
27047 return p;
27048}
27049#else
27050rb_parser_t *
27051rb_ruby_parser_allocate(void)
27052{
27053 /* parser_initialize expects fields to be set to 0 */
27054 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27055 return p;
27056}
27057
27058rb_parser_t *
27059rb_ruby_parser_new(void)
27060{
27061 /* parser_initialize expects fields to be set to 0 */
27062 rb_parser_t *p = rb_ruby_parser_allocate();
27063 parser_initialize(p);
27064 return p;
27065}
27066#endif
27067
27068rb_parser_t *
27069rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27070{
27071 p->error_buffer = main ? Qfalse : Qnil;
27072 p->parent_iseq = base;
27073 return p;
27074}
27075
27076void
27077rb_ruby_parser_set_script_lines(rb_parser_t *p)
27078{
27079 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27080}
27081
27082void
27083rb_ruby_parser_error_tolerant(rb_parser_t *p)
27084{
27085 p->error_tolerant = 1;
27086}
27087
27088void
27089rb_ruby_parser_keep_tokens(rb_parser_t *p)
27090{
27091 p->keep_tokens = 1;
27092 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27093}
27094
27095rb_encoding *
27096rb_ruby_parser_encoding(rb_parser_t *p)
27097{
27098 return p->enc;
27099}
27100
27101int
27102rb_ruby_parser_end_seen_p(rb_parser_t *p)
27103{
27104 return p->ruby__end__seen;
27105}
27106
27107int
27108rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27109{
27110 p->debug = flag;
27111 return flag;
27112}
27113#endif /* !RIPPER */
27114
27115#ifdef RIPPER
27116int
27117rb_ruby_parser_get_yydebug(rb_parser_t *p)
27118{
27119 return p->debug;
27120}
27121
27122void
27123rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27124{
27125 p->value = value;
27126}
27127
27128int
27129rb_ruby_parser_error_p(rb_parser_t *p)
27130{
27131 return p->error_p;
27132}
27133
27134VALUE
27135rb_ruby_parser_debug_output(rb_parser_t *p)
27136{
27137 return p->debug_output;
27138}
27139
27140void
27141rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27142{
27143 p->debug_output = output;
27144}
27145
27146VALUE
27147rb_ruby_parser_parsing_thread(rb_parser_t *p)
27148{
27149 return p->parsing_thread;
27150}
27151
27152void
27153rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27154{
27155 p->parsing_thread = parsing_thread;
27156}
27157
27158void
27159rb_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)
27160{
27161 p->lex.gets = gets;
27162 p->lex.input = input;
27163 p->eofp = 0;
27164 p->ruby_sourcefile_string = sourcefile_string;
27165 p->ruby_sourcefile = sourcefile;
27166 p->ruby_sourceline = sourceline;
27167}
27168
27169VALUE
27170rb_ruby_parser_result(rb_parser_t *p)
27171{
27172 return p->result;
27173}
27174
27175rb_encoding *
27176rb_ruby_parser_enc(rb_parser_t *p)
27177{
27178 return p->enc;
27179}
27180
27181VALUE
27182rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27183{
27184 return p->ruby_sourcefile_string;
27185}
27186
27187int
27188rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27189{
27190 return p->ruby_sourceline;
27191}
27192
27193int
27194rb_ruby_parser_lex_state(rb_parser_t *p)
27195{
27196 return p->lex.state;
27197}
27198
27199void
27200rb_ruby_ripper_parse0(rb_parser_t *p)
27201{
27202 parser_prepare(p);
27203 p->ast = rb_ast_new();
27204 ripper_yyparse((void*)p);
27205 rb_ast_free(p->ast);
27206 p->ast = 0;
27207 p->eval_tree = 0;
27208 p->eval_tree_begin = 0;
27209}
27210
27211int
27212rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27213{
27214 return dedent_string(p, string, width);
27215}
27216
27217int
27218rb_ruby_ripper_initialized_p(rb_parser_t *p)
27219{
27220 return p->lex.input != 0;
27221}
27222
27223void
27224rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27225{
27226 parser_initialize(p);
27227}
27228
27229long
27230rb_ruby_ripper_column(rb_parser_t *p)
27231{
27232 return p->lex.ptok - p->lex.pbeg;
27233}
27234
27235long
27236rb_ruby_ripper_token_len(rb_parser_t *p)
27237{
27238 return p->lex.pcur - p->lex.ptok;
27239}
27240
27241rb_parser_string_t *
27242rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27243{
27244 return p->lex.lastline;
27245}
27246
27247VALUE
27248rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27249{
27250 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27251}
27252
27253#ifdef UNIVERSAL_PARSER
27254rb_parser_t *
27255rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27256{
27257 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27258 p->config = config;
27259 return p;
27260}
27261#endif
27262
27263struct parser_params*
27264rb_ruby_ripper_parser_allocate(void)
27265{
27266 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27267}
27268#endif /* RIPPER */
27269
27270#ifndef RIPPER
27271void
27272rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27273{
27274 va_list ap;
27275 VALUE mesg = p->debug_buffer;
27276
27277 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27278 va_start(ap, fmt);
27279 rb_str_vcatf(mesg, fmt, ap);
27280 va_end(ap);
27281 if (char_at_end(p, mesg, 0) == '\n') {
27282 rb_io_write(p->debug_output, mesg);
27283 p->debug_buffer = Qnil;
27284 }
27285}
27286
27287static void
27288parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27289{
27290 va_list ap;
27291 int lineno, column;
27292
27293 if (loc) {
27294 lineno = loc->end_pos.lineno;
27295 column = loc->end_pos.column;
27296 }
27297 else {
27298 lineno = p->ruby_sourceline;
27299 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27300 }
27301
27302 rb_io_flush(p->debug_output);
27303 p->error_p = 1;
27304 va_start(ap, fmt);
27305 p->error_buffer =
27306 rb_syntax_error_append(p->error_buffer,
27307 p->ruby_sourcefile_string,
27308 lineno, column,
27309 p->enc, fmt, ap);
27310 va_end(ap);
27311}
27312
27313static size_t
27314count_char(const char *str, int c)
27315{
27316 int n = 0;
27317 while (str[n] == c) ++n;
27318 return n;
27319}
27320
27321/*
27322 * strip enclosing double-quotes, same as the default yytnamerr except
27323 * for that single-quotes matching back-quotes do not stop stripping.
27324 *
27325 * "\"`class' keyword\"" => "`class' keyword"
27326 */
27327size_t
27328rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27329{
27330 if (*yystr == '"') {
27331 size_t yyn = 0, bquote = 0;
27332 const char *yyp = yystr;
27333
27334 while (*++yyp) {
27335 switch (*yyp) {
27336 case '\'':
27337 if (!bquote) {
27338 bquote = count_char(yyp+1, '\'') + 1;
27339 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27340 yyn += bquote;
27341 yyp += bquote - 1;
27342 break;
27343 }
27344 else {
27345 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27346 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27347 yyn += bquote;
27348 yyp += bquote - 1;
27349 bquote = 0;
27350 break;
27351 }
27352 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27353 if (yyres) memcpy(yyres + yyn, yyp, 3);
27354 yyn += 3;
27355 yyp += 2;
27356 break;
27357 }
27358 goto do_not_strip_quotes;
27359 }
27360
27361 case ',':
27362 goto do_not_strip_quotes;
27363
27364 case '\\':
27365 if (*++yyp != '\\')
27366 goto do_not_strip_quotes;
27367 /* Fall through. */
27368 default:
27369 if (yyres)
27370 yyres[yyn] = *yyp;
27371 yyn++;
27372 break;
27373
27374 case '"':
27375 case '\0':
27376 if (yyres)
27377 yyres[yyn] = '\0';
27378 return yyn;
27379 }
27380 }
27381 do_not_strip_quotes: ;
27382 }
27383
27384 if (!yyres) return strlen(yystr);
27385
27386 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27387}
27388#endif
27389
27390#ifdef RIPPER
27391#define validate(x) (void)(x)
27392
27393static VALUE
27394ripper_dispatch0(struct parser_params *p, ID mid)
27395{
27396 return rb_funcall(p->value, mid, 0);
27397}
27398
27399static VALUE
27400ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27401{
27402 validate(a);
27403 return rb_funcall(p->value, mid, 1, a);
27404}
27405
27406static VALUE
27407ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27408{
27409 validate(a);
27410 validate(b);
27411 return rb_funcall(p->value, mid, 2, a, b);
27412}
27413
27414static VALUE
27415ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27416{
27417 validate(a);
27418 validate(b);
27419 validate(c);
27420 return rb_funcall(p->value, mid, 3, a, b, c);
27421}
27422
27423static VALUE
27424ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27425{
27426 validate(a);
27427 validate(b);
27428 validate(c);
27429 validate(d);
27430 return rb_funcall(p->value, mid, 4, a, b, c, d);
27431}
27432
27433static VALUE
27434ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27435{
27436 validate(a);
27437 validate(b);
27438 validate(c);
27439 validate(d);
27440 validate(e);
27441 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27442}
27443
27444static VALUE
27445ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27446{
27447 validate(a);
27448 validate(b);
27449 validate(c);
27450 validate(d);
27451 validate(e);
27452 validate(f);
27453 validate(g);
27454 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27455}
27456
27457void
27458ripper_error(struct parser_params *p)
27459{
27460 p->error_p = TRUE;
27461}
27462
27463VALUE
27464ripper_value(struct parser_params *p)
27465{
27466 (void)yystpcpy; /* may not used in newer bison */
27467
27468 return p->value;
27469}
27470
27471#endif /* RIPPER */
27472/*
27473 * Local variables:
27474 * mode: c
27475 * c-file-style: "ruby"
27476 * End:
27477 */
#define RUBY_ASSERT(...)
Asserts that the given expression is truthy if and only if RUBY_DEBUG is truthy.
Definition assert.h:219
#define ISSPACE
@old{rb_isspace}
Definition ctype.h:88
#define ISDIGIT
@old{rb_isdigit}
Definition ctype.h:93
#define STRCASECMP
@old{st_locale_insensitive_strcasecmp}
Definition ctype.h:102
#define ISALPHA
@old{rb_isalpha}
Definition ctype.h:92
#define STRNCASECMP
@old{st_locale_insensitive_strncasecmp}
Definition ctype.h:103
#define ISPRINT
@old{rb_isprint}
Definition ctype.h:86
#define ISXDIGIT
@old{rb_isxdigit}
Definition ctype.h:94
#define ISCNTRL
@old{rb_iscntrl}
Definition ctype.h:96
#define ISALNUM
@old{rb_isalnum}
Definition ctype.h:91
#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 ALLOC
Old name of RB_ALLOC.
Definition memory.h:400
#define xfree
Old name of ruby_xfree.
Definition xmalloc.h:58
#define xrealloc
Old name of ruby_xrealloc.
Definition xmalloc.h:56
#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 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 FIXNUM_MAX
Old name of RUBY_FIXNUM_MAX.
Definition fixnum.h:26
#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 xcalloc
Old name of ruby_xcalloc.
Definition xmalloc.h:55
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition eval.c:664
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:475
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1429
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1448
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2249
Encoding relates APIs.
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition string.c:831
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1117
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1499
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1533
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3567
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1693
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1657
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1515
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:943
int capa
Designed capacity of the buffer.
Definition io.h:11
char * ptr
Pointer to the underlying memory region, of at least capa bytes.
Definition io.h:2
int off
Offset inside of ptr.
Definition io.h:5
int len
Length of the buffer.
Definition io.h:8
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:223
#define strdup(s)
Just another name of ruby_strdup.
Definition util.h:187
#define rb_long2int
Just another name of rb_long2int_inline.
Definition long.h:62
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition memory.h:372
#define ALLOCA_N(type, n)
Definition memory.h:292
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition memory.h:360
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:167
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:384
VALUE type(ANYARGS)
ANYARGS-ed function type.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull)).
Definition nonnull.h:30
#define RREGEXP_PTR(obj)
Convenient accessor macro.
Definition rregexp.h:45
#define StringValueCStr(v)
Identical to StringValuePtr, except it additionally checks for the contents for viability as a C stri...
Definition rstring.h:89
#define errno
Ractor-aware version of errno.
Definition ruby.h:388
#define RTEST
This is an old name of RB_TEST.
Definition lex.c:33
Definition st.h:79
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40
#define RBIMPL_WARNING_IGNORED(flag)
Suppresses a warning.
#define RBIMPL_WARNING_PUSH()
Pushes compiler warning state.
#define RBIMPL_WARNING_POP()
Pops compiler warning state.