Ruby 4.1.0dev (2026-11-16 revision 9c7bc705b8bd4542beac71542a8ea79f9bb7622b)
parse.c
1/* A Bison parser, made by Lrama 0.8.0. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48/* Identify Bison output, and Bison version. */
49#define YYBISON 30802
50
51/* Bison version string. */
52#define YYBISON_VERSION "3.8.2"
53
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 1
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
66
67/* First part of user prologue. */
68#line 12 "parse.y"
69
70
71#if !YYPURE
72# error needs pure parser
73#endif
74#define YYDEBUG 1
75#define YYERROR_VERBOSE 1
76#define YYSTACK_USE_ALLOCA 0
77
78/* For Ripper */
79#ifdef RUBY_EXTCONF_H
80# include RUBY_EXTCONF_H
81#endif
82
83#include "ruby/internal/config.h"
84#include "internal/thread.h"
85
86#include <errno.h>
87
88#ifdef UNIVERSAL_PARSER
89
90#include "internal/ruby_parser.h"
91#include "parser_node.h"
92#include "universal_parser.c"
93
94#ifdef RIPPER
95#define STATIC_ID2SYM p->config->static_id2sym
96#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
97#endif
98
99#else
100
101#include "internal.h"
102#include "internal/array.h"
103#include "internal/compile.h"
104#include "internal/compilers.h"
105#include "internal/complex.h"
106#include "internal/encoding.h"
107#include "internal/error.h"
108#include "internal/gc.h"
109#include "internal/hash.h"
110#include "internal/io.h"
111#include "internal/numeric.h"
112#include "internal/parse.h"
113#include "internal/rational.h"
114#include "internal/re.h"
115#include "internal/ruby_parser.h"
116#include "internal/symbol.h"
117#include "internal/thread.h"
118#include "node.h"
119#include "parser_node.h"
120#include "probes.h"
121#include "regenc.h"
122#include "ruby/encoding.h"
123#include "ruby/regex.h"
124#include "ruby/ruby.h"
125#include "ruby/st.h"
126#include "ruby/util.h"
127#include "ruby/ractor.h"
128#include "symbol.h"
129
130#ifndef RIPPER
131static VALUE
132syntax_error_new(void)
133{
135}
136#endif
137
138static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
139
140#define compile_callback rb_suppress_tracing
141#endif /* !UNIVERSAL_PARSER */
142
143#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
144#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
145
146static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
147
148#ifndef RIPPER
149static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
150#endif
151
152static int
153node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
154{
155 return (n1->minus != n2->minus ||
156 n1->base != n2->base ||
157 strcmp(n1->val, n2->val));
158}
159
160static int
161node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
162{
163 return (n1->minus != n2->minus ||
164 strcmp(n1->val, n2->val));
165}
166
167static int
168node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
169{
170 return (n1->minus != n2->minus ||
171 n1->base != n2->base ||
172 n1->seen_point != n2->seen_point ||
173 strcmp(n1->val, n2->val));
174}
175
176static int
177node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
178{
179 return (n1->minus != n2->minus ||
180 n1->base != n2->base ||
181 n1->seen_point != n2->seen_point ||
182 n1->type != n2->type ||
183 strcmp(n1->val, n2->val));
184}
185
186static int
187rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
188{
189 return (n1->options != n2->options ||
190 rb_parser_string_hash_cmp(n1->string, n2->string));
191}
192
193static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
194static st_index_t rb_char_p_hash(const char *c);
195
196static int
197literal_cmp(st_data_t val, st_data_t lit)
198{
199 if (val == lit) return 0;
200
201 NODE *node_val = RNODE(val);
202 NODE *node_lit = RNODE(lit);
203 enum node_type type_val = nd_type(node_val);
204 enum node_type type_lit = nd_type(node_lit);
205
206 if (type_val != type_lit) {
207 return -1;
208 }
209
210 switch (type_lit) {
211 case NODE_INTEGER:
212 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
213 case NODE_FLOAT:
214 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
215 case NODE_RATIONAL:
216 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
217 case NODE_IMAGINARY:
218 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
219 case NODE_STR:
220 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
221 case NODE_SYM:
222 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
223 case NODE_REGX:
224 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
225 case NODE_LINE:
226 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
227 case NODE_FILE:
228 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
229 case NODE_ENCODING:
230 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
231 default:
232#ifdef UNIVERSAL_PARSER
233 abort();
234#else
235 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
236#endif
237 }
238}
239
240static st_index_t
241literal_hash(st_data_t a)
242{
243 NODE *node = (NODE *)a;
244 enum node_type type = nd_type(node);
245
246 switch (type) {
247 case NODE_INTEGER:
248 return rb_char_p_hash(RNODE_INTEGER(node)->val);
249 case NODE_FLOAT:
250 return rb_char_p_hash(RNODE_FLOAT(node)->val);
251 case NODE_RATIONAL:
252 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
253 case NODE_IMAGINARY:
254 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
255 case NODE_STR:
256 return rb_parser_str_hash(RNODE_STR(node)->string);
257 case NODE_SYM:
258 return rb_parser_str_hash(RNODE_SYM(node)->string);
259 case NODE_REGX:
260 return rb_parser_str_hash(RNODE_REGX(node)->string);
261 case NODE_LINE:
262 return (st_index_t)node->nd_loc.beg_pos.lineno;
263 case NODE_FILE:
264 return rb_parser_str_hash(RNODE_FILE(node)->path);
265 case NODE_ENCODING:
266 return (st_index_t)RNODE_ENCODING(node)->enc;
267 default:
268#ifdef UNIVERSAL_PARSER
269 abort();
270#else
271 rb_bug("unexpected node: %s", ruby_node_name(type));
272#endif
273 }
274}
275
276static inline int
277parse_isascii(int c)
278{
279 return '\0' <= c && c <= '\x7f';
280}
281
282#undef ISASCII
283#define ISASCII parse_isascii
284
285static inline int
286parse_isspace(int c)
287{
288 return c == ' ' || ('\t' <= c && c <= '\r');
289}
290
291#undef ISSPACE
292#define ISSPACE parse_isspace
293
294static inline int
295parse_iscntrl(int c)
296{
297 return ('\0' <= c && c < ' ') || c == '\x7f';
298}
299
300#undef ISCNTRL
301#define ISCNTRL(c) parse_iscntrl(c)
302
303static inline int
304parse_isupper(int c)
305{
306 return 'A' <= c && c <= 'Z';
307}
308
309static inline int
310parse_islower(int c)
311{
312 return 'a' <= c && c <= 'z';
313}
314
315static inline int
316parse_isalpha(int c)
317{
318 return parse_isupper(c) || parse_islower(c);
319}
320
321#undef ISALPHA
322#define ISALPHA(c) parse_isalpha(c)
323
324static inline int
325parse_isdigit(int c)
326{
327 return '0' <= c && c <= '9';
328}
329
330#undef ISDIGIT
331#define ISDIGIT(c) parse_isdigit(c)
332
333static inline int
334parse_isalnum(int c)
335{
336 return ISALPHA(c) || ISDIGIT(c);
337}
338
339#undef ISALNUM
340#define ISALNUM(c) parse_isalnum(c)
341
342static inline int
343parse_isxdigit(int c)
344{
345 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
346}
347
348#undef ISXDIGIT
349#define ISXDIGIT(c) parse_isxdigit(c)
350
351#include "parser_st.h"
352
353#undef STRCASECMP
354#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
355
356#undef STRNCASECMP
357#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
358
359#ifdef RIPPER
360#include "ripper_init.h"
361#endif
362
363enum rescue_context {
364 before_rescue,
365 after_rescue,
366 after_else,
367 after_ensure,
368};
369
371 unsigned int in_defined: 1;
372 unsigned int in_kwarg: 1;
373 unsigned int in_argdef: 1;
374 unsigned int in_def: 1;
375 unsigned int in_class: 1;
376 unsigned int has_trailing_semicolon: 1;
377 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
378 BITFIELD(enum rescue_context, in_rescue, 2);
379 unsigned int cant_return: 1;
380 unsigned int in_alt_pattern: 1;
381 unsigned int capture_in_pattern: 1;
382};
383
385
386#if defined(__GNUC__) && !defined(__clang__)
387// Suppress "parameter passing for argument of type 'struct
388// lex_context' changed" notes. `struct lex_context` is file scope,
389// and has no ABI compatibility issue.
393// Not sure why effective even after popped.
394#endif
395
396#include "parse.h"
397
398#define NO_LEX_CTXT (struct lex_context){0}
399
400#ifndef WARN_PAST_SCOPE
401# define WARN_PAST_SCOPE 0
402#endif
403
404#define TAB_WIDTH 8
405
406#define yydebug (p->debug) /* disable the global variable definition */
407
408#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
409#define YY_LOCATION_PRINT(File, loc, p) \
410 rb_parser_printf(p, "%d.%d-%d.%d", \
411 (loc).beg_pos.lineno, (loc).beg_pos.column,\
412 (loc).end_pos.lineno, (loc).end_pos.column)
413#define YYLLOC_DEFAULT(Current, Rhs, N) \
414 do \
415 if (N) \
416 { \
417 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
418 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
419 } \
420 else \
421 { \
422 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
423 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
424 } \
425 while (0)
426#define YY_(Msgid) \
427 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
428 "nesting too deep" : (Msgid))
429
430#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
431 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
432#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
433 rb_parser_set_location_of_delayed_token(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
435 rb_parser_set_location_of_heredoc_end(p, &(Current))
436#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
437 rb_parser_set_location_of_dummy_end(p, &(Current))
438#define RUBY_SET_YYLLOC_OF_NONE(Current) \
439 rb_parser_set_location_of_none(p, &(Current))
440#define RUBY_SET_YYLLOC(Current) \
441 rb_parser_set_location(p, &(Current))
442#define RUBY_INIT_YYLLOC() \
443 { \
444 {p->ruby_sourceline, parser_column(p->lex.ptok - p->lex.pbeg)}, \
445 {p->ruby_sourceline, parser_column(p->lex.pcur - p->lex.pbeg)}, \
446 }
447
448/* Saturate instead of wrapping to a column before the line. */
449static inline int
450parser_column(rb_len_t pos)
451{
452#if SIZEOF_INT < SIZEOF_RB_LEN_T
453 if (pos > INT_MAX) return INT_MAX;
454#endif
455 return (int)pos;
456}
457
458#define IS_lex_state_for(x, ls) ((x) & (ls))
459#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
460#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
461#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
462
463# define SET_LEX_STATE(ls) \
464 parser_set_lex_state(p, ls, __LINE__)
465static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
466
467typedef VALUE stack_type;
468
469static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
470
471# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
472# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
473# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
474# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
475# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
476
477/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
478 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
479#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
480#define COND_POP() BITSTACK_POP(cond_stack)
481#define COND_P() BITSTACK_SET_P(cond_stack)
482#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
483
484/* A flag to identify keyword_do_block; "do" keyword after command_call.
485 Example: `foo 1, 2 do`. */
486#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
487#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
488#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
489#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
490
491struct vtable {
492 ID *tbl;
493 int pos;
494 int capa;
495 struct vtable *prev;
496};
497
499 struct vtable *args;
500 struct vtable *vars;
501 struct vtable *used;
502# if WARN_PAST_SCOPE
503 struct vtable *past;
504# endif
505 struct local_vars *prev;
506 struct {
507 NODE *outer, *inner, *current;
508 } numparam;
509 NODE *it;
510};
511
513 NODE *node;
514 YYLTYPE opening_loc;
515 YYLTYPE closing_loc;
517
518enum {
519 ORDINAL_PARAM = -1,
520 NO_PARAM = 0,
521 NUMPARAM_MAX = 9,
522};
523
524#define DVARS_INHERIT ((void*)1)
525#define DVARS_TOPSCOPE NULL
526#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
527
528typedef struct token_info {
529 const char *token;
531 int indent;
532 int nonspc;
533 struct token_info *next;
534} token_info;
535
540
542 struct parser_string_buffer_elem *next;
543 long len; /* Total length of allocated buf */
544 long used; /* Current usage of buf */
545 rb_parser_string_t *buf[FLEX_ARY_LEN];
547
552
553#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
554
555/*
556 Structure of Lexer Buffer:
557
558 lex.pbeg lex.ptok lex.pcur lex.pend
559 | | | |
560 |------------+------------+------------|
561 |<---------->|
562 token
563*/
565 YYSTYPE *lval;
566 YYLTYPE *yylloc;
567
568 struct {
569 rb_strterm_t *strterm;
570 rb_parser_lex_gets_func *gets;
571 rb_parser_input_data input;
572 parser_string_buffer_t string_buffer;
573 rb_parser_string_t *lastline;
574 rb_parser_string_t *nextline;
575 const char *pbeg;
576 const char *pcur;
577 const char *pend;
578 const char *ptok;
579 enum lex_state_e state;
580 /* track the nest level of any parens "()[]{}" */
581 int paren_nest;
582 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
583 int lpar_beg;
584 /* track the nest level of only braces "{}" */
585 int brace_nest;
586 } lex;
587 /* Cache the tail of the and/or chain most recently built by logop(), so a
588 * left-associative chain does not rescan its right branch on every
589 * operator. head is the chain's top node, tail the node whose nd_2nd is the
590 * next insertion point. */
591 struct {
592 NODE *head;
593 NODE *tail;
594 } logop;
595 stack_type cond_stack;
596 stack_type cmdarg_stack;
597 int tokidx;
598 int toksiz;
599 int heredoc_end;
600 int heredoc_indent;
601 int heredoc_line_indent;
602 char *tokenbuf;
603 struct local_vars *lvtbl;
604 st_table *pvtbl;
605 st_table *pktbl;
606 int line_count;
607 int ruby_sourceline; /* current line no. */
608 const char *ruby_sourcefile; /* current source file */
609 VALUE ruby_sourcefile_string;
610 rb_encoding *enc;
612 st_table *case_labels;
613 rb_node_exits_t *exits;
614
615 VALUE debug_buffer;
616 VALUE debug_output;
617
618 struct {
619 rb_parser_string_t *token;
620 int beg_line;
621 int beg_col;
622 int end_line;
623 int end_col;
624 } delayed;
625
626 rb_ast_t *ast;
627 int node_id;
628
629 st_table *warn_duplicate_keys_table;
630
631 int max_numparam;
632 ID it_id;
633
634 struct lex_context ctxt;
635
636 NODE *eval_tree_begin;
637 NODE *eval_tree;
638 const struct rb_iseq_struct *parent_iseq;
639
640#ifdef UNIVERSAL_PARSER
641 const rb_parser_config_t *config;
642#endif
643 /* compile_option */
644 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
645
646 unsigned int command_start:1;
647 unsigned int eofp: 1;
648 unsigned int ruby__end__seen: 1;
649 unsigned int debug: 1;
650 unsigned int has_shebang: 1;
651 unsigned int token_seen: 1;
652 unsigned int token_info_enabled: 1;
653# if WARN_PAST_SCOPE
654 unsigned int past_scope_enabled: 1;
655# endif
656 unsigned int error_p: 1;
657 unsigned int cr_seen: 1;
658
659 /* Streaming hash state of the source bytes read so far. */
660 rb_source_hash_state_t source_hash;
661
662#ifndef RIPPER
663 /* Ruby core only */
664
665 unsigned int do_print: 1;
666 unsigned int do_loop: 1;
667 unsigned int do_chomp: 1;
668 unsigned int do_split: 1;
669 unsigned int error_tolerant: 1;
670 unsigned int keep_tokens: 1;
671
672 VALUE error_buffer;
673 rb_parser_ary_t *debug_lines;
674 /*
675 * Store specific keyword locations to generate dummy end token.
676 * Refer to the tail of list element.
677 */
679 /* id for terms */
680 int token_id;
681 /* Array for term tokens */
682 rb_parser_ary_t *tokens;
683#else
684 /* Ripper only */
685
686 VALUE value;
687 VALUE result;
688 VALUE parsing_thread;
689 VALUE s_value; /* Token VALUE */
690 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
691 VALUE s_value_stack;
692#endif
693};
694
695#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
696#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
697#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
698static int
699numparam_id_p(struct parser_params *p, ID id)
700{
701 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
702 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
703 return idx > 0 && idx <= NUMPARAM_MAX;
704}
705static void numparam_name(struct parser_params *p, ID id);
706
707#ifdef RIPPER
708static void
709after_shift(struct parser_params *p)
710{
711 if (p->debug) {
712 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
713 }
714 rb_ary_push(p->s_value_stack, p->s_value);
715 p->s_value = Qnil;
716}
717
718static void
719before_reduce(int len, struct parser_params *p)
720{
721 // Initialize $$ with $1.
722 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
723}
724
725static void
726after_reduce(int len, struct parser_params *p)
727{
728 for (int i = 0; i < len; i++) {
729 VALUE tos = rb_ary_pop(p->s_value_stack);
730 if (p->debug) {
731 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
732 }
733 }
734 if (p->debug) {
735 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
736 }
737 rb_ary_push(p->s_value_stack, p->s_lvalue);
738 p->s_lvalue = Qnil;
739}
740
741static void
742after_shift_error_token(struct parser_params *p)
743{
744 if (p->debug) {
745 rb_parser_printf(p, "after-shift-error-token:\n");
746 }
747 rb_ary_push(p->s_value_stack, Qnil);
748}
749
750static void
751after_pop_stack(int len, struct parser_params *p)
752{
753 for (int i = 0; i < len; i++) {
754 VALUE tos = rb_ary_pop(p->s_value_stack);
755 if (p->debug) {
756 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
757 }
758 }
759}
760#else
761static void
762after_shift(struct parser_params *p)
763{
764}
765
766static void
767before_reduce(int len, struct parser_params *p)
768{
769}
770
771static void
772after_reduce(int len, struct parser_params *p)
773{
774}
775
776static void
777after_shift_error_token(struct parser_params *p)
778{
779}
780
781static void
782after_pop_stack(int len, struct parser_params *p)
783{
784}
785#endif
786
787#define intern_cstr(n,l,en) rb_intern3(n,l,en)
788
789#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
790
791#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
792#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
793#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
794#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
795#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
796#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
797
798#ifndef RIPPER
799static inline int
800char_at_end(struct parser_params *p, VALUE str, int when_empty)
801{
802 rb_len_t len = RSTRING_LEN(str);
803 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
804}
805#endif
806
807static void
808pop_pvtbl(struct parser_params *p, st_table *tbl)
809{
810 st_free_table(p->pvtbl);
811 p->pvtbl = tbl;
812}
813
814static void
815pop_pktbl(struct parser_params *p, st_table *tbl)
816{
817 if (p->pktbl) st_free_table(p->pktbl);
818 p->pktbl = tbl;
819}
820
821#define STRING_BUF_DEFAULT_LEN 16
822
823static void
824string_buffer_init(struct parser_params *p)
825{
826 parser_string_buffer_t *buf = &p->lex.string_buffer;
827 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
828
829 buf->head = buf->last = xmalloc(size);
830 buf->head->len = STRING_BUF_DEFAULT_LEN;
831 buf->head->used = 0;
832 buf->head->next = NULL;
833}
834
835static void
836string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
837{
838 parser_string_buffer_t *buf = &p->lex.string_buffer;
839
840 if (buf->head->used >= buf->head->len) {
842 long n = buf->head->len * 2;
843 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
844
845 elem = xmalloc(size);
846 elem->len = n;
847 elem->used = 0;
848 elem->next = NULL;
849 buf->last->next = elem;
850 buf->last = elem;
851 }
852 buf->last->buf[buf->last->used++] = str;
853}
854
855static void
856string_buffer_free(struct parser_params *p)
857{
858 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
859
860 while (elem) {
861 parser_string_buffer_elem_t *next_elem = elem->next;
862
863 for (long i = 0; i < elem->used; i++) {
864 rb_parser_string_free(p, elem->buf[i]);
865 }
866
867 xfree(elem);
868 elem = next_elem;
869 }
870}
871
872#ifndef RIPPER
873static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
874
875static void
876debug_end_expect_token_locations(struct parser_params *p, const char *name)
877{
878 if(p->debug) {
879 VALUE mesg = rb_sprintf("%s: [", name);
880 int i = 0;
881 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
882 if (i > 0)
883 rb_str_cat_cstr(mesg, ", ");
884 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
885 i++;
886 }
887 rb_str_cat_cstr(mesg, "]\n");
888 flush_debug_buffer(p, p->debug_output, mesg);
889 }
890}
891
892static void
893push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
894{
895 if(!p->error_tolerant) return;
896
899 locations->pos = pos;
900 locations->prev = p->end_expect_token_locations;
901 p->end_expect_token_locations = locations;
902
903 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
904}
905
906static void
907pop_end_expect_token_locations(struct parser_params *p)
908{
909 if(!p->end_expect_token_locations) return;
910
911 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
912 ruby_xfree_sized(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
913 p->end_expect_token_locations = locations;
914
915 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
916}
917
919peek_end_expect_token_locations(struct parser_params *p)
920{
921 return p->end_expect_token_locations;
922}
923
924static const char *
925parser_token2char(struct parser_params *p, enum yytokentype tok)
926{
927 switch ((int) tok) {
928#define TOKEN2CHAR(tok) case tok: return (#tok);
929#define TOKEN2CHAR2(tok, name) case tok: return (name);
930 TOKEN2CHAR2(' ', "word_sep");
931 TOKEN2CHAR2('!', "!")
932 TOKEN2CHAR2('%', "%");
933 TOKEN2CHAR2('&', "&");
934 TOKEN2CHAR2('*', "*");
935 TOKEN2CHAR2('+', "+");
936 TOKEN2CHAR2('-', "-");
937 TOKEN2CHAR2('/', "/");
938 TOKEN2CHAR2('<', "<");
939 TOKEN2CHAR2('=', "=");
940 TOKEN2CHAR2('>', ">");
941 TOKEN2CHAR2('?', "?");
942 TOKEN2CHAR2('^', "^");
943 TOKEN2CHAR2('|', "|");
944 TOKEN2CHAR2('~', "~");
945 TOKEN2CHAR2(':', ":");
946 TOKEN2CHAR2(',', ",");
947 TOKEN2CHAR2('.', ".");
948 TOKEN2CHAR2(';', ";");
949 TOKEN2CHAR2('`', "`");
950 TOKEN2CHAR2('\n', "nl");
951 TOKEN2CHAR2('{', "\"{\"");
952 TOKEN2CHAR2('}', "\"}\"");
953 TOKEN2CHAR2('[', "\"[\"");
954 TOKEN2CHAR2(']', "\"]\"");
955 TOKEN2CHAR2('(', "\"(\"");
956 TOKEN2CHAR2(')', "\")\"");
957 TOKEN2CHAR2('\\', "backslash");
958 TOKEN2CHAR(keyword_class);
959 TOKEN2CHAR(keyword_module);
960 TOKEN2CHAR(keyword_def);
961 TOKEN2CHAR(keyword_undef);
962 TOKEN2CHAR(keyword_begin);
963 TOKEN2CHAR(keyword_rescue);
964 TOKEN2CHAR(keyword_ensure);
965 TOKEN2CHAR(keyword_end);
966 TOKEN2CHAR(keyword_if);
967 TOKEN2CHAR(keyword_unless);
968 TOKEN2CHAR(keyword_then);
969 TOKEN2CHAR(keyword_elsif);
970 TOKEN2CHAR(keyword_else);
971 TOKEN2CHAR(keyword_case);
972 TOKEN2CHAR(keyword_when);
973 TOKEN2CHAR(keyword_while);
974 TOKEN2CHAR(keyword_until);
975 TOKEN2CHAR(keyword_for);
976 TOKEN2CHAR(keyword_break);
977 TOKEN2CHAR(keyword_next);
978 TOKEN2CHAR(keyword_redo);
979 TOKEN2CHAR(keyword_retry);
980 TOKEN2CHAR(keyword_in);
981 TOKEN2CHAR(keyword_do);
982 TOKEN2CHAR(keyword_do_cond);
983 TOKEN2CHAR(keyword_do_block);
984 TOKEN2CHAR(keyword_do_LAMBDA);
985 TOKEN2CHAR(keyword_return);
986 TOKEN2CHAR(keyword_yield);
987 TOKEN2CHAR(keyword_super);
988 TOKEN2CHAR(keyword_self);
989 TOKEN2CHAR(keyword_nil);
990 TOKEN2CHAR(keyword_true);
991 TOKEN2CHAR(keyword_false);
992 TOKEN2CHAR(keyword_and);
993 TOKEN2CHAR(keyword_or);
994 TOKEN2CHAR(keyword_not);
995 TOKEN2CHAR(modifier_if);
996 TOKEN2CHAR(modifier_unless);
997 TOKEN2CHAR(modifier_while);
998 TOKEN2CHAR(modifier_until);
999 TOKEN2CHAR(modifier_rescue);
1000 TOKEN2CHAR(keyword_alias);
1001 TOKEN2CHAR(keyword_defined);
1002 TOKEN2CHAR(keyword_BEGIN);
1003 TOKEN2CHAR(keyword_END);
1004 TOKEN2CHAR(keyword__LINE__);
1005 TOKEN2CHAR(keyword__FILE__);
1006 TOKEN2CHAR(keyword__ENCODING__);
1007 TOKEN2CHAR(tIDENTIFIER);
1008 TOKEN2CHAR(tFID);
1009 TOKEN2CHAR(tGVAR);
1010 TOKEN2CHAR(tIVAR);
1011 TOKEN2CHAR(tCONSTANT);
1012 TOKEN2CHAR(tCVAR);
1013 TOKEN2CHAR(tLABEL);
1014 TOKEN2CHAR(tINTEGER);
1015 TOKEN2CHAR(tFLOAT);
1016 TOKEN2CHAR(tRATIONAL);
1017 TOKEN2CHAR(tIMAGINARY);
1018 TOKEN2CHAR(tCHAR);
1019 TOKEN2CHAR(tNTH_REF);
1020 TOKEN2CHAR(tBACK_REF);
1021 TOKEN2CHAR(tSTRING_CONTENT);
1022 TOKEN2CHAR(tREGEXP_END);
1023 TOKEN2CHAR(tDUMNY_END);
1024 TOKEN2CHAR(tSP);
1025 TOKEN2CHAR(tUPLUS);
1026 TOKEN2CHAR(tUMINUS);
1027 TOKEN2CHAR(tPOW);
1028 TOKEN2CHAR(tCMP);
1029 TOKEN2CHAR(tEQ);
1030 TOKEN2CHAR(tEQQ);
1031 TOKEN2CHAR(tNEQ);
1032 TOKEN2CHAR(tGEQ);
1033 TOKEN2CHAR(tLEQ);
1034 TOKEN2CHAR(tANDOP);
1035 TOKEN2CHAR(tOROP);
1036 TOKEN2CHAR(tMATCH);
1037 TOKEN2CHAR(tNMATCH);
1038 TOKEN2CHAR(tDOT2);
1039 TOKEN2CHAR(tDOT3);
1040 TOKEN2CHAR(tBDOT2);
1041 TOKEN2CHAR(tBDOT3);
1042 TOKEN2CHAR(tAREF);
1043 TOKEN2CHAR(tASET);
1044 TOKEN2CHAR(tLSHFT);
1045 TOKEN2CHAR(tRSHFT);
1046 TOKEN2CHAR(tANDDOT);
1047 TOKEN2CHAR(tCOLON2);
1048 TOKEN2CHAR(tCOLON3);
1049 TOKEN2CHAR(tOP_ASGN);
1050 TOKEN2CHAR(tASSOC);
1051 TOKEN2CHAR(tLPAREN);
1052 TOKEN2CHAR(tLPAREN_ARG);
1053 TOKEN2CHAR(tLBRACK);
1054 TOKEN2CHAR(tLBRACE);
1055 TOKEN2CHAR(tLBRACE_ARG);
1056 TOKEN2CHAR(tSTAR);
1057 TOKEN2CHAR(tDSTAR);
1058 TOKEN2CHAR(tAMPER);
1059 TOKEN2CHAR(tLAMBDA);
1060 TOKEN2CHAR(tSYMBEG);
1061 TOKEN2CHAR(tSTRING_BEG);
1062 TOKEN2CHAR(tXSTRING_BEG);
1063 TOKEN2CHAR(tREGEXP_BEG);
1064 TOKEN2CHAR(tWORDS_BEG);
1065 TOKEN2CHAR(tQWORDS_BEG);
1066 TOKEN2CHAR(tSYMBOLS_BEG);
1067 TOKEN2CHAR(tQSYMBOLS_BEG);
1068 TOKEN2CHAR(tSTRING_END);
1069 TOKEN2CHAR(tSTRING_DEND);
1070 TOKEN2CHAR(tSTRING_DBEG);
1071 TOKEN2CHAR(tSTRING_DVAR);
1072 TOKEN2CHAR(tLAMBEG);
1073 TOKEN2CHAR(tLABEL_END);
1074 TOKEN2CHAR(tIGNORED_NL);
1075 TOKEN2CHAR(tCOMMENT);
1076 TOKEN2CHAR(tEMBDOC_BEG);
1077 TOKEN2CHAR(tEMBDOC);
1078 TOKEN2CHAR(tEMBDOC_END);
1079 TOKEN2CHAR(tHEREDOC_BEG);
1080 TOKEN2CHAR(tHEREDOC_END);
1081 TOKEN2CHAR(k__END__);
1082 TOKEN2CHAR(tLOWEST);
1083 TOKEN2CHAR(tUMINUS_NUM);
1084 TOKEN2CHAR(tLAST_TOKEN);
1085#undef TOKEN2CHAR
1086#undef TOKEN2CHAR2
1087 }
1088
1089 rb_bug("parser_token2id: unknown token %d", tok);
1090
1091 UNREACHABLE_RETURN(0);
1092}
1093#else
1094static void
1095push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1096{
1097}
1098
1099static void
1100pop_end_expect_token_locations(struct parser_params *p)
1101{
1102}
1103#endif
1104
1105RBIMPL_ATTR_NONNULL((1, 2, 3))
1106static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1107RBIMPL_ATTR_NONNULL((1, 2))
1108static int parser_yyerror0(struct parser_params*, const char*);
1109#define yyerror0(msg) parser_yyerror0(p, (msg))
1110#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1111#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1112#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1113#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1114#define lex_eol_p(p) lex_eol_n_p(p, 0)
1115#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1116#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1117#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1118
1119static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1120static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1121static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1122static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1123static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1124
1125#ifdef RIPPER
1126#define compile_for_eval (0)
1127#else
1128#define compile_for_eval (p->parent_iseq != 0)
1129#endif
1130
1131#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1132
1133#define CALL_Q_P(q) ((q) == tANDDOT)
1134#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1135
1136#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1137
1138static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1139
1140static inline void
1141rb_discard_node(struct parser_params *p, NODE *n)
1142{
1143 rb_ast_delete_node(p->ast, n);
1144}
1145
1146static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1147static rb_node_scope_t *rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1148static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1149static rb_node_if_t *rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE* if_keyword_loc, const YYLTYPE* then_keyword_loc, const YYLTYPE* end_keyword_loc);
1150static rb_node_unless_t *rb_node_unless_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *end_keyword_loc);
1151static rb_node_case_t *rb_node_case_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1152static rb_node_case2_t *rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1153static rb_node_case3_t *rb_node_case3_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1154static rb_node_when_t *rb_node_when_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc);
1155static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *operator_loc);
1156static rb_node_while_t *rb_node_while_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1157static rb_node_until_t *rb_node_until_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1158static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1159static rb_node_for_t *rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *for_keyword_loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *do_keyword_loc, const YYLTYPE *end_keyword_loc);
1160static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1161static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1162static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1163static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1164static rb_node_resbody_t *rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1165static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1166static rb_node_and_t *rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1167static rb_node_or_t *rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1168static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1169static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1170static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1171static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1172static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1173static rb_node_cdecl_t *rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1174static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1175static rb_node_op_asgn1_t *rb_node_op_asgn1_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *index, NODE *rvalue, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1176static rb_node_op_asgn2_t *rb_node_op_asgn2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, ID nd_vid, ID nd_mid, bool nd_aid, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1177static rb_node_op_asgn_or_t *rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1178static rb_node_op_asgn_and_t *rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1179static rb_node_op_cdecl_t *rb_node_op_cdecl_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, ID nd_aid, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1180static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1181static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1182static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1183static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1184static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1185static rb_node_super_t *rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1186static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1187static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1188static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1189static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1190static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1191static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1192static rb_node_yield_t *rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1193static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1194static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1195static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1196static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1197static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1198static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1199static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1200static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1201static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1202static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1203static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1204static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1205static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1206static rb_node_imaginary_t * rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type, const YYLTYPE *loc);
1207static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1208static rb_node_dstr_t *rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1209static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1210static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1211static rb_node_dxstr_t *rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1212static rb_node_evstr_t *rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1213static rb_node_regx_t *rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc);
1214static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1215static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1216static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1217static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1218static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1219static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1220static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1221static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1222static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1223static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1224static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1225static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1226static rb_node_alias_t *rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1227static rb_node_valias_t *rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1228static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1229static rb_node_class_t *rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *inheritance_operator_loc, const YYLTYPE *end_keyword_loc);
1230static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *module_keyword_loc, const YYLTYPE *end_keyword_loc);
1231static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *operator_loc, const YYLTYPE *end_keyword_loc);
1232static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1233static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1234static rb_node_dot2_t *rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1235static rb_node_dot3_t *rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1236static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1237static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1238static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1239static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1240static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1241static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1242static rb_node_postexe_t *rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1243static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1244static rb_node_dsym_t *rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1245static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1246static rb_node_lambda_t *rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1247static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1248static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1249static rb_node_fndptn_t *rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1250static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1251static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1252static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1253
1254#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1255#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1256#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1257#define NEW_IF(c,t,e,loc,ik_loc,tk_loc,ek_loc) (NODE *)rb_node_if_new(p,c,t,e,loc,ik_loc,tk_loc,ek_loc)
1258#define NEW_UNLESS(c,t,e,loc,k_loc,t_loc,e_loc) (NODE *)rb_node_unless_new(p,c,t,e,loc,k_loc,t_loc,e_loc)
1259#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1260#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1261#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1262#define NEW_WHEN(c,t,e,loc,k_loc,t_loc) (NODE *)rb_node_when_new(p,c,t,e,loc,k_loc,t_loc)
1263#define NEW_IN(c,t,e,loc,ik_loc,tk_loc,o_loc) (NODE *)rb_node_in_new(p,c,t,e,loc,ik_loc,tk_loc,o_loc)
1264#define NEW_WHILE(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_while_new(p,c,b,n,loc,k_loc,c_loc)
1265#define NEW_UNTIL(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_until_new(p,c,b,n,loc,k_loc,c_loc)
1266#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1267#define NEW_FOR(i,b,loc,f_loc,i_loc,d_loc,e_loc) (NODE *)rb_node_for_new(p,i,b,loc,f_loc,i_loc,d_loc,e_loc)
1268#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1269#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1270#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1271#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1272#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1273#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1274#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1275#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1276#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1277#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1278#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1279#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1280#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1281#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1282#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1283#define NEW_OP_ASGN1(r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc) (NODE *)rb_node_op_asgn1_new(p,r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc)
1284#define NEW_OP_ASGN2(r,t,i,o,val,loc,c_op_loc,m_loc,b_op_loc) (NODE *)rb_node_op_asgn2_new(p,r,val,i,o,t,loc,c_op_loc,m_loc,b_op_loc)
1285#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1286#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1287#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1288#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1289#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1290#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1291#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1292#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1293#define NEW_SUPER(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_super_new(p,a,loc,k_loc,l_loc,r_loc)
1294#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1295#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1296#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1297#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1298#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1299#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1300#define NEW_YIELD(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_yield_new(p,a,loc,k_loc,l_loc,r_loc)
1301#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1302#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1303#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1304#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1305#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1306#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1307#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1308#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1309#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1310#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1311#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1312#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1313#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1314#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1315#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1316#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1317#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1318#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1319#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1320#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1321#define NEW_REGX(str,opts,loc,o_loc,ct_loc,c_loc) (NODE *)rb_node_regx_new(p,str,opts,loc,o_loc,ct_loc,c_loc)
1322#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1323#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1324#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1325#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1326#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1327#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1328#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1329#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1330#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1331#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1332#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1333#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1334#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1335#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1336#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1337#define NEW_CLASS(n,b,s,loc,ck_loc,io_loc,ek_loc) (NODE *)rb_node_class_new(p,n,b,s,loc,ck_loc,io_loc,ek_loc)
1338#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1339#define NEW_SCLASS(r,b,loc,ck_loc,op_loc,ek_loc) (NODE *)rb_node_sclass_new(p,r,b,loc,ck_loc,op_loc,ek_loc)
1340#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1341#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1342#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1343#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1344#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1345#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1346#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1347#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1348#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1349#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1350#define NEW_POSTEXE(b,loc,k_loc,o_loc,c_loc) (NODE *)rb_node_postexe_new(p,b,loc,k_loc,o_loc,c_loc)
1351#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1352#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1353#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1354#define NEW_LAMBDA(a,b,loc,op_loc,o_loc,c_loc) (NODE *)rb_node_lambda_new(p,a,b,loc,op_loc,o_loc,c_loc)
1355#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1356#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1357#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1358#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1359#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1360#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1361#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1362
1363enum internal_node_type {
1364 NODE_INTERNAL_ONLY = NODE_LAST,
1365 NODE_DEF_TEMP,
1366 NODE_EXITS,
1367 NODE_INTERNAL_LAST
1368};
1369
1370static const char *
1371parser_node_name(int node)
1372{
1373 switch (node) {
1374 case NODE_DEF_TEMP:
1375 return "NODE_DEF_TEMP";
1376 case NODE_EXITS:
1377 return "NODE_EXITS";
1378 default:
1379 return ruby_node_name(node);
1380 }
1381}
1382
1383/* This node is parse.y internal */
1384struct RNode_DEF_TEMP {
1385 NODE node;
1386
1387 /* for NODE_DEFN/NODE_DEFS */
1388
1389 struct RNode *nd_def;
1390 ID nd_mid;
1391
1392 struct {
1393 int max_numparam;
1394 NODE *numparam_save;
1395 struct lex_context ctxt;
1396 } save;
1397};
1398
1399#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1400
1401static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1402static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1403static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1404static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1405static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1406
1407#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1408#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1409#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1410#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1411
1412/* Make a new internal node, which should not be appeared in the
1413 * result AST and does not have node_id and location. */
1414static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1415#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1416
1417static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1418
1419static int
1420parser_get_node_id(struct parser_params *p)
1421{
1422 int node_id = p->node_id;
1423 p->node_id++;
1424 return node_id;
1425}
1426
1427static void
1428anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1429{
1430 if (id == tANDDOT) {
1431 yyerror1(loc, "&. inside multiple assignment destination");
1432 }
1433}
1434
1435static inline void
1436set_line_body(NODE *body, int line)
1437{
1438 if (!body) return;
1439 switch (nd_type(body)) {
1440 case NODE_RESCUE:
1441 case NODE_ENSURE:
1442 nd_set_line(body, line);
1443 }
1444}
1445
1446static void
1447set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1448{
1449 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1450 nd_set_line(node, beg->end_pos.lineno);
1451}
1452
1453static NODE *
1454last_expr_node(NODE *expr)
1455{
1456 while (expr) {
1457 if (nd_type_p(expr, NODE_BLOCK)) {
1458 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1459 }
1460 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1461 expr = RNODE_BEGIN(expr)->nd_body;
1462 }
1463 else {
1464 break;
1465 }
1466 }
1467 return expr;
1468}
1469
1470#ifndef RIPPER
1471#define yyparse ruby_yyparse
1472#endif
1473
1474static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1475static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1476static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1477static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1478static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1479static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1480
1481static NODE *newline_node(NODE*);
1482static void fixpos(NODE*,NODE*);
1483
1484static int value_expr(struct parser_params*,NODE*);
1485static void void_expr(struct parser_params*,NODE*);
1486static NODE *remove_begin(NODE*);
1487static NODE *void_stmts(struct parser_params*,NODE*);
1488static void reduce_nodes(struct parser_params*,NODE**);
1489static void block_dup_check(struct parser_params*,NODE*,NODE*);
1490
1491static NODE *block_append(struct parser_params*,NODE*,NODE*);
1492static NODE *list_append(struct parser_params*,NODE*,NODE*);
1493static NODE *list_concat(NODE*,NODE*);
1494static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1495static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1496static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1497static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1498static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1499static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1500static NODE *str2dstr(struct parser_params*,NODE*);
1501static NODE *evstr2dstr(struct parser_params*,NODE*);
1502static NODE *splat_array(NODE*);
1503static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1504
1505static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1506static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1507static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1508static NODE *new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc);
1509static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {RNODE_ITER(b)->nd_iter = m; b->nd_loc = *loc; return b;}
1510static NODE *command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc);
1511
1512static bool args_info_empty_p(struct rb_args_info *args);
1513static rb_node_args_t *new_args(struct parser_params*,rb_node_args_aux_t*,rb_node_opt_arg_t*,ID,rb_node_args_aux_t*,rb_node_args_t*,const YYLTYPE*);
1514static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1515#define new_empty_args_tail(p, loc) new_args_tail(p, 0, 0, 0, loc)
1516static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1517static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1518static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1519static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1520static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1521static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1522
1523static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1524static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1525
1526static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1527static void no_blockarg(struct parser_params*,NODE*);
1528static NODE *ret_args(struct parser_params*,NODE*);
1529static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1530static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1531
1532static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1533static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1534
1535static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1536static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1537
1538static VALUE rb_backref_error(struct parser_params*,NODE*);
1539static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1540
1541static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1542static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1543static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1544static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1545static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1546
1547static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1548
1549static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1550static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1551
1552static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1553static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1554
1555static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1556
1557static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1558
1559#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1560
1561static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1562
1563static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1564
1565static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1566
1567static rb_ast_id_table_t *local_tbl(struct parser_params*);
1568
1569static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1570static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1571
1572static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1573static NODE *heredoc_dedent(struct parser_params*,NODE*);
1574
1575static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1576
1577static rb_locations_lambda_body_t* new_locations_lambda_body(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1578
1579#ifdef RIPPER
1580#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1581#define set_value(val) (p->s_lvalue = val)
1582static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1583static int id_is_var(struct parser_params *p, ID id);
1584#endif
1585
1586RUBY_SYMBOL_EXPORT_BEGIN
1587VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1588int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1589enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1590VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1591void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1592PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1593YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1594YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1595YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1596YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1597YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1598YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1599void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1600RUBY_SYMBOL_EXPORT_END
1601
1602static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1603static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1604static int pattern_has_capture(struct parser_params *p, NODE *node);
1605static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1606static VALUE formal_argument_error(struct parser_params*, ID);
1607static ID shadowing_lvar(struct parser_params*,ID);
1608static void new_bv(struct parser_params*,ID);
1609
1610static void local_push(struct parser_params*,int);
1611static void local_pop(struct parser_params*);
1612static void local_var(struct parser_params*, ID);
1613static void arg_var(struct parser_params*, ID);
1614static int local_id(struct parser_params *p, ID id);
1615static int local_id_ref(struct parser_params*, ID, ID **);
1616#define internal_id rb_parser_internal_id
1617ID internal_id(struct parser_params*);
1618static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1619static int check_forwarding_args(struct parser_params*);
1620static void add_forwarding_args(struct parser_params *p);
1621static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1622
1623static const struct vtable *dyna_push(struct parser_params *);
1624static void dyna_pop(struct parser_params*, const struct vtable *);
1625static int dyna_in_block(struct parser_params*);
1626#define dyna_var(p, id) local_var(p, id)
1627static int dvar_defined(struct parser_params*, ID);
1628#define dvar_defined_ref rb_parser_dvar_defined_ref
1629int dvar_defined_ref(struct parser_params*, ID, ID**);
1630static int dvar_curr(struct parser_params*,ID);
1631
1632static int lvar_defined(struct parser_params*, ID);
1633
1634static NODE *numparam_push(struct parser_params *p);
1635static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1636
1637#define METHOD_NOT '!'
1638
1639#define idFWD_REST '*'
1640#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1641#define idFWD_BLOCK '&'
1642#define idFWD_ALL idDot3
1643#define arg_FWD_BLOCK idFWD_BLOCK
1644
1645#define RE_ONIG_OPTION_IGNORECASE 1
1646#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1647#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1648#define RE_OPTION_ONCE (1<<16)
1649#define RE_OPTION_ENCODING_SHIFT 8
1650#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1651#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1652#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1653#define RE_OPTION_MASK 0xff
1654#define RE_OPTION_ARG_ENCODING_NONE 32
1655
1656#define CHECK_LITERAL_WHEN (st_table *)1
1657#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1658
1659#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1660RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1661
1662#define TOKEN2ID(tok) ( \
1663 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1664 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1665 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1666 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1667 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1668 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1669 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1670
1671/****** Ripper *******/
1672
1673#ifdef RIPPER
1674
1675#include "eventids1.h"
1676#include "eventids2.h"
1677
1678extern const struct ripper_parser_ids ripper_parser_ids;
1679
1680static VALUE ripper_dispatch0(struct parser_params*,ID);
1681static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1682static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1683static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1684static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1685static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1686static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1687void ripper_error(struct parser_params *p);
1688
1689#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1690#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1691#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1692#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1693#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1694#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1695#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1696
1697#define yyparse ripper_yyparse
1698
1699static VALUE
1700aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1701{
1702 if (!NIL_P(pre_arg)) {
1703 if (!NIL_P(pre_args)) {
1704 rb_ary_unshift(pre_args, pre_arg);
1705 }
1706 else {
1707 pre_args = rb_ary_new_from_args(1, pre_arg);
1708 }
1709 }
1710 return pre_args;
1711}
1712
1713#define ID2VAL(id) STATIC_ID2SYM(id)
1714#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1715#endif /* RIPPER */
1716
1717#define KWD2EID(t, v) keyword_##t
1718
1719static NODE *
1720new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1721{
1722 body = remove_begin(body);
1723 reduce_nodes(p, &body);
1724 NODE *n = NEW_SCOPE(args, body, parent, loc);
1725 nd_set_line(n, loc->end_pos.lineno);
1726 set_line_body(body, loc->beg_pos.lineno);
1727 return n;
1728}
1729
1730static NODE *
1731rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1732 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1733{
1734 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1735 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1736 loc.beg_pos = arg_loc->beg_pos;
1737 return NEW_RESCUE(arg, rescue, 0, &loc);
1738}
1739
1740static NODE *add_block_exit(struct parser_params *p, NODE *node);
1741static rb_node_exits_t *init_block_exit(struct parser_params *p);
1742static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1743static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1744static void clear_block_exit(struct parser_params *p, bool error);
1745
1746static void
1747next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1748{
1749 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1750}
1751
1752static void
1753restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1754{
1755 /* See: def_name action */
1756 struct lex_context ctxt = temp->save.ctxt;
1757 p->ctxt.in_def = ctxt.in_def;
1758 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1759 p->ctxt.in_rescue = ctxt.in_rescue;
1760 p->max_numparam = temp->save.max_numparam;
1761 numparam_pop(p, temp->save.numparam_save);
1762 clear_block_exit(p, true);
1763}
1764
1765static void
1766endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1767{
1768 if (is_attrset_id(mid)) {
1769 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1770 }
1771 token_info_drop(p, "def", loc->beg_pos);
1772}
1773
1774#define debug_token_line(p, name, line) do { \
1775 if (p->debug) { \
1776 const char *const pcur = p->lex.pcur; \
1777 const char *const ptok = p->lex.ptok; \
1778 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1779 line, p->ruby_sourceline, \
1780 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1781 } \
1782 } while (0)
1783
1784#define begin_definition(k, loc_beg, loc_end) \
1785 do { \
1786 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1787 /* singleton class */ \
1788 p->ctxt.cant_return = !p->ctxt.in_def; \
1789 p->ctxt.in_def = 0; \
1790 } \
1791 else if (p->ctxt.in_def) { \
1792 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1793 yyerror1(&loc, k " definition in method body"); \
1794 } \
1795 else { \
1796 p->ctxt.cant_return = 1; \
1797 } \
1798 local_push(p, 0); \
1799 } while (0)
1800
1801#ifndef RIPPER
1802# define ifndef_ripper(x) (x)
1803# define ifdef_ripper(r,x) (x)
1804#else
1805# define ifndef_ripper(x)
1806# define ifdef_ripper(r,x) (r)
1807#endif
1808
1809# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1810# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1811# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1812# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1813# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1814# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1815# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1816# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1817# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1818# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1819# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1820# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1821# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1822# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1823# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1824# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1825# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1826# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1827# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1828# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1829#ifdef RIPPER
1830extern const ID id_warn, id_warning, id_gets, id_assoc;
1831# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1832# define WARN_S_L(s,l) STR_NEW(s,l)
1833# define WARN_S(s) STR_NEW2(s)
1834# define WARN_I(i) INT2NUM(i)
1835# define WARN_ID(i) rb_id2str(i)
1836# define PRIsWARN PRIsVALUE
1837# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1838# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1839# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1840# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1841# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1842# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1843# define compile_error ripper_compile_error
1844#else
1845# define WARN_S_L(s,l) s
1846# define WARN_S(s) s
1847# define WARN_I(i) i
1848# define WARN_ID(i) rb_id2name(i)
1849# define PRIsWARN PRIsVALUE
1850# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1851# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1852# define WARN_CALL rb_compile_warn
1853# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1854# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1855# define WARNING_CALL rb_compile_warning
1856PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1857# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1858#endif
1859
1860#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1861
1862static NODE *
1863add_block_exit(struct parser_params *p, NODE *node)
1864{
1865 if (!node) {
1866 compile_error(p, "unexpected null node");
1867 return 0;
1868 }
1869 switch (nd_type(node)) {
1870 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1871 default:
1872 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1873 return node;
1874 }
1875 if (!p->ctxt.in_defined) {
1876 rb_node_exits_t *exits = p->exits;
1877 if (exits) {
1878 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1879 exits->nd_stts = node;
1880 }
1881 }
1882 return node;
1883}
1884
1885static rb_node_exits_t *
1886init_block_exit(struct parser_params *p)
1887{
1888 rb_node_exits_t *old = p->exits;
1889 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1890 exits->nd_chain = 0;
1891 exits->nd_stts = RNODE(exits);
1892 p->exits = exits;
1893 return old;
1894}
1895
1896static rb_node_exits_t *
1897allow_block_exit(struct parser_params *p)
1898{
1899 rb_node_exits_t *exits = p->exits;
1900 p->exits = 0;
1901 return exits;
1902}
1903
1904static void
1905restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1906{
1907 p->exits = exits;
1908}
1909
1910static void
1911clear_block_exit(struct parser_params *p, bool error)
1912{
1913 rb_node_exits_t *exits = p->exits;
1914 if (!exits) return;
1915 if (error) {
1916 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1917 switch (nd_type(e)) {
1918 case NODE_BREAK:
1919 yyerror1(&e->nd_loc, "Invalid break");
1920 break;
1921 case NODE_NEXT:
1922 yyerror1(&e->nd_loc, "Invalid next");
1923 break;
1924 case NODE_REDO:
1925 yyerror1(&e->nd_loc, "Invalid redo");
1926 break;
1927 default:
1928 yyerror1(&e->nd_loc, "unexpected node");
1929 goto end_checks; /* no nd_chain */
1930 }
1931 }
1932 end_checks:;
1933 }
1934 exits->nd_stts = RNODE(exits);
1935 exits->nd_chain = 0;
1936}
1937
1938#define WARN_EOL(tok) \
1939 (looking_at_eol_p(p) ? \
1940 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1941 (void)0)
1942static int looking_at_eol_p(struct parser_params *p);
1943
1944static NODE *
1945get_nd_value(struct parser_params *p, NODE *node)
1946{
1947 switch (nd_type(node)) {
1948 case NODE_GASGN:
1949 return RNODE_GASGN(node)->nd_value;
1950 case NODE_IASGN:
1951 return RNODE_IASGN(node)->nd_value;
1952 case NODE_LASGN:
1953 return RNODE_LASGN(node)->nd_value;
1954 case NODE_DASGN:
1955 return RNODE_DASGN(node)->nd_value;
1956 case NODE_MASGN:
1957 return RNODE_MASGN(node)->nd_value;
1958 case NODE_CVASGN:
1959 return RNODE_CVASGN(node)->nd_value;
1960 case NODE_CDECL:
1961 return RNODE_CDECL(node)->nd_value;
1962 default:
1963 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1964 return 0;
1965 }
1966}
1967
1968static void
1969set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1970{
1971 switch (nd_type(node)) {
1972 case NODE_CDECL:
1973 RNODE_CDECL(node)->nd_value = rhs;
1974 break;
1975 case NODE_GASGN:
1976 RNODE_GASGN(node)->nd_value = rhs;
1977 break;
1978 case NODE_IASGN:
1979 RNODE_IASGN(node)->nd_value = rhs;
1980 break;
1981 case NODE_LASGN:
1982 RNODE_LASGN(node)->nd_value = rhs;
1983 break;
1984 case NODE_DASGN:
1985 RNODE_DASGN(node)->nd_value = rhs;
1986 break;
1987 case NODE_MASGN:
1988 RNODE_MASGN(node)->nd_value = rhs;
1989 break;
1990 case NODE_CVASGN:
1991 RNODE_CVASGN(node)->nd_value = rhs;
1992 break;
1993 default:
1994 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1995 break;
1996 }
1997}
1998
1999static ID
2000get_nd_vid(struct parser_params *p, NODE *node)
2001{
2002 switch (nd_type(node)) {
2003 case NODE_CDECL:
2004 return RNODE_CDECL(node)->nd_vid;
2005 case NODE_GASGN:
2006 return RNODE_GASGN(node)->nd_vid;
2007 case NODE_IASGN:
2008 return RNODE_IASGN(node)->nd_vid;
2009 case NODE_LASGN:
2010 return RNODE_LASGN(node)->nd_vid;
2011 case NODE_DASGN:
2012 return RNODE_DASGN(node)->nd_vid;
2013 case NODE_CVASGN:
2014 return RNODE_CVASGN(node)->nd_vid;
2015 default:
2016 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
2017 return 0;
2018 }
2019}
2020
2021static NODE *
2022get_nd_args(struct parser_params *p, NODE *node)
2023{
2024 switch (nd_type(node)) {
2025 case NODE_CALL:
2026 return RNODE_CALL(node)->nd_args;
2027 case NODE_OPCALL:
2028 return RNODE_OPCALL(node)->nd_args;
2029 case NODE_FCALL:
2030 return RNODE_FCALL(node)->nd_args;
2031 case NODE_QCALL:
2032 return RNODE_QCALL(node)->nd_args;
2033 case NODE_SUPER:
2034 return RNODE_SUPER(node)->nd_args;
2035 case NODE_VCALL:
2036 case NODE_ZSUPER:
2037 case NODE_YIELD:
2038 case NODE_RETURN:
2039 case NODE_BREAK:
2040 case NODE_NEXT:
2041 return 0;
2042 default:
2043 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2044 return 0;
2045 }
2046}
2047
2048static st_index_t
2049djb2(const uint8_t *str, size_t len)
2050{
2051 st_index_t hash = 5381;
2052
2053 for (size_t i = 0; i < len; i++) {
2054 hash = ((hash << 5) + hash) + str[i];
2055 }
2056
2057 return hash;
2058}
2059
2060static st_index_t
2061parser_memhash(const void *ptr, rb_len_t len)
2062{
2063 return djb2(ptr, len);
2064}
2065
2066#define PARSER_STRING_PTR(str) (str->ptr)
2067#define PARSER_STRING_LEN(str) (str->len)
2068#define PARSER_STRING_END(str) (&str->ptr[str->len])
2069#define STRING_SIZE(str) ((size_t)str->len + 1)
2070#define STRING_TERM_LEN(str) (1)
2071#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2072#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2073 REALLOC_N(str->ptr, char, (size_t)total + termlen); \
2074 str->len = total; \
2075} while (0)
2076#define STRING_SET_LEN(str, n) do { \
2077 (str)->len = (n); \
2078} while (0)
2079#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2080 ((ptrvar) = str->ptr, \
2081 (lenvar) = str->len)
2082
2083static inline int
2084parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2085{
2086 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2087}
2088
2089static rb_parser_string_t *
2090rb_parser_string_new(rb_parser_t *p, const char *ptr, rb_len_t len)
2091{
2092 rb_parser_string_t *str;
2093
2094 if (len < 0) {
2095 rb_bug("negative string size (or size too big): %"PRIdLEN, len);
2096 }
2097
2098 str = xcalloc(1, sizeof(rb_parser_string_t));
2099 str->ptr = xcalloc(len + 1, sizeof(char));
2100
2101 if (ptr) {
2102 memcpy(PARSER_STRING_PTR(str), ptr, len);
2103 }
2104 STRING_SET_LEN(str, len);
2105 STRING_TERM_FILL(str);
2106 return str;
2107}
2108
2109static rb_parser_string_t *
2110rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, rb_len_t len, rb_encoding *enc)
2111{
2112 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2113 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2114 str->enc = enc;
2115 return str;
2116}
2117
2118#ifndef RIPPER
2119rb_parser_string_t *
2120rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2121{
2122 /* Type check */
2123 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2124 RB_GC_GUARD(str);
2125 return ret;
2126}
2127
2128void
2129rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2130{
2131 if (!str) return;
2132 xfree(PARSER_STRING_PTR(str));
2133 xfree(str);
2134}
2135#endif
2136
2137static st_index_t
2138rb_parser_str_hash(rb_parser_string_t *str)
2139{
2140 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2141}
2142
2143static st_index_t
2144rb_char_p_hash(const char *c)
2145{
2146 return parser_memhash((const void *)c, strlen(c));
2147}
2148
2149static size_t
2150rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2151{
2152 return PARSER_STRING_LEN(str);
2153}
2154
2155#ifndef RIPPER
2156static char *
2157rb_parser_string_end(rb_parser_string_t *str)
2158{
2159 return &str->ptr[str->len];
2160}
2161#endif
2162
2163static void
2164rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2165{
2166 str->enc = enc;
2167}
2168
2169static rb_encoding *
2170rb_parser_str_get_encoding(rb_parser_string_t *str)
2171{
2172 return str->enc;
2173}
2174
2175#ifndef RIPPER
2176static bool
2177PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2178{
2179 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2180}
2181#endif
2182
2183static int
2184PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2185{
2186 return str->coderange;
2187}
2188
2189static void
2190PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2191{
2192 str->coderange = coderange;
2193}
2194
2195static void
2196PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2197{
2198 rb_parser_string_set_encoding(str, enc);
2199 PARSER_ENC_CODERANGE_SET(str, cr);
2200}
2201
2202static void
2203PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2204{
2205 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2206}
2207
2208static bool
2209PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2210{
2211 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2212}
2213
2214static bool
2215PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2216{
2217 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2218}
2219
2220static const char *
2221rb_parser_search_nonascii(const char *p, const char *e)
2222{
2223 const char *s = p;
2224
2225 for (; s < e; s++) {
2226 if (*s & 0x80) return s;
2227 }
2228
2229 return NULL;
2230}
2231
2232static int
2233rb_parser_coderange_scan(struct parser_params *p, const char *ptr, rb_len_t len, rb_encoding *enc)
2234{
2235 const char *e = ptr + len;
2236
2237 if (enc == rb_ascii8bit_encoding()) {
2238 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2239 ptr = rb_parser_search_nonascii(ptr, e);
2240 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2241 }
2242
2243 /* parser string encoding is always asciicompat */
2244 ptr = rb_parser_search_nonascii(ptr, e);
2245 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2246 for (;;) {
2247 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2248 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2249 ptr += MBCLEN_CHARFOUND_LEN(ret);
2250 if (ptr == e) break;
2251 ptr = rb_parser_search_nonascii(ptr, e);
2252 if (!ptr) break;
2253 }
2254
2255 return RB_PARSER_ENC_CODERANGE_VALID;
2256}
2257
2258static int
2259rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2260{
2261 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2262}
2263
2264static int
2265rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2266{
2267 int cr = PARSER_ENC_CODERANGE(str);
2268
2269 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2270 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2271 PARSER_ENC_CODERANGE_SET(str, cr);
2272 }
2273
2274 return cr;
2275}
2276
2277static rb_parser_string_t *
2278rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2279{
2280 if (rb_parser_str_get_encoding(str) == enc)
2281 return str;
2282 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2283 PARSER_ENC_CODERANGE_CLEAR(str);
2284 }
2285 rb_parser_string_set_encoding(str, enc);
2286 return str;
2287}
2288
2289static bool
2290rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2291{
2292 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2293}
2294
2295static rb_encoding *
2296rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2297{
2298 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2299 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2300
2301 if (enc1 == NULL || enc2 == NULL)
2302 return 0;
2303
2304 if (enc1 == enc2) {
2305 return enc1;
2306 }
2307
2308 if (PARSER_STRING_LEN(str2) == 0)
2309 return enc1;
2310 if (PARSER_STRING_LEN(str1) == 0)
2311 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2312
2313 int cr1, cr2;
2314
2315 cr1 = rb_parser_enc_str_coderange(p, str1);
2316 cr2 = rb_parser_enc_str_coderange(p, str2);
2317
2318 if (cr1 != cr2) {
2319 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2320 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2321 }
2322
2323 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2324 return enc1;
2325 }
2326
2327 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2328 return enc2;
2329 }
2330
2331 return 0;
2332}
2333
2334static void
2335rb_parser_str_modify(rb_parser_string_t *str)
2336{
2337 PARSER_ENC_CODERANGE_CLEAR(str);
2338}
2339
2340static void
2341rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, rb_len_t len)
2342{
2343 rb_len_t capa;
2344 const int termlen = STRING_TERM_LEN(str);
2345
2346 if (len > (capa = (rb_len_t)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2347 rb_bug("probable buffer overflow: %"PRIdLEN" for %"PRIdLEN, len, capa);
2348 }
2349
2350 int cr = PARSER_ENC_CODERANGE(str);
2351 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2352 /* Leave unknown. */
2353 }
2354 else if (len > PARSER_STRING_LEN(str)) {
2355 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2356 }
2357 else if (len < PARSER_STRING_LEN(str)) {
2358 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2359 /* ASCII-only string is keeping after truncated. Valid
2360 * and broken may be invalid or valid, leave unknown. */
2361 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2362 }
2363 }
2364
2365 STRING_SET_LEN(str, len);
2366 STRING_TERM_FILL(str);
2367}
2368
2369static rb_parser_string_t *
2370rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, rb_len_t len)
2371{
2372 rb_parser_str_modify(str);
2373 if (len == 0) return 0;
2374
2375 rb_len_t total, olen, off = -1;
2376 char *sptr;
2377 const int termlen = STRING_TERM_LEN(str);
2378
2379 PARSER_STRING_GETMEM(str, sptr, olen);
2380 if (ptr >= sptr && ptr <= sptr + olen) {
2381 off = ptr - sptr;
2382 }
2383
2384 if (olen > RB_LEN_MAX - len) {
2385 compile_error(p, "string sizes too big");
2386 return 0;
2387 }
2388 total = olen + len;
2389 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2390 sptr = PARSER_STRING_PTR(str);
2391 if (off != -1) {
2392 ptr = sptr + off;
2393 }
2394 memcpy(sptr + olen, ptr, len);
2395 STRING_SET_LEN(str, total);
2396 STRING_TERM_FILL(str);
2397
2398 return str;
2399}
2400
2401#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2402#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2403
2404static rb_parser_string_t *
2405rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, rb_len_t len,
2406 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2407{
2408 int str_cr, res_cr;
2409 rb_encoding *str_enc, *res_enc;
2410
2411 str_enc = rb_parser_str_get_encoding(str);
2412 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2413
2414 if (str_enc == ptr_enc) {
2415 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2416 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2417 }
2418 }
2419 else {
2420 /* parser string encoding is always asciicompat */
2421 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2422 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2423 }
2424 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2425 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2426 str_cr = rb_parser_enc_str_coderange(p, str);
2427 }
2428 }
2429 }
2430 if (ptr_cr_ret)
2431 *ptr_cr_ret = ptr_cr;
2432
2433 if (str_enc != ptr_enc &&
2434 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2435 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2436 goto incompatible;
2437 }
2438
2439 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2440 res_enc = str_enc;
2441 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2442 }
2443 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2444 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2445 res_enc = str_enc;
2446 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2447 }
2448 else {
2449 res_enc = ptr_enc;
2450 res_cr = ptr_cr;
2451 }
2452 }
2453 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2454 res_enc = str_enc;
2455 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2456 res_cr = str_cr;
2457 else
2458 res_cr = ptr_cr;
2459 }
2460 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2461 res_enc = str_enc;
2462 res_cr = str_cr;
2463 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2464 }
2465
2466 if (len < 0) {
2467 compile_error(p, "negative string size (or size too big)");
2468 }
2469 parser_str_cat(str, ptr, len);
2470 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2471 return str;
2472
2473 incompatible:
2474 compile_error(p, "incompatible character encodings: %s and %s",
2475 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2476 UNREACHABLE_RETURN(0);
2477
2478}
2479
2480static rb_parser_string_t *
2481rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, rb_len_t len,
2482 rb_encoding *ptr_enc)
2483{
2484 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2485}
2486
2487static rb_parser_string_t *
2488rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2489{
2490 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2491
2492 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2493 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2494
2495 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2496
2497 return str;
2498}
2499
2500static rb_parser_string_t *
2501rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, rb_len_t len)
2502{
2503 if (len < 0) {
2504 rb_bug("negative string size (or size too big)");
2505 }
2506
2507 rb_len_t slen = PARSER_STRING_LEN(str);
2508
2509 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2510 PARSER_ENC_CODERANGE_CLEAR(str);
2511 }
2512
2513 {
2514 rb_len_t capa;
2515 const int termlen = STRING_TERM_LEN(str);
2516
2517 if ((capa = slen) < len) {
2518 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2519 }
2520 else if (len == slen) return str;
2521 STRING_SET_LEN(str, len);
2522 STRING_TERM_FILL(str);
2523 }
2524 return str;
2525}
2526
2527# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2528 ((ptrvar) = str->ptr, \
2529 (lenvar) = str->len, \
2530 (encvar) = str->enc)
2531
2532static int
2533rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2534{
2535 rb_len_t len1, len2;
2536 const char *ptr1, *ptr2;
2537 rb_encoding *enc1, *enc2;
2538
2539 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2540 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2541
2542 return (len1 != len2 ||
2543 enc1 != enc2 ||
2544 memcmp(ptr1, ptr2, len1) != 0);
2545}
2546
2547static void
2548rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2549{
2550 long i;
2551 if (ary->capa < len) {
2552 ary->capa = len;
2553 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2554 for (i = ary->len; i < len; i++) {
2555 ary->data[i] = 0;
2556 }
2557 }
2558}
2559
2560/*
2561 * Do not call this directly.
2562 * Use rb_parser_ary_new_capa_for_XXX() instead.
2563 */
2564static rb_parser_ary_t *
2565parser_ary_new_capa(rb_parser_t *p, long len)
2566{
2567 if (len < 0) {
2568 rb_bug("negative array size (or size too big): %ld", len);
2569 }
2570 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2571 ary->data_type = 0;
2572 ary->len = 0;
2573 ary->capa = len;
2574 if (0 < len) {
2575 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2576 }
2577 else {
2578 ary->data = NULL;
2579 }
2580 return ary;
2581}
2582
2583#ifndef RIPPER
2584static rb_parser_ary_t *
2585rb_parser_ary_new_capa_for_script_line(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_SCRIPT_LINE;
2589 return ary;
2590}
2591
2592static rb_parser_ary_t *
2593rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2594{
2595 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2596 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2597 return ary;
2598}
2599#endif
2600
2601static rb_parser_ary_t *
2602rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2603{
2604 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2605 ary->data_type = PARSER_ARY_DATA_NODE;
2606 return ary;
2607}
2608
2609/*
2610 * Do not call this directly.
2611 * Use rb_parser_ary_push_XXX() instead.
2612 */
2613static rb_parser_ary_t *
2614parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2615{
2616 if (ary->len == ary->capa) {
2617 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2618 }
2619 ary->data[ary->len++] = val;
2620 return ary;
2621}
2622
2623#ifndef RIPPER
2624static rb_parser_ary_t *
2625rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2626{
2627 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2628 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2629 }
2630 return parser_ary_push(p, ary, val);
2631}
2632
2633static rb_parser_ary_t *
2634rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2635{
2636 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2637 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2638 }
2639 return parser_ary_push(p, ary, val);
2640}
2641#endif
2642
2643static rb_parser_ary_t *
2644rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2645{
2646 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2647 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2648 }
2649 return parser_ary_push(p, ary, val);
2650}
2651
2652#ifndef RIPPER
2653static void
2654rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2655{
2656 if (!token) return;
2657 rb_parser_string_free(p, token->str);
2658 xfree(token);
2659}
2660
2661static void
2662rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2663{
2664# define foreach_ary(ptr) \
2665 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2666 ptr < end_ary_data; ptr++)
2667 switch (ary->data_type) {
2668 case PARSER_ARY_DATA_AST_TOKEN:
2669 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2670 break;
2671 case PARSER_ARY_DATA_SCRIPT_LINE:
2672 foreach_ary(data) {rb_parser_string_free(p, *data);}
2673 break;
2674 case PARSER_ARY_DATA_NODE:
2675 /* Do nothing because nodes are freed when rb_ast_t is freed */
2676 break;
2677 default:
2678 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2679 break;
2680 }
2681# undef foreach_ary
2682 xfree(ary->data);
2683 xfree(ary);
2684}
2685
2686#endif /* !RIPPER */
2687
2688#line 2689 "parse.c"
2689
2690# ifndef YY_CAST
2691# ifdef __cplusplus
2692# define YY_CAST(Type, Val) static_cast<Type> (Val)
2693# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2694# else
2695# define YY_CAST(Type, Val) ((Type) (Val))
2696# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2697# endif
2698# endif
2699# ifndef YY_NULLPTR
2700# if defined __cplusplus
2701# if 201103L <= __cplusplus
2702# define YY_NULLPTR nullptr
2703# else
2704# define YY_NULLPTR 0
2705# endif
2706# else
2707# define YY_NULLPTR ((void*)0)
2708# endif
2709# endif
2710
2711#include "parse.h"
2712/* Symbol kind. */
2713enum yysymbol_kind_t
2714{
2715 YYSYMBOL_YYEMPTY = -2,
2716 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2717 YYSYMBOL_YYerror = 1, /* error */
2718 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2719 YYSYMBOL_keyword_class = 3, /* "'class'" */
2720 YYSYMBOL_keyword_module = 4, /* "'module'" */
2721 YYSYMBOL_keyword_def = 5, /* "'def'" */
2722 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2723 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2724 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2725 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2726 YYSYMBOL_keyword_end = 10, /* "'end'" */
2727 YYSYMBOL_keyword_if = 11, /* "'if'" */
2728 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2729 YYSYMBOL_keyword_then = 13, /* "'then'" */
2730 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2731 YYSYMBOL_keyword_else = 15, /* "'else'" */
2732 YYSYMBOL_keyword_case = 16, /* "'case'" */
2733 YYSYMBOL_keyword_when = 17, /* "'when'" */
2734 YYSYMBOL_keyword_while = 18, /* "'while'" */
2735 YYSYMBOL_keyword_until = 19, /* "'until'" */
2736 YYSYMBOL_keyword_for = 20, /* "'for'" */
2737 YYSYMBOL_keyword_break = 21, /* "'break'" */
2738 YYSYMBOL_keyword_next = 22, /* "'next'" */
2739 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2740 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2741 YYSYMBOL_keyword_in = 25, /* "'in'" */
2742 YYSYMBOL_keyword_do = 26, /* "'do'" */
2743 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2744 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2745 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2746 YYSYMBOL_keyword_return = 30, /* "'return'" */
2747 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2748 YYSYMBOL_keyword_super = 32, /* "'super'" */
2749 YYSYMBOL_keyword_self = 33, /* "'self'" */
2750 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2751 YYSYMBOL_keyword_true = 35, /* "'true'" */
2752 YYSYMBOL_keyword_false = 36, /* "'false'" */
2753 YYSYMBOL_keyword_and = 37, /* "'and'" */
2754 YYSYMBOL_keyword_or = 38, /* "'or'" */
2755 YYSYMBOL_keyword_not = 39, /* "'not'" */
2756 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2757 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2758 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2759 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2760 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2761 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2762 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2763 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2764 YYSYMBOL_keyword_END = 48, /* "'END'" */
2765 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2766 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2767 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2768 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2769 YYSYMBOL_tFID = 53, /* "method" */
2770 YYSYMBOL_tGVAR = 54, /* "global variable" */
2771 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2772 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2773 YYSYMBOL_tCVAR = 57, /* "class variable" */
2774 YYSYMBOL_tLABEL = 58, /* "label" */
2775 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2776 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2777 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2778 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2779 YYSYMBOL_tCHAR = 63, /* "char literal" */
2780 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2781 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2782 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2783 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2784 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2785 YYSYMBOL_69_ = 69, /* '.' */
2786 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2787 YYSYMBOL_tSP = 71, /* "escaped space" */
2788 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2789 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2790 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2791 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2792 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2793 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2794 YYSYMBOL_tPOW = 78, /* "**" */
2795 YYSYMBOL_tCMP = 79, /* "<=>" */
2796 YYSYMBOL_tEQ = 80, /* "==" */
2797 YYSYMBOL_tEQQ = 81, /* "===" */
2798 YYSYMBOL_tNEQ = 82, /* "!=" */
2799 YYSYMBOL_tGEQ = 83, /* ">=" */
2800 YYSYMBOL_tLEQ = 84, /* "<=" */
2801 YYSYMBOL_tANDOP = 85, /* "&&" */
2802 YYSYMBOL_tOROP = 86, /* "||" */
2803 YYSYMBOL_tMATCH = 87, /* "=~" */
2804 YYSYMBOL_tNMATCH = 88, /* "!~" */
2805 YYSYMBOL_tDOT2 = 89, /* ".." */
2806 YYSYMBOL_tDOT3 = 90, /* "..." */
2807 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2808 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2809 YYSYMBOL_tAREF = 93, /* "[]" */
2810 YYSYMBOL_tASET = 94, /* "[]=" */
2811 YYSYMBOL_tLSHFT = 95, /* "<<" */
2812 YYSYMBOL_tRSHFT = 96, /* ">>" */
2813 YYSYMBOL_tANDDOT = 97, /* "&." */
2814 YYSYMBOL_tCOLON2 = 98, /* "::" */
2815 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2816 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2817 YYSYMBOL_tASSOC = 101, /* "=>" */
2818 YYSYMBOL_tLPAREN = 102, /* "(" */
2819 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2820 YYSYMBOL_tLBRACK = 104, /* "[" */
2821 YYSYMBOL_tLBRACE = 105, /* "{" */
2822 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2823 YYSYMBOL_tSTAR = 107, /* "*" */
2824 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2825 YYSYMBOL_tAMPER = 109, /* "&" */
2826 YYSYMBOL_tLAMBDA = 110, /* "->" */
2827 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2828 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2829 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2830 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2831 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2832 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2833 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2834 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2835 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2836 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2837 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2838 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2839 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2840 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2841 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2842 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2843 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2844 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2845 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2846 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2847 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2848 YYSYMBOL_k__END__ = 132, /* k__END__ */
2849 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2850 YYSYMBOL_134_ = 134, /* '=' */
2851 YYSYMBOL_135_ = 135, /* '?' */
2852 YYSYMBOL_136_ = 136, /* ':' */
2853 YYSYMBOL_137_ = 137, /* '>' */
2854 YYSYMBOL_138_ = 138, /* '<' */
2855 YYSYMBOL_139_ = 139, /* '|' */
2856 YYSYMBOL_140_ = 140, /* '^' */
2857 YYSYMBOL_141_ = 141, /* '&' */
2858 YYSYMBOL_142_ = 142, /* '+' */
2859 YYSYMBOL_143_ = 143, /* '-' */
2860 YYSYMBOL_144_ = 144, /* '*' */
2861 YYSYMBOL_145_ = 145, /* '/' */
2862 YYSYMBOL_146_ = 146, /* '%' */
2863 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2864 YYSYMBOL_148_ = 148, /* '!' */
2865 YYSYMBOL_149_ = 149, /* '~' */
2866 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2867 YYSYMBOL_151_ = 151, /* '{' */
2868 YYSYMBOL_152_ = 152, /* '}' */
2869 YYSYMBOL_153_ = 153, /* '[' */
2870 YYSYMBOL_154_n_ = 154, /* '\n' */
2871 YYSYMBOL_155_ = 155, /* ',' */
2872 YYSYMBOL_156_ = 156, /* '`' */
2873 YYSYMBOL_157_ = 157, /* '(' */
2874 YYSYMBOL_158_ = 158, /* ')' */
2875 YYSYMBOL_159_ = 159, /* ']' */
2876 YYSYMBOL_160_ = 160, /* ';' */
2877 YYSYMBOL_161_ = 161, /* ' ' */
2878 YYSYMBOL_YYACCEPT = 162, /* $accept */
2879 YYSYMBOL_option_terms = 163, /* option_terms */
2880 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2881 YYSYMBOL_165_1 = 165, /* $@1 */
2882 YYSYMBOL_program = 166, /* program */
2883 YYSYMBOL_top_stmts = 167, /* top_stmts */
2884 YYSYMBOL_top_stmt = 168, /* top_stmt */
2885 YYSYMBOL_block_open = 169, /* block_open */
2886 YYSYMBOL_begin_block = 170, /* begin_block */
2887 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2888 YYSYMBOL_172_2 = 172, /* $@2 */
2889 YYSYMBOL_173_3 = 173, /* $@3 */
2890 YYSYMBOL_bodystmt = 174, /* bodystmt */
2891 YYSYMBOL_175_4 = 175, /* $@4 */
2892 YYSYMBOL_stmts = 176, /* stmts */
2893 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2894 YYSYMBOL_178_5 = 178, /* $@5 */
2895 YYSYMBOL_allow_exits = 179, /* allow_exits */
2896 YYSYMBOL_k_END = 180, /* k_END */
2897 YYSYMBOL_181_6 = 181, /* $@6 */
2898 YYSYMBOL_stmt = 182, /* stmt */
2899 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2900 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2901 YYSYMBOL_command_asgn = 185, /* command_asgn */
2902 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2903 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2904 YYSYMBOL_endless_command = 188, /* endless_command */
2905 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2906 YYSYMBOL_command_rhs = 190, /* command_rhs */
2907 YYSYMBOL_expr = 191, /* expr */
2908 YYSYMBOL_192_7 = 192, /* $@7 */
2909 YYSYMBOL_193_8 = 193, /* $@8 */
2910 YYSYMBOL_def_name = 194, /* def_name */
2911 YYSYMBOL_defn_head = 195, /* defn_head */
2912 YYSYMBOL_196_9 = 196, /* $@9 */
2913 YYSYMBOL_defs_head = 197, /* defs_head */
2914 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2915 YYSYMBOL_expr_value = 199, /* expr_value */
2916 YYSYMBOL_200_10 = 200, /* $@10 */
2917 YYSYMBOL_201_11 = 201, /* $@11 */
2918 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2919 YYSYMBOL_command_call = 203, /* command_call */
2920 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2921 YYSYMBOL_command_call_value = 205, /* command_call_value */
2922 YYSYMBOL_block_command = 206, /* block_command */
2923 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2924 YYSYMBOL_fcall = 208, /* fcall */
2925 YYSYMBOL_command = 209, /* command */
2926 YYSYMBOL_mlhs = 210, /* mlhs */
2927 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2928 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2929 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2930 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2931 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2932 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2933 YYSYMBOL_lhs = 217, /* lhs */
2934 YYSYMBOL_cname = 218, /* cname */
2935 YYSYMBOL_cpath = 219, /* cpath */
2936 YYSYMBOL_fname = 220, /* fname */
2937 YYSYMBOL_fitem = 221, /* fitem */
2938 YYSYMBOL_undef_list = 222, /* undef_list */
2939 YYSYMBOL_223_12 = 223, /* $@12 */
2940 YYSYMBOL_op = 224, /* op */
2941 YYSYMBOL_reswords = 225, /* reswords */
2942 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2943 YYSYMBOL_arg = 227, /* arg */
2944 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2945 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2946 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2947 YYSYMBOL_ternary = 231, /* ternary */
2948 YYSYMBOL_endless_arg = 232, /* endless_arg */
2949 YYSYMBOL_relop = 233, /* relop */
2950 YYSYMBOL_rel_expr = 234, /* rel_expr */
2951 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2952 YYSYMBOL_begin_defined = 236, /* begin_defined */
2953 YYSYMBOL_after_rescue = 237, /* after_rescue */
2954 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2955 YYSYMBOL_arg_value = 239, /* arg_value */
2956 YYSYMBOL_aref_args = 240, /* aref_args */
2957 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2958 YYSYMBOL_paren_args = 242, /* paren_args */
2959 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2960 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2961 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2962 YYSYMBOL_call_args = 246, /* call_args */
2963 YYSYMBOL_247_13 = 247, /* $@13 */
2964 YYSYMBOL_command_args = 248, /* command_args */
2965 YYSYMBOL_block_arg = 249, /* block_arg */
2966 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2967 YYSYMBOL_args = 251, /* args */
2968 YYSYMBOL_arg_splat = 252, /* arg_splat */
2969 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2970 YYSYMBOL_mrhs = 254, /* mrhs */
2971 YYSYMBOL_primary = 255, /* primary */
2972 YYSYMBOL_256_14 = 256, /* $@14 */
2973 YYSYMBOL_257_15 = 257, /* $@15 */
2974 YYSYMBOL_258_16 = 258, /* @16 */
2975 YYSYMBOL_259_17 = 259, /* @17 */
2976 YYSYMBOL_260_18 = 260, /* $@18 */
2977 YYSYMBOL_261_19 = 261, /* $@19 */
2978 YYSYMBOL_262_20 = 262, /* $@20 */
2979 YYSYMBOL_263_21 = 263, /* $@21 */
2980 YYSYMBOL_264_22 = 264, /* $@22 */
2981 YYSYMBOL_265_23 = 265, /* $@23 */
2982 YYSYMBOL_266_24 = 266, /* $@24 */
2983 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2984 YYSYMBOL_primary_value = 268, /* primary_value */
2985 YYSYMBOL_k_begin = 269, /* k_begin */
2986 YYSYMBOL_k_if = 270, /* k_if */
2987 YYSYMBOL_k_unless = 271, /* k_unless */
2988 YYSYMBOL_k_while = 272, /* k_while */
2989 YYSYMBOL_k_until = 273, /* k_until */
2990 YYSYMBOL_k_case = 274, /* k_case */
2991 YYSYMBOL_k_for = 275, /* k_for */
2992 YYSYMBOL_k_class = 276, /* k_class */
2993 YYSYMBOL_k_module = 277, /* k_module */
2994 YYSYMBOL_k_def = 278, /* k_def */
2995 YYSYMBOL_k_do = 279, /* k_do */
2996 YYSYMBOL_k_do_block = 280, /* k_do_block */
2997 YYSYMBOL_k_rescue = 281, /* k_rescue */
2998 YYSYMBOL_k_ensure = 282, /* k_ensure */
2999 YYSYMBOL_k_when = 283, /* k_when */
3000 YYSYMBOL_k_else = 284, /* k_else */
3001 YYSYMBOL_k_elsif = 285, /* k_elsif */
3002 YYSYMBOL_k_end = 286, /* k_end */
3003 YYSYMBOL_k_return = 287, /* k_return */
3004 YYSYMBOL_k_return_arg = 288, /* k_return_arg */
3005 YYSYMBOL_k_break_arg = 289, /* k_break_arg */
3006 YYSYMBOL_k_next_arg = 290, /* k_next_arg */
3007 YYSYMBOL_k_yield = 291, /* k_yield */
3008 YYSYMBOL_then = 292, /* then */
3009 YYSYMBOL_do = 293, /* do */
3010 YYSYMBOL_if_tail = 294, /* if_tail */
3011 YYSYMBOL_opt_else = 295, /* opt_else */
3012 YYSYMBOL_for_var = 296, /* for_var */
3013 YYSYMBOL_f_marg = 297, /* f_marg */
3014 YYSYMBOL_mlhs_items_f_marg = 298, /* mlhs_items_f_marg */
3015 YYSYMBOL_f_margs = 299, /* f_margs */
3016 YYSYMBOL_f_rest_marg = 300, /* f_rest_marg */
3017 YYSYMBOL_f_any_kwrest = 301, /* f_any_kwrest */
3018 YYSYMBOL_302_25 = 302, /* $@25 */
3019 YYSYMBOL_f_eq = 303, /* f_eq */
3020 YYSYMBOL_f_kw_primary_value = 304, /* f_kw_primary_value */
3021 YYSYMBOL_f_kwarg_primary_value = 305, /* f_kwarg_primary_value */
3022 YYSYMBOL_opt_f_block_arg_none = 306, /* opt_f_block_arg_none */
3023 YYSYMBOL_args_tail_basic_primary_value_none = 307, /* args_tail_basic_primary_value_none */
3024 YYSYMBOL_block_args_tail = 308, /* block_args_tail */
3025 YYSYMBOL_excessed_comma = 309, /* excessed_comma */
3026 YYSYMBOL_f_opt_primary_value = 310, /* f_opt_primary_value */
3027 YYSYMBOL_f_opt_arg_primary_value = 311, /* f_opt_arg_primary_value */
3028 YYSYMBOL_opt_args_tail_block_args_tail_none = 312, /* opt_args_tail_block_args_tail_none */
3029 YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none = 313, /* args-list_primary_value_opt_args_tail_block_args_tail_none */
3030 YYSYMBOL_block_param = 314, /* block_param */
3031 YYSYMBOL_tail_only_args_block_args_tail = 315, /* tail-only-args_block_args_tail */
3032 YYSYMBOL_opt_block_param_def = 316, /* opt_block_param_def */
3033 YYSYMBOL_block_param_def = 317, /* block_param_def */
3034 YYSYMBOL_opt_block_param = 318, /* opt_block_param */
3035 YYSYMBOL_opt_bv_decl = 319, /* opt_bv_decl */
3036 YYSYMBOL_bv_decls = 320, /* bv_decls */
3037 YYSYMBOL_bvar = 321, /* bvar */
3038 YYSYMBOL_max_numparam = 322, /* max_numparam */
3039 YYSYMBOL_numparam = 323, /* numparam */
3040 YYSYMBOL_it_id = 324, /* it_id */
3041 YYSYMBOL_325_26 = 325, /* @26 */
3042 YYSYMBOL_326_27 = 326, /* $@27 */
3043 YYSYMBOL_lambda = 327, /* lambda */
3044 YYSYMBOL_f_larglist = 328, /* f_larglist */
3045 YYSYMBOL_lambda_body = 329, /* lambda_body */
3046 YYSYMBOL_330_28 = 330, /* $@28 */
3047 YYSYMBOL_do_block = 331, /* do_block */
3048 YYSYMBOL_block_call = 332, /* block_call */
3049 YYSYMBOL_method_call = 333, /* method_call */
3050 YYSYMBOL_brace_block = 334, /* brace_block */
3051 YYSYMBOL_335_29 = 335, /* @29 */
3052 YYSYMBOL_brace_body = 336, /* brace_body */
3053 YYSYMBOL_337_30 = 337, /* @30 */
3054 YYSYMBOL_do_body = 338, /* do_body */
3055 YYSYMBOL_case_args = 339, /* case_args */
3056 YYSYMBOL_case_body = 340, /* case_body */
3057 YYSYMBOL_cases = 341, /* cases */
3058 YYSYMBOL_p_pvtbl = 342, /* p_pvtbl */
3059 YYSYMBOL_p_pktbl = 343, /* p_pktbl */
3060 YYSYMBOL_p_in_kwarg = 344, /* p_in_kwarg */
3061 YYSYMBOL_345_31 = 345, /* $@31 */
3062 YYSYMBOL_p_case_body = 346, /* p_case_body */
3063 YYSYMBOL_p_cases = 347, /* p_cases */
3064 YYSYMBOL_p_top_expr = 348, /* p_top_expr */
3065 YYSYMBOL_p_top_expr_body = 349, /* p_top_expr_body */
3066 YYSYMBOL_p_expr = 350, /* p_expr */
3067 YYSYMBOL_p_as = 351, /* p_as */
3068 YYSYMBOL_p_alt = 352, /* p_alt */
3069 YYSYMBOL_p_alt_begin = 353, /* p_alt_begin */
3070 YYSYMBOL_p_lparen = 354, /* p_lparen */
3071 YYSYMBOL_p_lbracket = 355, /* p_lbracket */
3072 YYSYMBOL_p_expr_basic = 356, /* p_expr_basic */
3073 YYSYMBOL_357_32 = 357, /* $@32 */
3074 YYSYMBOL_p_args = 358, /* p_args */
3075 YYSYMBOL_p_args_head = 359, /* p_args_head */
3076 YYSYMBOL_p_args_tail = 360, /* p_args_tail */
3077 YYSYMBOL_p_find = 361, /* p_find */
3078 YYSYMBOL_p_rest = 362, /* p_rest */
3079 YYSYMBOL_p_args_post = 363, /* p_args_post */
3080 YYSYMBOL_p_arg = 364, /* p_arg */
3081 YYSYMBOL_p_kwargs = 365, /* p_kwargs */
3082 YYSYMBOL_p_kwarg = 366, /* p_kwarg */
3083 YYSYMBOL_p_kw = 367, /* p_kw */
3084 YYSYMBOL_p_kw_label = 368, /* p_kw_label */
3085 YYSYMBOL_p_kwrest = 369, /* p_kwrest */
3086 YYSYMBOL_p_kwnorest = 370, /* p_kwnorest */
3087 YYSYMBOL_p_any_kwrest = 371, /* p_any_kwrest */
3088 YYSYMBOL_p_value = 372, /* p_value */
3089 YYSYMBOL_range_expr_p_primitive = 373, /* range_expr_p_primitive */
3090 YYSYMBOL_p_primitive = 374, /* p_primitive */
3091 YYSYMBOL_p_variable = 375, /* p_variable */
3092 YYSYMBOL_p_var_ref = 376, /* p_var_ref */
3093 YYSYMBOL_p_expr_ref = 377, /* p_expr_ref */
3094 YYSYMBOL_p_const = 378, /* p_const */
3095 YYSYMBOL_opt_rescue = 379, /* opt_rescue */
3096 YYSYMBOL_exc_list = 380, /* exc_list */
3097 YYSYMBOL_exc_var = 381, /* exc_var */
3098 YYSYMBOL_opt_ensure = 382, /* opt_ensure */
3099 YYSYMBOL_literal = 383, /* literal */
3100 YYSYMBOL_strings = 384, /* strings */
3101 YYSYMBOL_string = 385, /* string */
3102 YYSYMBOL_string1 = 386, /* string1 */
3103 YYSYMBOL_xstring = 387, /* xstring */
3104 YYSYMBOL_regexp = 388, /* regexp */
3105 YYSYMBOL_nonempty_list__ = 389, /* nonempty_list_' ' */
3106 YYSYMBOL_words_tWORDS_BEG_word_list = 390, /* words_tWORDS_BEG_word_list */
3107 YYSYMBOL_words = 391, /* words */
3108 YYSYMBOL_word_list = 392, /* word_list */
3109 YYSYMBOL_word = 393, /* word */
3110 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 394, /* words_tSYMBOLS_BEG_symbol_list */
3111 YYSYMBOL_symbols = 395, /* symbols */
3112 YYSYMBOL_symbol_list = 396, /* symbol_list */
3113 YYSYMBOL_words_tQWORDS_BEG_qword_list = 397, /* words_tQWORDS_BEG_qword_list */
3114 YYSYMBOL_qwords = 398, /* qwords */
3115 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 399, /* words_tQSYMBOLS_BEG_qsym_list */
3116 YYSYMBOL_qsymbols = 400, /* qsymbols */
3117 YYSYMBOL_qword_list = 401, /* qword_list */
3118 YYSYMBOL_qsym_list = 402, /* qsym_list */
3119 YYSYMBOL_string_contents = 403, /* string_contents */
3120 YYSYMBOL_xstring_contents = 404, /* xstring_contents */
3121 YYSYMBOL_regexp_contents = 405, /* regexp_contents */
3122 YYSYMBOL_string_content = 406, /* string_content */
3123 YYSYMBOL_407_33 = 407, /* @33 */
3124 YYSYMBOL_408_34 = 408, /* @34 */
3125 YYSYMBOL_409_35 = 409, /* @35 */
3126 YYSYMBOL_410_36 = 410, /* @36 */
3127 YYSYMBOL_411_37 = 411, /* @37 */
3128 YYSYMBOL_string_dend = 412, /* string_dend */
3129 YYSYMBOL_string_dvar = 413, /* string_dvar */
3130 YYSYMBOL_symbol = 414, /* symbol */
3131 YYSYMBOL_ssym = 415, /* ssym */
3132 YYSYMBOL_sym = 416, /* sym */
3133 YYSYMBOL_dsym = 417, /* dsym */
3134 YYSYMBOL_numeric = 418, /* numeric */
3135 YYSYMBOL_simple_numeric = 419, /* simple_numeric */
3136 YYSYMBOL_nonlocal_var = 420, /* nonlocal_var */
3137 YYSYMBOL_user_variable = 421, /* user_variable */
3138 YYSYMBOL_keyword_variable = 422, /* keyword_variable */
3139 YYSYMBOL_var_ref = 423, /* var_ref */
3140 YYSYMBOL_var_lhs = 424, /* var_lhs */
3141 YYSYMBOL_backref = 425, /* backref */
3142 YYSYMBOL_426_38 = 426, /* $@38 */
3143 YYSYMBOL_superclass = 427, /* superclass */
3144 YYSYMBOL_f_opt_paren_args = 428, /* f_opt_paren_args */
3145 YYSYMBOL_f_empty_arg = 429, /* f_empty_arg */
3146 YYSYMBOL_f_paren_args = 430, /* f_paren_args */
3147 YYSYMBOL_f_arglist = 431, /* f_arglist */
3148 YYSYMBOL_432_39 = 432, /* @39 */
3149 YYSYMBOL_f_kw_arg_value = 433, /* f_kw_arg_value */
3150 YYSYMBOL_f_kwarg_arg_value = 434, /* f_kwarg_arg_value */
3151 YYSYMBOL_opt_f_block_arg_opt_comma = 435, /* opt_f_block_arg_opt_comma */
3152 YYSYMBOL_args_tail_basic_arg_value_opt_comma = 436, /* args_tail_basic_arg_value_opt_comma */
3153 YYSYMBOL_args_tail = 437, /* args_tail */
3154 YYSYMBOL_args_tail_basic_arg_value_none = 438, /* args_tail_basic_arg_value_none */
3155 YYSYMBOL_largs_tail = 439, /* largs_tail */
3156 YYSYMBOL_f_opt_arg_value = 440, /* f_opt_arg_value */
3157 YYSYMBOL_f_opt_arg_arg_value = 441, /* f_opt_arg_arg_value */
3158 YYSYMBOL_opt_args_tail_args_tail_opt_comma = 442, /* opt_args_tail_args_tail_opt_comma */
3159 YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma = 443, /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
3160 YYSYMBOL_f_args_list_args_tail_opt_comma = 444, /* f_args-list_args_tail_opt_comma */
3161 YYSYMBOL_tail_only_args_args_tail = 445, /* tail-only-args_args_tail */
3162 YYSYMBOL_f_args = 446, /* f_args */
3163 YYSYMBOL_opt_args_tail_largs_tail_none = 447, /* opt_args_tail_largs_tail_none */
3164 YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none = 448, /* args-list_arg_value_opt_args_tail_largs_tail_none */
3165 YYSYMBOL_f_args_list_largs_tail_none = 449, /* f_args-list_largs_tail_none */
3166 YYSYMBOL_tail_only_args_largs_tail = 450, /* tail-only-args_largs_tail */
3167 YYSYMBOL_f_largs = 451, /* f_largs */
3168 YYSYMBOL_args_forward = 452, /* args_forward */
3169 YYSYMBOL_f_bad_arg = 453, /* f_bad_arg */
3170 YYSYMBOL_f_norm_arg = 454, /* f_norm_arg */
3171 YYSYMBOL_f_arg_asgn = 455, /* f_arg_asgn */
3172 YYSYMBOL_f_arg_item = 456, /* f_arg_item */
3173 YYSYMBOL_f_arg = 457, /* f_arg */
3174 YYSYMBOL_f_label = 458, /* f_label */
3175 YYSYMBOL_kwrest_mark = 459, /* kwrest_mark */
3176 YYSYMBOL_f_no_kwarg = 460, /* f_no_kwarg */
3177 YYSYMBOL_f_kwrest = 461, /* f_kwrest */
3178 YYSYMBOL_restarg_mark = 462, /* restarg_mark */
3179 YYSYMBOL_f_rest_arg = 463, /* f_rest_arg */
3180 YYSYMBOL_blkarg_mark = 464, /* blkarg_mark */
3181 YYSYMBOL_f_block_arg = 465, /* f_block_arg */
3182 YYSYMBOL_option__ = 466, /* option_',' */
3183 YYSYMBOL_opt_comma = 467, /* opt_comma */
3184 YYSYMBOL_value_expr_singleton_expr = 468, /* value_expr_singleton_expr */
3185 YYSYMBOL_singleton = 469, /* singleton */
3186 YYSYMBOL_singleton_expr = 470, /* singleton_expr */
3187 YYSYMBOL_471_40 = 471, /* $@40 */
3188 YYSYMBOL_assoc_list = 472, /* assoc_list */
3189 YYSYMBOL_assocs = 473, /* assocs */
3190 YYSYMBOL_assoc = 474, /* assoc */
3191 YYSYMBOL_operation2 = 475, /* operation2 */
3192 YYSYMBOL_operation3 = 476, /* operation3 */
3193 YYSYMBOL_dot_or_colon = 477, /* dot_or_colon */
3194 YYSYMBOL_call_op = 478, /* call_op */
3195 YYSYMBOL_call_op2 = 479, /* call_op2 */
3196 YYSYMBOL_rparen = 480, /* rparen */
3197 YYSYMBOL_rbracket = 481, /* rbracket */
3198 YYSYMBOL_rbrace = 482, /* rbrace */
3199 YYSYMBOL_trailer = 483, /* trailer */
3200 YYSYMBOL_term = 484, /* term */
3201 YYSYMBOL_terms = 485, /* terms */
3202 YYSYMBOL_none = 486 /* none */
3203};
3204typedef enum yysymbol_kind_t yysymbol_kind_t;
3205
3206
3207
3208
3209#ifdef short
3210# undef short
3211#endif
3212
3213/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3214 <limits.h> and (if available) <stdint.h> are included
3215 so that the code can choose integer types of a good width. */
3216
3217#ifndef __PTRDIFF_MAX__
3218# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3219# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3220# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3221# define YY_STDINT_H
3222# endif
3223#endif
3224
3225/* Narrow types that promote to a signed type and that can represent a
3226 signed or unsigned integer of at least N bits. In tables they can
3227 save space and decrease cache pressure. Promoting to a signed type
3228 helps avoid bugs in integer arithmetic. */
3229
3230#ifdef __INT_LEAST8_MAX__
3231typedef __INT_LEAST8_TYPE__ yytype_int8;
3232#elif defined YY_STDINT_H
3233typedef int_least8_t yytype_int8;
3234#else
3235typedef signed char yytype_int8;
3236#endif
3237
3238#ifdef __INT_LEAST16_MAX__
3239typedef __INT_LEAST16_TYPE__ yytype_int16;
3240#elif defined YY_STDINT_H
3241typedef int_least16_t yytype_int16;
3242#else
3243typedef short yytype_int16;
3244#endif
3245
3246/* Work around bug in HP-UX 11.23, which defines these macros
3247 incorrectly for preprocessor constants. This workaround can likely
3248 be removed in 2023, as HPE has promised support for HP-UX 11.23
3249 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3250 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3251#ifdef __hpux
3252# undef UINT_LEAST8_MAX
3253# undef UINT_LEAST16_MAX
3254# define UINT_LEAST8_MAX 255
3255# define UINT_LEAST16_MAX 65535
3256#endif
3257
3258#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3259typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3260#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3261 && UINT_LEAST8_MAX <= INT_MAX)
3262typedef uint_least8_t yytype_uint8;
3263#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3264typedef unsigned char yytype_uint8;
3265#else
3266typedef short yytype_uint8;
3267#endif
3268
3269#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3270typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3271#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3272 && UINT_LEAST16_MAX <= INT_MAX)
3273typedef uint_least16_t yytype_uint16;
3274#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3275typedef unsigned short yytype_uint16;
3276#else
3277typedef int yytype_uint16;
3278#endif
3279
3280#ifndef YYPTRDIFF_T
3281# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3282# define YYPTRDIFF_T __PTRDIFF_TYPE__
3283# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3284# elif defined PTRDIFF_MAX
3285# ifndef ptrdiff_t
3286# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3287# endif
3288# define YYPTRDIFF_T ptrdiff_t
3289# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3290# else
3291# define YYPTRDIFF_T long
3292# define YYPTRDIFF_MAXIMUM LONG_MAX
3293# endif
3294#endif
3295
3296#ifndef YYSIZE_T
3297# ifdef __SIZE_TYPE__
3298# define YYSIZE_T __SIZE_TYPE__
3299# elif defined size_t
3300# define YYSIZE_T size_t
3301# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3302# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3303# define YYSIZE_T size_t
3304# else
3305# define YYSIZE_T unsigned
3306# endif
3307#endif
3308
3309#define YYSIZE_MAXIMUM \
3310 YY_CAST (YYPTRDIFF_T, \
3311 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3312 ? YYPTRDIFF_MAXIMUM \
3313 : YY_CAST (YYSIZE_T, -1)))
3314
3315#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3316
3317
3318/* Stored state numbers (used for stacks). */
3319typedef yytype_int16 yy_state_t;
3320
3321/* State numbers in computations. */
3322typedef int yy_state_fast_t;
3323
3324#ifndef YY_
3325# if defined YYENABLE_NLS && YYENABLE_NLS
3326# if ENABLE_NLS
3327# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3328# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3329# endif
3330# endif
3331# ifndef YY_
3332# define YY_(Msgid) Msgid
3333# endif
3334#endif
3335
3336
3337#ifndef YY_ATTRIBUTE_PURE
3338# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3339# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3340# else
3341# define YY_ATTRIBUTE_PURE
3342# endif
3343#endif
3344
3345#ifndef YY_ATTRIBUTE_UNUSED
3346# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3347# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3348# else
3349# define YY_ATTRIBUTE_UNUSED
3350# endif
3351#endif
3352
3353/* Suppress unused-variable warnings by "using" E. */
3354#if ! defined lint || defined __GNUC__
3355# define YY_USE(E) ((void) (E))
3356#else
3357# define YY_USE(E) /* empty */
3358#endif
3359
3360/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3361#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3362# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3363# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3364 _Pragma ("GCC diagnostic push") \
3365 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3366# else
3367# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3368 _Pragma ("GCC diagnostic push") \
3369 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3370 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3371# endif
3372# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3373 _Pragma ("GCC diagnostic pop")
3374#else
3375# define YY_INITIAL_VALUE(Value) Value
3376#endif
3377#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3378# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3379# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3380#endif
3381#ifndef YY_INITIAL_VALUE
3382# define YY_INITIAL_VALUE(Value) /* Nothing. */
3383#endif
3384
3385#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3386# define YY_IGNORE_USELESS_CAST_BEGIN \
3387 _Pragma ("GCC diagnostic push") \
3388 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3389# define YY_IGNORE_USELESS_CAST_END \
3390 _Pragma ("GCC diagnostic pop")
3391#endif
3392#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3393# define YY_IGNORE_USELESS_CAST_BEGIN
3394# define YY_IGNORE_USELESS_CAST_END
3395#endif
3396
3397
3398#define YY_ASSERT(E) ((void) (0 && (E)))
3399
3400#if 1
3401
3402/* The parser invokes alloca or malloc; define the necessary symbols. */
3403
3404# ifdef YYSTACK_USE_ALLOCA
3405# if YYSTACK_USE_ALLOCA
3406# ifdef __GNUC__
3407# define YYSTACK_ALLOC __builtin_alloca
3408# elif defined __BUILTIN_VA_ARG_INCR
3409# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3410# elif defined _AIX
3411# define YYSTACK_ALLOC __alloca
3412# elif defined _MSC_VER
3413# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3414# define alloca _alloca
3415# else
3416# define YYSTACK_ALLOC alloca
3417# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3418# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3419 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3420# ifndef EXIT_SUCCESS
3421# define EXIT_SUCCESS 0
3422# endif
3423# endif
3424# endif
3425# endif
3426# endif
3427
3428# ifdef YYSTACK_ALLOC
3429 /* Pacify GCC's 'empty if-body' warning. */
3430# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3431# ifndef YYSTACK_ALLOC_MAXIMUM
3432 /* The OS might guarantee only one guard page at the bottom of the stack,
3433 and a page size can be as small as 4096 bytes. So we cannot safely
3434 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3435 to allow for a few compiler-allocated temporary stack slots. */
3436# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3437# endif
3438# else
3439# define YYSTACK_ALLOC YYMALLOC
3440# define YYSTACK_FREE YYFREE
3441# ifndef YYSTACK_ALLOC_MAXIMUM
3442# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3443# endif
3444# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3445 && ! ((defined YYMALLOC || defined malloc) \
3446 && (defined YYFREE || defined free)))
3447# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3448# ifndef EXIT_SUCCESS
3449# define EXIT_SUCCESS 0
3450# endif
3451# endif
3452# ifndef YYMALLOC
3453# define YYMALLOC malloc
3454# if ! defined malloc && ! defined EXIT_SUCCESS
3455void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3456# endif
3457# endif
3458# ifndef YYFREE
3459# define YYFREE free
3460# if ! defined free && ! defined EXIT_SUCCESS
3461void free (void *); /* INFRINGES ON USER NAME SPACE */
3462# endif
3463# endif
3464# endif
3465#endif /* 1 */
3466
3467#if (! defined yyoverflow \
3468 && (! defined __cplusplus \
3469 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3470 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3471
3472/* A type that is properly aligned for any stack member. */
3473union yyalloc
3474{
3475 yy_state_t yyss_alloc;
3476 YYSTYPE yyvs_alloc;
3477 YYLTYPE yyls_alloc;
3478};
3479
3480/* The size of the maximum gap between one aligned stack and the next. */
3481# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3482
3483/* The size of an array large to enough to hold all stacks, each with
3484 N elements. */
3485# define YYSTACK_BYTES(N) \
3486 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3487 + YYSIZEOF (YYLTYPE)) \
3488 + 2 * YYSTACK_GAP_MAXIMUM)
3489
3490# define YYCOPY_NEEDED 1
3491
3492/* Relocate STACK from its old location to the new one. The
3493 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3494 elements in the stack, and YYPTR gives the new location of the
3495 stack. Advance YYPTR to a properly aligned location for the next
3496 stack. */
3497# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3498 do \
3499 { \
3500 YYPTRDIFF_T yynewbytes; \
3501 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3502 Stack = &yyptr->Stack_alloc; \
3503 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3504 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3505 } \
3506 while (0)
3507
3508#endif
3509
3510#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3511/* Copy COUNT objects from SRC to DST. The source and destination do
3512 not overlap. */
3513# ifndef YYCOPY
3514# if defined __GNUC__ && 1 < __GNUC__
3515# define YYCOPY(Dst, Src, Count) \
3516 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3517# else
3518# define YYCOPY(Dst, Src, Count) \
3519 do \
3520 { \
3521 YYPTRDIFF_T yyi; \
3522 for (yyi = 0; yyi < (Count); yyi++) \
3523 (Dst)[yyi] = (Src)[yyi]; \
3524 } \
3525 while (0)
3526# endif
3527# endif
3528#endif /* !YYCOPY_NEEDED */
3529
3530/* YYFINAL -- State number of the termination state. */
3531#define YYFINAL 146
3532/* YYLAST -- Last index in YYTABLE. */
3533#define YYLAST 17051
3534
3535/* YYNTOKENS -- Number of terminals. */
3536#define YYNTOKENS 162
3537/* YYNNTS -- Number of nonterminals. */
3538#define YYNNTS 325
3539/* YYNRULES -- Number of rules. */
3540#define YYNRULES 857
3541/* YYNSTATES -- Number of states. */
3542#define YYNSTATES 1445
3543
3544/* YYMAXUTOK -- Last valid token kind. */
3545#define YYMAXUTOK 361
3546
3547
3548/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3549 as returned by yylex, with out-of-bounds checking. */
3550#define YYTRANSLATE(YYX) \
3551 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3552 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3553 : YYSYMBOL_YYUNDEF)
3554
3555/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3556 as returned by yylex. */
3557static const yytype_uint8 yytranslate[] =
3558{
3559 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3560 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3562 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3563 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3564 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3565 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3568 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3571 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3572 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3573 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3574 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3575 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3581 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3584 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3585 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3586 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3587 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3588 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3589 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3590 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3591 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3592 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3593 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3594 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3595 147, 150
3596};
3597
3598#if YYDEBUG
3599/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3600static const yytype_int16 yyrline[] =
3601{
3602 0, 3193, 3187, 3193, 3193, 3193, 3193, 3213, 3218, 3223,
3603 3230, 3235, 3242, 3244, 3262, 3258, 3263, 3262, 3274, 3271,
3604 3284, 3289, 3294, 3301, 3303, 3302, 3312, 3314, 3324, 3324,
3605 3329, 3334, 3342, 3351, 3358, 3364, 3370, 3381, 3392, 3401,
3606 3413, 3414, 3419, 3419, 3420, 3431, 3436, 3437, 3444, 3444,
3607 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3446,
3608 3446, 3446, 3449, 3450, 3456, 3456, 3456, 3463, 3464, 3471,
3609 3474, 3475, 3480, 3485, 3490, 3496, 3495, 3511, 3510, 3525,
3610 3528, 3539, 3549, 3548, 3562, 3562, 3563, 3569, 3569, 3569,
3611 3576, 3577, 3580, 3580, 3583, 3584, 3591, 3599, 3599, 3599,
3612 3606, 3613, 3622, 3627, 3632, 3637, 3642, 3648, 3654, 3660,
3613 3666, 3674, 3684, 3685, 3692, 3693, 3700, 3705, 3710, 3715,
3614 3715, 3715, 3720, 3725, 3730, 3735, 3740, 3745, 3752, 3753,
3615 3760, 3765, 3773, 3773, 3778, 3783, 3783, 3789, 3794, 3799,
3616 3804, 3812, 3812, 3817, 3822, 3822, 3827, 3832, 3837, 3842,
3617 3850, 3858, 3861, 3866, 3871, 3878, 3878, 3878, 3879, 3884,
3618 3887, 3892, 3895, 3900, 3900, 3908, 3909, 3910, 3911, 3912,
3619 3913, 3914, 3915, 3916, 3917, 3918, 3919, 3920, 3921, 3922,
3620 3923, 3924, 3925, 3926, 3927, 3928, 3929, 3930, 3931, 3932,
3621 3933, 3934, 3935, 3936, 3937, 3940, 3940, 3940, 3941, 3941,
3622 3942, 3942, 3942, 3943, 3943, 3943, 3943, 3944, 3944, 3944,
3623 3944, 3945, 3945, 3945, 3946, 3946, 3946, 3946, 3947, 3947,
3624 3947, 3947, 3948, 3948, 3948, 3948, 3949, 3949, 3949, 3949,
3625 3950, 3950, 3950, 3950, 3951, 3951, 3954, 3954, 3955, 3955,
3626 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3956, 3956, 3956,
3627 3956, 3956, 3956, 3956, 3957, 3962, 3967, 3972, 3977, 3982,
3628 3987, 3992, 3997, 4002, 4007, 4012, 4017, 4022, 4023, 4028,
3629 4033, 4038, 4043, 4048, 4053, 4058, 4063, 4068, 4073, 4078,
3630 4085, 4085, 4085, 4086, 4087, 4090, 4099, 4100, 4106, 4113,
3631 4114, 4115, 4116, 4119, 4124, 4132, 4138, 4145, 4152, 4152,
3632 4155, 4156, 4157, 4162, 4169, 4174, 4183, 4188, 4198, 4210,
3633 4211, 4217, 4218, 4219, 4220, 4225, 4232, 4232, 4237, 4242,
3634 4247, 4253, 4259, 4263, 4263, 4301, 4306, 4314, 4319, 4327,
3635 4332, 4337, 4342, 4350, 4355, 4364, 4365, 4369, 4374, 4379,
3636 4397, 4397, 4397, 4397, 4397, 4397, 4397, 4397, 4398, 4399,
3637 4400, 4406, 4405, 4418, 4418, 4424, 4430, 4435, 4440, 4445,
3638 4451, 4456, 4461, 4466, 4471, 4478, 4483, 4488, 4493, 4494,
3639 4500, 4502, 4514, 4523, 4532, 4541, 4540, 4555, 4554, 4567,
3640 4575, 4575, 4576, 4620, 4619, 4642, 4641, 4661, 4660, 4679,
3641 4677, 4694, 4692, 4707, 4712, 4717, 4722, 4737, 4737, 4740,
3642 4747, 4765, 4772, 4780, 4788, 4795, 4803, 4812, 4821, 4829,
3643 4836, 4843, 4851, 4858, 4864, 4879, 4886, 4891, 4897, 4904,
3644 4910, 4916, 4922, 4929, 4930, 4931, 4934, 4935, 4938, 4940,
3645 4949, 4950, 4957, 4958, 4961, 4966, 4974, 4974, 4974, 4979,
3646 4984, 4989, 4994, 5001, 5007, 5014, 5015, 5022, 5022, 5024,
3647 5024, 5024, 5024, 5024, 5024, 5024, 5024, 5024, 5024, 5024,
3648 5027, 5035, 5035, 5035, 5035, 5035, 5035, 5035, 5035, 5035,
3649 5035, 5035, 5035, 5035, 5035, 5035, 5035, 5035, 5035, 5036,
3650 5042, 5047, 5047, 5050, 5051, 5057, 5067, 5071, 5074, 5079,
3651 5086, 5088, 5092, 5097, 5100, 5106, 5111, 5118, 5124, 5117,
3652 5151, 5158, 5167, 5174, 5173, 5184, 5192, 5198, 5208, 5214,
3653 5219, 5227, 5234, 5245, 5251, 5256, 5262, 5272, 5277, 5285,
3654 5291, 5299, 5301, 5316, 5316, 5337, 5343, 5348, 5354, 5362,
3655 5371, 5372, 5375, 5376, 5378, 5391, 5398, 5406, 5407, 5410,
3656 5411, 5417, 5425, 5426, 5432, 5438, 5443, 5448, 5455, 5458,
3657 5465, 5468, 5480, 5483, 5489, 5496, 5503, 5504, 5505, 5512,
3658 5519, 5526, 5532, 5539, 5546, 5553, 5559, 5564, 5569, 5576,
3659 5575, 5586, 5592, 5600, 5606, 5611, 5616, 5621, 5626, 5629,
3660 5630, 5637, 5642, 5649, 5657, 5663, 5670, 5671, 5678, 5685,
3661 5690, 5695, 5700, 5707, 5709, 5716, 5722, 5734, 5735, 5750,
3662 5756, 5763, 5769, 5770, 5777, 5778, 5778, 5778, 5778, 5778,
3663 5778, 5778, 5779, 5780, 5781, 5784, 5784, 5784, 5784, 5784,
3664 5784, 5784, 5784, 5785, 5790, 5793, 5801, 5813, 5820, 5827,
3665 5832, 5837, 5845, 5865, 5868, 5873, 5877, 5880, 5885, 5888,
3666 5895, 5898, 5899, 5902, 5914, 5915, 5916, 5923, 5936, 5948,
3667 5955, 5955, 5955, 5955, 5959, 5963, 5970, 5972, 5979, 5979,
3668 5983, 5987, 5994, 5994, 5997, 5997, 6001, 6005, 6013, 6017,
3669 6025, 6029, 6037, 6041, 6049, 6053, 6079, 6082, 6081, 6096,
3670 6104, 6108, 6112, 6116, 6132, 6133, 6136, 6141, 6144, 6145,
3671 6148, 6164, 6165, 6168, 6176, 6177, 6185, 6186, 6187, 6188,
3672 6191, 6192, 6193, 6196, 6196, 6197, 6200, 6201, 6202, 6203,
3673 6204, 6205, 6206, 6209, 6219, 6226, 6226, 6233, 6234, 6238,
3674 6237, 6247, 6250, 6251, 6258, 6265, 6275, 6276, 6276, 6293,
3675 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293,
3676 6294, 6303, 6303, 6303, 6303, 6303, 6304, 6395, 6395, 6395,
3677 6395, 6395, 6395, 6395, 6395, 6395, 6395, 6395, 6395, 6395,
3678 6395, 6395, 6395, 6395, 6395, 6395, 6395, 6395, 6395, 6395,
3679 6398, 6398, 6398, 6398, 6398, 6398, 6398, 6398, 6398, 6398,
3680 6398, 6398, 6398, 6398, 6398, 6398, 6398, 6398, 6398, 6398,
3681 6401, 6408, 6417, 6426, 6435, 6446, 6447, 6457, 6464, 6469,
3682 6488, 6490, 6501, 6521, 6522, 6525, 6531, 6537, 6545, 6546,
3683 6549, 6555, 6563, 6564, 6567, 6573, 6578, 6586, 6586, 6586,
3684 6594, 6594, 6624, 6626, 6625, 6638, 6639, 6646, 6648, 6671,
3685 6676, 6681, 6688, 6694, 6699, 6712, 6712, 6712, 6713, 6716,
3686 6717, 6718, 6721, 6722, 6725, 6726, 6729, 6730, 6733, 6736,
3687 6739, 6742, 6743, 6746, 6754, 6761, 6762, 6766
3688};
3689#endif
3690
3692#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3693
3694#if 1
3695/* The user-facing name of the symbol whose (internal) number is
3696 YYSYMBOL. No bounds checking. */
3697static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3698
3699/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3700 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3701static const char *const yytname[] =
3702{
3703 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3704 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3705 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3706 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3707 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3708 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3709 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3710 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3711 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3712 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3713 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3714 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3715 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3716 "\"method\"", "\"global variable\"", "\"instance variable\"",
3717 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3718 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3719 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3720 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3721 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3722 "\"escaped form feed\"", "\"escaped carriage return\"",
3723 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3724 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3725 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3726 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3727 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3728 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3729 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3730 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3731 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3732 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3733 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3734 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3735 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3736 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3737 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3738 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3739 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3740 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3741 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3742 "command_asgn", "op_asgn_command_rhs",
3743 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3744 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3745 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3746 "expr_value_do", "command_call", "value_expr_command_call",
3747 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3748 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3749 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3750 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3751 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3752 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3753 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3754 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3755 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3756 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3757 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3758 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3759 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3760 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3761 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_return_arg",
3762 "k_break_arg", "k_next_arg", "k_yield", "then", "do", "if_tail",
3763 "opt_else", "for_var", "f_marg", "mlhs_items_f_marg", "f_margs",
3764 "f_rest_marg", "f_any_kwrest", "$@25", "f_eq", "f_kw_primary_value",
3765 "f_kwarg_primary_value", "opt_f_block_arg_none",
3766 "args_tail_basic_primary_value_none", "block_args_tail",
3767 "excessed_comma", "f_opt_primary_value", "f_opt_arg_primary_value",
3768 "opt_args_tail_block_args_tail_none",
3769 "args-list_primary_value_opt_args_tail_block_args_tail_none",
3770 "block_param", "tail-only-args_block_args_tail", "opt_block_param_def",
3771 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3772 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3773 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3774 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3775 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3776 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3777 "p_expr", "p_as", "p_alt", "p_alt_begin", "p_lparen", "p_lbracket",
3778 "p_expr_basic", "$@32", "p_args", "p_args_head", "p_args_tail", "p_find",
3779 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3780 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3781 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3782 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3783 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3784 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3785 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3786 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3787 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3788 "string_contents", "xstring_contents", "regexp_contents",
3789 "string_content", "@33", "@34", "@35", "@36", "@37", "string_dend",
3790 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3791 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3792 "var_ref", "var_lhs", "backref", "$@38", "superclass",
3793 "f_opt_paren_args", "f_empty_arg", "f_paren_args", "f_arglist", "@39",
3794 "f_kw_arg_value", "f_kwarg_arg_value", "opt_f_block_arg_opt_comma",
3795 "args_tail_basic_arg_value_opt_comma", "args_tail",
3796 "args_tail_basic_arg_value_none", "largs_tail", "f_opt_arg_value",
3797 "f_opt_arg_arg_value", "opt_args_tail_args_tail_opt_comma",
3798 "args-list_arg_value_opt_args_tail_args_tail_opt_comma",
3799 "f_args-list_args_tail_opt_comma", "tail-only-args_args_tail", "f_args",
3800 "opt_args_tail_largs_tail_none",
3801 "args-list_arg_value_opt_args_tail_largs_tail_none",
3802 "f_args-list_largs_tail_none", "tail-only-args_largs_tail", "f_largs",
3803 "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item",
3804 "f_arg", "f_label", "kwrest_mark", "f_no_kwarg", "f_kwrest",
3805 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", "option_','",
3806 "opt_comma", "value_expr_singleton_expr", "singleton", "singleton_expr",
3807 "$@40", "assoc_list", "assocs", "assoc", "operation2", "operation3",
3808 "dot_or_colon", "call_op", "call_op2", "rparen", "rbracket", "rbrace",
3809 "trailer", "term", "terms", "none", YY_NULLPTR
3810};
3811
3812static const char *
3813yysymbol_name (yysymbol_kind_t yysymbol)
3814{
3815 return yytname[yysymbol];
3816}
3817#endif
3818
3819#define YYPACT_NINF (-1192)
3820
3821#define yypact_value_is_default(Yyn) \
3822 ((Yyn) == YYPACT_NINF)
3823
3824#define YYTABLE_NINF (-858)
3825
3826#define yytable_value_is_error(Yyn) \
3827 ((Yyn) == YYTABLE_NINF)
3828
3829/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3830 STATE-NUM. */
3831static const yytype_int16 yypact[] =
3832{
3833 -1192, 5502, 145, -1192, -1192, -1192, -1192, 11131, -1192, -1192,
3834 -1192, -1192, -1192, -1192, -1192, 7732, 7888, -1192, -1192, -1192,
3835 -1192, 6952, -1192, -1192, -1192, -1192, 339, 10977, 28, 294,
3836 -1192, -1192, -1192, -1192, 6328, 7108, -1192, -1192, 6484, -1192,
3837 -1192, -1192, -1192, -1192, -1192, -1192, -1192, 13746, 13746, 13746,
3838 13746, 290, 9890, 10048, 12666, 12906, 11432, -1192, 10823, -1192,
3839 -1192, -1192, 300, 300, 300, 300, 1120, 13866, 13746, -1192,
3840 280, -1192, 294, 1437, -1192, -1192, -1192, -1192, -1192, 969,
3841 26, 26, -1192, -1192, 105, 443, 368, -1192, 354, 14466,
3842 -1192, 381, -1192, 4455, -1192, -1192, -1192, -1192, 1056, 74,
3843 -1192, 584, -1192, 12066, 12066, -1192, -1192, 10510, 14584, 14702,
3844 14820, 10668, 8044, 12186, 12186, 12186, 7576, -1192, 642, 109,
3845 -1192, -1192, 423, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3846 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3847 348, 479, -1192, 455, 615, -1192, -1192, -1192, -1192, -1192,
3848 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3849 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3850 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3851 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3852 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3853 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3854 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3855 -1192, -1192, -1192, 421, -1192, -1192, -1192, -1192, -1192, -1192,
3856 12306, -1192, 12186, -1192, -1192, 11807, 13986, 822, -1192, 431,
3857 -1192, 10206, -1192, -1192, -1192, -1192, -1192, 450, 467, 554,
3858 10048, 13746, 26, 26, 105, 501, -1192, 634, -1192, 490,
3859 54, 55, 599, 59, 646, 5253, 5253, 625, -1192, 9890,
3860 572, 280, -1192, 1437, 28, 528, -1192, -1192, 13746, 13746,
3861 13746, -1192, 6142, -1192, 635, 585, 780, -1192, 794, -1192,
3862 -1192, 635, 638, 794, -1192, 28, 737, 1120, 14938, 639,
3863 639, 666, -1192, 678, 702, 760, 791, -1192, -1192, 470,
3864 -1192, -1192, 857, 1065, 643, -1192, 671, 671, 671, 671,
3865 764, -1192, -1192, 903, -1192, -1192, -1192, -1192, -1192, 6019,
3866 10358, 12066, 12066, 12066, 12066, -1192, 13986, 13986, 1921, 741,
3867 -1192, 773, -1192, 1921, 777, -1192, -1192, -1192, -1192, 785,
3868 -1192, -1192, -1192, -1192, -1192, -1192, -1192, 9890, 11550, 739,
3869 -1192, -1192, 13746, 13746, 13746, 13746, 13746, -1192, -1192, 13746,
3870 13746, 13746, 13746, 13746, 13746, 13746, 13746, -1192, 13746, -1192,
3871 -1192, 13746, 13746, 13746, 13746, 13746, 13746, 13746, 13746, 13746,
3872 13746, -1192, -1192, 15425, 12186, 15523, 450, 8826, -1192, 969,
3873 -1192, 117, 117, 12066, 9738, 9738, -1192, 280, 738, 859,
3874 -1192, -1192, 917, 896, 111, 139, 156, 644, 660, 12066,
3875 544, -1192, 789, 936, -1192, -1192, -1192, -1192, 385, 535,
3876 575, 623, 700, 761, 783, 795, 798, -1192, -1192, -1192,
3877 -1192, -1192, 804, -1192, 13746, -1192, -1192, -1192, -1192, -1192,
3878 776, 784, -1192, -1192, 11668, -1192, -1192, -1192, 15327, -1192,
3879 -1192, -1192, -1192, -1192, 13746, 28, -1192, 790, 28, 806,
3880 -1192, -1192, 807, 400, -1192, -1192, -1192, -1192, -1192, 11131,
3881 -1192, -1192, 13746, 821, 92, 863, 865, -1192, 15621, 12186,
3882 15719, -1192, -1192, -1192, 294, 28, -1192, -1192, 5722, 836,
3883 846, -1192, -1192, -1192, 897, 13746, -1192, 12666, -1192, -1192,
3884 12906, -1192, -1192, -1192, 431, 948, -1192, 856, -1192, -1192,
3885 14938, 15817, 12186, 15915, -1192, -1192, -1192, -1192, -1192, -1192,
3886 -1192, -1192, -1192, -1192, -1192, -1192, 1158, 81, 1204, 87,
3887 13746, 16013, 15719, -1192, -1192, 861, -1192, -1192, -1192, -1192,
3888 -1192, 11946, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3889 -1192, -1192, 1512, -1192, -1192, -1192, -1192, -1192, 873, -1192,
3890 -1192, -1192, 877, -1192, -1192, -1192, 880, -1192, -1192, -1192,
3891 28, -1192, -1192, -1192, 888, -1192, 882, 13746, 128, -1192,
3892 -1192, 988, 889, 485, -1192, 14106, 8826, 280, 14106, 8826,
3893 -1192, 899, -1192, -1192, -1192, 131, 131, 13026, 28, 14938,
3894 894, -1192, 13146, -1192, 646, 3922, 3922, 3922, 3922, 4052,
3895 3603, 3922, 3922, 5253, 5253, 934, 934, -1192, 4743, 1223,
3896 1223, 1310, 670, 670, 646, 646, 646, 1071, 1071, 8200,
3897 6640, 8512, 6796, 450, -1192, 28, 916, 655, -1192, 685,
3898 -1192, 7264, -1192, -1192, 131, -1192, 8978, 1041, 9434, 391,
3899 131, 131, 1070, 1048, 161, 16111, 12186, 16209, -1192, -1192,
3900 -1192, 948, -1192, -1192, -1192, -1192, 16307, 12186, 16405, 8826,
3901 13986, -1192, -1192, -1192, -1192, 12426, -1192, -1192, 12786, -1192,
3902 28, -1192, -1192, -1192, -1192, 3888, 14226, 14226, 11131, -1192,
3903 12546, -1192, 12786, -1192, -1192, -1192, 13986, 6142, -1192, -1192,
3904 14346, 14346, 13746, 6172, 312, 450, 28, 261, 357, 450,
3905 13746, 13746, 14226, -1192, 35, -1192, -1192, 13746, -1192, 635,
3906 -1192, 794, -1192, 14938, 856, 562, 569, 28, 219, 482,
3907 -1192, -1192, 1363, -1192, 80, -1192, 300, -1192, -1192, 80,
3908 300, -1192, 646, 7420, -1192, -1192, 1512, 1286, -1192, 928,
3909 28, 935, -1192, 33, -1192, -1192, -1192, 571, -1192, 1921,
3910 -1192, -1192, -1192, 961, 13746, 1921, -1192, -1192, -1192, -1192,
3911 -1192, 2241, -1192, -1192, -1192, 339, 1054, -1192, 6142, 1061,
3912 131, -1192, 1054, 1061, 131, -1192, -1192, 963, -1192, -1192,
3913 -1192, -1192, -1192, 13746, -1192, -1192, -1192, 962, 968, 1090,
3914 -1192, -1192, 856, 14938, 1081, -1192, -1192, 1094, 1011, 4085,
3915 -1192, -1192, -1192, 994, 372, -1192, -1192, 1008, -1192, -1192,
3916 -1192, -1192, 785, 987, 735, 12426, -1192, -1192, -1192, -1192,
3917 785, -1192, 1145, -1192, 1010, -1192, 1139, -1192, -1192, -1192,
3918 -1192, -1192, -1192, 13266, 131, -1192, 1070, 131, 96, 276,
3919 28, 172, 186, 12066, 280, 12066, 8826, 911, 569, -1192,
3920 28, 131, 400, 11285, -1192, 784, -1192, 109, 443, -1192,
3921 4562, -1192, -1192, -1192, -1192, 28, 1002, 400, 13746, 339,
3922 -1192, -1192, 384, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3923 543, -1192, -1192, -1192, -1192, -1192, 671, -1192, 671, 671,
3924 671, 28, -1192, 1512, -1192, 1518, -1192, -1192, 1116, 873,
3925 -1192, -1192, 1009, 1014, -1192, -1192, 1019, -1192, 1040, -1192,
3926 1009, 14106, -1192, -1192, -1192, -1192, -1192, -1192, -1192, 1042,
3927 13386, -1192, 856, 394, -1192, -1192, -1192, 16503, 12186, 16601,
3928 -1192, -1192, 13746, 14226, 14226, 1047, -1192, -1192, -1192, 14226,
3929 14226, -1192, -1192, 13506, 1139, -1192, -1192, -1192, 9738, 12066,
3930 131, -1192, -1192, 131, -1192, 13746, -1192, 251, -1192, -1192,
3931 131, -1192, 244, 391, 8826, 280, 131, -1192, -1192, -1192,
3932 -1192, -1192, -1192, -1192, -1192, 12786, -1192, 14346, 13746, 13746,
3933 -1192, 13746, 13746, 1547, -1192, -1192, -1192, 1049, 1050, -1192,
3934 2241, -1192, 2241, -1192, 1921, -1192, 2241, -1192, -1192, 1054,
3935 1061, 13746, 13746, -1192, -1192, 13746, 1063, 11946, 11946, 14226,
3936 13746, 8356, 8668, 28, 432, 448, 5854, 5854, 6142, -1192,
3937 -1192, -1192, -1192, -1192, 14226, -1192, -1192, -1192, -1192, 962,
3938 -1192, 1101, -1192, 1199, -1192, -1192, 117, -1192, -1192, -1192,
3939 13626, 9130, -1192, -1192, -1192, 131, -1192, -1192, 13746, 1921,
3940 1064, -1192, -1192, 1068, -1192, -1192, 1072, -1192, -1192, -1192,
3941 -1192, -1192, 1073, 1075, -1192, 5145, 1518, 1518, 1009, 1009,
3942 1082, 1009, 6142, 6142, 1086, 1086, 1042, -1192, -1192, 6142,
3943 472, -1192, -1192, -1192, 2254, 2254, 682, -1192, 4905, 502,
3944 1157, -1192, 1276, -1192, -1192, 236, -1192, 1102, -1192, -1192,
3945 -1192, 1092, -1192, 1098, -1192, 15339, -1192, -1192, -1192, -1192,
3946 -1192, 953, -1192, -1192, -1192, 77, -1192, -1192, -1192, -1192,
3947 -1192, -1192, -1192, -1192, -1192, 596, -1192, -1192, -1192, 15056,
3948 117, -1192, -1192, 9738, -1192, -1192, 9586, 8978, 13746, -1192,
3949 867, 5854, 9738, -1192, 28, 33, -1192, -1192, 216, 571,
3950 -1192, 1921, -1192, -1192, 1921, -1192, 2241, -1192, 127, 1050,
3951 -1192, -1192, 2241, -1192, -1192, 2354, 10358, -1192, -1192, 8826,
3952 -1192, -1192, -1192, -1192, 15339, 307, 28, 15247, -1192, 28,
3953 1103, -1192, 1104, -1192, -1192, -1192, 1112, -1192, 12066, -1192,
3954 1209, 15247, -1192, 15339, 453, 1161, 2254, 2254, 682, 515,
3955 592, 5854, 5854, -1192, 1208, -1192, 1045, 119, 166, 194,
3956 8826, 280, -1192, 1010, -1192, -1192, -1192, -1192, 117, 1018,
3957 131, 1107, 1114, -1192, -1192, 10358, -1192, 1064, -1192, 1119,
3958 1123, 1131, 1132, 1119, -1192, -1192, -1192, 1009, 1064, -1192,
3959 1133, -1192, -1192, -1192, 1134, -1192, -1192, -1192, 28, 888,
3960 1137, 15174, 1142, -1192, -1192, -1192, 196, -1192, 1161, 1143,
3961 1147, -1192, -1192, -1192, -1192, -1192, 28, -1192, -1192, 1148,
3962 15339, 1149, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
3963 -1192, -1192, -1192, 28, 28, 28, 28, 28, 28, 265,
3964 16699, 12186, 16797, 1145, -1192, 1199, -1192, -1192, 12066, 12066,
3965 -1192, 1319, -1192, 8826, 1154, -1192, 2241, -1192, 2241, -1192,
3966 1921, -1192, 2241, -1192, -1192, -1192, -1192, 571, -1192, 2354,
3967 -1192, -1192, 1155, 15174, 2354, -1192, -1192, 1251, 1053, 862,
3968 -1192, -1192, 15339, -1192, 453, -1192, 15339, -1192, 15247, 657,
3969 -1192, -1192, -1192, -1192, -1192, -1192, 413, 417, 28, 356,
3970 389, -1192, -1192, 9282, -1192, -1192, -1192, 975, -1192, -1192,
3971 131, -1192, 1119, 1119, 1153, 1119, -1192, 1064, -1192, -1192,
3972 1156, 1162, -1192, 1053, 1165, 1166, -1192, 16895, 1156, 1169,
3973 28, 1169, -1192, -1192, 426, 153, 1319, -1192, -1192, -1192,
3974 -1192, 2241, -1192, -1192, -1192, 862, -1192, 862, -1192, 2354,
3975 -1192, 862, -1192, 1159, 1170, -1192, 15339, -1192, -1192, -1192,
3976 -1192, -1192, 1119, 1156, 1156, 1179, 1156, -1192, -1192, -1192,
3977 862, -1192, -1192, 1156, -1192
3978};
3979
3980/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3981 Performed when YYTABLE does not specify something else to do. Zero
3982 means the default is an error. */
3983static const yytype_int16 yydefact[] =
3984{
3985 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3986 401, 404, 26, 26, 26, 420, 421, 395, 396, 418,
3987 422, 323, 707, 706, 708, 709, 64, 0, 64, 0,
3988 857, 711, 710, 712, 97, 99, 701, 700, 98, 702,
3989 696, 697, 698, 699, 644, 717, 718, 0, 0, 0,
3990 0, 0, 0, 0, 857, 857, 126, 497, 670, 670,
3991 672, 674, 0, 0, 0, 0, 0, 0, 0, 6,
3992 3, 8, 0, 10, 43, 49, 40, 58, 61, 46,
3993 727, 727, 70, 91, 323, 90, 0, 112, 0, 116,
3994 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3995 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3996 0, 0, 419, 0, 0, 0, 323, 370, 94, 368,
3997 340, 341, 643, 645, 342, 343, 653, 344, 659, 346,
3998 663, 345, 665, 347, 642, 688, 689, 641, 694, 705,
3999 713, 714, 348, 0, 349, 7, 1, 205, 216, 206,
4000 229, 202, 222, 212, 211, 232, 233, 227, 210, 209,
4001 204, 230, 234, 235, 214, 203, 217, 221, 223, 215,
4002 208, 224, 231, 226, 225, 218, 228, 213, 201, 220,
4003 219, 200, 207, 198, 199, 195, 196, 197, 155, 157,
4004 156, 190, 191, 186, 168, 169, 170, 177, 174, 176,
4005 171, 172, 192, 193, 178, 179, 183, 187, 173, 175,
4006 165, 166, 167, 180, 181, 182, 184, 185, 188, 189,
4007 194, 160, 162, 33, 158, 159, 161, 402, 403, 405,
4008 857, 516, 0, 107, 65, 64, 0, 0, 28, 857,
4009 12, 0, 11, 27, 295, 393, 394, 517, 0, 0,
4010 0, 0, 727, 727, 0, 0, 261, 0, 360, 363,
4011 713, 714, 0, 349, 262, 251, 252, 357, 24, 0,
4012 0, 3, 21, 23, 64, 114, 20, 353, 831, 334,
4013 834, 670, 298, 299, 329, 0, 64, 330, 64, 827,
4014 300, 0, 0, 64, 825, 64, 0, 0, 0, 727,
4015 727, 124, 397, 0, 132, 133, 140, 494, 691, 0,
4016 690, 692, 0, 0, 0, 650, 654, 666, 660, 668,
4017 695, 74, 273, 0, 274, 854, 853, 5, 855, 0,
4018 0, 0, 0, 0, 0, 857, 0, 0, 724, 0,
4019 723, 726, 389, 724, 0, 391, 409, 521, 511, 100,
4020 523, 367, 410, 523, 506, 857, 130, 0, 122, 117,
4021 857, 77, 0, 0, 0, 0, 0, 291, 292, 0,
4022 0, 0, 0, 249, 250, 0, 0, 75, 0, 289,
4023 290, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4024 0, 844, 845, 847, 857, 846, 0, 0, 86, 84,
4025 85, 0, 0, 0, 0, 0, 377, 3, 4, 0,
4026 433, 432, 0, 0, 713, 714, 349, 150, 151, 0,
4027 0, 153, 857, 0, 713, 714, 349, 387, 225, 218,
4028 228, 213, 195, 196, 197, 155, 156, 823, 81, 80,
4029 822, 821, 0, 820, 326, 318, 316, 317, 109, 322,
4030 857, 857, 110, 111, 64, 108, 847, 846, 0, 369,
4031 646, 857, 857, 163, 790, 64, 312, 857, 64, 857,
4032 311, 324, 0, 64, 366, 73, 30, 32, 31, 0,
4033 857, 296, 0, 0, 357, 0, 0, 857, 847, 857,
4034 846, 857, 857, 857, 0, 64, 355, 14, 0, 113,
4035 0, 830, 333, 833, 0, 0, 358, 852, 851, 301,
4036 852, 303, 359, 826, 0, 139, 695, 127, 119, 726,
4037 0, 847, 857, 846, 495, 676, 693, 679, 677, 671,
4038 647, 648, 673, 649, 675, 651, 0, 0, 0, 0,
4039 0, 847, 846, 856, 9, 0, 34, 35, 36, 37,
4040 297, 0, 71, 72, 796, 793, 792, 791, 794, 802,
4041 803, 790, 0, 809, 804, 813, 812, 808, 817, 805,
4042 768, 731, 817, 739, 766, 748, 817, 764, 769, 767,
4043 64, 740, 795, 797, 798, 800, 817, 730, 807, 446,
4044 445, 811, 817, 816, 738, 0, 0, 0, 0, 0,
4045 494, 0, 521, 101, 494, 0, 0, 0, 64, 0,
4046 118, 131, 0, 534, 259, 266, 268, 269, 270, 277,
4047 278, 271, 272, 247, 248, 275, 276, 534, 64, 263,
4048 264, 265, 254, 255, 256, 257, 258, 293, 294, 835,
4049 837, 836, 838, 323, 514, 64, 857, 835, 837, 836,
4050 838, 323, 515, 857, 0, 424, 0, 423, 0, 0,
4051 0, 0, 0, 375, 357, 847, 857, 846, 380, 385,
4052 150, 151, 152, 719, 383, 721, 847, 857, 846, 0,
4053 0, 842, 843, 82, 325, 0, 319, 328, 0, 320,
4054 64, 362, 835, 836, 510, 323, 0, 0, 0, 306,
4055 313, 308, 315, 848, 365, 29, 0, 279, 13, 857,
4056 0, 0, 0, 835, 356, 0, 64, 835, 836, 857,
4057 0, 0, 0, 25, 115, 22, 354, 0, 829, 331,
4058 332, 64, 828, 0, 125, 839, 138, 64, 835, 836,
4059 496, 680, 0, 652, 0, 656, 0, 662, 658, 0,
4060 0, 664, 260, 836, 39, 38, 0, 444, 436, 438,
4061 64, 441, 434, 818, 737, 819, 734, 818, 736, 818,
4062 760, 751, 725, 0, 0, 818, 765, 729, 601, 806,
4063 810, 818, 762, 815, 814, 64, 59, 62, 286, 280,
4064 0, 728, 60, 281, 0, 495, 519, 0, 495, 416,
4065 417, 520, 505, 334, 92, 93, 41, 336, 0, 45,
4066 335, 129, 123, 0, 0, 69, 48, 67, 0, 304,
4067 329, 236, 42, 0, 349, 532, 532, 0, 857, 857,
4068 521, 513, 104, 0, 518, 313, 857, 857, 310, 512,
4069 102, 309, 857, 352, 857, 425, 857, 427, 88, 426,
4070 373, 374, 413, 0, 0, 534, 0, 0, 839, 356,
4071 64, 835, 836, 0, 0, 0, 0, 150, 151, 154,
4072 64, 0, 64, 0, 327, 857, 361, 507, 95, 50,
4073 304, 238, 57, 245, 164, 64, 857, 64, 0, 64,
4074 857, 857, 518, 857, 857, 56, 244, 832, 302, 120,
4075 518, 26, 681, 678, 686, 687, 655, 657, 667, 661,
4076 669, 64, 443, 0, 799, 0, 733, 732, 807, 817,
4077 750, 749, 817, 817, 448, 747, 817, 801, 817, 798,
4078 817, 0, 857, 857, 390, 392, 496, 96, 496, 339,
4079 0, 857, 121, 357, 857, 857, 857, 847, 857, 846,
4080 533, 533, 0, 0, 0, 0, 105, 849, 857, 0,
4081 0, 103, 411, 857, 18, 633, 415, 414, 0, 0,
4082 0, 428, 430, 0, 89, 0, 525, 0, 378, 532,
4083 0, 379, 518, 0, 0, 0, 0, 518, 388, 824,
4084 83, 321, 508, 509, 307, 314, 364, 0, 0, 0,
4085 857, 0, 0, 724, 682, 435, 437, 439, 442, 735,
4086 818, 761, 818, 758, 818, 754, 818, 756, 763, 66,
4087 288, 0, 0, 26, 26, 334, 337, 0, 0, 0,
4088 0, 835, 836, 64, 835, 836, 0, 0, 285, 54,
4089 242, 55, 243, 106, 0, 52, 240, 53, 241, 634,
4090 635, 857, 636, 857, 15, 431, 0, 371, 372, 526,
4091 0, 0, 533, 376, 381, 0, 720, 384, 0, 724,
4092 857, 498, 788, 857, 745, 786, 857, 784, 789, 787,
4093 501, 746, 857, 857, 744, 0, 0, 0, 817, 817,
4094 817, 817, 63, 287, 857, 857, 338, 44, 68, 305,
4095 518, 625, 631, 597, 0, 0, 0, 533, 64, 533,
4096 585, 670, 0, 624, 78, 542, 548, 550, 552, 546,
4097 545, 581, 547, 590, 593, 596, 602, 603, 592, 556,
4098 611, 604, 557, 612, 613, 614, 615, 616, 617, 618,
4099 619, 621, 620, 622, 623, 600, 76, 51, 239, 0,
4100 0, 638, 412, 0, 19, 640, 0, 0, 0, 527,
4101 857, 0, 0, 386, 64, 0, 743, 454, 0, 0,
4102 742, 0, 780, 771, 0, 785, 0, 782, 0, 440,
4103 759, 755, 818, 752, 757, 486, 0, 484, 483, 0,
4104 609, 610, 151, 629, 0, 573, 64, 574, 578, 64,
4105 0, 568, 0, 857, 571, 584, 0, 626, 0, 627,
4106 0, 543, 553, 0, 591, 595, 607, 608, 0, 533,
4107 533, 0, 0, 599, 0, 637, 0, 713, 714, 349,
4108 0, 3, 16, 857, 528, 530, 531, 529, 0, 539,
4109 0, 488, 0, 453, 503, 0, 499, 857, 770, 857,
4110 857, 857, 857, 857, 685, 684, 683, 817, 857, 451,
4111 857, 459, 481, 462, 857, 478, 487, 482, 64, 798,
4112 857, 450, 857, 458, 522, 524, 64, 566, 588, 576,
4113 575, 567, 579, 850, 569, 598, 64, 549, 544, 581,
4114 0, 582, 586, 670, 594, 589, 605, 606, 630, 555,
4115 565, 554, 561, 64, 64, 64, 64, 64, 64, 357,
4116 847, 857, 846, 857, 639, 857, 429, 535, 0, 0,
4117 382, 0, 500, 0, 0, 741, 0, 781, 0, 778,
4118 0, 774, 0, 776, 783, 753, 457, 0, 456, 0,
4119 474, 465, 0, 0, 460, 479, 480, 0, 449, 0,
4120 476, 572, 0, 580, 0, 628, 0, 551, 0, 0,
4121 558, 559, 560, 562, 563, 564, 839, 356, 64, 835,
4122 836, 632, 17, 0, 540, 541, 492, 64, 490, 493,
4123 0, 502, 857, 857, 857, 857, 452, 857, 464, 463,
4124 857, 857, 485, 461, 857, 857, 357, 847, 857, 577,
4125 64, 582, 583, 587, 518, 857, 0, 489, 504, 779,
4126 775, 0, 772, 777, 455, 0, 475, 0, 472, 0,
4127 468, 0, 470, 839, 356, 477, 0, 570, 537, 538,
4128 536, 491, 857, 857, 857, 857, 857, 773, 473, 469,
4129 0, 466, 471, 857, 467
4130};
4131
4132/* YYPGOTO[NTERM-NUM]. */
4133static const yytype_int16 yypgoto[] =
4134{
4135 -1192, -98, 1095, -1192, -1192, -1192, 984, 1265, 850, -38,
4136 -1192, -1192, -570, -1192, 197, 849, -1192, 3, -1192, -1192,
4137 11, -1192, -1192, -531, -1192, -45, -561, -23, -602, -19,
4138 -1192, -1192, 476, 3158, -1192, 3423, -1192, -43, -1192, -1192,
4139 1249, -54, -1192, 753, -1192, -656, 1533, -69, 1253, -132,
4140 30, -458, -62, -1192, 22, 3908, -400, 1275, -35, 6,
4141 -1192, -1192, -3, -1192, -1192, 4988, -1192, -1192, -1192, -1192,
4142 -541, 1289, -1192, 1066, 883, 468, -1192, 195, -1192, 817,
4143 20, 696, -373, -1192, 25, -1192, -49, -613, -386, -22,
4144 -476, -1192, -546, -50, -1192, -1192, -1192, -1192, -1192, -1192,
4145 -1192, -1192, -1192, -1192, -1192, -1192, 1394, -1192, -1192, -1192,
4146 -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192, -1192,
4147 -1192, -1192, 428, -1192, -456, 2277, -1192, -1192, -1192, 2416,
4148 -384, 415, 163, -824, -1192, -833, -800, 663, 486, 831,
4149 -1192, 133, 76, -1192, -960, -1192, 237, -1192, -1191, 79,
4150 279, -1192, -1192, -1192, 329, -1192, -1192, 162, -1192, 23,
4151 224, -417, -130, -1192, -1192, 135, -1192, -1192, -1192, 558,
4152 -1192, -1192, -100, -1192, -500, -1192, 1084, -1192, -785, -1192,
4153 -740, -848, -513, -1192, 34, -1192, -1192, -915, -269, -1192,
4154 -1192, -1192, -1192, -1192, 148, -1192, -237, -1192, -816, -984,
4155 -1078, -484, -866, -1096, -1192, 227, -1192, -1192, -919, 230,
4156 -1192, -1192, -653, 235, -1192, -1192, -1192, 136, -1192, -1192,
4157 144, 628, 1115, -1192, 1338, 1568, 1775, 42, -1192, 1824,
4158 -1192, 924, -1192, 1996, -1192, -1192, 2115, -1192, 2287, -1192,
4159 -1192, -58, -1192, -1192, -203, -1192, -1192, -1192, -1192, -1192,
4160 -1192, -1192, 29, -1192, -1192, -1192, -1192, 8, -51, 4158,
4161 254, 1355, 504, 3757, -1192, -1192, 71, -313, 766, -18,
4162 -1192, -733, -788, -522, -1192, 346, -1192, -875, -670, -675,
4163 -463, -1192, -1192, -1192, 1125, -257, -1192, -1192, -1192, 405,
4164 -220, -1187, -472, -242, -727, 704, -308, -233, -1192, -759,
4165 -1192, -362, -1192, 757, -1192, -495, -1192, -1192, -1192, -1192,
4166 -1192, 43, -470, -346, -1192, -1192, -90, 1351, 800, -348,
4167 82, -250, -28, -68, -1
4168};
4169
4170/* YYDEFGOTO[NTERM-NUM]. */
4171static const yytype_int16 yydefgoto[] =
4172{
4173 0, 327, 69, 1, 2, 70, 71, 241, 242, 653,
4174 1156, 1315, 654, 1053, 271, 272, 494, 227, 72, 479,
4175 273, 74, 75, 76, 77, 78, 786, 472, 816, 79,
4176 627, 613, 438, 252, 873, 253, 400, 401, 403, 974,
4177 404, 82, 805, 817, 83, 603, 254, 85, 86, 274,
4178 87, 517, 88, 89, 90, 255, 421, 422, 221, 222,
4179 223, 698, 642, 225, 92, 93, 94, 95, 96, 97,
4180 789, 389, 98, 550, 482, 551, 283, 284, 285, 821,
4181 838, 839, 465, 447, 466, 232, 233, 449, 686, 646,
4182 287, 809, 810, 99, 397, 500, 856, 662, 863, 1162,
4183 866, 864, 679, 596, 599, 100, 257, 102, 103, 104,
4184 105, 106, 107, 108, 109, 110, 111, 350, 353, 963,
4185 1153, 853, 968, 969, 801, 258, 113, 114, 115, 259,
4186 656, 848, 970, 971, 413, 758, 759, 760, 761, 568,
4187 773, 774, 1259, 1260, 1166, 1261, 1388, 1345, 1263, 1264,
4188 1340, 1265, 1266, 1267, 1186, 1187, 1268, 1242, 1377, 1378,
4189 524, 740, 901, 307, 1168, 117, 1071, 1246, 1323, 354,
4190 118, 119, 351, 600, 601, 604, 605, 977, 854, 1237,
4191 950, 1036, 825, 1373, 857, 1430, 1238, 1114, 1278, 1116,
4192 1117, 1290, 1221, 1222, 1118, 1354, 1196, 1197, 1198, 1120,
4193 1121, 1291, 1200, 1122, 1123, 1124, 1125, 1126, 569, 1128,
4194 1129, 1130, 1131, 1132, 1133, 1134, 1135, 964, 1051, 1150,
4195 1154, 120, 121, 122, 123, 124, 125, 316, 126, 127,
4196 536, 744, 128, 129, 538, 130, 131, 132, 133, 537,
4197 539, 309, 313, 314, 529, 742, 741, 902, 1004, 1085,
4198 1256, 903, 134, 135, 310, 136, 137, 138, 139, 260,
4199 261, 142, 262, 263, 865, 674, 339, 340, 341, 342,
4200 343, 571, 572, 764, 573, 920, 1074, 1248, 575, 576,
4201 770, 577, 578, 579, 580, 1172, 1077, 1078, 1079, 1080,
4202 581, 582, 583, 929, 585, 586, 587, 588, 589, 590,
4203 591, 592, 593, 594, 765, 771, 441, 442, 443, 680,
4204 292, 469, 289, 715, 644, 683, 678, 396, 474, 834,
4205 1204, 509, 657, 408, 244
4206};
4207
4208/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4209 positive, shift that token. If negative, reduce the rule whose
4210 number is the opposite. If YYTABLE_NINF, syntax error. */
4211static const yytype_int16 yytable[] =
4212{
4213 145, 312, 329, 236, 224, 239, 302, 311, 919, 406,
4214 468, 395, 73, 321, 270, 277, 228, 229, 658, 459,
4215 672, 645, 973, 308, 224, 570, 790, 359, 457, 794,
4216 570, 730, 286, 238, 917, 349, 226, 792, 511, 302,
4217 732, 231, 328, 513, 446, 446, 446, 643, 927, 651,
4218 768, 276, 276, 290, 294, 224, 226, 793, 302, 302,
4219 302, 402, 734, 345, 407, 689, 822, 455, 445, 445,
4220 445, 980, 874, 766, 320, 874, 439, 766, 301, 328,
4221 1006, 815, 275, 689, 399, 399, 951, 874, 399, 874,
4222 762, 450, 450, 450, 879, 882, 584, 288, 293, 921,
4223 926, 584, 797, 1037, 348, 317, 318, 319, 224, 871,
4224 532, 534, 695, 1170, 826, 1008, 716, 1127, 1127, 1279,
4225 895, -146, 1146, 776, 1199, 1305, 1308, 1254, 1075, 782,
4226 655, 346, -141, 1289, 1379, 346, -141, 495, 448, 452,
4227 453, 799, 565, -397, 719, 146, 525, 746, 1389, 737,
4228 802, 812, 344, 750, -715, -716, 451, 451, 451, 492,
4229 -724, 446, 778, 446, -142, 815, 815, 490, 967, -113,
4230 793, -397, -397, 497, 566, 1218, 956, 719, 855, -142,
4231 779, -149, 234, 338, 961, 445, -148, 445, -141, -142,
4232 -129, 815, 709, -149, 1075, 643, 651, -144, 843, 800,
4233 747, 527, 528, 498, 850, 851, 751, -149, 467, 730,
4234 450, -145, 270, 523, 1161, 1073, 473, 475, 732, 1379,
4235 1119, 1119, 874, 504, 730, 608, -148, -397, 1389, 470,
4236 1219, 270, 732, 542, 1220, 345, 518, 1304, 1307, 1062,
4237 145, 315, 1127, 328, -135, 1244, 1239, 1255, 302, 276,
4238 291, -137, 73, -835, 1006, 141, 347, 471, 1400, 1194,
4239 347, 1203, 230, 508, 655, 508, -132, 231, 276, -143,
4240 508, 325, 514, -141, 348, 451, 869, 326, -148, -141,
4241 1402, 1073, 345, 927, 762, 912, 1179, 1325, 546, 547,
4242 548, 549, 545, 860, -133, 1127, 986, 1210, 1336, 275,
4243 1338, -147, 1127, 1127, 870, 516, 141, 141, 302, 663,
4244 305, -140, 399, 399, 399, 399, -139, 552, 553, 270,
4245 -142, 719, 667, 485, 486, 446, -142, -135, 1076, 276,
4246 955, 1280, 719, 745, 934, 745, 1235, 1210, 935, 1245,
4247 73, -136, 979, 305, 921, 1119, 267, 1292, -149, 445,
4248 234, 1039, 1041, -135, -149, 942, 276, 1045, 1047, 730,
4249 659, 893, 415, 425, 425, 425, 660, 661, 892, -144,
4250 1019, 1299, 1301, -135, -135, 1236, 669, -135, 936, 328,
4251 610, 938, 874, 1073, 399, 446, 1073, 275, 1073, 900,
4252 1020, 1211, 650, 470, 1076, -144, 276, 1009, 978, -134,
4253 399, 981, -145, 276, 276, 325, 1060, 923, 1210, 445,
4254 1247, 326, 891, 928, 1065, 988, 652, 1050, 847, -148,
4255 446, 675, 815, 815, 766, -148, -146, 1414, 815, 815,
4256 -147, -138, 450, -836, 325, 1127, 917, 336, 337, -143,
4257 326, 762, 1147, 762, 445, 240, -147, 927, -715, 687,
4258 687, 1190, 1191, 446, -707, 650, 1020, 894, 518, 1011,
4259 1013, 315, -588, 1015, 730, 1017, 687, 1018, 687, -836,
4260 302, 352, 462, 501, 502, 503, 224, 445, 694, 690,
4261 885, 898, -141, -707, 1000, 705, 1292, 650, 470, 991,
4262 1292, -145, 1403, 234, 493, 141, 235, 451, 815, 1251,
4263 991, 921, 355, -132, 141, 143, -149, -136, 226, 356,
4264 -144, 1103, 982, 815, 1057, 360, -144, 1058, -143, 783,
4265 650, 470, 987, 141, 1063, 732, 787, 584, -148, 787,
4266 1067, 560, 836, 584, 918, 59, 525, 784, 1073, 650,
4267 1073, 907, 1073, -145, 1073, 325, 907, 518, 837, -145,
4268 731, 326, 305, 804, 234, 461, 143, 143, 804, 302,
4269 1403, 564, 755, 1296, 1297, 1293, -144, -146, -134, 791,
4270 -835, -147, 958, -146, -836, 1033, 463, -147, 1387, -716,
4271 -143, 1428, -145, 141, 141, 808, -143, -137, 480, 526,
4272 808, 527, 528, 1061, 832, 276, 670, 446, 276, 927,
4273 671, 643, 840, 651, -706, 827, -143, 230, 446, 1163,
4274 484, 141, 305, -142, 762, 762, -136, 927, 844, 1275,
4275 846, 445, 833, 1073, 235, 1180, 1181, 1183, 1184, 559,
4276 778, 849, 445, -706, -133, 487, -136, -136, -356, 684,
4277 -136, 1083, 804, 804, -708, 687, 878, 454, 1223, 560,
4278 841, 141, 1090, 391, -64, 276, 234, 276, 141, 141,
4279 921, 872, -112, 831, 650, 470, -356, -356, 804, 234,
4280 -97, 899, 1157, -708, -64, 650, 470, -134, 276, 564,
4281 565, 392, 393, 302, 574, 1100, -98, 887, 927, 574,
4282 1072, 904, -709, 833, 841, 224, -137, -134, -134, 491,
4283 728, -134, 729, 391, 884, 291, 1193, 1083, 508, 525,
4284 533, 391, 566, -703, 833, 462, -137, -137, 841, -835,
4285 -137, -709, -356, 525, 362, 493, -836, 226, 875, -704,
4286 496, 392, 488, 949, 670, 831, 505, 394, 1192, 392,
4287 456, -703, -703, 886, 506, 143, 234, 391, 362, -149,
4288 -64, 518, 141, 1380, 143, 836, 1072, -704, -704, -148,
4289 1201, 584, 931, 302, 527, 528, 1230, 1115, 1115, -711,
4290 -140, -713, 584, 143, 305, 392, 521, 992, 527, 528,
4291 -139, 1285, 777, 1081, 1320, 837, 906, 489, 908, -144,
4292 512, 909, 910, 515, 1335, -97, 338, -703, -711, -713,
4293 -713, -97, 807, 1145, 1145, 141, 1023, 820, 1024, 1250,
4294 -135, -98, 1252, -704, 386, 387, 388, -98, 1298, -145,
4295 983, 520, 985, 1272, 795, 1175, 1177, 584, 798, -714,
4296 -710, 522, 535, 143, 143, 958, 984, 833, 439, 1195,
4297 -136, 965, 540, 972, 399, 972, 399, 833, 1277, 1081,
4298 141, 1281, -712, 141, 1317, -713, 1215, -714, -714, -710,
4299 -349, 143, 787, 305, -703, 276, 997, -704, 1399, -143,
4300 224, 1300, 1401, 681, 687, 595, 476, 1271, 886, 446,
4301 729, -712, 967, 291, 852, 687, 477, 478, -349, -349,
4302 -134, 602, 1115, -703, 611, 729, -704, 291, 543, 804,
4303 804, 143, 682, 445, 1003, 804, 804, -722, 143, 143,
4304 141, 598, 141, -714, 554, 664, 555, 556, 557, 558,
4305 559, 668, 897, 525, 1408, 1276, 1056, 673, 1145, 584,
4306 1055, 685, 584, 141, 234, 507, 918, -839, 1368, 688,
4307 560, 808, 1195, 1269, -349, 700, 650, 470, 234, 510,
4308 399, 1081, 1195, 1195, 1081, 849, 1081, 1066, 1363, 1364,
4309 1365, 702, 1052, 525, 562, 703, 719, 276, 1384, 925,
4310 564, 565, 391, 708, 1288, 804, 530, 1391, 527, 528,
4311 -839, 1145, 1395, 276, 1303, 1306, 391, 305, 1145, 1145,
4312 804, -129, 1327, 1329, 1331, 1333, 1334, 710, 939, 711,
4313 392, 541, 143, 566, 726, 391, 336, 337, -839, -839,
4314 833, 733, 362, 754, 392, 665, 530, -357, 527, 528,
4315 1404, 727, -447, 1160, 966, 967, 1094, 1095, 763, 1271,
4316 729, 1271, 767, 392, 676, 769, 1271, 775, 1097, 1098,
4317 780, 1271, 1216, 1217, 781, -357, -357, 1178, 976, 813,
4318 1151, 796, 1155, 1206, 845, 143, 489, 1435, 1318, 1319,
4319 276, 1209, -839, 391, -839, 519, 519, 305, -835, 1167,
4320 666, 835, 1167, 855, 499, 1173, 384, 385, 386, 387,
4321 388, 1173, 1173, 913, 276, 833, 1202, 852, 584, 677,
4322 915, 392, 947, 1188, 1188, 924, 243, 1269, 932, 302,
4323 143, -357, 1269, 143, 918, 933, 1081, 1271, 1081, 1271,
4324 1081, 1271, 1081, 1271, 391, 937, 143, -329, 1232, 1233,
4325 141, 1145, 391, 940, 1240, 1409, 1410, 1412, 1413, 234,
4326 1406, 525, 1271, 1314, 941, 1026, 1312, 943, 944, 367,
4327 368, 1241, 392, 1310, 952, 945, 957, 948, 1274, 362,
4328 392, 1397, 276, 962, 967, 276, 276, 995, 1049, 972,
4329 143, 276, 143, 498, 1010, 1286, 375, 376, 779, 1012,
4330 1059, 1113, 1113, 833, 1014, 1437, 833, 1269, 525, 40,
4331 41, 42, 43, 143, 531, 276, 527, 528, 276, 399,
4332 291, 1081, 1313, 379, 380, 1016, 833, -333, 1311, 1043,
4333 143, 143, 1149, 328, 1086, 1087, 677, 1324, 1152, 1205,
4334 381, 382, 383, 384, 385, 386, 387, 388, -331, 1165,
4335 1096, 302, 141, 1169, 525, 1185, 143, 1171, 1174, 276,
4336 1176, 530, 972, 527, 528, 1359, 1285, 1182, 141, 1113,
4337 1113, 1212, 446, 1113, 276, 1241, 1167, 1213, 1173, 1173,
4338 1173, 1173, 1173, 1214, 691, 1159, 1283, 1167, 1282, 1167,
4339 1113, 1101, 1210, 1341, 1309, 699, 445, 1321, 701, 1341,
4340 525, 1341, 1322, 704, 1326, 1374, 1375, 743, 1328, 527,
4341 528, 141, 141, 833, 833, 833, 1330, 1332, 1337, 1339,
4342 1144, 1144, 1344, 302, 1392, 724, 1113, 1349, 1352, 399,
4343 399, 362, 1353, 1356, 1358, 481, 1381, 1396, 1411, 650,
4344 470, 1415, 965, 544, 1155, 141, -835, 1417, 375, 376,
4345 1419, 1421, 276, 748, 1426, 527, 528, -836, 1207, 1113,
4346 36, 37, 1113, 39, 1440, 1405, 483, 330, 554, 141,
4347 555, 556, 557, 558, 723, 833, 1113, 725, 1113, 990,
4348 1231, 1113, 1113, 1234, 1407, 405, 1113, 1113, 1144, 1144,
4349 806, 410, 1144, 706, 383, 384, 385, 386, 387, 388,
4350 143, 1376, 276, 555, 556, 557, 558, 1202, 1208, 1144,
4351 772, 1173, 1173, 1173, 1173, 427, 1167, 390, 362, 1341,
4352 1341, 877, 1054, 1341, 1341, 101, 1316, 1341, 1064, 1007,
4353 1021, 1022, 1343, 1228, 972, 375, 376, 141, 811, 1027,
4354 141, 141, 1028, 1386, 1030, 1144, 141, 36, 37, 911,
4355 39, 607, 1262, 1394, 1189, 1113, 612, 45, 46, 1431,
4356 1342, 1173, 1341, 1341, 1341, 1341, 993, 606, 1357, 1429,
4357 141, 1294, 1341, 141, 1295, 1287, 101, 101, 1144, 1371,
4358 303, 1144, 384, 385, 386, 387, 388, 143, 143, 1372,
4359 460, 323, 749, 143, 143, 1144, 440, 1144, 597, 458,
4360 1144, 1144, 143, 922, 1164, 1144, 1144, 331, 332, 333,
4361 334, 335, 1427, 303, 141, 930, 0, 1113, 143, 0,
4362 876, 1113, 0, 1113, 0, 0, 0, 323, 323, 141,
4363 0, 323, 412, 423, 423, 0, 0, 323, 323, 323,
4364 0, 0, 0, 881, 883, 0, 0, 0, 0, 0,
4365 916, 0, 0, 0, 916, 425, 0, 696, 697, 0,
4366 0, 143, 143, 143, 84, 0, 0, 881, 883, 896,
4367 0, 0, 0, 0, 1144, 0, 481, 0, 143, 1346,
4368 0, 1350, 0, 712, 0, 0, 0, 720, 721, 722,
4369 914, 1113, 0, 0, 554, 143, 555, 556, 557, 558,
4370 554, 0, 555, 556, 557, 558, 0, 141, 0, 0,
4371 0, 0, 0, 0, 0, 84, 84, 0, 0, 143,
4372 0, 0, 0, 0, 0, 0, 0, 425, 0, 554,
4373 84, 555, 556, 557, 558, 559, 1144, 0, 0, 0,
4374 1144, 0, 1144, 0, 756, 0, 0, 0, 0, 757,
4375 756, 0, 0, 0, 323, 560, 323, 141, 0, 323,
4376 323, 0, 0, 0, 0, 101, 84, 84, 0, 561,
4377 84, 0, 0, 0, 101, 0, 84, 84, 84, 562,
4378 0, 0, 0, 0, 563, 564, 565, 143, 0, 0,
4379 143, 143, 0, 101, 1136, 1136, 143, 0, 0, 1416,
4380 1418, 0, 989, 1420, 1422, 0, 0, 1425, 0, 0,
4381 1144, 0, 0, 0, 0, 994, 0, 996, 566, 0,
4382 143, 567, 303, 143, 0, 0, 0, 0, 0, 0,
4383 0, 0, 0, 0, 1069, 896, 0, 1082, 0, 0,
4384 0, 1005, 1438, 1439, 1441, 1442, 1088, 0, 1089, 842,
4385 1091, 0, 1444, 101, 101, 323, 323, 323, 323, 0,
4386 323, 323, 1136, 1136, 143, 0, 1136, 0, 0, 0,
4387 0, 0, 0, 0, 0, 0, 0, 0, 0, 143,
4388 0, 101, 303, 1136, 0, 0, 0, 0, 0, 0,
4389 1084, 0, 0, 84, 0, 84, 0, 0, 84, 84,
4390 1040, 1042, 0, 1082, 84, 888, 1046, 1048, 0, 0,
4391 0, 0, 0, 84, 0, 0, 0, 0, 323, 1136,
4392 0, 101, 0, 0, 0, 0, 0, 323, 101, 101,
4393 0, 0, 84, 0, 0, 0, 0, 0, 0, 0,
4394 0, 0, 0, 323, 0, 1040, 1042, 0, 1046, 1048,
4395 0, 0, 1136, 0, 0, 1136, 1084, 143, 0, 0,
4396 0, 0, 0, 0, 1070, 0, 0, 0, 0, 1136,
4397 0, 1136, 0, 0, 1136, 1136, 0, 0, 323, 1136,
4398 1136, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4399 0, 1148, 84, 84, 84, 84, 84, 84, 0, 84,
4400 84, 0, 0, 0, 0, 1249, 0, 143, 0, 0,
4401 1253, 0, 0, 323, 0, 1148, 1257, 0, 0, 1270,
4402 84, 0, 101, 0, 953, 954, 0, 0, 0, 0,
4403 1070, 0, 959, 960, 0, 0, 0, 0, 0, 0,
4404 0, 0, 0, 0, 303, 0, 323, 0, 1136, 0,
4405 0, 0, 1243, 0, 0, 0, 1243, 84, 1084, 0,
4406 84, 1084, 0, 1084, 0, 0, 84, 84, 84, 0,
4407 0, 0, 1273, 0, 0, 101, 0, 0, 0, 0,
4408 0, 0, 84, 0, 0, 0, 998, 999, 0, 1001,
4409 1002, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4410 0, 0, 0, 554, 0, 555, 556, 557, 558, 559,
4411 1136, 0, 0, 0, 1136, 0, 1136, 84, 0, 323,
4412 101, 0, 323, 101, 0, 0, 0, 0, 0, 560,
4413 0, 323, 1070, 303, 0, 1070, 823, 1070, 0, 0,
4414 0, 1029, 0, 561, 0, 0, 1258, 0, 0, 0,
4415 1302, 0, 84, 562, 1044, 0, 0, 0, 563, 564,
4416 565, 84, 1382, 0, 1383, 0, 1385, 0, 0, 0,
4417 0, 0, 0, 1390, 0, 0, 0, 0, 0, 0,
4418 101, 0, 101, 1398, 1136, 84, 0, 0, 0, 0,
4419 323, 0, 566, 0, 0, 567, 1068, 0, 0, 0,
4420 0, 323, 0, 101, 323, 0, 1351, 0, 0, 0,
4421 0, 0, 0, 1084, 84, 1084, 1355, 1084, 0, 1084,
4422 823, 823, 0, 0, 1243, 0, 1273, 0, 0, 0,
4423 323, 1273, 0, 1360, 1361, 1362, 1273, 0, 0, 0,
4424 0, 0, 0, 0, 0, 1432, 823, 0, 0, 0,
4425 0, 1433, 0, 1434, 0, 1436, 0, 303, 84, 84,
4426 0, 84, 84, 0, 0, 0, 0, 0, 0, 0,
4427 84, 0, 0, 0, 1443, 84, 0, 0, 0, 0,
4428 0, 1137, 1137, 0, 0, 0, 0, 1070, 0, 1070,
4429 0, 1070, 0, 1070, 0, 0, 0, 0, 1084, 0,
4430 1258, 0, 1273, 0, 1273, 1258, 1273, 0, 1273, 0,
4431 1258, 0, 0, 0, 0, 0, 0, 0, 0, 84,
4432 0, 84, 0, 0, 0, 0, 0, 1273, 0, 84,
4433 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
4434 84, 0, 84, 84, 0, 0, 0, 0, 0, 1137,
4435 1137, 0, 0, 1137, 0, 0, 0, 0, 0, 84,
4436 84, 0, 0, 0, 0, 0, 0, 0, 0, 84,
4437 1137, 0, 1070, 0, 0, 0, 1258, 0, 1258, 0,
4438 1258, 0, 1258, 0, 0, 84, 0, 323, 0, 323,
4439 101, 0, 0, 0, 0, 0, 0, 0, 0, 1284,
4440 0, 1258, 0, 0, 0, 0, 1137, 0, 112, 0,
4441 0, 0, 0, 0, 0, 0, 0, 22, 23, 24,
4442 25, 0, 0, 554, 0, 555, 556, 557, 558, 559,
4443 0, 0, 0, 31, 32, 33, 0, 0, 0, 1137,
4444 0, 0, 1137, 40, 41, 42, 43, 44, 0, 560,
4445 0, 0, 0, 0, 0, 323, 1137, 0, 1137, 112,
4446 112, 1137, 1137, 561, 0, 0, 1137, 1137, 0, 0,
4447 0, 0, 323, 562, 112, 0, 0, 823, 823, 564,
4448 565, 0, 0, 823, 823, 0, 0, 0, 0, 0,
4449 0, 0, 101, 323, 57, 58, 59, 60, 61, 62,
4450 63, 64, 65, 0, 0, 0, 0, 0, 101, 0,
4451 112, 112, 566, 0, 112, 0, 0, 0, 0, 0,
4452 112, 112, 112, 0, 0, 0, 84, 0, 84, 84,
4453 0, 297, 0, 0, 0, 1137, 554, 0, 555, 556,
4454 557, 558, 559, 0, 0, 0, 0, 116, 0, 0,
4455 0, 101, 101, 823, 0, 0, 0, 0, 0, 0,
4456 0, 0, 560, 0, 0, 0, 0, 0, 823, 0,
4457 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4458 0, 0, 0, 0, 0, 101, 562, 0, 0, 0,
4459 0, 563, 564, 565, 84, 0, 0, 1137, 116, 116,
4460 0, 1137, 0, 1137, 0, 0, 0, 0, 0, 101,
4461 0, 84, 0, 116, 0, 0, 84, 84, 0, 0,
4462 0, 0, 84, 84, 0, 566, 0, 0, 567, 0,
4463 0, 84, 84, 0, 0, 0, 0, 112, 0, 112,
4464 0, 0, 112, 112, 0, 0, 0, 84, 112, 116,
4465 116, 0, 0, 116, 0, 0, 0, 112, 0, 116,
4466 116, 116, 0, 0, 0, 0, 0, 0, 0, 0,
4467 0, 1137, 0, 1226, 0, 0, 112, 101, 0, 0,
4468 101, 101, 0, 0, 0, 0, 101, 0, 0, 0,
4469 84, 84, 84, 0, 0, 0, 0, 0, 0, 0,
4470 0, 0, 0, 0, 0, 0, 0, 84, 0, 0,
4471 101, 0, 0, 101, 0, 0, 0, 0, 0, 0,
4472 0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4473 0, 0, 323, 0, 1138, 1138, 112, 112, 112, 112,
4474 112, 112, 0, 112, 112, 0, 0, 0, 84, 0,
4475 0, 0, 0, 0, 101, 0, 0, 0, 0, 0,
4476 0, 0, 0, 0, 112, 0, 0, 0, 0, 101,
4477 0, 0, 0, 0, 0, 0, 116, 0, 116, 0,
4478 0, 116, 116, 0, 0, 0, 0, 116, 0, 0,
4479 0, 0, 0, 0, 0, 1348, 116, 0, 0, 0,
4480 0, 112, 1138, 1138, 112, 0, 1138, 0, 0, 0,
4481 112, 112, 112, 0, 0, 116, 84, 0, 0, 84,
4482 84, 0, 0, 1138, 0, 84, 112, 0, 0, 0,
4483 0, 0, 0, 0, 0, 323, 0, 0, 0, 0,
4484 0, 0, 323, 323, 0, 0, 0, 101, 0, 84,
4485 0, 0, 84, 0, 0, 0, 0, 0, 0, 1138,
4486 0, 112, 0, 0, 0, 0, 0, 1393, 0, 0,
4487 0, 84, 0, 0, 0, 116, 116, 116, 116, 116,
4488 116, 0, 116, 116, 0, 0, 0, 0, 0, 0,
4489 0, 0, 1138, 84, 0, 1138, 112, 101, 0, 0,
4490 0, 0, 0, 116, 0, 112, 0, 0, 84, 1138,
4491 0, 1138, 0, 0, 1138, 1138, 0, 0, 0, 1138,
4492 1138, 0, 0, 0, 0, 0, 0, 0, 0, 112,
4493 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4494 116, 1139, 1139, 116, 0, 0, 0, 0, 0, 116,
4495 116, 116, 0, 0, 0, 0, 0, 0, 112, 0,
4496 0, 0, 0, 0, 0, 116, 0, 0, 0, 0,
4497 0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4498 0, 84, 84, 0, 0, 0, 84, 0, 1138, 0,
4499 1140, 1140, 0, 0, 0, 0, 0, 0, 0, 0,
4500 116, 0, 112, 112, 0, 112, 112, 0, 0, 1139,
4501 1139, 0, 0, 1139, 112, 0, 0, 0, 0, 112,
4502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4503 1139, 0, 0, 0, 0, 116, 84, 0, 0, 0,
4504 0, 0, 0, 0, 116, 0, 0, 0, 0, 0,
4505 1138, 0, 0, 0, 1138, 0, 1138, 0, 1140, 1140,
4506 0, 0, 1140, 112, 0, 112, 1139, 0, 116, 0,
4507 0, 0, 0, 112, 0, 0, 0, 0, 0, 1140,
4508 0, 0, 0, 0, 112, 0, 112, 112, 0, 0,
4509 0, 0, 0, 0, 0, 0, 0, 116, 0, 1139,
4510 0, 0, 1139, 112, 112, 0, 0, 0, 0, 0,
4511 0, 0, 0, 112, 0, 1140, 1139, 0, 1139, 0,
4512 0, 1139, 1139, 0, 1138, 0, 1139, 1139, 0, 112,
4513 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4514 0, 116, 116, 0, 116, 116, 0, 0, 1140, 0,
4515 0, 1140, 0, 116, 0, 0, 0, 0, 116, 0,
4516 0, 0, 1141, 1141, 0, 1140, 0, 1140, 0, 0,
4517 1140, 1140, 0, 0, 0, 1140, 1140, 0, 0, 0,
4518 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4519 0, 0, 0, 0, 0, 1139, 0, 0, 0, 0,
4520 0, 0, 116, 0, 116, 0, 0, 0, 0, 0,
4521 0, 0, 116, 0, 0, 0, 0, 0, 0, 0,
4522 0, 0, 0, 116, 0, 116, 116, 0, 0, 0,
4523 1141, 1141, 0, 0, 1141, 0, 0, 0, 0, 0,
4524 0, 0, 116, 116, 1140, 0, 0, 0, 0, 0,
4525 0, 1141, 116, 0, 0, 0, 0, 1139, 0, 0,
4526 0, 1139, 0, 1139, 0, 0, 0, 0, 116, 0,
4527 112, 0, 112, 112, 0, 0, 0, 0, 0, 0,
4528 0, 1142, 1142, 0, 0, 0, 0, 1141, 0, 80,
4529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4530 0, 0, 0, 0, 0, 0, 1140, 0, 0, 0,
4531 1140, 0, 1140, 0, 0, 0, 0, 0, 0, 0,
4532 1141, 0, 0, 1141, 0, 0, 0, 0, 0, 0,
4533 0, 1139, 0, 0, 0, 0, 0, 1141, 112, 1141,
4534 80, 80, 1141, 1141, 299, 0, 0, 1141, 1141, 1142,
4535 1142, 0, 0, 1142, 0, 112, 0, 0, 0, 0,
4536 112, 112, 0, 0, 0, 0, 112, 112, 0, 0,
4537 1142, 0, 0, 0, 0, 112, 112, 299, 0, 0,
4538 1140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4539 0, 112, 0, 0, 0, 0, 299, 299, 299, 0,
4540 0, 80, 80, 80, 0, 0, 1142, 0, 0, 116,
4541 0, 116, 116, 0, 0, 0, 1141, 0, 0, 0,
4542 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4543 0, 0, 0, 0, 112, 112, 112, 0, 0, 1142,
4544 0, 0, 1142, 0, 0, 0, 0, 0, 0, 0,
4545 0, 112, 0, 1143, 1143, 0, 1142, 0, 1142, 0,
4546 0, 1142, 1142, 0, 0, 0, 1142, 1142, 112, 0,
4547 0, 0, 0, 0, 0, 0, 0, 116, 1141, 0,
4548 0, 0, 1141, 0, 1141, 0, 0, 0, 0, 0,
4549 0, 0, 112, 0, 116, 0, 0, 0, 0, 116,
4550 116, 0, 0, 0, 0, 116, 116, 0, 0, 0,
4551 0, 0, 0, 0, 116, 116, 0, 0, 80, 0,
4552 80, 1143, 1143, 0, 0, 1143, 0, 0, 0, 80,
4553 116, 0, 0, 0, 0, 1142, 0, 0, 80, 0,
4554 0, 0, 1143, 0, 0, 0, 0, 0, 0, 0,
4555 0, 0, 1141, 0, 81, 0, 0, 80, 0, 0,
4556 112, 0, 0, 112, 112, 0, 0, 0, 0, 112,
4557 0, 0, 0, 116, 116, 116, 0, 0, 1143, 0,
4558 0, 0, 0, 0, 0, 0, 299, 0, 0, 0,
4559 116, 0, 0, 112, 0, 0, 112, 1142, 0, 0,
4560 0, 1142, 0, 1142, 0, 81, 81, 116, 0, 300,
4561 0, 1143, 0, 0, 1143, 112, 0, 80, 80, 0,
4562 0, 0, 0, 0, 0, 0, 0, 0, 1143, 0,
4563 1143, 116, 0, 1143, 1143, 0, 0, 112, 1143, 1143,
4564 0, 0, 300, 0, 0, 80, 299, 0, 0, 0,
4565 0, 0, 112, 0, 0, 0, 0, 0, 0, 0,
4566 0, 300, 300, 300, 0, 0, 81, 81, 81, 0,
4567 0, 1142, 0, 0, 0, 0, 0, 0, 0, 0,
4568 0, 0, 80, 0, 0, 80, 0, 0, 0, 0,
4569 0, 0, 80, 80, 0, 0, 0, 0, 0, 116,
4570 0, 0, 116, 116, 0, 0, 0, 1143, 116, 0,
4571 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
4572 0, 0, 0, 0, 0, 112, 112, 0, 0, 0,
4573 112, 0, 116, 0, 0, 116, 0, 0, 0, 0,
4574 0, 0, 80, 0, 0, 0, 0, 0, 0, 0,
4575 0, 0, 0, 0, 116, 0, 0, 0, 0, 0,
4576 0, 0, 0, 0, 0, 0, 0, 0, 0, 1143,
4577 0, 0, 0, 1143, 0, 1143, 116, 80, 0, 0,
4578 112, 0, 0, 81, 0, 81, 80, 0, 0, 0,
4579 0, 116, 0, 0, 81, 0, 0, 0, 0, 0,
4580 0, 0, 0, 81, 0, 0, 0, 0, 299, 0,
4581 80, 362, 363, 364, 365, 366, 367, 368, 369, 0,
4582 371, 372, 81, 0, 0, 0, 0, 0, 375, 376,
4583 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4584 0, 0, 0, 1143, 0, 0, 0, 0, 0, 0,
4585 0, 300, 0, 0, 0, 0, 0, 116, 0, 0,
4586 0, 0, 0, 0, 116, 116, 0, 0, 0, 116,
4587 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
4588 0, 0, 81, 81, 80, 0, 0, 80, 144, 0,
4589 0, 0, 0, 0, 0, 0, 0, 299, 0, 0,
4590 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4591 81, 300, 0, 0, 0, 0, 0, 0, 0, 116,
4592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4593 0, 0, 0, 0, 0, 0, 0, 0, 0, 144,
4594 144, 0, 0, 306, 80, 0, 80, 81, 0, 0,
4595 81, 0, 0, 0, 80, 0, 0, 81, 81, 0,
4596 0, 0, 0, 0, 0, 80, 0, 80, 0, 0,
4597 0, 0, 0, 0, 0, 0, 306, 0, 0, 0,
4598 0, 0, 0, 0, 80, 80, 0, 0, 0, 0,
4599 0, 0, 0, 0, 0, 416, 426, 426, 0, 0,
4600 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
4601 80, 0, 0, 0, 0, 0, 0, 0, -857, 0,
4602 0, 299, 0, 0, 0, 0, -857, -857, -857, 0,
4603 0, -857, -857, -857, 0, -857, 0, 0, 0, 91,
4604 0, 0, 81, -857, -857, -857, 0, 0, 0, 0,
4605 0, 81, 0, 0, 0, -857, -857, 0, -857, -857,
4606 -857, -857, -857, 0, 0, 0, 0, 0, 0, 0,
4607 0, 0, 0, 300, 0, 81, 0, 0, 0, 0,
4608 0, 0, 0, 0, 0, 0, -857, -857, 0, 0,
4609 91, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4610 0, 299, 0, 0, 81, 0, 0, 0, 0, 0,
4611 0, 0, 0, 0, 0, -857, -857, 0, 0, 0,
4612 0, 0, 0, 0, 0, 0, 0, 0, 144, 0,
4613 362, -858, -858, -858, -858, 367, 368, 144, -857, -858,
4614 -858, 0, 0, 0, 0, 0, 411, 375, 376, 81,
4615 0, 0, 81, 0, 80, 0, 144, 0, 0, 0,
4616 0, 0, 300, 0, 0, 81, 0, 0, 0, -857,
4617 -857, 0, -857, 0, 0, 230, -857, 0, -857, 0,
4618 0, 0, 0, 0, 0, 306, 0, 0, 0, 379,
4619 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
4620 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4621 0, 81, 0, 0, 0, 0, 144, 144, 0, 81,
4622 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4623 81, 0, 81, 0, 0, 0, 80, 0, 0, 0,
4624 0, 80, 80, 0, 144, 306, 0, 80, 80, 81,
4625 81, 0, 0, 0, 0, 0, 80, 0, 0, 946,
4626 362, 363, 364, 365, 366, 367, 368, 0, 0, 371,
4627 372, 0, 80, 0, 0, 81, 0, 375, 376, 91,
4628 0, 0, 0, 0, 144, 0, 300, 0, 91, 140,
4629 0, 144, 144, 362, 363, 364, 365, 366, 367, 368,
4630 369, 370, 371, 372, 373, 374, 0, 91, 0, 0,
4631 375, 376, 0, 0, 0, 80, 80, 80, 0, 379,
4632 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
4633 0, 0, 80, 0, 0, 0, 0, 0, 0, 0,
4634 140, 140, 0, 0, 304, 0, 0, 0, 0, 80,
4635 378, 0, 379, 380, 381, 382, 383, 384, 385, 386,
4636 387, 388, 0, 0, 0, 0, 300, 91, 91, 0,
4637 -298, 0, 0, 80, 0, 0, 0, 304, 0, 0,
4638 0, 0, 0, 0, 0, 144, 0, 0, 0, 0,
4639 0, 0, 0, 0, 0, 91, 414, 424, 424, 424,
4640 0, 0, 0, 0, 0, 0, 0, 306, 0, 0,
4641 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4643 0, 0, 0, 0, 0, 91, 0, 299, 144, 0,
4644 0, 80, 91, 91, 80, 80, 0, 0, 0, 0,
4645 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4646 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4647 0, 0, 0, 0, 80, 0, 0, 80, 0, 0,
4648 0, 0, 0, 144, 0, 0, 144, 0, 0, 0,
4649 0, 0, 0, 0, 0, 0, 306, 0, 0, 824,
4650 0, 81, 0, 0, 0, 0, 81, 81, 0, 0,
4651 0, 0, 81, 81, 0, 0, 0, 0, 80, 0,
4652 0, 81, 0, 0, 0, 0, 0, 0, 0, 140,
4653 0, 0, 0, 80, 0, 0, 91, 81, 140, 0,
4654 0, 0, 0, 144, 0, 144, 0, 0, 0, 0,
4655 0, 0, 0, 0, 0, 0, 0, 140, 0, 299,
4656 0, 0, 0, 0, 0, 0, 144, 0, 0, 0,
4657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4658 81, 81, 81, 824, 824, 0, 304, 0, 0, 91,
4659 0, 0, 0, 0, 0, 0, 0, 81, 0, 80,
4660 0, 0, 0, 0, 0, 0, 0, 0, 0, 824,
4661 361, 80, 0, 0, 81, 0, 0, 140, 140, 0,
4662 306, 0, 0, 0, 0, 0, 0, 0, 0, 905,
4663 0, 299, 0, 0, 91, 0, 0, 91, 81, 0,
4664 0, 0, 0, 0, 0, 140, 304, 0, 0, 0,
4665 818, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4666 0, 80, 0, 362, 363, 364, 365, 366, 367, 368,
4667 369, 370, 371, 372, 373, 374, 0, 0, 0, 0,
4668 375, 376, 0, 0, 0, 140, 377, 0, 0, 0,
4669 0, 0, 140, 140, 91, 0, 91, 0, 0, 0,
4670 306, 0, 300, 0, 0, 0, 81, 0, 0, 81,
4671 81, 0, 0, 0, 0, 81, 0, 91, 0, 0,
4672 378, 0, 379, 380, 381, 382, 383, 384, 385, 386,
4673 387, 388, 0, 0, 818, 818, 946, 0, 0, 81,
4674 0, 0, 81, 0, 0, 0, 0, 0, 0, 0,
4675 0, 0, 0, 144, 0, 0, 0, 0, 0, 0,
4676 818, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4677 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
4678 372, 373, 374, 81, 0, 0, 140, 375, 376, 0,
4679 0, 0, 0, 0, 0, 0, 0, 0, 81, 0,
4680 0, 0, 0, 0, 0, 0, 0, 0, 304, 0,
4681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4682 0, 0, 0, 0, 300, 0, 0, 378, 0, 379,
4683 380, 381, 382, 383, 384, 385, 386, 387, 388, 140,
4684 824, 824, 0, 0, 0, 0, 824, 824, 0, 0,
4685 0, 0, 0, 0, 0, 144, 0, 0, 0, 0,
4686 0, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4687 0, 144, 0, 0, 0, 0, 81, 0, 0, 0,
4688 0, 0, 0, 0, 140, 0, 0, 140, 0, 0,
4689 0, 0, 0, 0, 0, 0, 300, 304, 0, 0,
4690 0, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4691 0, 0, 0, 0, 144, 144, 824, 0, 0, 0,
4692 0, 0, 0, 0, 0, 0, 81, 0, 0, 0,
4693 0, 824, 0, 0, 0, 0, 0, 0, 0, 0,
4694 0, 0, 0, 0, 140, 0, 140, 0, 144, 0,
4695 0, 362, 363, 364, 365, 366, 367, 368, 369, 370,
4696 371, 372, 373, 374, 0, 0, 0, 140, 375, 376,
4697 0, 0, 144, 0, 0, 0, 0, 0, 0, 0,
4698 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4699 0, 818, 818, 0, 0, 0, 0, 818, 818, 0,
4700 0, 0, 0, 0, 0, 0, 91, 0, 378, 0,
4701 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
4702 0, 304, 91, 0, 0, 0, 0, 234, 0, 0,
4703 0, 0, 0, 0, 0, 0, 1229, 0, 0, 0,
4704 144, 0, 0, 144, 144, 0, 0, 0, 0, 144,
4705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4706 0, 0, 0, 0, 0, 91, 91, 818, 22, 23,
4707 24, 25, 0, 144, 0, 0, 144, 0, 0, 0,
4708 0, 0, 818, 0, 31, 32, 33, 1101, 0, 0,
4709 0, 1102, 0, 0, 40, 41, 42, 43, 44, 91,
4710 0, 304, 0, 0, 0, 0, 0, 0, 0, 0,
4711 0, 0, 0, 0, 0, 0, 0, 144, 0, 0,
4712 0, 0, 0, 91, 0, 0, 1104, 1105, 0, 0,
4713 0, 0, 144, 0, 1106, 0, 0, 1107, 0, 1108,
4714 1109, 0, 1110, 0, 0, 57, 58, 59, 60, 61,
4715 62, 63, 64, 65, 140, 0, 0, 0, 426, 0,
4716 0, 0, 0, 0, 0, 256, 264, 265, 266, 0,
4717 0, 0, 282, 282, 0, 1112, 0, 0, 0, 0,
4718 0, 0, 297, 0, 0, 322, 324, 1225, 0, 234,
4719 0, 91, 0, 0, 91, 91, 0, 0, 0, 0,
4720 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4721 144, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4722 0, 0, 0, 0, 91, 0, 0, 91, 0, 0,
4723 426, 282, 282, 282, 0, 0, 0, 0, 0, 0,
4724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4725 0, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4726 144, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4727 0, 0, 140, 0, 0, -857, 3, 0, 4, 5,
4728 6, 7, 8, 91, 0, 0, 9, 10, 0, 0,
4729 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
4730 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
4731 24, 25, 0, 0, 26, 140, 140, 0, 0, 0,
4732 27, 28, 268, 30, 31, 32, 33, 34, 35, 36,
4733 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4734 46, 0, 0, 0, 0, 0, 0, 0, 282, 140,
4735 282, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4736 0, 91, 0, 0, 0, 0, 49, 50, 0, 322,
4737 0, 0, 0, 140, 51, 0, 0, 52, 53, 54,
4738 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4739 62, 63, 64, 65, 0, -857, 282, 282, 282, 0,
4740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4741 0, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4742 0, 0, 66, 67, 68, 0, 0, 0, 0, -857,
4743 0, 0, 0, 0, 0, -857, 0, 1227, 0, 0,
4744 0, 140, 0, 0, 140, 140, 0, 0, 0, 0,
4745 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4746 0, 362, 363, 364, 365, 366, 367, 368, 369, 370,
4747 371, 372, -858, -858, 140, 0, 0, 140, 375, 376,
4748 614, 615, 616, 617, 618, 0, 0, 619, 620, 621,
4749 622, 623, 624, 625, 626, 0, 628, 0, 0, 629,
4750 630, 631, 632, 633, 634, 635, 636, 637, 638, 0,
4751 0, 0, 282, 0, 0, 0, 0, 0, 140, 0,
4752 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
4753 0, 0, 0, 140, 0, 0, 0, 0, 0, 0,
4754 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4755 0, 0, 0, 0, 0, 0, 0, 0, 0, 424,
4756 0, 0, 282, 0, 0, 0, 0, 0, 0, 0,
4757 0, 0, 282, 0, 0, 0, 0, 0, 0, 0,
4758 0, 0, 266, 0, 0, 0, 0, 0, 0, 0,
4759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4760 707, 0, 0, 0, 0, 0, 0, 282, 0, 0,
4761 0, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4762 0, 0, 0, 282, 0, 282, 0, 0, 282, 0,
4763 0, 424, -857, 3, 0, 4, 5, 6, 7, 8,
4764 282, 0, 0, 9, 10, 0, 0, 0, 11, 0,
4765 12, 13, 14, 15, 16, 17, 18, 0, 752, 0,
4766 0, 140, 19, 20, 21, 22, 23, 24, 25, 0,
4767 0, 26, 0, 0, 0, 0, 0, 27, 28, 29,
4768 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4769 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4770 0, 0, 0, 0, 0, 282, 0, 0, 47, 48,
4771 0, 0, 0, 788, 0, 0, 788, 0, 0, 0,
4772 0, 0, 0, 49, 50, 282, 0, 0, 0, 0,
4773 819, 51, 0, 0, 52, 53, 54, 55, 0, 56,
4774 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4775 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4777 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4778 67, 68, 0, 0, 282, 0, -857, 0, 0, 0,
4779 0, 0, -857, 0, 0, 282, 0, 0, 0, 0,
4780 0, 0, 0, 282, 0, 0, 282, 0, 0, 0,
4781 0, 0, 0, 0, 880, 880, 0, 0, 282, 0,
4782 282, 0, 0, 0, 0, 0, 0, 0, 788, 788,
4783 880, 0, 0, 0, 0, 0, 0, 0, 880, 880,
4784 880, 0, 0, 0, 0, 282, 0, 0, 0, 0,
4785 0, 0, -4, 3, 0, 4, 5, 6, 7, 8,
4786 -4, -4, -4, 9, 10, 0, -4, -4, 11, -4,
4787 12, 13, 14, 15, 16, 17, 18, -4, 0, 0,
4788 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4789 0, 26, 282, 0, 0, 0, 0, 27, 28, 268,
4790 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4791 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4792 -4, 282, 0, 0, 0, 0, 0, 0, 47, 48,
4793 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4794 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
4795 0, 51, 0, 282, 52, 53, 54, 55, 0, 56,
4796 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4797 65, 282, -4, 0, 0, 0, 0, 0, 0, 0,
4798 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4799 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4800 67, 68, 0, 0, -4, 0, 880, 0, 0, 0,
4801 -4, 0, 543, 0, 0, 0, 0, 22, 23, 24,
4802 25, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4803 0, 0, 0, 31, 32, 33, 1101, 0, 0, 0,
4804 1102, 0, 1103, 40, 41, 42, 43, 44, 0, 788,
4805 0, 0, 0, 0, 0, 0, 0, 0, 282, 0,
4806 0, 0, 560, 0, 0, 0, 282, 0, 0, 0,
4807 1038, 880, 880, 0, 0, 1104, 1105, 880, 880, 0,
4808 0, 282, 0, 1106, 0, 0, 1107, 0, 1108, 1109,
4809 0, 1110, 564, 282, 57, 58, 1111, 60, 61, 62,
4810 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4811 0, 0, 0, 282, 0, 788, 880, 880, 0, 880,
4812 880, 0, 0, 0, 1112, 0, 0, 0, 0, 0,
4813 0, 297, 0, 0, 0, 0, 0, 0, 0, 1092,
4814 1093, 0, 0, 282, 0, 0, 0, 880, 1099, -4,
4815 3, 0, 4, 5, 6, 7, 8, 0, 0, 0,
4816 9, 10, 880, 0, 0, 11, 0, 12, 13, 14,
4817 15, 16, 17, 18, 0, 0, 0, 0, 282, 19,
4818 20, 21, 22, 23, 24, 25, 880, 0, 26, 0,
4819 0, 0, 0, 0, 27, 28, 29, 30, 31, 32,
4820 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4821 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
4822 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4823 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4824 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
4825 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
4826 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4827 0, 0, 0, 0, 0, 0, 282, 0, 0, 0,
4828 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4829 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4830 0, -4, -839, 0, 0, 0, 0, 0, 0, 543,
4831 -839, -839, -839, 0, 0, -839, -839, -839, 0, -839,
4832 0, 0, 0, 0, 0, 0, 0, -839, -839, -839,
4833 -839, -839, 0, 0, 0, 0, 0, 0, 0, -839,
4834 -839, 0, -839, -839, -839, -839, -839, 0, 0, 0,
4835 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
4836 372, 373, 374, 0, 0, 0, 0, 375, 376, 0,
4837 -839, -839, 0, 0, 0, 0, 0, 0, 0, 0,
4838 -839, -839, -839, -839, -839, -839, -839, -839, -839, -839,
4839 -839, -839, -839, 0, 0, 0, 0, -839, -839, -839,
4840 -839, 0, 890, -839, 0, 0, 0, 378, -839, 379,
4841 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
4842 0, 0, -839, 0, 0, -839, 0, 0, 0, 282,
4843 0, 0, 0, 0, 0, 0, -146, -839, -839, -839,
4844 -839, -839, -839, -839, -839, -839, -839, -839, -839, 0,
4845 0, 0, 0, -839, -839, -839, -839, -839, -703, 0,
4846 -839, -839, -839, 0, 0, 0, -703, -703, -703, 0,
4847 0, -703, -703, -703, 0, -703, 0, 0, 0, 0,
4848 0, 0, 0, -703, 0, -703, -703, -703, 0, 0,
4849 0, 0, 0, 0, 0, -703, -703, 0, -703, -703,
4850 -703, -703, -703, 0, 0, 0, 0, 0, 0, 0,
4851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4852 0, 0, 0, 0, 0, 0, -703, -703, 0, 0,
4853 0, 0, 0, 0, 0, 0, -703, -703, -703, -703,
4854 -703, -703, -703, -703, -703, -703, -703, -703, -703, 0,
4855 0, 0, 0, -703, -703, -703, -703, 0, -703, -703,
4856 0, 0, 0, 0, -703, 0, 0, 0, 0, 0,
4857 0, 0, 0, 0, 0, 0, 0, 0, -703, 0,
4858 0, -703, 0, 0, 0, 0, 0, 0, 0, 0,
4859 0, 0, -703, -703, -703, -703, -703, -703, -703, -703,
4860 -703, -703, -703, -703, -703, 0, 0, 0, 0, 0,
4861 -703, -703, -703, -703, -704, 0, -703, -703, -703, 0,
4862 0, 0, -704, -704, -704, 0, 0, -704, -704, -704,
4863 0, -704, 0, 0, 0, 0, 0, 0, 0, -704,
4864 0, -704, -704, -704, 0, 0, 0, 0, 0, 0,
4865 0, -704, -704, 0, -704, -704, -704, -704, -704, 0,
4866 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4868 0, 0, -704, -704, 0, 0, 0, 0, 0, 0,
4869 0, 0, -704, -704, -704, -704, -704, -704, -704, -704,
4870 -704, -704, -704, -704, -704, 0, 0, 0, 0, -704,
4871 -704, -704, -704, 0, -704, -704, 0, 0, 0, 0,
4872 -704, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4873 0, 0, 0, 0, -704, 0, 0, -704, 0, 0,
4874 0, 0, 0, 0, 0, 0, 0, 0, -704, -704,
4875 -704, -704, -704, -704, -704, -704, -704, -704, -704, -704,
4876 -704, 0, 0, 0, 0, 0, -704, -704, -704, -704,
4877 -840, 0, -704, -704, -704, 0, 0, 0, -840, -840,
4878 -840, 0, 0, -840, -840, -840, 0, -840, 0, 0,
4879 0, 0, 0, 0, 0, -840, -840, -840, -840, -840,
4880 0, 0, 0, 0, 0, 0, 0, -840, -840, 0,
4881 -840, -840, -840, -840, -840, 0, 0, 0, 0, 0,
4882 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4883 0, 0, 0, 0, 0, 0, 0, 0, -840, -840,
4884 0, 0, 0, 0, 0, 0, 0, 0, -840, -840,
4885 -840, -840, -840, -840, -840, -840, -840, -840, -840, -840,
4886 -840, 0, 0, 0, 0, -840, -840, -840, -840, 0,
4887 0, -840, 0, 0, 0, 0, -840, 0, 0, 0,
4888 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4889 -840, 0, 0, -840, 0, 0, 0, 0, 0, 0,
4890 0, 0, 0, 0, 0, -840, -840, -840, -840, -840,
4891 -840, -840, -840, -840, -840, -840, -840, 0, 0, 0,
4892 0, -840, -840, -840, -840, -840, -841, 0, -840, -840,
4893 -840, 0, 0, 0, -841, -841, -841, 0, 0, -841,
4894 -841, -841, 0, -841, 0, 0, 0, 0, 0, 0,
4895 0, -841, -841, -841, -841, -841, 0, 0, 0, 0,
4896 0, 0, 0, -841, -841, 0, -841, -841, -841, -841,
4897 -841, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4899 0, 0, 0, 0, -841, -841, 0, 0, 0, 0,
4900 0, 0, 0, 0, -841, -841, -841, -841, -841, -841,
4901 -841, -841, -841, -841, -841, -841, -841, 0, 0, 0,
4902 0, -841, -841, -841, -841, 0, 0, -841, 0, 0,
4903 0, 0, -841, 0, 0, 0, 0, 0, 0, 0,
4904 0, 0, 0, 0, 0, 0, -841, 0, 0, -841,
4905 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4906 0, -841, -841, -841, -841, -841, -841, -841, -841, -841,
4907 -841, -841, -841, 0, 0, 0, 0, -841, -841, -841,
4908 -841, -841, -517, 0, -841, -841, -841, 0, 0, 0,
4909 -517, -517, -517, 0, 0, -517, -517, -517, 0, -517,
4910 0, 0, 0, 0, 0, 0, 0, -517, -517, -517,
4911 -517, 0, 0, 0, 0, 0, 0, 0, 0, -517,
4912 -517, 0, -517, -517, -517, -517, -517, 0, 0, 0,
4913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4915 -517, -517, 0, 0, 0, 0, 0, 0, 0, 0,
4916 -517, -517, -517, -517, -517, -517, -517, -517, -517, -517,
4917 -517, -517, -517, 0, 0, 0, 0, -517, -517, -517,
4918 -517, 0, 0, -517, 0, 0, 0, 0, -517, 0,
4919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4920 0, 0, -517, 0, 0, 0, 0, 0, 0, 0,
4921 0, 0, 0, 0, 0, 0, 0, -517, 0, -517,
4922 -517, -517, -517, -517, -517, -517, -517, -517, -517, 0,
4923 0, 0, 0, -517, -517, -517, -517, -517, -350, 230,
4924 -517, -517, -517, 0, 0, 0, -350, -350, -350, 0,
4925 0, -350, -350, -350, 0, -350, 0, 0, 0, 0,
4926 0, 0, 0, -350, 0, -350, -350, -350, 0, 0,
4927 0, 0, 0, 0, 0, -350, -350, 0, -350, -350,
4928 -350, -350, -350, 0, 0, 0, 0, 0, 0, 0,
4929 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4930 0, 0, 0, 0, 0, 0, -350, -350, 0, 0,
4931 0, 0, 0, 0, 0, 0, -350, -350, -350, -350,
4932 -350, -350, -350, -350, -350, -350, -350, -350, -350, 0,
4933 0, 0, 0, -350, -350, -350, -350, 0, 0, -350,
4934 0, 0, 0, 0, -350, 0, 0, 0, 0, 0,
4935 0, 0, 0, 0, 0, 0, 0, 0, -350, 0,
4936 0, -350, 0, 0, 0, 0, 0, 0, 0, 0,
4937 0, 0, 0, -350, -350, -350, -350, -350, -350, -350,
4938 -350, -350, -350, -350, -350, 0, 0, 0, 0, 0,
4939 -350, -350, -350, -350, -857, 0, -350, -350, -350, 0,
4940 0, 0, -857, -857, -857, 0, 0, -857, -857, -857,
4941 0, -857, 0, 0, 0, 0, 0, 0, 0, -857,
4942 -857, -857, -857, 0, 0, 0, 0, 0, 0, 0,
4943 0, -857, -857, 0, -857, -857, -857, -857, -857, 0,
4944 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4945 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4946 0, 0, -857, -857, 0, 0, 0, 0, 0, 0,
4947 0, 0, -857, -857, -857, -857, -857, -857, -857, -857,
4948 -857, -857, -857, -857, -857, 0, 0, 0, 0, -857,
4949 -857, -857, -857, 0, 0, -857, 0, 0, 0, 0,
4950 -857, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4951 0, 0, 0, 0, -857, 0, 0, 0, 0, 0,
4952 0, 0, 0, 0, 0, 0, 0, 0, 0, -857,
4953 0, -857, -857, -857, -857, -857, -857, -857, -857, -857,
4954 -857, 0, 0, 0, 0, -857, -857, -857, -857, -857,
4955 -356, 230, -857, -857, -857, 0, 0, 0, -356, -356,
4956 -356, 0, 0, -356, -356, -356, 0, -356, 0, 0,
4957 0, 0, 0, 0, 0, -356, 0, -356, -356, 0,
4958 0, 0, 0, 0, 0, 0, 0, -356, -356, 0,
4959 -356, -356, -356, -356, -356, 0, 0, 0, 0, 0,
4960 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4961 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4962 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4963 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4964 -356, 0, 0, 0, 0, -356, -356, -356, -356, 0,
4965 891, -356, 0, 0, 0, 0, -356, 0, 0, 0,
4966 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4967 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4968 0, 0, 0, 0, -147, -356, 0, -356, -356, -356,
4969 -356, -356, -356, -356, -356, -356, -356, 0, 0, 0,
4970 0, 830, -356, -356, -356, -356, -363, 0, -356, -356,
4971 -356, 0, 0, 0, -363, -363, -363, 0, 0, -363,
4972 -363, -363, 0, -363, 0, 0, 0, 0, 0, 0,
4973 0, -363, 0, -363, -363, 0, 0, 0, 0, 0,
4974 0, 0, 0, -363, -363, 0, -363, -363, -363, -363,
4975 -363, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4976 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4977 0, 0, 0, 0, -363, -363, 0, 0, 0, 0,
4978 0, 0, 0, 0, -363, -363, -363, -363, -363, -363,
4979 -363, -363, -363, -363, -363, -363, -363, 0, 0, 0,
4980 0, -363, -363, -363, -363, 0, 0, -363, 0, 0,
4981 0, 0, -363, 0, 0, 0, 0, 0, 0, 0,
4982 0, 0, 0, 0, 0, 0, -363, 0, 0, 0,
4983 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4984 0, -363, 0, -363, -363, -363, -363, -363, -363, -363,
4985 -363, -363, -363, 0, 0, 0, 0, 0, -363, -363,
4986 -363, -363, -393, 454, -363, -363, -363, 0, 0, 0,
4987 -393, -393, -393, 0, 0, -393, -393, -393, 0, -393,
4988 0, 0, 0, 0, 0, 0, 0, -393, 0, -393,
4989 -393, 0, 0, 0, 0, 0, 0, 0, 0, -393,
4990 -393, 0, -393, -393, -393, -393, -393, 0, 0, 0,
4991 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4992 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4993 -393, -393, 0, 0, 0, 0, 0, 0, 0, 0,
4994 -393, -393, -393, -393, -393, -393, -393, -393, -393, -393,
4995 -393, -393, -393, 0, 0, 0, 0, -393, -393, -393,
4996 -393, 0, 0, -393, 0, 0, 0, 0, -393, 0,
4997 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4998 0, 0, -393, 0, 0, 0, 0, 0, 0, 0,
4999 0, 0, 0, 0, 0, 0, 0, -393, 0, -393,
5000 -393, -393, -393, -393, -393, -393, -393, -393, -393, 0,
5001 0, 0, 0, 0, -393, -393, -393, -393, -394, 0,
5002 -393, -393, -393, 0, 0, 0, -394, -394, -394, 0,
5003 0, -394, -394, -394, 0, -394, 0, 0, 0, 0,
5004 0, 0, 0, -394, 0, -394, -394, 0, 0, 0,
5005 0, 0, 0, 0, 0, -394, -394, 0, -394, -394,
5006 -394, -394, -394, 0, 0, 0, 0, 0, 0, 0,
5007 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5008 0, 0, 0, 0, 0, 0, -394, -394, 0, 0,
5009 0, 0, 0, 0, 0, 0, -394, -394, -394, -394,
5010 -394, -394, -394, -394, -394, -394, -394, -394, -394, 0,
5011 0, 0, 0, -394, -394, -394, -394, 0, 0, -394,
5012 0, 0, 0, 0, -394, 0, 0, 0, 0, 0,
5013 0, 0, 0, 0, 0, 0, 0, 0, -394, 0,
5014 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5015 0, 0, 0, -394, 0, -394, -394, -394, -394, -394,
5016 -394, -394, -394, -394, -394, 0, 0, 0, 0, 0,
5017 -394, -394, -394, -394, -360, 0, -394, -394, -394, 0,
5018 0, 0, -360, -360, -360, 0, 0, -360, -360, -360,
5019 0, -360, 0, 0, 0, 0, 0, 0, 0, -360,
5020 0, -360, -360, 0, 0, 0, 0, 0, 0, 0,
5021 0, -360, -360, 0, -360, -360, -360, -360, -360, 0,
5022 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5023 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5024 0, 0, -360, -360, 0, 0, 0, 0, 0, 0,
5025 0, 0, -360, -360, -360, -360, -360, -360, -360, -360,
5026 -360, -360, -360, -360, -360, 0, 0, 0, 0, -360,
5027 -360, -360, -360, 0, 0, -360, 0, 0, 0, 0,
5028 -360, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5029 0, 0, 0, 0, -360, 0, 0, 0, 0, 0,
5030 0, 0, 0, 0, 0, 0, 0, 0, 0, -360,
5031 0, -360, -360, -360, -360, -360, -360, -360, -360, -360,
5032 -360, 0, 0, 0, 0, 0, -360, -360, -360, -360,
5033 -839, 0, -360, -360, -360, 0, 0, 0, -839, -839,
5034 -839, 0, 0, 0, -839, -839, 0, -839, 0, 0,
5035 0, 0, 0, 0, 0, -839, -839, 0, 0, 0,
5036 0, 0, 0, 0, 0, 0, 0, -839, -839, 0,
5037 -839, -839, -839, -839, -839, 0, 0, 0, 0, 0,
5038 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5039 0, 0, 0, 0, 0, 0, 0, 0, -839, -839,
5040 0, 0, 0, 0, 0, 0, 0, 0, -839, -839,
5041 -839, -839, -839, -839, -839, -839, -839, -839, -839, -839,
5042 -839, 0, 0, 0, 0, -839, -839, -839, -839, 0,
5043 828, -839, 0, 0, 0, 0, 0, 0, 0, 0,
5044 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5045 -839, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5046 0, 0, 0, 0, -146, -839, 0, -839, -839, -839,
5047 -839, -839, -839, -839, -839, -839, -839, 0, 0, 0,
5048 0, -839, -839, -839, -839, -137, -839, 0, -839, 0,
5049 -839, 0, 0, 0, -839, -839, -839, 0, 0, 0,
5050 -839, -839, 0, -839, 0, 0, 0, 0, 0, 0,
5051 0, -839, -839, 0, 0, 0, 0, 0, 0, 0,
5052 0, 0, 0, -839, -839, 0, -839, -839, -839, -839,
5053 -839, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5054 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5055 0, 0, 0, 0, -839, -839, 0, 0, 0, 0,
5056 0, 0, 0, 0, -839, -839, -839, -839, -839, -839,
5057 -839, -839, -839, -839, -839, -839, -839, 0, 0, 0,
5058 0, -839, -839, -839, -839, 0, 828, -839, 0, 0,
5059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5060 0, 0, 0, 0, 0, 0, -839, 0, 0, 0,
5061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5062 -146, -839, 0, -839, -839, -839, -839, -839, -839, -839,
5063 -839, -839, -839, 0, 0, 0, 0, -839, -839, -839,
5064 -839, -839, -356, 0, -839, 0, -839, 0, 0, 0,
5065 -356, -356, -356, 0, 0, 0, -356, -356, 0, -356,
5066 0, 0, 0, 0, 0, 0, 0, -356, 0, 0,
5067 0, 0, 0, 0, 0, 0, 0, 0, 0, -356,
5068 -356, 0, -356, -356, -356, -356, -356, 0, 0, 0,
5069 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5070 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5071 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
5072 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5073 -356, -356, -356, 0, 0, 0, 0, -356, -356, -356,
5074 -356, 0, 829, -356, 0, 0, 0, 0, 0, 0,
5075 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5076 0, 0, -356, 0, 0, 0, 0, 0, 0, 0,
5077 0, 0, 0, 0, 0, 0, -147, -356, 0, -356,
5078 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
5079 0, 0, 0, 830, -356, -356, -356, -138, -356, 0,
5080 -356, 0, -356, 0, 0, 0, -356, -356, -356, 0,
5081 0, 0, -356, -356, 0, -356, 0, 0, 0, 0,
5082 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5083 0, 0, 0, 0, 0, -356, -356, 0, -356, -356,
5084 -356, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5085 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5086 0, 0, 0, 0, 0, 0, -356, -356, 0, 0,
5087 0, 0, 0, 0, 0, 0, -356, -356, -356, -356,
5088 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
5089 0, 0, 0, -356, -356, -356, -356, 0, 829, -356,
5090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5091 0, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5092 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5093 0, 0, -147, -356, 0, -356, -356, -356, -356, -356,
5094 -356, -356, -356, -356, -356, 0, 0, 0, 0, 830,
5095 -356, -356, -356, -356, 0, 0, -356, 3, -356, 4,
5096 5, 6, 7, 8, -857, -857, -857, 9, 10, 0,
5097 0, -857, 11, 0, 12, 13, 14, 15, 16, 17,
5098 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5099 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5100 0, 27, 28, 268, 30, 31, 32, 33, 34, 35,
5101 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5102 45, 46, 0, 0, -857, 0, 0, 0, 0, 0,
5103 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5104 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5105 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5106 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5107 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5108 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5110 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5111 -857, 4, 5, 6, 7, 8, -857, 0, -857, 9,
5112 10, 0, -857, -857, 11, 0, 12, 13, 14, 15,
5113 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5114 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5115 0, 0, 0, 27, 28, 268, 30, 31, 32, 33,
5116 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5117 43, 44, 45, 46, 0, 0, -857, 0, 0, 0,
5118 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5119 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5120 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5121 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5122 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5124 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5125 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5126 0, 3, -857, 4, 5, 6, 7, 8, -857, 0,
5127 -857, 9, 10, 0, 0, -857, 11, -857, 12, 13,
5128 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5129 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5130 0, 0, 0, 0, 0, 27, 28, 268, 30, 31,
5131 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5132 41, 42, 43, 44, 45, 46, 0, 0, -857, 0,
5133 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5135 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5136 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5137 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5140 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5141 0, 0, 0, 3, -857, 4, 5, 6, 7, 8,
5142 -857, 0, -857, 9, 10, 0, 0, -857, 11, 0,
5143 12, 13, 14, 15, 16, 17, 18, -857, 0, 0,
5144 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5145 0, 26, 0, 0, 0, 0, 0, 27, 28, 268,
5146 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5147 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5148 -857, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5150 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5151 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5152 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5153 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5154 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5155 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5156 67, 68, 0, 0, 0, 3, -857, 4, 5, 6,
5157 7, 8, -857, 0, -857, 9, 10, 0, 0, -857,
5158 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5159 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5160 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5161 28, 268, 30, 31, 32, 33, 34, 35, 36, 37,
5162 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5163 0, 0, -857, 0, 0, 0, 0, 0, 0, 0,
5164 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5165 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5166 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5167 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5168 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5170 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5171 0, 66, 67, 68, 0, 0, 0, 3, -857, 4,
5172 5, 6, 7, 8, -857, -857, -857, 9, 10, 0,
5173 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5174 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5175 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5176 0, 27, 28, 268, 30, 31, 32, 33, 34, 35,
5177 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5178 45, 46, 0, 0, -857, 0, 0, 0, 0, 0,
5179 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5180 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5181 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5182 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5183 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5185 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5186 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5187 -857, 4, 5, 6, 7, 8, -857, 0, -857, 9,
5188 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5189 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5190 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5191 0, 0, 0, 27, 28, 268, 30, 31, 32, 33,
5192 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5193 43, 44, 45, 46, 0, 0, -857, 0, 0, 0,
5194 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5195 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5196 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5197 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5198 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5201 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5202 0, 3, -857, 4, 5, 6, 7, 8, -857, 0,
5203 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5204 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5205 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5206 0, 0, 0, 0, 0, 27, 28, 268, 30, 31,
5207 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5208 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5209 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5210 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5211 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5212 0, 0, 269, 53, 54, 55, 0, 56, 0, 0,
5213 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5214 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5216 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5217 0, 0, 0, 0, -857, 0, 0, 0, -857, 3,
5218 -857, 4, 5, 6, 7, 8, 0, 0, 0, 9,
5219 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5220 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5221 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5222 0, 0, 0, 27, 28, 268, 30, 31, 32, 33,
5223 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5224 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5225 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5226 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5227 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5228 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5229 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5230 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5231 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5232 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5233 0, 0, -857, 0, 0, 0, -857, 3, -857, 4,
5234 5, 6, 7, 8, 0, 0, 0, 9, 10, 0,
5235 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5236 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5237 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5238 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
5239 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5240 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5241 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5242 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5243 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5244 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5245 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5246 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5247 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5248 0, 0, 0, 66, 67, 68, 0, 0, -857, 3,
5249 -857, 4, 5, 6, 7, 8, -857, 0, 0, 9,
5250 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5251 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5252 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5253 0, 0, 0, 27, 28, 268, 30, 31, 32, 33,
5254 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5255 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5256 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5258 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5259 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5260 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5261 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5262 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5263 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5264 -857, 398, -857, 4, 5, 6, 0, 8, -857, 0,
5265 0, 9, 10, 0, 0, 0, 11, -3, 12, 13,
5266 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5267 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5268 0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5269 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5270 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5271 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5273 0, 49, 50, 0, 0, 0, 0, 0, 0, 249,
5274 0, 0, 250, 53, 54, 55, 0, 0, 0, 0,
5275 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5276 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5277 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5278 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5279 0, 0, 0, 0, 325, 0, 0, 0, 0, 0,
5280 326, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5281 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
5282 166, 167, 168, 169, 170, 0, 0, 0, 171, 172,
5283 173, 428, 429, 430, 431, 178, 179, 180, 0, 0,
5284 0, 0, 0, 181, 182, 183, 184, 432, 433, 434,
5285 435, 189, 36, 37, 436, 39, 0, 0, 0, 0,
5286 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5287 0, 0, 0, 0, 191, 192, 193, 194, 195, 196,
5288 197, 198, 199, 0, 0, 200, 201, 0, 0, 0,
5289 0, 202, 203, 204, 205, 0, 0, 0, 0, 0,
5290 0, 0, 0, 0, 0, 206, 207, 0, 0, 0,
5291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5293 0, 0, 0, 0, 0, 208, 209, 210, 211, 212,
5294 213, 214, 215, 216, 217, 0, 218, 219, 0, 0,
5295 0, 0, 0, 0, 220, 437, 147, 148, 149, 150,
5296 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5297 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
5298 0, 0, 0, 171, 172, 173, 174, 175, 176, 177,
5299 178, 179, 180, 0, 0, 0, 0, 0, 181, 182,
5300 183, 184, 185, 186, 187, 188, 189, 36, 37, 190,
5301 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5302 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5303 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5304 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5305 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5306 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5307 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5308 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5309 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5310 0, 218, 219, 0, 0, 0, 0, 0, 0, 220,
5311 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5312 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5313 167, 168, 169, 170, 0, 0, 0, 171, 172, 173,
5314 174, 175, 176, 177, 178, 179, 180, 0, 0, 0,
5315 0, 0, 181, 182, 183, 184, 185, 186, 187, 188,
5316 189, 237, 0, 190, 0, 0, 0, 0, 0, 0,
5317 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5318 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5319 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5320 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5321 0, 0, 0, 0, 206, 207, 0, 0, 58, 0,
5322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5323 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5324 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5325 214, 215, 216, 217, 0, 218, 219, 0, 0, 0,
5326 0, 0, 0, 220, 147, 148, 149, 150, 151, 152,
5327 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5328 163, 164, 165, 166, 167, 168, 169, 170, 0, 0,
5329 0, 171, 172, 173, 174, 175, 176, 177, 178, 179,
5330 180, 0, 0, 0, 0, 0, 181, 182, 183, 184,
5331 185, 186, 187, 188, 189, 0, 0, 190, 0, 0,
5332 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5333 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5334 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5335 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5336 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5337 0, 0, 58, 0, 0, 0, 0, 0, 0, 0,
5338 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5339 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5340 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5341 219, 0, 0, 0, 0, 0, 0, 220, 147, 148,
5342 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
5343 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
5344 169, 170, 0, 0, 0, 171, 172, 173, 174, 175,
5345 176, 177, 178, 179, 180, 0, 0, 0, 0, 0,
5346 181, 182, 183, 184, 185, 186, 187, 188, 189, 0,
5347 0, 190, 0, 0, 0, 0, 0, 0, 0, 0,
5348 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5349 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5350 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5351 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5352 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5353 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5355 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5356 216, 217, 0, 218, 219, 4, 5, 6, 0, 8,
5357 0, 220, 0, 9, 10, 0, 0, 0, 11, 0,
5358 12, 13, 14, 245, 246, 17, 18, 0, 0, 0,
5359 0, 0, 19, 20, 247, 22, 23, 24, 25, 0,
5360 0, 248, 0, 0, 0, 0, 0, 0, 295, 0,
5361 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5362 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5363 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5365 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5366 0, 296, 0, 0, 250, 53, 54, 55, 0, 0,
5367 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5368 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5369 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5370 14, 245, 246, 17, 18, 0, 0, 0, 0, 297,
5371 19, 20, 247, 22, 23, 24, 25, 298, 0, 248,
5372 0, 0, 0, 0, 0, 0, 295, 0, 0, 31,
5373 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5374 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5375 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5377 0, 0, 0, 0, 0, 0, 0, 0, 0, 296,
5378 0, 0, 250, 53, 54, 55, 0, 0, 0, 0,
5379 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5380 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5381 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5382 16, 17, 18, 0, 0, 0, 0, 297, 19, 20,
5383 21, 22, 23, 24, 25, 609, 0, 248, 0, 0,
5384 0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5385 34, 35, 36, 37, 38, 39, 278, 40, 41, 42,
5386 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5387 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5388 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5389 50, 0, 0, 0, 0, 0, 0, 249, 0, 0,
5390 250, 53, 54, 55, 0, 279, 280, 444, 57, 58,
5391 281, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5394 4, 5, 6, 0, 8, 66, 251, 68, 9, 10,
5395 0, 0, 234, 11, 0, 12, 13, 14, 15, 16,
5396 17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
5397 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5398 0, 0, 0, 28, 0, 0, 31, 32, 33, 34,
5399 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5400 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5401 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5402 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5403 0, 0, 0, 0, 0, 0, 249, 0, 0, 250,
5404 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5405 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5406 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5407 0, 0, 0, 0, 0, 0, 0, 3, 0, 4,
5408 5, 6, 7, 8, 66, 67, 68, 9, 10, 0,
5409 0, 234, 11, 0, 12, 13, 14, 15, 16, 17,
5410 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5411 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5412 0, 27, 28, 0, 30, 31, 32, 33, 34, 35,
5413 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5414 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5415 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5416 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5417 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5418 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5419 61, 62, 63, 64, 65, 0, 0, 398, 0, 4,
5420 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5421 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5422 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5423 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5424 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5425 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5426 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5427 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5428 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5429 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5430 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5431 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5432 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5433 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5434 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5435 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5436 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5437 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5438 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5439 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5440 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5441 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5442 54, 55, 0, 279, 280, 444, 57, 58, 281, 60,
5443 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5444 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5445 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5446 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5447 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5448 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5449 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5450 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5451 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5452 0, 0, 0, 0, 0, 0, 0, 49, 464, 0,
5453 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5454 54, 55, 0, 279, 280, 444, 57, 58, 281, 60,
5455 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5456 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5457 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5458 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5459 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5460 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5461 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5462 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5463 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5464 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5465 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5466 54, 55, 0, 279, 280, 444, 57, 58, 281, 60,
5467 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5468 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5469 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5470 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5471 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5472 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5473 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5474 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5475 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5476 0, 0, 0, 0, 0, 0, 0, 49, 464, 0,
5477 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5478 54, 55, 0, 279, 280, 444, 57, 58, 281, 60,
5479 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5480 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5481 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5482 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5483 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5484 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5485 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5486 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5487 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5488 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5489 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5490 54, 55, 0, 279, 280, 0, 57, 58, 281, 60,
5491 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5492 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5493 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5494 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5495 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5496 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5497 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5498 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5499 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5500 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5501 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5502 54, 55, 0, 0, 280, 444, 57, 58, 281, 60,
5503 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5504 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5505 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5506 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5507 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5508 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5509 36, 37, 38, 39, 278, 40, 41, 42, 43, 44,
5510 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5511 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5512 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5513 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5514 54, 55, 0, 0, 280, 0, 57, 58, 281, 60,
5515 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5516 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5517 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5518 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5519 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5520 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5521 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5522 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5523 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5524 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5525 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5526 54, 55, 0, 803, 0, 0, 57, 58, 59, 60,
5527 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5528 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5529 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5530 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5531 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5532 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5533 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5534 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5535 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5536 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5537 0, 0, 0, 0, 0, 814, 0, 0, 250, 53,
5538 54, 55, 0, 803, 0, 0, 57, 58, 59, 60,
5539 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5540 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5541 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5542 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5543 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5544 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5545 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5546 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5547 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5548 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5549 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5550 54, 55, 0, 975, 0, 0, 57, 58, 59, 60,
5551 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5552 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5553 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5554 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5555 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5556 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5557 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5558 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5559 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5560 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5561 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5562 54, 55, 0, 1025, 0, 0, 57, 58, 59, 60,
5563 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5564 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5565 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5566 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5567 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5568 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5569 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5570 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5571 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5572 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5573 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5574 54, 55, 0, 803, 0, 0, 57, 58, 59, 60,
5575 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5576 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5577 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5578 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5579 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5580 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5581 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5582 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5583 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5584 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5585 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5586 54, 55, 0, 1158, 0, 0, 57, 58, 59, 60,
5587 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5588 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5589 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5590 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5591 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5592 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5593 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5594 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5595 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5596 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5597 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5598 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5599 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5600 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5601 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5602 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5603 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5604 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5605 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5606 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5607 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5608 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5609 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5610 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5611 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5612 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5613 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5614 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5615 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5616 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5617 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5618 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5619 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5620 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5621 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5622 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5623 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5624 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5625 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5626 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5627 23, 24, 25, 0, 0, 785, 0, 0, 0, 0,
5628 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5629 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5630 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5631 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5633 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5634 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5635 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5636 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5637 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5638 18, 0, 0, 66, 251, 68, 19, 20, 21, 22,
5639 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5640 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5641 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5642 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5643 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5644 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5645 0, 0, 0, 0, 0, 814, 0, 0, 250, 53,
5646 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5647 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5648 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5649 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5650 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5651 23, 24, 25, 0, 0, 889, 0, 0, 0, 0,
5652 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5653 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5654 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5655 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5656 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5657 0, 0, 0, 0, 0, 249, 0, 0, 250, 53,
5658 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5659 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5660 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5661 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5662 18, 0, 0, 66, 251, 68, 19, 20, 247, 22,
5663 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5664 0, 0, 295, 0, 0, 31, 32, 33, 34, 35,
5665 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5666 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5668 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5669 0, 0, 0, 0, 0, 296, 0, 0, 357, 53,
5670 54, 55, 0, 358, 0, 0, 57, 58, 59, 60,
5671 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5672 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5673 11, 0, 12, 13, 14, 245, 246, 17, 18, 0,
5674 0, 0, 0, 297, 19, 20, 247, 22, 23, 24,
5675 25, 0, 0, 248, 0, 0, 0, 0, 0, 0,
5676 295, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5677 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5678 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5679 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5681 0, 0, 0, 409, 0, 0, 52, 53, 54, 55,
5682 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5683 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5684 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5685 12, 13, 14, 245, 246, 17, 18, 0, 0, 0,
5686 0, 297, 19, 20, 247, 22, 23, 24, 25, 0,
5687 0, 248, 0, 0, 0, 0, 0, 0, 295, 0,
5688 0, 31, 32, 33, 417, 35, 36, 37, 418, 39,
5689 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 419, 0, 0,
5693 0, 420, 0, 0, 250, 53, 54, 55, 0, 0,
5694 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5695 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5696 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5697 14, 245, 246, 17, 18, 0, 0, 0, 0, 297,
5698 19, 20, 247, 22, 23, 24, 25, 0, 0, 248,
5699 0, 0, 0, 0, 0, 0, 295, 0, 0, 31,
5700 32, 33, 417, 35, 36, 37, 418, 39, 0, 40,
5701 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5702 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5704 0, 0, 0, 0, 0, 0, 0, 0, 0, 420,
5705 0, 0, 250, 53, 54, 55, 0, 0, 0, 0,
5706 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5707 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5708 10, 0, 0, 0, 11, 0, 12, 13, 14, 245,
5709 246, 17, 18, 0, 0, 0, 0, 297, 19, 20,
5710 247, 22, 23, 24, 25, 0, 0, 248, 0, 0,
5711 0, 0, 0, 0, 295, 0, 0, 31, 32, 33,
5712 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5713 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5714 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5716 0, 0, 0, 0, 0, 0, 0, 296, 0, 0,
5717 357, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5718 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5719 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5720 0, 0, 11, 0, 12, 13, 14, 245, 246, 17,
5721 18, 0, 0, 0, 0, 297, 19, 20, 247, 22,
5722 23, 24, 25, 0, 0, 248, 0, 0, 0, 0,
5723 0, 0, 295, 0, 0, 31, 32, 33, 34, 35,
5724 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5725 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5728 0, 0, 0, 0, 0, 1224, 0, 0, 250, 53,
5729 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5730 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5731 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5732 11, 0, 12, 13, 14, 245, 246, 17, 18, 0,
5733 0, 0, 0, 297, 19, 20, 247, 22, 23, 24,
5734 25, 0, 0, 248, 0, 0, 0, 0, 0, 0,
5735 295, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5736 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5740 0, 0, 0, 1347, 0, 0, 250, 53, 54, 55,
5741 22, 23, 24, 25, 57, 58, 59, 60, 61, 62,
5742 63, 64, 65, 0, 0, 0, 31, 32, 33, 1101,
5743 0, 0, 0, 1102, 0, 0, 40, 41, 42, 43,
5744 44, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5745 0, 297, 0, 0, 0, 0, 0, 0, 0, 0,
5746 0, 0, 0, 0, 0, 0, 0, 0, 1104, 1105,
5747 0, 0, 0, 0, 0, 0, 1106, 0, 0, 1107,
5748 0, 1108, 1109, 0, 1110, 0, 0, 57, 58, 59,
5749 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5750 0, 0, 22, 23, 24, 25, 0, 0, 0, 692,
5751 648, 0, 0, 693, 0, 0, 0, 1112, 31, 32,
5752 33, 1101, 0, 0, 297, 1102, 0, 0, 40, 41,
5753 42, 43, 44, 191, 192, 193, 194, 195, 196, 197,
5754 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5755 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5756 1104, 1105, 0, 0, 206, 207, 0, 0, 1106, 0,
5757 0, 1107, 0, 1108, 1109, 0, 0, 0, 0, 57,
5758 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5759 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5760 214, 215, 216, 217, 0, 218, 219, 639, 640, 1112,
5761 0, 641, 0, 220, 230, 0, 297, 0, 0, 0,
5762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5763 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5764 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5765 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5766 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5767 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5768 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5769 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5770 216, 217, 0, 218, 219, 647, 648, 0, 0, 649,
5771 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5772 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5773 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5774 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5776 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5777 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5779 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5780 0, 218, 219, 713, 640, 0, 0, 714, 0, 220,
5781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5782 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5783 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5784 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5785 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5788 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5789 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5790 219, 717, 648, 0, 0, 718, 0, 220, 0, 0,
5791 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5792 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5793 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5794 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5795 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5798 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5799 212, 213, 214, 215, 216, 217, 0, 218, 219, 735,
5800 640, 0, 0, 736, 0, 220, 0, 0, 0, 0,
5801 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5802 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5803 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5804 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5805 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5807 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5808 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5809 214, 215, 216, 217, 0, 218, 219, 738, 648, 0,
5810 0, 739, 0, 220, 0, 0, 0, 0, 0, 0,
5811 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5812 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5813 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5814 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5815 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5816 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5817 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5818 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5819 216, 217, 0, 218, 219, 713, 640, 0, 0, 753,
5820 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5821 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5822 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5823 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5825 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5826 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5828 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5829 0, 218, 219, 858, 640, 0, 0, 859, 0, 220,
5830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5831 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5832 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5833 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5834 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5835 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5836 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5837 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5838 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5839 219, 861, 648, 0, 0, 862, 0, 220, 0, 0,
5840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5841 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5842 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5843 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5844 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5847 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5848 212, 213, 214, 215, 216, 217, 0, 218, 219, 867,
5849 640, 0, 0, 868, 0, 220, 0, 0, 0, 0,
5850 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5851 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5852 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5853 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5854 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5857 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5858 214, 215, 216, 217, 0, 218, 219, 692, 648, 0,
5859 0, 693, 0, 220, 0, 0, 0, 0, 0, 0,
5860 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5861 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5862 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5863 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5864 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5865 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5866 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5867 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5868 216, 217, 0, 218, 219, 1031, 640, 0, 0, 1032,
5869 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5870 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5871 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5872 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5873 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5874 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5876 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5877 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5878 0, 218, 219, 1034, 648, 0, 0, 1035, 0, 220,
5879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5880 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5881 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5882 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5883 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5884 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5885 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5886 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5887 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5888 219, 1366, 640, 0, 0, 1367, 0, 220, 0, 0,
5889 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5890 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5891 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5892 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5893 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5896 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5897 212, 213, 214, 215, 216, 217, 0, 218, 219, 1369,
5898 648, 0, 0, 1370, 0, 220, 0, 0, 0, 0,
5899 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5900 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5901 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5902 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5903 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5904 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5905 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5906 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5907 214, 215, 216, 217, 0, 218, 219, 1423, 640, 0,
5908 0, 1424, 0, 220, 0, 0, 0, 0, 0, 0,
5909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5910 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5911 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5912 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5913 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5916 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5917 216, 217, 0, 218, 219, 0, 0, 0, 0, 0,
5918 0, 220
5919};
5920
5921static const yytype_int16 yycheck[] =
5922{
5923 1, 59, 70, 26, 7, 28, 56, 58, 767, 107,
5924 230, 101, 1, 67, 52, 53, 13, 14, 402, 119,
5925 420, 394, 846, 58, 27, 338, 596, 89, 118, 599,
5926 343, 507, 54, 27, 767, 84, 7, 598, 288, 89,
5927 510, 21, 70, 293, 113, 114, 115, 393, 775, 395,
5928 572, 52, 53, 54, 55, 58, 27, 598, 108, 109,
5929 110, 104, 520, 81, 107, 451, 612, 116, 113, 114,
5930 115, 856, 685, 568, 66, 688, 111, 572, 56, 107,
5931 913, 612, 52, 469, 103, 104, 826, 700, 107, 702,
5932 562, 113, 114, 115, 696, 697, 338, 54, 55, 769,
5933 775, 343, 602, 951, 84, 63, 64, 65, 111, 679,
5934 313, 314, 458, 1073, 627, 915, 489, 1036, 1037, 1197,
5935 722, 25, 1037, 586, 1108, 1221, 1222, 0, 1003, 592,
5936 13, 26, 13, 1211, 1321, 26, 25, 269, 113, 114,
5937 115, 10, 109, 69, 490, 0, 66, 66, 1339, 522,
5938 606, 609, 81, 66, 100, 100, 113, 114, 115, 100,
5939 134, 230, 34, 232, 25, 696, 697, 257, 15, 134,
5940 711, 97, 98, 271, 141, 98, 832, 523, 25, 13,
5941 52, 25, 154, 157, 840, 230, 25, 232, 134, 134,
5942 155, 722, 100, 134, 1069, 541, 542, 25, 654, 68,
5943 119, 121, 122, 271, 660, 661, 119, 13, 230, 685,
5944 232, 25, 250, 303, 1062, 1003, 235, 236, 688, 1406,
5945 1036, 1037, 835, 281, 700, 357, 134, 153, 1419, 230,
5946 153, 269, 702, 323, 157, 253, 298, 1221, 1222, 979,
5947 241, 161, 1161, 271, 25, 29, 1161, 120, 298, 250,
5948 55, 155, 241, 157, 1087, 1, 151, 232, 1354, 1107,
5949 151, 1109, 157, 286, 13, 288, 155, 247, 269, 25,
5950 293, 154, 295, 154, 254, 232, 676, 160, 13, 160,
5951 1358, 1069, 300, 1010, 756, 757, 1086, 1247, 331, 332,
5952 333, 334, 330, 666, 155, 1214, 866, 101, 1258, 269,
5953 1260, 25, 1221, 1222, 677, 297, 52, 53, 358, 407,
5954 56, 155, 331, 332, 333, 334, 155, 336, 337, 357,
5955 154, 667, 412, 252, 253, 394, 160, 155, 1003, 330,
5956 830, 1197, 678, 536, 790, 538, 1160, 101, 794, 123,
5957 329, 155, 855, 89, 1014, 1161, 56, 1213, 154, 394,
5958 154, 953, 954, 134, 160, 813, 357, 959, 960, 835,
5959 403, 100, 108, 109, 110, 111, 404, 405, 716, 13,
5960 931, 1219, 1220, 154, 155, 1160, 419, 158, 795, 407,
5961 358, 798, 995, 1171, 403, 454, 1174, 357, 1176, 737,
5962 931, 155, 395, 394, 1069, 134, 397, 919, 854, 155,
5963 419, 857, 13, 404, 405, 154, 155, 769, 101, 454,
5964 1169, 160, 100, 775, 984, 871, 396, 963, 27, 154,
5965 489, 422, 953, 954, 919, 160, 13, 1387, 959, 960,
5966 13, 155, 454, 157, 154, 1354, 1169, 37, 38, 13,
5967 160, 913, 1044, 915, 489, 151, 134, 1174, 100, 450,
5968 451, 1104, 1105, 522, 69, 458, 997, 100, 520, 922,
5969 923, 161, 155, 926, 940, 928, 467, 930, 469, 157,
5970 520, 28, 100, 278, 279, 280, 479, 522, 458, 454,
5971 700, 731, 134, 98, 100, 479, 1352, 490, 489, 875,
5972 1356, 134, 1358, 154, 100, 241, 157, 454, 1029, 1174,
5973 886, 1171, 134, 155, 250, 1, 134, 25, 479, 155,
5974 154, 58, 860, 1044, 970, 134, 160, 973, 134, 34,
5975 523, 522, 870, 269, 980, 995, 595, 769, 134, 598,
5976 986, 78, 100, 775, 767, 112, 66, 52, 1326, 542,
5977 1328, 744, 1330, 154, 1332, 154, 749, 609, 100, 160,
5978 507, 160, 298, 607, 154, 100, 52, 53, 612, 609,
5979 1426, 108, 551, 1216, 1217, 112, 134, 154, 25, 597,
5980 157, 154, 100, 160, 157, 948, 155, 160, 1337, 100,
5981 154, 1405, 134, 329, 330, 607, 160, 25, 157, 119,
5982 612, 121, 122, 977, 643, 596, 52, 666, 599, 1326,
5983 56, 947, 651, 949, 69, 628, 134, 157, 677, 1065,
5984 56, 357, 358, 134, 1086, 1087, 134, 1344, 656, 1189,
5985 658, 666, 645, 1411, 157, 1088, 1089, 1090, 1091, 58,
5986 34, 659, 677, 98, 155, 134, 154, 155, 69, 444,
5987 158, 1003, 696, 697, 69, 646, 695, 157, 52, 78,
5988 651, 397, 1014, 69, 152, 656, 154, 658, 404, 405,
5989 1330, 680, 134, 643, 667, 666, 97, 98, 722, 154,
5990 26, 733, 1056, 98, 159, 678, 677, 134, 679, 108,
5991 109, 97, 98, 733, 338, 1033, 26, 706, 1415, 343,
5992 1003, 742, 69, 716, 695, 698, 134, 154, 155, 100,
5993 505, 158, 507, 69, 698, 510, 1106, 1069, 731, 66,
5994 67, 69, 141, 69, 737, 100, 154, 155, 719, 157,
5995 158, 98, 153, 66, 78, 100, 157, 698, 685, 69,
5996 158, 97, 98, 823, 52, 715, 101, 153, 56, 97,
5997 98, 97, 98, 700, 159, 241, 154, 69, 78, 134,
5998 158, 813, 498, 1323, 250, 100, 1069, 97, 98, 134,
5999 1108, 1003, 785, 813, 121, 122, 1150, 1036, 1037, 69,
6000 155, 69, 1014, 269, 520, 97, 98, 877, 121, 122,
6001 155, 124, 587, 1003, 1240, 100, 744, 153, 746, 134,
6002 152, 749, 750, 56, 1257, 151, 157, 153, 98, 97,
6003 98, 157, 607, 1036, 1037, 551, 936, 612, 938, 1171,
6004 155, 151, 1174, 153, 144, 145, 146, 157, 1218, 134,
6005 863, 155, 865, 1185, 600, 1082, 1083, 1069, 604, 69,
6006 69, 153, 161, 329, 330, 100, 864, 860, 873, 1108,
6007 155, 842, 78, 844, 863, 846, 865, 870, 1196, 1069,
6008 596, 1199, 69, 599, 1238, 153, 1125, 97, 98, 98,
6009 69, 357, 931, 609, 69, 866, 889, 69, 1352, 134,
6010 873, 1219, 1356, 69, 875, 134, 54, 1185, 835, 948,
6011 685, 98, 15, 688, 17, 886, 64, 65, 97, 98,
6012 155, 106, 1161, 98, 155, 700, 98, 702, 160, 953,
6013 954, 397, 98, 948, 901, 959, 960, 134, 404, 405,
6014 656, 134, 658, 153, 52, 56, 54, 55, 56, 57,
6015 58, 25, 727, 66, 1380, 1194, 969, 138, 1161, 1171,
6016 968, 155, 1174, 679, 154, 155, 1169, 26, 1311, 155,
6017 78, 963, 1211, 1185, 153, 155, 949, 948, 154, 155,
6018 969, 1171, 1221, 1222, 1174, 983, 1176, 985, 1306, 1307,
6019 1308, 155, 963, 66, 102, 158, 1312, 968, 1330, 774,
6020 108, 109, 69, 152, 1211, 1029, 119, 1339, 121, 122,
6021 69, 1214, 1344, 984, 1221, 1222, 69, 733, 1221, 1222,
6022 1044, 155, 1249, 1250, 1251, 1252, 1253, 134, 803, 134,
6023 97, 98, 498, 141, 158, 69, 37, 38, 97, 98,
6024 1033, 155, 78, 152, 97, 98, 119, 69, 121, 122,
6025 1368, 124, 134, 1061, 14, 15, 1023, 1024, 155, 1337,
6026 835, 1339, 155, 97, 98, 155, 1344, 155, 1027, 1028,
6027 52, 1349, 89, 90, 155, 97, 98, 1085, 853, 155,
6028 1051, 152, 1053, 1111, 13, 551, 153, 1419, 40, 41,
6029 1061, 1112, 151, 69, 153, 299, 300, 813, 157, 1070,
6030 153, 155, 1073, 25, 274, 1076, 142, 143, 144, 145,
6031 146, 1082, 1083, 155, 1085, 1108, 1109, 17, 1330, 153,
6032 155, 97, 98, 1094, 1095, 134, 30, 1339, 44, 1149,
6033 596, 153, 1344, 599, 1337, 44, 1326, 1415, 1328, 1417,
6034 1330, 1419, 1332, 1421, 69, 152, 612, 155, 1156, 1157,
6035 866, 1354, 69, 155, 1162, 1382, 1383, 1384, 1385, 154,
6036 155, 66, 1440, 1231, 44, 940, 1226, 56, 44, 83,
6037 84, 1164, 97, 98, 136, 134, 159, 153, 1186, 78,
6038 97, 98, 1153, 8, 15, 1156, 1157, 155, 963, 1160,
6039 656, 1162, 658, 1231, 155, 1208, 95, 96, 52, 155,
6040 975, 1036, 1037, 1196, 155, 1432, 1199, 1419, 66, 59,
6041 60, 61, 62, 679, 119, 1186, 121, 122, 1189, 1208,
6042 995, 1411, 1230, 137, 138, 155, 1219, 155, 153, 152,
6043 696, 697, 101, 1231, 155, 155, 153, 1245, 9, 52,
6044 139, 140, 141, 142, 143, 144, 145, 146, 155, 155,
6045 1025, 1271, 968, 155, 66, 139, 722, 155, 155, 1230,
6046 155, 119, 1233, 121, 122, 1293, 124, 155, 984, 1104,
6047 1105, 139, 1311, 1108, 1245, 1268, 1247, 155, 1249, 1250,
6048 1251, 1252, 1253, 155, 454, 1060, 152, 1258, 155, 1260,
6049 1125, 52, 101, 1264, 56, 465, 1311, 160, 468, 1270,
6050 66, 1272, 158, 473, 155, 1318, 1319, 119, 155, 121,
6051 122, 1027, 1028, 1306, 1307, 1308, 155, 155, 155, 155,
6052 1036, 1037, 155, 1343, 139, 495, 1161, 155, 155, 1318,
6053 1319, 78, 155, 155, 155, 239, 152, 56, 155, 1312,
6054 1311, 155, 1313, 329, 1315, 1061, 157, 155, 95, 96,
6055 155, 155, 1323, 119, 155, 121, 122, 157, 52, 1194,
6056 54, 55, 1197, 57, 155, 1373, 241, 72, 52, 1085,
6057 54, 55, 56, 57, 494, 1368, 1211, 498, 1213, 873,
6058 1153, 1216, 1217, 1158, 1377, 106, 1221, 1222, 1104, 1105,
6059 607, 108, 1108, 480, 141, 142, 143, 144, 145, 146,
6060 866, 52, 1373, 54, 55, 56, 57, 1400, 102, 1125,
6061 580, 1382, 1383, 1384, 1385, 110, 1387, 98, 78, 1390,
6062 1391, 695, 964, 1394, 1395, 1, 1233, 1398, 983, 913,
6063 932, 933, 1269, 1149, 1405, 95, 96, 1153, 608, 941,
6064 1156, 1157, 944, 1337, 946, 1161, 1162, 54, 55, 756,
6065 57, 355, 1185, 1344, 1095, 1290, 360, 64, 65, 1406,
6066 1268, 1432, 1433, 1434, 1435, 1436, 878, 353, 1290, 1405,
6067 1186, 1214, 1443, 1189, 1214, 1210, 52, 53, 1194, 1313,
6068 56, 1197, 142, 143, 144, 145, 146, 953, 954, 1315,
6069 122, 67, 538, 959, 960, 1211, 111, 1213, 343, 118,
6070 1216, 1217, 968, 769, 1069, 1221, 1222, 40, 41, 42,
6071 43, 44, 1400, 89, 1230, 781, -1, 1352, 984, -1,
6072 690, 1356, -1, 1358, -1, -1, -1, 103, 104, 1245,
6073 -1, 107, 108, 109, 110, -1, -1, 113, 114, 115,
6074 -1, -1, -1, 696, 697, -1, -1, -1, -1, -1,
6075 763, -1, -1, -1, 767, 1271, -1, 461, 462, -1,
6076 -1, 1027, 1028, 1029, 1, -1, -1, 720, 721, 722,
6077 -1, -1, -1, -1, 1290, -1, 480, -1, 1044, 1270,
6078 -1, 1272, -1, 487, -1, -1, -1, 491, 492, 493,
6079 760, 1426, -1, -1, 52, 1061, 54, 55, 56, 57,
6080 52, -1, 54, 55, 56, 57, -1, 1323, -1, -1,
6081 -1, -1, -1, -1, -1, 52, 53, -1, -1, 1085,
6082 -1, -1, -1, -1, -1, -1, -1, 1343, -1, 52,
6083 67, 54, 55, 56, 57, 58, 1352, -1, -1, -1,
6084 1356, -1, 1358, -1, 102, -1, -1, -1, -1, 107,
6085 102, -1, -1, -1, 230, 78, 232, 1373, -1, 235,
6086 236, -1, -1, -1, -1, 241, 103, 104, -1, 92,
6087 107, -1, -1, -1, 250, -1, 113, 114, 115, 102,
6088 -1, -1, -1, -1, 107, 108, 109, 1153, -1, -1,
6089 1156, 1157, -1, 269, 1036, 1037, 1162, -1, -1, 1390,
6090 1391, -1, 872, 1394, 1395, -1, -1, 1398, -1, -1,
6091 1426, -1, -1, -1, -1, 885, -1, 887, 141, -1,
6092 1186, 144, 298, 1189, -1, -1, -1, -1, -1, -1,
6093 -1, -1, -1, -1, 157, 888, -1, 1003, -1, -1,
6094 -1, 911, 1433, 1434, 1435, 1436, 1012, -1, 1014, 653,
6095 1016, -1, 1443, 329, 330, 331, 332, 333, 334, -1,
6096 336, 337, 1104, 1105, 1230, -1, 1108, -1, -1, -1,
6097 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1245,
6098 -1, 357, 358, 1125, -1, -1, -1, -1, -1, -1,
6099 1003, -1, -1, 230, -1, 232, -1, -1, 235, 236,
6100 953, 954, -1, 1069, 241, 709, 959, 960, -1, -1,
6101 -1, -1, -1, 250, -1, -1, -1, -1, 394, 1161,
6102 -1, 397, -1, -1, -1, -1, -1, 403, 404, 405,
6103 -1, -1, 269, -1, -1, -1, -1, -1, -1, -1,
6104 -1, -1, -1, 419, -1, 998, 999, -1, 1001, 1002,
6105 -1, -1, 1194, -1, -1, 1197, 1069, 1323, -1, -1,
6106 -1, -1, -1, -1, 1003, -1, -1, -1, -1, 1211,
6107 -1, 1213, -1, -1, 1216, 1217, -1, -1, 454, 1221,
6108 1222, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6109 -1, 1044, 329, 330, 331, 332, 333, 334, -1, 336,
6110 337, -1, -1, -1, -1, 1171, -1, 1373, -1, -1,
6111 1176, -1, -1, 489, -1, 1068, 1182, -1, -1, 1185,
6112 357, -1, 498, -1, 828, 829, -1, -1, -1, -1,
6113 1069, -1, 836, 837, -1, -1, -1, -1, -1, -1,
6114 -1, -1, -1, -1, 520, -1, 522, -1, 1290, -1,
6115 -1, -1, 1165, -1, -1, -1, 1169, 394, 1171, -1,
6116 397, 1174, -1, 1176, -1, -1, 403, 404, 405, -1,
6117 -1, -1, 1185, -1, -1, 551, -1, -1, -1, -1,
6118 -1, -1, 419, -1, -1, -1, 890, 891, -1, 893,
6119 894, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6120 -1, -1, -1, 52, -1, 54, 55, 56, 57, 58,
6121 1352, -1, -1, -1, 1356, -1, 1358, 454, -1, 595,
6122 596, -1, 598, 599, -1, -1, -1, -1, -1, 78,
6123 -1, 607, 1171, 609, -1, 1174, 612, 1176, -1, -1,
6124 -1, 945, -1, 92, -1, -1, 1185, -1, -1, -1,
6125 1220, -1, 489, 102, 958, -1, -1, -1, 107, 108,
6126 109, 498, 1328, -1, 1330, -1, 1332, -1, -1, -1,
6127 -1, -1, -1, 1339, -1, -1, -1, -1, -1, -1,
6128 656, -1, 658, 1349, 1426, 522, -1, -1, -1, -1,
6129 666, -1, 141, -1, -1, 144, 1000, -1, -1, -1,
6130 -1, 677, -1, 679, 680, -1, 1276, -1, -1, -1,
6131 -1, -1, -1, 1326, 551, 1328, 1286, 1330, -1, 1332,
6132 696, 697, -1, -1, 1337, -1, 1339, -1, -1, -1,
6133 706, 1344, -1, 1303, 1304, 1305, 1349, -1, -1, -1,
6134 -1, -1, -1, -1, -1, 1411, 722, -1, -1, -1,
6135 -1, 1417, -1, 1419, -1, 1421, -1, 733, 595, 596,
6136 -1, 598, 599, -1, -1, -1, -1, -1, -1, -1,
6137 607, -1, -1, -1, 1440, 612, -1, -1, -1, -1,
6138 -1, 1036, 1037, -1, -1, -1, -1, 1326, -1, 1328,
6139 -1, 1330, -1, 1332, -1, -1, -1, -1, 1411, -1,
6140 1339, -1, 1415, -1, 1417, 1344, 1419, -1, 1421, -1,
6141 1349, -1, -1, -1, -1, -1, -1, -1, -1, 656,
6142 -1, 658, -1, -1, -1, -1, -1, 1440, -1, 666,
6143 -1, -1, -1, -1, -1, -1, -1, 813, -1, -1,
6144 677, -1, 679, 680, -1, -1, -1, -1, -1, 1104,
6145 1105, -1, -1, 1108, -1, -1, -1, -1, -1, 696,
6146 697, -1, -1, -1, -1, -1, -1, -1, -1, 706,
6147 1125, -1, 1411, -1, -1, -1, 1415, -1, 1417, -1,
6148 1419, -1, 1421, -1, -1, 722, -1, 863, -1, 865,
6149 866, -1, -1, -1, -1, -1, -1, -1, -1, 1203,
6150 -1, 1440, -1, -1, -1, -1, 1161, -1, 1, -1,
6151 -1, -1, -1, -1, -1, -1, -1, 33, 34, 35,
6152 36, -1, -1, 52, -1, 54, 55, 56, 57, 58,
6153 -1, -1, -1, 49, 50, 51, -1, -1, -1, 1194,
6154 -1, -1, 1197, 59, 60, 61, 62, 63, -1, 78,
6155 -1, -1, -1, -1, -1, 931, 1211, -1, 1213, 52,
6156 53, 1216, 1217, 92, -1, -1, 1221, 1222, -1, -1,
6157 -1, -1, 948, 102, 67, -1, -1, 953, 954, 108,
6158 109, -1, -1, 959, 960, -1, -1, -1, -1, -1,
6159 -1, -1, 968, 969, 110, 111, 112, 113, 114, 115,
6160 116, 117, 118, -1, -1, -1, -1, -1, 984, -1,
6161 103, 104, 141, -1, 107, -1, -1, -1, -1, -1,
6162 113, 114, 115, -1, -1, -1, 863, -1, 865, 866,
6163 -1, 147, -1, -1, -1, 1290, 52, -1, 54, 55,
6164 56, 57, 58, -1, -1, -1, -1, 1, -1, -1,
6165 -1, 1027, 1028, 1029, -1, -1, -1, -1, -1, -1,
6166 -1, -1, 78, -1, -1, -1, -1, -1, 1044, -1,
6167 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6168 -1, -1, -1, -1, -1, 1061, 102, -1, -1, -1,
6169 -1, 107, 108, 109, 931, -1, -1, 1352, 52, 53,
6170 -1, 1356, -1, 1358, -1, -1, -1, -1, -1, 1085,
6171 -1, 948, -1, 67, -1, -1, 953, 954, -1, -1,
6172 -1, -1, 959, 960, -1, 141, -1, -1, 144, -1,
6173 -1, 968, 969, -1, -1, -1, -1, 230, -1, 232,
6174 -1, -1, 235, 236, -1, -1, -1, 984, 241, 103,
6175 104, -1, -1, 107, -1, -1, -1, 250, -1, 113,
6176 114, 115, -1, -1, -1, -1, -1, -1, -1, -1,
6177 -1, 1426, -1, 1149, -1, -1, 269, 1153, -1, -1,
6178 1156, 1157, -1, -1, -1, -1, 1162, -1, -1, -1,
6179 1027, 1028, 1029, -1, -1, -1, -1, -1, -1, -1,
6180 -1, -1, -1, -1, -1, -1, -1, 1044, -1, -1,
6181 1186, -1, -1, 1189, -1, -1, -1, -1, -1, -1,
6182 -1, -1, -1, -1, 1061, -1, -1, -1, -1, -1,
6183 -1, -1, 1208, -1, 1036, 1037, 329, 330, 331, 332,
6184 333, 334, -1, 336, 337, -1, -1, -1, 1085, -1,
6185 -1, -1, -1, -1, 1230, -1, -1, -1, -1, -1,
6186 -1, -1, -1, -1, 357, -1, -1, -1, -1, 1245,
6187 -1, -1, -1, -1, -1, -1, 230, -1, 232, -1,
6188 -1, 235, 236, -1, -1, -1, -1, 241, -1, -1,
6189 -1, -1, -1, -1, -1, 1271, 250, -1, -1, -1,
6190 -1, 394, 1104, 1105, 397, -1, 1108, -1, -1, -1,
6191 403, 404, 405, -1, -1, 269, 1153, -1, -1, 1156,
6192 1157, -1, -1, 1125, -1, 1162, 419, -1, -1, -1,
6193 -1, -1, -1, -1, -1, 1311, -1, -1, -1, -1,
6194 -1, -1, 1318, 1319, -1, -1, -1, 1323, -1, 1186,
6195 -1, -1, 1189, -1, -1, -1, -1, -1, -1, 1161,
6196 -1, 454, -1, -1, -1, -1, -1, 1343, -1, -1,
6197 -1, 1208, -1, -1, -1, 329, 330, 331, 332, 333,
6198 334, -1, 336, 337, -1, -1, -1, -1, -1, -1,
6199 -1, -1, 1194, 1230, -1, 1197, 489, 1373, -1, -1,
6200 -1, -1, -1, 357, -1, 498, -1, -1, 1245, 1211,
6201 -1, 1213, -1, -1, 1216, 1217, -1, -1, -1, 1221,
6202 1222, -1, -1, -1, -1, -1, -1, -1, -1, 522,
6203 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6204 394, 1036, 1037, 397, -1, -1, -1, -1, -1, 403,
6205 404, 405, -1, -1, -1, -1, -1, -1, 551, -1,
6206 -1, -1, -1, -1, -1, 419, -1, -1, -1, -1,
6207 -1, -1, -1, -1, 1311, -1, -1, -1, -1, -1,
6208 -1, 1318, 1319, -1, -1, -1, 1323, -1, 1290, -1,
6209 1036, 1037, -1, -1, -1, -1, -1, -1, -1, -1,
6210 454, -1, 595, 596, -1, 598, 599, -1, -1, 1104,
6211 1105, -1, -1, 1108, 607, -1, -1, -1, -1, 612,
6212 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6213 1125, -1, -1, -1, -1, 489, 1373, -1, -1, -1,
6214 -1, -1, -1, -1, 498, -1, -1, -1, -1, -1,
6215 1352, -1, -1, -1, 1356, -1, 1358, -1, 1104, 1105,
6216 -1, -1, 1108, 656, -1, 658, 1161, -1, 522, -1,
6217 -1, -1, -1, 666, -1, -1, -1, -1, -1, 1125,
6218 -1, -1, -1, -1, 677, -1, 679, 680, -1, -1,
6219 -1, -1, -1, -1, -1, -1, -1, 551, -1, 1194,
6220 -1, -1, 1197, 696, 697, -1, -1, -1, -1, -1,
6221 -1, -1, -1, 706, -1, 1161, 1211, -1, 1213, -1,
6222 -1, 1216, 1217, -1, 1426, -1, 1221, 1222, -1, 722,
6223 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6224 -1, 595, 596, -1, 598, 599, -1, -1, 1194, -1,
6225 -1, 1197, -1, 607, -1, -1, -1, -1, 612, -1,
6226 -1, -1, 1036, 1037, -1, 1211, -1, 1213, -1, -1,
6227 1216, 1217, -1, -1, -1, 1221, 1222, -1, -1, -1,
6228 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6229 -1, -1, -1, -1, -1, 1290, -1, -1, -1, -1,
6230 -1, -1, 656, -1, 658, -1, -1, -1, -1, -1,
6231 -1, -1, 666, -1, -1, -1, -1, -1, -1, -1,
6232 -1, -1, -1, 677, -1, 679, 680, -1, -1, -1,
6233 1104, 1105, -1, -1, 1108, -1, -1, -1, -1, -1,
6234 -1, -1, 696, 697, 1290, -1, -1, -1, -1, -1,
6235 -1, 1125, 706, -1, -1, -1, -1, 1352, -1, -1,
6236 -1, 1356, -1, 1358, -1, -1, -1, -1, 722, -1,
6237 863, -1, 865, 866, -1, -1, -1, -1, -1, -1,
6238 -1, 1036, 1037, -1, -1, -1, -1, 1161, -1, 1,
6239 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6240 -1, -1, -1, -1, -1, -1, 1352, -1, -1, -1,
6241 1356, -1, 1358, -1, -1, -1, -1, -1, -1, -1,
6242 1194, -1, -1, 1197, -1, -1, -1, -1, -1, -1,
6243 -1, 1426, -1, -1, -1, -1, -1, 1211, 931, 1213,
6244 52, 53, 1216, 1217, 56, -1, -1, 1221, 1222, 1104,
6245 1105, -1, -1, 1108, -1, 948, -1, -1, -1, -1,
6246 953, 954, -1, -1, -1, -1, 959, 960, -1, -1,
6247 1125, -1, -1, -1, -1, 968, 969, 89, -1, -1,
6248 1426, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6249 -1, 984, -1, -1, -1, -1, 108, 109, 110, -1,
6250 -1, 113, 114, 115, -1, -1, 1161, -1, -1, 863,
6251 -1, 865, 866, -1, -1, -1, 1290, -1, -1, -1,
6252 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6253 -1, -1, -1, -1, 1027, 1028, 1029, -1, -1, 1194,
6254 -1, -1, 1197, -1, -1, -1, -1, -1, -1, -1,
6255 -1, 1044, -1, 1036, 1037, -1, 1211, -1, 1213, -1,
6256 -1, 1216, 1217, -1, -1, -1, 1221, 1222, 1061, -1,
6257 -1, -1, -1, -1, -1, -1, -1, 931, 1352, -1,
6258 -1, -1, 1356, -1, 1358, -1, -1, -1, -1, -1,
6259 -1, -1, 1085, -1, 948, -1, -1, -1, -1, 953,
6260 954, -1, -1, -1, -1, 959, 960, -1, -1, -1,
6261 -1, -1, -1, -1, 968, 969, -1, -1, 230, -1,
6262 232, 1104, 1105, -1, -1, 1108, -1, -1, -1, 241,
6263 984, -1, -1, -1, -1, 1290, -1, -1, 250, -1,
6264 -1, -1, 1125, -1, -1, -1, -1, -1, -1, -1,
6265 -1, -1, 1426, -1, 1, -1, -1, 269, -1, -1,
6266 1153, -1, -1, 1156, 1157, -1, -1, -1, -1, 1162,
6267 -1, -1, -1, 1027, 1028, 1029, -1, -1, 1161, -1,
6268 -1, -1, -1, -1, -1, -1, 298, -1, -1, -1,
6269 1044, -1, -1, 1186, -1, -1, 1189, 1352, -1, -1,
6270 -1, 1356, -1, 1358, -1, 52, 53, 1061, -1, 56,
6271 -1, 1194, -1, -1, 1197, 1208, -1, 329, 330, -1,
6272 -1, -1, -1, -1, -1, -1, -1, -1, 1211, -1,
6273 1213, 1085, -1, 1216, 1217, -1, -1, 1230, 1221, 1222,
6274 -1, -1, 89, -1, -1, 357, 358, -1, -1, -1,
6275 -1, -1, 1245, -1, -1, -1, -1, -1, -1, -1,
6276 -1, 108, 109, 110, -1, -1, 113, 114, 115, -1,
6277 -1, 1426, -1, -1, -1, -1, -1, -1, -1, -1,
6278 -1, -1, 394, -1, -1, 397, -1, -1, -1, -1,
6279 -1, -1, 404, 405, -1, -1, -1, -1, -1, 1153,
6280 -1, -1, 1156, 1157, -1, -1, -1, 1290, 1162, -1,
6281 -1, -1, -1, -1, -1, -1, -1, -1, 1311, -1,
6282 -1, -1, -1, -1, -1, 1318, 1319, -1, -1, -1,
6283 1323, -1, 1186, -1, -1, 1189, -1, -1, -1, -1,
6284 -1, -1, 454, -1, -1, -1, -1, -1, -1, -1,
6285 -1, -1, -1, -1, 1208, -1, -1, -1, -1, -1,
6286 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1352,
6287 -1, -1, -1, 1356, -1, 1358, 1230, 489, -1, -1,
6288 1373, -1, -1, 230, -1, 232, 498, -1, -1, -1,
6289 -1, 1245, -1, -1, 241, -1, -1, -1, -1, -1,
6290 -1, -1, -1, 250, -1, -1, -1, -1, 520, -1,
6291 522, 78, 79, 80, 81, 82, 83, 84, 85, -1,
6292 87, 88, 269, -1, -1, -1, -1, -1, 95, 96,
6293 -1, -1, -1, -1, -1, -1, -1, -1, -1, 551,
6294 -1, -1, -1, 1426, -1, -1, -1, -1, -1, -1,
6295 -1, 298, -1, -1, -1, -1, -1, 1311, -1, -1,
6296 -1, -1, -1, -1, 1318, 1319, -1, -1, -1, 1323,
6297 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6298 -1, -1, 329, 330, 596, -1, -1, 599, 1, -1,
6299 -1, -1, -1, -1, -1, -1, -1, 609, -1, -1,
6300 612, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6301 357, 358, -1, -1, -1, -1, -1, -1, -1, 1373,
6302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6303 -1, -1, -1, -1, -1, -1, -1, -1, -1, 52,
6304 53, -1, -1, 56, 656, -1, 658, 394, -1, -1,
6305 397, -1, -1, -1, 666, -1, -1, 404, 405, -1,
6306 -1, -1, -1, -1, -1, 677, -1, 679, -1, -1,
6307 -1, -1, -1, -1, -1, -1, 89, -1, -1, -1,
6308 -1, -1, -1, -1, 696, 697, -1, -1, -1, -1,
6309 -1, -1, -1, -1, -1, 108, 109, 110, -1, -1,
6310 -1, -1, -1, -1, -1, -1, -1, 454, -1, -1,
6311 722, -1, -1, -1, -1, -1, -1, -1, 0, -1,
6312 -1, 733, -1, -1, -1, -1, 8, 9, 10, -1,
6313 -1, 13, 14, 15, -1, 17, -1, -1, -1, 1,
6314 -1, -1, 489, 25, 26, 27, -1, -1, -1, -1,
6315 -1, 498, -1, -1, -1, 37, 38, -1, 40, 41,
6316 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6317 -1, -1, -1, 520, -1, 522, -1, -1, -1, -1,
6318 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6319 52, 53, -1, -1, -1, -1, -1, -1, -1, -1,
6320 -1, 813, -1, -1, 551, -1, -1, -1, -1, -1,
6321 -1, -1, -1, -1, -1, 97, 98, -1, -1, -1,
6322 -1, -1, -1, -1, -1, -1, -1, -1, 241, -1,
6323 78, 79, 80, 81, 82, 83, 84, 250, 120, 87,
6324 88, -1, -1, -1, -1, -1, 108, 95, 96, 596,
6325 -1, -1, 599, -1, 866, -1, 269, -1, -1, -1,
6326 -1, -1, 609, -1, -1, 612, -1, -1, -1, 151,
6327 152, -1, 154, -1, -1, 157, 158, -1, 160, -1,
6328 -1, -1, -1, -1, -1, 298, -1, -1, -1, 137,
6329 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6330 -1, -1, -1, -1, -1, -1, -1, -1, -1, 656,
6331 -1, 658, -1, -1, -1, -1, 329, 330, -1, 666,
6332 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6333 677, -1, 679, -1, -1, -1, 948, -1, -1, -1,
6334 -1, 953, 954, -1, 357, 358, -1, 959, 960, 696,
6335 697, -1, -1, -1, -1, -1, 968, -1, -1, 44,
6336 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6337 88, -1, 984, -1, -1, 722, -1, 95, 96, 241,
6338 -1, -1, -1, -1, 397, -1, 733, -1, 250, 1,
6339 -1, 404, 405, 78, 79, 80, 81, 82, 83, 84,
6340 85, 86, 87, 88, 89, 90, -1, 269, -1, -1,
6341 95, 96, -1, -1, -1, 1027, 1028, 1029, -1, 137,
6342 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6343 -1, -1, 1044, -1, -1, -1, -1, -1, -1, -1,
6344 52, 53, -1, -1, 56, -1, -1, -1, -1, 1061,
6345 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6346 145, 146, -1, -1, -1, -1, 813, 329, 330, -1,
6347 155, -1, -1, 1085, -1, -1, -1, 89, -1, -1,
6348 -1, -1, -1, -1, -1, 498, -1, -1, -1, -1,
6349 -1, -1, -1, -1, -1, 357, 108, 109, 110, 111,
6350 -1, -1, -1, -1, -1, -1, -1, 520, -1, -1,
6351 -1, -1, -1, -1, -1, -1, -1, -1, -1, 866,
6352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6353 -1, -1, -1, -1, -1, 397, -1, 1149, 551, -1,
6354 -1, 1153, 404, 405, 1156, 1157, -1, -1, -1, -1,
6355 1162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6357 -1, -1, -1, -1, 1186, -1, -1, 1189, -1, -1,
6358 -1, -1, -1, 596, -1, -1, 599, -1, -1, -1,
6359 -1, -1, -1, -1, -1, -1, 609, -1, -1, 612,
6360 -1, 948, -1, -1, -1, -1, 953, 954, -1, -1,
6361 -1, -1, 959, 960, -1, -1, -1, -1, 1230, -1,
6362 -1, 968, -1, -1, -1, -1, -1, -1, -1, 241,
6363 -1, -1, -1, 1245, -1, -1, 498, 984, 250, -1,
6364 -1, -1, -1, 656, -1, 658, -1, -1, -1, -1,
6365 -1, -1, -1, -1, -1, -1, -1, 269, -1, 1271,
6366 -1, -1, -1, -1, -1, -1, 679, -1, -1, -1,
6367 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6368 1027, 1028, 1029, 696, 697, -1, 298, -1, -1, 551,
6369 -1, -1, -1, -1, -1, -1, -1, 1044, -1, 1311,
6370 -1, -1, -1, -1, -1, -1, -1, -1, -1, 722,
6371 25, 1323, -1, -1, 1061, -1, -1, 329, 330, -1,
6372 733, -1, -1, -1, -1, -1, -1, -1, -1, 742,
6373 -1, 1343, -1, -1, 596, -1, -1, 599, 1085, -1,
6374 -1, -1, -1, -1, -1, 357, 358, -1, -1, -1,
6375 612, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6376 -1, 1373, -1, 78, 79, 80, 81, 82, 83, 84,
6377 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6378 95, 96, -1, -1, -1, 397, 101, -1, -1, -1,
6379 -1, -1, 404, 405, 656, -1, 658, -1, -1, -1,
6380 813, -1, 1149, -1, -1, -1, 1153, -1, -1, 1156,
6381 1157, -1, -1, -1, -1, 1162, -1, 679, -1, -1,
6382 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6383 145, 146, -1, -1, 696, 697, 44, -1, -1, 1186,
6384 -1, -1, 1189, -1, -1, -1, -1, -1, -1, -1,
6385 -1, -1, -1, 866, -1, -1, -1, -1, -1, -1,
6386 722, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6387 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6388 88, 89, 90, 1230, -1, -1, 498, 95, 96, -1,
6389 -1, -1, -1, -1, -1, -1, -1, -1, 1245, -1,
6390 -1, -1, -1, -1, -1, -1, -1, -1, 520, -1,
6391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6392 -1, -1, -1, -1, 1271, -1, -1, 135, -1, 137,
6393 138, 139, 140, 141, 142, 143, 144, 145, 146, 551,
6394 953, 954, -1, -1, -1, -1, 959, 960, -1, -1,
6395 -1, -1, -1, -1, -1, 968, -1, -1, -1, -1,
6396 -1, -1, -1, -1, 1311, -1, -1, -1, -1, -1,
6397 -1, 984, -1, -1, -1, -1, 1323, -1, -1, -1,
6398 -1, -1, -1, -1, 596, -1, -1, 599, -1, -1,
6399 -1, -1, -1, -1, -1, -1, 1343, 609, -1, -1,
6400 -1, -1, -1, -1, 866, -1, -1, -1, -1, -1,
6401 -1, -1, -1, -1, 1027, 1028, 1029, -1, -1, -1,
6402 -1, -1, -1, -1, -1, -1, 1373, -1, -1, -1,
6403 -1, 1044, -1, -1, -1, -1, -1, -1, -1, -1,
6404 -1, -1, -1, -1, 656, -1, 658, -1, 1061, -1,
6405 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6406 87, 88, 89, 90, -1, -1, -1, 679, 95, 96,
6407 -1, -1, 1085, -1, -1, -1, -1, -1, -1, -1,
6408 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6409 -1, 953, 954, -1, -1, -1, -1, 959, 960, -1,
6410 -1, -1, -1, -1, -1, -1, 968, -1, 135, -1,
6411 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6412 -1, 733, 984, -1, -1, -1, -1, 154, -1, -1,
6413 -1, -1, -1, -1, -1, -1, 1149, -1, -1, -1,
6414 1153, -1, -1, 1156, 1157, -1, -1, -1, -1, 1162,
6415 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6416 -1, -1, -1, -1, -1, 1027, 1028, 1029, 33, 34,
6417 35, 36, -1, 1186, -1, -1, 1189, -1, -1, -1,
6418 -1, -1, 1044, -1, 49, 50, 51, 52, -1, -1,
6419 -1, 56, -1, -1, 59, 60, 61, 62, 63, 1061,
6420 -1, 813, -1, -1, -1, -1, -1, -1, -1, -1,
6421 -1, -1, -1, -1, -1, -1, -1, 1230, -1, -1,
6422 -1, -1, -1, 1085, -1, -1, 91, 92, -1, -1,
6423 -1, -1, 1245, -1, 99, -1, -1, 102, -1, 104,
6424 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6425 115, 116, 117, 118, 866, -1, -1, -1, 1271, -1,
6426 -1, -1, -1, -1, -1, 47, 48, 49, 50, -1,
6427 -1, -1, 54, 55, -1, 140, -1, -1, -1, -1,
6428 -1, -1, 147, -1, -1, 67, 68, 1149, -1, 154,
6429 -1, 1153, -1, -1, 1156, 1157, -1, -1, -1, -1,
6430 1162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6431 1323, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6432 -1, -1, -1, -1, 1186, -1, -1, 1189, -1, -1,
6433 1343, 113, 114, 115, -1, -1, -1, -1, -1, -1,
6434 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6435 -1, -1, -1, -1, -1, -1, 968, -1, -1, -1,
6436 1373, -1, -1, -1, -1, -1, -1, -1, 1230, -1,
6437 -1, -1, 984, -1, -1, 0, 1, -1, 3, 4,
6438 5, 6, 7, 1245, -1, -1, 11, 12, -1, -1,
6439 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6440 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6441 35, 36, -1, -1, 39, 1027, 1028, -1, -1, -1,
6442 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6443 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6444 65, -1, -1, -1, -1, -1, -1, -1, 230, 1061,
6445 232, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6446 -1, 1323, -1, -1, -1, -1, 91, 92, -1, 251,
6447 -1, -1, -1, 1085, 99, -1, -1, 102, 103, 104,
6448 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6449 115, 116, 117, 118, -1, 120, 278, 279, 280, -1,
6450 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6451 -1, 1373, -1, -1, -1, -1, -1, -1, -1, -1,
6452 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6453 -1, -1, -1, -1, -1, 160, -1, 1149, -1, -1,
6454 -1, 1153, -1, -1, 1156, 1157, -1, -1, -1, -1,
6455 1162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6456 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6457 87, 88, 89, 90, 1186, -1, -1, 1189, 95, 96,
6458 362, 363, 364, 365, 366, -1, -1, 369, 370, 371,
6459 372, 373, 374, 375, 376, -1, 378, -1, -1, 381,
6460 382, 383, 384, 385, 386, 387, 388, 389, 390, -1,
6461 -1, -1, 394, -1, -1, -1, -1, -1, 1230, -1,
6462 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6463 -1, -1, -1, 1245, -1, -1, -1, -1, -1, -1,
6464 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6465 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1271,
6466 -1, -1, 444, -1, -1, -1, -1, -1, -1, -1,
6467 -1, -1, 454, -1, -1, -1, -1, -1, -1, -1,
6468 -1, -1, 464, -1, -1, -1, -1, -1, -1, -1,
6469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6470 482, -1, -1, -1, -1, -1, -1, 489, -1, -1,
6471 -1, 1323, -1, -1, -1, -1, -1, -1, -1, -1,
6472 -1, -1, -1, 505, -1, 507, -1, -1, 510, -1,
6473 -1, 1343, 0, 1, -1, 3, 4, 5, 6, 7,
6474 522, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6475 18, 19, 20, 21, 22, 23, 24, -1, 540, -1,
6476 -1, 1373, 30, 31, 32, 33, 34, 35, 36, -1,
6477 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6478 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6479 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6480 -1, -1, -1, -1, -1, 587, -1, -1, 76, 77,
6481 -1, -1, -1, 595, -1, -1, 598, -1, -1, -1,
6482 -1, -1, -1, 91, 92, 607, -1, -1, -1, -1,
6483 612, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6484 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6485 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6486 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6487 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6488 148, 149, -1, -1, 666, -1, 154, -1, -1, -1,
6489 -1, -1, 160, -1, -1, 677, -1, -1, -1, -1,
6490 -1, -1, -1, 685, -1, -1, 688, -1, -1, -1,
6491 -1, -1, -1, -1, 696, 697, -1, -1, 700, -1,
6492 702, -1, -1, -1, -1, -1, -1, -1, 710, 711,
6493 712, -1, -1, -1, -1, -1, -1, -1, 720, 721,
6494 722, -1, -1, -1, -1, 727, -1, -1, -1, -1,
6495 -1, -1, 0, 1, -1, 3, 4, 5, 6, 7,
6496 8, 9, 10, 11, 12, -1, 14, 15, 16, 17,
6497 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
6498 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6499 -1, 39, 774, -1, -1, -1, -1, 45, 46, 47,
6500 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6501 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6502 68, 803, -1, -1, -1, -1, -1, -1, 76, 77,
6503 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6504 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6505 -1, 99, -1, 835, 102, 103, 104, 105, -1, 107,
6506 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6507 118, 853, 120, -1, -1, -1, -1, -1, -1, -1,
6508 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6509 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6510 148, 149, -1, -1, 152, -1, 888, -1, -1, -1,
6511 158, -1, 160, -1, -1, -1, -1, 33, 34, 35,
6512 36, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6513 -1, -1, -1, 49, 50, 51, 52, -1, -1, -1,
6514 56, -1, 58, 59, 60, 61, 62, 63, -1, 931,
6515 -1, -1, -1, -1, -1, -1, -1, -1, 940, -1,
6516 -1, -1, 78, -1, -1, -1, 948, -1, -1, -1,
6517 952, 953, 954, -1, -1, 91, 92, 959, 960, -1,
6518 -1, 963, -1, 99, -1, -1, 102, -1, 104, 105,
6519 -1, 107, 108, 975, 110, 111, 112, 113, 114, 115,
6520 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6521 -1, -1, -1, 995, -1, 997, 998, 999, -1, 1001,
6522 1002, -1, -1, -1, 140, -1, -1, -1, -1, -1,
6523 -1, 147, -1, -1, -1, -1, -1, -1, -1, 1021,
6524 1022, -1, -1, 1025, -1, -1, -1, 1029, 1030, 0,
6525 1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
6526 11, 12, 1044, -1, -1, 16, -1, 18, 19, 20,
6527 21, 22, 23, 24, -1, -1, -1, -1, 1060, 30,
6528 31, 32, 33, 34, 35, 36, 1068, -1, 39, -1,
6529 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6530 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6531 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6532 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6533 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6534 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6535 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6536 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6537 -1, -1, -1, -1, -1, -1, 1158, -1, -1, -1,
6538 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6539 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6540 -1, 152, 0, -1, -1, -1, -1, -1, -1, 160,
6541 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6542 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
6543 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6544 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6545 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6546 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6547 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6548 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6549 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6550 98, -1, 100, 101, -1, -1, -1, 135, 106, 137,
6551 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6552 -1, -1, 120, -1, -1, 123, -1, -1, -1, 1311,
6553 -1, -1, -1, -1, -1, -1, 134, 135, 136, 137,
6554 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6555 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6556 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6557 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6558 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6559 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6560 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6561 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6562 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6563 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6564 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6565 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6566 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6567 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6568 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6569 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6570 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6571 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6572 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6573 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6574 -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6575 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6576 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6577 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6578 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6579 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6580 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6581 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6582 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6584 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6585 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6586 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6587 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6588 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6589 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6590 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6591 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6592 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6593 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6594 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6595 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6596 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6597 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6599 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6600 -1, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6601 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6602 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6603 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6604 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6605 -1, 25, 26, 27, 28, 29, -1, -1, -1, -1,
6606 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6607 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6608 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6609 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6610 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6611 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6612 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6613 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6614 -1, -1, -1, -1, -1, -1, 120, -1, -1, 123,
6615 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6616 -1, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6617 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6618 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6619 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6620 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
6621 28, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6622 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6623 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6625 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6626 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6627 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6628 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6630 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6631 -1, -1, -1, -1, -1, -1, -1, 135, -1, 137,
6632 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6633 -1, -1, -1, 151, 152, 153, 154, 155, 0, 157,
6634 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6635 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6636 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6637 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6638 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6639 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6640 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6641 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6642 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6643 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6644 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6645 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6646 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6647 -1, -1, -1, 135, 136, 137, 138, 139, 140, 141,
6648 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6649 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6650 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6651 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6652 26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6653 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6654 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6655 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6656 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6657 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6658 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6659 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6660 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6662 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6663 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6664 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6665 0, 157, 158, 159, 160, -1, -1, -1, 8, 9,
6666 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6667 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6668 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6669 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6670 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6671 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6672 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6673 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6674 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6675 100, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6678 -1, -1, -1, -1, 134, 135, -1, 137, 138, 139,
6679 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6680 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6681 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6682 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6683 -1, 25, -1, 27, 28, -1, -1, -1, -1, -1,
6684 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6685 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6686 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6687 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6688 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6689 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6690 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6691 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6692 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6694 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6695 144, 145, 146, -1, -1, -1, -1, -1, 152, 153,
6696 154, 155, 0, 157, 158, 159, 160, -1, -1, -1,
6697 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6698 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6699 28, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6700 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6701 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6702 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6703 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6704 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6705 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6706 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6708 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6709 -1, -1, -1, -1, -1, -1, -1, 135, -1, 137,
6710 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6711 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6712 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6713 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6714 -1, -1, -1, 25, -1, 27, 28, -1, -1, -1,
6715 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6716 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6717 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6718 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6719 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6720 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6721 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6722 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6723 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6724 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6725 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6726 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6727 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6728 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6729 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6730 -1, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6731 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6732 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6733 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6734 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6735 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6736 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6737 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6738 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6739 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6740 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6741 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6742 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6743 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6744 10, -1, -1, -1, 14, 15, -1, 17, -1, -1,
6745 -1, -1, -1, -1, -1, 25, 26, -1, -1, -1,
6746 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6747 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6748 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6749 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6750 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6751 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6752 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6753 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
6754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6755 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6756 -1, -1, -1, -1, 134, 135, -1, 137, 138, 139,
6757 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6758 -1, 151, 152, 153, 154, 155, 0, -1, 158, -1,
6759 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6760 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6761 -1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
6762 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6763 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6764 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6765 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6766 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6767 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6768 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6770 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6771 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6772 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6773 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6774 154, 155, 0, -1, 158, -1, 160, -1, -1, -1,
6775 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6776 -1, -1, -1, -1, -1, -1, -1, 25, -1, -1,
6777 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6778 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6779 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6780 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6781 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6782 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6783 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6784 98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6785 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6786 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6787 -1, -1, -1, -1, -1, -1, 134, 135, -1, 137,
6788 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6789 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6790 158, -1, 160, -1, -1, -1, 8, 9, 10, -1,
6791 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6792 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6793 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6794 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6795 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6796 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6797 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6798 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6799 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6800 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6801 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6802 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6803 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6804 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6805 152, 153, 154, 155, -1, -1, 158, 1, 160, 3,
6806 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
6807 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23,
6808 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6809 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6810 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6811 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6812 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6813 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6814 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6815 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6816 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6817 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6818 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6819 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6820 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6821 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6822 12, -1, 14, 15, 16, -1, 18, 19, 20, 21,
6823 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6824 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6825 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6826 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6827 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6828 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6829 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6830 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6831 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6832 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6833 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6834 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6835 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6836 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6837 10, 11, 12, -1, -1, 15, 16, 17, 18, 19,
6838 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6839 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6840 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6841 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6842 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6843 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6844 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6845 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6846 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6847 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6848 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6849 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6850 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6851 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6852 160, -1, 10, 11, 12, -1, -1, 15, 16, -1,
6853 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
6854 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6855 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6856 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6857 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6858 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6859 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6860 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6861 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6862 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6863 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6864 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6865 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6866 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6867 6, 7, 160, -1, 10, 11, 12, -1, -1, 15,
6868 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6869 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6870 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6871 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6872 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6873 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6874 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6875 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6876 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6877 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6878 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6879 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6880 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6881 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6882 4, 5, 6, 7, 160, 9, 10, 11, 12, -1,
6883 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6884 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6885 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6886 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6887 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6888 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6889 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6890 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6891 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6892 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6893 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6894 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6895 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6896 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6897 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6898 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6899 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6900 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6901 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6902 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6903 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6904 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6905 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6906 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6907 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6908 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6910 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6911 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6912 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6913 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6914 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6915 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6916 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6917 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6918 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6919 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6920 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6921 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6922 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6923 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6925 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6926 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6927 -1, -1, -1, -1, 154, -1, -1, -1, 158, 1,
6928 160, 3, 4, 5, 6, 7, -1, -1, -1, 11,
6929 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6930 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6931 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6932 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6933 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6934 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6935 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6936 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6937 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6938 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6939 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6940 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6941 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6942 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6943 -1, -1, 154, -1, -1, -1, 158, 1, 160, 3,
6944 4, 5, 6, 7, -1, -1, -1, 11, 12, -1,
6945 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6946 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6947 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6948 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6949 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6950 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6951 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6952 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6953 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6954 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6955 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6956 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6957 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6958 -1, -1, -1, 147, 148, 149, -1, -1, 152, 1,
6959 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6960 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6961 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6962 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6963 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6964 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6965 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6966 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6967 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6968 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6969 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6970 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6971 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6972 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6973 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6974 152, 1, 154, 3, 4, 5, -1, 7, 160, -1,
6975 -1, 11, 12, -1, -1, -1, 16, 17, 18, 19,
6976 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6977 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6978 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6979 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6980 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6981 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6982 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6983 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6984 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6985 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6986 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6987 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6988 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6989 -1, -1, -1, -1, 154, -1, -1, -1, -1, -1,
6990 160, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6991 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6992 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6993 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6994 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6995 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
6996 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6997 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6998 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6999 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7000 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7001 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7002 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7003 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7004 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
7005 -1, -1, -1, -1, 156, 157, 3, 4, 5, 6,
7006 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
7007 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
7008 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
7009 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
7010 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
7011 57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7012 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7013 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7014 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7016 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7017 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7018 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7019 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7020 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
7021 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
7022 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
7023 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
7024 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
7025 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
7026 53, 54, -1, 56, -1, -1, -1, -1, -1, -1,
7027 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7028 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7029 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7030 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7031 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
7032 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7033 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7034 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7035 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
7036 -1, -1, -1, 156, 3, 4, 5, 6, 7, 8,
7037 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7038 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
7039 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
7040 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
7041 49, 50, 51, 52, 53, -1, -1, 56, -1, -1,
7042 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7043 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7044 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7045 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7046 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7047 -1, -1, 111, -1, -1, -1, -1, -1, -1, -1,
7048 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7049 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7050 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7051 149, -1, -1, -1, -1, -1, -1, 156, 3, 4,
7052 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
7053 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
7054 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
7055 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
7056 45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
7057 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
7058 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7059 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7060 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7061 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7062 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7063 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7064 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7065 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7066 145, 146, -1, 148, 149, 3, 4, 5, -1, 7,
7067 -1, 156, -1, 11, 12, -1, -1, -1, 16, -1,
7068 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7069 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
7070 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7071 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7072 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7073 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7074 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7075 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7076 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7077 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7078 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7079 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7080 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7081 30, 31, 32, 33, 34, 35, 36, 155, -1, 39,
7082 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7083 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7084 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7087 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7088 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7089 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7090 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7091 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7092 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7093 32, 33, 34, 35, 36, 155, -1, 39, -1, -1,
7094 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7095 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
7096 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7097 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
7098 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
7099 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7100 102, 103, 104, 105, -1, 107, 108, 109, 110, 111,
7101 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
7102 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7103 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7104 3, 4, 5, -1, 7, 147, 148, 149, 11, 12,
7105 -1, -1, 154, 16, -1, 18, 19, 20, 21, 22,
7106 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
7107 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7108 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7109 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7110 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7111 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
7112 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
7113 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7114 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7115 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
7116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7117 -1, -1, -1, -1, -1, -1, -1, 1, -1, 3,
7118 4, 5, 6, 7, 147, 148, 149, 11, 12, -1,
7119 -1, 154, 16, -1, 18, 19, 20, 21, 22, 23,
7120 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
7121 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7122 -1, 45, 46, -1, 48, 49, 50, 51, 52, 53,
7123 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7124 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7125 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7126 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7127 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7128 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7129 114, 115, 116, 117, 118, -1, -1, 1, -1, 3,
7130 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7131 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7132 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7133 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7134 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7135 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7136 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7137 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7138 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7139 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7140 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7141 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7142 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7143 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7144 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7145 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7146 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7147 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7148 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7149 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7150 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7151 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7152 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
7153 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7154 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7155 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7156 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7157 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7158 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7159 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7160 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7161 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7162 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7163 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7164 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
7165 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7166 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7167 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7168 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7169 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7170 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7171 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7172 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7173 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7174 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7175 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7176 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
7177 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7178 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7179 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7180 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7181 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7182 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7183 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7184 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7185 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7186 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7187 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7188 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
7189 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7190 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7191 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7192 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7193 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7194 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7195 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7196 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7197 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7198 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7199 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7200 104, 105, -1, 107, 108, -1, 110, 111, 112, 113,
7201 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7202 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7203 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7204 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7205 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7206 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7207 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7208 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7209 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7210 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7211 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7212 104, 105, -1, -1, 108, 109, 110, 111, 112, 113,
7213 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7214 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7215 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7216 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7217 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7218 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7219 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7220 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7221 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7222 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7223 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7224 104, 105, -1, -1, 108, -1, 110, 111, 112, 113,
7225 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7226 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7227 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7228 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7229 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7230 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7231 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7232 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7233 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7234 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7235 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7236 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7237 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7238 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7239 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7240 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7241 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7242 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7243 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7244 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7245 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7246 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7247 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7248 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7249 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7250 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7251 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7252 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7253 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7254 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7255 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7256 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7257 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7258 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7259 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7260 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7261 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7262 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7263 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7264 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7265 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7266 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7267 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7268 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7269 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7270 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7271 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7272 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7273 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7274 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7275 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7276 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7277 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7278 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7279 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7280 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7281 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7282 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7283 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7284 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7285 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7286 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7287 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7288 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7289 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7290 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7291 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7292 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7293 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7294 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7295 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7296 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7297 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7298 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7299 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7300 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7301 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7302 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7303 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7304 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7305 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7306 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7307 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7308 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7309 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7310 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7311 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7312 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7313 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7314 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7315 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7316 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7317 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7318 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7319 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7320 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7321 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7322 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7323 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7324 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7325 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7326 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7327 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7328 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7329 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7330 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7331 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7332 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7333 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7334 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7335 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7336 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7337 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7338 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7339 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7340 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7341 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7342 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7343 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7344 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7345 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7346 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7347 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7348 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7349 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7350 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7351 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7352 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7353 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7354 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7355 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7356 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7357 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7358 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7359 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7360 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7361 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7362 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7363 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7364 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7365 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7366 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7367 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7368 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7369 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7370 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7371 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7372 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7373 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7374 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7375 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7376 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7379 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7380 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7381 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7382 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7383 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7384 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7385 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7386 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7387 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7388 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7389 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7391 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7392 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7393 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7394 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7395 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7396 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7397 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7398 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7399 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7400 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7402 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
7403 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7404 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7405 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7406 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7407 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7408 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7409 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7410 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7411 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7414 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7415 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7416 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7417 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7418 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7419 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7420 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7421 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7422 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7423 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7424 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7425 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7426 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7427 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7428 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7429 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7430 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7431 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7432 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7433 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7434 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7435 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7437 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7438 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7439 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7440 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7441 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7442 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7443 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7444 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7445 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7446 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7450 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7451 33, 34, 35, 36, 110, 111, 112, 113, 114, 115,
7452 116, 117, 118, -1, -1, -1, 49, 50, 51, 52,
7453 -1, -1, -1, 56, -1, -1, 59, 60, 61, 62,
7454 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7455 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
7456 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
7457 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7458 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
7459 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
7460 -1, -1, 33, 34, 35, 36, -1, -1, -1, 52,
7461 53, -1, -1, 56, -1, -1, -1, 140, 49, 50,
7462 51, 52, -1, -1, 147, 56, -1, -1, 59, 60,
7463 61, 62, 63, 76, 77, 78, 79, 80, 81, 82,
7464 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7465 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7466 91, 92, -1, -1, 107, 108, -1, -1, 99, -1,
7467 -1, 102, -1, 104, 105, -1, -1, -1, -1, 110,
7468 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7469 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7470 143, 144, 145, 146, -1, 148, 149, 52, 53, 140,
7471 -1, 56, -1, 156, 157, -1, 147, -1, -1, -1,
7472 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7473 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7474 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7475 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7476 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7478 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7479 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7480 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7481 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7482 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7483 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7484 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7486 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7487 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7488 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7489 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7490 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7491 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7492 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7493 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7494 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7495 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7496 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7497 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7498 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7499 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7500 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7502 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7503 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7504 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7505 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7506 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7508 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7509 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7510 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7511 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7512 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7513 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7514 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7515 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7517 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7518 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7519 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7520 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7521 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7522 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7523 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7524 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7525 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7526 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7527 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7528 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7529 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7530 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7531 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7532 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7533 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7534 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7535 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7536 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7537 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7538 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7539 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7540 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7541 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7542 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7543 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7544 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7545 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7546 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7547 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7548 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7549 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7550 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7551 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7552 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7553 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7554 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7555 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7556 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7557 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7558 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7559 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7560 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7561 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7562 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7563 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7564 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7566 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7567 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7568 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7569 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7570 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7571 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7572 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7573 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7574 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7575 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7576 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7577 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7578 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7579 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7580 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7581 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7582 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7583 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7584 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7585 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7586 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7587 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7588 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7590 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7591 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7592 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7593 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7594 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7595 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7596 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7597 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7598 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7599 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7600 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7601 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7602 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7603 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7604 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7605 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7606 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7607 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7608 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7609 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7610 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7611 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7612 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7613 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7614 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7615 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7616 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7617 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7618 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7619 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7620 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7621 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7622 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7623 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7625 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7626 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7627 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
7628 -1, 156
7629};
7630
7631/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7632 state STATE-NUM. */
7633static const yytype_int16 yystos[] =
7634{
7635 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7636 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7637 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7638 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7639 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7640 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7641 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7642 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7643 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7644 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7645 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7646 277, 278, 287, 288, 289, 290, 291, 327, 332, 333,
7647 383, 384, 385, 386, 387, 388, 390, 391, 394, 395,
7648 397, 398, 399, 400, 414, 415, 417, 418, 419, 420,
7649 421, 422, 423, 424, 425, 486, 0, 3, 4, 5,
7650 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
7651 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
7652 26, 30, 31, 32, 33, 34, 35, 36, 37, 38,
7653 39, 45, 46, 47, 48, 49, 50, 51, 52, 53,
7654 56, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7655 87, 88, 93, 94, 95, 96, 107, 108, 137, 138,
7656 139, 140, 141, 142, 143, 144, 145, 146, 148, 149,
7657 156, 220, 221, 222, 224, 225, 414, 179, 179, 179,
7658 157, 242, 247, 248, 154, 157, 189, 54, 221, 189,
7659 151, 169, 170, 235, 486, 21, 22, 32, 39, 99,
7660 102, 148, 195, 197, 208, 217, 227, 268, 287, 291,
7661 421, 422, 424, 425, 227, 227, 227, 56, 47, 102,
7662 171, 176, 177, 182, 211, 212, 486, 171, 58, 107,
7663 108, 112, 227, 238, 239, 240, 251, 252, 473, 474,
7664 486, 239, 472, 473, 486, 46, 99, 147, 155, 195,
7665 197, 216, 255, 268, 421, 422, 425, 325, 220, 403,
7666 416, 420, 403, 404, 405, 161, 389, 389, 389, 389,
7667 419, 203, 227, 268, 227, 154, 160, 163, 484, 485,
7668 169, 40, 41, 42, 43, 44, 37, 38, 157, 428,
7669 429, 430, 431, 432, 428, 431, 26, 151, 242, 248,
7670 279, 334, 28, 280, 331, 134, 155, 102, 107, 214,
7671 134, 25, 78, 79, 80, 81, 82, 83, 84, 85,
7672 86, 87, 88, 89, 90, 95, 96, 101, 135, 137,
7673 138, 139, 140, 141, 142, 143, 144, 145, 146, 233,
7674 233, 69, 97, 98, 153, 478, 479, 256, 1, 191,
7675 198, 199, 199, 200, 202, 202, 163, 199, 485, 99,
7676 210, 217, 268, 296, 421, 422, 425, 52, 56, 95,
7677 99, 218, 219, 268, 421, 422, 425, 219, 33, 34,
7678 35, 36, 49, 50, 51, 52, 56, 157, 194, 220,
7679 423, 468, 469, 470, 109, 187, 209, 245, 246, 249,
7680 251, 473, 246, 246, 157, 248, 98, 478, 479, 334,
7681 386, 100, 100, 155, 92, 244, 246, 251, 452, 473,
7682 486, 246, 189, 191, 480, 191, 54, 64, 65, 181,
7683 157, 235, 236, 164, 56, 428, 428, 134, 98, 153,
7684 478, 100, 100, 100, 178, 211, 158, 163, 485, 480,
7685 257, 239, 239, 239, 403, 101, 159, 155, 189, 483,
7686 155, 483, 152, 483, 189, 56, 419, 213, 214, 430,
7687 155, 98, 153, 478, 322, 66, 119, 121, 122, 406,
7688 119, 119, 406, 67, 406, 161, 392, 401, 396, 402,
7689 78, 98, 478, 160, 168, 171, 199, 199, 199, 199,
7690 235, 237, 191, 191, 52, 54, 55, 56, 57, 58,
7691 78, 92, 102, 107, 108, 109, 141, 144, 301, 370,
7692 429, 433, 434, 436, 437, 440, 441, 443, 444, 445,
7693 446, 452, 453, 454, 455, 456, 457, 458, 459, 460,
7694 461, 462, 463, 464, 465, 134, 265, 446, 134, 266,
7695 335, 336, 106, 207, 337, 338, 338, 235, 211, 155,
7696 216, 155, 235, 193, 227, 227, 227, 227, 227, 227,
7697 227, 227, 227, 227, 227, 227, 227, 192, 227, 227,
7698 227, 227, 227, 227, 227, 227, 227, 227, 227, 52,
7699 53, 56, 224, 475, 476, 244, 251, 52, 53, 56,
7700 224, 475, 242, 171, 174, 13, 292, 484, 292, 199,
7701 171, 171, 259, 163, 56, 98, 153, 478, 25, 199,
7702 52, 56, 218, 138, 427, 486, 98, 153, 478, 264,
7703 471, 69, 98, 477, 239, 155, 250, 486, 155, 250,
7704 246, 480, 52, 56, 242, 475, 235, 235, 223, 480,
7705 155, 480, 155, 158, 480, 221, 236, 227, 152, 100,
7706 134, 134, 235, 52, 56, 475, 244, 52, 56, 475,
7707 235, 235, 235, 170, 480, 177, 158, 124, 239, 239,
7708 252, 473, 474, 155, 213, 52, 56, 244, 52, 56,
7709 323, 408, 407, 119, 393, 406, 66, 119, 119, 393,
7710 66, 119, 227, 56, 152, 182, 102, 107, 297, 298,
7711 299, 300, 454, 155, 435, 466, 467, 155, 435, 155,
7712 442, 467, 480, 302, 303, 155, 442, 239, 34, 52,
7713 52, 155, 442, 34, 52, 39, 188, 209, 227, 232,
7714 174, 484, 188, 232, 174, 322, 152, 336, 322, 10,
7715 68, 286, 286, 107, 203, 204, 205, 239, 251, 253,
7716 254, 480, 213, 155, 99, 185, 190, 205, 217, 227,
7717 239, 241, 254, 268, 425, 344, 344, 189, 100, 100,
7718 151, 242, 248, 189, 481, 155, 100, 100, 242, 243,
7719 248, 486, 235, 286, 171, 13, 171, 27, 293, 484,
7720 286, 286, 17, 283, 340, 25, 258, 346, 52, 56,
7721 244, 52, 56, 260, 263, 426, 262, 52, 56, 218,
7722 244, 174, 191, 196, 249, 473, 480, 243, 248, 190,
7723 227, 241, 190, 241, 221, 452, 473, 191, 235, 39,
7724 100, 100, 481, 100, 100, 190, 241, 239, 483, 214,
7725 481, 324, 409, 413, 420, 425, 389, 406, 389, 389,
7726 389, 299, 454, 155, 480, 155, 465, 433, 459, 461,
7727 437, 440, 457, 463, 134, 239, 441, 456, 463, 455,
7728 457, 189, 44, 44, 286, 286, 323, 152, 323, 239,
7729 155, 44, 213, 56, 44, 134, 44, 98, 153, 478,
7730 342, 342, 136, 235, 235, 336, 207, 159, 100, 235,
7731 235, 207, 8, 281, 379, 486, 14, 15, 284, 285,
7732 294, 295, 486, 295, 201, 107, 239, 339, 286, 344,
7733 340, 286, 481, 199, 484, 199, 174, 481, 286, 480,
7734 194, 250, 334, 331, 480, 155, 480, 189, 235, 235,
7735 100, 235, 235, 179, 410, 480, 297, 300, 298, 435,
7736 155, 442, 155, 442, 155, 442, 155, 442, 442, 188,
7737 232, 237, 237, 324, 324, 107, 239, 237, 237, 235,
7738 237, 52, 56, 244, 52, 56, 343, 343, 227, 190,
7739 241, 190, 241, 152, 235, 190, 241, 190, 241, 239,
7740 254, 380, 486, 175, 284, 171, 199, 286, 286, 239,
7741 155, 292, 342, 286, 293, 174, 484, 286, 235, 157,
7742 301, 328, 429, 434, 438, 439, 441, 448, 449, 450,
7743 451, 452, 457, 463, 465, 411, 155, 155, 457, 457,
7744 463, 457, 227, 227, 179, 179, 239, 182, 182, 227,
7745 481, 52, 56, 58, 91, 92, 99, 102, 104, 105,
7746 107, 112, 140, 327, 349, 350, 351, 352, 356, 360,
7747 361, 362, 365, 366, 367, 368, 369, 370, 371, 372,
7748 373, 374, 375, 376, 377, 378, 383, 384, 387, 388,
7749 391, 395, 398, 400, 422, 459, 349, 190, 241, 101,
7750 381, 486, 9, 282, 382, 486, 172, 292, 107, 239,
7751 171, 343, 261, 286, 451, 155, 306, 486, 326, 155,
7752 306, 155, 447, 486, 155, 447, 155, 447, 171, 298,
7753 442, 442, 155, 442, 442, 139, 316, 317, 486, 316,
7754 374, 374, 56, 218, 343, 350, 358, 359, 360, 361,
7755 364, 481, 189, 343, 482, 52, 403, 52, 102, 420,
7756 101, 155, 139, 155, 155, 350, 89, 90, 98, 153,
7757 157, 354, 355, 52, 99, 217, 268, 421, 422, 425,
7758 292, 176, 171, 171, 239, 295, 340, 341, 348, 349,
7759 171, 189, 319, 465, 29, 123, 329, 461, 439, 457,
7760 463, 441, 463, 457, 0, 120, 412, 457, 301, 304,
7761 305, 307, 308, 310, 311, 313, 314, 315, 318, 455,
7762 457, 458, 463, 465, 171, 174, 350, 481, 350, 362,
7763 364, 481, 155, 152, 235, 124, 199, 375, 358, 362,
7764 353, 363, 364, 112, 367, 371, 374, 374, 218, 343,
7765 481, 343, 480, 358, 361, 365, 358, 361, 365, 56,
7766 98, 153, 478, 171, 163, 173, 294, 292, 40, 41,
7767 286, 160, 158, 330, 171, 306, 155, 447, 155, 447,
7768 155, 447, 155, 447, 447, 442, 306, 155, 306, 155,
7769 312, 486, 319, 303, 155, 309, 312, 99, 268, 155,
7770 312, 480, 155, 155, 357, 480, 155, 356, 155, 403,
7771 480, 480, 480, 481, 481, 481, 52, 56, 244, 52,
7772 56, 379, 382, 345, 199, 199, 52, 320, 321, 453,
7773 174, 152, 457, 457, 463, 457, 304, 461, 308, 310,
7774 457, 463, 139, 268, 311, 463, 56, 98, 457, 363,
7775 365, 363, 362, 364, 481, 171, 155, 189, 286, 447,
7776 447, 155, 447, 447, 306, 155, 312, 155, 312, 155,
7777 312, 155, 312, 52, 56, 312, 155, 482, 295, 346,
7778 347, 321, 457, 457, 457, 463, 457, 447, 312, 312,
7779 155, 312, 312, 457, 312
7780};
7781
7782/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7783static const yytype_int16 yyr1[] =
7784{
7785 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7786 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7787 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7788 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7789 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7790 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7791 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7792 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7793 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7794 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7795 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7796 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7797 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7798 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7799 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7800 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7801 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7802 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7803 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7804 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7805 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7806 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7807 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7808 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7809 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7810 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7811 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7812 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7813 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7814 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7815 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7816 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7817 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7818 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7819 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7820 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7821 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7822 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7823 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7824 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7825 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7826 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7827 289, 290, 291, 292, 292, 292, 293, 293, 294, 294,
7828 295, 295, 296, 296, 297, 297, 298, 298, 299, 299,
7829 299, 299, 299, 300, 300, 301, 301, 302, 303, 304,
7830 304, 305, 305, 306, 306, 307, 307, 307, 307, 308,
7831 309, 310, 311, 311, 312, 312, 313, 313, 313, 313,
7832 313, 313, 313, 313, 313, 313, 313, 313, 314, 314,
7833 314, 315, 314, 316, 316, 317, 318, 318, 319, 319,
7834 320, 320, 321, 321, 322, 323, 324, 325, 326, 327,
7835 328, 328, 329, 330, 329, 331, 332, 332, 332, 332,
7836 332, 333, 333, 333, 333, 333, 333, 333, 333, 334,
7837 334, 335, 336, 337, 338, 339, 339, 339, 339, 340,
7838 341, 341, 342, 343, 344, 345, 346, 347, 347, 348,
7839 348, 348, 349, 349, 349, 349, 349, 349, 350, 351,
7840 351, 352, 352, 353, 354, 355, 356, 356, 356, 356,
7841 356, 356, 356, 356, 356, 356, 356, 356, 356, 357,
7842 356, 356, 356, 358, 358, 358, 358, 358, 358, 359,
7843 359, 360, 360, 361, 362, 362, 363, 363, 364, 365,
7844 365, 365, 365, 366, 366, 367, 367, 368, 368, 369,
7845 369, 370, 371, 371, 372, 373, 373, 373, 373, 373,
7846 373, 372, 372, 372, 372, 374, 374, 374, 374, 374,
7847 374, 374, 374, 374, 374, 375, 376, 376, 377, 378,
7848 378, 378, 379, 379, 380, 380, 380, 381, 381, 382,
7849 382, 383, 383, 384, 385, 385, 385, 386, 387, 388,
7850 389, 389, 390, 391, 392, 392, 393, 393, 394, 395,
7851 396, 396, 397, 398, 399, 400, 401, 401, 402, 402,
7852 403, 403, 404, 404, 405, 405, 406, 407, 406, 408,
7853 409, 410, 411, 406, 412, 412, 413, 413, 414, 414,
7854 415, 416, 416, 417, 418, 418, 419, 419, 419, 419,
7855 420, 420, 420, 421, 421, 421, 422, 422, 422, 422,
7856 422, 422, 422, 423, 423, 424, 424, 425, 425, 426,
7857 427, 427, 428, 428, 429, 430, 431, 432, 431, 433,
7858 433, 434, 434, 435, 435, 436, 436, 436, 436, 437,
7859 437, 438, 438, 438, 438, 439, 439, 440, 441, 441,
7860 442, 442, 443, 443, 443, 443, 443, 443, 443, 443,
7861 443, 443, 443, 443, 444, 444, 445, 444, 444, 446,
7862 447, 447, 448, 448, 448, 448, 448, 448, 448, 448,
7863 448, 448, 448, 448, 449, 449, 450, 449, 449, 451,
7864 452, 453, 453, 453, 453, 454, 454, 455, 456, 456,
7865 457, 457, 458, 459, 459, 460, 461, 461, 462, 462,
7866 463, 463, 464, 464, 465, 465, 465, 466, 466, 467,
7867 468, 469, 470, 471, 470, 472, 472, 473, 473, 474,
7868 474, 474, 474, 474, 474, 475, 475, 475, 475, 476,
7869 476, 476, 477, 477, 478, 478, 479, 479, 480, 481,
7870 482, 483, 483, 484, 484, 485, 485, 486
7871};
7872
7873/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7874static const yytype_int8 yyr2[] =
7875{
7876 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7877 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7878 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7879 3, 3, 3, 2, 3, 3, 3, 3, 4, 4,
7880 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7881 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7882 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7883 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7884 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7885 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7886 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7887 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7888 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7889 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7890 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7891 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7892 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7893 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7894 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7895 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7896 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7897 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7898 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7899 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7900 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7901 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7902 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7903 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7904 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7905 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7906 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7907 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7908 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7909 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7910 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7911 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7912 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7913 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7914 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7915 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7916 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7917 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7918 1, 1, 1, 1, 1, 2, 1, 1, 1, 5,
7919 1, 2, 1, 1, 1, 3, 1, 3, 1, 3,
7920 5, 1, 3, 2, 1, 1, 1, 0, 2, 2,
7921 1, 1, 3, 2, 1, 4, 2, 2, 1, 1,
7922 1, 3, 1, 3, 2, 1, 6, 8, 4, 6,
7923 4, 6, 4, 6, 2, 4, 2, 4, 1, 2,
7924 2, 1, 1, 1, 1, 4, 0, 1, 1, 4,
7925 1, 3, 1, 1, 0, 0, 0, 0, 0, 9,
7926 4, 1, 3, 0, 4, 3, 2, 4, 5, 5,
7927 3, 2, 4, 4, 3, 3, 2, 1, 4, 3,
7928 3, 0, 7, 0, 7, 1, 2, 3, 4, 5,
7929 1, 1, 0, 0, 0, 0, 9, 1, 1, 1,
7930 3, 3, 1, 2, 3, 1, 1, 1, 1, 3,
7931 1, 4, 1, 0, 2, 2, 1, 1, 4, 4,
7932 4, 3, 4, 4, 4, 3, 3, 3, 2, 0,
7933 6, 2, 4, 1, 1, 2, 2, 4, 1, 2,
7934 3, 1, 3, 5, 2, 1, 1, 3, 1, 3,
7935 1, 2, 1, 1, 3, 2, 1, 1, 3, 2,
7936 1, 2, 1, 1, 1, 3, 3, 2, 2, 2,
7937 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7938 1, 1, 1, 1, 1, 1, 2, 2, 4, 2,
7939 3, 1, 6, 1, 1, 1, 1, 2, 1, 3,
7940 1, 1, 1, 1, 1, 1, 2, 3, 3, 3,
7941 1, 2, 4, 1, 0, 3, 1, 2, 4, 1,
7942 0, 3, 4, 1, 4, 1, 0, 3, 0, 3,
7943 0, 2, 0, 2, 0, 2, 1, 0, 3, 0,
7944 0, 0, 0, 7, 1, 1, 1, 1, 1, 1,
7945 2, 1, 1, 3, 1, 2, 1, 1, 1, 1,
7946 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7947 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
7948 4, 1, 1, 1, 0, 3, 1, 0, 3, 2,
7949 1, 1, 3, 2, 1, 4, 2, 2, 1, 1,
7950 1, 4, 2, 2, 1, 1, 1, 3, 1, 3,
7951 2, 1, 6, 8, 4, 6, 4, 6, 4, 6,
7952 2, 4, 2, 4, 1, 2, 1, 1, 1, 1,
7953 2, 1, 6, 8, 4, 6, 4, 6, 4, 6,
7954 2, 4, 2, 4, 1, 2, 1, 1, 1, 1,
7955 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
7956 1, 3, 1, 1, 1, 1, 2, 1, 1, 1,
7957 2, 1, 1, 1, 2, 2, 1, 0, 1, 1,
7958 1, 1, 1, 0, 4, 1, 2, 1, 3, 3,
7959 2, 1, 4, 2, 1, 1, 1, 1, 1, 1,
7960 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
7961 2, 1, 1, 1, 1, 1, 2, 0
7962};
7963
7964
7965enum { YYENOMEM = -2 };
7966
7967#define yyerrok (yyerrstatus = 0)
7968#define yyclearin (yychar = YYEMPTY)
7969
7970#define YYACCEPT goto yyacceptlab
7971#define YYABORT goto yyabortlab
7972#define YYERROR goto yyerrorlab
7973#define YYNOMEM goto yyexhaustedlab
7974
7975
7976#define YYRECOVERING() (!!yyerrstatus)
7977
7978#define YYBACKUP(Token, Value) \
7979 do \
7980 if (yychar == YYEMPTY) \
7981 { \
7982 yychar = (Token); \
7983 yylval = (Value); \
7984 YYPOPSTACK (yylen); \
7985 yystate = *yyssp; \
7986 goto yybackup; \
7987 } \
7988 else \
7989 { \
7990 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7991 YYERROR; \
7992 } \
7993 while (0)
7994
7995/* Backward compatibility with an undocumented macro.
7996 Use YYerror or YYUNDEF. */
7997#define YYERRCODE YYUNDEF
7998
7999/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
8000 If N is 0, then set CURRENT to the empty location which ends
8001 the previous symbol: RHS[0] (always defined). */
8002
8003#ifndef YYLLOC_DEFAULT
8004# define YYLLOC_DEFAULT(Current, Rhs, N) \
8005 do \
8006 if (N) \
8007 { \
8008 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
8009 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
8010 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
8011 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
8012 } \
8013 else \
8014 { \
8015 (Current).first_line = (Current).last_line = \
8016 YYRHSLOC (Rhs, 0).last_line; \
8017 (Current).first_column = (Current).last_column = \
8018 YYRHSLOC (Rhs, 0).last_column; \
8019 } \
8020 while (0)
8021#endif
8022
8023#define YYRHSLOC(Rhs, K) ((Rhs)[K])
8024
8025
8026/* Enable debugging if requested. */
8027#if YYDEBUG
8028
8029# ifndef YYFPRINTF
8030# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
8031# define YYFPRINTF fprintf
8032# endif
8033
8034# define YYDPRINTF(Args) \
8035do { \
8036 if (yydebug) \
8037 YYFPRINTF Args; \
8038} while (0)
8039
8040
8041/* YYLOCATION_PRINT -- Print the location on the stream.
8042 This macro was not mandated originally: define only if we know
8043 we won't break user code: when these are the locations we know. */
8044
8045# ifndef YYLOCATION_PRINT
8046
8047# if defined YY_LOCATION_PRINT
8048
8049 /* Temporary convenience wrapper in case some people defined the
8050 undocumented and private YY_LOCATION_PRINT macros. */
8051# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
8052
8053# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
8054
8055/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
8056
8057YY_ATTRIBUTE_UNUSED
8058static int
8059yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
8060{
8061 int res = 0;
8062 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
8063 if (0 <= yylocp->first_line)
8064 {
8065 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
8066 if (0 <= yylocp->first_column)
8067 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
8068 }
8069 if (0 <= yylocp->last_line)
8070 {
8071 if (yylocp->first_line < yylocp->last_line)
8072 {
8073 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
8074 if (0 <= end_col)
8075 res += YYFPRINTF (yyo, ".%d", end_col);
8076 }
8077 else if (0 <= end_col && yylocp->first_column < end_col)
8078 res += YYFPRINTF (yyo, "-%d", end_col);
8079 }
8080 return res;
8081}
8082
8083# define YYLOCATION_PRINT yy_location_print_
8084
8085 /* Temporary convenience wrapper in case some people defined the
8086 undocumented and private YY_LOCATION_PRINT macros. */
8087# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
8088
8089# else
8090
8091# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
8092 /* Temporary convenience wrapper in case some people defined the
8093 undocumented and private YY_LOCATION_PRINT macros. */
8094# define YY_LOCATION_PRINT YYLOCATION_PRINT
8095
8096# endif
8097# endif /* !defined YYLOCATION_PRINT */
8098
8099
8100# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
8101do { \
8102 if (yydebug) \
8103 { \
8104 YYFPRINTF (stderr, "%s ", Title); \
8105 yy_symbol_print (stderr, \
8106 Kind, Value, Location, p); \
8107 YYFPRINTF (stderr, "\n"); \
8108 } \
8109} while (0)
8110
8111
8112/*-----------------------------------.
8113| Print this symbol's value on YYO. |
8114`-----------------------------------*/
8115
8116static void
8117yy_symbol_value_print (FILE *yyo,
8118 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
8119{
8120 FILE *yyoutput = yyo;
8121 YY_USE (yyoutput);
8122 YY_USE (yylocationp);
8123 YY_USE (p);
8124 if (!yyvaluep)
8125 return;
8126 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
8127switch (yykind)
8128 {
8129 case YYSYMBOL_keyword_class: /* "'class'" */
8130#line 2644 "parse.y"
8131 {
8132 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8133}
8134#line 8135 "parse.c"
8135 break;
8136
8137 case YYSYMBOL_keyword_module: /* "'module'" */
8138#line 2644 "parse.y"
8139 {
8140 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8141}
8142#line 8143 "parse.c"
8143 break;
8144
8145 case YYSYMBOL_keyword_def: /* "'def'" */
8146#line 2644 "parse.y"
8147 {
8148 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8149}
8150#line 8151 "parse.c"
8151 break;
8152
8153 case YYSYMBOL_keyword_undef: /* "'undef'" */
8154#line 2644 "parse.y"
8155 {
8156 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8157}
8158#line 8159 "parse.c"
8159 break;
8160
8161 case YYSYMBOL_keyword_begin: /* "'begin'" */
8162#line 2644 "parse.y"
8163 {
8164 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8165}
8166#line 8167 "parse.c"
8167 break;
8168
8169 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
8170#line 2644 "parse.y"
8171 {
8172 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8173}
8174#line 8175 "parse.c"
8175 break;
8176
8177 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
8178#line 2644 "parse.y"
8179 {
8180 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8181}
8182#line 8183 "parse.c"
8183 break;
8184
8185 case YYSYMBOL_keyword_end: /* "'end'" */
8186#line 2644 "parse.y"
8187 {
8188 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8189}
8190#line 8191 "parse.c"
8191 break;
8192
8193 case YYSYMBOL_keyword_if: /* "'if'" */
8194#line 2644 "parse.y"
8195 {
8196 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8197}
8198#line 8199 "parse.c"
8199 break;
8200
8201 case YYSYMBOL_keyword_unless: /* "'unless'" */
8202#line 2644 "parse.y"
8203 {
8204 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8205}
8206#line 8207 "parse.c"
8207 break;
8208
8209 case YYSYMBOL_keyword_then: /* "'then'" */
8210#line 2644 "parse.y"
8211 {
8212 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8213}
8214#line 8215 "parse.c"
8215 break;
8216
8217 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
8218#line 2644 "parse.y"
8219 {
8220 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8221}
8222#line 8223 "parse.c"
8223 break;
8224
8225 case YYSYMBOL_keyword_else: /* "'else'" */
8226#line 2644 "parse.y"
8227 {
8228 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8229}
8230#line 8231 "parse.c"
8231 break;
8232
8233 case YYSYMBOL_keyword_case: /* "'case'" */
8234#line 2644 "parse.y"
8235 {
8236 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8237}
8238#line 8239 "parse.c"
8239 break;
8240
8241 case YYSYMBOL_keyword_when: /* "'when'" */
8242#line 2644 "parse.y"
8243 {
8244 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8245}
8246#line 8247 "parse.c"
8247 break;
8248
8249 case YYSYMBOL_keyword_while: /* "'while'" */
8250#line 2644 "parse.y"
8251 {
8252 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8253}
8254#line 8255 "parse.c"
8255 break;
8256
8257 case YYSYMBOL_keyword_until: /* "'until'" */
8258#line 2644 "parse.y"
8259 {
8260 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8261}
8262#line 8263 "parse.c"
8263 break;
8264
8265 case YYSYMBOL_keyword_for: /* "'for'" */
8266#line 2644 "parse.y"
8267 {
8268 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8269}
8270#line 8271 "parse.c"
8271 break;
8272
8273 case YYSYMBOL_keyword_break: /* "'break'" */
8274#line 2644 "parse.y"
8275 {
8276 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8277}
8278#line 8279 "parse.c"
8279 break;
8280
8281 case YYSYMBOL_keyword_next: /* "'next'" */
8282#line 2644 "parse.y"
8283 {
8284 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8285}
8286#line 8287 "parse.c"
8287 break;
8288
8289 case YYSYMBOL_keyword_redo: /* "'redo'" */
8290#line 2644 "parse.y"
8291 {
8292 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8293}
8294#line 8295 "parse.c"
8295 break;
8296
8297 case YYSYMBOL_keyword_retry: /* "'retry'" */
8298#line 2644 "parse.y"
8299 {
8300 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8301}
8302#line 8303 "parse.c"
8303 break;
8304
8305 case YYSYMBOL_keyword_in: /* "'in'" */
8306#line 2644 "parse.y"
8307 {
8308 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8309}
8310#line 8311 "parse.c"
8311 break;
8312
8313 case YYSYMBOL_keyword_do: /* "'do'" */
8314#line 2644 "parse.y"
8315 {
8316 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8317}
8318#line 8319 "parse.c"
8319 break;
8320
8321 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8322#line 2644 "parse.y"
8323 {
8324 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8325}
8326#line 8327 "parse.c"
8327 break;
8328
8329 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8330#line 2644 "parse.y"
8331 {
8332 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8333}
8334#line 8335 "parse.c"
8335 break;
8336
8337 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8338#line 2644 "parse.y"
8339 {
8340 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8341}
8342#line 8343 "parse.c"
8343 break;
8344
8345 case YYSYMBOL_keyword_return: /* "'return'" */
8346#line 2644 "parse.y"
8347 {
8348 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8349}
8350#line 8351 "parse.c"
8351 break;
8352
8353 case YYSYMBOL_keyword_yield: /* "'yield'" */
8354#line 2644 "parse.y"
8355 {
8356 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8357}
8358#line 8359 "parse.c"
8359 break;
8360
8361 case YYSYMBOL_keyword_super: /* "'super'" */
8362#line 2644 "parse.y"
8363 {
8364 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8365}
8366#line 8367 "parse.c"
8367 break;
8368
8369 case YYSYMBOL_keyword_self: /* "'self'" */
8370#line 2644 "parse.y"
8371 {
8372 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8373}
8374#line 8375 "parse.c"
8375 break;
8376
8377 case YYSYMBOL_keyword_nil: /* "'nil'" */
8378#line 2644 "parse.y"
8379 {
8380 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8381}
8382#line 8383 "parse.c"
8383 break;
8384
8385 case YYSYMBOL_keyword_true: /* "'true'" */
8386#line 2644 "parse.y"
8387 {
8388 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8389}
8390#line 8391 "parse.c"
8391 break;
8392
8393 case YYSYMBOL_keyword_false: /* "'false'" */
8394#line 2644 "parse.y"
8395 {
8396 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8397}
8398#line 8399 "parse.c"
8399 break;
8400
8401 case YYSYMBOL_keyword_and: /* "'and'" */
8402#line 2644 "parse.y"
8403 {
8404 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8405}
8406#line 8407 "parse.c"
8407 break;
8408
8409 case YYSYMBOL_keyword_or: /* "'or'" */
8410#line 2644 "parse.y"
8411 {
8412 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8413}
8414#line 8415 "parse.c"
8415 break;
8416
8417 case YYSYMBOL_keyword_not: /* "'not'" */
8418#line 2644 "parse.y"
8419 {
8420 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8421}
8422#line 8423 "parse.c"
8423 break;
8424
8425 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8426#line 2644 "parse.y"
8427 {
8428 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8429}
8430#line 8431 "parse.c"
8431 break;
8432
8433 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8434#line 2644 "parse.y"
8435 {
8436 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8437}
8438#line 8439 "parse.c"
8439 break;
8440
8441 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8442#line 2644 "parse.y"
8443 {
8444 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8445}
8446#line 8447 "parse.c"
8447 break;
8448
8449 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8450#line 2644 "parse.y"
8451 {
8452 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8453}
8454#line 8455 "parse.c"
8455 break;
8456
8457 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8458#line 2644 "parse.y"
8459 {
8460 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8461}
8462#line 8463 "parse.c"
8463 break;
8464
8465 case YYSYMBOL_keyword_alias: /* "'alias'" */
8466#line 2644 "parse.y"
8467 {
8468 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8469}
8470#line 8471 "parse.c"
8471 break;
8472
8473 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8474#line 2644 "parse.y"
8475 {
8476 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8477}
8478#line 8479 "parse.c"
8479 break;
8480
8481 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8482#line 2644 "parse.y"
8483 {
8484 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8485}
8486#line 8487 "parse.c"
8487 break;
8488
8489 case YYSYMBOL_keyword_END: /* "'END'" */
8490#line 2644 "parse.y"
8491 {
8492 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8493}
8494#line 8495 "parse.c"
8495 break;
8496
8497 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8498#line 2644 "parse.y"
8499 {
8500 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8501}
8502#line 8503 "parse.c"
8503 break;
8504
8505 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8506#line 2644 "parse.y"
8507 {
8508 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8509}
8510#line 8511 "parse.c"
8511 break;
8512
8513 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8514#line 2644 "parse.y"
8515 {
8516 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8517}
8518#line 8519 "parse.c"
8519 break;
8520
8521 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8522#line 2644 "parse.y"
8523 {
8524 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8525}
8526#line 8527 "parse.c"
8527 break;
8528
8529 case YYSYMBOL_tFID: /* "method" */
8530#line 2644 "parse.y"
8531 {
8532 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8533}
8534#line 8535 "parse.c"
8535 break;
8536
8537 case YYSYMBOL_tGVAR: /* "global variable" */
8538#line 2644 "parse.y"
8539 {
8540 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8541}
8542#line 8543 "parse.c"
8543 break;
8544
8545 case YYSYMBOL_tIVAR: /* "instance variable" */
8546#line 2644 "parse.y"
8547 {
8548 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8549}
8550#line 8551 "parse.c"
8551 break;
8552
8553 case YYSYMBOL_tCONSTANT: /* "constant" */
8554#line 2644 "parse.y"
8555 {
8556 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8557}
8558#line 8559 "parse.c"
8559 break;
8560
8561 case YYSYMBOL_tCVAR: /* "class variable" */
8562#line 2644 "parse.y"
8563 {
8564 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8565}
8566#line 8567 "parse.c"
8567 break;
8568
8569 case YYSYMBOL_tLABEL: /* "label" */
8570#line 2644 "parse.y"
8571 {
8572 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8573}
8574#line 8575 "parse.c"
8575 break;
8576
8577 case YYSYMBOL_tINTEGER: /* "integer literal" */
8578#line 2647 "parse.y"
8579 {
8580 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8581 case NODE_INTEGER:
8582 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8583 break;
8584 case NODE_FLOAT:
8585 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8586 break;
8587 case NODE_RATIONAL:
8588 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8589 break;
8590 case NODE_IMAGINARY:
8591 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8592 break;
8593 default:
8594 break;
8595 }
8596}
8597#line 8598 "parse.c"
8598 break;
8599
8600 case YYSYMBOL_tFLOAT: /* "float literal" */
8601#line 2647 "parse.y"
8602 {
8603 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8604 case NODE_INTEGER:
8605 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8606 break;
8607 case NODE_FLOAT:
8608 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8609 break;
8610 case NODE_RATIONAL:
8611 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8612 break;
8613 case NODE_IMAGINARY:
8614 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8615 break;
8616 default:
8617 break;
8618 }
8619}
8620#line 8621 "parse.c"
8621 break;
8622
8623 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8624#line 2647 "parse.y"
8625 {
8626 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8627 case NODE_INTEGER:
8628 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8629 break;
8630 case NODE_FLOAT:
8631 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8632 break;
8633 case NODE_RATIONAL:
8634 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8635 break;
8636 case NODE_IMAGINARY:
8637 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8638 break;
8639 default:
8640 break;
8641 }
8642}
8643#line 8644 "parse.c"
8644 break;
8645
8646 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8647#line 2647 "parse.y"
8648 {
8649 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8650 case NODE_INTEGER:
8651 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8652 break;
8653 case NODE_FLOAT:
8654 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8655 break;
8656 case NODE_RATIONAL:
8657 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8658 break;
8659 case NODE_IMAGINARY:
8660 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8661 break;
8662 default:
8663 break;
8664 }
8665}
8666#line 8667 "parse.c"
8667 break;
8668
8669 case YYSYMBOL_tCHAR: /* "char literal" */
8670#line 2647 "parse.y"
8671 {
8672 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8673 case NODE_INTEGER:
8674 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8675 break;
8676 case NODE_FLOAT:
8677 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8678 break;
8679 case NODE_RATIONAL:
8680 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8681 break;
8682 case NODE_IMAGINARY:
8683 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8684 break;
8685 default:
8686 break;
8687 }
8688}
8689#line 8690 "parse.c"
8690 break;
8691
8692 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8693#line 2665 "parse.y"
8694 {
8695 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8696}
8697#line 8698 "parse.c"
8698 break;
8699
8700 case YYSYMBOL_tBACK_REF: /* "back reference" */
8701#line 2668 "parse.y"
8702 {
8703 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8704}
8705#line 8706 "parse.c"
8706 break;
8707
8708 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8709#line 2647 "parse.y"
8710 {
8711 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8712 case NODE_INTEGER:
8713 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8714 break;
8715 case NODE_FLOAT:
8716 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8717 break;
8718 case NODE_RATIONAL:
8719 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8720 break;
8721 case NODE_IMAGINARY:
8722 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8723 break;
8724 default:
8725 break;
8726 }
8727}
8728#line 8729 "parse.c"
8729 break;
8730
8731 case YYSYMBOL_69_: /* '.' */
8732#line 2644 "parse.y"
8733 {
8734 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8735}
8736#line 8737 "parse.c"
8737 break;
8738
8739 case YYSYMBOL_70_backslash_: /* "backslash" */
8740#line 2644 "parse.y"
8741 {
8742 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8743}
8744#line 8745 "parse.c"
8745 break;
8746
8747 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8748#line 2644 "parse.y"
8749 {
8750 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8751}
8752#line 8753 "parse.c"
8753 break;
8754
8755 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8756#line 2644 "parse.y"
8757 {
8758 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8759}
8760#line 8761 "parse.c"
8761 break;
8762
8763 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8764#line 2644 "parse.y"
8765 {
8766 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8767}
8768#line 8769 "parse.c"
8769 break;
8770
8771 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8772#line 2644 "parse.y"
8773 {
8774 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8775}
8776#line 8777 "parse.c"
8777 break;
8778
8779 case YYSYMBOL_tANDDOT: /* "&." */
8780#line 2644 "parse.y"
8781 {
8782 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8783}
8784#line 8785 "parse.c"
8785 break;
8786
8787 case YYSYMBOL_tCOLON2: /* "::" */
8788#line 2644 "parse.y"
8789 {
8790 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8791}
8792#line 8793 "parse.c"
8793 break;
8794
8795 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8796#line 2644 "parse.y"
8797 {
8798 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8799}
8800#line 8801 "parse.c"
8801 break;
8802
8803 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8804#line 2635 "parse.y"
8805 {
8806 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8807 rb_parser_printf(p, "NODE_SPECIAL");
8808 }
8809 else if (((*yyvaluep).node)) {
8810 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8811 }
8812}
8813#line 8814 "parse.c"
8814 break;
8815
8816 case YYSYMBOL_top_stmts: /* top_stmts */
8817#line 2635 "parse.y"
8818 {
8819 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8820 rb_parser_printf(p, "NODE_SPECIAL");
8821 }
8822 else if (((*yyvaluep).node)) {
8823 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8824 }
8825}
8826#line 8827 "parse.c"
8827 break;
8828
8829 case YYSYMBOL_top_stmt: /* top_stmt */
8830#line 2635 "parse.y"
8831 {
8832 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8833 rb_parser_printf(p, "NODE_SPECIAL");
8834 }
8835 else if (((*yyvaluep).node)) {
8836 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8837 }
8838}
8839#line 8840 "parse.c"
8840 break;
8841
8842 case YYSYMBOL_block_open: /* block_open */
8843#line 2635 "parse.y"
8844 {
8845 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8846 rb_parser_printf(p, "NODE_SPECIAL");
8847 }
8848 else if (((*yyvaluep).node_exits)) {
8849 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8850 }
8851}
8852#line 8853 "parse.c"
8853 break;
8854
8855 case YYSYMBOL_begin_block: /* begin_block */
8856#line 2635 "parse.y"
8857 {
8858 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8859 rb_parser_printf(p, "NODE_SPECIAL");
8860 }
8861 else if (((*yyvaluep).node)) {
8862 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8863 }
8864}
8865#line 8866 "parse.c"
8866 break;
8867
8868 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8869#line 2635 "parse.y"
8870 {
8871 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8872 rb_parser_printf(p, "NODE_SPECIAL");
8873 }
8874 else if (((*yyvaluep).node)) {
8875 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8876 }
8877}
8878#line 8879 "parse.c"
8879 break;
8880
8881 case YYSYMBOL_bodystmt: /* bodystmt */
8882#line 2635 "parse.y"
8883 {
8884 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8885 rb_parser_printf(p, "NODE_SPECIAL");
8886 }
8887 else if (((*yyvaluep).node)) {
8888 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8889 }
8890}
8891#line 8892 "parse.c"
8892 break;
8893
8894 case YYSYMBOL_stmts: /* stmts */
8895#line 2635 "parse.y"
8896 {
8897 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8898 rb_parser_printf(p, "NODE_SPECIAL");
8899 }
8900 else if (((*yyvaluep).node)) {
8901 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8902 }
8903}
8904#line 8905 "parse.c"
8905 break;
8906
8907 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8908#line 2635 "parse.y"
8909 {
8910 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8911 rb_parser_printf(p, "NODE_SPECIAL");
8912 }
8913 else if (((*yyvaluep).node)) {
8914 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8915 }
8916}
8917#line 8918 "parse.c"
8918 break;
8919
8920 case YYSYMBOL_allow_exits: /* allow_exits */
8921#line 2635 "parse.y"
8922 {
8923 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8924 rb_parser_printf(p, "NODE_SPECIAL");
8925 }
8926 else if (((*yyvaluep).node_exits)) {
8927 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8928 }
8929}
8930#line 8931 "parse.c"
8931 break;
8932
8933 case YYSYMBOL_stmt: /* stmt */
8934#line 2635 "parse.y"
8935 {
8936 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8937 rb_parser_printf(p, "NODE_SPECIAL");
8938 }
8939 else if (((*yyvaluep).node)) {
8940 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8941 }
8942}
8943#line 8944 "parse.c"
8944 break;
8945
8946 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8947#line 2635 "parse.y"
8948 {
8949 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8950 rb_parser_printf(p, "NODE_SPECIAL");
8951 }
8952 else if (((*yyvaluep).node)) {
8953 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8954 }
8955}
8956#line 8957 "parse.c"
8957 break;
8958
8959 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8960#line 2635 "parse.y"
8961 {
8962 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8963 rb_parser_printf(p, "NODE_SPECIAL");
8964 }
8965 else if (((*yyvaluep).node)) {
8966 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8967 }
8968}
8969#line 8970 "parse.c"
8970 break;
8971
8972 case YYSYMBOL_command_asgn: /* command_asgn */
8973#line 2635 "parse.y"
8974 {
8975 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8976 rb_parser_printf(p, "NODE_SPECIAL");
8977 }
8978 else if (((*yyvaluep).node)) {
8979 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8980 }
8981}
8982#line 8983 "parse.c"
8983 break;
8984
8985 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8986#line 2635 "parse.y"
8987 {
8988 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8989 rb_parser_printf(p, "NODE_SPECIAL");
8990 }
8991 else if (((*yyvaluep).node)) {
8992 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8993 }
8994}
8995#line 8996 "parse.c"
8996 break;
8997
8998 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8999#line 2635 "parse.y"
9000 {
9001 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9002 rb_parser_printf(p, "NODE_SPECIAL");
9003 }
9004 else if (((*yyvaluep).node)) {
9005 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9006 }
9007}
9008#line 9009 "parse.c"
9009 break;
9010
9011 case YYSYMBOL_endless_command: /* endless_command */
9012#line 2635 "parse.y"
9013 {
9014 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9015 rb_parser_printf(p, "NODE_SPECIAL");
9016 }
9017 else if (((*yyvaluep).node)) {
9018 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9019 }
9020}
9021#line 9022 "parse.c"
9022 break;
9023
9024 case YYSYMBOL_command_rhs: /* command_rhs */
9025#line 2635 "parse.y"
9026 {
9027 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9028 rb_parser_printf(p, "NODE_SPECIAL");
9029 }
9030 else if (((*yyvaluep).node)) {
9031 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9032 }
9033}
9034#line 9035 "parse.c"
9035 break;
9036
9037 case YYSYMBOL_expr: /* expr */
9038#line 2635 "parse.y"
9039 {
9040 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9041 rb_parser_printf(p, "NODE_SPECIAL");
9042 }
9043 else if (((*yyvaluep).node)) {
9044 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9045 }
9046}
9047#line 9048 "parse.c"
9048 break;
9049
9050 case YYSYMBOL_def_name: /* def_name */
9051#line 2644 "parse.y"
9052 {
9053 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9054}
9055#line 9056 "parse.c"
9056 break;
9057
9058 case YYSYMBOL_defn_head: /* defn_head */
9059#line 2635 "parse.y"
9060 {
9061 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9062 rb_parser_printf(p, "NODE_SPECIAL");
9063 }
9064 else if (((*yyvaluep).node_def_temp)) {
9065 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9066 }
9067}
9068#line 9069 "parse.c"
9069 break;
9070
9071 case YYSYMBOL_defs_head: /* defs_head */
9072#line 2635 "parse.y"
9073 {
9074 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9075 rb_parser_printf(p, "NODE_SPECIAL");
9076 }
9077 else if (((*yyvaluep).node_def_temp)) {
9078 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9079 }
9080}
9081#line 9082 "parse.c"
9082 break;
9083
9084 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
9085#line 2635 "parse.y"
9086 {
9087 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9088 rb_parser_printf(p, "NODE_SPECIAL");
9089 }
9090 else if (((*yyvaluep).node)) {
9091 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9092 }
9093}
9094#line 9095 "parse.c"
9095 break;
9096
9097 case YYSYMBOL_expr_value: /* expr_value */
9098#line 2635 "parse.y"
9099 {
9100 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9101 rb_parser_printf(p, "NODE_SPECIAL");
9102 }
9103 else if (((*yyvaluep).node)) {
9104 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9105 }
9106}
9107#line 9108 "parse.c"
9108 break;
9109
9110 case YYSYMBOL_expr_value_do: /* expr_value_do */
9111#line 2635 "parse.y"
9112 {
9113 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9114 rb_parser_printf(p, "NODE_SPECIAL");
9115 }
9116 else if (((*yyvaluep).node)) {
9117 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9118 }
9119}
9120#line 9121 "parse.c"
9121 break;
9122
9123 case YYSYMBOL_command_call: /* command_call */
9124#line 2635 "parse.y"
9125 {
9126 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9127 rb_parser_printf(p, "NODE_SPECIAL");
9128 }
9129 else if (((*yyvaluep).node)) {
9130 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9131 }
9132}
9133#line 9134 "parse.c"
9134 break;
9135
9136 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
9137#line 2635 "parse.y"
9138 {
9139 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9140 rb_parser_printf(p, "NODE_SPECIAL");
9141 }
9142 else if (((*yyvaluep).node)) {
9143 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9144 }
9145}
9146#line 9147 "parse.c"
9147 break;
9148
9149 case YYSYMBOL_command_call_value: /* command_call_value */
9150#line 2635 "parse.y"
9151 {
9152 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9153 rb_parser_printf(p, "NODE_SPECIAL");
9154 }
9155 else if (((*yyvaluep).node)) {
9156 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9157 }
9158}
9159#line 9160 "parse.c"
9160 break;
9161
9162 case YYSYMBOL_block_command: /* block_command */
9163#line 2635 "parse.y"
9164 {
9165 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9166 rb_parser_printf(p, "NODE_SPECIAL");
9167 }
9168 else if (((*yyvaluep).node)) {
9169 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9170 }
9171}
9172#line 9173 "parse.c"
9173 break;
9174
9175 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9176#line 2635 "parse.y"
9177 {
9178 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9179 rb_parser_printf(p, "NODE_SPECIAL");
9180 }
9181 else if (((*yyvaluep).node)) {
9182 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9183 }
9184}
9185#line 9186 "parse.c"
9186 break;
9187
9188 case YYSYMBOL_fcall: /* fcall */
9189#line 2635 "parse.y"
9190 {
9191 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9192 rb_parser_printf(p, "NODE_SPECIAL");
9193 }
9194 else if (((*yyvaluep).node_fcall)) {
9195 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9196 }
9197}
9198#line 9199 "parse.c"
9199 break;
9200
9201 case YYSYMBOL_command: /* command */
9202#line 2635 "parse.y"
9203 {
9204 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9205 rb_parser_printf(p, "NODE_SPECIAL");
9206 }
9207 else if (((*yyvaluep).node)) {
9208 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9209 }
9210}
9211#line 9212 "parse.c"
9212 break;
9213
9214 case YYSYMBOL_mlhs: /* mlhs */
9215#line 2635 "parse.y"
9216 {
9217 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9218 rb_parser_printf(p, "NODE_SPECIAL");
9219 }
9220 else if (((*yyvaluep).node_masgn)) {
9221 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9222 }
9223}
9224#line 9225 "parse.c"
9225 break;
9226
9227 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9228#line 2635 "parse.y"
9229 {
9230 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9231 rb_parser_printf(p, "NODE_SPECIAL");
9232 }
9233 else if (((*yyvaluep).node_masgn)) {
9234 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9235 }
9236}
9237#line 9238 "parse.c"
9238 break;
9239
9240 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9241#line 2635 "parse.y"
9242 {
9243 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9244 rb_parser_printf(p, "NODE_SPECIAL");
9245 }
9246 else if (((*yyvaluep).node_masgn)) {
9247 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9248 }
9249}
9250#line 9251 "parse.c"
9251 break;
9252
9253 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9254#line 2635 "parse.y"
9255 {
9256 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9257 rb_parser_printf(p, "NODE_SPECIAL");
9258 }
9259 else if (((*yyvaluep).node)) {
9260 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9261 }
9262}
9263#line 9264 "parse.c"
9264 break;
9265
9266 case YYSYMBOL_mlhs_item: /* mlhs_item */
9267#line 2635 "parse.y"
9268 {
9269 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9270 rb_parser_printf(p, "NODE_SPECIAL");
9271 }
9272 else if (((*yyvaluep).node)) {
9273 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9274 }
9275}
9276#line 9277 "parse.c"
9277 break;
9278
9279 case YYSYMBOL_mlhs_head: /* mlhs_head */
9280#line 2635 "parse.y"
9281 {
9282 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9283 rb_parser_printf(p, "NODE_SPECIAL");
9284 }
9285 else if (((*yyvaluep).node)) {
9286 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9287 }
9288}
9289#line 9290 "parse.c"
9290 break;
9291
9292 case YYSYMBOL_mlhs_node: /* mlhs_node */
9293#line 2635 "parse.y"
9294 {
9295 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9296 rb_parser_printf(p, "NODE_SPECIAL");
9297 }
9298 else if (((*yyvaluep).node)) {
9299 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9300 }
9301}
9302#line 9303 "parse.c"
9303 break;
9304
9305 case YYSYMBOL_lhs: /* lhs */
9306#line 2635 "parse.y"
9307 {
9308 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9309 rb_parser_printf(p, "NODE_SPECIAL");
9310 }
9311 else if (((*yyvaluep).node)) {
9312 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9313 }
9314}
9315#line 9316 "parse.c"
9316 break;
9317
9318 case YYSYMBOL_cname: /* cname */
9319#line 2644 "parse.y"
9320 {
9321 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9322}
9323#line 9324 "parse.c"
9324 break;
9325
9326 case YYSYMBOL_cpath: /* cpath */
9327#line 2635 "parse.y"
9328 {
9329 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9330 rb_parser_printf(p, "NODE_SPECIAL");
9331 }
9332 else if (((*yyvaluep).node)) {
9333 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9334 }
9335}
9336#line 9337 "parse.c"
9337 break;
9338
9339 case YYSYMBOL_fname: /* fname */
9340#line 2644 "parse.y"
9341 {
9342 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9343}
9344#line 9345 "parse.c"
9345 break;
9346
9347 case YYSYMBOL_fitem: /* fitem */
9348#line 2635 "parse.y"
9349 {
9350 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9351 rb_parser_printf(p, "NODE_SPECIAL");
9352 }
9353 else if (((*yyvaluep).node)) {
9354 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9355 }
9356}
9357#line 9358 "parse.c"
9358 break;
9359
9360 case YYSYMBOL_undef_list: /* undef_list */
9361#line 2635 "parse.y"
9362 {
9363 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9364 rb_parser_printf(p, "NODE_SPECIAL");
9365 }
9366 else if (((*yyvaluep).node)) {
9367 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9368 }
9369}
9370#line 9371 "parse.c"
9371 break;
9372
9373 case YYSYMBOL_op: /* op */
9374#line 2644 "parse.y"
9375 {
9376 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9377}
9378#line 9379 "parse.c"
9379 break;
9380
9381 case YYSYMBOL_reswords: /* reswords */
9382#line 2644 "parse.y"
9383 {
9384 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9385}
9386#line 9387 "parse.c"
9387 break;
9388
9389 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9390#line 2635 "parse.y"
9391 {
9392 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9393 rb_parser_printf(p, "NODE_SPECIAL");
9394 }
9395 else if (((*yyvaluep).node)) {
9396 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9397 }
9398}
9399#line 9400 "parse.c"
9400 break;
9401
9402 case YYSYMBOL_arg: /* arg */
9403#line 2635 "parse.y"
9404 {
9405 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9406 rb_parser_printf(p, "NODE_SPECIAL");
9407 }
9408 else if (((*yyvaluep).node)) {
9409 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9410 }
9411}
9412#line 9413 "parse.c"
9413 break;
9414
9415 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9416#line 2635 "parse.y"
9417 {
9418 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9419 rb_parser_printf(p, "NODE_SPECIAL");
9420 }
9421 else if (((*yyvaluep).node)) {
9422 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9423 }
9424}
9425#line 9426 "parse.c"
9426 break;
9427
9428 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9429#line 2635 "parse.y"
9430 {
9431 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9432 rb_parser_printf(p, "NODE_SPECIAL");
9433 }
9434 else if (((*yyvaluep).node)) {
9435 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9436 }
9437}
9438#line 9439 "parse.c"
9439 break;
9440
9441 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9442#line 2635 "parse.y"
9443 {
9444 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9445 rb_parser_printf(p, "NODE_SPECIAL");
9446 }
9447 else if (((*yyvaluep).node)) {
9448 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9449 }
9450}
9451#line 9452 "parse.c"
9452 break;
9453
9454 case YYSYMBOL_ternary: /* ternary */
9455#line 2635 "parse.y"
9456 {
9457 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9458 rb_parser_printf(p, "NODE_SPECIAL");
9459 }
9460 else if (((*yyvaluep).node)) {
9461 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9462 }
9463}
9464#line 9465 "parse.c"
9465 break;
9466
9467 case YYSYMBOL_endless_arg: /* endless_arg */
9468#line 2635 "parse.y"
9469 {
9470 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9471 rb_parser_printf(p, "NODE_SPECIAL");
9472 }
9473 else if (((*yyvaluep).node)) {
9474 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9475 }
9476}
9477#line 9478 "parse.c"
9478 break;
9479
9480 case YYSYMBOL_relop: /* relop */
9481#line 2644 "parse.y"
9482 {
9483 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9484}
9485#line 9486 "parse.c"
9486 break;
9487
9488 case YYSYMBOL_rel_expr: /* rel_expr */
9489#line 2635 "parse.y"
9490 {
9491 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9492 rb_parser_printf(p, "NODE_SPECIAL");
9493 }
9494 else if (((*yyvaluep).node)) {
9495 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9496 }
9497}
9498#line 9499 "parse.c"
9499 break;
9500
9501 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9502#line 2635 "parse.y"
9503 {
9504 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9505 rb_parser_printf(p, "NODE_SPECIAL");
9506 }
9507 else if (((*yyvaluep).node)) {
9508 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9509 }
9510}
9511#line 9512 "parse.c"
9512 break;
9513
9514 case YYSYMBOL_arg_value: /* arg_value */
9515#line 2635 "parse.y"
9516 {
9517 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9518 rb_parser_printf(p, "NODE_SPECIAL");
9519 }
9520 else if (((*yyvaluep).node)) {
9521 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9522 }
9523}
9524#line 9525 "parse.c"
9525 break;
9526
9527 case YYSYMBOL_aref_args: /* aref_args */
9528#line 2635 "parse.y"
9529 {
9530 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9531 rb_parser_printf(p, "NODE_SPECIAL");
9532 }
9533 else if (((*yyvaluep).node)) {
9534 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9535 }
9536}
9537#line 9538 "parse.c"
9538 break;
9539
9540 case YYSYMBOL_arg_rhs: /* arg_rhs */
9541#line 2635 "parse.y"
9542 {
9543 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9544 rb_parser_printf(p, "NODE_SPECIAL");
9545 }
9546 else if (((*yyvaluep).node)) {
9547 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9548 }
9549}
9550#line 9551 "parse.c"
9551 break;
9552
9553 case YYSYMBOL_paren_args: /* paren_args */
9554#line 2635 "parse.y"
9555 {
9556 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9557 rb_parser_printf(p, "NODE_SPECIAL");
9558 }
9559 else if (((*yyvaluep).node)) {
9560 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9561 }
9562}
9563#line 9564 "parse.c"
9564 break;
9565
9566 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9567#line 2635 "parse.y"
9568 {
9569 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9570 rb_parser_printf(p, "NODE_SPECIAL");
9571 }
9572 else if (((*yyvaluep).node)) {
9573 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9574 }
9575}
9576#line 9577 "parse.c"
9577 break;
9578
9579 case YYSYMBOL_opt_call_args: /* opt_call_args */
9580#line 2635 "parse.y"
9581 {
9582 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9583 rb_parser_printf(p, "NODE_SPECIAL");
9584 }
9585 else if (((*yyvaluep).node)) {
9586 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9587 }
9588}
9589#line 9590 "parse.c"
9590 break;
9591
9592 case YYSYMBOL_value_expr_command: /* value_expr_command */
9593#line 2635 "parse.y"
9594 {
9595 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9596 rb_parser_printf(p, "NODE_SPECIAL");
9597 }
9598 else if (((*yyvaluep).node)) {
9599 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9600 }
9601}
9602#line 9603 "parse.c"
9603 break;
9604
9605 case YYSYMBOL_call_args: /* call_args */
9606#line 2635 "parse.y"
9607 {
9608 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9609 rb_parser_printf(p, "NODE_SPECIAL");
9610 }
9611 else if (((*yyvaluep).node)) {
9612 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9613 }
9614}
9615#line 9616 "parse.c"
9616 break;
9617
9618 case YYSYMBOL_command_args: /* command_args */
9619#line 2635 "parse.y"
9620 {
9621 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9622 rb_parser_printf(p, "NODE_SPECIAL");
9623 }
9624 else if (((*yyvaluep).node)) {
9625 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9626 }
9627}
9628#line 9629 "parse.c"
9629 break;
9630
9631 case YYSYMBOL_block_arg: /* block_arg */
9632#line 2635 "parse.y"
9633 {
9634 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9635 rb_parser_printf(p, "NODE_SPECIAL");
9636 }
9637 else if (((*yyvaluep).node_block_pass)) {
9638 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9639 }
9640}
9641#line 9642 "parse.c"
9642 break;
9643
9644 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9645#line 2635 "parse.y"
9646 {
9647 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9648 rb_parser_printf(p, "NODE_SPECIAL");
9649 }
9650 else if (((*yyvaluep).node_block_pass)) {
9651 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9652 }
9653}
9654#line 9655 "parse.c"
9655 break;
9656
9657 case YYSYMBOL_args: /* args */
9658#line 2635 "parse.y"
9659 {
9660 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9661 rb_parser_printf(p, "NODE_SPECIAL");
9662 }
9663 else if (((*yyvaluep).node)) {
9664 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9665 }
9666}
9667#line 9668 "parse.c"
9668 break;
9669
9670 case YYSYMBOL_arg_splat: /* arg_splat */
9671#line 2635 "parse.y"
9672 {
9673 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9674 rb_parser_printf(p, "NODE_SPECIAL");
9675 }
9676 else if (((*yyvaluep).node)) {
9677 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9678 }
9679}
9680#line 9681 "parse.c"
9681 break;
9682
9683 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9684#line 2635 "parse.y"
9685 {
9686 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9687 rb_parser_printf(p, "NODE_SPECIAL");
9688 }
9689 else if (((*yyvaluep).node)) {
9690 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9691 }
9692}
9693#line 9694 "parse.c"
9694 break;
9695
9696 case YYSYMBOL_mrhs: /* mrhs */
9697#line 2635 "parse.y"
9698 {
9699 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9700 rb_parser_printf(p, "NODE_SPECIAL");
9701 }
9702 else if (((*yyvaluep).node)) {
9703 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9704 }
9705}
9706#line 9707 "parse.c"
9707 break;
9708
9709 case YYSYMBOL_primary: /* primary */
9710#line 2635 "parse.y"
9711 {
9712 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9713 rb_parser_printf(p, "NODE_SPECIAL");
9714 }
9715 else if (((*yyvaluep).node)) {
9716 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9717 }
9718}
9719#line 9720 "parse.c"
9720 break;
9721
9722 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9723#line 2635 "parse.y"
9724 {
9725 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9726 rb_parser_printf(p, "NODE_SPECIAL");
9727 }
9728 else if (((*yyvaluep).node)) {
9729 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9730 }
9731}
9732#line 9733 "parse.c"
9733 break;
9734
9735 case YYSYMBOL_primary_value: /* primary_value */
9736#line 2635 "parse.y"
9737 {
9738 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9739 rb_parser_printf(p, "NODE_SPECIAL");
9740 }
9741 else if (((*yyvaluep).node)) {
9742 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9743 }
9744}
9745#line 9746 "parse.c"
9746 break;
9747
9748 case YYSYMBOL_k_while: /* k_while */
9749#line 2635 "parse.y"
9750 {
9751 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9752 rb_parser_printf(p, "NODE_SPECIAL");
9753 }
9754 else if (((*yyvaluep).node_exits)) {
9755 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9756 }
9757}
9758#line 9759 "parse.c"
9759 break;
9760
9761 case YYSYMBOL_k_until: /* k_until */
9762#line 2635 "parse.y"
9763 {
9764 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9765 rb_parser_printf(p, "NODE_SPECIAL");
9766 }
9767 else if (((*yyvaluep).node_exits)) {
9768 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9769 }
9770}
9771#line 9772 "parse.c"
9772 break;
9773
9774 case YYSYMBOL_k_for: /* k_for */
9775#line 2635 "parse.y"
9776 {
9777 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9778 rb_parser_printf(p, "NODE_SPECIAL");
9779 }
9780 else if (((*yyvaluep).node_exits)) {
9781 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9782 }
9783}
9784#line 9785 "parse.c"
9785 break;
9786
9787 case YYSYMBOL_k_def: /* k_def */
9788#line 2635 "parse.y"
9789 {
9790 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9791 rb_parser_printf(p, "NODE_SPECIAL");
9792 }
9793 else if (((*yyvaluep).node_def_temp)) {
9794 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9795 }
9796}
9797#line 9798 "parse.c"
9798 break;
9799
9800 case YYSYMBOL_do: /* do */
9801#line 2644 "parse.y"
9802 {
9803 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9804}
9805#line 9806 "parse.c"
9806 break;
9807
9808 case YYSYMBOL_if_tail: /* if_tail */
9809#line 2635 "parse.y"
9810 {
9811 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9812 rb_parser_printf(p, "NODE_SPECIAL");
9813 }
9814 else if (((*yyvaluep).node)) {
9815 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9816 }
9817}
9818#line 9819 "parse.c"
9819 break;
9820
9821 case YYSYMBOL_opt_else: /* opt_else */
9822#line 2635 "parse.y"
9823 {
9824 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9825 rb_parser_printf(p, "NODE_SPECIAL");
9826 }
9827 else if (((*yyvaluep).node)) {
9828 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9829 }
9830}
9831#line 9832 "parse.c"
9832 break;
9833
9834 case YYSYMBOL_for_var: /* for_var */
9835#line 2635 "parse.y"
9836 {
9837 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9838 rb_parser_printf(p, "NODE_SPECIAL");
9839 }
9840 else if (((*yyvaluep).node)) {
9841 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9842 }
9843}
9844#line 9845 "parse.c"
9845 break;
9846
9847 case YYSYMBOL_f_marg: /* f_marg */
9848#line 2635 "parse.y"
9849 {
9850 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9851 rb_parser_printf(p, "NODE_SPECIAL");
9852 }
9853 else if (((*yyvaluep).node)) {
9854 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9855 }
9856}
9857#line 9858 "parse.c"
9858 break;
9859
9860 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9861#line 2635 "parse.y"
9862 {
9863 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9864 rb_parser_printf(p, "NODE_SPECIAL");
9865 }
9866 else if (((*yyvaluep).node)) {
9867 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9868 }
9869}
9870#line 9871 "parse.c"
9871 break;
9872
9873 case YYSYMBOL_f_margs: /* f_margs */
9874#line 2635 "parse.y"
9875 {
9876 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9877 rb_parser_printf(p, "NODE_SPECIAL");
9878 }
9879 else if (((*yyvaluep).node_masgn)) {
9880 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9881 }
9882}
9883#line 9884 "parse.c"
9884 break;
9885
9886 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9887#line 2635 "parse.y"
9888 {
9889 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9890 rb_parser_printf(p, "NODE_SPECIAL");
9891 }
9892 else if (((*yyvaluep).node)) {
9893 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9894 }
9895}
9896#line 9897 "parse.c"
9897 break;
9898
9899 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9900#line 2644 "parse.y"
9901 {
9902 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9903}
9904#line 9905 "parse.c"
9905 break;
9906
9907 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9908#line 2635 "parse.y"
9909 {
9910 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9911 rb_parser_printf(p, "NODE_SPECIAL");
9912 }
9913 else if (((*yyvaluep).node_kw_arg)) {
9914 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9915 }
9916}
9917#line 9918 "parse.c"
9918 break;
9919
9920 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9921#line 2635 "parse.y"
9922 {
9923 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9924 rb_parser_printf(p, "NODE_SPECIAL");
9925 }
9926 else if (((*yyvaluep).node_kw_arg)) {
9927 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9928 }
9929}
9930#line 9931 "parse.c"
9931 break;
9932
9933 case YYSYMBOL_opt_f_block_arg_none: /* opt_f_block_arg_none */
9934#line 2644 "parse.y"
9935 {
9936 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9937}
9938#line 9939 "parse.c"
9939 break;
9940
9941 case YYSYMBOL_args_tail_basic_primary_value_none: /* args_tail_basic_primary_value_none */
9942#line 2635 "parse.y"
9943 {
9944 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9945 rb_parser_printf(p, "NODE_SPECIAL");
9946 }
9947 else if (((*yyvaluep).node_args)) {
9948 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9949 }
9950}
9951#line 9952 "parse.c"
9952 break;
9953
9954 case YYSYMBOL_block_args_tail: /* block_args_tail */
9955#line 2635 "parse.y"
9956 {
9957 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9958 rb_parser_printf(p, "NODE_SPECIAL");
9959 }
9960 else if (((*yyvaluep).node_args)) {
9961 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9962 }
9963}
9964#line 9965 "parse.c"
9965 break;
9966
9967 case YYSYMBOL_excessed_comma: /* excessed_comma */
9968#line 2644 "parse.y"
9969 {
9970 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9971}
9972#line 9973 "parse.c"
9973 break;
9974
9975 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9976#line 2635 "parse.y"
9977 {
9978 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9979 rb_parser_printf(p, "NODE_SPECIAL");
9980 }
9981 else if (((*yyvaluep).node_opt_arg)) {
9982 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9983 }
9984}
9985#line 9986 "parse.c"
9986 break;
9987
9988 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9989#line 2635 "parse.y"
9990 {
9991 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9992 rb_parser_printf(p, "NODE_SPECIAL");
9993 }
9994 else if (((*yyvaluep).node_opt_arg)) {
9995 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9996 }
9997}
9998#line 9999 "parse.c"
9999 break;
10000
10001 case YYSYMBOL_opt_args_tail_block_args_tail_none: /* opt_args_tail_block_args_tail_none */
10002#line 2635 "parse.y"
10003 {
10004 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10005 rb_parser_printf(p, "NODE_SPECIAL");
10006 }
10007 else if (((*yyvaluep).node_args)) {
10008 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10009 }
10010}
10011#line 10012 "parse.c"
10012 break;
10013
10014 case YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none: /* args-list_primary_value_opt_args_tail_block_args_tail_none */
10015#line 2635 "parse.y"
10016 {
10017 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10018 rb_parser_printf(p, "NODE_SPECIAL");
10019 }
10020 else if (((*yyvaluep).node_args)) {
10021 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10022 }
10023}
10024#line 10025 "parse.c"
10025 break;
10026
10027 case YYSYMBOL_block_param: /* block_param */
10028#line 2635 "parse.y"
10029 {
10030 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10031 rb_parser_printf(p, "NODE_SPECIAL");
10032 }
10033 else if (((*yyvaluep).node_args)) {
10034 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10035 }
10036}
10037#line 10038 "parse.c"
10038 break;
10039
10040 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
10041#line 2635 "parse.y"
10042 {
10043 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10044 rb_parser_printf(p, "NODE_SPECIAL");
10045 }
10046 else if (((*yyvaluep).node_args)) {
10047 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10048 }
10049}
10050#line 10051 "parse.c"
10051 break;
10052
10053 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
10054#line 2635 "parse.y"
10055 {
10056 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10057 rb_parser_printf(p, "NODE_SPECIAL");
10058 }
10059 else if (((*yyvaluep).node_args)) {
10060 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10061 }
10062}
10063#line 10064 "parse.c"
10064 break;
10065
10066 case YYSYMBOL_block_param_def: /* block_param_def */
10067#line 2635 "parse.y"
10068 {
10069 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10070 rb_parser_printf(p, "NODE_SPECIAL");
10071 }
10072 else if (((*yyvaluep).node_args)) {
10073 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10074 }
10075}
10076#line 10077 "parse.c"
10077 break;
10078
10079 case YYSYMBOL_opt_block_param: /* opt_block_param */
10080#line 2635 "parse.y"
10081 {
10082 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10083 rb_parser_printf(p, "NODE_SPECIAL");
10084 }
10085 else if (((*yyvaluep).node_args)) {
10086 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10087 }
10088}
10089#line 10090 "parse.c"
10090 break;
10091
10092 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
10093#line 2644 "parse.y"
10094 {
10095 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10096}
10097#line 10098 "parse.c"
10098 break;
10099
10100 case YYSYMBOL_bv_decls: /* bv_decls */
10101#line 2644 "parse.y"
10102 {
10103 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10104}
10105#line 10106 "parse.c"
10106 break;
10107
10108 case YYSYMBOL_bvar: /* bvar */
10109#line 2644 "parse.y"
10110 {
10111 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10112}
10113#line 10114 "parse.c"
10114 break;
10115
10116 case YYSYMBOL_numparam: /* numparam */
10117#line 2635 "parse.y"
10118 {
10119 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10120 rb_parser_printf(p, "NODE_SPECIAL");
10121 }
10122 else if (((*yyvaluep).node)) {
10123 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10124 }
10125}
10126#line 10127 "parse.c"
10127 break;
10128
10129 case YYSYMBOL_it_id: /* it_id */
10130#line 2644 "parse.y"
10131 {
10132 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10133}
10134#line 10135 "parse.c"
10135 break;
10136
10137 case YYSYMBOL_lambda: /* lambda */
10138#line 2635 "parse.y"
10139 {
10140 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10141 rb_parser_printf(p, "NODE_SPECIAL");
10142 }
10143 else if (((*yyvaluep).node)) {
10144 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10145 }
10146}
10147#line 10148 "parse.c"
10148 break;
10149
10150 case YYSYMBOL_f_larglist: /* f_larglist */
10151#line 2635 "parse.y"
10152 {
10153 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10154 rb_parser_printf(p, "NODE_SPECIAL");
10155 }
10156 else if (((*yyvaluep).node_args)) {
10157 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10158 }
10159}
10160#line 10161 "parse.c"
10161 break;
10162
10163 case YYSYMBOL_do_block: /* do_block */
10164#line 2635 "parse.y"
10165 {
10166 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10167 rb_parser_printf(p, "NODE_SPECIAL");
10168 }
10169 else if (((*yyvaluep).node)) {
10170 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10171 }
10172}
10173#line 10174 "parse.c"
10174 break;
10175
10176 case YYSYMBOL_block_call: /* block_call */
10177#line 2635 "parse.y"
10178 {
10179 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10180 rb_parser_printf(p, "NODE_SPECIAL");
10181 }
10182 else if (((*yyvaluep).node)) {
10183 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10184 }
10185}
10186#line 10187 "parse.c"
10187 break;
10188
10189 case YYSYMBOL_method_call: /* method_call */
10190#line 2635 "parse.y"
10191 {
10192 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10193 rb_parser_printf(p, "NODE_SPECIAL");
10194 }
10195 else if (((*yyvaluep).node)) {
10196 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10197 }
10198}
10199#line 10200 "parse.c"
10200 break;
10201
10202 case YYSYMBOL_brace_block: /* brace_block */
10203#line 2635 "parse.y"
10204 {
10205 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10206 rb_parser_printf(p, "NODE_SPECIAL");
10207 }
10208 else if (((*yyvaluep).node)) {
10209 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10210 }
10211}
10212#line 10213 "parse.c"
10213 break;
10214
10215 case YYSYMBOL_brace_body: /* brace_body */
10216#line 2635 "parse.y"
10217 {
10218 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10219 rb_parser_printf(p, "NODE_SPECIAL");
10220 }
10221 else if (((*yyvaluep).node)) {
10222 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10223 }
10224}
10225#line 10226 "parse.c"
10226 break;
10227
10228 case YYSYMBOL_do_body: /* do_body */
10229#line 2635 "parse.y"
10230 {
10231 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10232 rb_parser_printf(p, "NODE_SPECIAL");
10233 }
10234 else if (((*yyvaluep).node)) {
10235 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10236 }
10237}
10238#line 10239 "parse.c"
10239 break;
10240
10241 case YYSYMBOL_case_args: /* case_args */
10242#line 2635 "parse.y"
10243 {
10244 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10245 rb_parser_printf(p, "NODE_SPECIAL");
10246 }
10247 else if (((*yyvaluep).node)) {
10248 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10249 }
10250}
10251#line 10252 "parse.c"
10252 break;
10253
10254 case YYSYMBOL_case_body: /* case_body */
10255#line 2635 "parse.y"
10256 {
10257 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10258 rb_parser_printf(p, "NODE_SPECIAL");
10259 }
10260 else if (((*yyvaluep).node)) {
10261 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10262 }
10263}
10264#line 10265 "parse.c"
10265 break;
10266
10267 case YYSYMBOL_cases: /* cases */
10268#line 2635 "parse.y"
10269 {
10270 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10271 rb_parser_printf(p, "NODE_SPECIAL");
10272 }
10273 else if (((*yyvaluep).node)) {
10274 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10275 }
10276}
10277#line 10278 "parse.c"
10278 break;
10279
10280 case YYSYMBOL_p_case_body: /* p_case_body */
10281#line 2635 "parse.y"
10282 {
10283 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10284 rb_parser_printf(p, "NODE_SPECIAL");
10285 }
10286 else if (((*yyvaluep).node)) {
10287 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10288 }
10289}
10290#line 10291 "parse.c"
10291 break;
10292
10293 case YYSYMBOL_p_cases: /* p_cases */
10294#line 2635 "parse.y"
10295 {
10296 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10297 rb_parser_printf(p, "NODE_SPECIAL");
10298 }
10299 else if (((*yyvaluep).node)) {
10300 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10301 }
10302}
10303#line 10304 "parse.c"
10304 break;
10305
10306 case YYSYMBOL_p_top_expr: /* p_top_expr */
10307#line 2635 "parse.y"
10308 {
10309 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10310 rb_parser_printf(p, "NODE_SPECIAL");
10311 }
10312 else if (((*yyvaluep).node)) {
10313 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10314 }
10315}
10316#line 10317 "parse.c"
10317 break;
10318
10319 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10320#line 2635 "parse.y"
10321 {
10322 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10323 rb_parser_printf(p, "NODE_SPECIAL");
10324 }
10325 else if (((*yyvaluep).node)) {
10326 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10327 }
10328}
10329#line 10330 "parse.c"
10330 break;
10331
10332 case YYSYMBOL_p_expr: /* p_expr */
10333#line 2635 "parse.y"
10334 {
10335 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10336 rb_parser_printf(p, "NODE_SPECIAL");
10337 }
10338 else if (((*yyvaluep).node)) {
10339 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10340 }
10341}
10342#line 10343 "parse.c"
10343 break;
10344
10345 case YYSYMBOL_p_as: /* p_as */
10346#line 2635 "parse.y"
10347 {
10348 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10349 rb_parser_printf(p, "NODE_SPECIAL");
10350 }
10351 else if (((*yyvaluep).node)) {
10352 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10353 }
10354}
10355#line 10356 "parse.c"
10356 break;
10357
10358 case YYSYMBOL_p_alt: /* p_alt */
10359#line 2635 "parse.y"
10360 {
10361 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10362 rb_parser_printf(p, "NODE_SPECIAL");
10363 }
10364 else if (((*yyvaluep).node)) {
10365 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10366 }
10367}
10368#line 10369 "parse.c"
10369 break;
10370
10371 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10372#line 2635 "parse.y"
10373 {
10374 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10375 rb_parser_printf(p, "NODE_SPECIAL");
10376 }
10377 else if (((*yyvaluep).node)) {
10378 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10379 }
10380}
10381#line 10382 "parse.c"
10382 break;
10383
10384 case YYSYMBOL_p_args: /* p_args */
10385#line 2635 "parse.y"
10386 {
10387 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10388 rb_parser_printf(p, "NODE_SPECIAL");
10389 }
10390 else if (((*yyvaluep).node)) {
10391 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10392 }
10393}
10394#line 10395 "parse.c"
10395 break;
10396
10397 case YYSYMBOL_p_args_head: /* p_args_head */
10398#line 2635 "parse.y"
10399 {
10400 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10401 rb_parser_printf(p, "NODE_SPECIAL");
10402 }
10403 else if (((*yyvaluep).node)) {
10404 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10405 }
10406}
10407#line 10408 "parse.c"
10408 break;
10409
10410 case YYSYMBOL_p_args_tail: /* p_args_tail */
10411#line 2635 "parse.y"
10412 {
10413 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10414 rb_parser_printf(p, "NODE_SPECIAL");
10415 }
10416 else if (((*yyvaluep).node)) {
10417 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10418 }
10419}
10420#line 10421 "parse.c"
10421 break;
10422
10423 case YYSYMBOL_p_find: /* p_find */
10424#line 2635 "parse.y"
10425 {
10426 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10427 rb_parser_printf(p, "NODE_SPECIAL");
10428 }
10429 else if (((*yyvaluep).node)) {
10430 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10431 }
10432}
10433#line 10434 "parse.c"
10434 break;
10435
10436 case YYSYMBOL_p_rest: /* p_rest */
10437#line 2635 "parse.y"
10438 {
10439 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10440 rb_parser_printf(p, "NODE_SPECIAL");
10441 }
10442 else if (((*yyvaluep).node)) {
10443 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10444 }
10445}
10446#line 10447 "parse.c"
10447 break;
10448
10449 case YYSYMBOL_p_args_post: /* p_args_post */
10450#line 2635 "parse.y"
10451 {
10452 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10453 rb_parser_printf(p, "NODE_SPECIAL");
10454 }
10455 else if (((*yyvaluep).node)) {
10456 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10457 }
10458}
10459#line 10460 "parse.c"
10460 break;
10461
10462 case YYSYMBOL_p_arg: /* p_arg */
10463#line 2635 "parse.y"
10464 {
10465 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10466 rb_parser_printf(p, "NODE_SPECIAL");
10467 }
10468 else if (((*yyvaluep).node)) {
10469 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10470 }
10471}
10472#line 10473 "parse.c"
10473 break;
10474
10475 case YYSYMBOL_p_kwargs: /* p_kwargs */
10476#line 2635 "parse.y"
10477 {
10478 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10479 rb_parser_printf(p, "NODE_SPECIAL");
10480 }
10481 else if (((*yyvaluep).node)) {
10482 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10483 }
10484}
10485#line 10486 "parse.c"
10486 break;
10487
10488 case YYSYMBOL_p_kwarg: /* p_kwarg */
10489#line 2635 "parse.y"
10490 {
10491 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10492 rb_parser_printf(p, "NODE_SPECIAL");
10493 }
10494 else if (((*yyvaluep).node)) {
10495 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10496 }
10497}
10498#line 10499 "parse.c"
10499 break;
10500
10501 case YYSYMBOL_p_kw: /* p_kw */
10502#line 2635 "parse.y"
10503 {
10504 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10505 rb_parser_printf(p, "NODE_SPECIAL");
10506 }
10507 else if (((*yyvaluep).node)) {
10508 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10509 }
10510}
10511#line 10512 "parse.c"
10512 break;
10513
10514 case YYSYMBOL_p_kw_label: /* p_kw_label */
10515#line 2644 "parse.y"
10516 {
10517 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10518}
10519#line 10520 "parse.c"
10520 break;
10521
10522 case YYSYMBOL_p_kwrest: /* p_kwrest */
10523#line 2644 "parse.y"
10524 {
10525 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10526}
10527#line 10528 "parse.c"
10528 break;
10529
10530 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10531#line 2644 "parse.y"
10532 {
10533 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10534}
10535#line 10536 "parse.c"
10536 break;
10537
10538 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10539#line 2644 "parse.y"
10540 {
10541 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10542}
10543#line 10544 "parse.c"
10544 break;
10545
10546 case YYSYMBOL_p_value: /* p_value */
10547#line 2635 "parse.y"
10548 {
10549 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10550 rb_parser_printf(p, "NODE_SPECIAL");
10551 }
10552 else if (((*yyvaluep).node)) {
10553 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10554 }
10555}
10556#line 10557 "parse.c"
10557 break;
10558
10559 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10560#line 2635 "parse.y"
10561 {
10562 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10563 rb_parser_printf(p, "NODE_SPECIAL");
10564 }
10565 else if (((*yyvaluep).node)) {
10566 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10567 }
10568}
10569#line 10570 "parse.c"
10570 break;
10571
10572 case YYSYMBOL_p_primitive: /* p_primitive */
10573#line 2635 "parse.y"
10574 {
10575 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10576 rb_parser_printf(p, "NODE_SPECIAL");
10577 }
10578 else if (((*yyvaluep).node)) {
10579 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10580 }
10581}
10582#line 10583 "parse.c"
10583 break;
10584
10585 case YYSYMBOL_p_variable: /* p_variable */
10586#line 2635 "parse.y"
10587 {
10588 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10589 rb_parser_printf(p, "NODE_SPECIAL");
10590 }
10591 else if (((*yyvaluep).node)) {
10592 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10593 }
10594}
10595#line 10596 "parse.c"
10596 break;
10597
10598 case YYSYMBOL_p_var_ref: /* p_var_ref */
10599#line 2635 "parse.y"
10600 {
10601 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10602 rb_parser_printf(p, "NODE_SPECIAL");
10603 }
10604 else if (((*yyvaluep).node)) {
10605 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10606 }
10607}
10608#line 10609 "parse.c"
10609 break;
10610
10611 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10612#line 2635 "parse.y"
10613 {
10614 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10615 rb_parser_printf(p, "NODE_SPECIAL");
10616 }
10617 else if (((*yyvaluep).node)) {
10618 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10619 }
10620}
10621#line 10622 "parse.c"
10622 break;
10623
10624 case YYSYMBOL_p_const: /* p_const */
10625#line 2635 "parse.y"
10626 {
10627 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10628 rb_parser_printf(p, "NODE_SPECIAL");
10629 }
10630 else if (((*yyvaluep).node)) {
10631 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10632 }
10633}
10634#line 10635 "parse.c"
10635 break;
10636
10637 case YYSYMBOL_opt_rescue: /* opt_rescue */
10638#line 2635 "parse.y"
10639 {
10640 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10641 rb_parser_printf(p, "NODE_SPECIAL");
10642 }
10643 else if (((*yyvaluep).node)) {
10644 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10645 }
10646}
10647#line 10648 "parse.c"
10648 break;
10649
10650 case YYSYMBOL_exc_list: /* exc_list */
10651#line 2635 "parse.y"
10652 {
10653 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10654 rb_parser_printf(p, "NODE_SPECIAL");
10655 }
10656 else if (((*yyvaluep).node)) {
10657 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10658 }
10659}
10660#line 10661 "parse.c"
10661 break;
10662
10663 case YYSYMBOL_exc_var: /* exc_var */
10664#line 2635 "parse.y"
10665 {
10666 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10667 rb_parser_printf(p, "NODE_SPECIAL");
10668 }
10669 else if (((*yyvaluep).node)) {
10670 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10671 }
10672}
10673#line 10674 "parse.c"
10674 break;
10675
10676 case YYSYMBOL_opt_ensure: /* opt_ensure */
10677#line 2635 "parse.y"
10678 {
10679 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10680 rb_parser_printf(p, "NODE_SPECIAL");
10681 }
10682 else if (((*yyvaluep).node)) {
10683 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10684 }
10685}
10686#line 10687 "parse.c"
10687 break;
10688
10689 case YYSYMBOL_literal: /* literal */
10690#line 2635 "parse.y"
10691 {
10692 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10693 rb_parser_printf(p, "NODE_SPECIAL");
10694 }
10695 else if (((*yyvaluep).node)) {
10696 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10697 }
10698}
10699#line 10700 "parse.c"
10700 break;
10701
10702 case YYSYMBOL_strings: /* strings */
10703#line 2635 "parse.y"
10704 {
10705 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10706 rb_parser_printf(p, "NODE_SPECIAL");
10707 }
10708 else if (((*yyvaluep).node)) {
10709 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10710 }
10711}
10712#line 10713 "parse.c"
10713 break;
10714
10715 case YYSYMBOL_string: /* string */
10716#line 2635 "parse.y"
10717 {
10718 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10719 rb_parser_printf(p, "NODE_SPECIAL");
10720 }
10721 else if (((*yyvaluep).node)) {
10722 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10723 }
10724}
10725#line 10726 "parse.c"
10726 break;
10727
10728 case YYSYMBOL_string1: /* string1 */
10729#line 2635 "parse.y"
10730 {
10731 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10732 rb_parser_printf(p, "NODE_SPECIAL");
10733 }
10734 else if (((*yyvaluep).node)) {
10735 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10736 }
10737}
10738#line 10739 "parse.c"
10739 break;
10740
10741 case YYSYMBOL_xstring: /* xstring */
10742#line 2635 "parse.y"
10743 {
10744 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10745 rb_parser_printf(p, "NODE_SPECIAL");
10746 }
10747 else if (((*yyvaluep).node)) {
10748 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10749 }
10750}
10751#line 10752 "parse.c"
10752 break;
10753
10754 case YYSYMBOL_regexp: /* regexp */
10755#line 2635 "parse.y"
10756 {
10757 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10758 rb_parser_printf(p, "NODE_SPECIAL");
10759 }
10760 else if (((*yyvaluep).node)) {
10761 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10762 }
10763}
10764#line 10765 "parse.c"
10765 break;
10766
10767 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10768#line 2635 "parse.y"
10769 {
10770 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10771 rb_parser_printf(p, "NODE_SPECIAL");
10772 }
10773 else if (((*yyvaluep).node)) {
10774 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10775 }
10776}
10777#line 10778 "parse.c"
10778 break;
10779
10780 case YYSYMBOL_words: /* words */
10781#line 2635 "parse.y"
10782 {
10783 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10784 rb_parser_printf(p, "NODE_SPECIAL");
10785 }
10786 else if (((*yyvaluep).node)) {
10787 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10788 }
10789}
10790#line 10791 "parse.c"
10791 break;
10792
10793 case YYSYMBOL_word_list: /* word_list */
10794#line 2635 "parse.y"
10795 {
10796 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10797 rb_parser_printf(p, "NODE_SPECIAL");
10798 }
10799 else if (((*yyvaluep).node)) {
10800 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10801 }
10802}
10803#line 10804 "parse.c"
10804 break;
10805
10806 case YYSYMBOL_word: /* word */
10807#line 2635 "parse.y"
10808 {
10809 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10810 rb_parser_printf(p, "NODE_SPECIAL");
10811 }
10812 else if (((*yyvaluep).node)) {
10813 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10814 }
10815}
10816#line 10817 "parse.c"
10817 break;
10818
10819 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10820#line 2635 "parse.y"
10821 {
10822 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10823 rb_parser_printf(p, "NODE_SPECIAL");
10824 }
10825 else if (((*yyvaluep).node)) {
10826 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10827 }
10828}
10829#line 10830 "parse.c"
10830 break;
10831
10832 case YYSYMBOL_symbols: /* symbols */
10833#line 2635 "parse.y"
10834 {
10835 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10836 rb_parser_printf(p, "NODE_SPECIAL");
10837 }
10838 else if (((*yyvaluep).node)) {
10839 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10840 }
10841}
10842#line 10843 "parse.c"
10843 break;
10844
10845 case YYSYMBOL_symbol_list: /* symbol_list */
10846#line 2635 "parse.y"
10847 {
10848 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10849 rb_parser_printf(p, "NODE_SPECIAL");
10850 }
10851 else if (((*yyvaluep).node)) {
10852 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10853 }
10854}
10855#line 10856 "parse.c"
10856 break;
10857
10858 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10859#line 2635 "parse.y"
10860 {
10861 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10862 rb_parser_printf(p, "NODE_SPECIAL");
10863 }
10864 else if (((*yyvaluep).node)) {
10865 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10866 }
10867}
10868#line 10869 "parse.c"
10869 break;
10870
10871 case YYSYMBOL_qwords: /* qwords */
10872#line 2635 "parse.y"
10873 {
10874 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10875 rb_parser_printf(p, "NODE_SPECIAL");
10876 }
10877 else if (((*yyvaluep).node)) {
10878 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10879 }
10880}
10881#line 10882 "parse.c"
10882 break;
10883
10884 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10885#line 2635 "parse.y"
10886 {
10887 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10888 rb_parser_printf(p, "NODE_SPECIAL");
10889 }
10890 else if (((*yyvaluep).node)) {
10891 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10892 }
10893}
10894#line 10895 "parse.c"
10895 break;
10896
10897 case YYSYMBOL_qsymbols: /* qsymbols */
10898#line 2635 "parse.y"
10899 {
10900 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10901 rb_parser_printf(p, "NODE_SPECIAL");
10902 }
10903 else if (((*yyvaluep).node)) {
10904 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10905 }
10906}
10907#line 10908 "parse.c"
10908 break;
10909
10910 case YYSYMBOL_qword_list: /* qword_list */
10911#line 2635 "parse.y"
10912 {
10913 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10914 rb_parser_printf(p, "NODE_SPECIAL");
10915 }
10916 else if (((*yyvaluep).node)) {
10917 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10918 }
10919}
10920#line 10921 "parse.c"
10921 break;
10922
10923 case YYSYMBOL_qsym_list: /* qsym_list */
10924#line 2635 "parse.y"
10925 {
10926 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10927 rb_parser_printf(p, "NODE_SPECIAL");
10928 }
10929 else if (((*yyvaluep).node)) {
10930 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10931 }
10932}
10933#line 10934 "parse.c"
10934 break;
10935
10936 case YYSYMBOL_string_contents: /* string_contents */
10937#line 2635 "parse.y"
10938 {
10939 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10940 rb_parser_printf(p, "NODE_SPECIAL");
10941 }
10942 else if (((*yyvaluep).node)) {
10943 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10944 }
10945}
10946#line 10947 "parse.c"
10947 break;
10948
10949 case YYSYMBOL_xstring_contents: /* xstring_contents */
10950#line 2635 "parse.y"
10951 {
10952 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10953 rb_parser_printf(p, "NODE_SPECIAL");
10954 }
10955 else if (((*yyvaluep).node)) {
10956 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10957 }
10958}
10959#line 10960 "parse.c"
10960 break;
10961
10962 case YYSYMBOL_regexp_contents: /* regexp_contents */
10963#line 2635 "parse.y"
10964 {
10965 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10966 rb_parser_printf(p, "NODE_SPECIAL");
10967 }
10968 else if (((*yyvaluep).node)) {
10969 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10970 }
10971}
10972#line 10973 "parse.c"
10973 break;
10974
10975 case YYSYMBOL_string_content: /* string_content */
10976#line 2635 "parse.y"
10977 {
10978 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10979 rb_parser_printf(p, "NODE_SPECIAL");
10980 }
10981 else if (((*yyvaluep).node)) {
10982 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10983 }
10984}
10985#line 10986 "parse.c"
10986 break;
10987
10988 case YYSYMBOL_string_dvar: /* string_dvar */
10989#line 2635 "parse.y"
10990 {
10991 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10992 rb_parser_printf(p, "NODE_SPECIAL");
10993 }
10994 else if (((*yyvaluep).node)) {
10995 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10996 }
10997}
10998#line 10999 "parse.c"
10999 break;
11000
11001 case YYSYMBOL_symbol: /* symbol */
11002#line 2635 "parse.y"
11003 {
11004 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11005 rb_parser_printf(p, "NODE_SPECIAL");
11006 }
11007 else if (((*yyvaluep).node)) {
11008 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11009 }
11010}
11011#line 11012 "parse.c"
11012 break;
11013
11014 case YYSYMBOL_ssym: /* ssym */
11015#line 2635 "parse.y"
11016 {
11017 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11018 rb_parser_printf(p, "NODE_SPECIAL");
11019 }
11020 else if (((*yyvaluep).node)) {
11021 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11022 }
11023}
11024#line 11025 "parse.c"
11025 break;
11026
11027 case YYSYMBOL_sym: /* sym */
11028#line 2644 "parse.y"
11029 {
11030 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11031}
11032#line 11033 "parse.c"
11033 break;
11034
11035 case YYSYMBOL_dsym: /* dsym */
11036#line 2635 "parse.y"
11037 {
11038 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11039 rb_parser_printf(p, "NODE_SPECIAL");
11040 }
11041 else if (((*yyvaluep).node)) {
11042 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11043 }
11044}
11045#line 11046 "parse.c"
11046 break;
11047
11048 case YYSYMBOL_numeric: /* numeric */
11049#line 2635 "parse.y"
11050 {
11051 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11052 rb_parser_printf(p, "NODE_SPECIAL");
11053 }
11054 else if (((*yyvaluep).node)) {
11055 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11056 }
11057}
11058#line 11059 "parse.c"
11059 break;
11060
11061 case YYSYMBOL_simple_numeric: /* simple_numeric */
11062#line 2635 "parse.y"
11063 {
11064 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11065 rb_parser_printf(p, "NODE_SPECIAL");
11066 }
11067 else if (((*yyvaluep).node)) {
11068 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11069 }
11070}
11071#line 11072 "parse.c"
11072 break;
11073
11074 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
11075#line 2644 "parse.y"
11076 {
11077 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11078}
11079#line 11080 "parse.c"
11080 break;
11081
11082 case YYSYMBOL_user_variable: /* user_variable */
11083#line 2644 "parse.y"
11084 {
11085 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11086}
11087#line 11088 "parse.c"
11088 break;
11089
11090 case YYSYMBOL_keyword_variable: /* keyword_variable */
11091#line 2644 "parse.y"
11092 {
11093 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11094}
11095#line 11096 "parse.c"
11096 break;
11097
11098 case YYSYMBOL_var_ref: /* var_ref */
11099#line 2635 "parse.y"
11100 {
11101 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11102 rb_parser_printf(p, "NODE_SPECIAL");
11103 }
11104 else if (((*yyvaluep).node)) {
11105 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11106 }
11107}
11108#line 11109 "parse.c"
11109 break;
11110
11111 case YYSYMBOL_var_lhs: /* var_lhs */
11112#line 2635 "parse.y"
11113 {
11114 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11115 rb_parser_printf(p, "NODE_SPECIAL");
11116 }
11117 else if (((*yyvaluep).node)) {
11118 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11119 }
11120}
11121#line 11122 "parse.c"
11122 break;
11123
11124 case YYSYMBOL_backref: /* backref */
11125#line 2635 "parse.y"
11126 {
11127 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11128 rb_parser_printf(p, "NODE_SPECIAL");
11129 }
11130 else if (((*yyvaluep).node)) {
11131 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11132 }
11133}
11134#line 11135 "parse.c"
11135 break;
11136
11137 case YYSYMBOL_superclass: /* superclass */
11138#line 2635 "parse.y"
11139 {
11140 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11141 rb_parser_printf(p, "NODE_SPECIAL");
11142 }
11143 else if (((*yyvaluep).node)) {
11144 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11145 }
11146}
11147#line 11148 "parse.c"
11148 break;
11149
11150 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11151#line 2635 "parse.y"
11152 {
11153 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11154 rb_parser_printf(p, "NODE_SPECIAL");
11155 }
11156 else if (((*yyvaluep).node_args)) {
11157 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11158 }
11159}
11160#line 11161 "parse.c"
11161 break;
11162
11163 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11164#line 2635 "parse.y"
11165 {
11166 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11167 rb_parser_printf(p, "NODE_SPECIAL");
11168 }
11169 else if (((*yyvaluep).node_args)) {
11170 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11171 }
11172}
11173#line 11174 "parse.c"
11174 break;
11175
11176 case YYSYMBOL_f_paren_args: /* f_paren_args */
11177#line 2635 "parse.y"
11178 {
11179 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11180 rb_parser_printf(p, "NODE_SPECIAL");
11181 }
11182 else if (((*yyvaluep).node_args)) {
11183 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11184 }
11185}
11186#line 11187 "parse.c"
11187 break;
11188
11189 case YYSYMBOL_f_arglist: /* f_arglist */
11190#line 2635 "parse.y"
11191 {
11192 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11193 rb_parser_printf(p, "NODE_SPECIAL");
11194 }
11195 else if (((*yyvaluep).node_args)) {
11196 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11197 }
11198}
11199#line 11200 "parse.c"
11200 break;
11201
11202 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11203#line 2635 "parse.y"
11204 {
11205 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11206 rb_parser_printf(p, "NODE_SPECIAL");
11207 }
11208 else if (((*yyvaluep).node_kw_arg)) {
11209 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11210 }
11211}
11212#line 11213 "parse.c"
11213 break;
11214
11215 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11216#line 2635 "parse.y"
11217 {
11218 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11219 rb_parser_printf(p, "NODE_SPECIAL");
11220 }
11221 else if (((*yyvaluep).node_kw_arg)) {
11222 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11223 }
11224}
11225#line 11226 "parse.c"
11226 break;
11227
11228 case YYSYMBOL_opt_f_block_arg_opt_comma: /* opt_f_block_arg_opt_comma */
11229#line 2644 "parse.y"
11230 {
11231 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11232}
11233#line 11234 "parse.c"
11234 break;
11235
11236 case YYSYMBOL_args_tail_basic_arg_value_opt_comma: /* args_tail_basic_arg_value_opt_comma */
11237#line 2635 "parse.y"
11238 {
11239 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11240 rb_parser_printf(p, "NODE_SPECIAL");
11241 }
11242 else if (((*yyvaluep).node_args)) {
11243 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11244 }
11245}
11246#line 11247 "parse.c"
11247 break;
11248
11249 case YYSYMBOL_args_tail: /* args_tail */
11250#line 2635 "parse.y"
11251 {
11252 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11253 rb_parser_printf(p, "NODE_SPECIAL");
11254 }
11255 else if (((*yyvaluep).node_args)) {
11256 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11257 }
11258}
11259#line 11260 "parse.c"
11260 break;
11261
11262 case YYSYMBOL_args_tail_basic_arg_value_none: /* args_tail_basic_arg_value_none */
11263#line 2635 "parse.y"
11264 {
11265 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11266 rb_parser_printf(p, "NODE_SPECIAL");
11267 }
11268 else if (((*yyvaluep).node_args)) {
11269 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11270 }
11271}
11272#line 11273 "parse.c"
11273 break;
11274
11275 case YYSYMBOL_largs_tail: /* largs_tail */
11276#line 2635 "parse.y"
11277 {
11278 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11279 rb_parser_printf(p, "NODE_SPECIAL");
11280 }
11281 else if (((*yyvaluep).node_args)) {
11282 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11283 }
11284}
11285#line 11286 "parse.c"
11286 break;
11287
11288 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11289#line 2635 "parse.y"
11290 {
11291 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11292 rb_parser_printf(p, "NODE_SPECIAL");
11293 }
11294 else if (((*yyvaluep).node_opt_arg)) {
11295 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11296 }
11297}
11298#line 11299 "parse.c"
11299 break;
11300
11301 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11302#line 2635 "parse.y"
11303 {
11304 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11305 rb_parser_printf(p, "NODE_SPECIAL");
11306 }
11307 else if (((*yyvaluep).node_opt_arg)) {
11308 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11309 }
11310}
11311#line 11312 "parse.c"
11312 break;
11313
11314 case YYSYMBOL_opt_args_tail_args_tail_opt_comma: /* opt_args_tail_args_tail_opt_comma */
11315#line 2635 "parse.y"
11316 {
11317 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11318 rb_parser_printf(p, "NODE_SPECIAL");
11319 }
11320 else if (((*yyvaluep).node_args)) {
11321 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11322 }
11323}
11324#line 11325 "parse.c"
11325 break;
11326
11327 case YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
11328#line 2635 "parse.y"
11329 {
11330 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11331 rb_parser_printf(p, "NODE_SPECIAL");
11332 }
11333 else if (((*yyvaluep).node_args)) {
11334 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11335 }
11336}
11337#line 11338 "parse.c"
11338 break;
11339
11340 case YYSYMBOL_f_args_list_args_tail_opt_comma: /* f_args-list_args_tail_opt_comma */
11341#line 2635 "parse.y"
11342 {
11343 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11344 rb_parser_printf(p, "NODE_SPECIAL");
11345 }
11346 else if (((*yyvaluep).node_args)) {
11347 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11348 }
11349}
11350#line 11351 "parse.c"
11351 break;
11352
11353 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11354#line 2635 "parse.y"
11355 {
11356 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11357 rb_parser_printf(p, "NODE_SPECIAL");
11358 }
11359 else if (((*yyvaluep).node_args)) {
11360 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11361 }
11362}
11363#line 11364 "parse.c"
11364 break;
11365
11366 case YYSYMBOL_f_args: /* f_args */
11367#line 2635 "parse.y"
11368 {
11369 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11370 rb_parser_printf(p, "NODE_SPECIAL");
11371 }
11372 else if (((*yyvaluep).node_args)) {
11373 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11374 }
11375}
11376#line 11377 "parse.c"
11377 break;
11378
11379 case YYSYMBOL_opt_args_tail_largs_tail_none: /* opt_args_tail_largs_tail_none */
11380#line 2635 "parse.y"
11381 {
11382 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11383 rb_parser_printf(p, "NODE_SPECIAL");
11384 }
11385 else if (((*yyvaluep).node_args)) {
11386 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11387 }
11388}
11389#line 11390 "parse.c"
11390 break;
11391
11392 case YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none: /* args-list_arg_value_opt_args_tail_largs_tail_none */
11393#line 2635 "parse.y"
11394 {
11395 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11396 rb_parser_printf(p, "NODE_SPECIAL");
11397 }
11398 else if (((*yyvaluep).node_args)) {
11399 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11400 }
11401}
11402#line 11403 "parse.c"
11403 break;
11404
11405 case YYSYMBOL_f_args_list_largs_tail_none: /* f_args-list_largs_tail_none */
11406#line 2635 "parse.y"
11407 {
11408 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11409 rb_parser_printf(p, "NODE_SPECIAL");
11410 }
11411 else if (((*yyvaluep).node_args)) {
11412 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11413 }
11414}
11415#line 11416 "parse.c"
11416 break;
11417
11418 case YYSYMBOL_tail_only_args_largs_tail: /* tail-only-args_largs_tail */
11419#line 2635 "parse.y"
11420 {
11421 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11422 rb_parser_printf(p, "NODE_SPECIAL");
11423 }
11424 else if (((*yyvaluep).node_args)) {
11425 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11426 }
11427}
11428#line 11429 "parse.c"
11429 break;
11430
11431 case YYSYMBOL_f_largs: /* f_largs */
11432#line 2635 "parse.y"
11433 {
11434 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11435 rb_parser_printf(p, "NODE_SPECIAL");
11436 }
11437 else if (((*yyvaluep).node_args)) {
11438 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11439 }
11440}
11441#line 11442 "parse.c"
11442 break;
11443
11444 case YYSYMBOL_args_forward: /* args_forward */
11445#line 2644 "parse.y"
11446 {
11447 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11448}
11449#line 11450 "parse.c"
11450 break;
11451
11452 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11453#line 2644 "parse.y"
11454 {
11455 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11456}
11457#line 11458 "parse.c"
11458 break;
11459
11460 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11461#line 2644 "parse.y"
11462 {
11463 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11464}
11465#line 11466 "parse.c"
11466 break;
11467
11468 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11469#line 2644 "parse.y"
11470 {
11471 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11472}
11473#line 11474 "parse.c"
11474 break;
11475
11476 case YYSYMBOL_f_arg_item: /* f_arg_item */
11477#line 2635 "parse.y"
11478 {
11479 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11480 rb_parser_printf(p, "NODE_SPECIAL");
11481 }
11482 else if (((*yyvaluep).node_args_aux)) {
11483 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11484 }
11485}
11486#line 11487 "parse.c"
11487 break;
11488
11489 case YYSYMBOL_f_arg: /* f_arg */
11490#line 2635 "parse.y"
11491 {
11492 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11493 rb_parser_printf(p, "NODE_SPECIAL");
11494 }
11495 else if (((*yyvaluep).node_args_aux)) {
11496 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11497 }
11498}
11499#line 11500 "parse.c"
11500 break;
11501
11502 case YYSYMBOL_f_label: /* f_label */
11503#line 2644 "parse.y"
11504 {
11505 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11506}
11507#line 11508 "parse.c"
11508 break;
11509
11510 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11511#line 2644 "parse.y"
11512 {
11513 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11514}
11515#line 11516 "parse.c"
11516 break;
11517
11518 case YYSYMBOL_f_kwrest: /* f_kwrest */
11519#line 2644 "parse.y"
11520 {
11521 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11522}
11523#line 11524 "parse.c"
11524 break;
11525
11526 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11527#line 2644 "parse.y"
11528 {
11529 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11530}
11531#line 11532 "parse.c"
11532 break;
11533
11534 case YYSYMBOL_f_block_arg: /* f_block_arg */
11535#line 2644 "parse.y"
11536 {
11537 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11538}
11539#line 11540 "parse.c"
11540 break;
11541
11542 case YYSYMBOL_opt_comma: /* opt_comma */
11543#line 2644 "parse.y"
11544 {
11545 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11546}
11547#line 11548 "parse.c"
11548 break;
11549
11550 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11551#line 2635 "parse.y"
11552 {
11553 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11554 rb_parser_printf(p, "NODE_SPECIAL");
11555 }
11556 else if (((*yyvaluep).node)) {
11557 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11558 }
11559}
11560#line 11561 "parse.c"
11561 break;
11562
11563 case YYSYMBOL_singleton: /* singleton */
11564#line 2635 "parse.y"
11565 {
11566 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11567 rb_parser_printf(p, "NODE_SPECIAL");
11568 }
11569 else if (((*yyvaluep).node)) {
11570 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11571 }
11572}
11573#line 11574 "parse.c"
11574 break;
11575
11576 case YYSYMBOL_singleton_expr: /* singleton_expr */
11577#line 2635 "parse.y"
11578 {
11579 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11580 rb_parser_printf(p, "NODE_SPECIAL");
11581 }
11582 else if (((*yyvaluep).node)) {
11583 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11584 }
11585}
11586#line 11587 "parse.c"
11587 break;
11588
11589 case YYSYMBOL_assoc_list: /* assoc_list */
11590#line 2635 "parse.y"
11591 {
11592 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11593 rb_parser_printf(p, "NODE_SPECIAL");
11594 }
11595 else if (((*yyvaluep).node)) {
11596 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11597 }
11598}
11599#line 11600 "parse.c"
11600 break;
11601
11602 case YYSYMBOL_assocs: /* assocs */
11603#line 2635 "parse.y"
11604 {
11605 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11606 rb_parser_printf(p, "NODE_SPECIAL");
11607 }
11608 else if (((*yyvaluep).node)) {
11609 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11610 }
11611}
11612#line 11613 "parse.c"
11613 break;
11614
11615 case YYSYMBOL_assoc: /* assoc */
11616#line 2635 "parse.y"
11617 {
11618 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11619 rb_parser_printf(p, "NODE_SPECIAL");
11620 }
11621 else if (((*yyvaluep).node)) {
11622 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11623 }
11624}
11625#line 11626 "parse.c"
11626 break;
11627
11628 case YYSYMBOL_operation2: /* operation2 */
11629#line 2644 "parse.y"
11630 {
11631 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11632}
11633#line 11634 "parse.c"
11634 break;
11635
11636 case YYSYMBOL_operation3: /* operation3 */
11637#line 2644 "parse.y"
11638 {
11639 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11640}
11641#line 11642 "parse.c"
11642 break;
11643
11644 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11645#line 2644 "parse.y"
11646 {
11647 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11648}
11649#line 11650 "parse.c"
11650 break;
11651
11652 case YYSYMBOL_call_op: /* call_op */
11653#line 2644 "parse.y"
11654 {
11655 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11656}
11657#line 11658 "parse.c"
11658 break;
11659
11660 case YYSYMBOL_call_op2: /* call_op2 */
11661#line 2644 "parse.y"
11662 {
11663 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11664}
11665#line 11666 "parse.c"
11666 break;
11667
11668 case YYSYMBOL_none: /* none */
11669#line 2635 "parse.y"
11670 {
11671 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11672 rb_parser_printf(p, "NODE_SPECIAL");
11673 }
11674 else if (((*yyvaluep).node)) {
11675 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11676 }
11677}
11678#line 11679 "parse.c"
11679 break;
11680
11681 default:
11682 break;
11683 }
11684 YY_IGNORE_MAYBE_UNINITIALIZED_END
11685}
11686
11687
11688/*---------------------------.
11689| Print this symbol on YYO. |
11690`---------------------------*/
11691
11692static void
11693yy_symbol_print (FILE *yyo,
11694 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11695{
11696 YYFPRINTF (yyo, "%s %s (",
11697 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11698
11699 YYLOCATION_PRINT (yyo, yylocationp, p);
11700 YYFPRINTF (yyo, ": ");
11701 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11702 YYFPRINTF (yyo, ")");
11703}
11704
11705/*------------------------------------------------------------------.
11706| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11707| TOP (included). |
11708`------------------------------------------------------------------*/
11709
11710static void
11711yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11712{
11713 YYFPRINTF (stderr, "Stack now");
11714 for (; yybottom <= yytop; yybottom++)
11715 {
11716 int yybot = *yybottom;
11717 YYFPRINTF (stderr, " %d", yybot);
11718 }
11719 YYFPRINTF (stderr, "\n");
11720}
11721
11722# define YY_STACK_PRINT(Bottom, Top, p) \
11723do { \
11724 if (yydebug) \
11725 yy_stack_print ((Bottom), (Top), p); \
11726} while (0)
11727
11728
11729/*------------------------------------------------.
11730| Report that the YYRULE is going to be reduced. |
11731`------------------------------------------------*/
11732
11733static void
11734yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11735 int yyrule, struct parser_params *p)
11736{
11737 int yylno = yyrline[yyrule];
11738 int yynrhs = yyr2[yyrule];
11739 int yyi;
11740 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11741 yyrule - 1, yylno);
11742 /* The symbols being reduced. */
11743 for (yyi = 0; yyi < yynrhs; yyi++)
11744 {
11745 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11746 yy_symbol_print (stderr,
11747 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11748 &yyvsp[(yyi + 1) - (yynrhs)],
11749 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11750 YYFPRINTF (stderr, "\n");
11751 }
11752}
11753
11754# define YY_REDUCE_PRINT(Rule, p) \
11755do { \
11756 if (yydebug) \
11757 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11758} while (0)
11759
11760/* Nonzero means print parse trace. It is left uninitialized so that
11761 multiple parsers can coexist. */
11762#ifndef yydebug
11763int yydebug;
11764#endif
11765#else /* !YYDEBUG */
11766# define YYDPRINTF(Args) ((void) 0)
11767# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11768# define YY_STACK_PRINT(Bottom, Top, p)
11769# define YY_REDUCE_PRINT(Rule, p)
11770#endif /* !YYDEBUG */
11771
11772
11773/* YYINITDEPTH -- initial size of the parser's stacks. */
11774#ifndef YYINITDEPTH
11775# define YYINITDEPTH 200
11776#endif
11777
11778/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11779 if the built-in stack extension method is used).
11780
11781 Do not make this value too large; the results are undefined if
11782 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11783 evaluated with infinite-precision integer arithmetic. */
11784
11785#ifndef YYMAXDEPTH
11786# define YYMAXDEPTH 10000
11787#endif
11788
11789
11790/* Context of a parse error. */
11791typedef struct
11792{
11793 yy_state_t *yyssp;
11794 yysymbol_kind_t yytoken;
11795 YYLTYPE *yylloc;
11796} yypcontext_t;
11797
11798/* Put in YYARG at most YYARGN of the expected tokens given the
11799 current YYCTX, and return the number of tokens stored in YYARG. If
11800 YYARG is null, return the number of expected tokens (guaranteed to
11801 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11802 Return 0 if there are more than YYARGN expected tokens, yet fill
11803 YYARG up to YYARGN. */
11804static int
11805yypcontext_expected_tokens (const yypcontext_t *yyctx,
11806 yysymbol_kind_t yyarg[], int yyargn)
11807{
11808 /* Actual size of YYARG. */
11809 int yycount = 0;
11810 int yyn = yypact[+*yyctx->yyssp];
11811 if (!yypact_value_is_default (yyn))
11812 {
11813 /* Start YYX at -YYN if negative to avoid negative indexes in
11814 YYCHECK. In other words, skip the first -YYN actions for
11815 this state because they are default actions. */
11816 int yyxbegin = yyn < 0 ? -yyn : 0;
11817 /* Stay within bounds of both yycheck and yytname. */
11818 int yychecklim = YYLAST - yyn + 1;
11819 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11820 int yyx;
11821 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11822 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11823 && !yytable_value_is_error (yytable[yyx + yyn]))
11824 {
11825 if (!yyarg)
11826 ++yycount;
11827 else if (yycount == yyargn)
11828 return 0;
11829 else
11830 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11831 }
11832 }
11833 if (yyarg && yycount == 0 && 0 < yyargn)
11834 yyarg[0] = YYSYMBOL_YYEMPTY;
11835 return yycount;
11836}
11837
11838
11839
11840
11841#ifndef yystrlen
11842# if defined __GLIBC__ && defined _STRING_H
11843# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11844# else
11845/* Return the length of YYSTR. */
11846static YYPTRDIFF_T
11847yystrlen (const char *yystr)
11848{
11849 YYPTRDIFF_T yylen;
11850 for (yylen = 0; yystr[yylen]; yylen++)
11851 continue;
11852 return yylen;
11853}
11854# endif
11855#endif
11856
11857#ifndef yystpcpy
11858# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11859# define yystpcpy stpcpy
11860# else
11861/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11862 YYDEST. */
11863static char *
11864yystpcpy (char *yydest, const char *yysrc)
11865{
11866 char *yyd = yydest;
11867 const char *yys = yysrc;
11868
11869 while ((*yyd++ = *yys++) != '\0')
11870 continue;
11871
11872 return yyd - 1;
11873}
11874# endif
11875#endif
11876
11877#ifndef yytnamerr
11878/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11879 quotes and backslashes, so that it's suitable for yyerror. The
11880 heuristic is that double-quoting is unnecessary unless the string
11881 contains an apostrophe, a comma, or backslash (other than
11882 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11883 null, do not copy; instead, return the length of what the result
11884 would have been. */
11885static YYPTRDIFF_T
11886yytnamerr (char *yyres, const char *yystr)
11887{
11888 if (*yystr == '"')
11889 {
11890 YYPTRDIFF_T yyn = 0;
11891 char const *yyp = yystr;
11892 for (;;)
11893 switch (*++yyp)
11894 {
11895 case '\'':
11896 case ',':
11897 goto do_not_strip_quotes;
11898
11899 case '\\':
11900 if (*++yyp != '\\')
11901 goto do_not_strip_quotes;
11902 else
11903 goto append;
11904
11905 append:
11906 default:
11907 if (yyres)
11908 yyres[yyn] = *yyp;
11909 yyn++;
11910 break;
11911
11912 case '"':
11913 if (yyres)
11914 yyres[yyn] = '\0';
11915 return yyn;
11916 }
11917 do_not_strip_quotes: ;
11918 }
11919
11920 if (yyres)
11921 return yystpcpy (yyres, yystr) - yyres;
11922 else
11923 return yystrlen (yystr);
11924}
11925#endif
11926
11927
11928static int
11929yy_syntax_error_arguments (const yypcontext_t *yyctx,
11930 yysymbol_kind_t yyarg[], int yyargn)
11931{
11932 /* Actual size of YYARG. */
11933 int yycount = 0;
11934 /* There are many possibilities here to consider:
11935 - If this state is a consistent state with a default action, then
11936 the only way this function was invoked is if the default action
11937 is an error action. In that case, don't check for expected
11938 tokens because there are none.
11939 - The only way there can be no lookahead present (in yychar) is if
11940 this state is a consistent state with a default action. Thus,
11941 detecting the absence of a lookahead is sufficient to determine
11942 that there is no unexpected or expected token to report. In that
11943 case, just report a simple "syntax error".
11944 - Don't assume there isn't a lookahead just because this state is a
11945 consistent state with a default action. There might have been a
11946 previous inconsistent state, consistent state with a non-default
11947 action, or user semantic action that manipulated yychar.
11948 - Of course, the expected token list depends on states to have
11949 correct lookahead information, and it depends on the parser not
11950 to perform extra reductions after fetching a lookahead from the
11951 scanner and before detecting a syntax error. Thus, state merging
11952 (from LALR or IELR) and default reductions corrupt the expected
11953 token list. However, the list is correct for canonical LR with
11954 one exception: it will still contain any token that will not be
11955 accepted due to an error action in a later state.
11956 */
11957 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11958 {
11959 int yyn;
11960 if (yyarg)
11961 yyarg[yycount] = yyctx->yytoken;
11962 ++yycount;
11963 yyn = yypcontext_expected_tokens (yyctx,
11964 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11965 if (yyn == YYENOMEM)
11966 return YYENOMEM;
11967 else
11968 yycount += yyn;
11969 }
11970 return yycount;
11971}
11972
11973/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11974 about the unexpected token YYTOKEN for the state stack whose top is
11975 YYSSP.
11976
11977 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11978 not large enough to hold the message. In that case, also set
11979 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11980 required number of bytes is too large to store. */
11981static int
11982yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11983 const yypcontext_t *yyctx, struct parser_params *p)
11984{
11985 enum { YYARGS_MAX = 5 };
11986 /* Internationalized format string. */
11987 const char *yyformat = YY_NULLPTR;
11988 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11989 one per "expected"). */
11990 yysymbol_kind_t yyarg[YYARGS_MAX];
11991 /* Cumulated lengths of YYARG. */
11992 YYPTRDIFF_T yysize = 0;
11993
11994 /* Actual size of YYARG. */
11995 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11996 if (yycount == YYENOMEM)
11997 return YYENOMEM;
11998
11999 switch (yycount)
12000 {
12001#define YYCASE_(N, S) \
12002 case N: \
12003 yyformat = S; \
12004 break
12005 default: /* Avoid compiler warnings. */
12006 YYCASE_(0, YY_("syntax error"));
12007 YYCASE_(1, YY_("syntax error, unexpected %s"));
12008 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
12009 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
12010 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
12011 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
12012#undef YYCASE_
12013 }
12014
12015 /* Compute error message size. Don't count the "%s"s, but reserve
12016 room for the terminator. */
12017 yysize = yystrlen (yyformat) - 2 * yycount + 1;
12018 {
12019 int yyi;
12020 for (yyi = 0; yyi < yycount; ++yyi)
12021 {
12022 YYPTRDIFF_T yysize1
12023 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
12024 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
12025 yysize = yysize1;
12026 else
12027 return YYENOMEM;
12028 }
12029 }
12030
12031 if (*yymsg_alloc < yysize)
12032 {
12033 *yymsg_alloc = 2 * yysize;
12034 if (! (yysize <= *yymsg_alloc
12035 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
12036 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
12037 return -1;
12038 }
12039
12040 /* Avoid sprintf, as that infringes on the user's name space.
12041 Don't have undefined behavior even if the translation
12042 produced a string with the wrong number of "%s"s. */
12043 {
12044 char *yyp = *yymsg;
12045 int yyi = 0;
12046 while ((*yyp = *yyformat) != '\0')
12047 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
12048 {
12049 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
12050 yyformat += 2;
12051 }
12052 else
12053 {
12054 ++yyp;
12055 ++yyformat;
12056 }
12057 }
12058 return 0;
12059}
12060
12061
12062/*-----------------------------------------------.
12063| Release the memory associated to this symbol. |
12064`-----------------------------------------------*/
12065
12066static void
12067yydestruct (const char *yymsg,
12068 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
12069{
12070 YY_USE (yyvaluep);
12071 YY_USE (yylocationp);
12072 YY_USE (p);
12073 if (!yymsg)
12074 yymsg = "Deleting";
12075 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
12076
12077 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12078 switch (yykind)
12079 {
12080 case YYSYMBOL_258_16: /* @16 */
12081#line 2672 "parse.y"
12082 {
12083 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
12084}
12085#line 12086 "parse.c"
12086 break;
12087
12088 case YYSYMBOL_259_17: /* @17 */
12089#line 2672 "parse.y"
12090 {
12091 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
12092}
12093#line 12094 "parse.c"
12094 break;
12095
12096 default:
12097 break;
12098 }
12099 YY_IGNORE_MAYBE_UNINITIALIZED_END
12100}
12101
12102
12103
12104
12105
12106
12107/*----------.
12108| yyparse. |
12109`----------*/
12110
12111int
12112yyparse (struct parser_params *p)
12113{
12114/* Lookahead token kind. */
12115int yychar;
12116
12117
12118/* The semantic value of the lookahead symbol. */
12119/* Default value used for initialization, for pacifying older GCCs
12120 or non-GCC compilers. */
12121#ifdef __cplusplus
12122static const YYSTYPE yyval_default = {};
12123(void) yyval_default;
12124#else
12125YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
12126#endif
12127YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
12128
12129/* Location data for the lookahead symbol. */
12130static const YYLTYPE yyloc_default
12131# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
12132 = { 1, 1, 1, 1 }
12133# endif
12134;
12135YYLTYPE yylloc = yyloc_default;
12136
12137 /* Number of syntax errors so far. */
12138 int yynerrs = 0;
12139 YY_USE (yynerrs); /* Silence compiler warning. */
12140
12141 yy_state_fast_t yystate = 0;
12142 /* Number of tokens to shift before error messages enabled. */
12143 int yyerrstatus = 0;
12144
12145 /* Refer to the stacks through separate pointers, to allow yyoverflow
12146 to reallocate them elsewhere. */
12147
12148 /* Their size. */
12149 YYPTRDIFF_T yystacksize = YYINITDEPTH;
12150
12151 /* The state stack: array, bottom, top. */
12152 yy_state_t yyssa[YYINITDEPTH];
12153 yy_state_t *yyss = yyssa;
12154 yy_state_t *yyssp = yyss;
12155
12156 /* The semantic value stack: array, bottom, top. */
12157 YYSTYPE yyvsa[YYINITDEPTH];
12158 YYSTYPE *yyvs = yyvsa;
12159 YYSTYPE *yyvsp = yyvs;
12160
12161 /* The location stack: array, bottom, top. */
12162 YYLTYPE yylsa[YYINITDEPTH];
12163 YYLTYPE *yyls = yylsa;
12164 YYLTYPE *yylsp = yyls;
12165
12166 int yyn;
12167 /* The return value of yyparse. */
12168 int yyresult;
12169 /* Lookahead symbol kind. */
12170 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
12171 /* The variables used to return semantic value and location from the
12172 action routines. */
12173 YYSTYPE yyval;
12174 YYLTYPE yyloc;
12175
12176 /* The locations where the error started and ended. */
12177 YYLTYPE yyerror_range[3];
12178
12179 /* Buffer for error messages, and its allocated size. */
12180 char yymsgbuf[128];
12181 char *yymsg = yymsgbuf;
12182 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
12183
12184#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
12185
12186 /* The number of symbols on the RHS of the reduced rule.
12187 Keep to zero when no symbol should be popped. */
12188 int yylen = 0;
12189
12190 YYDPRINTF ((stderr, "Starting parse\n"));
12191
12192 yychar = YYEMPTY; /* Cause a token to be read. */
12193
12194
12195 /* User initialization code. */
12196#line 2679 "parse.y"
12197 {
12198 RUBY_SET_YYLLOC_OF_NONE(yylloc);
12199}
12200
12201#line 12202 "parse.c"
12202
12203 yylsp[0] = yylloc;
12204 goto yysetstate;
12205
12206
12207/*------------------------------------------------------------.
12208| yynewstate -- push a new state, which is found in yystate. |
12209`------------------------------------------------------------*/
12210yynewstate:
12211 /* In all cases, when you get here, the value and location stacks
12212 have just been pushed. So pushing a state here evens the stacks. */
12213 yyssp++;
12214
12215
12216/*--------------------------------------------------------------------.
12217| yysetstate -- set current state (the top of the stack) to yystate. |
12218`--------------------------------------------------------------------*/
12219yysetstate:
12220 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12221 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12222 YY_IGNORE_USELESS_CAST_BEGIN
12223 *yyssp = YY_CAST (yy_state_t, yystate);
12224 YY_IGNORE_USELESS_CAST_END
12225 YY_STACK_PRINT (yyss, yyssp, p);
12226
12227 if (yyss + yystacksize - 1 <= yyssp)
12228#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12229 YYNOMEM;
12230#else
12231 {
12232 /* Get the current used size of the three stacks, in elements. */
12233 YYPTRDIFF_T yysize = yyssp - yyss + 1;
12234
12235# if defined yyoverflow
12236 {
12237 /* Give user a chance to reallocate the stack. Use copies of
12238 these so that the &'s don't force the real ones into
12239 memory. */
12240 yy_state_t *yyss1 = yyss;
12241 YYSTYPE *yyvs1 = yyvs;
12242 YYLTYPE *yyls1 = yyls;
12243
12244 /* Each stack pointer address is followed by the size of the
12245 data in use in that stack, in bytes. This used to be a
12246 conditional around just the two extra args, but that might
12247 be undefined if yyoverflow is a macro. */
12248 yyoverflow (YY_("memory exhausted"),
12249 &yyss1, yysize * YYSIZEOF (*yyssp),
12250 &yyvs1, yysize * YYSIZEOF (*yyvsp),
12251 &yyls1, yysize * YYSIZEOF (*yylsp),
12252 &yystacksize);
12253 yyss = yyss1;
12254 yyvs = yyvs1;
12255 yyls = yyls1;
12256 }
12257# else /* defined YYSTACK_RELOCATE */
12258 /* Extend the stack our own way. */
12259 if (YYMAXDEPTH <= yystacksize)
12260 YYNOMEM;
12261 yystacksize *= 2;
12262 if (YYMAXDEPTH < yystacksize)
12263 yystacksize = YYMAXDEPTH;
12264
12265 {
12266 yy_state_t *yyss1 = yyss;
12267 union yyalloc *yyptr =
12268 YY_CAST (union yyalloc *,
12269 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12270 if (! yyptr)
12271 YYNOMEM;
12272 YYSTACK_RELOCATE (yyss_alloc, yyss);
12273 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12274 YYSTACK_RELOCATE (yyls_alloc, yyls);
12275# undef YYSTACK_RELOCATE
12276 if (yyss1 != yyssa)
12277 YYSTACK_FREE (yyss1);
12278 }
12279# endif
12280
12281 yyssp = yyss + yysize - 1;
12282 yyvsp = yyvs + yysize - 1;
12283 yylsp = yyls + yysize - 1;
12284
12285 YY_IGNORE_USELESS_CAST_BEGIN
12286 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12287 YY_CAST (long, yystacksize)));
12288 YY_IGNORE_USELESS_CAST_END
12289
12290 if (yyss + yystacksize - 1 <= yyssp)
12291 YYABORT;
12292 }
12293#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12294
12295
12296 if (yystate == YYFINAL)
12297 YYACCEPT;
12298
12299 goto yybackup;
12300
12301
12302/*-----------.
12303| yybackup. |
12304`-----------*/
12305yybackup:
12306 /* Do appropriate processing given the current state. Read a
12307 lookahead token if we need one and don't already have one. */
12308
12309 /* First try to decide what to do without reference to lookahead token. */
12310 yyn = yypact[yystate];
12311 if (yypact_value_is_default (yyn))
12312 goto yydefault;
12313
12314 /* Not known => get a lookahead token if don't already have one. */
12315
12316 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12317 if (yychar == YYEMPTY)
12318 {
12319 YYDPRINTF ((stderr, "Reading a token\n"));
12320 yychar = yylex (&yylval, &yylloc, p);
12321 }
12322
12323 if (yychar <= END_OF_INPUT)
12324 {
12325 yychar = END_OF_INPUT;
12326 yytoken = YYSYMBOL_YYEOF;
12327 YYDPRINTF ((stderr, "Now at end of input.\n"));
12328 }
12329 else if (yychar == YYerror)
12330 {
12331 /* The scanner already issued an error message, process directly
12332 to error recovery. But do not keep the error token as
12333 lookahead, it is too special and may lead us to an endless
12334 loop in error recovery. */
12335 yychar = YYUNDEF;
12336 yytoken = YYSYMBOL_YYerror;
12337 yyerror_range[1] = yylloc;
12338 goto yyerrlab1;
12339 }
12340 else
12341 {
12342 yytoken = YYTRANSLATE (yychar);
12343 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12344 }
12345
12346 /* If the proper action on seeing token YYTOKEN is to reduce or to
12347 detect an error, take that action. */
12348 yyn += yytoken;
12349 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12350 goto yydefault;
12351 yyn = yytable[yyn];
12352 if (yyn <= 0)
12353 {
12354 if (yytable_value_is_error (yyn))
12355 goto yyerrlab;
12356 yyn = -yyn;
12357 goto yyreduce;
12358 }
12359
12360 /* Count tokens shifted since error; after three, turn off error
12361 status. */
12362 if (yyerrstatus)
12363 yyerrstatus--;
12364
12365 /* Shift the lookahead token. */
12366 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12367 yystate = yyn;
12368 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12369 *++yyvsp = yylval;
12370 YY_IGNORE_MAYBE_UNINITIALIZED_END
12371 *++yylsp = yylloc;
12372 /* %after-shift code. */
12373#line 2682 "parse.y"
12374 {after_shift(p);}
12375#line 12376 "parse.c"
12376
12377
12378 /* Discard the shifted token. */
12379 yychar = YYEMPTY;
12380 goto yynewstate;
12381
12382
12383/*-----------------------------------------------------------.
12384| yydefault -- do the default action for the current state. |
12385`-----------------------------------------------------------*/
12386yydefault:
12387 yyn = yydefact[yystate];
12388 if (yyn == 0)
12389 goto yyerrlab;
12390 goto yyreduce;
12391
12392
12393/*-----------------------------.
12394| yyreduce -- do a reduction. |
12395`-----------------------------*/
12396yyreduce:
12397 /* yyn is the number of a rule to reduce with. */
12398 yylen = yyr2[yyn];
12399
12400 /* If YYLEN is nonzero, implement the default value of the action:
12401 '$$ = $1'.
12402
12403 Otherwise, the following line sets YYVAL to garbage.
12404 This behavior is undocumented and Bison
12405 users should not rely upon it. Assigning to YYVAL
12406 unconditionally makes the parser a bit smaller, and it avoids a
12407 GCC warning that YYVAL may be used uninitialized. */
12408 yyval = yyvsp[1-yylen];
12409 /* %before-reduce function. */
12410#line 2683 "parse.y"
12411 {before_reduce(yylen, p);}
12412#line 12413 "parse.c"
12413
12414
12415 /* Default location. */
12416 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12417 yyerror_range[1] = yyloc;
12418 YY_REDUCE_PRINT (yyn, p);
12419 switch (yyn)
12420 {
12421 case 2: /* $@1: %empty */
12422#line 3187 "parse.y"
12423 {
12424 SET_LEX_STATE(EXPR_BEG);
12425 local_push(p, ifndef_ripper(1)+0);
12426 /* jumps are possible in the top-level loop. */
12427 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12428 }
12429#line 12430 "parse.c"
12430 break;
12431
12432 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12433#line 3002 "parse.y"
12434 {
12435 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12436 }
12437#line 12438 "parse.c"
12438 break;
12439
12440 case 6: /* program: $@1 compstmt_top_stmts */
12441#line 3194 "parse.y"
12442 {
12443 if ((yyvsp[0].node) && !compile_for_eval) {
12444 NODE *node = (yyvsp[0].node);
12445 /* last expression should not be void */
12446 if (nd_type_p(node, NODE_BLOCK)) {
12447 while (RNODE_BLOCK(node)->nd_next) {
12448 node = RNODE_BLOCK(node)->nd_next;
12449 }
12450 node = RNODE_BLOCK(node)->nd_head;
12451 }
12452 node = remove_begin(node);
12453 void_expr(p, node);
12454 }
12455 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12456 /*% ripper[final]: program!($:2) %*/
12457 local_pop(p);
12458 }
12459#line 12460 "parse.c"
12460 break;
12461
12462 case 7: /* top_stmts: none */
12463#line 3214 "parse.y"
12464 {
12465 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12466 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12467 }
12468#line 12469 "parse.c"
12469 break;
12470
12471 case 8: /* top_stmts: top_stmt */
12472#line 3219 "parse.y"
12473 {
12474 (yyval.node) = newline_node((yyvsp[0].node));
12475 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12476 }
12477#line 12478 "parse.c"
12478 break;
12479
12480 case 9: /* top_stmts: top_stmts terms top_stmt */
12481#line 3224 "parse.y"
12482 {
12483 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12484 /*% ripper: stmts_add!($:1, $:3) %*/
12485 }
12486#line 12487 "parse.c"
12487 break;
12488
12489 case 10: /* top_stmt: stmt */
12490#line 3231 "parse.y"
12491 {
12492 clear_block_exit(p, true);
12493 (yyval.node) = (yyvsp[0].node);
12494 }
12495#line 12496 "parse.c"
12496 break;
12497
12498 case 11: /* top_stmt: "'BEGIN'" begin_block */
12499#line 3236 "parse.y"
12500 {
12501 (yyval.node) = (yyvsp[0].node);
12502 /*% ripper: $:2 %*/
12503 }
12504#line 12505 "parse.c"
12505 break;
12506
12507 case 12: /* block_open: '{' */
12508#line 3242 "parse.y"
12509 {(yyval.node_exits) = init_block_exit(p);}
12510#line 12511 "parse.c"
12511 break;
12512
12513 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12514#line 3245 "parse.y"
12515 {
12516 restore_block_exit(p, (yyvsp[-2].node_exits));
12517 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12518 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12519 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12520 /*% ripper: BEGIN!($:compstmt) %*/
12521 }
12522#line 12523 "parse.c"
12523 break;
12524
12525 case 14: /* compstmt_stmts: stmts option_terms */
12526#line 3002 "parse.y"
12527 {
12528 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12529 }
12530#line 12531 "parse.c"
12531 break;
12532
12533 case 15: /* $@2: %empty */
12534#line 3258 "parse.y"
12535 {
12536 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12537 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12538 }
12539#line 12540 "parse.c"
12540 break;
12541
12542 case 16: /* $@3: %empty */
12543#line 3263 "parse.y"
12544 {
12545 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12546 }
12547#line 12548 "parse.c"
12548 break;
12549
12550 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12551#line 3267 "parse.y"
12552 {
12553 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12554 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12555 }
12556#line 12557 "parse.c"
12557 break;
12558
12559 case 18: /* $@4: %empty */
12560#line 3274 "parse.y"
12561 {
12562 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12563 }
12564#line 12565 "parse.c"
12565 break;
12566
12567 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12568#line 3278 "parse.y"
12569 {
12570 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12571 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12572 }
12573#line 12574 "parse.c"
12574 break;
12575
12576 case 20: /* stmts: none */
12577#line 3285 "parse.y"
12578 {
12579 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12580 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12581 }
12582#line 12583 "parse.c"
12583 break;
12584
12585 case 21: /* stmts: stmt_or_begin */
12586#line 3290 "parse.y"
12587 {
12588 (yyval.node) = newline_node((yyvsp[0].node));
12589 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12590 }
12591#line 12592 "parse.c"
12592 break;
12593
12594 case 22: /* stmts: stmts terms stmt_or_begin */
12595#line 3295 "parse.y"
12596 {
12597 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12598 /*% ripper: stmts_add!($:1, $:3) %*/
12599 }
12600#line 12601 "parse.c"
12601 break;
12602
12603 case 24: /* $@5: %empty */
12604#line 3303 "parse.y"
12605 {
12606 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12607 }
12608#line 12609 "parse.c"
12609 break;
12610
12611 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12612#line 3307 "parse.y"
12613 {
12614 (yyval.node) = (yyvsp[0].node);
12615 }
12616#line 12617 "parse.c"
12617 break;
12618
12619 case 26: /* allow_exits: %empty */
12620#line 3312 "parse.y"
12621 {(yyval.node_exits) = allow_block_exit(p);}
12622#line 12623 "parse.c"
12623 break;
12624
12625 case 27: /* k_END: "'END'" lex_ctxt */
12626#line 3315 "parse.y"
12627 {
12628 if (p->ctxt.in_def) {
12629 rb_warn0("END in method; use at_exit");
12630 }
12631 (yyval.ctxt) = (yyvsp[0].ctxt);
12632 p->ctxt.in_rescue = before_rescue;
12633 /*% ripper: $:2 %*/
12634 }
12635#line 12636 "parse.c"
12636 break;
12637
12638 case 28: /* $@6: %empty */
12639#line 3324 "parse.y"
12640 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12641#line 12642 "parse.c"
12642 break;
12643
12644 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12645#line 3325 "parse.y"
12646 {
12647 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12648 /*% ripper: alias!($:new, $:old) %*/
12649 }
12650#line 12651 "parse.c"
12651 break;
12652
12653 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12654#line 3330 "parse.y"
12655 {
12656 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12657 /*% ripper: var_alias!($:new, $:old) %*/
12658 }
12659#line 12660 "parse.c"
12660 break;
12661
12662 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12663#line 3335 "parse.y"
12664 {
12665 char buf[2];
12666 buf[0] = '$';
12667 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12668 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12669 /*% ripper: var_alias!($:new, $:old) %*/
12670 }
12671#line 12672 "parse.c"
12672 break;
12673
12674 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12675#line 3343 "parse.y"
12676 {
12677 static const char mesg[] = "can't make alias for the number variables";
12678 /*%%%*/
12679 yyerror1(&(yylsp[0]), mesg);
12680 /*% %*/
12681 (yyval.node) = NEW_ERROR(&(yyloc));
12682 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12683 }
12684#line 12685 "parse.c"
12685 break;
12686
12687 case 33: /* stmt: "'undef'" undef_list */
12688#line 3352 "parse.y"
12689 {
12690 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12691 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12692 (yyval.node) = (yyvsp[0].node);
12693 /*% ripper: undef!($:list) %*/
12694 }
12695#line 12696 "parse.c"
12696 break;
12697
12698 case 34: /* stmt: stmt "'if' modifier" expr_value */
12699#line 3359 "parse.y"
12700 {
12701 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12702 fixpos((yyval.node), (yyvsp[0].node));
12703 /*% ripper: if_mod!($:cond, $:body) %*/
12704 }
12705#line 12706 "parse.c"
12706 break;
12707
12708 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12709#line 3365 "parse.y"
12710 {
12711 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12712 fixpos((yyval.node), (yyvsp[0].node));
12713 /*% ripper: unless_mod!($:cond, $:body) %*/
12714 }
12715#line 12716 "parse.c"
12716 break;
12717
12718 case 36: /* stmt: stmt "'while' modifier" expr_value */
12719#line 3371 "parse.y"
12720 {
12721 clear_block_exit(p, false);
12722 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12723 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12724 }
12725 else {
12726 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12727 }
12728 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12729 }
12730#line 12731 "parse.c"
12731 break;
12732
12733 case 37: /* stmt: stmt "'until' modifier" expr_value */
12734#line 3382 "parse.y"
12735 {
12736 clear_block_exit(p, 0);
12737 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12738 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12739 }
12740 else {
12741 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12742 }
12743 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12744 }
12745#line 12746 "parse.c"
12746 break;
12747
12748 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12749#line 3393 "parse.y"
12750 {
12751 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12752 NODE *resq;
12753 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12754 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12755 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12756 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12757 }
12758#line 12759 "parse.c"
12759 break;
12760
12761 case 39: /* stmt: k_END block_open compstmt_stmts '}' */
12762#line 3402 "parse.y"
12763 {
12764 clear_block_exit(p, true);
12765 restore_block_exit(p, (yyvsp[-2].node_exits));
12766 p->ctxt = (yyvsp[-3].ctxt);
12767 {
12768 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12769 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12770 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12771 }
12772 /*% ripper: END!($:body) %*/
12773 }
12774#line 12775 "parse.c"
12775 break;
12776
12777 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12778#line 3415 "parse.y"
12779 {
12780 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12781 /*% ripper: massign!($:lhs, $:rhs) %*/
12782 }
12783#line 12784 "parse.c"
12784 break;
12785
12786 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12787#line 2937 "parse.y"
12788 {
12789 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12790 /*% ripper: assign!($:1, $:4) %*/
12791 }
12792#line 12793 "parse.c"
12793 break;
12794
12795 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12796#line 3422 "parse.y"
12797 {
12798 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12799 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12800 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12801 loc.beg_pos = (yylsp[-3]).beg_pos;
12802 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12803 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12804 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12805 }
12806#line 12807 "parse.c"
12807 break;
12808
12809 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12810#line 3432 "parse.y"
12811 {
12812 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12813 /*% ripper: massign!($:lhs, $:rhs) %*/
12814 }
12815#line 12816 "parse.c"
12816 break;
12817
12818 case 47: /* stmt: error */
12819#line 3438 "parse.y"
12820 {
12821 (void)yynerrs;
12822 (yyval.node) = NEW_ERROR(&(yyloc));
12823 }
12824#line 12825 "parse.c"
12825 break;
12826
12827 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12828#line 2937 "parse.y"
12829 {
12830 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12831 /*% ripper: assign!($:1, $:4) %*/
12832 }
12833#line 12834 "parse.c"
12834 break;
12835
12836 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12837#line 3072 "parse.y"
12838 {
12839 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12840 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12841 }
12842#line 12843 "parse.c"
12843 break;
12844
12845 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12846#line 3077 "parse.y"
12847 {
12848 (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]));
12849 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12850 }
12851#line 12852 "parse.c"
12852 break;
12853
12854 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12855#line 3082 "parse.y"
12856 {
12857 (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]));
12858 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12859 }
12860#line 12861 "parse.c"
12861 break;
12862
12863 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12864#line 3087 "parse.y"
12865 {
12866 (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]));
12867 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12868 }
12869#line 12870 "parse.c"
12870 break;
12871
12872 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12873#line 3092 "parse.y"
12874 {
12875 (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]));
12876 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12877 }
12878#line 12879 "parse.c"
12879 break;
12880
12881 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12882#line 3097 "parse.y"
12883 {
12884 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12885 (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));
12886 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12887 }
12888#line 12889 "parse.c"
12889 break;
12890
12891 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12892#line 3103 "parse.y"
12893 {
12894 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12895 (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));
12896 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12897 }
12898#line 12899 "parse.c"
12899 break;
12900
12901 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12902#line 3109 "parse.y"
12903 {
12904 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12905 (yyval.node) = NEW_ERROR(&(yyloc));
12906 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12907 }
12908#line 12909 "parse.c"
12909 break;
12910
12911 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12912#line 2977 "parse.y"
12913 {
12914 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12915 restore_defun(p, (yyvsp[-3].node_def_temp));
12916 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12917 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12918 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12919 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12920 /*% ripper: def!($:head, $:args, $:$) %*/
12921 local_pop(p);
12922 }
12923#line 12924 "parse.c"
12924 break;
12925
12926 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12927#line 2988 "parse.y"
12928 {
12929 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12930 restore_defun(p, (yyvsp[-3].node_def_temp));
12931 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12932 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12933 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12934 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12935 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12936 local_pop(p);
12937 }
12938#line 12939 "parse.c"
12939 break;
12940
12941 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12942#line 3451 "parse.y"
12943 {
12944 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12945 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12946 /*% ripper: rescue_mod!($:1, $:4) %*/
12947 }
12948#line 12949 "parse.c"
12949 break;
12950
12951 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12952#line 3457 "parse.y"
12953 {
12954 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12955 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12956 }
12957#line 12958 "parse.c"
12958 break;
12959
12960 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12961#line 3465 "parse.y"
12962 {
12963 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12964 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12965 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12966 /*% ripper: rescue_mod!($:1, $:4) %*/
12967 }
12968#line 12969 "parse.c"
12969 break;
12970
12971 case 71: /* expr: expr "'and'" expr */
12972#line 3476 "parse.y"
12973 {
12974 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12975 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12976 }
12977#line 12978 "parse.c"
12978 break;
12979
12980 case 72: /* expr: expr "'or'" expr */
12981#line 3481 "parse.y"
12982 {
12983 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12984 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12985 }
12986#line 12987 "parse.c"
12987 break;
12988
12989 case 73: /* expr: "'not'" option_'\n' expr */
12990#line 3486 "parse.y"
12991 {
12992 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12993 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12994 }
12995#line 12996 "parse.c"
12996 break;
12997
12998 case 74: /* expr: '!' command_call */
12999#line 3491 "parse.y"
13000 {
13001 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13002 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
13003 }
13004#line 13005 "parse.c"
13005 break;
13006
13007 case 75: /* $@7: %empty */
13008#line 3496 "parse.y"
13009 {
13010 value_expr(p, (yyvsp[-1].node));
13011 }
13012#line 13013 "parse.c"
13013 break;
13014
13015 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
13016#line 3501 "parse.y"
13017 {
13018 pop_pktbl(p, (yyvsp[-1].tbl));
13019 pop_pvtbl(p, (yyvsp[-2].tbl));
13020 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
13021 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
13022 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
13023 (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);
13024 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
13025 }
13026#line 13027 "parse.c"
13027 break;
13028
13029 case 77: /* $@8: %empty */
13030#line 3511 "parse.y"
13031 {
13032 value_expr(p, (yyvsp[-1].node));
13033 }
13034#line 13035 "parse.c"
13035 break;
13036
13037 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
13038#line 3516 "parse.y"
13039 {
13040 pop_pktbl(p, (yyvsp[-1].tbl));
13041 pop_pvtbl(p, (yyvsp[-2].tbl));
13042 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
13043 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
13044 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
13045 (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);
13046 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
13047 }
13048#line 13049 "parse.c"
13049 break;
13050
13051 case 80: /* def_name: fname */
13052#line 3529 "parse.y"
13053 {
13054 numparam_name(p, (yyvsp[0].id));
13055 local_push(p, 0);
13056 p->ctxt.in_def = 1;
13057 p->ctxt.in_rescue = before_rescue;
13058 p->ctxt.cant_return = 0;
13059 (yyval.id) = (yyvsp[0].id);
13060 }
13061#line 13062 "parse.c"
13062 break;
13063
13064 case 81: /* defn_head: k_def def_name */
13065#line 3540 "parse.y"
13066 {
13067 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
13068 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
13069 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
13070 /*% ripper: $:def_name %*/
13071 }
13072#line 13073 "parse.c"
13073 break;
13074
13075 case 82: /* $@9: %empty */
13076#line 3549 "parse.y"
13077 {
13078 SET_LEX_STATE(EXPR_FNAME);
13079 }
13080#line 13081 "parse.c"
13081 break;
13082
13083 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
13084#line 3553 "parse.y"
13085 {
13086 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
13087 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
13088 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
13089 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
13090 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
13091 }
13092#line 13093 "parse.c"
13093 break;
13094
13095 case 84: /* value_expr_expr: expr */
13096#line 3172 "parse.y"
13097 {
13098 value_expr(p, (yyvsp[0].node));
13099 (yyval.node) = (yyvsp[0].node);
13100 }
13101#line 13102 "parse.c"
13102 break;
13103
13104 case 86: /* expr_value: error */
13105#line 3564 "parse.y"
13106 {
13107 (yyval.node) = NEW_ERROR(&(yyloc));
13108 }
13109#line 13110 "parse.c"
13110 break;
13111
13112 case 87: /* $@10: %empty */
13113#line 3569 "parse.y"
13114 {COND_PUSH(1);}
13115#line 13116 "parse.c"
13116 break;
13117
13118 case 88: /* $@11: %empty */
13119#line 3569 "parse.y"
13120 {COND_POP();}
13121#line 13122 "parse.c"
13122 break;
13123
13124 case 89: /* expr_value_do: $@10 expr_value do $@11 */
13125#line 3570 "parse.y"
13126 {
13127 (yyval.node) = (yyvsp[-2].node);
13128 /*% ripper: $:2 %*/
13129 }
13130#line 13131 "parse.c"
13131 break;
13132
13133 case 92: /* value_expr_command_call: command_call */
13134#line 3172 "parse.y"
13135 {
13136 value_expr(p, (yyvsp[0].node));
13137 (yyval.node) = (yyvsp[0].node);
13138 }
13139#line 13140 "parse.c"
13140 break;
13141
13142 case 95: /* block_command: block_call call_op2 operation2 command_args */
13143#line 3585 "parse.y"
13144 {
13145 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13146 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
13147 }
13148#line 13149 "parse.c"
13149 break;
13150
13151 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
13152#line 3592 "parse.y"
13153 {
13154 (yyval.node) = (yyvsp[-1].node);
13155 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
13156 /*% ripper: $:2 %*/
13157 }
13158#line 13159 "parse.c"
13159 break;
13160
13161 case 97: /* fcall: "local variable or method" */
13162#line 3600 "parse.y"
13163 {
13164 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13165 /*% ripper: $:1 %*/
13166 }
13167#line 13168 "parse.c"
13168 break;
13169
13170 case 98: /* fcall: "constant" */
13171#line 3600 "parse.y"
13172 {
13173 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13174 /*% ripper: $:1 %*/
13175 }
13176#line 13177 "parse.c"
13177 break;
13178
13179 case 99: /* fcall: "method" */
13180#line 3600 "parse.y"
13181 {
13182 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13183 /*% ripper: $:1 %*/
13184 }
13185#line 13186 "parse.c"
13186 break;
13187
13188 case 100: /* command: fcall command_args */
13189#line 3607 "parse.y"
13190 {
13191 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
13192 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
13193 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
13194 /*% ripper: command!($:1, $:2) %*/
13195 }
13196#line 13197 "parse.c"
13197 break;
13198
13199 case 101: /* command: fcall command_args cmd_brace_block */
13200#line 3614 "parse.y"
13201 {
13202 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
13203 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
13204 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
13205 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
13206 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
13207 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
13208 }
13209#line 13210 "parse.c"
13210 break;
13211
13212 case 102: /* command: primary_value call_op operation2 command_args */
13213#line 3623 "parse.y"
13214 {
13215 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13216 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13217 }
13218#line 13219 "parse.c"
13219 break;
13220
13221 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
13222#line 3628 "parse.y"
13223 {
13224 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13225 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13226 }
13227#line 13228 "parse.c"
13228 break;
13229
13230 case 104: /* command: primary_value "::" operation2 command_args */
13231#line 3633 "parse.y"
13232 {
13233 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13234 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13235 }
13236#line 13237 "parse.c"
13237 break;
13238
13239 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
13240#line 3638 "parse.y"
13241 {
13242 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13243 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13244 }
13245#line 13246 "parse.c"
13246 break;
13247
13248 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
13249#line 3643 "parse.y"
13250 {
13251 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
13252 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
13253 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
13254 }
13255#line 13256 "parse.c"
13256 break;
13257
13258 case 107: /* command: "'super'" command_args */
13259#line 3649 "parse.y"
13260 {
13261 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13262 fixpos((yyval.node), (yyvsp[0].node));
13263 /*% ripper: super!($:2) %*/
13264 }
13265#line 13266 "parse.c"
13266 break;
13267
13268 case 108: /* command: k_yield command_args */
13269#line 3655 "parse.y"
13270 {
13271 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13272 fixpos((yyval.node), (yyvsp[0].node));
13273 /*% ripper: yield!($:2) %*/
13274 }
13275#line 13276 "parse.c"
13276 break;
13277
13278 case 109: /* command: k_return_arg call_args */
13279#line 3661 "parse.y"
13280 {
13281 CMDARG_POP();
13282 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13283 /*% ripper: return!($:2) %*/
13284 }
13285#line 13286 "parse.c"
13286 break;
13287
13288 case 110: /* command: k_break_arg call_args */
13289#line 3667 "parse.y"
13290 {
13291 CMDARG_POP();
13292 NODE *args = 0;
13293 args = ret_args(p, (yyvsp[0].node));
13294 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13295 /*% ripper: break!($:2) %*/
13296 }
13297#line 13298 "parse.c"
13298 break;
13299
13300 case 111: /* command: k_next_arg call_args */
13301#line 3675 "parse.y"
13302 {
13303 CMDARG_POP();
13304 NODE *args = 0;
13305 args = ret_args(p, (yyvsp[0].node));
13306 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13307 /*% ripper: next!($:2) %*/
13308 }
13309#line 13310 "parse.c"
13310 break;
13311
13312 case 113: /* mlhs: "(" mlhs_inner rparen */
13313#line 3686 "parse.y"
13314 {
13315 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13316 /*% ripper: mlhs_paren!($:2) %*/
13317 }
13318#line 13319 "parse.c"
13319 break;
13320
13321 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13322#line 3694 "parse.y"
13323 {
13324 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13325 /*% ripper: mlhs_paren!($:2) %*/
13326 }
13327#line 13328 "parse.c"
13328 break;
13329
13330 case 116: /* mlhs_basic: mlhs_head */
13331#line 3701 "parse.y"
13332 {
13333 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13334 /*% ripper: $:1 %*/
13335 }
13336#line 13337 "parse.c"
13337 break;
13338
13339 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13340#line 3706 "parse.y"
13341 {
13342 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13343 /*% ripper: mlhs_add!($:1, $:2) %*/
13344 }
13345#line 13346 "parse.c"
13346 break;
13347
13348 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13349#line 3711 "parse.y"
13350 {
13351 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13352 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13353 }
13354#line 13355 "parse.c"
13355 break;
13356
13357 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13358#line 3059 "parse.y"
13359 {
13360 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13361 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13362 }
13363#line 13364 "parse.c"
13364 break;
13365
13366 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13367#line 3064 "parse.y"
13368 {
13369 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13370 /*% ripper: mlhs_add!($:1, $:3) %*/
13371 }
13372#line 13373 "parse.c"
13373 break;
13374
13375 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13376#line 3716 "parse.y"
13377 {
13378 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13379 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13380 }
13381#line 13382 "parse.c"
13382 break;
13383
13384 case 122: /* mlhs_basic: mlhs_head "*" */
13385#line 3721 "parse.y"
13386 {
13387 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13388 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13389 }
13390#line 13391 "parse.c"
13391 break;
13392
13393 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13394#line 3726 "parse.y"
13395 {
13396 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13397 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13398 }
13399#line 13400 "parse.c"
13400 break;
13401
13402 case 124: /* mlhs_basic: "*" mlhs_node */
13403#line 3731 "parse.y"
13404 {
13405 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13406 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13407 }
13408#line 13409 "parse.c"
13409 break;
13410
13411 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13412#line 3736 "parse.y"
13413 {
13414 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13415 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13416 }
13417#line 13418 "parse.c"
13418 break;
13419
13420 case 126: /* mlhs_basic: "*" */
13421#line 3741 "parse.y"
13422 {
13423 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13424 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13425 }
13426#line 13427 "parse.c"
13427 break;
13428
13429 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13430#line 3746 "parse.y"
13431 {
13432 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13433 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13434 }
13435#line 13436 "parse.c"
13436 break;
13437
13438 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13439#line 3754 "parse.y"
13440 {
13441 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13442 /*% ripper: mlhs_paren!($:2) %*/
13443 }
13444#line 13445 "parse.c"
13445 break;
13446
13447 case 130: /* mlhs_head: mlhs_item ',' */
13448#line 3761 "parse.y"
13449 {
13450 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13451 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13452 }
13453#line 13454 "parse.c"
13454 break;
13455
13456 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13457#line 3766 "parse.y"
13458 {
13459 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13460 /*% ripper: mlhs_add!($:1, $:2) %*/
13461 }
13462#line 13463 "parse.c"
13463 break;
13464
13465 case 132: /* mlhs_node: user_variable */
13466#line 3774 "parse.y"
13467 {
13468 /*% ripper: var_field!($:1) %*/
13469 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13470 }
13471#line 13472 "parse.c"
13472 break;
13473
13474 case 133: /* mlhs_node: keyword_variable */
13475#line 3774 "parse.y"
13476 {
13477 /*% ripper: var_field!($:1) %*/
13478 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13479 }
13480#line 13481 "parse.c"
13481 break;
13482
13483 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13484#line 3779 "parse.y"
13485 {
13486 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13487 /*% ripper: aref_field!($:1, $:3) %*/
13488 }
13489#line 13490 "parse.c"
13490 break;
13491
13492 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13493#line 3784 "parse.y"
13494 {
13495 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13496 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13497 /*% ripper: field!($:1, $:2, $:3) %*/
13498 }
13499#line 13500 "parse.c"
13500 break;
13501
13502 case 136: /* mlhs_node: primary_value call_op "constant" */
13503#line 3784 "parse.y"
13504 {
13505 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13506 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13507 /*% ripper: field!($:1, $:2, $:3) %*/
13508 }
13509#line 13510 "parse.c"
13510 break;
13511
13512 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13513#line 3790 "parse.y"
13514 {
13515 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13516 /*% ripper: const_path_field!($:1, $:3) %*/
13517 }
13518#line 13519 "parse.c"
13519 break;
13520
13521 case 138: /* mlhs_node: primary_value "::" "constant" */
13522#line 3795 "parse.y"
13523 {
13524 /*% ripper: const_path_field!($:1, $:3) %*/
13525 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13526 }
13527#line 13528 "parse.c"
13528 break;
13529
13530 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13531#line 3800 "parse.y"
13532 {
13533 /*% ripper: top_const_field!($:2) %*/
13534 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13535 }
13536#line 13537 "parse.c"
13537 break;
13538
13539 case 140: /* mlhs_node: backref */
13540#line 3805 "parse.y"
13541 {
13542 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13543 (yyval.node) = NEW_ERROR(&(yyloc));
13544 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13545 }
13546#line 13547 "parse.c"
13547 break;
13548
13549 case 141: /* lhs: user_variable */
13550#line 3813 "parse.y"
13551 {
13552 /*% ripper: var_field!($:1) %*/
13553 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13554 }
13555#line 13556 "parse.c"
13556 break;
13557
13558 case 142: /* lhs: keyword_variable */
13559#line 3813 "parse.y"
13560 {
13561 /*% ripper: var_field!($:1) %*/
13562 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13563 }
13564#line 13565 "parse.c"
13565 break;
13566
13567 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13568#line 3818 "parse.y"
13569 {
13570 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13571 /*% ripper: aref_field!($:1, $:3) %*/
13572 }
13573#line 13574 "parse.c"
13574 break;
13575
13576 case 144: /* lhs: primary_value call_op "local variable or method" */
13577#line 3823 "parse.y"
13578 {
13579 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13580 /*% ripper: field!($:1, $:2, $:3) %*/
13581 }
13582#line 13583 "parse.c"
13583 break;
13584
13585 case 145: /* lhs: primary_value call_op "constant" */
13586#line 3823 "parse.y"
13587 {
13588 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13589 /*% ripper: field!($:1, $:2, $:3) %*/
13590 }
13591#line 13592 "parse.c"
13592 break;
13593
13594 case 146: /* lhs: primary_value "::" "local variable or method" */
13595#line 3828 "parse.y"
13596 {
13597 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13598 /*% ripper: field!($:1, $:2, $:3) %*/
13599 }
13600#line 13601 "parse.c"
13601 break;
13602
13603 case 147: /* lhs: primary_value "::" "constant" */
13604#line 3833 "parse.y"
13605 {
13606 /*% ripper: const_path_field!($:1, $:3) %*/
13607 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13608 }
13609#line 13610 "parse.c"
13610 break;
13611
13612 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13613#line 3838 "parse.y"
13614 {
13615 /*% ripper: top_const_field!($:2) %*/
13616 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13617 }
13618#line 13619 "parse.c"
13619 break;
13620
13621 case 149: /* lhs: backref */
13622#line 3843 "parse.y"
13623 {
13624 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13625 (yyval.node) = NEW_ERROR(&(yyloc));
13626 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13627 }
13628#line 13629 "parse.c"
13629 break;
13630
13631 case 150: /* cname: "local variable or method" */
13632#line 3851 "parse.y"
13633 {
13634 static const char mesg[] = "class/module name must be CONSTANT";
13635 /*%%%*/
13636 yyerror1(&(yylsp[0]), mesg);
13637 /*% %*/
13638 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13639 }
13640#line 13641 "parse.c"
13641 break;
13642
13643 case 152: /* cpath: ":: at EXPR_BEG" cname */
13644#line 3862 "parse.y"
13645 {
13646 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13647 /*% ripper: top_const_ref!($:2) %*/
13648 }
13649#line 13650 "parse.c"
13650 break;
13651
13652 case 153: /* cpath: cname */
13653#line 3867 "parse.y"
13654 {
13655 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13656 /*% ripper: const_ref!($:1) %*/
13657 }
13658#line 13659 "parse.c"
13659 break;
13660
13661 case 154: /* cpath: primary_value "::" cname */
13662#line 3872 "parse.y"
13663 {
13664 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13665 /*% ripper: const_path_ref!($:1, $:3) %*/
13666 }
13667#line 13668 "parse.c"
13668 break;
13669
13670 case 158: /* fname: op */
13671#line 3880 "parse.y"
13672 {
13673 SET_LEX_STATE(EXPR_ENDFN);
13674 (yyval.id) = (yyvsp[0].id);
13675 }
13676#line 13677 "parse.c"
13677 break;
13678
13679 case 160: /* fitem: fname */
13680#line 3888 "parse.y"
13681 {
13682 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13683 /*% ripper: symbol_literal!($:1) %*/
13684 }
13685#line 13686 "parse.c"
13686 break;
13687
13688 case 162: /* undef_list: fitem */
13689#line 3896 "parse.y"
13690 {
13691 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13692 /*% ripper: rb_ary_new3(1, $:1) %*/
13693 }
13694#line 13695 "parse.c"
13695 break;
13696
13697 case 163: /* $@12: %empty */
13698#line 3900 "parse.y"
13699 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13700#line 13701 "parse.c"
13701 break;
13702
13703 case 164: /* undef_list: undef_list ',' $@12 fitem */
13704#line 3901 "parse.y"
13705 {
13706 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13707 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13708 /*% ripper: rb_ary_push($:1, $:4) %*/
13709 }
13710#line 13711 "parse.c"
13711 break;
13712
13713 case 165: /* op: '|' */
13714#line 3908 "parse.y"
13715 { (yyval.id) = '|'; }
13716#line 13717 "parse.c"
13717 break;
13718
13719 case 166: /* op: '^' */
13720#line 3909 "parse.y"
13721 { (yyval.id) = '^'; }
13722#line 13723 "parse.c"
13723 break;
13724
13725 case 167: /* op: '&' */
13726#line 3910 "parse.y"
13727 { (yyval.id) = '&'; }
13728#line 13729 "parse.c"
13729 break;
13730
13731 case 168: /* op: "<=>" */
13732#line 3911 "parse.y"
13733 { (yyval.id) = tCMP; }
13734#line 13735 "parse.c"
13735 break;
13736
13737 case 169: /* op: "==" */
13738#line 3912 "parse.y"
13739 { (yyval.id) = tEQ; }
13740#line 13741 "parse.c"
13741 break;
13742
13743 case 170: /* op: "===" */
13744#line 3913 "parse.y"
13745 { (yyval.id) = tEQQ; }
13746#line 13747 "parse.c"
13747 break;
13748
13749 case 171: /* op: "=~" */
13750#line 3914 "parse.y"
13751 { (yyval.id) = tMATCH; }
13752#line 13753 "parse.c"
13753 break;
13754
13755 case 172: /* op: "!~" */
13756#line 3915 "parse.y"
13757 { (yyval.id) = tNMATCH; }
13758#line 13759 "parse.c"
13759 break;
13760
13761 case 173: /* op: '>' */
13762#line 3916 "parse.y"
13763 { (yyval.id) = '>'; }
13764#line 13765 "parse.c"
13765 break;
13766
13767 case 174: /* op: ">=" */
13768#line 3917 "parse.y"
13769 { (yyval.id) = tGEQ; }
13770#line 13771 "parse.c"
13771 break;
13772
13773 case 175: /* op: '<' */
13774#line 3918 "parse.y"
13775 { (yyval.id) = '<'; }
13776#line 13777 "parse.c"
13777 break;
13778
13779 case 176: /* op: "<=" */
13780#line 3919 "parse.y"
13781 { (yyval.id) = tLEQ; }
13782#line 13783 "parse.c"
13783 break;
13784
13785 case 177: /* op: "!=" */
13786#line 3920 "parse.y"
13787 { (yyval.id) = tNEQ; }
13788#line 13789 "parse.c"
13789 break;
13790
13791 case 178: /* op: "<<" */
13792#line 3921 "parse.y"
13793 { (yyval.id) = tLSHFT; }
13794#line 13795 "parse.c"
13795 break;
13796
13797 case 179: /* op: ">>" */
13798#line 3922 "parse.y"
13799 { (yyval.id) = tRSHFT; }
13800#line 13801 "parse.c"
13801 break;
13802
13803 case 180: /* op: '+' */
13804#line 3923 "parse.y"
13805 { (yyval.id) = '+'; }
13806#line 13807 "parse.c"
13807 break;
13808
13809 case 181: /* op: '-' */
13810#line 3924 "parse.y"
13811 { (yyval.id) = '-'; }
13812#line 13813 "parse.c"
13813 break;
13814
13815 case 182: /* op: '*' */
13816#line 3925 "parse.y"
13817 { (yyval.id) = '*'; }
13818#line 13819 "parse.c"
13819 break;
13820
13821 case 183: /* op: "*" */
13822#line 3926 "parse.y"
13823 { (yyval.id) = '*'; }
13824#line 13825 "parse.c"
13825 break;
13826
13827 case 184: /* op: '/' */
13828#line 3927 "parse.y"
13829 { (yyval.id) = '/'; }
13830#line 13831 "parse.c"
13831 break;
13832
13833 case 185: /* op: '%' */
13834#line 3928 "parse.y"
13835 { (yyval.id) = '%'; }
13836#line 13837 "parse.c"
13837 break;
13838
13839 case 186: /* op: "**" */
13840#line 3929 "parse.y"
13841 { (yyval.id) = tPOW; }
13842#line 13843 "parse.c"
13843 break;
13844
13845 case 187: /* op: "**arg" */
13846#line 3930 "parse.y"
13847 { (yyval.id) = tDSTAR; }
13848#line 13849 "parse.c"
13849 break;
13850
13851 case 188: /* op: '!' */
13852#line 3931 "parse.y"
13853 { (yyval.id) = '!'; }
13854#line 13855 "parse.c"
13855 break;
13856
13857 case 189: /* op: '~' */
13858#line 3932 "parse.y"
13859 { (yyval.id) = '~'; }
13860#line 13861 "parse.c"
13861 break;
13862
13863 case 190: /* op: "unary+" */
13864#line 3933 "parse.y"
13865 { (yyval.id) = tUPLUS; }
13866#line 13867 "parse.c"
13867 break;
13868
13869 case 191: /* op: "unary-" */
13870#line 3934 "parse.y"
13871 { (yyval.id) = tUMINUS; }
13872#line 13873 "parse.c"
13873 break;
13874
13875 case 192: /* op: "[]" */
13876#line 3935 "parse.y"
13877 { (yyval.id) = tAREF; }
13878#line 13879 "parse.c"
13879 break;
13880
13881 case 193: /* op: "[]=" */
13882#line 3936 "parse.y"
13883 { (yyval.id) = tASET; }
13884#line 13885 "parse.c"
13885 break;
13886
13887 case 194: /* op: '`' */
13888#line 3937 "parse.y"
13889 { (yyval.id) = '`'; }
13890#line 13891 "parse.c"
13891 break;
13892
13893 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13894#line 2937 "parse.y"
13895 {
13896 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13897 /*% ripper: assign!($:1, $:4) %*/
13898 }
13899#line 13900 "parse.c"
13900 break;
13901
13902 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13903#line 3072 "parse.y"
13904 {
13905 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13906 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13907 }
13908#line 13909 "parse.c"
13909 break;
13910
13911 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13912#line 3077 "parse.y"
13913 {
13914 (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]));
13915 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13916 }
13917#line 13918 "parse.c"
13918 break;
13919
13920 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13921#line 3082 "parse.y"
13922 {
13923 (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]));
13924 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13925 }
13926#line 13927 "parse.c"
13927 break;
13928
13929 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13930#line 3087 "parse.y"
13931 {
13932 (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]));
13933 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13934 }
13935#line 13936 "parse.c"
13936 break;
13937
13938 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13939#line 3092 "parse.y"
13940 {
13941 (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]));
13942 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13943 }
13944#line 13945 "parse.c"
13945 break;
13946
13947 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13948#line 3097 "parse.y"
13949 {
13950 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13951 (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));
13952 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13953 }
13954#line 13955 "parse.c"
13955 break;
13956
13957 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13958#line 3103 "parse.y"
13959 {
13960 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13961 (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));
13962 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13963 }
13964#line 13965 "parse.c"
13965 break;
13966
13967 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13968#line 3109 "parse.y"
13969 {
13970 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13971 (yyval.node) = NEW_ERROR(&(yyloc));
13972 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13973 }
13974#line 13975 "parse.c"
13975 break;
13976
13977 case 247: /* range_expr_arg: arg ".." arg */
13978#line 3131 "parse.y"
13979 {
13980 value_expr(p, (yyvsp[-2].node));
13981 value_expr(p, (yyvsp[0].node));
13982 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13983 /*% ripper: dot2!($:1, $:3) %*/
13984 }
13985#line 13986 "parse.c"
13986 break;
13987
13988 case 248: /* range_expr_arg: arg "..." arg */
13989#line 3138 "parse.y"
13990 {
13991 value_expr(p, (yyvsp[-2].node));
13992 value_expr(p, (yyvsp[0].node));
13993 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13994 /*% ripper: dot3!($:1, $:3) %*/
13995 }
13996#line 13997 "parse.c"
13997 break;
13998
13999 case 249: /* range_expr_arg: arg ".." */
14000#line 3145 "parse.y"
14001 {
14002 value_expr(p, (yyvsp[-1].node));
14003 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
14004 /*% ripper: dot2!($:1, Qnil) %*/
14005 }
14006#line 14007 "parse.c"
14007 break;
14008
14009 case 250: /* range_expr_arg: arg "..." */
14010#line 3151 "parse.y"
14011 {
14012 value_expr(p, (yyvsp[-1].node));
14013 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
14014 /*% ripper: dot3!($:1, Qnil) %*/
14015 }
14016#line 14017 "parse.c"
14017 break;
14018
14019 case 251: /* range_expr_arg: "(.." arg */
14020#line 3157 "parse.y"
14021 {
14022 value_expr(p, (yyvsp[0].node));
14023 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14024 /*% ripper: dot2!(Qnil, $:2) %*/
14025 }
14026#line 14027 "parse.c"
14027 break;
14028
14029 case 252: /* range_expr_arg: "(..." arg */
14030#line 3163 "parse.y"
14031 {
14032 value_expr(p, (yyvsp[0].node));
14033 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14034 /*% ripper: dot3!(Qnil, $:2) %*/
14035 }
14036#line 14037 "parse.c"
14037 break;
14038
14039 case 254: /* arg: arg '+' arg */
14040#line 3958 "parse.y"
14041 {
14042 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14043 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
14044 }
14045#line 14046 "parse.c"
14046 break;
14047
14048 case 255: /* arg: arg '-' arg */
14049#line 3963 "parse.y"
14050 {
14051 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14052 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
14053 }
14054#line 14055 "parse.c"
14055 break;
14056
14057 case 256: /* arg: arg '*' arg */
14058#line 3968 "parse.y"
14059 {
14060 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14061 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
14062 }
14063#line 14064 "parse.c"
14064 break;
14065
14066 case 257: /* arg: arg '/' arg */
14067#line 3973 "parse.y"
14068 {
14069 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14070 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
14071 }
14072#line 14073 "parse.c"
14073 break;
14074
14075 case 258: /* arg: arg '%' arg */
14076#line 3978 "parse.y"
14077 {
14078 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14079 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
14080 }
14081#line 14082 "parse.c"
14082 break;
14083
14084 case 259: /* arg: arg "**" arg */
14085#line 3983 "parse.y"
14086 {
14087 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14088 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
14089 }
14090#line 14091 "parse.c"
14091 break;
14092
14093 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
14094#line 3988 "parse.y"
14095 {
14096 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
14097 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
14098 }
14099#line 14100 "parse.c"
14100 break;
14101
14102 case 261: /* arg: "unary+" arg */
14103#line 3993 "parse.y"
14104 {
14105 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
14106 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
14107 }
14108#line 14109 "parse.c"
14109 break;
14110
14111 case 262: /* arg: "unary-" arg */
14112#line 3998 "parse.y"
14113 {
14114 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
14115 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
14116 }
14117#line 14118 "parse.c"
14118 break;
14119
14120 case 263: /* arg: arg '|' arg */
14121#line 4003 "parse.y"
14122 {
14123 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14124 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
14125 }
14126#line 14127 "parse.c"
14127 break;
14128
14129 case 264: /* arg: arg '^' arg */
14130#line 4008 "parse.y"
14131 {
14132 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14133 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
14134 }
14135#line 14136 "parse.c"
14136 break;
14137
14138 case 265: /* arg: arg '&' arg */
14139#line 4013 "parse.y"
14140 {
14141 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14142 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
14143 }
14144#line 14145 "parse.c"
14145 break;
14146
14147 case 266: /* arg: arg "<=>" arg */
14148#line 4018 "parse.y"
14149 {
14150 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14151 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
14152 }
14153#line 14154 "parse.c"
14154 break;
14155
14156 case 268: /* arg: arg "==" arg */
14157#line 4024 "parse.y"
14158 {
14159 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14160 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
14161 }
14162#line 14163 "parse.c"
14163 break;
14164
14165 case 269: /* arg: arg "===" arg */
14166#line 4029 "parse.y"
14167 {
14168 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14169 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
14170 }
14171#line 14172 "parse.c"
14172 break;
14173
14174 case 270: /* arg: arg "!=" arg */
14175#line 4034 "parse.y"
14176 {
14177 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14178 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
14179 }
14180#line 14181 "parse.c"
14181 break;
14182
14183 case 271: /* arg: arg "=~" arg */
14184#line 4039 "parse.y"
14185 {
14186 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14187 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
14188 }
14189#line 14190 "parse.c"
14190 break;
14191
14192 case 272: /* arg: arg "!~" arg */
14193#line 4044 "parse.y"
14194 {
14195 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14196 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
14197 }
14198#line 14199 "parse.c"
14199 break;
14200
14201 case 273: /* arg: '!' arg */
14202#line 4049 "parse.y"
14203 {
14204 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
14205 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
14206 }
14207#line 14208 "parse.c"
14208 break;
14209
14210 case 274: /* arg: '~' arg */
14211#line 4054 "parse.y"
14212 {
14213 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
14214 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
14215 }
14216#line 14217 "parse.c"
14217 break;
14218
14219 case 275: /* arg: arg "<<" arg */
14220#line 4059 "parse.y"
14221 {
14222 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14223 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
14224 }
14225#line 14226 "parse.c"
14226 break;
14227
14228 case 276: /* arg: arg ">>" arg */
14229#line 4064 "parse.y"
14230 {
14231 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14232 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
14233 }
14234#line 14235 "parse.c"
14235 break;
14236
14237 case 277: /* arg: arg "&&" arg */
14238#line 4069 "parse.y"
14239 {
14240 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14241 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
14242 }
14243#line 14244 "parse.c"
14244 break;
14245
14246 case 278: /* arg: arg "||" arg */
14247#line 4074 "parse.y"
14248 {
14249 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14250 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
14251 }
14252#line 14253 "parse.c"
14253 break;
14254
14255 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
14256#line 4079 "parse.y"
14257 {
14258 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
14259 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
14260 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
14261 /*% ripper: defined!($:4) %*/
14262 }
14263#line 14264 "parse.c"
14264 break;
14265
14266 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14267#line 2977 "parse.y"
14268 {
14269 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14270 restore_defun(p, (yyvsp[-3].node_def_temp));
14271 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14272 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14273 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14274 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14275 /*% ripper: def!($:head, $:args, $:$) %*/
14276 local_pop(p);
14277 }
14278#line 14279 "parse.c"
14279 break;
14280
14281 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14282#line 2988 "parse.y"
14283 {
14284 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14285 restore_defun(p, (yyvsp[-3].node_def_temp));
14286 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14287 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14288 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14289 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14290 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14291 local_pop(p);
14292 }
14293#line 14294 "parse.c"
14294 break;
14295
14296 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14297#line 4091 "parse.y"
14298 {
14299 value_expr(p, (yyvsp[-5].node));
14300 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14301 fixpos((yyval.node), (yyvsp[-5].node));
14302 /*% ripper: ifop!($:1, $:3, $:6) %*/
14303 }
14304#line 14305 "parse.c"
14305 break;
14306
14307 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14308#line 4101 "parse.y"
14309 {
14310 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14311 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14312 /*% ripper: rescue_mod!($:1, $:4) %*/
14313 }
14314#line 14315 "parse.c"
14315 break;
14316
14317 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14318#line 4107 "parse.y"
14319 {
14320 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14321 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14322 }
14323#line 14324 "parse.c"
14324 break;
14325
14326 case 289: /* relop: '>' */
14327#line 4113 "parse.y"
14328 {(yyval.id) = '>';}
14329#line 14330 "parse.c"
14330 break;
14331
14332 case 290: /* relop: '<' */
14333#line 4114 "parse.y"
14334 {(yyval.id) = '<';}
14335#line 14336 "parse.c"
14336 break;
14337
14338 case 291: /* relop: ">=" */
14339#line 4115 "parse.y"
14340 {(yyval.id) = idGE;}
14341#line 14342 "parse.c"
14342 break;
14343
14344 case 292: /* relop: "<=" */
14345#line 4116 "parse.y"
14346 {(yyval.id) = idLE;}
14347#line 14348 "parse.c"
14348 break;
14349
14350 case 293: /* rel_expr: arg relop arg */
14351#line 4120 "parse.y"
14352 {
14353 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14354 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14355 }
14356#line 14357 "parse.c"
14357 break;
14358
14359 case 294: /* rel_expr: rel_expr relop arg */
14360#line 4125 "parse.y"
14361 {
14362 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14363 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14364 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14365 }
14366#line 14367 "parse.c"
14367 break;
14368
14369 case 295: /* lex_ctxt: none */
14370#line 4133 "parse.y"
14371 {
14372 (yyval.ctxt) = p->ctxt;
14373 }
14374#line 14375 "parse.c"
14375 break;
14376
14377 case 296: /* begin_defined: lex_ctxt */
14378#line 4139 "parse.y"
14379 {
14380 p->ctxt.in_defined = 1;
14381 (yyval.ctxt) = (yyvsp[0].ctxt);
14382 }
14383#line 14384 "parse.c"
14384 break;
14385
14386 case 297: /* after_rescue: lex_ctxt */
14387#line 4146 "parse.y"
14388 {
14389 p->ctxt.in_rescue = after_rescue;
14390 (yyval.ctxt) = (yyvsp[0].ctxt);
14391 }
14392#line 14393 "parse.c"
14393 break;
14394
14395 case 298: /* value_expr_arg: arg */
14396#line 3172 "parse.y"
14397 {
14398 value_expr(p, (yyvsp[0].node));
14399 (yyval.node) = (yyvsp[0].node);
14400 }
14401#line 14402 "parse.c"
14402 break;
14403
14404 case 302: /* aref_args: args ',' assocs trailer */
14405#line 4158 "parse.y"
14406 {
14407 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14408 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14409 }
14410#line 14411 "parse.c"
14411 break;
14412
14413 case 303: /* aref_args: assocs trailer */
14414#line 4163 "parse.y"
14415 {
14416 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14417 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14418 }
14419#line 14420 "parse.c"
14420 break;
14421
14422 case 304: /* arg_rhs: arg */
14423#line 4170 "parse.y"
14424 {
14425 value_expr(p, (yyvsp[0].node));
14426 (yyval.node) = (yyvsp[0].node);
14427 }
14428#line 14429 "parse.c"
14429 break;
14430
14431 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14432#line 4175 "parse.y"
14433 {
14434 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14435 value_expr(p, (yyvsp[-3].node));
14436 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14437 /*% ripper: rescue_mod!($:1, $:4) %*/
14438 }
14439#line 14440 "parse.c"
14440 break;
14441
14442 case 306: /* paren_args: '(' opt_call_args rparen */
14443#line 4184 "parse.y"
14444 {
14445 (yyval.node) = (yyvsp[-1].node);
14446 /*% ripper: arg_paren!($:2) %*/
14447 }
14448#line 14449 "parse.c"
14449 break;
14450
14451 case 307: /* paren_args: '(' args ',' args_forward rparen */
14452#line 4189 "parse.y"
14453 {
14454 if (!check_forwarding_args(p)) {
14455 (yyval.node) = 0;
14456 }
14457 else {
14458 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14459 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14460 }
14461 }
14462#line 14463 "parse.c"
14463 break;
14464
14465 case 308: /* paren_args: '(' args_forward rparen */
14466#line 4199 "parse.y"
14467 {
14468 if (!check_forwarding_args(p)) {
14469 (yyval.node) = 0;
14470 }
14471 else {
14472 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14473 /*% ripper: arg_paren!($:2) %*/
14474 }
14475 }
14476#line 14477 "parse.c"
14477 break;
14478
14479 case 310: /* opt_paren_args: paren_args */
14480#line 4212 "parse.y"
14481 {
14482 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14483 }
14484#line 14485 "parse.c"
14485 break;
14486
14487 case 314: /* opt_call_args: args ',' assocs ',' */
14488#line 4221 "parse.y"
14489 {
14490 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14491 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14492 }
14493#line 14494 "parse.c"
14494 break;
14495
14496 case 315: /* opt_call_args: assocs ',' */
14497#line 4226 "parse.y"
14498 {
14499 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14500 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14501 }
14502#line 14503 "parse.c"
14503 break;
14504
14505 case 316: /* value_expr_command: command */
14506#line 3172 "parse.y"
14507 {
14508 value_expr(p, (yyvsp[0].node));
14509 (yyval.node) = (yyvsp[0].node);
14510 }
14511#line 14512 "parse.c"
14512 break;
14513
14514 case 317: /* call_args: value_expr_command */
14515#line 4233 "parse.y"
14516 {
14517 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14518 /*% ripper: args_add!(args_new!, $:1) %*/
14519 }
14520#line 14521 "parse.c"
14521 break;
14522
14523 case 318: /* call_args: def_endless_method_endless_command */
14524#line 4238 "parse.y"
14525 {
14526 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14527 /*% ripper: args_add!(args_new!, $:1) %*/
14528 }
14529#line 14530 "parse.c"
14530 break;
14531
14532 case 319: /* call_args: args opt_block_arg */
14533#line 4243 "parse.y"
14534 {
14535 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14536 /*% ripper: args_add_block!($:1, $:2) %*/
14537 }
14538#line 14539 "parse.c"
14539 break;
14540
14541 case 320: /* call_args: assocs opt_block_arg */
14542#line 4248 "parse.y"
14543 {
14544 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14545 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14546 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14547 }
14548#line 14549 "parse.c"
14549 break;
14550
14551 case 321: /* call_args: args ',' assocs opt_block_arg */
14552#line 4254 "parse.y"
14553 {
14554 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14555 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14556 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14557 }
14558#line 14559 "parse.c"
14559 break;
14560
14561 case 323: /* $@13: %empty */
14562#line 4263 "parse.y"
14563 {
14564 /* If call_args starts with a open paren '(' or '[',
14565 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14566 * but the push must be done after CMDARG_PUSH(1).
14567 * So this code makes them consistent by first cancelling
14568 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14569 * and finally redoing CMDARG_PUSH(0).
14570 */
14571 int lookahead = 0;
14572 switch (yychar) {
14573 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14574 lookahead = 1;
14575 }
14576 if (lookahead) CMDARG_POP();
14577 CMDARG_PUSH(1);
14578 if (lookahead) CMDARG_PUSH(0);
14579 }
14580#line 14581 "parse.c"
14581 break;
14582
14583 case 324: /* command_args: $@13 call_args */
14584#line 4281 "parse.y"
14585 {
14586 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14587 * but the push must be done after CMDARG_POP() in the parser.
14588 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14589 * CMDARG_POP() to pop 1 pushed by command_args,
14590 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14591 */
14592 int lookahead = 0;
14593 switch (yychar) {
14594 case tLBRACE_ARG:
14595 lookahead = 1;
14596 }
14597 if (lookahead) CMDARG_POP();
14598 CMDARG_POP();
14599 if (lookahead) CMDARG_PUSH(0);
14600 (yyval.node) = (yyvsp[0].node);
14601 /*% ripper: $:2 %*/
14602 }
14603#line 14604 "parse.c"
14604 break;
14605
14606 case 325: /* block_arg: "&" arg_value */
14607#line 4302 "parse.y"
14608 {
14609 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14610 /*% ripper: $:2 %*/
14611 }
14612#line 14613 "parse.c"
14613 break;
14614
14615 case 326: /* block_arg: "&" */
14616#line 4307 "parse.y"
14617 {
14618 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14619 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14620 /*% ripper: Qnil %*/
14621 }
14622#line 14623 "parse.c"
14623 break;
14624
14625 case 327: /* opt_block_arg: ',' block_arg */
14626#line 4315 "parse.y"
14627 {
14628 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14629 /*% ripper: $:2 %*/
14630 }
14631#line 14632 "parse.c"
14632 break;
14633
14634 case 328: /* opt_block_arg: none */
14635#line 4320 "parse.y"
14636 {
14637 (yyval.node_block_pass) = 0;
14638 /*% ripper: Qfalse %*/
14639 }
14640#line 14641 "parse.c"
14641 break;
14642
14643 case 329: /* args: arg_value */
14644#line 4328 "parse.y"
14645 {
14646 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14647 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14648 }
14649#line 14650 "parse.c"
14650 break;
14651
14652 case 330: /* args: arg_splat */
14653#line 4333 "parse.y"
14654 {
14655 (yyval.node) = (yyvsp[0].node);
14656 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14657 }
14658#line 14659 "parse.c"
14659 break;
14660
14661 case 331: /* args: args ',' arg_value */
14662#line 4338 "parse.y"
14663 {
14664 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14665 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14666 }
14667#line 14668 "parse.c"
14668 break;
14669
14670 case 332: /* args: args ',' arg_splat */
14671#line 4343 "parse.y"
14672 {
14673 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14674 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14675 }
14676#line 14677 "parse.c"
14677 break;
14678
14679 case 333: /* arg_splat: "*" arg_value */
14680#line 4351 "parse.y"
14681 {
14682 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14683 /*% ripper: $:arg_value %*/
14684 }
14685#line 14686 "parse.c"
14686 break;
14687
14688 case 334: /* arg_splat: "*" */
14689#line 4356 "parse.y"
14690 {
14691 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14692 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14693 /*% ripper: Qnil %*/
14694 }
14695#line 14696 "parse.c"
14696 break;
14697
14698 case 337: /* mrhs: args ',' arg_value */
14699#line 4370 "parse.y"
14700 {
14701 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14702 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14703 }
14704#line 14705 "parse.c"
14705 break;
14706
14707 case 338: /* mrhs: args ',' "*" arg_value */
14708#line 4375 "parse.y"
14709 {
14710 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14711 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14712 }
14713#line 14714 "parse.c"
14714 break;
14715
14716 case 339: /* mrhs: "*" arg_value */
14717#line 4380 "parse.y"
14718 {
14719 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14720 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14721 }
14722#line 14723 "parse.c"
14723 break;
14724
14725 case 350: /* primary: "method" */
14726#line 4401 "parse.y"
14727 {
14728 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14729 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14730 }
14731#line 14732 "parse.c"
14732 break;
14733
14734 case 351: /* $@14: %empty */
14735#line 4406 "parse.y"
14736 {
14737 CMDARG_PUSH(0);
14738 }
14739#line 14740 "parse.c"
14740 break;
14741
14742 case 352: /* primary: k_begin $@14 bodystmt k_end */
14743#line 4411 "parse.y"
14744 {
14745 CMDARG_POP();
14746 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14747 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14748 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14749 /*% ripper: begin!($:body) %*/
14750 }
14751#line 14752 "parse.c"
14752 break;
14753
14754 case 353: /* $@15: %empty */
14755#line 4418 "parse.y"
14756 {SET_LEX_STATE(EXPR_ENDARG);}
14757#line 14758 "parse.c"
14758 break;
14759
14760 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14761#line 4419 "parse.y"
14762 {
14763 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14764 (yyval.node) = (yyvsp[-2].node);
14765 /*% ripper: paren!($:body) %*/
14766 }
14767#line 14768 "parse.c"
14768 break;
14769
14770 case 355: /* primary: "(" compstmt_stmts ')' */
14771#line 4425 "parse.y"
14772 {
14773 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14774 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14775 /*% ripper: paren!($:body) %*/
14776 }
14777#line 14778 "parse.c"
14778 break;
14779
14780 case 356: /* primary: primary_value "::" "constant" */
14781#line 4431 "parse.y"
14782 {
14783 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14784 /*% ripper: const_path_ref!($:recv, $:name) %*/
14785 }
14786#line 14787 "parse.c"
14787 break;
14788
14789 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14790#line 4436 "parse.y"
14791 {
14792 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14793 /*% ripper: top_const_ref!($:name) %*/
14794 }
14795#line 14796 "parse.c"
14796 break;
14797
14798 case 358: /* primary: "[" aref_args ']' */
14799#line 4441 "parse.y"
14800 {
14801 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14802 /*% ripper: array!($:args) %*/
14803 }
14804#line 14805 "parse.c"
14805 break;
14806
14807 case 359: /* primary: "{" assoc_list '}' */
14808#line 4446 "parse.y"
14809 {
14810 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14811 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14812 /*% ripper: hash!($:list) %*/
14813 }
14814#line 14815 "parse.c"
14815 break;
14816
14817 case 360: /* primary: k_return */
14818#line 4452 "parse.y"
14819 {
14820 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14821 /*% ripper: return0! %*/
14822 }
14823#line 14824 "parse.c"
14824 break;
14825
14826 case 361: /* primary: k_yield '(' call_args rparen */
14827#line 4457 "parse.y"
14828 {
14829 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14830 /*% ripper: yield!(paren!($:args)) %*/
14831 }
14832#line 14833 "parse.c"
14833 break;
14834
14835 case 362: /* primary: k_yield '(' rparen */
14836#line 4462 "parse.y"
14837 {
14838 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14839 /*% ripper: yield!(paren!(args_new!)) %*/
14840 }
14841#line 14842 "parse.c"
14842 break;
14843
14844 case 363: /* primary: k_yield */
14845#line 4467 "parse.y"
14846 {
14847 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14848 /*% ripper: yield0! %*/
14849 }
14850#line 14851 "parse.c"
14851 break;
14852
14853 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14854#line 4472 "parse.y"
14855 {
14856 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14857 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14858 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14859 /*% ripper: defined!($:arg) %*/
14860 }
14861#line 14862 "parse.c"
14862 break;
14863
14864 case 365: /* primary: "'not'" '(' expr rparen */
14865#line 4479 "parse.y"
14866 {
14867 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14868 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14869 }
14870#line 14871 "parse.c"
14871 break;
14872
14873 case 366: /* primary: "'not'" '(' rparen */
14874#line 4484 "parse.y"
14875 {
14876 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14877 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14878 }
14879#line 14880 "parse.c"
14880 break;
14881
14882 case 367: /* primary: fcall brace_block */
14883#line 4489 "parse.y"
14884 {
14885 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14886 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14887 }
14888#line 14889 "parse.c"
14889 break;
14890
14891 case 369: /* primary: method_call brace_block */
14892#line 4495 "parse.y"
14893 {
14894 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14895 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14896 /*% ripper: method_add_block!($:call, $:block) %*/
14897 }
14898#line 14899 "parse.c"
14899 break;
14900
14901 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14902#line 4505 "parse.y"
14903 {
14904 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14905 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14906
14907 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14908 fixpos((yyval.node), (yyvsp[-4].node));
14909 /*% ripper: if!($:cond, $:body, $:tail) %*/
14910 }
14911#line 14912 "parse.c"
14912 break;
14913
14914 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14915#line 4517 "parse.y"
14916 {
14917 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14918 fixpos((yyval.node), (yyvsp[-4].node));
14919 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14920 }
14921#line 14922 "parse.c"
14922 break;
14923
14924 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14925#line 4525 "parse.y"
14926 {
14927 restore_block_exit(p, (yyvsp[-3].node_exits));
14928 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14929 fixpos((yyval.node), (yyvsp[-2].node));
14930 /*% ripper: while!($:cond, $:body) %*/
14931 }
14932#line 14933 "parse.c"
14933 break;
14934
14935 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14936#line 4534 "parse.y"
14937 {
14938 restore_block_exit(p, (yyvsp[-3].node_exits));
14939 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14940 fixpos((yyval.node), (yyvsp[-2].node));
14941 /*% ripper: until!($:cond, $:body) %*/
14942 }
14943#line 14944 "parse.c"
14944 break;
14945
14946 case 375: /* @16: %empty */
14947#line 4541 "parse.y"
14948 {
14949 (yyval.labels) = p->case_labels;
14950 p->case_labels = CHECK_LITERAL_WHEN;
14951 }
14952#line 14953 "parse.c"
14953 break;
14954
14955 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14956#line 4547 "parse.y"
14957 {
14958 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14959 p->case_labels = (yyvsp[-2].labels);
14960 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14961 fixpos((yyval.node), (yyvsp[-4].node));
14962 /*% ripper: case!($:expr, $:body) %*/
14963 }
14964#line 14965 "parse.c"
14965 break;
14966
14967 case 377: /* @17: %empty */
14968#line 4555 "parse.y"
14969 {
14970 (yyval.labels) = p->case_labels;
14971 p->case_labels = 0;
14972 }
14973#line 14974 "parse.c"
14974 break;
14975
14976 case 378: /* primary: k_case option_terms @17 case_body k_end */
14977#line 4561 "parse.y"
14978 {
14979 if (p->case_labels) st_free_table(p->case_labels);
14980 p->case_labels = (yyvsp[-2].labels);
14981 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14982 /*% ripper: case!(Qnil, $:body) %*/
14983 }
14984#line 14985 "parse.c"
14985 break;
14986
14987 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14988#line 4570 "parse.y"
14989 {
14990 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14991 /*% ripper: case!($:expr, $:body) %*/
14992 }
14993#line 14994 "parse.c"
14994 break;
14995
14996 case 380: /* $@18: %empty */
14997#line 4575 "parse.y"
14998 {COND_PUSH(1);}
14999#line 15000 "parse.c"
15000 break;
15001
15002 case 381: /* $@19: %empty */
15003#line 4575 "parse.y"
15004 {COND_POP();}
15005#line 15006 "parse.c"
15006 break;
15007
15008 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
15009#line 4578 "parse.y"
15010 {
15011 restore_block_exit(p, (yyvsp[-8].node_exits));
15012 /*
15013 * for a, b, c in e
15014 * #=>
15015 * e.each{|*x| a, b, c = x}
15016 *
15017 * for a in e
15018 * #=>
15019 * e.each{|x| a, = x}
15020 */
15021 ID id = internal_id(p);
15022 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
15023 rb_node_args_t *args;
15024 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
15025 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
15026 tbl->ids[0] = id; /* internal id */
15027
15028 switch (nd_type((yyvsp[-7].node))) {
15029 case NODE_LASGN:
15030 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
15031 set_nd_value(p, (yyvsp[-7].node), internal_var);
15032 id = 0;
15033 m->nd_plen = 1;
15034 m->nd_next = (yyvsp[-7].node);
15035 break;
15036 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
15037 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
15038 break;
15039 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
15040 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]));
15041 }
15042 /* {|*internal_id| <m> = internal_id; ... } */
15043 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
15044 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
15045 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
15046 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
15047 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
15048 fixpos((yyval.node), (yyvsp[-7].node));
15049 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
15050 }
15051#line 15052 "parse.c"
15052 break;
15053
15054 case 383: /* $@20: %empty */
15055#line 4620 "parse.y"
15056 {
15057 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
15058 }
15059#line 15060 "parse.c"
15060 break;
15061
15062 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
15063#line 4625 "parse.y"
15064 {
15065 YYLTYPE inheritance_operator_loc = NULL_LOC;
15066 if ((yyvsp[-3].node)) {
15067 inheritance_operator_loc = (yylsp[-3]);
15068 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
15069 }
15070 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
15071 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15072 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
15073 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
15074 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
15075 local_pop(p);
15076 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
15077 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
15078 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
15079 }
15080#line 15081 "parse.c"
15081 break;
15082
15083 case 385: /* $@21: %empty */
15084#line 4642 "parse.y"
15085 {
15086 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
15087 }
15088#line 15089 "parse.c"
15089 break;
15090
15091 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
15092#line 4648 "parse.y"
15093 {
15094 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
15095 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15096 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
15097 fixpos((yyval.node), (yyvsp[-4].node));
15098 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
15099 local_pop(p);
15100 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
15101 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
15102 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
15103 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
15104 }
15105#line 15106 "parse.c"
15106 break;
15107
15108 case 387: /* $@22: %empty */
15109#line 4661 "parse.y"
15110 {
15111 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
15112 }
15113#line 15114 "parse.c"
15114 break;
15115
15116 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
15117#line 4666 "parse.y"
15118 {
15119 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
15120 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15121 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
15122 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
15123 /*% ripper: module!($:cpath, $:bodystmt) %*/
15124 local_pop(p);
15125 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
15126 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
15127 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
15128 }
15129#line 15130 "parse.c"
15130 break;
15131
15132 case 389: /* $@23: %empty */
15133#line 4679 "parse.y"
15134 {
15135 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15136 }
15137#line 15138 "parse.c"
15138 break;
15139
15140 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
15141#line 4684 "parse.y"
15142 {
15143 restore_defun(p, (yyvsp[-4].node_def_temp));
15144 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15145 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15146 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
15147 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
15148 local_pop(p);
15149 }
15150#line 15151 "parse.c"
15151 break;
15152
15153 case 391: /* $@24: %empty */
15154#line 4694 "parse.y"
15155 {
15156 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15157 }
15158#line 15159 "parse.c"
15159 break;
15160
15161 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
15162#line 4699 "parse.y"
15163 {
15164 restore_defun(p, (yyvsp[-4].node_def_temp));
15165 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15166 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15167 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
15168 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
15169 local_pop(p);
15170 }
15171#line 15172 "parse.c"
15172 break;
15173
15174 case 393: /* primary: "'break'" */
15175#line 4708 "parse.y"
15176 {
15177 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
15178 /*% ripper: break!(args_new!) %*/
15179 }
15180#line 15181 "parse.c"
15181 break;
15182
15183 case 394: /* primary: "'next'" */
15184#line 4713 "parse.y"
15185 {
15186 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
15187 /*% ripper: next!(args_new!) %*/
15188 }
15189#line 15190 "parse.c"
15190 break;
15191
15192 case 395: /* primary: "'redo'" */
15193#line 4718 "parse.y"
15194 {
15195 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
15196 /*% ripper: redo! %*/
15197 }
15198#line 15199 "parse.c"
15199 break;
15200
15201 case 396: /* primary: "'retry'" */
15202#line 4723 "parse.y"
15203 {
15204 if (!p->ctxt.in_defined) {
15205 switch (p->ctxt.in_rescue) {
15206 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
15207 case after_rescue: /* ok */ break;
15208 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
15209 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
15210 }
15211 }
15212 (yyval.node) = NEW_RETRY(&(yyloc));
15213 /*% ripper: retry! %*/
15214 }
15215#line 15216 "parse.c"
15216 break;
15217
15218 case 397: /* value_expr_primary: primary */
15219#line 3172 "parse.y"
15220 {
15221 value_expr(p, (yyvsp[0].node));
15222 (yyval.node) = (yyvsp[0].node);
15223 }
15224#line 15225 "parse.c"
15225 break;
15226
15227 case 399: /* k_begin: "'begin'" */
15228#line 4741 "parse.y"
15229 {
15230 token_info_push(p, "begin", &(yyloc));
15231 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15232 }
15233#line 15234 "parse.c"
15234 break;
15235
15236 case 400: /* k_if: "'if'" */
15237#line 4748 "parse.y"
15238 {
15239 WARN_EOL("if");
15240 token_info_push(p, "if", &(yyloc));
15241 if (p->token_info && p->token_info->nonspc &&
15242 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
15243 const char *tok = p->lex.ptok - rb_strlen_lit("if");
15244 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
15245 beg += rb_strlen_lit("else");
15246 while (beg < tok && ISSPACE(*beg)) beg++;
15247 if (beg == tok) {
15248 p->token_info->nonspc = 0;
15249 }
15250 }
15251 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15252 }
15253#line 15254 "parse.c"
15254 break;
15255
15256 case 401: /* k_unless: "'unless'" */
15257#line 4766 "parse.y"
15258 {
15259 token_info_push(p, "unless", &(yyloc));
15260 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15261 }
15262#line 15263 "parse.c"
15263 break;
15264
15265 case 402: /* k_while: "'while'" allow_exits */
15266#line 4773 "parse.y"
15267 {
15268 (yyval.node_exits) = (yyvsp[0].node_exits);
15269 token_info_push(p, "while", &(yyloc));
15270 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15271 }
15272#line 15273 "parse.c"
15273 break;
15274
15275 case 403: /* k_until: "'until'" allow_exits */
15276#line 4781 "parse.y"
15277 {
15278 (yyval.node_exits) = (yyvsp[0].node_exits);
15279 token_info_push(p, "until", &(yyloc));
15280 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15281 }
15282#line 15283 "parse.c"
15283 break;
15284
15285 case 404: /* k_case: "'case'" */
15286#line 4789 "parse.y"
15287 {
15288 token_info_push(p, "case", &(yyloc));
15289 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15290 }
15291#line 15292 "parse.c"
15292 break;
15293
15294 case 405: /* k_for: "'for'" allow_exits */
15295#line 4796 "parse.y"
15296 {
15297 (yyval.node_exits) = (yyvsp[0].node_exits);
15298 token_info_push(p, "for", &(yyloc));
15299 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15300 }
15301#line 15302 "parse.c"
15302 break;
15303
15304 case 406: /* k_class: "'class'" */
15305#line 4804 "parse.y"
15306 {
15307 token_info_push(p, "class", &(yyloc));
15308 (yyval.ctxt) = p->ctxt;
15309 p->ctxt.in_rescue = before_rescue;
15310 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15311 }
15312#line 15313 "parse.c"
15313 break;
15314
15315 case 407: /* k_module: "'module'" */
15316#line 4813 "parse.y"
15317 {
15318 token_info_push(p, "module", &(yyloc));
15319 (yyval.ctxt) = p->ctxt;
15320 p->ctxt.in_rescue = before_rescue;
15321 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15322 }
15323#line 15324 "parse.c"
15324 break;
15325
15326 case 408: /* k_def: "'def'" */
15327#line 4822 "parse.y"
15328 {
15329 token_info_push(p, "def", &(yyloc));
15330 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15331 p->ctxt.in_argdef = 1;
15332 }
15333#line 15334 "parse.c"
15334 break;
15335
15336 case 409: /* k_do: "'do'" */
15337#line 4830 "parse.y"
15338 {
15339 token_info_push(p, "do", &(yyloc));
15340 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15341 }
15342#line 15343 "parse.c"
15343 break;
15344
15345 case 410: /* k_do_block: "'do' for block" */
15346#line 4837 "parse.y"
15347 {
15348 token_info_push(p, "do", &(yyloc));
15349 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15350 }
15351#line 15352 "parse.c"
15352 break;
15353
15354 case 411: /* k_rescue: "'rescue'" */
15355#line 4844 "parse.y"
15356 {
15357 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15358 (yyval.ctxt) = p->ctxt;
15359 p->ctxt.in_rescue = after_rescue;
15360 }
15361#line 15362 "parse.c"
15362 break;
15363
15364 case 412: /* k_ensure: "'ensure'" */
15365#line 4852 "parse.y"
15366 {
15367 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15368 (yyval.ctxt) = p->ctxt;
15369 }
15370#line 15371 "parse.c"
15371 break;
15372
15373 case 413: /* k_when: "'when'" */
15374#line 4859 "parse.y"
15375 {
15376 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15377 }
15378#line 15379 "parse.c"
15379 break;
15380
15381 case 414: /* k_else: "'else'" */
15382#line 4865 "parse.y"
15383 {
15384 token_info *ptinfo_beg = p->token_info;
15385 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15386 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15387 if (same) {
15388 token_info e;
15389 e.next = ptinfo_beg->next;
15390 e.token = "else";
15391 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15392 if (!e.nonspc) *ptinfo_beg = e;
15393 }
15394 }
15395#line 15396 "parse.c"
15396 break;
15397
15398 case 415: /* k_elsif: "'elsif'" */
15399#line 4880 "parse.y"
15400 {
15401 WARN_EOL("elsif");
15402 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15403 }
15404#line 15405 "parse.c"
15405 break;
15406
15407 case 416: /* k_end: "'end'" */
15408#line 4887 "parse.y"
15409 {
15410 token_info_pop(p, "end", &(yyloc));
15411 pop_end_expect_token_locations(p);
15412 }
15413#line 15414 "parse.c"
15414 break;
15415
15416 case 417: /* k_end: "dummy end" */
15417#line 4892 "parse.y"
15418 {
15419 compile_error(p, "syntax error, unexpected end-of-input");
15420 }
15421#line 15422 "parse.c"
15422 break;
15423
15424 case 418: /* k_return: "'return'" */
15425#line 4898 "parse.y"
15426 {
15427 if (p->ctxt.cant_return && !dyna_in_block(p))
15428 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15429 }
15430#line 15431 "parse.c"
15431 break;
15432
15433 case 419: /* k_return_arg: k_return */
15434#line 4905 "parse.y"
15435 {
15436 CMDARG_PUSH(0);
15437 }
15438#line 15439 "parse.c"
15439 break;
15440
15441 case 420: /* k_break_arg: "'break'" */
15442#line 4911 "parse.y"
15443 {
15444 CMDARG_PUSH(0);
15445 }
15446#line 15447 "parse.c"
15447 break;
15448
15449 case 421: /* k_next_arg: "'next'" */
15450#line 4917 "parse.y"
15451 {
15452 CMDARG_PUSH(0);
15453 }
15454#line 15455 "parse.c"
15455 break;
15456
15457 case 422: /* k_yield: "'yield'" */
15458#line 4923 "parse.y"
15459 {
15460 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15461 yyerror1(&(yylsp[0]), "Invalid yield");
15462 }
15463#line 15464 "parse.c"
15464 break;
15465
15466 case 427: /* do: "'do' for condition" */
15467#line 4935 "parse.y"
15468 { (yyval.id) = keyword_do_cond; }
15469#line 15470 "parse.c"
15470 break;
15471
15472 case 429: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15473#line 4942 "parse.y"
15474 {
15475 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15476 fixpos((yyval.node), (yyvsp[-3].node));
15477 /*% ripper: elsif!($:2, $:4, $:5) %*/
15478 }
15479#line 15480 "parse.c"
15480 break;
15481
15482 case 431: /* opt_else: k_else compstmt_stmts */
15483#line 4951 "parse.y"
15484 {
15485 (yyval.node) = (yyvsp[0].node);
15486 /*% ripper: else!($:2) %*/
15487 }
15488#line 15489 "parse.c"
15489 break;
15490
15491 case 434: /* f_marg: f_norm_arg */
15492#line 4962 "parse.y"
15493 {
15494 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15495 mark_lvar_used(p, (yyval.node));
15496 }
15497#line 15498 "parse.c"
15498 break;
15499
15500 case 435: /* f_marg: "(" f_margs rparen */
15501#line 4967 "parse.y"
15502 {
15503 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15504 /*% ripper: mlhs_paren!($:2) %*/
15505 }
15506#line 15507 "parse.c"
15507 break;
15508
15509 case 436: /* mlhs_items_f_marg: f_marg */
15510#line 3059 "parse.y"
15511 {
15512 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15513 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15514 }
15515#line 15516 "parse.c"
15516 break;
15517
15518 case 437: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15519#line 3064 "parse.y"
15520 {
15521 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15522 /*% ripper: mlhs_add!($:1, $:3) %*/
15523 }
15524#line 15525 "parse.c"
15525 break;
15526
15527 case 438: /* f_margs: mlhs_items_f_marg */
15528#line 4975 "parse.y"
15529 {
15530 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15531 /*% ripper: $:1 %*/
15532 }
15533#line 15534 "parse.c"
15534 break;
15535
15536 case 439: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15537#line 4980 "parse.y"
15538 {
15539 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15540 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15541 }
15542#line 15543 "parse.c"
15543 break;
15544
15545 case 440: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15546#line 4985 "parse.y"
15547 {
15548 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15549 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15550 }
15551#line 15552 "parse.c"
15552 break;
15553
15554 case 441: /* f_margs: f_rest_marg */
15555#line 4990 "parse.y"
15556 {
15557 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15558 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15559 }
15560#line 15561 "parse.c"
15561 break;
15562
15563 case 442: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15564#line 4995 "parse.y"
15565 {
15566 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15567 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15568 }
15569#line 15570 "parse.c"
15570 break;
15571
15572 case 443: /* f_rest_marg: "*" f_norm_arg */
15573#line 5002 "parse.y"
15574 {
15575 /*% ripper: $:2 %*/
15576 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15577 mark_lvar_used(p, (yyval.node));
15578 }
15579#line 15580 "parse.c"
15580 break;
15581
15582 case 444: /* f_rest_marg: "*" */
15583#line 5008 "parse.y"
15584 {
15585 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15586 /*% ripper: Qnil %*/
15587 }
15588#line 15589 "parse.c"
15589 break;
15590
15591 case 446: /* f_any_kwrest: f_no_kwarg */
15592#line 5016 "parse.y"
15593 {
15594 (yyval.id) = idNil;
15595 /*% ripper: ID2VAL(idNil) %*/
15596 }
15597#line 15598 "parse.c"
15598 break;
15599
15600 case 447: /* $@25: %empty */
15601#line 5022 "parse.y"
15602 {p->ctxt.in_argdef = 0;}
15603#line 15604 "parse.c"
15604 break;
15605
15606 case 449: /* f_kw_primary_value: f_label primary_value */
15607#line 3031 "parse.y"
15608 {
15609 p->ctxt.in_argdef = 1;
15610 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15611 /*% ripper: [$:$, $:value] %*/
15612 }
15613#line 15614 "parse.c"
15614 break;
15615
15616 case 450: /* f_kw_primary_value: f_label */
15617#line 3037 "parse.y"
15618 {
15619 p->ctxt.in_argdef = 1;
15620 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15621 /*% ripper: [$:$, 0] %*/
15622 }
15623#line 15624 "parse.c"
15624 break;
15625
15626 case 451: /* f_kwarg_primary_value: f_kw_primary_value */
15627#line 3046 "parse.y"
15628 {
15629 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15630 /*% ripper: rb_ary_new3(1, $:1) %*/
15631 }
15632#line 15633 "parse.c"
15633 break;
15634
15635 case 452: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15636#line 3051 "parse.y"
15637 {
15638 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15639 /*% ripper: rb_ary_push($:1, $:3) %*/
15640 }
15641#line 15642 "parse.c"
15642 break;
15643
15644 case 453: /* opt_f_block_arg_none: ',' f_block_arg */
15645#line 2968 "parse.y"
15646 {
15647 (yyval.id) = (yyvsp[0].id);
15648 /*% ripper: $:2 %*/
15649 }
15650#line 15651 "parse.c"
15651 break;
15652
15653 case 455: /* args_tail_basic_primary_value_none: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg_none */
15654#line 2945 "parse.y"
15655 {
15656 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15657 /*% ripper: [$:1, $:3, $:4] %*/
15658 }
15659#line 15660 "parse.c"
15660 break;
15661
15662 case 456: /* args_tail_basic_primary_value_none: f_kwarg_primary_value opt_f_block_arg_none */
15663#line 2950 "parse.y"
15664 {
15665 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15666 /*% ripper: [$:1, Qnil, $:2] %*/
15667 }
15668#line 15669 "parse.c"
15669 break;
15670
15671 case 457: /* args_tail_basic_primary_value_none: f_any_kwrest opt_f_block_arg_none */
15672#line 2955 "parse.y"
15673 {
15674 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15675 /*% ripper: [Qnil, $:1, $:2] %*/
15676 }
15677#line 15678 "parse.c"
15678 break;
15679
15680 case 458: /* args_tail_basic_primary_value_none: f_block_arg */
15681#line 2960 "parse.y"
15682 {
15683 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15684 /*% ripper: [Qnil, Qnil, $:1] %*/
15685 }
15686#line 15687 "parse.c"
15687 break;
15688
15689 case 460: /* excessed_comma: ',' */
15690#line 5028 "parse.y"
15691 {
15692 /* magic number for rest_id in iseq_set_arguments() */
15693 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15694 /*% ripper: excessed_comma! %*/
15695 }
15696#line 15697 "parse.c"
15697 break;
15698
15699 case 461: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15700#line 3009 "parse.y"
15701 {
15702 p->ctxt.in_argdef = 1;
15703 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15704 /*% ripper: [$:$, $:3] %*/
15705 }
15706#line 15707 "parse.c"
15707 break;
15708
15709 case 462: /* f_opt_arg_primary_value: f_opt_primary_value */
15710#line 3018 "parse.y"
15711 {
15712 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15713 /*% ripper: rb_ary_new3(1, $:1) %*/
15714 }
15715#line 15716 "parse.c"
15716 break;
15717
15718 case 463: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15719#line 3023 "parse.y"
15720 {
15721 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15722 /*% ripper: rb_ary_push($:1, $:3) %*/
15723 }
15724#line 15725 "parse.c"
15725 break;
15726
15727 case 464: /* opt_args_tail_block_args_tail_none: ',' block_args_tail */
15728#line 3118 "parse.y"
15729 {
15730 (yyval.node_args) = (yyvsp[0].node_args);
15731 /*% ripper: $:tail %*/
15732 }
15733#line 15734 "parse.c"
15734 break;
15735
15736 case 465: /* opt_args_tail_block_args_tail_none: none */
15737#line 3123 "parse.y"
15738 {
15739 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15740 /*% ripper: [Qnil, Qnil, Qnil] %*/
15741 }
15742#line 15743 "parse.c"
15743 break;
15744
15745 case 466: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15746#line 6315 "parse.y"
15747 {
15748 (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));
15749 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15750 }
15751#line 15752 "parse.c"
15752 break;
15753
15754 case 467: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15755#line 6320 "parse.y"
15756 {
15757 (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));
15758 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15759 }
15760#line 15761 "parse.c"
15761 break;
15762
15763 case 468: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15764#line 6325 "parse.y"
15765 {
15766 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15767 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15768 }
15769#line 15770 "parse.c"
15770 break;
15771
15772 case 469: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15773#line 6330 "parse.y"
15774 {
15775 (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));
15776 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15777 }
15778#line 15779 "parse.c"
15779 break;
15780
15781 case 470: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg opt_args_tail_block_args_tail_none */
15782#line 6335 "parse.y"
15783 {
15784 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15785 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15786 }
15787#line 15788 "parse.c"
15788 break;
15789
15790 case 471: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15791#line 6340 "parse.y"
15792 {
15793 (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));
15794 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15795 }
15796#line 15797 "parse.c"
15797 break;
15798
15799 case 472: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15800#line 6345 "parse.y"
15801 {
15802 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15803 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15804 }
15805#line 15806 "parse.c"
15806 break;
15807
15808 case 473: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15809#line 6350 "parse.y"
15810 {
15811 (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));
15812 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15813 }
15814#line 15815 "parse.c"
15815 break;
15816
15817 case 474: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15818#line 6355 "parse.y"
15819 {
15820 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15821 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15822 }
15823#line 15824 "parse.c"
15824 break;
15825
15826 case 475: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15827#line 6360 "parse.y"
15828 {
15829 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15830 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15831 }
15832#line 15833 "parse.c"
15833 break;
15834
15835 case 476: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg opt_args_tail_block_args_tail_none */
15836#line 6365 "parse.y"
15837 {
15838 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15839 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15840 }
15841#line 15842 "parse.c"
15842 break;
15843
15844 case 477: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15845#line 6370 "parse.y"
15846 {
15847 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15848 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15849 }
15850#line 15851 "parse.c"
15851 break;
15852
15853 case 479: /* block_param: f_arg excessed_comma */
15854#line 5037 "parse.y"
15855 {
15856 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15857 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15858 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15859 }
15860#line 15861 "parse.c"
15861 break;
15862
15863 case 480: /* block_param: f_arg opt_args_tail_block_args_tail_none */
15864#line 5043 "parse.y"
15865 {
15866 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15867 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15868 }
15869#line 15870 "parse.c"
15870 break;
15871
15872 case 481: /* tail-only-args_block_args_tail: block_args_tail */
15873#line 6378 "parse.y"
15874 {
15875 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15876 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15877 }
15878#line 15879 "parse.c"
15879 break;
15880
15881 case 484: /* opt_block_param_def: block_param_def */
15882#line 5052 "parse.y"
15883 {
15884 p->command_start = TRUE;
15885 }
15886#line 15887 "parse.c"
15887 break;
15888
15889 case 485: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15890#line 5058 "parse.y"
15891 {
15892 p->max_numparam = ORDINAL_PARAM;
15893 p->ctxt.in_argdef = 0;
15894 (yyval.node_args) = (yyvsp[-2].node_args);
15895 /*% ripper: block_var!($:2, $:3) %*/
15896 }
15897#line 15898 "parse.c"
15898 break;
15899
15900 case 486: /* opt_block_param: %empty */
15901#line 5067 "parse.y"
15902 {
15903 (yyval.node_args) = 0;
15904 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15905 }
15906#line 15907 "parse.c"
15907 break;
15908
15909 case 488: /* opt_bv_decl: option_'\n' */
15910#line 5075 "parse.y"
15911 {
15912 (yyval.id) = 0;
15913 /*% ripper: Qfalse %*/
15914 }
15915#line 15916 "parse.c"
15916 break;
15917
15918 case 489: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15919#line 5080 "parse.y"
15920 {
15921 (yyval.id) = 0;
15922 /*% ripper: $:3 %*/
15923 }
15924#line 15925 "parse.c"
15925 break;
15926
15927 case 492: /* bvar: "local variable or method" */
15928#line 5093 "parse.y"
15929 {
15930 new_bv(p, (yyvsp[0].id));
15931 /*% ripper: $:1 %*/
15932 }
15933#line 15934 "parse.c"
15934 break;
15935
15936 case 494: /* max_numparam: %empty */
15937#line 5100 "parse.y"
15938 {
15939 (yyval.num) = p->max_numparam;
15940 p->max_numparam = 0;
15941 }
15942#line 15943 "parse.c"
15943 break;
15944
15945 case 495: /* numparam: %empty */
15946#line 5106 "parse.y"
15947 {
15948 (yyval.node) = numparam_push(p);
15949 }
15950#line 15951 "parse.c"
15951 break;
15952
15953 case 496: /* it_id: %empty */
15954#line 5111 "parse.y"
15955 {
15956 (yyval.id) = p->it_id;
15957 p->it_id = 0;
15958 }
15959#line 15960 "parse.c"
15960 break;
15961
15962 case 497: /* @26: %empty */
15963#line 5118 "parse.y"
15964 {
15965 token_info_push(p, "->", &(yylsp[0]));
15966 (yyval.vars) = dyna_push(p);
15967 }
15968#line 15969 "parse.c"
15969 break;
15970
15971 case 498: /* $@27: %empty */
15972#line 5124 "parse.y"
15973 {
15974 CMDARG_PUSH(0);
15975 }
15976#line 15977 "parse.c"
15977 break;
15978
15979 case 499: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15980#line 5128 "parse.y"
15981 {
15982 int max_numparam = p->max_numparam;
15983 ID it_id = p->it_id;
15984 p->lex.lpar_beg = (yyvsp[-8].num);
15985 p->max_numparam = (yyvsp[-6].num);
15986 p->it_id = (yyvsp[-4].id);
15987 restore_block_exit(p, (yyvsp[-3].node_exits));
15988 CMDARG_POP();
15989 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15990 {
15991 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15992 (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);
15993 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15994 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15995 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15996 xfree((yyvsp[0].locations_lambda_body));
15997 }
15998 /*% ripper: lambda!($:args, $:body) %*/
15999 numparam_pop(p, (yyvsp[-5].node));
16000 dyna_pop(p, (yyvsp[-7].vars));
16001 }
16002#line 16003 "parse.c"
16003 break;
16004
16005 case 500: /* f_larglist: '(' f_largs opt_bv_decl ')' */
16006#line 5152 "parse.y"
16007 {
16008 p->ctxt.in_argdef = 0;
16009 (yyval.node_args) = (yyvsp[-2].node_args);
16010 p->max_numparam = ORDINAL_PARAM;
16011 /*% ripper: paren!($:args) %*/
16012 }
16013#line 16014 "parse.c"
16014 break;
16015
16016 case 501: /* f_larglist: f_largs */
16017#line 5159 "parse.y"
16018 {
16019 p->ctxt.in_argdef = 0;
16020 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
16021 p->max_numparam = ORDINAL_PARAM;
16022 (yyval.node_args) = (yyvsp[0].node_args);
16023 }
16024#line 16025 "parse.c"
16025 break;
16026
16027 case 502: /* lambda_body: tLAMBEG compstmt_stmts '}' */
16028#line 5168 "parse.y"
16029 {
16030 token_info_pop(p, "}", &(yylsp[0]));
16031 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
16032 /*% ripper: $:2 %*/
16033 }
16034#line 16035 "parse.c"
16035 break;
16036
16037 case 503: /* $@28: %empty */
16038#line 5174 "parse.y"
16039 {
16040 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
16041 }
16042#line 16043 "parse.c"
16043 break;
16044
16045 case 504: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
16046#line 5178 "parse.y"
16047 {
16048 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
16049 /*% ripper: $:3 %*/
16050 }
16051#line 16052 "parse.c"
16052 break;
16053
16054 case 505: /* do_block: k_do_block do_body k_end */
16055#line 5185 "parse.y"
16056 {
16057 (yyval.node) = (yyvsp[-1].node);
16058 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16059 /*% ripper: $:2 %*/
16060 }
16061#line 16062 "parse.c"
16062 break;
16063
16064 case 506: /* block_call: command do_block */
16065#line 5193 "parse.y"
16066 {
16067 (yyval.node) = command_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16068 fixpos((yyval.node), (yyvsp[-1].node));
16069 /*% ripper: method_add_block!($:1, $:2) %*/
16070 }
16071#line 16072 "parse.c"
16072 break;
16073
16074 case 507: /* block_call: block_call call_op2 operation2 opt_paren_args */
16075#line 5199 "parse.y"
16076 {
16077 bool has_args = (yyvsp[0].node) != 0;
16078 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
16079 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16080 /*% ripper: call!($:1, $:2, $:3) %*/
16081 if (has_args) {
16082 /*% ripper: method_add_arg!($:$, $:4) %*/
16083 }
16084 }
16085#line 16086 "parse.c"
16086 break;
16087
16088 case 508: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
16089#line 5209 "parse.y"
16090 {
16091 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
16092 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
16093 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
16094 }
16095#line 16096 "parse.c"
16096 break;
16097
16098 case 509: /* block_call: block_call call_op2 operation2 command_args do_block */
16099#line 5215 "parse.y"
16100 {
16101 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
16102 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
16103 }
16104#line 16105 "parse.c"
16105 break;
16106
16107 case 510: /* block_call: block_call call_op2 paren_args */
16108#line 5220 "parse.y"
16109 {
16110 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16111 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16112 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16113 }
16114#line 16115 "parse.c"
16115 break;
16116
16117 case 511: /* method_call: fcall paren_args */
16118#line 5228 "parse.y"
16119 {
16120 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
16121 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
16122 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
16123 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
16124 }
16125#line 16126 "parse.c"
16126 break;
16127
16128 case 512: /* method_call: primary_value call_op operation2 opt_paren_args */
16129#line 5235 "parse.y"
16130 {
16131 bool has_args = (yyvsp[0].node) != 0;
16132 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
16133 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16134 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16135 /*% ripper: call!($:1, $:2, $:3) %*/
16136 if (has_args) {
16137 /*% ripper: method_add_arg!($:$, $:4) %*/
16138 }
16139 }
16140#line 16141 "parse.c"
16141 break;
16142
16143 case 513: /* method_call: primary_value "::" operation2 paren_args */
16144#line 5246 "parse.y"
16145 {
16146 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16147 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16148 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
16149 }
16150#line 16151 "parse.c"
16151 break;
16152
16153 case 514: /* method_call: primary_value "::" operation3 */
16154#line 5252 "parse.y"
16155 {
16156 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
16157 /*% ripper: call!($:1, $:2, $:3) %*/
16158 }
16159#line 16160 "parse.c"
16160 break;
16161
16162 case 515: /* method_call: primary_value call_op2 paren_args */
16163#line 5257 "parse.y"
16164 {
16165 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16166 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16167 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16168 }
16169#line 16170 "parse.c"
16170 break;
16171
16172 case 516: /* method_call: "'super'" paren_args */
16173#line 5263 "parse.y"
16174 {
16175 rb_code_location_t lparen_loc = (yylsp[0]);
16176 rb_code_location_t rparen_loc = (yylsp[0]);
16177 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
16178 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
16179
16180 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
16181 /*% ripper: super!($:2) %*/
16182 }
16183#line 16184 "parse.c"
16184 break;
16185
16186 case 517: /* method_call: "'super'" */
16187#line 5273 "parse.y"
16188 {
16189 (yyval.node) = NEW_ZSUPER(&(yyloc));
16190 /*% ripper: zsuper! %*/
16191 }
16192#line 16193 "parse.c"
16193 break;
16194
16195 case 518: /* method_call: primary_value '[' opt_call_args rbracket */
16196#line 5278 "parse.y"
16197 {
16198 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
16199 fixpos((yyval.node), (yyvsp[-3].node));
16200 /*% ripper: aref!($:1, $:3) %*/
16201 }
16202#line 16203 "parse.c"
16203 break;
16204
16205 case 519: /* brace_block: '{' brace_body '}' */
16206#line 5286 "parse.y"
16207 {
16208 (yyval.node) = (yyvsp[-1].node);
16209 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16210 /*% ripper: $:2 %*/
16211 }
16212#line 16213 "parse.c"
16213 break;
16214
16215 case 520: /* brace_block: k_do do_body k_end */
16216#line 5292 "parse.y"
16217 {
16218 (yyval.node) = (yyvsp[-1].node);
16219 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16220 /*% ripper: $:2 %*/
16221 }
16222#line 16223 "parse.c"
16223 break;
16224
16225 case 521: /* @29: %empty */
16226#line 5299 "parse.y"
16227 {(yyval.vars) = dyna_push(p);}
16228#line 16229 "parse.c"
16229 break;
16230
16231 case 522: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
16232#line 5302 "parse.y"
16233 {
16234 int max_numparam = p->max_numparam;
16235 ID it_id = p->it_id;
16236 p->max_numparam = (yyvsp[-5].num);
16237 p->it_id = (yyvsp[-3].id);
16238 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16239 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16240 /*% ripper: brace_block!($:args, $:compstmt) %*/
16241 restore_block_exit(p, (yyvsp[-2].node_exits));
16242 numparam_pop(p, (yyvsp[-4].node));
16243 dyna_pop(p, (yyvsp[-6].vars));
16244 }
16245#line 16246 "parse.c"
16246 break;
16247
16248 case 523: /* @30: %empty */
16249#line 5316 "parse.y"
16250 {
16251 (yyval.vars) = dyna_push(p);
16252 CMDARG_PUSH(0);
16253 }
16254#line 16255 "parse.c"
16255 break;
16256
16257 case 524: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
16258#line 5322 "parse.y"
16259 {
16260 int max_numparam = p->max_numparam;
16261 ID it_id = p->it_id;
16262 p->max_numparam = (yyvsp[-5].num);
16263 p->it_id = (yyvsp[-3].id);
16264 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16265 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16266 /*% ripper: do_block!($:args, $:bodystmt) %*/
16267 CMDARG_POP();
16268 restore_block_exit(p, (yyvsp[-2].node_exits));
16269 numparam_pop(p, (yyvsp[-4].node));
16270 dyna_pop(p, (yyvsp[-6].vars));
16271 }
16272#line 16273 "parse.c"
16273 break;
16274
16275 case 525: /* case_args: arg_value */
16276#line 5338 "parse.y"
16277 {
16278 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16279 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16280 /*% ripper: args_add!(args_new!, $:arg_value) %*/
16281 }
16282#line 16283 "parse.c"
16283 break;
16284
16285 case 526: /* case_args: "*" arg_value */
16286#line 5344 "parse.y"
16287 {
16288 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16289 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16290 }
16291#line 16292 "parse.c"
16292 break;
16293
16294 case 527: /* case_args: case_args ',' arg_value */
16295#line 5349 "parse.y"
16296 {
16297 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16298 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16299 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16300 }
16301#line 16302 "parse.c"
16302 break;
16303
16304 case 528: /* case_args: case_args ',' "*" arg_value */
16305#line 5355 "parse.y"
16306 {
16307 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16308 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16309 }
16310#line 16311 "parse.c"
16311 break;
16312
16313 case 529: /* case_body: k_when case_args then compstmt_stmts cases */
16314#line 5364 "parse.y"
16315 {
16316 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16317 fixpos((yyval.node), (yyvsp[-3].node));
16318 /*% ripper: when!($:2, $:4, $:5) %*/
16319 }
16320#line 16321 "parse.c"
16321 break;
16322
16323 case 532: /* p_pvtbl: %empty */
16324#line 5375 "parse.y"
16325 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16326#line 16327 "parse.c"
16327 break;
16328
16329 case 533: /* p_pktbl: %empty */
16330#line 5376 "parse.y"
16331 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16332#line 16333 "parse.c"
16333 break;
16334
16335 case 534: /* p_in_kwarg: %empty */
16336#line 5378 "parse.y"
16337 {
16338 (yyval.ctxt) = p->ctxt;
16339 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16340 p->command_start = FALSE;
16341 p->ctxt.in_kwarg = 1;
16342 p->ctxt.in_alt_pattern = 0;
16343 p->ctxt.capture_in_pattern = 0;
16344 }
16345#line 16346 "parse.c"
16346 break;
16347
16348 case 535: /* $@31: %empty */
16349#line 5391 "parse.y"
16350 {
16351 pop_pktbl(p, (yyvsp[-2].tbl));
16352 pop_pvtbl(p, (yyvsp[-3].tbl));
16353 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16354 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16355 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16356 }
16357#line 16358 "parse.c"
16358 break;
16359
16360 case 536: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16361#line 5400 "parse.y"
16362 {
16363 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16364 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16365 }
16366#line 16367 "parse.c"
16367 break;
16368
16369 case 540: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16370#line 5412 "parse.y"
16371 {
16372 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16373 fixpos((yyval.node), (yyvsp[0].node));
16374 /*% ripper: if_mod!($:3, $:1) %*/
16375 }
16376#line 16377 "parse.c"
16377 break;
16378
16379 case 541: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16380#line 5418 "parse.y"
16381 {
16382 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16383 fixpos((yyval.node), (yyvsp[0].node));
16384 /*% ripper: unless_mod!($:3, $:1) %*/
16385 }
16386#line 16387 "parse.c"
16387 break;
16388
16389 case 543: /* p_top_expr_body: p_expr ',' */
16390#line 5427 "parse.y"
16391 {
16392 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16393 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16394 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16395 }
16396#line 16397 "parse.c"
16397 break;
16398
16399 case 544: /* p_top_expr_body: p_expr ',' p_args */
16400#line 5433 "parse.y"
16401 {
16402 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16403 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16404 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16405 }
16406#line 16407 "parse.c"
16407 break;
16408
16409 case 545: /* p_top_expr_body: p_find */
16410#line 5439 "parse.y"
16411 {
16412 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16413 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16414 }
16415#line 16416 "parse.c"
16416 break;
16417
16418 case 546: /* p_top_expr_body: p_args_tail */
16419#line 5444 "parse.y"
16420 {
16421 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16422 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16423 }
16424#line 16425 "parse.c"
16425 break;
16426
16427 case 547: /* p_top_expr_body: p_kwargs */
16428#line 5449 "parse.y"
16429 {
16430 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16431 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16432 }
16433#line 16434 "parse.c"
16434 break;
16435
16436 case 549: /* p_as: p_expr "=>" p_variable */
16437#line 5459 "parse.y"
16438 {
16439 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16440 n = list_append(p, n, (yyvsp[0].node));
16441 (yyval.node) = new_hash(p, n, &(yyloc));
16442 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16443 }
16444#line 16445 "parse.c"
16445 break;
16446
16447 case 551: /* p_alt: p_alt '|' p_alt_begin p_expr_basic */
16448#line 5469 "parse.y"
16449 {
16450 /* `capture_in_pattern` is only a cheap pre-filter: it is set by any
16451 * binding in the whole `in` clause, so verify the left operand
16452 * actually contains a binding before rejecting (like Prism does). */
16453 if (p->ctxt.capture_in_pattern && pattern_has_capture(p, (yyvsp[-3].node))) {
16454 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16455 }
16456 p->ctxt.in_alt_pattern = (yyvsp[-1].ctxt).in_alt_pattern;
16457 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16458 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16459 }
16460#line 16461 "parse.c"
16461 break;
16462
16463 case 553: /* p_alt_begin: %empty */
16464#line 5483 "parse.y"
16465 {
16466 (yyval.ctxt) = p->ctxt;
16467 p->ctxt.in_alt_pattern = 1;
16468 }
16469#line 16470 "parse.c"
16470 break;
16471
16472 case 554: /* p_lparen: '(' p_pktbl */
16473#line 5490 "parse.y"
16474 {
16475 (yyval.tbl) = (yyvsp[0].tbl);
16476 /*% ripper: $:2 %*/
16477 }
16478#line 16479 "parse.c"
16479 break;
16480
16481 case 555: /* p_lbracket: '[' p_pktbl */
16482#line 5497 "parse.y"
16483 {
16484 (yyval.tbl) = (yyvsp[0].tbl);
16485 /*% ripper: $:2 %*/
16486 }
16487#line 16488 "parse.c"
16488 break;
16489
16490 case 558: /* p_expr_basic: p_const p_lparen p_args rparen */
16491#line 5506 "parse.y"
16492 {
16493 pop_pktbl(p, (yyvsp[-2].tbl));
16494 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16495 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16496 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16497 }
16498#line 16499 "parse.c"
16499 break;
16500
16501 case 559: /* p_expr_basic: p_const p_lparen p_find rparen */
16502#line 5513 "parse.y"
16503 {
16504 pop_pktbl(p, (yyvsp[-2].tbl));
16505 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16506 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16507 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16508 }
16509#line 16510 "parse.c"
16510 break;
16511
16512 case 560: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16513#line 5520 "parse.y"
16514 {
16515 pop_pktbl(p, (yyvsp[-2].tbl));
16516 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16517 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16518 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16519 }
16520#line 16521 "parse.c"
16521 break;
16522
16523 case 561: /* p_expr_basic: p_const '(' rparen */
16524#line 5527 "parse.y"
16525 {
16526 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16527 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16528 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16529 }
16530#line 16531 "parse.c"
16531 break;
16532
16533 case 562: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16534#line 5533 "parse.y"
16535 {
16536 pop_pktbl(p, (yyvsp[-2].tbl));
16537 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16538 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16539 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16540 }
16541#line 16542 "parse.c"
16542 break;
16543
16544 case 563: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16545#line 5540 "parse.y"
16546 {
16547 pop_pktbl(p, (yyvsp[-2].tbl));
16548 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16549 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16550 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16551 }
16552#line 16553 "parse.c"
16553 break;
16554
16555 case 564: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16556#line 5547 "parse.y"
16557 {
16558 pop_pktbl(p, (yyvsp[-2].tbl));
16559 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16560 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16561 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16562 }
16563#line 16564 "parse.c"
16564 break;
16565
16566 case 565: /* p_expr_basic: p_const '[' rbracket */
16567#line 5554 "parse.y"
16568 {
16569 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16570 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16571 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16572 }
16573#line 16574 "parse.c"
16574 break;
16575
16576 case 566: /* p_expr_basic: "[" p_args rbracket */
16577#line 5560 "parse.y"
16578 {
16579 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16580 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16581 }
16582#line 16583 "parse.c"
16583 break;
16584
16585 case 567: /* p_expr_basic: "[" p_find rbracket */
16586#line 5565 "parse.y"
16587 {
16588 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16589 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16590 }
16591#line 16592 "parse.c"
16592 break;
16593
16594 case 568: /* p_expr_basic: "[" rbracket */
16595#line 5570 "parse.y"
16596 {
16597 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16598 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16599 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16600 }
16601#line 16602 "parse.c"
16602 break;
16603
16604 case 569: /* $@32: %empty */
16605#line 5576 "parse.y"
16606 {
16607 p->ctxt.in_kwarg = 0;
16608 }
16609#line 16610 "parse.c"
16610 break;
16611
16612 case 570: /* p_expr_basic: "{" p_pktbl lex_ctxt $@32 p_kwargs rbrace */
16613#line 5580 "parse.y"
16614 {
16615 pop_pktbl(p, (yyvsp[-4].tbl));
16616 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16617 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16618 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16619 }
16620#line 16621 "parse.c"
16621 break;
16622
16623 case 571: /* p_expr_basic: "{" rbrace */
16624#line 5587 "parse.y"
16625 {
16626 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16627 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16628 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16629 }
16630#line 16631 "parse.c"
16631 break;
16632
16633 case 572: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16634#line 5593 "parse.y"
16635 {
16636 pop_pktbl(p, (yyvsp[-2].tbl));
16637 (yyval.node) = (yyvsp[-1].node);
16638 /*% ripper: $:p_expr %*/
16639 }
16640#line 16641 "parse.c"
16641 break;
16642
16643 case 573: /* p_args: p_expr */
16644#line 5601 "parse.y"
16645 {
16646 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16647 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16648 /*% ripper: [[$:1], Qnil, Qnil] %*/
16649 }
16650#line 16651 "parse.c"
16651 break;
16652
16653 case 574: /* p_args: p_args_head */
16654#line 5607 "parse.y"
16655 {
16656 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16657 /*% ripper: [$:1, Qnil, Qnil] %*/
16658 }
16659#line 16660 "parse.c"
16660 break;
16661
16662 case 575: /* p_args: p_args_head p_arg */
16663#line 5612 "parse.y"
16664 {
16665 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16666 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16667 }
16668#line 16669 "parse.c"
16669 break;
16670
16671 case 576: /* p_args: p_args_head p_rest */
16672#line 5617 "parse.y"
16673 {
16674 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16675 /*% ripper: [$:1, $:2, Qnil] %*/
16676 }
16677#line 16678 "parse.c"
16678 break;
16679
16680 case 577: /* p_args: p_args_head p_rest ',' p_args_post */
16681#line 5622 "parse.y"
16682 {
16683 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16684 /*% ripper: [$:1, $:2, $:4] %*/
16685 }
16686#line 16687 "parse.c"
16687 break;
16688
16689 case 580: /* p_args_head: p_args_head p_arg ',' */
16690#line 5631 "parse.y"
16691 {
16692 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16693 /*% ripper: rb_ary_concat($:1, $:2) %*/
16694 }
16695#line 16696 "parse.c"
16696 break;
16697
16698 case 581: /* p_args_tail: p_rest */
16699#line 5638 "parse.y"
16700 {
16701 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16702 /*% ripper: [Qnil, $:1, Qnil] %*/
16703 }
16704#line 16705 "parse.c"
16705 break;
16706
16707 case 582: /* p_args_tail: p_rest ',' p_args_post */
16708#line 5643 "parse.y"
16709 {
16710 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16711 /*% ripper: [Qnil, $:1, $:3] %*/
16712 }
16713#line 16714 "parse.c"
16714 break;
16715
16716 case 583: /* p_find: p_rest ',' p_args_post ',' p_rest */
16717#line 5650 "parse.y"
16718 {
16719 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16720 /*% ripper: [$:1, $:3, $:5] %*/
16721 }
16722#line 16723 "parse.c"
16723 break;
16724
16725 case 584: /* p_rest: "*" "local variable or method" */
16726#line 5658 "parse.y"
16727 {
16728 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16729 /*% ripper: var_field!($:2) %*/
16730 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16731 }
16732#line 16733 "parse.c"
16733 break;
16734
16735 case 585: /* p_rest: "*" */
16736#line 5664 "parse.y"
16737 {
16738 (yyval.node) = 0;
16739 /*% ripper: var_field!(Qnil) %*/
16740 }
16741#line 16742 "parse.c"
16742 break;
16743
16744 case 587: /* p_args_post: p_args_post ',' p_arg */
16745#line 5672 "parse.y"
16746 {
16747 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16748 /*% ripper: rb_ary_concat($:1, $:3) %*/
16749 }
16750#line 16751 "parse.c"
16751 break;
16752
16753 case 588: /* p_arg: p_expr */
16754#line 5679 "parse.y"
16755 {
16756 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16757 /*% ripper: [$:1] %*/
16758 }
16759#line 16760 "parse.c"
16760 break;
16761
16762 case 589: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16763#line 5686 "parse.y"
16764 {
16765 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16766 /*% ripper: [$:1, $:3] %*/
16767 }
16768#line 16769 "parse.c"
16769 break;
16770
16771 case 590: /* p_kwargs: p_kwarg */
16772#line 5691 "parse.y"
16773 {
16774 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16775 /*% ripper: [$:1, Qnil] %*/
16776 }
16777#line 16778 "parse.c"
16778 break;
16779
16780 case 591: /* p_kwargs: p_kwarg ',' */
16781#line 5696 "parse.y"
16782 {
16783 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16784 /*% ripper: [$:1, Qnil] %*/
16785 }
16786#line 16787 "parse.c"
16787 break;
16788
16789 case 592: /* p_kwargs: p_any_kwrest */
16790#line 5701 "parse.y"
16791 {
16792 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16793 /*% ripper: [[], $:1] %*/
16794 }
16795#line 16796 "parse.c"
16796 break;
16797
16798 case 594: /* p_kwarg: p_kwarg ',' p_kw */
16799#line 5710 "parse.y"
16800 {
16801 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16802 /*% ripper: rb_ary_push($:1, $:3) %*/
16803 }
16804#line 16805 "parse.c"
16805 break;
16806
16807 case 595: /* p_kw: p_kw_label p_expr */
16808#line 5717 "parse.y"
16809 {
16810 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16811 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16812 /*% ripper: [$:1, $:2] %*/
16813 }
16814#line 16815 "parse.c"
16815 break;
16816
16817 case 596: /* p_kw: p_kw_label */
16818#line 5723 "parse.y"
16819 {
16820 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16821 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16822 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16823 }
16824 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16825 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16826 /*% ripper: [$:1, Qnil] %*/
16827 }
16828#line 16829 "parse.c"
16829 break;
16830
16831 case 598: /* p_kw_label: "string literal" string_contents tLABEL_END */
16832#line 5736 "parse.y"
16833 {
16834 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16835 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16836 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16837 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16838 }
16839 else {
16840 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16841 (yyval.id) = rb_intern_str(STR_NEW0());
16842 }
16843 /*% ripper: $:2 %*/
16844 }
16845#line 16846 "parse.c"
16846 break;
16847
16848 case 599: /* p_kwrest: kwrest_mark "local variable or method" */
16849#line 5751 "parse.y"
16850 {
16851 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16852 (yyval.id) = (yyvsp[0].id);
16853 /*% ripper: var_field!($:2) %*/
16854 }
16855#line 16856 "parse.c"
16856 break;
16857
16858 case 600: /* p_kwrest: kwrest_mark */
16859#line 5757 "parse.y"
16860 {
16861 (yyval.id) = 0;
16862 /*% ripper: Qnil %*/
16863 }
16864#line 16865 "parse.c"
16865 break;
16866
16867 case 601: /* p_kwnorest: kwrest_mark "'nil'" */
16868#line 5764 "parse.y"
16869 {
16870 (yyval.id) = 0;
16871 }
16872#line 16873 "parse.c"
16873 break;
16874
16875 case 603: /* p_any_kwrest: p_kwnorest */
16876#line 5771 "parse.y"
16877 {
16878 (yyval.id) = idNil;
16879 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16880 }
16881#line 16882 "parse.c"
16882 break;
16883
16884 case 605: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16885#line 3131 "parse.y"
16886 {
16887 value_expr(p, (yyvsp[-2].node));
16888 value_expr(p, (yyvsp[0].node));
16889 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16890 /*% ripper: dot2!($:1, $:3) %*/
16891 }
16892#line 16893 "parse.c"
16893 break;
16894
16895 case 606: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16896#line 3138 "parse.y"
16897 {
16898 value_expr(p, (yyvsp[-2].node));
16899 value_expr(p, (yyvsp[0].node));
16900 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16901 /*% ripper: dot3!($:1, $:3) %*/
16902 }
16903#line 16904 "parse.c"
16904 break;
16905
16906 case 607: /* range_expr_p_primitive: p_primitive ".." */
16907#line 3145 "parse.y"
16908 {
16909 value_expr(p, (yyvsp[-1].node));
16910 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16911 /*% ripper: dot2!($:1, Qnil) %*/
16912 }
16913#line 16914 "parse.c"
16914 break;
16915
16916 case 608: /* range_expr_p_primitive: p_primitive "..." */
16917#line 3151 "parse.y"
16918 {
16919 value_expr(p, (yyvsp[-1].node));
16920 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16921 /*% ripper: dot3!($:1, Qnil) %*/
16922 }
16923#line 16924 "parse.c"
16924 break;
16925
16926 case 609: /* range_expr_p_primitive: "(.." p_primitive */
16927#line 3157 "parse.y"
16928 {
16929 value_expr(p, (yyvsp[0].node));
16930 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16931 /*% ripper: dot2!(Qnil, $:2) %*/
16932 }
16933#line 16934 "parse.c"
16934 break;
16935
16936 case 610: /* range_expr_p_primitive: "(..." p_primitive */
16937#line 3163 "parse.y"
16938 {
16939 value_expr(p, (yyvsp[0].node));
16940 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16941 /*% ripper: dot3!(Qnil, $:2) %*/
16942 }
16943#line 16944 "parse.c"
16944 break;
16945
16946 case 623: /* p_primitive: keyword_variable */
16947#line 5786 "parse.y"
16948 {
16949 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16950 /*% ripper: var_ref!($:1) %*/
16951 }
16952#line 16953 "parse.c"
16953 break;
16954
16955 case 625: /* p_variable: "local variable or method" */
16956#line 5794 "parse.y"
16957 {
16958 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16959 /*% ripper: var_field!($:1) %*/
16960 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16961 }
16962#line 16963 "parse.c"
16963 break;
16964
16965 case 626: /* p_var_ref: '^' "local variable or method" */
16966#line 5802 "parse.y"
16967 {
16968 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16969 if (!n) {
16970 n = NEW_ERROR(&(yyloc));
16971 }
16972 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16973 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16974 }
16975 (yyval.node) = n;
16976 /*% ripper: var_ref!($:2) %*/
16977 }
16978#line 16979 "parse.c"
16979 break;
16980
16981 case 627: /* p_var_ref: '^' nonlocal_var */
16982#line 5814 "parse.y"
16983 {
16984 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16985 /*% ripper: var_ref!($:2) %*/
16986 }
16987#line 16988 "parse.c"
16988 break;
16989
16990 case 628: /* p_expr_ref: '^' "(" expr_value rparen */
16991#line 5821 "parse.y"
16992 {
16993 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16994 /*% ripper: begin!($:3) %*/
16995 }
16996#line 16997 "parse.c"
16997 break;
16998
16999 case 629: /* p_const: ":: at EXPR_BEG" cname */
17000#line 5828 "parse.y"
17001 {
17002 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
17003 /*% ripper: top_const_ref!($:2) %*/
17004 }
17005#line 17006 "parse.c"
17006 break;
17007
17008 case 630: /* p_const: p_const "::" cname */
17009#line 5833 "parse.y"
17010 {
17011 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
17012 /*% ripper: const_path_ref!($:1, $:3) %*/
17013 }
17014#line 17015 "parse.c"
17015 break;
17016
17017 case 631: /* p_const: "constant" */
17018#line 5838 "parse.y"
17019 {
17020 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
17021 /*% ripper: var_ref!($:1) %*/
17022 }
17023#line 17024 "parse.c"
17024 break;
17025
17026 case 632: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
17027#line 5847 "parse.y"
17028 {
17029 NODE *err = (yyvsp[-3].node);
17030 if ((yyvsp[-3].node)) {
17031 err = NEW_ERRINFO(&(yylsp[-3]));
17032 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
17033 }
17034 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17035 if ((yyvsp[-4].node)) {
17036 fixpos((yyval.node), (yyvsp[-4].node));
17037 }
17038 else if ((yyvsp[-3].node)) {
17039 fixpos((yyval.node), (yyvsp[-3].node));
17040 }
17041 else {
17042 fixpos((yyval.node), (yyvsp[-1].node));
17043 }
17044 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
17045 }
17046#line 17047 "parse.c"
17047 break;
17048
17049 case 634: /* exc_list: arg_value */
17050#line 5869 "parse.y"
17051 {
17052 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
17053 /*% ripper: rb_ary_new3(1, $:1) %*/
17054 }
17055#line 17056 "parse.c"
17056 break;
17057
17058 case 635: /* exc_list: mrhs */
17059#line 5874 "parse.y"
17060 {
17061 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
17062 }
17063#line 17064 "parse.c"
17064 break;
17065
17066 case 637: /* exc_var: "=>" lhs */
17067#line 5881 "parse.y"
17068 {
17069 (yyval.node) = (yyvsp[0].node);
17070 /*% ripper: $:2 %*/
17071 }
17072#line 17073 "parse.c"
17073 break;
17074
17075 case 639: /* opt_ensure: k_ensure stmts option_terms */
17076#line 5889 "parse.y"
17077 {
17078 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
17079 (yyval.node) = (yyvsp[-1].node);
17080 void_expr(p, void_stmts(p, (yyval.node)));
17081 /*% ripper: ensure!($:2) %*/
17082 }
17083#line 17084 "parse.c"
17084 break;
17085
17086 case 643: /* strings: string */
17087#line 5903 "parse.y"
17088 {
17089 if (!(yyvsp[0].node)) {
17090 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
17091 }
17092 else {
17093 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
17094 }
17095 /*% ripper: $:1 %*/
17096 }
17097#line 17098 "parse.c"
17098 break;
17099
17100 case 646: /* string: string string1 */
17101#line 5917 "parse.y"
17102 {
17103 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17104 /*% ripper: string_concat!($:1, $:2) %*/
17105 }
17106#line 17107 "parse.c"
17107 break;
17108
17109 case 647: /* string1: "string literal" string_contents "terminator" */
17110#line 5924 "parse.y"
17111 {
17112 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
17113 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
17114 /*% ripper: $:2 %*/
17115 if (p->heredoc_indent > 0) {
17116 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
17117 p->heredoc_indent = 0;
17118 }
17119 /*% ripper: string_literal!($:$) %*/
17120 }
17121#line 17122 "parse.c"
17122 break;
17123
17124 case 648: /* xstring: "backtick literal" xstring_contents "terminator" */
17125#line 5937 "parse.y"
17126 {
17127 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
17128 /*% ripper: $:2 %*/
17129 if (p->heredoc_indent > 0) {
17130 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
17131 p->heredoc_indent = 0;
17132 }
17133 /*% ripper: xstring_literal!($:$) %*/
17134 }
17135#line 17136 "parse.c"
17136 break;
17137
17138 case 649: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
17139#line 5949 "parse.y"
17140 {
17141 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
17142 /*% ripper: regexp_literal!($:2, $:3) %*/
17143 }
17144#line 17145 "parse.c"
17145 break;
17146
17147 case 652: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
17148#line 3180 "parse.y"
17149 {
17150 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17151 /*% ripper: array!($:word_list) %*/
17152 }
17153#line 17154 "parse.c"
17154 break;
17155
17156 case 654: /* word_list: %empty */
17157#line 5959 "parse.y"
17158 {
17159 (yyval.node) = 0;
17160 /*% ripper: words_new! %*/
17161 }
17162#line 17163 "parse.c"
17163 break;
17164
17165 case 655: /* word_list: word_list word nonempty_list_' ' */
17166#line 5964 "parse.y"
17167 {
17168 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17169 /*% ripper: words_add!($:1, $:2) %*/
17170 }
17171#line 17172 "parse.c"
17172 break;
17173
17174 case 657: /* word: word string_content */
17175#line 5973 "parse.y"
17176 {
17177 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17178 /*% ripper: word_add!($:1, $:2) %*/
17179 }
17180#line 17181 "parse.c"
17181 break;
17182
17183 case 658: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
17184#line 3180 "parse.y"
17185 {
17186 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17187 /*% ripper: array!($:word_list) %*/
17188 }
17189#line 17190 "parse.c"
17190 break;
17191
17192 case 660: /* symbol_list: %empty */
17193#line 5983 "parse.y"
17194 {
17195 (yyval.node) = 0;
17196 /*% ripper: symbols_new! %*/
17197 }
17198#line 17199 "parse.c"
17199 break;
17200
17201 case 661: /* symbol_list: symbol_list word nonempty_list_' ' */
17202#line 5988 "parse.y"
17203 {
17204 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17205 /*% ripper: symbols_add!($:1, $:2) %*/
17206 }
17207#line 17208 "parse.c"
17208 break;
17209
17210 case 662: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
17211#line 3180 "parse.y"
17212 {
17213 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17214 /*% ripper: array!($:word_list) %*/
17215 }
17216#line 17217 "parse.c"
17217 break;
17218
17219 case 664: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
17220#line 3180 "parse.y"
17221 {
17222 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17223 /*% ripper: array!($:word_list) %*/
17224 }
17225#line 17226 "parse.c"
17226 break;
17227
17228 case 666: /* qword_list: %empty */
17229#line 6001 "parse.y"
17230 {
17231 (yyval.node) = 0;
17232 /*% ripper: qwords_new! %*/
17233 }
17234#line 17235 "parse.c"
17235 break;
17236
17237 case 667: /* qword_list: qword_list "literal content" nonempty_list_' ' */
17238#line 6006 "parse.y"
17239 {
17240 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17241 /*% ripper: qwords_add!($:1, $:2) %*/
17242 }
17243#line 17244 "parse.c"
17244 break;
17245
17246 case 668: /* qsym_list: %empty */
17247#line 6013 "parse.y"
17248 {
17249 (yyval.node) = 0;
17250 /*% ripper: qsymbols_new! %*/
17251 }
17252#line 17253 "parse.c"
17253 break;
17254
17255 case 669: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
17256#line 6018 "parse.y"
17257 {
17258 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17259 /*% ripper: qsymbols_add!($:1, $:2) %*/
17260 }
17261#line 17262 "parse.c"
17262 break;
17263
17264 case 670: /* string_contents: %empty */
17265#line 6025 "parse.y"
17266 {
17267 (yyval.node) = 0;
17268 /*% ripper: string_content! %*/
17269 }
17270#line 17271 "parse.c"
17271 break;
17272
17273 case 671: /* string_contents: string_contents string_content */
17274#line 6030 "parse.y"
17275 {
17276 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17277 /*% ripper: string_add!($:1, $:2) %*/
17278 }
17279#line 17280 "parse.c"
17280 break;
17281
17282 case 672: /* xstring_contents: %empty */
17283#line 6037 "parse.y"
17284 {
17285 (yyval.node) = 0;
17286 /*% ripper: xstring_new! %*/
17287 }
17288#line 17289 "parse.c"
17289 break;
17290
17291 case 673: /* xstring_contents: xstring_contents string_content */
17292#line 6042 "parse.y"
17293 {
17294 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17295 /*% ripper: xstring_add!($:1, $:2) %*/
17296 }
17297#line 17298 "parse.c"
17298 break;
17299
17300 case 674: /* regexp_contents: %empty */
17301#line 6049 "parse.y"
17302 {
17303 (yyval.node) = 0;
17304 /*% ripper: regexp_new! %*/
17305 }
17306#line 17307 "parse.c"
17307 break;
17308
17309 case 675: /* regexp_contents: regexp_contents string_content */
17310#line 6054 "parse.y"
17311 {
17312 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17313 if (!head) {
17314 (yyval.node) = tail;
17315 }
17316 else if (!tail) {
17317 (yyval.node) = head;
17318 }
17319 else {
17320 switch (nd_type(head)) {
17321 case NODE_STR:
17322 head = str2dstr(p, head);
17323 break;
17324 case NODE_DSTR:
17325 break;
17326 default:
17327 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17328 break;
17329 }
17330 (yyval.node) = list_append(p, head, tail);
17331 }
17332 /*% ripper: regexp_add!($:1, $:2) %*/
17333 }
17334#line 17335 "parse.c"
17335 break;
17336
17337 case 677: /* @33: %empty */
17338#line 6082 "parse.y"
17339 {
17340 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17341 (yyval.strterm) = p->lex.strterm;
17342 p->lex.strterm = 0;
17343 SET_LEX_STATE(EXPR_BEG);
17344 }
17345#line 17346 "parse.c"
17346 break;
17347
17348 case 678: /* string_content: tSTRING_DVAR @33 string_dvar */
17349#line 6089 "parse.y"
17350 {
17351 p->lex.strterm = (yyvsp[-1].strterm);
17352 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17353 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17354 /*% ripper: string_dvar!($:dvar) %*/
17355 }
17356#line 17357 "parse.c"
17357 break;
17358
17359 case 679: /* @34: %empty */
17360#line 6096 "parse.y"
17361 {
17362 CMDARG_PUSH(0);
17363 COND_PUSH(0);
17364 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17365 (yyval.strterm) = p->lex.strterm;
17366 p->lex.strterm = 0;
17367 SET_LEX_STATE(EXPR_BEG);
17368 }
17369#line 17370 "parse.c"
17370 break;
17371
17372 case 680: /* @35: %empty */
17373#line 6104 "parse.y"
17374 {
17375 (yyval.num) = p->lex.brace_nest;
17376 p->lex.brace_nest = 0;
17377 }
17378#line 17379 "parse.c"
17379 break;
17380
17381 case 681: /* @36: %empty */
17382#line 6108 "parse.y"
17383 {
17384 (yyval.num) = p->lex.lpar_beg;
17385 p->lex.lpar_beg = -1;
17386 }
17387#line 17388 "parse.c"
17388 break;
17389
17390 case 682: /* @37: %empty */
17391#line 6112 "parse.y"
17392 {
17393 (yyval.num) = p->heredoc_indent;
17394 p->heredoc_indent = 0;
17395 }
17396#line 17397 "parse.c"
17397 break;
17398
17399 case 683: /* string_content: "'#{'" @34 @35 @36 @37 compstmt_stmts string_dend */
17400#line 6117 "parse.y"
17401 {
17402 COND_POP();
17403 CMDARG_POP();
17404 p->lex.strterm = (yyvsp[-5].strterm);
17405 SET_LEX_STATE((yyvsp[-6].state));
17406 p->lex.brace_nest = (yyvsp[-4].num);
17407 p->lex.lpar_beg = (yyvsp[-3].num);
17408 p->heredoc_indent = (yyvsp[-2].num);
17409 p->heredoc_line_indent = -1;
17410 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17411 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[0]));
17412 /*% ripper: string_embexpr!($:compstmt) %*/
17413 }
17414#line 17415 "parse.c"
17415 break;
17416
17417 case 686: /* string_dvar: nonlocal_var */
17418#line 6137 "parse.y"
17419 {
17420 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17421 /*% ripper: var_ref!($:1) %*/
17422 }
17423#line 17424 "parse.c"
17424 break;
17425
17426 case 690: /* ssym: "symbol literal" sym */
17427#line 6149 "parse.y"
17428 {
17429 SET_LEX_STATE(EXPR_END);
17430 VALUE str = rb_id2str((yyvsp[0].id));
17431 /*
17432 * TODO:
17433 * set_yylval_noname sets invalid id to yylval.
17434 * This branch can be removed once yylval is changed to
17435 * hold lexed string.
17436 */
17437 if (!str) str = STR_NEW0();
17438 (yyval.node) = NEW_SYM(str, &(yyloc));
17439 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17440 }
17441#line 17442 "parse.c"
17442 break;
17443
17444 case 693: /* dsym: "symbol literal" string_contents "terminator" */
17445#line 6169 "parse.y"
17446 {
17447 SET_LEX_STATE(EXPR_END);
17448 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17449 /*% ripper: dyna_symbol!($:2) %*/
17450 }
17451#line 17452 "parse.c"
17452 break;
17453
17454 case 695: /* numeric: tUMINUS_NUM simple_numeric */
17455#line 6178 "parse.y"
17456 {
17457 (yyval.node) = (yyvsp[0].node);
17458 negate_lit(p, (yyval.node), &(yyloc));
17459 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17460 }
17461#line 17462 "parse.c"
17462 break;
17463
17464 case 706: /* keyword_variable: "'nil'" */
17465#line 6200 "parse.y"
17466 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17467#line 17468 "parse.c"
17468 break;
17469
17470 case 707: /* keyword_variable: "'self'" */
17471#line 6201 "parse.y"
17472 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17473#line 17474 "parse.c"
17474 break;
17475
17476 case 708: /* keyword_variable: "'true'" */
17477#line 6202 "parse.y"
17478 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17479#line 17480 "parse.c"
17480 break;
17481
17482 case 709: /* keyword_variable: "'false'" */
17483#line 6203 "parse.y"
17484 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17485#line 17486 "parse.c"
17486 break;
17487
17488 case 710: /* keyword_variable: "'__FILE__'" */
17489#line 6204 "parse.y"
17490 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17491#line 17492 "parse.c"
17492 break;
17493
17494 case 711: /* keyword_variable: "'__LINE__'" */
17495#line 6205 "parse.y"
17496 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17497#line 17498 "parse.c"
17498 break;
17499
17500 case 712: /* keyword_variable: "'__ENCODING__'" */
17501#line 6206 "parse.y"
17502 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17503#line 17504 "parse.c"
17504 break;
17505
17506 case 713: /* var_ref: user_variable */
17507#line 6210 "parse.y"
17508 {
17509 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17510 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17511 /*% ripper: var_ref!($:1) %*/
17512 }
17513 else {
17514 /*% ripper: vcall!($:1) %*/
17515 }
17516 }
17517#line 17518 "parse.c"
17518 break;
17519
17520 case 714: /* var_ref: keyword_variable */
17521#line 6220 "parse.y"
17522 {
17523 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17524 /*% ripper: var_ref!($:1) %*/
17525 }
17526#line 17527 "parse.c"
17527 break;
17528
17529 case 715: /* var_lhs: user_variable */
17530#line 6227 "parse.y"
17531 {
17532 /*% ripper: var_field!($:1) %*/
17533 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17534 }
17535#line 17536 "parse.c"
17536 break;
17537
17538 case 716: /* var_lhs: keyword_variable */
17539#line 6227 "parse.y"
17540 {
17541 /*% ripper: var_field!($:1) %*/
17542 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17543 }
17544#line 17545 "parse.c"
17545 break;
17546
17547 case 719: /* $@38: %empty */
17548#line 6238 "parse.y"
17549 {
17550 SET_LEX_STATE(EXPR_BEG);
17551 p->command_start = TRUE;
17552 }
17553#line 17554 "parse.c"
17554 break;
17555
17556 case 720: /* superclass: '<' $@38 expr_value term */
17557#line 6243 "parse.y"
17558 {
17559 (yyval.node) = (yyvsp[-1].node);
17560 /*% ripper: $:3 %*/
17561 }
17562#line 17563 "parse.c"
17563 break;
17564
17565 case 723: /* f_opt_paren_args: f_empty_arg */
17566#line 6252 "parse.y"
17567 {
17568 p->ctxt.in_argdef = 0;
17569 }
17570#line 17571 "parse.c"
17571 break;
17572
17573 case 724: /* f_empty_arg: %empty */
17574#line 6258 "parse.y"
17575 {
17576 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17577 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17578 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17579 }
17580#line 17581 "parse.c"
17581 break;
17582
17583 case 725: /* f_paren_args: '(' f_args rparen */
17584#line 6266 "parse.y"
17585 {
17586 (yyval.node_args) = (yyvsp[-1].node_args);
17587 /*% ripper: paren!($:2) %*/
17588 SET_LEX_STATE(EXPR_BEG);
17589 p->command_start = TRUE;
17590 p->ctxt.in_argdef = 0;
17591 }
17592#line 17593 "parse.c"
17593 break;
17594
17595 case 727: /* @39: %empty */
17596#line 6276 "parse.y"
17597 {
17598 (yyval.ctxt) = p->ctxt;
17599 p->ctxt.in_kwarg = 1;
17600 p->ctxt.in_argdef = 1;
17601 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17602 }
17603#line 17604 "parse.c"
17604 break;
17605
17606 case 728: /* f_arglist: @39 f_args term */
17607#line 6283 "parse.y"
17608 {
17609 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17610 p->ctxt.in_argdef = 0;
17611 (yyval.node_args) = (yyvsp[-1].node_args);
17612 SET_LEX_STATE(EXPR_BEG);
17613 p->command_start = TRUE;
17614 /*% ripper: $:2 %*/
17615 }
17616#line 17617 "parse.c"
17617 break;
17618
17619 case 729: /* f_kw_arg_value: f_label arg_value */
17620#line 3031 "parse.y"
17621 {
17622 p->ctxt.in_argdef = 1;
17623 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17624 /*% ripper: [$:$, $:value] %*/
17625 }
17626#line 17627 "parse.c"
17627 break;
17628
17629 case 730: /* f_kw_arg_value: f_label */
17630#line 3037 "parse.y"
17631 {
17632 p->ctxt.in_argdef = 1;
17633 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17634 /*% ripper: [$:$, 0] %*/
17635 }
17636#line 17637 "parse.c"
17637 break;
17638
17639 case 731: /* f_kwarg_arg_value: f_kw_arg_value */
17640#line 3046 "parse.y"
17641 {
17642 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17643 /*% ripper: rb_ary_new3(1, $:1) %*/
17644 }
17645#line 17646 "parse.c"
17646 break;
17647
17648 case 732: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17649#line 3051 "parse.y"
17650 {
17651 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17652 /*% ripper: rb_ary_push($:1, $:3) %*/
17653 }
17654#line 17655 "parse.c"
17655 break;
17656
17657 case 733: /* opt_f_block_arg_opt_comma: ',' f_block_arg */
17658#line 2968 "parse.y"
17659 {
17660 (yyval.id) = (yyvsp[0].id);
17661 /*% ripper: $:2 %*/
17662 }
17663#line 17664 "parse.c"
17664 break;
17665
17666 case 735: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_opt_comma */
17667#line 2945 "parse.y"
17668 {
17669 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17670 /*% ripper: [$:1, $:3, $:4] %*/
17671 }
17672#line 17673 "parse.c"
17673 break;
17674
17675 case 736: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value opt_f_block_arg_opt_comma */
17676#line 2950 "parse.y"
17677 {
17678 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17679 /*% ripper: [$:1, Qnil, $:2] %*/
17680 }
17681#line 17682 "parse.c"
17682 break;
17683
17684 case 737: /* args_tail_basic_arg_value_opt_comma: f_any_kwrest opt_f_block_arg_opt_comma */
17685#line 2955 "parse.y"
17686 {
17687 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17688 /*% ripper: [Qnil, $:1, $:2] %*/
17689 }
17690#line 17691 "parse.c"
17691 break;
17692
17693 case 738: /* args_tail_basic_arg_value_opt_comma: f_block_arg */
17694#line 2960 "parse.y"
17695 {
17696 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17697 /*% ripper: [Qnil, Qnil, $:1] %*/
17698 }
17699#line 17700 "parse.c"
17700 break;
17701
17702 case 740: /* args_tail: args_forward */
17703#line 6295 "parse.y"
17704 {
17705 add_forwarding_args(p);
17706 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[0].id), arg_FWD_BLOCK, &(yylsp[0]));
17707 (yyval.node_args)->nd_ainfo.forwarding = 1;
17708 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17709 }
17710#line 17711 "parse.c"
17711 break;
17712
17713 case 741: /* args_tail_basic_arg_value_none: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_none */
17714#line 2945 "parse.y"
17715 {
17716 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17717 /*% ripper: [$:1, $:3, $:4] %*/
17718 }
17719#line 17720 "parse.c"
17720 break;
17721
17722 case 742: /* args_tail_basic_arg_value_none: f_kwarg_arg_value opt_f_block_arg_none */
17723#line 2950 "parse.y"
17724 {
17725 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17726 /*% ripper: [$:1, Qnil, $:2] %*/
17727 }
17728#line 17729 "parse.c"
17729 break;
17730
17731 case 743: /* args_tail_basic_arg_value_none: f_any_kwrest opt_f_block_arg_none */
17732#line 2955 "parse.y"
17733 {
17734 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17735 /*% ripper: [Qnil, $:1, $:2] %*/
17736 }
17737#line 17738 "parse.c"
17738 break;
17739
17740 case 744: /* args_tail_basic_arg_value_none: f_block_arg */
17741#line 2960 "parse.y"
17742 {
17743 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17744 /*% ripper: [Qnil, Qnil, $:1] %*/
17745 }
17746#line 17747 "parse.c"
17747 break;
17748
17749 case 746: /* largs_tail: args_forward */
17750#line 6305 "parse.y"
17751 {
17752 yyerror1(&(yylsp[0]), "unexpected ... in lambda argument");
17753 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17754 (yyval.node_args)->nd_ainfo.forwarding = 1;
17755 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17756 }
17757#line 17758 "parse.c"
17758 break;
17759
17760 case 747: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17761#line 3009 "parse.y"
17762 {
17763 p->ctxt.in_argdef = 1;
17764 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17765 /*% ripper: [$:$, $:3] %*/
17766 }
17767#line 17768 "parse.c"
17768 break;
17769
17770 case 748: /* f_opt_arg_arg_value: f_opt_arg_value */
17771#line 3018 "parse.y"
17772 {
17773 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17774 /*% ripper: rb_ary_new3(1, $:1) %*/
17775 }
17776#line 17777 "parse.c"
17777 break;
17778
17779 case 749: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17780#line 3023 "parse.y"
17781 {
17782 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17783 /*% ripper: rb_ary_push($:1, $:3) %*/
17784 }
17785#line 17786 "parse.c"
17786 break;
17787
17788 case 750: /* opt_args_tail_args_tail_opt_comma: ',' args_tail */
17789#line 3118 "parse.y"
17790 {
17791 (yyval.node_args) = (yyvsp[0].node_args);
17792 /*% ripper: $:tail %*/
17793 }
17794#line 17795 "parse.c"
17795 break;
17796
17797 case 751: /* opt_args_tail_args_tail_opt_comma: opt_comma */
17798#line 3123 "parse.y"
17799 {
17800 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17801 /*% ripper: [Qnil, Qnil, Qnil] %*/
17802 }
17803#line 17804 "parse.c"
17804 break;
17805
17806 case 752: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17807#line 6315 "parse.y"
17808 {
17809 (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));
17810 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17811 }
17812#line 17813 "parse.c"
17813 break;
17814
17815 case 753: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17816#line 6320 "parse.y"
17817 {
17818 (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));
17819 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17820 }
17821#line 17822 "parse.c"
17822 break;
17823
17824 case 754: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17825#line 6325 "parse.y"
17826 {
17827 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17828 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17829 }
17830#line 17831 "parse.c"
17831 break;
17832
17833 case 755: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17834#line 6330 "parse.y"
17835 {
17836 (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));
17837 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17838 }
17839#line 17840 "parse.c"
17840 break;
17841
17842 case 756: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17843#line 6335 "parse.y"
17844 {
17845 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17846 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17847 }
17848#line 17849 "parse.c"
17849 break;
17850
17851 case 757: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17852#line 6340 "parse.y"
17853 {
17854 (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));
17855 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17856 }
17857#line 17858 "parse.c"
17858 break;
17859
17860 case 758: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17861#line 6345 "parse.y"
17862 {
17863 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17864 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17865 }
17866#line 17867 "parse.c"
17867 break;
17868
17869 case 759: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17870#line 6350 "parse.y"
17871 {
17872 (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));
17873 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17874 }
17875#line 17876 "parse.c"
17876 break;
17877
17878 case 760: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17879#line 6355 "parse.y"
17880 {
17881 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17882 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17883 }
17884#line 17885 "parse.c"
17885 break;
17886
17887 case 761: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17888#line 6360 "parse.y"
17889 {
17890 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17891 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17892 }
17893#line 17894 "parse.c"
17894 break;
17895
17896 case 762: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg opt_args_tail_args_tail_opt_comma */
17897#line 6365 "parse.y"
17898 {
17899 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17900 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17901 }
17902#line 17903 "parse.c"
17903 break;
17904
17905 case 763: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17906#line 6370 "parse.y"
17907 {
17908 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17909 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17910 }
17911#line 17912 "parse.c"
17912 break;
17913
17914 case 765: /* f_args-list_args_tail_opt_comma: f_arg opt_args_tail_args_tail_opt_comma */
17915#line 6387 "parse.y"
17916 {
17917 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17918 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17919 }
17920#line 17921 "parse.c"
17921 break;
17922
17923 case 766: /* tail-only-args_args_tail: args_tail */
17924#line 6378 "parse.y"
17925 {
17926 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17927 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17928 }
17929#line 17930 "parse.c"
17930 break;
17931
17932 case 770: /* opt_args_tail_largs_tail_none: ',' largs_tail */
17933#line 3118 "parse.y"
17934 {
17935 (yyval.node_args) = (yyvsp[0].node_args);
17936 /*% ripper: $:tail %*/
17937 }
17938#line 17939 "parse.c"
17939 break;
17940
17941 case 771: /* opt_args_tail_largs_tail_none: none */
17942#line 3123 "parse.y"
17943 {
17944 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17945 /*% ripper: [Qnil, Qnil, Qnil] %*/
17946 }
17947#line 17948 "parse.c"
17948 break;
17949
17950 case 772: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17951#line 6315 "parse.y"
17952 {
17953 (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));
17954 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17955 }
17956#line 17957 "parse.c"
17957 break;
17958
17959 case 773: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17960#line 6320 "parse.y"
17961 {
17962 (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));
17963 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17964 }
17965#line 17966 "parse.c"
17966 break;
17967
17968 case 774: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17969#line 6325 "parse.y"
17970 {
17971 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17972 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17973 }
17974#line 17975 "parse.c"
17975 break;
17976
17977 case 775: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17978#line 6330 "parse.y"
17979 {
17980 (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));
17981 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17982 }
17983#line 17984 "parse.c"
17984 break;
17985
17986 case 776: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg opt_args_tail_largs_tail_none */
17987#line 6335 "parse.y"
17988 {
17989 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17990 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17991 }
17992#line 17993 "parse.c"
17993 break;
17994
17995 case 777: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17996#line 6340 "parse.y"
17997 {
17998 (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));
17999 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
18000 }
18001#line 18002 "parse.c"
18002 break;
18003
18004 case 778: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
18005#line 6345 "parse.y"
18006 {
18007 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
18008 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
18009 }
18010#line 18011 "parse.c"
18011 break;
18012
18013 case 779: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
18014#line 6350 "parse.y"
18015 {
18016 (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));
18017 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
18018 }
18019#line 18020 "parse.c"
18020 break;
18021
18022 case 780: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value opt_args_tail_largs_tail_none */
18023#line 6355 "parse.y"
18024 {
18025 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
18026 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
18027 }
18028#line 18029 "parse.c"
18029 break;
18030
18031 case 781: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
18032#line 6360 "parse.y"
18033 {
18034 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
18035 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
18036 }
18037#line 18038 "parse.c"
18038 break;
18039
18040 case 782: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg opt_args_tail_largs_tail_none */
18041#line 6365 "parse.y"
18042 {
18043 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
18044 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
18045 }
18046#line 18047 "parse.c"
18047 break;
18048
18049 case 783: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
18050#line 6370 "parse.y"
18051 {
18052 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
18053 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
18054 }
18055#line 18056 "parse.c"
18056 break;
18057
18058 case 785: /* f_args-list_largs_tail_none: f_arg opt_args_tail_largs_tail_none */
18059#line 6387 "parse.y"
18060 {
18061 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
18062 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
18063 }
18064#line 18065 "parse.c"
18065 break;
18066
18067 case 786: /* tail-only-args_largs_tail: largs_tail */
18068#line 6378 "parse.y"
18069 {
18070 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
18071 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
18072 }
18073#line 18074 "parse.c"
18074 break;
18075
18076 case 790: /* args_forward: "(..." */
18077#line 6402 "parse.y"
18078 {
18079 (yyval.id) = idFWD_KWREST;
18080 /*% ripper: args_forward! %*/
18081 }
18082#line 18083 "parse.c"
18083 break;
18084
18085 case 791: /* f_bad_arg: "constant" */
18086#line 6409 "parse.y"
18087 {
18088 static const char mesg[] = "formal argument cannot be a constant";
18089 /*%%%*/
18090 yyerror1(&(yylsp[0]), mesg);
18091 /*% %*/
18092 (yyval.id) = 0;
18093 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18094 }
18095#line 18096 "parse.c"
18096 break;
18097
18098 case 792: /* f_bad_arg: "instance variable" */
18099#line 6418 "parse.y"
18100 {
18101 static const char mesg[] = "formal argument cannot be an instance variable";
18102 /*%%%*/
18103 yyerror1(&(yylsp[0]), mesg);
18104 /*% %*/
18105 (yyval.id) = 0;
18106 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18107 }
18108#line 18109 "parse.c"
18109 break;
18110
18111 case 793: /* f_bad_arg: "global variable" */
18112#line 6427 "parse.y"
18113 {
18114 static const char mesg[] = "formal argument cannot be a global variable";
18115 /*%%%*/
18116 yyerror1(&(yylsp[0]), mesg);
18117 /*% %*/
18118 (yyval.id) = 0;
18119 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18120 }
18121#line 18122 "parse.c"
18122 break;
18123
18124 case 794: /* f_bad_arg: "class variable" */
18125#line 6436 "parse.y"
18126 {
18127 static const char mesg[] = "formal argument cannot be a class variable";
18128 /*%%%*/
18129 yyerror1(&(yylsp[0]), mesg);
18130 /*% %*/
18131 (yyval.id) = 0;
18132 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18133 }
18134#line 18135 "parse.c"
18135 break;
18136
18137 case 796: /* f_norm_arg: "local variable or method" */
18138#line 6448 "parse.y"
18139 {
18140 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18141 if (e) {
18142 /*% ripper[error]: param_error!(?e, $:1) %*/
18143 }
18144 p->max_numparam = ORDINAL_PARAM;
18145 }
18146#line 18147 "parse.c"
18147 break;
18148
18149 case 797: /* f_arg_asgn: f_norm_arg */
18150#line 6458 "parse.y"
18151 {
18152 arg_var(p, (yyvsp[0].id));
18153 (yyval.id) = (yyvsp[0].id);
18154 }
18155#line 18156 "parse.c"
18156 break;
18157
18158 case 798: /* f_arg_item: f_arg_asgn */
18159#line 6465 "parse.y"
18160 {
18161 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
18162 /*% ripper: $:1 %*/
18163 }
18164#line 18165 "parse.c"
18165 break;
18166
18167 case 799: /* f_arg_item: "(" f_margs rparen */
18168#line 6470 "parse.y"
18169 {
18170 ID tid = internal_id(p);
18171 YYLTYPE loc;
18172 loc.beg_pos = (yylsp[-1]).beg_pos;
18173 loc.end_pos = (yylsp[-1]).beg_pos;
18174 arg_var(p, tid);
18175 if (dyna_in_block(p)) {
18176 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
18177 }
18178 else {
18179 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
18180 }
18181 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
18182 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
18183 /*% ripper: mlhs_paren!($:2) %*/
18184 }
18185#line 18186 "parse.c"
18186 break;
18187
18188 case 801: /* f_arg: f_arg ',' f_arg_item */
18189#line 6491 "parse.y"
18190 {
18191 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
18192 (yyval.node_args_aux)->nd_plen++;
18193 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
18194 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
18195 /*% ripper: rb_ary_push($:1, $:3) %*/
18196 }
18197#line 18198 "parse.c"
18198 break;
18199
18200 case 802: /* f_label: "label" */
18201#line 6502 "parse.y"
18202 {
18203 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18204 if (e) {
18205 (yyval.id) = 0;
18206 /*% ripper[error]: param_error!(?e, $:1) %*/
18207 }
18208 /*
18209 * Workaround for Prism::ParseTest#test_filepath for
18210 * "unparser/corpus/literal/def.txt"
18211 *
18212 * See the discussion on https://github.com/ruby/ruby/pull/9923
18213 */
18214 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
18215 /*% ripper: $:1 %*/
18216 p->max_numparam = ORDINAL_PARAM;
18217 p->ctxt.in_argdef = 0;
18218 }
18219#line 18220 "parse.c"
18220 break;
18221
18222 case 805: /* f_no_kwarg: p_kwnorest */
18223#line 6526 "parse.y"
18224 {
18225 /*% ripper: nokw_param!(Qnil) %*/
18226 }
18227#line 18228 "parse.c"
18228 break;
18229
18230 case 806: /* f_kwrest: kwrest_mark "local variable or method" */
18231#line 6532 "parse.y"
18232 {
18233 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18234 (yyval.id) = (yyvsp[0].id);
18235 /*% ripper: kwrest_param!($:2) %*/
18236 }
18237#line 18238 "parse.c"
18238 break;
18239
18240 case 807: /* f_kwrest: kwrest_mark */
18241#line 6538 "parse.y"
18242 {
18243 arg_var(p, idFWD_KWREST);
18244 (yyval.id) = idFWD_KWREST;
18245 /*% ripper: kwrest_param!(Qnil) %*/
18246 }
18247#line 18248 "parse.c"
18248 break;
18249
18250 case 810: /* f_rest_arg: restarg_mark "local variable or method" */
18251#line 6550 "parse.y"
18252 {
18253 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18254 (yyval.id) = (yyvsp[0].id);
18255 /*% ripper: rest_param!($:2) %*/
18256 }
18257#line 18258 "parse.c"
18258 break;
18259
18260 case 811: /* f_rest_arg: restarg_mark */
18261#line 6556 "parse.y"
18262 {
18263 arg_var(p, idFWD_REST);
18264 (yyval.id) = idFWD_REST;
18265 /*% ripper: rest_param!(Qnil) %*/
18266 }
18267#line 18268 "parse.c"
18268 break;
18269
18270 case 814: /* f_block_arg: blkarg_mark "local variable or method" */
18271#line 6568 "parse.y"
18272 {
18273 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18274 (yyval.id) = (yyvsp[0].id);
18275 /*% ripper: blockarg!($:2) %*/
18276 }
18277#line 18278 "parse.c"
18278 break;
18279
18280 case 815: /* f_block_arg: blkarg_mark "'nil'" */
18281#line 6574 "parse.y"
18282 {
18283 (yyval.id) = idNil;
18284 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
18285 }
18286#line 18287 "parse.c"
18287 break;
18288
18289 case 816: /* f_block_arg: blkarg_mark */
18290#line 6579 "parse.y"
18291 {
18292 arg_var(p, idFWD_BLOCK);
18293 (yyval.id) = idFWD_BLOCK;
18294 /*% ripper: blockarg!(Qnil) %*/
18295 }
18296#line 18297 "parse.c"
18297 break;
18298
18299 case 819: /* opt_comma: option_',' */
18300#line 6587 "parse.y"
18301 {
18302 (yyval.id) = 0;
18303 /*% ripper: Qnil %*/
18304 }
18305#line 18306 "parse.c"
18306 break;
18307
18308 case 820: /* value_expr_singleton_expr: singleton_expr */
18309#line 3172 "parse.y"
18310 {
18311 value_expr(p, (yyvsp[0].node));
18312 (yyval.node) = (yyvsp[0].node);
18313 }
18314#line 18315 "parse.c"
18315 break;
18316
18317 case 821: /* singleton: value_expr_singleton_expr */
18318#line 6595 "parse.y"
18319 {
18320 NODE *expr = last_expr_node((yyvsp[0].node));
18321 switch (nd_type(expr)) {
18322 case NODE_STR:
18323 case NODE_DSTR:
18324 case NODE_XSTR:
18325 case NODE_DXSTR:
18326 case NODE_REGX:
18327 case NODE_DREGX:
18328 case NODE_SYM:
18329 case NODE_LINE:
18330 case NODE_FILE:
18331 case NODE_ENCODING:
18332 case NODE_INTEGER:
18333 case NODE_FLOAT:
18334 case NODE_RATIONAL:
18335 case NODE_IMAGINARY:
18336 case NODE_DSYM:
18337 case NODE_LIST:
18338 case NODE_ZLIST:
18339 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
18340 break;
18341 default:
18342 break;
18343 }
18344 (yyval.node) = (yyvsp[0].node);
18345 }
18346#line 18347 "parse.c"
18347 break;
18348
18349 case 823: /* $@40: %empty */
18350#line 6626 "parse.y"
18351 {
18352 SET_LEX_STATE(EXPR_BEG);
18353 p->ctxt.in_argdef = 0;
18354 }
18355#line 18356 "parse.c"
18356 break;
18357
18358 case 824: /* singleton_expr: '(' $@40 expr rparen */
18359#line 6631 "parse.y"
18360 {
18361 p->ctxt.in_argdef = 1;
18362 (yyval.node) = (yyvsp[-1].node);
18363 /*% ripper: paren!($:3) %*/
18364 }
18365#line 18366 "parse.c"
18366 break;
18367
18368 case 826: /* assoc_list: assocs trailer */
18369#line 6640 "parse.y"
18370 {
18371 (yyval.node) = (yyvsp[-1].node);
18372 /*% ripper: assoclist_from_args!($:1) %*/
18373 }
18374#line 18375 "parse.c"
18375 break;
18376
18377 case 828: /* assocs: assocs ',' assoc */
18378#line 6649 "parse.y"
18379 {
18380 NODE *assocs = (yyvsp[-2].node);
18381 NODE *tail = (yyvsp[0].node);
18382 if (!assocs) {
18383 assocs = tail;
18384 }
18385 else if (tail) {
18386 NODE *n = RNODE_LIST(tail)->nd_next;
18387 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
18388 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
18389 /* DSTAR */
18390 tail = RNODE_HASH(n)->nd_head;
18391 }
18392 if (tail) {
18393 assocs = list_concat(assocs, tail);
18394 }
18395 }
18396 (yyval.node) = assocs;
18397 /*% ripper: rb_ary_push($:1, $:3) %*/
18398 }
18399#line 18400 "parse.c"
18400 break;
18401
18402 case 829: /* assoc: arg_value "=>" arg_value */
18403#line 6672 "parse.y"
18404 {
18405 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
18406 /*% ripper: assoc_new!($:1, $:3) %*/
18407 }
18408#line 18409 "parse.c"
18409 break;
18410
18411 case 830: /* assoc: "label" arg_value */
18412#line 6677 "parse.y"
18413 {
18414 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
18415 /*% ripper: assoc_new!($:1, $:2) %*/
18416 }
18417#line 18418 "parse.c"
18418 break;
18419
18420 case 831: /* assoc: "label" */
18421#line 6682 "parse.y"
18422 {
18423 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
18424 if (!val) val = NEW_ERROR(&(yyloc));
18425 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
18426 /*% ripper: assoc_new!($:1, Qnil) %*/
18427 }
18428#line 18429 "parse.c"
18429 break;
18430
18431 case 832: /* assoc: "string literal" string_contents tLABEL_END arg_value */
18432#line 6689 "parse.y"
18433 {
18434 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
18435 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
18436 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
18437 }
18438#line 18439 "parse.c"
18439 break;
18440
18441 case 833: /* assoc: "**arg" arg_value */
18442#line 6695 "parse.y"
18443 {
18444 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
18445 /*% ripper: assoc_splat!($:2) %*/
18446 }
18447#line 18448 "parse.c"
18448 break;
18449
18450 case 834: /* assoc: "**arg" */
18451#line 6700 "parse.y"
18452 {
18453 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
18454 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
18455 NEW_LVAR(idFWD_KWREST, &(yyloc)));
18456 /*% ripper: assoc_splat!(Qnil) %*/
18457 }
18458#line 18459 "parse.c"
18459 break;
18460
18461 case 853: /* term: ';' */
18462#line 6747 "parse.y"
18463 {
18464 yyerrok;
18465 token_flush(p);
18466 if (p->ctxt.in_defined) {
18467 p->ctxt.has_trailing_semicolon = 1;
18468 }
18469 }
18470#line 18471 "parse.c"
18471 break;
18472
18473 case 854: /* term: '\n' */
18474#line 6755 "parse.y"
18475 {
18476 (yyloc).end_pos = (yyloc).beg_pos;
18477 token_flush(p);
18478 }
18479#line 18480 "parse.c"
18480 break;
18481
18482 case 856: /* terms: terms ';' */
18483#line 6762 "parse.y"
18484 {yyerrok;}
18485#line 18486 "parse.c"
18486 break;
18487
18488 case 857: /* none: %empty */
18489#line 6766 "parse.y"
18490 {
18491 (yyval.node) = 0;
18492 /*% ripper: Qnil %*/
18493 }
18494#line 18495 "parse.c"
18495 break;
18496
18497
18498#line 18499 "parse.c"
18499
18500 default: break;
18501 }
18502 /* User semantic actions sometimes alter yychar, and that requires
18503 that yytoken be updated with the new translation. We take the
18504 approach of translating immediately before every use of yytoken.
18505 One alternative is translating here after every semantic action,
18506 but that translation would be missed if the semantic action invokes
18507 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18508 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18509 incorrect destructor might then be invoked immediately. In the
18510 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18511 to an incorrect destructor call or verbose syntax error message
18512 before the lookahead is translated. */
18513 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18514
18515 YYPOPSTACK (yylen);
18516 /* %after-reduce function. */
18517#line 2684 "parse.y"
18518 {after_reduce(yylen, p);}
18519#line 18520 "parse.c"
18520
18521 yylen = 0;
18522
18523 *++yyvsp = yyval;
18524 *++yylsp = yyloc;
18525
18526 /* Now 'shift' the result of the reduction. Determine what state
18527 that goes to, based on the state we popped back to and the rule
18528 number reduced by. */
18529 {
18530 const int yylhs = yyr1[yyn] - YYNTOKENS;
18531 const int yyi = yypgoto[yylhs] + *yyssp;
18532 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18533 ? yytable[yyi]
18534 : yydefgoto[yylhs]);
18535 }
18536
18537 goto yynewstate;
18538
18539
18540/*--------------------------------------.
18541| yyerrlab -- here on detecting error. |
18542`--------------------------------------*/
18543yyerrlab:
18544 /* Make sure we have latest lookahead translation. See comments at
18545 user semantic actions for why this is necessary. */
18546 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18547 /* If not already recovering from an error, report this error. */
18548 if (!yyerrstatus)
18549 {
18550 ++yynerrs;
18551 {
18552 yypcontext_t yyctx
18553 = {yyssp, yytoken, &yylloc};
18554 char const *yymsgp = YY_("syntax error");
18555 int yysyntax_error_status;
18556 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18557 if (yysyntax_error_status == 0)
18558 yymsgp = yymsg;
18559 else if (yysyntax_error_status == -1)
18560 {
18561 if (yymsg != yymsgbuf)
18562 YYSTACK_FREE (yymsg);
18563 yymsg = YY_CAST (char *,
18564 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18565 if (yymsg)
18566 {
18567 yysyntax_error_status
18568 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18569 yymsgp = yymsg;
18570 }
18571 else
18572 {
18573 yymsg = yymsgbuf;
18574 yymsg_alloc = sizeof yymsgbuf;
18575 yysyntax_error_status = YYENOMEM;
18576 }
18577 }
18578 yyerror (&yylloc, p, yymsgp);
18579 if (yysyntax_error_status == YYENOMEM)
18580 YYNOMEM;
18581 }
18582 }
18583
18584 yyerror_range[1] = yylloc;
18585 if (yyerrstatus == 3)
18586 {
18587 /* If just tried and failed to reuse lookahead token after an
18588 error, discard it. */
18589
18590 if (yychar <= END_OF_INPUT)
18591 {
18592 /* Return failure if at end of input. */
18593 if (yychar == END_OF_INPUT)
18594 YYABORT;
18595 }
18596 else
18597 {
18598 yydestruct ("Error: discarding",
18599 yytoken, &yylval, &yylloc, p);
18600 yychar = YYEMPTY;
18601 }
18602 }
18603
18604 /* Else will try to reuse lookahead token after shifting the error
18605 token. */
18606 goto yyerrlab1;
18607
18608
18609/*---------------------------------------------------.
18610| yyerrorlab -- error raised explicitly by YYERROR. |
18611`---------------------------------------------------*/
18612yyerrorlab:
18613 /* Pacify compilers when the user code never invokes YYERROR and the
18614 label yyerrorlab therefore never appears in user code. */
18615 if (0)
18616 YYERROR;
18617 ++yynerrs;
18618
18619 /* Do not reclaim the symbols of the rule whose action triggered
18620 this YYERROR. */
18621 YYPOPSTACK (yylen);
18622 /* %after-pop-stack function. */
18623#line 2686 "parse.y"
18624 {after_pop_stack(yylen, p);}
18625#line 18626 "parse.c"
18626
18627 yylen = 0;
18628 YY_STACK_PRINT (yyss, yyssp, p);
18629 yystate = *yyssp;
18630 goto yyerrlab1;
18631
18632
18633/*-------------------------------------------------------------.
18634| yyerrlab1 -- common code for both syntax error and YYERROR. |
18635`-------------------------------------------------------------*/
18636yyerrlab1:
18637 yyerrstatus = 3; /* Each real token shifted decrements this. */
18638
18639 /* Pop stack until we find a state that shifts the error token. */
18640 for (;;)
18641 {
18642 yyn = yypact[yystate];
18643 if (!yypact_value_is_default (yyn))
18644 {
18645 yyn += YYSYMBOL_YYerror;
18646 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18647 {
18648 yyn = yytable[yyn];
18649 if (0 < yyn)
18650 break;
18651 }
18652 }
18653
18654 /* Pop the current state because it cannot handle the error token. */
18655 if (yyssp == yyss)
18656 YYABORT;
18657
18658 yyerror_range[1] = *yylsp;
18659 yydestruct ("Error: popping",
18660 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18661 YYPOPSTACK (1);
18662 /* %after-pop-stack function. */
18663#line 2686 "parse.y"
18664 {after_pop_stack(1, p);}
18665#line 18666 "parse.c"
18666
18667 yystate = *yyssp;
18668 YY_STACK_PRINT (yyss, yyssp, p);
18669 }
18670
18671 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18672 *++yyvsp = yylval;
18673 YY_IGNORE_MAYBE_UNINITIALIZED_END
18674
18675 yyerror_range[2] = yylloc;
18676 ++yylsp;
18677 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18678
18679 /* Shift the error token. */
18680 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18681 /* %after-shift-error-token code. */
18682#line 2685 "parse.y"
18683 {after_shift_error_token(p);}
18684#line 18685 "parse.c"
18685
18686
18687 yystate = yyn;
18688 goto yynewstate;
18689
18690
18691/*-------------------------------------.
18692| yyacceptlab -- YYACCEPT comes here. |
18693`-------------------------------------*/
18694yyacceptlab:
18695 yyresult = 0;
18696 goto yyreturnlab;
18697
18698
18699/*-----------------------------------.
18700| yyabortlab -- YYABORT comes here. |
18701`-----------------------------------*/
18702yyabortlab:
18703 yyresult = 1;
18704 goto yyreturnlab;
18705
18706
18707/*-----------------------------------------------------------.
18708| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18709`-----------------------------------------------------------*/
18710yyexhaustedlab:
18711 yyerror (&yylloc, p, YY_("memory exhausted"));
18712 yyresult = 2;
18713 goto yyreturnlab;
18714
18715
18716/*----------------------------------------------------------.
18717| yyreturnlab -- parsing is finished, clean up and return. |
18718`----------------------------------------------------------*/
18719yyreturnlab:
18720 if (yychar != YYEMPTY)
18721 {
18722 /* Make sure we have latest lookahead translation. See comments at
18723 user semantic actions for why this is necessary. */
18724 yytoken = YYTRANSLATE (yychar);
18725 yydestruct ("Cleanup: discarding lookahead",
18726 yytoken, &yylval, &yylloc, p);
18727 }
18728 /* Do not reclaim the symbols of the rule whose action triggered
18729 this YYABORT or YYACCEPT. */
18730 YYPOPSTACK (yylen);
18731 YY_STACK_PRINT (yyss, yyssp, p);
18732 while (yyssp != yyss)
18733 {
18734 yydestruct ("Cleanup: popping",
18735 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18736 YYPOPSTACK (1);
18737 }
18738#ifndef yyoverflow
18739 if (yyss != yyssa)
18740 YYSTACK_FREE (yyss);
18741#endif
18742 if (yymsg != yymsgbuf)
18743 YYSTACK_FREE (yymsg);
18744 return yyresult;
18745}
18746
18747#line 6771 "parse.y"
18748
18749# undef p
18750# undef yylex
18751# undef yylval
18752# define yylval (*p->lval)
18753
18754static int regx_options(struct parser_params*);
18755static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18756static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18757static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18758static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18759
18760#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18761
18762# define set_yylval_node(x) { \
18763 YYLTYPE _cur_loc; \
18764 rb_parser_set_location(p, &_cur_loc); \
18765 yylval.node = (x); \
18766 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18767}
18768# define set_yylval_str(x) \
18769do { \
18770 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18771 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18772} while(0)
18773# define set_yylval_num(x) { \
18774 yylval.num = (x); \
18775 set_parser_s_value(x); \
18776}
18777# define set_yylval_id(x) (yylval.id = (x))
18778# define set_yylval_name(x) { \
18779 (yylval.id = (x)); \
18780 set_parser_s_value(ID2SYM(x)); \
18781}
18782# define yylval_id() (yylval.id)
18783
18784#define set_yylval_noname() set_yylval_id(keyword_nil)
18785#define has_delayed_token(p) (p->delayed.token != NULL)
18786
18787#ifndef RIPPER
18788#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18789#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18790
18791static bool
18792parser_has_token(struct parser_params *p)
18793{
18794 const char *const pcur = p->lex.pcur;
18795 const char *const ptok = p->lex.ptok;
18796 if (p->keep_tokens && (pcur < ptok)) {
18797 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18798 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18799 }
18800 return pcur > ptok;
18801}
18802
18803static const char *
18804escaped_char(int c)
18805{
18806 switch (c) {
18807 case '"': return "\\\"";
18808 case '\\': return "\\\\";
18809 case '\0': return "\\0";
18810 case '\n': return "\\n";
18811 case '\r': return "\\r";
18812 case '\t': return "\\t";
18813 case '\f': return "\\f";
18814 case '\013': return "\\v";
18815 case '\010': return "\\b";
18816 case '\007': return "\\a";
18817 case '\033': return "\\e";
18818 case '\x7f': return "\\c?";
18819 }
18820 return NULL;
18821}
18822
18823static rb_parser_string_t *
18824rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18825{
18826 rb_encoding *enc = p->enc;
18827 const char *ptr = str->ptr;
18828 const char *pend = ptr + str->len;
18829 const char *prev = ptr;
18830 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18831 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18832
18833 while (ptr < pend) {
18834 unsigned int c;
18835 const char *cc;
18836 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18837 if (!MBCLEN_CHARFOUND_P(n)) {
18838 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18839 n = rb_enc_mbminlen(enc);
18840 if (pend < ptr + n)
18841 n = (int)(pend - ptr);
18842 while (n--) {
18843 c = ((unsigned char)*ptr >> 4) & 0x0f;
18844 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18845 c = *ptr & 0x0f;
18846 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18847 parser_str_cat(result, charbuf, 4);
18848 prev = ++ptr;
18849 }
18850 continue;
18851 }
18852 n = MBCLEN_CHARFOUND_LEN(n);
18853 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18854 ptr += n;
18855 cc = escaped_char(c);
18856 if (cc) {
18857 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18858 parser_str_cat_cstr(result, cc);
18859 prev = ptr;
18860 }
18861 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18862 }
18863 else {
18864 if (ptr - n > prev) {
18865 parser_str_cat(result, prev, ptr - n - prev);
18866 prev = ptr - n;
18867 }
18868 parser_str_cat(result, prev, ptr - prev);
18869 prev = ptr;
18870 }
18871 }
18872 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18873
18874 return result;
18875}
18876
18877static void
18878parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18879{
18881 token->id = p->token_id;
18882 token->type_name = parser_token2char(p, t);
18883 token->str = str;
18884 token->loc.beg_pos = p->yylloc->beg_pos;
18885 token->loc.end_pos = p->yylloc->end_pos;
18886 rb_parser_ary_push_ast_token(p, p->tokens, token);
18887 p->token_id++;
18888
18889 if (p->debug) {
18890 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18891 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18892 line, token->id, token->type_name, str_escaped->ptr,
18893 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18894 token->loc.end_pos.lineno, token->loc.end_pos.column);
18895 rb_parser_string_free(p, str_escaped);
18896 }
18897}
18898
18899static void
18900parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18901{
18902 debug_token_line(p, "parser_dispatch_scan_event", line);
18903
18904 if (!parser_has_token(p)) return;
18905
18906 RUBY_SET_YYLLOC(*p->yylloc);
18907
18908 if (p->keep_tokens) {
18909 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18910 parser_append_tokens(p, str, t, line);
18911 }
18912
18913 token_flush(p);
18914}
18915
18916#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18917static void
18918parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18919{
18920 debug_token_line(p, "parser_dispatch_delayed_token", line);
18921
18922 if (!has_delayed_token(p)) return;
18923
18924 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18925
18926 if (p->keep_tokens) {
18927 /* p->delayed.token is freed by rb_parser_tokens_free */
18928 parser_append_tokens(p, p->delayed.token, t, line);
18929 }
18930 else {
18931 rb_parser_string_free(p, p->delayed.token);
18932 }
18933
18934 p->delayed.token = NULL;
18935}
18936#else
18937#define literal_flush(p, ptr) ((void)(ptr))
18938
18939static int
18940ripper_has_scan_event(struct parser_params *p)
18941{
18942 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18943 return p->lex.pcur > p->lex.ptok;
18944}
18945
18946static VALUE
18947ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18948{
18949 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18950 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18951 RUBY_SET_YYLLOC(*p->yylloc);
18952 token_flush(p);
18953 return rval;
18954}
18955
18956static void
18957ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18958{
18959 if (!ripper_has_scan_event(p)) return;
18960
18961 set_parser_s_value(ripper_scan_event_val(p, t));
18962}
18963#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18964
18965static void
18966ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18967{
18968 /* save and adjust the location to delayed token for callbacks */
18969 int saved_line = p->ruby_sourceline;
18970 const char *saved_tokp = p->lex.ptok;
18971 VALUE s_value, str;
18972
18973 if (!has_delayed_token(p)) return;
18974 p->ruby_sourceline = p->delayed.beg_line;
18975 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18976 str = rb_str_new_mutable_parser_string(p->delayed.token);
18977 rb_parser_string_free(p, p->delayed.token);
18978 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18979 set_parser_s_value(s_value);
18980 p->delayed.token = NULL;
18981 p->ruby_sourceline = saved_line;
18982 p->lex.ptok = saved_tokp;
18983}
18984#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18985#endif /* RIPPER */
18986
18987static inline int
18988is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18989{
18990 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18991}
18992
18993static inline bool
18994peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18995{
18996 const char *ptr = p->lex.pcur + at;
18997 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18998 if (memcmp(ptr, str, len)) return false;
18999 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
19000 switch (ptr[len]) {
19001 case '!': case '?': return false;
19002 }
19003 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
19004}
19005
19006static inline int
19007parser_is_identchar(struct parser_params *p)
19008{
19009 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
19010}
19011
19012static inline int
19013parser_isascii(struct parser_params *p)
19014{
19015 return ISASCII(*(p->lex.pcur-1));
19016}
19017
19018static void
19019token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
19020{
19021 int column = 1, nonspc = 0, i;
19022 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
19023 if (*ptr == '\t') {
19024 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
19025 }
19026 column++;
19027 if (*ptr != ' ' && *ptr != '\t') {
19028 nonspc = 1;
19029 }
19030 }
19031
19032 ptinfo->beg = loc->beg_pos;
19033 ptinfo->indent = column;
19034 ptinfo->nonspc = nonspc;
19035}
19036
19037static void
19038token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
19039{
19040 token_info *ptinfo;
19041
19042 if (!p->token_info_enabled) return;
19043 ptinfo = ALLOC(token_info);
19044 ptinfo->token = token;
19045 ptinfo->next = p->token_info;
19046 token_info_setup(ptinfo, p->lex.pbeg, loc);
19047
19048 p->token_info = ptinfo;
19049}
19050
19051static void
19052token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
19053{
19054 token_info *ptinfo_beg = p->token_info;
19055
19056 if (!ptinfo_beg) return;
19057
19058 /* indentation check of matched keywords (begin..end, if..end, etc.) */
19059 token_info_warn(p, token, ptinfo_beg, 1, loc);
19060
19061 p->token_info = ptinfo_beg->next;
19062 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
19063}
19064
19065static void
19066token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
19067{
19068 token_info *ptinfo_beg = p->token_info;
19069
19070 if (!ptinfo_beg) return;
19071 p->token_info = ptinfo_beg->next;
19072
19073 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
19074 ptinfo_beg->beg.column != beg_pos.column ||
19075 strcmp(ptinfo_beg->token, token)) {
19076 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
19077 beg_pos.lineno, beg_pos.column, token,
19078 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
19079 ptinfo_beg->token);
19080 }
19081
19082 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
19083}
19084
19085static void
19086token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
19087{
19088 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
19089 if (!p->token_info_enabled) return;
19090 if (!ptinfo_beg) return;
19091 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
19092 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
19093 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
19094 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
19095 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
19096 rb_warn3L(ptinfo_end->beg.lineno,
19097 "mismatched indentations at '%s' with '%s' at %d",
19098 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
19099}
19100
19101static int
19102parser_precise_mbclen(struct parser_params *p, const char *ptr)
19103{
19104 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
19105 if (!MBCLEN_CHARFOUND_P(len)) {
19106 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
19107 return -1;
19108 }
19109 return len;
19110}
19111
19112#ifndef RIPPER
19113static inline void
19114parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19115{
19116 rb_parser_string_t *str;
19117 int lineno = p->ruby_sourceline;
19118 if (!yylloc) {
19119 return;
19120 }
19121 else if (yylloc->beg_pos.lineno == lineno) {
19122 str = p->lex.lastline;
19123 }
19124 else {
19125 return;
19126 }
19127 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
19128}
19129
19130static int
19131parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
19132{
19133#if 0
19134 YYLTYPE current;
19135
19136 if (!yylloc) {
19137 yylloc = RUBY_SET_YYLLOC(current);
19138 }
19139 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
19140 p->ruby_sourceline != yylloc->end_pos.lineno)) {
19141 yylloc = 0;
19142 }
19143#endif
19144 parser_compile_error(p, yylloc, "%s", msg);
19145 parser_show_error_line(p, yylloc);
19146 return 0;
19147}
19148
19149static int
19150parser_yyerror0(struct parser_params *p, const char *msg)
19151{
19152 YYLTYPE current;
19153 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
19154}
19155
19156void
19157ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
19158{
19159 VALUE mesg;
19160 const int max_line_margin = 30;
19161 const char *ptr, *ptr_end, *pt, *pb;
19162 const char *pre = "", *post = "", *pend;
19163 const char *code = "", *caret = "";
19164 const char *lim;
19165 const char *const pbeg = PARSER_STRING_PTR(str);
19166 char *buf;
19167 long len;
19168 int i;
19169
19170 if (!yylloc) return;
19171 pend = rb_parser_string_end(str);
19172 if (pend > pbeg && pend[-1] == '\n') {
19173 if (--pend > pbeg && pend[-1] == '\r') --pend;
19174 }
19175
19176 pt = pend;
19177 if (lineno == yylloc->end_pos.lineno &&
19178 (pend - pbeg) > yylloc->end_pos.column) {
19179 pt = pbeg + yylloc->end_pos.column;
19180 }
19181
19182 ptr = ptr_end = pt;
19183 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
19184 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
19185
19186 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
19187 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
19188
19189 len = ptr_end - ptr;
19190 if (len > 4) {
19191 if (ptr > pbeg) {
19192 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
19193 if (ptr > pbeg) pre = "...";
19194 }
19195 if (ptr_end < pend) {
19196 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
19197 if (ptr_end < pend) post = "...";
19198 }
19199 }
19200 pb = pbeg;
19201 if (lineno == yylloc->beg_pos.lineno) {
19202 pb += yylloc->beg_pos.column;
19203 if (pb > pt) pb = pt;
19204 }
19205 if (pb < ptr) pb = ptr;
19206 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
19207 return;
19208 }
19209 if (RTEST(errbuf)) {
19210 mesg = rb_attr_get(errbuf, idMesg);
19211 if (char_at_end(p, mesg, '\n') != '\n')
19212 rb_str_cat_cstr(mesg, "\n");
19213 }
19214 else {
19215 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
19216 }
19217 if (!errbuf && rb_stderr_tty_p()) {
19218#define CSI_BEGIN "\033["
19219#define CSI_SGR "m"
19220 rb_str_catf(mesg,
19221 CSI_BEGIN""CSI_SGR"%s" /* pre */
19222 CSI_BEGIN"1"CSI_SGR"%.*s"
19223 CSI_BEGIN"1;4"CSI_SGR"%.*s"
19224 CSI_BEGIN";1"CSI_SGR"%.*s"
19225 CSI_BEGIN""CSI_SGR"%s" /* post */
19226 "\n",
19227 pre,
19228 (int)(pb - ptr), ptr,
19229 (int)(pt - pb), pb,
19230 (int)(ptr_end - pt), pt,
19231 post);
19232 }
19233 else {
19234 char *p2;
19235
19236 len = ptr_end - ptr;
19237 lim = pt < pend ? pt : pend;
19238 i = (int)(lim - ptr);
19239 buf = ALLOCA_N(char, i+2);
19240 code = ptr;
19241 caret = p2 = buf;
19242 if (ptr <= pb) {
19243 while (ptr < pb) {
19244 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
19245 }
19246 *p2++ = '^';
19247 ptr++;
19248 }
19249 if (lim > ptr) {
19250 memset(p2, '~', (lim - ptr));
19251 p2 += (lim - ptr);
19252 }
19253 *p2 = '\0';
19254 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
19255 pre, (int)len, code, post,
19256 pre, caret);
19257 }
19258 if (!errbuf) rb_write_error_str(mesg);
19259}
19260#else
19261
19262static int
19263parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
19264{
19265 const char *pcur = 0, *ptok = 0;
19266 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
19267 p->ruby_sourceline == yylloc->end_pos.lineno) {
19268 pcur = p->lex.pcur;
19269 ptok = p->lex.ptok;
19270 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
19271 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
19272 }
19273 parser_yyerror0(p, msg);
19274 if (pcur) {
19275 p->lex.ptok = ptok;
19276 p->lex.pcur = pcur;
19277 }
19278 return 0;
19279}
19280
19281static int
19282parser_yyerror0(struct parser_params *p, const char *msg)
19283{
19284 dispatch1(parse_error, STR_NEW2(msg));
19285 ripper_error(p);
19286 return 0;
19287}
19288
19289static inline void
19290parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19291{
19292}
19293#endif /* !RIPPER */
19294
19295static int
19296vtable_size(const struct vtable *tbl)
19297{
19298 if (!DVARS_TERMINAL_P(tbl)) {
19299 return tbl->pos;
19300 }
19301 else {
19302 return 0;
19303 }
19304}
19305
19306static struct vtable *
19307vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
19308{
19309 struct vtable *tbl = ALLOC(struct vtable);
19310 tbl->pos = 0;
19311 tbl->capa = 8;
19312 tbl->tbl = ALLOC_N(ID, tbl->capa);
19313 tbl->prev = prev;
19314#ifndef RIPPER
19315 if (p->debug) {
19316 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
19317 }
19318#endif
19319 return tbl;
19320}
19321#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
19322
19323static void
19324vtable_free_gen(struct parser_params *p, int line, const char *name,
19325 struct vtable *tbl)
19326{
19327#ifndef RIPPER
19328 if (p->debug) {
19329 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
19330 }
19331#endif
19332 if (!DVARS_TERMINAL_P(tbl)) {
19333 if (tbl->tbl) {
19334 ruby_xfree_sized(tbl->tbl, tbl->capa * sizeof(ID));
19335 }
19336 ruby_xfree_sized(tbl, sizeof(*tbl));
19337 }
19338}
19339#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
19340
19341static void
19342vtable_add_gen(struct parser_params *p, int line, const char *name,
19343 struct vtable *tbl, ID id)
19344{
19345#ifndef RIPPER
19346 if (p->debug) {
19347 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
19348 line, name, (void *)tbl, rb_id2name(id));
19349 }
19350#endif
19351 if (DVARS_TERMINAL_P(tbl)) {
19352 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
19353 return;
19354 }
19355 if (tbl->pos == tbl->capa) {
19356 tbl->capa = tbl->capa * 2;
19357 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
19358 }
19359 tbl->tbl[tbl->pos++] = id;
19360}
19361#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
19362
19363static void
19364vtable_pop_gen(struct parser_params *p, int line, const char *name,
19365 struct vtable *tbl, int n)
19366{
19367 if (p->debug) {
19368 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
19369 line, name, (void *)tbl, n);
19370 }
19371 if (tbl->pos < n) {
19372 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
19373 return;
19374 }
19375 tbl->pos -= n;
19376}
19377#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
19378
19379static int
19380vtable_included(const struct vtable * tbl, ID id)
19381{
19382 int i;
19383
19384 if (!DVARS_TERMINAL_P(tbl)) {
19385 for (i = 0; i < tbl->pos; i++) {
19386 if (tbl->tbl[i] == id) {
19387 return i+1;
19388 }
19389 }
19390 }
19391 return 0;
19392}
19393
19394static void parser_prepare(struct parser_params *p);
19395
19396static int
19397e_option_supplied(struct parser_params *p)
19398{
19399 return strcmp(p->ruby_sourcefile, "-e") == 0;
19400}
19401
19402#ifndef RIPPER
19403static NODE *parser_append_options(struct parser_params *p, NODE *node);
19404
19405static VALUE
19406yycompile0(VALUE arg)
19407{
19408 int n;
19409 NODE *tree;
19410 struct parser_params *p = (struct parser_params *)arg;
19411 int cov = FALSE;
19412
19413 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
19414 cov = TRUE;
19415 }
19416
19417 if (p->debug_lines) {
19418 p->ast->body.script_lines = p->debug_lines;
19419 }
19420
19421 parser_prepare(p);
19422#define RUBY_DTRACE_PARSE_HOOK(name) \
19423 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
19424 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
19425 }
19426 RUBY_DTRACE_PARSE_HOOK(BEGIN);
19427 n = yyparse(p);
19428 RUBY_DTRACE_PARSE_HOOK(END);
19429
19430 p->debug_lines = 0;
19431
19432 xfree(p->lex.strterm);
19433 p->lex.strterm = 0;
19434 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
19435 if (n || p->error_p) {
19436 VALUE mesg = p->error_buffer;
19437 if (!mesg) {
19438 mesg = syntax_error_new();
19439 }
19440 if (!p->error_tolerant) {
19441 rb_set_errinfo(mesg);
19442 return FALSE;
19443 }
19444 }
19445 tree = p->eval_tree;
19446 if (!tree) {
19447 tree = NEW_NIL(&NULL_LOC);
19448 }
19449 else {
19450 rb_parser_ary_t *tokens = p->tokens;
19451 NODE *prelude;
19452 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
19453 prelude = block_append(p, p->eval_tree_begin, body);
19454 RNODE_SCOPE(tree)->nd_body = prelude;
19455 p->ast->body.frozen_string_literal = p->frozen_string_literal;
19456 p->ast->body.coverage_enabled = cov;
19457 if (p->keep_tokens) {
19458 p->ast->node_buffer->tokens = tokens;
19459 p->tokens = NULL;
19460 }
19461 }
19462 p->ast->body.root = tree;
19463 p->ast->body.line_count = p->line_count;
19464 return TRUE;
19465}
19466
19467static rb_ast_t *
19468yycompile(struct parser_params *p, VALUE fname, int line)
19469{
19470 rb_ast_t *ast;
19471 if (NIL_P(fname)) {
19472 p->ruby_sourcefile_string = Qnil;
19473 p->ruby_sourcefile = "(none)";
19474 }
19475 else {
19476 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
19477 p->ruby_sourcefile = StringValueCStr(fname);
19478 }
19479 p->ruby_sourceline = line - 1;
19480
19481 p->lvtbl = NULL;
19482
19483 p->ast = ast = rb_ast_new();
19484 compile_callback(yycompile0, (VALUE)p);
19485 ast->body.source_hash = rb_source_hash_finalize(&p->source_hash);
19486 ast->body.has_source_hash = 1;
19487 p->ast = 0;
19488
19489 while (p->lvtbl) {
19490 local_pop(p);
19491 }
19492
19493 return ast;
19494}
19495#endif /* !RIPPER */
19496
19497static rb_encoding *
19498must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19499{
19500 rb_encoding *enc = rb_parser_str_get_encoding(s);
19501 if (!rb_enc_asciicompat(enc)) {
19502 rb_raise(rb_eArgError, "invalid source encoding");
19503 }
19504 return enc;
19505}
19506
19507static rb_parser_string_t *
19508lex_getline(struct parser_params *p)
19509{
19510 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19511 if (!line) return 0;
19512 p->line_count++;
19513 rb_source_hash_update(&p->source_hash, (const uint8_t *)line->ptr, (size_t)line->len);
19514 string_buffer_append(p, line);
19515 must_be_ascii_compatible(p, line);
19516 return line;
19517}
19518
19519#ifndef RIPPER
19520rb_ast_t*
19521rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19522{
19523 p->lex.gets = gets;
19524 p->lex.input = input;
19525 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19526
19527 return yycompile(p, fname, line);
19528}
19529#endif /* !RIPPER */
19530
19531#define STR_FUNC_ESCAPE 0x01
19532#define STR_FUNC_EXPAND 0x02
19533#define STR_FUNC_REGEXP 0x04
19534#define STR_FUNC_QWORDS 0x08
19535#define STR_FUNC_SYMBOL 0x10
19536#define STR_FUNC_INDENT 0x20
19537#define STR_FUNC_LABEL 0x40
19538#define STR_FUNC_LIST 0x4000
19539#define STR_FUNC_TERM 0x8000
19540
19541enum string_type {
19542 str_label = STR_FUNC_LABEL,
19543 str_squote = (0),
19544 str_dquote = (STR_FUNC_EXPAND),
19545 str_xquote = (STR_FUNC_EXPAND),
19546 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19547 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19548 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19549 str_ssym = (STR_FUNC_SYMBOL),
19550 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19551};
19552
19553static rb_parser_string_t *
19554parser_str_new(struct parser_params *p, const char *ptr, rb_len_t len, rb_encoding *enc, int func, rb_encoding *enc0)
19555{
19556 rb_parser_string_t *pstr;
19557
19558 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19559
19560 if (!(func & STR_FUNC_REGEXP)) {
19561 if (rb_parser_is_ascii_string(p, pstr)) {
19562 }
19563 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19564 /* everything is valid in ASCII-8BIT */
19565 enc = rb_ascii8bit_encoding();
19566 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19567 }
19568 }
19569
19570 return pstr;
19571}
19572
19573static int
19574strterm_is_heredoc(rb_strterm_t *strterm)
19575{
19576 return strterm->heredoc;
19577}
19578
19579static rb_strterm_t *
19580new_strterm(struct parser_params *p, int func, int term, int paren)
19581{
19582 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19583 strterm->u.literal.func = func;
19584 strterm->u.literal.term = term;
19585 strterm->u.literal.paren = paren;
19586 return strterm;
19587}
19588
19589static rb_strterm_t *
19590new_heredoc(struct parser_params *p)
19591{
19592 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19593 strterm->heredoc = true;
19594 return strterm;
19595}
19596
19597#define peek(p,c) peek_n(p, (c), 0)
19598#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19599#define peekc(p) peekc_n(p, 0)
19600#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19601
19602#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19603static void
19604parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19605{
19606 debug_token_line(p, "add_delayed_token", line);
19607
19608 if (tok < end) {
19609 if (has_delayed_token(p)) {
19610 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19611 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19612 int end_col = (next_line ? 0 : p->delayed.end_col);
19613 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19614 dispatch_delayed_token(p, tSTRING_CONTENT);
19615 }
19616 }
19617 if (!has_delayed_token(p)) {
19618 p->delayed.token = rb_parser_string_new(p, 0, 0);
19619 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19620 p->delayed.beg_line = p->ruby_sourceline;
19621 p->delayed.beg_col = rb_len2int(tok - p->lex.pbeg);
19622 }
19623 parser_str_cat(p->delayed.token, tok, end - tok);
19624 p->delayed.end_line = p->ruby_sourceline;
19625 p->delayed.end_col = rb_len2int(end - p->lex.pbeg);
19626 p->lex.ptok = end;
19627 }
19628}
19629
19630static void
19631set_lastline(struct parser_params *p, rb_parser_string_t *str)
19632{
19633 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19634 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19635 p->lex.lastline = str;
19636}
19637
19638static int
19639nextline(struct parser_params *p, int set_encoding)
19640{
19641 rb_parser_string_t *str = p->lex.nextline;
19642 p->lex.nextline = 0;
19643 if (!str) {
19644 if (p->eofp)
19645 return -1;
19646
19647 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19648 goto end_of_input;
19649 }
19650
19651 if (!p->lex.input || !(str = lex_getline(p))) {
19652 end_of_input:
19653 p->eofp = 1;
19654 lex_goto_eol(p);
19655 return -1;
19656 }
19657#ifndef RIPPER
19658 if (p->debug_lines) {
19659 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19660 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19661 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19662 }
19663#endif
19664 p->cr_seen = FALSE;
19665 }
19666 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19667 /* after here-document without terminator */
19668 goto end_of_input;
19669 }
19670 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19671 if (p->heredoc_end > 0) {
19672 p->ruby_sourceline = p->heredoc_end;
19673 p->heredoc_end = 0;
19674 }
19675 p->ruby_sourceline++;
19676 set_lastline(p, str);
19677 token_flush(p);
19678 return 0;
19679}
19680
19681static int
19682parser_cr(struct parser_params *p, int c)
19683{
19684 if (peek(p, '\n')) {
19685 p->lex.pcur++;
19686 c = '\n';
19687 }
19688 return c;
19689}
19690
19691static inline int
19692nextc0(struct parser_params *p, int set_encoding)
19693{
19694 int c;
19695
19696 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19697 if (nextline(p, set_encoding)) return -1;
19698 }
19699 c = (unsigned char)*p->lex.pcur++;
19700 if (UNLIKELY(c == '\r')) {
19701 c = parser_cr(p, c);
19702 }
19703
19704 return c;
19705}
19706#define nextc(p) nextc0(p, TRUE)
19707
19708static void
19709pushback(struct parser_params *p, int c)
19710{
19711 if (c == -1) return;
19712 p->eofp = 0;
19713 p->lex.pcur--;
19714 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19715 p->lex.pcur--;
19716 }
19717}
19718
19719#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19720
19721#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19722#define tok(p) (p)->tokenbuf
19723#define toklen(p) (p)->tokidx
19724
19725static int
19726looking_at_eol_p(struct parser_params *p)
19727{
19728 const char *ptr = p->lex.pcur;
19729 while (!lex_eol_ptr_p(p, ptr)) {
19730 int c = (unsigned char)*ptr++;
19731 int eol = (c == '\n' || c == '#');
19732 if (eol || !ISSPACE(c)) {
19733 return eol;
19734 }
19735 }
19736 return TRUE;
19737}
19738
19739static char*
19740newtok(struct parser_params *p)
19741{
19742 p->tokidx = 0;
19743 if (!p->tokenbuf) {
19744 p->toksiz = 60;
19745 p->tokenbuf = ALLOC_N(char, 60);
19746 }
19747 if (p->toksiz > 4096) {
19748 p->toksiz = 60;
19749 REALLOC_N(p->tokenbuf, char, 60);
19750 }
19751 return p->tokenbuf;
19752}
19753
19754static char *
19755tokspace(struct parser_params *p, int n)
19756{
19757 p->tokidx += n;
19758
19759 if (p->tokidx >= p->toksiz) {
19760 do {p->toksiz *= 2;} while (p->toksiz <= p->tokidx);
19761 REALLOC_N(p->tokenbuf, char, p->toksiz);
19762 }
19763 return &p->tokenbuf[p->tokidx-n];
19764}
19765
19766static void
19767tokadd(struct parser_params *p, int c)
19768{
19769 p->tokenbuf[p->tokidx++] = (char)c;
19770 if (p->tokidx >= p->toksiz) {
19771 p->toksiz *= 2;
19772 REALLOC_N(p->tokenbuf, char, p->toksiz);
19773 }
19774}
19775
19776static int
19777tok_hex(struct parser_params *p, size_t *numlen)
19778{
19779 int c;
19780
19781 c = (int)ruby_scan_digits(p->lex.pcur, 2, 16, numlen, &c);
19782 if (!*numlen) {
19783 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19784 yyerror0("invalid hex escape");
19785 dispatch_scan_event(p, tSTRING_CONTENT);
19786 return 0;
19787 }
19788 p->lex.pcur += *numlen;
19789 return c;
19790}
19791
19792#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19793
19794static int
19795escaped_control_code(int c)
19796{
19797 int c2 = 0;
19798 switch (c) {
19799 case ' ':
19800 c2 = 's';
19801 break;
19802 case '\n':
19803 c2 = 'n';
19804 break;
19805 case '\t':
19806 c2 = 't';
19807 break;
19808 case '\v':
19809 c2 = 'v';
19810 break;
19811 case '\r':
19812 c2 = 'r';
19813 break;
19814 case '\f':
19815 c2 = 'f';
19816 break;
19817 }
19818 return c2;
19819}
19820
19821#define WARN_SPACE_CHAR(c, prefix) \
19822 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19823
19824static int
19825tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19826 int regexp_literal, const char *begin)
19827{
19828 const int wide = !begin;
19829 size_t numlen = wide ? p->lex.pend - p->lex.pcur : 4;
19830 int ov, codepoint = (int)ruby_scan_digits(p->lex.pcur, numlen, 16, &numlen, &ov);
19831
19832 p->lex.pcur += numlen;
19833 if (p->lex.strterm == NULL ||
19834 strterm_is_heredoc(p->lex.strterm) ||
19835 (p->lex.strterm->u.literal.func != str_regexp)) {
19836 if (!begin) begin = p->lex.pcur;
19837 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19838 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19839 yyerror0("invalid Unicode escape");
19840 dispatch_scan_event(p, tSTRING_CONTENT);
19841 return wide && numlen > 0;
19842 }
19843 if (codepoint > 0x10ffff) {
19844 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19845 yyerror0("invalid Unicode codepoint (too large)");
19846 dispatch_scan_event(p, tSTRING_CONTENT);
19847 return wide;
19848 }
19849 if ((codepoint & 0xfffff800) == 0xd800) {
19850 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19851 yyerror0("invalid Unicode codepoint");
19852 dispatch_scan_event(p, tSTRING_CONTENT);
19853 return wide;
19854 }
19855 }
19856 if (regexp_literal) {
19857 tokcopy(p, (int)numlen);
19858 }
19859 else if (codepoint >= 0x80) {
19860 rb_encoding *utf8 = rb_utf8_encoding();
19861 if (*encp && utf8 != *encp) {
19862 YYLTYPE loc = RUBY_INIT_YYLLOC();
19863 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19864 parser_show_error_line(p, &loc);
19865 return wide;
19866 }
19867 *encp = utf8;
19868 tokaddmbc(p, codepoint, *encp);
19869 }
19870 else {
19871 tokadd(p, codepoint);
19872 }
19873 return TRUE;
19874}
19875
19876static int tokadd_mbchar(struct parser_params *p, int c);
19877
19878static int
19879tokskip_mbchar(struct parser_params *p)
19880{
19881 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19882 if (len > 0) {
19883 p->lex.pcur += len - 1;
19884 }
19885 return len;
19886}
19887
19888/* return value is for ?\u3042 */
19889static void
19890tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19891 int term, int symbol_literal, int regexp_literal)
19892{
19893 /*
19894 * If `term` is not -1, then we allow multiple codepoints in \u{}
19895 * upto `term` byte, otherwise we're parsing a character literal.
19896 * And then add the codepoints to the current token.
19897 */
19898 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19899
19900 const int open_brace = '{', close_brace = '}';
19901
19902 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19903
19904 if (peek(p, open_brace)) { /* handle \u{...} form */
19905 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19906 /*
19907 * Skip parsing validation code and copy bytes as-is until term or
19908 * closing brace, in order to correctly handle extended regexps where
19909 * invalid unicode escapes are allowed in comments. The regexp parser
19910 * does its own validation and will catch any issues.
19911 */
19912 tokadd(p, open_brace);
19913 ++p->lex.pcur;
19914 while (!lex_eol_p(p)) {
19915 int c = peekc(p);
19916 if (c == close_brace) {
19917 tokadd(p, c);
19918 ++p->lex.pcur;
19919 break;
19920 }
19921 else if (c == term) {
19922 break;
19923 }
19924 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19925 tokadd(p, c);
19926 c = *++p->lex.pcur;
19927 }
19928 ++p->lex.pcur;
19929 tokadd_mbchar(p, c);
19930 }
19931 }
19932 else {
19933 const char *second = NULL;
19934 int c, last = nextc(p);
19935 if (lex_eol_p(p)) goto unterminated;
19936 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19937 while (c != close_brace) {
19938 if (c == term) goto unterminated;
19939 if (second == multiple_codepoints)
19940 second = p->lex.pcur;
19941 if (regexp_literal) tokadd(p, last);
19942 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19943 break;
19944 }
19945 while (ISSPACE(c = peekc(p))) {
19946 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19947 last = c;
19948 }
19949 if (term == -1 && !second)
19950 second = multiple_codepoints;
19951 }
19952
19953 if (c != close_brace) {
19954 unterminated:
19955 flush_string_content(p, rb_utf8_encoding(), 0);
19956 yyerror0("unterminated Unicode escape");
19957 dispatch_scan_event(p, tSTRING_CONTENT);
19958 return;
19959 }
19960 if (second && second != multiple_codepoints) {
19961 const char *pcur = p->lex.pcur;
19962 p->lex.pcur = second;
19963 dispatch_scan_event(p, tSTRING_CONTENT);
19964 token_flush(p);
19965 p->lex.pcur = pcur;
19966 yyerror0(multiple_codepoints);
19967 token_flush(p);
19968 }
19969
19970 if (regexp_literal) tokadd(p, close_brace);
19971 nextc(p);
19972 }
19973 }
19974 else { /* handle \uxxxx form */
19975 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19976 token_flush(p);
19977 return;
19978 }
19979 }
19980}
19981
19982#define ESCAPE_CONTROL 1
19983#define ESCAPE_META 2
19984
19985static int
19986read_escape(struct parser_params *p, int flags, const char *begin)
19987{
19988 int c;
19989 size_t numlen;
19990
19991 switch (c = nextc(p)) {
19992 case '\\': /* Backslash */
19993 return c;
19994
19995 case 'n': /* newline */
19996 return '\n';
19997
19998 case 't': /* horizontal tab */
19999 return '\t';
20000
20001 case 'r': /* carriage-return */
20002 return '\r';
20003
20004 case 'f': /* form-feed */
20005 return '\f';
20006
20007 case 'v': /* vertical tab */
20008 return '\13';
20009
20010 case 'a': /* alarm(bell) */
20011 return '\007';
20012
20013 case 'e': /* escape */
20014 return 033;
20015
20016 case '0': case '1': case '2': case '3': /* octal constant */
20017 case '4': case '5': case '6': case '7':
20018 pushback(p, c);
20019 int ov;
20020 c = (int)ruby_scan_digits(p->lex.pcur, 3, 8, &numlen, &ov);
20021 p->lex.pcur += numlen;
20022 return c;
20023
20024 case 'x': /* hex constant */
20025 c = tok_hex(p, &numlen);
20026 if (numlen == 0) return 0;
20027 return c;
20028
20029 case 'b': /* backspace */
20030 return '\010';
20031
20032 case 's': /* space */
20033 return ' ';
20034
20035 case 'M':
20036 if (flags & ESCAPE_META) goto eof;
20037 if ((c = nextc(p)) != '-') {
20038 goto eof;
20039 }
20040 if ((c = nextc(p)) == '\\') {
20041 switch (peekc(p)) {
20042 case 'u': case 'U':
20043 nextc(p);
20044 goto eof;
20045 }
20046 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
20047 }
20048 else if (c == -1) goto eof;
20049 else if (!ISASCII(c)) {
20050 tokskip_mbchar(p);
20051 goto eof;
20052 }
20053 else {
20054 int c2 = escaped_control_code(c);
20055 if (c2) {
20056 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
20057 WARN_SPACE_CHAR(c2, "\\M-");
20058 }
20059 else {
20060 WARN_SPACE_CHAR(c2, "\\C-\\M-");
20061 }
20062 }
20063 else if (ISCNTRL(c)) goto eof;
20064 return ((c & 0xff) | 0x80);
20065 }
20066
20067 case 'C':
20068 if ((c = nextc(p)) != '-') {
20069 goto eof;
20070 }
20071 case 'c':
20072 if (flags & ESCAPE_CONTROL) goto eof;
20073 if ((c = nextc(p))== '\\') {
20074 switch (peekc(p)) {
20075 case 'u': case 'U':
20076 nextc(p);
20077 goto eof;
20078 }
20079 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
20080 }
20081 else if (c == '?')
20082 return 0177;
20083 else if (c == -1) goto eof;
20084 else if (!ISASCII(c)) {
20085 tokskip_mbchar(p);
20086 goto eof;
20087 }
20088 else {
20089 int c2 = escaped_control_code(c);
20090 if (c2) {
20091 if (ISCNTRL(c)) {
20092 if (flags & ESCAPE_META) {
20093 WARN_SPACE_CHAR(c2, "\\M-");
20094 }
20095 else {
20096 WARN_SPACE_CHAR(c2, "");
20097 }
20098 }
20099 else {
20100 if (flags & ESCAPE_META) {
20101 WARN_SPACE_CHAR(c2, "\\M-\\C-");
20102 }
20103 else {
20104 WARN_SPACE_CHAR(c2, "\\C-");
20105 }
20106 }
20107 }
20108 else if (ISCNTRL(c)) goto eof;
20109 }
20110 return c & 0x9f;
20111
20112 eof:
20113 case -1:
20114 flush_string_content(p, p->enc, p->lex.pcur - begin);
20115 yyerror0("Invalid escape character syntax");
20116 dispatch_scan_event(p, tSTRING_CONTENT);
20117 return '\0';
20118
20119 default:
20120 if (!ISASCII(c)) {
20121 tokskip_mbchar(p);
20122 goto eof;
20123 }
20124 return c;
20125 }
20126}
20127
20128static void
20129tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
20130{
20131 int len = rb_enc_codelen(c, enc);
20132 rb_enc_mbcput(c, tokspace(p, len), enc);
20133}
20134
20135static int
20136tokadd_escape(struct parser_params *p)
20137{
20138 int c;
20139 size_t numlen;
20140 const char *begin = p->lex.pcur;
20141
20142 switch (c = nextc(p)) {
20143 case '\n':
20144 return 0; /* just ignore */
20145
20146 case '0': case '1': case '2': case '3': /* octal constant */
20147 case '4': case '5': case '6': case '7':
20148 {
20149 int ov;
20150 ruby_scan_digits(--p->lex.pcur, 3, 8, &numlen, &ov);
20151 if (numlen == 0) goto eof;
20152 p->lex.pcur += numlen;
20153 tokcopy(p, (int)numlen + 1);
20154 }
20155 return 0;
20156
20157 case 'x': /* hex constant */
20158 {
20159 tok_hex(p, &numlen);
20160 if (numlen == 0) return -1;
20161 tokcopy(p, (int)numlen + 2);
20162 }
20163 return 0;
20164
20165 eof:
20166 case -1:
20167 flush_string_content(p, p->enc, p->lex.pcur - begin);
20168 yyerror0("Invalid escape character syntax");
20169 token_flush(p);
20170 return -1;
20171
20172 default:
20173 tokadd(p, '\\');
20174 tokadd(p, c);
20175 }
20176 return 0;
20177}
20178
20179static int
20180char_to_option(int c)
20181{
20182 int val;
20183
20184 switch (c) {
20185 case 'i':
20186 val = RE_ONIG_OPTION_IGNORECASE;
20187 break;
20188 case 'x':
20189 val = RE_ONIG_OPTION_EXTEND;
20190 break;
20191 case 'm':
20192 val = RE_ONIG_OPTION_MULTILINE;
20193 break;
20194 default:
20195 val = 0;
20196 break;
20197 }
20198 return val;
20199}
20200
20201#define ARG_ENCODING_FIXED 16
20202#define ARG_ENCODING_NONE 32
20203#define ENC_ASCII8BIT 1
20204#define ENC_EUC_JP 2
20205#define ENC_Windows_31J 3
20206#define ENC_UTF8 4
20207
20208static int
20209char_to_option_kcode(int c, int *option, int *kcode)
20210{
20211 *option = 0;
20212
20213 switch (c) {
20214 case 'n':
20215 *kcode = ENC_ASCII8BIT;
20216 return (*option = ARG_ENCODING_NONE);
20217 case 'e':
20218 *kcode = ENC_EUC_JP;
20219 break;
20220 case 's':
20221 *kcode = ENC_Windows_31J;
20222 break;
20223 case 'u':
20224 *kcode = ENC_UTF8;
20225 break;
20226 default:
20227 *kcode = -1;
20228 return (*option = char_to_option(c));
20229 }
20230 *option = ARG_ENCODING_FIXED;
20231 return 1;
20232}
20233
20234static int
20235regx_options(struct parser_params *p)
20236{
20237 int kcode = 0;
20238 int kopt = 0;
20239 int options = 0;
20240 int c, opt, kc;
20241
20242 newtok(p);
20243 while (c = nextc(p), ISALPHA(c)) {
20244 if (c == 'o') {
20245 options |= RE_OPTION_ONCE;
20246 }
20247 else if (char_to_option_kcode(c, &opt, &kc)) {
20248 if (kc >= 0) {
20249 if (kc != ENC_ASCII8BIT) kcode = c;
20250 kopt = opt;
20251 }
20252 else {
20253 options |= opt;
20254 }
20255 }
20256 else {
20257 tokadd(p, c);
20258 }
20259 }
20260 options |= kopt;
20261 pushback(p, c);
20262 if (toklen(p)) {
20263 YYLTYPE loc = RUBY_INIT_YYLLOC();
20264 tokfix(p);
20265 compile_error(p, "unknown regexp option%s - %*s",
20266 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
20267 parser_show_error_line(p, &loc);
20268 }
20269 return options | RE_OPTION_ENCODING(kcode);
20270}
20271
20272static int
20273tokadd_mbchar(struct parser_params *p, int c)
20274{
20275 int len = parser_precise_mbclen(p, p->lex.pcur-1);
20276 if (len < 0) return -1;
20277 tokadd(p, c);
20278 p->lex.pcur += --len;
20279 if (len > 0) tokcopy(p, len);
20280 return c;
20281}
20282
20283static inline int
20284simple_re_meta(int c)
20285{
20286 switch (c) {
20287 case '$': case '*': case '+': case '.':
20288 case '?': case '^': case '|':
20289 case ')': case ']': case '}': case '>':
20290 return TRUE;
20291 default:
20292 return FALSE;
20293 }
20294}
20295
20296static int
20297parser_update_heredoc_indent(struct parser_params *p, int c)
20298{
20299 if (p->heredoc_line_indent == -1) {
20300 if (c == '\n') p->heredoc_line_indent = 0;
20301 }
20302 else {
20303 if (c == ' ') {
20304 p->heredoc_line_indent++;
20305 return TRUE;
20306 }
20307 else if (c == '\t') {
20308 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
20309 p->heredoc_line_indent = w * TAB_WIDTH;
20310 return TRUE;
20311 }
20312 else if (c != '\n') {
20313 if (p->heredoc_indent > p->heredoc_line_indent) {
20314 p->heredoc_indent = p->heredoc_line_indent;
20315 }
20316 p->heredoc_line_indent = -1;
20317 }
20318 else {
20319 /* Whitespace only line has no indentation */
20320 p->heredoc_line_indent = 0;
20321 }
20322 }
20323 return FALSE;
20324}
20325
20326static void
20327parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
20328{
20329 YYLTYPE loc = RUBY_INIT_YYLLOC();
20330 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
20331 compile_error(p, "%s mixed within %s source", n1, n2);
20332 parser_show_error_line(p, &loc);
20333}
20334
20335static void
20336parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
20337{
20338 const char *pos = p->lex.pcur;
20339 p->lex.pcur = beg;
20340 parser_mixed_error(p, enc1, enc2);
20341 p->lex.pcur = pos;
20342}
20343
20344static inline char
20345nibble_char_upper(unsigned int c)
20346{
20347 c &= 0xf;
20348 return c + (c < 10 ? '0' : 'A' - 10);
20349}
20350
20351static int
20352tokadd_string(struct parser_params *p,
20353 int func, int term, int paren, long *nest,
20354 rb_encoding **encp, rb_encoding **enc)
20355{
20356 int c;
20357 bool erred = false;
20358#ifdef RIPPER
20359 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
20360 int top_of_line = FALSE;
20361#endif
20362
20363#define mixed_error(enc1, enc2) \
20364 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
20365#define mixed_escape(beg, enc1, enc2) \
20366 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
20367
20368 while ((c = nextc(p)) != -1) {
20369 if (p->heredoc_indent > 0) {
20370 parser_update_heredoc_indent(p, c);
20371 }
20372#ifdef RIPPER
20373 if (top_of_line && heredoc_end == p->ruby_sourceline) {
20374 pushback(p, c);
20375 break;
20376 }
20377#endif
20378
20379 if (paren && c == paren) {
20380 ++*nest;
20381 }
20382 else if (c == term) {
20383 if (!nest || !*nest) {
20384 pushback(p, c);
20385 break;
20386 }
20387 --*nest;
20388 }
20389 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
20390 unsigned char c2 = *p->lex.pcur;
20391 if (c2 == '$' || c2 == '@' || c2 == '{') {
20392 pushback(p, c);
20393 break;
20394 }
20395 }
20396 else if (c == '\\') {
20397 c = nextc(p);
20398 switch (c) {
20399 case '\n':
20400 if (func & STR_FUNC_QWORDS) break;
20401 if (func & STR_FUNC_EXPAND) {
20402 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
20403 continue;
20404 if (c == term) {
20405 c = '\\';
20406 goto terminate;
20407 }
20408 }
20409 tokadd(p, '\\');
20410 break;
20411
20412 case '\\':
20413 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
20414 break;
20415
20416 case 'u':
20417 if ((func & STR_FUNC_EXPAND) == 0) {
20418 tokadd(p, '\\');
20419 break;
20420 }
20421 tokadd_utf8(p, enc, term,
20422 func & STR_FUNC_SYMBOL,
20423 func & STR_FUNC_REGEXP);
20424 continue;
20425
20426 default:
20427 if (c == -1) return -1;
20428 if (!ISASCII(c)) {
20429 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
20430 goto non_ascii;
20431 }
20432 if (func & STR_FUNC_REGEXP) {
20433 switch (c) {
20434 case 'c':
20435 case 'C':
20436 case 'M': {
20437 pushback(p, c);
20438 c = read_escape(p, 0, p->lex.pcur - 1);
20439
20440 char *t = tokspace(p, rb_strlen_lit("\\x00"));
20441 *t++ = '\\';
20442 *t++ = 'x';
20443 *t++ = nibble_char_upper(c >> 4);
20444 *t++ = nibble_char_upper(c);
20445 continue;
20446 }
20447 }
20448
20449 if (c == term && !simple_re_meta(c)) {
20450 tokadd(p, c);
20451 continue;
20452 }
20453 pushback(p, c);
20454 if ((c = tokadd_escape(p)) < 0)
20455 return -1;
20456 if (*enc && *enc != *encp) {
20457 mixed_escape(p->lex.ptok+2, *enc, *encp);
20458 }
20459 continue;
20460 }
20461 else if (func & STR_FUNC_EXPAND) {
20462 pushback(p, c);
20463 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
20464 c = read_escape(p, 0, p->lex.pcur - 1);
20465 }
20466 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20467 /* ignore backslashed spaces in %w */
20468 }
20469 else if (c != term && !(paren && c == paren)) {
20470 tokadd(p, '\\');
20471 pushback(p, c);
20472 continue;
20473 }
20474 }
20475 }
20476 else if (!parser_isascii(p)) {
20477 non_ascii:
20478 if (!*enc) {
20479 *enc = *encp;
20480 }
20481 else if (*enc != *encp) {
20482 mixed_error(*enc, *encp);
20483 continue;
20484 }
20485 if (tokadd_mbchar(p, c) == -1) return -1;
20486 continue;
20487 }
20488 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20489 pushback(p, c);
20490 break;
20491 }
20492 if (c & 0x80) {
20493 if (!*enc) {
20494 *enc = *encp;
20495 }
20496 else if (*enc != *encp) {
20497 mixed_error(*enc, *encp);
20498 continue;
20499 }
20500 }
20501 tokadd(p, c);
20502#ifdef RIPPER
20503 top_of_line = (c == '\n');
20504#endif
20505 }
20506 terminate:
20507 if (*enc) *encp = *enc;
20508 return c;
20509}
20510
20511#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20512
20513static void
20514flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20515{
20516 p->lex.pcur -= back;
20517 if (has_delayed_token(p)) {
20518 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20519 if (len > 0) {
20520 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20521 p->delayed.end_line = p->ruby_sourceline;
20522 p->delayed.end_col = rb_len2int(p->lex.pcur - p->lex.pbeg);
20523 }
20524 dispatch_delayed_token(p, tSTRING_CONTENT);
20525 p->lex.ptok = p->lex.pcur;
20526 }
20527 dispatch_scan_event(p, tSTRING_CONTENT);
20528 p->lex.pcur += back;
20529}
20530
20531/* this can be shared with ripper, since it's independent from struct
20532 * parser_params. */
20533#ifndef RIPPER
20534#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20535#define SPECIAL_PUNCT(idx) ( \
20536 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20537 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20538 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20539 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20540 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20541 BIT('0', idx))
20542const uint_least32_t ruby_global_name_punct_bits[] = {
20543 SPECIAL_PUNCT(0),
20544 SPECIAL_PUNCT(1),
20545 SPECIAL_PUNCT(2),
20546};
20547#undef BIT
20548#undef SPECIAL_PUNCT
20549#endif
20550
20551static enum yytokentype
20552parser_peek_variable_name(struct parser_params *p)
20553{
20554 int c;
20555 const char *ptr = p->lex.pcur;
20556
20557 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20558 c = *ptr++;
20559 switch (c) {
20560 case '$':
20561 if ((c = *ptr) == '-') {
20562 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20563 c = *ptr;
20564 }
20565 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20566 return tSTRING_DVAR;
20567 }
20568 break;
20569 case '@':
20570 if ((c = *ptr) == '@') {
20571 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20572 c = *ptr;
20573 }
20574 break;
20575 case '{':
20576 p->lex.pcur = ptr;
20577 p->command_start = TRUE;
20578 yylval.state = p->lex.state;
20579 return tSTRING_DBEG;
20580 default:
20581 return 0;
20582 }
20583 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20584 return tSTRING_DVAR;
20585 return 0;
20586}
20587
20588#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20589#define IS_END() IS_lex_state(EXPR_END_ANY)
20590#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20591#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20592#define IS_LABEL_POSSIBLE() (\
20593 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20594 IS_ARG())
20595#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20596#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20597
20598static inline enum yytokentype
20599parser_string_term(struct parser_params *p, int func)
20600{
20601 xfree(p->lex.strterm);
20602 p->lex.strterm = 0;
20603 if (func & STR_FUNC_REGEXP) {
20604 set_yylval_num(regx_options(p));
20605 dispatch_scan_event(p, tREGEXP_END);
20606 SET_LEX_STATE(EXPR_END);
20607 return tREGEXP_END;
20608 }
20609 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20610 nextc(p);
20611 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20612 return tLABEL_END;
20613 }
20614 SET_LEX_STATE(EXPR_END);
20615 return tSTRING_END;
20616}
20617
20618static enum yytokentype
20619parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20620{
20621 int func = quote->func;
20622 int term = quote->term;
20623 int paren = quote->paren;
20624 int c, space = 0;
20625 rb_encoding *enc = p->enc;
20626 rb_encoding *base_enc = 0;
20627 rb_parser_string_t *lit;
20628
20629 if (func & STR_FUNC_TERM) {
20630 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20631 SET_LEX_STATE(EXPR_END);
20632 xfree(p->lex.strterm);
20633 p->lex.strterm = 0;
20634 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20635 }
20636 c = nextc(p);
20637 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20638 while (c != '\n' && ISSPACE(c = nextc(p)));
20639 space = 1;
20640 }
20641 if (func & STR_FUNC_LIST) {
20642 quote->func &= ~STR_FUNC_LIST;
20643 space = 1;
20644 }
20645 if (c == term && !quote->nest) {
20646 if (func & STR_FUNC_QWORDS) {
20647 quote->func |= STR_FUNC_TERM;
20648 pushback(p, c); /* dispatch the term at tSTRING_END */
20649 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20650 return ' ';
20651 }
20652 return parser_string_term(p, func);
20653 }
20654 if (space) {
20655 if (!ISSPACE(c)) pushback(p, c);
20656 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20657 return ' ';
20658 }
20659 newtok(p);
20660 if ((func & STR_FUNC_EXPAND) && c == '#') {
20661 enum yytokentype t = parser_peek_variable_name(p);
20662 if (t) return t;
20663 tokadd(p, '#');
20664 c = nextc(p);
20665 }
20666 pushback(p, c);
20667 if (tokadd_string(p, func, term, paren, &quote->nest,
20668 &enc, &base_enc) == -1) {
20669 if (p->eofp) {
20670#ifndef RIPPER
20671# define unterminated_literal(mesg) yyerror0(mesg)
20672#else
20673# define unterminated_literal(mesg) compile_error(p, mesg)
20674#endif
20675 literal_flush(p, p->lex.pcur);
20676 if (func & STR_FUNC_QWORDS) {
20677 /* no content to add, bailing out here */
20678 unterminated_literal("unterminated list meets end of file");
20679 xfree(p->lex.strterm);
20680 p->lex.strterm = 0;
20681 return tSTRING_END;
20682 }
20683 if (func & STR_FUNC_REGEXP) {
20684 unterminated_literal("unterminated regexp meets end of file");
20685 }
20686 else {
20687 unterminated_literal("unterminated string meets end of file");
20688 }
20689 quote->func |= STR_FUNC_TERM;
20690 }
20691 }
20692
20693 tokfix(p);
20694 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20695 set_yylval_str(lit);
20696 flush_string_content(p, enc, 0);
20697
20698 return tSTRING_CONTENT;
20699}
20700
20701static enum yytokentype
20702heredoc_identifier(struct parser_params *p)
20703{
20704 /*
20705 * term_len is length of `<<"END"` except `END`,
20706 * in this case term_len is 4 (<, <, " and ").
20707 */
20708 rb_len_t len, offset = p->lex.pcur - p->lex.pbeg;
20709 int c = nextc(p), term, func = 0, quote = 0;
20710 enum yytokentype token = tSTRING_BEG;
20711 int indent = 0;
20712
20713 if (c == '-') {
20714 c = nextc(p);
20715 func = STR_FUNC_INDENT;
20716 offset++;
20717 }
20718 else if (c == '~') {
20719 c = nextc(p);
20720 func = STR_FUNC_INDENT;
20721 offset++;
20722 indent = INT_MAX;
20723 }
20724 switch (c) {
20725 case '\'':
20726 func |= str_squote; goto quoted;
20727 case '"':
20728 func |= str_dquote; goto quoted;
20729 case '`':
20730 token = tXSTRING_BEG;
20731 func |= str_xquote; goto quoted;
20732
20733 quoted:
20734 quote++;
20735 offset++;
20736 term = c;
20737 len = 0;
20738 while ((c = nextc(p)) != term) {
20739 if (c == -1 || c == '\r' || c == '\n') {
20740 yyerror0("unterminated here document identifier");
20741 return -1;
20742 }
20743 }
20744 break;
20745
20746 default:
20747 if (!parser_is_identchar(p)) {
20748 pushback(p, c);
20749 if (func & STR_FUNC_INDENT) {
20750 pushback(p, indent > 0 ? '~' : '-');
20751 }
20752 return 0;
20753 }
20754 func |= str_dquote;
20755 do {
20756 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20757 if (n < 0) return 0;
20758 p->lex.pcur += --n;
20759 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20760 pushback(p, c);
20761 break;
20762 }
20763
20764 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20765 if ((rb_ulen_t)len >= HERETERM_LENGTH_MAX)
20766 yyerror0("too long here document identifier");
20767 dispatch_scan_event(p, tHEREDOC_BEG);
20768 lex_goto_eol(p);
20769
20770 p->lex.strterm = new_heredoc(p);
20771 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20772 here->offset = offset;
20773 here->sourceline = p->ruby_sourceline;
20774 here->length = (unsigned)len;
20775 here->quote = quote;
20776 here->func = func;
20777 here->lastline = p->lex.lastline;
20778
20779 token_flush(p);
20780 p->heredoc_indent = indent;
20781 p->heredoc_line_indent = 0;
20782 return token;
20783}
20784
20785static void
20786heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20787{
20788 rb_parser_string_t *line;
20789 rb_strterm_t *term = p->lex.strterm;
20790
20791 p->lex.strterm = 0;
20792 line = here->lastline;
20793 p->lex.lastline = line;
20794 p->lex.pbeg = PARSER_STRING_PTR(line);
20795 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20796 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20797 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20798 p->heredoc_end = p->ruby_sourceline;
20799 p->ruby_sourceline = (int)here->sourceline;
20800 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20801 p->eofp = 0;
20802 xfree(term);
20803}
20804
20805static int
20806dedent_string_column(const char *str, rb_len_t len, int width)
20807{
20808 int i, col = 0;
20809
20810 for (i = 0; i < len && col < width; i++) {
20811 if (str[i] == ' ') {
20812 col++;
20813 }
20814 else if (str[i] == '\t') {
20815 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20816 if (n > width) break;
20817 col = n;
20818 }
20819 else {
20820 break;
20821 }
20822 }
20823
20824 return i;
20825}
20826
20827static int
20828dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20829{
20830 char *str;
20831 rb_len_t len;
20832 int i;
20833
20834 len = PARSER_STRING_LEN(string);
20835 str = PARSER_STRING_PTR(string);
20836
20837 i = dedent_string_column(str, len, width);
20838 if (!i) return 0;
20839
20840 rb_parser_str_modify(string);
20841 str = PARSER_STRING_PTR(string);
20842 if (PARSER_STRING_LEN(string) != len)
20843 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20844 MEMMOVE(str, str + i, char, len - i);
20845 rb_parser_str_set_len(p, string, len - i);
20846 return i;
20847}
20848
20849static NODE *
20850heredoc_dedent(struct parser_params *p, NODE *root)
20851{
20852 NODE *node, *str_node, *prev_node;
20853 int indent = p->heredoc_indent;
20854 rb_parser_string_t *prev_lit = 0;
20855
20856 if (indent <= 0) return root;
20857 if (!root) return root;
20858
20859 prev_node = node = str_node = root;
20860 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20861
20862 while (str_node) {
20863 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20864 if (nd_fl_newline(str_node)) {
20865 dedent_string(p, lit, indent);
20866 }
20867 if (!prev_lit) {
20868 prev_lit = lit;
20869 }
20870 else if (!literal_concat0(p, prev_lit, lit)) {
20871 return 0;
20872 }
20873 else {
20874 NODE *end = RNODE_LIST(node)->as.nd_end;
20875 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20876 if (!node) {
20877 if (nd_type_p(prev_node, NODE_DSTR))
20878 nd_set_type(prev_node, NODE_STR);
20879 break;
20880 }
20881 RNODE_LIST(node)->as.nd_end = end;
20882 goto next_str;
20883 }
20884
20885 str_node = 0;
20886 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20887 next_str:
20888 if (!nd_type_p(node, NODE_LIST)) break;
20889 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20890 enum node_type type = nd_type(str_node);
20891 if (type == NODE_STR || type == NODE_DSTR) break;
20892 prev_lit = 0;
20893 str_node = 0;
20894 }
20895 }
20896 }
20897 return root;
20898}
20899
20900static int
20901whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20902{
20903 const char *beg = p->lex.pbeg;
20904 const char *ptr = p->lex.pend;
20905
20906 if (ptr - beg < len) return FALSE;
20907 if (ptr > beg && ptr[-1] == '\n') {
20908 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20909 if (ptr - beg < len) return FALSE;
20910 }
20911 if (strncmp(eos, ptr -= len, len)) return FALSE;
20912 if (indent) {
20913 while (beg < ptr && ISSPACE(*beg)) beg++;
20914 }
20915 return beg == ptr;
20916}
20917
20918static int
20919word_match_p(struct parser_params *p, const char *word, long len)
20920{
20921 if (strncmp(p->lex.pcur, word, len)) return 0;
20922 if (lex_eol_n_p(p, len)) return 1;
20923 int c = (unsigned char)p->lex.pcur[len];
20924 if (ISSPACE(c)) return 1;
20925 switch (c) {
20926 case '\0': case '\004': case '\032': return 1;
20927 }
20928 return 0;
20929}
20930
20931#define NUM_SUFFIX_R (1<<0)
20932#define NUM_SUFFIX_I (1<<1)
20933#define NUM_SUFFIX_ALL 3
20934
20935static int
20936number_literal_suffix(struct parser_params *p, int mask)
20937{
20938 int c, result = 0;
20939 const char *lastp = p->lex.pcur;
20940
20941 while ((c = nextc(p)) != -1) {
20942 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20943 result |= (mask & NUM_SUFFIX_I);
20944 mask &= ~NUM_SUFFIX_I;
20945 /* r after i, rational of complex is disallowed */
20946 mask &= ~NUM_SUFFIX_R;
20947 continue;
20948 }
20949 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20950 result |= (mask & NUM_SUFFIX_R);
20951 mask &= ~NUM_SUFFIX_R;
20952 continue;
20953 }
20954 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20955 p->lex.pcur = lastp;
20956 return 0;
20957 }
20958 pushback(p, c);
20959 break;
20960 }
20961 return result;
20962}
20963
20964static enum yytokentype
20965set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20966{
20967 enum rb_numeric_type numeric_type = integer_literal;
20968
20969 if (type == tFLOAT) {
20970 numeric_type = float_literal;
20971 }
20972
20973 if (suffix & NUM_SUFFIX_R) {
20974 type = tRATIONAL;
20975 numeric_type = rational_literal;
20976 }
20977 if (suffix & NUM_SUFFIX_I) {
20978 type = tIMAGINARY;
20979 }
20980
20981 switch (type) {
20982 case tINTEGER:
20983 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20984 break;
20985 case tFLOAT:
20986 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20987 break;
20988 case tRATIONAL:
20989 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20990 break;
20991 case tIMAGINARY:
20992 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20993 (void)numeric_type; /* for ripper */
20994 break;
20995 default:
20996 rb_bug("unexpected token: %d", type);
20997 }
20998 SET_LEX_STATE(EXPR_END);
20999 return type;
21000}
21001
21002#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
21003static void
21004parser_dispatch_heredoc_end(struct parser_params *p, int line)
21005{
21006 if (has_delayed_token(p))
21007 dispatch_delayed_token(p, tSTRING_CONTENT);
21008
21009#ifdef RIPPER
21010 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
21011 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
21012#else
21013 if (p->keep_tokens) {
21014 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
21015 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
21016 parser_append_tokens(p, str, tHEREDOC_END, line);
21017 }
21018#endif
21019
21020 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
21021 lex_goto_eol(p);
21022 token_flush(p);
21023}
21024
21025static enum yytokentype
21026here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
21027{
21028 int c, func, indent = 0;
21029 const char *eos, *ptr, *ptr_end;
21030 long len;
21031 rb_parser_string_t *str = 0;
21032 rb_encoding *enc = p->enc;
21033 rb_encoding *base_enc = 0;
21034 int bol;
21035#ifdef RIPPER
21036 VALUE s_value;
21037#endif
21038
21039 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
21040 len = here->length;
21041 indent = (func = here->func) & STR_FUNC_INDENT;
21042
21043 if ((c = nextc(p)) == -1) {
21044 error:
21045#ifdef RIPPER
21046 if (!has_delayed_token(p)) {
21047 dispatch_scan_event(p, tSTRING_CONTENT);
21048 }
21049 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
21050 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
21051 if (!(func & STR_FUNC_REGEXP)) {
21052 int cr = ENC_CODERANGE_UNKNOWN;
21053 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
21054 if (cr != ENC_CODERANGE_7BIT &&
21055 rb_is_usascii_enc(p->enc) &&
21056 enc != rb_utf8_encoding()) {
21057 enc = rb_ascii8bit_encoding();
21058 }
21059 }
21060 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
21061 }
21062 dispatch_delayed_token(p, tSTRING_CONTENT);
21063 }
21064 else {
21065 dispatch_delayed_token(p, tSTRING_CONTENT);
21066 dispatch_scan_event(p, tSTRING_CONTENT);
21067 }
21068 lex_goto_eol(p);
21069#endif
21070 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21071 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
21072 (int)len, eos);
21073 token_flush(p);
21074 SET_LEX_STATE(EXPR_END);
21075 return tSTRING_END;
21076 }
21077 bol = was_bol(p);
21078 if (!bol) {
21079 /* not beginning of line, cannot be the terminator */
21080 }
21081 else if (p->heredoc_line_indent == -1) {
21082 /* `heredoc_line_indent == -1` means
21083 * - "after an interpolation in the same line", or
21084 * - "in a continuing line"
21085 */
21086 p->heredoc_line_indent = 0;
21087 }
21088 else if (whole_match_p(p, eos, len, indent)) {
21089 dispatch_heredoc_end(p);
21090 restore:
21091 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21092 token_flush(p);
21093 SET_LEX_STATE(EXPR_END);
21094 return tSTRING_END;
21095 }
21096
21097 if (!(func & STR_FUNC_EXPAND)) {
21098 do {
21099 ptr = PARSER_STRING_PTR(p->lex.lastline);
21100 ptr_end = p->lex.pend;
21101 if (ptr_end > ptr) {
21102 switch (ptr_end[-1]) {
21103 case '\n':
21104 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
21105 ptr_end++;
21106 break;
21107 }
21108 case '\r':
21109 --ptr_end;
21110 }
21111 }
21112
21113 if (p->heredoc_indent > 0) {
21114 long i = 0;
21115 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
21116 i++;
21117 p->heredoc_line_indent = 0;
21118 }
21119
21120 if (str)
21121 parser_str_cat(str, ptr, ptr_end - ptr);
21122 else
21123 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
21124 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
21125 lex_goto_eol(p);
21126 if (p->heredoc_indent > 0) {
21127 goto flush_str;
21128 }
21129 if (nextc(p) == -1) {
21130 if (str) {
21131 rb_parser_string_free(p, str);
21132 str = 0;
21133 }
21134 goto error;
21135 }
21136 } while (!whole_match_p(p, eos, len, indent));
21137 }
21138 else {
21139 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
21140 newtok(p);
21141 if (c == '#') {
21142 enum yytokentype t = parser_peek_variable_name(p);
21143 if (p->heredoc_line_indent != -1) {
21144 if (p->heredoc_indent > p->heredoc_line_indent) {
21145 p->heredoc_indent = p->heredoc_line_indent;
21146 }
21147 p->heredoc_line_indent = -1;
21148 }
21149 if (t) return t;
21150 tokadd(p, '#');
21151 c = nextc(p);
21152 }
21153 do {
21154 pushback(p, c);
21155 enc = p->enc;
21156 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
21157 if (p->eofp) goto error;
21158 goto restore;
21159 }
21160 if (c != '\n') {
21161 if (c == '\\') p->heredoc_line_indent = -1;
21162 flush:
21163 str = STR_NEW3(tok(p), toklen(p), enc, func);
21164 flush_str:
21165 set_yylval_str(str);
21166#ifndef RIPPER
21167 if (bol) nd_set_fl_newline(yylval.node);
21168#endif
21169 flush_string_content(p, enc, 0);
21170 return tSTRING_CONTENT;
21171 }
21172 tokadd(p, nextc(p));
21173 if (p->heredoc_indent > 0) {
21174 lex_goto_eol(p);
21175 goto flush;
21176 }
21177 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
21178 if ((c = nextc(p)) == -1) goto error;
21179 } while (!whole_match_p(p, eos, len, indent));
21180 str = STR_NEW3(tok(p), toklen(p), enc, func);
21181 }
21182 dispatch_heredoc_end(p);
21183 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21184 token_flush(p);
21185 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
21186#ifdef RIPPER
21187 /* Preserve s_value for set_yylval_str */
21188 s_value = p->s_value;
21189#endif
21190 set_yylval_str(str);
21191#ifdef RIPPER
21192 set_parser_s_value(s_value);
21193#endif
21194
21195#ifndef RIPPER
21196 if (bol) nd_set_fl_newline(yylval.node);
21197#endif
21198 return tSTRING_CONTENT;
21199}
21200
21201#include "lex.c"
21202
21203static int
21204arg_ambiguous(struct parser_params *p, char c)
21205{
21206#ifndef RIPPER
21207 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
21208#else
21209 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
21210#endif
21211 return TRUE;
21212}
21213
21214/* returns true value if formal argument error;
21215 * Qtrue, or error message if ripper */
21216static VALUE
21217formal_argument_error(struct parser_params *p, ID id)
21218{
21219 switch (id_type(id)) {
21220 case ID_LOCAL:
21221 break;
21222#ifndef RIPPER
21223# define ERR(mesg) (yyerror0(mesg), Qtrue)
21224#else
21225# define ERR(mesg) WARN_S(mesg)
21226#endif
21227 case ID_CONST:
21228 return ERR("formal argument cannot be a constant");
21229 case ID_INSTANCE:
21230 return ERR("formal argument cannot be an instance variable");
21231 case ID_GLOBAL:
21232 return ERR("formal argument cannot be a global variable");
21233 case ID_CLASS:
21234 return ERR("formal argument cannot be a class variable");
21235 default:
21236 return ERR("formal argument must be local variable");
21237#undef ERR
21238 }
21239 shadowing_lvar(p, id);
21240
21241 return Qfalse;
21242}
21243
21244static int
21245lvar_defined(struct parser_params *p, ID id)
21246{
21247 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
21248}
21249
21250/* emacsen -*- hack */
21251static long
21252parser_encode_length(struct parser_params *p, const char *name, long len)
21253{
21254 long nlen;
21255
21256 if (len > 5 && name[nlen = len - 5] == '-') {
21257 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
21258 return nlen;
21259 }
21260 if (len > 4 && name[nlen = len - 4] == '-') {
21261 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
21262 return nlen;
21263 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
21264 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
21265 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
21266 return nlen;
21267 }
21268 return len;
21269}
21270
21271static void
21272parser_set_encode(struct parser_params *p, const char *name)
21273{
21274 rb_encoding *enc;
21275 VALUE excargs[3];
21276 int idx = 0;
21277
21278 const char *wrong = 0;
21279 switch (*name) {
21280 case 'e': case 'E': wrong = "external"; break;
21281 case 'i': case 'I': wrong = "internal"; break;
21282 case 'f': case 'F': wrong = "filesystem"; break;
21283 case 'l': case 'L': wrong = "locale"; break;
21284 }
21285 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
21286 idx = rb_enc_find_index(name);
21287 if (idx < 0) {
21288 unknown:
21289 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
21290 error:
21291 excargs[0] = rb_eArgError;
21292 excargs[2] = rb_make_backtrace();
21293 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
21294 VALUE exc = rb_make_exception(3, excargs);
21295 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
21296
21297 rb_ast_free(p->ast);
21298 p->ast = NULL;
21299
21300 rb_exc_raise(exc);
21301 }
21302 enc = rb_enc_from_index(idx);
21303 if (!rb_enc_asciicompat(enc)) {
21304 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
21305 goto error;
21306 }
21307 p->enc = enc;
21308#ifndef RIPPER
21309 if (p->debug_lines) {
21310 long i;
21311 for (i = 0; i < p->debug_lines->len; i++) {
21312 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
21313 }
21314 }
21315#endif
21316}
21317
21318static bool
21319comment_at_top(struct parser_params *p)
21320{
21321 if (p->token_seen) return false;
21322 return (p->line_count == (p->has_shebang ? 2 : 1));
21323}
21324
21325typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
21326typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
21327
21328static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
21329
21330static void
21331magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
21332{
21333 if (!comment_at_top(p)) {
21334 return;
21335 }
21336 parser_set_encode(p, val);
21337}
21338
21339static int
21340parser_get_bool(struct parser_params *p, const char *name, const char *val)
21341{
21342 switch (*val) {
21343 case 't': case 'T':
21344 if (STRCASECMP(val, "true") == 0) {
21345 return TRUE;
21346 }
21347 break;
21348 case 'f': case 'F':
21349 if (STRCASECMP(val, "false") == 0) {
21350 return FALSE;
21351 }
21352 break;
21353 }
21354 return parser_invalid_pragma_value(p, name, val);
21355}
21356
21357static int
21358parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
21359{
21360 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
21361 return -1;
21362}
21363
21364static void
21365parser_set_token_info(struct parser_params *p, const char *name, const char *val)
21366{
21367 int b = parser_get_bool(p, name, val);
21368 if (b >= 0) p->token_info_enabled = b;
21369}
21370
21371static void
21372parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
21373{
21374 int b;
21375
21376 if (p->token_seen) {
21377 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
21378 return;
21379 }
21380
21381 b = parser_get_bool(p, name, val);
21382 if (b < 0) return;
21383
21384 p->frozen_string_literal = b;
21385}
21386
21387static void
21388parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
21389{
21390 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
21391 if (*s == ' ' || *s == '\t') continue;
21392 if (*s == '#') break;
21393 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
21394 return;
21395 }
21396
21397 switch (*val) {
21398 case 'n': case 'N':
21399 if (STRCASECMP(val, "none") == 0) {
21400 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
21401 return;
21402 }
21403 break;
21404 case 'l': case 'L':
21405 if (STRCASECMP(val, "literal") == 0) {
21406 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
21407 return;
21408 }
21409 break;
21410 case 'e': case 'E':
21411 if (STRCASECMP(val, "experimental_copy") == 0) {
21412 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
21413 return;
21414 }
21415 if (STRCASECMP(val, "experimental_everything") == 0) {
21416 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
21417 return;
21418 }
21419 break;
21420 }
21421 parser_invalid_pragma_value(p, name, val);
21422}
21423
21424# if WARN_PAST_SCOPE
21425static void
21426parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
21427{
21428 int b = parser_get_bool(p, name, val);
21429 if (b >= 0) p->past_scope_enabled = b;
21430}
21431# endif
21432
21434 const char *name;
21435 rb_magic_comment_setter_t func;
21436 rb_magic_comment_length_t length;
21437};
21438
21439static const struct magic_comment magic_comments[] = {
21440 {"coding", magic_comment_encoding, parser_encode_length},
21441 {"encoding", magic_comment_encoding, parser_encode_length},
21442 {"frozen_string_literal", parser_set_frozen_string_literal},
21443 {"shareable_constant_value", parser_set_shareable_constant_value},
21444 {"warn_indent", parser_set_token_info},
21445# if WARN_PAST_SCOPE
21446 {"warn_past_scope", parser_set_past_scope},
21447# endif
21448};
21449
21450static const char *
21451magic_comment_marker(const char *str, long len)
21452{
21453 long i = 2;
21454
21455 while (i < len) {
21456 switch (str[i]) {
21457 case '-':
21458 if (str[i-1] == '*' && str[i-2] == '-') {
21459 return str + i + 1;
21460 }
21461 i += 2;
21462 break;
21463 case '*':
21464 if (i + 1 >= len) return 0;
21465 if (str[i+1] != '-') {
21466 i += 4;
21467 }
21468 else if (str[i-1] != '-') {
21469 i += 2;
21470 }
21471 else {
21472 return str + i + 2;
21473 }
21474 break;
21475 default:
21476 i += 3;
21477 break;
21478 }
21479 }
21480 return 0;
21481}
21482
21483static int
21484parser_magic_comment(struct parser_params *p, const char *str, long len)
21485{
21486 int indicator = 0;
21487 VALUE name = 0, val = 0;
21488 const char *beg, *end, *vbeg, *vend;
21489#define str_copy(_s, _p, _n) ((_s) \
21490 ? (void)(rb_str_resize((_s), (_n)), \
21491 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21492 : (void)((_s) = STR_NEW((_p), (_n))))
21493
21494 if (len <= 7) return FALSE;
21495 if (!!(beg = magic_comment_marker(str, len))) {
21496 if (!(end = magic_comment_marker(beg, str + len - beg)))
21497 return FALSE;
21498 indicator = TRUE;
21499 str = beg;
21500 len = end - beg - 3;
21501 }
21502
21503 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21504 while (len > 0) {
21505 const struct magic_comment *mc = magic_comments;
21506 char *s;
21507 int i;
21508 long n = 0;
21509
21510 for (; len > 0 && *str; str++, --len) {
21511 switch (*str) {
21512 case '\'': case '"': case ':': case ';':
21513 continue;
21514 }
21515 if (!ISSPACE(*str)) break;
21516 }
21517 for (beg = str; len > 0; str++, --len) {
21518 switch (*str) {
21519 case '\'': case '"': case ':': case ';':
21520 break;
21521 default:
21522 if (ISSPACE(*str)) break;
21523 continue;
21524 }
21525 break;
21526 }
21527 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21528 if (!len) break;
21529 if (*str != ':') {
21530 if (!indicator) return FALSE;
21531 continue;
21532 }
21533
21534 do str++; while (--len > 0 && ISSPACE(*str));
21535 if (!len) break;
21536 const char *tok_beg = str;
21537 if (*str == '"') {
21538 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21539 if (*str == '\\') {
21540 --len;
21541 ++str;
21542 }
21543 }
21544 vend = str;
21545 if (len) {
21546 --len;
21547 ++str;
21548 }
21549 }
21550 else {
21551 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21552 vend = str;
21553 }
21554 const char *tok_end = str;
21555 if (indicator) {
21556 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21557 }
21558 else {
21559 while (len > 0 && (ISSPACE(*str))) --len, str++;
21560 if (len) return FALSE;
21561 }
21562
21563 n = end - beg;
21564 str_copy(name, beg, n);
21565 s = RSTRING_PTR(name);
21566 for (i = 0; i < n; ++i) {
21567 if (s[i] == '-') s[i] = '_';
21568 }
21569 do {
21570 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21571 n = vend - vbeg;
21572 if (mc->length) {
21573 n = (*mc->length)(p, vbeg, n);
21574 }
21575 str_copy(val, vbeg, n);
21576 p->lex.ptok = tok_beg;
21577 p->lex.pcur = tok_end;
21578 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21579 break;
21580 }
21581 } while (++mc < magic_comments + numberof(magic_comments));
21582#ifdef RIPPER
21583 str_copy(val, vbeg, vend - vbeg);
21584 dispatch2(magic_comment, name, val);
21585#endif
21586 }
21587
21588 return TRUE;
21589}
21590
21591static void
21592set_file_encoding(struct parser_params *p, const char *str, const char *send)
21593{
21594 int sep = 0;
21595 const char *beg = str;
21596 VALUE s;
21597
21598 for (;;) {
21599 if (send - str <= 6) return;
21600 switch (str[6]) {
21601 case 'C': case 'c': str += 6; continue;
21602 case 'O': case 'o': str += 5; continue;
21603 case 'D': case 'd': str += 4; continue;
21604 case 'I': case 'i': str += 3; continue;
21605 case 'N': case 'n': str += 2; continue;
21606 case 'G': case 'g': str += 1; continue;
21607 case '=': case ':':
21608 sep = 1;
21609 str += 6;
21610 break;
21611 default:
21612 str += 6;
21613 if (ISSPACE(*str)) break;
21614 continue;
21615 }
21616 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21617 sep = 0;
21618 }
21619 for (;;) {
21620 do {
21621 if (++str >= send) return;
21622 } while (ISSPACE(*str));
21623 if (sep) break;
21624 if (*str != '=' && *str != ':') return;
21625 sep = 1;
21626 str++;
21627 }
21628 beg = str;
21629 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21630 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21631 p->lex.ptok = beg;
21632 p->lex.pcur = str;
21633 parser_set_encode(p, RSTRING_PTR(s));
21634 rb_str_resize(s, 0);
21635}
21636
21637static void
21638parser_prepare(struct parser_params *p)
21639{
21640 int c = nextc0(p, FALSE);
21641 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21642 switch (c) {
21643 case '#':
21644 if (peek(p, '!')) p->has_shebang = 1;
21645 break;
21646 case 0xef: /* UTF-8 BOM marker */
21647 if (!lex_eol_n_p(p, 2) &&
21648 (unsigned char)p->lex.pcur[0] == 0xbb &&
21649 (unsigned char)p->lex.pcur[1] == 0xbf) {
21650 p->enc = rb_utf8_encoding();
21651 p->lex.pcur += 2;
21652#ifndef RIPPER
21653 if (p->debug_lines) {
21654 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21655 }
21656#endif
21657 p->lex.pbeg = p->lex.pcur;
21658 token_flush(p);
21659 return;
21660 }
21661 break;
21662 case -1: /* end of script. */
21663 return;
21664 }
21665 pushback(p, c);
21666 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21667}
21668
21669#ifndef RIPPER
21670#define ambiguous_operator(tok, op, syn) ( \
21671 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21672 rb_warning0("even though it seems like "syn""))
21673#else
21674#define ambiguous_operator(tok, op, syn) \
21675 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21676#endif
21677#define warn_balanced(tok, op, syn) ((void) \
21678 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21679 space_seen && !ISSPACE(c) && \
21680 (ambiguous_operator(tok, op, syn), 0)), \
21681 (enum yytokentype)(tok))
21682
21683static enum yytokentype
21684no_digits(struct parser_params *p)
21685{
21686 yyerror0("numeric literal without digits");
21687 if (peek(p, '_')) nextc(p);
21688 /* dummy 0, for tUMINUS_NUM at numeric */
21689 return set_number_literal(p, tINTEGER, 0, 10, 0);
21690}
21691
21692static enum yytokentype
21693parse_numeric(struct parser_params *p, int c)
21694{
21695 int is_float, seen_point, seen_e, nondigit;
21696 int suffix;
21697
21698 is_float = seen_point = seen_e = nondigit = 0;
21699 SET_LEX_STATE(EXPR_END);
21700 newtok(p);
21701 if (c == '-' || c == '+') {
21702 tokadd(p, c);
21703 c = nextc(p);
21704 }
21705 if (c == '0') {
21706 int start = toklen(p);
21707 c = nextc(p);
21708 if (c == 'x' || c == 'X') {
21709 /* hexadecimal */
21710 c = nextc(p);
21711 if (c != -1 && ISXDIGIT(c)) {
21712 do {
21713 if (c == '_') {
21714 if (nondigit) break;
21715 nondigit = c;
21716 continue;
21717 }
21718 if (!ISXDIGIT(c)) break;
21719 nondigit = 0;
21720 tokadd(p, c);
21721 } while ((c = nextc(p)) != -1);
21722 }
21723 pushback(p, c);
21724 tokfix(p);
21725 if (toklen(p) == start) {
21726 return no_digits(p);
21727 }
21728 else if (nondigit) goto trailing_uc;
21729 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21730 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21731 }
21732 if (c == 'b' || c == 'B') {
21733 /* binary */
21734 c = nextc(p);
21735 if (c == '0' || c == '1') {
21736 do {
21737 if (c == '_') {
21738 if (nondigit) break;
21739 nondigit = c;
21740 continue;
21741 }
21742 if (c != '0' && c != '1') break;
21743 nondigit = 0;
21744 tokadd(p, c);
21745 } while ((c = nextc(p)) != -1);
21746 }
21747 pushback(p, c);
21748 tokfix(p);
21749 if (toklen(p) == start) {
21750 return no_digits(p);
21751 }
21752 else if (nondigit) goto trailing_uc;
21753 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21754 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21755 }
21756 if (c == 'd' || c == 'D') {
21757 /* decimal */
21758 c = nextc(p);
21759 if (c != -1 && ISDIGIT(c)) {
21760 do {
21761 if (c == '_') {
21762 if (nondigit) break;
21763 nondigit = c;
21764 continue;
21765 }
21766 if (!ISDIGIT(c)) break;
21767 nondigit = 0;
21768 tokadd(p, c);
21769 } while ((c = nextc(p)) != -1);
21770 }
21771 pushback(p, c);
21772 tokfix(p);
21773 if (toklen(p) == start) {
21774 return no_digits(p);
21775 }
21776 else if (nondigit) goto trailing_uc;
21777 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21778 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21779 }
21780 if (c == '_') {
21781 /* 0_0 */
21782 goto octal_number;
21783 }
21784 if (c == 'o' || c == 'O') {
21785 /* prefixed octal */
21786 c = nextc(p);
21787 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21788 tokfix(p);
21789 return no_digits(p);
21790 }
21791 }
21792 if (c >= '0' && c <= '7') {
21793 /* octal */
21794 octal_number:
21795 do {
21796 if (c == '_') {
21797 if (nondigit) break;
21798 nondigit = c;
21799 continue;
21800 }
21801 if (c < '0' || c > '9') break;
21802 if (c > '7') goto invalid_octal;
21803 nondigit = 0;
21804 tokadd(p, c);
21805 } while ((c = nextc(p)) != -1);
21806 if (toklen(p) > start) {
21807 pushback(p, c);
21808 tokfix(p);
21809 if (nondigit) goto trailing_uc;
21810 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21811 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21812 }
21813 if (nondigit) {
21814 pushback(p, c);
21815 goto trailing_uc;
21816 }
21817 }
21818 if (c > '7' && c <= '9') {
21819 invalid_octal:
21820 yyerror0("Invalid octal digit");
21821 }
21822 else if (c == '.' || c == 'e' || c == 'E') {
21823 tokadd(p, '0');
21824 }
21825 else {
21826 pushback(p, c);
21827 tokfix(p);
21828 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21829 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21830 }
21831 }
21832
21833 for (;;) {
21834 switch (c) {
21835 case '0': case '1': case '2': case '3': case '4':
21836 case '5': case '6': case '7': case '8': case '9':
21837 nondigit = 0;
21838 tokadd(p, c);
21839 break;
21840
21841 case '.':
21842 if (nondigit) goto trailing_uc;
21843 if (seen_point || seen_e) {
21844 goto decode_num;
21845 }
21846 else {
21847 int c0 = nextc(p);
21848 if (c0 == -1 || !ISDIGIT(c0)) {
21849 pushback(p, c0);
21850 goto decode_num;
21851 }
21852 c = c0;
21853 }
21854 seen_point = toklen(p);
21855 tokadd(p, '.');
21856 tokadd(p, c);
21857 is_float++;
21858 nondigit = 0;
21859 break;
21860
21861 case 'e':
21862 case 'E':
21863 if (nondigit) {
21864 pushback(p, c);
21865 c = nondigit;
21866 goto decode_num;
21867 }
21868 if (seen_e) {
21869 goto decode_num;
21870 }
21871 nondigit = c;
21872 c = nextc(p);
21873 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21874 pushback(p, c);
21875 c = nondigit;
21876 nondigit = 0;
21877 goto decode_num;
21878 }
21879 tokadd(p, nondigit);
21880 seen_e++;
21881 is_float++;
21882 tokadd(p, c);
21883 nondigit = (c == '-' || c == '+') ? c : 0;
21884 break;
21885
21886 case '_': /* `_' in number just ignored */
21887 if (nondigit) goto decode_num;
21888 nondigit = c;
21889 break;
21890
21891 default:
21892 goto decode_num;
21893 }
21894 c = nextc(p);
21895 }
21896
21897 decode_num:
21898 pushback(p, c);
21899 if (nondigit) {
21900 trailing_uc:
21901 literal_flush(p, p->lex.pcur - 1);
21902 YYLTYPE loc = RUBY_INIT_YYLLOC();
21903 compile_error(p, "trailing '%c' in number", nondigit);
21904 parser_show_error_line(p, &loc);
21905 }
21906 tokfix(p);
21907 if (is_float) {
21908 enum yytokentype type = tFLOAT;
21909
21910 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21911 if (suffix & NUM_SUFFIX_R) {
21912 type = tRATIONAL;
21913 }
21914 else {
21915 errno = 0;
21916 strtod(tok(p), 0);
21917 if (errno == ERANGE) {
21918 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21919 errno = 0;
21920 }
21921 }
21922 return set_number_literal(p, type, suffix, 0, seen_point);
21923 }
21924 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21925 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21926}
21927
21928static enum yytokentype
21929parse_qmark(struct parser_params *p, int space_seen)
21930{
21931 rb_encoding *enc;
21932 register int c;
21933 rb_parser_string_t *lit;
21934 const char *start = p->lex.pcur;
21935
21936 if (IS_END()) {
21937 SET_LEX_STATE(EXPR_VALUE);
21938 return '?';
21939 }
21940 c = nextc(p);
21941 if (c == -1) {
21942 compile_error(p, "incomplete character syntax");
21943 return 0;
21944 }
21945 if (rb_enc_isspace(c, p->enc)) {
21946 if (!IS_ARG()) {
21947 int c2 = escaped_control_code(c);
21948 if (c2) {
21949 WARN_SPACE_CHAR(c2, "?");
21950 }
21951 }
21952 ternary:
21953 pushback(p, c);
21954 SET_LEX_STATE(EXPR_VALUE);
21955 return '?';
21956 }
21957 newtok(p);
21958 enc = p->enc;
21959 int w = parser_precise_mbclen(p, start);
21960 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21961 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21962 if (space_seen) {
21963 const char *ptr = start;
21964 do {
21965 int n = parser_precise_mbclen(p, ptr);
21966 if (n < 0) return -1;
21967 ptr += n;
21968 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21969 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21970 " a conditional operator, put a space after '?'",
21971 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21972 }
21973 goto ternary;
21974 }
21975 else if (c == '\\') {
21976 if (peek(p, 'u')) {
21977 nextc(p);
21978 enc = rb_utf8_encoding();
21979 tokadd_utf8(p, &enc, -1, 0, 0);
21980 }
21981 else if (!ISASCII(c = peekc(p)) && c != -1) {
21982 nextc(p);
21983 if (tokadd_mbchar(p, c) == -1) return 0;
21984 }
21985 else {
21986 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21987 tokadd(p, c);
21988 }
21989 }
21990 else {
21991 if (tokadd_mbchar(p, c) == -1) return 0;
21992 }
21993 tokfix(p);
21994 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21995 set_yylval_str(lit);
21996 SET_LEX_STATE(EXPR_END);
21997 return tCHAR;
21998}
21999
22000static enum yytokentype
22001parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
22002{
22003 register int c;
22004 const char *ptok = p->lex.pcur;
22005
22006 if (IS_BEG()) {
22007 int term;
22008 int paren;
22009
22010 c = nextc(p);
22011 quotation:
22012 if (c == -1) goto unterminated;
22013 if (!ISALNUM(c)) {
22014 term = c;
22015 if (!ISASCII(c)) goto unknown;
22016 c = 'Q';
22017 }
22018 else {
22019 term = nextc(p);
22020 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
22021 unknown:
22022 pushback(p, term);
22023 c = parser_precise_mbclen(p, p->lex.pcur);
22024 if (c < 0) return 0;
22025 p->lex.pcur += c;
22026 yyerror0("unknown type of %string");
22027 return 0;
22028 }
22029 }
22030 if (term == -1) {
22031 unterminated:
22032 compile_error(p, "unterminated quoted string meets end of file");
22033 return 0;
22034 }
22035 paren = term;
22036 if (term == '(') term = ')';
22037 else if (term == '[') term = ']';
22038 else if (term == '{') term = '}';
22039 else if (term == '<') term = '>';
22040 else paren = 0;
22041
22042 p->lex.ptok = ptok-1;
22043 switch (c) {
22044 case 'Q':
22045 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
22046 return tSTRING_BEG;
22047
22048 case 'q':
22049 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
22050 return tSTRING_BEG;
22051
22052 case 'W':
22053 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
22054 return tWORDS_BEG;
22055
22056 case 'w':
22057 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
22058 return tQWORDS_BEG;
22059
22060 case 'I':
22061 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
22062 return tSYMBOLS_BEG;
22063
22064 case 'i':
22065 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
22066 return tQSYMBOLS_BEG;
22067
22068 case 'x':
22069 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
22070 return tXSTRING_BEG;
22071
22072 case 'r':
22073 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
22074 return tREGEXP_BEG;
22075
22076 case 's':
22077 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
22078 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
22079 return tSYMBEG;
22080
22081 default:
22082 yyerror0("unknown type of %string");
22083 return 0;
22084 }
22085 }
22086 if ((c = nextc(p)) == '=') {
22087 set_yylval_id('%');
22088 SET_LEX_STATE(EXPR_BEG);
22089 return tOP_ASGN;
22090 }
22091 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
22092 goto quotation;
22093 }
22094 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22095 pushback(p, c);
22096 return warn_balanced('%', "%%", "string literal");
22097}
22098
22099static int
22100tokadd_ident(struct parser_params *p, int c)
22101{
22102 do {
22103 if (tokadd_mbchar(p, c) == -1) return -1;
22104 c = nextc(p);
22105 } while (parser_is_identchar(p));
22106 pushback(p, c);
22107 return 0;
22108}
22109
22110static ID
22111tokenize_ident(struct parser_params *p)
22112{
22113 ID ident = TOK_INTERN();
22114
22115 set_yylval_name(ident);
22116
22117 return ident;
22118}
22119
22120static int
22121parse_numvar(struct parser_params *p)
22122{
22123 size_t len;
22124 int overflow;
22125 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
22126 const unsigned long nth_ref_max =
22127 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
22128 /* NTH_REF is left-shifted to be ORed with back-ref flag and
22129 * turned into a Fixnum, in compile.c */
22130
22131 if (overflow || n > nth_ref_max) {
22132 /* compile_error()? */
22133 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
22134 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
22135 }
22136 else {
22137 return (int)n;
22138 }
22139}
22140
22141static enum yytokentype
22142parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
22143{
22144 const char *ptr = p->lex.pcur;
22145 register int c;
22146
22147 SET_LEX_STATE(EXPR_END);
22148 p->lex.ptok = ptr - 1; /* from '$' */
22149 newtok(p);
22150 c = nextc(p);
22151 switch (c) {
22152 case '_': /* $_: last read line string */
22153 c = nextc(p);
22154 if (parser_is_identchar(p)) {
22155 tokadd(p, '$');
22156 tokadd(p, '_');
22157 break;
22158 }
22159 pushback(p, c);
22160 c = '_';
22161 /* fall through */
22162 case '~': /* $~: match-data */
22163 case '*': /* $*: argv */
22164 case '$': /* $$: pid */
22165 case '?': /* $?: last status */
22166 case '!': /* $!: error string */
22167 case '@': /* $@: error position */
22168 case '/': /* $/: input record separator */
22169 case '\\': /* $\: output record separator */
22170 case ';': /* $;: field separator */
22171 case ',': /* $,: output field separator */
22172 case '.': /* $.: last read line number */
22173 case '=': /* $=: ignorecase */
22174 case ':': /* $:: load path */
22175 case '<': /* $<: default input handle */
22176 case '>': /* $>: default output handle */
22177 case '\"': /* $": already loaded files */
22178 tokadd(p, '$');
22179 tokadd(p, c);
22180 goto gvar;
22181
22182 case '-':
22183 tokadd(p, '$');
22184 tokadd(p, c);
22185 c = nextc(p);
22186 if (parser_is_identchar(p)) {
22187 if (tokadd_mbchar(p, c) == -1) return 0;
22188 }
22189 else {
22190 pushback(p, c);
22191 pushback(p, '-');
22192 return '$';
22193 }
22194 gvar:
22195 tokenize_ident(p);
22196 return tGVAR;
22197
22198 case '&': /* $&: last match */
22199 case '`': /* $`: string before last match */
22200 case '\'': /* $': string after last match */
22201 case '+': /* $+: string matches last paren. */
22202 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
22203 tokadd(p, '$');
22204 tokadd(p, c);
22205 goto gvar;
22206 }
22207 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
22208 return tBACK_REF;
22209
22210 case '1': case '2': case '3':
22211 case '4': case '5': case '6':
22212 case '7': case '8': case '9':
22213 tokadd(p, '$');
22214 do {
22215 tokadd(p, c);
22216 c = nextc(p);
22217 } while (c != -1 && ISDIGIT(c));
22218 pushback(p, c);
22219 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
22220 tokfix(p);
22221 c = parse_numvar(p);
22222 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
22223 return tNTH_REF;
22224
22225 default:
22226 if (!parser_is_identchar(p)) {
22227 YYLTYPE loc = RUBY_INIT_YYLLOC();
22228 if (c == -1 || ISSPACE(c)) {
22229 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
22230 }
22231 else {
22232 pushback(p, c);
22233 compile_error(p, "'$%c' is not allowed as a global variable name", c);
22234 }
22235 parser_show_error_line(p, &loc);
22236 set_yylval_noname();
22237 return tGVAR;
22238 }
22239 /* fall through */
22240 case '0':
22241 tokadd(p, '$');
22242 }
22243
22244 if (tokadd_ident(p, c)) return 0;
22245 SET_LEX_STATE(EXPR_END);
22246 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
22247 tokenize_ident(p);
22248 }
22249 else {
22250 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
22251 set_yylval_noname();
22252 }
22253 return tGVAR;
22254}
22255
22256static bool
22257parser_numbered_param(struct parser_params *p, int n)
22258{
22259 if (n < 0) return false;
22260
22261 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
22262 return false;
22263 }
22264 if (p->max_numparam == ORDINAL_PARAM) {
22265 compile_error(p, "ordinary parameter is defined");
22266 return false;
22267 }
22268 struct vtable *args = p->lvtbl->args;
22269 if (p->max_numparam < n) {
22270 p->max_numparam = n;
22271 }
22272 while (n > args->pos) {
22273 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
22274 }
22275 return true;
22276}
22277
22278static enum yytokentype
22279parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
22280{
22281 const char *ptr = p->lex.pcur;
22282 enum yytokentype result = tIVAR;
22283 register int c = nextc(p);
22284 YYLTYPE loc;
22285
22286 p->lex.ptok = ptr - 1; /* from '@' */
22287 newtok(p);
22288 tokadd(p, '@');
22289 if (c == '@') {
22290 result = tCVAR;
22291 tokadd(p, '@');
22292 c = nextc(p);
22293 }
22294 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
22295 if (c == -1 || !parser_is_identchar(p)) {
22296 pushback(p, c);
22297 RUBY_SET_YYLLOC(loc);
22298 if (result == tIVAR) {
22299 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
22300 }
22301 else {
22302 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
22303 }
22304 parser_show_error_line(p, &loc);
22305 set_yylval_noname();
22306 SET_LEX_STATE(EXPR_END);
22307 return result;
22308 }
22309 else if (ISDIGIT(c)) {
22310 pushback(p, c);
22311 RUBY_SET_YYLLOC(loc);
22312 if (result == tIVAR) {
22313 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
22314 }
22315 else {
22316 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
22317 }
22318 parser_show_error_line(p, &loc);
22319 set_yylval_noname();
22320 SET_LEX_STATE(EXPR_END);
22321 return result;
22322 }
22323
22324 if (tokadd_ident(p, c)) return 0;
22325 tokenize_ident(p);
22326 return result;
22327}
22328
22329static enum yytokentype
22330parse_ident(struct parser_params *p, int c, int cmd_state)
22331{
22332 enum yytokentype result;
22333 bool is_ascii = true;
22334 const enum lex_state_e last_state = p->lex.state;
22335 ID ident;
22336 int enforce_keyword_end = 0;
22337
22338 do {
22339 if (!ISASCII(c)) is_ascii = false;
22340 if (tokadd_mbchar(p, c) == -1) return 0;
22341 c = nextc(p);
22342 } while (parser_is_identchar(p));
22343 if ((c == '!' || c == '?') && !peek(p, '=')) {
22344 result = tFID;
22345 tokadd(p, c);
22346 }
22347 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
22348 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
22349 result = tIDENTIFIER;
22350 tokadd(p, c);
22351 }
22352 else {
22353 result = tCONSTANT; /* assume provisionally */
22354 pushback(p, c);
22355 }
22356 tokfix(p);
22357
22358 if (IS_LABEL_POSSIBLE()) {
22359 if (IS_LABEL_SUFFIX(0)) {
22360 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
22361 nextc(p);
22362 tokenize_ident(p);
22363 return tLABEL;
22364 }
22365 }
22366
22367#ifndef RIPPER
22368 if (peek_end_expect_token_locations(p)) {
22369 const rb_code_position_t *end_pos;
22370 int lineno, column;
22371 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
22372
22373 end_pos = peek_end_expect_token_locations(p)->pos;
22374 lineno = end_pos->lineno;
22375 column = end_pos->column;
22376
22377 if (p->debug) {
22378 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
22379 p->ruby_sourceline, beg_pos, lineno, column);
22380 }
22381
22382 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
22383 const struct kwtable *kw;
22384
22385 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
22386 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
22387 enforce_keyword_end = 1;
22388 }
22389 }
22390 }
22391#endif
22392
22393 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
22394 const struct kwtable *kw;
22395
22396 /* See if it is a reserved word. */
22397 kw = rb_reserved_word(tok(p), toklen(p));
22398 if (kw) {
22399 enum lex_state_e state = p->lex.state;
22400 if (IS_lex_state_for(state, EXPR_FNAME)) {
22401 SET_LEX_STATE(EXPR_ENDFN);
22402 set_yylval_name(rb_intern2(tok(p), toklen(p)));
22403 return kw->id[0];
22404 }
22405 SET_LEX_STATE(kw->state);
22406 if (IS_lex_state(EXPR_BEG)) {
22407 p->command_start = TRUE;
22408 }
22409 if (kw->id[0] == keyword_do) {
22410 if (lambda_beginning_p()) {
22411 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
22412 return keyword_do_LAMBDA;
22413 }
22414 if (COND_P()) return keyword_do_cond;
22415 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
22416 return keyword_do_block;
22417 return keyword_do;
22418 }
22419 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
22420 return kw->id[0];
22421 else {
22422 if (kw->id[0] != kw->id[1])
22423 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
22424 return kw->id[1];
22425 }
22426 }
22427 }
22428
22429 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
22430 if (cmd_state) {
22431 SET_LEX_STATE(EXPR_CMDARG);
22432 }
22433 else {
22434 SET_LEX_STATE(EXPR_ARG);
22435 }
22436 }
22437 else if (p->lex.state == EXPR_FNAME) {
22438 SET_LEX_STATE(EXPR_ENDFN);
22439 }
22440 else {
22441 SET_LEX_STATE(EXPR_END);
22442 }
22443
22444 ident = tokenize_ident(p);
22445 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
22446 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
22447 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
22448 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
22449 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
22450 }
22451 return result;
22452}
22453
22454static void
22455warn_cr(struct parser_params *p)
22456{
22457 if (!p->cr_seen) {
22458 p->cr_seen = TRUE;
22459 /* carried over with p->lex.nextline for nextc() */
22460 rb_warn0("encountered \\r in middle of line, treated as a mere space");
22461 }
22462}
22463
22464static enum yytokentype
22465parser_yylex(struct parser_params *p)
22466{
22467 register int c;
22468 int space_seen = 0;
22469 int cmd_state;
22470 int label;
22471 enum lex_state_e last_state;
22472 int fallthru = FALSE;
22473 int token_seen = p->token_seen;
22474
22475 if (p->lex.strterm) {
22476 if (strterm_is_heredoc(p->lex.strterm)) {
22477 token_flush(p);
22478 return here_document(p, &p->lex.strterm->u.heredoc);
22479 }
22480 else {
22481 token_flush(p);
22482 return parse_string(p, &p->lex.strterm->u.literal);
22483 }
22484 }
22485 cmd_state = p->command_start;
22486 p->command_start = FALSE;
22487 p->token_seen = TRUE;
22488#ifndef RIPPER
22489 token_flush(p);
22490#endif
22491 retry:
22492 last_state = p->lex.state;
22493 switch (c = nextc(p)) {
22494 case '\0': /* NUL */
22495 case '\004': /* ^D */
22496 case '\032': /* ^Z */
22497 case -1: /* end of script. */
22498 p->eofp = 1;
22499#ifndef RIPPER
22500 if (p->end_expect_token_locations) {
22501 pop_end_expect_token_locations(p);
22502 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22503 return tDUMNY_END;
22504 }
22505#endif
22506 /* Set location for end-of-input because dispatch_scan_event is not called. */
22507 RUBY_SET_YYLLOC(*p->yylloc);
22508 return END_OF_INPUT;
22509
22510 /* white spaces */
22511 case '\r':
22512 warn_cr(p);
22513 /* fall through */
22514 case ' ': case '\t': case '\f':
22515 case '\13': /* '\v' */
22516 space_seen = 1;
22517 while ((c = nextc(p))) {
22518 switch (c) {
22519 case '\r':
22520 warn_cr(p);
22521 /* fall through */
22522 case ' ': case '\t': case '\f':
22523 case '\13': /* '\v' */
22524 break;
22525 default:
22526 goto outofloop;
22527 }
22528 }
22529 outofloop:
22530 pushback(p, c);
22531 dispatch_scan_event(p, tSP);
22532#ifndef RIPPER
22533 token_flush(p);
22534#endif
22535 goto retry;
22536
22537 case '#': /* it's a comment */
22538 p->token_seen = token_seen;
22539 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22540 /* no magic_comment in shebang line */
22541 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22542 if (comment_at_top(p)) {
22543 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22544 }
22545 }
22546 p->lex.pcur = pcur, p->lex.ptok = ptok;
22547 lex_goto_eol(p);
22548 dispatch_scan_event(p, tCOMMENT);
22549 fallthru = TRUE;
22550 /* fall through */
22551 case '\n':
22552 p->token_seen = token_seen;
22553 rb_parser_string_t *prevline = p->lex.lastline;
22554 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22555 !IS_lex_state(EXPR_LABELED));
22556 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22557 if (!fallthru) {
22558 dispatch_scan_event(p, tIGNORED_NL);
22559 }
22560 fallthru = FALSE;
22561 if (!c && p->ctxt.in_kwarg) {
22562 goto normal_newline;
22563 }
22564 goto retry;
22565 }
22566 while (1) {
22567 switch (c = nextc(p)) {
22568 case ' ': case '\t': case '\f': case '\r':
22569 case '\13': /* '\v' */
22570 space_seen = 1;
22571 break;
22572 case '#':
22573 pushback(p, c);
22574 if (space_seen) {
22575 dispatch_scan_event(p, tSP);
22576 token_flush(p);
22577 }
22578 goto retry;
22579 case 'a':
22580 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22581 goto bol;
22582 case 'o':
22583 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22584 goto bol;
22585 case '|':
22586 if (peek(p, '|')) goto leading_logical;
22587 goto bol;
22588 case '&':
22589 if (peek(p, '&')) {
22590 leading_logical:
22591 pushback(p, c);
22592 dispatch_delayed_token(p, tIGNORED_NL);
22593 cmd_state = FALSE;
22594 goto retry;
22595 }
22596 /* fall through */
22597 case '.': {
22598 dispatch_delayed_token(p, tIGNORED_NL);
22599 if (peek(p, '.') == (c == '&')) {
22600 pushback(p, c);
22601 dispatch_scan_event(p, tSP);
22602 goto retry;
22603 }
22604 }
22605 bol:
22606 default:
22607 p->ruby_sourceline--;
22608 p->lex.nextline = p->lex.lastline;
22609 set_lastline(p, prevline);
22610 case -1: /* EOF no decrement*/
22611 if (c == -1 && space_seen) {
22612 dispatch_scan_event(p, tSP);
22613 }
22614 lex_goto_eol(p);
22615 if (c != -1) {
22616 token_flush(p);
22617 RUBY_SET_YYLLOC(*p->yylloc);
22618 }
22619 goto normal_newline;
22620 }
22621 }
22622 normal_newline:
22623 p->command_start = TRUE;
22624 SET_LEX_STATE(EXPR_BEG);
22625 return '\n';
22626
22627 case '*':
22628 if ((c = nextc(p)) == '*') {
22629 if ((c = nextc(p)) == '=') {
22630 set_yylval_id(idPow);
22631 SET_LEX_STATE(EXPR_BEG);
22632 return tOP_ASGN;
22633 }
22634 pushback(p, c);
22635 if (IS_SPCARG(c)) {
22636 rb_warning0("'**' interpreted as argument prefix");
22637 c = tDSTAR;
22638 }
22639 else if (IS_BEG()) {
22640 c = tDSTAR;
22641 }
22642 else {
22643 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22644 }
22645 }
22646 else {
22647 if (c == '=') {
22648 set_yylval_id('*');
22649 SET_LEX_STATE(EXPR_BEG);
22650 return tOP_ASGN;
22651 }
22652 pushback(p, c);
22653 if (IS_SPCARG(c)) {
22654 rb_warning0("'*' interpreted as argument prefix");
22655 c = tSTAR;
22656 }
22657 else if (IS_BEG()) {
22658 c = tSTAR;
22659 }
22660 else {
22661 c = warn_balanced('*', "*", "argument prefix");
22662 }
22663 }
22664 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22665 return c;
22666
22667 case '!':
22668 c = nextc(p);
22669 if (IS_AFTER_OPERATOR()) {
22670 SET_LEX_STATE(EXPR_ARG);
22671 if (c == '@') {
22672 return '!';
22673 }
22674 }
22675 else {
22676 SET_LEX_STATE(EXPR_BEG);
22677 }
22678 if (c == '=') {
22679 return tNEQ;
22680 }
22681 if (c == '~') {
22682 return tNMATCH;
22683 }
22684 pushback(p, c);
22685 return '!';
22686
22687 case '=':
22688 if (was_bol(p)) {
22689 /* skip embedded rd document */
22690 if (word_match_p(p, "begin", 5)) {
22691 int first_p = TRUE;
22692
22693 lex_goto_eol(p);
22694 dispatch_scan_event(p, tEMBDOC_BEG);
22695 for (;;) {
22696 lex_goto_eol(p);
22697 if (!first_p) {
22698 dispatch_scan_event(p, tEMBDOC);
22699 }
22700 first_p = FALSE;
22701 c = nextc(p);
22702 if (c == -1) {
22703 compile_error(p, "embedded document meets end of file");
22704 return END_OF_INPUT;
22705 }
22706 if (c == '=' && word_match_p(p, "end", 3)) {
22707 break;
22708 }
22709 pushback(p, c);
22710 }
22711 lex_goto_eol(p);
22712 dispatch_scan_event(p, tEMBDOC_END);
22713 goto retry;
22714 }
22715 }
22716
22717 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22718 if ((c = nextc(p)) == '=') {
22719 if ((c = nextc(p)) == '=') {
22720 return tEQQ;
22721 }
22722 pushback(p, c);
22723 return tEQ;
22724 }
22725 if (c == '~') {
22726 return tMATCH;
22727 }
22728 else if (c == '>') {
22729 return tASSOC;
22730 }
22731 pushback(p, c);
22732 return '=';
22733
22734 case '<':
22735 c = nextc(p);
22736 if (c == '<' &&
22737 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22738 !IS_END() &&
22739 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22740 enum yytokentype token = heredoc_identifier(p);
22741 if (token) return token < 0 ? 0 : token;
22742 }
22743 if (IS_AFTER_OPERATOR()) {
22744 SET_LEX_STATE(EXPR_ARG);
22745 }
22746 else {
22747 if (IS_lex_state(EXPR_CLASS))
22748 p->command_start = TRUE;
22749 SET_LEX_STATE(EXPR_BEG);
22750 }
22751 if (c == '=') {
22752 if ((c = nextc(p)) == '>') {
22753 return tCMP;
22754 }
22755 pushback(p, c);
22756 return tLEQ;
22757 }
22758 if (c == '<') {
22759 if ((c = nextc(p)) == '=') {
22760 set_yylval_id(idLTLT);
22761 SET_LEX_STATE(EXPR_BEG);
22762 return tOP_ASGN;
22763 }
22764 pushback(p, c);
22765 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22766 }
22767 pushback(p, c);
22768 return '<';
22769
22770 case '>':
22771 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22772 if ((c = nextc(p)) == '=') {
22773 return tGEQ;
22774 }
22775 if (c == '>') {
22776 if ((c = nextc(p)) == '=') {
22777 set_yylval_id(idGTGT);
22778 SET_LEX_STATE(EXPR_BEG);
22779 return tOP_ASGN;
22780 }
22781 pushback(p, c);
22782 return tRSHFT;
22783 }
22784 pushback(p, c);
22785 return '>';
22786
22787 case '"':
22788 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22789 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22790 p->lex.ptok = p->lex.pcur-1;
22791 return tSTRING_BEG;
22792
22793 case '`':
22794 if (IS_lex_state(EXPR_FNAME)) {
22795 SET_LEX_STATE(EXPR_ENDFN);
22796 return c;
22797 }
22798 if (IS_lex_state(EXPR_DOT)) {
22799 if (cmd_state)
22800 SET_LEX_STATE(EXPR_CMDARG);
22801 else
22802 SET_LEX_STATE(EXPR_ARG);
22803 return c;
22804 }
22805 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22806 return tXSTRING_BEG;
22807
22808 case '\'':
22809 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22810 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22811 p->lex.ptok = p->lex.pcur-1;
22812 return tSTRING_BEG;
22813
22814 case '?':
22815 return parse_qmark(p, space_seen);
22816
22817 case '&':
22818 if ((c = nextc(p)) == '&') {
22819 SET_LEX_STATE(EXPR_BEG);
22820 if ((c = nextc(p)) == '=') {
22821 set_yylval_id(idANDOP);
22822 SET_LEX_STATE(EXPR_BEG);
22823 return tOP_ASGN;
22824 }
22825 pushback(p, c);
22826 return tANDOP;
22827 }
22828 else if (c == '=') {
22829 set_yylval_id('&');
22830 SET_LEX_STATE(EXPR_BEG);
22831 return tOP_ASGN;
22832 }
22833 else if (c == '.') {
22834 set_yylval_id(idANDDOT);
22835 SET_LEX_STATE(EXPR_DOT);
22836 return tANDDOT;
22837 }
22838 pushback(p, c);
22839 if (IS_SPCARG(c)) {
22840 if ((c != ':') ||
22841 (c = peekc_n(p, 1)) == -1 ||
22842 !(c == '\'' || c == '"' ||
22843 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22844 rb_warning0("'&' interpreted as argument prefix");
22845 }
22846 c = tAMPER;
22847 }
22848 else if (IS_BEG()) {
22849 c = tAMPER;
22850 }
22851 else {
22852 c = warn_balanced('&', "&", "argument prefix");
22853 }
22854 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22855 return c;
22856
22857 case '|':
22858 if ((c = nextc(p)) == '|') {
22859 SET_LEX_STATE(EXPR_BEG);
22860 if ((c = nextc(p)) == '=') {
22861 set_yylval_id(idOROP);
22862 SET_LEX_STATE(EXPR_BEG);
22863 return tOP_ASGN;
22864 }
22865 pushback(p, c);
22866 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22867 c = '|';
22868 pushback(p, '|');
22869 return c;
22870 }
22871 return tOROP;
22872 }
22873 if (c == '=') {
22874 set_yylval_id('|');
22875 SET_LEX_STATE(EXPR_BEG);
22876 return tOP_ASGN;
22877 }
22878 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22879 pushback(p, c);
22880 return '|';
22881
22882 case '+':
22883 c = nextc(p);
22884 if (IS_AFTER_OPERATOR()) {
22885 SET_LEX_STATE(EXPR_ARG);
22886 if (c == '@') {
22887 return tUPLUS;
22888 }
22889 pushback(p, c);
22890 return '+';
22891 }
22892 if (c == '=') {
22893 set_yylval_id('+');
22894 SET_LEX_STATE(EXPR_BEG);
22895 return tOP_ASGN;
22896 }
22897 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22898 SET_LEX_STATE(EXPR_BEG);
22899 pushback(p, c);
22900 if (c != -1 && ISDIGIT(c)) {
22901 return parse_numeric(p, '+');
22902 }
22903 return tUPLUS;
22904 }
22905 SET_LEX_STATE(EXPR_BEG);
22906 pushback(p, c);
22907 return warn_balanced('+', "+", "unary operator");
22908
22909 case '-':
22910 c = nextc(p);
22911 if (IS_AFTER_OPERATOR()) {
22912 SET_LEX_STATE(EXPR_ARG);
22913 if (c == '@') {
22914 return tUMINUS;
22915 }
22916 pushback(p, c);
22917 return '-';
22918 }
22919 if (c == '=') {
22920 set_yylval_id('-');
22921 SET_LEX_STATE(EXPR_BEG);
22922 return tOP_ASGN;
22923 }
22924 if (c == '>') {
22925 SET_LEX_STATE(EXPR_ENDFN);
22926 yylval.num = p->lex.lpar_beg;
22927 p->lex.lpar_beg = p->lex.paren_nest;
22928 return tLAMBDA;
22929 }
22930 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22931 SET_LEX_STATE(EXPR_BEG);
22932 pushback(p, c);
22933 if (c != -1 && ISDIGIT(c)) {
22934 return tUMINUS_NUM;
22935 }
22936 return tUMINUS;
22937 }
22938 SET_LEX_STATE(EXPR_BEG);
22939 pushback(p, c);
22940 return warn_balanced('-', "-", "unary operator");
22941
22942 case '.': {
22943 int is_beg = IS_BEG();
22944 SET_LEX_STATE(EXPR_BEG);
22945 if ((c = nextc(p)) == '.') {
22946 if ((c = nextc(p)) == '.') {
22947 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22948 SET_LEX_STATE(EXPR_ENDARG);
22949 return tBDOT3;
22950 }
22951 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22952 rb_warn0("... at EOL, should be parenthesized?");
22953 }
22954 return is_beg ? tBDOT3 : tDOT3;
22955 }
22956 pushback(p, c);
22957 return is_beg ? tBDOT2 : tDOT2;
22958 }
22959 pushback(p, c);
22960 if (c != -1 && ISDIGIT(c)) {
22961 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22962 parse_numeric(p, '.');
22963 if (ISDIGIT(prev)) {
22964 yyerror0("unexpected fraction part after numeric literal");
22965 }
22966 else {
22967 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22968 }
22969 set_yylval_id(idNULL);
22970 SET_LEX_STATE(EXPR_END);
22971 p->lex.ptok = p->lex.pcur;
22972 goto retry;
22973 }
22974 set_yylval_id('.');
22975 SET_LEX_STATE(EXPR_DOT);
22976 return '.';
22977 }
22978
22979 case '0': case '1': case '2': case '3': case '4':
22980 case '5': case '6': case '7': case '8': case '9':
22981 return parse_numeric(p, c);
22982
22983 case ')':
22984 COND_POP();
22985 CMDARG_POP();
22986 SET_LEX_STATE(EXPR_ENDFN);
22987 p->lex.paren_nest--;
22988 return c;
22989
22990 case ']':
22991 COND_POP();
22992 CMDARG_POP();
22993 SET_LEX_STATE(EXPR_END);
22994 p->lex.paren_nest--;
22995 return c;
22996
22997 case '}':
22998 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22999 if (!p->lex.brace_nest--) return tSTRING_DEND;
23000 COND_POP();
23001 CMDARG_POP();
23002 SET_LEX_STATE(EXPR_END);
23003 p->lex.paren_nest--;
23004 return c;
23005
23006 case ':':
23007 c = nextc(p);
23008 if (c == ':') {
23009 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
23010 SET_LEX_STATE(EXPR_BEG);
23011 return tCOLON3;
23012 }
23013 set_yylval_id(idCOLON2);
23014 SET_LEX_STATE(EXPR_DOT);
23015 return tCOLON2;
23016 }
23017 if (IS_END() || ISSPACE(c) || c == '#') {
23018 pushback(p, c);
23019 c = warn_balanced(':', ":", "symbol literal");
23020 SET_LEX_STATE(EXPR_BEG);
23021 return c;
23022 }
23023 switch (c) {
23024 case '\'':
23025 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
23026 break;
23027 case '"':
23028 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
23029 break;
23030 default:
23031 pushback(p, c);
23032 break;
23033 }
23034 SET_LEX_STATE(EXPR_FNAME);
23035 return tSYMBEG;
23036
23037 case '/':
23038 if (IS_BEG()) {
23039 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
23040 return tREGEXP_BEG;
23041 }
23042 if ((c = nextc(p)) == '=') {
23043 set_yylval_id('/');
23044 SET_LEX_STATE(EXPR_BEG);
23045 return tOP_ASGN;
23046 }
23047 pushback(p, c);
23048 if (IS_SPCARG(c)) {
23049 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
23050 return tREGEXP_BEG;
23051 }
23052 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
23053 return warn_balanced('/', "/", "regexp literal");
23054
23055 case '^':
23056 if ((c = nextc(p)) == '=') {
23057 set_yylval_id('^');
23058 SET_LEX_STATE(EXPR_BEG);
23059 return tOP_ASGN;
23060 }
23061 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
23062 pushback(p, c);
23063 return '^';
23064
23065 case ';':
23066 SET_LEX_STATE(EXPR_BEG);
23067 p->command_start = TRUE;
23068 return ';';
23069
23070 case ',':
23071 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23072 return ',';
23073
23074 case '~':
23075 if (IS_AFTER_OPERATOR()) {
23076 if ((c = nextc(p)) != '@') {
23077 pushback(p, c);
23078 }
23079 SET_LEX_STATE(EXPR_ARG);
23080 }
23081 else {
23082 SET_LEX_STATE(EXPR_BEG);
23083 }
23084 return '~';
23085
23086 case '(':
23087 if (IS_BEG()) {
23088 c = tLPAREN;
23089 }
23090 else if (!space_seen) {
23091 /* foo( ... ) => method call, no ambiguity */
23092 }
23093 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
23094 c = tLPAREN_ARG;
23095 }
23096 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
23097 rb_warning0("parentheses after method name is interpreted as "
23098 "an argument list, not a decomposed argument");
23099 }
23100 p->lex.paren_nest++;
23101 COND_PUSH(0);
23102 CMDARG_PUSH(0);
23103 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23104 return c;
23105
23106 case '[':
23107 p->lex.paren_nest++;
23108 if (IS_AFTER_OPERATOR()) {
23109 if ((c = nextc(p)) == ']') {
23110 p->lex.paren_nest--;
23111 SET_LEX_STATE(EXPR_ARG);
23112 if ((c = nextc(p)) == '=') {
23113 return tASET;
23114 }
23115 pushback(p, c);
23116 return tAREF;
23117 }
23118 pushback(p, c);
23119 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
23120 return '[';
23121 }
23122 else if (IS_BEG()) {
23123 c = tLBRACK;
23124 }
23125 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
23126 c = tLBRACK;
23127 }
23128 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23129 COND_PUSH(0);
23130 CMDARG_PUSH(0);
23131 return c;
23132
23133 case '{':
23134 ++p->lex.brace_nest;
23135 if (lambda_beginning_p())
23136 c = tLAMBEG;
23137 else if (IS_lex_state(EXPR_LABELED))
23138 c = tLBRACE; /* hash */
23139 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
23140 c = '{'; /* block (primary) */
23141 else if (IS_lex_state(EXPR_ENDARG))
23142 c = tLBRACE_ARG; /* block (expr) */
23143 else
23144 c = tLBRACE; /* hash */
23145 if (c != tLBRACE) {
23146 p->command_start = TRUE;
23147 SET_LEX_STATE(EXPR_BEG);
23148 }
23149 else {
23150 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23151 }
23152 ++p->lex.paren_nest; /* after lambda_beginning_p() */
23153 COND_PUSH(0);
23154 CMDARG_PUSH(0);
23155 return c;
23156
23157 case '\\':
23158 c = nextc(p);
23159 if (c == '\n') {
23160 space_seen = 1;
23161 dispatch_scan_event(p, tSP);
23162 goto retry; /* skip \\n */
23163 }
23164 if (c == ' ') return tSP;
23165 if (ISSPACE(c)) return c;
23166 pushback(p, c);
23167 return '\\';
23168
23169 case '%':
23170 return parse_percent(p, space_seen, last_state);
23171
23172 case '$':
23173 return parse_gvar(p, last_state);
23174
23175 case '@':
23176 return parse_atmark(p, last_state);
23177
23178 case '_':
23179 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
23180 p->ruby__end__seen = 1;
23181 p->eofp = 1;
23182#ifdef RIPPER
23183 lex_goto_eol(p);
23184 dispatch_scan_event(p, k__END__);
23185#endif
23186 return END_OF_INPUT;
23187 }
23188 newtok(p);
23189 break;
23190
23191 default:
23192 if (!parser_is_identchar(p)) {
23193 compile_error(p, "Invalid char '\\x%02X' in expression", c);
23194 token_flush(p);
23195 goto retry;
23196 }
23197
23198 newtok(p);
23199 break;
23200 }
23201
23202 return parse_ident(p, c, cmd_state);
23203}
23204
23205static enum yytokentype
23206yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
23207{
23208 enum yytokentype t;
23209
23210 p->lval = lval;
23211 lval->node = 0;
23212 p->yylloc = yylloc;
23213
23214 t = parser_yylex(p);
23215
23216 if (has_delayed_token(p))
23217 dispatch_delayed_token(p, t);
23218 else if (t != END_OF_INPUT)
23219 dispatch_scan_event(p, t);
23220
23221 return t;
23222}
23223
23224#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
23225
23226static NODE*
23227node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
23228{
23229 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
23230
23231 rb_node_init(n, type);
23232 return n;
23233}
23234
23235static NODE *
23236nd_set_loc(NODE *nd, const YYLTYPE *loc)
23237{
23238 nd->nd_loc = *loc;
23239 nd_set_line(nd, loc->beg_pos.lineno);
23240 return nd;
23241}
23242
23243static NODE*
23244node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
23245{
23246 NODE *n = node_new_internal(p, type, size, alignment);
23247
23248 nd_set_loc(n, loc);
23249 nd_set_node_id(n, parser_get_node_id(p));
23250 return n;
23251}
23252
23253#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
23254
23255static rb_node_scope_t *
23256rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23257{
23258 rb_ast_id_table_t *nd_tbl;
23259 nd_tbl = local_tbl(p);
23260 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23261 n->nd_tbl = nd_tbl;
23262 n->nd_body = nd_body;
23263 n->nd_parent = nd_parent;
23264 n->nd_args = nd_args;
23265
23266 return n;
23267}
23268
23269static rb_node_scope_t *
23270rb_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)
23271{
23272 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23273 n->nd_tbl = nd_tbl;
23274 n->nd_body = nd_body;
23275 n->nd_parent = nd_parent;
23276 n->nd_args = nd_args;
23277
23278 return n;
23279}
23280
23281static rb_node_defn_t *
23282rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23283{
23284 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
23285 n->nd_mid = nd_mid;
23286 n->nd_defn = nd_defn;
23287
23288 return n;
23289}
23290
23291static rb_node_defs_t *
23292rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23293{
23294 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
23295 n->nd_recv = nd_recv;
23296 n->nd_mid = nd_mid;
23297 n->nd_defn = nd_defn;
23298
23299 return n;
23300}
23301
23302static rb_node_block_t *
23303rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23304{
23305 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
23306 n->nd_head = nd_head;
23307 n->nd_end = (NODE *)n;
23308 n->nd_next = 0;
23309
23310 return n;
23311}
23312
23313static rb_node_for_t *
23314rb_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)
23315{
23316 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
23317 n->nd_body = nd_body;
23318 n->nd_iter = nd_iter;
23319 n->for_keyword_loc = *for_keyword_loc;
23320 n->in_keyword_loc = *in_keyword_loc;
23321 n->do_keyword_loc = *do_keyword_loc;
23322 n->end_keyword_loc = *end_keyword_loc;
23323
23324 return n;
23325}
23326
23327static rb_node_for_masgn_t *
23328rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
23329{
23330 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
23331 n->nd_var = nd_var;
23332
23333 return n;
23334}
23335
23336static rb_node_retry_t *
23337rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
23338{
23339 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
23340
23341 return n;
23342}
23343
23344static rb_node_begin_t *
23345rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23346{
23347 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
23348 n->nd_body = nd_body;
23349
23350 return n;
23351}
23352
23353static rb_node_rescue_t *
23354rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
23355{
23356 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
23357 n->nd_head = nd_head;
23358 n->nd_resq = nd_resq;
23359 n->nd_else = nd_else;
23360
23361 return n;
23362}
23363
23364static rb_node_resbody_t *
23365rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
23366{
23367 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
23368 n->nd_args = nd_args;
23369 n->nd_exc_var = nd_exc_var;
23370 n->nd_body = nd_body;
23371 n->nd_next = nd_next;
23372
23373 return n;
23374}
23375
23376static rb_node_ensure_t *
23377rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
23378{
23379 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
23380 n->nd_head = nd_head;
23381 n->nd_ensr = nd_ensr;
23382
23383 return n;
23384}
23385
23386static rb_node_and_t *
23387rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23388{
23389 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
23390 n->nd_1st = nd_1st;
23391 n->nd_2nd = nd_2nd;
23392 n->operator_loc = *operator_loc;
23393
23394 return n;
23395}
23396
23397static rb_node_or_t *
23398rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23399{
23400 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
23401 n->nd_1st = nd_1st;
23402 n->nd_2nd = nd_2nd;
23403 n->operator_loc = *operator_loc;
23404
23405 return n;
23406}
23407
23408static rb_node_return_t *
23409rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23410{
23411 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
23412 n->nd_stts = nd_stts;
23413 n->keyword_loc = *keyword_loc;
23414 return n;
23415}
23416
23417static rb_node_yield_t *
23418rb_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)
23419{
23420 if (nd_head) no_blockarg(p, nd_head);
23421
23422 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
23423 n->nd_head = nd_head;
23424 n->keyword_loc = *keyword_loc;
23425 n->lparen_loc = *lparen_loc;
23426 n->rparen_loc = *rparen_loc;
23427
23428 return n;
23429}
23430
23431static rb_node_if_t *
23432rb_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)
23433{
23434 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
23435 n->nd_cond = nd_cond;
23436 n->nd_body = nd_body;
23437 n->nd_else = nd_else;
23438 n->if_keyword_loc = *if_keyword_loc;
23439 n->then_keyword_loc = *then_keyword_loc;
23440 n->end_keyword_loc = *end_keyword_loc;
23441
23442 return n;
23443}
23444
23445static rb_node_unless_t *
23446rb_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)
23447{
23448 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
23449 n->nd_cond = nd_cond;
23450 n->nd_body = nd_body;
23451 n->nd_else = nd_else;
23452 n->keyword_loc = *keyword_loc;
23453 n->then_keyword_loc = *then_keyword_loc;
23454 n->end_keyword_loc = *end_keyword_loc;
23455
23456 return n;
23457}
23458
23459static rb_node_class_t *
23460rb_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)
23461{
23462 /* Keep the order of node creation */
23463 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23464 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
23465 RNODE_SCOPE(scope)->nd_parent = &n->node;
23466 n->nd_cpath = nd_cpath;
23467 n->nd_body = scope;
23468 n->nd_super = nd_super;
23469 n->class_keyword_loc = *class_keyword_loc;
23470 n->inheritance_operator_loc = *inheritance_operator_loc;
23471 n->end_keyword_loc = *end_keyword_loc;
23472
23473 return n;
23474}
23475
23476static rb_node_sclass_t *
23477rb_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)
23478{
23479 /* Keep the order of node creation */
23480 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23481 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
23482 RNODE_SCOPE(scope)->nd_parent = &n->node;
23483 n->nd_recv = nd_recv;
23484 n->nd_body = scope;
23485 n->class_keyword_loc = *class_keyword_loc;
23486 n->operator_loc = *operator_loc;
23487 n->end_keyword_loc = *end_keyword_loc;
23488
23489 return n;
23490}
23491
23492static rb_node_module_t *
23493rb_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)
23494{
23495 /* Keep the order of node creation */
23496 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23497 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23498 RNODE_SCOPE(scope)->nd_parent = &n->node;
23499 n->nd_cpath = nd_cpath;
23500 n->nd_body = scope;
23501 n->module_keyword_loc = *module_keyword_loc;
23502 n->end_keyword_loc = *end_keyword_loc;
23503
23504 return n;
23505}
23506
23507static rb_node_iter_t *
23508rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23509{
23510 /* Keep the order of node creation */
23511 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23512 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23513 RNODE_SCOPE(scope)->nd_parent = &n->node;
23514 n->nd_body = scope;
23515 n->nd_iter = 0;
23516
23517 return n;
23518}
23519
23520static rb_node_lambda_t *
23521rb_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)
23522{
23523 /* Keep the order of node creation */
23524 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23525 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23526 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23527 RNODE_SCOPE(scope)->nd_parent = &n->node;
23528 n->nd_body = scope;
23529 n->operator_loc = *operator_loc;
23530 n->opening_loc = *opening_loc;
23531 n->closing_loc = *closing_loc;
23532
23533 return n;
23534}
23535
23536static rb_node_case_t *
23537rb_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)
23538{
23539 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23540 n->nd_head = nd_head;
23541 n->nd_body = nd_body;
23542 n->case_keyword_loc = *case_keyword_loc;
23543 n->end_keyword_loc = *end_keyword_loc;
23544
23545 return n;
23546}
23547
23548static rb_node_case2_t *
23549rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23550{
23551 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23552 n->nd_head = 0;
23553 n->nd_body = nd_body;
23554 n->case_keyword_loc = *case_keyword_loc;
23555 n->end_keyword_loc = *end_keyword_loc;
23556
23557 return n;
23558}
23559
23560static rb_node_case3_t *
23561rb_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)
23562{
23563 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23564 n->nd_head = nd_head;
23565 n->nd_body = nd_body;
23566 n->case_keyword_loc = *case_keyword_loc;
23567 n->end_keyword_loc = *end_keyword_loc;
23568
23569 return n;
23570}
23571
23572static rb_node_when_t *
23573rb_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)
23574{
23575 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23576 n->nd_head = nd_head;
23577 n->nd_body = nd_body;
23578 n->nd_next = nd_next;
23579 n->keyword_loc = *keyword_loc;
23580 n->then_keyword_loc = *then_keyword_loc;
23581
23582 return n;
23583}
23584
23585static rb_node_in_t *
23586rb_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)
23587{
23588 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23589 n->nd_head = nd_head;
23590 n->nd_body = nd_body;
23591 n->nd_next = nd_next;
23592 n->in_keyword_loc = *in_keyword_loc;
23593 n->then_keyword_loc = *then_keyword_loc;
23594 n->operator_loc = *operator_loc;
23595
23596 return n;
23597}
23598
23599static rb_node_while_t *
23600rb_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)
23601{
23602 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23603 n->nd_cond = nd_cond;
23604 n->nd_body = nd_body;
23605 n->nd_state = nd_state;
23606 n->keyword_loc = *keyword_loc;
23607 n->closing_loc = *closing_loc;
23608
23609 return n;
23610}
23611
23612static rb_node_until_t *
23613rb_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)
23614{
23615 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23616 n->nd_cond = nd_cond;
23617 n->nd_body = nd_body;
23618 n->nd_state = nd_state;
23619 n->keyword_loc = *keyword_loc;
23620 n->closing_loc = *closing_loc;
23621
23622 return n;
23623}
23624
23625static rb_node_colon2_t *
23626rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23627{
23628 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23629 n->nd_head = nd_head;
23630 n->nd_mid = nd_mid;
23631 n->delimiter_loc = *delimiter_loc;
23632 n->name_loc = *name_loc;
23633
23634 return n;
23635}
23636
23637static rb_node_colon3_t *
23638rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23639{
23640 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23641 n->nd_mid = nd_mid;
23642 n->delimiter_loc = *delimiter_loc;
23643 n->name_loc = *name_loc;
23644
23645 return n;
23646}
23647
23648static rb_node_dot2_t *
23649rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23650{
23651 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23652 n->nd_beg = nd_beg;
23653 n->nd_end = nd_end;
23654 n->operator_loc = *operator_loc;
23655
23656 return n;
23657}
23658
23659static rb_node_dot3_t *
23660rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23661{
23662 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23663 n->nd_beg = nd_beg;
23664 n->nd_end = nd_end;
23665 n->operator_loc = *operator_loc;
23666
23667 return n;
23668}
23669
23670static rb_node_self_t *
23671rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23672{
23673 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23674 n->nd_state = 1;
23675
23676 return n;
23677}
23678
23679static rb_node_nil_t *
23680rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23681{
23682 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23683
23684 return n;
23685}
23686
23687static rb_node_true_t *
23688rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23689{
23690 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23691
23692 return n;
23693}
23694
23695static rb_node_false_t *
23696rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23697{
23698 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23699
23700 return n;
23701}
23702
23703static rb_node_super_t *
23704rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23705 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23706{
23707 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23708 n->nd_args = nd_args;
23709 n->keyword_loc = *keyword_loc;
23710 n->lparen_loc = *lparen_loc;
23711 n->rparen_loc = *rparen_loc;
23712
23713 return n;
23714}
23715
23716static rb_node_zsuper_t *
23717rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23718{
23719 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23720
23721 return n;
23722}
23723
23724static rb_node_match2_t *
23725rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23726{
23727 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23728 n->nd_recv = nd_recv;
23729 n->nd_value = nd_value;
23730 n->nd_args = 0;
23731
23732 return n;
23733}
23734
23735static rb_node_match3_t *
23736rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23737{
23738 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23739 n->nd_recv = nd_recv;
23740 n->nd_value = nd_value;
23741
23742 return n;
23743}
23744
23745static rb_node_list_t *
23746rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23747{
23748 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23749}
23750
23751static rb_node_list_t *
23752rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23753{
23754 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23755 n->nd_head = nd_head;
23756 n->as.nd_alen = nd_alen;
23757 n->nd_next = nd_next;
23758
23759 return n;
23760}
23761
23762static rb_node_zlist_t *
23763rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23764{
23765 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23766
23767 return n;
23768}
23769
23770static rb_node_hash_t *
23771rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23772{
23773 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23774 n->nd_head = nd_head;
23775 n->nd_brace = 0;
23776
23777 return n;
23778}
23779
23780static rb_node_masgn_t *
23781rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23782{
23783 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23784 n->nd_head = nd_head;
23785 n->nd_value = 0;
23786 n->nd_args = nd_args;
23787
23788 return n;
23789}
23790
23791static rb_node_gasgn_t *
23792rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23793{
23794 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23795 n->nd_vid = nd_vid;
23796 n->nd_value = nd_value;
23797
23798 return n;
23799}
23800
23801static rb_node_lasgn_t *
23802rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23803{
23804 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23805 n->nd_vid = nd_vid;
23806 n->nd_value = nd_value;
23807
23808 return n;
23809}
23810
23811static rb_node_dasgn_t *
23812rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23813{
23814 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23815 n->nd_vid = nd_vid;
23816 n->nd_value = nd_value;
23817
23818 return n;
23819}
23820
23821static rb_node_iasgn_t *
23822rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23823{
23824 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23825 n->nd_vid = nd_vid;
23826 n->nd_value = nd_value;
23827
23828 return n;
23829}
23830
23831static rb_node_cvasgn_t *
23832rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23833{
23834 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23835 n->nd_vid = nd_vid;
23836 n->nd_value = nd_value;
23837
23838 return n;
23839}
23840
23841static rb_node_op_asgn1_t *
23842rb_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)
23843{
23844 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23845 n->nd_recv = nd_recv;
23846 n->nd_mid = nd_mid;
23847 n->nd_index = index;
23848 n->nd_rvalue = rvalue;
23849 n->call_operator_loc = *call_operator_loc;
23850 n->opening_loc = *opening_loc;
23851 n->closing_loc = *closing_loc;
23852 n->binary_operator_loc = *binary_operator_loc;
23853
23854 return n;
23855}
23856
23857static rb_node_op_asgn2_t *
23858rb_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)
23859{
23860 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23861 n->nd_recv = nd_recv;
23862 n->nd_value = nd_value;
23863 n->nd_vid = nd_vid;
23864 n->nd_mid = nd_mid;
23865 n->nd_aid = nd_aid;
23866 n->call_operator_loc = *call_operator_loc;
23867 n->message_loc = *message_loc;
23868 n->binary_operator_loc = *binary_operator_loc;
23869
23870 return n;
23871}
23872
23873static rb_node_op_asgn_or_t *
23874rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23875{
23876 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23877 n->nd_head = nd_head;
23878 n->nd_value = nd_value;
23879
23880 return n;
23881}
23882
23883static rb_node_op_asgn_and_t *
23884rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23885{
23886 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23887 n->nd_head = nd_head;
23888 n->nd_value = nd_value;
23889
23890 return n;
23891}
23892
23893static rb_node_gvar_t *
23894rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23895{
23896 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23897 n->nd_vid = nd_vid;
23898
23899 return n;
23900}
23901
23902static rb_node_lvar_t *
23903rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23904{
23905 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23906 n->nd_vid = nd_vid;
23907
23908 return n;
23909}
23910
23911static rb_node_dvar_t *
23912rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23913{
23914 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23915 n->nd_vid = nd_vid;
23916
23917 return n;
23918}
23919
23920static rb_node_ivar_t *
23921rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23922{
23923 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23924 n->nd_vid = nd_vid;
23925
23926 return n;
23927}
23928
23929static rb_node_const_t *
23930rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23931{
23932 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23933 n->nd_vid = nd_vid;
23934
23935 return n;
23936}
23937
23938static rb_node_cvar_t *
23939rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23940{
23941 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23942 n->nd_vid = nd_vid;
23943
23944 return n;
23945}
23946
23947static rb_node_nth_ref_t *
23948rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23949{
23950 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23951 n->nd_nth = nd_nth;
23952
23953 return n;
23954}
23955
23956static rb_node_back_ref_t *
23957rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23958{
23959 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23960 n->nd_nth = nd_nth;
23961
23962 return n;
23963}
23964
23965static rb_node_integer_t *
23966rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23967{
23968 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23969 n->val = val;
23970 n->minus = FALSE;
23971 n->base = base;
23972
23973 return n;
23974}
23975
23976static rb_node_float_t *
23977rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23978{
23979 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23980 n->val = val;
23981 n->minus = FALSE;
23982
23983 return n;
23984}
23985
23986static rb_node_rational_t *
23987rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23988{
23989 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23990 n->val = val;
23991 n->minus = FALSE;
23992 n->base = base;
23993 n->seen_point = seen_point;
23994
23995 return n;
23996}
23997
23998static rb_node_imaginary_t *
23999rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
24000{
24001 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
24002 n->val = val;
24003 n->minus = FALSE;
24004 n->base = base;
24005 n->seen_point = seen_point;
24006 n->type = numeric_type;
24007
24008 return n;
24009}
24010
24011static rb_node_str_t *
24012rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
24013{
24014 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
24015 n->string = string;
24016
24017 return n;
24018}
24019
24020/* TODO; Use union for NODE_DSTR2 */
24021static rb_node_dstr_t *
24022rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
24023{
24024 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
24025 n->string = string;
24026 n->as.nd_alen = nd_alen;
24027 n->nd_next = (rb_node_list_t *)nd_next;
24028
24029 return n;
24030}
24031
24032static rb_node_dstr_t *
24033rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
24034{
24035 return rb_node_dstr_new0(p, string, 1, 0, loc);
24036}
24037
24038static rb_node_xstr_t *
24039rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
24040{
24041 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
24042 n->string = string;
24043
24044 return n;
24045}
24046
24047static rb_node_dxstr_t *
24048rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
24049{
24050 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
24051 n->string = string;
24052 n->as.nd_alen = nd_alen;
24053 n->nd_next = (rb_node_list_t *)nd_next;
24054
24055 return n;
24056}
24057
24058static rb_node_sym_t *
24059rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24060{
24061 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
24062 n->string = rb_str_to_parser_string(p, str);
24063
24064 return n;
24065}
24066
24067static rb_node_dsym_t *
24068rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
24069{
24070 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
24071 n->string = string;
24072 n->as.nd_alen = nd_alen;
24073 n->nd_next = (rb_node_list_t *)nd_next;
24074
24075 return n;
24076}
24077
24078static rb_node_evstr_t *
24079rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24080{
24081 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
24082 n->nd_body = nd_body;
24083 n->opening_loc = *opening_loc;
24084 n->closing_loc = *closing_loc;
24085
24086 return n;
24087}
24088
24089static rb_node_regx_t *
24090rb_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)
24091{
24092 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
24093 n->string = string;
24094 n->options = options & RE_OPTION_MASK;
24095 n->opening_loc = *opening_loc;
24096 n->content_loc = *content_loc;
24097 n->closing_loc = *closing_loc;
24098
24099 return n;
24100}
24101
24102static rb_node_call_t *
24103rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24104{
24105 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
24106 n->nd_recv = nd_recv;
24107 n->nd_mid = nd_mid;
24108 n->nd_args = nd_args;
24109
24110 return n;
24111}
24112
24113static rb_node_opcall_t *
24114rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24115{
24116 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
24117 n->nd_recv = nd_recv;
24118 n->nd_mid = nd_mid;
24119 n->nd_args = nd_args;
24120
24121 return n;
24122}
24123
24124static rb_node_fcall_t *
24125rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24126{
24127 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
24128 n->nd_mid = nd_mid;
24129 n->nd_args = nd_args;
24130
24131 return n;
24132}
24133
24134static rb_node_qcall_t *
24135rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24136{
24137 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
24138 n->nd_recv = nd_recv;
24139 n->nd_mid = nd_mid;
24140 n->nd_args = nd_args;
24141
24142 return n;
24143}
24144
24145static rb_node_vcall_t *
24146rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
24147{
24148 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
24149 n->nd_mid = nd_mid;
24150
24151 return n;
24152}
24153
24154static rb_node_once_t *
24155rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24156{
24157 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
24158 n->nd_body = nd_body;
24159
24160 return n;
24161}
24162
24163static rb_node_args_t *
24164rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
24165{
24166 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
24167 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
24168
24169 return n;
24170}
24171
24172static rb_node_args_aux_t *
24173rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
24174{
24175 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
24176 n->nd_pid = nd_pid;
24177 n->nd_plen = nd_plen;
24178 n->nd_next = 0;
24179
24180 return n;
24181}
24182
24183static rb_node_opt_arg_t *
24184rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24185{
24186 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
24187 n->nd_body = nd_body;
24188 n->nd_next = 0;
24189
24190 return n;
24191}
24192
24193static rb_node_kw_arg_t *
24194rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24195{
24196 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
24197 n->nd_body = nd_body;
24198 n->nd_next = 0;
24199
24200 return n;
24201}
24202
24203static rb_node_postarg_t *
24204rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
24205{
24206 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
24207 n->nd_1st = nd_1st;
24208 n->nd_2nd = nd_2nd;
24209
24210 return n;
24211}
24212
24213static rb_node_argscat_t *
24214rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24215{
24216 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
24217 n->nd_head = nd_head;
24218 n->nd_body = nd_body;
24219
24220 return n;
24221}
24222
24223static rb_node_argspush_t *
24224rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24225{
24226 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
24227 n->nd_head = nd_head;
24228 n->nd_body = nd_body;
24229
24230 return n;
24231}
24232
24233static rb_node_splat_t *
24234rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24235{
24236 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
24237 n->nd_head = nd_head;
24238 n->operator_loc = *operator_loc;
24239
24240 return n;
24241}
24242
24243static rb_node_block_pass_t *
24244rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24245{
24246 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
24247 n->forwarding = 0;
24248 n->nd_head = 0;
24249 n->nd_body = nd_body;
24250 n->operator_loc = *operator_loc;
24251
24252 return n;
24253}
24254
24255static rb_node_alias_t *
24256rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24257{
24258 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
24259 n->nd_1st = nd_1st;
24260 n->nd_2nd = nd_2nd;
24261 n->keyword_loc = *keyword_loc;
24262
24263 return n;
24264}
24265
24266static rb_node_valias_t *
24267rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24268{
24269 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
24270 n->nd_alias = nd_alias;
24271 n->nd_orig = nd_orig;
24272 n->keyword_loc = *keyword_loc;
24273
24274 return n;
24275}
24276
24277static rb_node_undef_t *
24278rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
24279{
24280 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
24281 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
24282 n->keyword_loc = NULL_LOC;
24283 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
24284
24285 return n;
24286}
24287
24288static rb_node_errinfo_t *
24289rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
24290{
24291 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
24292
24293 return n;
24294}
24295
24296static rb_node_defined_t *
24297rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24298{
24299 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
24300 n->nd_head = nd_head;
24301 n->keyword_loc = *keyword_loc;
24302
24303 return n;
24304}
24305
24306static rb_node_postexe_t *
24307rb_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)
24308{
24309 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
24310 n->nd_body = nd_body;
24311 n->keyword_loc = *keyword_loc;
24312 n->opening_loc = *opening_loc;
24313 n->closing_loc = *closing_loc;
24314
24315 return n;
24316}
24317
24318static rb_node_attrasgn_t *
24319rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24320{
24321 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
24322 n->nd_recv = nd_recv;
24323 n->nd_mid = nd_mid;
24324 n->nd_args = nd_args;
24325
24326 return n;
24327}
24328
24329static rb_node_aryptn_t *
24330rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
24331{
24332 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
24333 n->nd_pconst = 0;
24334 n->pre_args = pre_args;
24335 n->rest_arg = rest_arg;
24336 n->post_args = post_args;
24337
24338 return n;
24339}
24340
24341static rb_node_hshptn_t *
24342rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
24343{
24344 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
24345 n->nd_pconst = nd_pconst;
24346 n->nd_pkwargs = nd_pkwargs;
24347 n->nd_pkwrestarg = nd_pkwrestarg;
24348
24349 return n;
24350}
24351
24352static rb_node_fndptn_t *
24353rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
24354{
24355 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
24356 n->nd_pconst = 0;
24357 n->pre_rest_arg = pre_rest_arg;
24358 n->args = args;
24359 n->post_rest_arg = post_rest_arg;
24360
24361 return n;
24362}
24363
24364static rb_node_line_t *
24365rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
24366{
24367 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
24368
24369 return n;
24370}
24371
24372static rb_node_file_t *
24373rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24374{
24375 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
24376 n->path = rb_str_to_parser_string(p, str);
24377
24378 return n;
24379}
24380
24381static rb_node_encoding_t *
24382rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
24383{
24384 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
24385 n->enc = p->enc;
24386
24387 return n;
24388}
24389
24390static rb_node_cdecl_t *
24391rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
24392{
24393 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
24394 n->nd_vid = nd_vid;
24395 n->nd_value = nd_value;
24396 n->nd_else = nd_else;
24397 n->shareability = shareability;
24398
24399 return n;
24400}
24401
24402static rb_node_op_cdecl_t *
24403rb_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)
24404{
24405 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
24406 n->nd_head = nd_head;
24407 n->nd_value = nd_value;
24408 n->nd_aid = nd_aid;
24409 n->shareability = shareability;
24410
24411 return n;
24412}
24413
24414static rb_node_error_t *
24415rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
24416{
24417 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
24418
24419 return n;
24420}
24421
24422static rb_node_break_t *
24423rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24424{
24425 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
24426 n->nd_stts = nd_stts;
24427 n->nd_chain = 0;
24428 n->keyword_loc = *keyword_loc;
24429
24430 return n;
24431}
24432
24433static rb_node_next_t *
24434rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24435{
24436 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
24437 n->nd_stts = nd_stts;
24438 n->nd_chain = 0;
24439 n->keyword_loc = *keyword_loc;
24440
24441 return n;
24442}
24443
24444static rb_node_redo_t *
24445rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24446{
24447 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
24448 n->nd_chain = 0;
24449 n->keyword_loc = *keyword_loc;
24450
24451 return n;
24452}
24453
24454static rb_node_def_temp_t *
24455rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
24456{
24457 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
24458 n->save.numparam_save = 0;
24459 n->save.max_numparam = 0;
24460 n->save.ctxt = p->ctxt;
24461 n->nd_def = 0;
24462 n->nd_mid = 0;
24463
24464 return n;
24465}
24466
24467static rb_node_def_temp_t *
24468def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
24469{
24470 n->save.numparam_save = numparam_push(p);
24471 n->save.max_numparam = p->max_numparam;
24472 return n;
24473}
24474
24475#ifndef RIPPER
24476static enum node_type
24477nodetype(NODE *node) /* for debug */
24478{
24479 return (enum node_type)nd_type(node);
24480}
24481
24482static int
24483nodeline(NODE *node)
24484{
24485 return nd_line(node);
24486}
24487#endif
24488
24489static NODE*
24490newline_node(NODE *node)
24491{
24492 if (node) {
24493 node = remove_begin(node);
24494 nd_set_fl_newline(node);
24495 }
24496 return node;
24497}
24498
24499static void
24500fixpos(NODE *node, NODE *orig)
24501{
24502 if (!node) return;
24503 if (!orig) return;
24504 nd_set_line(node, nd_line(orig));
24505}
24506
24507static NODE*
24508block_append(struct parser_params *p, NODE *head, NODE *tail)
24509{
24510 NODE *end, *h = head, *nd;
24511
24512 if (tail == 0) return head;
24513
24514 if (h == 0) return tail;
24515 switch (nd_type(h)) {
24516 default:
24517 h = end = NEW_BLOCK(head, &head->nd_loc);
24518 head = end;
24519 break;
24520 case NODE_BLOCK:
24521 end = RNODE_BLOCK(h)->nd_end;
24522 break;
24523 }
24524
24525 nd = RNODE_BLOCK(end)->nd_head;
24526 switch (nd_type(nd)) {
24527 case NODE_RETURN:
24528 case NODE_BREAK:
24529 case NODE_NEXT:
24530 case NODE_REDO:
24531 case NODE_RETRY:
24532 rb_warning0L(nd_line(tail), "statement not reached");
24533 break;
24534
24535 default:
24536 break;
24537 }
24538
24539 if (!nd_type_p(tail, NODE_BLOCK)) {
24540 tail = NEW_BLOCK(tail, &tail->nd_loc);
24541 }
24542 RNODE_BLOCK(end)->nd_next = tail;
24543 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24544 nd_set_last_loc(head, nd_last_loc(tail));
24545 return head;
24546}
24547
24548/* append item to the list */
24549static NODE*
24550list_append(struct parser_params *p, NODE *list, NODE *item)
24551{
24552 NODE *last;
24553
24554 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24555 if (RNODE_LIST(list)->nd_next) {
24556 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24557 }
24558 else {
24559 last = list;
24560 }
24561
24562 RNODE_LIST(list)->as.nd_alen += 1;
24563 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24564 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24565
24566 nd_set_last_loc(list, nd_last_loc(item));
24567
24568 return list;
24569}
24570
24571/* concat two lists */
24572static NODE*
24573list_concat(NODE *head, NODE *tail)
24574{
24575 NODE *last;
24576
24577 if (RNODE_LIST(head)->nd_next) {
24578 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24579 }
24580 else {
24581 last = head;
24582 }
24583
24584 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24585 RNODE_LIST(last)->nd_next = tail;
24586 if (RNODE_LIST(tail)->nd_next) {
24587 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24588 }
24589 else {
24590 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24591 }
24592
24593 nd_set_last_loc(head, nd_last_loc(tail));
24594
24595 return head;
24596}
24597
24598static int
24599literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24600{
24601 if (!tail) return 1;
24602 if (!rb_parser_enc_compatible(p, head, tail)) {
24603 compile_error(p, "string literal encodings differ (%s / %s)",
24604 rb_enc_name(rb_parser_str_get_encoding(head)),
24605 rb_enc_name(rb_parser_str_get_encoding(tail)));
24606 rb_parser_str_resize(p, head, 0);
24607 rb_parser_str_resize(p, tail, 0);
24608 return 0;
24609 }
24610 rb_parser_str_buf_append(p, head, tail);
24611 return 1;
24612}
24613
24614static rb_parser_string_t *
24615string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24616{
24617 if (htype != NODE_DSTR) return NULL;
24618 if (RNODE_DSTR(head)->nd_next) {
24619 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24620 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24621 }
24622 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24623 ASSUME(lit);
24624 return lit;
24625}
24626
24627#ifndef RIPPER
24628static rb_parser_string_t *
24629rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24630{
24631 rb_parser_string_t *copy;
24632 if (!orig) return NULL;
24633 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24634 copy->coderange = orig->coderange;
24635 copy->enc = orig->enc;
24636 return copy;
24637}
24638#endif
24639
24640/* concat two string literals */
24641static NODE *
24642literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24643{
24644 enum node_type htype;
24645 rb_parser_string_t *lit;
24646
24647 if (!head) return tail;
24648 if (!tail) return head;
24649
24650 htype = nd_type(head);
24651 if (htype == NODE_EVSTR) {
24652 head = new_dstr(p, head, loc);
24653 htype = NODE_DSTR;
24654 }
24655 if (p->heredoc_indent > 0) {
24656 switch (htype) {
24657 case NODE_STR:
24658 head = str2dstr(p, head);
24659 case NODE_DSTR:
24660 return list_append(p, head, tail);
24661 default:
24662 break;
24663 }
24664 }
24665 switch (nd_type(tail)) {
24666 case NODE_STR:
24667 if ((lit = string_literal_head(p, htype, head)) != false) {
24668 htype = NODE_STR;
24669 }
24670 else {
24671 lit = RNODE_DSTR(head)->string;
24672 }
24673 if (htype == NODE_STR) {
24674 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24675 error:
24676 rb_discard_node(p, head);
24677 rb_discard_node(p, tail);
24678 return 0;
24679 }
24680 rb_discard_node(p, tail);
24681 }
24682 else {
24683 list_append(p, head, tail);
24684 }
24685 break;
24686
24687 case NODE_DSTR:
24688 if (htype == NODE_STR) {
24689 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24690 goto error;
24691 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24692 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24693 RNODE_STR(head)->string = NULL;
24694 rb_discard_node(p, head);
24695 head = tail;
24696 }
24697 else if (!RNODE_DSTR(tail)->string) {
24698 append:
24699 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24700 if (!RNODE_DSTR(head)->nd_next) {
24701 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24702 }
24703 else if (RNODE_DSTR(tail)->nd_next) {
24704 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24705 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24706 }
24707 rb_discard_node(p, tail);
24708 }
24709 else if ((lit = string_literal_head(p, htype, head)) != false) {
24710 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24711 goto error;
24712 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24713 RNODE_DSTR(tail)->string = 0;
24714 goto append;
24715 }
24716 else {
24717 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));
24718 RNODE_DSTR(tail)->string = 0;
24719 }
24720 break;
24721
24722 case NODE_EVSTR:
24723 if (htype == NODE_STR) {
24724 head = str2dstr(p, head);
24725 RNODE_DSTR(head)->as.nd_alen = 1;
24726 }
24727 list_append(p, head, tail);
24728 break;
24729 }
24730 return head;
24731}
24732
24733static void
24734nd_copy_flag(NODE *new_node, NODE *old_node)
24735{
24736 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24737 nd_set_line(new_node, nd_line(old_node));
24738 new_node->nd_loc = old_node->nd_loc;
24739 new_node->node_id = old_node->node_id;
24740}
24741
24742static NODE *
24743str2dstr(struct parser_params *p, NODE *node)
24744{
24745 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24746 nd_copy_flag(new_node, node);
24747 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24748 RNODE_DSTR(new_node)->as.nd_alen = 0;
24749 RNODE_DSTR(new_node)->nd_next = 0;
24750 RNODE_STR(node)->string = 0;
24751
24752 return new_node;
24753}
24754
24755static NODE *
24756str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24757{
24758 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24759 nd_copy_flag(new_node, node);
24760 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24761 RNODE_REGX(new_node)->options = options;
24762 nd_set_loc(new_node, loc);
24763 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24764 RNODE_REGX(new_node)->content_loc = *content_loc;
24765 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24766 RNODE_STR(node)->string = 0;
24767
24768 return new_node;
24769}
24770
24771static NODE *
24772evstr2dstr(struct parser_params *p, NODE *node)
24773{
24774 if (nd_type_p(node, NODE_EVSTR)) {
24775 node = new_dstr(p, node, &node->nd_loc);
24776 }
24777 return node;
24778}
24779
24780static NODE *
24781new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24782{
24783 NODE *head = node;
24784
24785 if (node) {
24786 switch (nd_type(node)) {
24787 case NODE_STR:
24788 return str2dstr(p, node);
24789 case NODE_DSTR:
24790 break;
24791 case NODE_EVSTR:
24792 return node;
24793 }
24794 }
24795 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24796}
24797
24798static NODE *
24799new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24800{
24801 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24802 return list_append(p, dstr, node);
24803}
24804
24805static NODE *
24806call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24807 const YYLTYPE *op_loc, const YYLTYPE *loc)
24808{
24809 NODE *expr;
24810 value_expr(p, recv);
24811 value_expr(p, arg1);
24812 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24813 nd_set_line(expr, op_loc->beg_pos.lineno);
24814 return expr;
24815}
24816
24817static NODE *
24818call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24819{
24820 NODE *opcall;
24821 value_expr(p, recv);
24822 opcall = NEW_OPCALL(recv, id, 0, loc);
24823 nd_set_line(opcall, op_loc->beg_pos.lineno);
24824 return opcall;
24825}
24826
24827static NODE *
24828new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24829{
24830 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24831 nd_set_line(qcall, op_loc->beg_pos.lineno);
24832 return qcall;
24833}
24834
24835static NODE*
24836new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24837{
24838 NODE *ret;
24839 if (block) block_dup_check(p, args, block);
24840 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24841 if (block) ret = method_add_block(p, ret, block, loc);
24842 fixpos(ret, recv);
24843 return ret;
24844}
24845
24847new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24848{
24850 body->node = node;
24851 body->opening_loc = *opening_loc;
24852 body->closing_loc = *closing_loc;
24853 return body;
24854}
24855
24856static NODE *
24857command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc)
24858{
24859 NODE **body;
24860 enum node_type type = nd_type(m);
24861 switch (type) {
24862 case NODE_YIELD:
24863 compile_error(p, "block given to yield");
24864 return m;
24865 case NODE_RETURN:
24866 body = &RNODE_RETURN(m)->nd_stts;
24867 break;
24868 case NODE_BREAK:
24869 case NODE_NEXT:
24870 body = &RNODE_EXITS(m)->nd_stts;
24871 break;
24872 case NODE_REDO: /* `redo` has no argument */
24873 compile_error(p, "command_add_block: unexpected node: NODE_REDO");
24874 return m;
24875 case NODE_RETRY: /* `retry` has no argument */
24876 compile_error(p, "command_add_block: unexpected node: NODE_RETRY");
24877 return m;
24878 default:
24879 block_dup_check(p, get_nd_args(p, m), b);
24880 return method_add_block(p, m, b, loc);
24881 }
24882 RUBY_ASSERT(*body, "no argument %s with do_block", parser_node_name(type));
24883 YYLTYPE b_loc = code_loc_gen(&(*body)->nd_loc, loc);
24884 *body = command_add_block(p, *body, b, &b_loc);
24885 m->nd_loc.end_pos = loc->end_pos;
24886 return m;
24887}
24888
24889#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24890
24891static NODE*
24892last_expr_once_body(NODE *node)
24893{
24894 if (!node) return 0;
24895 return nd_once_body(node);
24896}
24897
24898static NODE*
24899match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24900{
24901 NODE *n;
24902 int line = op_loc->beg_pos.lineno;
24903
24904 value_expr(p, node1);
24905 value_expr(p, node2);
24906
24907 if ((n = last_expr_once_body(node1)) != 0) {
24908 switch (nd_type(n)) {
24909 case NODE_DREGX:
24910 {
24911 NODE *match = NEW_MATCH2(node1, node2, loc);
24912 nd_set_line(match, line);
24913 return match;
24914 }
24915
24916 case NODE_REGX:
24917 {
24918 const VALUE lit = rb_node_regx_string_val(n);
24919 if (!NIL_P(lit)) {
24920 NODE *match = NEW_MATCH2(node1, node2, loc);
24921 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24922 nd_set_line(match, line);
24923 return match;
24924 }
24925 }
24926 }
24927 }
24928
24929 if ((n = last_expr_once_body(node2)) != 0) {
24930 NODE *match3;
24931
24932 switch (nd_type(n)) {
24933 case NODE_DREGX:
24934 match3 = NEW_MATCH3(node2, node1, loc);
24935 return match3;
24936 }
24937 }
24938
24939 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24940 nd_set_line(n, line);
24941 return n;
24942}
24943
24944# if WARN_PAST_SCOPE
24945static int
24946past_dvar_p(struct parser_params *p, ID id)
24947{
24948 struct vtable *past = p->lvtbl->past;
24949 while (past) {
24950 if (vtable_included(past, id)) return 1;
24951 past = past->prev;
24952 }
24953 return 0;
24954}
24955# endif
24956
24957static int
24958numparam_nested_p(struct parser_params *p)
24959{
24960 struct local_vars *local = p->lvtbl;
24961 NODE *outer = local->numparam.outer;
24962 NODE *inner = local->numparam.inner;
24963 if (outer || inner) {
24964 NODE *used = outer ? outer : inner;
24965 compile_error(p, "numbered parameter is already used in %s block\n"
24966 "%s:%d: numbered parameter is already used here",
24967 outer ? "outer" : "inner",
24968 p->ruby_sourcefile, nd_line(used));
24969 parser_show_error_line(p, &used->nd_loc);
24970 return 1;
24971 }
24972 return 0;
24973}
24974
24975static int
24976numparam_used_p(struct parser_params *p)
24977{
24978 NODE *numparam = p->lvtbl->numparam.current;
24979 if (numparam) {
24980 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24981 "%s:%d: numbered parameter is already used here",
24982 p->ruby_sourcefile, nd_line(numparam));
24983 parser_show_error_line(p, &numparam->nd_loc);
24984 return 1;
24985 }
24986 return 0;
24987}
24988
24989static int
24990it_used_p(struct parser_params *p)
24991{
24992 NODE *it = p->lvtbl->it;
24993 if (it) {
24994 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24995 "%s:%d: 'it' is already used here",
24996 p->ruby_sourcefile, nd_line(it));
24997 parser_show_error_line(p, &it->nd_loc);
24998 return 1;
24999 }
25000 return 0;
25001}
25002
25003static NODE*
25004gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
25005{
25006 ID *vidp = NULL;
25007 NODE *node;
25008 switch (id) {
25009 case keyword_self:
25010 return NEW_SELF(loc);
25011 case keyword_nil:
25012 return NEW_NIL(loc);
25013 case keyword_true:
25014 return NEW_TRUE(loc);
25015 case keyword_false:
25016 return NEW_FALSE(loc);
25017 case keyword__FILE__:
25018 {
25019 VALUE file = p->ruby_sourcefile_string;
25020 if (NIL_P(file))
25021 file = rb_str_new(0, 0);
25022 node = NEW_FILE(file, loc);
25023 }
25024 return node;
25025 case keyword__LINE__:
25026 return NEW_LINE(loc);
25027 case keyword__ENCODING__:
25028 return NEW_ENCODING(loc);
25029
25030 }
25031 switch (id_type(id)) {
25032 case ID_LOCAL:
25033 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
25034 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
25035 if (vidp) *vidp |= LVAR_USED;
25036 node = NEW_DVAR(id, loc);
25037 return node;
25038 }
25039 if (local_id_ref(p, id, &vidp)) {
25040 if (vidp) *vidp |= LVAR_USED;
25041 node = NEW_LVAR(id, loc);
25042 return node;
25043 }
25044 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
25045 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
25046 if (numparam_nested_p(p) || it_used_p(p)) return 0;
25047 node = NEW_DVAR(id, loc);
25048 struct local_vars *local = p->lvtbl;
25049 if (!local->numparam.current) local->numparam.current = node;
25050 return node;
25051 }
25052# if WARN_PAST_SCOPE
25053 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
25054 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
25055 }
25056# endif
25057 /* method call without arguments */
25058 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
25059 if (numparam_used_p(p)) return 0;
25060 if (p->max_numparam == ORDINAL_PARAM) {
25061 compile_error(p, "ordinary parameter is defined");
25062 return 0;
25063 }
25064 if (!p->it_id) {
25065 p->it_id = idItImplicit;
25066 vtable_add(p->lvtbl->args, p->it_id);
25067 }
25068 NODE *node = NEW_DVAR(p->it_id, loc);
25069 if (!p->lvtbl->it) p->lvtbl->it = node;
25070 return node;
25071 }
25072 return NEW_VCALL(id, loc);
25073 case ID_GLOBAL:
25074 return NEW_GVAR(id, loc);
25075 case ID_INSTANCE:
25076 return NEW_IVAR(id, loc);
25077 case ID_CONST:
25078 return NEW_CONST(id, loc);
25079 case ID_CLASS:
25080 return NEW_CVAR(id, loc);
25081 }
25082 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25083 return 0;
25084}
25085
25086static rb_node_opt_arg_t *
25087opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
25088{
25089 rb_node_opt_arg_t *opts = opt_list;
25090 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
25091
25092 while (opts->nd_next) {
25093 opts = opts->nd_next;
25094 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
25095 }
25096 opts->nd_next = opt;
25097
25098 return opt_list;
25099}
25100
25101static rb_node_kw_arg_t *
25102kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
25103{
25104 if (kwlist) {
25105 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
25106 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
25107 }
25108 return kwlist;
25109}
25110
25111static NODE *
25112new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
25113{
25114 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
25115 p->ctxt.has_trailing_semicolon = 0;
25116
25117 NODE *n = expr;
25118 while (n) {
25119 if (nd_type_p(n, NODE_BEGIN)) {
25120 n = RNODE_BEGIN(n)->nd_body;
25121 }
25122 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
25123 n = RNODE_BLOCK(n)->nd_head;
25124 }
25125 else {
25126 break;
25127 }
25128 }
25129
25130 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
25131 NODE *block = NEW_BLOCK(expr, loc);
25132 return NEW_DEFINED(block, loc, keyword_loc);
25133 }
25134
25135 return NEW_DEFINED(n, loc, keyword_loc);
25136}
25137
25138static NODE*
25139str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25140{
25141 VALUE lit;
25142 rb_parser_string_t *str = RNODE_STR(node)->string;
25143 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
25144 yyerror1(loc, "invalid symbol");
25145 lit = STR_NEW0();
25146 }
25147 else {
25148 lit = rb_str_new_parser_string(str);
25149 }
25150 return NEW_SYM(lit, loc);
25151}
25152
25153static NODE*
25154symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
25155{
25156 enum node_type type = nd_type(symbol);
25157 switch (type) {
25158 case NODE_DSTR:
25159 nd_set_type(symbol, NODE_DSYM);
25160 break;
25161 case NODE_STR:
25162 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
25163 break;
25164 default:
25165 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
25166 }
25167 return list_append(p, symbols, symbol);
25168}
25169
25170static void
25171dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
25172{
25173 if (dreg->string) {
25174 reg_fragment_setenc(p, dreg->string, options);
25175 }
25176 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
25177 NODE *frag = list->nd_head;
25178 if (nd_type_p(frag, NODE_STR)) {
25179 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
25180 }
25181 else if (nd_type_p(frag, NODE_DSTR)) {
25182 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
25183 }
25184 }
25185}
25186
25187static NODE *
25188new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
25189{
25190 if (!node) {
25191 /* Check string is valid regex */
25192 rb_parser_string_t *str = STRING_NEW0();
25193 reg_compile(p, str, options);
25194 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
25195 return node;
25196 }
25197 switch (nd_type(node)) {
25198 case NODE_STR:
25199 {
25200 /* Check string is valid regex */
25201 reg_compile(p, RNODE_STR(node)->string, options);
25202 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
25203 }
25204 break;
25205 default:
25206 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
25207 /* fall through */
25208 case NODE_DSTR:
25209 nd_set_type(node, NODE_DREGX);
25210 nd_set_loc(node, loc);
25211 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
25212 dreg->as.nd_cflag = options & RE_OPTION_MASK;
25213 if (dreg->nd_next) {
25214 dregex_fragment_setenc(p, dreg, options);
25215 }
25216 if (options & RE_OPTION_ONCE) {
25217 node = NEW_ONCE(node, loc);
25218 }
25219 break;
25220 }
25221 return node;
25222}
25223
25224static rb_node_kw_arg_t *
25225new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
25226{
25227 if (!k) return 0;
25228 return NEW_KW_ARG((k), loc);
25229}
25230
25231static NODE *
25232new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25233{
25234 if (!node) {
25235 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
25236 return xstr;
25237 }
25238 switch (nd_type(node)) {
25239 case NODE_STR:
25240 nd_set_type(node, NODE_XSTR);
25241 nd_set_loc(node, loc);
25242 break;
25243 case NODE_DSTR:
25244 nd_set_type(node, NODE_DXSTR);
25245 nd_set_loc(node, loc);
25246 break;
25247 default:
25248 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
25249 break;
25250 }
25251 return node;
25252}
25253
25254static const
25255struct st_hash_type literal_type = {
25256 literal_cmp,
25257 literal_hash,
25258};
25259
25260static int nd_type_st_key_enable_p(NODE *node);
25261
25262static void
25263check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
25264{
25265 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25266 if (!arg || !p->case_labels) return;
25267 if (!nd_type_st_key_enable_p(arg)) return;
25268
25269 if (p->case_labels == CHECK_LITERAL_WHEN) {
25270 p->case_labels = st_init_table(&literal_type);
25271 }
25272 else {
25273 st_data_t line;
25274 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
25275 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
25276 WARN_I((int)nd_line(arg)), WARN_I((int)line));
25277 return;
25278 }
25279 }
25280 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
25281}
25282
25283#ifdef RIPPER
25284static int
25285id_is_var(struct parser_params *p, ID id)
25286{
25287 if (is_notop_id(id)) {
25288 switch (id & ID_SCOPE_MASK) {
25289 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
25290 return 1;
25291 case ID_LOCAL:
25292 if (dyna_in_block(p)) {
25293 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
25294 }
25295 if (local_id(p, id)) return 1;
25296 /* method call without arguments */
25297 return 0;
25298 }
25299 }
25300 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25301 return 0;
25302}
25303#endif
25304
25305static inline enum lex_state_e
25306parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
25307{
25308 if (p->debug) {
25309 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
25310 }
25311 return p->lex.state = ls;
25312}
25313
25314#ifndef RIPPER
25315static void
25316flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
25317{
25318 VALUE mesg = p->debug_buffer;
25319
25320 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
25321 p->debug_buffer = Qnil;
25322 rb_io_puts(1, &mesg, out);
25323 }
25324 if (!NIL_P(str) && RSTRING_LEN(str)) {
25325 rb_io_write(p->debug_output, str);
25326 }
25327}
25328
25329static const char rb_parser_lex_state_names[][8] = {
25330 "BEG", "END", "ENDARG", "ENDFN", "ARG",
25331 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
25332 "LABEL", "LABELED","FITEM",
25333};
25334
25335static VALUE
25336append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
25337{
25338 int i, sep = 0;
25339 unsigned int mask = 1;
25340 static const char none[] = "NONE";
25341
25342 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
25343 if ((unsigned)state & mask) {
25344 if (sep) {
25345 rb_str_cat(buf, "|", 1);
25346 }
25347 sep = 1;
25348 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
25349 }
25350 }
25351 if (!sep) {
25352 rb_str_cat(buf, none, sizeof(none)-1);
25353 }
25354 return buf;
25355}
25356
25357enum lex_state_e
25358rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
25359 enum lex_state_e to, int line)
25360{
25361 VALUE mesg;
25362 mesg = rb_str_new_cstr("lex_state: ");
25363 append_lex_state_name(p, from, mesg);
25364 rb_str_cat_cstr(mesg, " -> ");
25365 append_lex_state_name(p, to, mesg);
25366 rb_str_catf(mesg, " at line %d\n", line);
25367 flush_debug_buffer(p, p->debug_output, mesg);
25368 return to;
25369}
25370
25371VALUE
25372rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
25373{
25374 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
25375}
25376
25377static void
25378append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
25379{
25380 if (stack == 0) {
25381 rb_str_cat_cstr(mesg, "0");
25382 }
25383 else {
25384 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
25385 for (; mask && !(stack & mask); mask >>= 1) continue;
25386 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
25387 }
25388}
25389
25390void
25391rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
25392 const char *name, int line)
25393{
25394 VALUE mesg = rb_sprintf("%s: ", name);
25395 append_bitstack_value(p, stack, mesg);
25396 rb_str_catf(mesg, " at line %d\n", line);
25397 flush_debug_buffer(p, p->debug_output, mesg);
25398}
25399
25400void
25401rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
25402{
25403 va_list ap;
25404 VALUE mesg = rb_str_new_cstr("internal parser error: ");
25405
25406 va_start(ap, fmt);
25407 rb_str_vcatf(mesg, fmt, ap);
25408 va_end(ap);
25409 yyerror0(RSTRING_PTR(mesg));
25410 RB_GC_GUARD(mesg);
25411
25412 mesg = rb_str_new(0, 0);
25413 append_lex_state_name(p, p->lex.state, mesg);
25414 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
25415 rb_str_resize(mesg, 0);
25416 append_bitstack_value(p, p->cond_stack, mesg);
25417 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
25418 rb_str_resize(mesg, 0);
25419 append_bitstack_value(p, p->cmdarg_stack, mesg);
25420 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
25421 if (p->debug_output == rb_ractor_stdout())
25422 p->debug_output = rb_ractor_stderr();
25423 p->debug = TRUE;
25424}
25425
25426static YYLTYPE *
25427rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
25428{
25429 yylloc->beg_pos.lineno = sourceline;
25430 yylloc->beg_pos.column = beg_pos;
25431 yylloc->end_pos.lineno = sourceline;
25432 yylloc->end_pos.column = end_pos;
25433 return yylloc;
25434}
25435
25436YYLTYPE *
25437rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
25438{
25439 int sourceline = here->sourceline;
25440 int beg_pos = parser_column(here->offset - here->quote
25441 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT)));
25442 int end_pos = parser_column(here->offset + here->length + here->quote);
25443
25444 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25445}
25446
25447YYLTYPE *
25448rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
25449{
25450 yylloc->beg_pos.lineno = p->delayed.beg_line;
25451 yylloc->beg_pos.column = p->delayed.beg_col;
25452 yylloc->end_pos.lineno = p->delayed.end_line;
25453 yylloc->end_pos.column = p->delayed.end_col;
25454
25455 return yylloc;
25456}
25457
25458YYLTYPE *
25459rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
25460{
25461 int sourceline = p->ruby_sourceline;
25462 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25463 int end_pos = parser_column(p->lex.pend - p->lex.pbeg);
25464 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25465}
25466
25467YYLTYPE *
25468rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
25469{
25470 yylloc->end_pos = yylloc->beg_pos;
25471
25472 return yylloc;
25473}
25474
25475YYLTYPE *
25476rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
25477{
25478 int sourceline = p->ruby_sourceline;
25479 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25480 int end_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25481 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25482}
25483
25484YYLTYPE *
25485rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25486{
25487 int sourceline = p->ruby_sourceline;
25488 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25489 int end_pos = parser_column(p->lex.pcur - p->lex.pbeg);
25490 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25491}
25492#endif /* !RIPPER */
25493
25494static int
25495assignable0(struct parser_params *p, ID id, const char **err)
25496{
25497 if (!id) return -1;
25498 switch (id) {
25499 case keyword_self:
25500 *err = "Can't change the value of self";
25501 return -1;
25502 case keyword_nil:
25503 *err = "Can't assign to nil";
25504 return -1;
25505 case keyword_true:
25506 *err = "Can't assign to true";
25507 return -1;
25508 case keyword_false:
25509 *err = "Can't assign to false";
25510 return -1;
25511 case keyword__FILE__:
25512 *err = "Can't assign to __FILE__";
25513 return -1;
25514 case keyword__LINE__:
25515 *err = "Can't assign to __LINE__";
25516 return -1;
25517 case keyword__ENCODING__:
25518 *err = "Can't assign to __ENCODING__";
25519 return -1;
25520 }
25521 switch (id_type(id)) {
25522 case ID_LOCAL:
25523 if (dyna_in_block(p)) {
25524 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25525 compile_error(p, "Can't assign to numbered parameter _%d",
25526 NUMPARAM_ID_TO_IDX(id));
25527 return -1;
25528 }
25529 if (dvar_curr(p, id)) return NODE_DASGN;
25530 if (dvar_defined(p, id)) return NODE_DASGN;
25531 if (local_id(p, id)) return NODE_LASGN;
25532 dyna_var(p, id);
25533 return NODE_DASGN;
25534 }
25535 else {
25536 if (!local_id(p, id)) local_var(p, id);
25537 return NODE_LASGN;
25538 }
25539 break;
25540 case ID_GLOBAL: return NODE_GASGN;
25541 case ID_INSTANCE: return NODE_IASGN;
25542 case ID_CONST:
25543 if (!p->ctxt.in_def) return NODE_CDECL;
25544 *err = "dynamic constant assignment";
25545 return -1;
25546 case ID_CLASS: return NODE_CVASGN;
25547 default:
25548 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25549 }
25550 return -1;
25551}
25552
25553static NODE*
25554assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25555{
25556 const char *err = 0;
25557 int node_type = assignable0(p, id, &err);
25558 switch (node_type) {
25559 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25560 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25561 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25562 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25563 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25564 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25565 }
25566/* TODO: FIXME */
25567#ifndef RIPPER
25568 if (err) yyerror1(loc, err);
25569#else
25570 if (err) set_value(assign_error(p, err, p->s_lvalue));
25571#endif
25572 return NEW_ERROR(loc);
25573}
25574
25575static int
25576is_private_local_id(struct parser_params *p, ID name)
25577{
25578 VALUE s;
25579 if (name == idUScore) return 1;
25580 if (!is_local_id(name)) return 0;
25581 s = rb_id2str(name);
25582 if (!s) return 0;
25583 return RSTRING_PTR(s)[0] == '_';
25584}
25585
25586static int
25587shadowing_lvar_0(struct parser_params *p, ID name)
25588{
25589 if (dyna_in_block(p)) {
25590 if (dvar_curr(p, name)) {
25591 if (is_private_local_id(p, name)) return 1;
25592 yyerror0("duplicated argument name");
25593 }
25594 else if (dvar_defined(p, name) || local_id(p, name)) {
25595 vtable_add(p->lvtbl->vars, name);
25596 if (p->lvtbl->used) {
25597 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25598 }
25599 return 0;
25600 }
25601 }
25602 else {
25603 if (local_id(p, name)) {
25604 if (is_private_local_id(p, name)) return 1;
25605 yyerror0("duplicated argument name");
25606 }
25607 }
25608 return 1;
25609}
25610
25611static ID
25612shadowing_lvar(struct parser_params *p, ID name)
25613{
25614 shadowing_lvar_0(p, name);
25615 return name;
25616}
25617
25618static void
25619new_bv(struct parser_params *p, ID name)
25620{
25621 if (!name) return;
25622 if (!is_local_id(name)) {
25623 compile_error(p, "invalid local variable - %"PRIsVALUE,
25624 rb_id2str(name));
25625 return;
25626 }
25627 if (!shadowing_lvar_0(p, name)) return;
25628 dyna_var(p, name);
25629 ID *vidp = 0;
25630 if (dvar_defined_ref(p, name, &vidp)) {
25631 if (vidp) *vidp |= LVAR_USED;
25632 }
25633}
25634
25635static void
25636aryset_check(struct parser_params *p, NODE *args)
25637{
25638 NODE *block = 0, *kwds = 0;
25639 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25640 block = RNODE_BLOCK_PASS(args)->nd_body;
25641 args = RNODE_BLOCK_PASS(args)->nd_head;
25642 }
25643 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25644 args = RNODE_ARGSCAT(args)->nd_body;
25645 }
25646 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25647 kwds = RNODE_ARGSPUSH(args)->nd_body;
25648 }
25649 else {
25650 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25651 next = RNODE_LIST(next)->nd_next) {
25652 kwds = RNODE_LIST(next)->nd_head;
25653 }
25654 }
25655 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25656 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25657 }
25658 if (block) {
25659 yyerror1(&block->nd_loc, "block arg given in index assignment");
25660 }
25661}
25662
25663static NODE *
25664aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25665{
25666 aryset_check(p, idx);
25667 return NEW_ATTRASGN(recv, tASET, idx, loc);
25668}
25669
25670static void
25671block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25672{
25673 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25674 compile_error(p, "both block arg and actual block given");
25675 }
25676}
25677
25678static NODE *
25679attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25680{
25681 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25682 return NEW_ATTRASGN(recv, id, 0, loc);
25683}
25684
25685static VALUE
25686rb_backref_error(struct parser_params *p, NODE *node)
25687{
25688#ifndef RIPPER
25689# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25690#else
25691# define ERR(...) rb_sprintf(__VA_ARGS__)
25692#endif
25693 switch (nd_type(node)) {
25694 case NODE_NTH_REF:
25695 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25696 case NODE_BACK_REF:
25697 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25698 }
25699#undef ERR
25700 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25701}
25702
25703static NODE *
25704arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25705{
25706 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25707 switch (nd_type(node1)) {
25708 case NODE_LIST:
25709 return list_append(p, node1, node2);
25710 case NODE_BLOCK_PASS:
25711 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25712 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25713 return node1;
25714 case NODE_ARGSPUSH:
25715 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25716 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25717 nd_set_type(node1, NODE_ARGSCAT);
25718 return node1;
25719 case NODE_ARGSCAT:
25720 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25721 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25722 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25723 return node1;
25724 }
25725 return NEW_ARGSPUSH(node1, node2, loc);
25726}
25727
25728static NODE *
25729arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25730{
25731 if (!node2) return node1;
25732 switch (nd_type(node1)) {
25733 case NODE_BLOCK_PASS:
25734 if (RNODE_BLOCK_PASS(node1)->nd_head)
25735 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25736 else
25737 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25738 return node1;
25739 case NODE_ARGSPUSH:
25740 if (!nd_type_p(node2, NODE_LIST)) break;
25741 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25742 nd_set_type(node1, NODE_ARGSCAT);
25743 return node1;
25744 case NODE_ARGSCAT:
25745 if (!nd_type_p(node2, NODE_LIST) ||
25746 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25747 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25748 return node1;
25749 }
25750 return NEW_ARGSCAT(node1, node2, loc);
25751}
25752
25753static NODE *
25754last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25755{
25756 NODE *n1;
25757 if ((n1 = splat_array(args)) != 0) {
25758 return list_append(p, n1, last_arg);
25759 }
25760 return arg_append(p, args, last_arg, loc);
25761}
25762
25763static NODE *
25764rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25765{
25766 NODE *n1;
25767 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25768 return list_concat(n1, rest_arg);
25769 }
25770 return arg_concat(p, args, rest_arg, loc);
25771}
25772
25773static NODE *
25774splat_array(NODE* node)
25775{
25776 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25777 if (nd_type_p(node, NODE_LIST)) return node;
25778 return 0;
25779}
25780
25781static void
25782mark_lvar_used(struct parser_params *p, NODE *rhs)
25783{
25784 ID *vidp = NULL;
25785 if (!rhs) return;
25786 switch (nd_type(rhs)) {
25787 case NODE_LASGN:
25788 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25789 if (vidp) *vidp |= LVAR_USED;
25790 }
25791 break;
25792 case NODE_DASGN:
25793 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25794 if (vidp) *vidp |= LVAR_USED;
25795 }
25796 break;
25797#if 0
25798 case NODE_MASGN:
25799 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25800 mark_lvar_used(p, rhs->nd_head);
25801 }
25802 break;
25803#endif
25804 }
25805}
25806
25807static int is_static_content(NODE *node);
25808
25809static NODE *
25810node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25811{
25812 if (!lhs) return 0;
25813
25814 switch (nd_type(lhs)) {
25815 case NODE_CDECL:
25816 case NODE_GASGN:
25817 case NODE_IASGN:
25818 case NODE_LASGN:
25819 case NODE_DASGN:
25820 case NODE_MASGN:
25821 case NODE_CVASGN:
25822 set_nd_value(p, lhs, rhs);
25823 nd_set_loc(lhs, loc);
25824 break;
25825
25826 case NODE_ATTRASGN:
25827 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25828 nd_set_loc(lhs, loc);
25829 break;
25830
25831 default:
25832 /* should not happen */
25833 break;
25834 }
25835
25836 return lhs;
25837}
25838
25839static NODE *
25840value_expr_check(struct parser_params *p, NODE *node)
25841{
25842 NODE *void_node = 0, *vn;
25843
25844 if (!node) {
25845 rb_warning0("empty expression");
25846 }
25847 while (node) {
25848 switch (nd_type(node)) {
25849 case NODE_ENSURE:
25850 vn = RNODE_ENSURE(node)->nd_head;
25851 node = RNODE_ENSURE(node)->nd_ensr;
25852 /* nd_ensr should not be NULL, check it out next */
25853 if (vn && (vn = value_expr_check(p, vn))) {
25854 goto found;
25855 }
25856 break;
25857
25858 case NODE_RESCUE:
25859 /* void only if all children are void */
25860 vn = RNODE_RESCUE(node)->nd_head;
25861 if (!vn || !(vn = value_expr_check(p, vn))) {
25862 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25863 }
25864 if (!void_node) void_node = vn;
25865 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25866 if (!nd_type_p(r, NODE_RESBODY)) {
25867 compile_error(p, "unexpected node");
25868 return NULL;
25869 }
25870 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25871 return NULL;
25872 }
25873 if (!void_node) void_node = vn;
25874 }
25875 node = RNODE_RESCUE(node)->nd_else;
25876 if (!node) return void_node;
25877 break;
25878
25879 case NODE_RETURN:
25880 case NODE_BREAK:
25881 case NODE_NEXT:
25882 case NODE_REDO:
25883 case NODE_RETRY:
25884 goto found;
25885
25886 case NODE_CASE:
25887 case NODE_CASE2:
25888 for (node = RNODE_CASE(node)->nd_body;
25889 node && nd_type_p(node, NODE_WHEN);
25890 node = RNODE_WHEN(node)->nd_next) {
25891 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25892 return NULL;
25893 }
25894 if (!void_node) void_node = vn;
25895 }
25896 break;
25897
25898 case NODE_CASE3:
25899 {
25900 NODE *in = RNODE_CASE3(node)->nd_body;
25901 if (!in || !nd_type_p(in, NODE_IN)) {
25902 compile_error(p, "unexpected node");
25903 return NULL;
25904 }
25905 if (!RNODE_IN(in)->nd_body) {
25906 /* single line pattern matching with "=>" operator */
25907 goto found;
25908 }
25909 do {
25910 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25911 if (!vn) return NULL;
25912 if (!void_node) void_node = vn;
25913 in = RNODE_IN(in)->nd_next;
25914 } while (in && nd_type_p(in, NODE_IN));
25915 node = in; /* else */
25916 }
25917 break;
25918
25919 case NODE_BLOCK:
25920 while (RNODE_BLOCK(node)->nd_next) {
25921 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25922 if (vn) return vn;
25923 node = RNODE_BLOCK(node)->nd_next;
25924 }
25925 node = RNODE_BLOCK(node)->nd_head;
25926 break;
25927
25928 case NODE_BEGIN:
25929 node = RNODE_BEGIN(node)->nd_body;
25930 break;
25931
25932 case NODE_IF:
25933 case NODE_UNLESS:
25934 if (!RNODE_IF(node)->nd_body) {
25935 return NULL;
25936 }
25937 else if (!RNODE_IF(node)->nd_else) {
25938 return NULL;
25939 }
25940 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25941 if (!vn) return NULL;
25942 if (!void_node) void_node = vn;
25943 node = RNODE_IF(node)->nd_else;
25944 break;
25945
25946 case NODE_AND:
25947 case NODE_OR:
25948 /* The left operand was already checked for a value when logop()
25949 * built this node, so stop here instead of re-reporting the same
25950 * void value once per operator in a chain. */
25951 return NULL;
25952
25953 case NODE_LASGN:
25954 case NODE_DASGN:
25955 case NODE_MASGN:
25956 mark_lvar_used(p, node);
25957 return NULL;
25958
25959 default:
25960 return NULL;
25961 }
25962 }
25963
25964 return NULL;
25965
25966 found:
25967 /* return the first found node */
25968 return void_node ? void_node : node;
25969}
25970
25971static int
25972value_expr(struct parser_params *p, NODE *node)
25973{
25974 NODE *void_node = value_expr_check(p, node);
25975 if (void_node) {
25976 yyerror1(&void_node->nd_loc, "void value expression");
25977 /* or "control never reach"? */
25978 return FALSE;
25979 }
25980 return TRUE;
25981}
25982
25983static void
25984void_expr(struct parser_params *p, NODE *node)
25985{
25986 const char *useless = 0;
25987
25988 if (!RTEST(ruby_verbose)) return;
25989
25990 if (!node || !(node = nd_once_body(node))) return;
25991 switch (nd_type(node)) {
25992 case NODE_OPCALL:
25993 switch (RNODE_OPCALL(node)->nd_mid) {
25994 case '+':
25995 case '-':
25996 case '*':
25997 case '/':
25998 case '%':
25999 case tPOW:
26000 case tUPLUS:
26001 case tUMINUS:
26002 case '|':
26003 case '^':
26004 case '&':
26005 case tCMP:
26006 case '>':
26007 case tGEQ:
26008 case '<':
26009 case tLEQ:
26010 case tEQ:
26011 case tNEQ:
26012 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
26013 break;
26014 }
26015 break;
26016
26017 case NODE_LVAR:
26018 case NODE_DVAR:
26019 case NODE_GVAR:
26020 case NODE_IVAR:
26021 case NODE_CVAR:
26022 case NODE_NTH_REF:
26023 case NODE_BACK_REF:
26024 useless = "a variable";
26025 break;
26026 case NODE_CONST:
26027 useless = "a constant";
26028 break;
26029 case NODE_SYM:
26030 case NODE_LINE:
26031 case NODE_FILE:
26032 case NODE_ENCODING:
26033 case NODE_INTEGER:
26034 case NODE_FLOAT:
26035 case NODE_RATIONAL:
26036 case NODE_IMAGINARY:
26037 case NODE_STR:
26038 case NODE_DSTR:
26039 case NODE_REGX:
26040 case NODE_DREGX:
26041 useless = "a literal";
26042 break;
26043 case NODE_COLON2:
26044 case NODE_COLON3:
26045 useless = "::";
26046 break;
26047 case NODE_DOT2:
26048 useless = "..";
26049 break;
26050 case NODE_DOT3:
26051 useless = "...";
26052 break;
26053 case NODE_SELF:
26054 useless = "self";
26055 break;
26056 case NODE_NIL:
26057 useless = "nil";
26058 break;
26059 case NODE_TRUE:
26060 useless = "true";
26061 break;
26062 case NODE_FALSE:
26063 useless = "false";
26064 break;
26065 case NODE_DEFINED:
26066 useless = "defined?";
26067 break;
26068 }
26069
26070 if (useless) {
26071 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
26072 }
26073}
26074
26075/* warns useless use of block and returns the last statement node */
26076static NODE *
26077void_stmts(struct parser_params *p, NODE *node)
26078{
26079 NODE *const n = node;
26080 if (!RTEST(ruby_verbose)) return n;
26081 if (!node) return n;
26082 if (!nd_type_p(node, NODE_BLOCK)) return n;
26083
26084 while (RNODE_BLOCK(node)->nd_next) {
26085 void_expr(p, RNODE_BLOCK(node)->nd_head);
26086 node = RNODE_BLOCK(node)->nd_next;
26087 }
26088 return RNODE_BLOCK(node)->nd_head;
26089}
26090
26091static NODE *
26092remove_begin(NODE *node)
26093{
26094 NODE **n = &node, *n1 = node;
26095 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
26096 *n = n1 = RNODE_BEGIN(n1)->nd_body;
26097 }
26098 return node;
26099}
26100
26101static void
26102reduce_nodes(struct parser_params *p, NODE **body)
26103{
26104 NODE *node = *body;
26105
26106 if (!node) {
26107 *body = NEW_NIL(&NULL_LOC);
26108 return;
26109 }
26110#define subnodes(type, n1, n2) \
26111 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
26112 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
26113 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
26114
26115 while (node) {
26116 int newline = (int)nd_fl_newline(node);
26117 switch (nd_type(node)) {
26118 case NODE_NIL:
26119 // Keep an explicit nil in a method's tail (value) position when it
26120 // is on its own line, so it still emits a :line event and records
26121 // line coverage for that line. [Bug #22302]
26122 if (newline) return;
26123 end:
26124 *body = 0;
26125 return;
26126 case NODE_BEGIN:
26127 *body = node = RNODE_BEGIN(node)->nd_body;
26128 if (newline && node) nd_set_fl_newline(node);
26129 continue;
26130 case NODE_BLOCK:
26131 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
26132 break;
26133 case NODE_IF:
26134 case NODE_UNLESS:
26135 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
26136 return;
26137 case NODE_CASE:
26138 body = &RNODE_CASE(node)->nd_body;
26139 break;
26140 case NODE_WHEN:
26141 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
26142 break;
26143 case NODE_ENSURE:
26144 body = &RNODE_ENSURE(node)->nd_head;
26145 break;
26146 case NODE_RESCUE:
26147 newline = 0; // RESBODY should not be a NEWLINE
26148 if (RNODE_RESCUE(node)->nd_else) {
26149 body = &RNODE_RESCUE(node)->nd_resq;
26150 break;
26151 }
26152 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
26153 break;
26154 default:
26155 return;
26156 }
26157 node = *body;
26158 if (newline && node) nd_set_fl_newline(node);
26159 }
26160
26161#undef subnodes
26162}
26163
26164static int
26165is_static_content(NODE *node)
26166{
26167 if (!node) return 1;
26168 switch (nd_type(node)) {
26169 case NODE_HASH:
26170 if (!(node = RNODE_HASH(node)->nd_head)) break;
26171 case NODE_LIST:
26172 do {
26173 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
26174 } while ((node = RNODE_LIST(node)->nd_next) != 0);
26175 case NODE_SYM:
26176 case NODE_REGX:
26177 case NODE_LINE:
26178 case NODE_FILE:
26179 case NODE_ENCODING:
26180 case NODE_INTEGER:
26181 case NODE_FLOAT:
26182 case NODE_RATIONAL:
26183 case NODE_IMAGINARY:
26184 case NODE_STR:
26185 case NODE_NIL:
26186 case NODE_TRUE:
26187 case NODE_FALSE:
26188 case NODE_ZLIST:
26189 break;
26190 default:
26191 return 0;
26192 }
26193 return 1;
26194}
26195
26196static int
26197assign_in_cond(struct parser_params *p, NODE *node)
26198{
26199 switch (nd_type(node)) {
26200 case NODE_MASGN:
26201 case NODE_LASGN:
26202 case NODE_DASGN:
26203 case NODE_GASGN:
26204 case NODE_IASGN:
26205 case NODE_CVASGN:
26206 case NODE_CDECL:
26207 break;
26208
26209 default:
26210 return 0;
26211 }
26212
26213 if (!get_nd_value(p, node)) return 1;
26214 if (is_static_content(get_nd_value(p, node))) {
26215 /* reports always */
26216 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
26217 }
26218 return 1;
26219}
26220
26221enum cond_type {
26222 COND_IN_OP,
26223 COND_IN_COND,
26224 COND_IN_FF
26225};
26226
26227#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
26228 switch (t) { \
26229 case COND_IN_OP: break; \
26230 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
26231 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
26232 } \
26233} while (0)
26234
26235static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
26236
26237static NODE*
26238range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26239{
26240 enum node_type type;
26241
26242 if (node == 0) return 0;
26243
26244 type = nd_type(node);
26245 value_expr(p, node);
26246 if (type == NODE_INTEGER) {
26247 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
26248 ID lineno = rb_intern("$.");
26249 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
26250 }
26251 return cond0(p, node, COND_IN_FF, loc, true);
26252}
26253
26254static NODE*
26255cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
26256{
26257 if (node == 0) return 0;
26258 if (!(node = nd_once_body(node))) return 0;
26259 assign_in_cond(p, node);
26260
26261 switch (nd_type(node)) {
26262 case NODE_BEGIN:
26263 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
26264 break;
26265
26266 case NODE_DSTR:
26267 case NODE_EVSTR:
26268 case NODE_STR:
26269 case NODE_FILE:
26270 SWITCH_BY_COND_TYPE(type, warn, "string ");
26271 break;
26272
26273 case NODE_REGX:
26274 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
26275 nd_set_type(node, NODE_MATCH);
26276 break;
26277
26278 case NODE_DREGX:
26279 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
26280
26281 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
26282
26283 case NODE_BLOCK:
26284 {
26285 NODE *end = RNODE_BLOCK(node)->nd_end;
26286 NODE **expr = &RNODE_BLOCK(end)->nd_head;
26287 if (top) top = node == end;
26288 *expr = cond0(p, *expr, type, loc, top);
26289 }
26290 break;
26291
26292 case NODE_AND:
26293 case NODE_OR:
26294 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
26295 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
26296 break;
26297
26298 case NODE_DOT2:
26299 case NODE_DOT3:
26300 if (!top) break;
26301 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
26302 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
26303 switch (nd_type(node)) {
26304 case NODE_DOT2:
26305 nd_set_type(node,NODE_FLIP2);
26306 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
26307 (void)flip2;
26308 break;
26309 case NODE_DOT3:
26310 nd_set_type(node, NODE_FLIP3);
26311 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
26312 (void)flip3;
26313 break;
26314 }
26315 break;
26316
26317 case NODE_SYM:
26318 case NODE_DSYM:
26319 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
26320 break;
26321
26322 case NODE_LINE:
26323 case NODE_ENCODING:
26324 case NODE_INTEGER:
26325 case NODE_FLOAT:
26326 case NODE_RATIONAL:
26327 case NODE_IMAGINARY:
26328 SWITCH_BY_COND_TYPE(type, warning, "");
26329 break;
26330
26331 default:
26332 break;
26333 }
26334 return node;
26335}
26336
26337static NODE*
26338cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26339{
26340 if (node == 0) return 0;
26341 return cond0(p, node, COND_IN_COND, loc, true);
26342}
26343
26344static NODE*
26345method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26346{
26347 if (node == 0) return 0;
26348 return cond0(p, node, COND_IN_OP, loc, true);
26349}
26350
26351static NODE*
26352new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
26353{
26354 YYLTYPE loc = {*pos, *pos};
26355 return NEW_NIL(&loc);
26356}
26357
26358static NODE*
26359new_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)
26360{
26361 if (!cc) return right;
26362 cc = cond0(p, cc, COND_IN_COND, loc, true);
26363 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
26364}
26365
26366static NODE*
26367new_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)
26368{
26369 if (!cc) return right;
26370 cc = cond0(p, cc, COND_IN_COND, loc, true);
26371 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
26372}
26373
26374#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))
26375
26376/* A cached logop tail is usable only if it is still a node of the chain's type
26377 * whose nd_2nd is the insertion point, i.e. not itself another node of that
26378 * type. This rejects a stale cache left over from an earlier parse. */
26379static int
26380logop_valid_tail(NODE *tail, enum node_type type)
26381{
26382 NODE *second;
26383 return tail && nd_type_p(tail, type) &&
26384 ((second = RNODE_AND(tail)->nd_2nd) == 0 || !nd_type_p(second, type));
26385}
26386
26387static NODE*
26388logop(struct parser_params *p, ID id, NODE *left, NODE *right,
26389 const YYLTYPE *op_loc, const YYLTYPE *loc)
26390{
26391 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
26392 NODE *op;
26393 /* Snapshot the cache from the previous logop() call before overwriting it. */
26394 NODE *prev_head = p->logop.head;
26395 NODE *prev_tail = p->logop.tail;
26396 NODE *node, *second;
26397 value_expr(p, left);
26398 if (left && nd_type_p(left, type)) {
26399 /* The insertion point is the far end of left's right branch.
26400 * Reusing the cached tail keeps a chain such as `a && a && ... && a`
26401 * linear instead of rescanning the whole branch on every operator. The
26402 * cache is validated (its nd_2nd is not another node of the same type)
26403 * so a stale entry falls back to the scan. */
26404 if (left == prev_head && logop_valid_tail(prev_tail, type)) {
26405 node = prev_tail;
26406 }
26407 else {
26408 node = left;
26409 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26410 node = second;
26411 }
26412 }
26413 second = RNODE_AND(node)->nd_2nd;
26414 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
26415 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
26416 left->nd_loc.end_pos = loc->end_pos;
26417 p->logop.head = left;
26418 p->logop.tail = RNODE_AND(node)->nd_2nd;
26419 return left;
26420 }
26421 op = NEW_AND_OR(type, left, right, loc, op_loc);
26422 nd_set_line(op, op_loc->beg_pos.lineno);
26423 /* Record where the next operator will extend op, mirroring the scan the
26424 * chained branch above would perform: if right is itself a chain of the
26425 * same type (from parentheses), its far end; otherwise op itself. */
26426 p->logop.head = op;
26427 if (right == prev_head && logop_valid_tail(prev_tail, type)) {
26428 p->logop.tail = prev_tail;
26429 }
26430 else if (right && nd_type_p(right, type)) {
26431 node = right;
26432 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26433 node = second;
26434 }
26435 p->logop.tail = node;
26436 }
26437 else {
26438 p->logop.tail = op;
26439 }
26440 return op;
26441}
26442
26443#undef NEW_AND_OR
26444
26445static void
26446no_blockarg(struct parser_params *p, NODE *node)
26447{
26448 if (nd_type_p(node, NODE_BLOCK_PASS)) {
26449 compile_error(p, "block argument should not be given");
26450 }
26451}
26452
26453static NODE *
26454ret_args(struct parser_params *p, NODE *node)
26455{
26456 if (node) {
26457 no_blockarg(p, node);
26458 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
26459 node = RNODE_LIST(node)->nd_head;
26460 }
26461 }
26462 return node;
26463}
26464
26465static NODE*
26466negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
26467{
26468 switch (nd_type(node)) {
26469 case NODE_INTEGER:
26470 RNODE_INTEGER(node)->minus = TRUE;
26471 break;
26472 case NODE_FLOAT:
26473 RNODE_FLOAT(node)->minus = TRUE;
26474 break;
26475 case NODE_RATIONAL:
26476 RNODE_RATIONAL(node)->minus = TRUE;
26477 break;
26478 case NODE_IMAGINARY:
26479 RNODE_IMAGINARY(node)->minus = TRUE;
26480 break;
26481 }
26482 node->nd_loc = *loc;
26483 return node;
26484}
26485
26486static NODE *
26487arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
26488{
26489 if (node2) {
26490 if (!node1) return (NODE *)node2;
26491 node2->nd_head = node1;
26492 nd_set_first_lineno(node2, nd_first_lineno(node1));
26493 nd_set_first_column(node2, nd_first_column(node1));
26494 return (NODE *)node2;
26495 }
26496 return node1;
26497}
26498
26499static bool
26500args_info_empty_p(struct rb_args_info *args)
26501{
26502 if (args->pre_args_num) return false;
26503 if (args->post_args_num) return false;
26504 if (args->rest_arg) return false;
26505 if (args->opt_args) return false;
26506 if (args->block_arg) return false;
26507 if (args->kw_args) return false;
26508 if (args->kw_rest_arg) return false;
26509 return true;
26510}
26511
26512static rb_node_args_t *
26513new_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)
26514{
26515 struct rb_args_info *args = &tail->nd_ainfo;
26516
26517 if (args->forwarding) {
26518 if (rest_arg) {
26519 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
26520 return tail;
26521 }
26522 rest_arg = idFWD_REST;
26523 }
26524
26525 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
26526 args->pre_init = pre_args ? pre_args->nd_next : 0;
26527
26528 args->post_args_num = post_args ? post_args->nd_plen : 0;
26529 args->post_init = post_args ? post_args->nd_next : 0;
26530 args->first_post_arg = post_args ? post_args->nd_pid : 0;
26531
26532 args->rest_arg = rest_arg;
26533
26534 args->opt_args = opt_args;
26535
26536 nd_set_loc(RNODE(tail), loc);
26537
26538 return tail;
26539}
26540
26541static rb_node_args_t *
26542new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
26543{
26544 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
26545 struct rb_args_info *args = &node->nd_ainfo;
26546 if (p->error_p) return node;
26547
26548 if (block == idNil) {
26549 block = 0;
26550 args->no_blockarg = TRUE;
26551 }
26552 args->block_arg = block;
26553 args->kw_args = kw_args;
26554
26555 if (kw_args) {
26556 /*
26557 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
26558 * variable order: k1, kr1, k2, &b, internal_id, krest
26559 * #=> <reorder>
26560 * variable order: kr1, k1, k2, internal_id, krest, &b
26561 */
26562 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
26563 struct vtable *vtargs = p->lvtbl->args;
26564 rb_node_kw_arg_t *kwn = kw_args;
26565
26566 if (block) block = vtargs->tbl[vtargs->pos-1];
26567 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26568 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26569 while (kwn) {
26570 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26571 --kw_vars;
26572 --required_kw_vars;
26573 kwn = kwn->nd_next;
26574 }
26575
26576 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26577 ID vid = get_nd_vid(p, kwn->nd_body);
26578 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26579 *required_kw_vars++ = vid;
26580 }
26581 else {
26582 *kw_vars++ = vid;
26583 }
26584 }
26585
26586 arg_var(p, kw_bits);
26587 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26588 if (block) arg_var(p, block);
26589
26590 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26591 }
26592 else if (kw_rest_arg == idNil) {
26593 args->no_kwarg = 1;
26594 }
26595 else if (kw_rest_arg) {
26596 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26597 }
26598
26599 return node;
26600}
26601
26602static rb_node_args_t *
26603args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26604{
26605 if (max_numparam > NO_PARAM || it_id) {
26606 if (!args) {
26607 YYLTYPE loc = RUBY_INIT_YYLLOC();
26608 args = new_empty_args_tail(p, 0);
26609 nd_set_loc(RNODE(args), &loc);
26610 }
26611 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26612 }
26613 return args;
26614}
26615
26616static NODE*
26617new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26618{
26619 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26620
26621 if (pre_arg) {
26622 NODE *pre_args = NEW_LIST(pre_arg, loc);
26623 if (RNODE_ARYPTN(aryptn)->pre_args) {
26624 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26625 }
26626 else {
26627 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26628 }
26629 }
26630 return aryptn;
26631}
26632
26633static NODE*
26634new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26635{
26636 if (has_rest) {
26637 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26638 }
26639 else {
26640 rest_arg = NULL;
26641 }
26642 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26643
26644 return node;
26645}
26646
26647static NODE*
26648new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26649{
26650 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26651
26652 return fndptn;
26653}
26654
26655static NODE*
26656new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26657{
26658 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26659 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26660 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26661
26662 return node;
26663}
26664
26665static NODE*
26666new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26667{
26668 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26669 return hshptn;
26670}
26671
26672static NODE*
26673new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26674{
26675 NODE *node, *kw_rest_arg_node;
26676
26677 if (kw_rest_arg == idNil) {
26678 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26679 }
26680 else if (kw_rest_arg) {
26681 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26682 }
26683 else {
26684 kw_rest_arg_node = NULL;
26685 }
26686
26687 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26688
26689 return node;
26690}
26691
26692static NODE*
26693dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26694{
26695 if (!node) {
26696 return NEW_SYM(STR_NEW0(), loc);
26697 }
26698
26699 switch (nd_type(node)) {
26700 case NODE_DSTR:
26701 nd_set_type(node, NODE_DSYM);
26702 nd_set_loc(node, loc);
26703 break;
26704 case NODE_STR:
26705 node = str_to_sym_node(p, node, loc);
26706 break;
26707 default:
26708 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26709 break;
26710 }
26711 return node;
26712}
26713
26714static int
26715nd_type_st_key_enable_p(NODE *node)
26716{
26717 switch (nd_type(node)) {
26718 case NODE_INTEGER:
26719 case NODE_FLOAT:
26720 case NODE_RATIONAL:
26721 case NODE_IMAGINARY:
26722 case NODE_STR:
26723 case NODE_SYM:
26724 case NODE_REGX:
26725 case NODE_LINE:
26726 case NODE_FILE:
26727 case NODE_ENCODING:
26728 return true;
26729 default:
26730 return false;
26731 }
26732}
26733
26734static VALUE
26735nd_value(struct parser_params *p, NODE *node)
26736{
26737 switch (nd_type(node)) {
26738 case NODE_STR:
26739 return rb_node_str_string_val(node);
26740 case NODE_INTEGER:
26741 return rb_node_integer_literal_val(node);
26742 case NODE_FLOAT:
26743 return rb_node_float_literal_val(node);
26744 case NODE_RATIONAL:
26745 return rb_node_rational_literal_val(node);
26746 case NODE_IMAGINARY:
26747 return rb_node_imaginary_literal_val(node);
26748 case NODE_SYM:
26749 return rb_node_sym_string_val(node);
26750 case NODE_REGX:
26751 return rb_node_regx_string_val(node);
26752 case NODE_LINE:
26753 return rb_node_line_lineno_val(node);
26754 case NODE_ENCODING:
26755 return rb_node_encoding_val(node);
26756 case NODE_FILE:
26757 return rb_node_file_path_val(node);
26758 default:
26759 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26761 }
26762}
26763
26764static void
26765warn_duplicate_keys(struct parser_params *p, NODE *hash)
26766{
26767 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26768 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26769 while (hash && RNODE_LIST(hash)->nd_next) {
26770 NODE *head = RNODE_LIST(hash)->nd_head;
26771 NODE *value = RNODE_LIST(hash)->nd_next;
26772 NODE *next = RNODE_LIST(value)->nd_next;
26773 st_data_t key;
26774 st_data_t data;
26775
26776 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26777 if (!head) {
26778 head = value;
26779 }
26780
26781 if (nd_type_st_key_enable_p(head)) {
26782 key = (st_data_t)head;
26783
26784 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26785 rb_warn2L(nd_line((NODE *)data),
26786 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26787 nd_value(p, head), WARN_I(nd_line(head)));
26788 }
26789 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26790 }
26791 hash = next;
26792 }
26793 st_free_table(p->warn_duplicate_keys_table);
26794 p->warn_duplicate_keys_table = NULL;
26795}
26796
26797static NODE *
26798new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26799{
26800 if (hash) warn_duplicate_keys(p, hash);
26801 return NEW_HASH(hash, loc);
26802}
26803
26804static void
26805error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26806{
26807 if (is_private_local_id(p, id)) {
26808 return;
26809 }
26810 if (st_is_member(p->pvtbl, id)) {
26811 yyerror1(loc, "duplicated variable name");
26812 }
26813 else if (p->ctxt.in_alt_pattern && id) {
26814 yyerror1(loc, "variable capture in alternative pattern");
26815 }
26816 else {
26817 p->ctxt.capture_in_pattern = 1;
26818 st_insert(p->pvtbl, (st_data_t)id, 0);
26819 }
26820}
26821
26822/* Does the pattern node bind any (non-private) local variable? */
26823static int
26824pattern_has_capture(struct parser_params *p, NODE *node)
26825{
26826 if (!node || node == NODE_SPECIAL_NO_NAME_REST || node == NODE_SPECIAL_NO_REST_KEYWORD) return 0;
26827 switch (nd_type(node)) {
26828 case NODE_LASGN:
26829 return !is_private_local_id(p, RNODE_LASGN(node)->nd_vid);
26830 case NODE_DASGN:
26831 return !is_private_local_id(p, RNODE_DASGN(node)->nd_vid);
26832 case NODE_LIST:
26833 for (; node; node = RNODE_LIST(node)->nd_next) {
26834 if (pattern_has_capture(p, RNODE_LIST(node)->nd_head)) return 1;
26835 }
26836 return 0;
26837 case NODE_HASH: /* `pattern => var` and hash pattern key/value list */
26838 return pattern_has_capture(p, RNODE_HASH(node)->nd_head);
26839 case NODE_ARYPTN:
26840 return pattern_has_capture(p, RNODE_ARYPTN(node)->pre_args) ||
26841 pattern_has_capture(p, RNODE_ARYPTN(node)->rest_arg) ||
26842 pattern_has_capture(p, RNODE_ARYPTN(node)->post_args);
26843 case NODE_FNDPTN:
26844 return pattern_has_capture(p, RNODE_FNDPTN(node)->pre_rest_arg) ||
26845 pattern_has_capture(p, RNODE_FNDPTN(node)->args) ||
26846 pattern_has_capture(p, RNODE_FNDPTN(node)->post_rest_arg);
26847 case NODE_HSHPTN:
26848 return pattern_has_capture(p, RNODE_HSHPTN(node)->nd_pkwargs) ||
26849 pattern_has_capture(p, RNODE_HSHPTN(node)->nd_pkwrestarg);
26850 default: /* values, constants, pins (`^x`, `^(expr)`) bind nothing */
26851 return 0;
26852 }
26853}
26854
26855static void
26856error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26857{
26858 if (!p->pktbl) {
26859 p->pktbl = st_init_numtable();
26860 }
26861 else if (st_is_member(p->pktbl, key)) {
26862 yyerror1(loc, "duplicated key name");
26863 return;
26864 }
26865 st_insert(p->pktbl, (st_data_t)key, 0);
26866}
26867
26868static NODE *
26869new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26870{
26871 return NEW_HASH(hash, loc);
26872}
26873
26874static NODE *
26875new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26876{
26877 NODE *asgn;
26878
26879 if (lhs) {
26880 ID vid = get_nd_vid(p, lhs);
26881 YYLTYPE lhs_loc = lhs->nd_loc;
26882 /* A constant read can raise NameError. Prism has no separate read node
26883 * for `Const op= value` and reports the whole expression, so give the
26884 * NODE_CONST the location of the whole operator assignment as well,
26885 * for consistent Thread::Backtrace::Location#source_range between both
26886 * parsers. */
26887 const YYLTYPE *read_loc = nd_type_p(lhs, NODE_CDECL) ? loc : &lhs_loc;
26888 if (op == tOROP) {
26889 set_nd_value(p, lhs, rhs);
26890 nd_set_loc(lhs, loc);
26891 asgn = NEW_OP_ASGN_OR(gettable(p, vid, read_loc), lhs, loc);
26892 }
26893 else if (op == tANDOP) {
26894 set_nd_value(p, lhs, rhs);
26895 nd_set_loc(lhs, loc);
26896 asgn = NEW_OP_ASGN_AND(gettable(p, vid, read_loc), lhs, loc);
26897 }
26898 else {
26899 asgn = lhs;
26900 rhs = NEW_CALL(gettable(p, vid, read_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26901 set_nd_value(p, asgn, rhs);
26902 nd_set_loc(asgn, loc);
26903 }
26904 }
26905 else {
26906 asgn = NEW_ERROR(loc);
26907 }
26908 return asgn;
26909}
26910
26911static NODE *
26912new_ary_op_assign(struct parser_params *p, NODE *ary,
26913 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26914 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26915{
26916 NODE *asgn;
26917
26918 aryset_check(p, args);
26919 args = make_list(args, args_loc);
26920 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26921 fixpos(asgn, ary);
26922 return asgn;
26923}
26924
26925static NODE *
26926new_attr_op_assign(struct parser_params *p, NODE *lhs,
26927 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26928 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26929{
26930 NODE *asgn;
26931
26932 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26933 fixpos(asgn, lhs);
26934 return asgn;
26935}
26936
26937static NODE *
26938new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26939{
26940 NODE *asgn;
26941
26942 if (lhs) {
26943 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26944 }
26945 else {
26946 asgn = NEW_ERROR(loc);
26947 }
26948 fixpos(asgn, lhs);
26949 return asgn;
26950}
26951
26952static NODE *
26953const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26954{
26955 if (p->ctxt.in_def) {
26956#ifndef RIPPER
26957 yyerror1(loc, "dynamic constant assignment");
26958#else
26959 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26960#endif
26961 }
26962 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26963}
26964
26965#ifdef RIPPER
26966static VALUE
26967assign_error(struct parser_params *p, const char *mesg, VALUE a)
26968{
26969 a = dispatch2(assign_error, ERR_MESG(), a);
26970 ripper_error(p);
26971 return a;
26972}
26973#endif
26974
26975static NODE *
26976new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26977{
26978 NODE *result = head;
26979 if (rescue) {
26980 NODE *tmp = rescue_else ? rescue_else : rescue;
26981 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26982
26983 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26984 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26985 }
26986 if (ensure) {
26987 result = NEW_ENSURE(result, ensure, loc);
26988 }
26989 fixpos(result, head);
26990 return result;
26991}
26992
26993static void
26994warn_unused_var(struct parser_params *p, struct local_vars *local)
26995{
26996 int cnt;
26997
26998 if (!local->used) return;
26999 cnt = local->used->pos;
27000 if (cnt != local->vars->pos) {
27001 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
27002 }
27003#ifndef RIPPER
27004 ID *v = local->vars->tbl;
27005 ID *u = local->used->tbl;
27006 for (int i = 0; i < cnt; ++i) {
27007 if (!v[i] || (u[i] & LVAR_USED)) continue;
27008 if (is_private_local_id(p, v[i])) continue;
27009 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
27010 }
27011#endif
27012}
27013
27014static void
27015local_push(struct parser_params *p, int toplevel_scope)
27016{
27017 struct local_vars *local;
27018 int inherits_dvars = toplevel_scope && compile_for_eval;
27019 int warn_unused_vars = RTEST(ruby_verbose);
27020
27021 local = ALLOC(struct local_vars);
27022 local->prev = p->lvtbl;
27023 local->args = vtable_alloc(0);
27024 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
27025#ifndef RIPPER
27026 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
27027 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
27028#endif
27029 local->numparam.outer = 0;
27030 local->numparam.inner = 0;
27031 local->numparam.current = 0;
27032 local->it = 0;
27033 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
27034
27035# if WARN_PAST_SCOPE
27036 local->past = 0;
27037# endif
27038 CMDARG_PUSH(0);
27039 COND_PUSH(0);
27040 p->lvtbl = local;
27041}
27042
27043static void
27044vtable_chain_free(struct parser_params *p, struct vtable *table)
27045{
27046 while (!DVARS_TERMINAL_P(table)) {
27047 struct vtable *cur_table = table;
27048 table = cur_table->prev;
27049 vtable_free(cur_table);
27050 }
27051}
27052
27053static void
27054local_free(struct parser_params *p, struct local_vars *local)
27055{
27056 vtable_chain_free(p, local->used);
27057
27058# if WARN_PAST_SCOPE
27059 vtable_chain_free(p, local->past);
27060# endif
27061
27062 vtable_chain_free(p, local->args);
27063 vtable_chain_free(p, local->vars);
27064
27065 ruby_xfree_sized(local, sizeof(struct local_vars));
27066}
27067
27068static void
27069local_pop(struct parser_params *p)
27070{
27071 struct local_vars *local = p->lvtbl->prev;
27072 if (p->lvtbl->used) {
27073 warn_unused_var(p, p->lvtbl);
27074 }
27075
27076 local_free(p, p->lvtbl);
27077 p->lvtbl = local;
27078
27079 CMDARG_POP();
27080 COND_POP();
27081}
27082
27083static rb_ast_id_table_t *
27084local_tbl(struct parser_params *p)
27085{
27086 int cnt_args = vtable_size(p->lvtbl->args);
27087 int cnt_vars = vtable_size(p->lvtbl->vars);
27088 int cnt = cnt_args + cnt_vars;
27089 int i, j;
27090 rb_ast_id_table_t *tbl;
27091
27092 if (cnt <= 0) return 0;
27093 tbl = rb_ast_new_local_table(p->ast, cnt);
27094 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
27095 /* remove IDs duplicated to warn shadowing */
27096 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
27097 ID id = p->lvtbl->vars->tbl[i];
27098 if (!vtable_included(p->lvtbl->args, id)) {
27099 tbl->ids[j++] = id;
27100 }
27101 }
27102 if (j < cnt) {
27103 tbl = rb_ast_resize_latest_local_table(p->ast, j);
27104 }
27105
27106 return tbl;
27107}
27108
27109static void
27110numparam_name(struct parser_params *p, ID id)
27111{
27112 if (!NUMPARAM_ID_P(id)) return;
27113 compile_error(p, "_%d is reserved for numbered parameter",
27114 NUMPARAM_ID_TO_IDX(id));
27115}
27116
27117static void
27118arg_var(struct parser_params *p, ID id)
27119{
27120 numparam_name(p, id);
27121 vtable_add(p->lvtbl->args, id);
27122}
27123
27124static void
27125local_var(struct parser_params *p, ID id)
27126{
27127 numparam_name(p, id);
27128 vtable_add(p->lvtbl->vars, id);
27129 if (p->lvtbl->used) {
27130 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
27131 }
27132}
27133
27134#ifndef RIPPER
27135int
27136rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
27137{
27138 return rb_local_defined(id, iseq);
27139}
27140#endif
27141
27142static int
27143local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
27144{
27145 struct vtable *vars, *args, *used;
27146
27147 vars = p->lvtbl->vars;
27148 args = p->lvtbl->args;
27149 used = p->lvtbl->used;
27150
27151 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
27152 vars = vars->prev;
27153 args = args->prev;
27154 if (used) used = used->prev;
27155 }
27156
27157 if (vars && vars->prev == DVARS_INHERIT) {
27158 return rb_parser_local_defined(p, id, p->parent_iseq);
27159 }
27160 else if (vtable_included(args, id)) {
27161 return 1;
27162 }
27163 else {
27164 int i = vtable_included(vars, id);
27165 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
27166 return i != 0;
27167 }
27168}
27169
27170static int
27171local_id(struct parser_params *p, ID id)
27172{
27173 return local_id_ref(p, id, NULL);
27174}
27175
27176static int
27177check_forwarding_args(struct parser_params *p)
27178{
27179 if (local_id(p, idFWD_ALL)) return TRUE;
27180 compile_error(p, "unexpected ...");
27181 return FALSE;
27182}
27183
27184static void
27185add_forwarding_args(struct parser_params *p)
27186{
27187 arg_var(p, idFWD_REST);
27188 arg_var(p, idFWD_KWREST);
27189 arg_var(p, idFWD_BLOCK);
27190 arg_var(p, idFWD_ALL);
27191}
27192
27193static void
27194forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
27195{
27196 bool conflict = false;
27197
27198 struct vtable *vars, *args;
27199
27200 vars = p->lvtbl->vars;
27201 args = p->lvtbl->args;
27202
27203 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
27204 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
27205 vars = vars->prev;
27206 args = args->prev;
27207 }
27208
27209 bool found = false;
27210 if (vars && vars->prev == DVARS_INHERIT && !found) {
27211 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
27212 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
27213 }
27214 else {
27215 found = (vtable_included(args, arg) &&
27216 !(all && vtable_included(args, all)));
27217 }
27218
27219 if (!found) {
27220 compile_error(p, "no anonymous %s parameter", var);
27221 }
27222 else if (conflict) {
27223 compile_error(p, "anonymous %s parameter is also used within block", var);
27224 }
27225}
27226
27227static NODE *
27228new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
27229{
27230 NODE *rest = NEW_LVAR(idFWD_REST, loc);
27231 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
27232 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
27233 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
27234 block->forwarding = TRUE;
27235 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
27236 return arg_blk_pass(args, block);
27237}
27238
27239static NODE *
27240numparam_push(struct parser_params *p)
27241{
27242 struct local_vars *local = p->lvtbl;
27243 NODE *inner = local->numparam.inner;
27244 if (!local->numparam.outer) {
27245 local->numparam.outer = local->numparam.current;
27246 }
27247 local->numparam.inner = 0;
27248 local->numparam.current = 0;
27249 local->it = 0;
27250 return inner;
27251}
27252
27253static void
27254numparam_pop(struct parser_params *p, NODE *prev_inner)
27255{
27256 struct local_vars *local = p->lvtbl;
27257 if (prev_inner) {
27258 /* prefer first one */
27259 local->numparam.inner = prev_inner;
27260 }
27261 else if (local->numparam.current) {
27262 /* current and inner are exclusive */
27263 local->numparam.inner = local->numparam.current;
27264 }
27265 if (p->max_numparam > NO_PARAM) {
27266 /* current and outer are exclusive */
27267 local->numparam.current = local->numparam.outer;
27268 local->numparam.outer = 0;
27269 }
27270 else {
27271 /* no numbered parameter */
27272 local->numparam.current = 0;
27273 }
27274 local->it = 0;
27275}
27276
27277static const struct vtable *
27278dyna_push(struct parser_params *p)
27279{
27280 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
27281 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
27282 if (p->lvtbl->used) {
27283 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
27284 }
27285 return p->lvtbl->args;
27286}
27287
27288static void
27289dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
27290{
27291 struct vtable *tmp = *vtblp;
27292 *vtblp = tmp->prev;
27293# if WARN_PAST_SCOPE
27294 if (p->past_scope_enabled) {
27295 tmp->prev = p->lvtbl->past;
27296 p->lvtbl->past = tmp;
27297 return;
27298 }
27299# endif
27300 vtable_free(tmp);
27301}
27302
27303static void
27304dyna_pop_1(struct parser_params *p)
27305{
27306 struct vtable *tmp;
27307
27308 if ((tmp = p->lvtbl->used) != 0) {
27309 warn_unused_var(p, p->lvtbl);
27310 p->lvtbl->used = p->lvtbl->used->prev;
27311 vtable_free(tmp);
27312 }
27313 dyna_pop_vtable(p, &p->lvtbl->args);
27314 dyna_pop_vtable(p, &p->lvtbl->vars);
27315}
27316
27317static void
27318dyna_pop(struct parser_params *p, const struct vtable *lvargs)
27319{
27320 while (p->lvtbl->args != lvargs) {
27321 dyna_pop_1(p);
27322 if (!p->lvtbl->args) {
27323 struct local_vars *local = p->lvtbl->prev;
27324 ruby_xfree_sized(p->lvtbl, sizeof(*p->lvtbl));
27325 p->lvtbl = local;
27326 }
27327 }
27328 dyna_pop_1(p);
27329}
27330
27331static int
27332dyna_in_block(struct parser_params *p)
27333{
27334 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
27335}
27336
27337#ifndef RIPPER
27338int
27339dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
27340{
27341 struct vtable *vars, *args, *used;
27342 int i;
27343
27344 args = p->lvtbl->args;
27345 vars = p->lvtbl->vars;
27346 used = p->lvtbl->used;
27347
27348 while (!DVARS_TERMINAL_P(vars)) {
27349 if (vtable_included(args, id)) {
27350 return 1;
27351 }
27352 if ((i = vtable_included(vars, id)) != 0) {
27353 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
27354 return 1;
27355 }
27356 args = args->prev;
27357 vars = vars->prev;
27358 if (!vidrefp) used = 0;
27359 if (used) used = used->prev;
27360 }
27361
27362 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
27363 return rb_dvar_defined(id, p->parent_iseq);
27364 }
27365
27366 return 0;
27367}
27368#endif
27369
27370static int
27371dvar_defined(struct parser_params *p, ID id)
27372{
27373 return dvar_defined_ref(p, id, NULL);
27374}
27375
27376static int
27377dvar_curr(struct parser_params *p, ID id)
27378{
27379 return (vtable_included(p->lvtbl->args, id) ||
27380 vtable_included(p->lvtbl->vars, id));
27381}
27382
27383static void
27384reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
27385{
27386 compile_error(p,
27387 "regexp encoding option '%c' differs from source encoding '%s'",
27388 c, rb_enc_name(rb_parser_str_get_encoding(str)));
27389}
27390
27391#ifndef RIPPER
27392static rb_encoding *
27393find_enc(struct parser_params* p, const char *name)
27394{
27395 int idx = rb_enc_find_index(name);
27396 if (idx < 0) {
27397 rb_bug("unknown encoding name: %s", name);
27398 }
27399
27400 return rb_enc_from_index(idx);
27401}
27402
27403static rb_encoding *
27404kcode_to_enc(struct parser_params* p, int kcode)
27405{
27406 rb_encoding *enc;
27407
27408 switch (kcode) {
27409 case ENC_ASCII8BIT:
27410 enc = rb_ascii8bit_encoding();
27411 break;
27412 case ENC_EUC_JP:
27413 enc = find_enc(p, "EUC-JP");
27414 break;
27415 case ENC_Windows_31J:
27416 enc = find_enc(p, "Windows-31J");
27417 break;
27418 case ENC_UTF8:
27419 enc = rb_utf8_encoding();
27420 break;
27421 default:
27422 enc = NULL;
27423 break;
27424 }
27425
27426 return enc;
27427}
27428
27429int
27430rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27431{
27432 int c = RE_OPTION_ENCODING_IDX(options);
27433
27434 if (c) {
27435 int opt, idx;
27436 rb_encoding *enc;
27437
27438 char_to_option_kcode(c, &opt, &idx);
27439 enc = kcode_to_enc(p, idx);
27440 if (enc != rb_parser_str_get_encoding(str) &&
27441 !rb_parser_is_ascii_string(p, str)) {
27442 goto error;
27443 }
27444 rb_parser_string_set_encoding(str, enc);
27445 }
27446 else if (RE_OPTION_ENCODING_NONE(options)) {
27447 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
27448 !rb_parser_is_ascii_string(p, str)) {
27449 c = 'n';
27450 goto error;
27451 }
27452 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27453 }
27454 else if (rb_is_usascii_enc(p->enc)) {
27455 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27456 }
27457 return 0;
27458
27459 error:
27460 return c;
27461}
27462#endif
27463
27464static void
27465reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27466{
27467 int c = rb_reg_fragment_setenc(p, str, options);
27468 if (c) reg_fragment_enc_error(p, str, c);
27469}
27470
27471#ifndef UNIVERSAL_PARSER
27472typedef struct {
27473 struct parser_params* parser;
27474 rb_encoding *enc;
27475 NODE *succ_block;
27476 const YYLTYPE *loc;
27477 rb_parser_assignable_func assignable;
27479
27480static int
27481reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
27482 int back_num, int *back_refs, OnigRegex regex, void *arg0)
27483{
27485 struct parser_params* p = arg->parser;
27486 rb_encoding *enc = arg->enc;
27487 long len = name_end - name;
27488 const char *s = (const char *)name;
27489
27490 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
27491}
27492
27493static NODE *
27494reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
27495{
27497
27498 arg.parser = p;
27499 arg.enc = rb_enc_get(regexp);
27500 arg.succ_block = 0;
27501 arg.loc = loc;
27502 arg.assignable = assignable;
27503 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
27504
27505 if (!arg.succ_block) return 0;
27506 return RNODE_BLOCK(arg.succ_block)->nd_next;
27507}
27508#endif
27509
27510#ifndef RIPPER
27511NODE *
27512rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
27513{
27514 return assignable(p, id, val, loc);
27515}
27516
27517int
27518rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
27519 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
27520{
27521 ID var;
27522 NODE *node, *succ;
27523
27524 if (!len) return ST_CONTINUE;
27525 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
27526 return ST_CONTINUE;
27527
27528 var = intern_cstr(s, len, enc);
27529 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
27530 if (!lvar_defined(p, var)) return ST_CONTINUE;
27531 }
27532 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
27533 succ = *succ_block;
27534 if (!succ) succ = NEW_ERROR(loc);
27535 succ = block_append(p, succ, node);
27536 *succ_block = succ;
27537 return ST_CONTINUE;
27538}
27539#endif
27540
27541static VALUE
27542parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27543{
27544 VALUE str2;
27545 reg_fragment_setenc(p, str, options);
27546 str2 = rb_str_new_parser_string(str);
27547 return rb_parser_reg_compile(p, str2, options);
27548}
27549
27550#ifndef RIPPER
27551VALUE
27552rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
27553{
27554 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
27555}
27556#endif
27557
27558static VALUE
27559reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27560{
27561 VALUE re;
27562 VALUE err;
27563
27564 err = rb_errinfo();
27565 re = parser_reg_compile(p, str, options);
27566 if (NIL_P(re)) {
27567 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
27568 rb_set_errinfo(err);
27569 compile_error(p, "%"PRIsVALUE, m);
27570 return Qnil;
27571 }
27572 return re;
27573}
27574
27575#ifndef RIPPER
27576void
27577rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
27578{
27579 p->do_print = print;
27580 p->do_loop = loop;
27581 p->do_chomp = chomp;
27582 p->do_split = split;
27583}
27584
27585static NODE *
27586parser_append_options(struct parser_params *p, NODE *node)
27587{
27588 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
27589 const YYLTYPE *const LOC = &default_location;
27590
27591 if (p->do_print) {
27592 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
27593 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
27594 LOC);
27595 node = block_append(p, node, print);
27596 }
27597
27598 if (p->do_loop) {
27599 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27600
27601 if (p->do_split) {
27602 ID ifs = rb_intern("$;");
27603 ID fields = rb_intern("$F");
27604 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27605 NODE *split = NEW_GASGN(fields,
27606 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27607 rb_intern("split"), args, LOC),
27608 LOC);
27609 node = block_append(p, split, node);
27610 }
27611 if (p->do_chomp) {
27612 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27613 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27614 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27615 }
27616
27617 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27618 }
27619
27620 return node;
27621}
27622
27623void
27624rb_init_parse(void)
27625{
27626 /* just to suppress unused-function warnings */
27627 (void)nodetype;
27628 (void)nodeline;
27629}
27630
27631ID
27632internal_id(struct parser_params *p)
27633{
27634 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27635}
27636#endif /* !RIPPER */
27637
27638static void
27639parser_initialize(struct parser_params *p)
27640{
27641 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27642 p->command_start = TRUE;
27643 p->ruby_sourcefile_string = Qnil;
27644 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27645 string_buffer_init(p);
27646 p->node_id = 0;
27647 p->delayed.token = NULL;
27648 p->frozen_string_literal = -1; /* not specified */
27649 rb_source_hash_init(&p->source_hash);
27650#ifndef RIPPER
27651 p->error_buffer = Qfalse;
27652 p->end_expect_token_locations = NULL;
27653 p->token_id = 0;
27654 p->tokens = NULL;
27655#else
27656 p->result = Qnil;
27657 p->parsing_thread = Qnil;
27658 p->s_value = Qnil;
27659 p->s_lvalue = Qnil;
27660 p->s_value_stack = rb_ary_new();
27661#endif
27662 p->debug_buffer = Qnil;
27663 p->debug_output = rb_ractor_stdout();
27664 p->enc = rb_utf8_encoding();
27665 p->exits = 0;
27666}
27667
27668#ifdef RIPPER
27669#define rb_ruby_parser_mark ripper_parser_mark
27670#define rb_ruby_parser_free ripper_parser_free
27671#define rb_ruby_parser_memsize ripper_parser_memsize
27672#endif
27673
27674void
27675rb_ruby_parser_mark(void *ptr)
27676{
27677 struct parser_params *p = (struct parser_params*)ptr;
27678
27679 rb_gc_mark(p->ruby_sourcefile_string);
27680#ifndef RIPPER
27681 rb_gc_mark(p->error_buffer);
27682#else
27683 rb_gc_mark(p->value);
27684 rb_gc_mark(p->result);
27685 rb_gc_mark(p->parsing_thread);
27686 rb_gc_mark(p->s_value);
27687 rb_gc_mark(p->s_lvalue);
27688 rb_gc_mark(p->s_value_stack);
27689#endif
27690 rb_gc_mark(p->debug_buffer);
27691 rb_gc_mark(p->debug_output);
27692}
27693
27694void
27695rb_ruby_parser_free(void *ptr)
27696{
27697 struct parser_params *p = (struct parser_params*)ptr;
27698 struct local_vars *local, *prev;
27699
27700 if (p->ast) {
27701 rb_ast_free(p->ast);
27702 }
27703
27704 if (p->warn_duplicate_keys_table) {
27705 st_free_table(p->warn_duplicate_keys_table);
27706 }
27707
27708#ifndef RIPPER
27709 if (p->tokens) {
27710 rb_parser_ary_free(p, p->tokens);
27711 }
27712#endif
27713
27714 if (p->tokenbuf) {
27715 ruby_xfree_sized(p->tokenbuf, p->toksiz);
27716 }
27717
27718 for (local = p->lvtbl; local; local = prev) {
27719 prev = local->prev;
27720 local_free(p, local);
27721 }
27722
27723 {
27724 token_info *ptinfo;
27725 while ((ptinfo = p->token_info) != 0) {
27726 p->token_info = ptinfo->next;
27727 xfree(ptinfo);
27728 }
27729 }
27730 string_buffer_free(p);
27731
27732 if (p->pvtbl) {
27733 st_free_table(p->pvtbl);
27734 }
27735
27736 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27737 st_free_table(p->case_labels);
27738 }
27739
27740 xfree(p->lex.strterm);
27741 p->lex.strterm = 0;
27742
27743 xfree(ptr);
27744}
27745
27746size_t
27747rb_ruby_parser_memsize(const void *ptr)
27748{
27749 struct parser_params *p = (struct parser_params*)ptr;
27750 struct local_vars *local;
27751 size_t size = sizeof(*p);
27752
27753 size += p->toksiz;
27754 for (local = p->lvtbl; local; local = local->prev) {
27755 size += sizeof(*local);
27756 if (local->vars) size += local->vars->capa * sizeof(ID);
27757 }
27758 return size;
27759}
27760
27761#ifndef RIPPER
27762#undef rb_reserved_word
27763
27764const struct kwtable *
27765rb_reserved_word(const char *str, unsigned int len)
27766{
27767 return reserved_word(str, len);
27768}
27769
27770#ifdef UNIVERSAL_PARSER
27772rb_ruby_parser_allocate(const rb_parser_config_t *config)
27773{
27774 /* parser_initialize expects fields to be set to 0 */
27775 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27776 p->config = config;
27777 return p;
27778}
27779
27781rb_ruby_parser_new(const rb_parser_config_t *config)
27782{
27783 /* parser_initialize expects fields to be set to 0 */
27784 rb_parser_t *p = rb_ruby_parser_allocate(config);
27785 parser_initialize(p);
27786 return p;
27787}
27788#else
27790rb_ruby_parser_allocate(void)
27791{
27792 /* parser_initialize expects fields to be set to 0 */
27793 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27794 return p;
27795}
27796
27798rb_ruby_parser_new(void)
27799{
27800 /* parser_initialize expects fields to be set to 0 */
27801 rb_parser_t *p = rb_ruby_parser_allocate();
27802 parser_initialize(p);
27803 return p;
27804}
27805#endif
27806
27808rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27809{
27810 p->error_buffer = main ? Qfalse : Qnil;
27811 p->parent_iseq = base;
27812 return p;
27813}
27814
27815void
27816rb_ruby_parser_set_script_lines(rb_parser_t *p)
27817{
27818 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27819}
27820
27821void
27822rb_ruby_parser_error_tolerant(rb_parser_t *p)
27823{
27824 p->error_tolerant = 1;
27825}
27826
27827void
27828rb_ruby_parser_keep_tokens(rb_parser_t *p)
27829{
27830 p->keep_tokens = 1;
27831 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27832}
27833
27835rb_ruby_parser_encoding(rb_parser_t *p)
27836{
27837 return p->enc;
27838}
27839
27840int
27841rb_ruby_parser_end_seen_p(rb_parser_t *p)
27842{
27843 return p->ruby__end__seen;
27844}
27845
27846int
27847rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27848{
27849 p->debug = flag;
27850 return flag;
27851}
27852#endif /* !RIPPER */
27853
27854#ifdef RIPPER
27855int
27856rb_ruby_parser_get_yydebug(rb_parser_t *p)
27857{
27858 return p->debug;
27859}
27860
27861void
27862rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27863{
27864 p->value = value;
27865}
27866
27867int
27868rb_ruby_parser_error_p(rb_parser_t *p)
27869{
27870 return p->error_p;
27871}
27872
27873VALUE
27874rb_ruby_parser_debug_output(rb_parser_t *p)
27875{
27876 return p->debug_output;
27877}
27878
27879void
27880rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27881{
27882 p->debug_output = output;
27883}
27884
27885VALUE
27886rb_ruby_parser_parsing_thread(rb_parser_t *p)
27887{
27888 return p->parsing_thread;
27889}
27890
27891void
27892rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27893{
27894 p->parsing_thread = parsing_thread;
27895}
27896
27897void
27898rb_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)
27899{
27900 p->lex.gets = gets;
27901 p->lex.input = input;
27902 p->eofp = 0;
27903 p->ruby_sourcefile_string = sourcefile_string;
27904 p->ruby_sourcefile = sourcefile;
27905 p->ruby_sourceline = sourceline;
27906}
27907
27908VALUE
27909rb_ruby_parser_result(rb_parser_t *p)
27910{
27911 return p->result;
27912}
27913
27915rb_ruby_parser_enc(rb_parser_t *p)
27916{
27917 return p->enc;
27918}
27919
27920VALUE
27921rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27922{
27923 return p->ruby_sourcefile_string;
27924}
27925
27926int
27927rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27928{
27929 return p->ruby_sourceline;
27930}
27931
27932int
27933rb_ruby_parser_lex_state(rb_parser_t *p)
27934{
27935 return p->lex.state;
27936}
27937
27938void
27939rb_ruby_ripper_parse0(rb_parser_t *p)
27940{
27941 parser_prepare(p);
27942 p->ast = rb_ast_new();
27943 ripper_yyparse((void*)p);
27944 rb_ast_free(p->ast);
27945 p->ast = 0;
27946 p->eval_tree = 0;
27947 p->eval_tree_begin = 0;
27948}
27949
27950int
27951rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27952{
27953 return dedent_string(p, string, width);
27954}
27955
27956int
27957rb_ruby_ripper_initialized_p(rb_parser_t *p)
27958{
27959 return p->lex.input != 0;
27960}
27961
27962void
27963rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27964{
27965 parser_initialize(p);
27966}
27967
27968long
27969rb_ruby_ripper_column(rb_parser_t *p)
27970{
27971 return p->lex.ptok - p->lex.pbeg;
27972}
27973
27974long
27975rb_ruby_ripper_token_len(rb_parser_t *p)
27976{
27977 return p->lex.pcur - p->lex.ptok;
27978}
27979
27981rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27982{
27983 return p->lex.lastline;
27984}
27985
27986VALUE
27987rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27988{
27989 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27990}
27991
27992#ifdef UNIVERSAL_PARSER
27994rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27995{
27996 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27997 p->config = config;
27998 return p;
27999}
28000#endif
28001
28002struct parser_params*
28003rb_ruby_ripper_parser_allocate(void)
28004{
28005 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
28006}
28007#endif /* RIPPER */
28008
28009#ifndef RIPPER
28010void
28011rb_parser_printf(struct parser_params *p, const char *fmt, ...)
28012{
28013 va_list ap;
28014 VALUE mesg = p->debug_buffer;
28015
28016 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
28017 va_start(ap, fmt);
28018 rb_str_vcatf(mesg, fmt, ap);
28019 va_end(ap);
28020 if (char_at_end(p, mesg, 0) == '\n') {
28021 rb_io_write(p->debug_output, mesg);
28022 p->debug_buffer = Qnil;
28023 }
28024}
28025
28026static void
28027parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
28028{
28029 va_list ap;
28030 int lineno, column;
28031
28032 if (loc) {
28033 lineno = loc->end_pos.lineno;
28034 column = loc->end_pos.column;
28035 }
28036 else {
28037 lineno = p->ruby_sourceline;
28038 column = rb_len2int(p->lex.pcur - p->lex.pbeg);
28039 }
28040
28041 rb_io_flush(p->debug_output);
28042 p->error_p = 1;
28043 va_start(ap, fmt);
28044 p->error_buffer =
28045 rb_syntax_error_append(p->error_buffer,
28046 p->ruby_sourcefile_string,
28047 lineno, column,
28048 p->enc, fmt, ap);
28049 va_end(ap);
28050}
28051
28052static size_t
28053count_char(const char *str, int c)
28054{
28055 int n = 0;
28056 while (str[n] == c) ++n;
28057 return n;
28058}
28059
28060/*
28061 * strip enclosing double-quotes, same as the default yytnamerr except
28062 * for that single-quotes matching back-quotes do not stop stripping.
28063 *
28064 * "\"`class' keyword\"" => "`class' keyword"
28065 */
28066size_t
28067rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
28068{
28069 if (*yystr == '"') {
28070 size_t yyn = 0, bquote = 0;
28071 const char *yyp = yystr;
28072
28073 while (*++yyp) {
28074 switch (*yyp) {
28075 case '\'':
28076 if (!bquote) {
28077 bquote = count_char(yyp+1, '\'') + 1;
28078 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
28079 yyn += bquote;
28080 yyp += bquote - 1;
28081 break;
28082 }
28083 else {
28084 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
28085 if (yyres) memcpy(yyres + yyn, yyp, bquote);
28086 yyn += bquote;
28087 yyp += bquote - 1;
28088 bquote = 0;
28089 break;
28090 }
28091 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
28092 if (yyres) memcpy(yyres + yyn, yyp, 3);
28093 yyn += 3;
28094 yyp += 2;
28095 break;
28096 }
28097 goto do_not_strip_quotes;
28098 }
28099
28100 case ',':
28101 goto do_not_strip_quotes;
28102
28103 case '\\':
28104 if (*++yyp != '\\')
28105 goto do_not_strip_quotes;
28106 /* Fall through. */
28107 default:
28108 if (yyres)
28109 yyres[yyn] = *yyp;
28110 yyn++;
28111 break;
28112
28113 case '"':
28114 case '\0':
28115 if (yyres)
28116 yyres[yyn] = '\0';
28117 return yyn;
28118 }
28119 }
28120 do_not_strip_quotes: ;
28121 }
28122
28123 if (!yyres) return strlen(yystr);
28124
28125 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
28126}
28127#endif
28128
28129#ifdef RIPPER
28130#define validate(x) (void)(x)
28131
28132static VALUE
28133ripper_dispatch0(struct parser_params *p, ID mid)
28134{
28135 return rb_funcall(p->value, mid, 0);
28136}
28137
28138static VALUE
28139ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
28140{
28141 validate(a);
28142 return rb_funcall(p->value, mid, 1, a);
28143}
28144
28145static VALUE
28146ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
28147{
28148 validate(a);
28149 validate(b);
28150 return rb_funcall(p->value, mid, 2, a, b);
28151}
28152
28153static VALUE
28154ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
28155{
28156 validate(a);
28157 validate(b);
28158 validate(c);
28159 return rb_funcall(p->value, mid, 3, a, b, c);
28160}
28161
28162static VALUE
28163ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
28164{
28165 validate(a);
28166 validate(b);
28167 validate(c);
28168 validate(d);
28169 return rb_funcall(p->value, mid, 4, a, b, c, d);
28170}
28171
28172static VALUE
28173ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
28174{
28175 validate(a);
28176 validate(b);
28177 validate(c);
28178 validate(d);
28179 validate(e);
28180 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
28181}
28182
28183static VALUE
28184ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
28185{
28186 validate(a);
28187 validate(b);
28188 validate(c);
28189 validate(d);
28190 validate(e);
28191 validate(f);
28192 validate(g);
28193 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
28194}
28195
28196void
28197ripper_error(struct parser_params *p)
28198{
28199 p->error_p = TRUE;
28200}
28201
28202VALUE
28203ripper_value(struct parser_params *p)
28204{
28205 (void)yystpcpy; /* may not used in newer bison */
28206
28207 return p->value;
28208}
28209
28210#endif /* RIPPER */
28211/*
28212 * Local variables:
28213 * mode: c
28214 * c-file-style: "ruby"
28215 * End:
28216 */
#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:406
#define ISSPACE
Old name of rb_isspace.
Definition ctype.h:88
#define ALLOC
Old name of RB_ALLOC.
Definition memory.h:403
#define xfree
Old name of ruby_xfree.
Definition xmalloc.h:58
#define UNREACHABLE_RETURN
Old name of RBIMPL_UNREACHABLE_RETURN.
Definition assume.h:29
#define ZALLOC
Old name of RB_ZALLOC.
Definition memory.h:405
#define ENC_CODERANGE_UNKNOWN
Old name of RUBY_ENC_CODERANGE_UNKNOWN.
Definition coderange.h:179
#define xmalloc
Old name of ruby_xmalloc.
Definition xmalloc.h:53
#define ISDIGIT
Old name of rb_isdigit.
Definition ctype.h:93
#define ASSUME
Old name of RBIMPL_ASSUME.
Definition assume.h:27
#define ALLOC_N
Old name of RB_ALLOC_N.
Definition memory.h:402
#define MBCLEN_CHARFOUND_LEN(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_LEN.
Definition encoding.h:517
#define STRCASECMP
Old name of st_locale_insensitive_strcasecmp.
Definition ctype.h:102
#define ISALPHA
Old name of rb_isalpha.
Definition ctype.h:92
#define STRNCASECMP
Old name of st_locale_insensitive_strncasecmp.
Definition ctype.h:103
#define ISASCII
Old name of rb_isascii.
Definition ctype.h:85
#define Qnil
Old name of RUBY_Qnil.
#define Qfalse
Old name of RUBY_Qfalse.
#define NIL_P
Old name of RB_NIL_P.
#define MBCLEN_CHARFOUND_P(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_P.
Definition encoding.h:516
#define ISPRINT
Old name of rb_isprint.
Definition ctype.h:86
#define xcalloc
Old name of ruby_xcalloc.
Definition xmalloc.h:55
#define ISXDIGIT
Old name of rb_isxdigit.
Definition ctype.h:94
#define ISCNTRL
Old name of rb_iscntrl.
Definition ctype.h:96
#define ISALNUM
Old name of rb_isalnum.
Definition ctype.h:91
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition eval.c:678
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:476
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1455
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1474
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2305
#define RUBY_ASSERT(...)
Asserts that the given expression is truthy if and only if RUBY_DEBUG is truthy.
Definition assert.h:219
Encoding relates APIs.
rb_len_t rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition string.c:855
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1149
VALUE rb_ary_entry(VALUE ary, rb_len_t off)
Queries an element of an array.
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1523
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1557
VALUE rb_str_cat(VALUE dst, const char *src, rb_len_t srclen)
Destructively appends the passed contents to the string.
Definition string.c:3706
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1717
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1681
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1539
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:1097
int len
Length of the buffer.
Definition io.h:8
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:223
#define strdup(s)
Just another name of ruby_strdup.
Definition util.h:187
#define rb_len2int
Just another name of rb_len2int_inline.
Definition len_t.h:37
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition memory.h:375
#define ALLOCA_N(type, n)
Definition memory.h:295
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition memory.h:363
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:170
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:387
VALUE type(ANYARGS)
ANYARGS-ed function type.
std::string_view constant(const pm_parser_t *parser PRISM_LIFETIMEBOUND, pm_constant_id_t constant_id) noexcept
The name of the constant with the given id, which must not be zero.
Definition parser.hpp:64
Functions related to nodes in the AST.
static struct re_pattern_buffer * RREGEXP_PTR(VALUE rexp)
Convenient getter function.
Definition rregexp.h:77
#define StringValueCStr(v)
Identical to StringValuePtr, except it additionally checks for the contents for viability as a C stri...
Definition rstring.h:89
#define errno
Ractor-aware version of errno.
Definition ruby.h:388
#define RTEST
This is an old name of RB_TEST.
Definition lex.c:33
Definition st.h:79
long rb_len_t
A signed integer type for lengths and indices of objects such as String and Array.
Definition value.h:142
unsigned long rb_ulen_t
An unsigned integer type that has the same width with rb_len_t.
Definition value.h:145
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40
#define RBIMPL_WARNING_IGNORED(flag)
Suppresses a warning.
#define RBIMPL_WARNING_PUSH()
Pushes compiler warning state.
#define RBIMPL_WARNING_POP()
Pops compiler warning state.