Ruby 4.0.6p0 (2026-07-14 revision 03b6d3f8898a28604fe6cb00eae3226b821168f4)
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, 6661, 6666,
3645 6671, 6678, 6684, 6689, 6702, 6702, 6702, 6703, 6706, 6707,
3646 6708, 6711, 6712, 6715, 6716, 6719, 6720, 6723, 6726, 6729,
3647 6732, 6733, 6736, 6744, 6751, 6752, 6756
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 if (RNODE_LIST(assocs)->nd_head) {
17765 NODE *n = RNODE_LIST(tail)->nd_next;
17766 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17767 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17768 /* DSTAR */
17769 tail = RNODE_HASH(n)->nd_head;
17770 }
17771 }
17772 if (tail) {
17773 assocs = list_concat(assocs, tail);
17774 }
17775 }
17776 (yyval.node) = assocs;
17777 /*% ripper: rb_ary_push($:1, $:3) %*/
17778 }
17779#line 17780 "parse.c"
17780 break;
17781
17782 case 788: /* assoc: arg_value "=>" arg_value */
17783#line 6662 "parse.y"
17784 {
17785 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17786 /*% ripper: assoc_new!($:1, $:3) %*/
17787 }
17788#line 17789 "parse.c"
17789 break;
17790
17791 case 789: /* assoc: "label" arg_value */
17792#line 6667 "parse.y"
17793 {
17794 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17795 /*% ripper: assoc_new!($:1, $:2) %*/
17796 }
17797#line 17798 "parse.c"
17798 break;
17799
17800 case 790: /* assoc: "label" */
17801#line 6672 "parse.y"
17802 {
17803 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17804 if (!val) val = NEW_ERROR(&(yyloc));
17805 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17806 /*% ripper: assoc_new!($:1, Qnil) %*/
17807 }
17808#line 17809 "parse.c"
17809 break;
17810
17811 case 791: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17812#line 6679 "parse.y"
17813 {
17814 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17815 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17816 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17817 }
17818#line 17819 "parse.c"
17819 break;
17820
17821 case 792: /* assoc: "**arg" arg_value */
17822#line 6685 "parse.y"
17823 {
17824 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17825 /*% ripper: assoc_splat!($:2) %*/
17826 }
17827#line 17828 "parse.c"
17828 break;
17829
17830 case 793: /* assoc: "**arg" */
17831#line 6690 "parse.y"
17832 {
17833 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17834 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17835 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17836 /*% ripper: assoc_splat!(Qnil) %*/
17837 }
17838#line 17839 "parse.c"
17839 break;
17840
17841 case 812: /* term: ';' */
17842#line 6737 "parse.y"
17843 {
17844 yyerrok;
17845 token_flush(p);
17846 if (p->ctxt.in_defined) {
17847 p->ctxt.has_trailing_semicolon = 1;
17848 }
17849 }
17850#line 17851 "parse.c"
17851 break;
17852
17853 case 813: /* term: '\n' */
17854#line 6745 "parse.y"
17855 {
17856 (yyloc).end_pos = (yyloc).beg_pos;
17857 token_flush(p);
17858 }
17859#line 17860 "parse.c"
17860 break;
17861
17862 case 815: /* terms: terms ';' */
17863#line 6752 "parse.y"
17864 {yyerrok;}
17865#line 17866 "parse.c"
17866 break;
17867
17868 case 816: /* none: %empty */
17869#line 6756 "parse.y"
17870 {
17871 (yyval.node) = 0;
17872 /*% ripper: Qnil %*/
17873 }
17874#line 17875 "parse.c"
17875 break;
17876
17877
17878#line 17879 "parse.c"
17879
17880 default: break;
17881 }
17882 /* User semantic actions sometimes alter yychar, and that requires
17883 that yytoken be updated with the new translation. We take the
17884 approach of translating immediately before every use of yytoken.
17885 One alternative is translating here after every semantic action,
17886 but that translation would be missed if the semantic action invokes
17887 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17888 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17889 incorrect destructor might then be invoked immediately. In the
17890 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17891 to an incorrect destructor call or verbose syntax error message
17892 before the lookahead is translated. */
17893 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17894
17895 YYPOPSTACK (yylen);
17896 /* %after-reduce function. */
17897#line 2667 "parse.y"
17898 {after_reduce(yylen, p);}
17899#line 17900 "parse.c"
17900
17901 yylen = 0;
17902
17903 *++yyvsp = yyval;
17904 *++yylsp = yyloc;
17905
17906 /* Now 'shift' the result of the reduction. Determine what state
17907 that goes to, based on the state we popped back to and the rule
17908 number reduced by. */
17909 {
17910 const int yylhs = yyr1[yyn] - YYNTOKENS;
17911 const int yyi = yypgoto[yylhs] + *yyssp;
17912 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17913 ? yytable[yyi]
17914 : yydefgoto[yylhs]);
17915 }
17916
17917 goto yynewstate;
17918
17919
17920/*--------------------------------------.
17921| yyerrlab -- here on detecting error. |
17922`--------------------------------------*/
17923yyerrlab:
17924 /* Make sure we have latest lookahead translation. See comments at
17925 user semantic actions for why this is necessary. */
17926 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17927 /* If not already recovering from an error, report this error. */
17928 if (!yyerrstatus)
17929 {
17930 ++yynerrs;
17931 {
17932 yypcontext_t yyctx
17933 = {yyssp, yytoken, &yylloc};
17934 char const *yymsgp = YY_("syntax error");
17935 int yysyntax_error_status;
17936 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17937 if (yysyntax_error_status == 0)
17938 yymsgp = yymsg;
17939 else if (yysyntax_error_status == -1)
17940 {
17941 if (yymsg != yymsgbuf)
17942 YYSTACK_FREE (yymsg);
17943 yymsg = YY_CAST (char *,
17944 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17945 if (yymsg)
17946 {
17947 yysyntax_error_status
17948 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17949 yymsgp = yymsg;
17950 }
17951 else
17952 {
17953 yymsg = yymsgbuf;
17954 yymsg_alloc = sizeof yymsgbuf;
17955 yysyntax_error_status = YYENOMEM;
17956 }
17957 }
17958 yyerror (&yylloc, p, yymsgp);
17959 if (yysyntax_error_status == YYENOMEM)
17960 YYNOMEM;
17961 }
17962 }
17963
17964 yyerror_range[1] = yylloc;
17965 if (yyerrstatus == 3)
17966 {
17967 /* If just tried and failed to reuse lookahead token after an
17968 error, discard it. */
17969
17970 if (yychar <= END_OF_INPUT)
17971 {
17972 /* Return failure if at end of input. */
17973 if (yychar == END_OF_INPUT)
17974 YYABORT;
17975 }
17976 else
17977 {
17978 yydestruct ("Error: discarding",
17979 yytoken, &yylval, &yylloc, p);
17980 yychar = YYEMPTY;
17981 }
17982 }
17983
17984 /* Else will try to reuse lookahead token after shifting the error
17985 token. */
17986 goto yyerrlab1;
17987
17988
17989/*---------------------------------------------------.
17990| yyerrorlab -- error raised explicitly by YYERROR. |
17991`---------------------------------------------------*/
17992yyerrorlab:
17993 /* Pacify compilers when the user code never invokes YYERROR and the
17994 label yyerrorlab therefore never appears in user code. */
17995 if (0)
17996 YYERROR;
17997 ++yynerrs;
17998
17999 /* Do not reclaim the symbols of the rule whose action triggered
18000 this YYERROR. */
18001 YYPOPSTACK (yylen);
18002 /* %after-pop-stack function. */
18003#line 2669 "parse.y"
18004 {after_pop_stack(yylen, p);}
18005#line 18006 "parse.c"
18006
18007 yylen = 0;
18008 YY_STACK_PRINT (yyss, yyssp, p);
18009 yystate = *yyssp;
18010 goto yyerrlab1;
18011
18012
18013/*-------------------------------------------------------------.
18014| yyerrlab1 -- common code for both syntax error and YYERROR. |
18015`-------------------------------------------------------------*/
18016yyerrlab1:
18017 yyerrstatus = 3; /* Each real token shifted decrements this. */
18018
18019 /* Pop stack until we find a state that shifts the error token. */
18020 for (;;)
18021 {
18022 yyn = yypact[yystate];
18023 if (!yypact_value_is_default (yyn))
18024 {
18025 yyn += YYSYMBOL_YYerror;
18026 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18027 {
18028 yyn = yytable[yyn];
18029 if (0 < yyn)
18030 break;
18031 }
18032 }
18033
18034 /* Pop the current state because it cannot handle the error token. */
18035 if (yyssp == yyss)
18036 YYABORT;
18037
18038 yyerror_range[1] = *yylsp;
18039 yydestruct ("Error: popping",
18040 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18041 YYPOPSTACK (1);
18042 /* %after-pop-stack function. */
18043#line 2669 "parse.y"
18044 {after_pop_stack(1, p);}
18045#line 18046 "parse.c"
18046
18047 yystate = *yyssp;
18048 YY_STACK_PRINT (yyss, yyssp, p);
18049 }
18050
18051 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18052 *++yyvsp = yylval;
18053 YY_IGNORE_MAYBE_UNINITIALIZED_END
18054
18055 yyerror_range[2] = yylloc;
18056 ++yylsp;
18057 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18058
18059 /* Shift the error token. */
18060 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18061 /* %after-shift-error-token code. */
18062#line 2668 "parse.y"
18063 {after_shift_error_token(p);}
18064#line 18065 "parse.c"
18065
18066
18067 yystate = yyn;
18068 goto yynewstate;
18069
18070
18071/*-------------------------------------.
18072| yyacceptlab -- YYACCEPT comes here. |
18073`-------------------------------------*/
18074yyacceptlab:
18075 yyresult = 0;
18076 goto yyreturnlab;
18077
18078
18079/*-----------------------------------.
18080| yyabortlab -- YYABORT comes here. |
18081`-----------------------------------*/
18082yyabortlab:
18083 yyresult = 1;
18084 goto yyreturnlab;
18085
18086
18087/*-----------------------------------------------------------.
18088| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18089`-----------------------------------------------------------*/
18090yyexhaustedlab:
18091 yyerror (&yylloc, p, YY_("memory exhausted"));
18092 yyresult = 2;
18093 goto yyreturnlab;
18094
18095
18096/*----------------------------------------------------------.
18097| yyreturnlab -- parsing is finished, clean up and return. |
18098`----------------------------------------------------------*/
18099yyreturnlab:
18100 if (yychar != YYEMPTY)
18101 {
18102 /* Make sure we have latest lookahead translation. See comments at
18103 user semantic actions for why this is necessary. */
18104 yytoken = YYTRANSLATE (yychar);
18105 yydestruct ("Cleanup: discarding lookahead",
18106 yytoken, &yylval, &yylloc, p);
18107 }
18108 /* Do not reclaim the symbols of the rule whose action triggered
18109 this YYABORT or YYACCEPT. */
18110 YYPOPSTACK (yylen);
18111 YY_STACK_PRINT (yyss, yyssp, p);
18112 while (yyssp != yyss)
18113 {
18114 yydestruct ("Cleanup: popping",
18115 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18116 YYPOPSTACK (1);
18117 }
18118#ifndef yyoverflow
18119 if (yyss != yyssa)
18120 YYSTACK_FREE (yyss);
18121#endif
18122 if (yymsg != yymsgbuf)
18123 YYSTACK_FREE (yymsg);
18124 return yyresult;
18125}
18126
18127#line 6761 "parse.y"
18128
18129# undef p
18130# undef yylex
18131# undef yylval
18132# define yylval (*p->lval)
18133
18134static int regx_options(struct parser_params*);
18135static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18136static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18137static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18138static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18139
18140#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18141
18142# define set_yylval_node(x) { \
18143 YYLTYPE _cur_loc; \
18144 rb_parser_set_location(p, &_cur_loc); \
18145 yylval.node = (x); \
18146 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18147}
18148# define set_yylval_str(x) \
18149do { \
18150 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18151 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18152} while(0)
18153# define set_yylval_num(x) { \
18154 yylval.num = (x); \
18155 set_parser_s_value(x); \
18156}
18157# define set_yylval_id(x) (yylval.id = (x))
18158# define set_yylval_name(x) { \
18159 (yylval.id = (x)); \
18160 set_parser_s_value(ID2SYM(x)); \
18161}
18162# define yylval_id() (yylval.id)
18163
18164#define set_yylval_noname() set_yylval_id(keyword_nil)
18165#define has_delayed_token(p) (p->delayed.token != NULL)
18166
18167#ifndef RIPPER
18168#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18169#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18170
18171static bool
18172parser_has_token(struct parser_params *p)
18173{
18174 const char *const pcur = p->lex.pcur;
18175 const char *const ptok = p->lex.ptok;
18176 if (p->keep_tokens && (pcur < ptok)) {
18177 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18178 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18179 }
18180 return pcur > ptok;
18181}
18182
18183static const char *
18184escaped_char(int c)
18185{
18186 switch (c) {
18187 case '"': return "\\\"";
18188 case '\\': return "\\\\";
18189 case '\0': return "\\0";
18190 case '\n': return "\\n";
18191 case '\r': return "\\r";
18192 case '\t': return "\\t";
18193 case '\f': return "\\f";
18194 case '\013': return "\\v";
18195 case '\010': return "\\b";
18196 case '\007': return "\\a";
18197 case '\033': return "\\e";
18198 case '\x7f': return "\\c?";
18199 }
18200 return NULL;
18201}
18202
18203static rb_parser_string_t *
18204rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18205{
18206 rb_encoding *enc = p->enc;
18207 const char *ptr = str->ptr;
18208 const char *pend = ptr + str->len;
18209 const char *prev = ptr;
18210 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18211 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18212
18213 while (ptr < pend) {
18214 unsigned int c;
18215 const char *cc;
18216 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18217 if (!MBCLEN_CHARFOUND_P(n)) {
18218 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18219 n = rb_enc_mbminlen(enc);
18220 if (pend < ptr + n)
18221 n = (int)(pend - ptr);
18222 while (n--) {
18223 c = *ptr & 0xf0 >> 4;
18224 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18225 c = *ptr & 0x0f;
18226 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18227 parser_str_cat(result, charbuf, 4);
18228 prev = ++ptr;
18229 }
18230 continue;
18231 }
18232 n = MBCLEN_CHARFOUND_LEN(n);
18233 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18234 ptr += n;
18235 cc = escaped_char(c);
18236 if (cc) {
18237 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18238 parser_str_cat_cstr(result, cc);
18239 prev = ptr;
18240 }
18241 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18242 }
18243 else {
18244 if (ptr - n > prev) {
18245 parser_str_cat(result, prev, ptr - n - prev);
18246 prev = ptr - n;
18247 }
18248 parser_str_cat(result, prev, ptr - prev);
18249 prev = ptr;
18250 }
18251 }
18252 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18253
18254 return result;
18255}
18256
18257static void
18258parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18259{
18260 rb_parser_ast_token_t *token = xcalloc(1, sizeof(rb_parser_ast_token_t));
18261 token->id = p->token_id;
18262 token->type_name = parser_token2char(p, t);
18263 token->str = str;
18264 token->loc.beg_pos = p->yylloc->beg_pos;
18265 token->loc.end_pos = p->yylloc->end_pos;
18266 rb_parser_ary_push_ast_token(p, p->tokens, token);
18267 p->token_id++;
18268
18269 if (p->debug) {
18270 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18271 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18272 line, token->id, token->type_name, str_escaped->ptr,
18273 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18274 token->loc.end_pos.lineno, token->loc.end_pos.column);
18275 rb_parser_string_free(p, str_escaped);
18276 }
18277}
18278
18279static void
18280parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18281{
18282 debug_token_line(p, "parser_dispatch_scan_event", line);
18283
18284 if (!parser_has_token(p)) return;
18285
18286 RUBY_SET_YYLLOC(*p->yylloc);
18287
18288 if (p->keep_tokens) {
18289 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18290 parser_append_tokens(p, str, t, line);
18291 }
18292
18293 token_flush(p);
18294}
18295
18296#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18297static void
18298parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18299{
18300 debug_token_line(p, "parser_dispatch_delayed_token", line);
18301
18302 if (!has_delayed_token(p)) return;
18303
18304 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18305
18306 if (p->keep_tokens) {
18307 /* p->delayed.token is freed by rb_parser_tokens_free */
18308 parser_append_tokens(p, p->delayed.token, t, line);
18309 }
18310 else {
18311 rb_parser_string_free(p, p->delayed.token);
18312 }
18313
18314 p->delayed.token = NULL;
18315}
18316#else
18317#define literal_flush(p, ptr) ((void)(ptr))
18318
18319static int
18320ripper_has_scan_event(struct parser_params *p)
18321{
18322 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18323 return p->lex.pcur > p->lex.ptok;
18324}
18325
18326static VALUE
18327ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18328{
18329 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18330 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18331 RUBY_SET_YYLLOC(*p->yylloc);
18332 token_flush(p);
18333 return rval;
18334}
18335
18336static void
18337ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18338{
18339 if (!ripper_has_scan_event(p)) return;
18340
18341 set_parser_s_value(ripper_scan_event_val(p, t));
18342}
18343#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18344
18345static void
18346ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18347{
18348 /* save and adjust the location to delayed token for callbacks */
18349 int saved_line = p->ruby_sourceline;
18350 const char *saved_tokp = p->lex.ptok;
18351 VALUE s_value, str;
18352
18353 if (!has_delayed_token(p)) return;
18354 p->ruby_sourceline = p->delayed.beg_line;
18355 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18356 str = rb_str_new_mutable_parser_string(p->delayed.token);
18357 rb_parser_string_free(p, p->delayed.token);
18358 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18359 set_parser_s_value(s_value);
18360 p->delayed.token = NULL;
18361 p->ruby_sourceline = saved_line;
18362 p->lex.ptok = saved_tokp;
18363}
18364#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18365#endif /* RIPPER */
18366
18367static inline int
18368is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18369{
18370 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18371}
18372
18373static inline bool
18374peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18375{
18376 const char *ptr = p->lex.pcur + at;
18377 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18378 if (memcmp(ptr, str, len)) return false;
18379 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18380 switch (ptr[len]) {
18381 case '!': case '?': return false;
18382 }
18383 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18384}
18385
18386static inline int
18387parser_is_identchar(struct parser_params *p)
18388{
18389 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18390}
18391
18392static inline int
18393parser_isascii(struct parser_params *p)
18394{
18395 return ISASCII(*(p->lex.pcur-1));
18396}
18397
18398static void
18399token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18400{
18401 int column = 1, nonspc = 0, i;
18402 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18403 if (*ptr == '\t') {
18404 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18405 }
18406 column++;
18407 if (*ptr != ' ' && *ptr != '\t') {
18408 nonspc = 1;
18409 }
18410 }
18411
18412 ptinfo->beg = loc->beg_pos;
18413 ptinfo->indent = column;
18414 ptinfo->nonspc = nonspc;
18415}
18416
18417static void
18418token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18419{
18420 token_info *ptinfo;
18421
18422 if (!p->token_info_enabled) return;
18423 ptinfo = ALLOC(token_info);
18424 ptinfo->token = token;
18425 ptinfo->next = p->token_info;
18426 token_info_setup(ptinfo, p->lex.pbeg, loc);
18427
18428 p->token_info = ptinfo;
18429}
18430
18431static void
18432token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18433{
18434 token_info *ptinfo_beg = p->token_info;
18435
18436 if (!ptinfo_beg) return;
18437
18438 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18439 token_info_warn(p, token, ptinfo_beg, 1, loc);
18440
18441 p->token_info = ptinfo_beg->next;
18442 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18443}
18444
18445static void
18446token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18447{
18448 token_info *ptinfo_beg = p->token_info;
18449
18450 if (!ptinfo_beg) return;
18451 p->token_info = ptinfo_beg->next;
18452
18453 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18454 ptinfo_beg->beg.column != beg_pos.column ||
18455 strcmp(ptinfo_beg->token, token)) {
18456 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18457 beg_pos.lineno, beg_pos.column, token,
18458 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18459 ptinfo_beg->token);
18460 }
18461
18462 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18463}
18464
18465static void
18466token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18467{
18468 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18469 if (!p->token_info_enabled) return;
18470 if (!ptinfo_beg) return;
18471 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18472 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18473 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18474 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18475 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18476 rb_warn3L(ptinfo_end->beg.lineno,
18477 "mismatched indentations at '%s' with '%s' at %d",
18478 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18479}
18480
18481static int
18482parser_precise_mbclen(struct parser_params *p, const char *ptr)
18483{
18484 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18485 if (!MBCLEN_CHARFOUND_P(len)) {
18486 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18487 return -1;
18488 }
18489 return len;
18490}
18491
18492#ifndef RIPPER
18493static inline void
18494parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18495{
18496 rb_parser_string_t *str;
18497 int lineno = p->ruby_sourceline;
18498 if (!yylloc) {
18499 return;
18500 }
18501 else if (yylloc->beg_pos.lineno == lineno) {
18502 str = p->lex.lastline;
18503 }
18504 else {
18505 return;
18506 }
18507 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18508}
18509
18510static int
18511parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18512{
18513#if 0
18514 YYLTYPE current;
18515
18516 if (!yylloc) {
18517 yylloc = RUBY_SET_YYLLOC(current);
18518 }
18519 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18520 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18521 yylloc = 0;
18522 }
18523#endif
18524 parser_compile_error(p, yylloc, "%s", msg);
18525 parser_show_error_line(p, yylloc);
18526 return 0;
18527}
18528
18529static int
18530parser_yyerror0(struct parser_params *p, const char *msg)
18531{
18532 YYLTYPE current;
18533 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18534}
18535
18536void
18537ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18538{
18539 VALUE mesg;
18540 const int max_line_margin = 30;
18541 const char *ptr, *ptr_end, *pt, *pb;
18542 const char *pre = "", *post = "", *pend;
18543 const char *code = "", *caret = "";
18544 const char *lim;
18545 const char *const pbeg = PARSER_STRING_PTR(str);
18546 char *buf;
18547 long len;
18548 int i;
18549
18550 if (!yylloc) return;
18551 pend = rb_parser_string_end(str);
18552 if (pend > pbeg && pend[-1] == '\n') {
18553 if (--pend > pbeg && pend[-1] == '\r') --pend;
18554 }
18555
18556 pt = pend;
18557 if (lineno == yylloc->end_pos.lineno &&
18558 (pend - pbeg) > yylloc->end_pos.column) {
18559 pt = pbeg + yylloc->end_pos.column;
18560 }
18561
18562 ptr = ptr_end = pt;
18563 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18564 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18565
18566 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18567 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18568
18569 len = ptr_end - ptr;
18570 if (len > 4) {
18571 if (ptr > pbeg) {
18572 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18573 if (ptr > pbeg) pre = "...";
18574 }
18575 if (ptr_end < pend) {
18576 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18577 if (ptr_end < pend) post = "...";
18578 }
18579 }
18580 pb = pbeg;
18581 if (lineno == yylloc->beg_pos.lineno) {
18582 pb += yylloc->beg_pos.column;
18583 if (pb > pt) pb = pt;
18584 }
18585 if (pb < ptr) pb = ptr;
18586 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18587 return;
18588 }
18589 if (RTEST(errbuf)) {
18590 mesg = rb_attr_get(errbuf, idMesg);
18591 if (char_at_end(p, mesg, '\n') != '\n')
18592 rb_str_cat_cstr(mesg, "\n");
18593 }
18594 else {
18595 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18596 }
18597 if (!errbuf && rb_stderr_tty_p()) {
18598#define CSI_BEGIN "\033["
18599#define CSI_SGR "m"
18600 rb_str_catf(mesg,
18601 CSI_BEGIN""CSI_SGR"%s" /* pre */
18602 CSI_BEGIN"1"CSI_SGR"%.*s"
18603 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18604 CSI_BEGIN";1"CSI_SGR"%.*s"
18605 CSI_BEGIN""CSI_SGR"%s" /* post */
18606 "\n",
18607 pre,
18608 (int)(pb - ptr), ptr,
18609 (int)(pt - pb), pb,
18610 (int)(ptr_end - pt), pt,
18611 post);
18612 }
18613 else {
18614 char *p2;
18615
18616 len = ptr_end - ptr;
18617 lim = pt < pend ? pt : pend;
18618 i = (int)(lim - ptr);
18619 buf = ALLOCA_N(char, i+2);
18620 code = ptr;
18621 caret = p2 = buf;
18622 if (ptr <= pb) {
18623 while (ptr < pb) {
18624 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18625 }
18626 *p2++ = '^';
18627 ptr++;
18628 }
18629 if (lim > ptr) {
18630 memset(p2, '~', (lim - ptr));
18631 p2 += (lim - ptr);
18632 }
18633 *p2 = '\0';
18634 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18635 pre, (int)len, code, post,
18636 pre, caret);
18637 }
18638 if (!errbuf) rb_write_error_str(mesg);
18639}
18640#else
18641
18642static int
18643parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18644{
18645 const char *pcur = 0, *ptok = 0;
18646 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18647 p->ruby_sourceline == yylloc->end_pos.lineno) {
18648 pcur = p->lex.pcur;
18649 ptok = p->lex.ptok;
18650 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18651 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18652 }
18653 parser_yyerror0(p, msg);
18654 if (pcur) {
18655 p->lex.ptok = ptok;
18656 p->lex.pcur = pcur;
18657 }
18658 return 0;
18659}
18660
18661static int
18662parser_yyerror0(struct parser_params *p, const char *msg)
18663{
18664 dispatch1(parse_error, STR_NEW2(msg));
18665 ripper_error(p);
18666 return 0;
18667}
18668
18669static inline void
18670parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18671{
18672}
18673#endif /* !RIPPER */
18674
18675static int
18676vtable_size(const struct vtable *tbl)
18677{
18678 if (!DVARS_TERMINAL_P(tbl)) {
18679 return tbl->pos;
18680 }
18681 else {
18682 return 0;
18683 }
18684}
18685
18686static struct vtable *
18687vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18688{
18689 struct vtable *tbl = ALLOC(struct vtable);
18690 tbl->pos = 0;
18691 tbl->capa = 8;
18692 tbl->tbl = ALLOC_N(ID, tbl->capa);
18693 tbl->prev = prev;
18694#ifndef RIPPER
18695 if (p->debug) {
18696 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18697 }
18698#endif
18699 return tbl;
18700}
18701#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18702
18703static void
18704vtable_free_gen(struct parser_params *p, int line, const char *name,
18705 struct vtable *tbl)
18706{
18707#ifndef RIPPER
18708 if (p->debug) {
18709 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18710 }
18711#endif
18712 if (!DVARS_TERMINAL_P(tbl)) {
18713 if (tbl->tbl) {
18714 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18715 }
18716 ruby_sized_xfree(tbl, sizeof(*tbl));
18717 }
18718}
18719#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18720
18721static void
18722vtable_add_gen(struct parser_params *p, int line, const char *name,
18723 struct vtable *tbl, ID id)
18724{
18725#ifndef RIPPER
18726 if (p->debug) {
18727 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18728 line, name, (void *)tbl, rb_id2name(id));
18729 }
18730#endif
18731 if (DVARS_TERMINAL_P(tbl)) {
18732 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18733 return;
18734 }
18735 if (tbl->pos == tbl->capa) {
18736 tbl->capa = tbl->capa * 2;
18737 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18738 }
18739 tbl->tbl[tbl->pos++] = id;
18740}
18741#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18742
18743static void
18744vtable_pop_gen(struct parser_params *p, int line, const char *name,
18745 struct vtable *tbl, int n)
18746{
18747 if (p->debug) {
18748 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18749 line, name, (void *)tbl, n);
18750 }
18751 if (tbl->pos < n) {
18752 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18753 return;
18754 }
18755 tbl->pos -= n;
18756}
18757#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18758
18759static int
18760vtable_included(const struct vtable * tbl, ID id)
18761{
18762 int i;
18763
18764 if (!DVARS_TERMINAL_P(tbl)) {
18765 for (i = 0; i < tbl->pos; i++) {
18766 if (tbl->tbl[i] == id) {
18767 return i+1;
18768 }
18769 }
18770 }
18771 return 0;
18772}
18773
18774static void parser_prepare(struct parser_params *p);
18775
18776static int
18777e_option_supplied(struct parser_params *p)
18778{
18779 return strcmp(p->ruby_sourcefile, "-e") == 0;
18780}
18781
18782#ifndef RIPPER
18783static NODE *parser_append_options(struct parser_params *p, NODE *node);
18784
18785static VALUE
18786yycompile0(VALUE arg)
18787{
18788 int n;
18789 NODE *tree;
18790 struct parser_params *p = (struct parser_params *)arg;
18791 int cov = FALSE;
18792
18793 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18794 cov = TRUE;
18795 }
18796
18797 if (p->debug_lines) {
18798 p->ast->body.script_lines = p->debug_lines;
18799 }
18800
18801 parser_prepare(p);
18802#define RUBY_DTRACE_PARSE_HOOK(name) \
18803 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18804 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18805 }
18806 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18807 n = yyparse(p);
18808 RUBY_DTRACE_PARSE_HOOK(END);
18809
18810 p->debug_lines = 0;
18811
18812 xfree(p->lex.strterm);
18813 p->lex.strterm = 0;
18814 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18815 if (n || p->error_p) {
18816 VALUE mesg = p->error_buffer;
18817 if (!mesg) {
18818 mesg = syntax_error_new();
18819 }
18820 if (!p->error_tolerant) {
18821 rb_set_errinfo(mesg);
18822 return FALSE;
18823 }
18824 }
18825 tree = p->eval_tree;
18826 if (!tree) {
18827 tree = NEW_NIL(&NULL_LOC);
18828 }
18829 else {
18830 rb_parser_ary_t *tokens = p->tokens;
18831 NODE *prelude;
18832 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18833 prelude = block_append(p, p->eval_tree_begin, body);
18834 RNODE_SCOPE(tree)->nd_body = prelude;
18835 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18836 p->ast->body.coverage_enabled = cov;
18837 if (p->keep_tokens) {
18838 p->ast->node_buffer->tokens = tokens;
18839 p->tokens = NULL;
18840 }
18841 }
18842 p->ast->body.root = tree;
18843 p->ast->body.line_count = p->line_count;
18844 return TRUE;
18845}
18846
18847static rb_ast_t *
18848yycompile(struct parser_params *p, VALUE fname, int line)
18849{
18850 rb_ast_t *ast;
18851 if (NIL_P(fname)) {
18852 p->ruby_sourcefile_string = Qnil;
18853 p->ruby_sourcefile = "(none)";
18854 }
18855 else {
18856 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18857 p->ruby_sourcefile = StringValueCStr(fname);
18858 }
18859 p->ruby_sourceline = line - 1;
18860
18861 p->lvtbl = NULL;
18862
18863 p->ast = ast = rb_ast_new();
18864 compile_callback(yycompile0, (VALUE)p);
18865 p->ast = 0;
18866
18867 while (p->lvtbl) {
18868 local_pop(p);
18869 }
18870
18871 return ast;
18872}
18873#endif /* !RIPPER */
18874
18875static rb_encoding *
18876must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18877{
18878 rb_encoding *enc = rb_parser_str_get_encoding(s);
18879 if (!rb_enc_asciicompat(enc)) {
18880 rb_raise(rb_eArgError, "invalid source encoding");
18881 }
18882 return enc;
18883}
18884
18885static rb_parser_string_t *
18886lex_getline(struct parser_params *p)
18887{
18888 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18889 if (!line) return 0;
18890 p->line_count++;
18891 string_buffer_append(p, line);
18892 must_be_ascii_compatible(p, line);
18893 return line;
18894}
18895
18896#ifndef RIPPER
18897rb_ast_t*
18898rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18899{
18900 p->lex.gets = gets;
18901 p->lex.input = input;
18902 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18903
18904 return yycompile(p, fname, line);
18905}
18906#endif /* !RIPPER */
18907
18908#define STR_FUNC_ESCAPE 0x01
18909#define STR_FUNC_EXPAND 0x02
18910#define STR_FUNC_REGEXP 0x04
18911#define STR_FUNC_QWORDS 0x08
18912#define STR_FUNC_SYMBOL 0x10
18913#define STR_FUNC_INDENT 0x20
18914#define STR_FUNC_LABEL 0x40
18915#define STR_FUNC_LIST 0x4000
18916#define STR_FUNC_TERM 0x8000
18917
18918enum string_type {
18919 str_label = STR_FUNC_LABEL,
18920 str_squote = (0),
18921 str_dquote = (STR_FUNC_EXPAND),
18922 str_xquote = (STR_FUNC_EXPAND),
18923 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18924 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18925 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18926 str_ssym = (STR_FUNC_SYMBOL),
18927 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18928};
18929
18930static rb_parser_string_t *
18931parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18932{
18933 rb_parser_string_t *pstr;
18934
18935 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18936
18937 if (!(func & STR_FUNC_REGEXP)) {
18938 if (rb_parser_is_ascii_string(p, pstr)) {
18939 }
18940 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18941 /* everything is valid in ASCII-8BIT */
18942 enc = rb_ascii8bit_encoding();
18943 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18944 }
18945 }
18946
18947 return pstr;
18948}
18949
18950static int
18951strterm_is_heredoc(rb_strterm_t *strterm)
18952{
18953 return strterm->heredoc;
18954}
18955
18956static rb_strterm_t *
18957new_strterm(struct parser_params *p, int func, int term, int paren)
18958{
18959 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18960 strterm->u.literal.func = func;
18961 strterm->u.literal.term = term;
18962 strterm->u.literal.paren = paren;
18963 return strterm;
18964}
18965
18966static rb_strterm_t *
18967new_heredoc(struct parser_params *p)
18968{
18969 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18970 strterm->heredoc = true;
18971 return strterm;
18972}
18973
18974#define peek(p,c) peek_n(p, (c), 0)
18975#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18976#define peekc(p) peekc_n(p, 0)
18977#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18978
18979#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18980static void
18981parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18982{
18983 debug_token_line(p, "add_delayed_token", line);
18984
18985 if (tok < end) {
18986 if (has_delayed_token(p)) {
18987 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18988 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18989 int end_col = (next_line ? 0 : p->delayed.end_col);
18990 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18991 dispatch_delayed_token(p, tSTRING_CONTENT);
18992 }
18993 }
18994 if (!has_delayed_token(p)) {
18995 p->delayed.token = rb_parser_string_new(p, 0, 0);
18996 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18997 p->delayed.beg_line = p->ruby_sourceline;
18998 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18999 }
19000 parser_str_cat(p->delayed.token, tok, end - tok);
19001 p->delayed.end_line = p->ruby_sourceline;
19002 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19003 p->lex.ptok = end;
19004 }
19005}
19006
19007static void
19008set_lastline(struct parser_params *p, rb_parser_string_t *str)
19009{
19010 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19011 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19012 p->lex.lastline = str;
19013}
19014
19015static int
19016nextline(struct parser_params *p, int set_encoding)
19017{
19018 rb_parser_string_t *str = p->lex.nextline;
19019 p->lex.nextline = 0;
19020 if (!str) {
19021 if (p->eofp)
19022 return -1;
19023
19024 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19025 goto end_of_input;
19026 }
19027
19028 if (!p->lex.input || !(str = lex_getline(p))) {
19029 end_of_input:
19030 p->eofp = 1;
19031 lex_goto_eol(p);
19032 return -1;
19033 }
19034#ifndef RIPPER
19035 if (p->debug_lines) {
19036 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19037 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19038 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19039 }
19040#endif
19041 p->cr_seen = FALSE;
19042 }
19043 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19044 /* after here-document without terminator */
19045 goto end_of_input;
19046 }
19047 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19048 if (p->heredoc_end > 0) {
19049 p->ruby_sourceline = p->heredoc_end;
19050 p->heredoc_end = 0;
19051 }
19052 p->ruby_sourceline++;
19053 set_lastline(p, str);
19054 token_flush(p);
19055 return 0;
19056}
19057
19058static int
19059parser_cr(struct parser_params *p, int c)
19060{
19061 if (peek(p, '\n')) {
19062 p->lex.pcur++;
19063 c = '\n';
19064 }
19065 return c;
19066}
19067
19068static inline int
19069nextc0(struct parser_params *p, int set_encoding)
19070{
19071 int c;
19072
19073 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19074 if (nextline(p, set_encoding)) return -1;
19075 }
19076 c = (unsigned char)*p->lex.pcur++;
19077 if (UNLIKELY(c == '\r')) {
19078 c = parser_cr(p, c);
19079 }
19080
19081 return c;
19082}
19083#define nextc(p) nextc0(p, TRUE)
19084
19085static void
19086pushback(struct parser_params *p, int c)
19087{
19088 if (c == -1) return;
19089 p->eofp = 0;
19090 p->lex.pcur--;
19091 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19092 p->lex.pcur--;
19093 }
19094}
19095
19096#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19097
19098#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19099#define tok(p) (p)->tokenbuf
19100#define toklen(p) (p)->tokidx
19101
19102static int
19103looking_at_eol_p(struct parser_params *p)
19104{
19105 const char *ptr = p->lex.pcur;
19106 while (!lex_eol_ptr_p(p, ptr)) {
19107 int c = (unsigned char)*ptr++;
19108 int eol = (c == '\n' || c == '#');
19109 if (eol || !ISSPACE(c)) {
19110 return eol;
19111 }
19112 }
19113 return TRUE;
19114}
19115
19116static char*
19117newtok(struct parser_params *p)
19118{
19119 p->tokidx = 0;
19120 if (!p->tokenbuf) {
19121 p->toksiz = 60;
19122 p->tokenbuf = ALLOC_N(char, 60);
19123 }
19124 if (p->toksiz > 4096) {
19125 p->toksiz = 60;
19126 REALLOC_N(p->tokenbuf, char, 60);
19127 }
19128 return p->tokenbuf;
19129}
19130
19131static char *
19132tokspace(struct parser_params *p, int n)
19133{
19134 p->tokidx += n;
19135
19136 if (p->tokidx >= p->toksiz) {
19137 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19138 REALLOC_N(p->tokenbuf, char, p->toksiz);
19139 }
19140 return &p->tokenbuf[p->tokidx-n];
19141}
19142
19143static void
19144tokadd(struct parser_params *p, int c)
19145{
19146 p->tokenbuf[p->tokidx++] = (char)c;
19147 if (p->tokidx >= p->toksiz) {
19148 p->toksiz *= 2;
19149 REALLOC_N(p->tokenbuf, char, p->toksiz);
19150 }
19151}
19152
19153static int
19154tok_hex(struct parser_params *p, size_t *numlen)
19155{
19156 int c;
19157
19158 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19159 if (!*numlen) {
19160 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19161 yyerror0("invalid hex escape");
19162 dispatch_scan_event(p, tSTRING_CONTENT);
19163 return 0;
19164 }
19165 p->lex.pcur += *numlen;
19166 return c;
19167}
19168
19169#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19170
19171static int
19172escaped_control_code(int c)
19173{
19174 int c2 = 0;
19175 switch (c) {
19176 case ' ':
19177 c2 = 's';
19178 break;
19179 case '\n':
19180 c2 = 'n';
19181 break;
19182 case '\t':
19183 c2 = 't';
19184 break;
19185 case '\v':
19186 c2 = 'v';
19187 break;
19188 case '\r':
19189 c2 = 'r';
19190 break;
19191 case '\f':
19192 c2 = 'f';
19193 break;
19194 }
19195 return c2;
19196}
19197
19198#define WARN_SPACE_CHAR(c, prefix) \
19199 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19200
19201static int
19202tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19203 int regexp_literal, const char *begin)
19204{
19205 const int wide = !begin;
19206 size_t numlen;
19207 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19208
19209 p->lex.pcur += numlen;
19210 if (p->lex.strterm == NULL ||
19211 strterm_is_heredoc(p->lex.strterm) ||
19212 (p->lex.strterm->u.literal.func != str_regexp)) {
19213 if (!begin) begin = p->lex.pcur;
19214 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19215 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19216 yyerror0("invalid Unicode escape");
19217 dispatch_scan_event(p, tSTRING_CONTENT);
19218 return wide && numlen > 0;
19219 }
19220 if (codepoint > 0x10ffff) {
19221 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19222 yyerror0("invalid Unicode codepoint (too large)");
19223 dispatch_scan_event(p, tSTRING_CONTENT);
19224 return wide;
19225 }
19226 if ((codepoint & 0xfffff800) == 0xd800) {
19227 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19228 yyerror0("invalid Unicode codepoint");
19229 dispatch_scan_event(p, tSTRING_CONTENT);
19230 return wide;
19231 }
19232 }
19233 if (regexp_literal) {
19234 tokcopy(p, (int)numlen);
19235 }
19236 else if (codepoint >= 0x80) {
19237 rb_encoding *utf8 = rb_utf8_encoding();
19238 if (*encp && utf8 != *encp) {
19239 YYLTYPE loc = RUBY_INIT_YYLLOC();
19240 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19241 parser_show_error_line(p, &loc);
19242 return wide;
19243 }
19244 *encp = utf8;
19245 tokaddmbc(p, codepoint, *encp);
19246 }
19247 else {
19248 tokadd(p, codepoint);
19249 }
19250 return TRUE;
19251}
19252
19253static int tokadd_mbchar(struct parser_params *p, int c);
19254
19255static int
19256tokskip_mbchar(struct parser_params *p)
19257{
19258 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19259 if (len > 0) {
19260 p->lex.pcur += len - 1;
19261 }
19262 return len;
19263}
19264
19265/* return value is for ?\u3042 */
19266static void
19267tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19268 int term, int symbol_literal, int regexp_literal)
19269{
19270 /*
19271 * If `term` is not -1, then we allow multiple codepoints in \u{}
19272 * upto `term` byte, otherwise we're parsing a character literal.
19273 * And then add the codepoints to the current token.
19274 */
19275 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19276
19277 const int open_brace = '{', close_brace = '}';
19278
19279 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19280
19281 if (peek(p, open_brace)) { /* handle \u{...} form */
19282 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19283 /*
19284 * Skip parsing validation code and copy bytes as-is until term or
19285 * closing brace, in order to correctly handle extended regexps where
19286 * invalid unicode escapes are allowed in comments. The regexp parser
19287 * does its own validation and will catch any issues.
19288 */
19289 tokadd(p, open_brace);
19290 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19291 int c = peekc(p);
19292 if (c == close_brace) {
19293 tokadd(p, c);
19294 ++p->lex.pcur;
19295 break;
19296 }
19297 else if (c == term) {
19298 break;
19299 }
19300 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19301 tokadd(p, c);
19302 c = *++p->lex.pcur;
19303 }
19304 tokadd_mbchar(p, c);
19305 }
19306 }
19307 else {
19308 const char *second = NULL;
19309 int c, last = nextc(p);
19310 if (lex_eol_p(p)) goto unterminated;
19311 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19312 while (c != close_brace) {
19313 if (c == term) goto unterminated;
19314 if (second == multiple_codepoints)
19315 second = p->lex.pcur;
19316 if (regexp_literal) tokadd(p, last);
19317 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19318 break;
19319 }
19320 while (ISSPACE(c = peekc(p))) {
19321 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19322 last = c;
19323 }
19324 if (term == -1 && !second)
19325 second = multiple_codepoints;
19326 }
19327
19328 if (c != close_brace) {
19329 unterminated:
19330 flush_string_content(p, rb_utf8_encoding(), 0);
19331 yyerror0("unterminated Unicode escape");
19332 dispatch_scan_event(p, tSTRING_CONTENT);
19333 return;
19334 }
19335 if (second && second != multiple_codepoints) {
19336 const char *pcur = p->lex.pcur;
19337 p->lex.pcur = second;
19338 dispatch_scan_event(p, tSTRING_CONTENT);
19339 token_flush(p);
19340 p->lex.pcur = pcur;
19341 yyerror0(multiple_codepoints);
19342 token_flush(p);
19343 }
19344
19345 if (regexp_literal) tokadd(p, close_brace);
19346 nextc(p);
19347 }
19348 }
19349 else { /* handle \uxxxx form */
19350 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19351 token_flush(p);
19352 return;
19353 }
19354 }
19355}
19356
19357#define ESCAPE_CONTROL 1
19358#define ESCAPE_META 2
19359
19360static int
19361read_escape(struct parser_params *p, int flags, const char *begin)
19362{
19363 int c;
19364 size_t numlen;
19365
19366 switch (c = nextc(p)) {
19367 case '\\': /* Backslash */
19368 return c;
19369
19370 case 'n': /* newline */
19371 return '\n';
19372
19373 case 't': /* horizontal tab */
19374 return '\t';
19375
19376 case 'r': /* carriage-return */
19377 return '\r';
19378
19379 case 'f': /* form-feed */
19380 return '\f';
19381
19382 case 'v': /* vertical tab */
19383 return '\13';
19384
19385 case 'a': /* alarm(bell) */
19386 return '\007';
19387
19388 case 'e': /* escape */
19389 return 033;
19390
19391 case '0': case '1': case '2': case '3': /* octal constant */
19392 case '4': case '5': case '6': case '7':
19393 pushback(p, c);
19394 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19395 p->lex.pcur += numlen;
19396 return c;
19397
19398 case 'x': /* hex constant */
19399 c = tok_hex(p, &numlen);
19400 if (numlen == 0) return 0;
19401 return c;
19402
19403 case 'b': /* backspace */
19404 return '\010';
19405
19406 case 's': /* space */
19407 return ' ';
19408
19409 case 'M':
19410 if (flags & ESCAPE_META) goto eof;
19411 if ((c = nextc(p)) != '-') {
19412 goto eof;
19413 }
19414 if ((c = nextc(p)) == '\\') {
19415 switch (peekc(p)) {
19416 case 'u': case 'U':
19417 nextc(p);
19418 goto eof;
19419 }
19420 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19421 }
19422 else if (c == -1) goto eof;
19423 else if (!ISASCII(c)) {
19424 tokskip_mbchar(p);
19425 goto eof;
19426 }
19427 else {
19428 int c2 = escaped_control_code(c);
19429 if (c2) {
19430 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19431 WARN_SPACE_CHAR(c2, "\\M-");
19432 }
19433 else {
19434 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19435 }
19436 }
19437 else if (ISCNTRL(c)) goto eof;
19438 return ((c & 0xff) | 0x80);
19439 }
19440
19441 case 'C':
19442 if ((c = nextc(p)) != '-') {
19443 goto eof;
19444 }
19445 case 'c':
19446 if (flags & ESCAPE_CONTROL) goto eof;
19447 if ((c = nextc(p))== '\\') {
19448 switch (peekc(p)) {
19449 case 'u': case 'U':
19450 nextc(p);
19451 goto eof;
19452 }
19453 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19454 }
19455 else if (c == '?')
19456 return 0177;
19457 else if (c == -1) goto eof;
19458 else if (!ISASCII(c)) {
19459 tokskip_mbchar(p);
19460 goto eof;
19461 }
19462 else {
19463 int c2 = escaped_control_code(c);
19464 if (c2) {
19465 if (ISCNTRL(c)) {
19466 if (flags & ESCAPE_META) {
19467 WARN_SPACE_CHAR(c2, "\\M-");
19468 }
19469 else {
19470 WARN_SPACE_CHAR(c2, "");
19471 }
19472 }
19473 else {
19474 if (flags & ESCAPE_META) {
19475 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19476 }
19477 else {
19478 WARN_SPACE_CHAR(c2, "\\C-");
19479 }
19480 }
19481 }
19482 else if (ISCNTRL(c)) goto eof;
19483 }
19484 return c & 0x9f;
19485
19486 eof:
19487 case -1:
19488 flush_string_content(p, p->enc, p->lex.pcur - begin);
19489 yyerror0("Invalid escape character syntax");
19490 dispatch_scan_event(p, tSTRING_CONTENT);
19491 return '\0';
19492
19493 default:
19494 if (!ISASCII(c)) {
19495 tokskip_mbchar(p);
19496 goto eof;
19497 }
19498 return c;
19499 }
19500}
19501
19502static void
19503tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19504{
19505 int len = rb_enc_codelen(c, enc);
19506 rb_enc_mbcput(c, tokspace(p, len), enc);
19507}
19508
19509static int
19510tokadd_escape(struct parser_params *p)
19511{
19512 int c;
19513 size_t numlen;
19514 const char *begin = p->lex.pcur;
19515
19516 switch (c = nextc(p)) {
19517 case '\n':
19518 return 0; /* just ignore */
19519
19520 case '0': case '1': case '2': case '3': /* octal constant */
19521 case '4': case '5': case '6': case '7':
19522 {
19523 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19524 if (numlen == 0) goto eof;
19525 p->lex.pcur += numlen;
19526 tokcopy(p, (int)numlen + 1);
19527 }
19528 return 0;
19529
19530 case 'x': /* hex constant */
19531 {
19532 tok_hex(p, &numlen);
19533 if (numlen == 0) return -1;
19534 tokcopy(p, (int)numlen + 2);
19535 }
19536 return 0;
19537
19538 eof:
19539 case -1:
19540 flush_string_content(p, p->enc, p->lex.pcur - begin);
19541 yyerror0("Invalid escape character syntax");
19542 token_flush(p);
19543 return -1;
19544
19545 default:
19546 tokadd(p, '\\');
19547 tokadd(p, c);
19548 }
19549 return 0;
19550}
19551
19552static int
19553char_to_option(int c)
19554{
19555 int val;
19556
19557 switch (c) {
19558 case 'i':
19559 val = RE_ONIG_OPTION_IGNORECASE;
19560 break;
19561 case 'x':
19562 val = RE_ONIG_OPTION_EXTEND;
19563 break;
19564 case 'm':
19565 val = RE_ONIG_OPTION_MULTILINE;
19566 break;
19567 default:
19568 val = 0;
19569 break;
19570 }
19571 return val;
19572}
19573
19574#define ARG_ENCODING_FIXED 16
19575#define ARG_ENCODING_NONE 32
19576#define ENC_ASCII8BIT 1
19577#define ENC_EUC_JP 2
19578#define ENC_Windows_31J 3
19579#define ENC_UTF8 4
19580
19581static int
19582char_to_option_kcode(int c, int *option, int *kcode)
19583{
19584 *option = 0;
19585
19586 switch (c) {
19587 case 'n':
19588 *kcode = ENC_ASCII8BIT;
19589 return (*option = ARG_ENCODING_NONE);
19590 case 'e':
19591 *kcode = ENC_EUC_JP;
19592 break;
19593 case 's':
19594 *kcode = ENC_Windows_31J;
19595 break;
19596 case 'u':
19597 *kcode = ENC_UTF8;
19598 break;
19599 default:
19600 *kcode = -1;
19601 return (*option = char_to_option(c));
19602 }
19603 *option = ARG_ENCODING_FIXED;
19604 return 1;
19605}
19606
19607static int
19608regx_options(struct parser_params *p)
19609{
19610 int kcode = 0;
19611 int kopt = 0;
19612 int options = 0;
19613 int c, opt, kc;
19614
19615 newtok(p);
19616 while (c = nextc(p), ISALPHA(c)) {
19617 if (c == 'o') {
19618 options |= RE_OPTION_ONCE;
19619 }
19620 else if (char_to_option_kcode(c, &opt, &kc)) {
19621 if (kc >= 0) {
19622 if (kc != ENC_ASCII8BIT) kcode = c;
19623 kopt = opt;
19624 }
19625 else {
19626 options |= opt;
19627 }
19628 }
19629 else {
19630 tokadd(p, c);
19631 }
19632 }
19633 options |= kopt;
19634 pushback(p, c);
19635 if (toklen(p)) {
19636 YYLTYPE loc = RUBY_INIT_YYLLOC();
19637 tokfix(p);
19638 compile_error(p, "unknown regexp option%s - %*s",
19639 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19640 parser_show_error_line(p, &loc);
19641 }
19642 return options | RE_OPTION_ENCODING(kcode);
19643}
19644
19645static int
19646tokadd_mbchar(struct parser_params *p, int c)
19647{
19648 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19649 if (len < 0) return -1;
19650 tokadd(p, c);
19651 p->lex.pcur += --len;
19652 if (len > 0) tokcopy(p, len);
19653 return c;
19654}
19655
19656static inline int
19657simple_re_meta(int c)
19658{
19659 switch (c) {
19660 case '$': case '*': case '+': case '.':
19661 case '?': case '^': case '|':
19662 case ')': case ']': case '}': case '>':
19663 return TRUE;
19664 default:
19665 return FALSE;
19666 }
19667}
19668
19669static int
19670parser_update_heredoc_indent(struct parser_params *p, int c)
19671{
19672 if (p->heredoc_line_indent == -1) {
19673 if (c == '\n') p->heredoc_line_indent = 0;
19674 }
19675 else {
19676 if (c == ' ') {
19677 p->heredoc_line_indent++;
19678 return TRUE;
19679 }
19680 else if (c == '\t') {
19681 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19682 p->heredoc_line_indent = w * TAB_WIDTH;
19683 return TRUE;
19684 }
19685 else if (c != '\n') {
19686 if (p->heredoc_indent > p->heredoc_line_indent) {
19687 p->heredoc_indent = p->heredoc_line_indent;
19688 }
19689 p->heredoc_line_indent = -1;
19690 }
19691 else {
19692 /* Whitespace only line has no indentation */
19693 p->heredoc_line_indent = 0;
19694 }
19695 }
19696 return FALSE;
19697}
19698
19699static void
19700parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19701{
19702 YYLTYPE loc = RUBY_INIT_YYLLOC();
19703 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19704 compile_error(p, "%s mixed within %s source", n1, n2);
19705 parser_show_error_line(p, &loc);
19706}
19707
19708static void
19709parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19710{
19711 const char *pos = p->lex.pcur;
19712 p->lex.pcur = beg;
19713 parser_mixed_error(p, enc1, enc2);
19714 p->lex.pcur = pos;
19715}
19716
19717static inline char
19718nibble_char_upper(unsigned int c)
19719{
19720 c &= 0xf;
19721 return c + (c < 10 ? '0' : 'A' - 10);
19722}
19723
19724static int
19725tokadd_string(struct parser_params *p,
19726 int func, int term, int paren, long *nest,
19727 rb_encoding **encp, rb_encoding **enc)
19728{
19729 int c;
19730 bool erred = false;
19731#ifdef RIPPER
19732 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19733 int top_of_line = FALSE;
19734#endif
19735
19736#define mixed_error(enc1, enc2) \
19737 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19738#define mixed_escape(beg, enc1, enc2) \
19739 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19740
19741 while ((c = nextc(p)) != -1) {
19742 if (p->heredoc_indent > 0) {
19743 parser_update_heredoc_indent(p, c);
19744 }
19745#ifdef RIPPER
19746 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19747 pushback(p, c);
19748 break;
19749 }
19750#endif
19751
19752 if (paren && c == paren) {
19753 ++*nest;
19754 }
19755 else if (c == term) {
19756 if (!nest || !*nest) {
19757 pushback(p, c);
19758 break;
19759 }
19760 --*nest;
19761 }
19762 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19763 unsigned char c2 = *p->lex.pcur;
19764 if (c2 == '$' || c2 == '@' || c2 == '{') {
19765 pushback(p, c);
19766 break;
19767 }
19768 }
19769 else if (c == '\\') {
19770 c = nextc(p);
19771 switch (c) {
19772 case '\n':
19773 if (func & STR_FUNC_QWORDS) break;
19774 if (func & STR_FUNC_EXPAND) {
19775 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19776 continue;
19777 if (c == term) {
19778 c = '\\';
19779 goto terminate;
19780 }
19781 }
19782 tokadd(p, '\\');
19783 break;
19784
19785 case '\\':
19786 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19787 break;
19788
19789 case 'u':
19790 if ((func & STR_FUNC_EXPAND) == 0) {
19791 tokadd(p, '\\');
19792 break;
19793 }
19794 tokadd_utf8(p, enc, term,
19795 func & STR_FUNC_SYMBOL,
19796 func & STR_FUNC_REGEXP);
19797 continue;
19798
19799 default:
19800 if (c == -1) return -1;
19801 if (!ISASCII(c)) {
19802 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19803 goto non_ascii;
19804 }
19805 if (func & STR_FUNC_REGEXP) {
19806 switch (c) {
19807 case 'c':
19808 case 'C':
19809 case 'M': {
19810 pushback(p, c);
19811 c = read_escape(p, 0, p->lex.pcur - 1);
19812
19813 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19814 *t++ = '\\';
19815 *t++ = 'x';
19816 *t++ = nibble_char_upper(c >> 4);
19817 *t++ = nibble_char_upper(c);
19818 continue;
19819 }
19820 }
19821
19822 if (c == term && !simple_re_meta(c)) {
19823 tokadd(p, c);
19824 continue;
19825 }
19826 pushback(p, c);
19827 if ((c = tokadd_escape(p)) < 0)
19828 return -1;
19829 if (*enc && *enc != *encp) {
19830 mixed_escape(p->lex.ptok+2, *enc, *encp);
19831 }
19832 continue;
19833 }
19834 else if (func & STR_FUNC_EXPAND) {
19835 pushback(p, c);
19836 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19837 c = read_escape(p, 0, p->lex.pcur - 1);
19838 }
19839 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19840 /* ignore backslashed spaces in %w */
19841 }
19842 else if (c != term && !(paren && c == paren)) {
19843 tokadd(p, '\\');
19844 pushback(p, c);
19845 continue;
19846 }
19847 }
19848 }
19849 else if (!parser_isascii(p)) {
19850 non_ascii:
19851 if (!*enc) {
19852 *enc = *encp;
19853 }
19854 else if (*enc != *encp) {
19855 mixed_error(*enc, *encp);
19856 continue;
19857 }
19858 if (tokadd_mbchar(p, c) == -1) return -1;
19859 continue;
19860 }
19861 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19862 pushback(p, c);
19863 break;
19864 }
19865 if (c & 0x80) {
19866 if (!*enc) {
19867 *enc = *encp;
19868 }
19869 else if (*enc != *encp) {
19870 mixed_error(*enc, *encp);
19871 continue;
19872 }
19873 }
19874 tokadd(p, c);
19875#ifdef RIPPER
19876 top_of_line = (c == '\n');
19877#endif
19878 }
19879 terminate:
19880 if (*enc) *encp = *enc;
19881 return c;
19882}
19883
19884#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19885
19886static void
19887flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19888{
19889 p->lex.pcur -= back;
19890 if (has_delayed_token(p)) {
19891 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19892 if (len > 0) {
19893 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19894 p->delayed.end_line = p->ruby_sourceline;
19895 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19896 }
19897 dispatch_delayed_token(p, tSTRING_CONTENT);
19898 p->lex.ptok = p->lex.pcur;
19899 }
19900 dispatch_scan_event(p, tSTRING_CONTENT);
19901 p->lex.pcur += back;
19902}
19903
19904/* this can be shared with ripper, since it's independent from struct
19905 * parser_params. */
19906#ifndef RIPPER
19907#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19908#define SPECIAL_PUNCT(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(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19913 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19914 BIT('0', idx))
19915const uint_least32_t ruby_global_name_punct_bits[] = {
19916 SPECIAL_PUNCT(0),
19917 SPECIAL_PUNCT(1),
19918 SPECIAL_PUNCT(2),
19919};
19920#undef BIT
19921#undef SPECIAL_PUNCT
19922#endif
19923
19924static enum yytokentype
19925parser_peek_variable_name(struct parser_params *p)
19926{
19927 int c;
19928 const char *ptr = p->lex.pcur;
19929
19930 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19931 c = *ptr++;
19932 switch (c) {
19933 case '$':
19934 if ((c = *ptr) == '-') {
19935 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19936 c = *ptr;
19937 }
19938 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19939 return tSTRING_DVAR;
19940 }
19941 break;
19942 case '@':
19943 if ((c = *ptr) == '@') {
19944 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19945 c = *ptr;
19946 }
19947 break;
19948 case '{':
19949 p->lex.pcur = ptr;
19950 p->command_start = TRUE;
19951 yylval.state = p->lex.state;
19952 return tSTRING_DBEG;
19953 default:
19954 return 0;
19955 }
19956 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19957 return tSTRING_DVAR;
19958 return 0;
19959}
19960
19961#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19962#define IS_END() IS_lex_state(EXPR_END_ANY)
19963#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19964#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19965#define IS_LABEL_POSSIBLE() (\
19966 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19967 IS_ARG())
19968#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19969#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19970
19971static inline enum yytokentype
19972parser_string_term(struct parser_params *p, int func)
19973{
19974 xfree(p->lex.strterm);
19975 p->lex.strterm = 0;
19976 if (func & STR_FUNC_REGEXP) {
19977 set_yylval_num(regx_options(p));
19978 dispatch_scan_event(p, tREGEXP_END);
19979 SET_LEX_STATE(EXPR_END);
19980 return tREGEXP_END;
19981 }
19982 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19983 nextc(p);
19984 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19985 return tLABEL_END;
19986 }
19987 SET_LEX_STATE(EXPR_END);
19988 return tSTRING_END;
19989}
19990
19991static enum yytokentype
19992parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19993{
19994 int func = quote->func;
19995 int term = quote->term;
19996 int paren = quote->paren;
19997 int c, space = 0;
19998 rb_encoding *enc = p->enc;
19999 rb_encoding *base_enc = 0;
20000 rb_parser_string_t *lit;
20001
20002 if (func & STR_FUNC_TERM) {
20003 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20004 SET_LEX_STATE(EXPR_END);
20005 xfree(p->lex.strterm);
20006 p->lex.strterm = 0;
20007 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20008 }
20009 c = nextc(p);
20010 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20011 while (c != '\n' && ISSPACE(c = nextc(p)));
20012 space = 1;
20013 }
20014 if (func & STR_FUNC_LIST) {
20015 quote->func &= ~STR_FUNC_LIST;
20016 space = 1;
20017 }
20018 if (c == term && !quote->nest) {
20019 if (func & STR_FUNC_QWORDS) {
20020 quote->func |= STR_FUNC_TERM;
20021 pushback(p, c); /* dispatch the term at tSTRING_END */
20022 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20023 return ' ';
20024 }
20025 return parser_string_term(p, func);
20026 }
20027 if (space) {
20028 if (!ISSPACE(c)) pushback(p, c);
20029 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20030 return ' ';
20031 }
20032 newtok(p);
20033 if ((func & STR_FUNC_EXPAND) && c == '#') {
20034 enum yytokentype t = parser_peek_variable_name(p);
20035 if (t) return t;
20036 tokadd(p, '#');
20037 c = nextc(p);
20038 }
20039 pushback(p, c);
20040 if (tokadd_string(p, func, term, paren, &quote->nest,
20041 &enc, &base_enc) == -1) {
20042 if (p->eofp) {
20043#ifndef RIPPER
20044# define unterminated_literal(mesg) yyerror0(mesg)
20045#else
20046# define unterminated_literal(mesg) compile_error(p, mesg)
20047#endif
20048 literal_flush(p, p->lex.pcur);
20049 if (func & STR_FUNC_QWORDS) {
20050 /* no content to add, bailing out here */
20051 unterminated_literal("unterminated list meets end of file");
20052 xfree(p->lex.strterm);
20053 p->lex.strterm = 0;
20054 return tSTRING_END;
20055 }
20056 if (func & STR_FUNC_REGEXP) {
20057 unterminated_literal("unterminated regexp meets end of file");
20058 }
20059 else {
20060 unterminated_literal("unterminated string meets end of file");
20061 }
20062 quote->func |= STR_FUNC_TERM;
20063 }
20064 }
20065
20066 tokfix(p);
20067 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20068 set_yylval_str(lit);
20069 flush_string_content(p, enc, 0);
20070
20071 return tSTRING_CONTENT;
20072}
20073
20074static enum yytokentype
20075heredoc_identifier(struct parser_params *p)
20076{
20077 /*
20078 * term_len is length of `<<"END"` except `END`,
20079 * in this case term_len is 4 (<, <, " and ").
20080 */
20081 long len, offset = p->lex.pcur - p->lex.pbeg;
20082 int c = nextc(p), term, func = 0, quote = 0;
20083 enum yytokentype token = tSTRING_BEG;
20084 int indent = 0;
20085
20086 if (c == '-') {
20087 c = nextc(p);
20088 func = STR_FUNC_INDENT;
20089 offset++;
20090 }
20091 else if (c == '~') {
20092 c = nextc(p);
20093 func = STR_FUNC_INDENT;
20094 offset++;
20095 indent = INT_MAX;
20096 }
20097 switch (c) {
20098 case '\'':
20099 func |= str_squote; goto quoted;
20100 case '"':
20101 func |= str_dquote; goto quoted;
20102 case '`':
20103 token = tXSTRING_BEG;
20104 func |= str_xquote; goto quoted;
20105
20106 quoted:
20107 quote++;
20108 offset++;
20109 term = c;
20110 len = 0;
20111 while ((c = nextc(p)) != term) {
20112 if (c == -1 || c == '\r' || c == '\n') {
20113 yyerror0("unterminated here document identifier");
20114 return -1;
20115 }
20116 }
20117 break;
20118
20119 default:
20120 if (!parser_is_identchar(p)) {
20121 pushback(p, c);
20122 if (func & STR_FUNC_INDENT) {
20123 pushback(p, indent > 0 ? '~' : '-');
20124 }
20125 return 0;
20126 }
20127 func |= str_dquote;
20128 do {
20129 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20130 if (n < 0) return 0;
20131 p->lex.pcur += --n;
20132 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20133 pushback(p, c);
20134 break;
20135 }
20136
20137 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20138 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20139 yyerror0("too long here document identifier");
20140 dispatch_scan_event(p, tHEREDOC_BEG);
20141 lex_goto_eol(p);
20142
20143 p->lex.strterm = new_heredoc(p);
20144 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20145 here->offset = offset;
20146 here->sourceline = p->ruby_sourceline;
20147 here->length = (unsigned)len;
20148 here->quote = quote;
20149 here->func = func;
20150 here->lastline = p->lex.lastline;
20151
20152 token_flush(p);
20153 p->heredoc_indent = indent;
20154 p->heredoc_line_indent = 0;
20155 return token;
20156}
20157
20158static void
20159heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20160{
20161 rb_parser_string_t *line;
20162 rb_strterm_t *term = p->lex.strterm;
20163
20164 p->lex.strterm = 0;
20165 line = here->lastline;
20166 p->lex.lastline = line;
20167 p->lex.pbeg = PARSER_STRING_PTR(line);
20168 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20169 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20170 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20171 p->heredoc_end = p->ruby_sourceline;
20172 p->ruby_sourceline = (int)here->sourceline;
20173 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20174 p->eofp = 0;
20175 xfree(term);
20176}
20177
20178static int
20179dedent_string_column(const char *str, long len, int width)
20180{
20181 int i, col = 0;
20182
20183 for (i = 0; i < len && col < width; i++) {
20184 if (str[i] == ' ') {
20185 col++;
20186 }
20187 else if (str[i] == '\t') {
20188 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20189 if (n > width) break;
20190 col = n;
20191 }
20192 else {
20193 break;
20194 }
20195 }
20196
20197 return i;
20198}
20199
20200static int
20201dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20202{
20203 char *str;
20204 long len;
20205 int i;
20206
20207 len = PARSER_STRING_LEN(string);
20208 str = PARSER_STRING_PTR(string);
20209
20210 i = dedent_string_column(str, len, width);
20211 if (!i) return 0;
20212
20213 rb_parser_str_modify(string);
20214 str = PARSER_STRING_PTR(string);
20215 if (PARSER_STRING_LEN(string) != len)
20216 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20217 MEMMOVE(str, str + i, char, len - i);
20218 rb_parser_str_set_len(p, string, len - i);
20219 return i;
20220}
20221
20222static NODE *
20223heredoc_dedent(struct parser_params *p, NODE *root)
20224{
20225 NODE *node, *str_node, *prev_node;
20226 int indent = p->heredoc_indent;
20227 rb_parser_string_t *prev_lit = 0;
20228
20229 if (indent <= 0) return root;
20230 if (!root) return root;
20231
20232 prev_node = node = str_node = root;
20233 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20234
20235 while (str_node) {
20236 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20237 if (nd_fl_newline(str_node)) {
20238 dedent_string(p, lit, indent);
20239 }
20240 if (!prev_lit) {
20241 prev_lit = lit;
20242 }
20243 else if (!literal_concat0(p, prev_lit, lit)) {
20244 return 0;
20245 }
20246 else {
20247 NODE *end = RNODE_LIST(node)->as.nd_end;
20248 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20249 if (!node) {
20250 if (nd_type_p(prev_node, NODE_DSTR))
20251 nd_set_type(prev_node, NODE_STR);
20252 break;
20253 }
20254 RNODE_LIST(node)->as.nd_end = end;
20255 goto next_str;
20256 }
20257
20258 str_node = 0;
20259 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20260 next_str:
20261 if (!nd_type_p(node, NODE_LIST)) break;
20262 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20263 enum node_type type = nd_type(str_node);
20264 if (type == NODE_STR || type == NODE_DSTR) break;
20265 prev_lit = 0;
20266 str_node = 0;
20267 }
20268 }
20269 }
20270 return root;
20271}
20272
20273static int
20274whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20275{
20276 const char *beg = p->lex.pbeg;
20277 const char *ptr = p->lex.pend;
20278
20279 if (ptr - beg < len) return FALSE;
20280 if (ptr > beg && ptr[-1] == '\n') {
20281 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20282 if (ptr - beg < len) return FALSE;
20283 }
20284 if (strncmp(eos, ptr -= len, len)) return FALSE;
20285 if (indent) {
20286 while (beg < ptr && ISSPACE(*beg)) beg++;
20287 }
20288 return beg == ptr;
20289}
20290
20291static int
20292word_match_p(struct parser_params *p, const char *word, long len)
20293{
20294 if (strncmp(p->lex.pcur, word, len)) return 0;
20295 if (lex_eol_n_p(p, len)) return 1;
20296 int c = (unsigned char)p->lex.pcur[len];
20297 if (ISSPACE(c)) return 1;
20298 switch (c) {
20299 case '\0': case '\004': case '\032': return 1;
20300 }
20301 return 0;
20302}
20303
20304#define NUM_SUFFIX_R (1<<0)
20305#define NUM_SUFFIX_I (1<<1)
20306#define NUM_SUFFIX_ALL 3
20307
20308static int
20309number_literal_suffix(struct parser_params *p, int mask)
20310{
20311 int c, result = 0;
20312 const char *lastp = p->lex.pcur;
20313
20314 while ((c = nextc(p)) != -1) {
20315 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20316 result |= (mask & NUM_SUFFIX_I);
20317 mask &= ~NUM_SUFFIX_I;
20318 /* r after i, rational of complex is disallowed */
20319 mask &= ~NUM_SUFFIX_R;
20320 continue;
20321 }
20322 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20323 result |= (mask & NUM_SUFFIX_R);
20324 mask &= ~NUM_SUFFIX_R;
20325 continue;
20326 }
20327 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20328 p->lex.pcur = lastp;
20329 return 0;
20330 }
20331 pushback(p, c);
20332 break;
20333 }
20334 return result;
20335}
20336
20337static enum yytokentype
20338set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20339{
20340 enum rb_numeric_type numeric_type = integer_literal;
20341
20342 if (type == tFLOAT) {
20343 numeric_type = float_literal;
20344 }
20345
20346 if (suffix & NUM_SUFFIX_R) {
20347 type = tRATIONAL;
20348 numeric_type = rational_literal;
20349 }
20350 if (suffix & NUM_SUFFIX_I) {
20351 type = tIMAGINARY;
20352 }
20353
20354 switch (type) {
20355 case tINTEGER:
20356 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20357 break;
20358 case tFLOAT:
20359 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20360 break;
20361 case tRATIONAL:
20362 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20363 break;
20364 case tIMAGINARY:
20365 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20366 (void)numeric_type; /* for ripper */
20367 break;
20368 default:
20369 rb_bug("unexpected token: %d", type);
20370 }
20371 SET_LEX_STATE(EXPR_END);
20372 return type;
20373}
20374
20375#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20376static void
20377parser_dispatch_heredoc_end(struct parser_params *p, int line)
20378{
20379 if (has_delayed_token(p))
20380 dispatch_delayed_token(p, tSTRING_CONTENT);
20381
20382#ifdef RIPPER
20383 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20384 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20385#else
20386 if (p->keep_tokens) {
20387 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20388 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20389 parser_append_tokens(p, str, tHEREDOC_END, line);
20390 }
20391#endif
20392
20393 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20394 lex_goto_eol(p);
20395 token_flush(p);
20396}
20397
20398static enum yytokentype
20399here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20400{
20401 int c, func, indent = 0;
20402 const char *eos, *ptr, *ptr_end;
20403 long len;
20404 rb_parser_string_t *str = 0;
20405 rb_encoding *enc = p->enc;
20406 rb_encoding *base_enc = 0;
20407 int bol;
20408#ifdef RIPPER
20409 VALUE s_value;
20410#endif
20411
20412 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20413 len = here->length;
20414 indent = (func = here->func) & STR_FUNC_INDENT;
20415
20416 if ((c = nextc(p)) == -1) {
20417 error:
20418#ifdef RIPPER
20419 if (!has_delayed_token(p)) {
20420 dispatch_scan_event(p, tSTRING_CONTENT);
20421 }
20422 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20423 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20424 if (!(func & STR_FUNC_REGEXP)) {
20425 int cr = ENC_CODERANGE_UNKNOWN;
20426 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20427 if (cr != ENC_CODERANGE_7BIT &&
20428 rb_is_usascii_enc(p->enc) &&
20429 enc != rb_utf8_encoding()) {
20430 enc = rb_ascii8bit_encoding();
20431 }
20432 }
20433 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20434 }
20435 dispatch_delayed_token(p, tSTRING_CONTENT);
20436 }
20437 else {
20438 dispatch_delayed_token(p, tSTRING_CONTENT);
20439 dispatch_scan_event(p, tSTRING_CONTENT);
20440 }
20441 lex_goto_eol(p);
20442#endif
20443 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20444 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20445 (int)len, eos);
20446 token_flush(p);
20447 SET_LEX_STATE(EXPR_END);
20448 return tSTRING_END;
20449 }
20450 bol = was_bol(p);
20451 if (!bol) {
20452 /* not beginning of line, cannot be the terminator */
20453 }
20454 else if (p->heredoc_line_indent == -1) {
20455 /* `heredoc_line_indent == -1` means
20456 * - "after an interpolation in the same line", or
20457 * - "in a continuing line"
20458 */
20459 p->heredoc_line_indent = 0;
20460 }
20461 else if (whole_match_p(p, eos, len, indent)) {
20462 dispatch_heredoc_end(p);
20463 restore:
20464 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20465 token_flush(p);
20466 SET_LEX_STATE(EXPR_END);
20467 return tSTRING_END;
20468 }
20469
20470 if (!(func & STR_FUNC_EXPAND)) {
20471 do {
20472 ptr = PARSER_STRING_PTR(p->lex.lastline);
20473 ptr_end = p->lex.pend;
20474 if (ptr_end > ptr) {
20475 switch (ptr_end[-1]) {
20476 case '\n':
20477 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20478 ptr_end++;
20479 break;
20480 }
20481 case '\r':
20482 --ptr_end;
20483 }
20484 }
20485
20486 if (p->heredoc_indent > 0) {
20487 long i = 0;
20488 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20489 i++;
20490 p->heredoc_line_indent = 0;
20491 }
20492
20493 if (str)
20494 parser_str_cat(str, ptr, ptr_end - ptr);
20495 else
20496 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20497 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20498 lex_goto_eol(p);
20499 if (p->heredoc_indent > 0) {
20500 goto flush_str;
20501 }
20502 if (nextc(p) == -1) {
20503 if (str) {
20504 rb_parser_string_free(p, str);
20505 str = 0;
20506 }
20507 goto error;
20508 }
20509 } while (!whole_match_p(p, eos, len, indent));
20510 }
20511 else {
20512 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20513 newtok(p);
20514 if (c == '#') {
20515 enum yytokentype t = parser_peek_variable_name(p);
20516 if (p->heredoc_line_indent != -1) {
20517 if (p->heredoc_indent > p->heredoc_line_indent) {
20518 p->heredoc_indent = p->heredoc_line_indent;
20519 }
20520 p->heredoc_line_indent = -1;
20521 }
20522 if (t) return t;
20523 tokadd(p, '#');
20524 c = nextc(p);
20525 }
20526 do {
20527 pushback(p, c);
20528 enc = p->enc;
20529 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20530 if (p->eofp) goto error;
20531 goto restore;
20532 }
20533 if (c != '\n') {
20534 if (c == '\\') p->heredoc_line_indent = -1;
20535 flush:
20536 str = STR_NEW3(tok(p), toklen(p), enc, func);
20537 flush_str:
20538 set_yylval_str(str);
20539#ifndef RIPPER
20540 if (bol) nd_set_fl_newline(yylval.node);
20541#endif
20542 flush_string_content(p, enc, 0);
20543 return tSTRING_CONTENT;
20544 }
20545 tokadd(p, nextc(p));
20546 if (p->heredoc_indent > 0) {
20547 lex_goto_eol(p);
20548 goto flush;
20549 }
20550 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20551 if ((c = nextc(p)) == -1) goto error;
20552 } while (!whole_match_p(p, eos, len, indent));
20553 str = STR_NEW3(tok(p), toklen(p), enc, func);
20554 }
20555 dispatch_heredoc_end(p);
20556 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20557 token_flush(p);
20558 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20559#ifdef RIPPER
20560 /* Preserve s_value for set_yylval_str */
20561 s_value = p->s_value;
20562#endif
20563 set_yylval_str(str);
20564#ifdef RIPPER
20565 set_parser_s_value(s_value);
20566#endif
20567
20568#ifndef RIPPER
20569 if (bol) nd_set_fl_newline(yylval.node);
20570#endif
20571 return tSTRING_CONTENT;
20572}
20573
20574#include "lex.c"
20575
20576static int
20577arg_ambiguous(struct parser_params *p, char c)
20578{
20579#ifndef RIPPER
20580 if (c == '/') {
20581 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20582 }
20583 else {
20584 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20585 }
20586#else
20587 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20588#endif
20589 return TRUE;
20590}
20591
20592/* returns true value if formal argument error;
20593 * Qtrue, or error message if ripper */
20594static VALUE
20595formal_argument_error(struct parser_params *p, ID id)
20596{
20597 switch (id_type(id)) {
20598 case ID_LOCAL:
20599 break;
20600#ifndef RIPPER
20601# define ERR(mesg) (yyerror0(mesg), Qtrue)
20602#else
20603# define ERR(mesg) WARN_S(mesg)
20604#endif
20605 case ID_CONST:
20606 return ERR("formal argument cannot be a constant");
20607 case ID_INSTANCE:
20608 return ERR("formal argument cannot be an instance variable");
20609 case ID_GLOBAL:
20610 return ERR("formal argument cannot be a global variable");
20611 case ID_CLASS:
20612 return ERR("formal argument cannot be a class variable");
20613 default:
20614 return ERR("formal argument must be local variable");
20615#undef ERR
20616 }
20617 shadowing_lvar(p, id);
20618
20619 return Qfalse;
20620}
20621
20622static int
20623lvar_defined(struct parser_params *p, ID id)
20624{
20625 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20626}
20627
20628/* emacsen -*- hack */
20629static long
20630parser_encode_length(struct parser_params *p, const char *name, long len)
20631{
20632 long nlen;
20633
20634 if (len > 5 && name[nlen = len - 5] == '-') {
20635 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20636 return nlen;
20637 }
20638 if (len > 4 && name[nlen = len - 4] == '-') {
20639 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20640 return nlen;
20641 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20642 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20643 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20644 return nlen;
20645 }
20646 return len;
20647}
20648
20649static void
20650parser_set_encode(struct parser_params *p, const char *name)
20651{
20652 rb_encoding *enc;
20653 VALUE excargs[3];
20654 int idx = 0;
20655
20656 const char *wrong = 0;
20657 switch (*name) {
20658 case 'e': case 'E': wrong = "external"; break;
20659 case 'i': case 'I': wrong = "internal"; break;
20660 case 'f': case 'F': wrong = "filesystem"; break;
20661 case 'l': case 'L': wrong = "locale"; break;
20662 }
20663 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20664 idx = rb_enc_find_index(name);
20665 if (idx < 0) {
20666 unknown:
20667 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20668 error:
20669 excargs[0] = rb_eArgError;
20670 excargs[2] = rb_make_backtrace();
20671 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20672 VALUE exc = rb_make_exception(3, excargs);
20673 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20674
20675 rb_ast_free(p->ast);
20676 p->ast = NULL;
20677
20678 rb_exc_raise(exc);
20679 }
20680 enc = rb_enc_from_index(idx);
20681 if (!rb_enc_asciicompat(enc)) {
20682 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20683 goto error;
20684 }
20685 p->enc = enc;
20686#ifndef RIPPER
20687 if (p->debug_lines) {
20688 long i;
20689 for (i = 0; i < p->debug_lines->len; i++) {
20690 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20691 }
20692 }
20693#endif
20694}
20695
20696static bool
20697comment_at_top(struct parser_params *p)
20698{
20699 if (p->token_seen) return false;
20700 return (p->line_count == (p->has_shebang ? 2 : 1));
20701}
20702
20703typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20704typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20705
20706static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20707
20708static void
20709magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20710{
20711 if (!comment_at_top(p)) {
20712 return;
20713 }
20714 parser_set_encode(p, val);
20715}
20716
20717static int
20718parser_get_bool(struct parser_params *p, const char *name, const char *val)
20719{
20720 switch (*val) {
20721 case 't': case 'T':
20722 if (STRCASECMP(val, "true") == 0) {
20723 return TRUE;
20724 }
20725 break;
20726 case 'f': case 'F':
20727 if (STRCASECMP(val, "false") == 0) {
20728 return FALSE;
20729 }
20730 break;
20731 }
20732 return parser_invalid_pragma_value(p, name, val);
20733}
20734
20735static int
20736parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20737{
20738 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20739 return -1;
20740}
20741
20742static void
20743parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20744{
20745 int b = parser_get_bool(p, name, val);
20746 if (b >= 0) p->token_info_enabled = b;
20747}
20748
20749static void
20750parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20751{
20752 int b;
20753
20754 if (p->token_seen) {
20755 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20756 return;
20757 }
20758
20759 b = parser_get_bool(p, name, val);
20760 if (b < 0) return;
20761
20762 p->frozen_string_literal = b;
20763}
20764
20765static void
20766parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20767{
20768 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20769 if (*s == ' ' || *s == '\t') continue;
20770 if (*s == '#') break;
20771 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20772 return;
20773 }
20774
20775 switch (*val) {
20776 case 'n': case 'N':
20777 if (STRCASECMP(val, "none") == 0) {
20778 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20779 return;
20780 }
20781 break;
20782 case 'l': case 'L':
20783 if (STRCASECMP(val, "literal") == 0) {
20784 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20785 return;
20786 }
20787 break;
20788 case 'e': case 'E':
20789 if (STRCASECMP(val, "experimental_copy") == 0) {
20790 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20791 return;
20792 }
20793 if (STRCASECMP(val, "experimental_everything") == 0) {
20794 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20795 return;
20796 }
20797 break;
20798 }
20799 parser_invalid_pragma_value(p, name, val);
20800}
20801
20802# if WARN_PAST_SCOPE
20803static void
20804parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20805{
20806 int b = parser_get_bool(p, name, val);
20807 if (b >= 0) p->past_scope_enabled = b;
20808}
20809# endif
20810
20812 const char *name;
20813 rb_magic_comment_setter_t func;
20814 rb_magic_comment_length_t length;
20815};
20816
20817static const struct magic_comment magic_comments[] = {
20818 {"coding", magic_comment_encoding, parser_encode_length},
20819 {"encoding", magic_comment_encoding, parser_encode_length},
20820 {"frozen_string_literal", parser_set_frozen_string_literal},
20821 {"shareable_constant_value", parser_set_shareable_constant_value},
20822 {"warn_indent", parser_set_token_info},
20823# if WARN_PAST_SCOPE
20824 {"warn_past_scope", parser_set_past_scope},
20825# endif
20826};
20827
20828static const char *
20829magic_comment_marker(const char *str, long len)
20830{
20831 long i = 2;
20832
20833 while (i < len) {
20834 switch (str[i]) {
20835 case '-':
20836 if (str[i-1] == '*' && str[i-2] == '-') {
20837 return str + i + 1;
20838 }
20839 i += 2;
20840 break;
20841 case '*':
20842 if (i + 1 >= len) return 0;
20843 if (str[i+1] != '-') {
20844 i += 4;
20845 }
20846 else if (str[i-1] != '-') {
20847 i += 2;
20848 }
20849 else {
20850 return str + i + 2;
20851 }
20852 break;
20853 default:
20854 i += 3;
20855 break;
20856 }
20857 }
20858 return 0;
20859}
20860
20861static int
20862parser_magic_comment(struct parser_params *p, const char *str, long len)
20863{
20864 int indicator = 0;
20865 VALUE name = 0, val = 0;
20866 const char *beg, *end, *vbeg, *vend;
20867#define str_copy(_s, _p, _n) ((_s) \
20868 ? (void)(rb_str_resize((_s), (_n)), \
20869 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20870 : (void)((_s) = STR_NEW((_p), (_n))))
20871
20872 if (len <= 7) return FALSE;
20873 if (!!(beg = magic_comment_marker(str, len))) {
20874 if (!(end = magic_comment_marker(beg, str + len - beg)))
20875 return FALSE;
20876 indicator = TRUE;
20877 str = beg;
20878 len = end - beg - 3;
20879 }
20880
20881 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20882 while (len > 0) {
20883 const struct magic_comment *mc = magic_comments;
20884 char *s;
20885 int i;
20886 long n = 0;
20887
20888 for (; len > 0 && *str; str++, --len) {
20889 switch (*str) {
20890 case '\'': case '"': case ':': case ';':
20891 continue;
20892 }
20893 if (!ISSPACE(*str)) break;
20894 }
20895 for (beg = str; len > 0; str++, --len) {
20896 switch (*str) {
20897 case '\'': case '"': case ':': case ';':
20898 break;
20899 default:
20900 if (ISSPACE(*str)) break;
20901 continue;
20902 }
20903 break;
20904 }
20905 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20906 if (!len) break;
20907 if (*str != ':') {
20908 if (!indicator) return FALSE;
20909 continue;
20910 }
20911
20912 do str++; while (--len > 0 && ISSPACE(*str));
20913 if (!len) break;
20914 const char *tok_beg = str;
20915 if (*str == '"') {
20916 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20917 if (*str == '\\') {
20918 --len;
20919 ++str;
20920 }
20921 }
20922 vend = str;
20923 if (len) {
20924 --len;
20925 ++str;
20926 }
20927 }
20928 else {
20929 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20930 vend = str;
20931 }
20932 const char *tok_end = str;
20933 if (indicator) {
20934 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20935 }
20936 else {
20937 while (len > 0 && (ISSPACE(*str))) --len, str++;
20938 if (len) return FALSE;
20939 }
20940
20941 n = end - beg;
20942 str_copy(name, beg, n);
20943 s = RSTRING_PTR(name);
20944 for (i = 0; i < n; ++i) {
20945 if (s[i] == '-') s[i] = '_';
20946 }
20947 do {
20948 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20949 n = vend - vbeg;
20950 if (mc->length) {
20951 n = (*mc->length)(p, vbeg, n);
20952 }
20953 str_copy(val, vbeg, n);
20954 p->lex.ptok = tok_beg;
20955 p->lex.pcur = tok_end;
20956 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20957 break;
20958 }
20959 } while (++mc < magic_comments + numberof(magic_comments));
20960#ifdef RIPPER
20961 str_copy(val, vbeg, vend - vbeg);
20962 dispatch2(magic_comment, name, val);
20963#endif
20964 }
20965
20966 return TRUE;
20967}
20968
20969static void
20970set_file_encoding(struct parser_params *p, const char *str, const char *send)
20971{
20972 int sep = 0;
20973 const char *beg = str;
20974 VALUE s;
20975
20976 for (;;) {
20977 if (send - str <= 6) return;
20978 switch (str[6]) {
20979 case 'C': case 'c': str += 6; continue;
20980 case 'O': case 'o': str += 5; continue;
20981 case 'D': case 'd': str += 4; continue;
20982 case 'I': case 'i': str += 3; continue;
20983 case 'N': case 'n': str += 2; continue;
20984 case 'G': case 'g': str += 1; continue;
20985 case '=': case ':':
20986 sep = 1;
20987 str += 6;
20988 break;
20989 default:
20990 str += 6;
20991 if (ISSPACE(*str)) break;
20992 continue;
20993 }
20994 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20995 sep = 0;
20996 }
20997 for (;;) {
20998 do {
20999 if (++str >= send) return;
21000 } while (ISSPACE(*str));
21001 if (sep) break;
21002 if (*str != '=' && *str != ':') return;
21003 sep = 1;
21004 str++;
21005 }
21006 beg = str;
21007 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21008 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21009 p->lex.ptok = beg;
21010 p->lex.pcur = str;
21011 parser_set_encode(p, RSTRING_PTR(s));
21012 rb_str_resize(s, 0);
21013}
21014
21015static void
21016parser_prepare(struct parser_params *p)
21017{
21018 int c = nextc0(p, FALSE);
21019 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21020 switch (c) {
21021 case '#':
21022 if (peek(p, '!')) p->has_shebang = 1;
21023 break;
21024 case 0xef: /* UTF-8 BOM marker */
21025 if (!lex_eol_n_p(p, 2) &&
21026 (unsigned char)p->lex.pcur[0] == 0xbb &&
21027 (unsigned char)p->lex.pcur[1] == 0xbf) {
21028 p->enc = rb_utf8_encoding();
21029 p->lex.pcur += 2;
21030#ifndef RIPPER
21031 if (p->debug_lines) {
21032 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21033 }
21034#endif
21035 p->lex.pbeg = p->lex.pcur;
21036 token_flush(p);
21037 return;
21038 }
21039 break;
21040 case -1: /* end of script. */
21041 return;
21042 }
21043 pushback(p, c);
21044 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21045}
21046
21047#ifndef RIPPER
21048#define ambiguous_operator(tok, op, syn) ( \
21049 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21050 rb_warning0("even though it seems like "syn""))
21051#else
21052#define ambiguous_operator(tok, op, syn) \
21053 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21054#endif
21055#define warn_balanced(tok, op, syn) ((void) \
21056 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21057 space_seen && !ISSPACE(c) && \
21058 (ambiguous_operator(tok, op, syn), 0)), \
21059 (enum yytokentype)(tok))
21060
21061static enum yytokentype
21062no_digits(struct parser_params *p)
21063{
21064 yyerror0("numeric literal without digits");
21065 if (peek(p, '_')) nextc(p);
21066 /* dummy 0, for tUMINUS_NUM at numeric */
21067 return set_number_literal(p, tINTEGER, 0, 10, 0);
21068}
21069
21070static enum yytokentype
21071parse_numeric(struct parser_params *p, int c)
21072{
21073 int is_float, seen_point, seen_e, nondigit;
21074 int suffix;
21075
21076 is_float = seen_point = seen_e = nondigit = 0;
21077 SET_LEX_STATE(EXPR_END);
21078 newtok(p);
21079 if (c == '-' || c == '+') {
21080 tokadd(p, c);
21081 c = nextc(p);
21082 }
21083 if (c == '0') {
21084 int start = toklen(p);
21085 c = nextc(p);
21086 if (c == 'x' || c == 'X') {
21087 /* hexadecimal */
21088 c = nextc(p);
21089 if (c != -1 && ISXDIGIT(c)) {
21090 do {
21091 if (c == '_') {
21092 if (nondigit) break;
21093 nondigit = c;
21094 continue;
21095 }
21096 if (!ISXDIGIT(c)) break;
21097 nondigit = 0;
21098 tokadd(p, c);
21099 } while ((c = nextc(p)) != -1);
21100 }
21101 pushback(p, c);
21102 tokfix(p);
21103 if (toklen(p) == start) {
21104 return no_digits(p);
21105 }
21106 else if (nondigit) goto trailing_uc;
21107 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21108 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21109 }
21110 if (c == 'b' || c == 'B') {
21111 /* binary */
21112 c = nextc(p);
21113 if (c == '0' || c == '1') {
21114 do {
21115 if (c == '_') {
21116 if (nondigit) break;
21117 nondigit = c;
21118 continue;
21119 }
21120 if (c != '0' && c != '1') break;
21121 nondigit = 0;
21122 tokadd(p, c);
21123 } while ((c = nextc(p)) != -1);
21124 }
21125 pushback(p, c);
21126 tokfix(p);
21127 if (toklen(p) == start) {
21128 return no_digits(p);
21129 }
21130 else if (nondigit) goto trailing_uc;
21131 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21132 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21133 }
21134 if (c == 'd' || c == 'D') {
21135 /* decimal */
21136 c = nextc(p);
21137 if (c != -1 && ISDIGIT(c)) {
21138 do {
21139 if (c == '_') {
21140 if (nondigit) break;
21141 nondigit = c;
21142 continue;
21143 }
21144 if (!ISDIGIT(c)) break;
21145 nondigit = 0;
21146 tokadd(p, c);
21147 } while ((c = nextc(p)) != -1);
21148 }
21149 pushback(p, c);
21150 tokfix(p);
21151 if (toklen(p) == start) {
21152 return no_digits(p);
21153 }
21154 else if (nondigit) goto trailing_uc;
21155 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21156 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21157 }
21158 if (c == '_') {
21159 /* 0_0 */
21160 goto octal_number;
21161 }
21162 if (c == 'o' || c == 'O') {
21163 /* prefixed octal */
21164 c = nextc(p);
21165 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21166 tokfix(p);
21167 return no_digits(p);
21168 }
21169 }
21170 if (c >= '0' && c <= '7') {
21171 /* octal */
21172 octal_number:
21173 do {
21174 if (c == '_') {
21175 if (nondigit) break;
21176 nondigit = c;
21177 continue;
21178 }
21179 if (c < '0' || c > '9') break;
21180 if (c > '7') goto invalid_octal;
21181 nondigit = 0;
21182 tokadd(p, c);
21183 } while ((c = nextc(p)) != -1);
21184 if (toklen(p) > start) {
21185 pushback(p, c);
21186 tokfix(p);
21187 if (nondigit) goto trailing_uc;
21188 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21189 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21190 }
21191 if (nondigit) {
21192 pushback(p, c);
21193 goto trailing_uc;
21194 }
21195 }
21196 if (c > '7' && c <= '9') {
21197 invalid_octal:
21198 yyerror0("Invalid octal digit");
21199 }
21200 else if (c == '.' || c == 'e' || c == 'E') {
21201 tokadd(p, '0');
21202 }
21203 else {
21204 pushback(p, c);
21205 tokfix(p);
21206 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21207 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21208 }
21209 }
21210
21211 for (;;) {
21212 switch (c) {
21213 case '0': case '1': case '2': case '3': case '4':
21214 case '5': case '6': case '7': case '8': case '9':
21215 nondigit = 0;
21216 tokadd(p, c);
21217 break;
21218
21219 case '.':
21220 if (nondigit) goto trailing_uc;
21221 if (seen_point || seen_e) {
21222 goto decode_num;
21223 }
21224 else {
21225 int c0 = nextc(p);
21226 if (c0 == -1 || !ISDIGIT(c0)) {
21227 pushback(p, c0);
21228 goto decode_num;
21229 }
21230 c = c0;
21231 }
21232 seen_point = toklen(p);
21233 tokadd(p, '.');
21234 tokadd(p, c);
21235 is_float++;
21236 nondigit = 0;
21237 break;
21238
21239 case 'e':
21240 case 'E':
21241 if (nondigit) {
21242 pushback(p, c);
21243 c = nondigit;
21244 goto decode_num;
21245 }
21246 if (seen_e) {
21247 goto decode_num;
21248 }
21249 nondigit = c;
21250 c = nextc(p);
21251 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21252 pushback(p, c);
21253 c = nondigit;
21254 nondigit = 0;
21255 goto decode_num;
21256 }
21257 tokadd(p, nondigit);
21258 seen_e++;
21259 is_float++;
21260 tokadd(p, c);
21261 nondigit = (c == '-' || c == '+') ? c : 0;
21262 break;
21263
21264 case '_': /* `_' in number just ignored */
21265 if (nondigit) goto decode_num;
21266 nondigit = c;
21267 break;
21268
21269 default:
21270 goto decode_num;
21271 }
21272 c = nextc(p);
21273 }
21274
21275 decode_num:
21276 pushback(p, c);
21277 if (nondigit) {
21278 trailing_uc:
21279 literal_flush(p, p->lex.pcur - 1);
21280 YYLTYPE loc = RUBY_INIT_YYLLOC();
21281 compile_error(p, "trailing '%c' in number", nondigit);
21282 parser_show_error_line(p, &loc);
21283 }
21284 tokfix(p);
21285 if (is_float) {
21286 enum yytokentype type = tFLOAT;
21287
21288 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21289 if (suffix & NUM_SUFFIX_R) {
21290 type = tRATIONAL;
21291 }
21292 else {
21293 strtod(tok(p), 0);
21294 if (errno == ERANGE) {
21295 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21296 errno = 0;
21297 }
21298 }
21299 return set_number_literal(p, type, suffix, 0, seen_point);
21300 }
21301 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21302 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21303}
21304
21305static enum yytokentype
21306parse_qmark(struct parser_params *p, int space_seen)
21307{
21308 rb_encoding *enc;
21309 register int c;
21310 rb_parser_string_t *lit;
21311 const char *start = p->lex.pcur;
21312
21313 if (IS_END()) {
21314 SET_LEX_STATE(EXPR_VALUE);
21315 return '?';
21316 }
21317 c = nextc(p);
21318 if (c == -1) {
21319 compile_error(p, "incomplete character syntax");
21320 return 0;
21321 }
21322 if (rb_enc_isspace(c, p->enc)) {
21323 if (!IS_ARG()) {
21324 int c2 = escaped_control_code(c);
21325 if (c2) {
21326 WARN_SPACE_CHAR(c2, "?");
21327 }
21328 }
21329 ternary:
21330 pushback(p, c);
21331 SET_LEX_STATE(EXPR_VALUE);
21332 return '?';
21333 }
21334 newtok(p);
21335 enc = p->enc;
21336 int w = parser_precise_mbclen(p, start);
21337 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21338 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21339 if (space_seen) {
21340 const char *ptr = start;
21341 do {
21342 int n = parser_precise_mbclen(p, ptr);
21343 if (n < 0) return -1;
21344 ptr += n;
21345 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21346 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21347 " a conditional operator, put a space after '?'",
21348 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21349 }
21350 goto ternary;
21351 }
21352 else if (c == '\\') {
21353 if (peek(p, 'u')) {
21354 nextc(p);
21355 enc = rb_utf8_encoding();
21356 tokadd_utf8(p, &enc, -1, 0, 0);
21357 }
21358 else if (!ISASCII(c = peekc(p)) && c != -1) {
21359 nextc(p);
21360 if (tokadd_mbchar(p, c) == -1) return 0;
21361 }
21362 else {
21363 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21364 tokadd(p, c);
21365 }
21366 }
21367 else {
21368 if (tokadd_mbchar(p, c) == -1) return 0;
21369 }
21370 tokfix(p);
21371 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21372 set_yylval_str(lit);
21373 SET_LEX_STATE(EXPR_END);
21374 return tCHAR;
21375}
21376
21377static enum yytokentype
21378parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21379{
21380 register int c;
21381 const char *ptok = p->lex.pcur;
21382
21383 if (IS_BEG()) {
21384 int term;
21385 int paren;
21386
21387 c = nextc(p);
21388 quotation:
21389 if (c == -1) goto unterminated;
21390 if (!ISALNUM(c)) {
21391 term = c;
21392 if (!ISASCII(c)) goto unknown;
21393 c = 'Q';
21394 }
21395 else {
21396 term = nextc(p);
21397 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21398 unknown:
21399 pushback(p, term);
21400 c = parser_precise_mbclen(p, p->lex.pcur);
21401 if (c < 0) return 0;
21402 p->lex.pcur += c;
21403 yyerror0("unknown type of %string");
21404 return 0;
21405 }
21406 }
21407 if (term == -1) {
21408 unterminated:
21409 compile_error(p, "unterminated quoted string meets end of file");
21410 return 0;
21411 }
21412 paren = term;
21413 if (term == '(') term = ')';
21414 else if (term == '[') term = ']';
21415 else if (term == '{') term = '}';
21416 else if (term == '<') term = '>';
21417 else paren = 0;
21418
21419 p->lex.ptok = ptok-1;
21420 switch (c) {
21421 case 'Q':
21422 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21423 return tSTRING_BEG;
21424
21425 case 'q':
21426 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21427 return tSTRING_BEG;
21428
21429 case 'W':
21430 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21431 return tWORDS_BEG;
21432
21433 case 'w':
21434 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21435 return tQWORDS_BEG;
21436
21437 case 'I':
21438 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21439 return tSYMBOLS_BEG;
21440
21441 case 'i':
21442 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21443 return tQSYMBOLS_BEG;
21444
21445 case 'x':
21446 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21447 return tXSTRING_BEG;
21448
21449 case 'r':
21450 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21451 return tREGEXP_BEG;
21452
21453 case 's':
21454 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21455 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21456 return tSYMBEG;
21457
21458 default:
21459 yyerror0("unknown type of %string");
21460 return 0;
21461 }
21462 }
21463 if ((c = nextc(p)) == '=') {
21464 set_yylval_id('%');
21465 SET_LEX_STATE(EXPR_BEG);
21466 return tOP_ASGN;
21467 }
21468 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21469 goto quotation;
21470 }
21471 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21472 pushback(p, c);
21473 return warn_balanced('%', "%%", "string literal");
21474}
21475
21476static int
21477tokadd_ident(struct parser_params *p, int c)
21478{
21479 do {
21480 if (tokadd_mbchar(p, c) == -1) return -1;
21481 c = nextc(p);
21482 } while (parser_is_identchar(p));
21483 pushback(p, c);
21484 return 0;
21485}
21486
21487static ID
21488tokenize_ident(struct parser_params *p)
21489{
21490 ID ident = TOK_INTERN();
21491
21492 set_yylval_name(ident);
21493
21494 return ident;
21495}
21496
21497static int
21498parse_numvar(struct parser_params *p)
21499{
21500 size_t len;
21501 int overflow;
21502 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21503 const unsigned long nth_ref_max =
21505 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21506 * turned into a Fixnum, in compile.c */
21507
21508 if (overflow || n > nth_ref_max) {
21509 /* compile_error()? */
21510 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21511 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21512 }
21513 else {
21514 return (int)n;
21515 }
21516}
21517
21518static enum yytokentype
21519parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21520{
21521 const char *ptr = p->lex.pcur;
21522 register int c;
21523
21524 SET_LEX_STATE(EXPR_END);
21525 p->lex.ptok = ptr - 1; /* from '$' */
21526 newtok(p);
21527 c = nextc(p);
21528 switch (c) {
21529 case '_': /* $_: last read line string */
21530 c = nextc(p);
21531 if (parser_is_identchar(p)) {
21532 tokadd(p, '$');
21533 tokadd(p, '_');
21534 break;
21535 }
21536 pushback(p, c);
21537 c = '_';
21538 /* fall through */
21539 case '~': /* $~: match-data */
21540 case '*': /* $*: argv */
21541 case '$': /* $$: pid */
21542 case '?': /* $?: last status */
21543 case '!': /* $!: error string */
21544 case '@': /* $@: error position */
21545 case '/': /* $/: input record separator */
21546 case '\\': /* $\: output record separator */
21547 case ';': /* $;: field separator */
21548 case ',': /* $,: output field separator */
21549 case '.': /* $.: last read line number */
21550 case '=': /* $=: ignorecase */
21551 case ':': /* $:: load path */
21552 case '<': /* $<: default input handle */
21553 case '>': /* $>: default output handle */
21554 case '\"': /* $": already loaded files */
21555 tokadd(p, '$');
21556 tokadd(p, c);
21557 goto gvar;
21558
21559 case '-':
21560 tokadd(p, '$');
21561 tokadd(p, c);
21562 c = nextc(p);
21563 if (parser_is_identchar(p)) {
21564 if (tokadd_mbchar(p, c) == -1) return 0;
21565 }
21566 else {
21567 pushback(p, c);
21568 pushback(p, '-');
21569 return '$';
21570 }
21571 gvar:
21572 tokenize_ident(p);
21573 return tGVAR;
21574
21575 case '&': /* $&: last match */
21576 case '`': /* $`: string before last match */
21577 case '\'': /* $': string after last match */
21578 case '+': /* $+: string matches last paren. */
21579 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21580 tokadd(p, '$');
21581 tokadd(p, c);
21582 goto gvar;
21583 }
21584 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21585 return tBACK_REF;
21586
21587 case '1': case '2': case '3':
21588 case '4': case '5': case '6':
21589 case '7': case '8': case '9':
21590 tokadd(p, '$');
21591 do {
21592 tokadd(p, c);
21593 c = nextc(p);
21594 } while (c != -1 && ISDIGIT(c));
21595 pushback(p, c);
21596 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21597 tokfix(p);
21598 c = parse_numvar(p);
21599 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21600 return tNTH_REF;
21601
21602 default:
21603 if (!parser_is_identchar(p)) {
21604 YYLTYPE loc = RUBY_INIT_YYLLOC();
21605 if (c == -1 || ISSPACE(c)) {
21606 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21607 }
21608 else {
21609 pushback(p, c);
21610 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21611 }
21612 parser_show_error_line(p, &loc);
21613 set_yylval_noname();
21614 return tGVAR;
21615 }
21616 /* fall through */
21617 case '0':
21618 tokadd(p, '$');
21619 }
21620
21621 if (tokadd_ident(p, c)) return 0;
21622 SET_LEX_STATE(EXPR_END);
21623 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21624 tokenize_ident(p);
21625 }
21626 else {
21627 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21628 set_yylval_noname();
21629 }
21630 return tGVAR;
21631}
21632
21633static bool
21634parser_numbered_param(struct parser_params *p, int n)
21635{
21636 if (n < 0) return false;
21637
21638 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21639 return false;
21640 }
21641 if (p->max_numparam == ORDINAL_PARAM) {
21642 compile_error(p, "ordinary parameter is defined");
21643 return false;
21644 }
21645 struct vtable *args = p->lvtbl->args;
21646 if (p->max_numparam < n) {
21647 p->max_numparam = n;
21648 }
21649 while (n > args->pos) {
21650 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21651 }
21652 return true;
21653}
21654
21655static enum yytokentype
21656parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21657{
21658 const char *ptr = p->lex.pcur;
21659 enum yytokentype result = tIVAR;
21660 register int c = nextc(p);
21661 YYLTYPE loc;
21662
21663 p->lex.ptok = ptr - 1; /* from '@' */
21664 newtok(p);
21665 tokadd(p, '@');
21666 if (c == '@') {
21667 result = tCVAR;
21668 tokadd(p, '@');
21669 c = nextc(p);
21670 }
21671 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21672 if (c == -1 || !parser_is_identchar(p)) {
21673 pushback(p, c);
21674 RUBY_SET_YYLLOC(loc);
21675 if (result == tIVAR) {
21676 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21677 }
21678 else {
21679 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21680 }
21681 parser_show_error_line(p, &loc);
21682 set_yylval_noname();
21683 SET_LEX_STATE(EXPR_END);
21684 return result;
21685 }
21686 else if (ISDIGIT(c)) {
21687 pushback(p, c);
21688 RUBY_SET_YYLLOC(loc);
21689 if (result == tIVAR) {
21690 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21691 }
21692 else {
21693 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21694 }
21695 parser_show_error_line(p, &loc);
21696 set_yylval_noname();
21697 SET_LEX_STATE(EXPR_END);
21698 return result;
21699 }
21700
21701 if (tokadd_ident(p, c)) return 0;
21702 tokenize_ident(p);
21703 return result;
21704}
21705
21706static enum yytokentype
21707parse_ident(struct parser_params *p, int c, int cmd_state)
21708{
21709 enum yytokentype result;
21710 bool is_ascii = true;
21711 const enum lex_state_e last_state = p->lex.state;
21712 ID ident;
21713 int enforce_keyword_end = 0;
21714
21715 do {
21716 if (!ISASCII(c)) is_ascii = false;
21717 if (tokadd_mbchar(p, c) == -1) return 0;
21718 c = nextc(p);
21719 } while (parser_is_identchar(p));
21720 if ((c == '!' || c == '?') && !peek(p, '=')) {
21721 result = tFID;
21722 tokadd(p, c);
21723 }
21724 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21725 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21726 result = tIDENTIFIER;
21727 tokadd(p, c);
21728 }
21729 else {
21730 result = tCONSTANT; /* assume provisionally */
21731 pushback(p, c);
21732 }
21733 tokfix(p);
21734
21735 if (IS_LABEL_POSSIBLE()) {
21736 if (IS_LABEL_SUFFIX(0)) {
21737 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21738 nextc(p);
21739 tokenize_ident(p);
21740 return tLABEL;
21741 }
21742 }
21743
21744#ifndef RIPPER
21745 if (peek_end_expect_token_locations(p)) {
21746 const rb_code_position_t *end_pos;
21747 int lineno, column;
21748 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21749
21750 end_pos = peek_end_expect_token_locations(p)->pos;
21751 lineno = end_pos->lineno;
21752 column = end_pos->column;
21753
21754 if (p->debug) {
21755 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21756 p->ruby_sourceline, beg_pos, lineno, column);
21757 }
21758
21759 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21760 const struct kwtable *kw;
21761
21762 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21763 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21764 enforce_keyword_end = 1;
21765 }
21766 }
21767 }
21768#endif
21769
21770 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21771 const struct kwtable *kw;
21772
21773 /* See if it is a reserved word. */
21774 kw = rb_reserved_word(tok(p), toklen(p));
21775 if (kw) {
21776 enum lex_state_e state = p->lex.state;
21777 if (IS_lex_state_for(state, EXPR_FNAME)) {
21778 SET_LEX_STATE(EXPR_ENDFN);
21779 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21780 return kw->id[0];
21781 }
21782 SET_LEX_STATE(kw->state);
21783 if (IS_lex_state(EXPR_BEG)) {
21784 p->command_start = TRUE;
21785 }
21786 if (kw->id[0] == keyword_do) {
21787 if (lambda_beginning_p()) {
21788 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21789 return keyword_do_LAMBDA;
21790 }
21791 if (COND_P()) return keyword_do_cond;
21792 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21793 return keyword_do_block;
21794 return keyword_do;
21795 }
21796 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21797 return kw->id[0];
21798 else {
21799 if (kw->id[0] != kw->id[1])
21800 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21801 return kw->id[1];
21802 }
21803 }
21804 }
21805
21806 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21807 if (cmd_state) {
21808 SET_LEX_STATE(EXPR_CMDARG);
21809 }
21810 else {
21811 SET_LEX_STATE(EXPR_ARG);
21812 }
21813 }
21814 else if (p->lex.state == EXPR_FNAME) {
21815 SET_LEX_STATE(EXPR_ENDFN);
21816 }
21817 else {
21818 SET_LEX_STATE(EXPR_END);
21819 }
21820
21821 ident = tokenize_ident(p);
21822 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21823 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21824 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21825 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21826 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21827 }
21828 return result;
21829}
21830
21831static void
21832warn_cr(struct parser_params *p)
21833{
21834 if (!p->cr_seen) {
21835 p->cr_seen = TRUE;
21836 /* carried over with p->lex.nextline for nextc() */
21837 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21838 }
21839}
21840
21841static enum yytokentype
21842parser_yylex(struct parser_params *p)
21843{
21844 register int c;
21845 int space_seen = 0;
21846 int cmd_state;
21847 int label;
21848 enum lex_state_e last_state;
21849 int fallthru = FALSE;
21850 int token_seen = p->token_seen;
21851
21852 if (p->lex.strterm) {
21853 if (strterm_is_heredoc(p->lex.strterm)) {
21854 token_flush(p);
21855 return here_document(p, &p->lex.strterm->u.heredoc);
21856 }
21857 else {
21858 token_flush(p);
21859 return parse_string(p, &p->lex.strterm->u.literal);
21860 }
21861 }
21862 cmd_state = p->command_start;
21863 p->command_start = FALSE;
21864 p->token_seen = TRUE;
21865#ifndef RIPPER
21866 token_flush(p);
21867#endif
21868 retry:
21869 last_state = p->lex.state;
21870 switch (c = nextc(p)) {
21871 case '\0': /* NUL */
21872 case '\004': /* ^D */
21873 case '\032': /* ^Z */
21874 case -1: /* end of script. */
21875 p->eofp = 1;
21876#ifndef RIPPER
21877 if (p->end_expect_token_locations) {
21878 pop_end_expect_token_locations(p);
21879 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21880 return tDUMNY_END;
21881 }
21882#endif
21883 /* Set location for end-of-input because dispatch_scan_event is not called. */
21884 RUBY_SET_YYLLOC(*p->yylloc);
21885 return END_OF_INPUT;
21886
21887 /* white spaces */
21888 case '\r':
21889 warn_cr(p);
21890 /* fall through */
21891 case ' ': case '\t': case '\f':
21892 case '\13': /* '\v' */
21893 space_seen = 1;
21894 while ((c = nextc(p))) {
21895 switch (c) {
21896 case '\r':
21897 warn_cr(p);
21898 /* fall through */
21899 case ' ': case '\t': case '\f':
21900 case '\13': /* '\v' */
21901 break;
21902 default:
21903 goto outofloop;
21904 }
21905 }
21906 outofloop:
21907 pushback(p, c);
21908 dispatch_scan_event(p, tSP);
21909#ifndef RIPPER
21910 token_flush(p);
21911#endif
21912 goto retry;
21913
21914 case '#': /* it's a comment */
21915 p->token_seen = token_seen;
21916 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21917 /* no magic_comment in shebang line */
21918 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21919 if (comment_at_top(p)) {
21920 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21921 }
21922 }
21923 p->lex.pcur = pcur, p->lex.ptok = ptok;
21924 lex_goto_eol(p);
21925 dispatch_scan_event(p, tCOMMENT);
21926 fallthru = TRUE;
21927 /* fall through */
21928 case '\n':
21929 p->token_seen = token_seen;
21930 rb_parser_string_t *prevline = p->lex.lastline;
21931 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21932 !IS_lex_state(EXPR_LABELED));
21933 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21934 if (!fallthru) {
21935 dispatch_scan_event(p, tIGNORED_NL);
21936 }
21937 fallthru = FALSE;
21938 if (!c && p->ctxt.in_kwarg) {
21939 goto normal_newline;
21940 }
21941 goto retry;
21942 }
21943 while (1) {
21944 switch (c = nextc(p)) {
21945 case ' ': case '\t': case '\f': case '\r':
21946 case '\13': /* '\v' */
21947 space_seen = 1;
21948 break;
21949 case '#':
21950 pushback(p, c);
21951 if (space_seen) {
21952 dispatch_scan_event(p, tSP);
21953 token_flush(p);
21954 }
21955 goto retry;
21956 case 'a':
21957 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
21958 goto bol;
21959 case 'o':
21960 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
21961 goto bol;
21962 case '|':
21963 if (peek(p, '|')) goto leading_logical;
21964 goto bol;
21965 case '&':
21966 if (peek(p, '&')) {
21967 leading_logical:
21968 pushback(p, c);
21969 dispatch_delayed_token(p, tIGNORED_NL);
21970 cmd_state = FALSE;
21971 goto retry;
21972 }
21973 /* fall through */
21974 case '.': {
21975 dispatch_delayed_token(p, tIGNORED_NL);
21976 if (peek(p, '.') == (c == '&')) {
21977 pushback(p, c);
21978 dispatch_scan_event(p, tSP);
21979 goto retry;
21980 }
21981 }
21982 bol:
21983 default:
21984 p->ruby_sourceline--;
21985 p->lex.nextline = p->lex.lastline;
21986 set_lastline(p, prevline);
21987 case -1: /* EOF no decrement*/
21988 if (c == -1 && space_seen) {
21989 dispatch_scan_event(p, tSP);
21990 }
21991 lex_goto_eol(p);
21992 if (c != -1) {
21993 token_flush(p);
21994 RUBY_SET_YYLLOC(*p->yylloc);
21995 }
21996 goto normal_newline;
21997 }
21998 }
21999 normal_newline:
22000 p->command_start = TRUE;
22001 SET_LEX_STATE(EXPR_BEG);
22002 return '\n';
22003
22004 case '*':
22005 if ((c = nextc(p)) == '*') {
22006 if ((c = nextc(p)) == '=') {
22007 set_yylval_id(idPow);
22008 SET_LEX_STATE(EXPR_BEG);
22009 return tOP_ASGN;
22010 }
22011 pushback(p, c);
22012 if (IS_SPCARG(c)) {
22013 rb_warning0("'**' interpreted as argument prefix");
22014 c = tDSTAR;
22015 }
22016 else if (IS_BEG()) {
22017 c = tDSTAR;
22018 }
22019 else {
22020 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22021 }
22022 }
22023 else {
22024 if (c == '=') {
22025 set_yylval_id('*');
22026 SET_LEX_STATE(EXPR_BEG);
22027 return tOP_ASGN;
22028 }
22029 pushback(p, c);
22030 if (IS_SPCARG(c)) {
22031 rb_warning0("'*' interpreted as argument prefix");
22032 c = tSTAR;
22033 }
22034 else if (IS_BEG()) {
22035 c = tSTAR;
22036 }
22037 else {
22038 c = warn_balanced('*', "*", "argument prefix");
22039 }
22040 }
22041 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22042 return c;
22043
22044 case '!':
22045 c = nextc(p);
22046 if (IS_AFTER_OPERATOR()) {
22047 SET_LEX_STATE(EXPR_ARG);
22048 if (c == '@') {
22049 return '!';
22050 }
22051 }
22052 else {
22053 SET_LEX_STATE(EXPR_BEG);
22054 }
22055 if (c == '=') {
22056 return tNEQ;
22057 }
22058 if (c == '~') {
22059 return tNMATCH;
22060 }
22061 pushback(p, c);
22062 return '!';
22063
22064 case '=':
22065 if (was_bol(p)) {
22066 /* skip embedded rd document */
22067 if (word_match_p(p, "begin", 5)) {
22068 int first_p = TRUE;
22069
22070 lex_goto_eol(p);
22071 dispatch_scan_event(p, tEMBDOC_BEG);
22072 for (;;) {
22073 lex_goto_eol(p);
22074 if (!first_p) {
22075 dispatch_scan_event(p, tEMBDOC);
22076 }
22077 first_p = FALSE;
22078 c = nextc(p);
22079 if (c == -1) {
22080 compile_error(p, "embedded document meets end of file");
22081 return END_OF_INPUT;
22082 }
22083 if (c == '=' && word_match_p(p, "end", 3)) {
22084 break;
22085 }
22086 pushback(p, c);
22087 }
22088 lex_goto_eol(p);
22089 dispatch_scan_event(p, tEMBDOC_END);
22090 goto retry;
22091 }
22092 }
22093
22094 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22095 if ((c = nextc(p)) == '=') {
22096 if ((c = nextc(p)) == '=') {
22097 return tEQQ;
22098 }
22099 pushback(p, c);
22100 return tEQ;
22101 }
22102 if (c == '~') {
22103 return tMATCH;
22104 }
22105 else if (c == '>') {
22106 return tASSOC;
22107 }
22108 pushback(p, c);
22109 return '=';
22110
22111 case '<':
22112 c = nextc(p);
22113 if (c == '<' &&
22114 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22115 !IS_END() &&
22116 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22117 enum yytokentype token = heredoc_identifier(p);
22118 if (token) return token < 0 ? 0 : token;
22119 }
22120 if (IS_AFTER_OPERATOR()) {
22121 SET_LEX_STATE(EXPR_ARG);
22122 }
22123 else {
22124 if (IS_lex_state(EXPR_CLASS))
22125 p->command_start = TRUE;
22126 SET_LEX_STATE(EXPR_BEG);
22127 }
22128 if (c == '=') {
22129 if ((c = nextc(p)) == '>') {
22130 return tCMP;
22131 }
22132 pushback(p, c);
22133 return tLEQ;
22134 }
22135 if (c == '<') {
22136 if ((c = nextc(p)) == '=') {
22137 set_yylval_id(idLTLT);
22138 SET_LEX_STATE(EXPR_BEG);
22139 return tOP_ASGN;
22140 }
22141 pushback(p, c);
22142 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22143 }
22144 pushback(p, c);
22145 return '<';
22146
22147 case '>':
22148 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22149 if ((c = nextc(p)) == '=') {
22150 return tGEQ;
22151 }
22152 if (c == '>') {
22153 if ((c = nextc(p)) == '=') {
22154 set_yylval_id(idGTGT);
22155 SET_LEX_STATE(EXPR_BEG);
22156 return tOP_ASGN;
22157 }
22158 pushback(p, c);
22159 return tRSHFT;
22160 }
22161 pushback(p, c);
22162 return '>';
22163
22164 case '"':
22165 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22166 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22167 p->lex.ptok = p->lex.pcur-1;
22168 return tSTRING_BEG;
22169
22170 case '`':
22171 if (IS_lex_state(EXPR_FNAME)) {
22172 SET_LEX_STATE(EXPR_ENDFN);
22173 return c;
22174 }
22175 if (IS_lex_state(EXPR_DOT)) {
22176 if (cmd_state)
22177 SET_LEX_STATE(EXPR_CMDARG);
22178 else
22179 SET_LEX_STATE(EXPR_ARG);
22180 return c;
22181 }
22182 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22183 return tXSTRING_BEG;
22184
22185 case '\'':
22186 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22187 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22188 p->lex.ptok = p->lex.pcur-1;
22189 return tSTRING_BEG;
22190
22191 case '?':
22192 return parse_qmark(p, space_seen);
22193
22194 case '&':
22195 if ((c = nextc(p)) == '&') {
22196 SET_LEX_STATE(EXPR_BEG);
22197 if ((c = nextc(p)) == '=') {
22198 set_yylval_id(idANDOP);
22199 SET_LEX_STATE(EXPR_BEG);
22200 return tOP_ASGN;
22201 }
22202 pushback(p, c);
22203 return tANDOP;
22204 }
22205 else if (c == '=') {
22206 set_yylval_id('&');
22207 SET_LEX_STATE(EXPR_BEG);
22208 return tOP_ASGN;
22209 }
22210 else if (c == '.') {
22211 set_yylval_id(idANDDOT);
22212 SET_LEX_STATE(EXPR_DOT);
22213 return tANDDOT;
22214 }
22215 pushback(p, c);
22216 if (IS_SPCARG(c)) {
22217 if ((c != ':') ||
22218 (c = peekc_n(p, 1)) == -1 ||
22219 !(c == '\'' || c == '"' ||
22220 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22221 rb_warning0("'&' interpreted as argument prefix");
22222 }
22223 c = tAMPER;
22224 }
22225 else if (IS_BEG()) {
22226 c = tAMPER;
22227 }
22228 else {
22229 c = warn_balanced('&', "&", "argument prefix");
22230 }
22231 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22232 return c;
22233
22234 case '|':
22235 if ((c = nextc(p)) == '|') {
22236 SET_LEX_STATE(EXPR_BEG);
22237 if ((c = nextc(p)) == '=') {
22238 set_yylval_id(idOROP);
22239 SET_LEX_STATE(EXPR_BEG);
22240 return tOP_ASGN;
22241 }
22242 pushback(p, c);
22243 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22244 c = '|';
22245 pushback(p, '|');
22246 return c;
22247 }
22248 return tOROP;
22249 }
22250 if (c == '=') {
22251 set_yylval_id('|');
22252 SET_LEX_STATE(EXPR_BEG);
22253 return tOP_ASGN;
22254 }
22255 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22256 pushback(p, c);
22257 return '|';
22258
22259 case '+':
22260 c = nextc(p);
22261 if (IS_AFTER_OPERATOR()) {
22262 SET_LEX_STATE(EXPR_ARG);
22263 if (c == '@') {
22264 return tUPLUS;
22265 }
22266 pushback(p, c);
22267 return '+';
22268 }
22269 if (c == '=') {
22270 set_yylval_id('+');
22271 SET_LEX_STATE(EXPR_BEG);
22272 return tOP_ASGN;
22273 }
22274 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22275 SET_LEX_STATE(EXPR_BEG);
22276 pushback(p, c);
22277 if (c != -1 && ISDIGIT(c)) {
22278 return parse_numeric(p, '+');
22279 }
22280 return tUPLUS;
22281 }
22282 SET_LEX_STATE(EXPR_BEG);
22283 pushback(p, c);
22284 return warn_balanced('+', "+", "unary operator");
22285
22286 case '-':
22287 c = nextc(p);
22288 if (IS_AFTER_OPERATOR()) {
22289 SET_LEX_STATE(EXPR_ARG);
22290 if (c == '@') {
22291 return tUMINUS;
22292 }
22293 pushback(p, c);
22294 return '-';
22295 }
22296 if (c == '=') {
22297 set_yylval_id('-');
22298 SET_LEX_STATE(EXPR_BEG);
22299 return tOP_ASGN;
22300 }
22301 if (c == '>') {
22302 SET_LEX_STATE(EXPR_ENDFN);
22303 yylval.num = p->lex.lpar_beg;
22304 p->lex.lpar_beg = p->lex.paren_nest;
22305 return tLAMBDA;
22306 }
22307 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22308 SET_LEX_STATE(EXPR_BEG);
22309 pushback(p, c);
22310 if (c != -1 && ISDIGIT(c)) {
22311 return tUMINUS_NUM;
22312 }
22313 return tUMINUS;
22314 }
22315 SET_LEX_STATE(EXPR_BEG);
22316 pushback(p, c);
22317 return warn_balanced('-', "-", "unary operator");
22318
22319 case '.': {
22320 int is_beg = IS_BEG();
22321 SET_LEX_STATE(EXPR_BEG);
22322 if ((c = nextc(p)) == '.') {
22323 if ((c = nextc(p)) == '.') {
22324 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22325 SET_LEX_STATE(EXPR_ENDARG);
22326 return tBDOT3;
22327 }
22328 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22329 rb_warn0("... at EOL, should be parenthesized?");
22330 }
22331 return is_beg ? tBDOT3 : tDOT3;
22332 }
22333 pushback(p, c);
22334 return is_beg ? tBDOT2 : tDOT2;
22335 }
22336 pushback(p, c);
22337 if (c != -1 && ISDIGIT(c)) {
22338 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22339 parse_numeric(p, '.');
22340 if (ISDIGIT(prev)) {
22341 yyerror0("unexpected fraction part after numeric literal");
22342 }
22343 else {
22344 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22345 }
22346 SET_LEX_STATE(EXPR_END);
22347 p->lex.ptok = p->lex.pcur;
22348 goto retry;
22349 }
22350 set_yylval_id('.');
22351 SET_LEX_STATE(EXPR_DOT);
22352 return '.';
22353 }
22354
22355 case '0': case '1': case '2': case '3': case '4':
22356 case '5': case '6': case '7': case '8': case '9':
22357 return parse_numeric(p, c);
22358
22359 case ')':
22360 COND_POP();
22361 CMDARG_POP();
22362 SET_LEX_STATE(EXPR_ENDFN);
22363 p->lex.paren_nest--;
22364 return c;
22365
22366 case ']':
22367 COND_POP();
22368 CMDARG_POP();
22369 SET_LEX_STATE(EXPR_END);
22370 p->lex.paren_nest--;
22371 return c;
22372
22373 case '}':
22374 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22375 if (!p->lex.brace_nest--) return tSTRING_DEND;
22376 COND_POP();
22377 CMDARG_POP();
22378 SET_LEX_STATE(EXPR_END);
22379 p->lex.paren_nest--;
22380 return c;
22381
22382 case ':':
22383 c = nextc(p);
22384 if (c == ':') {
22385 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22386 SET_LEX_STATE(EXPR_BEG);
22387 return tCOLON3;
22388 }
22389 set_yylval_id(idCOLON2);
22390 SET_LEX_STATE(EXPR_DOT);
22391 return tCOLON2;
22392 }
22393 if (IS_END() || ISSPACE(c) || c == '#') {
22394 pushback(p, c);
22395 c = warn_balanced(':', ":", "symbol literal");
22396 SET_LEX_STATE(EXPR_BEG);
22397 return c;
22398 }
22399 switch (c) {
22400 case '\'':
22401 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22402 break;
22403 case '"':
22404 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22405 break;
22406 default:
22407 pushback(p, c);
22408 break;
22409 }
22410 SET_LEX_STATE(EXPR_FNAME);
22411 return tSYMBEG;
22412
22413 case '/':
22414 if (IS_BEG()) {
22415 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22416 return tREGEXP_BEG;
22417 }
22418 if ((c = nextc(p)) == '=') {
22419 set_yylval_id('/');
22420 SET_LEX_STATE(EXPR_BEG);
22421 return tOP_ASGN;
22422 }
22423 pushback(p, c);
22424 if (IS_SPCARG(c)) {
22425 arg_ambiguous(p, '/');
22426 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22427 return tREGEXP_BEG;
22428 }
22429 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22430 return warn_balanced('/', "/", "regexp literal");
22431
22432 case '^':
22433 if ((c = nextc(p)) == '=') {
22434 set_yylval_id('^');
22435 SET_LEX_STATE(EXPR_BEG);
22436 return tOP_ASGN;
22437 }
22438 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22439 pushback(p, c);
22440 return '^';
22441
22442 case ';':
22443 SET_LEX_STATE(EXPR_BEG);
22444 p->command_start = TRUE;
22445 return ';';
22446
22447 case ',':
22448 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22449 return ',';
22450
22451 case '~':
22452 if (IS_AFTER_OPERATOR()) {
22453 if ((c = nextc(p)) != '@') {
22454 pushback(p, c);
22455 }
22456 SET_LEX_STATE(EXPR_ARG);
22457 }
22458 else {
22459 SET_LEX_STATE(EXPR_BEG);
22460 }
22461 return '~';
22462
22463 case '(':
22464 if (IS_BEG()) {
22465 c = tLPAREN;
22466 }
22467 else if (!space_seen) {
22468 /* foo( ... ) => method call, no ambiguity */
22469 }
22470 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22471 c = tLPAREN_ARG;
22472 }
22473 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22474 rb_warning0("parentheses after method name is interpreted as "
22475 "an argument list, not a decomposed argument");
22476 }
22477 p->lex.paren_nest++;
22478 COND_PUSH(0);
22479 CMDARG_PUSH(0);
22480 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22481 return c;
22482
22483 case '[':
22484 p->lex.paren_nest++;
22485 if (IS_AFTER_OPERATOR()) {
22486 if ((c = nextc(p)) == ']') {
22487 p->lex.paren_nest--;
22488 SET_LEX_STATE(EXPR_ARG);
22489 if ((c = nextc(p)) == '=') {
22490 return tASET;
22491 }
22492 pushback(p, c);
22493 return tAREF;
22494 }
22495 pushback(p, c);
22496 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22497 return '[';
22498 }
22499 else if (IS_BEG()) {
22500 c = tLBRACK;
22501 }
22502 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22503 c = tLBRACK;
22504 }
22505 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22506 COND_PUSH(0);
22507 CMDARG_PUSH(0);
22508 return c;
22509
22510 case '{':
22511 ++p->lex.brace_nest;
22512 if (lambda_beginning_p())
22513 c = tLAMBEG;
22514 else if (IS_lex_state(EXPR_LABELED))
22515 c = tLBRACE; /* hash */
22516 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22517 c = '{'; /* block (primary) */
22518 else if (IS_lex_state(EXPR_ENDARG))
22519 c = tLBRACE_ARG; /* block (expr) */
22520 else
22521 c = tLBRACE; /* hash */
22522 if (c != tLBRACE) {
22523 p->command_start = TRUE;
22524 SET_LEX_STATE(EXPR_BEG);
22525 }
22526 else {
22527 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22528 }
22529 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22530 COND_PUSH(0);
22531 CMDARG_PUSH(0);
22532 return c;
22533
22534 case '\\':
22535 c = nextc(p);
22536 if (c == '\n') {
22537 space_seen = 1;
22538 dispatch_scan_event(p, tSP);
22539 goto retry; /* skip \\n */
22540 }
22541 if (c == ' ') return tSP;
22542 if (ISSPACE(c)) return c;
22543 pushback(p, c);
22544 return '\\';
22545
22546 case '%':
22547 return parse_percent(p, space_seen, last_state);
22548
22549 case '$':
22550 return parse_gvar(p, last_state);
22551
22552 case '@':
22553 return parse_atmark(p, last_state);
22554
22555 case '_':
22556 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22557 p->ruby__end__seen = 1;
22558 p->eofp = 1;
22559#ifdef RIPPER
22560 lex_goto_eol(p);
22561 dispatch_scan_event(p, k__END__);
22562#endif
22563 return END_OF_INPUT;
22564 }
22565 newtok(p);
22566 break;
22567
22568 default:
22569 if (!parser_is_identchar(p)) {
22570 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22571 token_flush(p);
22572 goto retry;
22573 }
22574
22575 newtok(p);
22576 break;
22577 }
22578
22579 return parse_ident(p, c, cmd_state);
22580}
22581
22582static enum yytokentype
22583yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22584{
22585 enum yytokentype t;
22586
22587 p->lval = lval;
22588 lval->node = 0;
22589 p->yylloc = yylloc;
22590
22591 t = parser_yylex(p);
22592
22593 if (has_delayed_token(p))
22594 dispatch_delayed_token(p, t);
22595 else if (t != END_OF_INPUT)
22596 dispatch_scan_event(p, t);
22597
22598 return t;
22599}
22600
22601#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22602
22603static NODE*
22604node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22605{
22606 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22607
22608 rb_node_init(n, type);
22609 return n;
22610}
22611
22612static NODE *
22613nd_set_loc(NODE *nd, const YYLTYPE *loc)
22614{
22615 nd->nd_loc = *loc;
22616 nd_set_line(nd, loc->beg_pos.lineno);
22617 return nd;
22618}
22619
22620static NODE*
22621node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22622{
22623 NODE *n = node_new_internal(p, type, size, alignment);
22624
22625 nd_set_loc(n, loc);
22626 nd_set_node_id(n, parser_get_node_id(p));
22627 return n;
22628}
22629
22630#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22631
22632static rb_node_scope_t *
22633rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
22634{
22635 rb_ast_id_table_t *nd_tbl;
22636 nd_tbl = local_tbl(p);
22637 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22638 n->nd_tbl = nd_tbl;
22639 n->nd_body = nd_body;
22640 n->nd_parent = nd_parent;
22641 n->nd_args = nd_args;
22642
22643 return n;
22644}
22645
22646static rb_node_scope_t *
22647rb_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)
22648{
22649 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22650 n->nd_tbl = nd_tbl;
22651 n->nd_body = nd_body;
22652 n->nd_parent = nd_parent;
22653 n->nd_args = nd_args;
22654
22655 return n;
22656}
22657
22658static rb_node_defn_t *
22659rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22660{
22661 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22662 n->nd_mid = nd_mid;
22663 n->nd_defn = nd_defn;
22664
22665 return n;
22666}
22667
22668static rb_node_defs_t *
22669rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22670{
22671 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22672 n->nd_recv = nd_recv;
22673 n->nd_mid = nd_mid;
22674 n->nd_defn = nd_defn;
22675
22676 return n;
22677}
22678
22679static rb_node_block_t *
22680rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22681{
22682 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22683 n->nd_head = nd_head;
22684 n->nd_end = (NODE *)n;
22685 n->nd_next = 0;
22686
22687 return n;
22688}
22689
22690static rb_node_for_t *
22691rb_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)
22692{
22693 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22694 n->nd_body = nd_body;
22695 n->nd_iter = nd_iter;
22696 n->for_keyword_loc = *for_keyword_loc;
22697 n->in_keyword_loc = *in_keyword_loc;
22698 n->do_keyword_loc = *do_keyword_loc;
22699 n->end_keyword_loc = *end_keyword_loc;
22700
22701 return n;
22702}
22703
22704static rb_node_for_masgn_t *
22705rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22706{
22707 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22708 n->nd_var = nd_var;
22709
22710 return n;
22711}
22712
22713static rb_node_retry_t *
22714rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22715{
22716 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22717
22718 return n;
22719}
22720
22721static rb_node_begin_t *
22722rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22723{
22724 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22725 n->nd_body = nd_body;
22726
22727 return n;
22728}
22729
22730static rb_node_rescue_t *
22731rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22732{
22733 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22734 n->nd_head = nd_head;
22735 n->nd_resq = nd_resq;
22736 n->nd_else = nd_else;
22737
22738 return n;
22739}
22740
22741static rb_node_resbody_t *
22742rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22743{
22744 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22745 n->nd_args = nd_args;
22746 n->nd_exc_var = nd_exc_var;
22747 n->nd_body = nd_body;
22748 n->nd_next = nd_next;
22749
22750 return n;
22751}
22752
22753static rb_node_ensure_t *
22754rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22755{
22756 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22757 n->nd_head = nd_head;
22758 n->nd_ensr = nd_ensr;
22759
22760 return n;
22761}
22762
22763static rb_node_and_t *
22764rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22765{
22766 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22767 n->nd_1st = nd_1st;
22768 n->nd_2nd = nd_2nd;
22769 n->operator_loc = *operator_loc;
22770
22771 return n;
22772}
22773
22774static rb_node_or_t *
22775rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22776{
22777 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22778 n->nd_1st = nd_1st;
22779 n->nd_2nd = nd_2nd;
22780 n->operator_loc = *operator_loc;
22781
22782 return n;
22783}
22784
22785static rb_node_return_t *
22786rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22787{
22788 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22789 n->nd_stts = nd_stts;
22790 n->keyword_loc = *keyword_loc;
22791 return n;
22792}
22793
22794static rb_node_yield_t *
22795rb_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)
22796{
22797 if (nd_head) no_blockarg(p, nd_head);
22798
22799 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22800 n->nd_head = nd_head;
22801 n->keyword_loc = *keyword_loc;
22802 n->lparen_loc = *lparen_loc;
22803 n->rparen_loc = *rparen_loc;
22804
22805 return n;
22806}
22807
22808static rb_node_if_t *
22809rb_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)
22810{
22811 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22812 n->nd_cond = nd_cond;
22813 n->nd_body = nd_body;
22814 n->nd_else = nd_else;
22815 n->if_keyword_loc = *if_keyword_loc;
22816 n->then_keyword_loc = *then_keyword_loc;
22817 n->end_keyword_loc = *end_keyword_loc;
22818
22819 return n;
22820}
22821
22822static rb_node_unless_t *
22823rb_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)
22824{
22825 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22826 n->nd_cond = nd_cond;
22827 n->nd_body = nd_body;
22828 n->nd_else = nd_else;
22829 n->keyword_loc = *keyword_loc;
22830 n->then_keyword_loc = *then_keyword_loc;
22831 n->end_keyword_loc = *end_keyword_loc;
22832
22833 return n;
22834}
22835
22836static rb_node_class_t *
22837rb_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)
22838{
22839 /* Keep the order of node creation */
22840 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22841 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22842 RNODE_SCOPE(scope)->nd_parent = &n->node;
22843 n->nd_cpath = nd_cpath;
22844 n->nd_body = scope;
22845 n->nd_super = nd_super;
22846 n->class_keyword_loc = *class_keyword_loc;
22847 n->inheritance_operator_loc = *inheritance_operator_loc;
22848 n->end_keyword_loc = *end_keyword_loc;
22849
22850 return n;
22851}
22852
22853static rb_node_sclass_t *
22854rb_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)
22855{
22856 /* Keep the order of node creation */
22857 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22858 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22859 RNODE_SCOPE(scope)->nd_parent = &n->node;
22860 n->nd_recv = nd_recv;
22861 n->nd_body = scope;
22862 n->class_keyword_loc = *class_keyword_loc;
22863 n->operator_loc = *operator_loc;
22864 n->end_keyword_loc = *end_keyword_loc;
22865
22866 return n;
22867}
22868
22869static rb_node_module_t *
22870rb_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)
22871{
22872 /* Keep the order of node creation */
22873 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22874 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22875 RNODE_SCOPE(scope)->nd_parent = &n->node;
22876 n->nd_cpath = nd_cpath;
22877 n->nd_body = scope;
22878 n->module_keyword_loc = *module_keyword_loc;
22879 n->end_keyword_loc = *end_keyword_loc;
22880
22881 return n;
22882}
22883
22884static rb_node_iter_t *
22885rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22886{
22887 /* Keep the order of node creation */
22888 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22889 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22890 RNODE_SCOPE(scope)->nd_parent = &n->node;
22891 n->nd_body = scope;
22892 n->nd_iter = 0;
22893
22894 return n;
22895}
22896
22897static rb_node_lambda_t *
22898rb_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)
22899{
22900 /* Keep the order of node creation */
22901 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22902 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
22903 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
22904 RNODE_SCOPE(scope)->nd_parent = &n->node;
22905 n->nd_body = scope;
22906 n->operator_loc = *operator_loc;
22907 n->opening_loc = *opening_loc;
22908 n->closing_loc = *closing_loc;
22909
22910 return n;
22911}
22912
22913static rb_node_case_t *
22914rb_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)
22915{
22916 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22917 n->nd_head = nd_head;
22918 n->nd_body = nd_body;
22919 n->case_keyword_loc = *case_keyword_loc;
22920 n->end_keyword_loc = *end_keyword_loc;
22921
22922 return n;
22923}
22924
22925static rb_node_case2_t *
22926rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22927{
22928 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22929 n->nd_head = 0;
22930 n->nd_body = nd_body;
22931 n->case_keyword_loc = *case_keyword_loc;
22932 n->end_keyword_loc = *end_keyword_loc;
22933
22934 return n;
22935}
22936
22937static rb_node_case3_t *
22938rb_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)
22939{
22940 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22941 n->nd_head = nd_head;
22942 n->nd_body = nd_body;
22943 n->case_keyword_loc = *case_keyword_loc;
22944 n->end_keyword_loc = *end_keyword_loc;
22945
22946 return n;
22947}
22948
22949static rb_node_when_t *
22950rb_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)
22951{
22952 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22953 n->nd_head = nd_head;
22954 n->nd_body = nd_body;
22955 n->nd_next = nd_next;
22956 n->keyword_loc = *keyword_loc;
22957 n->then_keyword_loc = *then_keyword_loc;
22958
22959 return n;
22960}
22961
22962static rb_node_in_t *
22963rb_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)
22964{
22965 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22966 n->nd_head = nd_head;
22967 n->nd_body = nd_body;
22968 n->nd_next = nd_next;
22969 n->in_keyword_loc = *in_keyword_loc;
22970 n->then_keyword_loc = *then_keyword_loc;
22971 n->operator_loc = *operator_loc;
22972
22973 return n;
22974}
22975
22976static rb_node_while_t *
22977rb_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)
22978{
22979 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22980 n->nd_cond = nd_cond;
22981 n->nd_body = nd_body;
22982 n->nd_state = nd_state;
22983 n->keyword_loc = *keyword_loc;
22984 n->closing_loc = *closing_loc;
22985
22986 return n;
22987}
22988
22989static rb_node_until_t *
22990rb_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)
22991{
22992 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22993 n->nd_cond = nd_cond;
22994 n->nd_body = nd_body;
22995 n->nd_state = nd_state;
22996 n->keyword_loc = *keyword_loc;
22997 n->closing_loc = *closing_loc;
22998
22999 return n;
23000}
23001
23002static rb_node_colon2_t *
23003rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23004{
23005 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23006 n->nd_head = nd_head;
23007 n->nd_mid = nd_mid;
23008 n->delimiter_loc = *delimiter_loc;
23009 n->name_loc = *name_loc;
23010
23011 return n;
23012}
23013
23014static rb_node_colon3_t *
23015rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23016{
23017 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23018 n->nd_mid = nd_mid;
23019 n->delimiter_loc = *delimiter_loc;
23020 n->name_loc = *name_loc;
23021
23022 return n;
23023}
23024
23025static rb_node_dot2_t *
23026rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23027{
23028 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23029 n->nd_beg = nd_beg;
23030 n->nd_end = nd_end;
23031 n->operator_loc = *operator_loc;
23032
23033 return n;
23034}
23035
23036static rb_node_dot3_t *
23037rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23038{
23039 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23040 n->nd_beg = nd_beg;
23041 n->nd_end = nd_end;
23042 n->operator_loc = *operator_loc;
23043
23044 return n;
23045}
23046
23047static rb_node_self_t *
23048rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23049{
23050 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23051 n->nd_state = 1;
23052
23053 return n;
23054}
23055
23056static rb_node_nil_t *
23057rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23058{
23059 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23060
23061 return n;
23062}
23063
23064static rb_node_true_t *
23065rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23066{
23067 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23068
23069 return n;
23070}
23071
23072static rb_node_false_t *
23073rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23074{
23075 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23076
23077 return n;
23078}
23079
23080static rb_node_super_t *
23081rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23082 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23083{
23084 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23085 n->nd_args = nd_args;
23086 n->keyword_loc = *keyword_loc;
23087 n->lparen_loc = *lparen_loc;
23088 n->rparen_loc = *rparen_loc;
23089
23090 return n;
23091}
23092
23093static rb_node_zsuper_t *
23094rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23095{
23096 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23097
23098 return n;
23099}
23100
23101static rb_node_match2_t *
23102rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23103{
23104 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23105 n->nd_recv = nd_recv;
23106 n->nd_value = nd_value;
23107 n->nd_args = 0;
23108
23109 return n;
23110}
23111
23112static rb_node_match3_t *
23113rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23114{
23115 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23116 n->nd_recv = nd_recv;
23117 n->nd_value = nd_value;
23118
23119 return n;
23120}
23121
23122/* TODO: Use union for NODE_LIST2 */
23123static rb_node_list_t *
23124rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23125{
23126 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23127 n->nd_head = nd_head;
23128 n->as.nd_alen = 1;
23129 n->nd_next = 0;
23130
23131 return n;
23132}
23133
23134static rb_node_list_t *
23135rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23136{
23137 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23138 n->nd_head = nd_head;
23139 n->as.nd_alen = nd_alen;
23140 n->nd_next = nd_next;
23141
23142 return n;
23143}
23144
23145static rb_node_zlist_t *
23146rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23147{
23148 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23149
23150 return n;
23151}
23152
23153static rb_node_hash_t *
23154rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23155{
23156 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23157 n->nd_head = nd_head;
23158 n->nd_brace = 0;
23159
23160 return n;
23161}
23162
23163static rb_node_masgn_t *
23164rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23165{
23166 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23167 n->nd_head = nd_head;
23168 n->nd_value = 0;
23169 n->nd_args = nd_args;
23170
23171 return n;
23172}
23173
23174static rb_node_gasgn_t *
23175rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23176{
23177 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23178 n->nd_vid = nd_vid;
23179 n->nd_value = nd_value;
23180
23181 return n;
23182}
23183
23184static rb_node_lasgn_t *
23185rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23186{
23187 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23188 n->nd_vid = nd_vid;
23189 n->nd_value = nd_value;
23190
23191 return n;
23192}
23193
23194static rb_node_dasgn_t *
23195rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23196{
23197 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23198 n->nd_vid = nd_vid;
23199 n->nd_value = nd_value;
23200
23201 return n;
23202}
23203
23204static rb_node_iasgn_t *
23205rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23206{
23207 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23208 n->nd_vid = nd_vid;
23209 n->nd_value = nd_value;
23210
23211 return n;
23212}
23213
23214static rb_node_cvasgn_t *
23215rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23216{
23217 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23218 n->nd_vid = nd_vid;
23219 n->nd_value = nd_value;
23220
23221 return n;
23222}
23223
23224static rb_node_op_asgn1_t *
23225rb_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)
23226{
23227 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23228 n->nd_recv = nd_recv;
23229 n->nd_mid = nd_mid;
23230 n->nd_index = index;
23231 n->nd_rvalue = rvalue;
23232 n->call_operator_loc = *call_operator_loc;
23233 n->opening_loc = *opening_loc;
23234 n->closing_loc = *closing_loc;
23235 n->binary_operator_loc = *binary_operator_loc;
23236
23237 return n;
23238}
23239
23240static rb_node_op_asgn2_t *
23241rb_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)
23242{
23243 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23244 n->nd_recv = nd_recv;
23245 n->nd_value = nd_value;
23246 n->nd_vid = nd_vid;
23247 n->nd_mid = nd_mid;
23248 n->nd_aid = nd_aid;
23249 n->call_operator_loc = *call_operator_loc;
23250 n->message_loc = *message_loc;
23251 n->binary_operator_loc = *binary_operator_loc;
23252
23253 return n;
23254}
23255
23256static rb_node_op_asgn_or_t *
23257rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23258{
23259 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23260 n->nd_head = nd_head;
23261 n->nd_value = nd_value;
23262
23263 return n;
23264}
23265
23266static rb_node_op_asgn_and_t *
23267rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23268{
23269 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23270 n->nd_head = nd_head;
23271 n->nd_value = nd_value;
23272
23273 return n;
23274}
23275
23276static rb_node_gvar_t *
23277rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23278{
23279 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23280 n->nd_vid = nd_vid;
23281
23282 return n;
23283}
23284
23285static rb_node_lvar_t *
23286rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23287{
23288 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23289 n->nd_vid = nd_vid;
23290
23291 return n;
23292}
23293
23294static rb_node_dvar_t *
23295rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23296{
23297 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23298 n->nd_vid = nd_vid;
23299
23300 return n;
23301}
23302
23303static rb_node_ivar_t *
23304rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23305{
23306 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23307 n->nd_vid = nd_vid;
23308
23309 return n;
23310}
23311
23312static rb_node_const_t *
23313rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23314{
23315 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23316 n->nd_vid = nd_vid;
23317
23318 return n;
23319}
23320
23321static rb_node_cvar_t *
23322rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23323{
23324 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23325 n->nd_vid = nd_vid;
23326
23327 return n;
23328}
23329
23330static rb_node_nth_ref_t *
23331rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23332{
23333 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23334 n->nd_nth = nd_nth;
23335
23336 return n;
23337}
23338
23339static rb_node_back_ref_t *
23340rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23341{
23342 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23343 n->nd_nth = nd_nth;
23344
23345 return n;
23346}
23347
23348static rb_node_integer_t *
23349rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23350{
23351 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23352 n->val = val;
23353 n->minus = FALSE;
23354 n->base = base;
23355
23356 return n;
23357}
23358
23359static rb_node_float_t *
23360rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23361{
23362 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23363 n->val = val;
23364 n->minus = FALSE;
23365
23366 return n;
23367}
23368
23369static rb_node_rational_t *
23370rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23371{
23372 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23373 n->val = val;
23374 n->minus = FALSE;
23375 n->base = base;
23376 n->seen_point = seen_point;
23377
23378 return n;
23379}
23380
23381static rb_node_imaginary_t *
23382rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23383{
23384 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23385 n->val = val;
23386 n->minus = FALSE;
23387 n->base = base;
23388 n->seen_point = seen_point;
23389 n->type = numeric_type;
23390
23391 return n;
23392}
23393
23394static rb_node_str_t *
23395rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23396{
23397 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23398 n->string = string;
23399
23400 return n;
23401}
23402
23403/* TODO; Use union for NODE_DSTR2 */
23404static rb_node_dstr_t *
23405rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23406{
23407 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23408 n->string = string;
23409 n->as.nd_alen = nd_alen;
23410 n->nd_next = (rb_node_list_t *)nd_next;
23411
23412 return n;
23413}
23414
23415static rb_node_dstr_t *
23416rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23417{
23418 return rb_node_dstr_new0(p, string, 1, 0, loc);
23419}
23420
23421static rb_node_xstr_t *
23422rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23423{
23424 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23425 n->string = string;
23426
23427 return n;
23428}
23429
23430static rb_node_dxstr_t *
23431rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23432{
23433 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23434 n->string = string;
23435 n->as.nd_alen = nd_alen;
23436 n->nd_next = (rb_node_list_t *)nd_next;
23437
23438 return n;
23439}
23440
23441static rb_node_sym_t *
23442rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23443{
23444 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23445 n->string = rb_str_to_parser_string(p, str);
23446
23447 return n;
23448}
23449
23450static rb_node_dsym_t *
23451rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23452{
23453 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23454 n->string = string;
23455 n->as.nd_alen = nd_alen;
23456 n->nd_next = (rb_node_list_t *)nd_next;
23457
23458 return n;
23459}
23460
23461static rb_node_evstr_t *
23462rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23463{
23464 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23465 n->nd_body = nd_body;
23466 n->opening_loc = *opening_loc;
23467 n->closing_loc = *closing_loc;
23468
23469 return n;
23470}
23471
23472static rb_node_regx_t *
23473rb_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)
23474{
23475 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23476 n->string = string;
23477 n->options = options & RE_OPTION_MASK;
23478 n->opening_loc = *opening_loc;
23479 n->content_loc = *content_loc;
23480 n->closing_loc = *closing_loc;
23481
23482 return n;
23483}
23484
23485static rb_node_call_t *
23486rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23487{
23488 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23489 n->nd_recv = nd_recv;
23490 n->nd_mid = nd_mid;
23491 n->nd_args = nd_args;
23492
23493 return n;
23494}
23495
23496static rb_node_opcall_t *
23497rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23498{
23499 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23500 n->nd_recv = nd_recv;
23501 n->nd_mid = nd_mid;
23502 n->nd_args = nd_args;
23503
23504 return n;
23505}
23506
23507static rb_node_fcall_t *
23508rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23509{
23510 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23511 n->nd_mid = nd_mid;
23512 n->nd_args = nd_args;
23513
23514 return n;
23515}
23516
23517static rb_node_qcall_t *
23518rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23519{
23520 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23521 n->nd_recv = nd_recv;
23522 n->nd_mid = nd_mid;
23523 n->nd_args = nd_args;
23524
23525 return n;
23526}
23527
23528static rb_node_vcall_t *
23529rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23530{
23531 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23532 n->nd_mid = nd_mid;
23533
23534 return n;
23535}
23536
23537static rb_node_once_t *
23538rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23539{
23540 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23541 n->nd_body = nd_body;
23542
23543 return n;
23544}
23545
23546static rb_node_args_t *
23547rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23548{
23549 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23550 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23551
23552 return n;
23553}
23554
23555static rb_node_args_aux_t *
23556rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23557{
23558 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23559 n->nd_pid = nd_pid;
23560 n->nd_plen = nd_plen;
23561 n->nd_next = 0;
23562
23563 return n;
23564}
23565
23566static rb_node_opt_arg_t *
23567rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23568{
23569 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23570 n->nd_body = nd_body;
23571 n->nd_next = 0;
23572
23573 return n;
23574}
23575
23576static rb_node_kw_arg_t *
23577rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23578{
23579 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23580 n->nd_body = nd_body;
23581 n->nd_next = 0;
23582
23583 return n;
23584}
23585
23586static rb_node_postarg_t *
23587rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23588{
23589 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23590 n->nd_1st = nd_1st;
23591 n->nd_2nd = nd_2nd;
23592
23593 return n;
23594}
23595
23596static rb_node_argscat_t *
23597rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23598{
23599 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23600 n->nd_head = nd_head;
23601 n->nd_body = nd_body;
23602
23603 return n;
23604}
23605
23606static rb_node_argspush_t *
23607rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23608{
23609 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23610 n->nd_head = nd_head;
23611 n->nd_body = nd_body;
23612
23613 return n;
23614}
23615
23616static rb_node_splat_t *
23617rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23618{
23619 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23620 n->nd_head = nd_head;
23621 n->operator_loc = *operator_loc;
23622
23623 return n;
23624}
23625
23626static rb_node_block_pass_t *
23627rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23628{
23629 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23630 n->forwarding = 0;
23631 n->nd_head = 0;
23632 n->nd_body = nd_body;
23633 n->operator_loc = *operator_loc;
23634
23635 return n;
23636}
23637
23638static rb_node_alias_t *
23639rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23640{
23641 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23642 n->nd_1st = nd_1st;
23643 n->nd_2nd = nd_2nd;
23644 n->keyword_loc = *keyword_loc;
23645
23646 return n;
23647}
23648
23649static rb_node_valias_t *
23650rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23651{
23652 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23653 n->nd_alias = nd_alias;
23654 n->nd_orig = nd_orig;
23655 n->keyword_loc = *keyword_loc;
23656
23657 return n;
23658}
23659
23660static rb_node_undef_t *
23661rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23662{
23663 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23664 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23665 n->keyword_loc = NULL_LOC;
23666 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23667
23668 return n;
23669}
23670
23671static rb_node_errinfo_t *
23672rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23673{
23674 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23675
23676 return n;
23677}
23678
23679static rb_node_defined_t *
23680rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23681{
23682 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23683 n->nd_head = nd_head;
23684 n->keyword_loc = *keyword_loc;
23685
23686 return n;
23687}
23688
23689static rb_node_postexe_t *
23690rb_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)
23691{
23692 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23693 n->nd_body = nd_body;
23694 n->keyword_loc = *keyword_loc;
23695 n->opening_loc = *opening_loc;
23696 n->closing_loc = *closing_loc;
23697
23698 return n;
23699}
23700
23701static rb_node_attrasgn_t *
23702rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23703{
23704 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23705 n->nd_recv = nd_recv;
23706 n->nd_mid = nd_mid;
23707 n->nd_args = nd_args;
23708
23709 return n;
23710}
23711
23712static rb_node_aryptn_t *
23713rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23714{
23715 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23716 n->nd_pconst = 0;
23717 n->pre_args = pre_args;
23718 n->rest_arg = rest_arg;
23719 n->post_args = post_args;
23720
23721 return n;
23722}
23723
23724static rb_node_hshptn_t *
23725rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23726{
23727 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23728 n->nd_pconst = nd_pconst;
23729 n->nd_pkwargs = nd_pkwargs;
23730 n->nd_pkwrestarg = nd_pkwrestarg;
23731
23732 return n;
23733}
23734
23735static rb_node_fndptn_t *
23736rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23737{
23738 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23739 n->nd_pconst = 0;
23740 n->pre_rest_arg = pre_rest_arg;
23741 n->args = args;
23742 n->post_rest_arg = post_rest_arg;
23743
23744 return n;
23745}
23746
23747static rb_node_line_t *
23748rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23749{
23750 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23751
23752 return n;
23753}
23754
23755static rb_node_file_t *
23756rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23757{
23758 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23759 n->path = rb_str_to_parser_string(p, str);
23760
23761 return n;
23762}
23763
23764static rb_node_encoding_t *
23765rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23766{
23767 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23768 n->enc = p->enc;
23769
23770 return n;
23771}
23772
23773static rb_node_cdecl_t *
23774rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23775{
23776 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23777 n->nd_vid = nd_vid;
23778 n->nd_value = nd_value;
23779 n->nd_else = nd_else;
23780 n->shareability = shareability;
23781
23782 return n;
23783}
23784
23785static rb_node_op_cdecl_t *
23786rb_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)
23787{
23788 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23789 n->nd_head = nd_head;
23790 n->nd_value = nd_value;
23791 n->nd_aid = nd_aid;
23792 n->shareability = shareability;
23793
23794 return n;
23795}
23796
23797static rb_node_error_t *
23798rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23799{
23800 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23801
23802 return n;
23803}
23804
23805static rb_node_break_t *
23806rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23807{
23808 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23809 n->nd_stts = nd_stts;
23810 n->nd_chain = 0;
23811 n->keyword_loc = *keyword_loc;
23812
23813 return n;
23814}
23815
23816static rb_node_next_t *
23817rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23818{
23819 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23820 n->nd_stts = nd_stts;
23821 n->nd_chain = 0;
23822 n->keyword_loc = *keyword_loc;
23823
23824 return n;
23825}
23826
23827static rb_node_redo_t *
23828rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23829{
23830 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23831 n->nd_chain = 0;
23832 n->keyword_loc = *keyword_loc;
23833
23834 return n;
23835}
23836
23837static rb_node_def_temp_t *
23838rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23839{
23840 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23841 n->save.numparam_save = 0;
23842 n->save.max_numparam = 0;
23843 n->save.ctxt = p->ctxt;
23844 n->nd_def = 0;
23845 n->nd_mid = 0;
23846
23847 return n;
23848}
23849
23850static rb_node_def_temp_t *
23851def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23852{
23853 n->save.numparam_save = numparam_push(p);
23854 n->save.max_numparam = p->max_numparam;
23855 return n;
23856}
23857
23858#ifndef RIPPER
23859static enum node_type
23860nodetype(NODE *node) /* for debug */
23861{
23862 return (enum node_type)nd_type(node);
23863}
23864
23865static int
23866nodeline(NODE *node)
23867{
23868 return nd_line(node);
23869}
23870#endif
23871
23872static NODE*
23873newline_node(NODE *node)
23874{
23875 if (node) {
23876 node = remove_begin(node);
23877 nd_set_fl_newline(node);
23878 }
23879 return node;
23880}
23881
23882static void
23883fixpos(NODE *node, NODE *orig)
23884{
23885 if (!node) return;
23886 if (!orig) return;
23887 nd_set_line(node, nd_line(orig));
23888}
23889
23890static NODE*
23891block_append(struct parser_params *p, NODE *head, NODE *tail)
23892{
23893 NODE *end, *h = head, *nd;
23894
23895 if (tail == 0) return head;
23896
23897 if (h == 0) return tail;
23898 switch (nd_type(h)) {
23899 default:
23900 h = end = NEW_BLOCK(head, &head->nd_loc);
23901 head = end;
23902 break;
23903 case NODE_BLOCK:
23904 end = RNODE_BLOCK(h)->nd_end;
23905 break;
23906 }
23907
23908 nd = RNODE_BLOCK(end)->nd_head;
23909 switch (nd_type(nd)) {
23910 case NODE_RETURN:
23911 case NODE_BREAK:
23912 case NODE_NEXT:
23913 case NODE_REDO:
23914 case NODE_RETRY:
23915 rb_warning0L(nd_line(tail), "statement not reached");
23916 break;
23917
23918 default:
23919 break;
23920 }
23921
23922 if (!nd_type_p(tail, NODE_BLOCK)) {
23923 tail = NEW_BLOCK(tail, &tail->nd_loc);
23924 }
23925 RNODE_BLOCK(end)->nd_next = tail;
23926 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23927 nd_set_last_loc(head, nd_last_loc(tail));
23928 return head;
23929}
23930
23931/* append item to the list */
23932static NODE*
23933list_append(struct parser_params *p, NODE *list, NODE *item)
23934{
23935 NODE *last;
23936
23937 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23938 if (RNODE_LIST(list)->nd_next) {
23939 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23940 }
23941 else {
23942 last = list;
23943 }
23944
23945 RNODE_LIST(list)->as.nd_alen += 1;
23946 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23947 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23948
23949 nd_set_last_loc(list, nd_last_loc(item));
23950
23951 return list;
23952}
23953
23954/* concat two lists */
23955static NODE*
23956list_concat(NODE *head, NODE *tail)
23957{
23958 NODE *last;
23959
23960 if (RNODE_LIST(head)->nd_next) {
23961 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23962 }
23963 else {
23964 last = head;
23965 }
23966
23967 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23968 RNODE_LIST(last)->nd_next = tail;
23969 if (RNODE_LIST(tail)->nd_next) {
23970 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23971 }
23972 else {
23973 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23974 }
23975
23976 nd_set_last_loc(head, nd_last_loc(tail));
23977
23978 return head;
23979}
23980
23981static int
23982literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23983{
23984 if (!tail) return 1;
23985 if (!rb_parser_enc_compatible(p, head, tail)) {
23986 compile_error(p, "string literal encodings differ (%s / %s)",
23987 rb_enc_name(rb_parser_str_get_encoding(head)),
23988 rb_enc_name(rb_parser_str_get_encoding(tail)));
23989 rb_parser_str_resize(p, head, 0);
23990 rb_parser_str_resize(p, tail, 0);
23991 return 0;
23992 }
23993 rb_parser_str_buf_append(p, head, tail);
23994 return 1;
23995}
23996
23997static rb_parser_string_t *
23998string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23999{
24000 if (htype != NODE_DSTR) return NULL;
24001 if (RNODE_DSTR(head)->nd_next) {
24002 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24003 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24004 }
24005 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24006 ASSUME(lit);
24007 return lit;
24008}
24009
24010#ifndef RIPPER
24011static rb_parser_string_t *
24012rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24013{
24014 rb_parser_string_t *copy;
24015 if (!orig) return NULL;
24016 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24017 copy->coderange = orig->coderange;
24018 copy->enc = orig->enc;
24019 return copy;
24020}
24021#endif
24022
24023/* concat two string literals */
24024static NODE *
24025literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24026{
24027 enum node_type htype;
24028 rb_parser_string_t *lit;
24029
24030 if (!head) return tail;
24031 if (!tail) return head;
24032
24033 htype = nd_type(head);
24034 if (htype == NODE_EVSTR) {
24035 head = new_dstr(p, head, loc);
24036 htype = NODE_DSTR;
24037 }
24038 if (p->heredoc_indent > 0) {
24039 switch (htype) {
24040 case NODE_STR:
24041 head = str2dstr(p, head);
24042 case NODE_DSTR:
24043 return list_append(p, head, tail);
24044 default:
24045 break;
24046 }
24047 }
24048 switch (nd_type(tail)) {
24049 case NODE_STR:
24050 if ((lit = string_literal_head(p, htype, head)) != false) {
24051 htype = NODE_STR;
24052 }
24053 else {
24054 lit = RNODE_DSTR(head)->string;
24055 }
24056 if (htype == NODE_STR) {
24057 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24058 error:
24059 rb_discard_node(p, head);
24060 rb_discard_node(p, tail);
24061 return 0;
24062 }
24063 rb_discard_node(p, tail);
24064 }
24065 else {
24066 list_append(p, head, tail);
24067 }
24068 break;
24069
24070 case NODE_DSTR:
24071 if (htype == NODE_STR) {
24072 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24073 goto error;
24074 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24075 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24076 RNODE_STR(head)->string = NULL;
24077 rb_discard_node(p, head);
24078 head = tail;
24079 }
24080 else if (!RNODE_DSTR(tail)->string) {
24081 append:
24082 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24083 if (!RNODE_DSTR(head)->nd_next) {
24084 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24085 }
24086 else if (RNODE_DSTR(tail)->nd_next) {
24087 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24088 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24089 }
24090 rb_discard_node(p, tail);
24091 }
24092 else if ((lit = string_literal_head(p, htype, head)) != false) {
24093 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24094 goto error;
24095 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24096 RNODE_DSTR(tail)->string = 0;
24097 goto append;
24098 }
24099 else {
24100 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));
24101 RNODE_DSTR(tail)->string = 0;
24102 }
24103 break;
24104
24105 case NODE_EVSTR:
24106 if (htype == NODE_STR) {
24107 head = str2dstr(p, head);
24108 RNODE_DSTR(head)->as.nd_alen = 1;
24109 }
24110 list_append(p, head, tail);
24111 break;
24112 }
24113 return head;
24114}
24115
24116static void
24117nd_copy_flag(NODE *new_node, NODE *old_node)
24118{
24119 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24120 nd_set_line(new_node, nd_line(old_node));
24121 new_node->nd_loc = old_node->nd_loc;
24122 new_node->node_id = old_node->node_id;
24123}
24124
24125static NODE *
24126str2dstr(struct parser_params *p, NODE *node)
24127{
24128 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24129 nd_copy_flag(new_node, node);
24130 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24131 RNODE_DSTR(new_node)->as.nd_alen = 0;
24132 RNODE_DSTR(new_node)->nd_next = 0;
24133 RNODE_STR(node)->string = 0;
24134
24135 return new_node;
24136}
24137
24138static NODE *
24139str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24140{
24141 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24142 nd_copy_flag(new_node, node);
24143 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24144 RNODE_REGX(new_node)->options = options;
24145 nd_set_loc(new_node, loc);
24146 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24147 RNODE_REGX(new_node)->content_loc = *content_loc;
24148 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24149 RNODE_STR(node)->string = 0;
24150
24151 return new_node;
24152}
24153
24154static NODE *
24155evstr2dstr(struct parser_params *p, NODE *node)
24156{
24157 if (nd_type_p(node, NODE_EVSTR)) {
24158 node = new_dstr(p, node, &node->nd_loc);
24159 }
24160 return node;
24161}
24162
24163static NODE *
24164new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24165{
24166 NODE *head = node;
24167
24168 if (node) {
24169 switch (nd_type(node)) {
24170 case NODE_STR:
24171 return str2dstr(p, node);
24172 case NODE_DSTR:
24173 break;
24174 case NODE_EVSTR:
24175 return node;
24176 }
24177 }
24178 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24179}
24180
24181static NODE *
24182new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24183{
24184 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24185 return list_append(p, dstr, node);
24186}
24187
24188static NODE *
24189call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24190 const YYLTYPE *op_loc, const YYLTYPE *loc)
24191{
24192 NODE *expr;
24193 value_expr(p, recv);
24194 value_expr(p, arg1);
24195 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24196 nd_set_line(expr, op_loc->beg_pos.lineno);
24197 return expr;
24198}
24199
24200static NODE *
24201call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24202{
24203 NODE *opcall;
24204 value_expr(p, recv);
24205 opcall = NEW_OPCALL(recv, id, 0, loc);
24206 nd_set_line(opcall, op_loc->beg_pos.lineno);
24207 return opcall;
24208}
24209
24210static NODE *
24211new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24212{
24213 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24214 nd_set_line(qcall, op_loc->beg_pos.lineno);
24215 return qcall;
24216}
24217
24218static NODE*
24219new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24220{
24221 NODE *ret;
24222 if (block) block_dup_check(p, args, block);
24223 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24224 if (block) ret = method_add_block(p, ret, block, loc);
24225 fixpos(ret, recv);
24226 return ret;
24227}
24228
24230new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24231{
24233 body->node = node;
24234 body->opening_loc = *opening_loc;
24235 body->closing_loc = *closing_loc;
24236 return body;
24237}
24238
24239static NODE *
24240command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc)
24241{
24242 NODE **body;
24243 enum node_type type = nd_type(m);
24244 switch (type) {
24245 case NODE_YIELD:
24246 compile_error(p, "block given to yield");
24247 return m;
24248 case NODE_RETURN:
24249 body = &RNODE_RETURN(m)->nd_stts;
24250 break;
24251 case NODE_BREAK:
24252 case NODE_NEXT:
24253 body = &RNODE_EXITS(m)->nd_stts;
24254 break;
24255 case NODE_REDO: /* `redo` has no argument */
24256 compile_error(p, "command_add_block: unexpected node: NODE_REDO");
24257 return m;
24258 case NODE_RETRY: /* `retry` has no argument */
24259 compile_error(p, "command_add_block: unexpected node: NODE_RETRY");
24260 return m;
24261 default:
24262 block_dup_check(p, get_nd_args(p, m), b);
24263 return method_add_block(p, m, b, loc);
24264 }
24265 RUBY_ASSERT(*body, "no argument %s with do_block", parser_node_name(type));
24266 YYLTYPE b_loc = code_loc_gen(&(*body)->nd_loc, loc);
24267 *body = command_add_block(p, *body, b, &b_loc);
24268 m->nd_loc.end_pos = loc->end_pos;
24269 return m;
24270}
24271
24272#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24273
24274static NODE*
24275last_expr_once_body(NODE *node)
24276{
24277 if (!node) return 0;
24278 return nd_once_body(node);
24279}
24280
24281static NODE*
24282match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24283{
24284 NODE *n;
24285 int line = op_loc->beg_pos.lineno;
24286
24287 value_expr(p, node1);
24288 value_expr(p, node2);
24289
24290 if ((n = last_expr_once_body(node1)) != 0) {
24291 switch (nd_type(n)) {
24292 case NODE_DREGX:
24293 {
24294 NODE *match = NEW_MATCH2(node1, node2, loc);
24295 nd_set_line(match, line);
24296 return match;
24297 }
24298
24299 case NODE_REGX:
24300 {
24301 const VALUE lit = rb_node_regx_string_val(n);
24302 if (!NIL_P(lit)) {
24303 NODE *match = NEW_MATCH2(node1, node2, loc);
24304 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24305 nd_set_line(match, line);
24306 return match;
24307 }
24308 }
24309 }
24310 }
24311
24312 if ((n = last_expr_once_body(node2)) != 0) {
24313 NODE *match3;
24314
24315 switch (nd_type(n)) {
24316 case NODE_DREGX:
24317 match3 = NEW_MATCH3(node2, node1, loc);
24318 return match3;
24319 }
24320 }
24321
24322 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24323 nd_set_line(n, line);
24324 return n;
24325}
24326
24327# if WARN_PAST_SCOPE
24328static int
24329past_dvar_p(struct parser_params *p, ID id)
24330{
24331 struct vtable *past = p->lvtbl->past;
24332 while (past) {
24333 if (vtable_included(past, id)) return 1;
24334 past = past->prev;
24335 }
24336 return 0;
24337}
24338# endif
24339
24340static int
24341numparam_nested_p(struct parser_params *p)
24342{
24343 struct local_vars *local = p->lvtbl;
24344 NODE *outer = local->numparam.outer;
24345 NODE *inner = local->numparam.inner;
24346 if (outer || inner) {
24347 NODE *used = outer ? outer : inner;
24348 compile_error(p, "numbered parameter is already used in %s block\n"
24349 "%s:%d: numbered parameter is already used here",
24350 outer ? "outer" : "inner",
24351 p->ruby_sourcefile, nd_line(used));
24352 parser_show_error_line(p, &used->nd_loc);
24353 return 1;
24354 }
24355 return 0;
24356}
24357
24358static int
24359numparam_used_p(struct parser_params *p)
24360{
24361 NODE *numparam = p->lvtbl->numparam.current;
24362 if (numparam) {
24363 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24364 "%s:%d: numbered parameter is already used here",
24365 p->ruby_sourcefile, nd_line(numparam));
24366 parser_show_error_line(p, &numparam->nd_loc);
24367 return 1;
24368 }
24369 return 0;
24370}
24371
24372static int
24373it_used_p(struct parser_params *p)
24374{
24375 NODE *it = p->lvtbl->it;
24376 if (it) {
24377 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24378 "%s:%d: 'it' is already used here",
24379 p->ruby_sourcefile, nd_line(it));
24380 parser_show_error_line(p, &it->nd_loc);
24381 return 1;
24382 }
24383 return 0;
24384}
24385
24386static NODE*
24387gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24388{
24389 ID *vidp = NULL;
24390 NODE *node;
24391 switch (id) {
24392 case keyword_self:
24393 return NEW_SELF(loc);
24394 case keyword_nil:
24395 return NEW_NIL(loc);
24396 case keyword_true:
24397 return NEW_TRUE(loc);
24398 case keyword_false:
24399 return NEW_FALSE(loc);
24400 case keyword__FILE__:
24401 {
24402 VALUE file = p->ruby_sourcefile_string;
24403 if (NIL_P(file))
24404 file = rb_str_new(0, 0);
24405 node = NEW_FILE(file, loc);
24406 }
24407 return node;
24408 case keyword__LINE__:
24409 return NEW_LINE(loc);
24410 case keyword__ENCODING__:
24411 return NEW_ENCODING(loc);
24412
24413 }
24414 switch (id_type(id)) {
24415 case ID_LOCAL:
24416 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24417 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24418 if (vidp) *vidp |= LVAR_USED;
24419 node = NEW_DVAR(id, loc);
24420 return node;
24421 }
24422 if (local_id_ref(p, id, &vidp)) {
24423 if (vidp) *vidp |= LVAR_USED;
24424 node = NEW_LVAR(id, loc);
24425 return node;
24426 }
24427 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24428 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24429 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24430 node = NEW_DVAR(id, loc);
24431 struct local_vars *local = p->lvtbl;
24432 if (!local->numparam.current) local->numparam.current = node;
24433 return node;
24434 }
24435# if WARN_PAST_SCOPE
24436 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24437 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24438 }
24439# endif
24440 /* method call without arguments */
24441 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24442 if (numparam_used_p(p)) return 0;
24443 if (p->max_numparam == ORDINAL_PARAM) {
24444 compile_error(p, "ordinary parameter is defined");
24445 return 0;
24446 }
24447 if (!p->it_id) {
24448 p->it_id = idItImplicit;
24449 vtable_add(p->lvtbl->args, p->it_id);
24450 }
24451 NODE *node = NEW_DVAR(p->it_id, loc);
24452 if (!p->lvtbl->it) p->lvtbl->it = node;
24453 return node;
24454 }
24455 return NEW_VCALL(id, loc);
24456 case ID_GLOBAL:
24457 return NEW_GVAR(id, loc);
24458 case ID_INSTANCE:
24459 return NEW_IVAR(id, loc);
24460 case ID_CONST:
24461 return NEW_CONST(id, loc);
24462 case ID_CLASS:
24463 return NEW_CVAR(id, loc);
24464 }
24465 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24466 return 0;
24467}
24468
24469static rb_node_opt_arg_t *
24470opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24471{
24472 rb_node_opt_arg_t *opts = opt_list;
24473 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24474
24475 while (opts->nd_next) {
24476 opts = opts->nd_next;
24477 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24478 }
24479 opts->nd_next = opt;
24480
24481 return opt_list;
24482}
24483
24484static rb_node_kw_arg_t *
24485kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24486{
24487 if (kwlist) {
24488 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24489 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24490 }
24491 return kwlist;
24492}
24493
24494static NODE *
24495new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24496{
24497 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24498 p->ctxt.has_trailing_semicolon = 0;
24499
24500 NODE *n = expr;
24501 while (n) {
24502 if (nd_type_p(n, NODE_BEGIN)) {
24503 n = RNODE_BEGIN(n)->nd_body;
24504 }
24505 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24506 n = RNODE_BLOCK(n)->nd_head;
24507 }
24508 else {
24509 break;
24510 }
24511 }
24512
24513 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24514 NODE *block = NEW_BLOCK(expr, loc);
24515 return NEW_DEFINED(block, loc, keyword_loc);
24516 }
24517
24518 return NEW_DEFINED(n, loc, keyword_loc);
24519}
24520
24521static NODE*
24522str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24523{
24524 VALUE lit;
24525 rb_parser_string_t *str = RNODE_STR(node)->string;
24526 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24527 yyerror1(loc, "invalid symbol");
24528 lit = STR_NEW0();
24529 }
24530 else {
24531 lit = rb_str_new_parser_string(str);
24532 }
24533 return NEW_SYM(lit, loc);
24534}
24535
24536static NODE*
24537symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24538{
24539 enum node_type type = nd_type(symbol);
24540 switch (type) {
24541 case NODE_DSTR:
24542 nd_set_type(symbol, NODE_DSYM);
24543 break;
24544 case NODE_STR:
24545 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24546 break;
24547 default:
24548 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24549 }
24550 return list_append(p, symbols, symbol);
24551}
24552
24553static void
24554dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24555{
24556 if (dreg->string) {
24557 reg_fragment_setenc(p, dreg->string, options);
24558 }
24559 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24560 NODE *frag = list->nd_head;
24561 if (nd_type_p(frag, NODE_STR)) {
24562 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24563 }
24564 else if (nd_type_p(frag, NODE_DSTR)) {
24565 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24566 }
24567 }
24568}
24569
24570static NODE *
24571new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24572{
24573 if (!node) {
24574 /* Check string is valid regex */
24575 rb_parser_string_t *str = STRING_NEW0();
24576 reg_compile(p, str, options);
24577 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24578 return node;
24579 }
24580 switch (nd_type(node)) {
24581 case NODE_STR:
24582 {
24583 /* Check string is valid regex */
24584 reg_compile(p, RNODE_STR(node)->string, options);
24585 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24586 }
24587 break;
24588 default:
24589 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24590 /* fall through */
24591 case NODE_DSTR:
24592 nd_set_type(node, NODE_DREGX);
24593 nd_set_loc(node, loc);
24594 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24595 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24596 if (dreg->nd_next) {
24597 dregex_fragment_setenc(p, dreg, options);
24598 }
24599 if (options & RE_OPTION_ONCE) {
24600 node = NEW_ONCE(node, loc);
24601 }
24602 break;
24603 }
24604 return node;
24605}
24606
24607static rb_node_kw_arg_t *
24608new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24609{
24610 if (!k) return 0;
24611 return NEW_KW_ARG((k), loc);
24612}
24613
24614static NODE *
24615new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24616{
24617 if (!node) {
24618 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24619 return xstr;
24620 }
24621 switch (nd_type(node)) {
24622 case NODE_STR:
24623 nd_set_type(node, NODE_XSTR);
24624 nd_set_loc(node, loc);
24625 break;
24626 case NODE_DSTR:
24627 nd_set_type(node, NODE_DXSTR);
24628 nd_set_loc(node, loc);
24629 break;
24630 default:
24631 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24632 break;
24633 }
24634 return node;
24635}
24636
24637static const
24638struct st_hash_type literal_type = {
24639 literal_cmp,
24640 literal_hash,
24641};
24642
24643static int nd_type_st_key_enable_p(NODE *node);
24644
24645static void
24646check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24647{
24648 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24649 if (!arg || !p->case_labels) return;
24650 if (!nd_type_st_key_enable_p(arg)) return;
24651
24652 if (p->case_labels == CHECK_LITERAL_WHEN) {
24653 p->case_labels = st_init_table(&literal_type);
24654 }
24655 else {
24656 st_data_t line;
24657 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24658 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24659 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24660 return;
24661 }
24662 }
24663 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24664}
24665
24666#ifdef RIPPER
24667static int
24668id_is_var(struct parser_params *p, ID id)
24669{
24670 if (is_notop_id(id)) {
24671 switch (id & ID_SCOPE_MASK) {
24672 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24673 return 1;
24674 case ID_LOCAL:
24675 if (dyna_in_block(p)) {
24676 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24677 }
24678 if (local_id(p, id)) return 1;
24679 /* method call without arguments */
24680 return 0;
24681 }
24682 }
24683 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24684 return 0;
24685}
24686#endif
24687
24688static inline enum lex_state_e
24689parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24690{
24691 if (p->debug) {
24692 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24693 }
24694 return p->lex.state = ls;
24695}
24696
24697#ifndef RIPPER
24698static void
24699flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24700{
24701 VALUE mesg = p->debug_buffer;
24702
24703 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24704 p->debug_buffer = Qnil;
24705 rb_io_puts(1, &mesg, out);
24706 }
24707 if (!NIL_P(str) && RSTRING_LEN(str)) {
24708 rb_io_write(p->debug_output, str);
24709 }
24710}
24711
24712static const char rb_parser_lex_state_names[][8] = {
24713 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24714 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24715 "LABEL", "LABELED","FITEM",
24716};
24717
24718static VALUE
24719append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24720{
24721 int i, sep = 0;
24722 unsigned int mask = 1;
24723 static const char none[] = "NONE";
24724
24725 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24726 if ((unsigned)state & mask) {
24727 if (sep) {
24728 rb_str_cat(buf, "|", 1);
24729 }
24730 sep = 1;
24731 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24732 }
24733 }
24734 if (!sep) {
24735 rb_str_cat(buf, none, sizeof(none)-1);
24736 }
24737 return buf;
24738}
24739
24740enum lex_state_e
24741rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24742 enum lex_state_e to, int line)
24743{
24744 VALUE mesg;
24745 mesg = rb_str_new_cstr("lex_state: ");
24746 append_lex_state_name(p, from, mesg);
24747 rb_str_cat_cstr(mesg, " -> ");
24748 append_lex_state_name(p, to, mesg);
24749 rb_str_catf(mesg, " at line %d\n", line);
24750 flush_debug_buffer(p, p->debug_output, mesg);
24751 return to;
24752}
24753
24754VALUE
24755rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24756{
24757 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24758}
24759
24760static void
24761append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24762{
24763 if (stack == 0) {
24764 rb_str_cat_cstr(mesg, "0");
24765 }
24766 else {
24767 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24768 for (; mask && !(stack & mask); mask >>= 1) continue;
24769 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24770 }
24771}
24772
24773void
24774rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24775 const char *name, int line)
24776{
24777 VALUE mesg = rb_sprintf("%s: ", name);
24778 append_bitstack_value(p, stack, mesg);
24779 rb_str_catf(mesg, " at line %d\n", line);
24780 flush_debug_buffer(p, p->debug_output, mesg);
24781}
24782
24783void
24784rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24785{
24786 va_list ap;
24787 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24788
24789 va_start(ap, fmt);
24790 rb_str_vcatf(mesg, fmt, ap);
24791 va_end(ap);
24792 yyerror0(RSTRING_PTR(mesg));
24793 RB_GC_GUARD(mesg);
24794
24795 mesg = rb_str_new(0, 0);
24796 append_lex_state_name(p, p->lex.state, mesg);
24797 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24798 rb_str_resize(mesg, 0);
24799 append_bitstack_value(p, p->cond_stack, mesg);
24800 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24801 rb_str_resize(mesg, 0);
24802 append_bitstack_value(p, p->cmdarg_stack, mesg);
24803 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24804 if (p->debug_output == rb_ractor_stdout())
24805 p->debug_output = rb_ractor_stderr();
24806 p->debug = TRUE;
24807}
24808
24809static YYLTYPE *
24810rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24811{
24812 yylloc->beg_pos.lineno = sourceline;
24813 yylloc->beg_pos.column = beg_pos;
24814 yylloc->end_pos.lineno = sourceline;
24815 yylloc->end_pos.column = end_pos;
24816 return yylloc;
24817}
24818
24819YYLTYPE *
24820rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24821{
24822 int sourceline = here->sourceline;
24823 int beg_pos = (int)here->offset - here->quote
24824 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24825 int end_pos = (int)here->offset + here->length + here->quote;
24826
24827 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24828}
24829
24830YYLTYPE *
24831rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24832{
24833 yylloc->beg_pos.lineno = p->delayed.beg_line;
24834 yylloc->beg_pos.column = p->delayed.beg_col;
24835 yylloc->end_pos.lineno = p->delayed.end_line;
24836 yylloc->end_pos.column = p->delayed.end_col;
24837
24838 return yylloc;
24839}
24840
24841YYLTYPE *
24842rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24843{
24844 int sourceline = p->ruby_sourceline;
24845 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24846 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24847 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24848}
24849
24850YYLTYPE *
24851rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24852{
24853 yylloc->end_pos = yylloc->beg_pos;
24854
24855 return yylloc;
24856}
24857
24858YYLTYPE *
24859rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24860{
24861 int sourceline = p->ruby_sourceline;
24862 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24863 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24864 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24865}
24866
24867YYLTYPE *
24868rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24869{
24870 int sourceline = p->ruby_sourceline;
24871 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24872 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24873 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24874}
24875#endif /* !RIPPER */
24876
24877static int
24878assignable0(struct parser_params *p, ID id, const char **err)
24879{
24880 if (!id) return -1;
24881 switch (id) {
24882 case keyword_self:
24883 *err = "Can't change the value of self";
24884 return -1;
24885 case keyword_nil:
24886 *err = "Can't assign to nil";
24887 return -1;
24888 case keyword_true:
24889 *err = "Can't assign to true";
24890 return -1;
24891 case keyword_false:
24892 *err = "Can't assign to false";
24893 return -1;
24894 case keyword__FILE__:
24895 *err = "Can't assign to __FILE__";
24896 return -1;
24897 case keyword__LINE__:
24898 *err = "Can't assign to __LINE__";
24899 return -1;
24900 case keyword__ENCODING__:
24901 *err = "Can't assign to __ENCODING__";
24902 return -1;
24903 }
24904 switch (id_type(id)) {
24905 case ID_LOCAL:
24906 if (dyna_in_block(p)) {
24907 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24908 compile_error(p, "Can't assign to numbered parameter _%d",
24909 NUMPARAM_ID_TO_IDX(id));
24910 return -1;
24911 }
24912 if (dvar_curr(p, id)) return NODE_DASGN;
24913 if (dvar_defined(p, id)) return NODE_DASGN;
24914 if (local_id(p, id)) return NODE_LASGN;
24915 dyna_var(p, id);
24916 return NODE_DASGN;
24917 }
24918 else {
24919 if (!local_id(p, id)) local_var(p, id);
24920 return NODE_LASGN;
24921 }
24922 break;
24923 case ID_GLOBAL: return NODE_GASGN;
24924 case ID_INSTANCE: return NODE_IASGN;
24925 case ID_CONST:
24926 if (!p->ctxt.in_def) return NODE_CDECL;
24927 *err = "dynamic constant assignment";
24928 return -1;
24929 case ID_CLASS: return NODE_CVASGN;
24930 default:
24931 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24932 }
24933 return -1;
24934}
24935
24936static NODE*
24937assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24938{
24939 const char *err = 0;
24940 int node_type = assignable0(p, id, &err);
24941 switch (node_type) {
24942 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24943 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24944 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24945 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24946 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24947 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24948 }
24949/* TODO: FIXME */
24950#ifndef RIPPER
24951 if (err) yyerror1(loc, err);
24952#else
24953 if (err) set_value(assign_error(p, err, p->s_lvalue));
24954#endif
24955 return NEW_ERROR(loc);
24956}
24957
24958static int
24959is_private_local_id(struct parser_params *p, ID name)
24960{
24961 VALUE s;
24962 if (name == idUScore) return 1;
24963 if (!is_local_id(name)) return 0;
24964 s = rb_id2str(name);
24965 if (!s) return 0;
24966 return RSTRING_PTR(s)[0] == '_';
24967}
24968
24969static int
24970shadowing_lvar_0(struct parser_params *p, ID name)
24971{
24972 if (dyna_in_block(p)) {
24973 if (dvar_curr(p, name)) {
24974 if (is_private_local_id(p, name)) return 1;
24975 yyerror0("duplicated argument name");
24976 }
24977 else if (dvar_defined(p, name) || local_id(p, name)) {
24978 vtable_add(p->lvtbl->vars, name);
24979 if (p->lvtbl->used) {
24980 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24981 }
24982 return 0;
24983 }
24984 }
24985 else {
24986 if (local_id(p, name)) {
24987 if (is_private_local_id(p, name)) return 1;
24988 yyerror0("duplicated argument name");
24989 }
24990 }
24991 return 1;
24992}
24993
24994static ID
24995shadowing_lvar(struct parser_params *p, ID name)
24996{
24997 shadowing_lvar_0(p, name);
24998 return name;
24999}
25000
25001static void
25002new_bv(struct parser_params *p, ID name)
25003{
25004 if (!name) return;
25005 if (!is_local_id(name)) {
25006 compile_error(p, "invalid local variable - %"PRIsVALUE,
25007 rb_id2str(name));
25008 return;
25009 }
25010 if (!shadowing_lvar_0(p, name)) return;
25011 dyna_var(p, name);
25012 ID *vidp = 0;
25013 if (dvar_defined_ref(p, name, &vidp)) {
25014 if (vidp) *vidp |= LVAR_USED;
25015 }
25016}
25017
25018static void
25019aryset_check(struct parser_params *p, NODE *args)
25020{
25021 NODE *block = 0, *kwds = 0;
25022 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25023 block = RNODE_BLOCK_PASS(args)->nd_body;
25024 args = RNODE_BLOCK_PASS(args)->nd_head;
25025 }
25026 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25027 args = RNODE_ARGSCAT(args)->nd_body;
25028 }
25029 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25030 kwds = RNODE_ARGSPUSH(args)->nd_body;
25031 }
25032 else {
25033 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25034 next = RNODE_LIST(next)->nd_next) {
25035 kwds = RNODE_LIST(next)->nd_head;
25036 }
25037 }
25038 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25039 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25040 }
25041 if (block) {
25042 yyerror1(&block->nd_loc, "block arg given in index assignment");
25043 }
25044}
25045
25046static NODE *
25047aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25048{
25049 aryset_check(p, idx);
25050 return NEW_ATTRASGN(recv, tASET, idx, loc);
25051}
25052
25053static void
25054block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25055{
25056 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25057 compile_error(p, "both block arg and actual block given");
25058 }
25059}
25060
25061static NODE *
25062attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25063{
25064 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25065 return NEW_ATTRASGN(recv, id, 0, loc);
25066}
25067
25068static VALUE
25069rb_backref_error(struct parser_params *p, NODE *node)
25070{
25071#ifndef RIPPER
25072# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25073#else
25074# define ERR(...) rb_sprintf(__VA_ARGS__)
25075#endif
25076 switch (nd_type(node)) {
25077 case NODE_NTH_REF:
25078 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25079 case NODE_BACK_REF:
25080 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25081 }
25082#undef ERR
25083 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25084}
25085
25086static NODE *
25087arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25088{
25089 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25090 switch (nd_type(node1)) {
25091 case NODE_LIST:
25092 return list_append(p, node1, node2);
25093 case NODE_BLOCK_PASS:
25094 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25095 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25096 return node1;
25097 case NODE_ARGSPUSH:
25098 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25099 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25100 nd_set_type(node1, NODE_ARGSCAT);
25101 return node1;
25102 case NODE_ARGSCAT:
25103 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25104 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25105 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25106 return node1;
25107 }
25108 return NEW_ARGSPUSH(node1, node2, loc);
25109}
25110
25111static NODE *
25112arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25113{
25114 if (!node2) return node1;
25115 switch (nd_type(node1)) {
25116 case NODE_BLOCK_PASS:
25117 if (RNODE_BLOCK_PASS(node1)->nd_head)
25118 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25119 else
25120 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25121 return node1;
25122 case NODE_ARGSPUSH:
25123 if (!nd_type_p(node2, NODE_LIST)) break;
25124 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25125 nd_set_type(node1, NODE_ARGSCAT);
25126 return node1;
25127 case NODE_ARGSCAT:
25128 if (!nd_type_p(node2, NODE_LIST) ||
25129 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25130 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25131 return node1;
25132 }
25133 return NEW_ARGSCAT(node1, node2, loc);
25134}
25135
25136static NODE *
25137last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25138{
25139 NODE *n1;
25140 if ((n1 = splat_array(args)) != 0) {
25141 return list_append(p, n1, last_arg);
25142 }
25143 return arg_append(p, args, last_arg, loc);
25144}
25145
25146static NODE *
25147rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25148{
25149 NODE *n1;
25150 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25151 return list_concat(n1, rest_arg);
25152 }
25153 return arg_concat(p, args, rest_arg, loc);
25154}
25155
25156static NODE *
25157splat_array(NODE* node)
25158{
25159 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25160 if (nd_type_p(node, NODE_LIST)) return node;
25161 return 0;
25162}
25163
25164static void
25165mark_lvar_used(struct parser_params *p, NODE *rhs)
25166{
25167 ID *vidp = NULL;
25168 if (!rhs) return;
25169 switch (nd_type(rhs)) {
25170 case NODE_LASGN:
25171 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25172 if (vidp) *vidp |= LVAR_USED;
25173 }
25174 break;
25175 case NODE_DASGN:
25176 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25177 if (vidp) *vidp |= LVAR_USED;
25178 }
25179 break;
25180#if 0
25181 case NODE_MASGN:
25182 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25183 mark_lvar_used(p, rhs->nd_head);
25184 }
25185 break;
25186#endif
25187 }
25188}
25189
25190static int is_static_content(NODE *node);
25191
25192static NODE *
25193node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25194{
25195 if (!lhs) return 0;
25196
25197 switch (nd_type(lhs)) {
25198 case NODE_CDECL:
25199 case NODE_GASGN:
25200 case NODE_IASGN:
25201 case NODE_LASGN:
25202 case NODE_DASGN:
25203 case NODE_MASGN:
25204 case NODE_CVASGN:
25205 set_nd_value(p, lhs, rhs);
25206 nd_set_loc(lhs, loc);
25207 break;
25208
25209 case NODE_ATTRASGN:
25210 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25211 nd_set_loc(lhs, loc);
25212 break;
25213
25214 default:
25215 /* should not happen */
25216 break;
25217 }
25218
25219 return lhs;
25220}
25221
25222static NODE *
25223value_expr_check(struct parser_params *p, NODE *node)
25224{
25225 NODE *void_node = 0, *vn;
25226
25227 if (!node) {
25228 rb_warning0("empty expression");
25229 }
25230 while (node) {
25231 switch (nd_type(node)) {
25232 case NODE_ENSURE:
25233 vn = RNODE_ENSURE(node)->nd_head;
25234 node = RNODE_ENSURE(node)->nd_ensr;
25235 /* nd_ensr should not be NULL, check it out next */
25236 if (vn && (vn = value_expr_check(p, vn))) {
25237 goto found;
25238 }
25239 break;
25240
25241 case NODE_RESCUE:
25242 /* void only if all children are void */
25243 vn = RNODE_RESCUE(node)->nd_head;
25244 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
25245 if (!void_node) void_node = vn;
25246 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25247 if (!nd_type_p(r, NODE_RESBODY)) {
25248 compile_error(p, "unexpected node");
25249 return NULL;
25250 }
25251 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25252 void_node = 0;
25253 break;
25254 }
25255 if (!void_node) void_node = vn;
25256 }
25257 node = RNODE_RESCUE(node)->nd_else;
25258 if (!node) return void_node;
25259 break;
25260
25261 case NODE_RETURN:
25262 case NODE_BREAK:
25263 case NODE_NEXT:
25264 case NODE_REDO:
25265 case NODE_RETRY:
25266 goto found;
25267
25268 case NODE_CASE3:
25269 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
25270 compile_error(p, "unexpected node");
25271 return NULL;
25272 }
25273 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
25274 return NULL;
25275 }
25276 /* single line pattern matching with "=>" operator */
25277 goto found;
25278
25279 case NODE_BLOCK:
25280 while (RNODE_BLOCK(node)->nd_next) {
25281 node = RNODE_BLOCK(node)->nd_next;
25282 }
25283 node = RNODE_BLOCK(node)->nd_head;
25284 break;
25285
25286 case NODE_BEGIN:
25287 node = RNODE_BEGIN(node)->nd_body;
25288 break;
25289
25290 case NODE_IF:
25291 case NODE_UNLESS:
25292 if (!RNODE_IF(node)->nd_body) {
25293 return NULL;
25294 }
25295 else if (!RNODE_IF(node)->nd_else) {
25296 return NULL;
25297 }
25298 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25299 if (!vn) return NULL;
25300 if (!void_node) void_node = vn;
25301 node = RNODE_IF(node)->nd_else;
25302 break;
25303
25304 case NODE_AND:
25305 case NODE_OR:
25306 node = RNODE_AND(node)->nd_1st;
25307 break;
25308
25309 case NODE_LASGN:
25310 case NODE_DASGN:
25311 case NODE_MASGN:
25312 mark_lvar_used(p, node);
25313 return NULL;
25314
25315 default:
25316 return NULL;
25317 }
25318 }
25319
25320 return NULL;
25321
25322 found:
25323 /* return the first found node */
25324 return void_node ? void_node : node;
25325}
25326
25327static int
25328value_expr(struct parser_params *p, NODE *node)
25329{
25330 NODE *void_node = value_expr_check(p, node);
25331 if (void_node) {
25332 yyerror1(&void_node->nd_loc, "void value expression");
25333 /* or "control never reach"? */
25334 return FALSE;
25335 }
25336 return TRUE;
25337}
25338
25339static void
25340void_expr(struct parser_params *p, NODE *node)
25341{
25342 const char *useless = 0;
25343
25344 if (!RTEST(ruby_verbose)) return;
25345
25346 if (!node || !(node = nd_once_body(node))) return;
25347 switch (nd_type(node)) {
25348 case NODE_OPCALL:
25349 switch (RNODE_OPCALL(node)->nd_mid) {
25350 case '+':
25351 case '-':
25352 case '*':
25353 case '/':
25354 case '%':
25355 case tPOW:
25356 case tUPLUS:
25357 case tUMINUS:
25358 case '|':
25359 case '^':
25360 case '&':
25361 case tCMP:
25362 case '>':
25363 case tGEQ:
25364 case '<':
25365 case tLEQ:
25366 case tEQ:
25367 case tNEQ:
25368 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25369 break;
25370 }
25371 break;
25372
25373 case NODE_LVAR:
25374 case NODE_DVAR:
25375 case NODE_GVAR:
25376 case NODE_IVAR:
25377 case NODE_CVAR:
25378 case NODE_NTH_REF:
25379 case NODE_BACK_REF:
25380 useless = "a variable";
25381 break;
25382 case NODE_CONST:
25383 useless = "a constant";
25384 break;
25385 case NODE_SYM:
25386 case NODE_LINE:
25387 case NODE_FILE:
25388 case NODE_ENCODING:
25389 case NODE_INTEGER:
25390 case NODE_FLOAT:
25391 case NODE_RATIONAL:
25392 case NODE_IMAGINARY:
25393 case NODE_STR:
25394 case NODE_DSTR:
25395 case NODE_REGX:
25396 case NODE_DREGX:
25397 useless = "a literal";
25398 break;
25399 case NODE_COLON2:
25400 case NODE_COLON3:
25401 useless = "::";
25402 break;
25403 case NODE_DOT2:
25404 useless = "..";
25405 break;
25406 case NODE_DOT3:
25407 useless = "...";
25408 break;
25409 case NODE_SELF:
25410 useless = "self";
25411 break;
25412 case NODE_NIL:
25413 useless = "nil";
25414 break;
25415 case NODE_TRUE:
25416 useless = "true";
25417 break;
25418 case NODE_FALSE:
25419 useless = "false";
25420 break;
25421 case NODE_DEFINED:
25422 useless = "defined?";
25423 break;
25424 }
25425
25426 if (useless) {
25427 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25428 }
25429}
25430
25431/* warns useless use of block and returns the last statement node */
25432static NODE *
25433void_stmts(struct parser_params *p, NODE *node)
25434{
25435 NODE *const n = node;
25436 if (!RTEST(ruby_verbose)) return n;
25437 if (!node) return n;
25438 if (!nd_type_p(node, NODE_BLOCK)) return n;
25439
25440 while (RNODE_BLOCK(node)->nd_next) {
25441 void_expr(p, RNODE_BLOCK(node)->nd_head);
25442 node = RNODE_BLOCK(node)->nd_next;
25443 }
25444 return RNODE_BLOCK(node)->nd_head;
25445}
25446
25447static NODE *
25448remove_begin(NODE *node)
25449{
25450 NODE **n = &node, *n1 = node;
25451 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25452 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25453 }
25454 return node;
25455}
25456
25457static void
25458reduce_nodes(struct parser_params *p, NODE **body)
25459{
25460 NODE *node = *body;
25461
25462 if (!node) {
25463 *body = NEW_NIL(&NULL_LOC);
25464 return;
25465 }
25466#define subnodes(type, n1, n2) \
25467 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25468 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25469 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25470
25471 while (node) {
25472 int newline = (int)nd_fl_newline(node);
25473 switch (nd_type(node)) {
25474 end:
25475 case NODE_NIL:
25476 *body = 0;
25477 return;
25478 case NODE_BEGIN:
25479 *body = node = RNODE_BEGIN(node)->nd_body;
25480 if (newline && node) nd_set_fl_newline(node);
25481 continue;
25482 case NODE_BLOCK:
25483 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25484 break;
25485 case NODE_IF:
25486 case NODE_UNLESS:
25487 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25488 return;
25489 case NODE_CASE:
25490 body = &RNODE_CASE(node)->nd_body;
25491 break;
25492 case NODE_WHEN:
25493 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25494 break;
25495 case NODE_ENSURE:
25496 body = &RNODE_ENSURE(node)->nd_head;
25497 break;
25498 case NODE_RESCUE:
25499 newline = 0; // RESBODY should not be a NEWLINE
25500 if (RNODE_RESCUE(node)->nd_else) {
25501 body = &RNODE_RESCUE(node)->nd_resq;
25502 break;
25503 }
25504 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25505 break;
25506 default:
25507 return;
25508 }
25509 node = *body;
25510 if (newline && node) nd_set_fl_newline(node);
25511 }
25512
25513#undef subnodes
25514}
25515
25516static int
25517is_static_content(NODE *node)
25518{
25519 if (!node) return 1;
25520 switch (nd_type(node)) {
25521 case NODE_HASH:
25522 if (!(node = RNODE_HASH(node)->nd_head)) break;
25523 case NODE_LIST:
25524 do {
25525 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25526 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25527 case NODE_SYM:
25528 case NODE_REGX:
25529 case NODE_LINE:
25530 case NODE_FILE:
25531 case NODE_ENCODING:
25532 case NODE_INTEGER:
25533 case NODE_FLOAT:
25534 case NODE_RATIONAL:
25535 case NODE_IMAGINARY:
25536 case NODE_STR:
25537 case NODE_NIL:
25538 case NODE_TRUE:
25539 case NODE_FALSE:
25540 case NODE_ZLIST:
25541 break;
25542 default:
25543 return 0;
25544 }
25545 return 1;
25546}
25547
25548static int
25549assign_in_cond(struct parser_params *p, NODE *node)
25550{
25551 switch (nd_type(node)) {
25552 case NODE_MASGN:
25553 case NODE_LASGN:
25554 case NODE_DASGN:
25555 case NODE_GASGN:
25556 case NODE_IASGN:
25557 case NODE_CVASGN:
25558 case NODE_CDECL:
25559 break;
25560
25561 default:
25562 return 0;
25563 }
25564
25565 if (!get_nd_value(p, node)) return 1;
25566 if (is_static_content(get_nd_value(p, node))) {
25567 /* reports always */
25568 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25569 }
25570 return 1;
25571}
25572
25573enum cond_type {
25574 COND_IN_OP,
25575 COND_IN_COND,
25576 COND_IN_FF
25577};
25578
25579#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25580 switch (t) { \
25581 case COND_IN_OP: break; \
25582 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25583 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25584 } \
25585} while (0)
25586
25587static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25588
25589static NODE*
25590range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25591{
25592 enum node_type type;
25593
25594 if (node == 0) return 0;
25595
25596 type = nd_type(node);
25597 value_expr(p, node);
25598 if (type == NODE_INTEGER) {
25599 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25600 ID lineno = rb_intern("$.");
25601 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25602 }
25603 return cond0(p, node, COND_IN_FF, loc, true);
25604}
25605
25606static NODE*
25607cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25608{
25609 if (node == 0) return 0;
25610 if (!(node = nd_once_body(node))) return 0;
25611 assign_in_cond(p, node);
25612
25613 switch (nd_type(node)) {
25614 case NODE_BEGIN:
25615 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25616 break;
25617
25618 case NODE_DSTR:
25619 case NODE_EVSTR:
25620 case NODE_STR:
25621 case NODE_FILE:
25622 SWITCH_BY_COND_TYPE(type, warn, "string ");
25623 break;
25624
25625 case NODE_REGX:
25626 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25627 nd_set_type(node, NODE_MATCH);
25628 break;
25629
25630 case NODE_DREGX:
25631 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25632
25633 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25634
25635 case NODE_BLOCK:
25636 {
25637 NODE *end = RNODE_BLOCK(node)->nd_end;
25638 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25639 if (top) top = node == end;
25640 *expr = cond0(p, *expr, type, loc, top);
25641 }
25642 break;
25643
25644 case NODE_AND:
25645 case NODE_OR:
25646 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25647 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25648 break;
25649
25650 case NODE_DOT2:
25651 case NODE_DOT3:
25652 if (!top) break;
25653 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25654 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25655 switch (nd_type(node)) {
25656 case NODE_DOT2:
25657 nd_set_type(node,NODE_FLIP2);
25658 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25659 (void)flip2;
25660 break;
25661 case NODE_DOT3:
25662 nd_set_type(node, NODE_FLIP3);
25663 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25664 (void)flip3;
25665 break;
25666 }
25667 break;
25668
25669 case NODE_SYM:
25670 case NODE_DSYM:
25671 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25672 break;
25673
25674 case NODE_LINE:
25675 case NODE_ENCODING:
25676 case NODE_INTEGER:
25677 case NODE_FLOAT:
25678 case NODE_RATIONAL:
25679 case NODE_IMAGINARY:
25680 SWITCH_BY_COND_TYPE(type, warning, "");
25681 break;
25682
25683 default:
25684 break;
25685 }
25686 return node;
25687}
25688
25689static NODE*
25690cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25691{
25692 if (node == 0) return 0;
25693 return cond0(p, node, COND_IN_COND, loc, true);
25694}
25695
25696static NODE*
25697method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25698{
25699 if (node == 0) return 0;
25700 return cond0(p, node, COND_IN_OP, loc, true);
25701}
25702
25703static NODE*
25704new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25705{
25706 YYLTYPE loc = {*pos, *pos};
25707 return NEW_NIL(&loc);
25708}
25709
25710static NODE*
25711new_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)
25712{
25713 if (!cc) return right;
25714 cc = cond0(p, cc, COND_IN_COND, loc, true);
25715 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25716}
25717
25718static NODE*
25719new_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)
25720{
25721 if (!cc) return right;
25722 cc = cond0(p, cc, COND_IN_COND, loc, true);
25723 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25724}
25725
25726#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))
25727
25728static NODE*
25729logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25730 const YYLTYPE *op_loc, const YYLTYPE *loc)
25731{
25732 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25733 NODE *op;
25734 value_expr(p, left);
25735 if (left && nd_type_p(left, type)) {
25736 NODE *node = left, *second;
25737 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25738 node = second;
25739 }
25740 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25741 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25742 left->nd_loc.end_pos = loc->end_pos;
25743 return left;
25744 }
25745 op = NEW_AND_OR(type, left, right, loc, op_loc);
25746 nd_set_line(op, op_loc->beg_pos.lineno);
25747 return op;
25748}
25749
25750#undef NEW_AND_OR
25751
25752static void
25753no_blockarg(struct parser_params *p, NODE *node)
25754{
25755 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25756 compile_error(p, "block argument should not be given");
25757 }
25758}
25759
25760static NODE *
25761ret_args(struct parser_params *p, NODE *node)
25762{
25763 if (node) {
25764 no_blockarg(p, node);
25765 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25766 node = RNODE_LIST(node)->nd_head;
25767 }
25768 }
25769 return node;
25770}
25771
25772static NODE*
25773negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
25774{
25775 switch (nd_type(node)) {
25776 case NODE_INTEGER:
25777 RNODE_INTEGER(node)->minus = TRUE;
25778 break;
25779 case NODE_FLOAT:
25780 RNODE_FLOAT(node)->minus = TRUE;
25781 break;
25782 case NODE_RATIONAL:
25783 RNODE_RATIONAL(node)->minus = TRUE;
25784 break;
25785 case NODE_IMAGINARY:
25786 RNODE_IMAGINARY(node)->minus = TRUE;
25787 break;
25788 }
25789 node->nd_loc = *loc;
25790 return node;
25791}
25792
25793static NODE *
25794arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25795{
25796 if (node2) {
25797 if (!node1) return (NODE *)node2;
25798 node2->nd_head = node1;
25799 nd_set_first_lineno(node2, nd_first_lineno(node1));
25800 nd_set_first_column(node2, nd_first_column(node1));
25801 return (NODE *)node2;
25802 }
25803 return node1;
25804}
25805
25806static bool
25807args_info_empty_p(struct rb_args_info *args)
25808{
25809 if (args->pre_args_num) return false;
25810 if (args->post_args_num) return false;
25811 if (args->rest_arg) return false;
25812 if (args->opt_args) return false;
25813 if (args->block_arg) return false;
25814 if (args->kw_args) return false;
25815 if (args->kw_rest_arg) return false;
25816 return true;
25817}
25818
25819static rb_node_args_t *
25820new_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)
25821{
25822 struct rb_args_info *args = &tail->nd_ainfo;
25823
25824 if (args->forwarding) {
25825 if (rest_arg) {
25826 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25827 return tail;
25828 }
25829 rest_arg = idFWD_REST;
25830 }
25831
25832 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25833 args->pre_init = pre_args ? pre_args->nd_next : 0;
25834
25835 args->post_args_num = post_args ? post_args->nd_plen : 0;
25836 args->post_init = post_args ? post_args->nd_next : 0;
25837 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25838
25839 args->rest_arg = rest_arg;
25840
25841 args->opt_args = opt_args;
25842
25843 nd_set_loc(RNODE(tail), loc);
25844
25845 return tail;
25846}
25847
25848static rb_node_args_t *
25849new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25850{
25851 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25852 struct rb_args_info *args = &node->nd_ainfo;
25853 if (p->error_p) return node;
25854
25855 args->block_arg = block;
25856 args->kw_args = kw_args;
25857
25858 if (kw_args) {
25859 /*
25860 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25861 * variable order: k1, kr1, k2, &b, internal_id, krest
25862 * #=> <reorder>
25863 * variable order: kr1, k1, k2, internal_id, krest, &b
25864 */
25865 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25866 struct vtable *vtargs = p->lvtbl->args;
25867 rb_node_kw_arg_t *kwn = kw_args;
25868
25869 if (block) block = vtargs->tbl[vtargs->pos-1];
25870 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25871 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25872 while (kwn) {
25873 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25874 --kw_vars;
25875 --required_kw_vars;
25876 kwn = kwn->nd_next;
25877 }
25878
25879 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25880 ID vid = get_nd_vid(p, kwn->nd_body);
25881 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25882 *required_kw_vars++ = vid;
25883 }
25884 else {
25885 *kw_vars++ = vid;
25886 }
25887 }
25888
25889 arg_var(p, kw_bits);
25890 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25891 if (block) arg_var(p, block);
25892
25893 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25894 }
25895 else if (kw_rest_arg == idNil) {
25896 args->no_kwarg = 1;
25897 }
25898 else if (kw_rest_arg) {
25899 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25900 }
25901
25902 return node;
25903}
25904
25905static rb_node_args_t *
25906args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25907{
25908 if (max_numparam > NO_PARAM || it_id) {
25909 if (!args) {
25910 YYLTYPE loc = RUBY_INIT_YYLLOC();
25911 args = new_args_tail(p, 0, 0, 0, 0);
25912 nd_set_loc(RNODE(args), &loc);
25913 }
25914 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25915 }
25916 return args;
25917}
25918
25919static NODE*
25920new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25921{
25922 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25923
25924 if (pre_arg) {
25925 NODE *pre_args = NEW_LIST(pre_arg, loc);
25926 if (RNODE_ARYPTN(aryptn)->pre_args) {
25927 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25928 }
25929 else {
25930 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25931 }
25932 }
25933 return aryptn;
25934}
25935
25936static NODE*
25937new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25938{
25939 if (has_rest) {
25940 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25941 }
25942 else {
25943 rest_arg = NULL;
25944 }
25945 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25946
25947 return node;
25948}
25949
25950static NODE*
25951new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25952{
25953 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25954
25955 return fndptn;
25956}
25957
25958static NODE*
25959new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25960{
25961 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25962 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25963 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25964
25965 return node;
25966}
25967
25968static NODE*
25969new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25970{
25971 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25972 return hshptn;
25973}
25974
25975static NODE*
25976new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25977{
25978 NODE *node, *kw_rest_arg_node;
25979
25980 if (kw_rest_arg == idNil) {
25981 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25982 }
25983 else if (kw_rest_arg) {
25984 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25985 }
25986 else {
25987 kw_rest_arg_node = NULL;
25988 }
25989
25990 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25991
25992 return node;
25993}
25994
25995static NODE*
25996dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25997{
25998 if (!node) {
25999 return NEW_SYM(STR_NEW0(), loc);
26000 }
26001
26002 switch (nd_type(node)) {
26003 case NODE_DSTR:
26004 nd_set_type(node, NODE_DSYM);
26005 nd_set_loc(node, loc);
26006 break;
26007 case NODE_STR:
26008 node = str_to_sym_node(p, node, loc);
26009 break;
26010 default:
26011 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26012 break;
26013 }
26014 return node;
26015}
26016
26017static int
26018nd_type_st_key_enable_p(NODE *node)
26019{
26020 switch (nd_type(node)) {
26021 case NODE_INTEGER:
26022 case NODE_FLOAT:
26023 case NODE_RATIONAL:
26024 case NODE_IMAGINARY:
26025 case NODE_STR:
26026 case NODE_SYM:
26027 case NODE_REGX:
26028 case NODE_LINE:
26029 case NODE_FILE:
26030 case NODE_ENCODING:
26031 return true;
26032 default:
26033 return false;
26034 }
26035}
26036
26037static VALUE
26038nd_value(struct parser_params *p, NODE *node)
26039{
26040 switch (nd_type(node)) {
26041 case NODE_STR:
26042 return rb_node_str_string_val(node);
26043 case NODE_INTEGER:
26044 return rb_node_integer_literal_val(node);
26045 case NODE_FLOAT:
26046 return rb_node_float_literal_val(node);
26047 case NODE_RATIONAL:
26048 return rb_node_rational_literal_val(node);
26049 case NODE_IMAGINARY:
26050 return rb_node_imaginary_literal_val(node);
26051 case NODE_SYM:
26052 return rb_node_sym_string_val(node);
26053 case NODE_REGX:
26054 return rb_node_regx_string_val(node);
26055 case NODE_LINE:
26056 return rb_node_line_lineno_val(node);
26057 case NODE_ENCODING:
26058 return rb_node_encoding_val(node);
26059 case NODE_FILE:
26060 return rb_node_file_path_val(node);
26061 default:
26062 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26064 }
26065}
26066
26067static void
26068warn_duplicate_keys(struct parser_params *p, NODE *hash)
26069{
26070 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26071 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26072 while (hash && RNODE_LIST(hash)->nd_next) {
26073 NODE *head = RNODE_LIST(hash)->nd_head;
26074 NODE *value = RNODE_LIST(hash)->nd_next;
26075 NODE *next = RNODE_LIST(value)->nd_next;
26076 st_data_t key;
26077 st_data_t data;
26078
26079 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26080 if (!head) {
26081 head = value;
26082 }
26083
26084 if (nd_type_st_key_enable_p(head)) {
26085 key = (st_data_t)head;
26086
26087 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26088 rb_warn2L(nd_line((NODE *)data),
26089 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26090 nd_value(p, head), WARN_I(nd_line(head)));
26091 }
26092 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26093 }
26094 hash = next;
26095 }
26096 st_free_table(p->warn_duplicate_keys_table);
26097 p->warn_duplicate_keys_table = NULL;
26098}
26099
26100static NODE *
26101new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26102{
26103 if (hash) warn_duplicate_keys(p, hash);
26104 return NEW_HASH(hash, loc);
26105}
26106
26107static void
26108error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26109{
26110 if (is_private_local_id(p, id)) {
26111 return;
26112 }
26113 if (st_is_member(p->pvtbl, id)) {
26114 yyerror1(loc, "duplicated variable name");
26115 }
26116 else if (p->ctxt.in_alt_pattern && id) {
26117 yyerror1(loc, "variable capture in alternative pattern");
26118 }
26119 else {
26120 p->ctxt.capture_in_pattern = 1;
26121 st_insert(p->pvtbl, (st_data_t)id, 0);
26122 }
26123}
26124
26125static void
26126error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26127{
26128 if (!p->pktbl) {
26129 p->pktbl = st_init_numtable();
26130 }
26131 else if (st_is_member(p->pktbl, key)) {
26132 yyerror1(loc, "duplicated key name");
26133 return;
26134 }
26135 st_insert(p->pktbl, (st_data_t)key, 0);
26136}
26137
26138static NODE *
26139new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26140{
26141 return NEW_HASH(hash, loc);
26142}
26143
26144static NODE *
26145new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26146{
26147 NODE *asgn;
26148
26149 if (lhs) {
26150 ID vid = get_nd_vid(p, lhs);
26151 YYLTYPE lhs_loc = lhs->nd_loc;
26152 if (op == tOROP) {
26153 set_nd_value(p, lhs, rhs);
26154 nd_set_loc(lhs, loc);
26155 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26156 }
26157 else if (op == tANDOP) {
26158 set_nd_value(p, lhs, rhs);
26159 nd_set_loc(lhs, loc);
26160 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26161 }
26162 else {
26163 asgn = lhs;
26164 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26165 set_nd_value(p, asgn, rhs);
26166 nd_set_loc(asgn, loc);
26167 }
26168 }
26169 else {
26170 asgn = NEW_ERROR(loc);
26171 }
26172 return asgn;
26173}
26174
26175static NODE *
26176new_ary_op_assign(struct parser_params *p, NODE *ary,
26177 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26178 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26179{
26180 NODE *asgn;
26181
26182 aryset_check(p, args);
26183 args = make_list(args, args_loc);
26184 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26185 fixpos(asgn, ary);
26186 return asgn;
26187}
26188
26189static NODE *
26190new_attr_op_assign(struct parser_params *p, NODE *lhs,
26191 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26192 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26193{
26194 NODE *asgn;
26195
26196 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26197 fixpos(asgn, lhs);
26198 return asgn;
26199}
26200
26201static NODE *
26202new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26203{
26204 NODE *asgn;
26205
26206 if (lhs) {
26207 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26208 }
26209 else {
26210 asgn = NEW_ERROR(loc);
26211 }
26212 fixpos(asgn, lhs);
26213 return asgn;
26214}
26215
26216static NODE *
26217const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26218{
26219 if (p->ctxt.in_def) {
26220#ifndef RIPPER
26221 yyerror1(loc, "dynamic constant assignment");
26222#else
26223 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26224#endif
26225 }
26226 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26227}
26228
26229#ifdef RIPPER
26230static VALUE
26231assign_error(struct parser_params *p, const char *mesg, VALUE a)
26232{
26233 a = dispatch2(assign_error, ERR_MESG(), a);
26234 ripper_error(p);
26235 return a;
26236}
26237#endif
26238
26239static NODE *
26240new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26241{
26242 NODE *result = head;
26243 if (rescue) {
26244 NODE *tmp = rescue_else ? rescue_else : rescue;
26245 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26246
26247 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26248 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26249 }
26250 if (ensure) {
26251 result = NEW_ENSURE(result, ensure, loc);
26252 }
26253 fixpos(result, head);
26254 return result;
26255}
26256
26257static void
26258warn_unused_var(struct parser_params *p, struct local_vars *local)
26259{
26260 int cnt;
26261
26262 if (!local->used) return;
26263 cnt = local->used->pos;
26264 if (cnt != local->vars->pos) {
26265 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26266 }
26267#ifndef RIPPER
26268 ID *v = local->vars->tbl;
26269 ID *u = local->used->tbl;
26270 for (int i = 0; i < cnt; ++i) {
26271 if (!v[i] || (u[i] & LVAR_USED)) continue;
26272 if (is_private_local_id(p, v[i])) continue;
26273 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26274 }
26275#endif
26276}
26277
26278static void
26279local_push(struct parser_params *p, int toplevel_scope)
26280{
26281 struct local_vars *local;
26282 int inherits_dvars = toplevel_scope && compile_for_eval;
26283 int warn_unused_vars = RTEST(ruby_verbose);
26284
26285 local = ALLOC(struct local_vars);
26286 local->prev = p->lvtbl;
26287 local->args = vtable_alloc(0);
26288 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26289#ifndef RIPPER
26290 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26291 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26292#endif
26293 local->numparam.outer = 0;
26294 local->numparam.inner = 0;
26295 local->numparam.current = 0;
26296 local->it = 0;
26297 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26298
26299# if WARN_PAST_SCOPE
26300 local->past = 0;
26301# endif
26302 CMDARG_PUSH(0);
26303 COND_PUSH(0);
26304 p->lvtbl = local;
26305}
26306
26307static void
26308vtable_chain_free(struct parser_params *p, struct vtable *table)
26309{
26310 while (!DVARS_TERMINAL_P(table)) {
26311 struct vtable *cur_table = table;
26312 table = cur_table->prev;
26313 vtable_free(cur_table);
26314 }
26315}
26316
26317static void
26318local_free(struct parser_params *p, struct local_vars *local)
26319{
26320 vtable_chain_free(p, local->used);
26321
26322# if WARN_PAST_SCOPE
26323 vtable_chain_free(p, local->past);
26324# endif
26325
26326 vtable_chain_free(p, local->args);
26327 vtable_chain_free(p, local->vars);
26328
26329 ruby_sized_xfree(local, sizeof(struct local_vars));
26330}
26331
26332static void
26333local_pop(struct parser_params *p)
26334{
26335 struct local_vars *local = p->lvtbl->prev;
26336 if (p->lvtbl->used) {
26337 warn_unused_var(p, p->lvtbl);
26338 }
26339
26340 local_free(p, p->lvtbl);
26341 p->lvtbl = local;
26342
26343 CMDARG_POP();
26344 COND_POP();
26345}
26346
26347static rb_ast_id_table_t *
26348local_tbl(struct parser_params *p)
26349{
26350 int cnt_args = vtable_size(p->lvtbl->args);
26351 int cnt_vars = vtable_size(p->lvtbl->vars);
26352 int cnt = cnt_args + cnt_vars;
26353 int i, j;
26354 rb_ast_id_table_t *tbl;
26355
26356 if (cnt <= 0) return 0;
26357 tbl = rb_ast_new_local_table(p->ast, cnt);
26358 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26359 /* remove IDs duplicated to warn shadowing */
26360 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26361 ID id = p->lvtbl->vars->tbl[i];
26362 if (!vtable_included(p->lvtbl->args, id)) {
26363 tbl->ids[j++] = id;
26364 }
26365 }
26366 if (j < cnt) {
26367 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26368 }
26369
26370 return tbl;
26371}
26372
26373static void
26374numparam_name(struct parser_params *p, ID id)
26375{
26376 if (!NUMPARAM_ID_P(id)) return;
26377 compile_error(p, "_%d is reserved for numbered parameter",
26378 NUMPARAM_ID_TO_IDX(id));
26379}
26380
26381static void
26382arg_var(struct parser_params *p, ID id)
26383{
26384 numparam_name(p, id);
26385 vtable_add(p->lvtbl->args, id);
26386}
26387
26388static void
26389local_var(struct parser_params *p, ID id)
26390{
26391 numparam_name(p, id);
26392 vtable_add(p->lvtbl->vars, id);
26393 if (p->lvtbl->used) {
26394 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26395 }
26396}
26397
26398#ifndef RIPPER
26399int
26400rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26401{
26402 return rb_local_defined(id, iseq);
26403}
26404#endif
26405
26406static int
26407local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26408{
26409 struct vtable *vars, *args, *used;
26410
26411 vars = p->lvtbl->vars;
26412 args = p->lvtbl->args;
26413 used = p->lvtbl->used;
26414
26415 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26416 vars = vars->prev;
26417 args = args->prev;
26418 if (used) used = used->prev;
26419 }
26420
26421 if (vars && vars->prev == DVARS_INHERIT) {
26422 return rb_parser_local_defined(p, id, p->parent_iseq);
26423 }
26424 else if (vtable_included(args, id)) {
26425 return 1;
26426 }
26427 else {
26428 int i = vtable_included(vars, id);
26429 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26430 return i != 0;
26431 }
26432}
26433
26434static int
26435local_id(struct parser_params *p, ID id)
26436{
26437 return local_id_ref(p, id, NULL);
26438}
26439
26440static int
26441check_forwarding_args(struct parser_params *p)
26442{
26443 if (local_id(p, idFWD_ALL)) return TRUE;
26444 compile_error(p, "unexpected ...");
26445 return FALSE;
26446}
26447
26448static void
26449add_forwarding_args(struct parser_params *p)
26450{
26451 arg_var(p, idFWD_REST);
26452 arg_var(p, idFWD_KWREST);
26453 arg_var(p, idFWD_BLOCK);
26454 arg_var(p, idFWD_ALL);
26455}
26456
26457static void
26458forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26459{
26460 bool conflict = false;
26461
26462 struct vtable *vars, *args;
26463
26464 vars = p->lvtbl->vars;
26465 args = p->lvtbl->args;
26466
26467 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26468 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26469 vars = vars->prev;
26470 args = args->prev;
26471 }
26472
26473 bool found = false;
26474 if (vars && vars->prev == DVARS_INHERIT && !found) {
26475 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26476 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26477 }
26478 else {
26479 found = (vtable_included(args, arg) &&
26480 !(all && vtable_included(args, all)));
26481 }
26482
26483 if (!found) {
26484 compile_error(p, "no anonymous %s parameter", var);
26485 }
26486 else if (conflict) {
26487 compile_error(p, "anonymous %s parameter is also used within block", var);
26488 }
26489}
26490
26491static NODE *
26492new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26493{
26494 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26495 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26496 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26497 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26498 block->forwarding = TRUE;
26499 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26500 return arg_blk_pass(args, block);
26501}
26502
26503static NODE *
26504numparam_push(struct parser_params *p)
26505{
26506 struct local_vars *local = p->lvtbl;
26507 NODE *inner = local->numparam.inner;
26508 if (!local->numparam.outer) {
26509 local->numparam.outer = local->numparam.current;
26510 }
26511 local->numparam.inner = 0;
26512 local->numparam.current = 0;
26513 local->it = 0;
26514 return inner;
26515}
26516
26517static void
26518numparam_pop(struct parser_params *p, NODE *prev_inner)
26519{
26520 struct local_vars *local = p->lvtbl;
26521 if (prev_inner) {
26522 /* prefer first one */
26523 local->numparam.inner = prev_inner;
26524 }
26525 else if (local->numparam.current) {
26526 /* current and inner are exclusive */
26527 local->numparam.inner = local->numparam.current;
26528 }
26529 if (p->max_numparam > NO_PARAM) {
26530 /* current and outer are exclusive */
26531 local->numparam.current = local->numparam.outer;
26532 local->numparam.outer = 0;
26533 }
26534 else {
26535 /* no numbered parameter */
26536 local->numparam.current = 0;
26537 }
26538 local->it = 0;
26539}
26540
26541static const struct vtable *
26542dyna_push(struct parser_params *p)
26543{
26544 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26545 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26546 if (p->lvtbl->used) {
26547 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26548 }
26549 return p->lvtbl->args;
26550}
26551
26552static void
26553dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26554{
26555 struct vtable *tmp = *vtblp;
26556 *vtblp = tmp->prev;
26557# if WARN_PAST_SCOPE
26558 if (p->past_scope_enabled) {
26559 tmp->prev = p->lvtbl->past;
26560 p->lvtbl->past = tmp;
26561 return;
26562 }
26563# endif
26564 vtable_free(tmp);
26565}
26566
26567static void
26568dyna_pop_1(struct parser_params *p)
26569{
26570 struct vtable *tmp;
26571
26572 if ((tmp = p->lvtbl->used) != 0) {
26573 warn_unused_var(p, p->lvtbl);
26574 p->lvtbl->used = p->lvtbl->used->prev;
26575 vtable_free(tmp);
26576 }
26577 dyna_pop_vtable(p, &p->lvtbl->args);
26578 dyna_pop_vtable(p, &p->lvtbl->vars);
26579}
26580
26581static void
26582dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26583{
26584 while (p->lvtbl->args != lvargs) {
26585 dyna_pop_1(p);
26586 if (!p->lvtbl->args) {
26587 struct local_vars *local = p->lvtbl->prev;
26588 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26589 p->lvtbl = local;
26590 }
26591 }
26592 dyna_pop_1(p);
26593}
26594
26595static int
26596dyna_in_block(struct parser_params *p)
26597{
26598 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26599}
26600
26601#ifndef RIPPER
26602int
26603dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26604{
26605 struct vtable *vars, *args, *used;
26606 int i;
26607
26608 args = p->lvtbl->args;
26609 vars = p->lvtbl->vars;
26610 used = p->lvtbl->used;
26611
26612 while (!DVARS_TERMINAL_P(vars)) {
26613 if (vtable_included(args, id)) {
26614 return 1;
26615 }
26616 if ((i = vtable_included(vars, id)) != 0) {
26617 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26618 return 1;
26619 }
26620 args = args->prev;
26621 vars = vars->prev;
26622 if (!vidrefp) used = 0;
26623 if (used) used = used->prev;
26624 }
26625
26626 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26627 return rb_dvar_defined(id, p->parent_iseq);
26628 }
26629
26630 return 0;
26631}
26632#endif
26633
26634static int
26635dvar_defined(struct parser_params *p, ID id)
26636{
26637 return dvar_defined_ref(p, id, NULL);
26638}
26639
26640static int
26641dvar_curr(struct parser_params *p, ID id)
26642{
26643 return (vtable_included(p->lvtbl->args, id) ||
26644 vtable_included(p->lvtbl->vars, id));
26645}
26646
26647static void
26648reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26649{
26650 compile_error(p,
26651 "regexp encoding option '%c' differs from source encoding '%s'",
26652 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26653}
26654
26655#ifndef RIPPER
26656static rb_encoding *
26657find_enc(struct parser_params* p, const char *name)
26658{
26659 int idx = rb_enc_find_index(name);
26660 if (idx < 0) {
26661 rb_bug("unknown encoding name: %s", name);
26662 }
26663
26664 return rb_enc_from_index(idx);
26665}
26666
26667static rb_encoding *
26668kcode_to_enc(struct parser_params* p, int kcode)
26669{
26670 rb_encoding *enc;
26671
26672 switch (kcode) {
26673 case ENC_ASCII8BIT:
26674 enc = rb_ascii8bit_encoding();
26675 break;
26676 case ENC_EUC_JP:
26677 enc = find_enc(p, "EUC-JP");
26678 break;
26679 case ENC_Windows_31J:
26680 enc = find_enc(p, "Windows-31J");
26681 break;
26682 case ENC_UTF8:
26683 enc = rb_utf8_encoding();
26684 break;
26685 default:
26686 enc = NULL;
26687 break;
26688 }
26689
26690 return enc;
26691}
26692
26693int
26694rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26695{
26696 int c = RE_OPTION_ENCODING_IDX(options);
26697
26698 if (c) {
26699 int opt, idx;
26700 rb_encoding *enc;
26701
26702 char_to_option_kcode(c, &opt, &idx);
26703 enc = kcode_to_enc(p, idx);
26704 if (enc != rb_parser_str_get_encoding(str) &&
26705 !rb_parser_is_ascii_string(p, str)) {
26706 goto error;
26707 }
26708 rb_parser_string_set_encoding(str, enc);
26709 }
26710 else if (RE_OPTION_ENCODING_NONE(options)) {
26711 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26712 !rb_parser_is_ascii_string(p, str)) {
26713 c = 'n';
26714 goto error;
26715 }
26716 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26717 }
26718 else if (rb_is_usascii_enc(p->enc)) {
26719 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26720 }
26721 return 0;
26722
26723 error:
26724 return c;
26725}
26726#endif
26727
26728static void
26729reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26730{
26731 int c = rb_reg_fragment_setenc(p, str, options);
26732 if (c) reg_fragment_enc_error(p, str, c);
26733}
26734
26735#ifndef UNIVERSAL_PARSER
26736typedef struct {
26737 struct parser_params* parser;
26738 rb_encoding *enc;
26739 NODE *succ_block;
26740 const YYLTYPE *loc;
26741 rb_parser_assignable_func assignable;
26743
26744static int
26745reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26746 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26747{
26749 struct parser_params* p = arg->parser;
26750 rb_encoding *enc = arg->enc;
26751 long len = name_end - name;
26752 const char *s = (const char *)name;
26753
26754 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26755}
26756
26757static NODE *
26758reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26759{
26761
26762 arg.parser = p;
26763 arg.enc = rb_enc_get(regexp);
26764 arg.succ_block = 0;
26765 arg.loc = loc;
26766 arg.assignable = assignable;
26767 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26768
26769 if (!arg.succ_block) return 0;
26770 return RNODE_BLOCK(arg.succ_block)->nd_next;
26771}
26772#endif
26773
26774#ifndef RIPPER
26775NODE *
26776rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26777{
26778 return assignable(p, id, val, loc);
26779}
26780
26781int
26782rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26783 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26784{
26785 ID var;
26786 NODE *node, *succ;
26787
26788 if (!len) return ST_CONTINUE;
26789 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26790 return ST_CONTINUE;
26791
26792 var = intern_cstr(s, len, enc);
26793 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26794 if (!lvar_defined(p, var)) return ST_CONTINUE;
26795 }
26796 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26797 succ = *succ_block;
26798 if (!succ) succ = NEW_ERROR(loc);
26799 succ = block_append(p, succ, node);
26800 *succ_block = succ;
26801 return ST_CONTINUE;
26802}
26803#endif
26804
26805static VALUE
26806parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26807{
26808 VALUE str2;
26809 reg_fragment_setenc(p, str, options);
26810 str2 = rb_str_new_parser_string(str);
26811 return rb_parser_reg_compile(p, str2, options);
26812}
26813
26814#ifndef RIPPER
26815VALUE
26816rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26817{
26818 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26819}
26820#endif
26821
26822static VALUE
26823reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26824{
26825 VALUE re;
26826 VALUE err;
26827
26828 err = rb_errinfo();
26829 re = parser_reg_compile(p, str, options);
26830 if (NIL_P(re)) {
26831 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26832 rb_set_errinfo(err);
26833 compile_error(p, "%"PRIsVALUE, m);
26834 return Qnil;
26835 }
26836 return re;
26837}
26838
26839#ifndef RIPPER
26840void
26841rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26842{
26843 p->do_print = print;
26844 p->do_loop = loop;
26845 p->do_chomp = chomp;
26846 p->do_split = split;
26847}
26848
26849static NODE *
26850parser_append_options(struct parser_params *p, NODE *node)
26851{
26852 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26853 const YYLTYPE *const LOC = &default_location;
26854
26855 if (p->do_print) {
26856 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26857 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26858 LOC);
26859 node = block_append(p, node, print);
26860 }
26861
26862 if (p->do_loop) {
26863 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26864
26865 if (p->do_split) {
26866 ID ifs = rb_intern("$;");
26867 ID fields = rb_intern("$F");
26868 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26869 NODE *split = NEW_GASGN(fields,
26870 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26871 rb_intern("split"), args, LOC),
26872 LOC);
26873 node = block_append(p, split, node);
26874 }
26875 if (p->do_chomp) {
26876 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26877 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26878 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26879 }
26880
26881 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26882 }
26883
26884 return node;
26885}
26886
26887void
26888rb_init_parse(void)
26889{
26890 /* just to suppress unused-function warnings */
26891 (void)nodetype;
26892 (void)nodeline;
26893}
26894
26895ID
26896internal_id(struct parser_params *p)
26897{
26898 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26899}
26900#endif /* !RIPPER */
26901
26902static void
26903parser_initialize(struct parser_params *p)
26904{
26905 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26906 p->command_start = TRUE;
26907 p->ruby_sourcefile_string = Qnil;
26908 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26909 string_buffer_init(p);
26910 p->node_id = 0;
26911 p->delayed.token = NULL;
26912 p->frozen_string_literal = -1; /* not specified */
26913#ifndef RIPPER
26914 p->error_buffer = Qfalse;
26915 p->end_expect_token_locations = NULL;
26916 p->token_id = 0;
26917 p->tokens = NULL;
26918#else
26919 p->result = Qnil;
26920 p->parsing_thread = Qnil;
26921 p->s_value = Qnil;
26922 p->s_lvalue = Qnil;
26923 p->s_value_stack = rb_ary_new();
26924#endif
26925 p->debug_buffer = Qnil;
26926 p->debug_output = rb_ractor_stdout();
26927 p->enc = rb_utf8_encoding();
26928 p->exits = 0;
26929}
26930
26931#ifdef RIPPER
26932#define rb_ruby_parser_mark ripper_parser_mark
26933#define rb_ruby_parser_free ripper_parser_free
26934#define rb_ruby_parser_memsize ripper_parser_memsize
26935#endif
26936
26937void
26938rb_ruby_parser_mark(void *ptr)
26939{
26940 struct parser_params *p = (struct parser_params*)ptr;
26941
26942 rb_gc_mark(p->ruby_sourcefile_string);
26943#ifndef RIPPER
26944 rb_gc_mark(p->error_buffer);
26945#else
26946 rb_gc_mark(p->value);
26947 rb_gc_mark(p->result);
26948 rb_gc_mark(p->parsing_thread);
26949 rb_gc_mark(p->s_value);
26950 rb_gc_mark(p->s_lvalue);
26951 rb_gc_mark(p->s_value_stack);
26952#endif
26953 rb_gc_mark(p->debug_buffer);
26954 rb_gc_mark(p->debug_output);
26955}
26956
26957void
26958rb_ruby_parser_free(void *ptr)
26959{
26960 struct parser_params *p = (struct parser_params*)ptr;
26961 struct local_vars *local, *prev;
26962
26963 if (p->ast) {
26964 rb_ast_free(p->ast);
26965 }
26966
26967 if (p->warn_duplicate_keys_table) {
26968 st_free_table(p->warn_duplicate_keys_table);
26969 }
26970
26971#ifndef RIPPER
26972 if (p->tokens) {
26973 rb_parser_ary_free(p, p->tokens);
26974 }
26975#endif
26976
26977 if (p->tokenbuf) {
26978 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26979 }
26980
26981 for (local = p->lvtbl; local; local = prev) {
26982 prev = local->prev;
26983 local_free(p, local);
26984 }
26985
26986 {
26987 token_info *ptinfo;
26988 while ((ptinfo = p->token_info) != 0) {
26989 p->token_info = ptinfo->next;
26990 xfree(ptinfo);
26991 }
26992 }
26993 string_buffer_free(p);
26994
26995 if (p->pvtbl) {
26996 st_free_table(p->pvtbl);
26997 }
26998
26999 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27000 st_free_table(p->case_labels);
27001 }
27002
27003 xfree(p->lex.strterm);
27004 p->lex.strterm = 0;
27005
27006 xfree(ptr);
27007}
27008
27009size_t
27010rb_ruby_parser_memsize(const void *ptr)
27011{
27012 struct parser_params *p = (struct parser_params*)ptr;
27013 struct local_vars *local;
27014 size_t size = sizeof(*p);
27015
27016 size += p->toksiz;
27017 for (local = p->lvtbl; local; local = local->prev) {
27018 size += sizeof(*local);
27019 if (local->vars) size += local->vars->capa * sizeof(ID);
27020 }
27021 return size;
27022}
27023
27024#ifndef RIPPER
27025#undef rb_reserved_word
27026
27027const struct kwtable *
27028rb_reserved_word(const char *str, unsigned int len)
27029{
27030 return reserved_word(str, len);
27031}
27032
27033#ifdef UNIVERSAL_PARSER
27034rb_parser_t *
27035rb_ruby_parser_allocate(const rb_parser_config_t *config)
27036{
27037 /* parser_initialize expects fields to be set to 0 */
27038 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27039 p->config = config;
27040 return p;
27041}
27042
27043rb_parser_t *
27044rb_ruby_parser_new(const rb_parser_config_t *config)
27045{
27046 /* parser_initialize expects fields to be set to 0 */
27047 rb_parser_t *p = rb_ruby_parser_allocate(config);
27048 parser_initialize(p);
27049 return p;
27050}
27051#else
27052rb_parser_t *
27053rb_ruby_parser_allocate(void)
27054{
27055 /* parser_initialize expects fields to be set to 0 */
27056 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27057 return p;
27058}
27059
27060rb_parser_t *
27061rb_ruby_parser_new(void)
27062{
27063 /* parser_initialize expects fields to be set to 0 */
27064 rb_parser_t *p = rb_ruby_parser_allocate();
27065 parser_initialize(p);
27066 return p;
27067}
27068#endif
27069
27070rb_parser_t *
27071rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27072{
27073 p->error_buffer = main ? Qfalse : Qnil;
27074 p->parent_iseq = base;
27075 return p;
27076}
27077
27078void
27079rb_ruby_parser_set_script_lines(rb_parser_t *p)
27080{
27081 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27082}
27083
27084void
27085rb_ruby_parser_error_tolerant(rb_parser_t *p)
27086{
27087 p->error_tolerant = 1;
27088}
27089
27090void
27091rb_ruby_parser_keep_tokens(rb_parser_t *p)
27092{
27093 p->keep_tokens = 1;
27094 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27095}
27096
27097rb_encoding *
27098rb_ruby_parser_encoding(rb_parser_t *p)
27099{
27100 return p->enc;
27101}
27102
27103int
27104rb_ruby_parser_end_seen_p(rb_parser_t *p)
27105{
27106 return p->ruby__end__seen;
27107}
27108
27109int
27110rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27111{
27112 p->debug = flag;
27113 return flag;
27114}
27115#endif /* !RIPPER */
27116
27117#ifdef RIPPER
27118int
27119rb_ruby_parser_get_yydebug(rb_parser_t *p)
27120{
27121 return p->debug;
27122}
27123
27124void
27125rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27126{
27127 p->value = value;
27128}
27129
27130int
27131rb_ruby_parser_error_p(rb_parser_t *p)
27132{
27133 return p->error_p;
27134}
27135
27136VALUE
27137rb_ruby_parser_debug_output(rb_parser_t *p)
27138{
27139 return p->debug_output;
27140}
27141
27142void
27143rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27144{
27145 p->debug_output = output;
27146}
27147
27148VALUE
27149rb_ruby_parser_parsing_thread(rb_parser_t *p)
27150{
27151 return p->parsing_thread;
27152}
27153
27154void
27155rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27156{
27157 p->parsing_thread = parsing_thread;
27158}
27159
27160void
27161rb_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)
27162{
27163 p->lex.gets = gets;
27164 p->lex.input = input;
27165 p->eofp = 0;
27166 p->ruby_sourcefile_string = sourcefile_string;
27167 p->ruby_sourcefile = sourcefile;
27168 p->ruby_sourceline = sourceline;
27169}
27170
27171VALUE
27172rb_ruby_parser_result(rb_parser_t *p)
27173{
27174 return p->result;
27175}
27176
27177rb_encoding *
27178rb_ruby_parser_enc(rb_parser_t *p)
27179{
27180 return p->enc;
27181}
27182
27183VALUE
27184rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27185{
27186 return p->ruby_sourcefile_string;
27187}
27188
27189int
27190rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27191{
27192 return p->ruby_sourceline;
27193}
27194
27195int
27196rb_ruby_parser_lex_state(rb_parser_t *p)
27197{
27198 return p->lex.state;
27199}
27200
27201void
27202rb_ruby_ripper_parse0(rb_parser_t *p)
27203{
27204 parser_prepare(p);
27205 p->ast = rb_ast_new();
27206 ripper_yyparse((void*)p);
27207 rb_ast_free(p->ast);
27208 p->ast = 0;
27209 p->eval_tree = 0;
27210 p->eval_tree_begin = 0;
27211}
27212
27213int
27214rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27215{
27216 return dedent_string(p, string, width);
27217}
27218
27219int
27220rb_ruby_ripper_initialized_p(rb_parser_t *p)
27221{
27222 return p->lex.input != 0;
27223}
27224
27225void
27226rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27227{
27228 parser_initialize(p);
27229}
27230
27231long
27232rb_ruby_ripper_column(rb_parser_t *p)
27233{
27234 return p->lex.ptok - p->lex.pbeg;
27235}
27236
27237long
27238rb_ruby_ripper_token_len(rb_parser_t *p)
27239{
27240 return p->lex.pcur - p->lex.ptok;
27241}
27242
27243rb_parser_string_t *
27244rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27245{
27246 return p->lex.lastline;
27247}
27248
27249VALUE
27250rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27251{
27252 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27253}
27254
27255#ifdef UNIVERSAL_PARSER
27256rb_parser_t *
27257rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27258{
27259 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27260 p->config = config;
27261 return p;
27262}
27263#endif
27264
27265struct parser_params*
27266rb_ruby_ripper_parser_allocate(void)
27267{
27268 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27269}
27270#endif /* RIPPER */
27271
27272#ifndef RIPPER
27273void
27274rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27275{
27276 va_list ap;
27277 VALUE mesg = p->debug_buffer;
27278
27279 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27280 va_start(ap, fmt);
27281 rb_str_vcatf(mesg, fmt, ap);
27282 va_end(ap);
27283 if (char_at_end(p, mesg, 0) == '\n') {
27284 rb_io_write(p->debug_output, mesg);
27285 p->debug_buffer = Qnil;
27286 }
27287}
27288
27289static void
27290parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27291{
27292 va_list ap;
27293 int lineno, column;
27294
27295 if (loc) {
27296 lineno = loc->end_pos.lineno;
27297 column = loc->end_pos.column;
27298 }
27299 else {
27300 lineno = p->ruby_sourceline;
27301 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27302 }
27303
27304 rb_io_flush(p->debug_output);
27305 p->error_p = 1;
27306 va_start(ap, fmt);
27307 p->error_buffer =
27308 rb_syntax_error_append(p->error_buffer,
27309 p->ruby_sourcefile_string,
27310 lineno, column,
27311 p->enc, fmt, ap);
27312 va_end(ap);
27313}
27314
27315static size_t
27316count_char(const char *str, int c)
27317{
27318 int n = 0;
27319 while (str[n] == c) ++n;
27320 return n;
27321}
27322
27323/*
27324 * strip enclosing double-quotes, same as the default yytnamerr except
27325 * for that single-quotes matching back-quotes do not stop stripping.
27326 *
27327 * "\"`class' keyword\"" => "`class' keyword"
27328 */
27329size_t
27330rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27331{
27332 if (*yystr == '"') {
27333 size_t yyn = 0, bquote = 0;
27334 const char *yyp = yystr;
27335
27336 while (*++yyp) {
27337 switch (*yyp) {
27338 case '\'':
27339 if (!bquote) {
27340 bquote = count_char(yyp+1, '\'') + 1;
27341 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27342 yyn += bquote;
27343 yyp += bquote - 1;
27344 break;
27345 }
27346 else {
27347 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27348 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27349 yyn += bquote;
27350 yyp += bquote - 1;
27351 bquote = 0;
27352 break;
27353 }
27354 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27355 if (yyres) memcpy(yyres + yyn, yyp, 3);
27356 yyn += 3;
27357 yyp += 2;
27358 break;
27359 }
27360 goto do_not_strip_quotes;
27361 }
27362
27363 case ',':
27364 goto do_not_strip_quotes;
27365
27366 case '\\':
27367 if (*++yyp != '\\')
27368 goto do_not_strip_quotes;
27369 /* Fall through. */
27370 default:
27371 if (yyres)
27372 yyres[yyn] = *yyp;
27373 yyn++;
27374 break;
27375
27376 case '"':
27377 case '\0':
27378 if (yyres)
27379 yyres[yyn] = '\0';
27380 return yyn;
27381 }
27382 }
27383 do_not_strip_quotes: ;
27384 }
27385
27386 if (!yyres) return strlen(yystr);
27387
27388 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27389}
27390#endif
27391
27392#ifdef RIPPER
27393#define validate(x) (void)(x)
27394
27395static VALUE
27396ripper_dispatch0(struct parser_params *p, ID mid)
27397{
27398 return rb_funcall(p->value, mid, 0);
27399}
27400
27401static VALUE
27402ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27403{
27404 validate(a);
27405 return rb_funcall(p->value, mid, 1, a);
27406}
27407
27408static VALUE
27409ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27410{
27411 validate(a);
27412 validate(b);
27413 return rb_funcall(p->value, mid, 2, a, b);
27414}
27415
27416static VALUE
27417ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27418{
27419 validate(a);
27420 validate(b);
27421 validate(c);
27422 return rb_funcall(p->value, mid, 3, a, b, c);
27423}
27424
27425static VALUE
27426ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27427{
27428 validate(a);
27429 validate(b);
27430 validate(c);
27431 validate(d);
27432 return rb_funcall(p->value, mid, 4, a, b, c, d);
27433}
27434
27435static VALUE
27436ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27437{
27438 validate(a);
27439 validate(b);
27440 validate(c);
27441 validate(d);
27442 validate(e);
27443 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27444}
27445
27446static VALUE
27447ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27448{
27449 validate(a);
27450 validate(b);
27451 validate(c);
27452 validate(d);
27453 validate(e);
27454 validate(f);
27455 validate(g);
27456 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27457}
27458
27459void
27460ripper_error(struct parser_params *p)
27461{
27462 p->error_p = TRUE;
27463}
27464
27465VALUE
27466ripper_value(struct parser_params *p)
27467{
27468 (void)yystpcpy; /* may not used in newer bison */
27469
27470 return p->value;
27471}
27472
27473#endif /* RIPPER */
27474/*
27475 * Local variables:
27476 * mode: c
27477 * c-file-style: "ruby"
27478 * End:
27479 */
#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_errinfo(void)
This is the same as $! in Ruby.
Definition eval.c:2056
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.
rb_encoding * rb_utf8_encoding(void)
Queries the encoding that represents UTF-8.
Definition encoding.c:1535
rb_encoding * rb_ascii8bit_encoding(void)
Queries the encoding that represents ASCII-8BIT a.k.a.
Definition encoding.c:1523
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
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
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
int off
Offset inside of ptr.
Definition io.h:5
int len
Length of the buffer.
Definition io.h:8
VALUE rb_ractor_stderr(void)
Queries the standard error of the current Ractor that is calling this function.
Definition ractor.c:1105
VALUE rb_ractor_stdout(void)
Queries the standard output of the current Ractor that is calling this function.
Definition ractor.c:1093
#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.