Ruby 4.0.5p0 (2026-05-20 revision 64336ffd0ee9e1f4c05891695a3d7b49cb709721)
parse.c
1/* A Bison parser, made by Lrama 0.7.1. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48/* Identify Bison output, and Bison version. */
49#define YYBISON 30802
50
51/* Bison version string. */
52#define YYBISON_VERSION "3.8.2"
53
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 1
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
66
67/* First part of user prologue. */
68#line 12 "parse.y"
69
70
71#if !YYPURE
72# error needs pure parser
73#endif
74#define YYDEBUG 1
75#define YYERROR_VERBOSE 1
76#define YYSTACK_USE_ALLOCA 0
77
78/* For Ripper */
79#ifdef RUBY_EXTCONF_H
80# include RUBY_EXTCONF_H
81#endif
82
83#include "ruby/internal/config.h"
84
85#include <errno.h>
86
87#ifdef UNIVERSAL_PARSER
88
89#include "internal/ruby_parser.h"
90#include "parser_node.h"
91#include "universal_parser.c"
92
93#ifdef RIPPER
94#define STATIC_ID2SYM p->config->static_id2sym
95#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
96#endif
97
98#else
99
100#include "internal.h"
101#include "internal/compile.h"
102#include "internal/compilers.h"
103#include "internal/complex.h"
104#include "internal/encoding.h"
105#include "internal/error.h"
106#include "internal/hash.h"
107#include "internal/io.h"
108#include "internal/numeric.h"
109#include "internal/parse.h"
110#include "internal/rational.h"
111#include "internal/re.h"
112#include "internal/ruby_parser.h"
113#include "internal/symbol.h"
114#include "internal/thread.h"
115#include "internal/variable.h"
116#include "node.h"
117#include "parser_node.h"
118#include "probes.h"
119#include "regenc.h"
120#include "ruby/encoding.h"
121#include "ruby/regex.h"
122#include "ruby/ruby.h"
123#include "ruby/st.h"
124#include "ruby/util.h"
125#include "ruby/ractor.h"
126#include "symbol.h"
127
128#ifndef RIPPER
129static VALUE
130syntax_error_new(void)
131{
133}
134#endif
135
136static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
137
138#define compile_callback rb_suppress_tracing
139#endif /* !UNIVERSAL_PARSER */
140
141#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
142#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
143
144static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
145
146#ifndef RIPPER
147static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
148#endif
149
150static int
151node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
152{
153 return (n1->minus != n2->minus ||
154 n1->base != n2->base ||
155 strcmp(n1->val, n2->val));
156}
157
158static int
159node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
160{
161 return (n1->minus != n2->minus ||
162 strcmp(n1->val, n2->val));
163}
164
165static int
166node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
167{
168 return (n1->minus != n2->minus ||
169 n1->base != n2->base ||
170 n1->seen_point != n2->seen_point ||
171 strcmp(n1->val, n2->val));
172}
173
174static int
175node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
176{
177 return (n1->minus != n2->minus ||
178 n1->base != n2->base ||
179 n1->seen_point != n2->seen_point ||
180 n1->type != n2->type ||
181 strcmp(n1->val, n2->val));
182}
183
184static int
185rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
186{
187 return (n1->options != n2->options ||
188 rb_parser_string_hash_cmp(n1->string, n2->string));
189}
190
191static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
192static st_index_t rb_char_p_hash(const char *c);
193
194static int
195literal_cmp(st_data_t val, st_data_t lit)
196{
197 if (val == lit) return 0;
198
199 NODE *node_val = RNODE(val);
200 NODE *node_lit = RNODE(lit);
201 enum node_type type_val = nd_type(node_val);
202 enum node_type type_lit = nd_type(node_lit);
203
204 if (type_val != type_lit) {
205 return -1;
206 }
207
208 switch (type_lit) {
209 case NODE_INTEGER:
210 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
211 case NODE_FLOAT:
212 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
213 case NODE_RATIONAL:
214 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
215 case NODE_IMAGINARY:
216 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
217 case NODE_STR:
218 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
219 case NODE_SYM:
220 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
221 case NODE_REGX:
222 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
223 case NODE_LINE:
224 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
225 case NODE_FILE:
226 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
227 case NODE_ENCODING:
228 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
229 default:
230#ifdef UNIVERSAL_PARSER
231 abort();
232#else
233 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
234#endif
235 }
236}
237
238static st_index_t
239literal_hash(st_data_t a)
240{
241 NODE *node = (NODE *)a;
242 enum node_type type = nd_type(node);
243
244 switch (type) {
245 case NODE_INTEGER:
246 return rb_char_p_hash(RNODE_INTEGER(node)->val);
247 case NODE_FLOAT:
248 return rb_char_p_hash(RNODE_FLOAT(node)->val);
249 case NODE_RATIONAL:
250 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
251 case NODE_IMAGINARY:
252 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
253 case NODE_STR:
254 return rb_parser_str_hash(RNODE_STR(node)->string);
255 case NODE_SYM:
256 return rb_parser_str_hash(RNODE_SYM(node)->string);
257 case NODE_REGX:
258 return rb_parser_str_hash(RNODE_REGX(node)->string);
259 case NODE_LINE:
260 return (st_index_t)node->nd_loc.beg_pos.lineno;
261 case NODE_FILE:
262 return rb_parser_str_hash(RNODE_FILE(node)->path);
263 case NODE_ENCODING:
264 return (st_index_t)RNODE_ENCODING(node)->enc;
265 default:
266#ifdef UNIVERSAL_PARSER
267 abort();
268#else
269 rb_bug("unexpected node: %s", ruby_node_name(type));
270#endif
271 }
272}
273
274static inline int
275parse_isascii(int c)
276{
277 return '\0' <= c && c <= '\x7f';
278}
279
280#undef ISASCII
281#define ISASCII parse_isascii
282
283static inline int
284parse_isspace(int c)
285{
286 return c == ' ' || ('\t' <= c && c <= '\r');
287}
288
289#undef ISSPACE
290#define ISSPACE parse_isspace
291
292static inline int
293parse_iscntrl(int c)
294{
295 return ('\0' <= c && c < ' ') || c == '\x7f';
296}
297
298#undef ISCNTRL
299#define ISCNTRL(c) parse_iscntrl(c)
300
301static inline int
302parse_isupper(int c)
303{
304 return 'A' <= c && c <= 'Z';
305}
306
307static inline int
308parse_islower(int c)
309{
310 return 'a' <= c && c <= 'z';
311}
312
313static inline int
314parse_isalpha(int c)
315{
316 return parse_isupper(c) || parse_islower(c);
317}
318
319#undef ISALPHA
320#define ISALPHA(c) parse_isalpha(c)
321
322static inline int
323parse_isdigit(int c)
324{
325 return '0' <= c && c <= '9';
326}
327
328#undef ISDIGIT
329#define ISDIGIT(c) parse_isdigit(c)
330
331static inline int
332parse_isalnum(int c)
333{
334 return ISALPHA(c) || ISDIGIT(c);
335}
336
337#undef ISALNUM
338#define ISALNUM(c) parse_isalnum(c)
339
340static inline int
341parse_isxdigit(int c)
342{
343 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
344}
345
346#undef ISXDIGIT
347#define ISXDIGIT(c) parse_isxdigit(c)
348
349#include "parser_st.h"
350
351#undef STRCASECMP
352#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
353
354#undef STRNCASECMP
355#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
356
357#ifdef RIPPER
358#include "ripper_init.h"
359#endif
360
361enum rescue_context {
362 before_rescue,
363 after_rescue,
364 after_else,
365 after_ensure,
366};
367
369 unsigned int in_defined: 1;
370 unsigned int in_kwarg: 1;
371 unsigned int in_argdef: 1;
372 unsigned int in_def: 1;
373 unsigned int in_class: 1;
374 unsigned int has_trailing_semicolon: 1;
375 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
376 BITFIELD(enum rescue_context, in_rescue, 2);
377 unsigned int cant_return: 1;
378 unsigned int in_alt_pattern: 1;
379 unsigned int capture_in_pattern: 1;
380};
381
382typedef struct RNode_DEF_TEMP rb_node_def_temp_t;
383
384#if defined(__GNUC__) && !defined(__clang__)
385// Suppress "parameter passing for argument of type 'struct
386// lex_context' changed" notes. `struct lex_context` is file scope,
387// and has no ABI compatibility issue.
391// Not sure why effective even after popped.
392#endif
393
394#include "parse.h"
395
396#define NO_LEX_CTXT (struct lex_context){0}
397
398#ifndef WARN_PAST_SCOPE
399# define WARN_PAST_SCOPE 0
400#endif
401
402#define TAB_WIDTH 8
403
404#define yydebug (p->debug) /* disable the global variable definition */
405
406#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
407#define YY_LOCATION_PRINT(File, loc, p) \
408 rb_parser_printf(p, "%d.%d-%d.%d", \
409 (loc).beg_pos.lineno, (loc).beg_pos.column,\
410 (loc).end_pos.lineno, (loc).end_pos.column)
411#define YYLLOC_DEFAULT(Current, Rhs, N) \
412 do \
413 if (N) \
414 { \
415 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
416 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
417 } \
418 else \
419 { \
420 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
421 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
422 } \
423 while (0)
424#define YY_(Msgid) \
425 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
426 "nesting too deep" : (Msgid))
427
428#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
429 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
430#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
431 rb_parser_set_location_of_delayed_token(p, &(Current))
432#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
433 rb_parser_set_location_of_heredoc_end(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
435 rb_parser_set_location_of_dummy_end(p, &(Current))
436#define RUBY_SET_YYLLOC_OF_NONE(Current) \
437 rb_parser_set_location_of_none(p, &(Current))
438#define RUBY_SET_YYLLOC(Current) \
439 rb_parser_set_location(p, &(Current))
440#define RUBY_INIT_YYLLOC() \
441 { \
442 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
443 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
444 }
445
446#define IS_lex_state_for(x, ls) ((x) & (ls))
447#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
448#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
449#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
450
451# define SET_LEX_STATE(ls) \
452 parser_set_lex_state(p, ls, __LINE__)
453static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
454
455typedef VALUE stack_type;
456
457static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
458
459# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
460# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
461# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
462# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
463# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
464
465/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
466 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
467#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
468#define COND_POP() BITSTACK_POP(cond_stack)
469#define COND_P() BITSTACK_SET_P(cond_stack)
470#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
471
472/* A flag to identify keyword_do_block; "do" keyword after command_call.
473 Example: `foo 1, 2 do`. */
474#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
475#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
476#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
477#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
478
479struct vtable {
480 ID *tbl;
481 int pos;
482 int capa;
483 struct vtable *prev;
484};
485
487 struct vtable *args;
488 struct vtable *vars;
489 struct vtable *used;
490# if WARN_PAST_SCOPE
491 struct vtable *past;
492# endif
493 struct local_vars *prev;
494 struct {
495 NODE *outer, *inner, *current;
496 } numparam;
497 NODE *it;
498};
499
501 NODE *node;
502 YYLTYPE opening_loc;
503 YYLTYPE closing_loc;
505
506enum {
507 ORDINAL_PARAM = -1,
508 NO_PARAM = 0,
509 NUMPARAM_MAX = 9,
510};
511
512#define DVARS_INHERIT ((void*)1)
513#define DVARS_TOPSCOPE NULL
514#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
515
516typedef struct token_info {
517 const char *token;
518 rb_code_position_t beg;
519 int indent;
520 int nonspc;
521 struct token_info *next;
522} token_info;
523
525 const rb_code_position_t *pos;
526 struct end_expect_token_locations *prev;
527} end_expect_token_locations_t;
528
530 struct parser_string_buffer_elem *next;
531 long len; /* Total length of allocated buf */
532 long used; /* Current usage of buf */
533 rb_parser_string_t *buf[FLEX_ARY_LEN];
534} parser_string_buffer_elem_t;
535
536typedef struct parser_string_buffer {
537 parser_string_buffer_elem_t *head;
538 parser_string_buffer_elem_t *last;
539} parser_string_buffer_t;
540
541#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
542
543/*
544 Structure of Lexer Buffer:
545
546 lex.pbeg lex.ptok lex.pcur lex.pend
547 | | | |
548 |------------+------------+------------|
549 |<---------->|
550 token
551*/
553 YYSTYPE *lval;
554 YYLTYPE *yylloc;
555
556 struct {
557 rb_strterm_t *strterm;
558 rb_parser_lex_gets_func *gets;
559 rb_parser_input_data input;
560 parser_string_buffer_t string_buffer;
561 rb_parser_string_t *lastline;
562 rb_parser_string_t *nextline;
563 const char *pbeg;
564 const char *pcur;
565 const char *pend;
566 const char *ptok;
567 enum lex_state_e state;
568 /* track the nest level of any parens "()[]{}" */
569 int paren_nest;
570 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
571 int lpar_beg;
572 /* track the nest level of only braces "{}" */
573 int brace_nest;
574 } lex;
575 stack_type cond_stack;
576 stack_type cmdarg_stack;
577 int tokidx;
578 int toksiz;
579 int heredoc_end;
580 int heredoc_indent;
581 int heredoc_line_indent;
582 char *tokenbuf;
583 struct local_vars *lvtbl;
584 st_table *pvtbl;
585 st_table *pktbl;
586 int line_count;
587 int ruby_sourceline; /* current line no. */
588 const char *ruby_sourcefile; /* current source file */
589 VALUE ruby_sourcefile_string;
590 rb_encoding *enc;
591 token_info *token_info;
592 st_table *case_labels;
593 rb_node_exits_t *exits;
594
595 VALUE debug_buffer;
596 VALUE debug_output;
597
598 struct {
599 rb_parser_string_t *token;
600 int beg_line;
601 int beg_col;
602 int end_line;
603 int end_col;
604 } delayed;
605
606 rb_ast_t *ast;
607 int node_id;
608
609 st_table *warn_duplicate_keys_table;
610
611 int max_numparam;
612 ID it_id;
613
614 struct lex_context ctxt;
615
616 NODE *eval_tree_begin;
617 NODE *eval_tree;
618 const struct rb_iseq_struct *parent_iseq;
619
620#ifdef UNIVERSAL_PARSER
621 const rb_parser_config_t *config;
622#endif
623 /* compile_option */
624 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
625
626 unsigned int command_start:1;
627 unsigned int eofp: 1;
628 unsigned int ruby__end__seen: 1;
629 unsigned int debug: 1;
630 unsigned int has_shebang: 1;
631 unsigned int token_seen: 1;
632 unsigned int token_info_enabled: 1;
633# if WARN_PAST_SCOPE
634 unsigned int past_scope_enabled: 1;
635# endif
636 unsigned int error_p: 1;
637 unsigned int cr_seen: 1;
638
639#ifndef RIPPER
640 /* Ruby core only */
641
642 unsigned int do_print: 1;
643 unsigned int do_loop: 1;
644 unsigned int do_chomp: 1;
645 unsigned int do_split: 1;
646 unsigned int error_tolerant: 1;
647 unsigned int keep_tokens: 1;
648
649 VALUE error_buffer;
650 rb_parser_ary_t *debug_lines;
651 /*
652 * Store specific keyword locations to generate dummy end token.
653 * Refer to the tail of list element.
654 */
655 end_expect_token_locations_t *end_expect_token_locations;
656 /* id for terms */
657 int token_id;
658 /* Array for term tokens */
659 rb_parser_ary_t *tokens;
660#else
661 /* Ripper only */
662
663 VALUE value;
664 VALUE result;
665 VALUE parsing_thread;
666 VALUE s_value; /* Token VALUE */
667 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
668 VALUE s_value_stack;
669#endif
670};
671
672#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
673#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
674#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
675static int
676numparam_id_p(struct parser_params *p, ID id)
677{
678 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
679 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
680 return idx > 0 && idx <= NUMPARAM_MAX;
681}
682static void numparam_name(struct parser_params *p, ID id);
683
684#ifdef RIPPER
685static void
686after_shift(struct parser_params *p)
687{
688 if (p->debug) {
689 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
690 }
691 rb_ary_push(p->s_value_stack, p->s_value);
692 p->s_value = Qnil;
693}
694
695static void
696before_reduce(int len, struct parser_params *p)
697{
698 // Initialize $$ with $1.
699 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
700}
701
702static void
703after_reduce(int len, struct parser_params *p)
704{
705 for (int i = 0; i < len; i++) {
706 VALUE tos = rb_ary_pop(p->s_value_stack);
707 if (p->debug) {
708 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
709 }
710 }
711 if (p->debug) {
712 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
713 }
714 rb_ary_push(p->s_value_stack, p->s_lvalue);
715 p->s_lvalue = Qnil;
716}
717
718static void
719after_shift_error_token(struct parser_params *p)
720{
721 if (p->debug) {
722 rb_parser_printf(p, "after-shift-error-token:\n");
723 }
724 rb_ary_push(p->s_value_stack, Qnil);
725}
726
727static void
728after_pop_stack(int len, struct parser_params *p)
729{
730 for (int i = 0; i < len; i++) {
731 VALUE tos = rb_ary_pop(p->s_value_stack);
732 if (p->debug) {
733 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
734 }
735 }
736}
737#else
738static void
739after_shift(struct parser_params *p)
740{
741}
742
743static void
744before_reduce(int len, struct parser_params *p)
745{
746}
747
748static void
749after_reduce(int len, struct parser_params *p)
750{
751}
752
753static void
754after_shift_error_token(struct parser_params *p)
755{
756}
757
758static void
759after_pop_stack(int len, struct parser_params *p)
760{
761}
762#endif
763
764#define intern_cstr(n,l,en) rb_intern3(n,l,en)
765
766#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
767
768#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
769#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
770#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
771#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
772#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
773#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
774
775#ifndef RIPPER
776static inline int
777char_at_end(struct parser_params *p, VALUE str, int when_empty)
778{
779 long len = RSTRING_LEN(str);
780 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
781}
782#endif
783
784static void
785pop_pvtbl(struct parser_params *p, st_table *tbl)
786{
787 st_free_table(p->pvtbl);
788 p->pvtbl = tbl;
789}
790
791static void
792pop_pktbl(struct parser_params *p, st_table *tbl)
793{
794 if (p->pktbl) st_free_table(p->pktbl);
795 p->pktbl = tbl;
796}
797
798#define STRING_BUF_DEFAULT_LEN 16
799
800static void
801string_buffer_init(struct parser_params *p)
802{
803 parser_string_buffer_t *buf = &p->lex.string_buffer;
804 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
805
806 buf->head = buf->last = xmalloc(size);
807 buf->head->len = STRING_BUF_DEFAULT_LEN;
808 buf->head->used = 0;
809 buf->head->next = NULL;
810}
811
812static void
813string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
814{
815 parser_string_buffer_t *buf = &p->lex.string_buffer;
816
817 if (buf->head->used >= buf->head->len) {
818 parser_string_buffer_elem_t *elem;
819 long n = buf->head->len * 2;
820 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
821
822 elem = xmalloc(size);
823 elem->len = n;
824 elem->used = 0;
825 elem->next = NULL;
826 buf->last->next = elem;
827 buf->last = elem;
828 }
829 buf->last->buf[buf->last->used++] = str;
830}
831
832static void
833string_buffer_free(struct parser_params *p)
834{
835 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
836
837 while (elem) {
838 parser_string_buffer_elem_t *next_elem = elem->next;
839
840 for (long i = 0; i < elem->used; i++) {
841 rb_parser_string_free(p, elem->buf[i]);
842 }
843
844 xfree(elem);
845 elem = next_elem;
846 }
847}
848
849#ifndef RIPPER
850static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
851
852static void
853debug_end_expect_token_locations(struct parser_params *p, const char *name)
854{
855 if(p->debug) {
856 VALUE mesg = rb_sprintf("%s: [", name);
857 int i = 0;
858 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
859 if (i > 0)
860 rb_str_cat_cstr(mesg, ", ");
861 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
862 i++;
863 }
864 rb_str_cat_cstr(mesg, "]\n");
865 flush_debug_buffer(p, p->debug_output, mesg);
866 }
867}
868
869static void
870push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
871{
872 if(!p->error_tolerant) return;
873
874 end_expect_token_locations_t *locations;
875 locations = ALLOC(end_expect_token_locations_t);
876 locations->pos = pos;
877 locations->prev = p->end_expect_token_locations;
878 p->end_expect_token_locations = locations;
879
880 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
881}
882
883static void
884pop_end_expect_token_locations(struct parser_params *p)
885{
886 if(!p->end_expect_token_locations) return;
887
888 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
889 ruby_sized_xfree(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
890 p->end_expect_token_locations = locations;
891
892 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
893}
894
895static end_expect_token_locations_t *
896peek_end_expect_token_locations(struct parser_params *p)
897{
898 return p->end_expect_token_locations;
899}
900
901static const char *
902parser_token2char(struct parser_params *p, enum yytokentype tok)
903{
904 switch ((int) tok) {
905#define TOKEN2CHAR(tok) case tok: return (#tok);
906#define TOKEN2CHAR2(tok, name) case tok: return (name);
907 TOKEN2CHAR2(' ', "word_sep");
908 TOKEN2CHAR2('!', "!")
909 TOKEN2CHAR2('%', "%");
910 TOKEN2CHAR2('&', "&");
911 TOKEN2CHAR2('*', "*");
912 TOKEN2CHAR2('+', "+");
913 TOKEN2CHAR2('-', "-");
914 TOKEN2CHAR2('/', "/");
915 TOKEN2CHAR2('<', "<");
916 TOKEN2CHAR2('=', "=");
917 TOKEN2CHAR2('>', ">");
918 TOKEN2CHAR2('?', "?");
919 TOKEN2CHAR2('^', "^");
920 TOKEN2CHAR2('|', "|");
921 TOKEN2CHAR2('~', "~");
922 TOKEN2CHAR2(':', ":");
923 TOKEN2CHAR2(',', ",");
924 TOKEN2CHAR2('.', ".");
925 TOKEN2CHAR2(';', ";");
926 TOKEN2CHAR2('`', "`");
927 TOKEN2CHAR2('\n', "nl");
928 TOKEN2CHAR2('{', "\"{\"");
929 TOKEN2CHAR2('}', "\"}\"");
930 TOKEN2CHAR2('[', "\"[\"");
931 TOKEN2CHAR2(']', "\"]\"");
932 TOKEN2CHAR2('(', "\"(\"");
933 TOKEN2CHAR2(')', "\")\"");
934 TOKEN2CHAR2('\\', "backslash");
935 TOKEN2CHAR(keyword_class);
936 TOKEN2CHAR(keyword_module);
937 TOKEN2CHAR(keyword_def);
938 TOKEN2CHAR(keyword_undef);
939 TOKEN2CHAR(keyword_begin);
940 TOKEN2CHAR(keyword_rescue);
941 TOKEN2CHAR(keyword_ensure);
942 TOKEN2CHAR(keyword_end);
943 TOKEN2CHAR(keyword_if);
944 TOKEN2CHAR(keyword_unless);
945 TOKEN2CHAR(keyword_then);
946 TOKEN2CHAR(keyword_elsif);
947 TOKEN2CHAR(keyword_else);
948 TOKEN2CHAR(keyword_case);
949 TOKEN2CHAR(keyword_when);
950 TOKEN2CHAR(keyword_while);
951 TOKEN2CHAR(keyword_until);
952 TOKEN2CHAR(keyword_for);
953 TOKEN2CHAR(keyword_break);
954 TOKEN2CHAR(keyword_next);
955 TOKEN2CHAR(keyword_redo);
956 TOKEN2CHAR(keyword_retry);
957 TOKEN2CHAR(keyword_in);
958 TOKEN2CHAR(keyword_do);
959 TOKEN2CHAR(keyword_do_cond);
960 TOKEN2CHAR(keyword_do_block);
961 TOKEN2CHAR(keyword_do_LAMBDA);
962 TOKEN2CHAR(keyword_return);
963 TOKEN2CHAR(keyword_yield);
964 TOKEN2CHAR(keyword_super);
965 TOKEN2CHAR(keyword_self);
966 TOKEN2CHAR(keyword_nil);
967 TOKEN2CHAR(keyword_true);
968 TOKEN2CHAR(keyword_false);
969 TOKEN2CHAR(keyword_and);
970 TOKEN2CHAR(keyword_or);
971 TOKEN2CHAR(keyword_not);
972 TOKEN2CHAR(modifier_if);
973 TOKEN2CHAR(modifier_unless);
974 TOKEN2CHAR(modifier_while);
975 TOKEN2CHAR(modifier_until);
976 TOKEN2CHAR(modifier_rescue);
977 TOKEN2CHAR(keyword_alias);
978 TOKEN2CHAR(keyword_defined);
979 TOKEN2CHAR(keyword_BEGIN);
980 TOKEN2CHAR(keyword_END);
981 TOKEN2CHAR(keyword__LINE__);
982 TOKEN2CHAR(keyword__FILE__);
983 TOKEN2CHAR(keyword__ENCODING__);
984 TOKEN2CHAR(tIDENTIFIER);
985 TOKEN2CHAR(tFID);
986 TOKEN2CHAR(tGVAR);
987 TOKEN2CHAR(tIVAR);
988 TOKEN2CHAR(tCONSTANT);
989 TOKEN2CHAR(tCVAR);
990 TOKEN2CHAR(tLABEL);
991 TOKEN2CHAR(tINTEGER);
992 TOKEN2CHAR(tFLOAT);
993 TOKEN2CHAR(tRATIONAL);
994 TOKEN2CHAR(tIMAGINARY);
995 TOKEN2CHAR(tCHAR);
996 TOKEN2CHAR(tNTH_REF);
997 TOKEN2CHAR(tBACK_REF);
998 TOKEN2CHAR(tSTRING_CONTENT);
999 TOKEN2CHAR(tREGEXP_END);
1000 TOKEN2CHAR(tDUMNY_END);
1001 TOKEN2CHAR(tSP);
1002 TOKEN2CHAR(tUPLUS);
1003 TOKEN2CHAR(tUMINUS);
1004 TOKEN2CHAR(tPOW);
1005 TOKEN2CHAR(tCMP);
1006 TOKEN2CHAR(tEQ);
1007 TOKEN2CHAR(tEQQ);
1008 TOKEN2CHAR(tNEQ);
1009 TOKEN2CHAR(tGEQ);
1010 TOKEN2CHAR(tLEQ);
1011 TOKEN2CHAR(tANDOP);
1012 TOKEN2CHAR(tOROP);
1013 TOKEN2CHAR(tMATCH);
1014 TOKEN2CHAR(tNMATCH);
1015 TOKEN2CHAR(tDOT2);
1016 TOKEN2CHAR(tDOT3);
1017 TOKEN2CHAR(tBDOT2);
1018 TOKEN2CHAR(tBDOT3);
1019 TOKEN2CHAR(tAREF);
1020 TOKEN2CHAR(tASET);
1021 TOKEN2CHAR(tLSHFT);
1022 TOKEN2CHAR(tRSHFT);
1023 TOKEN2CHAR(tANDDOT);
1024 TOKEN2CHAR(tCOLON2);
1025 TOKEN2CHAR(tCOLON3);
1026 TOKEN2CHAR(tOP_ASGN);
1027 TOKEN2CHAR(tASSOC);
1028 TOKEN2CHAR(tLPAREN);
1029 TOKEN2CHAR(tLPAREN_ARG);
1030 TOKEN2CHAR(tLBRACK);
1031 TOKEN2CHAR(tLBRACE);
1032 TOKEN2CHAR(tLBRACE_ARG);
1033 TOKEN2CHAR(tSTAR);
1034 TOKEN2CHAR(tDSTAR);
1035 TOKEN2CHAR(tAMPER);
1036 TOKEN2CHAR(tLAMBDA);
1037 TOKEN2CHAR(tSYMBEG);
1038 TOKEN2CHAR(tSTRING_BEG);
1039 TOKEN2CHAR(tXSTRING_BEG);
1040 TOKEN2CHAR(tREGEXP_BEG);
1041 TOKEN2CHAR(tWORDS_BEG);
1042 TOKEN2CHAR(tQWORDS_BEG);
1043 TOKEN2CHAR(tSYMBOLS_BEG);
1044 TOKEN2CHAR(tQSYMBOLS_BEG);
1045 TOKEN2CHAR(tSTRING_END);
1046 TOKEN2CHAR(tSTRING_DEND);
1047 TOKEN2CHAR(tSTRING_DBEG);
1048 TOKEN2CHAR(tSTRING_DVAR);
1049 TOKEN2CHAR(tLAMBEG);
1050 TOKEN2CHAR(tLABEL_END);
1051 TOKEN2CHAR(tIGNORED_NL);
1052 TOKEN2CHAR(tCOMMENT);
1053 TOKEN2CHAR(tEMBDOC_BEG);
1054 TOKEN2CHAR(tEMBDOC);
1055 TOKEN2CHAR(tEMBDOC_END);
1056 TOKEN2CHAR(tHEREDOC_BEG);
1057 TOKEN2CHAR(tHEREDOC_END);
1058 TOKEN2CHAR(k__END__);
1059 TOKEN2CHAR(tLOWEST);
1060 TOKEN2CHAR(tUMINUS_NUM);
1061 TOKEN2CHAR(tLAST_TOKEN);
1062#undef TOKEN2CHAR
1063#undef TOKEN2CHAR2
1064 }
1065
1066 rb_bug("parser_token2id: unknown token %d", tok);
1067
1069}
1070#else
1071static void
1072push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1073{
1074}
1075
1076static void
1077pop_end_expect_token_locations(struct parser_params *p)
1078{
1079}
1080#endif
1081
1082RBIMPL_ATTR_NONNULL((1, 2, 3))
1083static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1084RBIMPL_ATTR_NONNULL((1, 2))
1085static int parser_yyerror0(struct parser_params*, const char*);
1086#define yyerror0(msg) parser_yyerror0(p, (msg))
1087#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1088#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1089#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1090#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1091#define lex_eol_p(p) lex_eol_n_p(p, 0)
1092#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1093#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1094#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1095
1096static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1097static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1098static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1099static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1100static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1101
1102#ifdef RIPPER
1103#define compile_for_eval (0)
1104#else
1105#define compile_for_eval (p->parent_iseq != 0)
1106#endif
1107
1108#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1109
1110#define CALL_Q_P(q) ((q) == tANDDOT)
1111#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1112
1113#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1114
1115static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1116
1117static inline void
1118rb_discard_node(struct parser_params *p, NODE *n)
1119{
1120 rb_ast_delete_node(p->ast, n);
1121}
1122
1123static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1124static rb_node_scope_t *rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1125static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1126static rb_node_if_t *rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE* if_keyword_loc, const YYLTYPE* then_keyword_loc, const YYLTYPE* end_keyword_loc);
1127static rb_node_unless_t *rb_node_unless_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *end_keyword_loc);
1128static rb_node_case_t *rb_node_case_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1129static rb_node_case2_t *rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1130static rb_node_case3_t *rb_node_case3_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1131static rb_node_when_t *rb_node_when_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc);
1132static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *operator_loc);
1133static rb_node_while_t *rb_node_while_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1134static rb_node_until_t *rb_node_until_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1135static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1136static rb_node_for_t *rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *for_keyword_loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *do_keyword_loc, const YYLTYPE *end_keyword_loc);
1137static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1138static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1139static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1140static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1141static rb_node_resbody_t *rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1142static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1143static rb_node_and_t *rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1144static rb_node_or_t *rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1145static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1146static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1147static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1148static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1149static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1150static rb_node_cdecl_t *rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1151static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1152static rb_node_op_asgn1_t *rb_node_op_asgn1_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *index, NODE *rvalue, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1153static rb_node_op_asgn2_t *rb_node_op_asgn2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, ID nd_vid, ID nd_mid, bool nd_aid, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1154static rb_node_op_asgn_or_t *rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1155static rb_node_op_asgn_and_t *rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1156static rb_node_op_cdecl_t *rb_node_op_cdecl_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, ID nd_aid, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1157static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1158static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1159static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1160static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1161static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1162static rb_node_super_t *rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1163static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1164static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1165static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1166static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1167static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1168static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1169static rb_node_yield_t *rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1170static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1171static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1172static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1173static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1174static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1175static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1176static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1177static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1178static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1179static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1180static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1181static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1182static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1183static rb_node_imaginary_t * rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type, const YYLTYPE *loc);
1184static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1185static rb_node_dstr_t *rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1186static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1187static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1188static rb_node_dxstr_t *rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1189static rb_node_evstr_t *rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1190static rb_node_regx_t *rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc);
1191static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1192static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1193static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1194static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1195static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1196static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1197static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1198static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1199static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1200static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1201static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1202static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1203static rb_node_alias_t *rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1204static rb_node_valias_t *rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1205static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1206static rb_node_class_t *rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *inheritance_operator_loc, const YYLTYPE *end_keyword_loc);
1207static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *module_keyword_loc, const YYLTYPE *end_keyword_loc);
1208static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *operator_loc, const YYLTYPE *end_keyword_loc);
1209static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1210static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1211static rb_node_dot2_t *rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1212static rb_node_dot3_t *rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1213static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1214static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1215static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1216static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1217static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1218static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1219static rb_node_postexe_t *rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1220static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1221static rb_node_dsym_t *rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1222static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1223static rb_node_lambda_t *rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1224static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1225static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1226static rb_node_fndptn_t *rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1227static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1228static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1229static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1230
1231#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1232#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1233#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1234#define NEW_IF(c,t,e,loc,ik_loc,tk_loc,ek_loc) (NODE *)rb_node_if_new(p,c,t,e,loc,ik_loc,tk_loc,ek_loc)
1235#define NEW_UNLESS(c,t,e,loc,k_loc,t_loc,e_loc) (NODE *)rb_node_unless_new(p,c,t,e,loc,k_loc,t_loc,e_loc)
1236#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1237#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1238#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1239#define NEW_WHEN(c,t,e,loc,k_loc,t_loc) (NODE *)rb_node_when_new(p,c,t,e,loc,k_loc,t_loc)
1240#define NEW_IN(c,t,e,loc,ik_loc,tk_loc,o_loc) (NODE *)rb_node_in_new(p,c,t,e,loc,ik_loc,tk_loc,o_loc)
1241#define NEW_WHILE(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_while_new(p,c,b,n,loc,k_loc,c_loc)
1242#define NEW_UNTIL(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_until_new(p,c,b,n,loc,k_loc,c_loc)
1243#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1244#define NEW_FOR(i,b,loc,f_loc,i_loc,d_loc,e_loc) (NODE *)rb_node_for_new(p,i,b,loc,f_loc,i_loc,d_loc,e_loc)
1245#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1246#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1247#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1248#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1249#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1250#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1251#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1252#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1253#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1254#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1255#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1256#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1257#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1258#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1259#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1260#define NEW_OP_ASGN1(r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc) (NODE *)rb_node_op_asgn1_new(p,r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc)
1261#define NEW_OP_ASGN2(r,t,i,o,val,loc,c_op_loc,m_loc,b_op_loc) (NODE *)rb_node_op_asgn2_new(p,r,val,i,o,t,loc,c_op_loc,m_loc,b_op_loc)
1262#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1263#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1264#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1265#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1266#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1267#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1268#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1269#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1270#define NEW_SUPER(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_super_new(p,a,loc,k_loc,l_loc,r_loc)
1271#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1272#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1273#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1274#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1275#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1276#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1277#define NEW_YIELD(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_yield_new(p,a,loc,k_loc,l_loc,r_loc)
1278#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1279#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1280#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1281#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1282#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1283#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1284#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1285#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1286#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1287#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1288#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1289#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1290#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1291#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1292#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1293#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1294#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1295#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1296#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1297#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1298#define NEW_REGX(str,opts,loc,o_loc,ct_loc,c_loc) (NODE *)rb_node_regx_new(p,str,opts,loc,o_loc,ct_loc,c_loc)
1299#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1300#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1301#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1302#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1303#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1304#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1305#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1306#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1307#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1308#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1309#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1310#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1311#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1312#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1313#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1314#define NEW_CLASS(n,b,s,loc,ck_loc,io_loc,ek_loc) (NODE *)rb_node_class_new(p,n,b,s,loc,ck_loc,io_loc,ek_loc)
1315#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1316#define NEW_SCLASS(r,b,loc,ck_loc,op_loc,ek_loc) (NODE *)rb_node_sclass_new(p,r,b,loc,ck_loc,op_loc,ek_loc)
1317#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1318#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1319#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1320#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1321#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1322#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1323#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1324#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1325#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1326#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1327#define NEW_POSTEXE(b,loc,k_loc,o_loc,c_loc) (NODE *)rb_node_postexe_new(p,b,loc,k_loc,o_loc,c_loc)
1328#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1329#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1330#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1331#define NEW_LAMBDA(a,b,loc,op_loc,o_loc,c_loc) (NODE *)rb_node_lambda_new(p,a,b,loc,op_loc,o_loc,c_loc)
1332#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1333#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1334#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1335#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1336#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1337#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1338#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1339
1340enum internal_node_type {
1341 NODE_INTERNAL_ONLY = NODE_LAST,
1342 NODE_DEF_TEMP,
1343 NODE_EXITS,
1344 NODE_INTERNAL_LAST
1345};
1346
1347static const char *
1348parser_node_name(int node)
1349{
1350 switch (node) {
1351 case NODE_DEF_TEMP:
1352 return "NODE_DEF_TEMP";
1353 case NODE_EXITS:
1354 return "NODE_EXITS";
1355 default:
1356 return ruby_node_name(node);
1357 }
1358}
1359
1360/* This node is parse.y internal */
1362 NODE node;
1363
1364 /* for NODE_DEFN/NODE_DEFS */
1365
1366 struct RNode *nd_def;
1367 ID nd_mid;
1368
1369 struct {
1370 int max_numparam;
1371 NODE *numparam_save;
1372 struct lex_context ctxt;
1373 } save;
1374};
1375
1376#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1377
1378static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1379static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1380static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1381static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1382static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1383
1384#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1385#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1386#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1387#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1388
1389/* Make a new internal node, which should not be appeared in the
1390 * result AST and does not have node_id and location. */
1391static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1392#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1393
1394static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1395
1396static int
1397parser_get_node_id(struct parser_params *p)
1398{
1399 int node_id = p->node_id;
1400 p->node_id++;
1401 return node_id;
1402}
1403
1404static void
1405anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1406{
1407 if (id == tANDDOT) {
1408 yyerror1(loc, "&. inside multiple assignment destination");
1409 }
1410}
1411
1412static inline void
1413set_line_body(NODE *body, int line)
1414{
1415 if (!body) return;
1416 switch (nd_type(body)) {
1417 case NODE_RESCUE:
1418 case NODE_ENSURE:
1419 nd_set_line(body, line);
1420 }
1421}
1422
1423static void
1424set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1425{
1426 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1427 nd_set_line(node, beg->end_pos.lineno);
1428}
1429
1430static NODE *
1431last_expr_node(NODE *expr)
1432{
1433 while (expr) {
1434 if (nd_type_p(expr, NODE_BLOCK)) {
1435 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1436 }
1437 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1438 expr = RNODE_BEGIN(expr)->nd_body;
1439 }
1440 else {
1441 break;
1442 }
1443 }
1444 return expr;
1445}
1446
1447#ifndef RIPPER
1448#define yyparse ruby_yyparse
1449#endif
1450
1451static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1452static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1453static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1454static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1455static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1456static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1457
1458static NODE *newline_node(NODE*);
1459static void fixpos(NODE*,NODE*);
1460
1461static int value_expr(struct parser_params*,NODE*);
1462static void void_expr(struct parser_params*,NODE*);
1463static NODE *remove_begin(NODE*);
1464static NODE *void_stmts(struct parser_params*,NODE*);
1465static void reduce_nodes(struct parser_params*,NODE**);
1466static void block_dup_check(struct parser_params*,NODE*,NODE*);
1467
1468static NODE *block_append(struct parser_params*,NODE*,NODE*);
1469static NODE *list_append(struct parser_params*,NODE*,NODE*);
1470static NODE *list_concat(NODE*,NODE*);
1471static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1472static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1473static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1474static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1475static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1476static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1477static NODE *str2dstr(struct parser_params*,NODE*);
1478static NODE *evstr2dstr(struct parser_params*,NODE*);
1479static NODE *splat_array(NODE*);
1480static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1481
1482static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1483static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1484static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1485static NODE *new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc);
1486static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {RNODE_ITER(b)->nd_iter = m; b->nd_loc = *loc; return b;}
1487
1488static bool args_info_empty_p(struct rb_args_info *args);
1489static 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*);
1490static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1491static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1492static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1493static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1494static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1495static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1496static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1497
1498static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1499static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1500
1501static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1502static void no_blockarg(struct parser_params*,NODE*);
1503static NODE *ret_args(struct parser_params*,NODE*);
1504static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1505static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1506
1507static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1508static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1509
1510static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1511static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1512
1513static VALUE rb_backref_error(struct parser_params*,NODE*);
1514static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1515
1516static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1517static 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);
1518static 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);
1519static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1520static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1521
1522static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1523
1524static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1525static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1526
1527static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1528static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1529
1530static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1531
1532static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1533
1534#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1535
1536static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1537
1538static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1539
1540static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1541
1542static rb_ast_id_table_t *local_tbl(struct parser_params*);
1543
1544static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1545static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1546
1547static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1548static NODE *heredoc_dedent(struct parser_params*,NODE*);
1549
1550static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1551
1552static 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);
1553
1554#ifdef RIPPER
1555#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1556#define set_value(val) (p->s_lvalue = val)
1557static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1558static int id_is_var(struct parser_params *p, ID id);
1559#endif
1560
1561RUBY_SYMBOL_EXPORT_BEGIN
1562VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1563int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1564enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1565VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1566void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1567PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1568YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1569YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1570YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1571YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1572YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1573YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1574void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1575RUBY_SYMBOL_EXPORT_END
1576
1577static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1578static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1579static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1580static VALUE formal_argument_error(struct parser_params*, ID);
1581static ID shadowing_lvar(struct parser_params*,ID);
1582static void new_bv(struct parser_params*,ID);
1583
1584static void local_push(struct parser_params*,int);
1585static void local_pop(struct parser_params*);
1586static void local_var(struct parser_params*, ID);
1587static void arg_var(struct parser_params*, ID);
1588static int local_id(struct parser_params *p, ID id);
1589static int local_id_ref(struct parser_params*, ID, ID **);
1590#define internal_id rb_parser_internal_id
1591ID internal_id(struct parser_params*);
1592static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1593static int check_forwarding_args(struct parser_params*);
1594static void add_forwarding_args(struct parser_params *p);
1595static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1596
1597static const struct vtable *dyna_push(struct parser_params *);
1598static void dyna_pop(struct parser_params*, const struct vtable *);
1599static int dyna_in_block(struct parser_params*);
1600#define dyna_var(p, id) local_var(p, id)
1601static int dvar_defined(struct parser_params*, ID);
1602#define dvar_defined_ref rb_parser_dvar_defined_ref
1603int dvar_defined_ref(struct parser_params*, ID, ID**);
1604static int dvar_curr(struct parser_params*,ID);
1605
1606static int lvar_defined(struct parser_params*, ID);
1607
1608static NODE *numparam_push(struct parser_params *p);
1609static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1610
1611#define METHOD_NOT '!'
1612
1613#define idFWD_REST '*'
1614#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1615#define idFWD_BLOCK '&'
1616#define idFWD_ALL idDot3
1617#define arg_FWD_BLOCK idFWD_BLOCK
1618
1619#define RE_ONIG_OPTION_IGNORECASE 1
1620#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1621#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1622#define RE_OPTION_ONCE (1<<16)
1623#define RE_OPTION_ENCODING_SHIFT 8
1624#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1625#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1626#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1627#define RE_OPTION_MASK 0xff
1628#define RE_OPTION_ARG_ENCODING_NONE 32
1629
1630#define CHECK_LITERAL_WHEN (st_table *)1
1631#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1632
1633#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1634RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1635
1636#define TOKEN2ID(tok) ( \
1637 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1638 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1639 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1640 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1641 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1642 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1643 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1644
1645/****** Ripper *******/
1646
1647#ifdef RIPPER
1648
1649#include "eventids1.h"
1650#include "eventids2.h"
1651
1652extern const struct ripper_parser_ids ripper_parser_ids;
1653
1654static VALUE ripper_dispatch0(struct parser_params*,ID);
1655static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1656static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1657static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1658static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1659static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1660static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1661void ripper_error(struct parser_params *p);
1662
1663#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1664#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1665#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1666#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1667#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1668#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1669#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1670
1671#define yyparse ripper_yyparse
1672
1673static VALUE
1674aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1675{
1676 if (!NIL_P(pre_arg)) {
1677 if (!NIL_P(pre_args)) {
1678 rb_ary_unshift(pre_args, pre_arg);
1679 }
1680 else {
1681 pre_args = rb_ary_new_from_args(1, pre_arg);
1682 }
1683 }
1684 return pre_args;
1685}
1686
1687#define ID2VAL(id) STATIC_ID2SYM(id)
1688#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1689#endif /* RIPPER */
1690
1691#define KWD2EID(t, v) keyword_##t
1692
1693static NODE *
1694new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1695{
1696 body = remove_begin(body);
1697 reduce_nodes(p, &body);
1698 NODE *n = NEW_SCOPE(args, body, parent, loc);
1699 nd_set_line(n, loc->end_pos.lineno);
1700 set_line_body(body, loc->beg_pos.lineno);
1701 return n;
1702}
1703
1704static NODE *
1705rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1706 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1707{
1708 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1709 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1710 loc.beg_pos = arg_loc->beg_pos;
1711 return NEW_RESCUE(arg, rescue, 0, &loc);
1712}
1713
1714static NODE *add_block_exit(struct parser_params *p, NODE *node);
1715static rb_node_exits_t *init_block_exit(struct parser_params *p);
1716static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1717static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1718static void clear_block_exit(struct parser_params *p, bool error);
1719
1720static void
1721next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1722{
1723 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1724}
1725
1726static void
1727restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1728{
1729 /* See: def_name action */
1730 struct lex_context ctxt = temp->save.ctxt;
1731 p->ctxt.in_def = ctxt.in_def;
1732 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1733 p->ctxt.in_rescue = ctxt.in_rescue;
1734 p->max_numparam = temp->save.max_numparam;
1735 numparam_pop(p, temp->save.numparam_save);
1736 clear_block_exit(p, true);
1737}
1738
1739static void
1740endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1741{
1742 if (is_attrset_id(mid)) {
1743 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1744 }
1745 token_info_drop(p, "def", loc->beg_pos);
1746}
1747
1748#define debug_token_line(p, name, line) do { \
1749 if (p->debug) { \
1750 const char *const pcur = p->lex.pcur; \
1751 const char *const ptok = p->lex.ptok; \
1752 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1753 line, p->ruby_sourceline, \
1754 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1755 } \
1756 } while (0)
1757
1758#define begin_definition(k, loc_beg, loc_end) \
1759 do { \
1760 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1761 /* singleton class */ \
1762 p->ctxt.cant_return = !p->ctxt.in_def; \
1763 p->ctxt.in_def = 0; \
1764 } \
1765 else if (p->ctxt.in_def) { \
1766 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1767 yyerror1(&loc, k " definition in method body"); \
1768 } \
1769 else { \
1770 p->ctxt.cant_return = 1; \
1771 } \
1772 local_push(p, 0); \
1773 } while (0)
1774
1775#ifndef RIPPER
1776# define ifndef_ripper(x) (x)
1777# define ifdef_ripper(r,x) (x)
1778#else
1779# define ifndef_ripper(x)
1780# define ifdef_ripper(r,x) (r)
1781#endif
1782
1783# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1784# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1785# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1786# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1787# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1788# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1789# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1790# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1791# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1792# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1793# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1794# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1795# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1796# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1797# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1798# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1799# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1800# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1801# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1802# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1803#ifdef RIPPER
1804extern const ID id_warn, id_warning, id_gets, id_assoc;
1805# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1806# define WARN_S_L(s,l) STR_NEW(s,l)
1807# define WARN_S(s) STR_NEW2(s)
1808# define WARN_I(i) INT2NUM(i)
1809# define WARN_ID(i) rb_id2str(i)
1810# define PRIsWARN PRIsVALUE
1811# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1812# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1813# ifdef HAVE_VA_ARGS_MACRO
1814# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1815# else
1816# define WARN_CALL rb_funcall
1817# endif
1818# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1819# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1820# ifdef HAVE_VA_ARGS_MACRO
1821# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1822# else
1823# define WARNING_CALL rb_funcall
1824# endif
1825# define compile_error ripper_compile_error
1826#else
1827# define WARN_S_L(s,l) s
1828# define WARN_S(s) s
1829# define WARN_I(i) i
1830# define WARN_ID(i) rb_id2name(i)
1831# define PRIsWARN PRIsVALUE
1832# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1833# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1834# define WARN_CALL rb_compile_warn
1835# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1836# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1837# define WARNING_CALL rb_compile_warning
1838PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1839# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1840#endif
1841
1842#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1843
1844static NODE *
1845add_block_exit(struct parser_params *p, NODE *node)
1846{
1847 if (!node) {
1848 compile_error(p, "unexpected null node");
1849 return 0;
1850 }
1851 switch (nd_type(node)) {
1852 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1853 default:
1854 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1855 return node;
1856 }
1857 if (!p->ctxt.in_defined) {
1858 rb_node_exits_t *exits = p->exits;
1859 if (exits) {
1860 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1861 exits->nd_stts = node;
1862 }
1863 }
1864 return node;
1865}
1866
1867static rb_node_exits_t *
1868init_block_exit(struct parser_params *p)
1869{
1870 rb_node_exits_t *old = p->exits;
1871 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1872 exits->nd_chain = 0;
1873 exits->nd_stts = RNODE(exits);
1874 p->exits = exits;
1875 return old;
1876}
1877
1878static rb_node_exits_t *
1879allow_block_exit(struct parser_params *p)
1880{
1881 rb_node_exits_t *exits = p->exits;
1882 p->exits = 0;
1883 return exits;
1884}
1885
1886static void
1887restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1888{
1889 p->exits = exits;
1890}
1891
1892static void
1893clear_block_exit(struct parser_params *p, bool error)
1894{
1895 rb_node_exits_t *exits = p->exits;
1896 if (!exits) return;
1897 if (error) {
1898 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1899 switch (nd_type(e)) {
1900 case NODE_BREAK:
1901 yyerror1(&e->nd_loc, "Invalid break");
1902 break;
1903 case NODE_NEXT:
1904 yyerror1(&e->nd_loc, "Invalid next");
1905 break;
1906 case NODE_REDO:
1907 yyerror1(&e->nd_loc, "Invalid redo");
1908 break;
1909 default:
1910 yyerror1(&e->nd_loc, "unexpected node");
1911 goto end_checks; /* no nd_chain */
1912 }
1913 }
1914 end_checks:;
1915 }
1916 exits->nd_stts = RNODE(exits);
1917 exits->nd_chain = 0;
1918}
1919
1920#define WARN_EOL(tok) \
1921 (looking_at_eol_p(p) ? \
1922 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1923 (void)0)
1924static int looking_at_eol_p(struct parser_params *p);
1925
1926static NODE *
1927get_nd_value(struct parser_params *p, NODE *node)
1928{
1929 switch (nd_type(node)) {
1930 case NODE_GASGN:
1931 return RNODE_GASGN(node)->nd_value;
1932 case NODE_IASGN:
1933 return RNODE_IASGN(node)->nd_value;
1934 case NODE_LASGN:
1935 return RNODE_LASGN(node)->nd_value;
1936 case NODE_DASGN:
1937 return RNODE_DASGN(node)->nd_value;
1938 case NODE_MASGN:
1939 return RNODE_MASGN(node)->nd_value;
1940 case NODE_CVASGN:
1941 return RNODE_CVASGN(node)->nd_value;
1942 case NODE_CDECL:
1943 return RNODE_CDECL(node)->nd_value;
1944 default:
1945 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1946 return 0;
1947 }
1948}
1949
1950static void
1951set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1952{
1953 switch (nd_type(node)) {
1954 case NODE_CDECL:
1955 RNODE_CDECL(node)->nd_value = rhs;
1956 break;
1957 case NODE_GASGN:
1958 RNODE_GASGN(node)->nd_value = rhs;
1959 break;
1960 case NODE_IASGN:
1961 RNODE_IASGN(node)->nd_value = rhs;
1962 break;
1963 case NODE_LASGN:
1964 RNODE_LASGN(node)->nd_value = rhs;
1965 break;
1966 case NODE_DASGN:
1967 RNODE_DASGN(node)->nd_value = rhs;
1968 break;
1969 case NODE_MASGN:
1970 RNODE_MASGN(node)->nd_value = rhs;
1971 break;
1972 case NODE_CVASGN:
1973 RNODE_CVASGN(node)->nd_value = rhs;
1974 break;
1975 default:
1976 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1977 break;
1978 }
1979}
1980
1981static ID
1982get_nd_vid(struct parser_params *p, NODE *node)
1983{
1984 switch (nd_type(node)) {
1985 case NODE_CDECL:
1986 return RNODE_CDECL(node)->nd_vid;
1987 case NODE_GASGN:
1988 return RNODE_GASGN(node)->nd_vid;
1989 case NODE_IASGN:
1990 return RNODE_IASGN(node)->nd_vid;
1991 case NODE_LASGN:
1992 return RNODE_LASGN(node)->nd_vid;
1993 case NODE_DASGN:
1994 return RNODE_DASGN(node)->nd_vid;
1995 case NODE_CVASGN:
1996 return RNODE_CVASGN(node)->nd_vid;
1997 default:
1998 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1999 return 0;
2000 }
2001}
2002
2003static NODE *
2004get_nd_args(struct parser_params *p, NODE *node)
2005{
2006 switch (nd_type(node)) {
2007 case NODE_CALL:
2008 return RNODE_CALL(node)->nd_args;
2009 case NODE_OPCALL:
2010 return RNODE_OPCALL(node)->nd_args;
2011 case NODE_FCALL:
2012 return RNODE_FCALL(node)->nd_args;
2013 case NODE_QCALL:
2014 return RNODE_QCALL(node)->nd_args;
2015 case NODE_SUPER:
2016 return RNODE_SUPER(node)->nd_args;
2017 case NODE_VCALL:
2018 case NODE_ZSUPER:
2019 case NODE_YIELD:
2020 case NODE_RETURN:
2021 case NODE_BREAK:
2022 case NODE_NEXT:
2023 return 0;
2024 default:
2025 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2026 return 0;
2027 }
2028}
2029
2030static st_index_t
2031djb2(const uint8_t *str, size_t len)
2032{
2033 st_index_t hash = 5381;
2034
2035 for (size_t i = 0; i < len; i++) {
2036 hash = ((hash << 5) + hash) + str[i];
2037 }
2038
2039 return hash;
2040}
2041
2042static st_index_t
2043parser_memhash(const void *ptr, long len)
2044{
2045 return djb2(ptr, len);
2046}
2047
2048#define PARSER_STRING_PTR(str) (str->ptr)
2049#define PARSER_STRING_LEN(str) (str->len)
2050#define PARSER_STRING_END(str) (&str->ptr[str->len])
2051#define STRING_SIZE(str) ((size_t)str->len + 1)
2052#define STRING_TERM_LEN(str) (1)
2053#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2054#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2055 SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2056 str->len = total; \
2057} while (0)
2058#define STRING_SET_LEN(str, n) do { \
2059 (str)->len = (n); \
2060} while (0)
2061#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2062 ((ptrvar) = str->ptr, \
2063 (lenvar) = str->len)
2064
2065static inline int
2066parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2067{
2068 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2069}
2070
2071static rb_parser_string_t *
2072rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2073{
2074 rb_parser_string_t *str;
2075
2076 if (len < 0) {
2077 rb_bug("negative string size (or size too big): %ld", len);
2078 }
2079
2080 str = xcalloc(1, sizeof(rb_parser_string_t));
2081 str->ptr = xcalloc(len + 1, sizeof(char));
2082
2083 if (ptr) {
2084 memcpy(PARSER_STRING_PTR(str), ptr, len);
2085 }
2086 STRING_SET_LEN(str, len);
2087 STRING_TERM_FILL(str);
2088 return str;
2089}
2090
2091static rb_parser_string_t *
2092rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2093{
2094 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2095 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2096 str->enc = enc;
2097 return str;
2098}
2099
2100#ifndef RIPPER
2101rb_parser_string_t *
2102rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2103{
2104 /* Type check */
2105 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2106 RB_GC_GUARD(str);
2107 return ret;
2108}
2109
2110void
2111rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2112{
2113 if (!str) return;
2114 xfree(PARSER_STRING_PTR(str));
2115 xfree(str);
2116}
2117#endif
2118
2119static st_index_t
2120rb_parser_str_hash(rb_parser_string_t *str)
2121{
2122 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2123}
2124
2125static st_index_t
2126rb_char_p_hash(const char *c)
2127{
2128 return parser_memhash((const void *)c, strlen(c));
2129}
2130
2131static size_t
2132rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2133{
2134 return PARSER_STRING_LEN(str);
2135}
2136
2137#ifndef RIPPER
2138static char *
2139rb_parser_string_end(rb_parser_string_t *str)
2140{
2141 return &str->ptr[str->len];
2142}
2143#endif
2144
2145static void
2146rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2147{
2148 str->enc = enc;
2149}
2150
2151static rb_encoding *
2152rb_parser_str_get_encoding(rb_parser_string_t *str)
2153{
2154 return str->enc;
2155}
2156
2157#ifndef RIPPER
2158static bool
2159PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2160{
2161 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2162}
2163#endif
2164
2165static int
2166PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2167{
2168 return str->coderange;
2169}
2170
2171static void
2172PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2173{
2174 str->coderange = coderange;
2175}
2176
2177static void
2178PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2179{
2180 rb_parser_string_set_encoding(str, enc);
2181 PARSER_ENC_CODERANGE_SET(str, cr);
2182}
2183
2184static void
2185PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2186{
2187 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2188}
2189
2190static bool
2191PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2192{
2193 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2194}
2195
2196static bool
2197PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2198{
2199 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2200}
2201
2202static const char *
2203rb_parser_search_nonascii(const char *p, const char *e)
2204{
2205 const char *s = p;
2206
2207 for (; s < e; s++) {
2208 if (*s & 0x80) return s;
2209 }
2210
2211 return NULL;
2212}
2213
2214static int
2215rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2216{
2217 const char *e = ptr + len;
2218
2219 if (enc == rb_ascii8bit_encoding()) {
2220 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2221 ptr = rb_parser_search_nonascii(ptr, e);
2222 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2223 }
2224
2225 /* parser string encoding is always asciicompat */
2226 ptr = rb_parser_search_nonascii(ptr, e);
2227 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2228 for (;;) {
2229 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2230 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2231 ptr += MBCLEN_CHARFOUND_LEN(ret);
2232 if (ptr == e) break;
2233 ptr = rb_parser_search_nonascii(ptr, e);
2234 if (!ptr) break;
2235 }
2236
2237 return RB_PARSER_ENC_CODERANGE_VALID;
2238}
2239
2240static int
2241rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2242{
2243 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2244}
2245
2246static int
2247rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2248{
2249 int cr = PARSER_ENC_CODERANGE(str);
2250
2251 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2252 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2253 PARSER_ENC_CODERANGE_SET(str, cr);
2254 }
2255
2256 return cr;
2257}
2258
2259static rb_parser_string_t *
2260rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2261{
2262 if (rb_parser_str_get_encoding(str) == enc)
2263 return str;
2264 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2265 PARSER_ENC_CODERANGE_CLEAR(str);
2266 }
2267 rb_parser_string_set_encoding(str, enc);
2268 return str;
2269}
2270
2271static bool
2272rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2273{
2274 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2275}
2276
2277static rb_encoding *
2278rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2279{
2280 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2281 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2282
2283 if (enc1 == NULL || enc2 == NULL)
2284 return 0;
2285
2286 if (enc1 == enc2) {
2287 return enc1;
2288 }
2289
2290 if (PARSER_STRING_LEN(str2) == 0)
2291 return enc1;
2292 if (PARSER_STRING_LEN(str1) == 0)
2293 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2294
2295 int cr1, cr2;
2296
2297 cr1 = rb_parser_enc_str_coderange(p, str1);
2298 cr2 = rb_parser_enc_str_coderange(p, str2);
2299
2300 if (cr1 != cr2) {
2301 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2302 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2303 }
2304
2305 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2306 return enc1;
2307 }
2308
2309 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2310 return enc2;
2311 }
2312
2313 return 0;
2314}
2315
2316static void
2317rb_parser_str_modify(rb_parser_string_t *str)
2318{
2319 PARSER_ENC_CODERANGE_CLEAR(str);
2320}
2321
2322static void
2323rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2324{
2325 long capa;
2326 const int termlen = STRING_TERM_LEN(str);
2327
2328 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2329 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2330 }
2331
2332 int cr = PARSER_ENC_CODERANGE(str);
2333 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2334 /* Leave unknown. */
2335 }
2336 else if (len > PARSER_STRING_LEN(str)) {
2337 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2338 }
2339 else if (len < PARSER_STRING_LEN(str)) {
2340 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2341 /* ASCII-only string is keeping after truncated. Valid
2342 * and broken may be invalid or valid, leave unknown. */
2343 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2344 }
2345 }
2346
2347 STRING_SET_LEN(str, len);
2348 STRING_TERM_FILL(str);
2349}
2350
2351static rb_parser_string_t *
2352rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2353{
2354 rb_parser_str_modify(str);
2355 if (len == 0) return 0;
2356
2357 long total, olen, off = -1;
2358 char *sptr;
2359 const int termlen = STRING_TERM_LEN(str);
2360
2361 PARSER_STRING_GETMEM(str, sptr, olen);
2362 if (ptr >= sptr && ptr <= sptr + olen) {
2363 off = ptr - sptr;
2364 }
2365
2366 if (olen > LONG_MAX - len) {
2367 compile_error(p, "string sizes too big");
2368 return 0;
2369 }
2370 total = olen + len;
2371 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2372 sptr = PARSER_STRING_PTR(str);
2373 if (off != -1) {
2374 ptr = sptr + off;
2375 }
2376 memcpy(sptr + olen, ptr, len);
2377 STRING_SET_LEN(str, total);
2378 STRING_TERM_FILL(str);
2379
2380 return str;
2381}
2382
2383#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2384#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2385
2386static rb_parser_string_t *
2387rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2388 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2389{
2390 int str_cr, res_cr;
2391 rb_encoding *str_enc, *res_enc;
2392
2393 str_enc = rb_parser_str_get_encoding(str);
2394 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2395
2396 if (str_enc == ptr_enc) {
2397 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2398 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2399 }
2400 }
2401 else {
2402 /* parser string encoding is always asciicompat */
2403 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2404 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2405 }
2406 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2407 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2408 str_cr = rb_parser_enc_str_coderange(p, str);
2409 }
2410 }
2411 }
2412 if (ptr_cr_ret)
2413 *ptr_cr_ret = ptr_cr;
2414
2415 if (str_enc != ptr_enc &&
2416 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2417 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2418 goto incompatible;
2419 }
2420
2421 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2422 res_enc = str_enc;
2423 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2424 }
2425 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2426 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2427 res_enc = str_enc;
2428 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2429 }
2430 else {
2431 res_enc = ptr_enc;
2432 res_cr = ptr_cr;
2433 }
2434 }
2435 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2436 res_enc = str_enc;
2437 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2438 res_cr = str_cr;
2439 else
2440 res_cr = ptr_cr;
2441 }
2442 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2443 res_enc = str_enc;
2444 res_cr = str_cr;
2445 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2446 }
2447
2448 if (len < 0) {
2449 compile_error(p, "negative string size (or size too big)");
2450 }
2451 parser_str_cat(str, ptr, len);
2452 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2453 return str;
2454
2455 incompatible:
2456 compile_error(p, "incompatible character encodings: %s and %s",
2457 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2459
2460}
2461
2462static rb_parser_string_t *
2463rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2464 rb_encoding *ptr_enc)
2465{
2466 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2467}
2468
2469static rb_parser_string_t *
2470rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2471{
2472 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2473
2474 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2475 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2476
2477 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2478
2479 return str;
2480}
2481
2482static rb_parser_string_t *
2483rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2484{
2485 if (len < 0) {
2486 rb_bug("negative string size (or size too big)");
2487 }
2488
2489 long slen = PARSER_STRING_LEN(str);
2490
2491 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2492 PARSER_ENC_CODERANGE_CLEAR(str);
2493 }
2494
2495 {
2496 long capa;
2497 const int termlen = STRING_TERM_LEN(str);
2498
2499 if ((capa = slen) < len) {
2500 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2501 }
2502 else if (len == slen) return str;
2503 STRING_SET_LEN(str, len);
2504 STRING_TERM_FILL(str);
2505 }
2506 return str;
2507}
2508
2509# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2510 ((ptrvar) = str->ptr, \
2511 (lenvar) = str->len, \
2512 (encvar) = str->enc)
2513
2514static int
2515rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2516{
2517 long len1, len2;
2518 const char *ptr1, *ptr2;
2519 rb_encoding *enc1, *enc2;
2520
2521 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2522 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2523
2524 return (len1 != len2 ||
2525 enc1 != enc2 ||
2526 memcmp(ptr1, ptr2, len1) != 0);
2527}
2528
2529static void
2530rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2531{
2532 long i;
2533 if (ary->capa < len) {
2534 ary->capa = len;
2535 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2536 for (i = ary->len; i < len; i++) {
2537 ary->data[i] = 0;
2538 }
2539 }
2540}
2541
2542/*
2543 * Do not call this directly.
2544 * Use rb_parser_ary_new_capa_for_XXX() instead.
2545 */
2546static rb_parser_ary_t *
2547parser_ary_new_capa(rb_parser_t *p, long len)
2548{
2549 if (len < 0) {
2550 rb_bug("negative array size (or size too big): %ld", len);
2551 }
2552 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2553 ary->data_type = 0;
2554 ary->len = 0;
2555 ary->capa = len;
2556 if (0 < len) {
2557 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2558 }
2559 else {
2560 ary->data = NULL;
2561 }
2562 return ary;
2563}
2564
2565#ifndef RIPPER
2566static rb_parser_ary_t *
2567rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2568{
2569 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2570 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2571 return ary;
2572}
2573
2574static rb_parser_ary_t *
2575rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2576{
2577 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2578 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2579 return ary;
2580}
2581#endif
2582
2583static rb_parser_ary_t *
2584rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2585{
2586 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2587 ary->data_type = PARSER_ARY_DATA_NODE;
2588 return ary;
2589}
2590
2591/*
2592 * Do not call this directly.
2593 * Use rb_parser_ary_push_XXX() instead.
2594 */
2595static rb_parser_ary_t *
2596parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2597{
2598 if (ary->len == ary->capa) {
2599 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2600 }
2601 ary->data[ary->len++] = val;
2602 return ary;
2603}
2604
2605#ifndef RIPPER
2606static rb_parser_ary_t *
2607rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2608{
2609 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2610 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2611 }
2612 return parser_ary_push(p, ary, val);
2613}
2614
2615static rb_parser_ary_t *
2616rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2617{
2618 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2619 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2620 }
2621 return parser_ary_push(p, ary, val);
2622}
2623#endif
2624
2625static rb_parser_ary_t *
2626rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2627{
2628 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2629 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2630 }
2631 return parser_ary_push(p, ary, val);
2632}
2633
2634#ifndef RIPPER
2635static void
2636rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2637{
2638 if (!token) return;
2639 rb_parser_string_free(p, token->str);
2640 xfree(token);
2641}
2642
2643static void
2644rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2645{
2646# define foreach_ary(ptr) \
2647 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2648 ptr < end_ary_data; ptr++)
2649 switch (ary->data_type) {
2650 case PARSER_ARY_DATA_AST_TOKEN:
2651 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2652 break;
2653 case PARSER_ARY_DATA_SCRIPT_LINE:
2654 foreach_ary(data) {rb_parser_string_free(p, *data);}
2655 break;
2656 case PARSER_ARY_DATA_NODE:
2657 /* Do nothing because nodes are freed when rb_ast_t is freed */
2658 break;
2659 default:
2660 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2661 break;
2662 }
2663# undef foreach_ary
2664 xfree(ary->data);
2665 xfree(ary);
2666}
2667
2668#endif /* !RIPPER */
2669
2670#line 2671 "parse.c"
2671
2672# ifndef YY_CAST
2673# ifdef __cplusplus
2674# define YY_CAST(Type, Val) static_cast<Type> (Val)
2675# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2676# else
2677# define YY_CAST(Type, Val) ((Type) (Val))
2678# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2679# endif
2680# endif
2681# ifndef YY_NULLPTR
2682# if defined __cplusplus
2683# if 201103L <= __cplusplus
2684# define YY_NULLPTR nullptr
2685# else
2686# define YY_NULLPTR 0
2687# endif
2688# else
2689# define YY_NULLPTR ((void*)0)
2690# endif
2691# endif
2692
2693#include "parse.h"
2694/* Symbol kind. */
2695enum yysymbol_kind_t
2696{
2697 YYSYMBOL_YYEMPTY = -2,
2698 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2699 YYSYMBOL_YYerror = 1, /* error */
2700 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2701 YYSYMBOL_keyword_class = 3, /* "'class'" */
2702 YYSYMBOL_keyword_module = 4, /* "'module'" */
2703 YYSYMBOL_keyword_def = 5, /* "'def'" */
2704 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2705 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2706 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2707 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2708 YYSYMBOL_keyword_end = 10, /* "'end'" */
2709 YYSYMBOL_keyword_if = 11, /* "'if'" */
2710 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2711 YYSYMBOL_keyword_then = 13, /* "'then'" */
2712 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2713 YYSYMBOL_keyword_else = 15, /* "'else'" */
2714 YYSYMBOL_keyword_case = 16, /* "'case'" */
2715 YYSYMBOL_keyword_when = 17, /* "'when'" */
2716 YYSYMBOL_keyword_while = 18, /* "'while'" */
2717 YYSYMBOL_keyword_until = 19, /* "'until'" */
2718 YYSYMBOL_keyword_for = 20, /* "'for'" */
2719 YYSYMBOL_keyword_break = 21, /* "'break'" */
2720 YYSYMBOL_keyword_next = 22, /* "'next'" */
2721 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2722 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2723 YYSYMBOL_keyword_in = 25, /* "'in'" */
2724 YYSYMBOL_keyword_do = 26, /* "'do'" */
2725 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2726 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2727 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2728 YYSYMBOL_keyword_return = 30, /* "'return'" */
2729 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2730 YYSYMBOL_keyword_super = 32, /* "'super'" */
2731 YYSYMBOL_keyword_self = 33, /* "'self'" */
2732 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2733 YYSYMBOL_keyword_true = 35, /* "'true'" */
2734 YYSYMBOL_keyword_false = 36, /* "'false'" */
2735 YYSYMBOL_keyword_and = 37, /* "'and'" */
2736 YYSYMBOL_keyword_or = 38, /* "'or'" */
2737 YYSYMBOL_keyword_not = 39, /* "'not'" */
2738 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2739 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2740 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2741 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2742 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2743 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2744 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2745 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2746 YYSYMBOL_keyword_END = 48, /* "'END'" */
2747 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2748 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2749 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2750 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2751 YYSYMBOL_tFID = 53, /* "method" */
2752 YYSYMBOL_tGVAR = 54, /* "global variable" */
2753 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2754 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2755 YYSYMBOL_tCVAR = 57, /* "class variable" */
2756 YYSYMBOL_tLABEL = 58, /* "label" */
2757 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2758 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2759 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2760 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2761 YYSYMBOL_tCHAR = 63, /* "char literal" */
2762 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2763 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2764 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2765 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2766 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2767 YYSYMBOL_69_ = 69, /* '.' */
2768 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2769 YYSYMBOL_tSP = 71, /* "escaped space" */
2770 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2771 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2772 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2773 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2774 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2775 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2776 YYSYMBOL_tPOW = 78, /* "**" */
2777 YYSYMBOL_tCMP = 79, /* "<=>" */
2778 YYSYMBOL_tEQ = 80, /* "==" */
2779 YYSYMBOL_tEQQ = 81, /* "===" */
2780 YYSYMBOL_tNEQ = 82, /* "!=" */
2781 YYSYMBOL_tGEQ = 83, /* ">=" */
2782 YYSYMBOL_tLEQ = 84, /* "<=" */
2783 YYSYMBOL_tANDOP = 85, /* "&&" */
2784 YYSYMBOL_tOROP = 86, /* "||" */
2785 YYSYMBOL_tMATCH = 87, /* "=~" */
2786 YYSYMBOL_tNMATCH = 88, /* "!~" */
2787 YYSYMBOL_tDOT2 = 89, /* ".." */
2788 YYSYMBOL_tDOT3 = 90, /* "..." */
2789 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2790 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2791 YYSYMBOL_tAREF = 93, /* "[]" */
2792 YYSYMBOL_tASET = 94, /* "[]=" */
2793 YYSYMBOL_tLSHFT = 95, /* "<<" */
2794 YYSYMBOL_tRSHFT = 96, /* ">>" */
2795 YYSYMBOL_tANDDOT = 97, /* "&." */
2796 YYSYMBOL_tCOLON2 = 98, /* "::" */
2797 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2798 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2799 YYSYMBOL_tASSOC = 101, /* "=>" */
2800 YYSYMBOL_tLPAREN = 102, /* "(" */
2801 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2802 YYSYMBOL_tLBRACK = 104, /* "[" */
2803 YYSYMBOL_tLBRACE = 105, /* "{" */
2804 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2805 YYSYMBOL_tSTAR = 107, /* "*" */
2806 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2807 YYSYMBOL_tAMPER = 109, /* "&" */
2808 YYSYMBOL_tLAMBDA = 110, /* "->" */
2809 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2810 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2811 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2812 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2813 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2814 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2815 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2816 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2817 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2818 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2819 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2820 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2821 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2822 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2823 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2824 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2825 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2826 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2827 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2828 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2829 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2830 YYSYMBOL_k__END__ = 132, /* k__END__ */
2831 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2832 YYSYMBOL_134_ = 134, /* '=' */
2833 YYSYMBOL_135_ = 135, /* '?' */
2834 YYSYMBOL_136_ = 136, /* ':' */
2835 YYSYMBOL_137_ = 137, /* '>' */
2836 YYSYMBOL_138_ = 138, /* '<' */
2837 YYSYMBOL_139_ = 139, /* '|' */
2838 YYSYMBOL_140_ = 140, /* '^' */
2839 YYSYMBOL_141_ = 141, /* '&' */
2840 YYSYMBOL_142_ = 142, /* '+' */
2841 YYSYMBOL_143_ = 143, /* '-' */
2842 YYSYMBOL_144_ = 144, /* '*' */
2843 YYSYMBOL_145_ = 145, /* '/' */
2844 YYSYMBOL_146_ = 146, /* '%' */
2845 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2846 YYSYMBOL_148_ = 148, /* '!' */
2847 YYSYMBOL_149_ = 149, /* '~' */
2848 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2849 YYSYMBOL_151_ = 151, /* '{' */
2850 YYSYMBOL_152_ = 152, /* '}' */
2851 YYSYMBOL_153_ = 153, /* '[' */
2852 YYSYMBOL_154_n_ = 154, /* '\n' */
2853 YYSYMBOL_155_ = 155, /* ',' */
2854 YYSYMBOL_156_ = 156, /* '`' */
2855 YYSYMBOL_157_ = 157, /* '(' */
2856 YYSYMBOL_158_ = 158, /* ')' */
2857 YYSYMBOL_159_ = 159, /* ']' */
2858 YYSYMBOL_160_ = 160, /* ';' */
2859 YYSYMBOL_161_ = 161, /* ' ' */
2860 YYSYMBOL_YYACCEPT = 162, /* $accept */
2861 YYSYMBOL_option_terms = 163, /* option_terms */
2862 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2863 YYSYMBOL_165_1 = 165, /* $@1 */
2864 YYSYMBOL_program = 166, /* program */
2865 YYSYMBOL_top_stmts = 167, /* top_stmts */
2866 YYSYMBOL_top_stmt = 168, /* top_stmt */
2867 YYSYMBOL_block_open = 169, /* block_open */
2868 YYSYMBOL_begin_block = 170, /* begin_block */
2869 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2870 YYSYMBOL_172_2 = 172, /* $@2 */
2871 YYSYMBOL_173_3 = 173, /* $@3 */
2872 YYSYMBOL_bodystmt = 174, /* bodystmt */
2873 YYSYMBOL_175_4 = 175, /* $@4 */
2874 YYSYMBOL_stmts = 176, /* stmts */
2875 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2876 YYSYMBOL_178_5 = 178, /* $@5 */
2877 YYSYMBOL_allow_exits = 179, /* allow_exits */
2878 YYSYMBOL_k_END = 180, /* k_END */
2879 YYSYMBOL_181_6 = 181, /* $@6 */
2880 YYSYMBOL_stmt = 182, /* stmt */
2881 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2882 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2883 YYSYMBOL_command_asgn = 185, /* command_asgn */
2884 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2885 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2886 YYSYMBOL_endless_command = 188, /* endless_command */
2887 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2888 YYSYMBOL_command_rhs = 190, /* command_rhs */
2889 YYSYMBOL_expr = 191, /* expr */
2890 YYSYMBOL_192_7 = 192, /* $@7 */
2891 YYSYMBOL_193_8 = 193, /* $@8 */
2892 YYSYMBOL_def_name = 194, /* def_name */
2893 YYSYMBOL_defn_head = 195, /* defn_head */
2894 YYSYMBOL_196_9 = 196, /* $@9 */
2895 YYSYMBOL_defs_head = 197, /* defs_head */
2896 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2897 YYSYMBOL_expr_value = 199, /* expr_value */
2898 YYSYMBOL_200_10 = 200, /* $@10 */
2899 YYSYMBOL_201_11 = 201, /* $@11 */
2900 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2901 YYSYMBOL_command_call = 203, /* command_call */
2902 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2903 YYSYMBOL_command_call_value = 205, /* command_call_value */
2904 YYSYMBOL_block_command = 206, /* block_command */
2905 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2906 YYSYMBOL_fcall = 208, /* fcall */
2907 YYSYMBOL_command = 209, /* command */
2908 YYSYMBOL_mlhs = 210, /* mlhs */
2909 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2910 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2911 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2912 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2913 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2914 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2915 YYSYMBOL_lhs = 217, /* lhs */
2916 YYSYMBOL_cname = 218, /* cname */
2917 YYSYMBOL_cpath = 219, /* cpath */
2918 YYSYMBOL_fname = 220, /* fname */
2919 YYSYMBOL_fitem = 221, /* fitem */
2920 YYSYMBOL_undef_list = 222, /* undef_list */
2921 YYSYMBOL_223_12 = 223, /* $@12 */
2922 YYSYMBOL_op = 224, /* op */
2923 YYSYMBOL_reswords = 225, /* reswords */
2924 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2925 YYSYMBOL_arg = 227, /* arg */
2926 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2927 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2928 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2929 YYSYMBOL_ternary = 231, /* ternary */
2930 YYSYMBOL_endless_arg = 232, /* endless_arg */
2931 YYSYMBOL_relop = 233, /* relop */
2932 YYSYMBOL_rel_expr = 234, /* rel_expr */
2933 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2934 YYSYMBOL_begin_defined = 236, /* begin_defined */
2935 YYSYMBOL_after_rescue = 237, /* after_rescue */
2936 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2937 YYSYMBOL_arg_value = 239, /* arg_value */
2938 YYSYMBOL_aref_args = 240, /* aref_args */
2939 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2940 YYSYMBOL_paren_args = 242, /* paren_args */
2941 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2942 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2943 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2944 YYSYMBOL_call_args = 246, /* call_args */
2945 YYSYMBOL_247_13 = 247, /* $@13 */
2946 YYSYMBOL_command_args = 248, /* command_args */
2947 YYSYMBOL_block_arg = 249, /* block_arg */
2948 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2949 YYSYMBOL_args = 251, /* args */
2950 YYSYMBOL_arg_splat = 252, /* arg_splat */
2951 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2952 YYSYMBOL_mrhs = 254, /* mrhs */
2953 YYSYMBOL_primary = 255, /* primary */
2954 YYSYMBOL_256_14 = 256, /* $@14 */
2955 YYSYMBOL_257_15 = 257, /* $@15 */
2956 YYSYMBOL_258_16 = 258, /* @16 */
2957 YYSYMBOL_259_17 = 259, /* @17 */
2958 YYSYMBOL_260_18 = 260, /* $@18 */
2959 YYSYMBOL_261_19 = 261, /* $@19 */
2960 YYSYMBOL_262_20 = 262, /* $@20 */
2961 YYSYMBOL_263_21 = 263, /* $@21 */
2962 YYSYMBOL_264_22 = 264, /* $@22 */
2963 YYSYMBOL_265_23 = 265, /* $@23 */
2964 YYSYMBOL_266_24 = 266, /* $@24 */
2965 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2966 YYSYMBOL_primary_value = 268, /* primary_value */
2967 YYSYMBOL_k_begin = 269, /* k_begin */
2968 YYSYMBOL_k_if = 270, /* k_if */
2969 YYSYMBOL_k_unless = 271, /* k_unless */
2970 YYSYMBOL_k_while = 272, /* k_while */
2971 YYSYMBOL_k_until = 273, /* k_until */
2972 YYSYMBOL_k_case = 274, /* k_case */
2973 YYSYMBOL_k_for = 275, /* k_for */
2974 YYSYMBOL_k_class = 276, /* k_class */
2975 YYSYMBOL_k_module = 277, /* k_module */
2976 YYSYMBOL_k_def = 278, /* k_def */
2977 YYSYMBOL_k_do = 279, /* k_do */
2978 YYSYMBOL_k_do_block = 280, /* k_do_block */
2979 YYSYMBOL_k_rescue = 281, /* k_rescue */
2980 YYSYMBOL_k_ensure = 282, /* k_ensure */
2981 YYSYMBOL_k_when = 283, /* k_when */
2982 YYSYMBOL_k_else = 284, /* k_else */
2983 YYSYMBOL_k_elsif = 285, /* k_elsif */
2984 YYSYMBOL_k_end = 286, /* k_end */
2985 YYSYMBOL_k_return = 287, /* k_return */
2986 YYSYMBOL_k_yield = 288, /* k_yield */
2987 YYSYMBOL_then = 289, /* then */
2988 YYSYMBOL_do = 290, /* do */
2989 YYSYMBOL_if_tail = 291, /* if_tail */
2990 YYSYMBOL_opt_else = 292, /* opt_else */
2991 YYSYMBOL_for_var = 293, /* for_var */
2992 YYSYMBOL_f_marg = 294, /* f_marg */
2993 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
2994 YYSYMBOL_f_margs = 296, /* f_margs */
2995 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2996 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2997 YYSYMBOL_299_25 = 299, /* $@25 */
2998 YYSYMBOL_f_eq = 300, /* f_eq */
2999 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3000 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3001 YYSYMBOL_args_tail_basic_primary_value = 303, /* args_tail_basic_primary_value */
3002 YYSYMBOL_block_args_tail = 304, /* block_args_tail */
3003 YYSYMBOL_excessed_comma = 305, /* excessed_comma */
3004 YYSYMBOL_f_opt_primary_value = 306, /* f_opt_primary_value */
3005 YYSYMBOL_f_opt_arg_primary_value = 307, /* f_opt_arg_primary_value */
3006 YYSYMBOL_opt_args_tail_block_args_tail = 308, /* opt_args_tail_block_args_tail */
3007 YYSYMBOL_block_param = 309, /* block_param */
3008 YYSYMBOL_opt_block_param_def = 310, /* opt_block_param_def */
3009 YYSYMBOL_block_param_def = 311, /* block_param_def */
3010 YYSYMBOL_opt_block_param = 312, /* opt_block_param */
3011 YYSYMBOL_opt_bv_decl = 313, /* opt_bv_decl */
3012 YYSYMBOL_bv_decls = 314, /* bv_decls */
3013 YYSYMBOL_bvar = 315, /* bvar */
3014 YYSYMBOL_max_numparam = 316, /* max_numparam */
3015 YYSYMBOL_numparam = 317, /* numparam */
3016 YYSYMBOL_it_id = 318, /* it_id */
3017 YYSYMBOL_319_26 = 319, /* @26 */
3018 YYSYMBOL_320_27 = 320, /* $@27 */
3019 YYSYMBOL_lambda = 321, /* lambda */
3020 YYSYMBOL_f_larglist = 322, /* f_larglist */
3021 YYSYMBOL_lambda_body = 323, /* lambda_body */
3022 YYSYMBOL_324_28 = 324, /* $@28 */
3023 YYSYMBOL_do_block = 325, /* do_block */
3024 YYSYMBOL_block_call = 326, /* block_call */
3025 YYSYMBOL_method_call = 327, /* method_call */
3026 YYSYMBOL_brace_block = 328, /* brace_block */
3027 YYSYMBOL_329_29 = 329, /* @29 */
3028 YYSYMBOL_brace_body = 330, /* brace_body */
3029 YYSYMBOL_331_30 = 331, /* @30 */
3030 YYSYMBOL_do_body = 332, /* do_body */
3031 YYSYMBOL_case_args = 333, /* case_args */
3032 YYSYMBOL_case_body = 334, /* case_body */
3033 YYSYMBOL_cases = 335, /* cases */
3034 YYSYMBOL_p_pvtbl = 336, /* p_pvtbl */
3035 YYSYMBOL_p_pktbl = 337, /* p_pktbl */
3036 YYSYMBOL_p_in_kwarg = 338, /* p_in_kwarg */
3037 YYSYMBOL_339_31 = 339, /* $@31 */
3038 YYSYMBOL_p_case_body = 340, /* p_case_body */
3039 YYSYMBOL_p_cases = 341, /* p_cases */
3040 YYSYMBOL_p_top_expr = 342, /* p_top_expr */
3041 YYSYMBOL_p_top_expr_body = 343, /* p_top_expr_body */
3042 YYSYMBOL_p_expr = 344, /* p_expr */
3043 YYSYMBOL_p_as = 345, /* p_as */
3044 YYSYMBOL_346_32 = 346, /* $@32 */
3045 YYSYMBOL_p_alt = 347, /* p_alt */
3046 YYSYMBOL_p_lparen = 348, /* p_lparen */
3047 YYSYMBOL_p_lbracket = 349, /* p_lbracket */
3048 YYSYMBOL_p_expr_basic = 350, /* p_expr_basic */
3049 YYSYMBOL_351_33 = 351, /* $@33 */
3050 YYSYMBOL_p_args = 352, /* p_args */
3051 YYSYMBOL_p_args_head = 353, /* p_args_head */
3052 YYSYMBOL_p_args_tail = 354, /* p_args_tail */
3053 YYSYMBOL_p_find = 355, /* p_find */
3054 YYSYMBOL_p_rest = 356, /* p_rest */
3055 YYSYMBOL_p_args_post = 357, /* p_args_post */
3056 YYSYMBOL_p_arg = 358, /* p_arg */
3057 YYSYMBOL_p_kwargs = 359, /* p_kwargs */
3058 YYSYMBOL_p_kwarg = 360, /* p_kwarg */
3059 YYSYMBOL_p_kw = 361, /* p_kw */
3060 YYSYMBOL_p_kw_label = 362, /* p_kw_label */
3061 YYSYMBOL_p_kwrest = 363, /* p_kwrest */
3062 YYSYMBOL_p_kwnorest = 364, /* p_kwnorest */
3063 YYSYMBOL_p_any_kwrest = 365, /* p_any_kwrest */
3064 YYSYMBOL_p_value = 366, /* p_value */
3065 YYSYMBOL_range_expr_p_primitive = 367, /* range_expr_p_primitive */
3066 YYSYMBOL_p_primitive = 368, /* p_primitive */
3067 YYSYMBOL_p_variable = 369, /* p_variable */
3068 YYSYMBOL_p_var_ref = 370, /* p_var_ref */
3069 YYSYMBOL_p_expr_ref = 371, /* p_expr_ref */
3070 YYSYMBOL_p_const = 372, /* p_const */
3071 YYSYMBOL_opt_rescue = 373, /* opt_rescue */
3072 YYSYMBOL_exc_list = 374, /* exc_list */
3073 YYSYMBOL_exc_var = 375, /* exc_var */
3074 YYSYMBOL_opt_ensure = 376, /* opt_ensure */
3075 YYSYMBOL_literal = 377, /* literal */
3076 YYSYMBOL_strings = 378, /* strings */
3077 YYSYMBOL_string = 379, /* string */
3078 YYSYMBOL_string1 = 380, /* string1 */
3079 YYSYMBOL_xstring = 381, /* xstring */
3080 YYSYMBOL_regexp = 382, /* regexp */
3081 YYSYMBOL_nonempty_list__ = 383, /* nonempty_list_' ' */
3082 YYSYMBOL_words_tWORDS_BEG_word_list = 384, /* words_tWORDS_BEG_word_list */
3083 YYSYMBOL_words = 385, /* words */
3084 YYSYMBOL_word_list = 386, /* word_list */
3085 YYSYMBOL_word = 387, /* word */
3086 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 388, /* words_tSYMBOLS_BEG_symbol_list */
3087 YYSYMBOL_symbols = 389, /* symbols */
3088 YYSYMBOL_symbol_list = 390, /* symbol_list */
3089 YYSYMBOL_words_tQWORDS_BEG_qword_list = 391, /* words_tQWORDS_BEG_qword_list */
3090 YYSYMBOL_qwords = 392, /* qwords */
3091 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 393, /* words_tQSYMBOLS_BEG_qsym_list */
3092 YYSYMBOL_qsymbols = 394, /* qsymbols */
3093 YYSYMBOL_qword_list = 395, /* qword_list */
3094 YYSYMBOL_qsym_list = 396, /* qsym_list */
3095 YYSYMBOL_string_contents = 397, /* string_contents */
3096 YYSYMBOL_xstring_contents = 398, /* xstring_contents */
3097 YYSYMBOL_regexp_contents = 399, /* regexp_contents */
3098 YYSYMBOL_string_content = 400, /* string_content */
3099 YYSYMBOL_401_34 = 401, /* @34 */
3100 YYSYMBOL_402_35 = 402, /* @35 */
3101 YYSYMBOL_403_36 = 403, /* @36 */
3102 YYSYMBOL_404_37 = 404, /* @37 */
3103 YYSYMBOL_string_dend = 405, /* string_dend */
3104 YYSYMBOL_string_dvar = 406, /* string_dvar */
3105 YYSYMBOL_symbol = 407, /* symbol */
3106 YYSYMBOL_ssym = 408, /* ssym */
3107 YYSYMBOL_sym = 409, /* sym */
3108 YYSYMBOL_dsym = 410, /* dsym */
3109 YYSYMBOL_numeric = 411, /* numeric */
3110 YYSYMBOL_simple_numeric = 412, /* simple_numeric */
3111 YYSYMBOL_nonlocal_var = 413, /* nonlocal_var */
3112 YYSYMBOL_user_variable = 414, /* user_variable */
3113 YYSYMBOL_keyword_variable = 415, /* keyword_variable */
3114 YYSYMBOL_var_ref = 416, /* var_ref */
3115 YYSYMBOL_var_lhs = 417, /* var_lhs */
3116 YYSYMBOL_backref = 418, /* backref */
3117 YYSYMBOL_419_38 = 419, /* $@38 */
3118 YYSYMBOL_superclass = 420, /* superclass */
3119 YYSYMBOL_f_opt_paren_args = 421, /* f_opt_paren_args */
3120 YYSYMBOL_f_paren_args = 422, /* f_paren_args */
3121 YYSYMBOL_f_arglist = 423, /* f_arglist */
3122 YYSYMBOL_424_39 = 424, /* @39 */
3123 YYSYMBOL_f_kw_arg_value = 425, /* f_kw_arg_value */
3124 YYSYMBOL_f_kwarg_arg_value = 426, /* f_kwarg_arg_value */
3125 YYSYMBOL_args_tail_basic_arg_value = 427, /* args_tail_basic_arg_value */
3126 YYSYMBOL_args_tail = 428, /* args_tail */
3127 YYSYMBOL_f_opt_arg_value = 429, /* f_opt_arg_value */
3128 YYSYMBOL_f_opt_arg_arg_value = 430, /* f_opt_arg_arg_value */
3129 YYSYMBOL_opt_args_tail_args_tail = 431, /* opt_args_tail_args_tail */
3130 YYSYMBOL_f_args = 432, /* f_args */
3131 YYSYMBOL_args_forward = 433, /* args_forward */
3132 YYSYMBOL_f_bad_arg = 434, /* f_bad_arg */
3133 YYSYMBOL_f_norm_arg = 435, /* f_norm_arg */
3134 YYSYMBOL_f_arg_asgn = 436, /* f_arg_asgn */
3135 YYSYMBOL_f_arg_item = 437, /* f_arg_item */
3136 YYSYMBOL_f_arg = 438, /* f_arg */
3137 YYSYMBOL_f_label = 439, /* f_label */
3138 YYSYMBOL_kwrest_mark = 440, /* kwrest_mark */
3139 YYSYMBOL_f_no_kwarg = 441, /* f_no_kwarg */
3140 YYSYMBOL_f_kwrest = 442, /* f_kwrest */
3141 YYSYMBOL_restarg_mark = 443, /* restarg_mark */
3142 YYSYMBOL_f_rest_arg = 444, /* f_rest_arg */
3143 YYSYMBOL_blkarg_mark = 445, /* blkarg_mark */
3144 YYSYMBOL_f_block_arg = 446, /* f_block_arg */
3145 YYSYMBOL_opt_f_block_arg = 447, /* opt_f_block_arg */
3146 YYSYMBOL_value_expr_singleton_expr = 448, /* value_expr_singleton_expr */
3147 YYSYMBOL_singleton = 449, /* singleton */
3148 YYSYMBOL_singleton_expr = 450, /* singleton_expr */
3149 YYSYMBOL_451_40 = 451, /* $@40 */
3150 YYSYMBOL_assoc_list = 452, /* assoc_list */
3151 YYSYMBOL_assocs = 453, /* assocs */
3152 YYSYMBOL_assoc = 454, /* assoc */
3153 YYSYMBOL_operation2 = 455, /* operation2 */
3154 YYSYMBOL_operation3 = 456, /* operation3 */
3155 YYSYMBOL_dot_or_colon = 457, /* dot_or_colon */
3156 YYSYMBOL_call_op = 458, /* call_op */
3157 YYSYMBOL_call_op2 = 459, /* call_op2 */
3158 YYSYMBOL_rparen = 460, /* rparen */
3159 YYSYMBOL_rbracket = 461, /* rbracket */
3160 YYSYMBOL_rbrace = 462, /* rbrace */
3161 YYSYMBOL_trailer = 463, /* trailer */
3162 YYSYMBOL_term = 464, /* term */
3163 YYSYMBOL_terms = 465, /* terms */
3164 YYSYMBOL_none = 466 /* none */
3165};
3166typedef enum yysymbol_kind_t yysymbol_kind_t;
3167
3168
3169
3170
3171#ifdef short
3172# undef short
3173#endif
3174
3175/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3176 <limits.h> and (if available) <stdint.h> are included
3177 so that the code can choose integer types of a good width. */
3178
3179#ifndef __PTRDIFF_MAX__
3180# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3181# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3182# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3183# define YY_STDINT_H
3184# endif
3185#endif
3186
3187/* Narrow types that promote to a signed type and that can represent a
3188 signed or unsigned integer of at least N bits. In tables they can
3189 save space and decrease cache pressure. Promoting to a signed type
3190 helps avoid bugs in integer arithmetic. */
3191
3192#ifdef __INT_LEAST8_MAX__
3193typedef __INT_LEAST8_TYPE__ yytype_int8;
3194#elif defined YY_STDINT_H
3195typedef int_least8_t yytype_int8;
3196#else
3197typedef signed char yytype_int8;
3198#endif
3199
3200#ifdef __INT_LEAST16_MAX__
3201typedef __INT_LEAST16_TYPE__ yytype_int16;
3202#elif defined YY_STDINT_H
3203typedef int_least16_t yytype_int16;
3204#else
3205typedef short yytype_int16;
3206#endif
3207
3208/* Work around bug in HP-UX 11.23, which defines these macros
3209 incorrectly for preprocessor constants. This workaround can likely
3210 be removed in 2023, as HPE has promised support for HP-UX 11.23
3211 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3212 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3213#ifdef __hpux
3214# undef UINT_LEAST8_MAX
3215# undef UINT_LEAST16_MAX
3216# define UINT_LEAST8_MAX 255
3217# define UINT_LEAST16_MAX 65535
3218#endif
3219
3220#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3221typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3222#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3223 && UINT_LEAST8_MAX <= INT_MAX)
3224typedef uint_least8_t yytype_uint8;
3225#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3226typedef unsigned char yytype_uint8;
3227#else
3228typedef short yytype_uint8;
3229#endif
3230
3231#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3232typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3233#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3234 && UINT_LEAST16_MAX <= INT_MAX)
3235typedef uint_least16_t yytype_uint16;
3236#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3237typedef unsigned short yytype_uint16;
3238#else
3239typedef int yytype_uint16;
3240#endif
3241
3242#ifndef YYPTRDIFF_T
3243# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3244# define YYPTRDIFF_T __PTRDIFF_TYPE__
3245# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3246# elif defined PTRDIFF_MAX
3247# ifndef ptrdiff_t
3248# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3249# endif
3250# define YYPTRDIFF_T ptrdiff_t
3251# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3252# else
3253# define YYPTRDIFF_T long
3254# define YYPTRDIFF_MAXIMUM LONG_MAX
3255# endif
3256#endif
3257
3258#ifndef YYSIZE_T
3259# ifdef __SIZE_TYPE__
3260# define YYSIZE_T __SIZE_TYPE__
3261# elif defined size_t
3262# define YYSIZE_T size_t
3263# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3264# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3265# define YYSIZE_T size_t
3266# else
3267# define YYSIZE_T unsigned
3268# endif
3269#endif
3270
3271#define YYSIZE_MAXIMUM \
3272 YY_CAST (YYPTRDIFF_T, \
3273 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3274 ? YYPTRDIFF_MAXIMUM \
3275 : YY_CAST (YYSIZE_T, -1)))
3276
3277#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3278
3279
3280/* Stored state numbers (used for stacks). */
3281typedef yytype_int16 yy_state_t;
3282
3283/* State numbers in computations. */
3284typedef int yy_state_fast_t;
3285
3286#ifndef YY_
3287# if defined YYENABLE_NLS && YYENABLE_NLS
3288# if ENABLE_NLS
3289# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3290# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3291# endif
3292# endif
3293# ifndef YY_
3294# define YY_(Msgid) Msgid
3295# endif
3296#endif
3297
3298
3299#ifndef YY_ATTRIBUTE_PURE
3300# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3301# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3302# else
3303# define YY_ATTRIBUTE_PURE
3304# endif
3305#endif
3306
3307#ifndef YY_ATTRIBUTE_UNUSED
3308# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3309# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3310# else
3311# define YY_ATTRIBUTE_UNUSED
3312# endif
3313#endif
3314
3315/* Suppress unused-variable warnings by "using" E. */
3316#if ! defined lint || defined __GNUC__
3317# define YY_USE(E) ((void) (E))
3318#else
3319# define YY_USE(E) /* empty */
3320#endif
3321
3322/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3323#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3324# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3325# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3326 _Pragma ("GCC diagnostic push") \
3327 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3328# else
3329# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3330 _Pragma ("GCC diagnostic push") \
3331 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3332 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3333# endif
3334# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3335 _Pragma ("GCC diagnostic pop")
3336#else
3337# define YY_INITIAL_VALUE(Value) Value
3338#endif
3339#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3340# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3341# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3342#endif
3343#ifndef YY_INITIAL_VALUE
3344# define YY_INITIAL_VALUE(Value) /* Nothing. */
3345#endif
3346
3347#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3348# define YY_IGNORE_USELESS_CAST_BEGIN \
3349 _Pragma ("GCC diagnostic push") \
3350 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3351# define YY_IGNORE_USELESS_CAST_END \
3352 _Pragma ("GCC diagnostic pop")
3353#endif
3354#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3355# define YY_IGNORE_USELESS_CAST_BEGIN
3356# define YY_IGNORE_USELESS_CAST_END
3357#endif
3358
3359
3360#define YY_ASSERT(E) ((void) (0 && (E)))
3361
3362#if 1
3363
3364/* The parser invokes alloca or malloc; define the necessary symbols. */
3365
3366# ifdef YYSTACK_USE_ALLOCA
3367# if YYSTACK_USE_ALLOCA
3368# ifdef __GNUC__
3369# define YYSTACK_ALLOC __builtin_alloca
3370# elif defined __BUILTIN_VA_ARG_INCR
3371# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3372# elif defined _AIX
3373# define YYSTACK_ALLOC __alloca
3374# elif defined _MSC_VER
3375# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3376# define alloca _alloca
3377# else
3378# define YYSTACK_ALLOC alloca
3379# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3380# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3381 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3382# ifndef EXIT_SUCCESS
3383# define EXIT_SUCCESS 0
3384# endif
3385# endif
3386# endif
3387# endif
3388# endif
3389
3390# ifdef YYSTACK_ALLOC
3391 /* Pacify GCC's 'empty if-body' warning. */
3392# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3393# ifndef YYSTACK_ALLOC_MAXIMUM
3394 /* The OS might guarantee only one guard page at the bottom of the stack,
3395 and a page size can be as small as 4096 bytes. So we cannot safely
3396 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3397 to allow for a few compiler-allocated temporary stack slots. */
3398# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3399# endif
3400# else
3401# define YYSTACK_ALLOC YYMALLOC
3402# define YYSTACK_FREE YYFREE
3403# ifndef YYSTACK_ALLOC_MAXIMUM
3404# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3405# endif
3406# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3407 && ! ((defined YYMALLOC || defined malloc) \
3408 && (defined YYFREE || defined free)))
3409# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3410# ifndef EXIT_SUCCESS
3411# define EXIT_SUCCESS 0
3412# endif
3413# endif
3414# ifndef YYMALLOC
3415# define YYMALLOC malloc
3416# if ! defined malloc && ! defined EXIT_SUCCESS
3417void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3418# endif
3419# endif
3420# ifndef YYFREE
3421# define YYFREE free
3422# if ! defined free && ! defined EXIT_SUCCESS
3423void free (void *); /* INFRINGES ON USER NAME SPACE */
3424# endif
3425# endif
3426# endif
3427#endif /* 1 */
3428
3429#if (! defined yyoverflow \
3430 && (! defined __cplusplus \
3431 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3432 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3433
3434/* A type that is properly aligned for any stack member. */
3435union yyalloc
3436{
3437 yy_state_t yyss_alloc;
3438 YYSTYPE yyvs_alloc;
3439 YYLTYPE yyls_alloc;
3440};
3441
3442/* The size of the maximum gap between one aligned stack and the next. */
3443# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3444
3445/* The size of an array large to enough to hold all stacks, each with
3446 N elements. */
3447# define YYSTACK_BYTES(N) \
3448 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3449 + YYSIZEOF (YYLTYPE)) \
3450 + 2 * YYSTACK_GAP_MAXIMUM)
3451
3452# define YYCOPY_NEEDED 1
3453
3454/* Relocate STACK from its old location to the new one. The
3455 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3456 elements in the stack, and YYPTR gives the new location of the
3457 stack. Advance YYPTR to a properly aligned location for the next
3458 stack. */
3459# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3460 do \
3461 { \
3462 YYPTRDIFF_T yynewbytes; \
3463 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3464 Stack = &yyptr->Stack_alloc; \
3465 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3466 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3467 } \
3468 while (0)
3469
3470#endif
3471
3472#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3473/* Copy COUNT objects from SRC to DST. The source and destination do
3474 not overlap. */
3475# ifndef YYCOPY
3476# if defined __GNUC__ && 1 < __GNUC__
3477# define YYCOPY(Dst, Src, Count) \
3478 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3479# else
3480# define YYCOPY(Dst, Src, Count) \
3481 do \
3482 { \
3483 YYPTRDIFF_T yyi; \
3484 for (yyi = 0; yyi < (Count); yyi++) \
3485 (Dst)[yyi] = (Src)[yyi]; \
3486 } \
3487 while (0)
3488# endif
3489# endif
3490#endif /* !YYCOPY_NEEDED */
3491
3492/* YYFINAL -- State number of the termination state. */
3493#define YYFINAL 143
3494/* YYLAST -- Last index in YYTABLE. */
3495#define YYLAST 16092
3496
3497/* YYNTOKENS -- Number of terminals. */
3498#define YYNTOKENS 162
3499/* YYNNTS -- Number of nonterminals. */
3500#define YYNNTS 305
3501/* YYNRULES -- Number of rules. */
3502#define YYNRULES 815
3503/* YYNSTATES -- Number of states. */
3504#define YYNSTATES 1378
3505
3506/* YYMAXUTOK -- Last valid token kind. */
3507#define YYMAXUTOK 361
3508
3509
3510/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3511 as returned by yylex, with out-of-bounds checking. */
3512#define YYTRANSLATE(YYX) \
3513 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3514 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3515 : YYSYMBOL_YYUNDEF)
3516
3517/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3518 as returned by yylex. */
3519static const yytype_uint8 yytranslate[] =
3520{
3521 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3522 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3524 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3525 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3526 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3527 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3530 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3533 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3534 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3535 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3536 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3546 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3547 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3548 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3549 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3550 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3551 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3552 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3553 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3554 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3555 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3556 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3557 147, 150
3558};
3559
3560#if YYDEBUG
3561/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3562static const yytype_int16 yyrline[] =
3563{
3564 0, 3166, 3160, 3166, 3166, 3166, 3166, 3186, 3191, 3196,
3565 3203, 3208, 3215, 3217, 3235, 3231, 3236, 3235, 3247, 3244,
3566 3257, 3262, 3267, 3274, 3276, 3275, 3285, 3287, 3294, 3294,
3567 3299, 3304, 3312, 3321, 3328, 3334, 3340, 3351, 3362, 3371,
3568 3385, 3386, 3391, 3391, 3392, 3403, 3408, 3409, 3416, 3416,
3569 3417, 3417, 3417, 3417, 3417, 3417, 3417, 3417, 3417, 3418,
3570 3418, 3418, 3421, 3422, 3428, 3428, 3428, 3435, 3436, 3443,
3571 3446, 3447, 3452, 3457, 3462, 3468, 3467, 3483, 3482, 3497,
3572 3500, 3511, 3521, 3520, 3534, 3534, 3535, 3541, 3541, 3541,
3573 3548, 3549, 3552, 3552, 3555, 3556, 3563, 3571, 3571, 3571,
3574 3578, 3585, 3594, 3599, 3604, 3609, 3614, 3620, 3626, 3632,
3575 3637, 3644, 3653, 3654, 3661, 3662, 3669, 3674, 3679, 3684,
3576 3684, 3684, 3689, 3694, 3699, 3704, 3709, 3714, 3721, 3722,
3577 3729, 3734, 3742, 3742, 3747, 3752, 3752, 3758, 3763, 3768,
3578 3773, 3781, 3781, 3786, 3791, 3791, 3796, 3801, 3806, 3811,
3579 3819, 3827, 3830, 3835, 3840, 3847, 3847, 3847, 3848, 3853,
3580 3856, 3861, 3864, 3869, 3869, 3877, 3878, 3879, 3880, 3881,
3581 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 3890, 3891,
3582 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900, 3901,
3583 3902, 3903, 3904, 3905, 3906, 3909, 3909, 3909, 3910, 3910,
3584 3911, 3911, 3911, 3912, 3912, 3912, 3912, 3913, 3913, 3913,
3585 3913, 3914, 3914, 3914, 3915, 3915, 3915, 3915, 3916, 3916,
3586 3916, 3916, 3917, 3917, 3917, 3917, 3918, 3918, 3918, 3918,
3587 3919, 3919, 3919, 3919, 3920, 3920, 3923, 3923, 3924, 3924,
3588 3924, 3924, 3924, 3924, 3924, 3924, 3924, 3925, 3925, 3925,
3589 3925, 3925, 3925, 3925, 3926, 3931, 3936, 3941, 3946, 3951,
3590 3956, 3961, 3966, 3971, 3976, 3981, 3986, 3991, 3992, 3997,
3591 4002, 4007, 4012, 4017, 4022, 4027, 4032, 4037, 4042, 4047,
3592 4054, 4054, 4054, 4055, 4056, 4059, 4068, 4069, 4075, 4082,
3593 4083, 4084, 4085, 4088, 4093, 4101, 4107, 4114, 4121, 4121,
3594 4124, 4125, 4126, 4131, 4138, 4143, 4152, 4157, 4167, 4179,
3595 4180, 4186, 4187, 4188, 4189, 4194, 4201, 4201, 4206, 4211,
3596 4216, 4222, 4228, 4232, 4232, 4270, 4275, 4283, 4288, 4296,
3597 4301, 4306, 4311, 4319, 4324, 4333, 4334, 4338, 4343, 4348,
3598 4366, 4366, 4366, 4366, 4366, 4366, 4366, 4366, 4367, 4368,
3599 4369, 4375, 4374, 4387, 4387, 4393, 4399, 4404, 4409, 4414,
3600 4420, 4425, 4430, 4435, 4440, 4447, 4452, 4457, 4462, 4463,
3601 4469, 4471, 4483, 4492, 4501, 4510, 4509, 4524, 4523, 4536,
3602 4544, 4544, 4545, 4589, 4588, 4611, 4610, 4630, 4629, 4648,
3603 4646, 4663, 4661, 4676, 4681, 4686, 4691, 4706, 4706, 4709,
3604 4716, 4734, 4741, 4749, 4757, 4764, 4772, 4781, 4790, 4798,
3605 4805, 4812, 4820, 4827, 4833, 4848, 4855, 4860, 4866, 4873,
3606 4880, 4881, 4882, 4885, 4886, 4889, 4891, 4900, 4901, 4908,
3607 4909, 4912, 4917, 4925, 4925, 4925, 4930, 4935, 4940, 4945,
3608 4952, 4958, 4965, 4966, 4973, 4973, 4975, 4975, 4975, 4975,
3609 4975, 4975, 4975, 4975, 4975, 4978, 4986, 4986, 4986, 4986,
3610 4986, 4986, 4991, 4996, 5001, 5006, 5011, 5017, 5022, 5027,
3611 5032, 5037, 5042, 5047, 5052, 5057, 5064, 5065, 5071, 5081,
3612 5085, 5088, 5093, 5100, 5102, 5106, 5111, 5114, 5120, 5125,
3613 5132, 5138, 5131, 5165, 5172, 5181, 5188, 5187, 5198, 5206,
3614 5218, 5228, 5234, 5239, 5247, 5254, 5265, 5271, 5276, 5282,
3615 5292, 5297, 5305, 5311, 5319, 5321, 5336, 5336, 5357, 5363,
3616 5368, 5374, 5382, 5391, 5392, 5395, 5396, 5398, 5411, 5418,
3617 5426, 5427, 5430, 5431, 5437, 5445, 5446, 5452, 5458, 5463,
3618 5468, 5475, 5478, 5485, 5489, 5488, 5501, 5504, 5511, 5518,
3619 5519, 5520, 5527, 5534, 5541, 5547, 5554, 5561, 5568, 5574,
3620 5579, 5584, 5591, 5590, 5601, 5607, 5615, 5621, 5626, 5631,
3621 5636, 5641, 5644, 5645, 5652, 5657, 5664, 5672, 5678, 5685,
3622 5686, 5693, 5700, 5705, 5710, 5715, 5722, 5724, 5731, 5737,
3623 5749, 5750, 5765, 5770, 5777, 5783, 5784, 5791, 5792, 5792,
3624 5792, 5792, 5792, 5792, 5792, 5793, 5794, 5795, 5798, 5798,
3625 5798, 5798, 5798, 5798, 5798, 5798, 5799, 5804, 5807, 5815,
3626 5827, 5834, 5841, 5846, 5851, 5859, 5879, 5882, 5887, 5891,
3627 5894, 5899, 5902, 5909, 5912, 5913, 5916, 5928, 5929, 5930,
3628 5937, 5950, 5962, 5969, 5969, 5969, 5969, 5973, 5977, 5984,
3629 5986, 5993, 5993, 5997, 6001, 6008, 6008, 6011, 6011, 6015,
3630 6019, 6027, 6031, 6039, 6043, 6051, 6055, 6063, 6067, 6093,
3631 6096, 6095, 6110, 6118, 6122, 6126, 6141, 6142, 6145, 6150,
3632 6153, 6154, 6157, 6173, 6174, 6177, 6185, 6186, 6194, 6195,
3633 6196, 6197, 6200, 6201, 6202, 6205, 6205, 6206, 6209, 6210,
3634 6211, 6212, 6213, 6214, 6215, 6218, 6228, 6235, 6235, 6242,
3635 6243, 6247, 6246, 6256, 6259, 6260, 6269, 6279, 6280, 6280,
3636 6297, 6297, 6297, 6297, 6297, 6297, 6297, 6297, 6297, 6298,
3637 6315, 6315, 6315, 6315, 6315, 6315, 6320, 6325, 6330, 6335,
3638 6340, 6345, 6350, 6355, 6360, 6365, 6370, 6375, 6380, 6386,
3639 6393, 6400, 6409, 6418, 6427, 6438, 6439, 6449, 6456, 6461,
3640 6480, 6482, 6493, 6513, 6514, 6517, 6523, 6529, 6537, 6538,
3641 6541, 6547, 6555, 6556, 6559, 6565, 6573, 6578, 6582, 6582,
3642 6612, 6614, 6613, 6626, 6627, 6634, 6636, 6661, 6666, 6671,
3643 6678, 6684, 6689, 6702, 6702, 6702, 6703, 6706, 6707, 6708,
3644 6711, 6712, 6715, 6716, 6719, 6720, 6723, 6726, 6729, 6732,
3645 6733, 6736, 6744, 6751, 6752, 6756
3646};
3647#endif
3648
3650#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3651
3652#if 1
3653/* The user-facing name of the symbol whose (internal) number is
3654 YYSYMBOL. No bounds checking. */
3655static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3656
3657/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3658 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3659static const char *const yytname[] =
3660{
3661 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3662 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3663 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3664 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3665 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3666 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3667 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3668 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3669 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3670 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3671 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3672 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3673 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3674 "\"method\"", "\"global variable\"", "\"instance variable\"",
3675 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3676 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3677 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3678 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3679 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3680 "\"escaped form feed\"", "\"escaped carriage return\"",
3681 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3682 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3683 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3684 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3685 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3686 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3687 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3688 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3689 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3690 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3691 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3692 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3693 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3694 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3695 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3696 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3697 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3698 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3699 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3700 "command_asgn", "op_asgn_command_rhs",
3701 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3702 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3703 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3704 "expr_value_do", "command_call", "value_expr_command_call",
3705 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3706 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3707 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3708 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3709 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3710 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3711 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3712 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3713 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3714 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3715 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3716 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3717 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3718 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3719 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3720 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3721 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3722 "f_kw_primary_value", "f_kwarg_primary_value",
3723 "args_tail_basic_primary_value", "block_args_tail", "excessed_comma",
3724 "f_opt_primary_value", "f_opt_arg_primary_value",
3725 "opt_args_tail_block_args_tail", "block_param", "opt_block_param_def",
3726 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3727 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3728 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3729 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3730 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3731 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3732 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3733 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3734 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3735 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3736 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3737 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3738 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3739 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3740 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3741 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3742 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3743 "string_contents", "xstring_contents", "regexp_contents",
3744 "string_content", "@34", "@35", "@36", "@37", "string_dend",
3745 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3746 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3747 "var_ref", "var_lhs", "backref", "$@38", "superclass",
3748 "f_opt_paren_args", "f_paren_args", "f_arglist", "@39", "f_kw_arg_value",
3749 "f_kwarg_arg_value", "args_tail_basic_arg_value", "args_tail",
3750 "f_opt_arg_value", "f_opt_arg_arg_value", "opt_args_tail_args_tail",
3751 "f_args", "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn",
3752 "f_arg_item", "f_arg", "f_label", "kwrest_mark", "f_no_kwarg",
3753 "f_kwrest", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
3754 "opt_f_block_arg", "value_expr_singleton_expr", "singleton",
3755 "singleton_expr", "$@40", "assoc_list", "assocs", "assoc", "operation2",
3756 "operation3", "dot_or_colon", "call_op", "call_op2", "rparen",
3757 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3758};
3759
3760static const char *
3761yysymbol_name (yysymbol_kind_t yysymbol)
3762{
3763 return yytname[yysymbol];
3764}
3765#endif
3766
3767#define YYPACT_NINF (-1154)
3768
3769#define yypact_value_is_default(Yyn) \
3770 ((Yyn) == YYPACT_NINF)
3771
3772#define YYTABLE_NINF (-816)
3773
3774#define yytable_value_is_error(Yyn) \
3775 ((Yyn) == YYTABLE_NINF)
3776
3777/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3778 STATE-NUM. */
3779static const yytype_int16 yypact[] =
3780{
3781 -1154, 5861, 140, -1154, -1154, -1154, -1154, 10474, -1154, -1154,
3782 -1154, -1154, -1154, -1154, -1154, 11529, 11529, -1154, -1154, -1154,
3783 -1154, 6763, -1154, -1154, -1154, -1154, 479, 10320, -9, 31,
3784 -1154, -1154, -1154, -1154, 6139, 6919, -1154, -1154, 6295, -1154,
3785 -1154, -1154, -1154, -1154, -1154, -1154, -1154, 13089, 13089, 13089,
3786 13089, 133, 9233, 9391, 12009, 12249, 10775, -1154, 10166, -1154,
3787 -1154, -1154, 43, 43, 43, 43, 1177, 13209, 13089, -1154,
3788 236, -1154, -1154, 1304, -1154, -1154, -1154, -1154, -1154, 894,
3789 318, 318, -1154, -1154, 110, 181, 123, -1154, 79, 13809,
3790 -1154, 249, -1154, 1945, -1154, -1154, -1154, -1154, 896, 448,
3791 -1154, 598, -1154, 11409, 11409, -1154, -1154, 9853, 13927, 14045,
3792 14163, 10011, 11529, 7387, -1154, 737, 70, -1154, -1154, 324,
3793 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3794 -1154, -1154, -1154, -1154, -1154, -1154, -1154, 81, 503, -1154,
3795 231, 528, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3796 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3797 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3798 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3799 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3800 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3801 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3802 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3803 292, -1154, -1154, -1154, -1154, -1154, -1154, 315, 13089, 462,
3804 9391, 13089, 13089, 13089, -1154, 13089, -1154, -1154, 389, 4606,
3805 -1154, 480, -1154, -1154, -1154, 408, -1154, 607, 44, 80,
3806 500, 244, 469, -1154, -1154, 11649, -1154, 11529, -1154, -1154,
3807 11150, 13329, 779, -1154, 438, -1154, 9549, -1154, -1154, -1154,
3808 -1154, -1154, 460, 318, 318, 110, -1154, 665, -1154, 511,
3809 633, 4706, 4706, 703, -1154, 9233, 580, 236, -1154, 1304,
3810 -9, 613, -1154, -1154, 591, 818, 851, -1154, 480, 604,
3811 851, -1154, -9, 715, 1177, 14281, 634, 634, 670, -1154,
3812 726, 777, 797, 807, -1154, -1154, 732, -1154, -1154, 1132,
3813 1147, 678, -1154, 686, 686, 686, 686, 761, -1154, -1154,
3814 -1154, -1154, -1154, -1154, -1154, 6013, 734, 11409, 11409, 11409,
3815 11409, -1154, 13329, 13329, 1810, 753, 762, -1154, 1810, -1154,
3816 766, -1154, -1154, -1154, -1154, 806, -1154, -1154, -1154, -1154,
3817 -1154, -1154, -1154, 9233, 10893, 764, -1154, -1154, 13089, 13089,
3818 13089, 13089, 13089, -1154, -1154, 13089, 13089, 13089, 13089, 13089,
3819 13089, 13089, 13089, -1154, 13089, -1154, -1154, 13089, 13089, 13089,
3820 13089, 13089, 13089, 13089, 13089, 13089, 13089, -1154, -1154, 3522,
3821 11529, 4301, 460, 8169, -1154, 894, -1154, 214, 214, 11409,
3822 9081, 9081, -1154, 236, 774, 868, -1154, -1154, 854, 916,
3823 93, 97, 121, 711, 758, 11409, 296, -1154, 809, 866,
3824 -1154, -1154, -1154, -1154, 73, 114, 461, 625, 637, 656,
3825 677, 738, 769, -1154, -1154, -1154, -1154, -1154, 772, -1154,
3826 -1154, 11011, -1154, -1154, -1154, 2213, -1154, -1154, -1154, -1154,
3827 -1154, -1154, 316, -1154, -1154, -1154, 707, -1154, 13089, 11769,
3828 -1154, -1154, 14662, 11529, 14760, -1154, -1154, 12129, -1154, 13089,
3829 -9, -1154, 801, -9, 803, -1154, -1154, 823, 170, -1154,
3830 -1154, -1154, -1154, -1154, 10474, -1154, -1154, 13089, 813, 827,
3831 849, 14858, 14760, -1154, 31, -9, -1154, -1154, 5468, 840,
3832 845, -1154, 12009, -1154, -1154, 12249, -1154, -1154, -1154, 438,
3833 870, -1154, 853, -1154, -1154, 14281, 14956, 11529, 15054, -1154,
3834 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3835 -1154, 1153, 103, 1221, 293, 13089, -1154, -1154, 9701, -1154,
3836 -1154, -1154, -1154, -1154, 11289, -1154, -1154, -1154, -1154, -1154,
3837 -1154, -1154, -1154, -1154, -1154, 1349, -1154, -1154, -1154, -1154,
3838 -1154, 855, -1154, -1154, 861, -1154, -1154, -1154, 865, -9,
3839 -1154, -1154, -1154, 903, -1154, 873, 13089, 288, -1154, -1154,
3840 970, 875, 996, -1154, 13449, 8169, 236, 13449, 8169, -1154,
3841 898, -1154, -1154, -1154, 138, 138, 12369, -9, 14281, 897,
3842 -1154, 12489, -1154, 633, 4788, 4788, 4788, 4788, 5010, 3762,
3843 4788, 4788, 4706, 4706, 572, 572, -1154, 4380, 1239, 1239,
3844 1283, 430, 430, 633, 633, 633, 965, 965, 7543, 6451,
3845 7855, 6607, 460, -1154, -9, 904, 765, -1154, 783, -1154,
3846 7075, -1154, -1154, 138, -1154, 8321, 1051, 8777, 197, 138,
3847 138, 1050, 1044, 126, 15152, 11529, 15250, -1154, -1154, -1154,
3848 870, -1154, -1154, -1154, -1154, 15348, 11529, 15446, 8169, 13329,
3849 -1154, -1154, -1154, -9, -1154, -1154, -1154, -1154, 3914, 13569,
3850 13569, 10474, -1154, 13089, 13089, -1154, 480, -1154, -1154, 469,
3851 5159, 7231, -9, 328, 351, 13089, 13089, -1154, -1154, 11889,
3852 -1154, 12129, -1154, -1154, -1154, 13329, 4606, -1154, 13689, 13689,
3853 84, 460, 460, 13569, -1154, 552, -1154, -1154, 851, 14281,
3854 853, 477, 436, -9, 92, 322, -1154, -1154, 1067, -1154,
3855 360, -1154, 43, -1154, -1154, 360, 43, -1154, 633, 919,
3856 -1154, 1349, 1441, -1154, 929, -9, 933, -1154, 429, -1154,
3857 -1154, 349, -1154, 1810, -1154, -1154, 966, 13089, 1810, -1154,
3858 -1154, -1154, -1154, -1154, 1360, -1154, -1154, 479, 1055, -1154,
3859 4606, 1057, 138, -1154, 1055, 1057, 138, -1154, -1154, 960,
3860 -1154, -1154, -1154, -1154, -1154, 13089, -1154, -1154, -1154, 958,
3861 961, 1075, -1154, -1154, 853, 14281, 1064, -1154, -1154, 1084,
3862 995, 1604, -1154, -1154, -1154, 888, 450, -1154, -1154, 1000,
3863 -1154, -1154, -1154, -1154, 806, 982, 837, 11769, -1154, -1154,
3864 -1154, -1154, 806, -1154, 1142, -1154, 1010, -1154, 1144, -1154,
3865 -1154, -1154, -1154, -1154, -1154, 12609, 138, -1154, 1050, 138,
3866 134, 151, -9, 150, 166, 11409, 236, 11409, 8169, 791,
3867 436, -1154, -9, 138, 170, 10628, -1154, 70, 181, -1154,
3868 3321, -1154, -1154, -1154, -1154, 13089, -1154, -1154, -1154, -1154,
3869 456, -1154, -1154, -9, 1007, 170, 479, -1154, -1154, -1154,
3870 -1154, 647, -1154, -1154, -1154, -1154, -1154, 686, -1154, 686,
3871 686, 686, -1154, -9, -1154, 1349, -1154, 1451, -1154, -1154,
3872 1105, 855, -1154, -1154, 1011, 1020, -1154, -1154, 1021, -1154,
3873 1022, -1154, 1011, 13449, -1154, -1154, -1154, -1154, -1154, -1154,
3874 -1154, 1027, 12729, -1154, 853, 508, -1154, -1154, -1154, 15544,
3875 11529, 15642, -1154, -1154, 13089, 13569, 13569, 1013, -1154, -1154,
3876 -1154, 13569, 13569, -1154, -1154, 12849, 1144, -1154, -1154, -1154,
3877 9081, 11409, 138, -1154, -1154, 138, -1154, 13089, -1154, 100,
3878 -1154, -1154, 138, -1154, 168, 197, 8169, 236, 138, -1154,
3879 -1154, -1154, -1154, -1154, -1154, 13089, 13089, -1154, 13089, 13089,
3880 -1154, 12129, -1154, 13689, 1680, 5709, -1154, -1154, 1030, 1035,
3881 -1154, 1360, -1154, 1360, -1154, 1810, -1154, 1360, -1154, -1154,
3882 1055, 1057, 13089, 13089, -1154, -1154, 13089, 1037, 11289, 11289,
3883 13569, 13089, 7699, 8011, -9, 526, 619, 4514, 4514, 4606,
3884 -1154, -1154, -1154, -1154, -1154, 13569, -1154, -1154, -1154, -1154,
3885 958, -1154, 1093, -1154, 1187, -1154, -1154, 214, -1154, -1154,
3886 -1154, 12969, 8473, -1154, -1154, -1154, 138, -1154, -1154, 13089,
3887 1810, -1154, -1154, 115, 1451, 1451, 1011, 1011, 1045, 1011,
3888 4606, 4606, 1060, 1060, 1027, -1154, -1154, 4606, 627, -1154,
3889 -1154, -1154, 2841, 2841, 571, -1154, 4211, 489, 1149, -1154,
3890 1423, -1154, -1154, 56, -1154, 1065, -1154, -1154, -1154, 1054,
3891 -1154, 1059, -1154, 14590, -1154, -1154, -1154, -1154, -1154, 973,
3892 -1154, -1154, -1154, 453, -1154, -1154, -1154, -1154, -1154, -1154,
3893 -1154, -1154, -1154, 440, -1154, -1154, -1154, 14399, 214, -1154,
3894 -1154, 9081, -1154, -1154, 8929, 8321, 13089, -1154, 749, 4514,
3895 9081, -1154, -9, 108, -1154, -1154, -1154, 1035, -1154, -1154,
3896 1360, -1154, -1154, 1993, 9701, -1154, -1154, 8169, -1154, -1154,
3897 -1154, -1154, 14590, 65, -9, 5289, -1154, -9, 1062, -1154,
3898 1058, -1154, -1154, -1154, 1048, -1154, 11409, -1154, 1154, 5289,
3899 -1154, 14590, 971, 1117, 2841, 2841, 571, -16, 691, 4514,
3900 4514, -1154, 1167, -1154, 901, 219, 289, 294, 8169, 236,
3901 -1154, 1010, -1154, -1154, -1154, -1154, 214, 1033, 138, 1072,
3902 1066, -1154, 9701, -1154, 1011, 855, -1154, 1087, -1154, -1154,
3903 -1154, 1090, -1154, -9, 903, 1095, 14517, 1102, -1154, -1154,
3904 -1154, 281, -1154, 1117, 1106, 1107, -1154, -1154, -1154, -1154,
3905 -1154, -9, -1154, -1154, 1108, 14590, 1109, -1154, -1154, -1154,
3906 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -9, -9,
3907 -9, -9, -9, -9, 372, 15740, 11529, 15838, 1142, -1154,
3908 1187, -1154, -1154, 11409, 11409, -1154, 1481, -1154, 8169, 1115,
3909 -1154, -1154, 349, -1154, 1993, -1154, 1088, 14517, 1993, -1154,
3910 -1154, 1214, 915, 1518, -1154, -1154, 14590, -1154, 971, -1154,
3911 14590, -1154, 5289, 867, -1154, -1154, -1154, -1154, -1154, -1154,
3912 251, 284, -9, 418, 432, -1154, -1154, 8625, -1154, -1154,
3913 -1154, 923, -1154, -1154, 138, -1154, -1154, 855, -1154, -1154,
3914 1121, 1123, -1154, 915, 1128, 1130, -1154, 15936, 1121, 1134,
3915 -9, 1134, -1154, -1154, 442, 495, 1481, -1154, -1154, -1154,
3916 1518, -1154, 1518, -1154, 1993, -1154, 1518, -1154, 1133, 1136,
3917 -1154, 14590, -1154, -1154, -1154, -1154, -1154, 1121, 1121, 1139,
3918 1121, -1154, -1154, 1518, -1154, -1154, 1121, -1154
3919};
3920
3921/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3922 Performed when YYTABLE does not specify something else to do. Zero
3923 means the default is an error. */
3924static const yytype_int16 yydefact[] =
3925{
3926 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3927 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3928 419, 323, 699, 698, 700, 701, 64, 0, 64, 0,
3929 815, 703, 702, 704, 97, 99, 693, 692, 98, 694,
3930 688, 689, 690, 691, 637, 709, 710, 0, 0, 0,
3931 0, 0, 0, 0, 815, 815, 126, 490, 663, 663,
3932 665, 667, 0, 0, 0, 0, 0, 0, 0, 6,
3933 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3934 718, 718, 70, 91, 323, 90, 0, 112, 0, 116,
3935 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3936 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3937 0, 0, 360, 323, 370, 94, 368, 340, 341, 636,
3938 638, 342, 343, 646, 344, 652, 346, 656, 345, 658,
3939 347, 635, 680, 681, 634, 686, 697, 705, 706, 348,
3940 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3941 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3942 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3943 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3944 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3945 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3946 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3947 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3948 33, 158, 159, 161, 402, 403, 405, 0, 789, 0,
3949 0, 334, 792, 326, 663, 0, 318, 316, 0, 298,
3950 299, 329, 317, 110, 322, 815, 330, 0, 705, 706,
3951 0, 349, 815, 785, 111, 815, 509, 0, 107, 65,
3952 64, 0, 0, 28, 815, 12, 0, 11, 27, 295,
3953 393, 394, 510, 718, 718, 0, 261, 0, 360, 363,
3954 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3955 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
3956 64, 783, 64, 0, 0, 0, 718, 718, 124, 397,
3957 0, 132, 133, 140, 487, 683, 0, 682, 684, 0,
3958 0, 0, 643, 647, 659, 653, 661, 687, 74, 273,
3959 274, 812, 811, 5, 813, 0, 0, 0, 0, 0,
3960 0, 815, 0, 0, 749, 0, 717, 389, 749, 715,
3961 0, 391, 409, 514, 504, 100, 516, 367, 410, 516,
3962 499, 815, 130, 0, 122, 117, 815, 77, 0, 0,
3963 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
3964 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
3965 0, 0, 0, 0, 0, 0, 0, 802, 803, 805,
3966 815, 804, 0, 0, 86, 84, 85, 0, 0, 0,
3967 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
3968 705, 706, 349, 150, 151, 0, 0, 153, 815, 0,
3969 705, 706, 349, 387, 225, 218, 228, 213, 195, 196,
3970 197, 155, 156, 781, 81, 80, 780, 779, 0, 778,
3971 109, 64, 108, 805, 804, 0, 369, 639, 815, 815,
3972 163, 788, 357, 333, 791, 325, 0, 815, 0, 0,
3973 319, 328, 805, 815, 804, 815, 815, 0, 320, 750,
3974 64, 312, 815, 64, 815, 311, 324, 0, 64, 366,
3975 73, 30, 32, 31, 0, 815, 296, 0, 0, 0,
3976 0, 805, 804, 815, 0, 64, 355, 14, 0, 113,
3977 0, 358, 810, 809, 301, 810, 303, 359, 784, 0,
3978 139, 687, 127, 119, 717, 0, 805, 815, 804, 488,
3979 669, 685, 672, 670, 664, 640, 641, 666, 642, 668,
3980 644, 0, 0, 0, 0, 0, 814, 9, 0, 34,
3981 35, 36, 37, 297, 0, 71, 72, 756, 753, 752,
3982 751, 754, 762, 763, 750, 0, 769, 764, 773, 772,
3983 768, 815, 765, 722, 815, 728, 748, 731, 734, 64,
3984 729, 755, 757, 758, 760, 734, 721, 767, 443, 442,
3985 771, 734, 775, 727, 0, 0, 0, 0, 0, 487,
3986 0, 514, 101, 487, 0, 0, 0, 64, 0, 118,
3987 131, 0, 527, 259, 266, 268, 269, 270, 277, 278,
3988 271, 272, 247, 248, 275, 276, 527, 64, 263, 264,
3989 265, 254, 255, 256, 257, 258, 293, 294, 793, 795,
3990 794, 796, 323, 507, 64, 815, 793, 795, 794, 796,
3991 323, 508, 815, 0, 421, 0, 420, 0, 0, 0,
3992 0, 0, 375, 357, 805, 815, 804, 380, 385, 150,
3993 151, 152, 711, 383, 713, 805, 815, 804, 0, 0,
3994 800, 801, 82, 64, 362, 793, 794, 503, 323, 0,
3995 0, 0, 815, 0, 0, 787, 331, 327, 332, 815,
3996 793, 794, 64, 793, 794, 0, 0, 786, 306, 313,
3997 308, 315, 806, 365, 29, 0, 279, 13, 0, 0,
3998 356, 0, 815, 0, 25, 115, 22, 354, 64, 0,
3999 125, 797, 138, 64, 793, 794, 489, 673, 0, 645,
4000 0, 649, 0, 655, 651, 0, 0, 657, 260, 0,
4001 38, 0, 441, 433, 435, 64, 438, 431, 0, 726,
4002 777, 0, 725, 0, 744, 716, 0, 0, 0, 741,
4003 720, 594, 766, 770, 0, 746, 774, 64, 59, 62,
4004 286, 280, 0, 719, 60, 281, 0, 488, 512, 0,
4005 488, 416, 417, 513, 498, 334, 92, 93, 41, 336,
4006 0, 45, 335, 129, 123, 0, 0, 69, 48, 67,
4007 0, 304, 329, 236, 42, 0, 349, 525, 525, 0,
4008 815, 815, 514, 506, 104, 0, 511, 313, 815, 815,
4009 310, 505, 102, 309, 815, 352, 815, 422, 815, 424,
4010 88, 423, 373, 374, 413, 0, 0, 527, 0, 0,
4011 797, 356, 64, 793, 794, 0, 0, 0, 0, 150,
4012 151, 154, 64, 0, 64, 0, 361, 500, 95, 50,
4013 304, 238, 57, 245, 164, 0, 790, 321, 815, 815,
4014 511, 815, 815, 64, 815, 64, 64, 56, 244, 302,
4015 120, 511, 26, 674, 671, 678, 679, 648, 650, 660,
4016 654, 662, 39, 64, 440, 0, 759, 0, 776, 723,
4017 767, 815, 733, 732, 734, 734, 445, 730, 734, 761,
4018 734, 758, 734, 0, 815, 815, 390, 392, 489, 96,
4019 489, 339, 0, 815, 121, 357, 815, 815, 815, 805,
4020 815, 804, 526, 526, 0, 0, 0, 0, 105, 807,
4021 815, 0, 0, 103, 411, 815, 18, 626, 415, 414,
4022 0, 0, 0, 425, 427, 0, 89, 0, 518, 0,
4023 378, 525, 0, 379, 511, 0, 0, 0, 0, 511,
4024 388, 782, 83, 501, 502, 0, 0, 815, 0, 0,
4025 307, 314, 364, 0, 749, 0, 432, 434, 436, 439,
4026 724, 0, 745, 0, 742, 0, 737, 0, 739, 747,
4027 66, 288, 0, 0, 26, 26, 334, 337, 0, 0,
4028 0, 0, 793, 794, 64, 793, 794, 0, 0, 285,
4029 54, 242, 55, 243, 106, 0, 52, 240, 53, 241,
4030 627, 628, 815, 629, 815, 15, 428, 0, 371, 372,
4031 519, 0, 0, 526, 376, 381, 0, 712, 384, 0,
4032 749, 491, 494, 0, 0, 0, 734, 734, 734, 734,
4033 63, 287, 815, 815, 338, 44, 68, 305, 511, 618,
4034 624, 590, 0, 0, 0, 526, 64, 526, 578, 663,
4035 0, 617, 78, 535, 541, 543, 546, 539, 538, 574,
4036 540, 583, 586, 589, 595, 596, 585, 549, 604, 597,
4037 550, 605, 606, 607, 608, 609, 610, 611, 612, 614,
4038 613, 615, 616, 593, 76, 51, 239, 0, 0, 631,
4039 412, 0, 19, 633, 0, 0, 0, 520, 815, 0,
4040 0, 386, 64, 0, 677, 676, 675, 437, 743, 738,
4041 0, 735, 740, 479, 0, 477, 476, 0, 602, 603,
4042 151, 622, 0, 566, 64, 567, 571, 64, 0, 561,
4043 0, 815, 564, 577, 0, 619, 0, 620, 0, 536,
4044 544, 0, 584, 588, 600, 601, 0, 526, 526, 0,
4045 0, 592, 0, 630, 0, 705, 706, 349, 0, 3,
4046 16, 815, 521, 523, 524, 522, 0, 532, 0, 481,
4047 0, 496, 0, 492, 734, 815, 448, 815, 454, 475,
4048 457, 460, 480, 64, 758, 460, 447, 460, 453, 515,
4049 517, 64, 559, 581, 569, 568, 560, 572, 808, 562,
4050 591, 64, 542, 537, 574, 0, 575, 579, 663, 587,
4051 582, 598, 599, 623, 548, 558, 547, 554, 64, 64,
4052 64, 64, 64, 64, 357, 805, 815, 804, 815, 632,
4053 815, 426, 528, 0, 0, 382, 0, 493, 0, 0,
4054 736, 452, 0, 451, 0, 471, 0, 0, 455, 466,
4055 468, 0, 446, 0, 473, 565, 0, 573, 0, 621,
4056 0, 545, 0, 0, 551, 552, 553, 555, 556, 557,
4057 797, 356, 64, 793, 794, 625, 17, 0, 533, 534,
4058 485, 64, 483, 486, 0, 495, 449, 815, 459, 458,
4059 460, 460, 478, 456, 460, 460, 357, 805, 460, 570,
4060 64, 575, 576, 580, 511, 815, 0, 482, 497, 450,
4061 0, 472, 0, 469, 0, 463, 0, 465, 797, 356,
4062 474, 0, 563, 530, 531, 529, 484, 460, 460, 460,
4063 460, 470, 464, 0, 461, 467, 460, 462
4064};
4065
4066/* YYPGOTO[NTERM-NUM]. */
4067static const yytype_int16 yypgoto[] =
4068{
4069 -1154, -102, 1031, -1154, -1154, -1154, 963, -1154, 792, -17,
4070 -1154, -1154, -539, -1154, 174, 798, -1154, 0, -1154, -1154,
4071 26, -1154, -1154, -24, -1154, 15, -552, 169, -565, -100,
4072 -1154, -1154, 443, 2573, -1154, 3086, -1154, -25, -1154, -1154,
4073 1201, -38, -1154, 706, -1154, -659, 1206, 22, 1207, -169,
4074 35, -445, -72, -1154, 2, 3822, -400, 1204, -46, 6,
4075 -1154, -1154, 12, -1154, -1154, 4667, -1154, -1154, -1154, -1154,
4076 -547, 1222, -1154, 899, 824, 222, -1154, 1002, -1154, 497,
4077 28, 639, -375, -1154, 88, -1154, 13, -393, -231, 38,
4078 -423, -1154, -567, -47, -1154, -1154, -1154, -1154, -1154, -1154,
4079 -1154, -1154, -1154, -1154, -1154, -1154, 986, -1154, -1154, -1154,
4080 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
4081 -1154, -1154, 366, -1154, -443, 1837, 2057, -386, 355, 131,
4082 -797, -1154, -794, -801, 586, 433, -955, -1154, 127, 57,
4083 -1154, -1154, 199, -1154, -1153, 66, 336, -1154, 282, -1154,
4084 -1154, 139, -1154, 17, 260, -58, -88, -1154, -1154, 337,
4085 -1154, -1154, -1154, 499, -1154, -1154, -115, -1154, -528, -1154,
4086 1009, -1154, -773, -1154, -698, -755, -521, -1154, 24, -1154,
4087 -1154, -909, -213, -1154, -1154, -1154, -1154, -1154, 125, -1154,
4088 -143, -1154, -636, -750, -1024, -390, -1051, -1036, -1154, 189,
4089 -1154, -1154, -568, 191, -1154, -1154, -555, 198, -1154, -1154,
4090 -1154, 109, -1154, -1154, 117, 1029, 1459, -1154, 1269, 1564,
4091 1759, 37, -1154, 1883, -1154, 847, -1154, 1968, -1154, -1154,
4092 2174, -1154, 2208, -1154, -1154, -57, -1154, -1154, -188, -1154,
4093 -1154, -1154, -1154, -1154, -1154, 50, -1154, -1154, -1154, -1154,
4094 33, -50, 3681, -1, 1280, 3945, 3453, -1154, -1154, 9,
4095 785, 68, -1154, 632, -1154, -1154, -301, -677, 630, -421,
4096 -320, -184, -1141, -549, -284, -745, -584, -472, -678, -1154,
4097 -727, -1154, -576, -1154, -562, -542, -1154, -1154, -1154, -1154,
4098 -1154, 113, -437, -381, -1154, -1154, -91, 1284, -116, 41,
4099 60, -215, -59, -64, 14
4100};
4101
4102/* YYDEFGOTO[NTERM-NUM]. */
4103static const yytype_int16 yydefgoto[] =
4104{
4105 0, 333, 69, 1, 2, 70, 71, 266, 267, 652,
4106 1134, 1270, 653, 1044, 287, 288, 504, 224, 72, 494,
4107 289, 74, 75, 76, 77, 78, 778, 487, 808, 79,
4108 626, 612, 444, 273, 865, 274, 406, 407, 409, 966,
4109 410, 82, 797, 809, 83, 602, 275, 85, 86, 290,
4110 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4111 220, 691, 641, 222, 92, 93, 94, 95, 96, 97,
4112 781, 395, 98, 553, 497, 554, 240, 241, 294, 813,
4113 830, 831, 480, 242, 481, 257, 258, 244, 470, 645,
4114 246, 801, 802, 99, 403, 510, 848, 661, 855, 1140,
4115 858, 856, 678, 595, 598, 100, 277, 102, 103, 104,
4116 105, 106, 107, 108, 109, 110, 111, 356, 359, 955,
4117 1131, 845, 960, 961, 793, 278, 279, 655, 840, 962,
4118 963, 419, 753, 754, 755, 756, 571, 766, 767, 1216,
4119 1217, 1218, 1328, 1289, 1220, 1221, 1285, 1222, 1154, 1155,
4120 1223, 1210, 1321, 1322, 529, 736, 892, 314, 1143, 114,
4121 1061, 1213, 1278, 360, 115, 116, 357, 599, 600, 603,
4122 604, 969, 846, 1205, 942, 1027, 817, 1317, 849, 1365,
4123 1206, 1092, 1233, 1094, 1245, 1095, 1189, 1190, 1096, 1298,
4124 1164, 1165, 1166, 1098, 1099, 1246, 1168, 1100, 1101, 1102,
4125 1103, 1104, 572, 1106, 1107, 1108, 1109, 1110, 1111, 1112,
4126 1113, 956, 1042, 1128, 1132, 117, 118, 119, 120, 121,
4127 122, 323, 123, 124, 541, 740, 125, 126, 543, 127,
4128 128, 129, 130, 542, 544, 316, 320, 321, 534, 738,
4129 737, 893, 995, 1146, 894, 131, 132, 317, 133, 134,
4130 135, 136, 248, 249, 139, 250, 251, 857, 673, 345,
4131 346, 347, 348, 573, 574, 575, 912, 577, 578, 764,
4132 579, 580, 581, 582, 921, 584, 585, 586, 587, 588,
4133 589, 590, 591, 592, 593, 759, 447, 448, 449, 679,
4134 299, 484, 253, 721, 643, 682, 677, 402, 489, 826,
4135 1172, 514, 656, 414, 269
4136};
4137
4138/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4139 positive, shift that token. If negative, reduce the rule whose
4140 number is the opposite. If YYTABLE_NINF, syntax error. */
4141static const yytype_int16 yytable[] =
4142{
4143 138, 456, 319, 405, 405, 412, 335, 405, 318, 309,
4144 401, 334, 315, 225, 226, 142, 757, 365, 642, 221,
4145 650, 478, 657, 919, 454, 644, 671, 73, 596, 328,
4146 236, 236, 762, 263, 911, 286, 293, 237, 237, 221,
4147 707, 965, 309, 576, 814, 784, 698, 576, 334, 256,
4148 785, 138, 138, 245, 245, 312, 782, 223, 308, 786,
4149 583, 309, 309, 309, 583, 445, 292, 292, 297, 301,
4150 221, 483, 336, 789, 688, 972, 697, 223, 707, 408,
4151 730, 516, 413, 910, 697, 518, 913, 291, 312, 698,
4152 350, 642, 295, 650, 349, 349, 352, 355, 702, 327,
4153 324, 325, 326, 243, 254, 818, 999, 421, 431, 431,
4154 431, 997, 354, 654, 1235, 1144, 505, -135, -141, 1124,
4155 943, 722, -142, 221, 869, 872, 452, 236, 252, 252,
4156 1247, 1329, 537, 539, 237, 1323, 352, 1211, 259, 863,
4157 143, 1234, -699, -64, -707, 259, -149, 722, 791, 351,
4158 245, -148, 733, 1260, 1263, 1244, 474, 1178, 887, -146,
4159 488, 490, 794, 804, 769, 948, 1178, 296, 300, 742,
4160 775, -699, 785, 953, 509, -144, -147, 466, -141, 914,
4161 -708, -707, 265, -698, 879, 507, 502, 915, 1028, 283,
4162 922, -145, 920, -143, 607, 261, 908, 264, 1215, 908,
4163 450, 1329, 757, 904, 322, 1323, 792, 342, 343, 358,
4164 835, 1179, -698, 286, -142, -141, 842, 843, -147, 528,
4165 -581, 353, 743, 508, 839, 252, -135, 654, 334, 138,
4166 1207, 1212, -141, 523, 362, 1145, -132, 405, 405, 405,
4167 405, -794, 555, 556, 292, 1247, -135, -135, -132, 1247,
4168 -135, 1343, -133, 478, 331, 1051, 919, 361, 309, 471,
4169 332, 353, 1340, 1147, -146, 138, 471, 255, 286, 485,
4170 236, 997, 236, 1053, 707, 861, -140, 237, 1342, 237,
4171 142, -139, 499, 500, 138, 722, 698, 349, 349, -137,
4172 852, -793, 73, 482, 947, 245, 722, -147, 1139, 292,
4173 256, 862, -142, 354, 312, -135, -138, -149, -794, 405,
4174 1343, 662, 549, 550, 551, 552, 697, 309, 697, 978,
4175 291, -136, 771, -134, 259, 405, 971, 666, 913, 1215,
4176 1162, 458, 1171, 1215, 138, 684, 1167, 521, 1215, 926,
4177 772, 1203, 351, 927, 476, 486, 286, -136, 669, 1123,
4178 1123, 331, 670, 741, 334, 741, 757, 332, 757, 746,
4179 934, 73, 138, 312, 708, 1204, 609, 710, 331, 1000,
4180 252, 1010, 713, -141, 332, 351, 1011, 292, -149, -141,
4181 1030, 1032, 1178, 366, 658, -148, 1036, 1038, 1041, 725,
4182 331, 1097, 1097, 659, 660, 1215, 332, 1215, 291, 1215,
4183 668, 1215, 138, 970, 698, -146, 973, 562, -793, 138,
4184 138, -146, 747, 649, 485, 236, 692, 292, 1215, 1066,
4185 980, 1067, 237, 1069, 292, 292, 530, 563, 881, 1068,
4186 651, -144, 1254, 1256, 697, 259, 59, 1056, -147, 1259,
4187 1262, -794, 674, -142, -147, -145, 1011, 460, -149, -142,
4188 -148, 882, -815, 523, -149, -143, -136, 567, 568, 1105,
4189 1105, 1123, -144, 765, 513, 513, 236, 649, 877, 513,
4190 1125, 519, 260, 237, 771, 344, -136, -136, 309, 583,
4191 -136, 532, 533, 687, 583, -145, 649, 485, 236, 245,
4192 569, 803, 1191, 1002, 1004, 237, 471, 1006, 471, 1008,
4193 714, 1009, -137, 1097, 1123, -356, 221, 138, 368, 698,
4194 959, 1123, 1123, 889, 649, 757, 757, -397, 462, 1048,
4195 847, 322, 1049, 467, 312, 883, -148, 1158, 1159, 1054,
4196 -700, 749, -148, -356, -356, 1058, 523, 783, 568, 683,
4197 649, 485, 236, 919, 223, -397, -397, 138, 1363, 237,
4198 459, 1186, 898, 138, 707, 1327, 987, 898, 642, -700,
4199 650, 309, 292, 469, 252, 1024, 1214, 866, 796, 1225,
4200 569, 1105, -144, 796, 392, 393, 394, 1227, -144, 864,
4201 750, 468, 699, 1052, -149, 760, -145, 807, 760, -356,
4202 -143, 1228, -145, -794, 138, 495, -143, 138, 697, 841,
4203 475, -397, -143, -708, 910, 919, 1187, 312, 503, 292,
4204 1188, -137, 292, 1141, 1105, 885, 779, 255, 1230, 779,
4205 1123, 1105, 1105, 669, 477, 728, 828, 1160, 459, 1251,
4206 1252, -137, -137, 259, -793, -137, 260, -142, 836, 906,
4207 838, -64, -148, 259, 800, 1148, 1149, 1151, 1152, 800,
4208 368, 796, 796, 877, 138, 824, 138, 890, -133, 471,
4209 -144, 1135, -149, 832, 833, 807, 807, 397, 451, 292,
4210 823, 292, -134, 1281, 1062, 1283, 397, 138, 649, 485,
4211 236, 1226, 309, -140, 1161, 796, -113, 237, 895, 649,
4212 485, 236, 292, 576, -701, 398, 399, 874, 237, 807,
4213 1330, 868, 833, 221, 398, 472, -703, -129, 1331, 1338,
4214 583, 368, 1335, 471, 390, 391, 392, 393, 394, 829,
4215 908, 583, 1228, -701, 941, -702, 1228, 950, 312, 928,
4216 1105, 1228, 930, 523, 397, -703, 833, -97, 506, 1324,
4217 1142, 223, 1198, 880, 530, 538, -704, -112, 981, 823,
4218 511, 400, 983, -145, -702, 405, 517, 405, 309, 576,
4219 473, -143, 398, 501, 959, 1275, 844, 990, 1367, 992,
4220 1368, 520, 1370, 530, 891, -704, 583, 897, 1369, 899,
4221 -695, -134, 900, 901, -98, 1349, 1253, 996, 1228, 1376,
4222 1228, 344, 1228, 1280, 1228, 397, 819, 976, 530, 532,
4223 533, -134, -134, 503, 312, -134, 397, -695, -695, -695,
4224 1226, 1228, 1226, 825, 1093, 1093, 1226, -797, 473, 445,
4225 1272, 1226, 884, 398, 526, 525, 535, -696, 532, 533,
4226 975, 693, 977, 491, 398, 453, -695, -148, -696, 545,
4227 1014, 680, 1015, 492, 493, 259, -705, 540, 957, -64,
4228 964, 531, 964, 532, 533, -696, -696, 138, -139, 787,
4229 -797, 405, -97, 790, -695, 828, -706, -696, -97, 1224,
4230 681, 825, 292, 1163, -705, -705, -349, 221, 1226, 527,
4231 1226, 1348, 1226, 829, 1226, 548, 722, 594, -797, -797,
4232 1183, 1312, 994, 974, -706, -706, -714, 513, 471, -144,
4233 597, 1226, 825, 979, -349, -349, 1339, 796, 796, -98,
4234 1341, -696, 601, 796, 796, -98, 841, -145, 1057, 610,
4235 -135, 807, 807, 397, 663, 760, 1093, 807, 807, 268,
4236 -705, 342, 343, 530, 546, 397, 1047, 950, -136, -357,
4237 884, 667, -797, 1046, -797, 779, 923, 672, -793, 1231,
4238 -706, 398, 664, 649, 485, 236, 709, 397, 711, 138,
4239 -349, 718, 237, 398, 675, 717, 1163, -357, -357, 1043,
4240 397, -143, 259, 512, 292, 138, 1163, 1163, 1063, 373,
4241 374, 712, 796, 719, 397, 398, 939, 101, 532, 533,
4242 292, 1240, -134, 800, 138, -129, 807, 796, 398, 1265,
4243 1224, 247, 247, 727, 1224, 259, 515, 665, 729, 292,
4244 758, 807, 398, 1337, 1072, 1073, 761, 138, 138, 676,
4245 763, 825, 773, -357, 958, 959, 1122, 1122, 768, 1081,
4246 774, 825, 1174, 385, 386, 1138, 1243, -444, 101, 101,
4247 1177, 940, 310, 368, 1075, 1076, 1258, 1261, 776, 563,
4248 788, 138, 805, 247, 1266, 993, 1129, 298, 1133, 827,
4249 381, 382, 1184, 1185, 837, 1078, 292, 844, 676, 847,
4250 1224, 902, 1257, 1273, 1274, 310, 405, 259, 1346, 567,
4251 309, 1122, 1122, 1248, 905, 1122, 1156, 1156, 907, 247,
4252 247, 524, 524, 247, 418, 429, 429, 1269, 247, 924,
4253 916, 925, 1122, 1267, 387, 388, 389, 390, 391, 392,
4254 393, 394, 929, -329, 530, 1295, 932, 1200, 1201, 933,
4255 935, 36, 37, 1208, 39, 1299, 1196, 1169, 936, 937,
4256 138, 45, 46, 138, 138, 508, 944, 1229, 1122, 138,
4257 334, 949, 1304, 1305, 1306, 292, 1012, 1013, 292, 292,
4258 954, 1241, 964, 138, 292, 1018, 138, 772, 1019, 959,
4259 1021, 1122, 991, 496, 1122, 1034, 1001, 535, 292, 532,
4260 533, 292, 1240, 405, 405, 1003, 1005, 1007, 1122, 309,
4261 1122, 1268, -333, 1122, 1122, 1064, 871, 873, 1122, 1122,
4262 1065, 1303, -331, 825, 1127, 1279, 1130, 138, 530, 1153,
4263 1150, 1173, 871, 873, 1180, 1232, 1079, 84, 1236, 1181,
4264 1238, 138, 292, 530, 1182, 964, 101, 1237, 1178, 530,
4265 888, 84, 84, 1264, 1277, 431, 292, 1332, 1255, 760,
4266 461, 760, 1276, 463, 464, 465, 40, 41, 42, 43,
4267 309, 247, 1282, 247, 1122, 1284, 247, 247, 1318, 1319,
4268 1288, 535, 101, 532, 533, 825, 1170, 1293, 84, 84,
4269 606, 1296, 1297, 1300, 1302, 611, 536, 1325, 532, 533,
4270 1336, 101, 739, 84, 532, 533, 1350, 138, 1352, 649,
4271 485, 236, 957, 1354, 1133, 1356, 431, 530, 237, 1361,
4272 -793, 310, 292, -794, 1373, 1122, 724, 498, 547, 1122,
4273 1345, 1122, 1307, 1308, 1309, 1199, 726, 411, 982, 84,
4274 84, 1209, 798, 84, 433, 416, 138, 368, 84, 715,
4275 396, 101, 1045, 247, 247, 247, 247, 867, 247, 247,
4276 1055, 292, 1271, 825, 381, 382, 825, 903, 998, 1326,
4277 744, 760, 532, 533, 337, 338, 339, 340, 341, 101,
4278 310, 1287, 1219, 1344, 1334, 1157, 825, 689, 690, 964,
4279 1122, 368, 1286, 1366, 1091, 1091, 694, 984, 605, 1364,
4280 1301, 1249, 888, 1250, 705, 706, 1242, 1315, 381, 382,
4281 389, 390, 391, 392, 393, 394, 247, 1316, 457, 101,
4282 745, 446, 1209, 909, 496, 247, 101, 101, 918, 455,
4283 1362, 557, 723, 558, 559, 560, 561, 0, 0, 0,
4284 0, 247, 557, 0, 558, 559, 560, 561, 562, 1091,
4285 1091, 0, 0, 1091, 0, 390, 391, 392, 393, 394,
4286 825, 825, 825, 0, 0, 0, 84, 247, 563, 0,
4287 1091, 0, 1031, 1033, 0, 0, 0, 0, 1037, 1039,
4288 0, 751, 564, 0, 0, 0, 752, 0, 0, 247,
4289 0, 84, 565, 84, 0, 0, 84, 84, 567, 568,
4290 695, 696, 84, 0, 0, 1175, 1091, 36, 37, 298,
4291 39, 825, 1031, 1033, 0, 1037, 1039, 0, 0, 0,
4292 1347, 84, 0, 557, 101, 558, 559, 560, 561, 1091,
4293 0, 569, 1091, 557, 0, 558, 559, 560, 561, 1170,
4294 0, 310, 0, 247, 696, 0, 1091, 298, 1091, 0,
4295 0, 1091, 1091, 0, 0, 1176, 1091, 1091, 0, 0,
4296 0, 0, 1126, 1320, 101, 558, 559, 560, 561, 0,
4297 101, 84, 0, 84, 84, 84, 84, 0, 84, 84,
4298 0, 834, 0, 751, 0, 0, 1126, 0, 0, 0,
4299 0, 1290, 0, 1294, 0, 0, 0, 0, 0, 84,
4300 557, 0, 558, 559, 560, 561, 562, 0, 0, 0,
4301 247, 101, 1091, 247, 101, 0, 0, 0, 770, 0,
4302 0, 875, 247, 0, 310, 0, 563, 815, 0, 0,
4303 0, 0, 0, 0, 0, 0, 84, 0, 799, 84,
4304 0, 0, 0, 812, 0, 84, 84, 84, 0, 0,
4305 565, 0, 0, 0, 0, 0, 567, 568, 0, 0,
4306 0, 84, 0, 1091, 0, 0, 0, 1091, 0, 1091,
4307 0, 101, 0, 101, 0, 0, 0, 0, 938, 0,
4308 0, 247, 0, 0, 0, 0, 0, 84, 0, 569,
4309 0, 0, 247, 0, 101, 247, 1351, 1353, 0, 0,
4310 1355, 1357, 0, 0, 1360, 815, 815, 0, 0, 84,
4311 0, 0, 368, 369, 370, 371, 372, 373, 374, 375,
4312 376, 377, 378, 379, 380, 876, 0, 0, 1091, 381,
4313 382, 247, 0, 1371, 1372, 1374, 1375, 0, 0, 815,
4314 0, 696, 1377, 298, 84, 310, 0, 0, 0, 945,
4315 946, 0, 0, 0, 0, 0, 0, 951, 952, 0,
4316 0, 0, 557, 84, 558, 559, 560, 561, 562, 384,
4317 0, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4318 394, 0, 0, 0, 84, 0, 0, 0, 563, -298,
4319 84, 0, 0, 0, 0, 0, 0, 0, 0, 917,
4320 0, 0, 564, 0, 0, 0, 0, 985, 986, 0,
4321 988, 989, 565, 0, 0, 0, 0, 566, 567, 568,
4322 0, 310, 0, 0, 0, 0, 0, 931, 0, 0,
4323 84, 84, 0, 84, 84, 0, 0, 0, 0, 0,
4324 0, 0, 84, 0, 0, 0, 0, 84, 0, 0,
4325 0, 569, 0, 0, 570, 0, 0, 0, 0, 696,
4326 0, 0, 0, 0, 0, 0, 1020, 1060, 112, 0,
4327 0, 247, 0, 247, 101, 0, 0, 968, 0, 1035,
4328 0, 0, 112, 112, 0, 0, 0, 0, 0, 0,
4329 0, 84, 557, 84, 558, 559, 560, 561, 562, 0,
4330 0, 84, 0, 0, 0, 0, 0, 0, 0, 0,
4331 0, 0, 84, 0, 84, 84, 1059, 0, 563, 112,
4332 112, 0, 0, 0, 0, 84, 84, 0, 0, 0,
4333 0, 0, 564, 0, 112, 0, 0, 0, 0, 247,
4334 0, 0, 565, 0, 0, 0, 0, 566, 567, 568,
4335 0, 84, 0, 0, 0, 0, 247, 0, 0, 84,
4336 0, 815, 815, 0, 1017, 0, 0, 815, 815, 0,
4337 112, 112, 0, 0, 112, 0, 101, 247, 0, 112,
4338 0, 569, 0, 0, 570, 0, 0, 1040, 0, 0,
4339 0, 0, 101, 0, 0, 0, 0, 0, 0, 1050,
4340 367, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4341 0, 101, 0, 0, 0, 0, 0, 0, 0, 0,
4342 0, 0, 0, 298, 0, 0, 0, 0, 0, 0,
4343 0, 0, 0, 0, 101, 101, 815, 0, 0, 0,
4344 0, 0, 0, 0, 0, 0, 0, 0, 1074, 0,
4345 0, 815, 0, 368, 369, 370, 371, 372, 373, 374,
4346 375, 376, 377, 378, 379, 380, 0, 0, 101, 0,
4347 381, 382, 0, 0, 0, 557, 383, 558, 559, 560,
4348 561, 562, 0, 1137, 0, 0, 1114, 1114, 113, 0,
4349 0, 84, 0, 84, 84, 0, 0, 112, 0, 0,
4350 1239, 563, 113, 113, 0, 0, 0, 0, 0, 0,
4351 384, 0, 385, 386, 387, 388, 389, 390, 391, 392,
4352 393, 394, 112, 0, 112, 565, 0, 112, 112, 0,
4353 566, 567, 568, 112, 0, 0, 0, 0, 0, 113,
4354 113, 1114, 1114, 1194, 0, 1114, 0, 101, 0, 0,
4355 101, 101, 112, 0, 113, 0, 101, 0, 0, 84,
4356 0, 0, 1114, 0, 569, 0, 0, 570, 1202, 0,
4357 101, 0, 0, 101, 0, 0, 84, 0, 0, 0,
4358 0, 84, 84, 0, 0, 0, 0, 84, 84, 0,
4359 113, 113, 247, 0, 113, 0, 84, 84, 1114, 113,
4360 0, 0, 112, 0, 112, 112, 112, 112, 0, 112,
4361 112, 0, 84, 0, 101, 0, 0, 0, 0, 0,
4362 0, 1114, 0, 0, 1114, 0, 0, 0, 101, 0,
4363 112, 84, 0, 0, 0, 0, 0, 0, 1114, 0,
4364 1114, 0, 1292, 1114, 1114, 0, 0, 0, 1114, 1114,
4365 0, 0, 0, 0, 84, 84, 84, 0, 0, 0,
4366 0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
4367 112, 84, 0, 0, 0, 0, 112, 112, 112, 0,
4368 0, 0, 247, 0, 0, 0, 0, 0, 84, 247,
4369 247, 0, 112, 0, 101, 685, 647, 0, 0, 686,
4370 0, 0, 0, 1333, 1114, 0, 0, 0, 0, 0,
4371 0, 0, 0, 0, 0, 0, 0, 113, 112, 188,
4372 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
4373 197, 198, 0, 101, 0, 0, 199, 200, 201, 202,
4374 112, 0, 113, 0, 113, 0, 0, 113, 113, 0,
4375 203, 204, 0, 113, 0, 1114, 0, 0, 0, 1114,
4376 0, 1114, 0, 0, 0, 0, 0, 84, 0, 0,
4377 84, 84, 113, 0, 0, 112, 84, 0, 0, 0,
4378 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
4379 84, 215, 216, 84, 112, 0, 0, 0, 0, 217,
4380 255, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4381 0, 0, 84, 0, 0, 112, 0, 0, 0, 0,
4382 1114, 112, 113, 0, 113, 113, 113, 113, 0, 113,
4383 113, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4384 0, 0, 0, 0, 0, 0, 0, 0, 84, 0,
4385 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4386 0, 112, 112, 0, 112, 112, 0, 0, 0, 0,
4387 0, 0, 0, 112, 0, 0, 0, 0, 112, 0,
4388 0, 0, 0, 0, 0, 0, 0, 113, 0, 0,
4389 113, 0, 0, 0, 0, 0, 113, 113, 113, 0,
4390 0, 0, 84, 0, 0, 0, 0, 0, 0, 84,
4391 84, 0, 113, 0, 84, 0, 1115, 1115, 0, 0,
4392 0, 0, 112, 0, 112, 0, 0, 0, 0, 0,
4393 0, 0, 112, 0, 0, 0, 0, 0, 113, 0,
4394 0, 0, 0, 112, 0, 112, 112, 0, 0, 0,
4395 0, 0, 0, 84, 0, 0, 112, 112, 0, 0,
4396 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4397 0, 1115, 1115, 0, 0, 1115, 0, 0, 0, 0,
4398 0, 0, 112, 0, 0, 0, 0, 0, 0, 0,
4399 112, 0, 1115, 0, 0, 113, 0, 0, 0, 0,
4400 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4401 0, 0, 0, 0, 113, 0, 0, 0, 80, 80,
4402 0, 1116, 1116, 0, 0, 0, 0, 0, 1115, 0,
4403 0, 0, 0, 0, 0, 113, 0, 0, 0, 0,
4404 0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4405 0, 1115, 0, 0, 1115, 80, 80, 0, 0, 306,
4406 0, 0, 0, 0, 0, 0, 0, 0, 1115, 0,
4407 1115, 0, 0, 1115, 1115, 0, 1116, 1116, 1115, 1115,
4408 1116, 113, 113, 0, 113, 113, 0, 0, 0, 0,
4409 0, 0, 306, 113, 0, 0, 0, 1116, 113, 0,
4410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4411 0, 306, 306, 306, 0, 80, 0, 0, 0, 0,
4412 0, 0, 112, 0, 112, 112, 0, 0, 0, 0,
4413 0, 0, 0, 1116, 1115, 0, 0, 0, 0, 0,
4414 0, 0, 113, 0, 113, 0, 0, 0, 0, 0,
4415 0, 0, 113, 0, 0, 0, 1116, 0, 0, 1116,
4416 0, 0, 0, 113, 0, 113, 113, 0, 0, 0,
4417 0, 0, 0, 1116, 0, 1116, 113, 113, 1116, 1116,
4418 0, 0, 0, 1116, 1116, 1115, 0, 0, 0, 1115,
4419 112, 1115, 0, 0, 0, 0, 0, 0, 0, 0,
4420 0, 0, 113, 0, 0, 0, 0, 112, 0, 0,
4421 113, 0, 112, 112, 0, 0, 1117, 1117, 112, 112,
4422 0, 0, 0, 0, 0, 0, 0, 112, 112, 0,
4423 0, 0, 0, 80, 0, 0, 0, 0, 0, 1116,
4424 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4425 1115, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4426 80, 0, 112, 0, 0, 0, 0, 0, 0, 80,
4427 0, 1117, 1117, 0, 0, 1117, 0, 0, 0, 0,
4428 0, 0, 0, 0, 0, 112, 112, 112, 80, 0,
4429 1116, 0, 1117, 0, 1116, 0, 1116, 0, 0, 0,
4430 0, 0, 112, 0, 22, 23, 24, 25, 306, 0,
4431 0, 0, 0, 0, 0, 0, 0, 0, 0, 112,
4432 31, 32, 33, 0, 0, 0, 0, 0, 1117, 0,
4433 40, 41, 42, 43, 44, 0, 0, 0, 80, 0,
4434 1118, 1118, 113, 0, 113, 113, 0, 0, 0, 0,
4435 0, 1117, 0, 0, 1117, 1116, 0, 0, 0, 0,
4436 0, 0, 0, 0, 0, 0, 80, 306, 1117, 0,
4437 1117, 0, 0, 1117, 1117, 0, 0, 0, 1117, 1117,
4438 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4439 0, 0, 0, 0, 0, 1118, 1118, 0, 112, 1118,
4440 0, 112, 112, 80, 0, 0, 80, 112, 0, 0,
4441 113, 0, 0, 80, 80, 0, 1118, 0, 304, 0,
4442 0, 112, 0, 0, 112, 1119, 1119, 113, 0, 0,
4443 0, 0, 113, 113, 1117, 0, 0, 0, 113, 113,
4444 0, 0, 0, 112, 0, 0, 0, 113, 113, 0,
4445 0, 0, 1118, 0, 80, 0, 0, 0, 0, 0,
4446 0, 0, 0, 113, 0, 112, 0, 0, 0, 0,
4447 0, 0, 0, 0, 0, 1118, 80, 0, 1118, 112,
4448 1119, 1119, 113, 0, 1119, 1117, 0, 0, 0, 1117,
4449 0, 1117, 1118, 0, 1118, 0, 0, 1118, 1118, 0,
4450 0, 1119, 1118, 1118, 0, 113, 113, 113, 0, 0,
4451 0, 80, 0, 0, 0, 0, 0, 81, 0, 0,
4452 0, 0, 113, 0, 0, 0, 0, 0, 306, 0,
4453 80, 81, 81, 112, 0, 0, 0, 1119, 0, 113,
4454 112, 112, 0, 0, 0, 112, 0, 0, 0, 0,
4455 1117, 80, 0, 0, 0, 0, 0, 80, 1118, 0,
4456 1119, 0, 0, 1119, 0, 0, 0, 0, 81, 81,
4457 0, 0, 307, 0, 0, 0, 0, 1119, 0, 1119,
4458 0, 0, 1119, 1119, 112, 0, 0, 1119, 1119, 0,
4459 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4460 0, 80, 0, 0, 0, 307, 0, 0, 0, 1118,
4461 0, 306, 0, 1118, 80, 1118, 0, 0, 113, 0,
4462 0, 113, 113, 0, 307, 307, 307, 113, 81, 0,
4463 0, 1120, 1120, 0, 0, 0, 0, 0, 0, 0,
4464 0, 113, 0, 1119, 113, 0, 0, 0, 0, 0,
4465 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4466 80, 0, 0, 113, 0, 1121, 1121, 0, 80, 0,
4467 0, 0, 0, 0, 1118, 0, 0, 0, 0, 80,
4468 0, 80, 0, 0, 0, 113, 1120, 1120, 0, 0,
4469 1120, 0, 80, 80, 1119, 0, 0, 0, 1119, 113,
4470 1119, 0, 0, 0, 0, 0, 0, 1120, 0, 0,
4471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4472 1121, 1121, 0, 0, 1121, 0, 80, 0, 0, 0,
4473 0, 0, 306, 0, 0, 0, 0, 0, 0, 0,
4474 0, 1121, 0, 1120, 0, 0, 81, 0, 0, 0,
4475 0, 0, 0, 113, 0, 0, 0, 0, 0, 1119,
4476 113, 113, 0, 0, 0, 113, 1120, 0, 0, 1120,
4477 0, 81, 0, 81, 0, 0, 0, 1121, 0, 0,
4478 0, 0, 81, 1120, 0, 1120, 0, 0, 1120, 1120,
4479 0, 0, 0, 1120, 1120, 938, 0, 0, 0, 0,
4480 1121, 81, 0, 1121, 113, 0, 0, 0, 306, 0,
4481 0, 0, 0, 0, 0, 0, 0, 1121, 0, 1121,
4482 0, 307, 1121, 1121, 0, 0, 0, 1121, 1121, 368,
4483 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4484 379, 380, 0, 0, 0, 0, 381, 382, 0, 1120,
4485 0, 81, 0, 0, 0, 0, 0, 0, 0, 0,
4486 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4487 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4488 307, 0, 0, 1121, 141, 0, 384, 0, 385, 386,
4489 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4490 1120, 0, 0, 0, 1120, 0, 1120, 0, 0, 0,
4491 0, 0, 0, 0, 0, 0, 81, 0, 0, 81,
4492 0, 0, 0, 0, 0, 0, 81, 81, 0, 0,
4493 0, 0, 0, 0, 1121, 141, 141, 0, 1121, 313,
4494 1121, 0, 0, 80, 0, 0, 0, 0, 80, 80,
4495 0, 0, 0, 0, 80, 80, 0, 0, 0, 0,
4496 0, 0, 0, 80, 0, 1120, 0, 81, 0, 0,
4497 0, 0, 313, 0, 0, 0, 0, 0, 0, 80,
4498 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4499 0, 422, 432, 432, 0, 0, 0, 0, 80, 1121,
4500 0, 0, 0, 0, 638, 639, 0, 0, 640, 0,
4501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4502 0, 80, 80, 80, 81, 0, 0, 0, 188, 189,
4503 190, 191, 192, 193, 194, 195, 196, 0, 80, 197,
4504 198, 307, 0, 81, 0, 199, 200, 201, 202, 0,
4505 0, 0, 0, 0, 0, 80, 0, 0, 0, 203,
4506 204, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4507 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4508 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
4509 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
4510 215, 216, 0, 0, 0, 0, 0, 0, 217, 0,
4511 0, 81, 137, 141, 81, 0, 0, 0, 0, 0,
4512 0, 0, 0, 0, 307, 0, 0, 81, 0, 0,
4513 306, 0, 0, 0, 80, 0, 0, 80, 80, 0,
4514 0, 0, 0, 80, 0, 0, 0, 0, 0, 141,
4515 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4516 80, 0, 0, 137, 137, 0, 0, 311, 141, 0,
4517 0, 81, 0, 81, 0, 0, 0, 0, 0, 0,
4518 0, 81, 0, 0, 0, 0, 0, 0, 313, 0,
4519 0, 0, 81, 0, 81, 0, 0, 0, 0, 0,
4520 311, 80, 0, 0, 0, 81, 81, 0, 0, 0,
4521 0, 0, 0, 0, 0, 80, 0, 0, 141, 420,
4522 430, 430, 430, 0, 0, 0, 0, 0, 0, 306,
4523 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4524 0, 0, 0, 0, 0, 307, 141, 313, 0, 0,
4525 0, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4526 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4527 368, 369, 370, 371, 372, 373, 374, 375, 0, 377,
4528 378, 80, 0, 0, 0, 0, 141, 381, 382, 0,
4529 306, 0, 0, 141, 141, 0, 0, 0, 0, 0,
4530 0, 0, 0, 0, 91, 91, 0, 0, 0, 0,
4531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4532 80, 307, 0, 0, 0, 0, 0, 0, 0, 385,
4533 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4534 0, 137, 0, 0, -815, 0, 0, 0, 0, 0,
4535 0, 0, -815, -815, -815, 0, 0, -815, -815, -815,
4536 417, -815, 0, 0, 0, 0, 0, 0, 0, -815,
4537 -815, -815, 0, 0, 81, 0, 140, 137, 0, 0,
4538 0, -815, -815, 0, -815, -815, -815, -815, -815, 0,
4539 0, 141, 0, 0, 0, 0, 137, 0, 0, 0,
4540 0, 0, 0, 0, 0, 0, 0, 0, 313, 0,
4541 0, 0, -815, -815, 0, 0, 311, 0, 0, 0,
4542 0, 0, 0, 0, 0, 0, 0, 140, 140, 0,
4543 0, 141, 0, 0, 0, 0, 0, 141, 0, 0,
4544 0, -815, -815, 0, 0, 0, 137, 0, 0, 0,
4545 0, 0, 0, 0, 0, 0, 81, 0, 0, 0,
4546 0, 81, 81, 0, -815, 0, 0, 81, 81, 0,
4547 0, 0, 0, 0, 137, 311, 81, 0, 141, 0,
4548 0, 141, 91, 0, 0, 0, 0, 0, 0, 0,
4549 0, 313, 81, 0, 816, -815, -815, 0, -815, 0,
4550 0, 255, -815, 0, -815, 0, 0, 0, 0, 0,
4551 0, 81, 0, 0, 137, 0, 0, 0, 91, 0,
4552 0, 137, 137, 0, 0, 0, 0, 0, 0, 0,
4553 0, 0, 0, 0, 81, 81, 81, 91, 141, 0,
4554 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4555 0, 81, 0, 0, 0, 0, 0, 0, 0, 0,
4556 0, 141, 0, 0, 0, 0, 0, 0, 81, 0,
4557 0, 0, 816, 816, 0, 0, 0, 0, 0, 0,
4558 0, 0, 0, 0, 0, 0, 0, 91, 0, 0,
4559 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4560 0, 0, 0, 0, 0, 140, 816, 0, 0, 0,
4561 0, 0, 313, 0, 0, 91, 0, 0, 0, 137,
4562 0, 896, 0, 0, 0, 0, 0, 0, 0, 0,
4563 0, 0, 0, 0, 0, 0, 311, 0, 0, 0,
4564 0, 140, 0, 307, 0, 0, 0, 81, 0, 0,
4565 81, 81, 0, 0, 0, 91, 81, 0, 0, 137,
4566 140, 0, 91, 91, 0, 137, 0, 0, 0, 0,
4567 81, 0, 0, 81, 22, 23, 24, 25, 0, 0,
4568 0, 0, 0, 0, 0, 0, 0, 0, 313, 0,
4569 31, 32, 33, 1079, 0, 0, 0, 1080, 0, 0,
4570 40, 41, 42, 43, 44, 0, 137, 0, 0, 137,
4571 140, 0, 0, 0, 81, 0, 0, 0, 0, 311,
4572 0, 0, 0, 0, 0, 0, 0, 0, 81, 0,
4573 0, 0, 1082, 1083, 0, 0, 0, 0, 140, 0,
4574 1084, 141, 307, 1085, 0, 1086, 1087, 0, 1088, 0,
4575 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4576 91, 0, 0, 0, 0, 0, 137, 0, 137, 0,
4577 0, 0, 0, 0, 0, 0, 0, 0, 140, 0,
4578 0, 1090, 81, 646, 647, 140, 140, 648, 304, 137,
4579 0, 0, 0, 0, 81, 259, 0, 0, 0, 0,
4580 91, 0, 0, 307, 0, 0, 91, 188, 189, 190,
4581 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
4582 0, 0, 0, 0, 199, 200, 201, 202, 816, 816,
4583 0, 0, 0, 81, 816, 816, 0, 0, 203, 204,
4584 311, 0, 0, 141, 0, 0, 0, 91, 0, 0,
4585 91, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4586 0, 0, 0, 810, 0, 0, 0, 0, 205, 206,
4587 207, 208, 209, 210, 211, 212, 213, 214, 141, 215,
4588 216, 0, 0, 140, 0, 0, 0, 217, 368, 369,
4589 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4590 380, 141, 141, 816, 0, 381, 382, 91, 0, 91,
4591 0, 0, 0, 0, 0, 0, 311, 0, 816, 0,
4592 0, 0, 0, 140, 0, 0, 0, 0, 0, 140,
4593 91, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4594 0, 810, 810, 0, 0, 384, 0, 385, 386, 387,
4595 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4596 0, 0, 0, 0, 259, 0, 0, 0, 0, 137,
4597 140, 0, 0, 140, 0, 810, 0, 22, 23, 24,
4598 25, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4599 0, 0, 0, 31, 32, 33, 1079, 0, 0, 0,
4600 1080, 0, 1081, 40, 41, 42, 43, 44, 0, 0,
4601 1197, 0, 0, 0, 141, 0, 0, 141, 141, 0,
4602 0, 0, 563, 141, 0, 0, 0, 0, 0, 0,
4603 140, 0, 140, 0, 0, 1082, 1083, 141, 0, 0,
4604 141, 0, 0, 1084, 0, 0, 1085, 0, 1086, 1087,
4605 0, 1088, 567, 140, 57, 58, 1089, 60, 61, 62,
4606 63, 64, 65, 0, 140, 140, 0, 0, 0, 0,
4607 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4608 0, 141, 0, 0, 1090, 0, 0, 137, 0, 0,
4609 0, 304, 0, 0, 0, 141, 0, 0, 140, 0,
4610 0, 0, 0, 0, 0, 0, 137, 0, 0, 432,
4611 91, 0, 239, 239, 368, 369, 370, 371, 372, 373,
4612 374, 375, 376, 377, 378, 379, 380, 0, 0, 137,
4613 137, 381, 382, 0, 0, 0, 0, 0, 0, 0,
4614 0, 0, 0, 0, 276, 280, 281, 282, 0, 0,
4615 0, 239, 239, 0, 0, 0, 0, 0, 0, 0,
4616 0, 141, 0, 137, 329, 330, 0, 0, 0, 0,
4617 432, 384, 0, 385, 386, 387, 388, 389, 390, 391,
4618 392, 393, 394, 0, 0, 0, 0, 0, 0, 0,
4619 0, 0, 0, 0, 0, 0, 0, 810, 810, 0,
4620 141, 0, 0, 810, 810, 0, 0, 0, 0, 239,
4621 0, 0, 91, 0, 368, 369, 370, 371, 372, 373,
4622 374, 375, 376, 377, 378, -816, -816, 0, 91, 0,
4623 0, 381, 382, 140, 0, 0, 0, 0, 1195, 0,
4624 0, 0, 137, 0, 0, 137, 137, 91, 0, 0,
4625 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4626 0, 0, 0, 0, 0, 137, 0, 0, 137, 0,
4627 91, 91, 810, 385, 386, 387, 388, 389, 390, 391,
4628 392, 393, 394, 0, 0, 0, 0, 810, 0, 0,
4629 0, 0, 0, 0, 0, 0, 368, -816, -816, -816,
4630 -816, 373, 374, 0, 91, -816, -816, 0, 0, 137,
4631 0, 0, 0, 381, 382, 0, 0, 0, 0, 0,
4632 140, 140, 0, 137, 0, 239, 140, 140, 239, 239,
4633 239, 0, 329, 0, 0, 140, 0, 430, 0, 0,
4634 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4635 0, 140, 239, 0, 239, 385, 386, 387, 388, 389,
4636 390, 391, 392, 393, 394, 0, 0, 0, 0, 0,
4637 140, 0, 0, 0, 0, 0, 0, 0, 0, 1193,
4638 0, 0, 0, 91, 0, 0, 91, 91, 0, 137,
4639 0, 0, 91, 140, 140, 140, 0, 0, 430, 0,
4640 0, 0, 0, 0, 0, 0, 91, 0, 0, 91,
4641 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4642 0, 0, 0, 0, 0, 0, 0, 140, 137, 0,
4643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4645 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4646 0, 0, 0, 0, 91, 613, 614, 615, 616, 617,
4647 0, 0, 618, 619, 620, 621, 622, 623, 624, 625,
4648 0, 627, 0, 0, 628, 629, 630, 631, 632, 633,
4649 634, 635, 636, 637, 0, 0, 0, 239, 0, 0,
4650 0, 0, 0, 0, 0, 0, 140, 0, 0, 140,
4651 140, 0, 0, 0, 0, 140, 0, 0, 368, 369,
4652 370, 371, 372, 373, 374, 0, 0, 377, 378, 140,
4653 91, 0, 140, 0, 0, 381, 382, 0, 0, 0,
4654 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
4655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4656 0, 0, 0, 0, 0, 239, 239, 0, 0, 91,
4657 239, 0, 0, 140, 239, 0, 282, 385, 386, 387,
4658 388, 389, 390, 391, 392, 393, 394, 140, 0, -797,
4659 0, 0, 0, 0, 716, 0, 0, -797, -797, -797,
4660 0, 0, -797, -797, -797, 0, -797, 0, 0, 239,
4661 0, 0, 239, 0, -797, -797, -797, -797, -797, 0,
4662 0, 0, 0, 0, 239, 0, -797, -797, 0, -797,
4663 -797, -797, -797, -797, 0, 0, 0, 0, 0, 0,
4664 0, 0, 748, 0, 0, 0, 0, 0, 0, 0,
4665 0, 0, 0, 140, 0, 0, 0, -797, -797, 0,
4666 0, 0, 0, 0, 0, 0, 0, -797, -797, -797,
4667 -797, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4668 0, 0, 0, 239, -797, -797, -797, -797, 0, 878,
4669 -797, 780, 140, 0, 780, -797, 0, 0, 0, 0,
4670 0, 0, 0, 239, 0, 0, 0, 0, 811, -797,
4671 0, 0, -797, 0, 0, 0, 0, 0, 0, 0,
4672 0, 0, 0, -146, -797, -797, -797, -797, -797, -797,
4673 -797, -797, -797, -797, -797, -797, 0, 0, 0, 0,
4674 -797, -797, -797, -797, -797, 0, 0, -797, -797, -797,
4675 0, 0, 22, 23, 24, 25, 0, 0, 0, 0,
4676 0, 0, 239, 0, 0, 0, 0, 0, 31, 32,
4677 33, 1079, 0, 239, 0, 1080, 0, 0, 40, 41,
4678 42, 43, 44, 0, 0, 0, 870, 870, 0, 0,
4679 239, 870, 0, 0, 0, 0, 0, 0, 0, 0,
4680 0, 0, 870, 870, 0, 0, 239, 0, 239, 0,
4681 1082, 1083, 0, 0, 0, 780, 780, 0, 1084, 0,
4682 870, 1085, 0, 1086, 1087, 0, 1088, 0, 0, 57,
4683 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4685 0, 0, 0, 0, 0, 0, 0, 0, 0, 1090,
4686 0, 0, 0, 0, 239, 0, 304, 0, 0, 0,
4687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4688 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4689 0, 0, 239, 0, 0, 0, 0, 0, -4, 3,
4690 0, 4, 5, 6, 7, 8, -4, -4, -4, 9,
4691 10, 0, -4, -4, 11, -4, 12, 13, 14, 15,
4692 16, 17, 18, -4, 239, 0, 0, 0, 19, 20,
4693 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4694 0, 0, 239, 27, 28, 284, 30, 31, 32, 33,
4695 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4696 43, 44, 45, 46, 0, 0, -4, 0, 0, 0,
4697 0, 0, 870, 0, 47, 48, 0, 0, 0, 0,
4698 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4699 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4700 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4701 59, 60, 61, 62, 63, 64, 65, 0, -4, 0,
4702 780, 0, 0, 0, 0, 0, 0, 0, 0, 239,
4703 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4704 0, 1029, 870, 870, 0, 66, 67, 68, 870, 870,
4705 -4, 0, 239, 0, 0, 0, -4, 0, 546, 0,
4706 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4707 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4708 0, 0, 870, 870, 0, 870, 870, 0, 239, 0,
4709 780, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4710 0, 0, 0, 0, 0, 0, 0, 0, 0, 1070,
4711 1071, 0, 0, 239, 0, 0, 0, 870, 1077, 0,
4712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4713 0, 0, 870, 0, 0, 0, 0, 0, 0, -815,
4714 3, 0, 4, 5, 6, 7, 8, 0, 239, 0,
4715 9, 10, 0, 0, 0, 11, 870, 12, 13, 14,
4716 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
4717 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
4718 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
4719 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4720 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
4721 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4723 49, 50, 0, 239, 0, 0, 0, 0, 51, 0,
4724 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
4725 58, 59, 60, 61, 62, 63, 64, 65, 0, -815,
4726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4728 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4729 0, -815, 3, -815, 4, 5, 6, 7, 8, -815,
4730 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
4731 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
4732 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4733 26, 0, 0, 0, 0, 0, 27, 28, 29, 30,
4734 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4735 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
4736 0, 0, 0, 239, 0, 0, 0, 47, 48, 0,
4737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4738 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
4739 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
4740 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4743 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4744 68, 0, 0, -4, 3, -815, 4, 5, 6, 7,
4745 8, -815, 0, 0, 9, 10, 0, 0, 0, 11,
4746 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
4747 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4748 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
4749 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4750 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4751 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
4752 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4753 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4754 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
4755 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4756 64, 65, 0, 0, 0, 0, 0, 0, 0, -695,
4757 0, 0, 0, 0, 0, 0, 0, -695, -695, -695,
4758 0, 0, -695, -695, -695, 0, -695, 0, 0, 0,
4759 66, 67, 68, 0, -695, -4, -695, -695, -695, 0,
4760 0, 0, 0, 546, 0, 0, -695, -695, 0, -695,
4761 -695, -695, -695, -695, 0, 0, 0, 0, 0, 0,
4762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4763 0, 0, 0, 0, 0, 0, 0, -695, -695, 0,
4764 0, 0, 0, 0, 0, 0, 0, -695, -695, -695,
4765 -695, -695, -695, -695, -695, -695, -695, -695, -695, -695,
4766 0, 0, 0, 0, -695, -695, -695, -695, 0, -695,
4767 -695, 0, 0, 0, 0, -695, 0, 0, 0, 0,
4768 0, 0, 0, 0, 0, 0, 0, 0, 0, -695,
4769 0, 0, -695, 0, 0, 0, 0, 0, 0, 0,
4770 0, 0, 0, -695, -695, -695, -695, -695, -695, -695,
4771 -695, -695, -695, -695, -695, -695, 0, 0, 0, 0,
4772 0, -695, -695, -695, -695, -696, 0, -695, -695, -695,
4773 0, 0, 0, -696, -696, -696, 0, 0, -696, -696,
4774 -696, 0, -696, 0, 0, 0, 0, 0, 0, 0,
4775 -696, 0, -696, -696, -696, 0, 0, 0, 0, 0,
4776 0, 0, -696, -696, 0, -696, -696, -696, -696, -696,
4777 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4779 0, 0, 0, -696, -696, 0, 0, 0, 0, 0,
4780 0, 0, 0, -696, -696, -696, -696, -696, -696, -696,
4781 -696, -696, -696, -696, -696, -696, 0, 0, 0, 0,
4782 -696, -696, -696, -696, 0, -696, -696, 0, 0, 0,
4783 0, -696, 0, 0, 0, 0, 0, 0, 0, 0,
4784 0, 0, 0, 0, 0, -696, 0, 0, -696, 0,
4785 0, 0, 0, 0, 0, 0, 0, 0, 0, -696,
4786 -696, -696, -696, -696, -696, -696, -696, -696, -696, -696,
4787 -696, -696, 0, 0, 0, 0, 0, -696, -696, -696,
4788 -696, -798, 0, -696, -696, -696, 0, 0, 0, -798,
4789 -798, -798, 0, 0, -798, -798, -798, 0, -798, 0,
4790 0, 0, 0, 0, 0, 0, -798, -798, -798, -798,
4791 -798, 0, 0, 0, 0, 0, 0, 0, -798, -798,
4792 0, -798, -798, -798, -798, -798, 0, 0, 0, 0,
4793 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4794 0, 0, 0, 0, 0, 0, 0, 0, 0, -798,
4795 -798, 0, 0, 0, 0, 0, 0, 0, 0, -798,
4796 -798, -798, -798, -798, -798, -798, -798, -798, -798, -798,
4797 -798, -798, 0, 0, 0, 0, -798, -798, -798, -798,
4798 0, 0, -798, 0, 0, 0, 0, -798, 0, 0,
4799 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4800 0, -798, 0, 0, -798, 0, 0, 0, 0, 0,
4801 0, 0, 0, 0, 0, 0, -798, -798, -798, -798,
4802 -798, -798, -798, -798, -798, -798, -798, -798, 0, 0,
4803 0, 0, -798, -798, -798, -798, -798, -799, 0, -798,
4804 -798, -798, 0, 0, 0, -799, -799, -799, 0, 0,
4805 -799, -799, -799, 0, -799, 0, 0, 0, 0, 0,
4806 0, 0, -799, -799, -799, -799, -799, 0, 0, 0,
4807 0, 0, 0, 0, -799, -799, 0, -799, -799, -799,
4808 -799, -799, 0, 0, 0, 0, 0, 0, 0, 0,
4809 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4810 0, 0, 0, 0, 0, -799, -799, 0, 0, 0,
4811 0, 0, 0, 0, 0, -799, -799, -799, -799, -799,
4812 -799, -799, -799, -799, -799, -799, -799, -799, 0, 0,
4813 0, 0, -799, -799, -799, -799, 0, 0, -799, 0,
4814 0, 0, 0, -799, 0, 0, 0, 0, 0, 0,
4815 0, 0, 0, 0, 0, 0, 0, -799, 0, 0,
4816 -799, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4817 0, 0, -799, -799, -799, -799, -799, -799, -799, -799,
4818 -799, -799, -799, -799, 0, 0, 0, 0, -799, -799,
4819 -799, -799, -799, -510, 0, -799, -799, -799, 0, 0,
4820 0, -510, -510, -510, 0, 0, -510, -510, -510, 0,
4821 -510, 0, 0, 0, 0, 0, 0, 0, -510, -510,
4822 -510, -510, 0, 0, 0, 0, 0, 0, 0, 0,
4823 -510, -510, 0, -510, -510, -510, -510, -510, 0, 0,
4824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4826 0, -510, -510, 0, 0, 0, 0, 0, 0, 0,
4827 0, -510, -510, -510, -510, -510, -510, -510, -510, -510,
4828 -510, -510, -510, -510, 0, 0, 0, 0, -510, -510,
4829 -510, -510, 0, 0, -510, 0, 0, 0, 0, -510,
4830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4831 0, 0, 0, -510, 0, 0, 0, 0, 0, 0,
4832 0, 0, 0, 0, 0, 0, 0, 0, -510, 0,
4833 -510, -510, -510, -510, -510, -510, -510, -510, -510, -510,
4834 0, 0, 0, 0, -510, -510, -510, -510, -510, -350,
4835 255, -510, -510, -510, 0, 0, 0, -350, -350, -350,
4836 0, 0, -350, -350, -350, 0, -350, 0, 0, 0,
4837 0, 0, 0, 0, -350, 0, -350, -350, -350, 0,
4838 0, 0, 0, 0, 0, 0, -350, -350, 0, -350,
4839 -350, -350, -350, -350, 0, 0, 0, 0, 0, 0,
4840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4841 0, 0, 0, 0, 0, 0, 0, -350, -350, 0,
4842 0, 0, 0, 0, 0, 0, 0, -350, -350, -350,
4843 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4844 0, 0, 0, 0, -350, -350, -350, -350, 0, 0,
4845 -350, 0, 0, 0, 0, -350, 0, 0, 0, 0,
4846 0, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4847 0, 0, -350, 0, 0, 0, 0, 0, 0, 0,
4848 0, 0, 0, 0, -350, -350, -350, -350, -350, -350,
4849 -350, -350, -350, -350, -350, -350, 0, 0, 0, 0,
4850 0, -350, -350, -350, -350, -815, 0, -350, -350, -350,
4851 0, 0, 0, -815, -815, -815, 0, 0, -815, -815,
4852 -815, 0, -815, 0, 0, 0, 0, 0, 0, 0,
4853 -815, -815, -815, -815, 0, 0, 0, 0, 0, 0,
4854 0, 0, -815, -815, 0, -815, -815, -815, -815, -815,
4855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4857 0, 0, 0, -815, -815, 0, 0, 0, 0, 0,
4858 0, 0, 0, -815, -815, -815, -815, -815, -815, -815,
4859 -815, -815, -815, -815, -815, -815, 0, 0, 0, 0,
4860 -815, -815, -815, -815, 0, 0, -815, 0, 0, 0,
4861 0, -815, 0, 0, 0, 0, 0, 0, 0, 0,
4862 0, 0, 0, 0, 0, -815, 0, 0, 0, 0,
4863 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4864 -815, 0, -815, -815, -815, -815, -815, -815, -815, -815,
4865 -815, -815, 0, 0, 0, 0, -815, -815, -815, -815,
4866 -815, -356, 255, -815, -815, -815, 0, 0, 0, -356,
4867 -356, -356, 0, 0, -356, -356, -356, 0, -356, 0,
4868 0, 0, 0, 0, 0, 0, -356, 0, -356, -356,
4869 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4870 0, -356, -356, -356, -356, -356, 0, 0, 0, 0,
4871 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4872 0, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4873 -356, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4874 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4875 -356, -356, 0, 0, 0, 0, -356, -356, -356, -356,
4876 0, 879, -356, 0, 0, 0, 0, -356, 0, 0,
4877 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4878 0, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4879 0, 0, 0, 0, 0, -147, -356, 0, -356, -356,
4880 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
4881 0, 0, 822, -356, -356, -356, -356, -363, 0, -356,
4882 -356, -356, 0, 0, 0, -363, -363, -363, 0, 0,
4883 -363, -363, -363, 0, -363, 0, 0, 0, 0, 0,
4884 0, 0, -363, 0, -363, -363, 0, 0, 0, 0,
4885 0, 0, 0, 0, -363, -363, 0, -363, -363, -363,
4886 -363, -363, 0, 0, 0, 0, 0, 0, 0, 0,
4887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4888 0, 0, 0, 0, 0, -363, -363, 0, 0, 0,
4889 0, 0, 0, 0, 0, -363, -363, -363, -363, -363,
4890 -363, -363, -363, -363, -363, -363, -363, -363, 0, 0,
4891 0, 0, -363, -363, -363, -363, 0, 0, -363, 0,
4892 0, 0, 0, -363, 0, 0, 0, 0, 0, 0,
4893 0, 0, 0, 0, 0, 0, 0, -363, 0, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4895 0, 0, -363, 0, -363, -363, -363, -363, -363, -363,
4896 -363, -363, -363, -363, 0, 0, 0, 0, 0, -363,
4897 -363, -363, -363, -797, 451, -363, -363, -363, 0, 0,
4898 0, -797, -797, -797, 0, 0, 0, -797, -797, 0,
4899 -797, 0, 0, 0, 0, 0, 0, 0, -797, -797,
4900 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4901 -797, -797, 0, -797, -797, -797, -797, -797, 0, 0,
4902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4903 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4904 0, -797, -797, 0, 0, 0, 0, 0, 0, 0,
4905 0, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4906 -797, -797, -797, -797, 0, 0, 0, 0, -797, -797,
4907 -797, -797, 0, 820, -797, 0, 0, 0, 0, 0,
4908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4909 0, 0, 0, -797, 0, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, 0, 0, -146, -797, 0,
4911 -797, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4912 0, 0, 0, 0, -797, -797, -797, -797, -137, -797,
4913 0, -797, 0, -797, 0, 0, 0, -797, -797, -797,
4914 0, 0, 0, -797, -797, 0, -797, 0, 0, 0,
4915 0, 0, 0, 0, -797, -797, 0, 0, 0, 0,
4916 0, 0, 0, 0, 0, 0, -797, -797, 0, -797,
4917 -797, -797, -797, -797, 0, 0, 0, 0, 0, 0,
4918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4919 0, 0, 0, 0, 0, 0, 0, -797, -797, 0,
4920 0, 0, 0, 0, 0, 0, 0, -797, -797, -797,
4921 -797, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4922 0, 0, 0, 0, -797, -797, -797, -797, 0, 820,
4923 -797, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4924 0, 0, 0, 0, 0, 0, 0, 0, 0, -797,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, 0, 0, -146, -797, 0, -797, -797, -797, -797,
4927 -797, -797, -797, -797, -797, -797, 0, 0, 0, 0,
4928 -797, -797, -797, -797, -797, -356, 0, -797, 0, -797,
4929 0, 0, 0, -356, -356, -356, 0, 0, 0, -356,
4930 -356, 0, -356, 0, 0, 0, 0, 0, 0, 0,
4931 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4932 0, 0, -356, -356, 0, -356, -356, -356, -356, -356,
4933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4934 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4935 0, 0, 0, -356, -356, 0, 0, 0, 0, 0,
4936 0, 0, 0, -356, -356, -356, -356, -356, -356, -356,
4937 -356, -356, -356, -356, -356, -356, 0, 0, 0, 0,
4938 -356, -356, -356, -356, 0, 821, -356, 0, 0, 0,
4939 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4940 0, 0, 0, 0, 0, -356, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, 0, 0, -147,
4942 -356, 0, -356, -356, -356, -356, -356, -356, -356, -356,
4943 -356, -356, 0, 0, 0, 0, 822, -356, -356, -356,
4944 -138, -356, 0, -356, 0, -356, 0, 0, 0, -356,
4945 -356, -356, 0, 0, 0, -356, -356, 0, -356, 0,
4946 0, 0, 0, 0, 0, 0, -356, 0, 0, 0,
4947 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4948 0, -356, -356, -356, -356, -356, 0, 0, 0, 0,
4949 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4950 0, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4951 -356, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4952 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4953 -356, -356, 0, 0, 0, 0, -356, -356, -356, -356,
4954 0, 821, -356, 0, 0, 0, 0, 0, 0, 0,
4955 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4956 0, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, 0, 0, -147, -356, 0, -356, -356,
4958 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
4959 0, 0, 822, -356, -356, -356, -356, 0, 0, -356,
4960 3, -356, 4, 5, 6, 7, 8, -815, -815, -815,
4961 9, 10, 0, 0, -815, 11, 0, 12, 13, 14,
4962 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
4963 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
4964 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
4965 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4966 42, 43, 44, 45, 46, 0, 0, -815, 0, 0,
4967 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4968 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4969 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
4970 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
4971 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4974 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4975 0, 0, 3, -815, 4, 5, 6, 7, 8, -815,
4976 0, -815, 9, 10, 0, -815, -815, 11, 0, 12,
4977 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
4978 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4979 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
4980 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4981 40, 41, 42, 43, 44, 45, 46, 0, 0, -815,
4982 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4983 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4984 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
4985 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
4986 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4988 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4989 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4990 68, 0, 0, 0, 3, -815, 4, 5, 6, 7,
4991 8, -815, 0, -815, 9, 10, 0, 0, -815, 11,
4992 -815, 12, 13, 14, 15, 16, 17, 18, 0, 0,
4993 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4994 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
4995 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4996 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4997 0, -815, 0, 0, 0, 0, 0, 0, 0, 47,
4998 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4999 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5000 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5001 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5002 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5004 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5005 66, 67, 68, 0, 0, 0, 3, -815, 4, 5,
5006 6, 7, 8, -815, 0, -815, 9, 10, 0, 0,
5007 -815, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5008 -815, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5009 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5010 27, 28, 284, 30, 31, 32, 33, 34, 35, 36,
5011 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5012 46, 0, 0, -815, 0, 0, 0, 0, 0, 0,
5013 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5014 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5015 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
5016 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5017 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5020 0, 0, 66, 67, 68, 0, 0, 0, 3, -815,
5021 4, 5, 6, 7, 8, -815, 0, -815, 9, 10,
5022 0, 0, -815, 11, 0, 12, 13, 14, 15, 16,
5023 17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
5024 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5025 0, 0, 27, 28, 284, 30, 31, 32, 33, 34,
5026 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5027 44, 45, 46, 0, 0, -815, 0, 0, 0, 0,
5028 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5029 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5030 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
5031 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5032 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, 0, 66, 67, 68, 0, 0, 0,
5036 3, -815, 4, 5, 6, 7, 8, -815, -815, -815,
5037 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5038 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5039 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5040 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
5041 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5042 42, 43, 44, 45, 46, 0, 0, -815, 0, 0,
5043 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5044 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5045 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5046 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5047 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
5051 0, 0, 3, -815, 4, 5, 6, 7, 8, -815,
5052 0, -815, 9, 10, 0, 0, 0, 11, 0, 12,
5053 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5054 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5055 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5056 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5057 40, 41, 42, 43, 44, 45, 46, 0, 0, -815,
5058 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5060 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5061 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5062 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5064 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5065 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5066 68, 0, 0, 0, 3, -815, 4, 5, 6, 7,
5067 8, -815, 0, 0, 9, 10, 0, 0, 0, 11,
5068 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5069 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5070 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5071 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5072 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5073 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5074 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5075 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5076 0, 0, 51, 0, 0, 285, 53, 54, 55, 0,
5077 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5078 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5079 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5080 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5081 66, 67, 68, 0, 0, 0, 0, -815, 0, 0,
5082 0, -815, 3, -815, 4, 5, 6, 7, 8, 0,
5083 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5084 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5085 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5086 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5087 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5088 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5089 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5091 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5092 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5093 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5094 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5096 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5097 68, 0, 0, 0, 0, -815, 0, 0, 0, -815,
5098 3, -815, 4, 5, 6, 7, 8, 0, 0, 0,
5099 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5100 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5101 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5102 0, 0, 0, 0, 27, 28, 29, 30, 31, 32,
5103 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5104 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5105 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5107 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5108 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5109 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5112 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
5113 0, -815, 3, -815, 4, 5, 6, 7, 8, -815,
5114 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5115 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5116 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5117 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5118 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5119 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5120 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5122 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5123 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5124 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5127 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5128 68, 0, 0, -815, 404, -815, 4, 5, 6, 0,
5129 8, -815, 0, 0, 9, 10, 0, 0, 0, 11,
5130 -3, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5131 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5132 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5133 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5134 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5135 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5136 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5137 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5138 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5139 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5140 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5143 66, 67, 68, 0, 0, 0, 0, 331, 0, 0,
5144 0, 0, 0, 332, 144, 145, 146, 147, 148, 149,
5145 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5146 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5147 0, 168, 169, 170, 434, 435, 436, 437, 175, 176,
5148 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5149 438, 439, 440, 441, 186, 36, 37, 442, 39, 0,
5150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5151 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5152 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5153 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5154 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5156 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5157 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5158 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5159 216, 0, 0, 0, 0, 0, 0, 217, 443, 144,
5160 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5161 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5162 165, 166, 167, 0, 0, 0, 168, 169, 170, 171,
5163 172, 173, 174, 175, 176, 177, 0, 0, 0, 0,
5164 0, 178, 179, 180, 181, 182, 183, 184, 185, 186,
5165 36, 37, 187, 39, 0, 0, 0, 0, 0, 0,
5166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5167 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5168 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5169 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5170 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5171 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5172 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5173 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5174 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5175 0, 0, 217, 144, 145, 146, 147, 148, 149, 150,
5176 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5177 161, 162, 163, 164, 165, 166, 167, 0, 0, 0,
5178 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
5179 0, 0, 0, 0, 0, 178, 179, 180, 181, 182,
5180 183, 184, 185, 186, 262, 0, 187, 0, 0, 0,
5181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5182 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5183 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5184 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5185 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5186 0, 58, 0, 0, 0, 0, 0, 0, 0, 0,
5187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5188 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5189 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5190 0, 0, 0, 0, 0, 0, 217, 144, 145, 146,
5191 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5192 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5193 167, 0, 0, 0, 168, 169, 170, 171, 172, 173,
5194 174, 175, 176, 177, 0, 0, 0, 0, 0, 178,
5195 179, 180, 181, 182, 183, 184, 185, 186, 0, 0,
5196 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5198 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5199 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5200 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5201 0, 203, 204, 0, 0, 58, 0, 0, 0, 0,
5202 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5203 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5204 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5205 214, 0, 215, 216, 0, 0, 0, 0, 0, 0,
5206 217, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5207 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5208 163, 164, 165, 166, 167, 0, 0, 0, 168, 169,
5209 170, 171, 172, 173, 174, 175, 176, 177, 0, 0,
5210 0, 0, 0, 178, 179, 180, 181, 182, 183, 184,
5211 185, 186, 0, 0, 187, 0, 0, 0, 0, 0,
5212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5213 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5214 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5215 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5216 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5217 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5219 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5220 210, 211, 212, 213, 214, 0, 215, 216, 4, 5,
5221 6, 0, 8, 0, 217, 0, 9, 10, 0, 0,
5222 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5223 0, 0, 0, 0, 0, 19, 20, 272, 22, 23,
5224 24, 25, 0, 0, 227, 0, 0, 0, 0, 0,
5225 0, 302, 0, 0, 31, 32, 33, 34, 35, 36,
5226 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5227 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5229 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5230 0, 0, 0, 0, 303, 0, 0, 230, 53, 54,
5231 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5232 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5233 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5234 0, 12, 13, 14, 270, 271, 17, 18, 0, 0,
5235 0, 0, 304, 19, 20, 272, 22, 23, 24, 25,
5236 305, 0, 227, 0, 0, 0, 0, 0, 0, 302,
5237 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5238 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5242 0, 0, 303, 0, 0, 230, 53, 54, 55, 0,
5243 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5244 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5245 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5246 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5247 304, 19, 20, 21, 22, 23, 24, 25, 608, 0,
5248 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5249 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5250 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5251 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5253 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5254 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5255 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5256 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5258 0, 0, 0, 4, 5, 6, 0, 8, 66, 235,
5259 68, 9, 10, 0, 0, 259, 11, 0, 12, 13,
5260 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5261 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5262 0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5263 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5264 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5265 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5266 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5267 0, 49, 50, 0, 0, 0, 0, 0, 0, 229,
5268 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5269 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5270 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5272 3, 0, 4, 5, 6, 7, 8, 66, 67, 68,
5273 9, 10, 0, 0, 259, 11, 0, 12, 13, 14,
5274 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5275 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5276 0, 0, 0, 0, 27, 28, 0, 30, 31, 32,
5277 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5278 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5279 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5280 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5281 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5282 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5283 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5284 404, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5285 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5286 15, 16, 17, 18, 0, 0, 66, 67, 68, 19,
5287 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5288 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5289 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5290 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5291 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5293 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5294 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5295 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5296 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5297 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5298 15, 16, 17, 18, 0, 0, 66, 67, 68, 19,
5299 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5300 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5301 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5302 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5303 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5305 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5306 0, 230, 53, 54, 55, 0, 231, 232, 233, 57,
5307 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5308 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5309 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5310 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5311 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5312 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5313 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5314 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5315 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5316 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5317 49, 479, 0, 0, 0, 0, 0, 0, 229, 0,
5318 0, 230, 53, 54, 55, 0, 231, 232, 233, 57,
5319 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5320 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5321 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5322 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5323 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5324 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5325 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5326 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5327 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5329 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5330 0, 230, 53, 54, 55, 0, 231, 232, 233, 57,
5331 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5332 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5333 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5334 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5335 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5336 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5337 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5338 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5339 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5341 49, 479, 0, 0, 0, 0, 0, 0, 229, 0,
5342 0, 230, 53, 54, 55, 0, 231, 232, 233, 57,
5343 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5344 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5345 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5346 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5347 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5348 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5349 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5350 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5351 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5353 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5354 0, 230, 53, 54, 55, 0, 231, 232, 0, 57,
5355 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5356 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5357 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5358 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5359 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5360 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5361 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5362 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5363 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5365 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5366 0, 230, 53, 54, 55, 0, 0, 232, 233, 57,
5367 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5368 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5369 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5370 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5371 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5372 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5373 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5374 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5375 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5377 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5378 0, 230, 53, 54, 55, 0, 0, 232, 0, 57,
5379 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5380 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5381 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5382 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5383 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5384 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5385 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5386 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5387 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5389 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5390 0, 230, 53, 54, 55, 0, 795, 0, 0, 57,
5391 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5392 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5393 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5394 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5395 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5396 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5397 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5398 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5399 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5401 49, 50, 0, 0, 0, 0, 0, 0, 806, 0,
5402 0, 230, 53, 54, 55, 0, 795, 0, 0, 57,
5403 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5404 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5405 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5406 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5407 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5408 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5409 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5410 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5411 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5413 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5414 0, 230, 53, 54, 55, 0, 967, 0, 0, 57,
5415 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5416 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5417 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5418 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5419 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5420 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5421 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5422 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5423 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5425 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5426 0, 230, 53, 54, 55, 0, 1016, 0, 0, 57,
5427 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5428 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5429 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5430 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5431 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5432 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5433 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5434 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5435 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5437 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5438 0, 230, 53, 54, 55, 0, 795, 0, 0, 57,
5439 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5440 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5441 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5442 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5443 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5444 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5445 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5446 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5447 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5449 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5450 0, 230, 53, 54, 55, 0, 1136, 0, 0, 57,
5451 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5452 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5453 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5454 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5455 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5456 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5457 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5458 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5459 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5461 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5462 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5463 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5464 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5465 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5466 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5467 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5468 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5469 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5470 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5471 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5473 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5474 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5475 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5476 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5477 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5478 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5479 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5480 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5481 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5482 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5483 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5485 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5486 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5487 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5488 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5489 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5490 15, 16, 17, 18, 0, 0, 66, 67, 68, 19,
5491 20, 21, 22, 23, 24, 25, 0, 0, 777, 0,
5492 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5493 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5494 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5495 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5497 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5498 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5499 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5500 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5501 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5502 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5503 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5504 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5505 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5506 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5507 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5509 49, 50, 0, 0, 0, 0, 0, 0, 806, 0,
5510 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5511 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5512 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5513 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5514 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5515 20, 272, 22, 23, 24, 25, 0, 0, 886, 0,
5516 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5517 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5518 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5519 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5521 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5522 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5523 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5524 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5525 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5526 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5527 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5528 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5529 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5530 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5533 0, 0, 0, 0, 0, 0, 0, 0, 303, 0,
5534 0, 363, 53, 54, 55, 0, 364, 0, 0, 57,
5535 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5536 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5537 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5538 17, 18, 0, 0, 0, 0, 304, 19, 20, 272,
5539 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5540 0, 0, 0, 302, 0, 0, 31, 32, 33, 34,
5541 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5542 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5545 0, 0, 0, 0, 0, 0, 415, 0, 0, 52,
5546 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5547 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5548 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5549 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5550 0, 0, 0, 0, 304, 19, 20, 272, 22, 23,
5551 24, 25, 0, 0, 227, 0, 0, 0, 0, 0,
5552 0, 302, 0, 0, 31, 32, 33, 423, 35, 36,
5553 37, 424, 39, 0, 40, 41, 42, 43, 44, 45,
5554 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5557 425, 0, 0, 0, 426, 0, 0, 230, 53, 54,
5558 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5559 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5560 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5561 0, 12, 13, 14, 270, 271, 17, 18, 0, 0,
5562 0, 0, 304, 19, 20, 272, 22, 23, 24, 25,
5563 0, 0, 227, 0, 0, 0, 0, 0, 0, 302,
5564 0, 0, 31, 32, 33, 423, 35, 36, 37, 424,
5565 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5567 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5569 0, 0, 426, 0, 0, 230, 53, 54, 55, 0,
5570 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5571 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5572 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5573 13, 14, 270, 271, 17, 18, 0, 0, 0, 0,
5574 304, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5575 227, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5576 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5577 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5579 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5580 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5581 303, 0, 0, 363, 53, 54, 55, 0, 0, 0,
5582 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5583 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5584 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5585 270, 271, 17, 18, 0, 0, 0, 0, 304, 19,
5586 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5587 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5588 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5589 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5592 0, 0, 0, 0, 0, 0, 0, 0, 1192, 0,
5593 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5594 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5595 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5596 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5597 17, 18, 0, 0, 0, 0, 304, 19, 20, 272,
5598 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5599 0, 0, 0, 302, 0, 0, 31, 32, 33, 34,
5600 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5601 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5603 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5604 0, 0, 0, 0, 0, 0, 1291, 0, 0, 230,
5605 53, 54, 55, 22, 23, 24, 25, 57, 58, 59,
5606 60, 61, 62, 63, 64, 65, 0, 0, 0, 31,
5607 32, 33, 1079, 0, 0, 0, 1080, 0, 0, 40,
5608 41, 42, 43, 44, 0, 0, 0, 0, 0, 0,
5609 0, 0, 0, 0, 304, 0, 0, 0, 0, 0,
5610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5611 0, 1082, 1083, 0, 0, 0, 0, 0, 0, 1084,
5612 0, 0, 1085, 0, 1086, 1087, 0, 0, 0, 0,
5613 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5614 0, 0, 0, 0, 700, 639, 0, 0, 701, 0,
5615 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5616 1090, 0, 0, 0, 0, 0, 0, 304, 188, 189,
5617 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5618 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5619 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5620 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5622 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5623 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5624 215, 216, 703, 647, 0, 0, 704, 0, 217, 0,
5625 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5626 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5627 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5628 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5629 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5630 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5631 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5633 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5634 700, 639, 0, 0, 720, 0, 217, 0, 0, 0,
5635 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5636 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5637 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5638 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5639 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5640 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5641 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5642 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5643 210, 211, 212, 213, 214, 0, 215, 216, 731, 639,
5644 0, 0, 732, 0, 217, 0, 0, 0, 0, 0,
5645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5646 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5647 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5648 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5649 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5652 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5653 212, 213, 214, 0, 215, 216, 734, 647, 0, 0,
5654 735, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5656 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5657 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5658 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5659 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5662 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5663 214, 0, 215, 216, 850, 639, 0, 0, 851, 0,
5664 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5665 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5666 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5667 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5668 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5669 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5670 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5671 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5672 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5673 215, 216, 853, 647, 0, 0, 854, 0, 217, 0,
5674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5675 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5676 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5677 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5678 0, 0, 0, 0, 0, 0, 0, 203, 204, 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, 0, 0, 0, 0, 205, 206, 207,
5682 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5683 859, 639, 0, 0, 860, 0, 217, 0, 0, 0,
5684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5685 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5686 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5687 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5688 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5689 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5692 210, 211, 212, 213, 214, 0, 215, 216, 685, 647,
5693 0, 0, 686, 0, 217, 0, 0, 0, 0, 0,
5694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5695 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5696 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5697 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5698 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5700 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5701 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5702 212, 213, 214, 0, 215, 216, 1022, 639, 0, 0,
5703 1023, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5705 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5706 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5707 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5708 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5709 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5712 214, 0, 215, 216, 1025, 647, 0, 0, 1026, 0,
5713 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5714 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5715 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5716 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5717 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5718 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5720 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5721 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5722 215, 216, 1310, 639, 0, 0, 1311, 0, 217, 0,
5723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5724 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5725 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5726 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5727 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5729 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5730 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5731 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5732 1313, 647, 0, 0, 1314, 0, 217, 0, 0, 0,
5733 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5734 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5735 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5736 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5737 0, 0, 0, 0, 0, 203, 204, 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, 0, 0, 205, 206, 207, 208, 209,
5741 210, 211, 212, 213, 214, 0, 215, 216, 1358, 639,
5742 0, 0, 1359, 0, 217, 0, 0, 0, 0, 0,
5743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5744 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5745 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5746 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5747 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5749 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5750 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5751 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5752 0, 0, 217
5753};
5754
5755static const yytype_int16 yycheck[] =
5756{
5757 1, 116, 59, 103, 104, 107, 70, 107, 58, 56,
5758 101, 70, 58, 13, 14, 1, 565, 89, 399, 7,
5759 401, 252, 408, 768, 115, 400, 426, 1, 348, 67,
5760 15, 16, 574, 27, 761, 52, 53, 15, 16, 27,
5761 477, 838, 89, 344, 611, 597, 469, 348, 107, 21,
5762 597, 52, 53, 15, 16, 56, 595, 7, 56, 598,
5763 344, 108, 109, 110, 348, 111, 52, 53, 54, 55,
5764 58, 255, 72, 601, 455, 848, 469, 27, 515, 104,
5765 525, 296, 107, 761, 477, 300, 763, 52, 89, 512,
5766 81, 472, 54, 474, 80, 81, 26, 84, 473, 66,
5767 63, 64, 65, 15, 16, 626, 907, 108, 109, 110,
5768 111, 905, 84, 13, 1165, 0, 285, 25, 25, 1028,
5769 818, 502, 25, 111, 689, 690, 113, 112, 15, 16,
5770 1181, 1284, 320, 321, 112, 1276, 26, 29, 154, 678,
5771 0, 1165, 69, 159, 100, 154, 25, 528, 10, 81,
5772 112, 25, 527, 1189, 1190, 1179, 247, 101, 723, 25,
5773 260, 261, 605, 608, 585, 824, 101, 54, 55, 66,
5774 591, 98, 719, 832, 290, 25, 25, 234, 134, 763,
5775 100, 100, 151, 69, 100, 287, 277, 763, 943, 56,
5776 774, 25, 768, 25, 363, 26, 758, 28, 1153, 761,
5777 112, 1354, 751, 752, 161, 1346, 68, 37, 38, 28,
5778 653, 155, 98, 230, 134, 134, 659, 660, 134, 310,
5779 155, 151, 119, 287, 27, 112, 134, 13, 287, 230,
5780 1139, 123, 13, 305, 155, 120, 155, 337, 338, 339,
5781 340, 157, 342, 343, 230, 1296, 154, 155, 155, 1300,
5782 158, 1302, 155, 484, 154, 155, 1001, 134, 305, 245,
5783 160, 151, 1298, 1064, 13, 266, 252, 157, 285, 255,
5784 255, 1065, 257, 971, 711, 675, 155, 255, 1302, 257,
5785 266, 155, 273, 274, 285, 666, 709, 273, 274, 155,
5786 665, 157, 266, 255, 822, 257, 677, 13, 1053, 285,
5787 272, 676, 13, 275, 305, 155, 155, 13, 157, 409,
5788 1361, 413, 337, 338, 339, 340, 709, 364, 711, 858,
5789 285, 155, 34, 155, 154, 425, 847, 418, 1005, 1284,
5790 1085, 100, 1087, 1288, 335, 451, 1086, 304, 1293, 782,
5791 52, 1138, 274, 786, 100, 257, 363, 25, 52, 1027,
5792 1028, 154, 56, 541, 413, 543, 905, 160, 907, 66,
5793 805, 335, 363, 364, 480, 1138, 364, 483, 154, 911,
5794 257, 923, 488, 154, 160, 307, 923, 363, 134, 160,
5795 945, 946, 101, 134, 409, 13, 951, 952, 955, 505,
5796 154, 1027, 1028, 410, 411, 1350, 160, 1352, 363, 1354,
5797 425, 1356, 403, 846, 827, 154, 849, 58, 157, 410,
5798 411, 160, 119, 401, 400, 400, 100, 403, 1373, 1003,
5799 863, 1005, 400, 1007, 410, 411, 66, 78, 100, 1005,
5800 402, 13, 1187, 1188, 827, 154, 112, 976, 154, 1189,
5801 1190, 157, 428, 154, 160, 13, 993, 155, 154, 160,
5802 134, 100, 134, 525, 160, 13, 134, 108, 109, 1027,
5803 1028, 1139, 134, 579, 295, 296, 451, 455, 699, 300,
5804 1035, 302, 157, 451, 34, 157, 154, 155, 525, 763,
5805 158, 121, 122, 455, 768, 134, 474, 473, 473, 451,
5806 141, 607, 52, 914, 915, 473, 482, 918, 484, 920,
5807 494, 922, 25, 1139, 1182, 69, 494, 508, 78, 932,
5808 15, 1189, 1190, 728, 502, 1064, 1065, 69, 56, 962,
5809 25, 161, 965, 134, 525, 709, 154, 1082, 1083, 972,
5810 69, 548, 160, 97, 98, 978, 608, 596, 109, 451,
5811 528, 527, 527, 1288, 494, 97, 98, 548, 1345, 527,
5812 100, 98, 740, 554, 991, 1282, 100, 745, 939, 98,
5813 941, 608, 548, 155, 451, 940, 1150, 683, 606, 1153,
5814 141, 1139, 154, 611, 144, 145, 146, 1153, 160, 679,
5815 554, 101, 469, 969, 134, 571, 154, 611, 574, 153,
5816 134, 1153, 160, 157, 595, 157, 154, 598, 991, 658,
5817 100, 153, 160, 100, 1282, 1350, 153, 608, 100, 595,
5818 157, 134, 598, 1056, 1182, 715, 594, 157, 1157, 597,
5819 1298, 1189, 1190, 52, 155, 512, 100, 56, 100, 1184,
5820 1185, 154, 155, 154, 157, 158, 157, 134, 655, 755,
5821 657, 152, 134, 154, 606, 1066, 1067, 1068, 1069, 611,
5822 78, 689, 690, 884, 655, 642, 657, 729, 155, 645,
5823 134, 1047, 134, 650, 650, 689, 690, 69, 157, 655,
5824 642, 657, 25, 1215, 994, 1217, 69, 678, 666, 665,
5825 665, 1153, 729, 155, 1084, 723, 134, 665, 738, 677,
5826 676, 676, 678, 994, 69, 97, 98, 691, 676, 723,
5827 1284, 688, 688, 691, 97, 98, 69, 155, 1284, 1293,
5828 994, 78, 1288, 699, 142, 143, 144, 145, 146, 100,
5829 1282, 1005, 1284, 98, 815, 69, 1288, 100, 729, 787,
5830 1298, 1293, 790, 805, 69, 98, 722, 26, 158, 1278,
5831 1060, 691, 1128, 702, 66, 67, 69, 134, 864, 721,
5832 159, 153, 867, 134, 98, 855, 152, 857, 805, 1060,
5833 153, 134, 97, 98, 15, 1208, 17, 883, 1352, 885,
5834 1354, 56, 1356, 66, 733, 98, 1060, 740, 1354, 742,
5835 69, 134, 745, 746, 26, 1327, 1186, 903, 1350, 1373,
5836 1352, 157, 1354, 1214, 1356, 69, 627, 856, 66, 121,
5837 122, 154, 155, 100, 805, 158, 69, 69, 97, 98,
5838 1282, 1373, 1284, 644, 1027, 1028, 1288, 26, 153, 865,
5839 1206, 1293, 709, 97, 98, 155, 119, 69, 121, 122,
5840 855, 124, 857, 54, 97, 98, 98, 134, 69, 78,
5841 928, 69, 930, 64, 65, 154, 69, 161, 834, 158,
5842 836, 119, 838, 121, 122, 97, 98, 858, 155, 599,
5843 69, 961, 151, 603, 153, 100, 69, 98, 157, 1153,
5844 98, 702, 858, 1086, 97, 98, 69, 865, 1350, 153,
5845 1352, 1324, 1354, 100, 1356, 151, 1267, 134, 97, 98,
5846 1103, 1266, 892, 852, 97, 98, 134, 728, 884, 134,
5847 134, 1373, 733, 862, 97, 98, 1296, 945, 946, 151,
5848 1300, 153, 106, 951, 952, 157, 975, 134, 977, 155,
5849 155, 945, 946, 69, 56, 911, 1139, 951, 952, 30,
5850 153, 37, 38, 66, 160, 69, 961, 100, 155, 69,
5851 827, 25, 151, 960, 153, 923, 777, 138, 157, 1162,
5852 153, 97, 98, 941, 940, 940, 155, 69, 155, 960,
5853 153, 134, 940, 97, 98, 152, 1179, 97, 98, 955,
5854 69, 134, 154, 155, 960, 976, 1189, 1190, 995, 83,
5855 84, 158, 1020, 134, 69, 97, 98, 1, 121, 122,
5856 976, 124, 155, 955, 995, 155, 1020, 1035, 97, 98,
5857 1284, 15, 16, 158, 1288, 154, 155, 153, 155, 995,
5858 155, 1035, 97, 98, 1014, 1015, 155, 1018, 1019, 153,
5859 155, 852, 52, 153, 14, 15, 1027, 1028, 155, 58,
5860 155, 862, 1089, 137, 138, 1052, 1179, 134, 52, 53,
5861 1090, 153, 56, 78, 1018, 1019, 1189, 1190, 52, 78,
5862 152, 1052, 155, 67, 153, 886, 1042, 55, 1044, 155,
5863 95, 96, 89, 90, 13, 1024, 1052, 17, 153, 25,
5864 1354, 152, 1188, 40, 41, 89, 1176, 154, 155, 108,
5865 1127, 1082, 1083, 112, 155, 1086, 1072, 1073, 155, 103,
5866 104, 306, 307, 107, 108, 109, 110, 1199, 112, 44,
5867 134, 44, 1103, 1194, 139, 140, 141, 142, 143, 144,
5868 145, 146, 152, 155, 66, 1231, 155, 1134, 1135, 44,
5869 56, 54, 55, 1140, 57, 1241, 1127, 1086, 44, 134,
5870 1131, 64, 65, 1134, 1135, 1199, 136, 1154, 1139, 1140,
5871 1199, 159, 1258, 1259, 1260, 1131, 924, 925, 1134, 1135,
5872 8, 1176, 1138, 1154, 1140, 933, 1157, 52, 936, 15,
5873 938, 1162, 155, 264, 1165, 152, 155, 119, 1154, 121,
5874 122, 1157, 124, 1273, 1274, 155, 155, 155, 1179, 1226,
5875 1181, 1198, 155, 1184, 1185, 155, 689, 690, 1189, 1190,
5876 155, 1248, 155, 1024, 101, 1212, 9, 1198, 66, 139,
5877 155, 52, 705, 706, 139, 1164, 52, 1, 1167, 155,
5878 152, 1212, 1198, 66, 155, 1201, 230, 155, 101, 66,
5879 723, 15, 16, 56, 158, 1226, 1212, 139, 1187, 1215,
5880 228, 1217, 160, 231, 232, 233, 59, 60, 61, 62,
5881 1287, 255, 155, 257, 1245, 155, 260, 261, 1273, 1274,
5882 155, 119, 266, 121, 122, 1086, 1087, 155, 52, 53,
5883 361, 155, 155, 155, 155, 366, 119, 152, 121, 122,
5884 56, 285, 119, 67, 121, 122, 155, 1278, 155, 1267,
5885 1266, 1266, 1268, 155, 1270, 155, 1287, 66, 1266, 155,
5886 157, 305, 1278, 157, 155, 1296, 504, 266, 335, 1300,
5887 1317, 1302, 1261, 1262, 1263, 1131, 508, 106, 865, 103,
5888 104, 1142, 606, 107, 110, 108, 1317, 78, 112, 495,
5889 98, 335, 956, 337, 338, 339, 340, 688, 342, 343,
5890 975, 1317, 1201, 1164, 95, 96, 1167, 751, 905, 1282,
5891 119, 1327, 121, 122, 40, 41, 42, 43, 44, 363,
5892 364, 1224, 1153, 1312, 1288, 1073, 1187, 458, 459, 1345,
5893 1361, 78, 1223, 1346, 1027, 1028, 467, 868, 359, 1345,
5894 1245, 1182, 875, 1182, 475, 476, 1178, 1268, 95, 96,
5895 141, 142, 143, 144, 145, 146, 400, 1270, 119, 403,
5896 543, 111, 1223, 761, 495, 409, 410, 411, 768, 115,
5897 1340, 52, 503, 54, 55, 56, 57, -1, -1, -1,
5898 -1, 425, 52, -1, 54, 55, 56, 57, 58, 1082,
5899 1083, -1, -1, 1086, -1, 142, 143, 144, 145, 146,
5900 1261, 1262, 1263, -1, -1, -1, 230, 451, 78, -1,
5901 1103, -1, 945, 946, -1, -1, -1, -1, 951, 952,
5902 -1, 102, 92, -1, -1, -1, 107, -1, -1, 473,
5903 -1, 255, 102, 257, -1, -1, 260, 261, 108, 109,
5904 468, 469, 266, -1, -1, 52, 1139, 54, 55, 477,
5905 57, 1312, 985, 986, -1, 988, 989, -1, -1, -1,
5906 1321, 285, -1, 52, 508, 54, 55, 56, 57, 1162,
5907 -1, 141, 1165, 52, -1, 54, 55, 56, 57, 1340,
5908 -1, 525, -1, 527, 512, -1, 1179, 515, 1181, -1,
5909 -1, 1184, 1185, -1, -1, 102, 1189, 1190, -1, -1,
5910 -1, -1, 1035, 52, 548, 54, 55, 56, 57, -1,
5911 554, 335, -1, 337, 338, 339, 340, -1, 342, 343,
5912 -1, 652, -1, 102, -1, -1, 1059, -1, -1, -1,
5913 -1, 1225, -1, 1227, -1, -1, -1, -1, -1, 363,
5914 52, -1, 54, 55, 56, 57, 58, -1, -1, -1,
5915 594, 595, 1245, 597, 598, -1, -1, -1, 586, -1,
5916 -1, 692, 606, -1, 608, -1, 78, 611, -1, -1,
5917 -1, -1, -1, -1, -1, -1, 400, -1, 606, 403,
5918 -1, -1, -1, 611, -1, 409, 410, 411, -1, -1,
5919 102, -1, -1, -1, -1, -1, 108, 109, -1, -1,
5920 -1, 425, -1, 1296, -1, -1, -1, 1300, -1, 1302,
5921 -1, 655, -1, 657, -1, -1, -1, -1, 44, -1,
5922 -1, 665, -1, -1, -1, -1, -1, 451, -1, 141,
5923 -1, -1, 676, -1, 678, 679, 1330, 1331, -1, -1,
5924 1334, 1335, -1, -1, 1338, 689, 690, -1, -1, 473,
5925 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
5926 86, 87, 88, 89, 90, 693, -1, -1, 1361, 95,
5927 96, 715, -1, 1367, 1368, 1369, 1370, -1, -1, 723,
5928 -1, 709, 1376, 711, 508, 729, -1, -1, -1, 820,
5929 821, -1, -1, -1, -1, -1, -1, 828, 829, -1,
5930 -1, -1, 52, 527, 54, 55, 56, 57, 58, 135,
5931 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
5932 146, -1, -1, -1, 548, -1, -1, -1, 78, 155,
5933 554, -1, -1, -1, -1, -1, -1, -1, -1, 767,
5934 -1, -1, 92, -1, -1, -1, -1, 878, 879, -1,
5935 881, 882, 102, -1, -1, -1, -1, 107, 108, 109,
5936 -1, 805, -1, -1, -1, -1, -1, 795, -1, -1,
5937 594, 595, -1, 597, 598, -1, -1, -1, -1, -1,
5938 -1, -1, 606, -1, -1, -1, -1, 611, -1, -1,
5939 -1, 141, -1, -1, 144, -1, -1, -1, -1, 827,
5940 -1, -1, -1, -1, -1, -1, 937, 157, 1, -1,
5941 -1, 855, -1, 857, 858, -1, -1, 845, -1, 950,
5942 -1, -1, 15, 16, -1, -1, -1, -1, -1, -1,
5943 -1, 655, 52, 657, 54, 55, 56, 57, 58, -1,
5944 -1, 665, -1, -1, -1, -1, -1, -1, -1, -1,
5945 -1, -1, 676, -1, 678, 679, 987, -1, 78, 52,
5946 53, -1, -1, -1, -1, 689, 690, -1, -1, -1,
5947 -1, -1, 92, -1, 67, -1, -1, -1, -1, 923,
5948 -1, -1, 102, -1, -1, -1, -1, 107, 108, 109,
5949 -1, 715, -1, -1, -1, -1, 940, -1, -1, 723,
5950 -1, 945, 946, -1, 932, -1, -1, 951, 952, -1,
5951 103, 104, -1, -1, 107, -1, 960, 961, -1, 112,
5952 -1, 141, -1, -1, 144, -1, -1, 955, -1, -1,
5953 -1, -1, 976, -1, -1, -1, -1, -1, -1, 967,
5954 25, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5955 -1, 995, -1, -1, -1, -1, -1, -1, -1, -1,
5956 -1, -1, -1, 991, -1, -1, -1, -1, -1, -1,
5957 -1, -1, -1, -1, 1018, 1019, 1020, -1, -1, -1,
5958 -1, -1, -1, -1, -1, -1, -1, -1, 1016, -1,
5959 -1, 1035, -1, 78, 79, 80, 81, 82, 83, 84,
5960 85, 86, 87, 88, 89, 90, -1, -1, 1052, -1,
5961 95, 96, -1, -1, -1, 52, 101, 54, 55, 56,
5962 57, 58, -1, 1051, -1, -1, 1027, 1028, 1, -1,
5963 -1, 855, -1, 857, 858, -1, -1, 230, -1, -1,
5964 1171, 78, 15, 16, -1, -1, -1, -1, -1, -1,
5965 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
5966 145, 146, 255, -1, 257, 102, -1, 260, 261, -1,
5967 107, 108, 109, 266, -1, -1, -1, -1, -1, 52,
5968 53, 1082, 1083, 1127, -1, 1086, -1, 1131, -1, -1,
5969 1134, 1135, 285, -1, 67, -1, 1140, -1, -1, 923,
5970 -1, -1, 1103, -1, 141, -1, -1, 144, 1136, -1,
5971 1154, -1, -1, 1157, -1, -1, 940, -1, -1, -1,
5972 -1, 945, 946, -1, -1, -1, -1, 951, 952, -1,
5973 103, 104, 1176, -1, 107, -1, 960, 961, 1139, 112,
5974 -1, -1, 335, -1, 337, 338, 339, 340, -1, 342,
5975 343, -1, 976, -1, 1198, -1, -1, -1, -1, -1,
5976 -1, 1162, -1, -1, 1165, -1, -1, -1, 1212, -1,
5977 363, 995, -1, -1, -1, -1, -1, -1, 1179, -1,
5978 1181, -1, 1226, 1184, 1185, -1, -1, -1, 1189, 1190,
5979 -1, -1, -1, -1, 1018, 1019, 1020, -1, -1, -1,
5980 -1, -1, -1, -1, -1, -1, -1, 400, -1, -1,
5981 403, 1035, -1, -1, -1, -1, 409, 410, 411, -1,
5982 -1, -1, 1266, -1, -1, -1, -1, -1, 1052, 1273,
5983 1274, -1, 425, -1, 1278, 52, 53, -1, -1, 56,
5984 -1, -1, -1, 1287, 1245, -1, -1, -1, -1, -1,
5985 -1, -1, -1, -1, -1, -1, -1, 230, 451, 76,
5986 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
5987 87, 88, -1, 1317, -1, -1, 93, 94, 95, 96,
5988 473, -1, 255, -1, 257, -1, -1, 260, 261, -1,
5989 107, 108, -1, 266, -1, 1296, -1, -1, -1, 1300,
5990 -1, 1302, -1, -1, -1, -1, -1, 1131, -1, -1,
5991 1134, 1135, 285, -1, -1, 508, 1140, -1, -1, -1,
5992 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
5993 1154, 148, 149, 1157, 527, -1, -1, -1, -1, 156,
5994 157, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5995 -1, -1, 1176, -1, -1, 548, -1, -1, -1, -1,
5996 1361, 554, 335, -1, 337, 338, 339, 340, -1, 342,
5997 343, -1, -1, -1, 1198, -1, -1, -1, -1, -1,
5998 -1, -1, -1, -1, -1, -1, -1, -1, 1212, -1,
5999 363, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6000 -1, 594, 595, -1, 597, 598, -1, -1, -1, -1,
6001 -1, -1, -1, 606, -1, -1, -1, -1, 611, -1,
6002 -1, -1, -1, -1, -1, -1, -1, 400, -1, -1,
6003 403, -1, -1, -1, -1, -1, 409, 410, 411, -1,
6004 -1, -1, 1266, -1, -1, -1, -1, -1, -1, 1273,
6005 1274, -1, 425, -1, 1278, -1, 1027, 1028, -1, -1,
6006 -1, -1, 655, -1, 657, -1, -1, -1, -1, -1,
6007 -1, -1, 665, -1, -1, -1, -1, -1, 451, -1,
6008 -1, -1, -1, 676, -1, 678, 679, -1, -1, -1,
6009 -1, -1, -1, 1317, -1, -1, 689, 690, -1, -1,
6010 473, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6011 -1, 1082, 1083, -1, -1, 1086, -1, -1, -1, -1,
6012 -1, -1, 715, -1, -1, -1, -1, -1, -1, -1,
6013 723, -1, 1103, -1, -1, 508, -1, -1, -1, -1,
6014 -1, -1, -1, -1, 1, -1, -1, -1, -1, -1,
6015 -1, -1, -1, -1, 527, -1, -1, -1, 15, 16,
6016 -1, 1027, 1028, -1, -1, -1, -1, -1, 1139, -1,
6017 -1, -1, -1, -1, -1, 548, -1, -1, -1, -1,
6018 -1, 554, -1, -1, -1, -1, -1, -1, -1, -1,
6019 -1, 1162, -1, -1, 1165, 52, 53, -1, -1, 56,
6020 -1, -1, -1, -1, -1, -1, -1, -1, 1179, -1,
6021 1181, -1, -1, 1184, 1185, -1, 1082, 1083, 1189, 1190,
6022 1086, 594, 595, -1, 597, 598, -1, -1, -1, -1,
6023 -1, -1, 89, 606, -1, -1, -1, 1103, 611, -1,
6024 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6025 -1, 108, 109, 110, -1, 112, -1, -1, -1, -1,
6026 -1, -1, 855, -1, 857, 858, -1, -1, -1, -1,
6027 -1, -1, -1, 1139, 1245, -1, -1, -1, -1, -1,
6028 -1, -1, 655, -1, 657, -1, -1, -1, -1, -1,
6029 -1, -1, 665, -1, -1, -1, 1162, -1, -1, 1165,
6030 -1, -1, -1, 676, -1, 678, 679, -1, -1, -1,
6031 -1, -1, -1, 1179, -1, 1181, 689, 690, 1184, 1185,
6032 -1, -1, -1, 1189, 1190, 1296, -1, -1, -1, 1300,
6033 923, 1302, -1, -1, -1, -1, -1, -1, -1, -1,
6034 -1, -1, 715, -1, -1, -1, -1, 940, -1, -1,
6035 723, -1, 945, 946, -1, -1, 1027, 1028, 951, 952,
6036 -1, -1, -1, -1, -1, -1, -1, 960, 961, -1,
6037 -1, -1, -1, 230, -1, -1, -1, -1, -1, 1245,
6038 -1, -1, -1, 976, -1, -1, -1, -1, -1, -1,
6039 1361, -1, -1, -1, -1, -1, -1, -1, 255, -1,
6040 257, -1, 995, -1, -1, -1, -1, -1, -1, 266,
6041 -1, 1082, 1083, -1, -1, 1086, -1, -1, -1, -1,
6042 -1, -1, -1, -1, -1, 1018, 1019, 1020, 285, -1,
6043 1296, -1, 1103, -1, 1300, -1, 1302, -1, -1, -1,
6044 -1, -1, 1035, -1, 33, 34, 35, 36, 305, -1,
6045 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1052,
6046 49, 50, 51, -1, -1, -1, -1, -1, 1139, -1,
6047 59, 60, 61, 62, 63, -1, -1, -1, 335, -1,
6048 1027, 1028, 855, -1, 857, 858, -1, -1, -1, -1,
6049 -1, 1162, -1, -1, 1165, 1361, -1, -1, -1, -1,
6050 -1, -1, -1, -1, -1, -1, 363, 364, 1179, -1,
6051 1181, -1, -1, 1184, 1185, -1, -1, -1, 1189, 1190,
6052 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6053 -1, -1, -1, -1, -1, 1082, 1083, -1, 1131, 1086,
6054 -1, 1134, 1135, 400, -1, -1, 403, 1140, -1, -1,
6055 923, -1, -1, 410, 411, -1, 1103, -1, 147, -1,
6056 -1, 1154, -1, -1, 1157, 1027, 1028, 940, -1, -1,
6057 -1, -1, 945, 946, 1245, -1, -1, -1, 951, 952,
6058 -1, -1, -1, 1176, -1, -1, -1, 960, 961, -1,
6059 -1, -1, 1139, -1, 451, -1, -1, -1, -1, -1,
6060 -1, -1, -1, 976, -1, 1198, -1, -1, -1, -1,
6061 -1, -1, -1, -1, -1, 1162, 473, -1, 1165, 1212,
6062 1082, 1083, 995, -1, 1086, 1296, -1, -1, -1, 1300,
6063 -1, 1302, 1179, -1, 1181, -1, -1, 1184, 1185, -1,
6064 -1, 1103, 1189, 1190, -1, 1018, 1019, 1020, -1, -1,
6065 -1, 508, -1, -1, -1, -1, -1, 1, -1, -1,
6066 -1, -1, 1035, -1, -1, -1, -1, -1, 525, -1,
6067 527, 15, 16, 1266, -1, -1, -1, 1139, -1, 1052,
6068 1273, 1274, -1, -1, -1, 1278, -1, -1, -1, -1,
6069 1361, 548, -1, -1, -1, -1, -1, 554, 1245, -1,
6070 1162, -1, -1, 1165, -1, -1, -1, -1, 52, 53,
6071 -1, -1, 56, -1, -1, -1, -1, 1179, -1, 1181,
6072 -1, -1, 1184, 1185, 1317, -1, -1, 1189, 1190, -1,
6073 -1, -1, -1, -1, -1, -1, -1, -1, 595, -1,
6074 -1, 598, -1, -1, -1, 89, -1, -1, -1, 1296,
6075 -1, 608, -1, 1300, 611, 1302, -1, -1, 1131, -1,
6076 -1, 1134, 1135, -1, 108, 109, 110, 1140, 112, -1,
6077 -1, 1027, 1028, -1, -1, -1, -1, -1, -1, -1,
6078 -1, 1154, -1, 1245, 1157, -1, -1, -1, -1, -1,
6079 -1, -1, -1, -1, -1, -1, -1, -1, 655, -1,
6080 657, -1, -1, 1176, -1, 1027, 1028, -1, 665, -1,
6081 -1, -1, -1, -1, 1361, -1, -1, -1, -1, 676,
6082 -1, 678, -1, -1, -1, 1198, 1082, 1083, -1, -1,
6083 1086, -1, 689, 690, 1296, -1, -1, -1, 1300, 1212,
6084 1302, -1, -1, -1, -1, -1, -1, 1103, -1, -1,
6085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6086 1082, 1083, -1, -1, 1086, -1, 723, -1, -1, -1,
6087 -1, -1, 729, -1, -1, -1, -1, -1, -1, -1,
6088 -1, 1103, -1, 1139, -1, -1, 230, -1, -1, -1,
6089 -1, -1, -1, 1266, -1, -1, -1, -1, -1, 1361,
6090 1273, 1274, -1, -1, -1, 1278, 1162, -1, -1, 1165,
6091 -1, 255, -1, 257, -1, -1, -1, 1139, -1, -1,
6092 -1, -1, 266, 1179, -1, 1181, -1, -1, 1184, 1185,
6093 -1, -1, -1, 1189, 1190, 44, -1, -1, -1, -1,
6094 1162, 285, -1, 1165, 1317, -1, -1, -1, 805, -1,
6095 -1, -1, -1, -1, -1, -1, -1, 1179, -1, 1181,
6096 -1, 305, 1184, 1185, -1, -1, -1, 1189, 1190, 78,
6097 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6098 89, 90, -1, -1, -1, -1, 95, 96, -1, 1245,
6099 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1,
6100 -1, 858, -1, -1, -1, -1, -1, -1, -1, -1,
6101 -1, -1, -1, -1, -1, -1, -1, -1, -1, 363,
6102 364, -1, -1, 1245, 1, -1, 135, -1, 137, 138,
6103 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6104 1296, -1, -1, -1, 1300, -1, 1302, -1, -1, -1,
6105 -1, -1, -1, -1, -1, -1, 400, -1, -1, 403,
6106 -1, -1, -1, -1, -1, -1, 410, 411, -1, -1,
6107 -1, -1, -1, -1, 1296, 52, 53, -1, 1300, 56,
6108 1302, -1, -1, 940, -1, -1, -1, -1, 945, 946,
6109 -1, -1, -1, -1, 951, 952, -1, -1, -1, -1,
6110 -1, -1, -1, 960, -1, 1361, -1, 451, -1, -1,
6111 -1, -1, 89, -1, -1, -1, -1, -1, -1, 976,
6112 -1, -1, -1, -1, -1, -1, -1, -1, -1, 473,
6113 -1, 108, 109, 110, -1, -1, -1, -1, 995, 1361,
6114 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
6115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6116 -1, 1018, 1019, 1020, 508, -1, -1, -1, 76, 77,
6117 78, 79, 80, 81, 82, 83, 84, -1, 1035, 87,
6118 88, 525, -1, 527, -1, 93, 94, 95, 96, -1,
6119 -1, -1, -1, -1, -1, 1052, -1, -1, -1, 107,
6120 108, -1, -1, -1, 548, -1, -1, -1, -1, -1,
6121 554, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6122 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
6123 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6124 148, 149, -1, -1, -1, -1, -1, -1, 156, -1,
6125 -1, 595, 1, 230, 598, -1, -1, -1, -1, -1,
6126 -1, -1, -1, -1, 608, -1, -1, 611, -1, -1,
6127 1127, -1, -1, -1, 1131, -1, -1, 1134, 1135, -1,
6128 -1, -1, -1, 1140, -1, -1, -1, -1, -1, 266,
6129 -1, -1, -1, -1, -1, -1, -1, 1154, -1, -1,
6130 1157, -1, -1, 52, 53, -1, -1, 56, 285, -1,
6131 -1, 655, -1, 657, -1, -1, -1, -1, -1, -1,
6132 -1, 665, -1, -1, -1, -1, -1, -1, 305, -1,
6133 -1, -1, 676, -1, 678, -1, -1, -1, -1, -1,
6134 89, 1198, -1, -1, -1, 689, 690, -1, -1, -1,
6135 -1, -1, -1, -1, -1, 1212, -1, -1, 335, 108,
6136 109, 110, 111, -1, -1, -1, -1, -1, -1, 1226,
6137 -1, -1, -1, -1, -1, -1, -1, -1, -1, 723,
6138 -1, -1, -1, -1, -1, 729, 363, 364, -1, -1,
6139 -1, -1, -1, 1, -1, -1, -1, -1, -1, -1,
6140 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1266,
6141 78, 79, 80, 81, 82, 83, 84, 85, -1, 87,
6142 88, 1278, -1, -1, -1, -1, 403, 95, 96, -1,
6143 1287, -1, -1, 410, 411, -1, -1, -1, -1, -1,
6144 -1, -1, -1, -1, 52, 53, -1, -1, -1, -1,
6145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6146 1317, 805, -1, -1, -1, -1, -1, -1, -1, 137,
6147 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6148 -1, 230, -1, -1, 0, -1, -1, -1, -1, -1,
6149 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6150 108, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6151 26, 27, -1, -1, 858, -1, 1, 266, -1, -1,
6152 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6153 -1, 508, -1, -1, -1, -1, 285, -1, -1, -1,
6154 -1, -1, -1, -1, -1, -1, -1, -1, 525, -1,
6155 -1, -1, 68, 69, -1, -1, 305, -1, -1, -1,
6156 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6157 -1, 548, -1, -1, -1, -1, -1, 554, -1, -1,
6158 -1, 97, 98, -1, -1, -1, 335, -1, -1, -1,
6159 -1, -1, -1, -1, -1, -1, 940, -1, -1, -1,
6160 -1, 945, 946, -1, 120, -1, -1, 951, 952, -1,
6161 -1, -1, -1, -1, 363, 364, 960, -1, 595, -1,
6162 -1, 598, 230, -1, -1, -1, -1, -1, -1, -1,
6163 -1, 608, 976, -1, 611, 151, 152, -1, 154, -1,
6164 -1, 157, 158, -1, 160, -1, -1, -1, -1, -1,
6165 -1, 995, -1, -1, 403, -1, -1, -1, 266, -1,
6166 -1, 410, 411, -1, -1, -1, -1, -1, -1, -1,
6167 -1, -1, -1, -1, 1018, 1019, 1020, 285, 655, -1,
6168 657, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6169 -1, 1035, -1, -1, -1, -1, -1, -1, -1, -1,
6170 -1, 678, -1, -1, -1, -1, -1, -1, 1052, -1,
6171 -1, -1, 689, 690, -1, -1, -1, -1, -1, -1,
6172 -1, -1, -1, -1, -1, -1, -1, 335, -1, -1,
6173 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6174 -1, -1, -1, -1, -1, 230, 723, -1, -1, -1,
6175 -1, -1, 729, -1, -1, 363, -1, -1, -1, 508,
6176 -1, 738, -1, -1, -1, -1, -1, -1, -1, -1,
6177 -1, -1, -1, -1, -1, -1, 525, -1, -1, -1,
6178 -1, 266, -1, 1127, -1, -1, -1, 1131, -1, -1,
6179 1134, 1135, -1, -1, -1, 403, 1140, -1, -1, 548,
6180 285, -1, 410, 411, -1, 554, -1, -1, -1, -1,
6181 1154, -1, -1, 1157, 33, 34, 35, 36, -1, -1,
6182 -1, -1, -1, -1, -1, -1, -1, -1, 805, -1,
6183 49, 50, 51, 52, -1, -1, -1, 56, -1, -1,
6184 59, 60, 61, 62, 63, -1, 595, -1, -1, 598,
6185 335, -1, -1, -1, 1198, -1, -1, -1, -1, 608,
6186 -1, -1, -1, -1, -1, -1, -1, -1, 1212, -1,
6187 -1, -1, 91, 92, -1, -1, -1, -1, 363, -1,
6188 99, 858, 1226, 102, -1, 104, 105, -1, 107, -1,
6189 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6190 508, -1, -1, -1, -1, -1, 655, -1, 657, -1,
6191 -1, -1, -1, -1, -1, -1, -1, -1, 403, -1,
6192 -1, 140, 1266, 52, 53, 410, 411, 56, 147, 678,
6193 -1, -1, -1, -1, 1278, 154, -1, -1, -1, -1,
6194 548, -1, -1, 1287, -1, -1, 554, 76, 77, 78,
6195 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6196 -1, -1, -1, -1, 93, 94, 95, 96, 945, 946,
6197 -1, -1, -1, 1317, 951, 952, -1, -1, 107, 108,
6198 729, -1, -1, 960, -1, -1, -1, 595, -1, -1,
6199 598, -1, -1, -1, -1, -1, -1, -1, -1, 976,
6200 -1, -1, -1, 611, -1, -1, -1, -1, 137, 138,
6201 139, 140, 141, 142, 143, 144, 145, 146, 995, 148,
6202 149, -1, -1, 508, -1, -1, -1, 156, 78, 79,
6203 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6204 90, 1018, 1019, 1020, -1, 95, 96, 655, -1, 657,
6205 -1, -1, -1, -1, -1, -1, 805, -1, 1035, -1,
6206 -1, -1, -1, 548, -1, -1, -1, -1, -1, 554,
6207 678, -1, -1, -1, -1, 1052, -1, -1, -1, -1,
6208 -1, 689, 690, -1, -1, 135, -1, 137, 138, 139,
6209 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6210 -1, -1, -1, -1, 154, -1, -1, -1, -1, 858,
6211 595, -1, -1, 598, -1, 723, -1, 33, 34, 35,
6212 36, -1, -1, -1, -1, -1, 611, -1, -1, -1,
6213 -1, -1, -1, 49, 50, 51, 52, -1, -1, -1,
6214 56, -1, 58, 59, 60, 61, 62, 63, -1, -1,
6215 1127, -1, -1, -1, 1131, -1, -1, 1134, 1135, -1,
6216 -1, -1, 78, 1140, -1, -1, -1, -1, -1, -1,
6217 655, -1, 657, -1, -1, 91, 92, 1154, -1, -1,
6218 1157, -1, -1, 99, -1, -1, 102, -1, 104, 105,
6219 -1, 107, 108, 678, 110, 111, 112, 113, 114, 115,
6220 116, 117, 118, -1, 689, 690, -1, -1, -1, -1,
6221 -1, 960, -1, -1, -1, -1, -1, -1, -1, -1,
6222 -1, 1198, -1, -1, 140, -1, -1, 976, -1, -1,
6223 -1, 147, -1, -1, -1, 1212, -1, -1, 723, -1,
6224 -1, -1, -1, -1, -1, -1, 995, -1, -1, 1226,
6225 858, -1, 15, 16, 78, 79, 80, 81, 82, 83,
6226 84, 85, 86, 87, 88, 89, 90, -1, -1, 1018,
6227 1019, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6228 -1, -1, -1, -1, 47, 48, 49, 50, -1, -1,
6229 -1, 54, 55, -1, -1, -1, -1, -1, -1, -1,
6230 -1, 1278, -1, 1052, 67, 68, -1, -1, -1, -1,
6231 1287, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6232 144, 145, 146, -1, -1, -1, -1, -1, -1, -1,
6233 -1, -1, -1, -1, -1, -1, -1, 945, 946, -1,
6234 1317, -1, -1, 951, 952, -1, -1, -1, -1, 112,
6235 -1, -1, 960, -1, 78, 79, 80, 81, 82, 83,
6236 84, 85, 86, 87, 88, 89, 90, -1, 976, -1,
6237 -1, 95, 96, 858, -1, -1, -1, -1, 1127, -1,
6238 -1, -1, 1131, -1, -1, 1134, 1135, 995, -1, -1,
6239 -1, 1140, -1, -1, -1, -1, -1, -1, -1, -1,
6240 -1, -1, -1, -1, -1, 1154, -1, -1, 1157, -1,
6241 1018, 1019, 1020, 137, 138, 139, 140, 141, 142, 143,
6242 144, 145, 146, -1, -1, -1, -1, 1035, -1, -1,
6243 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6244 82, 83, 84, -1, 1052, 87, 88, -1, -1, 1198,
6245 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1,
6246 945, 946, -1, 1212, -1, 228, 951, 952, 231, 232,
6247 233, -1, 235, -1, -1, 960, -1, 1226, -1, -1,
6248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6249 -1, 976, 255, -1, 257, 137, 138, 139, 140, 141,
6250 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6251 995, -1, -1, -1, -1, -1, -1, -1, -1, 1127,
6252 -1, -1, -1, 1131, -1, -1, 1134, 1135, -1, 1278,
6253 -1, -1, 1140, 1018, 1019, 1020, -1, -1, 1287, -1,
6254 -1, -1, -1, -1, -1, -1, 1154, -1, -1, 1157,
6255 1035, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6256 -1, -1, -1, -1, -1, -1, -1, 1052, 1317, -1,
6257 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6259 1198, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6260 -1, -1, -1, -1, 1212, 368, 369, 370, 371, 372,
6261 -1, -1, 375, 376, 377, 378, 379, 380, 381, 382,
6262 -1, 384, -1, -1, 387, 388, 389, 390, 391, 392,
6263 393, 394, 395, 396, -1, -1, -1, 400, -1, -1,
6264 -1, -1, -1, -1, -1, -1, 1131, -1, -1, 1134,
6265 1135, -1, -1, -1, -1, 1140, -1, -1, 78, 79,
6266 80, 81, 82, 83, 84, -1, -1, 87, 88, 1154,
6267 1278, -1, 1157, -1, -1, 95, 96, -1, -1, -1,
6268 -1, -1, -1, -1, -1, -1, -1, -1, 451, -1,
6269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6270 -1, -1, -1, -1, -1, 468, 469, -1, -1, 1317,
6271 473, -1, -1, 1198, 477, -1, 479, 137, 138, 139,
6272 140, 141, 142, 143, 144, 145, 146, 1212, -1, 0,
6273 -1, -1, -1, -1, 497, -1, -1, 8, 9, 10,
6274 -1, -1, 13, 14, 15, -1, 17, -1, -1, 512,
6275 -1, -1, 515, -1, 25, 26, 27, 28, 29, -1,
6276 -1, -1, -1, -1, 527, -1, 37, 38, -1, 40,
6277 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6278 -1, -1, 545, -1, -1, -1, -1, -1, -1, -1,
6279 -1, -1, -1, 1278, -1, -1, -1, 68, 69, -1,
6280 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6281 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6282 -1, -1, -1, 586, 95, 96, 97, 98, -1, 100,
6283 101, 594, 1317, -1, 597, 106, -1, -1, -1, -1,
6284 -1, -1, -1, 606, -1, -1, -1, -1, 611, 120,
6285 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6286 -1, -1, -1, 134, 135, 136, 137, 138, 139, 140,
6287 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6288 151, 152, 153, 154, 155, -1, -1, 158, 159, 160,
6289 -1, -1, 33, 34, 35, 36, -1, -1, -1, -1,
6290 -1, -1, 665, -1, -1, -1, -1, -1, 49, 50,
6291 51, 52, -1, 676, -1, 56, -1, -1, 59, 60,
6292 61, 62, 63, -1, -1, -1, 689, 690, -1, -1,
6293 693, 694, -1, -1, -1, -1, -1, -1, -1, -1,
6294 -1, -1, 705, 706, -1, -1, 709, -1, 711, -1,
6295 91, 92, -1, -1, -1, 718, 719, -1, 99, -1,
6296 723, 102, -1, 104, 105, -1, 107, -1, -1, 110,
6297 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6299 -1, -1, -1, -1, -1, -1, -1, -1, -1, 140,
6300 -1, -1, -1, -1, 767, -1, 147, -1, -1, -1,
6301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6303 -1, -1, 795, -1, -1, -1, -1, -1, 0, 1,
6304 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6305 12, -1, 14, 15, 16, 17, 18, 19, 20, 21,
6306 22, 23, 24, 25, 827, -1, -1, -1, 30, 31,
6307 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6308 -1, -1, 845, 45, 46, 47, 48, 49, 50, 51,
6309 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6310 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6311 -1, -1, 875, -1, 76, 77, -1, -1, -1, -1,
6312 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6313 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6314 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6315 112, 113, 114, 115, 116, 117, 118, -1, 120, -1,
6316 923, -1, -1, -1, -1, -1, -1, -1, -1, 932,
6317 -1, -1, -1, -1, -1, -1, -1, 940, -1, -1,
6318 -1, 944, 945, 946, -1, 147, 148, 149, 951, 952,
6319 152, -1, 955, -1, -1, -1, 158, -1, 160, -1,
6320 -1, -1, -1, -1, 967, -1, -1, -1, -1, -1,
6321 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6322 -1, -1, 985, 986, -1, 988, 989, -1, 991, -1,
6323 993, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6324 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1012,
6325 1013, -1, -1, 1016, -1, -1, -1, 1020, 1021, -1,
6326 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6327 -1, -1, 1035, -1, -1, -1, -1, -1, -1, 0,
6328 1, -1, 3, 4, 5, 6, 7, -1, 1051, -1,
6329 11, 12, -1, -1, -1, 16, 1059, 18, 19, 20,
6330 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6331 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6332 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6333 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6334 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6335 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6337 91, 92, -1, 1136, -1, -1, -1, -1, 99, -1,
6338 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6339 111, 112, 113, 114, 115, 116, 117, 118, -1, 120,
6340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6342 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6343 -1, 0, 1, 154, 3, 4, 5, 6, 7, 160,
6344 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6345 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6346 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6347 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6348 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6349 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6350 -1, -1, -1, 1266, -1, -1, -1, 76, 77, -1,
6351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6352 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6353 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6354 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6355 -1, -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, -1, -1, -1, -1, 147, 148,
6358 149, -1, -1, 0, 1, 154, 3, 4, 5, 6,
6359 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6360 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6361 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6362 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6363 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6364 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6365 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6366 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6367 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6368 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6369 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6370 117, 118, -1, -1, -1, -1, -1, -1, -1, 0,
6371 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
6372 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6373 147, 148, 149, -1, 25, 152, 27, 28, 29, -1,
6374 -1, -1, -1, 160, -1, -1, 37, 38, -1, 40,
6375 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6376 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6377 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6378 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6379 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6380 -1, -1, -1, -1, 95, 96, 97, 98, -1, 100,
6381 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6382 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6383 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6384 -1, -1, -1, 134, 135, 136, 137, 138, 139, 140,
6385 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6386 -1, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6387 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6388 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6389 25, -1, 27, 28, 29, -1, -1, -1, -1, -1,
6390 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6392 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6393 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6394 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6395 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6396 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6397 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6398 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
6399 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6400 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
6401 145, 146, -1, -1, -1, -1, -1, 152, 153, 154,
6402 155, 0, -1, 158, 159, 160, -1, -1, -1, 8,
6403 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6404 -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
6405 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6406 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6408 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6409 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6410 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6411 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6412 -1, -1, 101, -1, -1, -1, -1, 106, -1, -1,
6413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6414 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6415 -1, -1, -1, -1, -1, -1, 135, 136, 137, 138,
6416 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6417 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6418 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6419 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6420 -1, -1, 25, 26, 27, 28, 29, -1, -1, -1,
6421 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6422 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6423 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6424 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6425 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6426 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6427 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6428 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6429 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6430 123, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6431 -1, -1, 135, 136, 137, 138, 139, 140, 141, 142,
6432 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6433 153, 154, 155, 0, -1, 158, 159, 160, -1, -1,
6434 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6435 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6436 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
6437 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6438 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6440 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6441 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6442 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6443 97, 98, -1, -1, 101, -1, -1, -1, -1, 106,
6444 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6445 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6446 -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
6447 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6448 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6449 157, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6450 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6451 -1, -1, -1, -1, 25, -1, 27, 28, 29, -1,
6452 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6453 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6455 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6456 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6457 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6458 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6459 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6460 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6461 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6462 -1, -1, -1, -1, 135, 136, 137, 138, 139, 140,
6463 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6464 -1, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6465 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6466 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6467 25, 26, 27, 28, -1, -1, -1, -1, -1, -1,
6468 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6470 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6471 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6472 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6473 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6474 95, 96, 97, 98, -1, -1, 101, -1, -1, -1,
6475 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6476 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6478 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6479 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6480 155, 0, 157, 158, 159, 160, -1, -1, -1, 8,
6481 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6482 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
6483 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6484 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6486 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6487 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6488 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6489 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6490 -1, 100, 101, -1, -1, -1, -1, 106, -1, -1,
6491 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6492 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6493 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6494 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6495 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6496 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6497 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6498 -1, -1, 25, -1, 27, 28, -1, -1, -1, -1,
6499 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6500 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6502 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6503 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6504 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6505 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6506 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6507 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6508 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6509 -1, -1, 135, -1, 137, 138, 139, 140, 141, 142,
6510 143, 144, 145, 146, -1, -1, -1, -1, -1, 152,
6511 153, 154, 155, 0, 157, 158, 159, 160, -1, -1,
6512 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
6513 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6515 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6517 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6518 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6519 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6520 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6521 97, 98, -1, 100, 101, -1, -1, -1, -1, -1,
6522 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6523 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6524 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6525 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6526 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6527 -1, 158, -1, 160, -1, -1, -1, 8, 9, 10,
6528 -1, -1, -1, 14, 15, -1, 17, -1, -1, -1,
6529 -1, -1, -1, -1, 25, 26, -1, -1, -1, -1,
6530 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6531 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6532 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6533 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6534 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6535 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6536 -1, -1, -1, -1, 95, 96, 97, 98, -1, 100,
6537 101, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6538 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6539 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6540 -1, -1, -1, 134, 135, -1, 137, 138, 139, 140,
6541 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6542 151, 152, 153, 154, 155, 0, -1, 158, -1, 160,
6543 -1, -1, -1, 8, 9, 10, -1, -1, -1, 14,
6544 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6545 25, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6546 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6547 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6548 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6549 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6550 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6551 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6552 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6553 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6554 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6555 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6556 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6557 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6558 155, 0, -1, 158, -1, 160, -1, -1, -1, 8,
6559 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
6560 -1, -1, -1, -1, -1, -1, 25, -1, -1, -1,
6561 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6562 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6563 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6564 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6565 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6566 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6567 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6568 -1, 100, 101, -1, -1, -1, -1, -1, -1, -1,
6569 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6570 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6571 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6572 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6573 -1, -1, 151, 152, 153, 154, 155, -1, -1, 158,
6574 1, 160, 3, 4, 5, 6, 7, 8, 9, 10,
6575 11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
6576 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6577 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6578 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6579 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6580 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6581 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6584 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6585 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6586 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6587 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6588 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6589 -1, -1, 1, 154, 3, 4, 5, 6, 7, 160,
6590 -1, 10, 11, 12, -1, 14, 15, 16, -1, 18,
6591 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6592 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6593 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6594 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6595 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6596 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6598 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6599 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6600 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6601 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6602 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6603 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6604 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6605 7, 160, -1, 10, 11, 12, -1, -1, 15, 16,
6606 17, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6607 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6608 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6609 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6610 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6611 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6612 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6613 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6614 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6615 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6616 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6617 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6619 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6620 5, 6, 7, 160, -1, 10, 11, 12, -1, -1,
6621 15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6622 25, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6623 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6624 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6625 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6626 65, -1, -1, 68, -1, -1, -1, -1, -1, -1,
6627 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6628 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6629 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6630 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6631 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6633 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6634 -1, -1, 147, 148, 149, -1, -1, -1, 1, 154,
6635 3, 4, 5, 6, 7, 160, -1, 10, 11, 12,
6636 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
6637 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6638 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6639 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6640 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6641 63, 64, 65, -1, -1, 68, -1, -1, -1, -1,
6642 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6643 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6644 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6645 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6646 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6647 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6648 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6649 -1, -1, -1, -1, 147, 148, 149, -1, -1, -1,
6650 1, 154, 3, 4, 5, 6, 7, 160, 9, 10,
6651 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6652 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6653 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6654 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6655 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6656 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6657 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6658 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6659 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6660 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6661 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6663 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6664 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6665 -1, -1, 1, 154, 3, 4, 5, 6, 7, 160,
6666 -1, 10, 11, 12, -1, -1, -1, 16, -1, 18,
6667 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6668 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6669 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6670 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6671 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6672 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6673 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6674 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6675 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6676 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6677 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6678 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6679 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6680 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6681 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6682 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6683 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6684 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6685 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6686 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6687 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6688 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6689 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6690 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6691 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6692 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6694 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6695 147, 148, 149, -1, -1, -1, -1, 154, -1, -1,
6696 -1, 158, 1, 160, 3, 4, 5, 6, 7, -1,
6697 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6698 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6699 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6700 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6701 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6702 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6703 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6704 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6705 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6706 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6707 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6708 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6709 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6710 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6711 149, -1, -1, -1, -1, 154, -1, -1, -1, 158,
6712 1, 160, 3, 4, 5, 6, 7, -1, -1, -1,
6713 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6714 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6715 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6716 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6717 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6718 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6719 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6720 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6721 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6722 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6723 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6724 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6725 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6726 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6727 -1, 152, 1, 154, 3, 4, 5, 6, 7, 160,
6728 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6729 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6730 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6731 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6732 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6733 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6734 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6735 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6736 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6737 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6738 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6740 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6741 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6742 149, -1, -1, 152, 1, 154, 3, 4, 5, -1,
6743 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6744 17, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6745 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6746 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6747 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6748 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6749 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6750 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6751 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6752 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6753 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6754 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6755 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6756 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6757 147, 148, 149, -1, -1, -1, -1, 154, -1, -1,
6758 -1, -1, -1, 160, 3, 4, 5, 6, 7, 8,
6759 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6760 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6761 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6762 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6763 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6764 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6765 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6766 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6767 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6768 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6770 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6771 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6772 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6773 149, -1, -1, -1, -1, -1, -1, 156, 157, 3,
6774 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6775 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6776 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6777 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6778 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6779 54, 55, 56, 57, -1, -1, -1, -1, -1, -1,
6780 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6781 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6782 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6783 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6784 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
6785 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6786 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6787 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6788 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6789 -1, -1, 156, 3, 4, 5, 6, 7, 8, 9,
6790 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
6791 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
6792 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
6793 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6794 50, 51, 52, 53, 54, -1, 56, -1, -1, -1,
6795 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6796 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
6797 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
6798 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
6799 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
6800 -1, 111, -1, -1, -1, -1, -1, -1, -1, -1,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
6803 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
6804 -1, -1, -1, -1, -1, -1, 156, 3, 4, 5,
6805 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6806 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6807 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6808 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6809 46, 47, 48, 49, 50, 51, 52, 53, -1, -1,
6810 56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6811 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6812 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6813 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6814 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6815 -1, 107, 108, -1, -1, 111, -1, -1, -1, -1,
6816 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6817 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6818 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6819 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
6820 156, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6821 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6822 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6823 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6824 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6825 52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
6826 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6827 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6828 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6829 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6830 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6833 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
6834 142, 143, 144, 145, 146, -1, 148, 149, 3, 4,
6835 5, -1, 7, -1, 156, -1, 11, 12, -1, -1,
6836 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6837 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6838 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6839 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6840 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6841 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6842 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6843 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6844 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6845 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6846 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
6847 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6848 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6849 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
6850 155, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6851 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6852 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6853 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6854 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6855 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6856 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6857 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6858 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
6859 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6860 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6861 147, 30, 31, 32, 33, 34, 35, 36, 155, -1,
6862 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
6863 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
6864 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6865 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6866 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6867 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6868 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
6869 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6870 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6871 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6872 -1, -1, -1, 3, 4, 5, -1, 7, 147, 148,
6873 149, 11, 12, -1, -1, 154, 16, -1, 18, 19,
6874 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6875 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6876 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6877 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6878 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6879 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6880 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6881 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6882 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6883 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6885 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6886 1, -1, 3, 4, 5, 6, 7, 147, 148, 149,
6887 11, 12, -1, -1, 154, 16, -1, 18, 19, 20,
6888 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6889 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6890 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
6891 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6892 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6893 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6894 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6895 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6896 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6897 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6898 1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6899 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6900 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6901 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6902 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6903 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6904 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6905 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6906 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6907 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6908 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
6909 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6910 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6911 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6912 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6913 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6914 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6915 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6916 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6917 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6918 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6919 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6920 -1, 102, 103, 104, 105, -1, 107, 108, 109, 110,
6921 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6922 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6923 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6924 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6925 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6926 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6927 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6928 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6929 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6930 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6931 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6932 -1, 102, 103, 104, 105, -1, 107, 108, 109, 110,
6933 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6934 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6935 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6936 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6937 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6938 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6939 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6940 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6941 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6942 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6943 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6944 -1, 102, 103, 104, 105, -1, 107, 108, 109, 110,
6945 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6946 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6947 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6948 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6949 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6950 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6951 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6952 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6953 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6954 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6955 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6956 -1, 102, 103, 104, 105, -1, 107, 108, 109, 110,
6957 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6958 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6959 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6960 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6961 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6962 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6963 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6964 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6965 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6966 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6967 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6968 -1, 102, 103, 104, 105, -1, 107, 108, -1, 110,
6969 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6970 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6971 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6972 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6973 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6974 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6975 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6976 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6977 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6978 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6979 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6980 -1, 102, 103, 104, 105, -1, -1, 108, 109, 110,
6981 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6982 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6983 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6984 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6985 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6986 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6987 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6988 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6989 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6990 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6991 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6992 -1, 102, 103, 104, 105, -1, -1, 108, -1, 110,
6993 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6994 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6995 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6996 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6997 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6998 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6999 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7000 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7001 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7002 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7003 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7004 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7005 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7006 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7007 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7008 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7009 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7010 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7011 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7012 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7013 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7015 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7016 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7017 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7018 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7019 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7020 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7021 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7022 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7023 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7024 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7025 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7026 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7027 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7028 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7029 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7030 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7031 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7032 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7033 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7034 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7035 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7036 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7037 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7038 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7039 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7040 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7041 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7042 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7043 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7044 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7045 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7046 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7047 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7048 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7049 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7050 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7051 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7052 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7053 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7054 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7055 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7056 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7057 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7058 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7059 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7060 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7061 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7062 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7063 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7064 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7065 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7066 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7067 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7068 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7069 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7070 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7071 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7072 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7073 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7074 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7075 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7076 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7077 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7078 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7079 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7080 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7081 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7082 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7083 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7084 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7085 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7087 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7088 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7089 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7090 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7091 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7092 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7093 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7094 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7095 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7096 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7097 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7098 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7099 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7100 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7101 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7102 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7103 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7104 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7105 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7106 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7107 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7108 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7109 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7110 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7111 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7112 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7113 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7114 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7115 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7116 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7117 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7118 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7119 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7120 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7121 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7123 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7124 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7125 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7126 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7127 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7128 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7129 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7130 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7131 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7132 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7133 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7135 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7136 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7137 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7138 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7139 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7140 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7141 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7142 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7143 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7144 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7147 -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
7148 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7149 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7150 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7151 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7152 23, 24, -1, -1, -1, -1, 147, 30, 31, 32,
7153 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7154 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7155 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7156 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7159 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7160 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
7161 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7162 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7163 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7164 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7165 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
7166 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7167 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7168 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7170 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7171 95, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7172 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7173 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
7174 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7175 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7176 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
7177 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7178 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7179 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7180 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7183 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7184 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7185 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
7186 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7187 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7188 147, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7189 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7190 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7191 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7192 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7193 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7194 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7195 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7196 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7197 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7198 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7199 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7200 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7201 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7202 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7203 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7204 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7205 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7206 -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
7207 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7208 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7209 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7210 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7211 23, 24, -1, -1, -1, -1, 147, 30, 31, 32,
7212 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7213 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7214 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7215 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7216 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7218 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7219 103, 104, 105, 33, 34, 35, 36, 110, 111, 112,
7220 113, 114, 115, 116, 117, 118, -1, -1, -1, 49,
7221 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
7222 60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
7223 -1, -1, -1, -1, 147, -1, -1, -1, -1, -1,
7224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7225 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
7226 -1, -1, 102, -1, 104, 105, -1, -1, -1, -1,
7227 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7228 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
7229 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7230 140, -1, -1, -1, -1, -1, -1, 147, 76, 77,
7231 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7232 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7233 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7234 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7235 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7236 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7237 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7238 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7239 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7240 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7241 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7242 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7243 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7245 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7246 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7247 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7248 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7250 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7251 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7252 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7253 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7256 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7257 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7258 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7259 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7260 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7261 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7262 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7263 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7266 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7267 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7268 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7270 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7271 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7272 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7273 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7274 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7275 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7276 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7277 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7278 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7279 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7280 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7281 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7282 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7283 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7285 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7286 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7287 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7289 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7290 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7291 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7292 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7293 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7294 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7295 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7296 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7297 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7299 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7300 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7301 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7302 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7303 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7304 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7305 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7306 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7307 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7309 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7310 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7311 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7312 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7314 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7315 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7316 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7317 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7319 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7320 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7321 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7322 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7323 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7325 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7326 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7327 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7328 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7329 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7330 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7331 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7332 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7333 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7334 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7335 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7336 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7338 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7339 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7340 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7341 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7342 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7344 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7345 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7346 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7348 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7349 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7350 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7351 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7354 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7355 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7356 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7357 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7358 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7359 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7360 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7361 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7362 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7363 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7364 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7365 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
7366 -1, -1, 156
7367};
7368
7369/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7370 state STATE-NUM. */
7371static const yytype_int16 yystos[] =
7372{
7373 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7374 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7375 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7376 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7377 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7378 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7379 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7380 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7381 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7382 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7383 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7384 277, 278, 287, 288, 321, 326, 327, 377, 378, 379,
7385 380, 381, 382, 384, 385, 388, 389, 391, 392, 393,
7386 394, 407, 408, 410, 411, 412, 413, 414, 415, 416,
7387 417, 418, 466, 0, 3, 4, 5, 6, 7, 8,
7388 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7389 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7390 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7391 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7392 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7393 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7394 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7395 222, 224, 225, 407, 179, 179, 179, 39, 58, 99,
7396 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7397 238, 239, 245, 246, 249, 251, 252, 268, 414, 415,
7398 417, 418, 453, 454, 246, 157, 242, 247, 248, 154,
7399 157, 189, 54, 221, 189, 151, 169, 170, 235, 466,
7400 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7401 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7402 211, 212, 466, 171, 240, 251, 453, 466, 239, 452,
7403 453, 466, 46, 99, 147, 155, 195, 197, 216, 255,
7404 268, 414, 415, 418, 319, 220, 397, 409, 413, 397,
7405 398, 399, 161, 383, 383, 383, 383, 412, 203, 227,
7406 227, 154, 160, 163, 464, 465, 179, 40, 41, 42,
7407 43, 44, 37, 38, 157, 421, 422, 423, 424, 466,
7408 421, 423, 26, 151, 242, 248, 279, 328, 28, 280,
7409 325, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7410 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7411 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7412 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7413 153, 458, 459, 256, 1, 191, 198, 199, 199, 200,
7414 202, 202, 163, 199, 465, 99, 210, 217, 268, 293,
7415 414, 415, 418, 52, 56, 95, 99, 218, 219, 268,
7416 414, 415, 418, 219, 33, 34, 35, 36, 49, 50,
7417 51, 52, 56, 157, 194, 220, 416, 448, 449, 450,
7418 246, 157, 248, 98, 458, 459, 328, 380, 100, 100,
7419 155, 239, 56, 239, 239, 239, 397, 134, 101, 155,
7420 250, 466, 98, 153, 458, 100, 100, 155, 250, 92,
7421 244, 246, 251, 433, 453, 466, 246, 189, 191, 460,
7422 191, 54, 64, 65, 181, 157, 235, 236, 164, 421,
7423 421, 98, 458, 100, 178, 211, 158, 163, 465, 460,
7424 257, 159, 155, 189, 463, 155, 463, 152, 463, 189,
7425 56, 412, 213, 214, 422, 155, 98, 153, 458, 316,
7426 66, 119, 121, 122, 400, 119, 119, 400, 67, 400,
7427 161, 386, 395, 390, 396, 78, 160, 168, 151, 199,
7428 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7429 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7430 144, 298, 364, 425, 426, 427, 428, 429, 430, 432,
7431 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
7432 443, 444, 445, 446, 134, 265, 432, 134, 266, 329,
7433 330, 106, 207, 331, 332, 332, 235, 211, 155, 216,
7434 155, 235, 193, 227, 227, 227, 227, 227, 227, 227,
7435 227, 227, 227, 227, 227, 227, 192, 227, 227, 227,
7436 227, 227, 227, 227, 227, 227, 227, 227, 52, 53,
7437 56, 224, 455, 456, 244, 251, 52, 53, 56, 224,
7438 455, 242, 171, 174, 13, 289, 464, 289, 199, 171,
7439 171, 259, 163, 56, 98, 153, 458, 25, 199, 52,
7440 56, 218, 138, 420, 466, 98, 153, 458, 264, 451,
7441 69, 98, 457, 246, 460, 52, 56, 242, 455, 235,
7442 235, 223, 100, 124, 235, 239, 239, 249, 252, 453,
7443 52, 56, 244, 52, 56, 235, 235, 454, 460, 155,
7444 460, 155, 158, 460, 221, 236, 227, 152, 134, 134,
7445 56, 455, 455, 235, 170, 460, 177, 158, 453, 155,
7446 213, 52, 56, 244, 52, 56, 317, 402, 401, 119,
7447 387, 400, 66, 119, 119, 387, 66, 119, 227, 171,
7448 182, 102, 107, 294, 295, 296, 297, 435, 155, 447,
7449 466, 155, 447, 155, 431, 460, 299, 300, 155, 431,
7450 239, 34, 52, 52, 155, 431, 52, 39, 188, 209,
7451 227, 232, 174, 464, 188, 232, 174, 316, 152, 330,
7452 316, 10, 68, 286, 286, 107, 203, 204, 205, 239,
7453 251, 253, 254, 460, 213, 155, 99, 185, 190, 205,
7454 217, 227, 239, 241, 254, 268, 418, 338, 338, 189,
7455 100, 100, 151, 242, 248, 189, 461, 155, 100, 100,
7456 242, 243, 248, 466, 235, 286, 171, 13, 171, 27,
7457 290, 464, 286, 286, 17, 283, 334, 25, 258, 340,
7458 52, 56, 244, 52, 56, 260, 263, 419, 262, 52,
7459 56, 218, 244, 174, 191, 196, 460, 243, 248, 190,
7460 227, 241, 190, 241, 221, 235, 239, 250, 100, 100,
7461 461, 100, 100, 433, 453, 191, 39, 190, 241, 463,
7462 214, 461, 318, 403, 406, 413, 418, 383, 400, 383,
7463 383, 383, 152, 296, 435, 155, 460, 155, 446, 425,
7464 440, 442, 428, 429, 438, 444, 134, 239, 430, 437,
7465 444, 436, 438, 189, 44, 44, 286, 286, 317, 152,
7466 317, 239, 155, 44, 213, 56, 44, 134, 44, 98,
7467 153, 458, 336, 336, 136, 235, 235, 330, 207, 159,
7468 100, 235, 235, 207, 8, 281, 373, 466, 14, 15,
7469 284, 285, 291, 292, 466, 292, 201, 107, 239, 333,
7470 286, 338, 334, 286, 461, 199, 464, 199, 174, 461,
7471 286, 460, 194, 328, 325, 235, 235, 100, 235, 235,
7472 460, 155, 460, 189, 179, 404, 460, 294, 297, 295,
7473 447, 155, 431, 155, 431, 155, 431, 155, 431, 431,
7474 188, 232, 237, 237, 318, 318, 107, 239, 237, 237,
7475 235, 237, 52, 56, 244, 52, 56, 337, 337, 227,
7476 190, 241, 190, 241, 152, 235, 190, 241, 190, 241,
7477 239, 254, 374, 466, 175, 284, 171, 199, 286, 286,
7478 239, 155, 289, 336, 286, 290, 174, 464, 286, 235,
7479 157, 322, 432, 171, 155, 155, 438, 438, 444, 438,
7480 227, 227, 179, 179, 239, 182, 182, 227, 461, 52,
7481 56, 58, 91, 92, 99, 102, 104, 105, 107, 112,
7482 140, 321, 343, 344, 345, 347, 350, 354, 355, 356,
7483 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
7484 369, 370, 371, 372, 377, 378, 381, 382, 385, 389,
7485 392, 394, 415, 440, 343, 190, 241, 101, 375, 466,
7486 9, 282, 376, 466, 172, 289, 107, 239, 171, 337,
7487 261, 286, 432, 320, 0, 120, 405, 295, 431, 431,
7488 155, 431, 431, 139, 310, 311, 466, 310, 368, 368,
7489 56, 218, 337, 344, 352, 353, 354, 355, 358, 461,
7490 189, 337, 462, 52, 397, 52, 102, 413, 101, 155,
7491 139, 155, 155, 344, 89, 90, 98, 153, 157, 348,
7492 349, 52, 99, 217, 268, 414, 415, 418, 289, 176,
7493 171, 171, 239, 292, 334, 335, 342, 343, 171, 189,
7494 313, 29, 123, 323, 438, 298, 301, 302, 303, 304,
7495 306, 307, 309, 312, 436, 438, 439, 444, 446, 171,
7496 174, 344, 461, 344, 356, 358, 461, 155, 152, 235,
7497 124, 199, 369, 352, 356, 346, 357, 358, 112, 361,
7498 365, 368, 368, 218, 337, 461, 337, 460, 352, 355,
7499 359, 352, 355, 359, 56, 98, 153, 458, 171, 163,
7500 173, 291, 289, 40, 41, 286, 160, 158, 324, 171,
7501 431, 447, 155, 447, 155, 308, 313, 300, 155, 305,
7502 308, 99, 268, 155, 308, 460, 155, 155, 351, 460,
7503 155, 350, 155, 397, 460, 460, 460, 461, 461, 461,
7504 52, 56, 244, 52, 56, 373, 376, 339, 199, 199,
7505 52, 314, 315, 434, 174, 152, 301, 442, 304, 306,
7506 438, 444, 139, 268, 307, 444, 56, 98, 438, 357,
7507 359, 357, 356, 358, 461, 171, 155, 189, 286, 447,
7508 155, 308, 155, 308, 155, 308, 155, 308, 52, 56,
7509 308, 155, 462, 292, 340, 341, 315, 438, 438, 444,
7510 438, 308, 308, 155, 308, 308, 438, 308
7511};
7512
7513/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7514static const yytype_int16 yyr1[] =
7515{
7516 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7517 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7518 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7519 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7520 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7521 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7522 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7523 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7524 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7525 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7526 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7527 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7528 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7529 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7530 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7531 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7532 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7533 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7534 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7535 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7536 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7537 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7538 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7539 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7540 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7541 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7542 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7543 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7544 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7545 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7546 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7547 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7548 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7549 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7550 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7551 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7552 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7553 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7554 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7555 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7556 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7557 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7558 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7559 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7560 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7561 303, 303, 303, 303, 304, 305, 306, 307, 307, 308,
7562 308, 309, 309, 309, 309, 309, 309, 309, 309, 309,
7563 309, 309, 309, 309, 309, 309, 310, 310, 311, 312,
7564 312, 313, 313, 314, 314, 315, 315, 316, 317, 318,
7565 319, 320, 321, 322, 322, 323, 324, 323, 325, 326,
7566 326, 326, 326, 326, 327, 327, 327, 327, 327, 327,
7567 327, 327, 328, 328, 329, 330, 331, 332, 333, 333,
7568 333, 333, 334, 335, 335, 336, 337, 338, 339, 340,
7569 341, 341, 342, 342, 342, 343, 343, 343, 343, 343,
7570 343, 344, 345, 345, 346, 347, 347, 348, 349, 350,
7571 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
7572 350, 350, 351, 350, 350, 350, 352, 352, 352, 352,
7573 352, 352, 353, 353, 354, 354, 355, 356, 356, 357,
7574 357, 358, 359, 359, 359, 359, 360, 360, 361, 361,
7575 362, 362, 363, 363, 364, 365, 365, 366, 367, 367,
7576 367, 367, 367, 367, 366, 366, 366, 366, 368, 368,
7577 368, 368, 368, 368, 368, 368, 368, 368, 369, 370,
7578 370, 371, 372, 372, 372, 373, 373, 374, 374, 374,
7579 375, 375, 376, 376, 377, 377, 378, 379, 379, 379,
7580 380, 381, 382, 383, 383, 384, 385, 386, 386, 387,
7581 387, 388, 389, 390, 390, 391, 392, 393, 394, 395,
7582 395, 396, 396, 397, 397, 398, 398, 399, 399, 400,
7583 401, 400, 402, 403, 404, 400, 405, 405, 406, 406,
7584 407, 407, 408, 409, 409, 410, 411, 411, 412, 412,
7585 412, 412, 413, 413, 413, 414, 414, 414, 415, 415,
7586 415, 415, 415, 415, 415, 416, 416, 417, 417, 418,
7587 418, 419, 420, 420, 421, 421, 422, 423, 424, 423,
7588 425, 425, 426, 426, 427, 427, 427, 427, 428, 428,
7589 429, 430, 430, 431, 431, 432, 432, 432, 432, 432,
7590 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
7591 433, 434, 434, 434, 434, 435, 435, 436, 437, 437,
7592 438, 438, 439, 440, 440, 441, 442, 442, 443, 443,
7593 444, 444, 445, 445, 446, 446, 447, 447, 448, 449,
7594 450, 451, 450, 452, 452, 453, 453, 454, 454, 454,
7595 454, 454, 454, 455, 455, 455, 455, 456, 456, 456,
7596 457, 457, 458, 458, 459, 459, 460, 461, 462, 463,
7597 463, 464, 464, 465, 465, 466
7598};
7599
7600/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7601static const yytype_int8 yyr2[] =
7602{
7603 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7604 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7605 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7606 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7607 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7608 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7609 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7610 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7611 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7612 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7613 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7614 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7615 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7616 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7617 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7618 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7619 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7620 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7621 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7622 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7623 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7624 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7625 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7626 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7627 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7628 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7629 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7630 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7631 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7632 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7633 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7634 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7635 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7636 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7637 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7638 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7639 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7640 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7641 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7642 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7643 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7645 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7646 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7647 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7648 4, 2, 2, 1, 1, 1, 3, 1, 3, 2,
7649 0, 6, 8, 4, 6, 4, 2, 6, 2, 4,
7650 6, 2, 4, 2, 4, 1, 1, 1, 4, 0,
7651 1, 1, 4, 1, 3, 1, 1, 0, 0, 0,
7652 0, 0, 9, 4, 1, 3, 0, 4, 3, 2,
7653 4, 5, 5, 3, 2, 4, 4, 3, 3, 2,
7654 1, 4, 3, 3, 0, 7, 0, 7, 1, 2,
7655 3, 4, 5, 1, 1, 0, 0, 0, 0, 9,
7656 1, 1, 1, 3, 3, 1, 2, 3, 1, 1,
7657 1, 1, 3, 1, 0, 4, 1, 2, 2, 1,
7658 1, 4, 4, 4, 3, 4, 4, 4, 3, 3,
7659 3, 2, 0, 6, 2, 4, 1, 1, 2, 2,
7660 4, 1, 2, 3, 1, 3, 5, 2, 1, 1,
7661 3, 1, 3, 1, 2, 1, 1, 3, 2, 1,
7662 1, 3, 2, 1, 2, 1, 1, 1, 3, 3,
7663 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
7664 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
7665 2, 4, 2, 3, 1, 6, 1, 1, 1, 1,
7666 2, 1, 3, 1, 1, 1, 1, 1, 1, 2,
7667 3, 3, 3, 1, 2, 4, 1, 0, 3, 1,
7668 2, 4, 1, 0, 3, 4, 1, 4, 1, 0,
7669 3, 0, 3, 0, 2, 0, 2, 0, 2, 1,
7670 0, 3, 0, 0, 0, 6, 1, 1, 1, 1,
7671 1, 1, 2, 1, 1, 3, 1, 2, 1, 1,
7672 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7673 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7674 1, 0, 4, 1, 1, 1, 3, 1, 0, 3,
7675 2, 1, 1, 3, 4, 2, 2, 1, 1, 1,
7676 3, 1, 3, 2, 0, 6, 8, 4, 6, 4,
7677 6, 2, 4, 6, 2, 4, 2, 4, 1, 0,
7678 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
7679 1, 3, 1, 1, 1, 1, 2, 1, 1, 1,
7680 2, 1, 1, 1, 2, 1, 2, 1, 1, 1,
7681 1, 0, 4, 1, 2, 1, 3, 3, 2, 1,
7682 4, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7683 1, 1, 1, 1, 1, 1, 2, 2, 2, 1,
7684 1, 1, 1, 1, 2, 0
7685};
7686
7687
7688enum { YYENOMEM = -2 };
7689
7690#define yyerrok (yyerrstatus = 0)
7691#define yyclearin (yychar = YYEMPTY)
7692
7693#define YYACCEPT goto yyacceptlab
7694#define YYABORT goto yyabortlab
7695#define YYERROR goto yyerrorlab
7696#define YYNOMEM goto yyexhaustedlab
7697
7698
7699#define YYRECOVERING() (!!yyerrstatus)
7700
7701#define YYBACKUP(Token, Value) \
7702 do \
7703 if (yychar == YYEMPTY) \
7704 { \
7705 yychar = (Token); \
7706 yylval = (Value); \
7707 YYPOPSTACK (yylen); \
7708 yystate = *yyssp; \
7709 goto yybackup; \
7710 } \
7711 else \
7712 { \
7713 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7714 YYERROR; \
7715 } \
7716 while (0)
7717
7718/* Backward compatibility with an undocumented macro.
7719 Use YYerror or YYUNDEF. */
7720#define YYERRCODE YYUNDEF
7721
7722/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7723 If N is 0, then set CURRENT to the empty location which ends
7724 the previous symbol: RHS[0] (always defined). */
7725
7726#ifndef YYLLOC_DEFAULT
7727# define YYLLOC_DEFAULT(Current, Rhs, N) \
7728 do \
7729 if (N) \
7730 { \
7731 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7732 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7733 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7734 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7735 } \
7736 else \
7737 { \
7738 (Current).first_line = (Current).last_line = \
7739 YYRHSLOC (Rhs, 0).last_line; \
7740 (Current).first_column = (Current).last_column = \
7741 YYRHSLOC (Rhs, 0).last_column; \
7742 } \
7743 while (0)
7744#endif
7745
7746#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7747
7748
7749/* Enable debugging if requested. */
7750#if YYDEBUG
7751
7752# ifndef YYFPRINTF
7753# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7754# define YYFPRINTF fprintf
7755# endif
7756
7757# define YYDPRINTF(Args) \
7758do { \
7759 if (yydebug) \
7760 YYFPRINTF Args; \
7761} while (0)
7762
7763
7764/* YYLOCATION_PRINT -- Print the location on the stream.
7765 This macro was not mandated originally: define only if we know
7766 we won't break user code: when these are the locations we know. */
7767
7768# ifndef YYLOCATION_PRINT
7769
7770# if defined YY_LOCATION_PRINT
7771
7772 /* Temporary convenience wrapper in case some people defined the
7773 undocumented and private YY_LOCATION_PRINT macros. */
7774# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7775
7776# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7777
7778/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7779
7780YY_ATTRIBUTE_UNUSED
7781static int
7782yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7783{
7784 int res = 0;
7785 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7786 if (0 <= yylocp->first_line)
7787 {
7788 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7789 if (0 <= yylocp->first_column)
7790 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7791 }
7792 if (0 <= yylocp->last_line)
7793 {
7794 if (yylocp->first_line < yylocp->last_line)
7795 {
7796 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7797 if (0 <= end_col)
7798 res += YYFPRINTF (yyo, ".%d", end_col);
7799 }
7800 else if (0 <= end_col && yylocp->first_column < end_col)
7801 res += YYFPRINTF (yyo, "-%d", end_col);
7802 }
7803 return res;
7804}
7805
7806# define YYLOCATION_PRINT yy_location_print_
7807
7808 /* Temporary convenience wrapper in case some people defined the
7809 undocumented and private YY_LOCATION_PRINT macros. */
7810# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7811
7812# else
7813
7814# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7815 /* Temporary convenience wrapper in case some people defined the
7816 undocumented and private YY_LOCATION_PRINT macros. */
7817# define YY_LOCATION_PRINT YYLOCATION_PRINT
7818
7819# endif
7820# endif /* !defined YYLOCATION_PRINT */
7821
7822
7823# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7824do { \
7825 if (yydebug) \
7826 { \
7827 YYFPRINTF (stderr, "%s ", Title); \
7828 yy_symbol_print (stderr, \
7829 Kind, Value, Location, p); \
7830 YYFPRINTF (stderr, "\n"); \
7831 } \
7832} while (0)
7833
7834
7835/*-----------------------------------.
7836| Print this symbol's value on YYO. |
7837`-----------------------------------*/
7838
7839static void
7840yy_symbol_value_print (FILE *yyo,
7841 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7842{
7843 FILE *yyoutput = yyo;
7844 YY_USE (yyoutput);
7845 YY_USE (yylocationp);
7846 YY_USE (p);
7847 if (!yyvaluep)
7848 return;
7849 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7850switch (yykind)
7851 {
7852 case YYSYMBOL_keyword_class: /* "'class'" */
7853#line 2626 "parse.y"
7854 {
7855 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7856}
7857#line 7858 "parse.c"
7858 break;
7859
7860 case YYSYMBOL_keyword_module: /* "'module'" */
7861#line 2626 "parse.y"
7862 {
7863 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7864}
7865#line 7866 "parse.c"
7866 break;
7867
7868 case YYSYMBOL_keyword_def: /* "'def'" */
7869#line 2626 "parse.y"
7870 {
7871 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7872}
7873#line 7874 "parse.c"
7874 break;
7875
7876 case YYSYMBOL_keyword_undef: /* "'undef'" */
7877#line 2626 "parse.y"
7878 {
7879 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7880}
7881#line 7882 "parse.c"
7882 break;
7883
7884 case YYSYMBOL_keyword_begin: /* "'begin'" */
7885#line 2626 "parse.y"
7886 {
7887 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7888}
7889#line 7890 "parse.c"
7890 break;
7891
7892 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
7893#line 2626 "parse.y"
7894 {
7895 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7896}
7897#line 7898 "parse.c"
7898 break;
7899
7900 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
7901#line 2626 "parse.y"
7902 {
7903 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7904}
7905#line 7906 "parse.c"
7906 break;
7907
7908 case YYSYMBOL_keyword_end: /* "'end'" */
7909#line 2626 "parse.y"
7910 {
7911 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7912}
7913#line 7914 "parse.c"
7914 break;
7915
7916 case YYSYMBOL_keyword_if: /* "'if'" */
7917#line 2626 "parse.y"
7918 {
7919 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7920}
7921#line 7922 "parse.c"
7922 break;
7923
7924 case YYSYMBOL_keyword_unless: /* "'unless'" */
7925#line 2626 "parse.y"
7926 {
7927 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7928}
7929#line 7930 "parse.c"
7930 break;
7931
7932 case YYSYMBOL_keyword_then: /* "'then'" */
7933#line 2626 "parse.y"
7934 {
7935 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7936}
7937#line 7938 "parse.c"
7938 break;
7939
7940 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
7941#line 2626 "parse.y"
7942 {
7943 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7944}
7945#line 7946 "parse.c"
7946 break;
7947
7948 case YYSYMBOL_keyword_else: /* "'else'" */
7949#line 2626 "parse.y"
7950 {
7951 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7952}
7953#line 7954 "parse.c"
7954 break;
7955
7956 case YYSYMBOL_keyword_case: /* "'case'" */
7957#line 2626 "parse.y"
7958 {
7959 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7960}
7961#line 7962 "parse.c"
7962 break;
7963
7964 case YYSYMBOL_keyword_when: /* "'when'" */
7965#line 2626 "parse.y"
7966 {
7967 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7968}
7969#line 7970 "parse.c"
7970 break;
7971
7972 case YYSYMBOL_keyword_while: /* "'while'" */
7973#line 2626 "parse.y"
7974 {
7975 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7976}
7977#line 7978 "parse.c"
7978 break;
7979
7980 case YYSYMBOL_keyword_until: /* "'until'" */
7981#line 2626 "parse.y"
7982 {
7983 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7984}
7985#line 7986 "parse.c"
7986 break;
7987
7988 case YYSYMBOL_keyword_for: /* "'for'" */
7989#line 2626 "parse.y"
7990 {
7991 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7992}
7993#line 7994 "parse.c"
7994 break;
7995
7996 case YYSYMBOL_keyword_break: /* "'break'" */
7997#line 2626 "parse.y"
7998 {
7999 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8000}
8001#line 8002 "parse.c"
8002 break;
8003
8004 case YYSYMBOL_keyword_next: /* "'next'" */
8005#line 2626 "parse.y"
8006 {
8007 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8008}
8009#line 8010 "parse.c"
8010 break;
8011
8012 case YYSYMBOL_keyword_redo: /* "'redo'" */
8013#line 2626 "parse.y"
8014 {
8015 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8016}
8017#line 8018 "parse.c"
8018 break;
8019
8020 case YYSYMBOL_keyword_retry: /* "'retry'" */
8021#line 2626 "parse.y"
8022 {
8023 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8024}
8025#line 8026 "parse.c"
8026 break;
8027
8028 case YYSYMBOL_keyword_in: /* "'in'" */
8029#line 2626 "parse.y"
8030 {
8031 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8032}
8033#line 8034 "parse.c"
8034 break;
8035
8036 case YYSYMBOL_keyword_do: /* "'do'" */
8037#line 2626 "parse.y"
8038 {
8039 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8040}
8041#line 8042 "parse.c"
8042 break;
8043
8044 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8045#line 2626 "parse.y"
8046 {
8047 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8048}
8049#line 8050 "parse.c"
8050 break;
8051
8052 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8053#line 2626 "parse.y"
8054 {
8055 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8056}
8057#line 8058 "parse.c"
8058 break;
8059
8060 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8061#line 2626 "parse.y"
8062 {
8063 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8064}
8065#line 8066 "parse.c"
8066 break;
8067
8068 case YYSYMBOL_keyword_return: /* "'return'" */
8069#line 2626 "parse.y"
8070 {
8071 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8072}
8073#line 8074 "parse.c"
8074 break;
8075
8076 case YYSYMBOL_keyword_yield: /* "'yield'" */
8077#line 2626 "parse.y"
8078 {
8079 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8080}
8081#line 8082 "parse.c"
8082 break;
8083
8084 case YYSYMBOL_keyword_super: /* "'super'" */
8085#line 2626 "parse.y"
8086 {
8087 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8088}
8089#line 8090 "parse.c"
8090 break;
8091
8092 case YYSYMBOL_keyword_self: /* "'self'" */
8093#line 2626 "parse.y"
8094 {
8095 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8096}
8097#line 8098 "parse.c"
8098 break;
8099
8100 case YYSYMBOL_keyword_nil: /* "'nil'" */
8101#line 2626 "parse.y"
8102 {
8103 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8104}
8105#line 8106 "parse.c"
8106 break;
8107
8108 case YYSYMBOL_keyword_true: /* "'true'" */
8109#line 2626 "parse.y"
8110 {
8111 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8112}
8113#line 8114 "parse.c"
8114 break;
8115
8116 case YYSYMBOL_keyword_false: /* "'false'" */
8117#line 2626 "parse.y"
8118 {
8119 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8120}
8121#line 8122 "parse.c"
8122 break;
8123
8124 case YYSYMBOL_keyword_and: /* "'and'" */
8125#line 2626 "parse.y"
8126 {
8127 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8128}
8129#line 8130 "parse.c"
8130 break;
8131
8132 case YYSYMBOL_keyword_or: /* "'or'" */
8133#line 2626 "parse.y"
8134 {
8135 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8136}
8137#line 8138 "parse.c"
8138 break;
8139
8140 case YYSYMBOL_keyword_not: /* "'not'" */
8141#line 2626 "parse.y"
8142 {
8143 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8144}
8145#line 8146 "parse.c"
8146 break;
8147
8148 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8149#line 2626 "parse.y"
8150 {
8151 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8152}
8153#line 8154 "parse.c"
8154 break;
8155
8156 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8157#line 2626 "parse.y"
8158 {
8159 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8160}
8161#line 8162 "parse.c"
8162 break;
8163
8164 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8165#line 2626 "parse.y"
8166 {
8167 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8168}
8169#line 8170 "parse.c"
8170 break;
8171
8172 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8173#line 2626 "parse.y"
8174 {
8175 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8176}
8177#line 8178 "parse.c"
8178 break;
8179
8180 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8181#line 2626 "parse.y"
8182 {
8183 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8184}
8185#line 8186 "parse.c"
8186 break;
8187
8188 case YYSYMBOL_keyword_alias: /* "'alias'" */
8189#line 2626 "parse.y"
8190 {
8191 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8192}
8193#line 8194 "parse.c"
8194 break;
8195
8196 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8197#line 2626 "parse.y"
8198 {
8199 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8200}
8201#line 8202 "parse.c"
8202 break;
8203
8204 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8205#line 2626 "parse.y"
8206 {
8207 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8208}
8209#line 8210 "parse.c"
8210 break;
8211
8212 case YYSYMBOL_keyword_END: /* "'END'" */
8213#line 2626 "parse.y"
8214 {
8215 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8216}
8217#line 8218 "parse.c"
8218 break;
8219
8220 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8221#line 2626 "parse.y"
8222 {
8223 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8224}
8225#line 8226 "parse.c"
8226 break;
8227
8228 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8229#line 2626 "parse.y"
8230 {
8231 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8232}
8233#line 8234 "parse.c"
8234 break;
8235
8236 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8237#line 2626 "parse.y"
8238 {
8239 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8240}
8241#line 8242 "parse.c"
8242 break;
8243
8244 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8245#line 2626 "parse.y"
8246 {
8247 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8248}
8249#line 8250 "parse.c"
8250 break;
8251
8252 case YYSYMBOL_tFID: /* "method" */
8253#line 2626 "parse.y"
8254 {
8255 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8256}
8257#line 8258 "parse.c"
8258 break;
8259
8260 case YYSYMBOL_tGVAR: /* "global variable" */
8261#line 2626 "parse.y"
8262 {
8263 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8264}
8265#line 8266 "parse.c"
8266 break;
8267
8268 case YYSYMBOL_tIVAR: /* "instance variable" */
8269#line 2626 "parse.y"
8270 {
8271 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8272}
8273#line 8274 "parse.c"
8274 break;
8275
8276 case YYSYMBOL_tCONSTANT: /* "constant" */
8277#line 2626 "parse.y"
8278 {
8279 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8280}
8281#line 8282 "parse.c"
8282 break;
8283
8284 case YYSYMBOL_tCVAR: /* "class variable" */
8285#line 2626 "parse.y"
8286 {
8287 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8288}
8289#line 8290 "parse.c"
8290 break;
8291
8292 case YYSYMBOL_tLABEL: /* "label" */
8293#line 2626 "parse.y"
8294 {
8295 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8296}
8297#line 8298 "parse.c"
8298 break;
8299
8300 case YYSYMBOL_tINTEGER: /* "integer literal" */
8301#line 2629 "parse.y"
8302 {
8303 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8304 case NODE_INTEGER:
8305 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8306 break;
8307 case NODE_FLOAT:
8308 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8309 break;
8310 case NODE_RATIONAL:
8311 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8312 break;
8313 case NODE_IMAGINARY:
8314 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8315 break;
8316 default:
8317 break;
8318 }
8319}
8320#line 8321 "parse.c"
8321 break;
8322
8323 case YYSYMBOL_tFLOAT: /* "float literal" */
8324#line 2629 "parse.y"
8325 {
8326 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8327 case NODE_INTEGER:
8328 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8329 break;
8330 case NODE_FLOAT:
8331 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8332 break;
8333 case NODE_RATIONAL:
8334 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8335 break;
8336 case NODE_IMAGINARY:
8337 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8338 break;
8339 default:
8340 break;
8341 }
8342}
8343#line 8344 "parse.c"
8344 break;
8345
8346 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8347#line 2629 "parse.y"
8348 {
8349 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8350 case NODE_INTEGER:
8351 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8352 break;
8353 case NODE_FLOAT:
8354 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8355 break;
8356 case NODE_RATIONAL:
8357 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8358 break;
8359 case NODE_IMAGINARY:
8360 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8361 break;
8362 default:
8363 break;
8364 }
8365}
8366#line 8367 "parse.c"
8367 break;
8368
8369 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8370#line 2629 "parse.y"
8371 {
8372 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8373 case NODE_INTEGER:
8374 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8375 break;
8376 case NODE_FLOAT:
8377 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8378 break;
8379 case NODE_RATIONAL:
8380 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8381 break;
8382 case NODE_IMAGINARY:
8383 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8384 break;
8385 default:
8386 break;
8387 }
8388}
8389#line 8390 "parse.c"
8390 break;
8391
8392 case YYSYMBOL_tCHAR: /* "char literal" */
8393#line 2629 "parse.y"
8394 {
8395 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8396 case NODE_INTEGER:
8397 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8398 break;
8399 case NODE_FLOAT:
8400 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8401 break;
8402 case NODE_RATIONAL:
8403 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8404 break;
8405 case NODE_IMAGINARY:
8406 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8407 break;
8408 default:
8409 break;
8410 }
8411}
8412#line 8413 "parse.c"
8413 break;
8414
8415 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8416#line 2647 "parse.y"
8417 {
8418 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8419}
8420#line 8421 "parse.c"
8421 break;
8422
8423 case YYSYMBOL_tBACK_REF: /* "back reference" */
8424#line 2650 "parse.y"
8425 {
8426 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8427}
8428#line 8429 "parse.c"
8429 break;
8430
8431 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8432#line 2629 "parse.y"
8433 {
8434 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8435 case NODE_INTEGER:
8436 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8437 break;
8438 case NODE_FLOAT:
8439 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8440 break;
8441 case NODE_RATIONAL:
8442 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8443 break;
8444 case NODE_IMAGINARY:
8445 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8446 break;
8447 default:
8448 break;
8449 }
8450}
8451#line 8452 "parse.c"
8452 break;
8453
8454 case YYSYMBOL_69_: /* '.' */
8455#line 2626 "parse.y"
8456 {
8457 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8458}
8459#line 8460 "parse.c"
8460 break;
8461
8462 case YYSYMBOL_70_backslash_: /* "backslash" */
8463#line 2626 "parse.y"
8464 {
8465 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8466}
8467#line 8468 "parse.c"
8468 break;
8469
8470 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8471#line 2626 "parse.y"
8472 {
8473 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8474}
8475#line 8476 "parse.c"
8476 break;
8477
8478 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8479#line 2626 "parse.y"
8480 {
8481 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8482}
8483#line 8484 "parse.c"
8484 break;
8485
8486 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8487#line 2626 "parse.y"
8488 {
8489 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8490}
8491#line 8492 "parse.c"
8492 break;
8493
8494 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8495#line 2626 "parse.y"
8496 {
8497 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8498}
8499#line 8500 "parse.c"
8500 break;
8501
8502 case YYSYMBOL_tANDDOT: /* "&." */
8503#line 2626 "parse.y"
8504 {
8505 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8506}
8507#line 8508 "parse.c"
8508 break;
8509
8510 case YYSYMBOL_tCOLON2: /* "::" */
8511#line 2626 "parse.y"
8512 {
8513 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8514}
8515#line 8516 "parse.c"
8516 break;
8517
8518 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8519#line 2626 "parse.y"
8520 {
8521 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8522}
8523#line 8524 "parse.c"
8524 break;
8525
8526 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8527#line 2617 "parse.y"
8528 {
8529 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8530 rb_parser_printf(p, "NODE_SPECIAL");
8531 }
8532 else if (((*yyvaluep).node)) {
8533 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8534 }
8535}
8536#line 8537 "parse.c"
8537 break;
8538
8539 case YYSYMBOL_top_stmts: /* top_stmts */
8540#line 2617 "parse.y"
8541 {
8542 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8543 rb_parser_printf(p, "NODE_SPECIAL");
8544 }
8545 else if (((*yyvaluep).node)) {
8546 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8547 }
8548}
8549#line 8550 "parse.c"
8550 break;
8551
8552 case YYSYMBOL_top_stmt: /* top_stmt */
8553#line 2617 "parse.y"
8554 {
8555 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8556 rb_parser_printf(p, "NODE_SPECIAL");
8557 }
8558 else if (((*yyvaluep).node)) {
8559 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8560 }
8561}
8562#line 8563 "parse.c"
8563 break;
8564
8565 case YYSYMBOL_block_open: /* block_open */
8566#line 2617 "parse.y"
8567 {
8568 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8569 rb_parser_printf(p, "NODE_SPECIAL");
8570 }
8571 else if (((*yyvaluep).node_exits)) {
8572 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8573 }
8574}
8575#line 8576 "parse.c"
8576 break;
8577
8578 case YYSYMBOL_begin_block: /* begin_block */
8579#line 2617 "parse.y"
8580 {
8581 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8582 rb_parser_printf(p, "NODE_SPECIAL");
8583 }
8584 else if (((*yyvaluep).node)) {
8585 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8586 }
8587}
8588#line 8589 "parse.c"
8589 break;
8590
8591 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8592#line 2617 "parse.y"
8593 {
8594 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8595 rb_parser_printf(p, "NODE_SPECIAL");
8596 }
8597 else if (((*yyvaluep).node)) {
8598 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8599 }
8600}
8601#line 8602 "parse.c"
8602 break;
8603
8604 case YYSYMBOL_bodystmt: /* bodystmt */
8605#line 2617 "parse.y"
8606 {
8607 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8608 rb_parser_printf(p, "NODE_SPECIAL");
8609 }
8610 else if (((*yyvaluep).node)) {
8611 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8612 }
8613}
8614#line 8615 "parse.c"
8615 break;
8616
8617 case YYSYMBOL_stmts: /* stmts */
8618#line 2617 "parse.y"
8619 {
8620 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8621 rb_parser_printf(p, "NODE_SPECIAL");
8622 }
8623 else if (((*yyvaluep).node)) {
8624 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8625 }
8626}
8627#line 8628 "parse.c"
8628 break;
8629
8630 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8631#line 2617 "parse.y"
8632 {
8633 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8634 rb_parser_printf(p, "NODE_SPECIAL");
8635 }
8636 else if (((*yyvaluep).node)) {
8637 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8638 }
8639}
8640#line 8641 "parse.c"
8641 break;
8642
8643 case YYSYMBOL_allow_exits: /* allow_exits */
8644#line 2617 "parse.y"
8645 {
8646 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8647 rb_parser_printf(p, "NODE_SPECIAL");
8648 }
8649 else if (((*yyvaluep).node_exits)) {
8650 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8651 }
8652}
8653#line 8654 "parse.c"
8654 break;
8655
8656 case YYSYMBOL_stmt: /* stmt */
8657#line 2617 "parse.y"
8658 {
8659 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8660 rb_parser_printf(p, "NODE_SPECIAL");
8661 }
8662 else if (((*yyvaluep).node)) {
8663 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8664 }
8665}
8666#line 8667 "parse.c"
8667 break;
8668
8669 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8670#line 2617 "parse.y"
8671 {
8672 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8673 rb_parser_printf(p, "NODE_SPECIAL");
8674 }
8675 else if (((*yyvaluep).node)) {
8676 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8677 }
8678}
8679#line 8680 "parse.c"
8680 break;
8681
8682 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8683#line 2617 "parse.y"
8684 {
8685 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8686 rb_parser_printf(p, "NODE_SPECIAL");
8687 }
8688 else if (((*yyvaluep).node)) {
8689 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8690 }
8691}
8692#line 8693 "parse.c"
8693 break;
8694
8695 case YYSYMBOL_command_asgn: /* command_asgn */
8696#line 2617 "parse.y"
8697 {
8698 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8699 rb_parser_printf(p, "NODE_SPECIAL");
8700 }
8701 else if (((*yyvaluep).node)) {
8702 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8703 }
8704}
8705#line 8706 "parse.c"
8706 break;
8707
8708 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8709#line 2617 "parse.y"
8710 {
8711 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8712 rb_parser_printf(p, "NODE_SPECIAL");
8713 }
8714 else if (((*yyvaluep).node)) {
8715 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8716 }
8717}
8718#line 8719 "parse.c"
8719 break;
8720
8721 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8722#line 2617 "parse.y"
8723 {
8724 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8725 rb_parser_printf(p, "NODE_SPECIAL");
8726 }
8727 else if (((*yyvaluep).node)) {
8728 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8729 }
8730}
8731#line 8732 "parse.c"
8732 break;
8733
8734 case YYSYMBOL_endless_command: /* endless_command */
8735#line 2617 "parse.y"
8736 {
8737 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8738 rb_parser_printf(p, "NODE_SPECIAL");
8739 }
8740 else if (((*yyvaluep).node)) {
8741 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8742 }
8743}
8744#line 8745 "parse.c"
8745 break;
8746
8747 case YYSYMBOL_command_rhs: /* command_rhs */
8748#line 2617 "parse.y"
8749 {
8750 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8751 rb_parser_printf(p, "NODE_SPECIAL");
8752 }
8753 else if (((*yyvaluep).node)) {
8754 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8755 }
8756}
8757#line 8758 "parse.c"
8758 break;
8759
8760 case YYSYMBOL_expr: /* expr */
8761#line 2617 "parse.y"
8762 {
8763 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8764 rb_parser_printf(p, "NODE_SPECIAL");
8765 }
8766 else if (((*yyvaluep).node)) {
8767 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8768 }
8769}
8770#line 8771 "parse.c"
8771 break;
8772
8773 case YYSYMBOL_def_name: /* def_name */
8774#line 2626 "parse.y"
8775 {
8776 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8777}
8778#line 8779 "parse.c"
8779 break;
8780
8781 case YYSYMBOL_defn_head: /* defn_head */
8782#line 2617 "parse.y"
8783 {
8784 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8785 rb_parser_printf(p, "NODE_SPECIAL");
8786 }
8787 else if (((*yyvaluep).node_def_temp)) {
8788 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8789 }
8790}
8791#line 8792 "parse.c"
8792 break;
8793
8794 case YYSYMBOL_defs_head: /* defs_head */
8795#line 2617 "parse.y"
8796 {
8797 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8798 rb_parser_printf(p, "NODE_SPECIAL");
8799 }
8800 else if (((*yyvaluep).node_def_temp)) {
8801 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8802 }
8803}
8804#line 8805 "parse.c"
8805 break;
8806
8807 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8808#line 2617 "parse.y"
8809 {
8810 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8811 rb_parser_printf(p, "NODE_SPECIAL");
8812 }
8813 else if (((*yyvaluep).node)) {
8814 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8815 }
8816}
8817#line 8818 "parse.c"
8818 break;
8819
8820 case YYSYMBOL_expr_value: /* expr_value */
8821#line 2617 "parse.y"
8822 {
8823 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8824 rb_parser_printf(p, "NODE_SPECIAL");
8825 }
8826 else if (((*yyvaluep).node)) {
8827 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8828 }
8829}
8830#line 8831 "parse.c"
8831 break;
8832
8833 case YYSYMBOL_expr_value_do: /* expr_value_do */
8834#line 2617 "parse.y"
8835 {
8836 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8837 rb_parser_printf(p, "NODE_SPECIAL");
8838 }
8839 else if (((*yyvaluep).node)) {
8840 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8841 }
8842}
8843#line 8844 "parse.c"
8844 break;
8845
8846 case YYSYMBOL_command_call: /* command_call */
8847#line 2617 "parse.y"
8848 {
8849 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8850 rb_parser_printf(p, "NODE_SPECIAL");
8851 }
8852 else if (((*yyvaluep).node)) {
8853 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8854 }
8855}
8856#line 8857 "parse.c"
8857 break;
8858
8859 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
8860#line 2617 "parse.y"
8861 {
8862 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8863 rb_parser_printf(p, "NODE_SPECIAL");
8864 }
8865 else if (((*yyvaluep).node)) {
8866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8867 }
8868}
8869#line 8870 "parse.c"
8870 break;
8871
8872 case YYSYMBOL_command_call_value: /* command_call_value */
8873#line 2617 "parse.y"
8874 {
8875 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8876 rb_parser_printf(p, "NODE_SPECIAL");
8877 }
8878 else if (((*yyvaluep).node)) {
8879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8880 }
8881}
8882#line 8883 "parse.c"
8883 break;
8884
8885 case YYSYMBOL_block_command: /* block_command */
8886#line 2617 "parse.y"
8887 {
8888 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8889 rb_parser_printf(p, "NODE_SPECIAL");
8890 }
8891 else if (((*yyvaluep).node)) {
8892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8893 }
8894}
8895#line 8896 "parse.c"
8896 break;
8897
8898 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
8899#line 2617 "parse.y"
8900 {
8901 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8902 rb_parser_printf(p, "NODE_SPECIAL");
8903 }
8904 else if (((*yyvaluep).node)) {
8905 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8906 }
8907}
8908#line 8909 "parse.c"
8909 break;
8910
8911 case YYSYMBOL_fcall: /* fcall */
8912#line 2617 "parse.y"
8913 {
8914 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8915 rb_parser_printf(p, "NODE_SPECIAL");
8916 }
8917 else if (((*yyvaluep).node_fcall)) {
8918 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8919 }
8920}
8921#line 8922 "parse.c"
8922 break;
8923
8924 case YYSYMBOL_command: /* command */
8925#line 2617 "parse.y"
8926 {
8927 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8928 rb_parser_printf(p, "NODE_SPECIAL");
8929 }
8930 else if (((*yyvaluep).node)) {
8931 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8932 }
8933}
8934#line 8935 "parse.c"
8935 break;
8936
8937 case YYSYMBOL_mlhs: /* mlhs */
8938#line 2617 "parse.y"
8939 {
8940 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8941 rb_parser_printf(p, "NODE_SPECIAL");
8942 }
8943 else if (((*yyvaluep).node_masgn)) {
8944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8945 }
8946}
8947#line 8948 "parse.c"
8948 break;
8949
8950 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
8951#line 2617 "parse.y"
8952 {
8953 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8954 rb_parser_printf(p, "NODE_SPECIAL");
8955 }
8956 else if (((*yyvaluep).node_masgn)) {
8957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8958 }
8959}
8960#line 8961 "parse.c"
8961 break;
8962
8963 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
8964#line 2617 "parse.y"
8965 {
8966 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8967 rb_parser_printf(p, "NODE_SPECIAL");
8968 }
8969 else if (((*yyvaluep).node_masgn)) {
8970 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8971 }
8972}
8973#line 8974 "parse.c"
8974 break;
8975
8976 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
8977#line 2617 "parse.y"
8978 {
8979 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8980 rb_parser_printf(p, "NODE_SPECIAL");
8981 }
8982 else if (((*yyvaluep).node)) {
8983 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8984 }
8985}
8986#line 8987 "parse.c"
8987 break;
8988
8989 case YYSYMBOL_mlhs_item: /* mlhs_item */
8990#line 2617 "parse.y"
8991 {
8992 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8993 rb_parser_printf(p, "NODE_SPECIAL");
8994 }
8995 else if (((*yyvaluep).node)) {
8996 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8997 }
8998}
8999#line 9000 "parse.c"
9000 break;
9001
9002 case YYSYMBOL_mlhs_head: /* mlhs_head */
9003#line 2617 "parse.y"
9004 {
9005 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9006 rb_parser_printf(p, "NODE_SPECIAL");
9007 }
9008 else if (((*yyvaluep).node)) {
9009 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9010 }
9011}
9012#line 9013 "parse.c"
9013 break;
9014
9015 case YYSYMBOL_mlhs_node: /* mlhs_node */
9016#line 2617 "parse.y"
9017 {
9018 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9019 rb_parser_printf(p, "NODE_SPECIAL");
9020 }
9021 else if (((*yyvaluep).node)) {
9022 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9023 }
9024}
9025#line 9026 "parse.c"
9026 break;
9027
9028 case YYSYMBOL_lhs: /* lhs */
9029#line 2617 "parse.y"
9030 {
9031 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9032 rb_parser_printf(p, "NODE_SPECIAL");
9033 }
9034 else if (((*yyvaluep).node)) {
9035 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9036 }
9037}
9038#line 9039 "parse.c"
9039 break;
9040
9041 case YYSYMBOL_cname: /* cname */
9042#line 2626 "parse.y"
9043 {
9044 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9045}
9046#line 9047 "parse.c"
9047 break;
9048
9049 case YYSYMBOL_cpath: /* cpath */
9050#line 2617 "parse.y"
9051 {
9052 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9053 rb_parser_printf(p, "NODE_SPECIAL");
9054 }
9055 else if (((*yyvaluep).node)) {
9056 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9057 }
9058}
9059#line 9060 "parse.c"
9060 break;
9061
9062 case YYSYMBOL_fname: /* fname */
9063#line 2626 "parse.y"
9064 {
9065 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9066}
9067#line 9068 "parse.c"
9068 break;
9069
9070 case YYSYMBOL_fitem: /* fitem */
9071#line 2617 "parse.y"
9072 {
9073 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9074 rb_parser_printf(p, "NODE_SPECIAL");
9075 }
9076 else if (((*yyvaluep).node)) {
9077 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9078 }
9079}
9080#line 9081 "parse.c"
9081 break;
9082
9083 case YYSYMBOL_undef_list: /* undef_list */
9084#line 2617 "parse.y"
9085 {
9086 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9087 rb_parser_printf(p, "NODE_SPECIAL");
9088 }
9089 else if (((*yyvaluep).node)) {
9090 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9091 }
9092}
9093#line 9094 "parse.c"
9094 break;
9095
9096 case YYSYMBOL_op: /* op */
9097#line 2626 "parse.y"
9098 {
9099 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9100}
9101#line 9102 "parse.c"
9102 break;
9103
9104 case YYSYMBOL_reswords: /* reswords */
9105#line 2626 "parse.y"
9106 {
9107 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9108}
9109#line 9110 "parse.c"
9110 break;
9111
9112 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9113#line 2617 "parse.y"
9114 {
9115 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9116 rb_parser_printf(p, "NODE_SPECIAL");
9117 }
9118 else if (((*yyvaluep).node)) {
9119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9120 }
9121}
9122#line 9123 "parse.c"
9123 break;
9124
9125 case YYSYMBOL_arg: /* arg */
9126#line 2617 "parse.y"
9127 {
9128 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9129 rb_parser_printf(p, "NODE_SPECIAL");
9130 }
9131 else if (((*yyvaluep).node)) {
9132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9133 }
9134}
9135#line 9136 "parse.c"
9136 break;
9137
9138 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9139#line 2617 "parse.y"
9140 {
9141 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9142 rb_parser_printf(p, "NODE_SPECIAL");
9143 }
9144 else if (((*yyvaluep).node)) {
9145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9146 }
9147}
9148#line 9149 "parse.c"
9149 break;
9150
9151 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9152#line 2617 "parse.y"
9153 {
9154 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9155 rb_parser_printf(p, "NODE_SPECIAL");
9156 }
9157 else if (((*yyvaluep).node)) {
9158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9159 }
9160}
9161#line 9162 "parse.c"
9162 break;
9163
9164 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9165#line 2617 "parse.y"
9166 {
9167 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9168 rb_parser_printf(p, "NODE_SPECIAL");
9169 }
9170 else if (((*yyvaluep).node)) {
9171 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9172 }
9173}
9174#line 9175 "parse.c"
9175 break;
9176
9177 case YYSYMBOL_ternary: /* ternary */
9178#line 2617 "parse.y"
9179 {
9180 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9181 rb_parser_printf(p, "NODE_SPECIAL");
9182 }
9183 else if (((*yyvaluep).node)) {
9184 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9185 }
9186}
9187#line 9188 "parse.c"
9188 break;
9189
9190 case YYSYMBOL_endless_arg: /* endless_arg */
9191#line 2617 "parse.y"
9192 {
9193 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9194 rb_parser_printf(p, "NODE_SPECIAL");
9195 }
9196 else if (((*yyvaluep).node)) {
9197 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9198 }
9199}
9200#line 9201 "parse.c"
9201 break;
9202
9203 case YYSYMBOL_relop: /* relop */
9204#line 2626 "parse.y"
9205 {
9206 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9207}
9208#line 9209 "parse.c"
9209 break;
9210
9211 case YYSYMBOL_rel_expr: /* rel_expr */
9212#line 2617 "parse.y"
9213 {
9214 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9215 rb_parser_printf(p, "NODE_SPECIAL");
9216 }
9217 else if (((*yyvaluep).node)) {
9218 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9219 }
9220}
9221#line 9222 "parse.c"
9222 break;
9223
9224 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9225#line 2617 "parse.y"
9226 {
9227 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9228 rb_parser_printf(p, "NODE_SPECIAL");
9229 }
9230 else if (((*yyvaluep).node)) {
9231 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9232 }
9233}
9234#line 9235 "parse.c"
9235 break;
9236
9237 case YYSYMBOL_arg_value: /* arg_value */
9238#line 2617 "parse.y"
9239 {
9240 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9241 rb_parser_printf(p, "NODE_SPECIAL");
9242 }
9243 else if (((*yyvaluep).node)) {
9244 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9245 }
9246}
9247#line 9248 "parse.c"
9248 break;
9249
9250 case YYSYMBOL_aref_args: /* aref_args */
9251#line 2617 "parse.y"
9252 {
9253 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9254 rb_parser_printf(p, "NODE_SPECIAL");
9255 }
9256 else if (((*yyvaluep).node)) {
9257 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9258 }
9259}
9260#line 9261 "parse.c"
9261 break;
9262
9263 case YYSYMBOL_arg_rhs: /* arg_rhs */
9264#line 2617 "parse.y"
9265 {
9266 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9267 rb_parser_printf(p, "NODE_SPECIAL");
9268 }
9269 else if (((*yyvaluep).node)) {
9270 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9271 }
9272}
9273#line 9274 "parse.c"
9274 break;
9275
9276 case YYSYMBOL_paren_args: /* paren_args */
9277#line 2617 "parse.y"
9278 {
9279 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9280 rb_parser_printf(p, "NODE_SPECIAL");
9281 }
9282 else if (((*yyvaluep).node)) {
9283 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9284 }
9285}
9286#line 9287 "parse.c"
9287 break;
9288
9289 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9290#line 2617 "parse.y"
9291 {
9292 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9293 rb_parser_printf(p, "NODE_SPECIAL");
9294 }
9295 else if (((*yyvaluep).node)) {
9296 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9297 }
9298}
9299#line 9300 "parse.c"
9300 break;
9301
9302 case YYSYMBOL_opt_call_args: /* opt_call_args */
9303#line 2617 "parse.y"
9304 {
9305 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9306 rb_parser_printf(p, "NODE_SPECIAL");
9307 }
9308 else if (((*yyvaluep).node)) {
9309 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9310 }
9311}
9312#line 9313 "parse.c"
9313 break;
9314
9315 case YYSYMBOL_value_expr_command: /* value_expr_command */
9316#line 2617 "parse.y"
9317 {
9318 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9319 rb_parser_printf(p, "NODE_SPECIAL");
9320 }
9321 else if (((*yyvaluep).node)) {
9322 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9323 }
9324}
9325#line 9326 "parse.c"
9326 break;
9327
9328 case YYSYMBOL_call_args: /* call_args */
9329#line 2617 "parse.y"
9330 {
9331 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9332 rb_parser_printf(p, "NODE_SPECIAL");
9333 }
9334 else if (((*yyvaluep).node)) {
9335 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9336 }
9337}
9338#line 9339 "parse.c"
9339 break;
9340
9341 case YYSYMBOL_command_args: /* command_args */
9342#line 2617 "parse.y"
9343 {
9344 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9345 rb_parser_printf(p, "NODE_SPECIAL");
9346 }
9347 else if (((*yyvaluep).node)) {
9348 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9349 }
9350}
9351#line 9352 "parse.c"
9352 break;
9353
9354 case YYSYMBOL_block_arg: /* block_arg */
9355#line 2617 "parse.y"
9356 {
9357 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9358 rb_parser_printf(p, "NODE_SPECIAL");
9359 }
9360 else if (((*yyvaluep).node_block_pass)) {
9361 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9362 }
9363}
9364#line 9365 "parse.c"
9365 break;
9366
9367 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9368#line 2617 "parse.y"
9369 {
9370 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9371 rb_parser_printf(p, "NODE_SPECIAL");
9372 }
9373 else if (((*yyvaluep).node_block_pass)) {
9374 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9375 }
9376}
9377#line 9378 "parse.c"
9378 break;
9379
9380 case YYSYMBOL_args: /* args */
9381#line 2617 "parse.y"
9382 {
9383 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9384 rb_parser_printf(p, "NODE_SPECIAL");
9385 }
9386 else if (((*yyvaluep).node)) {
9387 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9388 }
9389}
9390#line 9391 "parse.c"
9391 break;
9392
9393 case YYSYMBOL_arg_splat: /* arg_splat */
9394#line 2617 "parse.y"
9395 {
9396 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9397 rb_parser_printf(p, "NODE_SPECIAL");
9398 }
9399 else if (((*yyvaluep).node)) {
9400 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9401 }
9402}
9403#line 9404 "parse.c"
9404 break;
9405
9406 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9407#line 2617 "parse.y"
9408 {
9409 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9410 rb_parser_printf(p, "NODE_SPECIAL");
9411 }
9412 else if (((*yyvaluep).node)) {
9413 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9414 }
9415}
9416#line 9417 "parse.c"
9417 break;
9418
9419 case YYSYMBOL_mrhs: /* mrhs */
9420#line 2617 "parse.y"
9421 {
9422 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9423 rb_parser_printf(p, "NODE_SPECIAL");
9424 }
9425 else if (((*yyvaluep).node)) {
9426 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9427 }
9428}
9429#line 9430 "parse.c"
9430 break;
9431
9432 case YYSYMBOL_primary: /* primary */
9433#line 2617 "parse.y"
9434 {
9435 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9436 rb_parser_printf(p, "NODE_SPECIAL");
9437 }
9438 else if (((*yyvaluep).node)) {
9439 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9440 }
9441}
9442#line 9443 "parse.c"
9443 break;
9444
9445 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9446#line 2617 "parse.y"
9447 {
9448 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9449 rb_parser_printf(p, "NODE_SPECIAL");
9450 }
9451 else if (((*yyvaluep).node)) {
9452 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9453 }
9454}
9455#line 9456 "parse.c"
9456 break;
9457
9458 case YYSYMBOL_primary_value: /* primary_value */
9459#line 2617 "parse.y"
9460 {
9461 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9462 rb_parser_printf(p, "NODE_SPECIAL");
9463 }
9464 else if (((*yyvaluep).node)) {
9465 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9466 }
9467}
9468#line 9469 "parse.c"
9469 break;
9470
9471 case YYSYMBOL_k_while: /* k_while */
9472#line 2617 "parse.y"
9473 {
9474 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9475 rb_parser_printf(p, "NODE_SPECIAL");
9476 }
9477 else if (((*yyvaluep).node_exits)) {
9478 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9479 }
9480}
9481#line 9482 "parse.c"
9482 break;
9483
9484 case YYSYMBOL_k_until: /* k_until */
9485#line 2617 "parse.y"
9486 {
9487 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9488 rb_parser_printf(p, "NODE_SPECIAL");
9489 }
9490 else if (((*yyvaluep).node_exits)) {
9491 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9492 }
9493}
9494#line 9495 "parse.c"
9495 break;
9496
9497 case YYSYMBOL_k_for: /* k_for */
9498#line 2617 "parse.y"
9499 {
9500 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9501 rb_parser_printf(p, "NODE_SPECIAL");
9502 }
9503 else if (((*yyvaluep).node_exits)) {
9504 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9505 }
9506}
9507#line 9508 "parse.c"
9508 break;
9509
9510 case YYSYMBOL_k_def: /* k_def */
9511#line 2617 "parse.y"
9512 {
9513 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9514 rb_parser_printf(p, "NODE_SPECIAL");
9515 }
9516 else if (((*yyvaluep).node_def_temp)) {
9517 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9518 }
9519}
9520#line 9521 "parse.c"
9521 break;
9522
9523 case YYSYMBOL_do: /* do */
9524#line 2626 "parse.y"
9525 {
9526 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9527}
9528#line 9529 "parse.c"
9529 break;
9530
9531 case YYSYMBOL_if_tail: /* if_tail */
9532#line 2617 "parse.y"
9533 {
9534 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9535 rb_parser_printf(p, "NODE_SPECIAL");
9536 }
9537 else if (((*yyvaluep).node)) {
9538 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9539 }
9540}
9541#line 9542 "parse.c"
9542 break;
9543
9544 case YYSYMBOL_opt_else: /* opt_else */
9545#line 2617 "parse.y"
9546 {
9547 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9548 rb_parser_printf(p, "NODE_SPECIAL");
9549 }
9550 else if (((*yyvaluep).node)) {
9551 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9552 }
9553}
9554#line 9555 "parse.c"
9555 break;
9556
9557 case YYSYMBOL_for_var: /* for_var */
9558#line 2617 "parse.y"
9559 {
9560 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9561 rb_parser_printf(p, "NODE_SPECIAL");
9562 }
9563 else if (((*yyvaluep).node)) {
9564 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9565 }
9566}
9567#line 9568 "parse.c"
9568 break;
9569
9570 case YYSYMBOL_f_marg: /* f_marg */
9571#line 2617 "parse.y"
9572 {
9573 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9574 rb_parser_printf(p, "NODE_SPECIAL");
9575 }
9576 else if (((*yyvaluep).node)) {
9577 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9578 }
9579}
9580#line 9581 "parse.c"
9581 break;
9582
9583 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9584#line 2617 "parse.y"
9585 {
9586 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9587 rb_parser_printf(p, "NODE_SPECIAL");
9588 }
9589 else if (((*yyvaluep).node)) {
9590 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9591 }
9592}
9593#line 9594 "parse.c"
9594 break;
9595
9596 case YYSYMBOL_f_margs: /* f_margs */
9597#line 2617 "parse.y"
9598 {
9599 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9600 rb_parser_printf(p, "NODE_SPECIAL");
9601 }
9602 else if (((*yyvaluep).node_masgn)) {
9603 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9604 }
9605}
9606#line 9607 "parse.c"
9607 break;
9608
9609 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9610#line 2617 "parse.y"
9611 {
9612 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9613 rb_parser_printf(p, "NODE_SPECIAL");
9614 }
9615 else if (((*yyvaluep).node)) {
9616 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9617 }
9618}
9619#line 9620 "parse.c"
9620 break;
9621
9622 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9623#line 2626 "parse.y"
9624 {
9625 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9626}
9627#line 9628 "parse.c"
9628 break;
9629
9630 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9631#line 2617 "parse.y"
9632 {
9633 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9634 rb_parser_printf(p, "NODE_SPECIAL");
9635 }
9636 else if (((*yyvaluep).node_kw_arg)) {
9637 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9638 }
9639}
9640#line 9641 "parse.c"
9641 break;
9642
9643 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9644#line 2617 "parse.y"
9645 {
9646 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9647 rb_parser_printf(p, "NODE_SPECIAL");
9648 }
9649 else if (((*yyvaluep).node_kw_arg)) {
9650 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9651 }
9652}
9653#line 9654 "parse.c"
9654 break;
9655
9656 case YYSYMBOL_args_tail_basic_primary_value: /* args_tail_basic_primary_value */
9657#line 2617 "parse.y"
9658 {
9659 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9660 rb_parser_printf(p, "NODE_SPECIAL");
9661 }
9662 else if (((*yyvaluep).node_args)) {
9663 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9664 }
9665}
9666#line 9667 "parse.c"
9667 break;
9668
9669 case YYSYMBOL_block_args_tail: /* block_args_tail */
9670#line 2617 "parse.y"
9671 {
9672 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9673 rb_parser_printf(p, "NODE_SPECIAL");
9674 }
9675 else if (((*yyvaluep).node_args)) {
9676 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9677 }
9678}
9679#line 9680 "parse.c"
9680 break;
9681
9682 case YYSYMBOL_excessed_comma: /* excessed_comma */
9683#line 2626 "parse.y"
9684 {
9685 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9686}
9687#line 9688 "parse.c"
9688 break;
9689
9690 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9691#line 2617 "parse.y"
9692 {
9693 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9694 rb_parser_printf(p, "NODE_SPECIAL");
9695 }
9696 else if (((*yyvaluep).node_opt_arg)) {
9697 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9698 }
9699}
9700#line 9701 "parse.c"
9701 break;
9702
9703 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9704#line 2617 "parse.y"
9705 {
9706 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9707 rb_parser_printf(p, "NODE_SPECIAL");
9708 }
9709 else if (((*yyvaluep).node_opt_arg)) {
9710 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9711 }
9712}
9713#line 9714 "parse.c"
9714 break;
9715
9716 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9717#line 2617 "parse.y"
9718 {
9719 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9720 rb_parser_printf(p, "NODE_SPECIAL");
9721 }
9722 else if (((*yyvaluep).node_args)) {
9723 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9724 }
9725}
9726#line 9727 "parse.c"
9727 break;
9728
9729 case YYSYMBOL_block_param: /* block_param */
9730#line 2617 "parse.y"
9731 {
9732 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9733 rb_parser_printf(p, "NODE_SPECIAL");
9734 }
9735 else if (((*yyvaluep).node_args)) {
9736 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9737 }
9738}
9739#line 9740 "parse.c"
9740 break;
9741
9742 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9743#line 2617 "parse.y"
9744 {
9745 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9746 rb_parser_printf(p, "NODE_SPECIAL");
9747 }
9748 else if (((*yyvaluep).node_args)) {
9749 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9750 }
9751}
9752#line 9753 "parse.c"
9753 break;
9754
9755 case YYSYMBOL_block_param_def: /* block_param_def */
9756#line 2617 "parse.y"
9757 {
9758 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9759 rb_parser_printf(p, "NODE_SPECIAL");
9760 }
9761 else if (((*yyvaluep).node_args)) {
9762 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9763 }
9764}
9765#line 9766 "parse.c"
9766 break;
9767
9768 case YYSYMBOL_opt_block_param: /* opt_block_param */
9769#line 2617 "parse.y"
9770 {
9771 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9772 rb_parser_printf(p, "NODE_SPECIAL");
9773 }
9774 else if (((*yyvaluep).node_args)) {
9775 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9776 }
9777}
9778#line 9779 "parse.c"
9779 break;
9780
9781 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9782#line 2626 "parse.y"
9783 {
9784 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9785}
9786#line 9787 "parse.c"
9787 break;
9788
9789 case YYSYMBOL_bv_decls: /* bv_decls */
9790#line 2626 "parse.y"
9791 {
9792 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9793}
9794#line 9795 "parse.c"
9795 break;
9796
9797 case YYSYMBOL_bvar: /* bvar */
9798#line 2626 "parse.y"
9799 {
9800 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9801}
9802#line 9803 "parse.c"
9803 break;
9804
9805 case YYSYMBOL_numparam: /* numparam */
9806#line 2617 "parse.y"
9807 {
9808 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9809 rb_parser_printf(p, "NODE_SPECIAL");
9810 }
9811 else if (((*yyvaluep).node)) {
9812 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9813 }
9814}
9815#line 9816 "parse.c"
9816 break;
9817
9818 case YYSYMBOL_it_id: /* it_id */
9819#line 2626 "parse.y"
9820 {
9821 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9822}
9823#line 9824 "parse.c"
9824 break;
9825
9826 case YYSYMBOL_lambda: /* lambda */
9827#line 2617 "parse.y"
9828 {
9829 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9830 rb_parser_printf(p, "NODE_SPECIAL");
9831 }
9832 else if (((*yyvaluep).node)) {
9833 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9834 }
9835}
9836#line 9837 "parse.c"
9837 break;
9838
9839 case YYSYMBOL_f_larglist: /* f_larglist */
9840#line 2617 "parse.y"
9841 {
9842 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9843 rb_parser_printf(p, "NODE_SPECIAL");
9844 }
9845 else if (((*yyvaluep).node_args)) {
9846 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9847 }
9848}
9849#line 9850 "parse.c"
9850 break;
9851
9852 case YYSYMBOL_do_block: /* do_block */
9853#line 2617 "parse.y"
9854 {
9855 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9856 rb_parser_printf(p, "NODE_SPECIAL");
9857 }
9858 else if (((*yyvaluep).node)) {
9859 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9860 }
9861}
9862#line 9863 "parse.c"
9863 break;
9864
9865 case YYSYMBOL_block_call: /* block_call */
9866#line 2617 "parse.y"
9867 {
9868 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9869 rb_parser_printf(p, "NODE_SPECIAL");
9870 }
9871 else if (((*yyvaluep).node)) {
9872 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9873 }
9874}
9875#line 9876 "parse.c"
9876 break;
9877
9878 case YYSYMBOL_method_call: /* method_call */
9879#line 2617 "parse.y"
9880 {
9881 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9882 rb_parser_printf(p, "NODE_SPECIAL");
9883 }
9884 else if (((*yyvaluep).node)) {
9885 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9886 }
9887}
9888#line 9889 "parse.c"
9889 break;
9890
9891 case YYSYMBOL_brace_block: /* brace_block */
9892#line 2617 "parse.y"
9893 {
9894 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9895 rb_parser_printf(p, "NODE_SPECIAL");
9896 }
9897 else if (((*yyvaluep).node)) {
9898 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9899 }
9900}
9901#line 9902 "parse.c"
9902 break;
9903
9904 case YYSYMBOL_brace_body: /* brace_body */
9905#line 2617 "parse.y"
9906 {
9907 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9908 rb_parser_printf(p, "NODE_SPECIAL");
9909 }
9910 else if (((*yyvaluep).node)) {
9911 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9912 }
9913}
9914#line 9915 "parse.c"
9915 break;
9916
9917 case YYSYMBOL_do_body: /* do_body */
9918#line 2617 "parse.y"
9919 {
9920 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9921 rb_parser_printf(p, "NODE_SPECIAL");
9922 }
9923 else if (((*yyvaluep).node)) {
9924 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9925 }
9926}
9927#line 9928 "parse.c"
9928 break;
9929
9930 case YYSYMBOL_case_args: /* case_args */
9931#line 2617 "parse.y"
9932 {
9933 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9934 rb_parser_printf(p, "NODE_SPECIAL");
9935 }
9936 else if (((*yyvaluep).node)) {
9937 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9938 }
9939}
9940#line 9941 "parse.c"
9941 break;
9942
9943 case YYSYMBOL_case_body: /* case_body */
9944#line 2617 "parse.y"
9945 {
9946 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9947 rb_parser_printf(p, "NODE_SPECIAL");
9948 }
9949 else if (((*yyvaluep).node)) {
9950 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9951 }
9952}
9953#line 9954 "parse.c"
9954 break;
9955
9956 case YYSYMBOL_cases: /* cases */
9957#line 2617 "parse.y"
9958 {
9959 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9960 rb_parser_printf(p, "NODE_SPECIAL");
9961 }
9962 else if (((*yyvaluep).node)) {
9963 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9964 }
9965}
9966#line 9967 "parse.c"
9967 break;
9968
9969 case YYSYMBOL_p_case_body: /* p_case_body */
9970#line 2617 "parse.y"
9971 {
9972 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9973 rb_parser_printf(p, "NODE_SPECIAL");
9974 }
9975 else if (((*yyvaluep).node)) {
9976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9977 }
9978}
9979#line 9980 "parse.c"
9980 break;
9981
9982 case YYSYMBOL_p_cases: /* p_cases */
9983#line 2617 "parse.y"
9984 {
9985 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9986 rb_parser_printf(p, "NODE_SPECIAL");
9987 }
9988 else if (((*yyvaluep).node)) {
9989 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9990 }
9991}
9992#line 9993 "parse.c"
9993 break;
9994
9995 case YYSYMBOL_p_top_expr: /* p_top_expr */
9996#line 2617 "parse.y"
9997 {
9998 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9999 rb_parser_printf(p, "NODE_SPECIAL");
10000 }
10001 else if (((*yyvaluep).node)) {
10002 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10003 }
10004}
10005#line 10006 "parse.c"
10006 break;
10007
10008 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10009#line 2617 "parse.y"
10010 {
10011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10012 rb_parser_printf(p, "NODE_SPECIAL");
10013 }
10014 else if (((*yyvaluep).node)) {
10015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10016 }
10017}
10018#line 10019 "parse.c"
10019 break;
10020
10021 case YYSYMBOL_p_expr: /* p_expr */
10022#line 2617 "parse.y"
10023 {
10024 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10025 rb_parser_printf(p, "NODE_SPECIAL");
10026 }
10027 else if (((*yyvaluep).node)) {
10028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10029 }
10030}
10031#line 10032 "parse.c"
10032 break;
10033
10034 case YYSYMBOL_p_as: /* p_as */
10035#line 2617 "parse.y"
10036 {
10037 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10038 rb_parser_printf(p, "NODE_SPECIAL");
10039 }
10040 else if (((*yyvaluep).node)) {
10041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10042 }
10043}
10044#line 10045 "parse.c"
10045 break;
10046
10047 case YYSYMBOL_p_alt: /* p_alt */
10048#line 2617 "parse.y"
10049 {
10050 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10051 rb_parser_printf(p, "NODE_SPECIAL");
10052 }
10053 else if (((*yyvaluep).node)) {
10054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10055 }
10056}
10057#line 10058 "parse.c"
10058 break;
10059
10060 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10061#line 2617 "parse.y"
10062 {
10063 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10064 rb_parser_printf(p, "NODE_SPECIAL");
10065 }
10066 else if (((*yyvaluep).node)) {
10067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10068 }
10069}
10070#line 10071 "parse.c"
10071 break;
10072
10073 case YYSYMBOL_p_args: /* p_args */
10074#line 2617 "parse.y"
10075 {
10076 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10077 rb_parser_printf(p, "NODE_SPECIAL");
10078 }
10079 else if (((*yyvaluep).node)) {
10080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10081 }
10082}
10083#line 10084 "parse.c"
10084 break;
10085
10086 case YYSYMBOL_p_args_head: /* p_args_head */
10087#line 2617 "parse.y"
10088 {
10089 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10090 rb_parser_printf(p, "NODE_SPECIAL");
10091 }
10092 else if (((*yyvaluep).node)) {
10093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10094 }
10095}
10096#line 10097 "parse.c"
10097 break;
10098
10099 case YYSYMBOL_p_args_tail: /* p_args_tail */
10100#line 2617 "parse.y"
10101 {
10102 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10103 rb_parser_printf(p, "NODE_SPECIAL");
10104 }
10105 else if (((*yyvaluep).node)) {
10106 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10107 }
10108}
10109#line 10110 "parse.c"
10110 break;
10111
10112 case YYSYMBOL_p_find: /* p_find */
10113#line 2617 "parse.y"
10114 {
10115 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10116 rb_parser_printf(p, "NODE_SPECIAL");
10117 }
10118 else if (((*yyvaluep).node)) {
10119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10120 }
10121}
10122#line 10123 "parse.c"
10123 break;
10124
10125 case YYSYMBOL_p_rest: /* p_rest */
10126#line 2617 "parse.y"
10127 {
10128 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10129 rb_parser_printf(p, "NODE_SPECIAL");
10130 }
10131 else if (((*yyvaluep).node)) {
10132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10133 }
10134}
10135#line 10136 "parse.c"
10136 break;
10137
10138 case YYSYMBOL_p_args_post: /* p_args_post */
10139#line 2617 "parse.y"
10140 {
10141 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10142 rb_parser_printf(p, "NODE_SPECIAL");
10143 }
10144 else if (((*yyvaluep).node)) {
10145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10146 }
10147}
10148#line 10149 "parse.c"
10149 break;
10150
10151 case YYSYMBOL_p_arg: /* p_arg */
10152#line 2617 "parse.y"
10153 {
10154 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10155 rb_parser_printf(p, "NODE_SPECIAL");
10156 }
10157 else if (((*yyvaluep).node)) {
10158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10159 }
10160}
10161#line 10162 "parse.c"
10162 break;
10163
10164 case YYSYMBOL_p_kwargs: /* p_kwargs */
10165#line 2617 "parse.y"
10166 {
10167 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10168 rb_parser_printf(p, "NODE_SPECIAL");
10169 }
10170 else if (((*yyvaluep).node)) {
10171 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10172 }
10173}
10174#line 10175 "parse.c"
10175 break;
10176
10177 case YYSYMBOL_p_kwarg: /* p_kwarg */
10178#line 2617 "parse.y"
10179 {
10180 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10181 rb_parser_printf(p, "NODE_SPECIAL");
10182 }
10183 else if (((*yyvaluep).node)) {
10184 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10185 }
10186}
10187#line 10188 "parse.c"
10188 break;
10189
10190 case YYSYMBOL_p_kw: /* p_kw */
10191#line 2617 "parse.y"
10192 {
10193 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10194 rb_parser_printf(p, "NODE_SPECIAL");
10195 }
10196 else if (((*yyvaluep).node)) {
10197 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10198 }
10199}
10200#line 10201 "parse.c"
10201 break;
10202
10203 case YYSYMBOL_p_kw_label: /* p_kw_label */
10204#line 2626 "parse.y"
10205 {
10206 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10207}
10208#line 10209 "parse.c"
10209 break;
10210
10211 case YYSYMBOL_p_kwrest: /* p_kwrest */
10212#line 2626 "parse.y"
10213 {
10214 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10215}
10216#line 10217 "parse.c"
10217 break;
10218
10219 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10220#line 2626 "parse.y"
10221 {
10222 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10223}
10224#line 10225 "parse.c"
10225 break;
10226
10227 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10228#line 2626 "parse.y"
10229 {
10230 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10231}
10232#line 10233 "parse.c"
10233 break;
10234
10235 case YYSYMBOL_p_value: /* p_value */
10236#line 2617 "parse.y"
10237 {
10238 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10239 rb_parser_printf(p, "NODE_SPECIAL");
10240 }
10241 else if (((*yyvaluep).node)) {
10242 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10243 }
10244}
10245#line 10246 "parse.c"
10246 break;
10247
10248 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10249#line 2617 "parse.y"
10250 {
10251 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10252 rb_parser_printf(p, "NODE_SPECIAL");
10253 }
10254 else if (((*yyvaluep).node)) {
10255 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10256 }
10257}
10258#line 10259 "parse.c"
10259 break;
10260
10261 case YYSYMBOL_p_primitive: /* p_primitive */
10262#line 2617 "parse.y"
10263 {
10264 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10265 rb_parser_printf(p, "NODE_SPECIAL");
10266 }
10267 else if (((*yyvaluep).node)) {
10268 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10269 }
10270}
10271#line 10272 "parse.c"
10272 break;
10273
10274 case YYSYMBOL_p_variable: /* p_variable */
10275#line 2617 "parse.y"
10276 {
10277 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10278 rb_parser_printf(p, "NODE_SPECIAL");
10279 }
10280 else if (((*yyvaluep).node)) {
10281 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10282 }
10283}
10284#line 10285 "parse.c"
10285 break;
10286
10287 case YYSYMBOL_p_var_ref: /* p_var_ref */
10288#line 2617 "parse.y"
10289 {
10290 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10291 rb_parser_printf(p, "NODE_SPECIAL");
10292 }
10293 else if (((*yyvaluep).node)) {
10294 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10295 }
10296}
10297#line 10298 "parse.c"
10298 break;
10299
10300 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10301#line 2617 "parse.y"
10302 {
10303 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10304 rb_parser_printf(p, "NODE_SPECIAL");
10305 }
10306 else if (((*yyvaluep).node)) {
10307 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10308 }
10309}
10310#line 10311 "parse.c"
10311 break;
10312
10313 case YYSYMBOL_p_const: /* p_const */
10314#line 2617 "parse.y"
10315 {
10316 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10317 rb_parser_printf(p, "NODE_SPECIAL");
10318 }
10319 else if (((*yyvaluep).node)) {
10320 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10321 }
10322}
10323#line 10324 "parse.c"
10324 break;
10325
10326 case YYSYMBOL_opt_rescue: /* opt_rescue */
10327#line 2617 "parse.y"
10328 {
10329 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10330 rb_parser_printf(p, "NODE_SPECIAL");
10331 }
10332 else if (((*yyvaluep).node)) {
10333 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10334 }
10335}
10336#line 10337 "parse.c"
10337 break;
10338
10339 case YYSYMBOL_exc_list: /* exc_list */
10340#line 2617 "parse.y"
10341 {
10342 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10343 rb_parser_printf(p, "NODE_SPECIAL");
10344 }
10345 else if (((*yyvaluep).node)) {
10346 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10347 }
10348}
10349#line 10350 "parse.c"
10350 break;
10351
10352 case YYSYMBOL_exc_var: /* exc_var */
10353#line 2617 "parse.y"
10354 {
10355 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10356 rb_parser_printf(p, "NODE_SPECIAL");
10357 }
10358 else if (((*yyvaluep).node)) {
10359 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10360 }
10361}
10362#line 10363 "parse.c"
10363 break;
10364
10365 case YYSYMBOL_opt_ensure: /* opt_ensure */
10366#line 2617 "parse.y"
10367 {
10368 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10369 rb_parser_printf(p, "NODE_SPECIAL");
10370 }
10371 else if (((*yyvaluep).node)) {
10372 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10373 }
10374}
10375#line 10376 "parse.c"
10376 break;
10377
10378 case YYSYMBOL_literal: /* literal */
10379#line 2617 "parse.y"
10380 {
10381 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10382 rb_parser_printf(p, "NODE_SPECIAL");
10383 }
10384 else if (((*yyvaluep).node)) {
10385 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10386 }
10387}
10388#line 10389 "parse.c"
10389 break;
10390
10391 case YYSYMBOL_strings: /* strings */
10392#line 2617 "parse.y"
10393 {
10394 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10395 rb_parser_printf(p, "NODE_SPECIAL");
10396 }
10397 else if (((*yyvaluep).node)) {
10398 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10399 }
10400}
10401#line 10402 "parse.c"
10402 break;
10403
10404 case YYSYMBOL_string: /* string */
10405#line 2617 "parse.y"
10406 {
10407 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10408 rb_parser_printf(p, "NODE_SPECIAL");
10409 }
10410 else if (((*yyvaluep).node)) {
10411 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10412 }
10413}
10414#line 10415 "parse.c"
10415 break;
10416
10417 case YYSYMBOL_string1: /* string1 */
10418#line 2617 "parse.y"
10419 {
10420 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10421 rb_parser_printf(p, "NODE_SPECIAL");
10422 }
10423 else if (((*yyvaluep).node)) {
10424 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10425 }
10426}
10427#line 10428 "parse.c"
10428 break;
10429
10430 case YYSYMBOL_xstring: /* xstring */
10431#line 2617 "parse.y"
10432 {
10433 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10434 rb_parser_printf(p, "NODE_SPECIAL");
10435 }
10436 else if (((*yyvaluep).node)) {
10437 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10438 }
10439}
10440#line 10441 "parse.c"
10441 break;
10442
10443 case YYSYMBOL_regexp: /* regexp */
10444#line 2617 "parse.y"
10445 {
10446 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10447 rb_parser_printf(p, "NODE_SPECIAL");
10448 }
10449 else if (((*yyvaluep).node)) {
10450 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10451 }
10452}
10453#line 10454 "parse.c"
10454 break;
10455
10456 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10457#line 2617 "parse.y"
10458 {
10459 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10460 rb_parser_printf(p, "NODE_SPECIAL");
10461 }
10462 else if (((*yyvaluep).node)) {
10463 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10464 }
10465}
10466#line 10467 "parse.c"
10467 break;
10468
10469 case YYSYMBOL_words: /* words */
10470#line 2617 "parse.y"
10471 {
10472 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10473 rb_parser_printf(p, "NODE_SPECIAL");
10474 }
10475 else if (((*yyvaluep).node)) {
10476 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10477 }
10478}
10479#line 10480 "parse.c"
10480 break;
10481
10482 case YYSYMBOL_word_list: /* word_list */
10483#line 2617 "parse.y"
10484 {
10485 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10486 rb_parser_printf(p, "NODE_SPECIAL");
10487 }
10488 else if (((*yyvaluep).node)) {
10489 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10490 }
10491}
10492#line 10493 "parse.c"
10493 break;
10494
10495 case YYSYMBOL_word: /* word */
10496#line 2617 "parse.y"
10497 {
10498 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10499 rb_parser_printf(p, "NODE_SPECIAL");
10500 }
10501 else if (((*yyvaluep).node)) {
10502 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10503 }
10504}
10505#line 10506 "parse.c"
10506 break;
10507
10508 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10509#line 2617 "parse.y"
10510 {
10511 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10512 rb_parser_printf(p, "NODE_SPECIAL");
10513 }
10514 else if (((*yyvaluep).node)) {
10515 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10516 }
10517}
10518#line 10519 "parse.c"
10519 break;
10520
10521 case YYSYMBOL_symbols: /* symbols */
10522#line 2617 "parse.y"
10523 {
10524 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10525 rb_parser_printf(p, "NODE_SPECIAL");
10526 }
10527 else if (((*yyvaluep).node)) {
10528 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10529 }
10530}
10531#line 10532 "parse.c"
10532 break;
10533
10534 case YYSYMBOL_symbol_list: /* symbol_list */
10535#line 2617 "parse.y"
10536 {
10537 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10538 rb_parser_printf(p, "NODE_SPECIAL");
10539 }
10540 else if (((*yyvaluep).node)) {
10541 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10542 }
10543}
10544#line 10545 "parse.c"
10545 break;
10546
10547 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10548#line 2617 "parse.y"
10549 {
10550 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10551 rb_parser_printf(p, "NODE_SPECIAL");
10552 }
10553 else if (((*yyvaluep).node)) {
10554 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10555 }
10556}
10557#line 10558 "parse.c"
10558 break;
10559
10560 case YYSYMBOL_qwords: /* qwords */
10561#line 2617 "parse.y"
10562 {
10563 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10564 rb_parser_printf(p, "NODE_SPECIAL");
10565 }
10566 else if (((*yyvaluep).node)) {
10567 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10568 }
10569}
10570#line 10571 "parse.c"
10571 break;
10572
10573 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10574#line 2617 "parse.y"
10575 {
10576 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10577 rb_parser_printf(p, "NODE_SPECIAL");
10578 }
10579 else if (((*yyvaluep).node)) {
10580 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10581 }
10582}
10583#line 10584 "parse.c"
10584 break;
10585
10586 case YYSYMBOL_qsymbols: /* qsymbols */
10587#line 2617 "parse.y"
10588 {
10589 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10590 rb_parser_printf(p, "NODE_SPECIAL");
10591 }
10592 else if (((*yyvaluep).node)) {
10593 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10594 }
10595}
10596#line 10597 "parse.c"
10597 break;
10598
10599 case YYSYMBOL_qword_list: /* qword_list */
10600#line 2617 "parse.y"
10601 {
10602 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10603 rb_parser_printf(p, "NODE_SPECIAL");
10604 }
10605 else if (((*yyvaluep).node)) {
10606 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10607 }
10608}
10609#line 10610 "parse.c"
10610 break;
10611
10612 case YYSYMBOL_qsym_list: /* qsym_list */
10613#line 2617 "parse.y"
10614 {
10615 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10616 rb_parser_printf(p, "NODE_SPECIAL");
10617 }
10618 else if (((*yyvaluep).node)) {
10619 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10620 }
10621}
10622#line 10623 "parse.c"
10623 break;
10624
10625 case YYSYMBOL_string_contents: /* string_contents */
10626#line 2617 "parse.y"
10627 {
10628 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10629 rb_parser_printf(p, "NODE_SPECIAL");
10630 }
10631 else if (((*yyvaluep).node)) {
10632 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10633 }
10634}
10635#line 10636 "parse.c"
10636 break;
10637
10638 case YYSYMBOL_xstring_contents: /* xstring_contents */
10639#line 2617 "parse.y"
10640 {
10641 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10642 rb_parser_printf(p, "NODE_SPECIAL");
10643 }
10644 else if (((*yyvaluep).node)) {
10645 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10646 }
10647}
10648#line 10649 "parse.c"
10649 break;
10650
10651 case YYSYMBOL_regexp_contents: /* regexp_contents */
10652#line 2617 "parse.y"
10653 {
10654 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10655 rb_parser_printf(p, "NODE_SPECIAL");
10656 }
10657 else if (((*yyvaluep).node)) {
10658 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10659 }
10660}
10661#line 10662 "parse.c"
10662 break;
10663
10664 case YYSYMBOL_string_content: /* string_content */
10665#line 2617 "parse.y"
10666 {
10667 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10668 rb_parser_printf(p, "NODE_SPECIAL");
10669 }
10670 else if (((*yyvaluep).node)) {
10671 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10672 }
10673}
10674#line 10675 "parse.c"
10675 break;
10676
10677 case YYSYMBOL_string_dvar: /* string_dvar */
10678#line 2617 "parse.y"
10679 {
10680 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10681 rb_parser_printf(p, "NODE_SPECIAL");
10682 }
10683 else if (((*yyvaluep).node)) {
10684 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10685 }
10686}
10687#line 10688 "parse.c"
10688 break;
10689
10690 case YYSYMBOL_symbol: /* symbol */
10691#line 2617 "parse.y"
10692 {
10693 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10694 rb_parser_printf(p, "NODE_SPECIAL");
10695 }
10696 else if (((*yyvaluep).node)) {
10697 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10698 }
10699}
10700#line 10701 "parse.c"
10701 break;
10702
10703 case YYSYMBOL_ssym: /* ssym */
10704#line 2617 "parse.y"
10705 {
10706 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10707 rb_parser_printf(p, "NODE_SPECIAL");
10708 }
10709 else if (((*yyvaluep).node)) {
10710 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10711 }
10712}
10713#line 10714 "parse.c"
10714 break;
10715
10716 case YYSYMBOL_sym: /* sym */
10717#line 2626 "parse.y"
10718 {
10719 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10720}
10721#line 10722 "parse.c"
10722 break;
10723
10724 case YYSYMBOL_dsym: /* dsym */
10725#line 2617 "parse.y"
10726 {
10727 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10728 rb_parser_printf(p, "NODE_SPECIAL");
10729 }
10730 else if (((*yyvaluep).node)) {
10731 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10732 }
10733}
10734#line 10735 "parse.c"
10735 break;
10736
10737 case YYSYMBOL_numeric: /* numeric */
10738#line 2617 "parse.y"
10739 {
10740 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10741 rb_parser_printf(p, "NODE_SPECIAL");
10742 }
10743 else if (((*yyvaluep).node)) {
10744 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10745 }
10746}
10747#line 10748 "parse.c"
10748 break;
10749
10750 case YYSYMBOL_simple_numeric: /* simple_numeric */
10751#line 2617 "parse.y"
10752 {
10753 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10754 rb_parser_printf(p, "NODE_SPECIAL");
10755 }
10756 else if (((*yyvaluep).node)) {
10757 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10758 }
10759}
10760#line 10761 "parse.c"
10761 break;
10762
10763 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10764#line 2626 "parse.y"
10765 {
10766 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10767}
10768#line 10769 "parse.c"
10769 break;
10770
10771 case YYSYMBOL_user_variable: /* user_variable */
10772#line 2626 "parse.y"
10773 {
10774 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10775}
10776#line 10777 "parse.c"
10777 break;
10778
10779 case YYSYMBOL_keyword_variable: /* keyword_variable */
10780#line 2626 "parse.y"
10781 {
10782 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10783}
10784#line 10785 "parse.c"
10785 break;
10786
10787 case YYSYMBOL_var_ref: /* var_ref */
10788#line 2617 "parse.y"
10789 {
10790 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10791 rb_parser_printf(p, "NODE_SPECIAL");
10792 }
10793 else if (((*yyvaluep).node)) {
10794 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10795 }
10796}
10797#line 10798 "parse.c"
10798 break;
10799
10800 case YYSYMBOL_var_lhs: /* var_lhs */
10801#line 2617 "parse.y"
10802 {
10803 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10804 rb_parser_printf(p, "NODE_SPECIAL");
10805 }
10806 else if (((*yyvaluep).node)) {
10807 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10808 }
10809}
10810#line 10811 "parse.c"
10811 break;
10812
10813 case YYSYMBOL_backref: /* backref */
10814#line 2617 "parse.y"
10815 {
10816 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10817 rb_parser_printf(p, "NODE_SPECIAL");
10818 }
10819 else if (((*yyvaluep).node)) {
10820 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10821 }
10822}
10823#line 10824 "parse.c"
10824 break;
10825
10826 case YYSYMBOL_superclass: /* superclass */
10827#line 2617 "parse.y"
10828 {
10829 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10830 rb_parser_printf(p, "NODE_SPECIAL");
10831 }
10832 else if (((*yyvaluep).node)) {
10833 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10834 }
10835}
10836#line 10837 "parse.c"
10837 break;
10838
10839 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
10840#line 2617 "parse.y"
10841 {
10842 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10843 rb_parser_printf(p, "NODE_SPECIAL");
10844 }
10845 else if (((*yyvaluep).node_args)) {
10846 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10847 }
10848}
10849#line 10850 "parse.c"
10850 break;
10851
10852 case YYSYMBOL_f_paren_args: /* f_paren_args */
10853#line 2617 "parse.y"
10854 {
10855 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10856 rb_parser_printf(p, "NODE_SPECIAL");
10857 }
10858 else if (((*yyvaluep).node_args)) {
10859 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10860 }
10861}
10862#line 10863 "parse.c"
10863 break;
10864
10865 case YYSYMBOL_f_arglist: /* f_arglist */
10866#line 2617 "parse.y"
10867 {
10868 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10869 rb_parser_printf(p, "NODE_SPECIAL");
10870 }
10871 else if (((*yyvaluep).node_args)) {
10872 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10873 }
10874}
10875#line 10876 "parse.c"
10876 break;
10877
10878 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
10879#line 2617 "parse.y"
10880 {
10881 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10882 rb_parser_printf(p, "NODE_SPECIAL");
10883 }
10884 else if (((*yyvaluep).node_kw_arg)) {
10885 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10886 }
10887}
10888#line 10889 "parse.c"
10889 break;
10890
10891 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
10892#line 2617 "parse.y"
10893 {
10894 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10895 rb_parser_printf(p, "NODE_SPECIAL");
10896 }
10897 else if (((*yyvaluep).node_kw_arg)) {
10898 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10899 }
10900}
10901#line 10902 "parse.c"
10902 break;
10903
10904 case YYSYMBOL_args_tail_basic_arg_value: /* args_tail_basic_arg_value */
10905#line 2617 "parse.y"
10906 {
10907 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10908 rb_parser_printf(p, "NODE_SPECIAL");
10909 }
10910 else if (((*yyvaluep).node_args)) {
10911 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10912 }
10913}
10914#line 10915 "parse.c"
10915 break;
10916
10917 case YYSYMBOL_args_tail: /* args_tail */
10918#line 2617 "parse.y"
10919 {
10920 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10921 rb_parser_printf(p, "NODE_SPECIAL");
10922 }
10923 else if (((*yyvaluep).node_args)) {
10924 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10925 }
10926}
10927#line 10928 "parse.c"
10928 break;
10929
10930 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
10931#line 2617 "parse.y"
10932 {
10933 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10934 rb_parser_printf(p, "NODE_SPECIAL");
10935 }
10936 else if (((*yyvaluep).node_opt_arg)) {
10937 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10938 }
10939}
10940#line 10941 "parse.c"
10941 break;
10942
10943 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
10944#line 2617 "parse.y"
10945 {
10946 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10947 rb_parser_printf(p, "NODE_SPECIAL");
10948 }
10949 else if (((*yyvaluep).node_opt_arg)) {
10950 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10951 }
10952}
10953#line 10954 "parse.c"
10954 break;
10955
10956 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
10957#line 2617 "parse.y"
10958 {
10959 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10960 rb_parser_printf(p, "NODE_SPECIAL");
10961 }
10962 else if (((*yyvaluep).node_args)) {
10963 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10964 }
10965}
10966#line 10967 "parse.c"
10967 break;
10968
10969 case YYSYMBOL_f_args: /* f_args */
10970#line 2617 "parse.y"
10971 {
10972 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10973 rb_parser_printf(p, "NODE_SPECIAL");
10974 }
10975 else if (((*yyvaluep).node_args)) {
10976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10977 }
10978}
10979#line 10980 "parse.c"
10980 break;
10981
10982 case YYSYMBOL_args_forward: /* args_forward */
10983#line 2626 "parse.y"
10984 {
10985 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10986}
10987#line 10988 "parse.c"
10988 break;
10989
10990 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
10991#line 2626 "parse.y"
10992 {
10993 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10994}
10995#line 10996 "parse.c"
10996 break;
10997
10998 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
10999#line 2626 "parse.y"
11000 {
11001 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11002}
11003#line 11004 "parse.c"
11004 break;
11005
11006 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11007#line 2626 "parse.y"
11008 {
11009 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11010}
11011#line 11012 "parse.c"
11012 break;
11013
11014 case YYSYMBOL_f_arg_item: /* f_arg_item */
11015#line 2617 "parse.y"
11016 {
11017 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11018 rb_parser_printf(p, "NODE_SPECIAL");
11019 }
11020 else if (((*yyvaluep).node_args_aux)) {
11021 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11022 }
11023}
11024#line 11025 "parse.c"
11025 break;
11026
11027 case YYSYMBOL_f_arg: /* f_arg */
11028#line 2617 "parse.y"
11029 {
11030 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11031 rb_parser_printf(p, "NODE_SPECIAL");
11032 }
11033 else if (((*yyvaluep).node_args_aux)) {
11034 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11035 }
11036}
11037#line 11038 "parse.c"
11038 break;
11039
11040 case YYSYMBOL_f_label: /* f_label */
11041#line 2626 "parse.y"
11042 {
11043 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11044}
11045#line 11046 "parse.c"
11046 break;
11047
11048 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11049#line 2626 "parse.y"
11050 {
11051 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11052}
11053#line 11054 "parse.c"
11054 break;
11055
11056 case YYSYMBOL_f_kwrest: /* f_kwrest */
11057#line 2626 "parse.y"
11058 {
11059 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11060}
11061#line 11062 "parse.c"
11062 break;
11063
11064 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11065#line 2626 "parse.y"
11066 {
11067 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11068}
11069#line 11070 "parse.c"
11070 break;
11071
11072 case YYSYMBOL_f_block_arg: /* f_block_arg */
11073#line 2626 "parse.y"
11074 {
11075 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11076}
11077#line 11078 "parse.c"
11078 break;
11079
11080 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
11081#line 2626 "parse.y"
11082 {
11083 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11084}
11085#line 11086 "parse.c"
11086 break;
11087
11088 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11089#line 2617 "parse.y"
11090 {
11091 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11092 rb_parser_printf(p, "NODE_SPECIAL");
11093 }
11094 else if (((*yyvaluep).node)) {
11095 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11096 }
11097}
11098#line 11099 "parse.c"
11099 break;
11100
11101 case YYSYMBOL_singleton: /* singleton */
11102#line 2617 "parse.y"
11103 {
11104 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11105 rb_parser_printf(p, "NODE_SPECIAL");
11106 }
11107 else if (((*yyvaluep).node)) {
11108 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11109 }
11110}
11111#line 11112 "parse.c"
11112 break;
11113
11114 case YYSYMBOL_singleton_expr: /* singleton_expr */
11115#line 2617 "parse.y"
11116 {
11117 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11118 rb_parser_printf(p, "NODE_SPECIAL");
11119 }
11120 else if (((*yyvaluep).node)) {
11121 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11122 }
11123}
11124#line 11125 "parse.c"
11125 break;
11126
11127 case YYSYMBOL_assoc_list: /* assoc_list */
11128#line 2617 "parse.y"
11129 {
11130 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11131 rb_parser_printf(p, "NODE_SPECIAL");
11132 }
11133 else if (((*yyvaluep).node)) {
11134 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11135 }
11136}
11137#line 11138 "parse.c"
11138 break;
11139
11140 case YYSYMBOL_assocs: /* assocs */
11141#line 2617 "parse.y"
11142 {
11143 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11144 rb_parser_printf(p, "NODE_SPECIAL");
11145 }
11146 else if (((*yyvaluep).node)) {
11147 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11148 }
11149}
11150#line 11151 "parse.c"
11151 break;
11152
11153 case YYSYMBOL_assoc: /* assoc */
11154#line 2617 "parse.y"
11155 {
11156 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11157 rb_parser_printf(p, "NODE_SPECIAL");
11158 }
11159 else if (((*yyvaluep).node)) {
11160 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11161 }
11162}
11163#line 11164 "parse.c"
11164 break;
11165
11166 case YYSYMBOL_operation2: /* operation2 */
11167#line 2626 "parse.y"
11168 {
11169 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11170}
11171#line 11172 "parse.c"
11172 break;
11173
11174 case YYSYMBOL_operation3: /* operation3 */
11175#line 2626 "parse.y"
11176 {
11177 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11178}
11179#line 11180 "parse.c"
11180 break;
11181
11182 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11183#line 2626 "parse.y"
11184 {
11185 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11186}
11187#line 11188 "parse.c"
11188 break;
11189
11190 case YYSYMBOL_call_op: /* call_op */
11191#line 2626 "parse.y"
11192 {
11193 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11194}
11195#line 11196 "parse.c"
11196 break;
11197
11198 case YYSYMBOL_call_op2: /* call_op2 */
11199#line 2626 "parse.y"
11200 {
11201 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11202}
11203#line 11204 "parse.c"
11204 break;
11205
11206 case YYSYMBOL_none: /* none */
11207#line 2617 "parse.y"
11208 {
11209 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11210 rb_parser_printf(p, "NODE_SPECIAL");
11211 }
11212 else if (((*yyvaluep).node)) {
11213 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11214 }
11215}
11216#line 11217 "parse.c"
11217 break;
11218
11219 default:
11220 break;
11221 }
11222 YY_IGNORE_MAYBE_UNINITIALIZED_END
11223}
11224
11225
11226/*---------------------------.
11227| Print this symbol on YYO. |
11228`---------------------------*/
11229
11230static void
11231yy_symbol_print (FILE *yyo,
11232 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11233{
11234 YYFPRINTF (yyo, "%s %s (",
11235 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11236
11237 YYLOCATION_PRINT (yyo, yylocationp, p);
11238 YYFPRINTF (yyo, ": ");
11239 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11240 YYFPRINTF (yyo, ")");
11241}
11242
11243/*------------------------------------------------------------------.
11244| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11245| TOP (included). |
11246`------------------------------------------------------------------*/
11247
11248static void
11249yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11250{
11251 YYFPRINTF (stderr, "Stack now");
11252 for (; yybottom <= yytop; yybottom++)
11253 {
11254 int yybot = *yybottom;
11255 YYFPRINTF (stderr, " %d", yybot);
11256 }
11257 YYFPRINTF (stderr, "\n");
11258}
11259
11260# define YY_STACK_PRINT(Bottom, Top, p) \
11261do { \
11262 if (yydebug) \
11263 yy_stack_print ((Bottom), (Top), p); \
11264} while (0)
11265
11266
11267/*------------------------------------------------.
11268| Report that the YYRULE is going to be reduced. |
11269`------------------------------------------------*/
11270
11271static void
11272yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11273 int yyrule, struct parser_params *p)
11274{
11275 int yylno = yyrline[yyrule];
11276 int yynrhs = yyr2[yyrule];
11277 int yyi;
11278 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11279 yyrule - 1, yylno);
11280 /* The symbols being reduced. */
11281 for (yyi = 0; yyi < yynrhs; yyi++)
11282 {
11283 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11284 yy_symbol_print (stderr,
11285 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11286 &yyvsp[(yyi + 1) - (yynrhs)],
11287 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11288 YYFPRINTF (stderr, "\n");
11289 }
11290}
11291
11292# define YY_REDUCE_PRINT(Rule, p) \
11293do { \
11294 if (yydebug) \
11295 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11296} while (0)
11297
11298/* Nonzero means print parse trace. It is left uninitialized so that
11299 multiple parsers can coexist. */
11300#ifndef yydebug
11301int yydebug;
11302#endif
11303#else /* !YYDEBUG */
11304# define YYDPRINTF(Args) ((void) 0)
11305# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11306# define YY_STACK_PRINT(Bottom, Top, p)
11307# define YY_REDUCE_PRINT(Rule, p)
11308#endif /* !YYDEBUG */
11309
11310
11311/* YYINITDEPTH -- initial size of the parser's stacks. */
11312#ifndef YYINITDEPTH
11313# define YYINITDEPTH 200
11314#endif
11315
11316/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11317 if the built-in stack extension method is used).
11318
11319 Do not make this value too large; the results are undefined if
11320 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11321 evaluated with infinite-precision integer arithmetic. */
11322
11323#ifndef YYMAXDEPTH
11324# define YYMAXDEPTH 10000
11325#endif
11326
11327
11328/* Context of a parse error. */
11329typedef struct
11330{
11331 yy_state_t *yyssp;
11332 yysymbol_kind_t yytoken;
11333 YYLTYPE *yylloc;
11334} yypcontext_t;
11335
11336/* Put in YYARG at most YYARGN of the expected tokens given the
11337 current YYCTX, and return the number of tokens stored in YYARG. If
11338 YYARG is null, return the number of expected tokens (guaranteed to
11339 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11340 Return 0 if there are more than YYARGN expected tokens, yet fill
11341 YYARG up to YYARGN. */
11342static int
11343yypcontext_expected_tokens (const yypcontext_t *yyctx,
11344 yysymbol_kind_t yyarg[], int yyargn)
11345{
11346 /* Actual size of YYARG. */
11347 int yycount = 0;
11348 int yyn = yypact[+*yyctx->yyssp];
11349 if (!yypact_value_is_default (yyn))
11350 {
11351 /* Start YYX at -YYN if negative to avoid negative indexes in
11352 YYCHECK. In other words, skip the first -YYN actions for
11353 this state because they are default actions. */
11354 int yyxbegin = yyn < 0 ? -yyn : 0;
11355 /* Stay within bounds of both yycheck and yytname. */
11356 int yychecklim = YYLAST - yyn + 1;
11357 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11358 int yyx;
11359 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11360 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11361 && !yytable_value_is_error (yytable[yyx + yyn]))
11362 {
11363 if (!yyarg)
11364 ++yycount;
11365 else if (yycount == yyargn)
11366 return 0;
11367 else
11368 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11369 }
11370 }
11371 if (yyarg && yycount == 0 && 0 < yyargn)
11372 yyarg[0] = YYSYMBOL_YYEMPTY;
11373 return yycount;
11374}
11375
11376
11377
11378
11379#ifndef yystrlen
11380# if defined __GLIBC__ && defined _STRING_H
11381# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11382# else
11383/* Return the length of YYSTR. */
11384static YYPTRDIFF_T
11385yystrlen (const char *yystr)
11386{
11387 YYPTRDIFF_T yylen;
11388 for (yylen = 0; yystr[yylen]; yylen++)
11389 continue;
11390 return yylen;
11391}
11392# endif
11393#endif
11394
11395#ifndef yystpcpy
11396# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11397# define yystpcpy stpcpy
11398# else
11399/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11400 YYDEST. */
11401static char *
11402yystpcpy (char *yydest, const char *yysrc)
11403{
11404 char *yyd = yydest;
11405 const char *yys = yysrc;
11406
11407 while ((*yyd++ = *yys++) != '\0')
11408 continue;
11409
11410 return yyd - 1;
11411}
11412# endif
11413#endif
11414
11415#ifndef yytnamerr
11416/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11417 quotes and backslashes, so that it's suitable for yyerror. The
11418 heuristic is that double-quoting is unnecessary unless the string
11419 contains an apostrophe, a comma, or backslash (other than
11420 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11421 null, do not copy; instead, return the length of what the result
11422 would have been. */
11423static YYPTRDIFF_T
11424yytnamerr (char *yyres, const char *yystr)
11425{
11426 if (*yystr == '"')
11427 {
11428 YYPTRDIFF_T yyn = 0;
11429 char const *yyp = yystr;
11430 for (;;)
11431 switch (*++yyp)
11432 {
11433 case '\'':
11434 case ',':
11435 goto do_not_strip_quotes;
11436
11437 case '\\':
11438 if (*++yyp != '\\')
11439 goto do_not_strip_quotes;
11440 else
11441 goto append;
11442
11443 append:
11444 default:
11445 if (yyres)
11446 yyres[yyn] = *yyp;
11447 yyn++;
11448 break;
11449
11450 case '"':
11451 if (yyres)
11452 yyres[yyn] = '\0';
11453 return yyn;
11454 }
11455 do_not_strip_quotes: ;
11456 }
11457
11458 if (yyres)
11459 return yystpcpy (yyres, yystr) - yyres;
11460 else
11461 return yystrlen (yystr);
11462}
11463#endif
11464
11465
11466static int
11467yy_syntax_error_arguments (const yypcontext_t *yyctx,
11468 yysymbol_kind_t yyarg[], int yyargn)
11469{
11470 /* Actual size of YYARG. */
11471 int yycount = 0;
11472 /* There are many possibilities here to consider:
11473 - If this state is a consistent state with a default action, then
11474 the only way this function was invoked is if the default action
11475 is an error action. In that case, don't check for expected
11476 tokens because there are none.
11477 - The only way there can be no lookahead present (in yychar) is if
11478 this state is a consistent state with a default action. Thus,
11479 detecting the absence of a lookahead is sufficient to determine
11480 that there is no unexpected or expected token to report. In that
11481 case, just report a simple "syntax error".
11482 - Don't assume there isn't a lookahead just because this state is a
11483 consistent state with a default action. There might have been a
11484 previous inconsistent state, consistent state with a non-default
11485 action, or user semantic action that manipulated yychar.
11486 - Of course, the expected token list depends on states to have
11487 correct lookahead information, and it depends on the parser not
11488 to perform extra reductions after fetching a lookahead from the
11489 scanner and before detecting a syntax error. Thus, state merging
11490 (from LALR or IELR) and default reductions corrupt the expected
11491 token list. However, the list is correct for canonical LR with
11492 one exception: it will still contain any token that will not be
11493 accepted due to an error action in a later state.
11494 */
11495 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11496 {
11497 int yyn;
11498 if (yyarg)
11499 yyarg[yycount] = yyctx->yytoken;
11500 ++yycount;
11501 yyn = yypcontext_expected_tokens (yyctx,
11502 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11503 if (yyn == YYENOMEM)
11504 return YYENOMEM;
11505 else
11506 yycount += yyn;
11507 }
11508 return yycount;
11509}
11510
11511/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11512 about the unexpected token YYTOKEN for the state stack whose top is
11513 YYSSP.
11514
11515 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11516 not large enough to hold the message. In that case, also set
11517 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11518 required number of bytes is too large to store. */
11519static int
11520yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11521 const yypcontext_t *yyctx, struct parser_params *p)
11522{
11523 enum { YYARGS_MAX = 5 };
11524 /* Internationalized format string. */
11525 const char *yyformat = YY_NULLPTR;
11526 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11527 one per "expected"). */
11528 yysymbol_kind_t yyarg[YYARGS_MAX];
11529 /* Cumulated lengths of YYARG. */
11530 YYPTRDIFF_T yysize = 0;
11531
11532 /* Actual size of YYARG. */
11533 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11534 if (yycount == YYENOMEM)
11535 return YYENOMEM;
11536
11537 switch (yycount)
11538 {
11539#define YYCASE_(N, S) \
11540 case N: \
11541 yyformat = S; \
11542 break
11543 default: /* Avoid compiler warnings. */
11544 YYCASE_(0, YY_("syntax error"));
11545 YYCASE_(1, YY_("syntax error, unexpected %s"));
11546 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11547 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11548 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11549 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11550#undef YYCASE_
11551 }
11552
11553 /* Compute error message size. Don't count the "%s"s, but reserve
11554 room for the terminator. */
11555 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11556 {
11557 int yyi;
11558 for (yyi = 0; yyi < yycount; ++yyi)
11559 {
11560 YYPTRDIFF_T yysize1
11561 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11562 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11563 yysize = yysize1;
11564 else
11565 return YYENOMEM;
11566 }
11567 }
11568
11569 if (*yymsg_alloc < yysize)
11570 {
11571 *yymsg_alloc = 2 * yysize;
11572 if (! (yysize <= *yymsg_alloc
11573 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11574 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11575 return -1;
11576 }
11577
11578 /* Avoid sprintf, as that infringes on the user's name space.
11579 Don't have undefined behavior even if the translation
11580 produced a string with the wrong number of "%s"s. */
11581 {
11582 char *yyp = *yymsg;
11583 int yyi = 0;
11584 while ((*yyp = *yyformat) != '\0')
11585 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11586 {
11587 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11588 yyformat += 2;
11589 }
11590 else
11591 {
11592 ++yyp;
11593 ++yyformat;
11594 }
11595 }
11596 return 0;
11597}
11598
11599
11600/*-----------------------------------------------.
11601| Release the memory associated to this symbol. |
11602`-----------------------------------------------*/
11603
11604static void
11605yydestruct (const char *yymsg,
11606 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11607{
11608 YY_USE (yyvaluep);
11609 YY_USE (yylocationp);
11610 YY_USE (p);
11611 if (!yymsg)
11612 yymsg = "Deleting";
11613 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11614
11615 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11616 switch (yykind)
11617 {
11618 case YYSYMBOL_258_16: /* @16 */
11619#line 2654 "parse.y"
11620 {
11621 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11622}
11623#line 11624 "parse.c"
11624 break;
11625
11626 case YYSYMBOL_259_17: /* @17 */
11627#line 2654 "parse.y"
11628 {
11629 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11630}
11631#line 11632 "parse.c"
11632 break;
11633
11634 default:
11635 break;
11636 }
11637 YY_IGNORE_MAYBE_UNINITIALIZED_END
11638}
11639
11640
11641
11642
11643
11644
11645/*----------.
11646| yyparse. |
11647`----------*/
11648
11649int
11650yyparse (struct parser_params *p)
11651{
11652/* Lookahead token kind. */
11653int yychar;
11654
11655
11656/* The semantic value of the lookahead symbol. */
11657/* Default value used for initialization, for pacifying older GCCs
11658 or non-GCC compilers. */
11659#ifdef __cplusplus
11660static const YYSTYPE yyval_default = {};
11661(void) yyval_default;
11662#else
11663YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11664#endif
11665YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11666
11667/* Location data for the lookahead symbol. */
11668static const YYLTYPE yyloc_default
11669# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11670 = { 1, 1, 1, 1 }
11671# endif
11672;
11673YYLTYPE yylloc = yyloc_default;
11674
11675 /* Number of syntax errors so far. */
11676 int yynerrs = 0;
11677 YY_USE (yynerrs); /* Silence compiler warning. */
11678
11679 yy_state_fast_t yystate = 0;
11680 /* Number of tokens to shift before error messages enabled. */
11681 int yyerrstatus = 0;
11682
11683 /* Refer to the stacks through separate pointers, to allow yyoverflow
11684 to reallocate them elsewhere. */
11685
11686 /* Their size. */
11687 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11688
11689 /* The state stack: array, bottom, top. */
11690 yy_state_t yyssa[YYINITDEPTH];
11691 yy_state_t *yyss = yyssa;
11692 yy_state_t *yyssp = yyss;
11693
11694 /* The semantic value stack: array, bottom, top. */
11695 YYSTYPE yyvsa[YYINITDEPTH];
11696 YYSTYPE *yyvs = yyvsa;
11697 YYSTYPE *yyvsp = yyvs;
11698
11699 /* The location stack: array, bottom, top. */
11700 YYLTYPE yylsa[YYINITDEPTH];
11701 YYLTYPE *yyls = yylsa;
11702 YYLTYPE *yylsp = yyls;
11703
11704 int yyn;
11705 /* The return value of yyparse. */
11706 int yyresult;
11707 /* Lookahead symbol kind. */
11708 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11709 /* The variables used to return semantic value and location from the
11710 action routines. */
11711 YYSTYPE yyval;
11712 YYLTYPE yyloc;
11713
11714 /* The locations where the error started and ended. */
11715 YYLTYPE yyerror_range[3];
11716
11717 /* Buffer for error messages, and its allocated size. */
11718 char yymsgbuf[128];
11719 char *yymsg = yymsgbuf;
11720 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11721
11722#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11723
11724 /* The number of symbols on the RHS of the reduced rule.
11725 Keep to zero when no symbol should be popped. */
11726 int yylen = 0;
11727
11728 YYDPRINTF ((stderr, "Starting parse\n"));
11729
11730 yychar = YYEMPTY; /* Cause a token to be read. */
11731
11732
11733 /* User initialization code. */
11734#line 2661 "parse.y"
11735 {
11736 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11737}
11738
11739#line 11740 "parse.c"
11740
11741 yylsp[0] = yylloc;
11742 goto yysetstate;
11743
11744
11745/*------------------------------------------------------------.
11746| yynewstate -- push a new state, which is found in yystate. |
11747`------------------------------------------------------------*/
11748yynewstate:
11749 /* In all cases, when you get here, the value and location stacks
11750 have just been pushed. So pushing a state here evens the stacks. */
11751 yyssp++;
11752
11753
11754/*--------------------------------------------------------------------.
11755| yysetstate -- set current state (the top of the stack) to yystate. |
11756`--------------------------------------------------------------------*/
11757yysetstate:
11758 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11759 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11760 YY_IGNORE_USELESS_CAST_BEGIN
11761 *yyssp = YY_CAST (yy_state_t, yystate);
11762 YY_IGNORE_USELESS_CAST_END
11763 YY_STACK_PRINT (yyss, yyssp, p);
11764
11765 if (yyss + yystacksize - 1 <= yyssp)
11766#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11767 YYNOMEM;
11768#else
11769 {
11770 /* Get the current used size of the three stacks, in elements. */
11771 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11772
11773# if defined yyoverflow
11774 {
11775 /* Give user a chance to reallocate the stack. Use copies of
11776 these so that the &'s don't force the real ones into
11777 memory. */
11778 yy_state_t *yyss1 = yyss;
11779 YYSTYPE *yyvs1 = yyvs;
11780 YYLTYPE *yyls1 = yyls;
11781
11782 /* Each stack pointer address is followed by the size of the
11783 data in use in that stack, in bytes. This used to be a
11784 conditional around just the two extra args, but that might
11785 be undefined if yyoverflow is a macro. */
11786 yyoverflow (YY_("memory exhausted"),
11787 &yyss1, yysize * YYSIZEOF (*yyssp),
11788 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11789 &yyls1, yysize * YYSIZEOF (*yylsp),
11790 &yystacksize);
11791 yyss = yyss1;
11792 yyvs = yyvs1;
11793 yyls = yyls1;
11794 }
11795# else /* defined YYSTACK_RELOCATE */
11796 /* Extend the stack our own way. */
11797 if (YYMAXDEPTH <= yystacksize)
11798 YYNOMEM;
11799 yystacksize *= 2;
11800 if (YYMAXDEPTH < yystacksize)
11801 yystacksize = YYMAXDEPTH;
11802
11803 {
11804 yy_state_t *yyss1 = yyss;
11805 union yyalloc *yyptr =
11806 YY_CAST (union yyalloc *,
11807 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11808 if (! yyptr)
11809 YYNOMEM;
11810 YYSTACK_RELOCATE (yyss_alloc, yyss);
11811 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11812 YYSTACK_RELOCATE (yyls_alloc, yyls);
11813# undef YYSTACK_RELOCATE
11814 if (yyss1 != yyssa)
11815 YYSTACK_FREE (yyss1);
11816 }
11817# endif
11818
11819 yyssp = yyss + yysize - 1;
11820 yyvsp = yyvs + yysize - 1;
11821 yylsp = yyls + yysize - 1;
11822
11823 YY_IGNORE_USELESS_CAST_BEGIN
11824 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11825 YY_CAST (long, yystacksize)));
11826 YY_IGNORE_USELESS_CAST_END
11827
11828 if (yyss + yystacksize - 1 <= yyssp)
11829 YYABORT;
11830 }
11831#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11832
11833
11834 if (yystate == YYFINAL)
11835 YYACCEPT;
11836
11837 goto yybackup;
11838
11839
11840/*-----------.
11841| yybackup. |
11842`-----------*/
11843yybackup:
11844 /* Do appropriate processing given the current state. Read a
11845 lookahead token if we need one and don't already have one. */
11846
11847 /* First try to decide what to do without reference to lookahead token. */
11848 yyn = yypact[yystate];
11849 if (yypact_value_is_default (yyn))
11850 goto yydefault;
11851
11852 /* Not known => get a lookahead token if don't already have one. */
11853
11854 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11855 if (yychar == YYEMPTY)
11856 {
11857 YYDPRINTF ((stderr, "Reading a token\n"));
11858 yychar = yylex (&yylval, &yylloc, p);
11859 }
11860
11861 if (yychar <= END_OF_INPUT)
11862 {
11863 yychar = END_OF_INPUT;
11864 yytoken = YYSYMBOL_YYEOF;
11865 YYDPRINTF ((stderr, "Now at end of input.\n"));
11866 }
11867 else if (yychar == YYerror)
11868 {
11869 /* The scanner already issued an error message, process directly
11870 to error recovery. But do not keep the error token as
11871 lookahead, it is too special and may lead us to an endless
11872 loop in error recovery. */
11873 yychar = YYUNDEF;
11874 yytoken = YYSYMBOL_YYerror;
11875 yyerror_range[1] = yylloc;
11876 goto yyerrlab1;
11877 }
11878 else
11879 {
11880 yytoken = YYTRANSLATE (yychar);
11881 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11882 }
11883
11884 /* If the proper action on seeing token YYTOKEN is to reduce or to
11885 detect an error, take that action. */
11886 yyn += yytoken;
11887 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11888 goto yydefault;
11889 yyn = yytable[yyn];
11890 if (yyn <= 0)
11891 {
11892 if (yytable_value_is_error (yyn))
11893 goto yyerrlab;
11894 yyn = -yyn;
11895 goto yyreduce;
11896 }
11897
11898 /* Count tokens shifted since error; after three, turn off error
11899 status. */
11900 if (yyerrstatus)
11901 yyerrstatus--;
11902
11903 /* Shift the lookahead token. */
11904 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11905 yystate = yyn;
11906 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11907 *++yyvsp = yylval;
11908 YY_IGNORE_MAYBE_UNINITIALIZED_END
11909 *++yylsp = yylloc;
11910 /* %after-shift code. */
11911#line 2664 "parse.y"
11912 {after_shift(p);}
11913#line 11914 "parse.c"
11914
11915
11916 /* Discard the shifted token. */
11917 yychar = YYEMPTY;
11918 goto yynewstate;
11919
11920
11921/*-----------------------------------------------------------.
11922| yydefault -- do the default action for the current state. |
11923`-----------------------------------------------------------*/
11924yydefault:
11925 yyn = yydefact[yystate];
11926 if (yyn == 0)
11927 goto yyerrlab;
11928 goto yyreduce;
11929
11930
11931/*-----------------------------.
11932| yyreduce -- do a reduction. |
11933`-----------------------------*/
11934yyreduce:
11935 /* yyn is the number of a rule to reduce with. */
11936 yylen = yyr2[yyn];
11937
11938 /* If YYLEN is nonzero, implement the default value of the action:
11939 '$$ = $1'.
11940
11941 Otherwise, the following line sets YYVAL to garbage.
11942 This behavior is undocumented and Bison
11943 users should not rely upon it. Assigning to YYVAL
11944 unconditionally makes the parser a bit smaller, and it avoids a
11945 GCC warning that YYVAL may be used uninitialized. */
11946 yyval = yyvsp[1-yylen];
11947 /* %before-reduce function. */
11948#line 2665 "parse.y"
11949 {before_reduce(yylen, p);}
11950#line 11951 "parse.c"
11951
11952
11953 /* Default location. */
11954 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
11955 yyerror_range[1] = yyloc;
11956 YY_REDUCE_PRINT (yyn, p);
11957 switch (yyn)
11958 {
11959 case 2: /* $@1: %empty */
11960#line 3160 "parse.y"
11961 {
11962 SET_LEX_STATE(EXPR_BEG);
11963 local_push(p, ifndef_ripper(1)+0);
11964 /* jumps are possible in the top-level loop. */
11965 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
11966 }
11967#line 11968 "parse.c"
11968 break;
11969
11970 case 5: /* compstmt_top_stmts: top_stmts option_terms */
11971#line 2975 "parse.y"
11972 {
11973 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11974 }
11975#line 11976 "parse.c"
11976 break;
11977
11978 case 6: /* program: $@1 compstmt_top_stmts */
11979#line 3167 "parse.y"
11980 {
11981 if ((yyvsp[0].node) && !compile_for_eval) {
11982 NODE *node = (yyvsp[0].node);
11983 /* last expression should not be void */
11984 if (nd_type_p(node, NODE_BLOCK)) {
11985 while (RNODE_BLOCK(node)->nd_next) {
11986 node = RNODE_BLOCK(node)->nd_next;
11987 }
11988 node = RNODE_BLOCK(node)->nd_head;
11989 }
11990 node = remove_begin(node);
11991 void_expr(p, node);
11992 }
11993 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
11994 /*% ripper[final]: program!($:2) %*/
11995 local_pop(p);
11996 }
11997#line 11998 "parse.c"
11998 break;
11999
12000 case 7: /* top_stmts: none */
12001#line 3187 "parse.y"
12002 {
12003 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12004 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12005 }
12006#line 12007 "parse.c"
12007 break;
12008
12009 case 8: /* top_stmts: top_stmt */
12010#line 3192 "parse.y"
12011 {
12012 (yyval.node) = newline_node((yyvsp[0].node));
12013 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12014 }
12015#line 12016 "parse.c"
12016 break;
12017
12018 case 9: /* top_stmts: top_stmts terms top_stmt */
12019#line 3197 "parse.y"
12020 {
12021 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12022 /*% ripper: stmts_add!($:1, $:3) %*/
12023 }
12024#line 12025 "parse.c"
12025 break;
12026
12027 case 10: /* top_stmt: stmt */
12028#line 3204 "parse.y"
12029 {
12030 clear_block_exit(p, true);
12031 (yyval.node) = (yyvsp[0].node);
12032 }
12033#line 12034 "parse.c"
12034 break;
12035
12036 case 11: /* top_stmt: "'BEGIN'" begin_block */
12037#line 3209 "parse.y"
12038 {
12039 (yyval.node) = (yyvsp[0].node);
12040 /*% ripper: $:2 %*/
12041 }
12042#line 12043 "parse.c"
12043 break;
12044
12045 case 12: /* block_open: '{' */
12046#line 3215 "parse.y"
12047 {(yyval.node_exits) = init_block_exit(p);}
12048#line 12049 "parse.c"
12049 break;
12050
12051 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12052#line 3218 "parse.y"
12053 {
12054 restore_block_exit(p, (yyvsp[-2].node_exits));
12055 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12056 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12057 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12058 /*% ripper: BEGIN!($:2) %*/
12059 }
12060#line 12061 "parse.c"
12061 break;
12062
12063 case 14: /* compstmt_stmts: stmts option_terms */
12064#line 2975 "parse.y"
12065 {
12066 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12067 }
12068#line 12069 "parse.c"
12069 break;
12070
12071 case 15: /* $@2: %empty */
12072#line 3231 "parse.y"
12073 {
12074 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12075 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12076 }
12077#line 12078 "parse.c"
12078 break;
12079
12080 case 16: /* $@3: %empty */
12081#line 3236 "parse.y"
12082 {
12083 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12084 }
12085#line 12086 "parse.c"
12086 break;
12087
12088 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12089#line 3240 "parse.y"
12090 {
12091 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12092 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12093 }
12094#line 12095 "parse.c"
12095 break;
12096
12097 case 18: /* $@4: %empty */
12098#line 3247 "parse.y"
12099 {
12100 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12101 }
12102#line 12103 "parse.c"
12103 break;
12104
12105 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12106#line 3251 "parse.y"
12107 {
12108 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12109 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12110 }
12111#line 12112 "parse.c"
12112 break;
12113
12114 case 20: /* stmts: none */
12115#line 3258 "parse.y"
12116 {
12117 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12118 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12119 }
12120#line 12121 "parse.c"
12121 break;
12122
12123 case 21: /* stmts: stmt_or_begin */
12124#line 3263 "parse.y"
12125 {
12126 (yyval.node) = newline_node((yyvsp[0].node));
12127 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12128 }
12129#line 12130 "parse.c"
12130 break;
12131
12132 case 22: /* stmts: stmts terms stmt_or_begin */
12133#line 3268 "parse.y"
12134 {
12135 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12136 /*% ripper: stmts_add!($:1, $:3) %*/
12137 }
12138#line 12139 "parse.c"
12139 break;
12140
12141 case 24: /* $@5: %empty */
12142#line 3276 "parse.y"
12143 {
12144 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12145 }
12146#line 12147 "parse.c"
12147 break;
12148
12149 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12150#line 3280 "parse.y"
12151 {
12152 (yyval.node) = (yyvsp[0].node);
12153 }
12154#line 12155 "parse.c"
12155 break;
12156
12157 case 26: /* allow_exits: %empty */
12158#line 3285 "parse.y"
12159 {(yyval.node_exits) = allow_block_exit(p);}
12160#line 12161 "parse.c"
12161 break;
12162
12163 case 27: /* k_END: "'END'" lex_ctxt */
12164#line 3288 "parse.y"
12165 {
12166 (yyval.ctxt) = (yyvsp[0].ctxt);
12167 p->ctxt.in_rescue = before_rescue;
12168 /*% ripper: $:2 %*/
12169 }
12170#line 12171 "parse.c"
12171 break;
12172
12173 case 28: /* $@6: %empty */
12174#line 3294 "parse.y"
12175 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12176#line 12177 "parse.c"
12177 break;
12178
12179 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12180#line 3295 "parse.y"
12181 {
12182 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12183 /*% ripper: alias!($:2, $:4) %*/
12184 }
12185#line 12186 "parse.c"
12186 break;
12187
12188 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12189#line 3300 "parse.y"
12190 {
12191 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12192 /*% ripper: var_alias!($:2, $:3) %*/
12193 }
12194#line 12195 "parse.c"
12195 break;
12196
12197 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12198#line 3305 "parse.y"
12199 {
12200 char buf[2];
12201 buf[0] = '$';
12202 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12203 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12204 /*% ripper: var_alias!($:2, $:3) %*/
12205 }
12206#line 12207 "parse.c"
12207 break;
12208
12209 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12210#line 3313 "parse.y"
12211 {
12212 static const char mesg[] = "can't make alias for the number variables";
12213 /*%%%*/
12214 yyerror1(&(yylsp[0]), mesg);
12215 /*% %*/
12216 (yyval.node) = NEW_ERROR(&(yyloc));
12217 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
12218 }
12219#line 12220 "parse.c"
12220 break;
12221
12222 case 33: /* stmt: "'undef'" undef_list */
12223#line 3322 "parse.y"
12224 {
12225 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12226 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12227 (yyval.node) = (yyvsp[0].node);
12228 /*% ripper: undef!($:2) %*/
12229 }
12230#line 12231 "parse.c"
12231 break;
12232
12233 case 34: /* stmt: stmt "'if' modifier" expr_value */
12234#line 3329 "parse.y"
12235 {
12236 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12237 fixpos((yyval.node), (yyvsp[0].node));
12238 /*% ripper: if_mod!($:3, $:1) %*/
12239 }
12240#line 12241 "parse.c"
12241 break;
12242
12243 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12244#line 3335 "parse.y"
12245 {
12246 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12247 fixpos((yyval.node), (yyvsp[0].node));
12248 /*% ripper: unless_mod!($:3, $:1) %*/
12249 }
12250#line 12251 "parse.c"
12251 break;
12252
12253 case 36: /* stmt: stmt "'while' modifier" expr_value */
12254#line 3341 "parse.y"
12255 {
12256 clear_block_exit(p, false);
12257 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12258 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12259 }
12260 else {
12261 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12262 }
12263 /*% ripper: while_mod!($:3, $:1) %*/
12264 }
12265#line 12266 "parse.c"
12266 break;
12267
12268 case 37: /* stmt: stmt "'until' modifier" expr_value */
12269#line 3352 "parse.y"
12270 {
12271 clear_block_exit(p, false);
12272 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12273 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12274 }
12275 else {
12276 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12277 }
12278 /*% ripper: until_mod!($:3, $:1) %*/
12279 }
12280#line 12281 "parse.c"
12281 break;
12282
12283 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12284#line 3363 "parse.y"
12285 {
12286 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12287 NODE *resq;
12288 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12289 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12290 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12291 /*% ripper: rescue_mod!($:1, $:4) %*/
12292 }
12293#line 12294 "parse.c"
12294 break;
12295
12296 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12297#line 3372 "parse.y"
12298 {
12299 if (p->ctxt.in_def) {
12300 rb_warn0("END in method; use at_exit");
12301 }
12302 restore_block_exit(p, (yyvsp[-3].node_exits));
12303 p->ctxt = (yyvsp[-4].ctxt);
12304 {
12305 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12306 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12307 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12308 }
12309 /*% ripper: END!($:compstmt) %*/
12310 }
12311#line 12312 "parse.c"
12312 break;
12313
12314 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12315#line 3387 "parse.y"
12316 {
12317 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12318 /*% ripper: massign!($:1, $:4) %*/
12319 }
12320#line 12321 "parse.c"
12321 break;
12322
12323 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12324#line 2919 "parse.y"
12325 {
12326 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12327 /*% ripper: assign!($:1, $:4) %*/
12328 }
12329#line 12330 "parse.c"
12330 break;
12331
12332 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12333#line 3394 "parse.y"
12334 {
12335 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12336 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12337 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12338 loc.beg_pos = (yylsp[-3]).beg_pos;
12339 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12340 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12341 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12342 }
12343#line 12344 "parse.c"
12344 break;
12345
12346 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12347#line 3404 "parse.y"
12348 {
12349 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12350 /*% ripper: massign!($:1, $:4) %*/
12351 }
12352#line 12353 "parse.c"
12353 break;
12354
12355 case 47: /* stmt: error */
12356#line 3410 "parse.y"
12357 {
12358 (void)yynerrs;
12359 (yyval.node) = NEW_ERROR(&(yyloc));
12360 }
12361#line 12362 "parse.c"
12362 break;
12363
12364 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12365#line 2919 "parse.y"
12366 {
12367 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12368 /*% ripper: assign!($:1, $:4) %*/
12369 }
12370#line 12371 "parse.c"
12371 break;
12372
12373 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12374#line 3045 "parse.y"
12375 {
12376 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12377 /*% ripper: opassign!($:1, $:2, $:4) %*/
12378 }
12379#line 12380 "parse.c"
12380 break;
12381
12382 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12383#line 3050 "parse.y"
12384 {
12385 (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]));
12386 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12387 }
12388#line 12389 "parse.c"
12389 break;
12390
12391 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12392#line 3055 "parse.y"
12393 {
12394 (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]));
12395 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12396 }
12397#line 12398 "parse.c"
12398 break;
12399
12400 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12401#line 3060 "parse.y"
12402 {
12403 (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]));
12404 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12405 }
12406#line 12407 "parse.c"
12407 break;
12408
12409 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12410#line 3065 "parse.y"
12411 {
12412 (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]));
12413 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12414 }
12415#line 12416 "parse.c"
12416 break;
12417
12418 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12419#line 3070 "parse.y"
12420 {
12421 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12422 (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));
12423 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12424 }
12425#line 12426 "parse.c"
12426 break;
12427
12428 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12429#line 3076 "parse.y"
12430 {
12431 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12432 (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));
12433 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
12434 }
12435#line 12436 "parse.c"
12436 break;
12437
12438 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12439#line 3082 "parse.y"
12440 {
12441 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12442 (yyval.node) = NEW_ERROR(&(yyloc));
12443 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12444 }
12445#line 12446 "parse.c"
12446 break;
12447
12448 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12449#line 2950 "parse.y"
12450 {
12451 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12452 restore_defun(p, (yyvsp[-3].node_def_temp));
12453 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12454 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12455 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12456 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12457 /*% ripper: def!($:head, $:args, $:$) %*/
12458 local_pop(p);
12459 }
12460#line 12461 "parse.c"
12461 break;
12462
12463 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12464#line 2961 "parse.y"
12465 {
12466 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12467 restore_defun(p, (yyvsp[-3].node_def_temp));
12468 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12469 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12470 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12471 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12472 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12473 local_pop(p);
12474 }
12475#line 12476 "parse.c"
12476 break;
12477
12478 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12479#line 3423 "parse.y"
12480 {
12481 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12482 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12483 /*% ripper: rescue_mod!($:1, $:4) %*/
12484 }
12485#line 12486 "parse.c"
12486 break;
12487
12488 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12489#line 3429 "parse.y"
12490 {
12491 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12492 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12493 }
12494#line 12495 "parse.c"
12495 break;
12496
12497 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12498#line 3437 "parse.y"
12499 {
12500 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12501 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12502 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12503 /*% ripper: rescue_mod!($:1, $:4) %*/
12504 }
12505#line 12506 "parse.c"
12506 break;
12507
12508 case 71: /* expr: expr "'and'" expr */
12509#line 3448 "parse.y"
12510 {
12511 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12512 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12513 }
12514#line 12515 "parse.c"
12515 break;
12516
12517 case 72: /* expr: expr "'or'" expr */
12518#line 3453 "parse.y"
12519 {
12520 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12521 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12522 }
12523#line 12524 "parse.c"
12524 break;
12525
12526 case 73: /* expr: "'not'" option_'\n' expr */
12527#line 3458 "parse.y"
12528 {
12529 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12530 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12531 }
12532#line 12533 "parse.c"
12533 break;
12534
12535 case 74: /* expr: '!' command_call */
12536#line 3463 "parse.y"
12537 {
12538 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12539 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12540 }
12541#line 12542 "parse.c"
12542 break;
12543
12544 case 75: /* $@7: %empty */
12545#line 3468 "parse.y"
12546 {
12547 value_expr(p, (yyvsp[-1].node));
12548 }
12549#line 12550 "parse.c"
12550 break;
12551
12552 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12553#line 3473 "parse.y"
12554 {
12555 pop_pktbl(p, (yyvsp[-1].tbl));
12556 pop_pvtbl(p, (yyvsp[-2].tbl));
12557 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12558 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12559 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12560 (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);
12561 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12562 }
12563#line 12564 "parse.c"
12564 break;
12565
12566 case 77: /* $@8: %empty */
12567#line 3483 "parse.y"
12568 {
12569 value_expr(p, (yyvsp[-1].node));
12570 }
12571#line 12572 "parse.c"
12572 break;
12573
12574 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12575#line 3488 "parse.y"
12576 {
12577 pop_pktbl(p, (yyvsp[-1].tbl));
12578 pop_pvtbl(p, (yyvsp[-2].tbl));
12579 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12580 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12581 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12582 (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);
12583 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12584 }
12585#line 12586 "parse.c"
12586 break;
12587
12588 case 80: /* def_name: fname */
12589#line 3501 "parse.y"
12590 {
12591 numparam_name(p, (yyvsp[0].id));
12592 local_push(p, 0);
12593 p->ctxt.in_def = 1;
12594 p->ctxt.in_rescue = before_rescue;
12595 p->ctxt.cant_return = 0;
12596 (yyval.id) = (yyvsp[0].id);
12597 }
12598#line 12599 "parse.c"
12599 break;
12600
12601 case 81: /* defn_head: k_def def_name */
12602#line 3512 "parse.y"
12603 {
12604 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12605 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12606 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12607 /*% ripper: $:def_name %*/
12608 }
12609#line 12610 "parse.c"
12610 break;
12611
12612 case 82: /* $@9: %empty */
12613#line 3521 "parse.y"
12614 {
12615 SET_LEX_STATE(EXPR_FNAME);
12616 }
12617#line 12618 "parse.c"
12618 break;
12619
12620 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12621#line 3525 "parse.y"
12622 {
12623 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12624 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12625 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12626 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12627 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12628 }
12629#line 12630 "parse.c"
12630 break;
12631
12632 case 84: /* value_expr_expr: expr */
12633#line 3145 "parse.y"
12634 {
12635 value_expr(p, (yyvsp[0].node));
12636 (yyval.node) = (yyvsp[0].node);
12637 }
12638#line 12639 "parse.c"
12639 break;
12640
12641 case 86: /* expr_value: error */
12642#line 3536 "parse.y"
12643 {
12644 (yyval.node) = NEW_ERROR(&(yyloc));
12645 }
12646#line 12647 "parse.c"
12647 break;
12648
12649 case 87: /* $@10: %empty */
12650#line 3541 "parse.y"
12651 {COND_PUSH(1);}
12652#line 12653 "parse.c"
12653 break;
12654
12655 case 88: /* $@11: %empty */
12656#line 3541 "parse.y"
12657 {COND_POP();}
12658#line 12659 "parse.c"
12659 break;
12660
12661 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12662#line 3542 "parse.y"
12663 {
12664 (yyval.node) = (yyvsp[-2].node);
12665 /*% ripper: $:2 %*/
12666 }
12667#line 12668 "parse.c"
12668 break;
12669
12670 case 92: /* value_expr_command_call: command_call */
12671#line 3145 "parse.y"
12672 {
12673 value_expr(p, (yyvsp[0].node));
12674 (yyval.node) = (yyvsp[0].node);
12675 }
12676#line 12677 "parse.c"
12677 break;
12678
12679 case 95: /* block_command: block_call call_op2 operation2 command_args */
12680#line 3557 "parse.y"
12681 {
12682 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12683 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12684 }
12685#line 12686 "parse.c"
12686 break;
12687
12688 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
12689#line 3564 "parse.y"
12690 {
12691 (yyval.node) = (yyvsp[-1].node);
12692 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12693 /*% ripper: $:2 %*/
12694 }
12695#line 12696 "parse.c"
12696 break;
12697
12698 case 97: /* fcall: "local variable or method" */
12699#line 3572 "parse.y"
12700 {
12701 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12702 /*% ripper: $:1 %*/
12703 }
12704#line 12705 "parse.c"
12705 break;
12706
12707 case 98: /* fcall: "constant" */
12708#line 3572 "parse.y"
12709 {
12710 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12711 /*% ripper: $:1 %*/
12712 }
12713#line 12714 "parse.c"
12714 break;
12715
12716 case 99: /* fcall: "method" */
12717#line 3572 "parse.y"
12718 {
12719 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12720 /*% ripper: $:1 %*/
12721 }
12722#line 12723 "parse.c"
12723 break;
12724
12725 case 100: /* command: fcall command_args */
12726#line 3579 "parse.y"
12727 {
12728 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12729 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12730 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12731 /*% ripper: command!($:1, $:2) %*/
12732 }
12733#line 12734 "parse.c"
12734 break;
12735
12736 case 101: /* command: fcall command_args cmd_brace_block */
12737#line 3586 "parse.y"
12738 {
12739 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12740 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12741 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12742 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12743 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12744 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12745 }
12746#line 12747 "parse.c"
12747 break;
12748
12749 case 102: /* command: primary_value call_op operation2 command_args */
12750#line 3595 "parse.y"
12751 {
12752 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12753 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12754 }
12755#line 12756 "parse.c"
12756 break;
12757
12758 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12759#line 3600 "parse.y"
12760 {
12761 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12762 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12763 }
12764#line 12765 "parse.c"
12765 break;
12766
12767 case 104: /* command: primary_value "::" operation2 command_args */
12768#line 3605 "parse.y"
12769 {
12770 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12771 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12772 }
12773#line 12774 "parse.c"
12774 break;
12775
12776 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12777#line 3610 "parse.y"
12778 {
12779 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12780 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12781 }
12782#line 12783 "parse.c"
12783 break;
12784
12785 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
12786#line 3615 "parse.y"
12787 {
12788 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12789 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12790 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12791 }
12792#line 12793 "parse.c"
12793 break;
12794
12795 case 107: /* command: "'super'" command_args */
12796#line 3621 "parse.y"
12797 {
12798 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12799 fixpos((yyval.node), (yyvsp[0].node));
12800 /*% ripper: super!($:2) %*/
12801 }
12802#line 12803 "parse.c"
12803 break;
12804
12805 case 108: /* command: k_yield command_args */
12806#line 3627 "parse.y"
12807 {
12808 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12809 fixpos((yyval.node), (yyvsp[0].node));
12810 /*% ripper: yield!($:2) %*/
12811 }
12812#line 12813 "parse.c"
12813 break;
12814
12815 case 109: /* command: k_return call_args */
12816#line 3633 "parse.y"
12817 {
12818 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12819 /*% ripper: return!($:2) %*/
12820 }
12821#line 12822 "parse.c"
12822 break;
12823
12824 case 110: /* command: "'break'" call_args */
12825#line 3638 "parse.y"
12826 {
12827 NODE *args = 0;
12828 args = ret_args(p, (yyvsp[0].node));
12829 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12830 /*% ripper: break!($:2) %*/
12831 }
12832#line 12833 "parse.c"
12833 break;
12834
12835 case 111: /* command: "'next'" call_args */
12836#line 3645 "parse.y"
12837 {
12838 NODE *args = 0;
12839 args = ret_args(p, (yyvsp[0].node));
12840 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12841 /*% ripper: next!($:2) %*/
12842 }
12843#line 12844 "parse.c"
12844 break;
12845
12846 case 113: /* mlhs: "(" mlhs_inner rparen */
12847#line 3655 "parse.y"
12848 {
12849 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12850 /*% ripper: mlhs_paren!($:2) %*/
12851 }
12852#line 12853 "parse.c"
12853 break;
12854
12855 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
12856#line 3663 "parse.y"
12857 {
12858 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12859 /*% ripper: mlhs_paren!($:2) %*/
12860 }
12861#line 12862 "parse.c"
12862 break;
12863
12864 case 116: /* mlhs_basic: mlhs_head */
12865#line 3670 "parse.y"
12866 {
12867 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12868 /*% ripper: $:1 %*/
12869 }
12870#line 12871 "parse.c"
12871 break;
12872
12873 case 117: /* mlhs_basic: mlhs_head mlhs_item */
12874#line 3675 "parse.y"
12875 {
12876 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12877 /*% ripper: mlhs_add!($:1, $:2) %*/
12878 }
12879#line 12880 "parse.c"
12880 break;
12881
12882 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
12883#line 3680 "parse.y"
12884 {
12885 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12886 /*% ripper: mlhs_add_star!($:1, $:3) %*/
12887 }
12888#line 12889 "parse.c"
12889 break;
12890
12891 case 119: /* mlhs_items_mlhs_item: mlhs_item */
12892#line 3032 "parse.y"
12893 {
12894 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12895 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12896 }
12897#line 12898 "parse.c"
12898 break;
12899
12900 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
12901#line 3037 "parse.y"
12902 {
12903 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12904 /*% ripper: mlhs_add!($:1, $:3) %*/
12905 }
12906#line 12907 "parse.c"
12907 break;
12908
12909 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
12910#line 3685 "parse.y"
12911 {
12912 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12913 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12914 }
12915#line 12916 "parse.c"
12916 break;
12917
12918 case 122: /* mlhs_basic: mlhs_head "*" */
12919#line 3690 "parse.y"
12920 {
12921 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12922 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
12923 }
12924#line 12925 "parse.c"
12925 break;
12926
12927 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
12928#line 3695 "parse.y"
12929 {
12930 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12931 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
12932 }
12933#line 12934 "parse.c"
12934 break;
12935
12936 case 124: /* mlhs_basic: "*" mlhs_node */
12937#line 3700 "parse.y"
12938 {
12939 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
12940 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
12941 }
12942#line 12943 "parse.c"
12943 break;
12944
12945 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
12946#line 3705 "parse.y"
12947 {
12948 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12949 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
12950 }
12951#line 12952 "parse.c"
12952 break;
12953
12954 case 126: /* mlhs_basic: "*" */
12955#line 3710 "parse.y"
12956 {
12957 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12958 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
12959 }
12960#line 12961 "parse.c"
12961 break;
12962
12963 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
12964#line 3715 "parse.y"
12965 {
12966 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12967 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
12968 }
12969#line 12970 "parse.c"
12970 break;
12971
12972 case 129: /* mlhs_item: "(" mlhs_inner rparen */
12973#line 3723 "parse.y"
12974 {
12975 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
12976 /*% ripper: mlhs_paren!($:2) %*/
12977 }
12978#line 12979 "parse.c"
12979 break;
12980
12981 case 130: /* mlhs_head: mlhs_item ',' */
12982#line 3730 "parse.y"
12983 {
12984 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
12985 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12986 }
12987#line 12988 "parse.c"
12988 break;
12989
12990 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
12991#line 3735 "parse.y"
12992 {
12993 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
12994 /*% ripper: mlhs_add!($:1, $:2) %*/
12995 }
12996#line 12997 "parse.c"
12997 break;
12998
12999 case 132: /* mlhs_node: user_variable */
13000#line 3743 "parse.y"
13001 {
13002 /*% ripper: var_field!($:1) %*/
13003 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13004 }
13005#line 13006 "parse.c"
13006 break;
13007
13008 case 133: /* mlhs_node: keyword_variable */
13009#line 3743 "parse.y"
13010 {
13011 /*% ripper: var_field!($:1) %*/
13012 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13013 }
13014#line 13015 "parse.c"
13015 break;
13016
13017 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13018#line 3748 "parse.y"
13019 {
13020 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13021 /*% ripper: aref_field!($:1, $:3) %*/
13022 }
13023#line 13024 "parse.c"
13024 break;
13025
13026 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13027#line 3753 "parse.y"
13028 {
13029 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13030 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13031 /*% ripper: field!($:1, $:2, $:3) %*/
13032 }
13033#line 13034 "parse.c"
13034 break;
13035
13036 case 136: /* mlhs_node: primary_value call_op "constant" */
13037#line 3753 "parse.y"
13038 {
13039 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13040 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13041 /*% ripper: field!($:1, $:2, $:3) %*/
13042 }
13043#line 13044 "parse.c"
13044 break;
13045
13046 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13047#line 3759 "parse.y"
13048 {
13049 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13050 /*% ripper: const_path_field!($:1, $:3) %*/
13051 }
13052#line 13053 "parse.c"
13053 break;
13054
13055 case 138: /* mlhs_node: primary_value "::" "constant" */
13056#line 3764 "parse.y"
13057 {
13058 /*% ripper: const_path_field!($:1, $:3) %*/
13059 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13060 }
13061#line 13062 "parse.c"
13062 break;
13063
13064 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13065#line 3769 "parse.y"
13066 {
13067 /*% ripper: top_const_field!($:2) %*/
13068 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13069 }
13070#line 13071 "parse.c"
13071 break;
13072
13073 case 140: /* mlhs_node: backref */
13074#line 3774 "parse.y"
13075 {
13076 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13077 (yyval.node) = NEW_ERROR(&(yyloc));
13078 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13079 }
13080#line 13081 "parse.c"
13081 break;
13082
13083 case 141: /* lhs: user_variable */
13084#line 3782 "parse.y"
13085 {
13086 /*% ripper: var_field!($:1) %*/
13087 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13088 }
13089#line 13090 "parse.c"
13090 break;
13091
13092 case 142: /* lhs: keyword_variable */
13093#line 3782 "parse.y"
13094 {
13095 /*% ripper: var_field!($:1) %*/
13096 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13097 }
13098#line 13099 "parse.c"
13099 break;
13100
13101 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13102#line 3787 "parse.y"
13103 {
13104 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13105 /*% ripper: aref_field!($:1, $:3) %*/
13106 }
13107#line 13108 "parse.c"
13108 break;
13109
13110 case 144: /* lhs: primary_value call_op "local variable or method" */
13111#line 3792 "parse.y"
13112 {
13113 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13114 /*% ripper: field!($:1, $:2, $:3) %*/
13115 }
13116#line 13117 "parse.c"
13117 break;
13118
13119 case 145: /* lhs: primary_value call_op "constant" */
13120#line 3792 "parse.y"
13121 {
13122 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13123 /*% ripper: field!($:1, $:2, $:3) %*/
13124 }
13125#line 13126 "parse.c"
13126 break;
13127
13128 case 146: /* lhs: primary_value "::" "local variable or method" */
13129#line 3797 "parse.y"
13130 {
13131 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13132 /*% ripper: field!($:1, $:2, $:3) %*/
13133 }
13134#line 13135 "parse.c"
13135 break;
13136
13137 case 147: /* lhs: primary_value "::" "constant" */
13138#line 3802 "parse.y"
13139 {
13140 /*% ripper: const_path_field!($:1, $:3) %*/
13141 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13142 }
13143#line 13144 "parse.c"
13144 break;
13145
13146 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13147#line 3807 "parse.y"
13148 {
13149 /*% ripper: top_const_field!($:2) %*/
13150 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13151 }
13152#line 13153 "parse.c"
13153 break;
13154
13155 case 149: /* lhs: backref */
13156#line 3812 "parse.y"
13157 {
13158 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13159 (yyval.node) = NEW_ERROR(&(yyloc));
13160 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13161 }
13162#line 13163 "parse.c"
13163 break;
13164
13165 case 150: /* cname: "local variable or method" */
13166#line 3820 "parse.y"
13167 {
13168 static const char mesg[] = "class/module name must be CONSTANT";
13169 /*%%%*/
13170 yyerror1(&(yylsp[0]), mesg);
13171 /*% %*/
13172 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13173 }
13174#line 13175 "parse.c"
13175 break;
13176
13177 case 152: /* cpath: ":: at EXPR_BEG" cname */
13178#line 3831 "parse.y"
13179 {
13180 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13181 /*% ripper: top_const_ref!($:2) %*/
13182 }
13183#line 13184 "parse.c"
13184 break;
13185
13186 case 153: /* cpath: cname */
13187#line 3836 "parse.y"
13188 {
13189 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13190 /*% ripper: const_ref!($:1) %*/
13191 }
13192#line 13193 "parse.c"
13193 break;
13194
13195 case 154: /* cpath: primary_value "::" cname */
13196#line 3841 "parse.y"
13197 {
13198 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13199 /*% ripper: const_path_ref!($:1, $:3) %*/
13200 }
13201#line 13202 "parse.c"
13202 break;
13203
13204 case 158: /* fname: op */
13205#line 3849 "parse.y"
13206 {
13207 SET_LEX_STATE(EXPR_ENDFN);
13208 (yyval.id) = (yyvsp[0].id);
13209 }
13210#line 13211 "parse.c"
13211 break;
13212
13213 case 160: /* fitem: fname */
13214#line 3857 "parse.y"
13215 {
13216 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13217 /*% ripper: symbol_literal!($:1) %*/
13218 }
13219#line 13220 "parse.c"
13220 break;
13221
13222 case 162: /* undef_list: fitem */
13223#line 3865 "parse.y"
13224 {
13225 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13226 /*% ripper: rb_ary_new3(1, $:1) %*/
13227 }
13228#line 13229 "parse.c"
13229 break;
13230
13231 case 163: /* $@12: %empty */
13232#line 3869 "parse.y"
13233 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13234#line 13235 "parse.c"
13235 break;
13236
13237 case 164: /* undef_list: undef_list ',' $@12 fitem */
13238#line 3870 "parse.y"
13239 {
13240 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13241 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13242 /*% ripper: rb_ary_push($:1, $:4) %*/
13243 }
13244#line 13245 "parse.c"
13245 break;
13246
13247 case 165: /* op: '|' */
13248#line 3877 "parse.y"
13249 { (yyval.id) = '|'; }
13250#line 13251 "parse.c"
13251 break;
13252
13253 case 166: /* op: '^' */
13254#line 3878 "parse.y"
13255 { (yyval.id) = '^'; }
13256#line 13257 "parse.c"
13257 break;
13258
13259 case 167: /* op: '&' */
13260#line 3879 "parse.y"
13261 { (yyval.id) = '&'; }
13262#line 13263 "parse.c"
13263 break;
13264
13265 case 168: /* op: "<=>" */
13266#line 3880 "parse.y"
13267 { (yyval.id) = tCMP; }
13268#line 13269 "parse.c"
13269 break;
13270
13271 case 169: /* op: "==" */
13272#line 3881 "parse.y"
13273 { (yyval.id) = tEQ; }
13274#line 13275 "parse.c"
13275 break;
13276
13277 case 170: /* op: "===" */
13278#line 3882 "parse.y"
13279 { (yyval.id) = tEQQ; }
13280#line 13281 "parse.c"
13281 break;
13282
13283 case 171: /* op: "=~" */
13284#line 3883 "parse.y"
13285 { (yyval.id) = tMATCH; }
13286#line 13287 "parse.c"
13287 break;
13288
13289 case 172: /* op: "!~" */
13290#line 3884 "parse.y"
13291 { (yyval.id) = tNMATCH; }
13292#line 13293 "parse.c"
13293 break;
13294
13295 case 173: /* op: '>' */
13296#line 3885 "parse.y"
13297 { (yyval.id) = '>'; }
13298#line 13299 "parse.c"
13299 break;
13300
13301 case 174: /* op: ">=" */
13302#line 3886 "parse.y"
13303 { (yyval.id) = tGEQ; }
13304#line 13305 "parse.c"
13305 break;
13306
13307 case 175: /* op: '<' */
13308#line 3887 "parse.y"
13309 { (yyval.id) = '<'; }
13310#line 13311 "parse.c"
13311 break;
13312
13313 case 176: /* op: "<=" */
13314#line 3888 "parse.y"
13315 { (yyval.id) = tLEQ; }
13316#line 13317 "parse.c"
13317 break;
13318
13319 case 177: /* op: "!=" */
13320#line 3889 "parse.y"
13321 { (yyval.id) = tNEQ; }
13322#line 13323 "parse.c"
13323 break;
13324
13325 case 178: /* op: "<<" */
13326#line 3890 "parse.y"
13327 { (yyval.id) = tLSHFT; }
13328#line 13329 "parse.c"
13329 break;
13330
13331 case 179: /* op: ">>" */
13332#line 3891 "parse.y"
13333 { (yyval.id) = tRSHFT; }
13334#line 13335 "parse.c"
13335 break;
13336
13337 case 180: /* op: '+' */
13338#line 3892 "parse.y"
13339 { (yyval.id) = '+'; }
13340#line 13341 "parse.c"
13341 break;
13342
13343 case 181: /* op: '-' */
13344#line 3893 "parse.y"
13345 { (yyval.id) = '-'; }
13346#line 13347 "parse.c"
13347 break;
13348
13349 case 182: /* op: '*' */
13350#line 3894 "parse.y"
13351 { (yyval.id) = '*'; }
13352#line 13353 "parse.c"
13353 break;
13354
13355 case 183: /* op: "*" */
13356#line 3895 "parse.y"
13357 { (yyval.id) = '*'; }
13358#line 13359 "parse.c"
13359 break;
13360
13361 case 184: /* op: '/' */
13362#line 3896 "parse.y"
13363 { (yyval.id) = '/'; }
13364#line 13365 "parse.c"
13365 break;
13366
13367 case 185: /* op: '%' */
13368#line 3897 "parse.y"
13369 { (yyval.id) = '%'; }
13370#line 13371 "parse.c"
13371 break;
13372
13373 case 186: /* op: "**" */
13374#line 3898 "parse.y"
13375 { (yyval.id) = tPOW; }
13376#line 13377 "parse.c"
13377 break;
13378
13379 case 187: /* op: "**arg" */
13380#line 3899 "parse.y"
13381 { (yyval.id) = tDSTAR; }
13382#line 13383 "parse.c"
13383 break;
13384
13385 case 188: /* op: '!' */
13386#line 3900 "parse.y"
13387 { (yyval.id) = '!'; }
13388#line 13389 "parse.c"
13389 break;
13390
13391 case 189: /* op: '~' */
13392#line 3901 "parse.y"
13393 { (yyval.id) = '~'; }
13394#line 13395 "parse.c"
13395 break;
13396
13397 case 190: /* op: "unary+" */
13398#line 3902 "parse.y"
13399 { (yyval.id) = tUPLUS; }
13400#line 13401 "parse.c"
13401 break;
13402
13403 case 191: /* op: "unary-" */
13404#line 3903 "parse.y"
13405 { (yyval.id) = tUMINUS; }
13406#line 13407 "parse.c"
13407 break;
13408
13409 case 192: /* op: "[]" */
13410#line 3904 "parse.y"
13411 { (yyval.id) = tAREF; }
13412#line 13413 "parse.c"
13413 break;
13414
13415 case 193: /* op: "[]=" */
13416#line 3905 "parse.y"
13417 { (yyval.id) = tASET; }
13418#line 13419 "parse.c"
13419 break;
13420
13421 case 194: /* op: '`' */
13422#line 3906 "parse.y"
13423 { (yyval.id) = '`'; }
13424#line 13425 "parse.c"
13425 break;
13426
13427 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13428#line 2919 "parse.y"
13429 {
13430 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13431 /*% ripper: assign!($:1, $:4) %*/
13432 }
13433#line 13434 "parse.c"
13434 break;
13435
13436 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13437#line 3045 "parse.y"
13438 {
13439 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13440 /*% ripper: opassign!($:1, $:2, $:4) %*/
13441 }
13442#line 13443 "parse.c"
13443 break;
13444
13445 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13446#line 3050 "parse.y"
13447 {
13448 (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]));
13449 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13450 }
13451#line 13452 "parse.c"
13452 break;
13453
13454 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13455#line 3055 "parse.y"
13456 {
13457 (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]));
13458 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13459 }
13460#line 13461 "parse.c"
13461 break;
13462
13463 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13464#line 3060 "parse.y"
13465 {
13466 (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]));
13467 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13468 }
13469#line 13470 "parse.c"
13470 break;
13471
13472 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13473#line 3065 "parse.y"
13474 {
13475 (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]));
13476 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13477 }
13478#line 13479 "parse.c"
13479 break;
13480
13481 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13482#line 3070 "parse.y"
13483 {
13484 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13485 (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));
13486 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13487 }
13488#line 13489 "parse.c"
13489 break;
13490
13491 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13492#line 3076 "parse.y"
13493 {
13494 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13495 (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));
13496 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13497 }
13498#line 13499 "parse.c"
13499 break;
13500
13501 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13502#line 3082 "parse.y"
13503 {
13504 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13505 (yyval.node) = NEW_ERROR(&(yyloc));
13506 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13507 }
13508#line 13509 "parse.c"
13509 break;
13510
13511 case 247: /* range_expr_arg: arg ".." arg */
13512#line 3104 "parse.y"
13513 {
13514 value_expr(p, (yyvsp[-2].node));
13515 value_expr(p, (yyvsp[0].node));
13516 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13517 /*% ripper: dot2!($:1, $:3) %*/
13518 }
13519#line 13520 "parse.c"
13520 break;
13521
13522 case 248: /* range_expr_arg: arg "..." arg */
13523#line 3111 "parse.y"
13524 {
13525 value_expr(p, (yyvsp[-2].node));
13526 value_expr(p, (yyvsp[0].node));
13527 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13528 /*% ripper: dot3!($:1, $:3) %*/
13529 }
13530#line 13531 "parse.c"
13531 break;
13532
13533 case 249: /* range_expr_arg: arg ".." */
13534#line 3118 "parse.y"
13535 {
13536 value_expr(p, (yyvsp[-1].node));
13537 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13538 /*% ripper: dot2!($:1, Qnil) %*/
13539 }
13540#line 13541 "parse.c"
13541 break;
13542
13543 case 250: /* range_expr_arg: arg "..." */
13544#line 3124 "parse.y"
13545 {
13546 value_expr(p, (yyvsp[-1].node));
13547 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13548 /*% ripper: dot3!($:1, Qnil) %*/
13549 }
13550#line 13551 "parse.c"
13551 break;
13552
13553 case 251: /* range_expr_arg: "(.." arg */
13554#line 3130 "parse.y"
13555 {
13556 value_expr(p, (yyvsp[0].node));
13557 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13558 /*% ripper: dot2!(Qnil, $:2) %*/
13559 }
13560#line 13561 "parse.c"
13561 break;
13562
13563 case 252: /* range_expr_arg: "(..." arg */
13564#line 3136 "parse.y"
13565 {
13566 value_expr(p, (yyvsp[0].node));
13567 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13568 /*% ripper: dot3!(Qnil, $:2) %*/
13569 }
13570#line 13571 "parse.c"
13571 break;
13572
13573 case 254: /* arg: arg '+' arg */
13574#line 3927 "parse.y"
13575 {
13576 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13577 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13578 }
13579#line 13580 "parse.c"
13580 break;
13581
13582 case 255: /* arg: arg '-' arg */
13583#line 3932 "parse.y"
13584 {
13585 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13586 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13587 }
13588#line 13589 "parse.c"
13589 break;
13590
13591 case 256: /* arg: arg '*' arg */
13592#line 3937 "parse.y"
13593 {
13594 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13595 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13596 }
13597#line 13598 "parse.c"
13598 break;
13599
13600 case 257: /* arg: arg '/' arg */
13601#line 3942 "parse.y"
13602 {
13603 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13604 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13605 }
13606#line 13607 "parse.c"
13607 break;
13608
13609 case 258: /* arg: arg '%' arg */
13610#line 3947 "parse.y"
13611 {
13612 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13613 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13614 }
13615#line 13616 "parse.c"
13616 break;
13617
13618 case 259: /* arg: arg "**" arg */
13619#line 3952 "parse.y"
13620 {
13621 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13622 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13623 }
13624#line 13625 "parse.c"
13625 break;
13626
13627 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13628#line 3957 "parse.y"
13629 {
13630 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13631 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13632 }
13633#line 13634 "parse.c"
13634 break;
13635
13636 case 261: /* arg: "unary+" arg */
13637#line 3962 "parse.y"
13638 {
13639 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13640 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13641 }
13642#line 13643 "parse.c"
13643 break;
13644
13645 case 262: /* arg: "unary-" arg */
13646#line 3967 "parse.y"
13647 {
13648 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13649 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13650 }
13651#line 13652 "parse.c"
13652 break;
13653
13654 case 263: /* arg: arg '|' arg */
13655#line 3972 "parse.y"
13656 {
13657 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13658 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13659 }
13660#line 13661 "parse.c"
13661 break;
13662
13663 case 264: /* arg: arg '^' arg */
13664#line 3977 "parse.y"
13665 {
13666 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13667 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13668 }
13669#line 13670 "parse.c"
13670 break;
13671
13672 case 265: /* arg: arg '&' arg */
13673#line 3982 "parse.y"
13674 {
13675 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13676 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13677 }
13678#line 13679 "parse.c"
13679 break;
13680
13681 case 266: /* arg: arg "<=>" arg */
13682#line 3987 "parse.y"
13683 {
13684 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13685 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13686 }
13687#line 13688 "parse.c"
13688 break;
13689
13690 case 268: /* arg: arg "==" arg */
13691#line 3993 "parse.y"
13692 {
13693 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13694 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13695 }
13696#line 13697 "parse.c"
13697 break;
13698
13699 case 269: /* arg: arg "===" arg */
13700#line 3998 "parse.y"
13701 {
13702 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13703 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13704 }
13705#line 13706 "parse.c"
13706 break;
13707
13708 case 270: /* arg: arg "!=" arg */
13709#line 4003 "parse.y"
13710 {
13711 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13712 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13713 }
13714#line 13715 "parse.c"
13715 break;
13716
13717 case 271: /* arg: arg "=~" arg */
13718#line 4008 "parse.y"
13719 {
13720 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13721 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13722 }
13723#line 13724 "parse.c"
13724 break;
13725
13726 case 272: /* arg: arg "!~" arg */
13727#line 4013 "parse.y"
13728 {
13729 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13730 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13731 }
13732#line 13733 "parse.c"
13733 break;
13734
13735 case 273: /* arg: '!' arg */
13736#line 4018 "parse.y"
13737 {
13738 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13739 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13740 }
13741#line 13742 "parse.c"
13742 break;
13743
13744 case 274: /* arg: '~' arg */
13745#line 4023 "parse.y"
13746 {
13747 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13748 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13749 }
13750#line 13751 "parse.c"
13751 break;
13752
13753 case 275: /* arg: arg "<<" arg */
13754#line 4028 "parse.y"
13755 {
13756 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13757 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13758 }
13759#line 13760 "parse.c"
13760 break;
13761
13762 case 276: /* arg: arg ">>" arg */
13763#line 4033 "parse.y"
13764 {
13765 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13766 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13767 }
13768#line 13769 "parse.c"
13769 break;
13770
13771 case 277: /* arg: arg "&&" arg */
13772#line 4038 "parse.y"
13773 {
13774 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13775 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13776 }
13777#line 13778 "parse.c"
13778 break;
13779
13780 case 278: /* arg: arg "||" arg */
13781#line 4043 "parse.y"
13782 {
13783 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13784 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13785 }
13786#line 13787 "parse.c"
13787 break;
13788
13789 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
13790#line 4048 "parse.y"
13791 {
13792 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13793 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
13794 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
13795 /*% ripper: defined!($:4) %*/
13796 }
13797#line 13798 "parse.c"
13798 break;
13799
13800 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
13801#line 2950 "parse.y"
13802 {
13803 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13804 restore_defun(p, (yyvsp[-3].node_def_temp));
13805 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13806 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13807 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13808 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13809 /*% ripper: def!($:head, $:args, $:$) %*/
13810 local_pop(p);
13811 }
13812#line 13813 "parse.c"
13813 break;
13814
13815 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
13816#line 2961 "parse.y"
13817 {
13818 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13819 restore_defun(p, (yyvsp[-3].node_def_temp));
13820 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13821 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13822 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13823 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13824 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13825 local_pop(p);
13826 }
13827#line 13828 "parse.c"
13828 break;
13829
13830 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
13831#line 4060 "parse.y"
13832 {
13833 value_expr(p, (yyvsp[-5].node));
13834 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
13835 fixpos((yyval.node), (yyvsp[-5].node));
13836 /*% ripper: ifop!($:1, $:3, $:6) %*/
13837 }
13838#line 13839 "parse.c"
13839 break;
13840
13841 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13842#line 4070 "parse.y"
13843 {
13844 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13845 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13846 /*% ripper: rescue_mod!($:1, $:4) %*/
13847 }
13848#line 13849 "parse.c"
13849 break;
13850
13851 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
13852#line 4076 "parse.y"
13853 {
13854 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13855 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13856 }
13857#line 13858 "parse.c"
13858 break;
13859
13860 case 289: /* relop: '>' */
13861#line 4082 "parse.y"
13862 {(yyval.id) = '>';}
13863#line 13864 "parse.c"
13864 break;
13865
13866 case 290: /* relop: '<' */
13867#line 4083 "parse.y"
13868 {(yyval.id) = '<';}
13869#line 13870 "parse.c"
13870 break;
13871
13872 case 291: /* relop: ">=" */
13873#line 4084 "parse.y"
13874 {(yyval.id) = idGE;}
13875#line 13876 "parse.c"
13876 break;
13877
13878 case 292: /* relop: "<=" */
13879#line 4085 "parse.y"
13880 {(yyval.id) = idLE;}
13881#line 13882 "parse.c"
13882 break;
13883
13884 case 293: /* rel_expr: arg relop arg */
13885#line 4089 "parse.y"
13886 {
13887 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13888 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13889 }
13890#line 13891 "parse.c"
13891 break;
13892
13893 case 294: /* rel_expr: rel_expr relop arg */
13894#line 4094 "parse.y"
13895 {
13896 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13897 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13898 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13899 }
13900#line 13901 "parse.c"
13901 break;
13902
13903 case 295: /* lex_ctxt: none */
13904#line 4102 "parse.y"
13905 {
13906 (yyval.ctxt) = p->ctxt;
13907 }
13908#line 13909 "parse.c"
13909 break;
13910
13911 case 296: /* begin_defined: lex_ctxt */
13912#line 4108 "parse.y"
13913 {
13914 p->ctxt.in_defined = 1;
13915 (yyval.ctxt) = (yyvsp[0].ctxt);
13916 }
13917#line 13918 "parse.c"
13918 break;
13919
13920 case 297: /* after_rescue: lex_ctxt */
13921#line 4115 "parse.y"
13922 {
13923 p->ctxt.in_rescue = after_rescue;
13924 (yyval.ctxt) = (yyvsp[0].ctxt);
13925 }
13926#line 13927 "parse.c"
13927 break;
13928
13929 case 298: /* value_expr_arg: arg */
13930#line 3145 "parse.y"
13931 {
13932 value_expr(p, (yyvsp[0].node));
13933 (yyval.node) = (yyvsp[0].node);
13934 }
13935#line 13936 "parse.c"
13936 break;
13937
13938 case 302: /* aref_args: args ',' assocs trailer */
13939#line 4127 "parse.y"
13940 {
13941 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13942 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13943 }
13944#line 13945 "parse.c"
13945 break;
13946
13947 case 303: /* aref_args: assocs trailer */
13948#line 4132 "parse.y"
13949 {
13950 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
13951 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13952 }
13953#line 13954 "parse.c"
13954 break;
13955
13956 case 304: /* arg_rhs: arg */
13957#line 4139 "parse.y"
13958 {
13959 value_expr(p, (yyvsp[0].node));
13960 (yyval.node) = (yyvsp[0].node);
13961 }
13962#line 13963 "parse.c"
13963 break;
13964
13965 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
13966#line 4144 "parse.y"
13967 {
13968 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13969 value_expr(p, (yyvsp[-3].node));
13970 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13971 /*% ripper: rescue_mod!($:1, $:4) %*/
13972 }
13973#line 13974 "parse.c"
13974 break;
13975
13976 case 306: /* paren_args: '(' opt_call_args rparen */
13977#line 4153 "parse.y"
13978 {
13979 (yyval.node) = (yyvsp[-1].node);
13980 /*% ripper: arg_paren!($:2) %*/
13981 }
13982#line 13983 "parse.c"
13983 break;
13984
13985 case 307: /* paren_args: '(' args ',' args_forward rparen */
13986#line 4158 "parse.y"
13987 {
13988 if (!check_forwarding_args(p)) {
13989 (yyval.node) = 0;
13990 }
13991 else {
13992 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
13993 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
13994 }
13995 }
13996#line 13997 "parse.c"
13997 break;
13998
13999 case 308: /* paren_args: '(' args_forward rparen */
14000#line 4168 "parse.y"
14001 {
14002 if (!check_forwarding_args(p)) {
14003 (yyval.node) = 0;
14004 }
14005 else {
14006 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14007 /*% ripper: arg_paren!($:2) %*/
14008 }
14009 }
14010#line 14011 "parse.c"
14011 break;
14012
14013 case 310: /* opt_paren_args: paren_args */
14014#line 4181 "parse.y"
14015 {
14016 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14017 }
14018#line 14019 "parse.c"
14019 break;
14020
14021 case 314: /* opt_call_args: args ',' assocs ',' */
14022#line 4190 "parse.y"
14023 {
14024 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14025 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14026 }
14027#line 14028 "parse.c"
14028 break;
14029
14030 case 315: /* opt_call_args: assocs ',' */
14031#line 4195 "parse.y"
14032 {
14033 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14034 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14035 }
14036#line 14037 "parse.c"
14037 break;
14038
14039 case 316: /* value_expr_command: command */
14040#line 3145 "parse.y"
14041 {
14042 value_expr(p, (yyvsp[0].node));
14043 (yyval.node) = (yyvsp[0].node);
14044 }
14045#line 14046 "parse.c"
14046 break;
14047
14048 case 317: /* call_args: value_expr_command */
14049#line 4202 "parse.y"
14050 {
14051 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14052 /*% ripper: args_add!(args_new!, $:1) %*/
14053 }
14054#line 14055 "parse.c"
14055 break;
14056
14057 case 318: /* call_args: def_endless_method_endless_command */
14058#line 4207 "parse.y"
14059 {
14060 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14061 /*% ripper: args_add!(args_new!, $:1) %*/
14062 }
14063#line 14064 "parse.c"
14064 break;
14065
14066 case 319: /* call_args: args opt_block_arg */
14067#line 4212 "parse.y"
14068 {
14069 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14070 /*% ripper: args_add_block!($:1, $:2) %*/
14071 }
14072#line 14073 "parse.c"
14073 break;
14074
14075 case 320: /* call_args: assocs opt_block_arg */
14076#line 4217 "parse.y"
14077 {
14078 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14079 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14080 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14081 }
14082#line 14083 "parse.c"
14083 break;
14084
14085 case 321: /* call_args: args ',' assocs opt_block_arg */
14086#line 4223 "parse.y"
14087 {
14088 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14089 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14090 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14091 }
14092#line 14093 "parse.c"
14093 break;
14094
14095 case 323: /* $@13: %empty */
14096#line 4232 "parse.y"
14097 {
14098 /* If call_args starts with a open paren '(' or '[',
14099 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14100 * but the push must be done after CMDARG_PUSH(1).
14101 * So this code makes them consistent by first cancelling
14102 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14103 * and finally redoing CMDARG_PUSH(0).
14104 */
14105 int lookahead = 0;
14106 switch (yychar) {
14107 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14108 lookahead = 1;
14109 }
14110 if (lookahead) CMDARG_POP();
14111 CMDARG_PUSH(1);
14112 if (lookahead) CMDARG_PUSH(0);
14113 }
14114#line 14115 "parse.c"
14115 break;
14116
14117 case 324: /* command_args: $@13 call_args */
14118#line 4250 "parse.y"
14119 {
14120 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14121 * but the push must be done after CMDARG_POP() in the parser.
14122 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14123 * CMDARG_POP() to pop 1 pushed by command_args,
14124 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14125 */
14126 int lookahead = 0;
14127 switch (yychar) {
14128 case tLBRACE_ARG:
14129 lookahead = 1;
14130 }
14131 if (lookahead) CMDARG_POP();
14132 CMDARG_POP();
14133 if (lookahead) CMDARG_PUSH(0);
14134 (yyval.node) = (yyvsp[0].node);
14135 /*% ripper: $:2 %*/
14136 }
14137#line 14138 "parse.c"
14138 break;
14139
14140 case 325: /* block_arg: "&" arg_value */
14141#line 4271 "parse.y"
14142 {
14143 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14144 /*% ripper: $:2 %*/
14145 }
14146#line 14147 "parse.c"
14147 break;
14148
14149 case 326: /* block_arg: "&" */
14150#line 4276 "parse.y"
14151 {
14152 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14153 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14154 /*% ripper: Qnil %*/
14155 }
14156#line 14157 "parse.c"
14157 break;
14158
14159 case 327: /* opt_block_arg: ',' block_arg */
14160#line 4284 "parse.y"
14161 {
14162 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14163 /*% ripper: $:2 %*/
14164 }
14165#line 14166 "parse.c"
14166 break;
14167
14168 case 328: /* opt_block_arg: none */
14169#line 4289 "parse.y"
14170 {
14171 (yyval.node_block_pass) = 0;
14172 /*% ripper: Qfalse %*/
14173 }
14174#line 14175 "parse.c"
14175 break;
14176
14177 case 329: /* args: arg_value */
14178#line 4297 "parse.y"
14179 {
14180 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14181 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14182 }
14183#line 14184 "parse.c"
14184 break;
14185
14186 case 330: /* args: arg_splat */
14187#line 4302 "parse.y"
14188 {
14189 (yyval.node) = (yyvsp[0].node);
14190 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14191 }
14192#line 14193 "parse.c"
14193 break;
14194
14195 case 331: /* args: args ',' arg_value */
14196#line 4307 "parse.y"
14197 {
14198 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14199 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14200 }
14201#line 14202 "parse.c"
14202 break;
14203
14204 case 332: /* args: args ',' arg_splat */
14205#line 4312 "parse.y"
14206 {
14207 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14208 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14209 }
14210#line 14211 "parse.c"
14211 break;
14212
14213 case 333: /* arg_splat: "*" arg_value */
14214#line 4320 "parse.y"
14215 {
14216 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14217 /*% ripper: $:arg_value %*/
14218 }
14219#line 14220 "parse.c"
14220 break;
14221
14222 case 334: /* arg_splat: "*" */
14223#line 4325 "parse.y"
14224 {
14225 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14226 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14227 /*% ripper: Qnil %*/
14228 }
14229#line 14230 "parse.c"
14230 break;
14231
14232 case 337: /* mrhs: args ',' arg_value */
14233#line 4339 "parse.y"
14234 {
14235 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14236 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14237 }
14238#line 14239 "parse.c"
14239 break;
14240
14241 case 338: /* mrhs: args ',' "*" arg_value */
14242#line 4344 "parse.y"
14243 {
14244 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14245 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14246 }
14247#line 14248 "parse.c"
14248 break;
14249
14250 case 339: /* mrhs: "*" arg_value */
14251#line 4349 "parse.y"
14252 {
14253 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14254 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14255 }
14256#line 14257 "parse.c"
14257 break;
14258
14259 case 350: /* primary: "method" */
14260#line 4370 "parse.y"
14261 {
14262 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14263 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
14264 }
14265#line 14266 "parse.c"
14266 break;
14267
14268 case 351: /* $@14: %empty */
14269#line 4375 "parse.y"
14270 {
14271 CMDARG_PUSH(0);
14272 }
14273#line 14274 "parse.c"
14274 break;
14275
14276 case 352: /* primary: k_begin $@14 bodystmt k_end */
14277#line 4380 "parse.y"
14278 {
14279 CMDARG_POP();
14280 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14281 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14282 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14283 /*% ripper: begin!($:3) %*/
14284 }
14285#line 14286 "parse.c"
14286 break;
14287
14288 case 353: /* $@15: %empty */
14289#line 4387 "parse.y"
14290 {SET_LEX_STATE(EXPR_ENDARG);}
14291#line 14292 "parse.c"
14292 break;
14293
14294 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14295#line 4388 "parse.y"
14296 {
14297 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14298 (yyval.node) = (yyvsp[-2].node);
14299 /*% ripper: paren!($:2) %*/
14300 }
14301#line 14302 "parse.c"
14302 break;
14303
14304 case 355: /* primary: "(" compstmt_stmts ')' */
14305#line 4394 "parse.y"
14306 {
14307 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14308 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14309 /*% ripper: paren!($:2) %*/
14310 }
14311#line 14312 "parse.c"
14312 break;
14313
14314 case 356: /* primary: primary_value "::" "constant" */
14315#line 4400 "parse.y"
14316 {
14317 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14318 /*% ripper: const_path_ref!($:1, $:3) %*/
14319 }
14320#line 14321 "parse.c"
14321 break;
14322
14323 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14324#line 4405 "parse.y"
14325 {
14326 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14327 /*% ripper: top_const_ref!($:2) %*/
14328 }
14329#line 14330 "parse.c"
14330 break;
14331
14332 case 358: /* primary: "[" aref_args ']' */
14333#line 4410 "parse.y"
14334 {
14335 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14336 /*% ripper: array!($:2) %*/
14337 }
14338#line 14339 "parse.c"
14339 break;
14340
14341 case 359: /* primary: "{" assoc_list '}' */
14342#line 4415 "parse.y"
14343 {
14344 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14345 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14346 /*% ripper: hash!($:2) %*/
14347 }
14348#line 14349 "parse.c"
14349 break;
14350
14351 case 360: /* primary: k_return */
14352#line 4421 "parse.y"
14353 {
14354 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14355 /*% ripper: return0! %*/
14356 }
14357#line 14358 "parse.c"
14358 break;
14359
14360 case 361: /* primary: k_yield '(' call_args rparen */
14361#line 4426 "parse.y"
14362 {
14363 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14364 /*% ripper: yield!(paren!($:3)) %*/
14365 }
14366#line 14367 "parse.c"
14367 break;
14368
14369 case 362: /* primary: k_yield '(' rparen */
14370#line 4431 "parse.y"
14371 {
14372 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14373 /*% ripper: yield!(paren!(args_new!)) %*/
14374 }
14375#line 14376 "parse.c"
14376 break;
14377
14378 case 363: /* primary: k_yield */
14379#line 4436 "parse.y"
14380 {
14381 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14382 /*% ripper: yield0! %*/
14383 }
14384#line 14385 "parse.c"
14385 break;
14386
14387 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14388#line 4441 "parse.y"
14389 {
14390 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14391 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14392 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14393 /*% ripper: defined!($:5) %*/
14394 }
14395#line 14396 "parse.c"
14396 break;
14397
14398 case 365: /* primary: "'not'" '(' expr rparen */
14399#line 4448 "parse.y"
14400 {
14401 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14402 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14403 }
14404#line 14405 "parse.c"
14405 break;
14406
14407 case 366: /* primary: "'not'" '(' rparen */
14408#line 4453 "parse.y"
14409 {
14410 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14411 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14412 }
14413#line 14414 "parse.c"
14414 break;
14415
14416 case 367: /* primary: fcall brace_block */
14417#line 4458 "parse.y"
14418 {
14419 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14420 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14421 }
14422#line 14423 "parse.c"
14423 break;
14424
14425 case 369: /* primary: method_call brace_block */
14426#line 4464 "parse.y"
14427 {
14428 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14429 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14430 /*% ripper: method_add_block!($:1, $:2) %*/
14431 }
14432#line 14433 "parse.c"
14433 break;
14434
14435 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14436#line 4474 "parse.y"
14437 {
14438 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14439 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14440
14441 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14442 fixpos((yyval.node), (yyvsp[-4].node));
14443 /*% ripper: if!($:2, $:4, $:5) %*/
14444 }
14445#line 14446 "parse.c"
14446 break;
14447
14448 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14449#line 4486 "parse.y"
14450 {
14451 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14452 fixpos((yyval.node), (yyvsp[-4].node));
14453 /*% ripper: unless!($:2, $:4, $:5) %*/
14454 }
14455#line 14456 "parse.c"
14456 break;
14457
14458 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14459#line 4494 "parse.y"
14460 {
14461 restore_block_exit(p, (yyvsp[-3].node_exits));
14462 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14463 fixpos((yyval.node), (yyvsp[-2].node));
14464 /*% ripper: while!($:2, $:3) %*/
14465 }
14466#line 14467 "parse.c"
14467 break;
14468
14469 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14470#line 4503 "parse.y"
14471 {
14472 restore_block_exit(p, (yyvsp[-3].node_exits));
14473 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14474 fixpos((yyval.node), (yyvsp[-2].node));
14475 /*% ripper: until!($:2, $:3) %*/
14476 }
14477#line 14478 "parse.c"
14478 break;
14479
14480 case 375: /* @16: %empty */
14481#line 4510 "parse.y"
14482 {
14483 (yyval.labels) = p->case_labels;
14484 p->case_labels = CHECK_LITERAL_WHEN;
14485 }
14486#line 14487 "parse.c"
14487 break;
14488
14489 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14490#line 4516 "parse.y"
14491 {
14492 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14493 p->case_labels = (yyvsp[-2].labels);
14494 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14495 fixpos((yyval.node), (yyvsp[-4].node));
14496 /*% ripper: case!($:2, $:5) %*/
14497 }
14498#line 14499 "parse.c"
14499 break;
14500
14501 case 377: /* @17: %empty */
14502#line 4524 "parse.y"
14503 {
14504 (yyval.labels) = p->case_labels;
14505 p->case_labels = 0;
14506 }
14507#line 14508 "parse.c"
14508 break;
14509
14510 case 378: /* primary: k_case option_terms @17 case_body k_end */
14511#line 4530 "parse.y"
14512 {
14513 if (p->case_labels) st_free_table(p->case_labels);
14514 p->case_labels = (yyvsp[-2].labels);
14515 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14516 /*% ripper: case!(Qnil, $:4) %*/
14517 }
14518#line 14519 "parse.c"
14519 break;
14520
14521 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14522#line 4539 "parse.y"
14523 {
14524 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14525 /*% ripper: case!($:2, $:4) %*/
14526 }
14527#line 14528 "parse.c"
14528 break;
14529
14530 case 380: /* $@18: %empty */
14531#line 4544 "parse.y"
14532 {COND_PUSH(1);}
14533#line 14534 "parse.c"
14534 break;
14535
14536 case 381: /* $@19: %empty */
14537#line 4544 "parse.y"
14538 {COND_POP();}
14539#line 14540 "parse.c"
14540 break;
14541
14542 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14543#line 4547 "parse.y"
14544 {
14545 restore_block_exit(p, (yyvsp[-8].node_exits));
14546 /*
14547 * for a, b, c in e
14548 * #=>
14549 * e.each{|*x| a, b, c = x}
14550 *
14551 * for a in e
14552 * #=>
14553 * e.each{|x| a, = x}
14554 */
14555 ID id = internal_id(p);
14556 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14557 rb_node_args_t *args;
14558 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14559 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14560 tbl->ids[0] = id; /* internal id */
14561
14562 switch (nd_type((yyvsp[-7].node))) {
14563 case NODE_LASGN:
14564 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14565 set_nd_value(p, (yyvsp[-7].node), internal_var);
14566 id = 0;
14567 m->nd_plen = 1;
14568 m->nd_next = (yyvsp[-7].node);
14569 break;
14570 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14571 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14572 break;
14573 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14574 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]));
14575 }
14576 /* {|*internal_id| <m> = internal_id; ... } */
14577 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-7])), &(yylsp[-7]));
14578 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14579 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14580 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14581 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14582 fixpos((yyval.node), (yyvsp[-7].node));
14583 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14584 }
14585#line 14586 "parse.c"
14586 break;
14587
14588 case 383: /* $@20: %empty */
14589#line 4589 "parse.y"
14590 {
14591 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14592 }
14593#line 14594 "parse.c"
14594 break;
14595
14596 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14597#line 4594 "parse.y"
14598 {
14599 YYLTYPE inheritance_operator_loc = NULL_LOC;
14600 if ((yyvsp[-3].node)) {
14601 inheritance_operator_loc = (yylsp[-3]);
14602 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14603 }
14604 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14605 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14606 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14607 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14608 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14609 local_pop(p);
14610 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14611 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14612 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14613 }
14614#line 14615 "parse.c"
14615 break;
14616
14617 case 385: /* $@21: %empty */
14618#line 4611 "parse.y"
14619 {
14620 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14621 }
14622#line 14623 "parse.c"
14623 break;
14624
14625 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14626#line 4617 "parse.y"
14627 {
14628 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14629 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14630 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14631 fixpos((yyval.node), (yyvsp[-4].node));
14632 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14633 local_pop(p);
14634 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14635 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14636 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14637 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14638 }
14639#line 14640 "parse.c"
14640 break;
14641
14642 case 387: /* $@22: %empty */
14643#line 4630 "parse.y"
14644 {
14645 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14646 }
14647#line 14648 "parse.c"
14648 break;
14649
14650 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14651#line 4635 "parse.y"
14652 {
14653 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14654 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14655 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14656 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14657 /*% ripper: module!($:cpath, $:bodystmt) %*/
14658 local_pop(p);
14659 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14660 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14661 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14662 }
14663#line 14664 "parse.c"
14664 break;
14665
14666 case 389: /* $@23: %empty */
14667#line 4648 "parse.y"
14668 {
14669 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14670 }
14671#line 14672 "parse.c"
14672 break;
14673
14674 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14675#line 4653 "parse.y"
14676 {
14677 restore_defun(p, (yyvsp[-4].node_def_temp));
14678 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14679 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14680 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14681 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14682 local_pop(p);
14683 }
14684#line 14685 "parse.c"
14685 break;
14686
14687 case 391: /* $@24: %empty */
14688#line 4663 "parse.y"
14689 {
14690 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14691 }
14692#line 14693 "parse.c"
14693 break;
14694
14695 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14696#line 4668 "parse.y"
14697 {
14698 restore_defun(p, (yyvsp[-4].node_def_temp));
14699 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14700 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14701 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14702 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14703 local_pop(p);
14704 }
14705#line 14706 "parse.c"
14706 break;
14707
14708 case 393: /* primary: "'break'" */
14709#line 4677 "parse.y"
14710 {
14711 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14712 /*% ripper: break!(args_new!) %*/
14713 }
14714#line 14715 "parse.c"
14715 break;
14716
14717 case 394: /* primary: "'next'" */
14718#line 4682 "parse.y"
14719 {
14720 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14721 /*% ripper: next!(args_new!) %*/
14722 }
14723#line 14724 "parse.c"
14724 break;
14725
14726 case 395: /* primary: "'redo'" */
14727#line 4687 "parse.y"
14728 {
14729 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14730 /*% ripper: redo! %*/
14731 }
14732#line 14733 "parse.c"
14733 break;
14734
14735 case 396: /* primary: "'retry'" */
14736#line 4692 "parse.y"
14737 {
14738 if (!p->ctxt.in_defined) {
14739 switch (p->ctxt.in_rescue) {
14740 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14741 case after_rescue: /* ok */ break;
14742 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14743 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14744 }
14745 }
14746 (yyval.node) = NEW_RETRY(&(yyloc));
14747 /*% ripper: retry! %*/
14748 }
14749#line 14750 "parse.c"
14750 break;
14751
14752 case 397: /* value_expr_primary: primary */
14753#line 3145 "parse.y"
14754 {
14755 value_expr(p, (yyvsp[0].node));
14756 (yyval.node) = (yyvsp[0].node);
14757 }
14758#line 14759 "parse.c"
14759 break;
14760
14761 case 399: /* k_begin: "'begin'" */
14762#line 4710 "parse.y"
14763 {
14764 token_info_push(p, "begin", &(yyloc));
14765 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14766 }
14767#line 14768 "parse.c"
14768 break;
14769
14770 case 400: /* k_if: "'if'" */
14771#line 4717 "parse.y"
14772 {
14773 WARN_EOL("if");
14774 token_info_push(p, "if", &(yyloc));
14775 if (p->token_info && p->token_info->nonspc &&
14776 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14777 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14778 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14779 beg += rb_strlen_lit("else");
14780 while (beg < tok && ISSPACE(*beg)) beg++;
14781 if (beg == tok) {
14782 p->token_info->nonspc = 0;
14783 }
14784 }
14785 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14786 }
14787#line 14788 "parse.c"
14788 break;
14789
14790 case 401: /* k_unless: "'unless'" */
14791#line 4735 "parse.y"
14792 {
14793 token_info_push(p, "unless", &(yyloc));
14794 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14795 }
14796#line 14797 "parse.c"
14797 break;
14798
14799 case 402: /* k_while: "'while'" allow_exits */
14800#line 4742 "parse.y"
14801 {
14802 (yyval.node_exits) = (yyvsp[0].node_exits);
14803 token_info_push(p, "while", &(yyloc));
14804 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14805 }
14806#line 14807 "parse.c"
14807 break;
14808
14809 case 403: /* k_until: "'until'" allow_exits */
14810#line 4750 "parse.y"
14811 {
14812 (yyval.node_exits) = (yyvsp[0].node_exits);
14813 token_info_push(p, "until", &(yyloc));
14814 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14815 }
14816#line 14817 "parse.c"
14817 break;
14818
14819 case 404: /* k_case: "'case'" */
14820#line 4758 "parse.y"
14821 {
14822 token_info_push(p, "case", &(yyloc));
14823 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14824 }
14825#line 14826 "parse.c"
14826 break;
14827
14828 case 405: /* k_for: "'for'" allow_exits */
14829#line 4765 "parse.y"
14830 {
14831 (yyval.node_exits) = (yyvsp[0].node_exits);
14832 token_info_push(p, "for", &(yyloc));
14833 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14834 }
14835#line 14836 "parse.c"
14836 break;
14837
14838 case 406: /* k_class: "'class'" */
14839#line 4773 "parse.y"
14840 {
14841 token_info_push(p, "class", &(yyloc));
14842 (yyval.ctxt) = p->ctxt;
14843 p->ctxt.in_rescue = before_rescue;
14844 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14845 }
14846#line 14847 "parse.c"
14847 break;
14848
14849 case 407: /* k_module: "'module'" */
14850#line 4782 "parse.y"
14851 {
14852 token_info_push(p, "module", &(yyloc));
14853 (yyval.ctxt) = p->ctxt;
14854 p->ctxt.in_rescue = before_rescue;
14855 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14856 }
14857#line 14858 "parse.c"
14858 break;
14859
14860 case 408: /* k_def: "'def'" */
14861#line 4791 "parse.y"
14862 {
14863 token_info_push(p, "def", &(yyloc));
14864 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14865 p->ctxt.in_argdef = 1;
14866 }
14867#line 14868 "parse.c"
14868 break;
14869
14870 case 409: /* k_do: "'do'" */
14871#line 4799 "parse.y"
14872 {
14873 token_info_push(p, "do", &(yyloc));
14874 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14875 }
14876#line 14877 "parse.c"
14877 break;
14878
14879 case 410: /* k_do_block: "'do' for block" */
14880#line 4806 "parse.y"
14881 {
14882 token_info_push(p, "do", &(yyloc));
14883 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14884 }
14885#line 14886 "parse.c"
14886 break;
14887
14888 case 411: /* k_rescue: "'rescue'" */
14889#line 4813 "parse.y"
14890 {
14891 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14892 (yyval.ctxt) = p->ctxt;
14893 p->ctxt.in_rescue = after_rescue;
14894 }
14895#line 14896 "parse.c"
14896 break;
14897
14898 case 412: /* k_ensure: "'ensure'" */
14899#line 4821 "parse.y"
14900 {
14901 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14902 (yyval.ctxt) = p->ctxt;
14903 }
14904#line 14905 "parse.c"
14905 break;
14906
14907 case 413: /* k_when: "'when'" */
14908#line 4828 "parse.y"
14909 {
14910 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14911 }
14912#line 14913 "parse.c"
14913 break;
14914
14915 case 414: /* k_else: "'else'" */
14916#line 4834 "parse.y"
14917 {
14918 token_info *ptinfo_beg = p->token_info;
14919 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
14920 token_info_warn(p, "else", p->token_info, same, &(yyloc));
14921 if (same) {
14922 token_info e;
14923 e.next = ptinfo_beg->next;
14924 e.token = "else";
14925 token_info_setup(&e, p->lex.pbeg, &(yyloc));
14926 if (!e.nonspc) *ptinfo_beg = e;
14927 }
14928 }
14929#line 14930 "parse.c"
14930 break;
14931
14932 case 415: /* k_elsif: "'elsif'" */
14933#line 4849 "parse.y"
14934 {
14935 WARN_EOL("elsif");
14936 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
14937 }
14938#line 14939 "parse.c"
14939 break;
14940
14941 case 416: /* k_end: "'end'" */
14942#line 4856 "parse.y"
14943 {
14944 token_info_pop(p, "end", &(yyloc));
14945 pop_end_expect_token_locations(p);
14946 }
14947#line 14948 "parse.c"
14948 break;
14949
14950 case 417: /* k_end: "dummy end" */
14951#line 4861 "parse.y"
14952 {
14953 compile_error(p, "syntax error, unexpected end-of-input");
14954 }
14955#line 14956 "parse.c"
14956 break;
14957
14958 case 418: /* k_return: "'return'" */
14959#line 4867 "parse.y"
14960 {
14961 if (p->ctxt.cant_return && !dyna_in_block(p))
14962 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
14963 }
14964#line 14965 "parse.c"
14965 break;
14966
14967 case 419: /* k_yield: "'yield'" */
14968#line 4874 "parse.y"
14969 {
14970 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
14971 yyerror1(&(yylsp[0]), "Invalid yield");
14972 }
14973#line 14974 "parse.c"
14974 break;
14975
14976 case 424: /* do: "'do' for condition" */
14977#line 4886 "parse.y"
14978 { (yyval.id) = keyword_do_cond; }
14979#line 14980 "parse.c"
14980 break;
14981
14982 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
14983#line 4893 "parse.y"
14984 {
14985 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
14986 fixpos((yyval.node), (yyvsp[-3].node));
14987 /*% ripper: elsif!($:2, $:4, $:5) %*/
14988 }
14989#line 14990 "parse.c"
14990 break;
14991
14992 case 428: /* opt_else: k_else compstmt_stmts */
14993#line 4902 "parse.y"
14994 {
14995 (yyval.node) = (yyvsp[0].node);
14996 /*% ripper: else!($:2) %*/
14997 }
14998#line 14999 "parse.c"
14999 break;
15000
15001 case 431: /* f_marg: f_norm_arg */
15002#line 4913 "parse.y"
15003 {
15004 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15005 mark_lvar_used(p, (yyval.node));
15006 }
15007#line 15008 "parse.c"
15008 break;
15009
15010 case 432: /* f_marg: "(" f_margs rparen */
15011#line 4918 "parse.y"
15012 {
15013 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15014 /*% ripper: mlhs_paren!($:2) %*/
15015 }
15016#line 15017 "parse.c"
15017 break;
15018
15019 case 433: /* mlhs_items_f_marg: f_marg */
15020#line 3032 "parse.y"
15021 {
15022 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15023 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15024 }
15025#line 15026 "parse.c"
15026 break;
15027
15028 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15029#line 3037 "parse.y"
15030 {
15031 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15032 /*% ripper: mlhs_add!($:1, $:3) %*/
15033 }
15034#line 15035 "parse.c"
15035 break;
15036
15037 case 435: /* f_margs: mlhs_items_f_marg */
15038#line 4926 "parse.y"
15039 {
15040 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15041 /*% ripper: $:1 %*/
15042 }
15043#line 15044 "parse.c"
15044 break;
15045
15046 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15047#line 4931 "parse.y"
15048 {
15049 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15050 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15051 }
15052#line 15053 "parse.c"
15053 break;
15054
15055 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15056#line 4936 "parse.y"
15057 {
15058 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15059 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15060 }
15061#line 15062 "parse.c"
15062 break;
15063
15064 case 438: /* f_margs: f_rest_marg */
15065#line 4941 "parse.y"
15066 {
15067 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15068 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15069 }
15070#line 15071 "parse.c"
15071 break;
15072
15073 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15074#line 4946 "parse.y"
15075 {
15076 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15077 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15078 }
15079#line 15080 "parse.c"
15080 break;
15081
15082 case 440: /* f_rest_marg: "*" f_norm_arg */
15083#line 4953 "parse.y"
15084 {
15085 /*% ripper: $:2 %*/
15086 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15087 mark_lvar_used(p, (yyval.node));
15088 }
15089#line 15090 "parse.c"
15090 break;
15091
15092 case 441: /* f_rest_marg: "*" */
15093#line 4959 "parse.y"
15094 {
15095 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15096 /*% ripper: Qnil %*/
15097 }
15098#line 15099 "parse.c"
15099 break;
15100
15101 case 443: /* f_any_kwrest: f_no_kwarg */
15102#line 4967 "parse.y"
15103 {
15104 (yyval.id) = idNil;
15105 /*% ripper: ID2VAL(idNil) %*/
15106 }
15107#line 15108 "parse.c"
15108 break;
15109
15110 case 444: /* $@25: %empty */
15111#line 4973 "parse.y"
15112 {p->ctxt.in_argdef = 0;}
15113#line 15114 "parse.c"
15114 break;
15115
15116 case 446: /* f_kw_primary_value: f_label primary_value */
15117#line 3004 "parse.y"
15118 {
15119 p->ctxt.in_argdef = 1;
15120 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15121 /*% ripper: [$:$, $:value] %*/
15122 }
15123#line 15124 "parse.c"
15124 break;
15125
15126 case 447: /* f_kw_primary_value: f_label */
15127#line 3010 "parse.y"
15128 {
15129 p->ctxt.in_argdef = 1;
15130 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15131 /*% ripper: [$:$, 0] %*/
15132 }
15133#line 15134 "parse.c"
15134 break;
15135
15136 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15137#line 3019 "parse.y"
15138 {
15139 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15140 /*% ripper: rb_ary_new3(1, $:1) %*/
15141 }
15142#line 15143 "parse.c"
15143 break;
15144
15145 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15146#line 3024 "parse.y"
15147 {
15148 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15149 /*% ripper: rb_ary_push($:1, $:3) %*/
15150 }
15151#line 15152 "parse.c"
15152 break;
15153
15154 case 450: /* args_tail_basic_primary_value: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
15155#line 2927 "parse.y"
15156 {
15157 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15158 /*% ripper: [$:1, $:3, $:4] %*/
15159 }
15160#line 15161 "parse.c"
15161 break;
15162
15163 case 451: /* args_tail_basic_primary_value: f_kwarg_primary_value opt_f_block_arg */
15164#line 2932 "parse.y"
15165 {
15166 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15167 /*% ripper: [$:1, Qnil, $:2] %*/
15168 }
15169#line 15170 "parse.c"
15170 break;
15171
15172 case 452: /* args_tail_basic_primary_value: f_any_kwrest opt_f_block_arg */
15173#line 2937 "parse.y"
15174 {
15175 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15176 /*% ripper: [Qnil, $:1, $:2] %*/
15177 }
15178#line 15179 "parse.c"
15179 break;
15180
15181 case 453: /* args_tail_basic_primary_value: f_block_arg */
15182#line 2942 "parse.y"
15183 {
15184 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15185 /*% ripper: [Qnil, Qnil, $:1] %*/
15186 }
15187#line 15188 "parse.c"
15188 break;
15189
15190 case 455: /* excessed_comma: ',' */
15191#line 4979 "parse.y"
15192 {
15193 /* magic number for rest_id in iseq_set_arguments() */
15194 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15195 /*% ripper: excessed_comma! %*/
15196 }
15197#line 15198 "parse.c"
15198 break;
15199
15200 case 456: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15201#line 2982 "parse.y"
15202 {
15203 p->ctxt.in_argdef = 1;
15204 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15205 /*% ripper: [$:$, $:3] %*/
15206 }
15207#line 15208 "parse.c"
15208 break;
15209
15210 case 457: /* f_opt_arg_primary_value: f_opt_primary_value */
15211#line 2991 "parse.y"
15212 {
15213 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15214 /*% ripper: rb_ary_new3(1, $:1) %*/
15215 }
15216#line 15217 "parse.c"
15217 break;
15218
15219 case 458: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15220#line 2996 "parse.y"
15221 {
15222 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15223 /*% ripper: rb_ary_push($:1, $:3) %*/
15224 }
15225#line 15226 "parse.c"
15226 break;
15227
15228 case 459: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15229#line 3091 "parse.y"
15230 {
15231 (yyval.node_args) = (yyvsp[0].node_args);
15232 /*% ripper: $:2 %*/
15233 }
15234#line 15235 "parse.c"
15235 break;
15236
15237 case 460: /* opt_args_tail_block_args_tail: %empty */
15238#line 3096 "parse.y"
15239 {
15240 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15241 /*% ripper: [Qnil, Qnil, Qnil] %*/
15242 }
15243#line 15244 "parse.c"
15244 break;
15245
15246 case 461: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15247#line 4987 "parse.y"
15248 {
15249 (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));
15250 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
15251 }
15252#line 15253 "parse.c"
15253 break;
15254
15255 case 462: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15256#line 4992 "parse.y"
15257 {
15258 (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));
15259 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
15260 }
15261#line 15262 "parse.c"
15262 break;
15263
15264 case 463: /* block_param: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail */
15265#line 4997 "parse.y"
15266 {
15267 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15268 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
15269 }
15270#line 15271 "parse.c"
15271 break;
15272
15273 case 464: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15274#line 5002 "parse.y"
15275 {
15276 (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));
15277 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
15278 }
15279#line 15280 "parse.c"
15280 break;
15281
15282 case 465: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
15283#line 5007 "parse.y"
15284 {
15285 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15286 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
15287 }
15288#line 15289 "parse.c"
15289 break;
15290
15291 case 466: /* block_param: f_arg excessed_comma */
15292#line 5012 "parse.y"
15293 {
15294 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15295 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15296 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
15297 }
15298#line 15299 "parse.c"
15299 break;
15300
15301 case 467: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15302#line 5018 "parse.y"
15303 {
15304 (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));
15305 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
15306 }
15307#line 15308 "parse.c"
15308 break;
15309
15310 case 468: /* block_param: f_arg opt_args_tail_block_args_tail */
15311#line 5023 "parse.y"
15312 {
15313 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15314 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
15315 }
15316#line 15317 "parse.c"
15317 break;
15318
15319 case 469: /* block_param: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15320#line 5028 "parse.y"
15321 {
15322 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15323 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
15324 }
15325#line 15326 "parse.c"
15326 break;
15327
15328 case 470: /* block_param: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15329#line 5033 "parse.y"
15330 {
15331 (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));
15332 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
15333 }
15334#line 15335 "parse.c"
15335 break;
15336
15337 case 471: /* block_param: f_opt_arg_primary_value opt_args_tail_block_args_tail */
15338#line 5038 "parse.y"
15339 {
15340 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15341 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
15342 }
15343#line 15344 "parse.c"
15344 break;
15345
15346 case 472: /* block_param: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15347#line 5043 "parse.y"
15348 {
15349 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15350 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
15351 }
15352#line 15353 "parse.c"
15353 break;
15354
15355 case 473: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
15356#line 5048 "parse.y"
15357 {
15358 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15359 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
15360 }
15361#line 15362 "parse.c"
15362 break;
15363
15364 case 474: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15365#line 5053 "parse.y"
15366 {
15367 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15368 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
15369 }
15370#line 15371 "parse.c"
15371 break;
15372
15373 case 475: /* block_param: block_args_tail */
15374#line 5058 "parse.y"
15375 {
15376 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15377 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
15378 }
15379#line 15380 "parse.c"
15380 break;
15381
15382 case 477: /* opt_block_param_def: block_param_def */
15383#line 5066 "parse.y"
15384 {
15385 p->command_start = TRUE;
15386 }
15387#line 15388 "parse.c"
15388 break;
15389
15390 case 478: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15391#line 5072 "parse.y"
15392 {
15393 p->max_numparam = ORDINAL_PARAM;
15394 p->ctxt.in_argdef = 0;
15395 (yyval.node_args) = (yyvsp[-2].node_args);
15396 /*% ripper: block_var!($:2, $:3) %*/
15397 }
15398#line 15399 "parse.c"
15399 break;
15400
15401 case 479: /* opt_block_param: %empty */
15402#line 5081 "parse.y"
15403 {
15404 (yyval.node_args) = 0;
15405 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15406 }
15407#line 15408 "parse.c"
15408 break;
15409
15410 case 481: /* opt_bv_decl: option_'\n' */
15411#line 5089 "parse.y"
15412 {
15413 (yyval.id) = 0;
15414 /*% ripper: Qfalse %*/
15415 }
15416#line 15417 "parse.c"
15417 break;
15418
15419 case 482: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15420#line 5094 "parse.y"
15421 {
15422 (yyval.id) = 0;
15423 /*% ripper: $:3 %*/
15424 }
15425#line 15426 "parse.c"
15426 break;
15427
15428 case 485: /* bvar: "local variable or method" */
15429#line 5107 "parse.y"
15430 {
15431 new_bv(p, (yyvsp[0].id));
15432 /*% ripper: $:1 %*/
15433 }
15434#line 15435 "parse.c"
15435 break;
15436
15437 case 487: /* max_numparam: %empty */
15438#line 5114 "parse.y"
15439 {
15440 (yyval.num) = p->max_numparam;
15441 p->max_numparam = 0;
15442 }
15443#line 15444 "parse.c"
15444 break;
15445
15446 case 488: /* numparam: %empty */
15447#line 5120 "parse.y"
15448 {
15449 (yyval.node) = numparam_push(p);
15450 }
15451#line 15452 "parse.c"
15452 break;
15453
15454 case 489: /* it_id: %empty */
15455#line 5125 "parse.y"
15456 {
15457 (yyval.id) = p->it_id;
15458 p->it_id = 0;
15459 }
15460#line 15461 "parse.c"
15461 break;
15462
15463 case 490: /* @26: %empty */
15464#line 5132 "parse.y"
15465 {
15466 token_info_push(p, "->", &(yylsp[0]));
15467 (yyval.vars) = dyna_push(p);
15468 }
15469#line 15470 "parse.c"
15470 break;
15471
15472 case 491: /* $@27: %empty */
15473#line 5138 "parse.y"
15474 {
15475 CMDARG_PUSH(0);
15476 }
15477#line 15478 "parse.c"
15478 break;
15479
15480 case 492: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15481#line 5142 "parse.y"
15482 {
15483 int max_numparam = p->max_numparam;
15484 ID it_id = p->it_id;
15485 p->lex.lpar_beg = (yyvsp[-8].num);
15486 p->max_numparam = (yyvsp[-6].num);
15487 p->it_id = (yyvsp[-4].id);
15488 restore_block_exit(p, (yyvsp[-3].node_exits));
15489 CMDARG_POP();
15490 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15491 {
15492 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15493 (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);
15494 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15495 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15496 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15497 xfree((yyvsp[0].locations_lambda_body));
15498 }
15499 /*% ripper: lambda!($:args, $:body) %*/
15500 numparam_pop(p, (yyvsp[-5].node));
15501 dyna_pop(p, (yyvsp[-7].vars));
15502 }
15503#line 15504 "parse.c"
15504 break;
15505
15506 case 493: /* f_larglist: '(' f_args opt_bv_decl ')' */
15507#line 5166 "parse.y"
15508 {
15509 p->ctxt.in_argdef = 0;
15510 (yyval.node_args) = (yyvsp[-2].node_args);
15511 p->max_numparam = ORDINAL_PARAM;
15512 /*% ripper: paren!($:2) %*/
15513 }
15514#line 15515 "parse.c"
15515 break;
15516
15517 case 494: /* f_larglist: f_args */
15518#line 5173 "parse.y"
15519 {
15520 p->ctxt.in_argdef = 0;
15521 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15522 p->max_numparam = ORDINAL_PARAM;
15523 (yyval.node_args) = (yyvsp[0].node_args);
15524 }
15525#line 15526 "parse.c"
15526 break;
15527
15528 case 495: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15529#line 5182 "parse.y"
15530 {
15531 token_info_pop(p, "}", &(yylsp[0]));
15532 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15533 /*% ripper: $:2 %*/
15534 }
15535#line 15536 "parse.c"
15536 break;
15537
15538 case 496: /* $@28: %empty */
15539#line 5188 "parse.y"
15540 {
15541 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15542 }
15543#line 15544 "parse.c"
15544 break;
15545
15546 case 497: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15547#line 5192 "parse.y"
15548 {
15549 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15550 /*% ripper: $:3 %*/
15551 }
15552#line 15553 "parse.c"
15553 break;
15554
15555 case 498: /* do_block: k_do_block do_body k_end */
15556#line 5199 "parse.y"
15557 {
15558 (yyval.node) = (yyvsp[-1].node);
15559 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15560 /*% ripper: $:2 %*/
15561 }
15562#line 15563 "parse.c"
15563 break;
15564
15565 case 499: /* block_call: command do_block */
15566#line 5207 "parse.y"
15567 {
15568 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15569 compile_error(p, "block given to yield");
15570 }
15571 else {
15572 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15573 }
15574 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15575 fixpos((yyval.node), (yyvsp[-1].node));
15576 /*% ripper: method_add_block!($:1, $:2) %*/
15577 }
15578#line 15579 "parse.c"
15579 break;
15580
15581 case 500: /* block_call: block_call call_op2 operation2 opt_paren_args */
15582#line 5219 "parse.y"
15583 {
15584 bool has_args = (yyvsp[0].node) != 0;
15585 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15586 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15587 /*% ripper: call!($:1, $:2, $:3) %*/
15588 if (has_args) {
15589 /*% ripper: method_add_arg!($:$, $:4) %*/
15590 }
15591 }
15592#line 15593 "parse.c"
15593 break;
15594
15595 case 501: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15596#line 5229 "parse.y"
15597 {
15598 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15599 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15600 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15601 }
15602#line 15603 "parse.c"
15603 break;
15604
15605 case 502: /* block_call: block_call call_op2 operation2 command_args do_block */
15606#line 5235 "parse.y"
15607 {
15608 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15609 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15610 }
15611#line 15612 "parse.c"
15612 break;
15613
15614 case 503: /* block_call: block_call call_op2 paren_args */
15615#line 5240 "parse.y"
15616 {
15617 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15618 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15619 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15620 }
15621#line 15622 "parse.c"
15622 break;
15623
15624 case 504: /* method_call: fcall paren_args */
15625#line 5248 "parse.y"
15626 {
15627 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15628 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15629 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15630 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15631 }
15632#line 15633 "parse.c"
15633 break;
15634
15635 case 505: /* method_call: primary_value call_op operation2 opt_paren_args */
15636#line 5255 "parse.y"
15637 {
15638 bool has_args = (yyvsp[0].node) != 0;
15639 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15640 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15641 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15642 /*% ripper: call!($:1, $:2, $:3) %*/
15643 if (has_args) {
15644 /*% ripper: method_add_arg!($:$, $:4) %*/
15645 }
15646 }
15647#line 15648 "parse.c"
15648 break;
15649
15650 case 506: /* method_call: primary_value "::" operation2 paren_args */
15651#line 5266 "parse.y"
15652 {
15653 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15654 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15655 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15656 }
15657#line 15658 "parse.c"
15658 break;
15659
15660 case 507: /* method_call: primary_value "::" operation3 */
15661#line 5272 "parse.y"
15662 {
15663 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15664 /*% ripper: call!($:1, $:2, $:3) %*/
15665 }
15666#line 15667 "parse.c"
15667 break;
15668
15669 case 508: /* method_call: primary_value call_op2 paren_args */
15670#line 5277 "parse.y"
15671 {
15672 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15673 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15674 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15675 }
15676#line 15677 "parse.c"
15677 break;
15678
15679 case 509: /* method_call: "'super'" paren_args */
15680#line 5283 "parse.y"
15681 {
15682 rb_code_location_t lparen_loc = (yylsp[0]);
15683 rb_code_location_t rparen_loc = (yylsp[0]);
15684 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15685 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15686
15687 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15688 /*% ripper: super!($:2) %*/
15689 }
15690#line 15691 "parse.c"
15691 break;
15692
15693 case 510: /* method_call: "'super'" */
15694#line 5293 "parse.y"
15695 {
15696 (yyval.node) = NEW_ZSUPER(&(yyloc));
15697 /*% ripper: zsuper! %*/
15698 }
15699#line 15700 "parse.c"
15700 break;
15701
15702 case 511: /* method_call: primary_value '[' opt_call_args rbracket */
15703#line 5298 "parse.y"
15704 {
15705 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15706 fixpos((yyval.node), (yyvsp[-3].node));
15707 /*% ripper: aref!($:1, $:3) %*/
15708 }
15709#line 15710 "parse.c"
15710 break;
15711
15712 case 512: /* brace_block: '{' brace_body '}' */
15713#line 5306 "parse.y"
15714 {
15715 (yyval.node) = (yyvsp[-1].node);
15716 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15717 /*% ripper: $:2 %*/
15718 }
15719#line 15720 "parse.c"
15720 break;
15721
15722 case 513: /* brace_block: k_do do_body k_end */
15723#line 5312 "parse.y"
15724 {
15725 (yyval.node) = (yyvsp[-1].node);
15726 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15727 /*% ripper: $:2 %*/
15728 }
15729#line 15730 "parse.c"
15730 break;
15731
15732 case 514: /* @29: %empty */
15733#line 5319 "parse.y"
15734 {(yyval.vars) = dyna_push(p);}
15735#line 15736 "parse.c"
15736 break;
15737
15738 case 515: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
15739#line 5322 "parse.y"
15740 {
15741 int max_numparam = p->max_numparam;
15742 ID it_id = p->it_id;
15743 p->max_numparam = (yyvsp[-5].num);
15744 p->it_id = (yyvsp[-3].id);
15745 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15746 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15747 /*% ripper: brace_block!($:args, $:compstmt) %*/
15748 restore_block_exit(p, (yyvsp[-2].node_exits));
15749 numparam_pop(p, (yyvsp[-4].node));
15750 dyna_pop(p, (yyvsp[-6].vars));
15751 }
15752#line 15753 "parse.c"
15753 break;
15754
15755 case 516: /* @30: %empty */
15756#line 5336 "parse.y"
15757 {
15758 (yyval.vars) = dyna_push(p);
15759 CMDARG_PUSH(0);
15760 }
15761#line 15762 "parse.c"
15762 break;
15763
15764 case 517: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
15765#line 5342 "parse.y"
15766 {
15767 int max_numparam = p->max_numparam;
15768 ID it_id = p->it_id;
15769 p->max_numparam = (yyvsp[-5].num);
15770 p->it_id = (yyvsp[-3].id);
15771 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15772 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15773 /*% ripper: do_block!($:args, $:bodystmt) %*/
15774 CMDARG_POP();
15775 restore_block_exit(p, (yyvsp[-2].node_exits));
15776 numparam_pop(p, (yyvsp[-4].node));
15777 dyna_pop(p, (yyvsp[-6].vars));
15778 }
15779#line 15780 "parse.c"
15780 break;
15781
15782 case 518: /* case_args: arg_value */
15783#line 5358 "parse.y"
15784 {
15785 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15786 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15787 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15788 }
15789#line 15790 "parse.c"
15790 break;
15791
15792 case 519: /* case_args: "*" arg_value */
15793#line 5364 "parse.y"
15794 {
15795 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15796 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15797 }
15798#line 15799 "parse.c"
15799 break;
15800
15801 case 520: /* case_args: case_args ',' arg_value */
15802#line 5369 "parse.y"
15803 {
15804 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15805 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15806 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15807 }
15808#line 15809 "parse.c"
15809 break;
15810
15811 case 521: /* case_args: case_args ',' "*" arg_value */
15812#line 5375 "parse.y"
15813 {
15814 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15815 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15816 }
15817#line 15818 "parse.c"
15818 break;
15819
15820 case 522: /* case_body: k_when case_args then compstmt_stmts cases */
15821#line 5384 "parse.y"
15822 {
15823 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15824 fixpos((yyval.node), (yyvsp[-3].node));
15825 /*% ripper: when!($:2, $:4, $:5) %*/
15826 }
15827#line 15828 "parse.c"
15828 break;
15829
15830 case 525: /* p_pvtbl: %empty */
15831#line 5395 "parse.y"
15832 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15833#line 15834 "parse.c"
15834 break;
15835
15836 case 526: /* p_pktbl: %empty */
15837#line 5396 "parse.y"
15838 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15839#line 15840 "parse.c"
15840 break;
15841
15842 case 527: /* p_in_kwarg: %empty */
15843#line 5398 "parse.y"
15844 {
15845 (yyval.ctxt) = p->ctxt;
15846 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15847 p->command_start = FALSE;
15848 p->ctxt.in_kwarg = 1;
15849 p->ctxt.in_alt_pattern = 0;
15850 p->ctxt.capture_in_pattern = 0;
15851 }
15852#line 15853 "parse.c"
15853 break;
15854
15855 case 528: /* $@31: %empty */
15856#line 5411 "parse.y"
15857 {
15858 pop_pktbl(p, (yyvsp[-2].tbl));
15859 pop_pvtbl(p, (yyvsp[-3].tbl));
15860 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15861 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
15862 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
15863 }
15864#line 15865 "parse.c"
15865 break;
15866
15867 case 529: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
15868#line 5420 "parse.y"
15869 {
15870 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
15871 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15872 }
15873#line 15874 "parse.c"
15874 break;
15875
15876 case 533: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15877#line 5432 "parse.y"
15878 {
15879 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15880 fixpos((yyval.node), (yyvsp[0].node));
15881 /*% ripper: if_mod!($:3, $:1) %*/
15882 }
15883#line 15884 "parse.c"
15884 break;
15885
15886 case 534: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15887#line 5438 "parse.y"
15888 {
15889 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15890 fixpos((yyval.node), (yyvsp[0].node));
15891 /*% ripper: unless_mod!($:3, $:1) %*/
15892 }
15893#line 15894 "parse.c"
15894 break;
15895
15896 case 536: /* p_top_expr_body: p_expr ',' */
15897#line 5447 "parse.y"
15898 {
15899 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15900 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15901 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15902 }
15903#line 15904 "parse.c"
15904 break;
15905
15906 case 537: /* p_top_expr_body: p_expr ',' p_args */
15907#line 5453 "parse.y"
15908 {
15909 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15910 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15911 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15912 }
15913#line 15914 "parse.c"
15914 break;
15915
15916 case 538: /* p_top_expr_body: p_find */
15917#line 5459 "parse.y"
15918 {
15919 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15920 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15921 }
15922#line 15923 "parse.c"
15923 break;
15924
15925 case 539: /* p_top_expr_body: p_args_tail */
15926#line 5464 "parse.y"
15927 {
15928 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
15929 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
15930 }
15931#line 15932 "parse.c"
15932 break;
15933
15934 case 540: /* p_top_expr_body: p_kwargs */
15935#line 5469 "parse.y"
15936 {
15937 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15938 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
15939 }
15940#line 15941 "parse.c"
15941 break;
15942
15943 case 542: /* p_as: p_expr "=>" p_variable */
15944#line 5479 "parse.y"
15945 {
15946 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
15947 n = list_append(p, n, (yyvsp[0].node));
15948 (yyval.node) = new_hash(p, n, &(yyloc));
15949 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
15950 }
15951#line 15952 "parse.c"
15952 break;
15953
15954 case 544: /* $@32: %empty */
15955#line 5489 "parse.y"
15956 {
15957 p->ctxt.in_alt_pattern = 1;
15958 }
15959#line 15960 "parse.c"
15960 break;
15961
15962 case 545: /* p_alt: p_alt '|' $@32 p_expr_basic */
15963#line 5493 "parse.y"
15964 {
15965 if (p->ctxt.capture_in_pattern) {
15966 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
15967 }
15968 p->ctxt.in_alt_pattern = 0;
15969 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
15970 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
15971 }
15972#line 15973 "parse.c"
15973 break;
15974
15975 case 547: /* p_lparen: '(' p_pktbl */
15976#line 5505 "parse.y"
15977 {
15978 (yyval.tbl) = (yyvsp[0].tbl);
15979 /*% ripper: $:2 %*/
15980 }
15981#line 15982 "parse.c"
15982 break;
15983
15984 case 548: /* p_lbracket: '[' p_pktbl */
15985#line 5512 "parse.y"
15986 {
15987 (yyval.tbl) = (yyvsp[0].tbl);
15988 /*% ripper: $:2 %*/
15989 }
15990#line 15991 "parse.c"
15991 break;
15992
15993 case 551: /* p_expr_basic: p_const p_lparen p_args rparen */
15994#line 5521 "parse.y"
15995 {
15996 pop_pktbl(p, (yyvsp[-2].tbl));
15997 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15998 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15999 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16000 }
16001#line 16002 "parse.c"
16002 break;
16003
16004 case 552: /* p_expr_basic: p_const p_lparen p_find rparen */
16005#line 5528 "parse.y"
16006 {
16007 pop_pktbl(p, (yyvsp[-2].tbl));
16008 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16009 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16010 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16011 }
16012#line 16013 "parse.c"
16013 break;
16014
16015 case 553: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16016#line 5535 "parse.y"
16017 {
16018 pop_pktbl(p, (yyvsp[-2].tbl));
16019 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16020 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16021 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16022 }
16023#line 16024 "parse.c"
16024 break;
16025
16026 case 554: /* p_expr_basic: p_const '(' rparen */
16027#line 5542 "parse.y"
16028 {
16029 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16030 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16031 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16032 }
16033#line 16034 "parse.c"
16034 break;
16035
16036 case 555: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16037#line 5548 "parse.y"
16038 {
16039 pop_pktbl(p, (yyvsp[-2].tbl));
16040 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16041 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16042 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16043 }
16044#line 16045 "parse.c"
16045 break;
16046
16047 case 556: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16048#line 5555 "parse.y"
16049 {
16050 pop_pktbl(p, (yyvsp[-2].tbl));
16051 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16052 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16053 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16054 }
16055#line 16056 "parse.c"
16056 break;
16057
16058 case 557: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16059#line 5562 "parse.y"
16060 {
16061 pop_pktbl(p, (yyvsp[-2].tbl));
16062 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16063 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16064 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16065 }
16066#line 16067 "parse.c"
16067 break;
16068
16069 case 558: /* p_expr_basic: p_const '[' rbracket */
16070#line 5569 "parse.y"
16071 {
16072 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16073 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16074 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
16075 }
16076#line 16077 "parse.c"
16077 break;
16078
16079 case 559: /* p_expr_basic: "[" p_args rbracket */
16080#line 5575 "parse.y"
16081 {
16082 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16083 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16084 }
16085#line 16086 "parse.c"
16086 break;
16087
16088 case 560: /* p_expr_basic: "[" p_find rbracket */
16089#line 5580 "parse.y"
16090 {
16091 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16092 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16093 }
16094#line 16095 "parse.c"
16095 break;
16096
16097 case 561: /* p_expr_basic: "[" rbracket */
16098#line 5585 "parse.y"
16099 {
16100 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16101 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16102 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16103 }
16104#line 16105 "parse.c"
16105 break;
16106
16107 case 562: /* $@33: %empty */
16108#line 5591 "parse.y"
16109 {
16110 p->ctxt.in_kwarg = 0;
16111 }
16112#line 16113 "parse.c"
16113 break;
16114
16115 case 563: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16116#line 5595 "parse.y"
16117 {
16118 pop_pktbl(p, (yyvsp[-4].tbl));
16119 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16120 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16121 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16122 }
16123#line 16124 "parse.c"
16124 break;
16125
16126 case 564: /* p_expr_basic: "{" rbrace */
16127#line 5602 "parse.y"
16128 {
16129 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16130 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16131 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16132 }
16133#line 16134 "parse.c"
16134 break;
16135
16136 case 565: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16137#line 5608 "parse.y"
16138 {
16139 pop_pktbl(p, (yyvsp[-2].tbl));
16140 (yyval.node) = (yyvsp[-1].node);
16141 /*% ripper: $:p_expr %*/
16142 }
16143#line 16144 "parse.c"
16144 break;
16145
16146 case 566: /* p_args: p_expr */
16147#line 5616 "parse.y"
16148 {
16149 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16150 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16151 /*% ripper: [[$:1], Qnil, Qnil] %*/
16152 }
16153#line 16154 "parse.c"
16154 break;
16155
16156 case 567: /* p_args: p_args_head */
16157#line 5622 "parse.y"
16158 {
16159 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16160 /*% ripper: [$:1, Qnil, Qnil] %*/
16161 }
16162#line 16163 "parse.c"
16163 break;
16164
16165 case 568: /* p_args: p_args_head p_arg */
16166#line 5627 "parse.y"
16167 {
16168 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16169 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16170 }
16171#line 16172 "parse.c"
16172 break;
16173
16174 case 569: /* p_args: p_args_head p_rest */
16175#line 5632 "parse.y"
16176 {
16177 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16178 /*% ripper: [$:1, $:2, Qnil] %*/
16179 }
16180#line 16181 "parse.c"
16181 break;
16182
16183 case 570: /* p_args: p_args_head p_rest ',' p_args_post */
16184#line 5637 "parse.y"
16185 {
16186 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16187 /*% ripper: [$:1, $:2, $:4] %*/
16188 }
16189#line 16190 "parse.c"
16190 break;
16191
16192 case 573: /* p_args_head: p_args_head p_arg ',' */
16193#line 5646 "parse.y"
16194 {
16195 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16196 /*% ripper: rb_ary_concat($:1, $:2) %*/
16197 }
16198#line 16199 "parse.c"
16199 break;
16200
16201 case 574: /* p_args_tail: p_rest */
16202#line 5653 "parse.y"
16203 {
16204 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16205 /*% ripper: [Qnil, $:1, Qnil] %*/
16206 }
16207#line 16208 "parse.c"
16208 break;
16209
16210 case 575: /* p_args_tail: p_rest ',' p_args_post */
16211#line 5658 "parse.y"
16212 {
16213 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16214 /*% ripper: [Qnil, $:1, $:3] %*/
16215 }
16216#line 16217 "parse.c"
16217 break;
16218
16219 case 576: /* p_find: p_rest ',' p_args_post ',' p_rest */
16220#line 5665 "parse.y"
16221 {
16222 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16223 /*% ripper: [$:1, $:3, $:5] %*/
16224 }
16225#line 16226 "parse.c"
16226 break;
16227
16228 case 577: /* p_rest: "*" "local variable or method" */
16229#line 5673 "parse.y"
16230 {
16231 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16232 /*% ripper: var_field!($:2) %*/
16233 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16234 }
16235#line 16236 "parse.c"
16236 break;
16237
16238 case 578: /* p_rest: "*" */
16239#line 5679 "parse.y"
16240 {
16241 (yyval.node) = 0;
16242 /*% ripper: var_field!(Qnil) %*/
16243 }
16244#line 16245 "parse.c"
16245 break;
16246
16247 case 580: /* p_args_post: p_args_post ',' p_arg */
16248#line 5687 "parse.y"
16249 {
16250 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16251 /*% ripper: rb_ary_concat($:1, $:3) %*/
16252 }
16253#line 16254 "parse.c"
16254 break;
16255
16256 case 581: /* p_arg: p_expr */
16257#line 5694 "parse.y"
16258 {
16259 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16260 /*% ripper: [$:1] %*/
16261 }
16262#line 16263 "parse.c"
16263 break;
16264
16265 case 582: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16266#line 5701 "parse.y"
16267 {
16268 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16269 /*% ripper: [$:1, $:3] %*/
16270 }
16271#line 16272 "parse.c"
16272 break;
16273
16274 case 583: /* p_kwargs: p_kwarg */
16275#line 5706 "parse.y"
16276 {
16277 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16278 /*% ripper: [$:1, Qnil] %*/
16279 }
16280#line 16281 "parse.c"
16281 break;
16282
16283 case 584: /* p_kwargs: p_kwarg ',' */
16284#line 5711 "parse.y"
16285 {
16286 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16287 /*% ripper: [$:1, Qnil] %*/
16288 }
16289#line 16290 "parse.c"
16290 break;
16291
16292 case 585: /* p_kwargs: p_any_kwrest */
16293#line 5716 "parse.y"
16294 {
16295 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16296 /*% ripper: [[], $:1] %*/
16297 }
16298#line 16299 "parse.c"
16299 break;
16300
16301 case 587: /* p_kwarg: p_kwarg ',' p_kw */
16302#line 5725 "parse.y"
16303 {
16304 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16305 /*% ripper: rb_ary_push($:1, $:3) %*/
16306 }
16307#line 16308 "parse.c"
16308 break;
16309
16310 case 588: /* p_kw: p_kw_label p_expr */
16311#line 5732 "parse.y"
16312 {
16313 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16314 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16315 /*% ripper: [$:1, $:2] %*/
16316 }
16317#line 16318 "parse.c"
16318 break;
16319
16320 case 589: /* p_kw: p_kw_label */
16321#line 5738 "parse.y"
16322 {
16323 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16324 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16325 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16326 }
16327 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16328 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16329 /*% ripper: [$:1, Qnil] %*/
16330 }
16331#line 16332 "parse.c"
16332 break;
16333
16334 case 591: /* p_kw_label: "string literal" string_contents tLABEL_END */
16335#line 5751 "parse.y"
16336 {
16337 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16338 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16339 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16340 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16341 }
16342 else {
16343 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16344 (yyval.id) = rb_intern_str(STR_NEW0());
16345 }
16346 /*% ripper: $:2 %*/
16347 }
16348#line 16349 "parse.c"
16349 break;
16350
16351 case 592: /* p_kwrest: kwrest_mark "local variable or method" */
16352#line 5766 "parse.y"
16353 {
16354 (yyval.id) = (yyvsp[0].id);
16355 /*% ripper: var_field!($:2) %*/
16356 }
16357#line 16358 "parse.c"
16358 break;
16359
16360 case 593: /* p_kwrest: kwrest_mark */
16361#line 5771 "parse.y"
16362 {
16363 (yyval.id) = 0;
16364 /*% ripper: Qnil %*/
16365 }
16366#line 16367 "parse.c"
16367 break;
16368
16369 case 594: /* p_kwnorest: kwrest_mark "'nil'" */
16370#line 5778 "parse.y"
16371 {
16372 (yyval.id) = 0;
16373 }
16374#line 16375 "parse.c"
16375 break;
16376
16377 case 596: /* p_any_kwrest: p_kwnorest */
16378#line 5785 "parse.y"
16379 {
16380 (yyval.id) = idNil;
16381 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16382 }
16383#line 16384 "parse.c"
16384 break;
16385
16386 case 598: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16387#line 3104 "parse.y"
16388 {
16389 value_expr(p, (yyvsp[-2].node));
16390 value_expr(p, (yyvsp[0].node));
16391 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16392 /*% ripper: dot2!($:1, $:3) %*/
16393 }
16394#line 16395 "parse.c"
16395 break;
16396
16397 case 599: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16398#line 3111 "parse.y"
16399 {
16400 value_expr(p, (yyvsp[-2].node));
16401 value_expr(p, (yyvsp[0].node));
16402 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16403 /*% ripper: dot3!($:1, $:3) %*/
16404 }
16405#line 16406 "parse.c"
16406 break;
16407
16408 case 600: /* range_expr_p_primitive: p_primitive ".." */
16409#line 3118 "parse.y"
16410 {
16411 value_expr(p, (yyvsp[-1].node));
16412 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16413 /*% ripper: dot2!($:1, Qnil) %*/
16414 }
16415#line 16416 "parse.c"
16416 break;
16417
16418 case 601: /* range_expr_p_primitive: p_primitive "..." */
16419#line 3124 "parse.y"
16420 {
16421 value_expr(p, (yyvsp[-1].node));
16422 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16423 /*% ripper: dot3!($:1, Qnil) %*/
16424 }
16425#line 16426 "parse.c"
16426 break;
16427
16428 case 602: /* range_expr_p_primitive: "(.." p_primitive */
16429#line 3130 "parse.y"
16430 {
16431 value_expr(p, (yyvsp[0].node));
16432 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16433 /*% ripper: dot2!(Qnil, $:2) %*/
16434 }
16435#line 16436 "parse.c"
16436 break;
16437
16438 case 603: /* range_expr_p_primitive: "(..." p_primitive */
16439#line 3136 "parse.y"
16440 {
16441 value_expr(p, (yyvsp[0].node));
16442 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16443 /*% ripper: dot3!(Qnil, $:2) %*/
16444 }
16445#line 16446 "parse.c"
16446 break;
16447
16448 case 616: /* p_primitive: keyword_variable */
16449#line 5800 "parse.y"
16450 {
16451 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16452 /*% ripper: var_ref!($:1) %*/
16453 }
16454#line 16455 "parse.c"
16455 break;
16456
16457 case 618: /* p_variable: "local variable or method" */
16458#line 5808 "parse.y"
16459 {
16460 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16461 /*% ripper: var_field!($:1) %*/
16462 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16463 }
16464#line 16465 "parse.c"
16465 break;
16466
16467 case 619: /* p_var_ref: '^' "local variable or method" */
16468#line 5816 "parse.y"
16469 {
16470 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16471 if (!n) {
16472 n = NEW_ERROR(&(yyloc));
16473 }
16474 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16475 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16476 }
16477 (yyval.node) = n;
16478 /*% ripper: var_ref!($:2) %*/
16479 }
16480#line 16481 "parse.c"
16481 break;
16482
16483 case 620: /* p_var_ref: '^' nonlocal_var */
16484#line 5828 "parse.y"
16485 {
16486 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16487 /*% ripper: var_ref!($:2) %*/
16488 }
16489#line 16490 "parse.c"
16490 break;
16491
16492 case 621: /* p_expr_ref: '^' "(" expr_value rparen */
16493#line 5835 "parse.y"
16494 {
16495 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16496 /*% ripper: begin!($:3) %*/
16497 }
16498#line 16499 "parse.c"
16499 break;
16500
16501 case 622: /* p_const: ":: at EXPR_BEG" cname */
16502#line 5842 "parse.y"
16503 {
16504 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16505 /*% ripper: top_const_ref!($:2) %*/
16506 }
16507#line 16508 "parse.c"
16508 break;
16509
16510 case 623: /* p_const: p_const "::" cname */
16511#line 5847 "parse.y"
16512 {
16513 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16514 /*% ripper: const_path_ref!($:1, $:3) %*/
16515 }
16516#line 16517 "parse.c"
16517 break;
16518
16519 case 624: /* p_const: "constant" */
16520#line 5852 "parse.y"
16521 {
16522 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16523 /*% ripper: var_ref!($:1) %*/
16524 }
16525#line 16526 "parse.c"
16526 break;
16527
16528 case 625: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16529#line 5861 "parse.y"
16530 {
16531 NODE *err = (yyvsp[-3].node);
16532 if ((yyvsp[-3].node)) {
16533 err = NEW_ERRINFO(&(yylsp[-3]));
16534 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16535 }
16536 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16537 if ((yyvsp[-4].node)) {
16538 fixpos((yyval.node), (yyvsp[-4].node));
16539 }
16540 else if ((yyvsp[-3].node)) {
16541 fixpos((yyval.node), (yyvsp[-3].node));
16542 }
16543 else {
16544 fixpos((yyval.node), (yyvsp[-1].node));
16545 }
16546 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16547 }
16548#line 16549 "parse.c"
16549 break;
16550
16551 case 627: /* exc_list: arg_value */
16552#line 5883 "parse.y"
16553 {
16554 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16555 /*% ripper: rb_ary_new3(1, $:1) %*/
16556 }
16557#line 16558 "parse.c"
16558 break;
16559
16560 case 628: /* exc_list: mrhs */
16561#line 5888 "parse.y"
16562 {
16563 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16564 }
16565#line 16566 "parse.c"
16566 break;
16567
16568 case 630: /* exc_var: "=>" lhs */
16569#line 5895 "parse.y"
16570 {
16571 (yyval.node) = (yyvsp[0].node);
16572 /*% ripper: $:2 %*/
16573 }
16574#line 16575 "parse.c"
16575 break;
16576
16577 case 632: /* opt_ensure: k_ensure stmts option_terms */
16578#line 5903 "parse.y"
16579 {
16580 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16581 (yyval.node) = (yyvsp[-1].node);
16582 void_expr(p, void_stmts(p, (yyval.node)));
16583 /*% ripper: ensure!($:2) %*/
16584 }
16585#line 16586 "parse.c"
16586 break;
16587
16588 case 636: /* strings: string */
16589#line 5917 "parse.y"
16590 {
16591 if (!(yyvsp[0].node)) {
16592 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16593 }
16594 else {
16595 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16596 }
16597 /*% ripper: $:1 %*/
16598 }
16599#line 16600 "parse.c"
16600 break;
16601
16602 case 639: /* string: string string1 */
16603#line 5931 "parse.y"
16604 {
16605 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16606 /*% ripper: string_concat!($:1, $:2) %*/
16607 }
16608#line 16609 "parse.c"
16609 break;
16610
16611 case 640: /* string1: "string literal" string_contents "terminator" */
16612#line 5938 "parse.y"
16613 {
16614 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16615 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16616 /*% ripper: $:2 %*/
16617 if (p->heredoc_indent > 0) {
16618 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16619 p->heredoc_indent = 0;
16620 }
16621 /*% ripper: string_literal!($:$) %*/
16622 }
16623#line 16624 "parse.c"
16624 break;
16625
16626 case 641: /* xstring: "backtick literal" xstring_contents "terminator" */
16627#line 5951 "parse.y"
16628 {
16629 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16630 /*% ripper: $:2 %*/
16631 if (p->heredoc_indent > 0) {
16632 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16633 p->heredoc_indent = 0;
16634 }
16635 /*% ripper: xstring_literal!($:$) %*/
16636 }
16637#line 16638 "parse.c"
16638 break;
16639
16640 case 642: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16641#line 5963 "parse.y"
16642 {
16643 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16644 /*% ripper: regexp_literal!($:2, $:3) %*/
16645 }
16646#line 16647 "parse.c"
16647 break;
16648
16649 case 645: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16650#line 3153 "parse.y"
16651 {
16652 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16653 /*% ripper: array!($:3) %*/
16654 }
16655#line 16656 "parse.c"
16656 break;
16657
16658 case 647: /* word_list: %empty */
16659#line 5973 "parse.y"
16660 {
16661 (yyval.node) = 0;
16662 /*% ripper: words_new! %*/
16663 }
16664#line 16665 "parse.c"
16665 break;
16666
16667 case 648: /* word_list: word_list word nonempty_list_' ' */
16668#line 5978 "parse.y"
16669 {
16670 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16671 /*% ripper: words_add!($:1, $:2) %*/
16672 }
16673#line 16674 "parse.c"
16674 break;
16675
16676 case 650: /* word: word string_content */
16677#line 5987 "parse.y"
16678 {
16679 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16680 /*% ripper: word_add!($:1, $:2) %*/
16681 }
16682#line 16683 "parse.c"
16683 break;
16684
16685 case 651: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16686#line 3153 "parse.y"
16687 {
16688 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16689 /*% ripper: array!($:3) %*/
16690 }
16691#line 16692 "parse.c"
16692 break;
16693
16694 case 653: /* symbol_list: %empty */
16695#line 5997 "parse.y"
16696 {
16697 (yyval.node) = 0;
16698 /*% ripper: symbols_new! %*/
16699 }
16700#line 16701 "parse.c"
16701 break;
16702
16703 case 654: /* symbol_list: symbol_list word nonempty_list_' ' */
16704#line 6002 "parse.y"
16705 {
16706 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16707 /*% ripper: symbols_add!($:1, $:2) %*/
16708 }
16709#line 16710 "parse.c"
16710 break;
16711
16712 case 655: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16713#line 3153 "parse.y"
16714 {
16715 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16716 /*% ripper: array!($:3) %*/
16717 }
16718#line 16719 "parse.c"
16719 break;
16720
16721 case 657: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16722#line 3153 "parse.y"
16723 {
16724 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16725 /*% ripper: array!($:3) %*/
16726 }
16727#line 16728 "parse.c"
16728 break;
16729
16730 case 659: /* qword_list: %empty */
16731#line 6015 "parse.y"
16732 {
16733 (yyval.node) = 0;
16734 /*% ripper: qwords_new! %*/
16735 }
16736#line 16737 "parse.c"
16737 break;
16738
16739 case 660: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16740#line 6020 "parse.y"
16741 {
16742 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16743 /*% ripper: qwords_add!($:1, $:2) %*/
16744 }
16745#line 16746 "parse.c"
16746 break;
16747
16748 case 661: /* qsym_list: %empty */
16749#line 6027 "parse.y"
16750 {
16751 (yyval.node) = 0;
16752 /*% ripper: qsymbols_new! %*/
16753 }
16754#line 16755 "parse.c"
16755 break;
16756
16757 case 662: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16758#line 6032 "parse.y"
16759 {
16760 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16761 /*% ripper: qsymbols_add!($:1, $:2) %*/
16762 }
16763#line 16764 "parse.c"
16764 break;
16765
16766 case 663: /* string_contents: %empty */
16767#line 6039 "parse.y"
16768 {
16769 (yyval.node) = 0;
16770 /*% ripper: string_content! %*/
16771 }
16772#line 16773 "parse.c"
16773 break;
16774
16775 case 664: /* string_contents: string_contents string_content */
16776#line 6044 "parse.y"
16777 {
16778 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16779 /*% ripper: string_add!($:1, $:2) %*/
16780 }
16781#line 16782 "parse.c"
16782 break;
16783
16784 case 665: /* xstring_contents: %empty */
16785#line 6051 "parse.y"
16786 {
16787 (yyval.node) = 0;
16788 /*% ripper: xstring_new! %*/
16789 }
16790#line 16791 "parse.c"
16791 break;
16792
16793 case 666: /* xstring_contents: xstring_contents string_content */
16794#line 6056 "parse.y"
16795 {
16796 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16797 /*% ripper: xstring_add!($:1, $:2) %*/
16798 }
16799#line 16800 "parse.c"
16800 break;
16801
16802 case 667: /* regexp_contents: %empty */
16803#line 6063 "parse.y"
16804 {
16805 (yyval.node) = 0;
16806 /*% ripper: regexp_new! %*/
16807 }
16808#line 16809 "parse.c"
16809 break;
16810
16811 case 668: /* regexp_contents: regexp_contents string_content */
16812#line 6068 "parse.y"
16813 {
16814 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16815 if (!head) {
16816 (yyval.node) = tail;
16817 }
16818 else if (!tail) {
16819 (yyval.node) = head;
16820 }
16821 else {
16822 switch (nd_type(head)) {
16823 case NODE_STR:
16824 head = str2dstr(p, head);
16825 break;
16826 case NODE_DSTR:
16827 break;
16828 default:
16829 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16830 break;
16831 }
16832 (yyval.node) = list_append(p, head, tail);
16833 }
16834 /*% ripper: regexp_add!($:1, $:2) %*/
16835 }
16836#line 16837 "parse.c"
16837 break;
16838
16839 case 670: /* @34: %empty */
16840#line 6096 "parse.y"
16841 {
16842 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16843 (yyval.strterm) = p->lex.strterm;
16844 p->lex.strterm = 0;
16845 SET_LEX_STATE(EXPR_BEG);
16846 }
16847#line 16848 "parse.c"
16848 break;
16849
16850 case 671: /* string_content: tSTRING_DVAR @34 string_dvar */
16851#line 6103 "parse.y"
16852 {
16853 p->lex.strterm = (yyvsp[-1].strterm);
16854 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
16855 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16856 /*% ripper: string_dvar!($:3) %*/
16857 }
16858#line 16859 "parse.c"
16859 break;
16860
16861 case 672: /* @35: %empty */
16862#line 6110 "parse.y"
16863 {
16864 CMDARG_PUSH(0);
16865 COND_PUSH(0);
16866 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16867 (yyval.strterm) = p->lex.strterm;
16868 p->lex.strterm = 0;
16869 SET_LEX_STATE(EXPR_BEG);
16870 }
16871#line 16872 "parse.c"
16872 break;
16873
16874 case 673: /* @36: %empty */
16875#line 6118 "parse.y"
16876 {
16877 (yyval.num) = p->lex.brace_nest;
16878 p->lex.brace_nest = 0;
16879 }
16880#line 16881 "parse.c"
16881 break;
16882
16883 case 674: /* @37: %empty */
16884#line 6122 "parse.y"
16885 {
16886 (yyval.num) = p->heredoc_indent;
16887 p->heredoc_indent = 0;
16888 }
16889#line 16890 "parse.c"
16890 break;
16891
16892 case 675: /* string_content: "'#{'" @35 @36 @37 compstmt_stmts string_dend */
16893#line 6127 "parse.y"
16894 {
16895 COND_POP();
16896 CMDARG_POP();
16897 p->lex.strterm = (yyvsp[-4].strterm);
16898 SET_LEX_STATE((yyvsp[-5].state));
16899 p->lex.brace_nest = (yyvsp[-3].num);
16900 p->heredoc_indent = (yyvsp[-2].num);
16901 p->heredoc_line_indent = -1;
16902 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16903 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
16904 /*% ripper: string_embexpr!($:compstmt) %*/
16905 }
16906#line 16907 "parse.c"
16907 break;
16908
16909 case 678: /* string_dvar: nonlocal_var */
16910#line 6146 "parse.y"
16911 {
16912 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16913 /*% ripper: var_ref!($:1) %*/
16914 }
16915#line 16916 "parse.c"
16916 break;
16917
16918 case 682: /* ssym: "symbol literal" sym */
16919#line 6158 "parse.y"
16920 {
16921 SET_LEX_STATE(EXPR_END);
16922 VALUE str = rb_id2str((yyvsp[0].id));
16923 /*
16924 * TODO:
16925 * set_yylval_noname sets invalid id to yylval.
16926 * This branch can be removed once yylval is changed to
16927 * hold lexed string.
16928 */
16929 if (!str) str = STR_NEW0();
16930 (yyval.node) = NEW_SYM(str, &(yyloc));
16931 /*% ripper: symbol_literal!(symbol!($:2)) %*/
16932 }
16933#line 16934 "parse.c"
16934 break;
16935
16936 case 685: /* dsym: "symbol literal" string_contents "terminator" */
16937#line 6178 "parse.y"
16938 {
16939 SET_LEX_STATE(EXPR_END);
16940 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
16941 /*% ripper: dyna_symbol!($:2) %*/
16942 }
16943#line 16944 "parse.c"
16944 break;
16945
16946 case 687: /* numeric: tUMINUS_NUM simple_numeric */
16947#line 6187 "parse.y"
16948 {
16949 (yyval.node) = (yyvsp[0].node);
16950 negate_lit(p, (yyval.node), &(yyloc));
16951 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
16952 }
16953#line 16954 "parse.c"
16954 break;
16955
16956 case 698: /* keyword_variable: "'nil'" */
16957#line 6209 "parse.y"
16958 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
16959#line 16960 "parse.c"
16960 break;
16961
16962 case 699: /* keyword_variable: "'self'" */
16963#line 6210 "parse.y"
16964 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
16965#line 16966 "parse.c"
16966 break;
16967
16968 case 700: /* keyword_variable: "'true'" */
16969#line 6211 "parse.y"
16970 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
16971#line 16972 "parse.c"
16972 break;
16973
16974 case 701: /* keyword_variable: "'false'" */
16975#line 6212 "parse.y"
16976 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
16977#line 16978 "parse.c"
16978 break;
16979
16980 case 702: /* keyword_variable: "'__FILE__'" */
16981#line 6213 "parse.y"
16982 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
16983#line 16984 "parse.c"
16984 break;
16985
16986 case 703: /* keyword_variable: "'__LINE__'" */
16987#line 6214 "parse.y"
16988 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
16989#line 16990 "parse.c"
16990 break;
16991
16992 case 704: /* keyword_variable: "'__ENCODING__'" */
16993#line 6215 "parse.y"
16994 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
16995#line 16996 "parse.c"
16996 break;
16997
16998 case 705: /* var_ref: user_variable */
16999#line 6219 "parse.y"
17000 {
17001 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17002 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17003 /*% ripper: var_ref!($:1) %*/
17004 }
17005 else {
17006 /*% ripper: vcall!($:1) %*/
17007 }
17008 }
17009#line 17010 "parse.c"
17010 break;
17011
17012 case 706: /* var_ref: keyword_variable */
17013#line 6229 "parse.y"
17014 {
17015 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17016 /*% ripper: var_ref!($:1) %*/
17017 }
17018#line 17019 "parse.c"
17019 break;
17020
17021 case 707: /* var_lhs: user_variable */
17022#line 6236 "parse.y"
17023 {
17024 /*% ripper: var_field!($:1) %*/
17025 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17026 }
17027#line 17028 "parse.c"
17028 break;
17029
17030 case 708: /* var_lhs: keyword_variable */
17031#line 6236 "parse.y"
17032 {
17033 /*% ripper: var_field!($:1) %*/
17034 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17035 }
17036#line 17037 "parse.c"
17037 break;
17038
17039 case 711: /* $@38: %empty */
17040#line 6247 "parse.y"
17041 {
17042 SET_LEX_STATE(EXPR_BEG);
17043 p->command_start = TRUE;
17044 }
17045#line 17046 "parse.c"
17046 break;
17047
17048 case 712: /* superclass: '<' $@38 expr_value term */
17049#line 6252 "parse.y"
17050 {
17051 (yyval.node) = (yyvsp[-1].node);
17052 /*% ripper: $:3 %*/
17053 }
17054#line 17055 "parse.c"
17055 break;
17056
17057 case 715: /* f_opt_paren_args: none */
17058#line 6261 "parse.y"
17059 {
17060 p->ctxt.in_argdef = 0;
17061 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
17062 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
17063 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17064 }
17065#line 17066 "parse.c"
17066 break;
17067
17068 case 716: /* f_paren_args: '(' f_args rparen */
17069#line 6270 "parse.y"
17070 {
17071 (yyval.node_args) = (yyvsp[-1].node_args);
17072 /*% ripper: paren!($:2) %*/
17073 SET_LEX_STATE(EXPR_BEG);
17074 p->command_start = TRUE;
17075 p->ctxt.in_argdef = 0;
17076 }
17077#line 17078 "parse.c"
17078 break;
17079
17080 case 718: /* @39: %empty */
17081#line 6280 "parse.y"
17082 {
17083 (yyval.ctxt) = p->ctxt;
17084 p->ctxt.in_kwarg = 1;
17085 p->ctxt.in_argdef = 1;
17086 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17087 }
17088#line 17089 "parse.c"
17089 break;
17090
17091 case 719: /* f_arglist: @39 f_args term */
17092#line 6287 "parse.y"
17093 {
17094 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17095 p->ctxt.in_argdef = 0;
17096 (yyval.node_args) = (yyvsp[-1].node_args);
17097 SET_LEX_STATE(EXPR_BEG);
17098 p->command_start = TRUE;
17099 /*% ripper: $:2 %*/
17100 }
17101#line 17102 "parse.c"
17102 break;
17103
17104 case 720: /* f_kw_arg_value: f_label arg_value */
17105#line 3004 "parse.y"
17106 {
17107 p->ctxt.in_argdef = 1;
17108 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17109 /*% ripper: [$:$, $:value] %*/
17110 }
17111#line 17112 "parse.c"
17112 break;
17113
17114 case 721: /* f_kw_arg_value: f_label */
17115#line 3010 "parse.y"
17116 {
17117 p->ctxt.in_argdef = 1;
17118 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17119 /*% ripper: [$:$, 0] %*/
17120 }
17121#line 17122 "parse.c"
17122 break;
17123
17124 case 722: /* f_kwarg_arg_value: f_kw_arg_value */
17125#line 3019 "parse.y"
17126 {
17127 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17128 /*% ripper: rb_ary_new3(1, $:1) %*/
17129 }
17130#line 17131 "parse.c"
17131 break;
17132
17133 case 723: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17134#line 3024 "parse.y"
17135 {
17136 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17137 /*% ripper: rb_ary_push($:1, $:3) %*/
17138 }
17139#line 17140 "parse.c"
17140 break;
17141
17142 case 724: /* args_tail_basic_arg_value: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
17143#line 2927 "parse.y"
17144 {
17145 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17146 /*% ripper: [$:1, $:3, $:4] %*/
17147 }
17148#line 17149 "parse.c"
17149 break;
17150
17151 case 725: /* args_tail_basic_arg_value: f_kwarg_arg_value opt_f_block_arg */
17152#line 2932 "parse.y"
17153 {
17154 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17155 /*% ripper: [$:1, Qnil, $:2] %*/
17156 }
17157#line 17158 "parse.c"
17158 break;
17159
17160 case 726: /* args_tail_basic_arg_value: f_any_kwrest opt_f_block_arg */
17161#line 2937 "parse.y"
17162 {
17163 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17164 /*% ripper: [Qnil, $:1, $:2] %*/
17165 }
17166#line 17167 "parse.c"
17167 break;
17168
17169 case 727: /* args_tail_basic_arg_value: f_block_arg */
17170#line 2942 "parse.y"
17171 {
17172 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17173 /*% ripper: [Qnil, Qnil, $:1] %*/
17174 }
17175#line 17176 "parse.c"
17176 break;
17177
17178 case 729: /* args_tail: args_forward */
17179#line 6299 "parse.y"
17180 {
17181 ID fwd = (yyvsp[0].id);
17182 if (lambda_beginning_p() ||
17183 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
17184 yyerror0("unexpected ... in lambda argument");
17185 fwd = 0;
17186 }
17187 else {
17188 add_forwarding_args(p);
17189 }
17190 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
17191 (yyval.node_args)->nd_ainfo.forwarding = 1;
17192 /*% ripper: [Qnil, $:1, Qnil] %*/
17193 }
17194#line 17195 "parse.c"
17195 break;
17196
17197 case 730: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17198#line 2982 "parse.y"
17199 {
17200 p->ctxt.in_argdef = 1;
17201 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17202 /*% ripper: [$:$, $:3] %*/
17203 }
17204#line 17205 "parse.c"
17205 break;
17206
17207 case 731: /* f_opt_arg_arg_value: f_opt_arg_value */
17208#line 2991 "parse.y"
17209 {
17210 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17211 /*% ripper: rb_ary_new3(1, $:1) %*/
17212 }
17213#line 17214 "parse.c"
17214 break;
17215
17216 case 732: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17217#line 2996 "parse.y"
17218 {
17219 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17220 /*% ripper: rb_ary_push($:1, $:3) %*/
17221 }
17222#line 17223 "parse.c"
17223 break;
17224
17225 case 733: /* opt_args_tail_args_tail: ',' args_tail */
17226#line 3091 "parse.y"
17227 {
17228 (yyval.node_args) = (yyvsp[0].node_args);
17229 /*% ripper: $:2 %*/
17230 }
17231#line 17232 "parse.c"
17232 break;
17233
17234 case 734: /* opt_args_tail_args_tail: %empty */
17235#line 3096 "parse.y"
17236 {
17237 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17238 /*% ripper: [Qnil, Qnil, Qnil] %*/
17239 }
17240#line 17241 "parse.c"
17241 break;
17242
17243 case 735: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17244#line 6316 "parse.y"
17245 {
17246 (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));
17247 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
17248 }
17249#line 17250 "parse.c"
17250 break;
17251
17252 case 736: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17253#line 6321 "parse.y"
17254 {
17255 (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));
17256 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
17257 }
17258#line 17259 "parse.c"
17259 break;
17260
17261 case 737: /* f_args: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail */
17262#line 6326 "parse.y"
17263 {
17264 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17265 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
17266 }
17267#line 17268 "parse.c"
17268 break;
17269
17270 case 738: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17271#line 6331 "parse.y"
17272 {
17273 (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));
17274 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
17275 }
17276#line 17277 "parse.c"
17277 break;
17278
17279 case 739: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
17280#line 6336 "parse.y"
17281 {
17282 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17283 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
17284 }
17285#line 17286 "parse.c"
17286 break;
17287
17288 case 740: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17289#line 6341 "parse.y"
17290 {
17291 (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));
17292 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
17293 }
17294#line 17295 "parse.c"
17295 break;
17296
17297 case 741: /* f_args: f_arg opt_args_tail_args_tail */
17298#line 6346 "parse.y"
17299 {
17300 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17301 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
17302 }
17303#line 17304 "parse.c"
17304 break;
17305
17306 case 742: /* f_args: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17307#line 6351 "parse.y"
17308 {
17309 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17310 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
17311 }
17312#line 17313 "parse.c"
17313 break;
17314
17315 case 743: /* f_args: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17316#line 6356 "parse.y"
17317 {
17318 (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));
17319 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
17320 }
17321#line 17322 "parse.c"
17322 break;
17323
17324 case 744: /* f_args: f_opt_arg_arg_value opt_args_tail_args_tail */
17325#line 6361 "parse.y"
17326 {
17327 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17328 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
17329 }
17330#line 17331 "parse.c"
17331 break;
17332
17333 case 745: /* f_args: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17334#line 6366 "parse.y"
17335 {
17336 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17337 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
17338 }
17339#line 17340 "parse.c"
17340 break;
17341
17342 case 746: /* f_args: f_rest_arg opt_args_tail_args_tail */
17343#line 6371 "parse.y"
17344 {
17345 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17346 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
17347 }
17348#line 17349 "parse.c"
17349 break;
17350
17351 case 747: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
17352#line 6376 "parse.y"
17353 {
17354 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17355 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
17356 }
17357#line 17358 "parse.c"
17358 break;
17359
17360 case 748: /* f_args: args_tail */
17361#line 6381 "parse.y"
17362 {
17363 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17364 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
17365 }
17366#line 17367 "parse.c"
17367 break;
17368
17369 case 749: /* f_args: %empty */
17370#line 6386 "parse.y"
17371 {
17372 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17373 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
17374 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17375 }
17376#line 17377 "parse.c"
17377 break;
17378
17379 case 750: /* args_forward: "(..." */
17380#line 6394 "parse.y"
17381 {
17382 (yyval.id) = idFWD_KWREST;
17383 /*% ripper: args_forward! %*/
17384 }
17385#line 17386 "parse.c"
17386 break;
17387
17388 case 751: /* f_bad_arg: "constant" */
17389#line 6401 "parse.y"
17390 {
17391 static const char mesg[] = "formal argument cannot be a constant";
17392 /*%%%*/
17393 yyerror1(&(yylsp[0]), mesg);
17394 /*% %*/
17395 (yyval.id) = 0;
17396 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17397 }
17398#line 17399 "parse.c"
17399 break;
17400
17401 case 752: /* f_bad_arg: "instance variable" */
17402#line 6410 "parse.y"
17403 {
17404 static const char mesg[] = "formal argument cannot be an instance variable";
17405 /*%%%*/
17406 yyerror1(&(yylsp[0]), mesg);
17407 /*% %*/
17408 (yyval.id) = 0;
17409 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17410 }
17411#line 17412 "parse.c"
17412 break;
17413
17414 case 753: /* f_bad_arg: "global variable" */
17415#line 6419 "parse.y"
17416 {
17417 static const char mesg[] = "formal argument cannot be a global variable";
17418 /*%%%*/
17419 yyerror1(&(yylsp[0]), mesg);
17420 /*% %*/
17421 (yyval.id) = 0;
17422 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17423 }
17424#line 17425 "parse.c"
17425 break;
17426
17427 case 754: /* f_bad_arg: "class variable" */
17428#line 6428 "parse.y"
17429 {
17430 static const char mesg[] = "formal argument cannot be a class variable";
17431 /*%%%*/
17432 yyerror1(&(yylsp[0]), mesg);
17433 /*% %*/
17434 (yyval.id) = 0;
17435 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17436 }
17437#line 17438 "parse.c"
17438 break;
17439
17440 case 756: /* f_norm_arg: "local variable or method" */
17441#line 6440 "parse.y"
17442 {
17443 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17444 if (e) {
17445 /*% ripper[error]: param_error!(?e, $:1) %*/
17446 }
17447 p->max_numparam = ORDINAL_PARAM;
17448 }
17449#line 17450 "parse.c"
17450 break;
17451
17452 case 757: /* f_arg_asgn: f_norm_arg */
17453#line 6450 "parse.y"
17454 {
17455 arg_var(p, (yyvsp[0].id));
17456 (yyval.id) = (yyvsp[0].id);
17457 }
17458#line 17459 "parse.c"
17459 break;
17460
17461 case 758: /* f_arg_item: f_arg_asgn */
17462#line 6457 "parse.y"
17463 {
17464 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17465 /*% ripper: $:1 %*/
17466 }
17467#line 17468 "parse.c"
17468 break;
17469
17470 case 759: /* f_arg_item: "(" f_margs rparen */
17471#line 6462 "parse.y"
17472 {
17473 ID tid = internal_id(p);
17474 YYLTYPE loc;
17475 loc.beg_pos = (yylsp[-1]).beg_pos;
17476 loc.end_pos = (yylsp[-1]).beg_pos;
17477 arg_var(p, tid);
17478 if (dyna_in_block(p)) {
17479 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17480 }
17481 else {
17482 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17483 }
17484 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17485 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17486 /*% ripper: mlhs_paren!($:2) %*/
17487 }
17488#line 17489 "parse.c"
17489 break;
17490
17491 case 761: /* f_arg: f_arg ',' f_arg_item */
17492#line 6483 "parse.y"
17493 {
17494 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17495 (yyval.node_args_aux)->nd_plen++;
17496 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17497 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17498 /*% ripper: rb_ary_push($:1, $:3) %*/
17499 }
17500#line 17501 "parse.c"
17501 break;
17502
17503 case 762: /* f_label: "label" */
17504#line 6494 "parse.y"
17505 {
17506 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17507 if (e) {
17508 (yyval.id) = 0;
17509 /*% ripper[error]: param_error!(?e, $:1) %*/
17510 }
17511 /*
17512 * Workaround for Prism::ParseTest#test_filepath for
17513 * "unparser/corpus/literal/def.txt"
17514 *
17515 * See the discussion on https://github.com/ruby/ruby/pull/9923
17516 */
17517 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17518 /*% ripper: $:1 %*/
17519 p->max_numparam = ORDINAL_PARAM;
17520 p->ctxt.in_argdef = 0;
17521 }
17522#line 17523 "parse.c"
17523 break;
17524
17525 case 765: /* f_no_kwarg: p_kwnorest */
17526#line 6518 "parse.y"
17527 {
17528 /*% ripper: nokw_param!(Qnil) %*/
17529 }
17530#line 17531 "parse.c"
17531 break;
17532
17533 case 766: /* f_kwrest: kwrest_mark "local variable or method" */
17534#line 6524 "parse.y"
17535 {
17536 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17537 (yyval.id) = (yyvsp[0].id);
17538 /*% ripper: kwrest_param!($:2) %*/
17539 }
17540#line 17541 "parse.c"
17541 break;
17542
17543 case 767: /* f_kwrest: kwrest_mark */
17544#line 6530 "parse.y"
17545 {
17546 arg_var(p, idFWD_KWREST);
17547 (yyval.id) = idFWD_KWREST;
17548 /*% ripper: kwrest_param!(Qnil) %*/
17549 }
17550#line 17551 "parse.c"
17551 break;
17552
17553 case 770: /* f_rest_arg: restarg_mark "local variable or method" */
17554#line 6542 "parse.y"
17555 {
17556 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17557 (yyval.id) = (yyvsp[0].id);
17558 /*% ripper: rest_param!($:2) %*/
17559 }
17560#line 17561 "parse.c"
17561 break;
17562
17563 case 771: /* f_rest_arg: restarg_mark */
17564#line 6548 "parse.y"
17565 {
17566 arg_var(p, idFWD_REST);
17567 (yyval.id) = idFWD_REST;
17568 /*% ripper: rest_param!(Qnil) %*/
17569 }
17570#line 17571 "parse.c"
17571 break;
17572
17573 case 774: /* f_block_arg: blkarg_mark "local variable or method" */
17574#line 6560 "parse.y"
17575 {
17576 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17577 (yyval.id) = (yyvsp[0].id);
17578 /*% ripper: blockarg!($:2) %*/
17579 }
17580#line 17581 "parse.c"
17581 break;
17582
17583 case 775: /* f_block_arg: blkarg_mark */
17584#line 6566 "parse.y"
17585 {
17586 arg_var(p, idFWD_BLOCK);
17587 (yyval.id) = idFWD_BLOCK;
17588 /*% ripper: blockarg!(Qnil) %*/
17589 }
17590#line 17591 "parse.c"
17591 break;
17592
17593 case 776: /* opt_f_block_arg: ',' f_block_arg */
17594#line 6574 "parse.y"
17595 {
17596 (yyval.id) = (yyvsp[0].id);
17597 /*% ripper: $:2 %*/
17598 }
17599#line 17600 "parse.c"
17600 break;
17601
17602 case 778: /* value_expr_singleton_expr: singleton_expr */
17603#line 3145 "parse.y"
17604 {
17605 value_expr(p, (yyvsp[0].node));
17606 (yyval.node) = (yyvsp[0].node);
17607 }
17608#line 17609 "parse.c"
17609 break;
17610
17611 case 779: /* singleton: value_expr_singleton_expr */
17612#line 6583 "parse.y"
17613 {
17614 NODE *expr = last_expr_node((yyvsp[0].node));
17615 switch (nd_type(expr)) {
17616 case NODE_STR:
17617 case NODE_DSTR:
17618 case NODE_XSTR:
17619 case NODE_DXSTR:
17620 case NODE_REGX:
17621 case NODE_DREGX:
17622 case NODE_SYM:
17623 case NODE_LINE:
17624 case NODE_FILE:
17625 case NODE_ENCODING:
17626 case NODE_INTEGER:
17627 case NODE_FLOAT:
17628 case NODE_RATIONAL:
17629 case NODE_IMAGINARY:
17630 case NODE_DSYM:
17631 case NODE_LIST:
17632 case NODE_ZLIST:
17633 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17634 break;
17635 default:
17636 break;
17637 }
17638 (yyval.node) = (yyvsp[0].node);
17639 }
17640#line 17641 "parse.c"
17641 break;
17642
17643 case 781: /* $@40: %empty */
17644#line 6614 "parse.y"
17645 {
17646 SET_LEX_STATE(EXPR_BEG);
17647 p->ctxt.in_argdef = 0;
17648 }
17649#line 17650 "parse.c"
17650 break;
17651
17652 case 782: /* singleton_expr: '(' $@40 expr rparen */
17653#line 6619 "parse.y"
17654 {
17655 p->ctxt.in_argdef = 1;
17656 (yyval.node) = (yyvsp[-1].node);
17657 /*% ripper: paren!($:3) %*/
17658 }
17659#line 17660 "parse.c"
17660 break;
17661
17662 case 784: /* assoc_list: assocs trailer */
17663#line 6628 "parse.y"
17664 {
17665 (yyval.node) = (yyvsp[-1].node);
17666 /*% ripper: assoclist_from_args!($:1) %*/
17667 }
17668#line 17669 "parse.c"
17669 break;
17670
17671 case 786: /* assocs: assocs ',' assoc */
17672#line 6637 "parse.y"
17673 {
17674 NODE *assocs = (yyvsp[-2].node);
17675 NODE *tail = (yyvsp[0].node);
17676 if (!assocs) {
17677 assocs = tail;
17678 }
17679 else if (tail) {
17680 if (RNODE_LIST(assocs)->nd_head) {
17681 NODE *n = RNODE_LIST(tail)->nd_next;
17682 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17683 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17684 /* DSTAR */
17685 tail = RNODE_HASH(n)->nd_head;
17686 }
17687 }
17688 if (tail) {
17689 assocs = list_concat(assocs, tail);
17690 }
17691 }
17692 (yyval.node) = assocs;
17693 /*% ripper: rb_ary_push($:1, $:3) %*/
17694 }
17695#line 17696 "parse.c"
17696 break;
17697
17698 case 787: /* assoc: arg_value "=>" arg_value */
17699#line 6662 "parse.y"
17700 {
17701 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17702 /*% ripper: assoc_new!($:1, $:3) %*/
17703 }
17704#line 17705 "parse.c"
17705 break;
17706
17707 case 788: /* assoc: "label" arg_value */
17708#line 6667 "parse.y"
17709 {
17710 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17711 /*% ripper: assoc_new!($:1, $:2) %*/
17712 }
17713#line 17714 "parse.c"
17714 break;
17715
17716 case 789: /* assoc: "label" */
17717#line 6672 "parse.y"
17718 {
17719 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17720 if (!val) val = NEW_ERROR(&(yyloc));
17721 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17722 /*% ripper: assoc_new!($:1, Qnil) %*/
17723 }
17724#line 17725 "parse.c"
17725 break;
17726
17727 case 790: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17728#line 6679 "parse.y"
17729 {
17730 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17731 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17732 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17733 }
17734#line 17735 "parse.c"
17735 break;
17736
17737 case 791: /* assoc: "**arg" arg_value */
17738#line 6685 "parse.y"
17739 {
17740 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17741 /*% ripper: assoc_splat!($:2) %*/
17742 }
17743#line 17744 "parse.c"
17744 break;
17745
17746 case 792: /* assoc: "**arg" */
17747#line 6690 "parse.y"
17748 {
17749 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17750 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17751 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17752 /*% ripper: assoc_splat!(Qnil) %*/
17753 }
17754#line 17755 "parse.c"
17755 break;
17756
17757 case 811: /* term: ';' */
17758#line 6737 "parse.y"
17759 {
17760 yyerrok;
17761 token_flush(p);
17762 if (p->ctxt.in_defined) {
17763 p->ctxt.has_trailing_semicolon = 1;
17764 }
17765 }
17766#line 17767 "parse.c"
17767 break;
17768
17769 case 812: /* term: '\n' */
17770#line 6745 "parse.y"
17771 {
17772 (yyloc).end_pos = (yyloc).beg_pos;
17773 token_flush(p);
17774 }
17775#line 17776 "parse.c"
17776 break;
17777
17778 case 814: /* terms: terms ';' */
17779#line 6752 "parse.y"
17780 {yyerrok;}
17781#line 17782 "parse.c"
17782 break;
17783
17784 case 815: /* none: %empty */
17785#line 6756 "parse.y"
17786 {
17787 (yyval.node) = 0;
17788 /*% ripper: Qnil %*/
17789 }
17790#line 17791 "parse.c"
17791 break;
17792
17793
17794#line 17795 "parse.c"
17795
17796 default: break;
17797 }
17798 /* User semantic actions sometimes alter yychar, and that requires
17799 that yytoken be updated with the new translation. We take the
17800 approach of translating immediately before every use of yytoken.
17801 One alternative is translating here after every semantic action,
17802 but that translation would be missed if the semantic action invokes
17803 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17804 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17805 incorrect destructor might then be invoked immediately. In the
17806 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17807 to an incorrect destructor call or verbose syntax error message
17808 before the lookahead is translated. */
17809 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17810
17811 YYPOPSTACK (yylen);
17812 /* %after-reduce function. */
17813#line 2666 "parse.y"
17814 {after_reduce(yylen, p);}
17815#line 17816 "parse.c"
17816
17817 yylen = 0;
17818
17819 *++yyvsp = yyval;
17820 *++yylsp = yyloc;
17821
17822 /* Now 'shift' the result of the reduction. Determine what state
17823 that goes to, based on the state we popped back to and the rule
17824 number reduced by. */
17825 {
17826 const int yylhs = yyr1[yyn] - YYNTOKENS;
17827 const int yyi = yypgoto[yylhs] + *yyssp;
17828 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17829 ? yytable[yyi]
17830 : yydefgoto[yylhs]);
17831 }
17832
17833 goto yynewstate;
17834
17835
17836/*--------------------------------------.
17837| yyerrlab -- here on detecting error. |
17838`--------------------------------------*/
17839yyerrlab:
17840 /* Make sure we have latest lookahead translation. See comments at
17841 user semantic actions for why this is necessary. */
17842 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17843 /* If not already recovering from an error, report this error. */
17844 if (!yyerrstatus)
17845 {
17846 ++yynerrs;
17847 {
17848 yypcontext_t yyctx
17849 = {yyssp, yytoken, &yylloc};
17850 char const *yymsgp = YY_("syntax error");
17851 int yysyntax_error_status;
17852 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17853 if (yysyntax_error_status == 0)
17854 yymsgp = yymsg;
17855 else if (yysyntax_error_status == -1)
17856 {
17857 if (yymsg != yymsgbuf)
17858 YYSTACK_FREE (yymsg);
17859 yymsg = YY_CAST (char *,
17860 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17861 if (yymsg)
17862 {
17863 yysyntax_error_status
17864 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17865 yymsgp = yymsg;
17866 }
17867 else
17868 {
17869 yymsg = yymsgbuf;
17870 yymsg_alloc = sizeof yymsgbuf;
17871 yysyntax_error_status = YYENOMEM;
17872 }
17873 }
17874 yyerror (&yylloc, p, yymsgp);
17875 if (yysyntax_error_status == YYENOMEM)
17876 YYNOMEM;
17877 }
17878 }
17879
17880 yyerror_range[1] = yylloc;
17881 if (yyerrstatus == 3)
17882 {
17883 /* If just tried and failed to reuse lookahead token after an
17884 error, discard it. */
17885
17886 if (yychar <= END_OF_INPUT)
17887 {
17888 /* Return failure if at end of input. */
17889 if (yychar == END_OF_INPUT)
17890 YYABORT;
17891 }
17892 else
17893 {
17894 yydestruct ("Error: discarding",
17895 yytoken, &yylval, &yylloc, p);
17896 yychar = YYEMPTY;
17897 }
17898 }
17899
17900 /* Else will try to reuse lookahead token after shifting the error
17901 token. */
17902 goto yyerrlab1;
17903
17904
17905/*---------------------------------------------------.
17906| yyerrorlab -- error raised explicitly by YYERROR. |
17907`---------------------------------------------------*/
17908yyerrorlab:
17909 /* Pacify compilers when the user code never invokes YYERROR and the
17910 label yyerrorlab therefore never appears in user code. */
17911 if (0)
17912 YYERROR;
17913 ++yynerrs;
17914
17915 /* Do not reclaim the symbols of the rule whose action triggered
17916 this YYERROR. */
17917 YYPOPSTACK (yylen);
17918 /* %after-pop-stack function. */
17919#line 2668 "parse.y"
17920 {after_pop_stack(yylen, p);}
17921#line 17922 "parse.c"
17922
17923 yylen = 0;
17924 YY_STACK_PRINT (yyss, yyssp, p);
17925 yystate = *yyssp;
17926 goto yyerrlab1;
17927
17928
17929/*-------------------------------------------------------------.
17930| yyerrlab1 -- common code for both syntax error and YYERROR. |
17931`-------------------------------------------------------------*/
17932yyerrlab1:
17933 yyerrstatus = 3; /* Each real token shifted decrements this. */
17934
17935 /* Pop stack until we find a state that shifts the error token. */
17936 for (;;)
17937 {
17938 yyn = yypact[yystate];
17939 if (!yypact_value_is_default (yyn))
17940 {
17941 yyn += YYSYMBOL_YYerror;
17942 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
17943 {
17944 yyn = yytable[yyn];
17945 if (0 < yyn)
17946 break;
17947 }
17948 }
17949
17950 /* Pop the current state because it cannot handle the error token. */
17951 if (yyssp == yyss)
17952 YYABORT;
17953
17954 yyerror_range[1] = *yylsp;
17955 yydestruct ("Error: popping",
17956 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
17957 YYPOPSTACK (1);
17958 /* %after-pop-stack function. */
17959#line 2668 "parse.y"
17960 {after_pop_stack(1, p);}
17961#line 17962 "parse.c"
17962
17963 yystate = *yyssp;
17964 YY_STACK_PRINT (yyss, yyssp, p);
17965 }
17966
17967 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17968 *++yyvsp = yylval;
17969 YY_IGNORE_MAYBE_UNINITIALIZED_END
17970
17971 yyerror_range[2] = yylloc;
17972 ++yylsp;
17973 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
17974
17975 /* Shift the error token. */
17976 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
17977 /* %after-shift-error-token code. */
17978#line 2667 "parse.y"
17979 {after_shift_error_token(p);}
17980#line 17981 "parse.c"
17981
17982
17983 yystate = yyn;
17984 goto yynewstate;
17985
17986
17987/*-------------------------------------.
17988| yyacceptlab -- YYACCEPT comes here. |
17989`-------------------------------------*/
17990yyacceptlab:
17991 yyresult = 0;
17992 goto yyreturnlab;
17993
17994
17995/*-----------------------------------.
17996| yyabortlab -- YYABORT comes here. |
17997`-----------------------------------*/
17998yyabortlab:
17999 yyresult = 1;
18000 goto yyreturnlab;
18001
18002
18003/*-----------------------------------------------------------.
18004| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18005`-----------------------------------------------------------*/
18006yyexhaustedlab:
18007 yyerror (&yylloc, p, YY_("memory exhausted"));
18008 yyresult = 2;
18009 goto yyreturnlab;
18010
18011
18012/*----------------------------------------------------------.
18013| yyreturnlab -- parsing is finished, clean up and return. |
18014`----------------------------------------------------------*/
18015yyreturnlab:
18016 if (yychar != YYEMPTY)
18017 {
18018 /* Make sure we have latest lookahead translation. See comments at
18019 user semantic actions for why this is necessary. */
18020 yytoken = YYTRANSLATE (yychar);
18021 yydestruct ("Cleanup: discarding lookahead",
18022 yytoken, &yylval, &yylloc, p);
18023 }
18024 /* Do not reclaim the symbols of the rule whose action triggered
18025 this YYABORT or YYACCEPT. */
18026 YYPOPSTACK (yylen);
18027 YY_STACK_PRINT (yyss, yyssp, p);
18028 while (yyssp != yyss)
18029 {
18030 yydestruct ("Cleanup: popping",
18031 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18032 YYPOPSTACK (1);
18033 }
18034#ifndef yyoverflow
18035 if (yyss != yyssa)
18036 YYSTACK_FREE (yyss);
18037#endif
18038 if (yymsg != yymsgbuf)
18039 YYSTACK_FREE (yymsg);
18040 return yyresult;
18041}
18042
18043#line 6761 "parse.y"
18044
18045# undef p
18046# undef yylex
18047# undef yylval
18048# define yylval (*p->lval)
18049
18050static int regx_options(struct parser_params*);
18051static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18052static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18053static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18054static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18055
18056#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18057
18058# define set_yylval_node(x) { \
18059 YYLTYPE _cur_loc; \
18060 rb_parser_set_location(p, &_cur_loc); \
18061 yylval.node = (x); \
18062 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18063}
18064# define set_yylval_str(x) \
18065do { \
18066 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18067 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18068} while(0)
18069# define set_yylval_num(x) { \
18070 yylval.num = (x); \
18071 set_parser_s_value(x); \
18072}
18073# define set_yylval_id(x) (yylval.id = (x))
18074# define set_yylval_name(x) { \
18075 (yylval.id = (x)); \
18076 set_parser_s_value(ID2SYM(x)); \
18077}
18078# define yylval_id() (yylval.id)
18079
18080#define set_yylval_noname() set_yylval_id(keyword_nil)
18081#define has_delayed_token(p) (p->delayed.token != NULL)
18082
18083#ifndef RIPPER
18084#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18085#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18086
18087static bool
18088parser_has_token(struct parser_params *p)
18089{
18090 const char *const pcur = p->lex.pcur;
18091 const char *const ptok = p->lex.ptok;
18092 if (p->keep_tokens && (pcur < ptok)) {
18093 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18094 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18095 }
18096 return pcur > ptok;
18097}
18098
18099static const char *
18100escaped_char(int c)
18101{
18102 switch (c) {
18103 case '"': return "\\\"";
18104 case '\\': return "\\\\";
18105 case '\0': return "\\0";
18106 case '\n': return "\\n";
18107 case '\r': return "\\r";
18108 case '\t': return "\\t";
18109 case '\f': return "\\f";
18110 case '\013': return "\\v";
18111 case '\010': return "\\b";
18112 case '\007': return "\\a";
18113 case '\033': return "\\e";
18114 case '\x7f': return "\\c?";
18115 }
18116 return NULL;
18117}
18118
18119static rb_parser_string_t *
18120rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18121{
18122 rb_encoding *enc = p->enc;
18123 const char *ptr = str->ptr;
18124 const char *pend = ptr + str->len;
18125 const char *prev = ptr;
18126 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18127 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18128
18129 while (ptr < pend) {
18130 unsigned int c;
18131 const char *cc;
18132 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18133 if (!MBCLEN_CHARFOUND_P(n)) {
18134 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18135 n = rb_enc_mbminlen(enc);
18136 if (pend < ptr + n)
18137 n = (int)(pend - ptr);
18138 while (n--) {
18139 c = *ptr & 0xf0 >> 4;
18140 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18141 c = *ptr & 0x0f;
18142 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18143 parser_str_cat(result, charbuf, 4);
18144 prev = ++ptr;
18145 }
18146 continue;
18147 }
18148 n = MBCLEN_CHARFOUND_LEN(n);
18149 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18150 ptr += n;
18151 cc = escaped_char(c);
18152 if (cc) {
18153 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18154 parser_str_cat_cstr(result, cc);
18155 prev = ptr;
18156 }
18157 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18158 }
18159 else {
18160 if (ptr - n > prev) {
18161 parser_str_cat(result, prev, ptr - n - prev);
18162 prev = ptr - n;
18163 }
18164 parser_str_cat(result, prev, ptr - prev);
18165 prev = ptr;
18166 }
18167 }
18168 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18169
18170 return result;
18171}
18172
18173static void
18174parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18175{
18176 rb_parser_ast_token_t *token = xcalloc(1, sizeof(rb_parser_ast_token_t));
18177 token->id = p->token_id;
18178 token->type_name = parser_token2char(p, t);
18179 token->str = str;
18180 token->loc.beg_pos = p->yylloc->beg_pos;
18181 token->loc.end_pos = p->yylloc->end_pos;
18182 rb_parser_ary_push_ast_token(p, p->tokens, token);
18183 p->token_id++;
18184
18185 if (p->debug) {
18186 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18187 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18188 line, token->id, token->type_name, str_escaped->ptr,
18189 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18190 token->loc.end_pos.lineno, token->loc.end_pos.column);
18191 rb_parser_string_free(p, str_escaped);
18192 }
18193}
18194
18195static void
18196parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18197{
18198 debug_token_line(p, "parser_dispatch_scan_event", line);
18199
18200 if (!parser_has_token(p)) return;
18201
18202 RUBY_SET_YYLLOC(*p->yylloc);
18203
18204 if (p->keep_tokens) {
18205 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18206 parser_append_tokens(p, str, t, line);
18207 }
18208
18209 token_flush(p);
18210}
18211
18212#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18213static void
18214parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18215{
18216 debug_token_line(p, "parser_dispatch_delayed_token", line);
18217
18218 if (!has_delayed_token(p)) return;
18219
18220 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18221
18222 if (p->keep_tokens) {
18223 /* p->delayed.token is freed by rb_parser_tokens_free */
18224 parser_append_tokens(p, p->delayed.token, t, line);
18225 }
18226 else {
18227 rb_parser_string_free(p, p->delayed.token);
18228 }
18229
18230 p->delayed.token = NULL;
18231}
18232#else
18233#define literal_flush(p, ptr) ((void)(ptr))
18234
18235static int
18236ripper_has_scan_event(struct parser_params *p)
18237{
18238 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18239 return p->lex.pcur > p->lex.ptok;
18240}
18241
18242static VALUE
18243ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18244{
18245 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18246 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18247 RUBY_SET_YYLLOC(*p->yylloc);
18248 token_flush(p);
18249 return rval;
18250}
18251
18252static void
18253ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18254{
18255 if (!ripper_has_scan_event(p)) return;
18256
18257 set_parser_s_value(ripper_scan_event_val(p, t));
18258}
18259#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18260
18261static void
18262ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18263{
18264 /* save and adjust the location to delayed token for callbacks */
18265 int saved_line = p->ruby_sourceline;
18266 const char *saved_tokp = p->lex.ptok;
18267 VALUE s_value, str;
18268
18269 if (!has_delayed_token(p)) return;
18270 p->ruby_sourceline = p->delayed.beg_line;
18271 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18272 str = rb_str_new_mutable_parser_string(p->delayed.token);
18273 rb_parser_string_free(p, p->delayed.token);
18274 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18275 set_parser_s_value(s_value);
18276 p->delayed.token = NULL;
18277 p->ruby_sourceline = saved_line;
18278 p->lex.ptok = saved_tokp;
18279}
18280#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18281#endif /* RIPPER */
18282
18283static inline int
18284is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18285{
18286 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18287}
18288
18289static inline bool
18290peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18291{
18292 const char *ptr = p->lex.pcur + at;
18293 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18294 if (memcmp(ptr, str, len)) return false;
18295 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18296 switch (ptr[len]) {
18297 case '!': case '?': return false;
18298 }
18299 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18300}
18301
18302static inline int
18303parser_is_identchar(struct parser_params *p)
18304{
18305 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18306}
18307
18308static inline int
18309parser_isascii(struct parser_params *p)
18310{
18311 return ISASCII(*(p->lex.pcur-1));
18312}
18313
18314static void
18315token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18316{
18317 int column = 1, nonspc = 0, i;
18318 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18319 if (*ptr == '\t') {
18320 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18321 }
18322 column++;
18323 if (*ptr != ' ' && *ptr != '\t') {
18324 nonspc = 1;
18325 }
18326 }
18327
18328 ptinfo->beg = loc->beg_pos;
18329 ptinfo->indent = column;
18330 ptinfo->nonspc = nonspc;
18331}
18332
18333static void
18334token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18335{
18336 token_info *ptinfo;
18337
18338 if (!p->token_info_enabled) return;
18339 ptinfo = ALLOC(token_info);
18340 ptinfo->token = token;
18341 ptinfo->next = p->token_info;
18342 token_info_setup(ptinfo, p->lex.pbeg, loc);
18343
18344 p->token_info = ptinfo;
18345}
18346
18347static void
18348token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18349{
18350 token_info *ptinfo_beg = p->token_info;
18351
18352 if (!ptinfo_beg) return;
18353
18354 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18355 token_info_warn(p, token, ptinfo_beg, 1, loc);
18356
18357 p->token_info = ptinfo_beg->next;
18358 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18359}
18360
18361static void
18362token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18363{
18364 token_info *ptinfo_beg = p->token_info;
18365
18366 if (!ptinfo_beg) return;
18367 p->token_info = ptinfo_beg->next;
18368
18369 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18370 ptinfo_beg->beg.column != beg_pos.column ||
18371 strcmp(ptinfo_beg->token, token)) {
18372 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18373 beg_pos.lineno, beg_pos.column, token,
18374 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18375 ptinfo_beg->token);
18376 }
18377
18378 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18379}
18380
18381static void
18382token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18383{
18384 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18385 if (!p->token_info_enabled) return;
18386 if (!ptinfo_beg) return;
18387 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18388 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18389 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18390 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18391 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18392 rb_warn3L(ptinfo_end->beg.lineno,
18393 "mismatched indentations at '%s' with '%s' at %d",
18394 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18395}
18396
18397static int
18398parser_precise_mbclen(struct parser_params *p, const char *ptr)
18399{
18400 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18401 if (!MBCLEN_CHARFOUND_P(len)) {
18402 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18403 return -1;
18404 }
18405 return len;
18406}
18407
18408#ifndef RIPPER
18409static inline void
18410parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18411{
18412 rb_parser_string_t *str;
18413 int lineno = p->ruby_sourceline;
18414 if (!yylloc) {
18415 return;
18416 }
18417 else if (yylloc->beg_pos.lineno == lineno) {
18418 str = p->lex.lastline;
18419 }
18420 else {
18421 return;
18422 }
18423 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18424}
18425
18426static int
18427parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18428{
18429#if 0
18430 YYLTYPE current;
18431
18432 if (!yylloc) {
18433 yylloc = RUBY_SET_YYLLOC(current);
18434 }
18435 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18436 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18437 yylloc = 0;
18438 }
18439#endif
18440 parser_compile_error(p, yylloc, "%s", msg);
18441 parser_show_error_line(p, yylloc);
18442 return 0;
18443}
18444
18445static int
18446parser_yyerror0(struct parser_params *p, const char *msg)
18447{
18448 YYLTYPE current;
18449 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18450}
18451
18452void
18453ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18454{
18455 VALUE mesg;
18456 const int max_line_margin = 30;
18457 const char *ptr, *ptr_end, *pt, *pb;
18458 const char *pre = "", *post = "", *pend;
18459 const char *code = "", *caret = "";
18460 const char *lim;
18461 const char *const pbeg = PARSER_STRING_PTR(str);
18462 char *buf;
18463 long len;
18464 int i;
18465
18466 if (!yylloc) return;
18467 pend = rb_parser_string_end(str);
18468 if (pend > pbeg && pend[-1] == '\n') {
18469 if (--pend > pbeg && pend[-1] == '\r') --pend;
18470 }
18471
18472 pt = pend;
18473 if (lineno == yylloc->end_pos.lineno &&
18474 (pend - pbeg) > yylloc->end_pos.column) {
18475 pt = pbeg + yylloc->end_pos.column;
18476 }
18477
18478 ptr = ptr_end = pt;
18479 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18480 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18481
18482 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18483 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18484
18485 len = ptr_end - ptr;
18486 if (len > 4) {
18487 if (ptr > pbeg) {
18488 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18489 if (ptr > pbeg) pre = "...";
18490 }
18491 if (ptr_end < pend) {
18492 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18493 if (ptr_end < pend) post = "...";
18494 }
18495 }
18496 pb = pbeg;
18497 if (lineno == yylloc->beg_pos.lineno) {
18498 pb += yylloc->beg_pos.column;
18499 if (pb > pt) pb = pt;
18500 }
18501 if (pb < ptr) pb = ptr;
18502 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18503 return;
18504 }
18505 if (RTEST(errbuf)) {
18506 mesg = rb_attr_get(errbuf, idMesg);
18507 if (char_at_end(p, mesg, '\n') != '\n')
18508 rb_str_cat_cstr(mesg, "\n");
18509 }
18510 else {
18511 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18512 }
18513 if (!errbuf && rb_stderr_tty_p()) {
18514#define CSI_BEGIN "\033["
18515#define CSI_SGR "m"
18516 rb_str_catf(mesg,
18517 CSI_BEGIN""CSI_SGR"%s" /* pre */
18518 CSI_BEGIN"1"CSI_SGR"%.*s"
18519 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18520 CSI_BEGIN";1"CSI_SGR"%.*s"
18521 CSI_BEGIN""CSI_SGR"%s" /* post */
18522 "\n",
18523 pre,
18524 (int)(pb - ptr), ptr,
18525 (int)(pt - pb), pb,
18526 (int)(ptr_end - pt), pt,
18527 post);
18528 }
18529 else {
18530 char *p2;
18531
18532 len = ptr_end - ptr;
18533 lim = pt < pend ? pt : pend;
18534 i = (int)(lim - ptr);
18535 buf = ALLOCA_N(char, i+2);
18536 code = ptr;
18537 caret = p2 = buf;
18538 if (ptr <= pb) {
18539 while (ptr < pb) {
18540 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18541 }
18542 *p2++ = '^';
18543 ptr++;
18544 }
18545 if (lim > ptr) {
18546 memset(p2, '~', (lim - ptr));
18547 p2 += (lim - ptr);
18548 }
18549 *p2 = '\0';
18550 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18551 pre, (int)len, code, post,
18552 pre, caret);
18553 }
18554 if (!errbuf) rb_write_error_str(mesg);
18555}
18556#else
18557
18558static int
18559parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18560{
18561 const char *pcur = 0, *ptok = 0;
18562 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18563 p->ruby_sourceline == yylloc->end_pos.lineno) {
18564 pcur = p->lex.pcur;
18565 ptok = p->lex.ptok;
18566 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18567 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18568 }
18569 parser_yyerror0(p, msg);
18570 if (pcur) {
18571 p->lex.ptok = ptok;
18572 p->lex.pcur = pcur;
18573 }
18574 return 0;
18575}
18576
18577static int
18578parser_yyerror0(struct parser_params *p, const char *msg)
18579{
18580 dispatch1(parse_error, STR_NEW2(msg));
18581 ripper_error(p);
18582 return 0;
18583}
18584
18585static inline void
18586parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18587{
18588}
18589#endif /* !RIPPER */
18590
18591static int
18592vtable_size(const struct vtable *tbl)
18593{
18594 if (!DVARS_TERMINAL_P(tbl)) {
18595 return tbl->pos;
18596 }
18597 else {
18598 return 0;
18599 }
18600}
18601
18602static struct vtable *
18603vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18604{
18605 struct vtable *tbl = ALLOC(struct vtable);
18606 tbl->pos = 0;
18607 tbl->capa = 8;
18608 tbl->tbl = ALLOC_N(ID, tbl->capa);
18609 tbl->prev = prev;
18610#ifndef RIPPER
18611 if (p->debug) {
18612 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18613 }
18614#endif
18615 return tbl;
18616}
18617#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18618
18619static void
18620vtable_free_gen(struct parser_params *p, int line, const char *name,
18621 struct vtable *tbl)
18622{
18623#ifndef RIPPER
18624 if (p->debug) {
18625 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18626 }
18627#endif
18628 if (!DVARS_TERMINAL_P(tbl)) {
18629 if (tbl->tbl) {
18630 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18631 }
18632 ruby_sized_xfree(tbl, sizeof(*tbl));
18633 }
18634}
18635#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18636
18637static void
18638vtable_add_gen(struct parser_params *p, int line, const char *name,
18639 struct vtable *tbl, ID id)
18640{
18641#ifndef RIPPER
18642 if (p->debug) {
18643 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18644 line, name, (void *)tbl, rb_id2name(id));
18645 }
18646#endif
18647 if (DVARS_TERMINAL_P(tbl)) {
18648 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18649 return;
18650 }
18651 if (tbl->pos == tbl->capa) {
18652 tbl->capa = tbl->capa * 2;
18653 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18654 }
18655 tbl->tbl[tbl->pos++] = id;
18656}
18657#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18658
18659static void
18660vtable_pop_gen(struct parser_params *p, int line, const char *name,
18661 struct vtable *tbl, int n)
18662{
18663 if (p->debug) {
18664 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18665 line, name, (void *)tbl, n);
18666 }
18667 if (tbl->pos < n) {
18668 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18669 return;
18670 }
18671 tbl->pos -= n;
18672}
18673#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18674
18675static int
18676vtable_included(const struct vtable * tbl, ID id)
18677{
18678 int i;
18679
18680 if (!DVARS_TERMINAL_P(tbl)) {
18681 for (i = 0; i < tbl->pos; i++) {
18682 if (tbl->tbl[i] == id) {
18683 return i+1;
18684 }
18685 }
18686 }
18687 return 0;
18688}
18689
18690static void parser_prepare(struct parser_params *p);
18691
18692static int
18693e_option_supplied(struct parser_params *p)
18694{
18695 return strcmp(p->ruby_sourcefile, "-e") == 0;
18696}
18697
18698#ifndef RIPPER
18699static NODE *parser_append_options(struct parser_params *p, NODE *node);
18700
18701static VALUE
18702yycompile0(VALUE arg)
18703{
18704 int n;
18705 NODE *tree;
18706 struct parser_params *p = (struct parser_params *)arg;
18707 int cov = FALSE;
18708
18709 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18710 cov = TRUE;
18711 }
18712
18713 if (p->debug_lines) {
18714 p->ast->body.script_lines = p->debug_lines;
18715 }
18716
18717 parser_prepare(p);
18718#define RUBY_DTRACE_PARSE_HOOK(name) \
18719 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18720 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18721 }
18722 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18723 n = yyparse(p);
18724 RUBY_DTRACE_PARSE_HOOK(END);
18725
18726 p->debug_lines = 0;
18727
18728 xfree(p->lex.strterm);
18729 p->lex.strterm = 0;
18730 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18731 if (n || p->error_p) {
18732 VALUE mesg = p->error_buffer;
18733 if (!mesg) {
18734 mesg = syntax_error_new();
18735 }
18736 if (!p->error_tolerant) {
18737 rb_set_errinfo(mesg);
18738 return FALSE;
18739 }
18740 }
18741 tree = p->eval_tree;
18742 if (!tree) {
18743 tree = NEW_NIL(&NULL_LOC);
18744 }
18745 else {
18746 rb_parser_ary_t *tokens = p->tokens;
18747 NODE *prelude;
18748 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18749 prelude = block_append(p, p->eval_tree_begin, body);
18750 RNODE_SCOPE(tree)->nd_body = prelude;
18751 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18752 p->ast->body.coverage_enabled = cov;
18753 if (p->keep_tokens) {
18754 p->ast->node_buffer->tokens = tokens;
18755 p->tokens = NULL;
18756 }
18757 }
18758 p->ast->body.root = tree;
18759 p->ast->body.line_count = p->line_count;
18760 return TRUE;
18761}
18762
18763static rb_ast_t *
18764yycompile(struct parser_params *p, VALUE fname, int line)
18765{
18766 rb_ast_t *ast;
18767 if (NIL_P(fname)) {
18768 p->ruby_sourcefile_string = Qnil;
18769 p->ruby_sourcefile = "(none)";
18770 }
18771 else {
18772 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18773 p->ruby_sourcefile = StringValueCStr(fname);
18774 }
18775 p->ruby_sourceline = line - 1;
18776
18777 p->lvtbl = NULL;
18778
18779 p->ast = ast = rb_ast_new();
18780 compile_callback(yycompile0, (VALUE)p);
18781 p->ast = 0;
18782
18783 while (p->lvtbl) {
18784 local_pop(p);
18785 }
18786
18787 return ast;
18788}
18789#endif /* !RIPPER */
18790
18791static rb_encoding *
18792must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18793{
18794 rb_encoding *enc = rb_parser_str_get_encoding(s);
18795 if (!rb_enc_asciicompat(enc)) {
18796 rb_raise(rb_eArgError, "invalid source encoding");
18797 }
18798 return enc;
18799}
18800
18801static rb_parser_string_t *
18802lex_getline(struct parser_params *p)
18803{
18804 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18805 if (!line) return 0;
18806 p->line_count++;
18807 string_buffer_append(p, line);
18808 must_be_ascii_compatible(p, line);
18809 return line;
18810}
18811
18812#ifndef RIPPER
18813rb_ast_t*
18814rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18815{
18816 p->lex.gets = gets;
18817 p->lex.input = input;
18818 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18819
18820 return yycompile(p, fname, line);
18821}
18822#endif /* !RIPPER */
18823
18824#define STR_FUNC_ESCAPE 0x01
18825#define STR_FUNC_EXPAND 0x02
18826#define STR_FUNC_REGEXP 0x04
18827#define STR_FUNC_QWORDS 0x08
18828#define STR_FUNC_SYMBOL 0x10
18829#define STR_FUNC_INDENT 0x20
18830#define STR_FUNC_LABEL 0x40
18831#define STR_FUNC_LIST 0x4000
18832#define STR_FUNC_TERM 0x8000
18833
18834enum string_type {
18835 str_label = STR_FUNC_LABEL,
18836 str_squote = (0),
18837 str_dquote = (STR_FUNC_EXPAND),
18838 str_xquote = (STR_FUNC_EXPAND),
18839 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18840 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18841 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18842 str_ssym = (STR_FUNC_SYMBOL),
18843 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18844};
18845
18846static rb_parser_string_t *
18847parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18848{
18849 rb_parser_string_t *pstr;
18850
18851 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18852
18853 if (!(func & STR_FUNC_REGEXP)) {
18854 if (rb_parser_is_ascii_string(p, pstr)) {
18855 }
18856 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18857 /* everything is valid in ASCII-8BIT */
18858 enc = rb_ascii8bit_encoding();
18859 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18860 }
18861 }
18862
18863 return pstr;
18864}
18865
18866static int
18867strterm_is_heredoc(rb_strterm_t *strterm)
18868{
18869 return strterm->heredoc;
18870}
18871
18872static rb_strterm_t *
18873new_strterm(struct parser_params *p, int func, int term, int paren)
18874{
18875 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18876 strterm->u.literal.func = func;
18877 strterm->u.literal.term = term;
18878 strterm->u.literal.paren = paren;
18879 return strterm;
18880}
18881
18882static rb_strterm_t *
18883new_heredoc(struct parser_params *p)
18884{
18885 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18886 strterm->heredoc = true;
18887 return strterm;
18888}
18889
18890#define peek(p,c) peek_n(p, (c), 0)
18891#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18892#define peekc(p) peekc_n(p, 0)
18893#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18894
18895#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18896static void
18897parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18898{
18899 debug_token_line(p, "add_delayed_token", line);
18900
18901 if (tok < end) {
18902 if (has_delayed_token(p)) {
18903 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18904 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18905 int end_col = (next_line ? 0 : p->delayed.end_col);
18906 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18907 dispatch_delayed_token(p, tSTRING_CONTENT);
18908 }
18909 }
18910 if (!has_delayed_token(p)) {
18911 p->delayed.token = rb_parser_string_new(p, 0, 0);
18912 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18913 p->delayed.beg_line = p->ruby_sourceline;
18914 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18915 }
18916 parser_str_cat(p->delayed.token, tok, end - tok);
18917 p->delayed.end_line = p->ruby_sourceline;
18918 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
18919 p->lex.ptok = end;
18920 }
18921}
18922
18923static void
18924set_lastline(struct parser_params *p, rb_parser_string_t *str)
18925{
18926 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
18927 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
18928 p->lex.lastline = str;
18929}
18930
18931static int
18932nextline(struct parser_params *p, int set_encoding)
18933{
18934 rb_parser_string_t *str = p->lex.nextline;
18935 p->lex.nextline = 0;
18936 if (!str) {
18937 if (p->eofp)
18938 return -1;
18939
18940 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
18941 goto end_of_input;
18942 }
18943
18944 if (!p->lex.input || !(str = lex_getline(p))) {
18945 end_of_input:
18946 p->eofp = 1;
18947 lex_goto_eol(p);
18948 return -1;
18949 }
18950#ifndef RIPPER
18951 if (p->debug_lines) {
18952 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
18953 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
18954 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
18955 }
18956#endif
18957 p->cr_seen = FALSE;
18958 }
18959 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
18960 /* after here-document without terminator */
18961 goto end_of_input;
18962 }
18963 add_delayed_token(p, p->lex.ptok, p->lex.pend);
18964 if (p->heredoc_end > 0) {
18965 p->ruby_sourceline = p->heredoc_end;
18966 p->heredoc_end = 0;
18967 }
18968 p->ruby_sourceline++;
18969 set_lastline(p, str);
18970 token_flush(p);
18971 return 0;
18972}
18973
18974static int
18975parser_cr(struct parser_params *p, int c)
18976{
18977 if (peek(p, '\n')) {
18978 p->lex.pcur++;
18979 c = '\n';
18980 }
18981 return c;
18982}
18983
18984static inline int
18985nextc0(struct parser_params *p, int set_encoding)
18986{
18987 int c;
18988
18989 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
18990 if (nextline(p, set_encoding)) return -1;
18991 }
18992 c = (unsigned char)*p->lex.pcur++;
18993 if (UNLIKELY(c == '\r')) {
18994 c = parser_cr(p, c);
18995 }
18996
18997 return c;
18998}
18999#define nextc(p) nextc0(p, TRUE)
19000
19001static void
19002pushback(struct parser_params *p, int c)
19003{
19004 if (c == -1) return;
19005 p->eofp = 0;
19006 p->lex.pcur--;
19007 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19008 p->lex.pcur--;
19009 }
19010}
19011
19012#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19013
19014#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19015#define tok(p) (p)->tokenbuf
19016#define toklen(p) (p)->tokidx
19017
19018static int
19019looking_at_eol_p(struct parser_params *p)
19020{
19021 const char *ptr = p->lex.pcur;
19022 while (!lex_eol_ptr_p(p, ptr)) {
19023 int c = (unsigned char)*ptr++;
19024 int eol = (c == '\n' || c == '#');
19025 if (eol || !ISSPACE(c)) {
19026 return eol;
19027 }
19028 }
19029 return TRUE;
19030}
19031
19032static char*
19033newtok(struct parser_params *p)
19034{
19035 p->tokidx = 0;
19036 if (!p->tokenbuf) {
19037 p->toksiz = 60;
19038 p->tokenbuf = ALLOC_N(char, 60);
19039 }
19040 if (p->toksiz > 4096) {
19041 p->toksiz = 60;
19042 REALLOC_N(p->tokenbuf, char, 60);
19043 }
19044 return p->tokenbuf;
19045}
19046
19047static char *
19048tokspace(struct parser_params *p, int n)
19049{
19050 p->tokidx += n;
19051
19052 if (p->tokidx >= p->toksiz) {
19053 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19054 REALLOC_N(p->tokenbuf, char, p->toksiz);
19055 }
19056 return &p->tokenbuf[p->tokidx-n];
19057}
19058
19059static void
19060tokadd(struct parser_params *p, int c)
19061{
19062 p->tokenbuf[p->tokidx++] = (char)c;
19063 if (p->tokidx >= p->toksiz) {
19064 p->toksiz *= 2;
19065 REALLOC_N(p->tokenbuf, char, p->toksiz);
19066 }
19067}
19068
19069static int
19070tok_hex(struct parser_params *p, size_t *numlen)
19071{
19072 int c;
19073
19074 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19075 if (!*numlen) {
19076 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19077 yyerror0("invalid hex escape");
19078 dispatch_scan_event(p, tSTRING_CONTENT);
19079 return 0;
19080 }
19081 p->lex.pcur += *numlen;
19082 return c;
19083}
19084
19085#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19086
19087static int
19088escaped_control_code(int c)
19089{
19090 int c2 = 0;
19091 switch (c) {
19092 case ' ':
19093 c2 = 's';
19094 break;
19095 case '\n':
19096 c2 = 'n';
19097 break;
19098 case '\t':
19099 c2 = 't';
19100 break;
19101 case '\v':
19102 c2 = 'v';
19103 break;
19104 case '\r':
19105 c2 = 'r';
19106 break;
19107 case '\f':
19108 c2 = 'f';
19109 break;
19110 }
19111 return c2;
19112}
19113
19114#define WARN_SPACE_CHAR(c, prefix) \
19115 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19116
19117static int
19118tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19119 int regexp_literal, const char *begin)
19120{
19121 const int wide = !begin;
19122 size_t numlen;
19123 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19124
19125 p->lex.pcur += numlen;
19126 if (p->lex.strterm == NULL ||
19127 strterm_is_heredoc(p->lex.strterm) ||
19128 (p->lex.strterm->u.literal.func != str_regexp)) {
19129 if (!begin) begin = p->lex.pcur;
19130 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19131 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19132 yyerror0("invalid Unicode escape");
19133 dispatch_scan_event(p, tSTRING_CONTENT);
19134 return wide && numlen > 0;
19135 }
19136 if (codepoint > 0x10ffff) {
19137 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19138 yyerror0("invalid Unicode codepoint (too large)");
19139 dispatch_scan_event(p, tSTRING_CONTENT);
19140 return wide;
19141 }
19142 if ((codepoint & 0xfffff800) == 0xd800) {
19143 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19144 yyerror0("invalid Unicode codepoint");
19145 dispatch_scan_event(p, tSTRING_CONTENT);
19146 return wide;
19147 }
19148 }
19149 if (regexp_literal) {
19150 tokcopy(p, (int)numlen);
19151 }
19152 else if (codepoint >= 0x80) {
19153 rb_encoding *utf8 = rb_utf8_encoding();
19154 if (*encp && utf8 != *encp) {
19155 YYLTYPE loc = RUBY_INIT_YYLLOC();
19156 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19157 parser_show_error_line(p, &loc);
19158 return wide;
19159 }
19160 *encp = utf8;
19161 tokaddmbc(p, codepoint, *encp);
19162 }
19163 else {
19164 tokadd(p, codepoint);
19165 }
19166 return TRUE;
19167}
19168
19169static int tokadd_mbchar(struct parser_params *p, int c);
19170
19171static int
19172tokskip_mbchar(struct parser_params *p)
19173{
19174 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19175 if (len > 0) {
19176 p->lex.pcur += len - 1;
19177 }
19178 return len;
19179}
19180
19181/* return value is for ?\u3042 */
19182static void
19183tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19184 int term, int symbol_literal, int regexp_literal)
19185{
19186 /*
19187 * If `term` is not -1, then we allow multiple codepoints in \u{}
19188 * upto `term` byte, otherwise we're parsing a character literal.
19189 * And then add the codepoints to the current token.
19190 */
19191 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19192
19193 const int open_brace = '{', close_brace = '}';
19194
19195 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19196
19197 if (peek(p, open_brace)) { /* handle \u{...} form */
19198 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19199 /*
19200 * Skip parsing validation code and copy bytes as-is until term or
19201 * closing brace, in order to correctly handle extended regexps where
19202 * invalid unicode escapes are allowed in comments. The regexp parser
19203 * does its own validation and will catch any issues.
19204 */
19205 tokadd(p, open_brace);
19206 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19207 int c = peekc(p);
19208 if (c == close_brace) {
19209 tokadd(p, c);
19210 ++p->lex.pcur;
19211 break;
19212 }
19213 else if (c == term) {
19214 break;
19215 }
19216 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19217 tokadd(p, c);
19218 c = *++p->lex.pcur;
19219 }
19220 tokadd_mbchar(p, c);
19221 }
19222 }
19223 else {
19224 const char *second = NULL;
19225 int c, last = nextc(p);
19226 if (lex_eol_p(p)) goto unterminated;
19227 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19228 while (c != close_brace) {
19229 if (c == term) goto unterminated;
19230 if (second == multiple_codepoints)
19231 second = p->lex.pcur;
19232 if (regexp_literal) tokadd(p, last);
19233 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19234 break;
19235 }
19236 while (ISSPACE(c = peekc(p))) {
19237 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19238 last = c;
19239 }
19240 if (term == -1 && !second)
19241 second = multiple_codepoints;
19242 }
19243
19244 if (c != close_brace) {
19245 unterminated:
19246 flush_string_content(p, rb_utf8_encoding(), 0);
19247 yyerror0("unterminated Unicode escape");
19248 dispatch_scan_event(p, tSTRING_CONTENT);
19249 return;
19250 }
19251 if (second && second != multiple_codepoints) {
19252 const char *pcur = p->lex.pcur;
19253 p->lex.pcur = second;
19254 dispatch_scan_event(p, tSTRING_CONTENT);
19255 token_flush(p);
19256 p->lex.pcur = pcur;
19257 yyerror0(multiple_codepoints);
19258 token_flush(p);
19259 }
19260
19261 if (regexp_literal) tokadd(p, close_brace);
19262 nextc(p);
19263 }
19264 }
19265 else { /* handle \uxxxx form */
19266 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19267 token_flush(p);
19268 return;
19269 }
19270 }
19271}
19272
19273#define ESCAPE_CONTROL 1
19274#define ESCAPE_META 2
19275
19276static int
19277read_escape(struct parser_params *p, int flags, const char *begin)
19278{
19279 int c;
19280 size_t numlen;
19281
19282 switch (c = nextc(p)) {
19283 case '\\': /* Backslash */
19284 return c;
19285
19286 case 'n': /* newline */
19287 return '\n';
19288
19289 case 't': /* horizontal tab */
19290 return '\t';
19291
19292 case 'r': /* carriage-return */
19293 return '\r';
19294
19295 case 'f': /* form-feed */
19296 return '\f';
19297
19298 case 'v': /* vertical tab */
19299 return '\13';
19300
19301 case 'a': /* alarm(bell) */
19302 return '\007';
19303
19304 case 'e': /* escape */
19305 return 033;
19306
19307 case '0': case '1': case '2': case '3': /* octal constant */
19308 case '4': case '5': case '6': case '7':
19309 pushback(p, c);
19310 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19311 p->lex.pcur += numlen;
19312 return c;
19313
19314 case 'x': /* hex constant */
19315 c = tok_hex(p, &numlen);
19316 if (numlen == 0) return 0;
19317 return c;
19318
19319 case 'b': /* backspace */
19320 return '\010';
19321
19322 case 's': /* space */
19323 return ' ';
19324
19325 case 'M':
19326 if (flags & ESCAPE_META) goto eof;
19327 if ((c = nextc(p)) != '-') {
19328 goto eof;
19329 }
19330 if ((c = nextc(p)) == '\\') {
19331 switch (peekc(p)) {
19332 case 'u': case 'U':
19333 nextc(p);
19334 goto eof;
19335 }
19336 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19337 }
19338 else if (c == -1) goto eof;
19339 else if (!ISASCII(c)) {
19340 tokskip_mbchar(p);
19341 goto eof;
19342 }
19343 else {
19344 int c2 = escaped_control_code(c);
19345 if (c2) {
19346 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19347 WARN_SPACE_CHAR(c2, "\\M-");
19348 }
19349 else {
19350 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19351 }
19352 }
19353 else if (ISCNTRL(c)) goto eof;
19354 return ((c & 0xff) | 0x80);
19355 }
19356
19357 case 'C':
19358 if ((c = nextc(p)) != '-') {
19359 goto eof;
19360 }
19361 case 'c':
19362 if (flags & ESCAPE_CONTROL) goto eof;
19363 if ((c = nextc(p))== '\\') {
19364 switch (peekc(p)) {
19365 case 'u': case 'U':
19366 nextc(p);
19367 goto eof;
19368 }
19369 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19370 }
19371 else if (c == '?')
19372 return 0177;
19373 else if (c == -1) goto eof;
19374 else if (!ISASCII(c)) {
19375 tokskip_mbchar(p);
19376 goto eof;
19377 }
19378 else {
19379 int c2 = escaped_control_code(c);
19380 if (c2) {
19381 if (ISCNTRL(c)) {
19382 if (flags & ESCAPE_META) {
19383 WARN_SPACE_CHAR(c2, "\\M-");
19384 }
19385 else {
19386 WARN_SPACE_CHAR(c2, "");
19387 }
19388 }
19389 else {
19390 if (flags & ESCAPE_META) {
19391 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19392 }
19393 else {
19394 WARN_SPACE_CHAR(c2, "\\C-");
19395 }
19396 }
19397 }
19398 else if (ISCNTRL(c)) goto eof;
19399 }
19400 return c & 0x9f;
19401
19402 eof:
19403 case -1:
19404 flush_string_content(p, p->enc, p->lex.pcur - begin);
19405 yyerror0("Invalid escape character syntax");
19406 dispatch_scan_event(p, tSTRING_CONTENT);
19407 return '\0';
19408
19409 default:
19410 if (!ISASCII(c)) {
19411 tokskip_mbchar(p);
19412 goto eof;
19413 }
19414 return c;
19415 }
19416}
19417
19418static void
19419tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19420{
19421 int len = rb_enc_codelen(c, enc);
19422 rb_enc_mbcput(c, tokspace(p, len), enc);
19423}
19424
19425static int
19426tokadd_escape(struct parser_params *p)
19427{
19428 int c;
19429 size_t numlen;
19430 const char *begin = p->lex.pcur;
19431
19432 switch (c = nextc(p)) {
19433 case '\n':
19434 return 0; /* just ignore */
19435
19436 case '0': case '1': case '2': case '3': /* octal constant */
19437 case '4': case '5': case '6': case '7':
19438 {
19439 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19440 if (numlen == 0) goto eof;
19441 p->lex.pcur += numlen;
19442 tokcopy(p, (int)numlen + 1);
19443 }
19444 return 0;
19445
19446 case 'x': /* hex constant */
19447 {
19448 tok_hex(p, &numlen);
19449 if (numlen == 0) return -1;
19450 tokcopy(p, (int)numlen + 2);
19451 }
19452 return 0;
19453
19454 eof:
19455 case -1:
19456 flush_string_content(p, p->enc, p->lex.pcur - begin);
19457 yyerror0("Invalid escape character syntax");
19458 token_flush(p);
19459 return -1;
19460
19461 default:
19462 tokadd(p, '\\');
19463 tokadd(p, c);
19464 }
19465 return 0;
19466}
19467
19468static int
19469char_to_option(int c)
19470{
19471 int val;
19472
19473 switch (c) {
19474 case 'i':
19475 val = RE_ONIG_OPTION_IGNORECASE;
19476 break;
19477 case 'x':
19478 val = RE_ONIG_OPTION_EXTEND;
19479 break;
19480 case 'm':
19481 val = RE_ONIG_OPTION_MULTILINE;
19482 break;
19483 default:
19484 val = 0;
19485 break;
19486 }
19487 return val;
19488}
19489
19490#define ARG_ENCODING_FIXED 16
19491#define ARG_ENCODING_NONE 32
19492#define ENC_ASCII8BIT 1
19493#define ENC_EUC_JP 2
19494#define ENC_Windows_31J 3
19495#define ENC_UTF8 4
19496
19497static int
19498char_to_option_kcode(int c, int *option, int *kcode)
19499{
19500 *option = 0;
19501
19502 switch (c) {
19503 case 'n':
19504 *kcode = ENC_ASCII8BIT;
19505 return (*option = ARG_ENCODING_NONE);
19506 case 'e':
19507 *kcode = ENC_EUC_JP;
19508 break;
19509 case 's':
19510 *kcode = ENC_Windows_31J;
19511 break;
19512 case 'u':
19513 *kcode = ENC_UTF8;
19514 break;
19515 default:
19516 *kcode = -1;
19517 return (*option = char_to_option(c));
19518 }
19519 *option = ARG_ENCODING_FIXED;
19520 return 1;
19521}
19522
19523static int
19524regx_options(struct parser_params *p)
19525{
19526 int kcode = 0;
19527 int kopt = 0;
19528 int options = 0;
19529 int c, opt, kc;
19530
19531 newtok(p);
19532 while (c = nextc(p), ISALPHA(c)) {
19533 if (c == 'o') {
19534 options |= RE_OPTION_ONCE;
19535 }
19536 else if (char_to_option_kcode(c, &opt, &kc)) {
19537 if (kc >= 0) {
19538 if (kc != ENC_ASCII8BIT) kcode = c;
19539 kopt = opt;
19540 }
19541 else {
19542 options |= opt;
19543 }
19544 }
19545 else {
19546 tokadd(p, c);
19547 }
19548 }
19549 options |= kopt;
19550 pushback(p, c);
19551 if (toklen(p)) {
19552 YYLTYPE loc = RUBY_INIT_YYLLOC();
19553 tokfix(p);
19554 compile_error(p, "unknown regexp option%s - %*s",
19555 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19556 parser_show_error_line(p, &loc);
19557 }
19558 return options | RE_OPTION_ENCODING(kcode);
19559}
19560
19561static int
19562tokadd_mbchar(struct parser_params *p, int c)
19563{
19564 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19565 if (len < 0) return -1;
19566 tokadd(p, c);
19567 p->lex.pcur += --len;
19568 if (len > 0) tokcopy(p, len);
19569 return c;
19570}
19571
19572static inline int
19573simple_re_meta(int c)
19574{
19575 switch (c) {
19576 case '$': case '*': case '+': case '.':
19577 case '?': case '^': case '|':
19578 case ')': case ']': case '}': case '>':
19579 return TRUE;
19580 default:
19581 return FALSE;
19582 }
19583}
19584
19585static int
19586parser_update_heredoc_indent(struct parser_params *p, int c)
19587{
19588 if (p->heredoc_line_indent == -1) {
19589 if (c == '\n') p->heredoc_line_indent = 0;
19590 }
19591 else {
19592 if (c == ' ') {
19593 p->heredoc_line_indent++;
19594 return TRUE;
19595 }
19596 else if (c == '\t') {
19597 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19598 p->heredoc_line_indent = w * TAB_WIDTH;
19599 return TRUE;
19600 }
19601 else if (c != '\n') {
19602 if (p->heredoc_indent > p->heredoc_line_indent) {
19603 p->heredoc_indent = p->heredoc_line_indent;
19604 }
19605 p->heredoc_line_indent = -1;
19606 }
19607 else {
19608 /* Whitespace only line has no indentation */
19609 p->heredoc_line_indent = 0;
19610 }
19611 }
19612 return FALSE;
19613}
19614
19615static void
19616parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19617{
19618 YYLTYPE loc = RUBY_INIT_YYLLOC();
19619 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19620 compile_error(p, "%s mixed within %s source", n1, n2);
19621 parser_show_error_line(p, &loc);
19622}
19623
19624static void
19625parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19626{
19627 const char *pos = p->lex.pcur;
19628 p->lex.pcur = beg;
19629 parser_mixed_error(p, enc1, enc2);
19630 p->lex.pcur = pos;
19631}
19632
19633static inline char
19634nibble_char_upper(unsigned int c)
19635{
19636 c &= 0xf;
19637 return c + (c < 10 ? '0' : 'A' - 10);
19638}
19639
19640static int
19641tokadd_string(struct parser_params *p,
19642 int func, int term, int paren, long *nest,
19643 rb_encoding **encp, rb_encoding **enc)
19644{
19645 int c;
19646 bool erred = false;
19647#ifdef RIPPER
19648 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19649 int top_of_line = FALSE;
19650#endif
19651
19652#define mixed_error(enc1, enc2) \
19653 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19654#define mixed_escape(beg, enc1, enc2) \
19655 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19656
19657 while ((c = nextc(p)) != -1) {
19658 if (p->heredoc_indent > 0) {
19659 parser_update_heredoc_indent(p, c);
19660 }
19661#ifdef RIPPER
19662 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19663 pushback(p, c);
19664 break;
19665 }
19666#endif
19667
19668 if (paren && c == paren) {
19669 ++*nest;
19670 }
19671 else if (c == term) {
19672 if (!nest || !*nest) {
19673 pushback(p, c);
19674 break;
19675 }
19676 --*nest;
19677 }
19678 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19679 unsigned char c2 = *p->lex.pcur;
19680 if (c2 == '$' || c2 == '@' || c2 == '{') {
19681 pushback(p, c);
19682 break;
19683 }
19684 }
19685 else if (c == '\\') {
19686 c = nextc(p);
19687 switch (c) {
19688 case '\n':
19689 if (func & STR_FUNC_QWORDS) break;
19690 if (func & STR_FUNC_EXPAND) {
19691 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19692 continue;
19693 if (c == term) {
19694 c = '\\';
19695 goto terminate;
19696 }
19697 }
19698 tokadd(p, '\\');
19699 break;
19700
19701 case '\\':
19702 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19703 break;
19704
19705 case 'u':
19706 if ((func & STR_FUNC_EXPAND) == 0) {
19707 tokadd(p, '\\');
19708 break;
19709 }
19710 tokadd_utf8(p, enc, term,
19711 func & STR_FUNC_SYMBOL,
19712 func & STR_FUNC_REGEXP);
19713 continue;
19714
19715 default:
19716 if (c == -1) return -1;
19717 if (!ISASCII(c)) {
19718 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19719 goto non_ascii;
19720 }
19721 if (func & STR_FUNC_REGEXP) {
19722 switch (c) {
19723 case 'c':
19724 case 'C':
19725 case 'M': {
19726 pushback(p, c);
19727 c = read_escape(p, 0, p->lex.pcur - 1);
19728
19729 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19730 *t++ = '\\';
19731 *t++ = 'x';
19732 *t++ = nibble_char_upper(c >> 4);
19733 *t++ = nibble_char_upper(c);
19734 continue;
19735 }
19736 }
19737
19738 if (c == term && !simple_re_meta(c)) {
19739 tokadd(p, c);
19740 continue;
19741 }
19742 pushback(p, c);
19743 if ((c = tokadd_escape(p)) < 0)
19744 return -1;
19745 if (*enc && *enc != *encp) {
19746 mixed_escape(p->lex.ptok+2, *enc, *encp);
19747 }
19748 continue;
19749 }
19750 else if (func & STR_FUNC_EXPAND) {
19751 pushback(p, c);
19752 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19753 c = read_escape(p, 0, p->lex.pcur - 1);
19754 }
19755 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19756 /* ignore backslashed spaces in %w */
19757 }
19758 else if (c != term && !(paren && c == paren)) {
19759 tokadd(p, '\\');
19760 pushback(p, c);
19761 continue;
19762 }
19763 }
19764 }
19765 else if (!parser_isascii(p)) {
19766 non_ascii:
19767 if (!*enc) {
19768 *enc = *encp;
19769 }
19770 else if (*enc != *encp) {
19771 mixed_error(*enc, *encp);
19772 continue;
19773 }
19774 if (tokadd_mbchar(p, c) == -1) return -1;
19775 continue;
19776 }
19777 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19778 pushback(p, c);
19779 break;
19780 }
19781 if (c & 0x80) {
19782 if (!*enc) {
19783 *enc = *encp;
19784 }
19785 else if (*enc != *encp) {
19786 mixed_error(*enc, *encp);
19787 continue;
19788 }
19789 }
19790 tokadd(p, c);
19791#ifdef RIPPER
19792 top_of_line = (c == '\n');
19793#endif
19794 }
19795 terminate:
19796 if (*enc) *encp = *enc;
19797 return c;
19798}
19799
19800#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19801
19802static void
19803flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19804{
19805 p->lex.pcur -= back;
19806 if (has_delayed_token(p)) {
19807 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19808 if (len > 0) {
19809 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19810 p->delayed.end_line = p->ruby_sourceline;
19811 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19812 }
19813 dispatch_delayed_token(p, tSTRING_CONTENT);
19814 p->lex.ptok = p->lex.pcur;
19815 }
19816 dispatch_scan_event(p, tSTRING_CONTENT);
19817 p->lex.pcur += back;
19818}
19819
19820/* this can be shared with ripper, since it's independent from struct
19821 * parser_params. */
19822#ifndef RIPPER
19823#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19824#define SPECIAL_PUNCT(idx) ( \
19825 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19826 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19827 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19828 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19829 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19830 BIT('0', idx))
19831const uint_least32_t ruby_global_name_punct_bits[] = {
19832 SPECIAL_PUNCT(0),
19833 SPECIAL_PUNCT(1),
19834 SPECIAL_PUNCT(2),
19835};
19836#undef BIT
19837#undef SPECIAL_PUNCT
19838#endif
19839
19840static enum yytokentype
19841parser_peek_variable_name(struct parser_params *p)
19842{
19843 int c;
19844 const char *ptr = p->lex.pcur;
19845
19846 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19847 c = *ptr++;
19848 switch (c) {
19849 case '$':
19850 if ((c = *ptr) == '-') {
19851 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19852 c = *ptr;
19853 }
19854 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19855 return tSTRING_DVAR;
19856 }
19857 break;
19858 case '@':
19859 if ((c = *ptr) == '@') {
19860 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19861 c = *ptr;
19862 }
19863 break;
19864 case '{':
19865 p->lex.pcur = ptr;
19866 p->command_start = TRUE;
19867 yylval.state = p->lex.state;
19868 return tSTRING_DBEG;
19869 default:
19870 return 0;
19871 }
19872 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19873 return tSTRING_DVAR;
19874 return 0;
19875}
19876
19877#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19878#define IS_END() IS_lex_state(EXPR_END_ANY)
19879#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19880#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19881#define IS_LABEL_POSSIBLE() (\
19882 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19883 IS_ARG())
19884#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19885#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19886
19887static inline enum yytokentype
19888parser_string_term(struct parser_params *p, int func)
19889{
19890 xfree(p->lex.strterm);
19891 p->lex.strterm = 0;
19892 if (func & STR_FUNC_REGEXP) {
19893 set_yylval_num(regx_options(p));
19894 dispatch_scan_event(p, tREGEXP_END);
19895 SET_LEX_STATE(EXPR_END);
19896 return tREGEXP_END;
19897 }
19898 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19899 nextc(p);
19900 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19901 return tLABEL_END;
19902 }
19903 SET_LEX_STATE(EXPR_END);
19904 return tSTRING_END;
19905}
19906
19907static enum yytokentype
19908parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19909{
19910 int func = quote->func;
19911 int term = quote->term;
19912 int paren = quote->paren;
19913 int c, space = 0;
19914 rb_encoding *enc = p->enc;
19915 rb_encoding *base_enc = 0;
19916 rb_parser_string_t *lit;
19917
19918 if (func & STR_FUNC_TERM) {
19919 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
19920 SET_LEX_STATE(EXPR_END);
19921 xfree(p->lex.strterm);
19922 p->lex.strterm = 0;
19923 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
19924 }
19925 c = nextc(p);
19926 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19927 while (c != '\n' && ISSPACE(c = nextc(p)));
19928 space = 1;
19929 }
19930 if (func & STR_FUNC_LIST) {
19931 quote->func &= ~STR_FUNC_LIST;
19932 space = 1;
19933 }
19934 if (c == term && !quote->nest) {
19935 if (func & STR_FUNC_QWORDS) {
19936 quote->func |= STR_FUNC_TERM;
19937 pushback(p, c); /* dispatch the term at tSTRING_END */
19938 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19939 return ' ';
19940 }
19941 return parser_string_term(p, func);
19942 }
19943 if (space) {
19944 if (!ISSPACE(c)) pushback(p, c);
19945 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19946 return ' ';
19947 }
19948 newtok(p);
19949 if ((func & STR_FUNC_EXPAND) && c == '#') {
19950 enum yytokentype t = parser_peek_variable_name(p);
19951 if (t) return t;
19952 tokadd(p, '#');
19953 c = nextc(p);
19954 }
19955 pushback(p, c);
19956 if (tokadd_string(p, func, term, paren, &quote->nest,
19957 &enc, &base_enc) == -1) {
19958 if (p->eofp) {
19959#ifndef RIPPER
19960# define unterminated_literal(mesg) yyerror0(mesg)
19961#else
19962# define unterminated_literal(mesg) compile_error(p, mesg)
19963#endif
19964 literal_flush(p, p->lex.pcur);
19965 if (func & STR_FUNC_QWORDS) {
19966 /* no content to add, bailing out here */
19967 unterminated_literal("unterminated list meets end of file");
19968 xfree(p->lex.strterm);
19969 p->lex.strterm = 0;
19970 return tSTRING_END;
19971 }
19972 if (func & STR_FUNC_REGEXP) {
19973 unterminated_literal("unterminated regexp meets end of file");
19974 }
19975 else {
19976 unterminated_literal("unterminated string meets end of file");
19977 }
19978 quote->func |= STR_FUNC_TERM;
19979 }
19980 }
19981
19982 tokfix(p);
19983 lit = STR_NEW3(tok(p), toklen(p), enc, func);
19984 set_yylval_str(lit);
19985 flush_string_content(p, enc, 0);
19986
19987 return tSTRING_CONTENT;
19988}
19989
19990static enum yytokentype
19991heredoc_identifier(struct parser_params *p)
19992{
19993 /*
19994 * term_len is length of `<<"END"` except `END`,
19995 * in this case term_len is 4 (<, <, " and ").
19996 */
19997 long len, offset = p->lex.pcur - p->lex.pbeg;
19998 int c = nextc(p), term, func = 0, quote = 0;
19999 enum yytokentype token = tSTRING_BEG;
20000 int indent = 0;
20001
20002 if (c == '-') {
20003 c = nextc(p);
20004 func = STR_FUNC_INDENT;
20005 offset++;
20006 }
20007 else if (c == '~') {
20008 c = nextc(p);
20009 func = STR_FUNC_INDENT;
20010 offset++;
20011 indent = INT_MAX;
20012 }
20013 switch (c) {
20014 case '\'':
20015 func |= str_squote; goto quoted;
20016 case '"':
20017 func |= str_dquote; goto quoted;
20018 case '`':
20019 token = tXSTRING_BEG;
20020 func |= str_xquote; goto quoted;
20021
20022 quoted:
20023 quote++;
20024 offset++;
20025 term = c;
20026 len = 0;
20027 while ((c = nextc(p)) != term) {
20028 if (c == -1 || c == '\r' || c == '\n') {
20029 yyerror0("unterminated here document identifier");
20030 return -1;
20031 }
20032 }
20033 break;
20034
20035 default:
20036 if (!parser_is_identchar(p)) {
20037 pushback(p, c);
20038 if (func & STR_FUNC_INDENT) {
20039 pushback(p, indent > 0 ? '~' : '-');
20040 }
20041 return 0;
20042 }
20043 func |= str_dquote;
20044 do {
20045 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20046 if (n < 0) return 0;
20047 p->lex.pcur += --n;
20048 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20049 pushback(p, c);
20050 break;
20051 }
20052
20053 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20054 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20055 yyerror0("too long here document identifier");
20056 dispatch_scan_event(p, tHEREDOC_BEG);
20057 lex_goto_eol(p);
20058
20059 p->lex.strterm = new_heredoc(p);
20060 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20061 here->offset = offset;
20062 here->sourceline = p->ruby_sourceline;
20063 here->length = (unsigned)len;
20064 here->quote = quote;
20065 here->func = func;
20066 here->lastline = p->lex.lastline;
20067
20068 token_flush(p);
20069 p->heredoc_indent = indent;
20070 p->heredoc_line_indent = 0;
20071 return token;
20072}
20073
20074static void
20075heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20076{
20077 rb_parser_string_t *line;
20078 rb_strterm_t *term = p->lex.strterm;
20079
20080 p->lex.strterm = 0;
20081 line = here->lastline;
20082 p->lex.lastline = line;
20083 p->lex.pbeg = PARSER_STRING_PTR(line);
20084 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20085 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20086 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20087 p->heredoc_end = p->ruby_sourceline;
20088 p->ruby_sourceline = (int)here->sourceline;
20089 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20090 p->eofp = 0;
20091 xfree(term);
20092}
20093
20094static int
20095dedent_string_column(const char *str, long len, int width)
20096{
20097 int i, col = 0;
20098
20099 for (i = 0; i < len && col < width; i++) {
20100 if (str[i] == ' ') {
20101 col++;
20102 }
20103 else if (str[i] == '\t') {
20104 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20105 if (n > width) break;
20106 col = n;
20107 }
20108 else {
20109 break;
20110 }
20111 }
20112
20113 return i;
20114}
20115
20116static int
20117dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20118{
20119 char *str;
20120 long len;
20121 int i;
20122
20123 len = PARSER_STRING_LEN(string);
20124 str = PARSER_STRING_PTR(string);
20125
20126 i = dedent_string_column(str, len, width);
20127 if (!i) return 0;
20128
20129 rb_parser_str_modify(string);
20130 str = PARSER_STRING_PTR(string);
20131 if (PARSER_STRING_LEN(string) != len)
20132 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20133 MEMMOVE(str, str + i, char, len - i);
20134 rb_parser_str_set_len(p, string, len - i);
20135 return i;
20136}
20137
20138static NODE *
20139heredoc_dedent(struct parser_params *p, NODE *root)
20140{
20141 NODE *node, *str_node, *prev_node;
20142 int indent = p->heredoc_indent;
20143 rb_parser_string_t *prev_lit = 0;
20144
20145 if (indent <= 0) return root;
20146 if (!root) return root;
20147
20148 prev_node = node = str_node = root;
20149 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20150
20151 while (str_node) {
20152 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20153 if (nd_fl_newline(str_node)) {
20154 dedent_string(p, lit, indent);
20155 }
20156 if (!prev_lit) {
20157 prev_lit = lit;
20158 }
20159 else if (!literal_concat0(p, prev_lit, lit)) {
20160 return 0;
20161 }
20162 else {
20163 NODE *end = RNODE_LIST(node)->as.nd_end;
20164 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20165 if (!node) {
20166 if (nd_type_p(prev_node, NODE_DSTR))
20167 nd_set_type(prev_node, NODE_STR);
20168 break;
20169 }
20170 RNODE_LIST(node)->as.nd_end = end;
20171 goto next_str;
20172 }
20173
20174 str_node = 0;
20175 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20176 next_str:
20177 if (!nd_type_p(node, NODE_LIST)) break;
20178 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20179 enum node_type type = nd_type(str_node);
20180 if (type == NODE_STR || type == NODE_DSTR) break;
20181 prev_lit = 0;
20182 str_node = 0;
20183 }
20184 }
20185 }
20186 return root;
20187}
20188
20189static int
20190whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20191{
20192 const char *beg = p->lex.pbeg;
20193 const char *ptr = p->lex.pend;
20194
20195 if (ptr - beg < len) return FALSE;
20196 if (ptr > beg && ptr[-1] == '\n') {
20197 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20198 if (ptr - beg < len) return FALSE;
20199 }
20200 if (strncmp(eos, ptr -= len, len)) return FALSE;
20201 if (indent) {
20202 while (beg < ptr && ISSPACE(*beg)) beg++;
20203 }
20204 return beg == ptr;
20205}
20206
20207static int
20208word_match_p(struct parser_params *p, const char *word, long len)
20209{
20210 if (strncmp(p->lex.pcur, word, len)) return 0;
20211 if (lex_eol_n_p(p, len)) return 1;
20212 int c = (unsigned char)p->lex.pcur[len];
20213 if (ISSPACE(c)) return 1;
20214 switch (c) {
20215 case '\0': case '\004': case '\032': return 1;
20216 }
20217 return 0;
20218}
20219
20220#define NUM_SUFFIX_R (1<<0)
20221#define NUM_SUFFIX_I (1<<1)
20222#define NUM_SUFFIX_ALL 3
20223
20224static int
20225number_literal_suffix(struct parser_params *p, int mask)
20226{
20227 int c, result = 0;
20228 const char *lastp = p->lex.pcur;
20229
20230 while ((c = nextc(p)) != -1) {
20231 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20232 result |= (mask & NUM_SUFFIX_I);
20233 mask &= ~NUM_SUFFIX_I;
20234 /* r after i, rational of complex is disallowed */
20235 mask &= ~NUM_SUFFIX_R;
20236 continue;
20237 }
20238 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20239 result |= (mask & NUM_SUFFIX_R);
20240 mask &= ~NUM_SUFFIX_R;
20241 continue;
20242 }
20243 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20244 p->lex.pcur = lastp;
20245 return 0;
20246 }
20247 pushback(p, c);
20248 break;
20249 }
20250 return result;
20251}
20252
20253static enum yytokentype
20254set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20255{
20256 enum rb_numeric_type numeric_type = integer_literal;
20257
20258 if (type == tFLOAT) {
20259 numeric_type = float_literal;
20260 }
20261
20262 if (suffix & NUM_SUFFIX_R) {
20263 type = tRATIONAL;
20264 numeric_type = rational_literal;
20265 }
20266 if (suffix & NUM_SUFFIX_I) {
20267 type = tIMAGINARY;
20268 }
20269
20270 switch (type) {
20271 case tINTEGER:
20272 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20273 break;
20274 case tFLOAT:
20275 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20276 break;
20277 case tRATIONAL:
20278 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20279 break;
20280 case tIMAGINARY:
20281 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20282 (void)numeric_type; /* for ripper */
20283 break;
20284 default:
20285 rb_bug("unexpected token: %d", type);
20286 }
20287 SET_LEX_STATE(EXPR_END);
20288 return type;
20289}
20290
20291#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20292static void
20293parser_dispatch_heredoc_end(struct parser_params *p, int line)
20294{
20295 if (has_delayed_token(p))
20296 dispatch_delayed_token(p, tSTRING_CONTENT);
20297
20298#ifdef RIPPER
20299 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20300 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20301#else
20302 if (p->keep_tokens) {
20303 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20304 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20305 parser_append_tokens(p, str, tHEREDOC_END, line);
20306 }
20307#endif
20308
20309 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20310 lex_goto_eol(p);
20311 token_flush(p);
20312}
20313
20314static enum yytokentype
20315here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20316{
20317 int c, func, indent = 0;
20318 const char *eos, *ptr, *ptr_end;
20319 long len;
20320 rb_parser_string_t *str = 0;
20321 rb_encoding *enc = p->enc;
20322 rb_encoding *base_enc = 0;
20323 int bol;
20324#ifdef RIPPER
20325 VALUE s_value;
20326#endif
20327
20328 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20329 len = here->length;
20330 indent = (func = here->func) & STR_FUNC_INDENT;
20331
20332 if ((c = nextc(p)) == -1) {
20333 error:
20334#ifdef RIPPER
20335 if (!has_delayed_token(p)) {
20336 dispatch_scan_event(p, tSTRING_CONTENT);
20337 }
20338 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20339 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20340 if (!(func & STR_FUNC_REGEXP)) {
20341 int cr = ENC_CODERANGE_UNKNOWN;
20342 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20343 if (cr != ENC_CODERANGE_7BIT &&
20344 rb_is_usascii_enc(p->enc) &&
20345 enc != rb_utf8_encoding()) {
20346 enc = rb_ascii8bit_encoding();
20347 }
20348 }
20349 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20350 }
20351 dispatch_delayed_token(p, tSTRING_CONTENT);
20352 }
20353 else {
20354 dispatch_delayed_token(p, tSTRING_CONTENT);
20355 dispatch_scan_event(p, tSTRING_CONTENT);
20356 }
20357 lex_goto_eol(p);
20358#endif
20359 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20360 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20361 (int)len, eos);
20362 token_flush(p);
20363 SET_LEX_STATE(EXPR_END);
20364 return tSTRING_END;
20365 }
20366 bol = was_bol(p);
20367 if (!bol) {
20368 /* not beginning of line, cannot be the terminator */
20369 }
20370 else if (p->heredoc_line_indent == -1) {
20371 /* `heredoc_line_indent == -1` means
20372 * - "after an interpolation in the same line", or
20373 * - "in a continuing line"
20374 */
20375 p->heredoc_line_indent = 0;
20376 }
20377 else if (whole_match_p(p, eos, len, indent)) {
20378 dispatch_heredoc_end(p);
20379 restore:
20380 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20381 token_flush(p);
20382 SET_LEX_STATE(EXPR_END);
20383 return tSTRING_END;
20384 }
20385
20386 if (!(func & STR_FUNC_EXPAND)) {
20387 do {
20388 ptr = PARSER_STRING_PTR(p->lex.lastline);
20389 ptr_end = p->lex.pend;
20390 if (ptr_end > ptr) {
20391 switch (ptr_end[-1]) {
20392 case '\n':
20393 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20394 ptr_end++;
20395 break;
20396 }
20397 case '\r':
20398 --ptr_end;
20399 }
20400 }
20401
20402 if (p->heredoc_indent > 0) {
20403 long i = 0;
20404 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20405 i++;
20406 p->heredoc_line_indent = 0;
20407 }
20408
20409 if (str)
20410 parser_str_cat(str, ptr, ptr_end - ptr);
20411 else
20412 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20413 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20414 lex_goto_eol(p);
20415 if (p->heredoc_indent > 0) {
20416 goto flush_str;
20417 }
20418 if (nextc(p) == -1) {
20419 if (str) {
20420 rb_parser_string_free(p, str);
20421 str = 0;
20422 }
20423 goto error;
20424 }
20425 } while (!whole_match_p(p, eos, len, indent));
20426 }
20427 else {
20428 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20429 newtok(p);
20430 if (c == '#') {
20431 enum yytokentype t = parser_peek_variable_name(p);
20432 if (p->heredoc_line_indent != -1) {
20433 if (p->heredoc_indent > p->heredoc_line_indent) {
20434 p->heredoc_indent = p->heredoc_line_indent;
20435 }
20436 p->heredoc_line_indent = -1;
20437 }
20438 if (t) return t;
20439 tokadd(p, '#');
20440 c = nextc(p);
20441 }
20442 do {
20443 pushback(p, c);
20444 enc = p->enc;
20445 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20446 if (p->eofp) goto error;
20447 goto restore;
20448 }
20449 if (c != '\n') {
20450 if (c == '\\') p->heredoc_line_indent = -1;
20451 flush:
20452 str = STR_NEW3(tok(p), toklen(p), enc, func);
20453 flush_str:
20454 set_yylval_str(str);
20455#ifndef RIPPER
20456 if (bol) nd_set_fl_newline(yylval.node);
20457#endif
20458 flush_string_content(p, enc, 0);
20459 return tSTRING_CONTENT;
20460 }
20461 tokadd(p, nextc(p));
20462 if (p->heredoc_indent > 0) {
20463 lex_goto_eol(p);
20464 goto flush;
20465 }
20466 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20467 if ((c = nextc(p)) == -1) goto error;
20468 } while (!whole_match_p(p, eos, len, indent));
20469 str = STR_NEW3(tok(p), toklen(p), enc, func);
20470 }
20471 dispatch_heredoc_end(p);
20472 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20473 token_flush(p);
20474 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20475#ifdef RIPPER
20476 /* Preserve s_value for set_yylval_str */
20477 s_value = p->s_value;
20478#endif
20479 set_yylval_str(str);
20480#ifdef RIPPER
20481 set_parser_s_value(s_value);
20482#endif
20483
20484#ifndef RIPPER
20485 if (bol) nd_set_fl_newline(yylval.node);
20486#endif
20487 return tSTRING_CONTENT;
20488}
20489
20490#include "lex.c"
20491
20492static int
20493arg_ambiguous(struct parser_params *p, char c)
20494{
20495#ifndef RIPPER
20496 if (c == '/') {
20497 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20498 }
20499 else {
20500 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20501 }
20502#else
20503 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20504#endif
20505 return TRUE;
20506}
20507
20508/* returns true value if formal argument error;
20509 * Qtrue, or error message if ripper */
20510static VALUE
20511formal_argument_error(struct parser_params *p, ID id)
20512{
20513 switch (id_type(id)) {
20514 case ID_LOCAL:
20515 break;
20516#ifndef RIPPER
20517# define ERR(mesg) (yyerror0(mesg), Qtrue)
20518#else
20519# define ERR(mesg) WARN_S(mesg)
20520#endif
20521 case ID_CONST:
20522 return ERR("formal argument cannot be a constant");
20523 case ID_INSTANCE:
20524 return ERR("formal argument cannot be an instance variable");
20525 case ID_GLOBAL:
20526 return ERR("formal argument cannot be a global variable");
20527 case ID_CLASS:
20528 return ERR("formal argument cannot be a class variable");
20529 default:
20530 return ERR("formal argument must be local variable");
20531#undef ERR
20532 }
20533 shadowing_lvar(p, id);
20534
20535 return Qfalse;
20536}
20537
20538static int
20539lvar_defined(struct parser_params *p, ID id)
20540{
20541 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20542}
20543
20544/* emacsen -*- hack */
20545static long
20546parser_encode_length(struct parser_params *p, const char *name, long len)
20547{
20548 long nlen;
20549
20550 if (len > 5 && name[nlen = len - 5] == '-') {
20551 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20552 return nlen;
20553 }
20554 if (len > 4 && name[nlen = len - 4] == '-') {
20555 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20556 return nlen;
20557 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20558 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20559 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20560 return nlen;
20561 }
20562 return len;
20563}
20564
20565static void
20566parser_set_encode(struct parser_params *p, const char *name)
20567{
20568 rb_encoding *enc;
20569 VALUE excargs[3];
20570 int idx = 0;
20571
20572 const char *wrong = 0;
20573 switch (*name) {
20574 case 'e': case 'E': wrong = "external"; break;
20575 case 'i': case 'I': wrong = "internal"; break;
20576 case 'f': case 'F': wrong = "filesystem"; break;
20577 case 'l': case 'L': wrong = "locale"; break;
20578 }
20579 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20580 idx = rb_enc_find_index(name);
20581 if (idx < 0) {
20582 unknown:
20583 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20584 error:
20585 excargs[0] = rb_eArgError;
20586 excargs[2] = rb_make_backtrace();
20587 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20588 VALUE exc = rb_make_exception(3, excargs);
20589 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20590
20591 rb_ast_free(p->ast);
20592 p->ast = NULL;
20593
20594 rb_exc_raise(exc);
20595 }
20596 enc = rb_enc_from_index(idx);
20597 if (!rb_enc_asciicompat(enc)) {
20598 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20599 goto error;
20600 }
20601 p->enc = enc;
20602#ifndef RIPPER
20603 if (p->debug_lines) {
20604 long i;
20605 for (i = 0; i < p->debug_lines->len; i++) {
20606 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20607 }
20608 }
20609#endif
20610}
20611
20612static bool
20613comment_at_top(struct parser_params *p)
20614{
20615 if (p->token_seen) return false;
20616 return (p->line_count == (p->has_shebang ? 2 : 1));
20617}
20618
20619typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20620typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20621
20622static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20623
20624static void
20625magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20626{
20627 if (!comment_at_top(p)) {
20628 return;
20629 }
20630 parser_set_encode(p, val);
20631}
20632
20633static int
20634parser_get_bool(struct parser_params *p, const char *name, const char *val)
20635{
20636 switch (*val) {
20637 case 't': case 'T':
20638 if (STRCASECMP(val, "true") == 0) {
20639 return TRUE;
20640 }
20641 break;
20642 case 'f': case 'F':
20643 if (STRCASECMP(val, "false") == 0) {
20644 return FALSE;
20645 }
20646 break;
20647 }
20648 return parser_invalid_pragma_value(p, name, val);
20649}
20650
20651static int
20652parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20653{
20654 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20655 return -1;
20656}
20657
20658static void
20659parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20660{
20661 int b = parser_get_bool(p, name, val);
20662 if (b >= 0) p->token_info_enabled = b;
20663}
20664
20665static void
20666parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20667{
20668 int b;
20669
20670 if (p->token_seen) {
20671 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20672 return;
20673 }
20674
20675 b = parser_get_bool(p, name, val);
20676 if (b < 0) return;
20677
20678 p->frozen_string_literal = b;
20679}
20680
20681static void
20682parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20683{
20684 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20685 if (*s == ' ' || *s == '\t') continue;
20686 if (*s == '#') break;
20687 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20688 return;
20689 }
20690
20691 switch (*val) {
20692 case 'n': case 'N':
20693 if (STRCASECMP(val, "none") == 0) {
20694 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20695 return;
20696 }
20697 break;
20698 case 'l': case 'L':
20699 if (STRCASECMP(val, "literal") == 0) {
20700 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20701 return;
20702 }
20703 break;
20704 case 'e': case 'E':
20705 if (STRCASECMP(val, "experimental_copy") == 0) {
20706 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20707 return;
20708 }
20709 if (STRCASECMP(val, "experimental_everything") == 0) {
20710 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20711 return;
20712 }
20713 break;
20714 }
20715 parser_invalid_pragma_value(p, name, val);
20716}
20717
20718# if WARN_PAST_SCOPE
20719static void
20720parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20721{
20722 int b = parser_get_bool(p, name, val);
20723 if (b >= 0) p->past_scope_enabled = b;
20724}
20725# endif
20726
20728 const char *name;
20729 rb_magic_comment_setter_t func;
20730 rb_magic_comment_length_t length;
20731};
20732
20733static const struct magic_comment magic_comments[] = {
20734 {"coding", magic_comment_encoding, parser_encode_length},
20735 {"encoding", magic_comment_encoding, parser_encode_length},
20736 {"frozen_string_literal", parser_set_frozen_string_literal},
20737 {"shareable_constant_value", parser_set_shareable_constant_value},
20738 {"warn_indent", parser_set_token_info},
20739# if WARN_PAST_SCOPE
20740 {"warn_past_scope", parser_set_past_scope},
20741# endif
20742};
20743
20744static const char *
20745magic_comment_marker(const char *str, long len)
20746{
20747 long i = 2;
20748
20749 while (i < len) {
20750 switch (str[i]) {
20751 case '-':
20752 if (str[i-1] == '*' && str[i-2] == '-') {
20753 return str + i + 1;
20754 }
20755 i += 2;
20756 break;
20757 case '*':
20758 if (i + 1 >= len) return 0;
20759 if (str[i+1] != '-') {
20760 i += 4;
20761 }
20762 else if (str[i-1] != '-') {
20763 i += 2;
20764 }
20765 else {
20766 return str + i + 2;
20767 }
20768 break;
20769 default:
20770 i += 3;
20771 break;
20772 }
20773 }
20774 return 0;
20775}
20776
20777static int
20778parser_magic_comment(struct parser_params *p, const char *str, long len)
20779{
20780 int indicator = 0;
20781 VALUE name = 0, val = 0;
20782 const char *beg, *end, *vbeg, *vend;
20783#define str_copy(_s, _p, _n) ((_s) \
20784 ? (void)(rb_str_resize((_s), (_n)), \
20785 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20786 : (void)((_s) = STR_NEW((_p), (_n))))
20787
20788 if (len <= 7) return FALSE;
20789 if (!!(beg = magic_comment_marker(str, len))) {
20790 if (!(end = magic_comment_marker(beg, str + len - beg)))
20791 return FALSE;
20792 indicator = TRUE;
20793 str = beg;
20794 len = end - beg - 3;
20795 }
20796
20797 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20798 while (len > 0) {
20799 const struct magic_comment *mc = magic_comments;
20800 char *s;
20801 int i;
20802 long n = 0;
20803
20804 for (; len > 0 && *str; str++, --len) {
20805 switch (*str) {
20806 case '\'': case '"': case ':': case ';':
20807 continue;
20808 }
20809 if (!ISSPACE(*str)) break;
20810 }
20811 for (beg = str; len > 0; str++, --len) {
20812 switch (*str) {
20813 case '\'': case '"': case ':': case ';':
20814 break;
20815 default:
20816 if (ISSPACE(*str)) break;
20817 continue;
20818 }
20819 break;
20820 }
20821 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20822 if (!len) break;
20823 if (*str != ':') {
20824 if (!indicator) return FALSE;
20825 continue;
20826 }
20827
20828 do str++; while (--len > 0 && ISSPACE(*str));
20829 if (!len) break;
20830 const char *tok_beg = str;
20831 if (*str == '"') {
20832 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20833 if (*str == '\\') {
20834 --len;
20835 ++str;
20836 }
20837 }
20838 vend = str;
20839 if (len) {
20840 --len;
20841 ++str;
20842 }
20843 }
20844 else {
20845 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20846 vend = str;
20847 }
20848 const char *tok_end = str;
20849 if (indicator) {
20850 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20851 }
20852 else {
20853 while (len > 0 && (ISSPACE(*str))) --len, str++;
20854 if (len) return FALSE;
20855 }
20856
20857 n = end - beg;
20858 str_copy(name, beg, n);
20859 s = RSTRING_PTR(name);
20860 for (i = 0; i < n; ++i) {
20861 if (s[i] == '-') s[i] = '_';
20862 }
20863 do {
20864 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20865 n = vend - vbeg;
20866 if (mc->length) {
20867 n = (*mc->length)(p, vbeg, n);
20868 }
20869 str_copy(val, vbeg, n);
20870 p->lex.ptok = tok_beg;
20871 p->lex.pcur = tok_end;
20872 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20873 break;
20874 }
20875 } while (++mc < magic_comments + numberof(magic_comments));
20876#ifdef RIPPER
20877 str_copy(val, vbeg, vend - vbeg);
20878 dispatch2(magic_comment, name, val);
20879#endif
20880 }
20881
20882 return TRUE;
20883}
20884
20885static void
20886set_file_encoding(struct parser_params *p, const char *str, const char *send)
20887{
20888 int sep = 0;
20889 const char *beg = str;
20890 VALUE s;
20891
20892 for (;;) {
20893 if (send - str <= 6) return;
20894 switch (str[6]) {
20895 case 'C': case 'c': str += 6; continue;
20896 case 'O': case 'o': str += 5; continue;
20897 case 'D': case 'd': str += 4; continue;
20898 case 'I': case 'i': str += 3; continue;
20899 case 'N': case 'n': str += 2; continue;
20900 case 'G': case 'g': str += 1; continue;
20901 case '=': case ':':
20902 sep = 1;
20903 str += 6;
20904 break;
20905 default:
20906 str += 6;
20907 if (ISSPACE(*str)) break;
20908 continue;
20909 }
20910 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20911 sep = 0;
20912 }
20913 for (;;) {
20914 do {
20915 if (++str >= send) return;
20916 } while (ISSPACE(*str));
20917 if (sep) break;
20918 if (*str != '=' && *str != ':') return;
20919 sep = 1;
20920 str++;
20921 }
20922 beg = str;
20923 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
20924 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
20925 p->lex.ptok = beg;
20926 p->lex.pcur = str;
20927 parser_set_encode(p, RSTRING_PTR(s));
20928 rb_str_resize(s, 0);
20929}
20930
20931static void
20932parser_prepare(struct parser_params *p)
20933{
20934 int c = nextc0(p, FALSE);
20935 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
20936 switch (c) {
20937 case '#':
20938 if (peek(p, '!')) p->has_shebang = 1;
20939 break;
20940 case 0xef: /* UTF-8 BOM marker */
20941 if (!lex_eol_n_p(p, 2) &&
20942 (unsigned char)p->lex.pcur[0] == 0xbb &&
20943 (unsigned char)p->lex.pcur[1] == 0xbf) {
20944 p->enc = rb_utf8_encoding();
20945 p->lex.pcur += 2;
20946#ifndef RIPPER
20947 if (p->debug_lines) {
20948 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
20949 }
20950#endif
20951 p->lex.pbeg = p->lex.pcur;
20952 token_flush(p);
20953 return;
20954 }
20955 break;
20956 case -1: /* end of script. */
20957 return;
20958 }
20959 pushback(p, c);
20960 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
20961}
20962
20963#ifndef RIPPER
20964#define ambiguous_operator(tok, op, syn) ( \
20965 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
20966 rb_warning0("even though it seems like "syn""))
20967#else
20968#define ambiguous_operator(tok, op, syn) \
20969 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
20970#endif
20971#define warn_balanced(tok, op, syn) ((void) \
20972 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
20973 space_seen && !ISSPACE(c) && \
20974 (ambiguous_operator(tok, op, syn), 0)), \
20975 (enum yytokentype)(tok))
20976
20977static enum yytokentype
20978no_digits(struct parser_params *p)
20979{
20980 yyerror0("numeric literal without digits");
20981 if (peek(p, '_')) nextc(p);
20982 /* dummy 0, for tUMINUS_NUM at numeric */
20983 return set_number_literal(p, tINTEGER, 0, 10, 0);
20984}
20985
20986static enum yytokentype
20987parse_numeric(struct parser_params *p, int c)
20988{
20989 int is_float, seen_point, seen_e, nondigit;
20990 int suffix;
20991
20992 is_float = seen_point = seen_e = nondigit = 0;
20993 SET_LEX_STATE(EXPR_END);
20994 newtok(p);
20995 if (c == '-' || c == '+') {
20996 tokadd(p, c);
20997 c = nextc(p);
20998 }
20999 if (c == '0') {
21000 int start = toklen(p);
21001 c = nextc(p);
21002 if (c == 'x' || c == 'X') {
21003 /* hexadecimal */
21004 c = nextc(p);
21005 if (c != -1 && ISXDIGIT(c)) {
21006 do {
21007 if (c == '_') {
21008 if (nondigit) break;
21009 nondigit = c;
21010 continue;
21011 }
21012 if (!ISXDIGIT(c)) break;
21013 nondigit = 0;
21014 tokadd(p, c);
21015 } while ((c = nextc(p)) != -1);
21016 }
21017 pushback(p, c);
21018 tokfix(p);
21019 if (toklen(p) == start) {
21020 return no_digits(p);
21021 }
21022 else if (nondigit) goto trailing_uc;
21023 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21024 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21025 }
21026 if (c == 'b' || c == 'B') {
21027 /* binary */
21028 c = nextc(p);
21029 if (c == '0' || c == '1') {
21030 do {
21031 if (c == '_') {
21032 if (nondigit) break;
21033 nondigit = c;
21034 continue;
21035 }
21036 if (c != '0' && c != '1') break;
21037 nondigit = 0;
21038 tokadd(p, c);
21039 } while ((c = nextc(p)) != -1);
21040 }
21041 pushback(p, c);
21042 tokfix(p);
21043 if (toklen(p) == start) {
21044 return no_digits(p);
21045 }
21046 else if (nondigit) goto trailing_uc;
21047 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21048 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21049 }
21050 if (c == 'd' || c == 'D') {
21051 /* decimal */
21052 c = nextc(p);
21053 if (c != -1 && ISDIGIT(c)) {
21054 do {
21055 if (c == '_') {
21056 if (nondigit) break;
21057 nondigit = c;
21058 continue;
21059 }
21060 if (!ISDIGIT(c)) break;
21061 nondigit = 0;
21062 tokadd(p, c);
21063 } while ((c = nextc(p)) != -1);
21064 }
21065 pushback(p, c);
21066 tokfix(p);
21067 if (toklen(p) == start) {
21068 return no_digits(p);
21069 }
21070 else if (nondigit) goto trailing_uc;
21071 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21072 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21073 }
21074 if (c == '_') {
21075 /* 0_0 */
21076 goto octal_number;
21077 }
21078 if (c == 'o' || c == 'O') {
21079 /* prefixed octal */
21080 c = nextc(p);
21081 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21082 tokfix(p);
21083 return no_digits(p);
21084 }
21085 }
21086 if (c >= '0' && c <= '7') {
21087 /* octal */
21088 octal_number:
21089 do {
21090 if (c == '_') {
21091 if (nondigit) break;
21092 nondigit = c;
21093 continue;
21094 }
21095 if (c < '0' || c > '9') break;
21096 if (c > '7') goto invalid_octal;
21097 nondigit = 0;
21098 tokadd(p, c);
21099 } while ((c = nextc(p)) != -1);
21100 if (toklen(p) > start) {
21101 pushback(p, c);
21102 tokfix(p);
21103 if (nondigit) goto trailing_uc;
21104 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21105 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21106 }
21107 if (nondigit) {
21108 pushback(p, c);
21109 goto trailing_uc;
21110 }
21111 }
21112 if (c > '7' && c <= '9') {
21113 invalid_octal:
21114 yyerror0("Invalid octal digit");
21115 }
21116 else if (c == '.' || c == 'e' || c == 'E') {
21117 tokadd(p, '0');
21118 }
21119 else {
21120 pushback(p, c);
21121 tokfix(p);
21122 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21123 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21124 }
21125 }
21126
21127 for (;;) {
21128 switch (c) {
21129 case '0': case '1': case '2': case '3': case '4':
21130 case '5': case '6': case '7': case '8': case '9':
21131 nondigit = 0;
21132 tokadd(p, c);
21133 break;
21134
21135 case '.':
21136 if (nondigit) goto trailing_uc;
21137 if (seen_point || seen_e) {
21138 goto decode_num;
21139 }
21140 else {
21141 int c0 = nextc(p);
21142 if (c0 == -1 || !ISDIGIT(c0)) {
21143 pushback(p, c0);
21144 goto decode_num;
21145 }
21146 c = c0;
21147 }
21148 seen_point = toklen(p);
21149 tokadd(p, '.');
21150 tokadd(p, c);
21151 is_float++;
21152 nondigit = 0;
21153 break;
21154
21155 case 'e':
21156 case 'E':
21157 if (nondigit) {
21158 pushback(p, c);
21159 c = nondigit;
21160 goto decode_num;
21161 }
21162 if (seen_e) {
21163 goto decode_num;
21164 }
21165 nondigit = c;
21166 c = nextc(p);
21167 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21168 pushback(p, c);
21169 c = nondigit;
21170 nondigit = 0;
21171 goto decode_num;
21172 }
21173 tokadd(p, nondigit);
21174 seen_e++;
21175 is_float++;
21176 tokadd(p, c);
21177 nondigit = (c == '-' || c == '+') ? c : 0;
21178 break;
21179
21180 case '_': /* `_' in number just ignored */
21181 if (nondigit) goto decode_num;
21182 nondigit = c;
21183 break;
21184
21185 default:
21186 goto decode_num;
21187 }
21188 c = nextc(p);
21189 }
21190
21191 decode_num:
21192 pushback(p, c);
21193 if (nondigit) {
21194 trailing_uc:
21195 literal_flush(p, p->lex.pcur - 1);
21196 YYLTYPE loc = RUBY_INIT_YYLLOC();
21197 compile_error(p, "trailing '%c' in number", nondigit);
21198 parser_show_error_line(p, &loc);
21199 }
21200 tokfix(p);
21201 if (is_float) {
21202 enum yytokentype type = tFLOAT;
21203
21204 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21205 if (suffix & NUM_SUFFIX_R) {
21206 type = tRATIONAL;
21207 }
21208 else {
21209 strtod(tok(p), 0);
21210 if (errno == ERANGE) {
21211 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21212 errno = 0;
21213 }
21214 }
21215 return set_number_literal(p, type, suffix, 0, seen_point);
21216 }
21217 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21218 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21219}
21220
21221static enum yytokentype
21222parse_qmark(struct parser_params *p, int space_seen)
21223{
21224 rb_encoding *enc;
21225 register int c;
21226 rb_parser_string_t *lit;
21227 const char *start = p->lex.pcur;
21228
21229 if (IS_END()) {
21230 SET_LEX_STATE(EXPR_VALUE);
21231 return '?';
21232 }
21233 c = nextc(p);
21234 if (c == -1) {
21235 compile_error(p, "incomplete character syntax");
21236 return 0;
21237 }
21238 if (rb_enc_isspace(c, p->enc)) {
21239 if (!IS_ARG()) {
21240 int c2 = escaped_control_code(c);
21241 if (c2) {
21242 WARN_SPACE_CHAR(c2, "?");
21243 }
21244 }
21245 ternary:
21246 pushback(p, c);
21247 SET_LEX_STATE(EXPR_VALUE);
21248 return '?';
21249 }
21250 newtok(p);
21251 enc = p->enc;
21252 int w = parser_precise_mbclen(p, start);
21253 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21254 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21255 if (space_seen) {
21256 const char *ptr = start;
21257 do {
21258 int n = parser_precise_mbclen(p, ptr);
21259 if (n < 0) return -1;
21260 ptr += n;
21261 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21262 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21263 " a conditional operator, put a space after '?'",
21264 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21265 }
21266 goto ternary;
21267 }
21268 else if (c == '\\') {
21269 if (peek(p, 'u')) {
21270 nextc(p);
21271 enc = rb_utf8_encoding();
21272 tokadd_utf8(p, &enc, -1, 0, 0);
21273 }
21274 else if (!ISASCII(c = peekc(p)) && c != -1) {
21275 nextc(p);
21276 if (tokadd_mbchar(p, c) == -1) return 0;
21277 }
21278 else {
21279 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21280 tokadd(p, c);
21281 }
21282 }
21283 else {
21284 if (tokadd_mbchar(p, c) == -1) return 0;
21285 }
21286 tokfix(p);
21287 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21288 set_yylval_str(lit);
21289 SET_LEX_STATE(EXPR_END);
21290 return tCHAR;
21291}
21292
21293static enum yytokentype
21294parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21295{
21296 register int c;
21297 const char *ptok = p->lex.pcur;
21298
21299 if (IS_BEG()) {
21300 int term;
21301 int paren;
21302
21303 c = nextc(p);
21304 quotation:
21305 if (c == -1) goto unterminated;
21306 if (!ISALNUM(c)) {
21307 term = c;
21308 if (!ISASCII(c)) goto unknown;
21309 c = 'Q';
21310 }
21311 else {
21312 term = nextc(p);
21313 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21314 unknown:
21315 pushback(p, term);
21316 c = parser_precise_mbclen(p, p->lex.pcur);
21317 if (c < 0) return 0;
21318 p->lex.pcur += c;
21319 yyerror0("unknown type of %string");
21320 return 0;
21321 }
21322 }
21323 if (term == -1) {
21324 unterminated:
21325 compile_error(p, "unterminated quoted string meets end of file");
21326 return 0;
21327 }
21328 paren = term;
21329 if (term == '(') term = ')';
21330 else if (term == '[') term = ']';
21331 else if (term == '{') term = '}';
21332 else if (term == '<') term = '>';
21333 else paren = 0;
21334
21335 p->lex.ptok = ptok-1;
21336 switch (c) {
21337 case 'Q':
21338 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21339 return tSTRING_BEG;
21340
21341 case 'q':
21342 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21343 return tSTRING_BEG;
21344
21345 case 'W':
21346 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21347 return tWORDS_BEG;
21348
21349 case 'w':
21350 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21351 return tQWORDS_BEG;
21352
21353 case 'I':
21354 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21355 return tSYMBOLS_BEG;
21356
21357 case 'i':
21358 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21359 return tQSYMBOLS_BEG;
21360
21361 case 'x':
21362 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21363 return tXSTRING_BEG;
21364
21365 case 'r':
21366 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21367 return tREGEXP_BEG;
21368
21369 case 's':
21370 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21371 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21372 return tSYMBEG;
21373
21374 default:
21375 yyerror0("unknown type of %string");
21376 return 0;
21377 }
21378 }
21379 if ((c = nextc(p)) == '=') {
21380 set_yylval_id('%');
21381 SET_LEX_STATE(EXPR_BEG);
21382 return tOP_ASGN;
21383 }
21384 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21385 goto quotation;
21386 }
21387 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21388 pushback(p, c);
21389 return warn_balanced('%', "%%", "string literal");
21390}
21391
21392static int
21393tokadd_ident(struct parser_params *p, int c)
21394{
21395 do {
21396 if (tokadd_mbchar(p, c) == -1) return -1;
21397 c = nextc(p);
21398 } while (parser_is_identchar(p));
21399 pushback(p, c);
21400 return 0;
21401}
21402
21403static ID
21404tokenize_ident(struct parser_params *p)
21405{
21406 ID ident = TOK_INTERN();
21407
21408 set_yylval_name(ident);
21409
21410 return ident;
21411}
21412
21413static int
21414parse_numvar(struct parser_params *p)
21415{
21416 size_t len;
21417 int overflow;
21418 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21419 const unsigned long nth_ref_max =
21421 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21422 * turned into a Fixnum, in compile.c */
21423
21424 if (overflow || n > nth_ref_max) {
21425 /* compile_error()? */
21426 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21427 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21428 }
21429 else {
21430 return (int)n;
21431 }
21432}
21433
21434static enum yytokentype
21435parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21436{
21437 const char *ptr = p->lex.pcur;
21438 register int c;
21439
21440 SET_LEX_STATE(EXPR_END);
21441 p->lex.ptok = ptr - 1; /* from '$' */
21442 newtok(p);
21443 c = nextc(p);
21444 switch (c) {
21445 case '_': /* $_: last read line string */
21446 c = nextc(p);
21447 if (parser_is_identchar(p)) {
21448 tokadd(p, '$');
21449 tokadd(p, '_');
21450 break;
21451 }
21452 pushback(p, c);
21453 c = '_';
21454 /* fall through */
21455 case '~': /* $~: match-data */
21456 case '*': /* $*: argv */
21457 case '$': /* $$: pid */
21458 case '?': /* $?: last status */
21459 case '!': /* $!: error string */
21460 case '@': /* $@: error position */
21461 case '/': /* $/: input record separator */
21462 case '\\': /* $\: output record separator */
21463 case ';': /* $;: field separator */
21464 case ',': /* $,: output field separator */
21465 case '.': /* $.: last read line number */
21466 case '=': /* $=: ignorecase */
21467 case ':': /* $:: load path */
21468 case '<': /* $<: default input handle */
21469 case '>': /* $>: default output handle */
21470 case '\"': /* $": already loaded files */
21471 tokadd(p, '$');
21472 tokadd(p, c);
21473 goto gvar;
21474
21475 case '-':
21476 tokadd(p, '$');
21477 tokadd(p, c);
21478 c = nextc(p);
21479 if (parser_is_identchar(p)) {
21480 if (tokadd_mbchar(p, c) == -1) return 0;
21481 }
21482 else {
21483 pushback(p, c);
21484 pushback(p, '-');
21485 return '$';
21486 }
21487 gvar:
21488 tokenize_ident(p);
21489 return tGVAR;
21490
21491 case '&': /* $&: last match */
21492 case '`': /* $`: string before last match */
21493 case '\'': /* $': string after last match */
21494 case '+': /* $+: string matches last paren. */
21495 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21496 tokadd(p, '$');
21497 tokadd(p, c);
21498 goto gvar;
21499 }
21500 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21501 return tBACK_REF;
21502
21503 case '1': case '2': case '3':
21504 case '4': case '5': case '6':
21505 case '7': case '8': case '9':
21506 tokadd(p, '$');
21507 do {
21508 tokadd(p, c);
21509 c = nextc(p);
21510 } while (c != -1 && ISDIGIT(c));
21511 pushback(p, c);
21512 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21513 tokfix(p);
21514 c = parse_numvar(p);
21515 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21516 return tNTH_REF;
21517
21518 default:
21519 if (!parser_is_identchar(p)) {
21520 YYLTYPE loc = RUBY_INIT_YYLLOC();
21521 if (c == -1 || ISSPACE(c)) {
21522 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21523 }
21524 else {
21525 pushback(p, c);
21526 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21527 }
21528 parser_show_error_line(p, &loc);
21529 set_yylval_noname();
21530 return tGVAR;
21531 }
21532 /* fall through */
21533 case '0':
21534 tokadd(p, '$');
21535 }
21536
21537 if (tokadd_ident(p, c)) return 0;
21538 SET_LEX_STATE(EXPR_END);
21539 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21540 tokenize_ident(p);
21541 }
21542 else {
21543 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21544 set_yylval_noname();
21545 }
21546 return tGVAR;
21547}
21548
21549static bool
21550parser_numbered_param(struct parser_params *p, int n)
21551{
21552 if (n < 0) return false;
21553
21554 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21555 return false;
21556 }
21557 if (p->max_numparam == ORDINAL_PARAM) {
21558 compile_error(p, "ordinary parameter is defined");
21559 return false;
21560 }
21561 struct vtable *args = p->lvtbl->args;
21562 if (p->max_numparam < n) {
21563 p->max_numparam = n;
21564 }
21565 while (n > args->pos) {
21566 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21567 }
21568 return true;
21569}
21570
21571static enum yytokentype
21572parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21573{
21574 const char *ptr = p->lex.pcur;
21575 enum yytokentype result = tIVAR;
21576 register int c = nextc(p);
21577 YYLTYPE loc;
21578
21579 p->lex.ptok = ptr - 1; /* from '@' */
21580 newtok(p);
21581 tokadd(p, '@');
21582 if (c == '@') {
21583 result = tCVAR;
21584 tokadd(p, '@');
21585 c = nextc(p);
21586 }
21587 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21588 if (c == -1 || !parser_is_identchar(p)) {
21589 pushback(p, c);
21590 RUBY_SET_YYLLOC(loc);
21591 if (result == tIVAR) {
21592 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21593 }
21594 else {
21595 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21596 }
21597 parser_show_error_line(p, &loc);
21598 set_yylval_noname();
21599 SET_LEX_STATE(EXPR_END);
21600 return result;
21601 }
21602 else if (ISDIGIT(c)) {
21603 pushback(p, c);
21604 RUBY_SET_YYLLOC(loc);
21605 if (result == tIVAR) {
21606 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21607 }
21608 else {
21609 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21610 }
21611 parser_show_error_line(p, &loc);
21612 set_yylval_noname();
21613 SET_LEX_STATE(EXPR_END);
21614 return result;
21615 }
21616
21617 if (tokadd_ident(p, c)) return 0;
21618 tokenize_ident(p);
21619 return result;
21620}
21621
21622static enum yytokentype
21623parse_ident(struct parser_params *p, int c, int cmd_state)
21624{
21625 enum yytokentype result;
21626 bool is_ascii = true;
21627 const enum lex_state_e last_state = p->lex.state;
21628 ID ident;
21629 int enforce_keyword_end = 0;
21630
21631 do {
21632 if (!ISASCII(c)) is_ascii = false;
21633 if (tokadd_mbchar(p, c) == -1) return 0;
21634 c = nextc(p);
21635 } while (parser_is_identchar(p));
21636 if ((c == '!' || c == '?') && !peek(p, '=')) {
21637 result = tFID;
21638 tokadd(p, c);
21639 }
21640 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21641 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21642 result = tIDENTIFIER;
21643 tokadd(p, c);
21644 }
21645 else {
21646 result = tCONSTANT; /* assume provisionally */
21647 pushback(p, c);
21648 }
21649 tokfix(p);
21650
21651 if (IS_LABEL_POSSIBLE()) {
21652 if (IS_LABEL_SUFFIX(0)) {
21653 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21654 nextc(p);
21655 tokenize_ident(p);
21656 return tLABEL;
21657 }
21658 }
21659
21660#ifndef RIPPER
21661 if (peek_end_expect_token_locations(p)) {
21662 const rb_code_position_t *end_pos;
21663 int lineno, column;
21664 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21665
21666 end_pos = peek_end_expect_token_locations(p)->pos;
21667 lineno = end_pos->lineno;
21668 column = end_pos->column;
21669
21670 if (p->debug) {
21671 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21672 p->ruby_sourceline, beg_pos, lineno, column);
21673 }
21674
21675 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21676 const struct kwtable *kw;
21677
21678 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21679 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21680 enforce_keyword_end = 1;
21681 }
21682 }
21683 }
21684#endif
21685
21686 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21687 const struct kwtable *kw;
21688
21689 /* See if it is a reserved word. */
21690 kw = rb_reserved_word(tok(p), toklen(p));
21691 if (kw) {
21692 enum lex_state_e state = p->lex.state;
21693 if (IS_lex_state_for(state, EXPR_FNAME)) {
21694 SET_LEX_STATE(EXPR_ENDFN);
21695 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21696 return kw->id[0];
21697 }
21698 SET_LEX_STATE(kw->state);
21699 if (IS_lex_state(EXPR_BEG)) {
21700 p->command_start = TRUE;
21701 }
21702 if (kw->id[0] == keyword_do) {
21703 if (lambda_beginning_p()) {
21704 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21705 return keyword_do_LAMBDA;
21706 }
21707 if (COND_P()) return keyword_do_cond;
21708 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21709 return keyword_do_block;
21710 return keyword_do;
21711 }
21712 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21713 return kw->id[0];
21714 else {
21715 if (kw->id[0] != kw->id[1])
21716 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21717 return kw->id[1];
21718 }
21719 }
21720 }
21721
21722 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21723 if (cmd_state) {
21724 SET_LEX_STATE(EXPR_CMDARG);
21725 }
21726 else {
21727 SET_LEX_STATE(EXPR_ARG);
21728 }
21729 }
21730 else if (p->lex.state == EXPR_FNAME) {
21731 SET_LEX_STATE(EXPR_ENDFN);
21732 }
21733 else {
21734 SET_LEX_STATE(EXPR_END);
21735 }
21736
21737 ident = tokenize_ident(p);
21738 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21739 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21740 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21741 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21742 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21743 }
21744 return result;
21745}
21746
21747static void
21748warn_cr(struct parser_params *p)
21749{
21750 if (!p->cr_seen) {
21751 p->cr_seen = TRUE;
21752 /* carried over with p->lex.nextline for nextc() */
21753 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21754 }
21755}
21756
21757static enum yytokentype
21758parser_yylex(struct parser_params *p)
21759{
21760 register int c;
21761 int space_seen = 0;
21762 int cmd_state;
21763 int label;
21764 enum lex_state_e last_state;
21765 int fallthru = FALSE;
21766 int token_seen = p->token_seen;
21767
21768 if (p->lex.strterm) {
21769 if (strterm_is_heredoc(p->lex.strterm)) {
21770 token_flush(p);
21771 return here_document(p, &p->lex.strterm->u.heredoc);
21772 }
21773 else {
21774 token_flush(p);
21775 return parse_string(p, &p->lex.strterm->u.literal);
21776 }
21777 }
21778 cmd_state = p->command_start;
21779 p->command_start = FALSE;
21780 p->token_seen = TRUE;
21781#ifndef RIPPER
21782 token_flush(p);
21783#endif
21784 retry:
21785 last_state = p->lex.state;
21786 switch (c = nextc(p)) {
21787 case '\0': /* NUL */
21788 case '\004': /* ^D */
21789 case '\032': /* ^Z */
21790 case -1: /* end of script. */
21791 p->eofp = 1;
21792#ifndef RIPPER
21793 if (p->end_expect_token_locations) {
21794 pop_end_expect_token_locations(p);
21795 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21796 return tDUMNY_END;
21797 }
21798#endif
21799 /* Set location for end-of-input because dispatch_scan_event is not called. */
21800 RUBY_SET_YYLLOC(*p->yylloc);
21801 return END_OF_INPUT;
21802
21803 /* white spaces */
21804 case '\r':
21805 warn_cr(p);
21806 /* fall through */
21807 case ' ': case '\t': case '\f':
21808 case '\13': /* '\v' */
21809 space_seen = 1;
21810 while ((c = nextc(p))) {
21811 switch (c) {
21812 case '\r':
21813 warn_cr(p);
21814 /* fall through */
21815 case ' ': case '\t': case '\f':
21816 case '\13': /* '\v' */
21817 break;
21818 default:
21819 goto outofloop;
21820 }
21821 }
21822 outofloop:
21823 pushback(p, c);
21824 dispatch_scan_event(p, tSP);
21825#ifndef RIPPER
21826 token_flush(p);
21827#endif
21828 goto retry;
21829
21830 case '#': /* it's a comment */
21831 p->token_seen = token_seen;
21832 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21833 /* no magic_comment in shebang line */
21834 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21835 if (comment_at_top(p)) {
21836 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21837 }
21838 }
21839 p->lex.pcur = pcur, p->lex.ptok = ptok;
21840 lex_goto_eol(p);
21841 dispatch_scan_event(p, tCOMMENT);
21842 fallthru = TRUE;
21843 /* fall through */
21844 case '\n':
21845 p->token_seen = token_seen;
21846 rb_parser_string_t *prevline = p->lex.lastline;
21847 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21848 !IS_lex_state(EXPR_LABELED));
21849 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21850 if (!fallthru) {
21851 dispatch_scan_event(p, tIGNORED_NL);
21852 }
21853 fallthru = FALSE;
21854 if (!c && p->ctxt.in_kwarg) {
21855 goto normal_newline;
21856 }
21857 goto retry;
21858 }
21859 while (1) {
21860 switch (c = nextc(p)) {
21861 case ' ': case '\t': case '\f': case '\r':
21862 case '\13': /* '\v' */
21863 space_seen = 1;
21864 break;
21865 case '#':
21866 pushback(p, c);
21867 if (space_seen) {
21868 dispatch_scan_event(p, tSP);
21869 token_flush(p);
21870 }
21871 goto retry;
21872 case 'a':
21873 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
21874 goto bol;
21875 case 'o':
21876 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
21877 goto bol;
21878 case '|':
21879 if (peek(p, '|')) goto leading_logical;
21880 goto bol;
21881 case '&':
21882 if (peek(p, '&')) {
21883 leading_logical:
21884 pushback(p, c);
21885 dispatch_delayed_token(p, tIGNORED_NL);
21886 cmd_state = FALSE;
21887 goto retry;
21888 }
21889 /* fall through */
21890 case '.': {
21891 dispatch_delayed_token(p, tIGNORED_NL);
21892 if (peek(p, '.') == (c == '&')) {
21893 pushback(p, c);
21894 dispatch_scan_event(p, tSP);
21895 goto retry;
21896 }
21897 }
21898 bol:
21899 default:
21900 p->ruby_sourceline--;
21901 p->lex.nextline = p->lex.lastline;
21902 set_lastline(p, prevline);
21903 case -1: /* EOF no decrement*/
21904 if (c == -1 && space_seen) {
21905 dispatch_scan_event(p, tSP);
21906 }
21907 lex_goto_eol(p);
21908 if (c != -1) {
21909 token_flush(p);
21910 RUBY_SET_YYLLOC(*p->yylloc);
21911 }
21912 goto normal_newline;
21913 }
21914 }
21915 normal_newline:
21916 p->command_start = TRUE;
21917 SET_LEX_STATE(EXPR_BEG);
21918 return '\n';
21919
21920 case '*':
21921 if ((c = nextc(p)) == '*') {
21922 if ((c = nextc(p)) == '=') {
21923 set_yylval_id(idPow);
21924 SET_LEX_STATE(EXPR_BEG);
21925 return tOP_ASGN;
21926 }
21927 pushback(p, c);
21928 if (IS_SPCARG(c)) {
21929 rb_warning0("'**' interpreted as argument prefix");
21930 c = tDSTAR;
21931 }
21932 else if (IS_BEG()) {
21933 c = tDSTAR;
21934 }
21935 else {
21936 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
21937 }
21938 }
21939 else {
21940 if (c == '=') {
21941 set_yylval_id('*');
21942 SET_LEX_STATE(EXPR_BEG);
21943 return tOP_ASGN;
21944 }
21945 pushback(p, c);
21946 if (IS_SPCARG(c)) {
21947 rb_warning0("'*' interpreted as argument prefix");
21948 c = tSTAR;
21949 }
21950 else if (IS_BEG()) {
21951 c = tSTAR;
21952 }
21953 else {
21954 c = warn_balanced('*', "*", "argument prefix");
21955 }
21956 }
21957 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21958 return c;
21959
21960 case '!':
21961 c = nextc(p);
21962 if (IS_AFTER_OPERATOR()) {
21963 SET_LEX_STATE(EXPR_ARG);
21964 if (c == '@') {
21965 return '!';
21966 }
21967 }
21968 else {
21969 SET_LEX_STATE(EXPR_BEG);
21970 }
21971 if (c == '=') {
21972 return tNEQ;
21973 }
21974 if (c == '~') {
21975 return tNMATCH;
21976 }
21977 pushback(p, c);
21978 return '!';
21979
21980 case '=':
21981 if (was_bol(p)) {
21982 /* skip embedded rd document */
21983 if (word_match_p(p, "begin", 5)) {
21984 int first_p = TRUE;
21985
21986 lex_goto_eol(p);
21987 dispatch_scan_event(p, tEMBDOC_BEG);
21988 for (;;) {
21989 lex_goto_eol(p);
21990 if (!first_p) {
21991 dispatch_scan_event(p, tEMBDOC);
21992 }
21993 first_p = FALSE;
21994 c = nextc(p);
21995 if (c == -1) {
21996 compile_error(p, "embedded document meets end of file");
21997 return END_OF_INPUT;
21998 }
21999 if (c == '=' && word_match_p(p, "end", 3)) {
22000 break;
22001 }
22002 pushback(p, c);
22003 }
22004 lex_goto_eol(p);
22005 dispatch_scan_event(p, tEMBDOC_END);
22006 goto retry;
22007 }
22008 }
22009
22010 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22011 if ((c = nextc(p)) == '=') {
22012 if ((c = nextc(p)) == '=') {
22013 return tEQQ;
22014 }
22015 pushback(p, c);
22016 return tEQ;
22017 }
22018 if (c == '~') {
22019 return tMATCH;
22020 }
22021 else if (c == '>') {
22022 return tASSOC;
22023 }
22024 pushback(p, c);
22025 return '=';
22026
22027 case '<':
22028 c = nextc(p);
22029 if (c == '<' &&
22030 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22031 !IS_END() &&
22032 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22033 enum yytokentype token = heredoc_identifier(p);
22034 if (token) return token < 0 ? 0 : token;
22035 }
22036 if (IS_AFTER_OPERATOR()) {
22037 SET_LEX_STATE(EXPR_ARG);
22038 }
22039 else {
22040 if (IS_lex_state(EXPR_CLASS))
22041 p->command_start = TRUE;
22042 SET_LEX_STATE(EXPR_BEG);
22043 }
22044 if (c == '=') {
22045 if ((c = nextc(p)) == '>') {
22046 return tCMP;
22047 }
22048 pushback(p, c);
22049 return tLEQ;
22050 }
22051 if (c == '<') {
22052 if ((c = nextc(p)) == '=') {
22053 set_yylval_id(idLTLT);
22054 SET_LEX_STATE(EXPR_BEG);
22055 return tOP_ASGN;
22056 }
22057 pushback(p, c);
22058 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22059 }
22060 pushback(p, c);
22061 return '<';
22062
22063 case '>':
22064 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22065 if ((c = nextc(p)) == '=') {
22066 return tGEQ;
22067 }
22068 if (c == '>') {
22069 if ((c = nextc(p)) == '=') {
22070 set_yylval_id(idGTGT);
22071 SET_LEX_STATE(EXPR_BEG);
22072 return tOP_ASGN;
22073 }
22074 pushback(p, c);
22075 return tRSHFT;
22076 }
22077 pushback(p, c);
22078 return '>';
22079
22080 case '"':
22081 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22082 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22083 p->lex.ptok = p->lex.pcur-1;
22084 return tSTRING_BEG;
22085
22086 case '`':
22087 if (IS_lex_state(EXPR_FNAME)) {
22088 SET_LEX_STATE(EXPR_ENDFN);
22089 return c;
22090 }
22091 if (IS_lex_state(EXPR_DOT)) {
22092 if (cmd_state)
22093 SET_LEX_STATE(EXPR_CMDARG);
22094 else
22095 SET_LEX_STATE(EXPR_ARG);
22096 return c;
22097 }
22098 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22099 return tXSTRING_BEG;
22100
22101 case '\'':
22102 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22103 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22104 p->lex.ptok = p->lex.pcur-1;
22105 return tSTRING_BEG;
22106
22107 case '?':
22108 return parse_qmark(p, space_seen);
22109
22110 case '&':
22111 if ((c = nextc(p)) == '&') {
22112 SET_LEX_STATE(EXPR_BEG);
22113 if ((c = nextc(p)) == '=') {
22114 set_yylval_id(idANDOP);
22115 SET_LEX_STATE(EXPR_BEG);
22116 return tOP_ASGN;
22117 }
22118 pushback(p, c);
22119 return tANDOP;
22120 }
22121 else if (c == '=') {
22122 set_yylval_id('&');
22123 SET_LEX_STATE(EXPR_BEG);
22124 return tOP_ASGN;
22125 }
22126 else if (c == '.') {
22127 set_yylval_id(idANDDOT);
22128 SET_LEX_STATE(EXPR_DOT);
22129 return tANDDOT;
22130 }
22131 pushback(p, c);
22132 if (IS_SPCARG(c)) {
22133 if ((c != ':') ||
22134 (c = peekc_n(p, 1)) == -1 ||
22135 !(c == '\'' || c == '"' ||
22136 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22137 rb_warning0("'&' interpreted as argument prefix");
22138 }
22139 c = tAMPER;
22140 }
22141 else if (IS_BEG()) {
22142 c = tAMPER;
22143 }
22144 else {
22145 c = warn_balanced('&', "&", "argument prefix");
22146 }
22147 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22148 return c;
22149
22150 case '|':
22151 if ((c = nextc(p)) == '|') {
22152 SET_LEX_STATE(EXPR_BEG);
22153 if ((c = nextc(p)) == '=') {
22154 set_yylval_id(idOROP);
22155 SET_LEX_STATE(EXPR_BEG);
22156 return tOP_ASGN;
22157 }
22158 pushback(p, c);
22159 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22160 c = '|';
22161 pushback(p, '|');
22162 return c;
22163 }
22164 return tOROP;
22165 }
22166 if (c == '=') {
22167 set_yylval_id('|');
22168 SET_LEX_STATE(EXPR_BEG);
22169 return tOP_ASGN;
22170 }
22171 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22172 pushback(p, c);
22173 return '|';
22174
22175 case '+':
22176 c = nextc(p);
22177 if (IS_AFTER_OPERATOR()) {
22178 SET_LEX_STATE(EXPR_ARG);
22179 if (c == '@') {
22180 return tUPLUS;
22181 }
22182 pushback(p, c);
22183 return '+';
22184 }
22185 if (c == '=') {
22186 set_yylval_id('+');
22187 SET_LEX_STATE(EXPR_BEG);
22188 return tOP_ASGN;
22189 }
22190 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22191 SET_LEX_STATE(EXPR_BEG);
22192 pushback(p, c);
22193 if (c != -1 && ISDIGIT(c)) {
22194 return parse_numeric(p, '+');
22195 }
22196 return tUPLUS;
22197 }
22198 SET_LEX_STATE(EXPR_BEG);
22199 pushback(p, c);
22200 return warn_balanced('+', "+", "unary operator");
22201
22202 case '-':
22203 c = nextc(p);
22204 if (IS_AFTER_OPERATOR()) {
22205 SET_LEX_STATE(EXPR_ARG);
22206 if (c == '@') {
22207 return tUMINUS;
22208 }
22209 pushback(p, c);
22210 return '-';
22211 }
22212 if (c == '=') {
22213 set_yylval_id('-');
22214 SET_LEX_STATE(EXPR_BEG);
22215 return tOP_ASGN;
22216 }
22217 if (c == '>') {
22218 SET_LEX_STATE(EXPR_ENDFN);
22219 yylval.num = p->lex.lpar_beg;
22220 p->lex.lpar_beg = p->lex.paren_nest;
22221 return tLAMBDA;
22222 }
22223 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22224 SET_LEX_STATE(EXPR_BEG);
22225 pushback(p, c);
22226 if (c != -1 && ISDIGIT(c)) {
22227 return tUMINUS_NUM;
22228 }
22229 return tUMINUS;
22230 }
22231 SET_LEX_STATE(EXPR_BEG);
22232 pushback(p, c);
22233 return warn_balanced('-', "-", "unary operator");
22234
22235 case '.': {
22236 int is_beg = IS_BEG();
22237 SET_LEX_STATE(EXPR_BEG);
22238 if ((c = nextc(p)) == '.') {
22239 if ((c = nextc(p)) == '.') {
22240 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22241 SET_LEX_STATE(EXPR_ENDARG);
22242 return tBDOT3;
22243 }
22244 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22245 rb_warn0("... at EOL, should be parenthesized?");
22246 }
22247 return is_beg ? tBDOT3 : tDOT3;
22248 }
22249 pushback(p, c);
22250 return is_beg ? tBDOT2 : tDOT2;
22251 }
22252 pushback(p, c);
22253 if (c != -1 && ISDIGIT(c)) {
22254 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22255 parse_numeric(p, '.');
22256 if (ISDIGIT(prev)) {
22257 yyerror0("unexpected fraction part after numeric literal");
22258 }
22259 else {
22260 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22261 }
22262 SET_LEX_STATE(EXPR_END);
22263 p->lex.ptok = p->lex.pcur;
22264 goto retry;
22265 }
22266 set_yylval_id('.');
22267 SET_LEX_STATE(EXPR_DOT);
22268 return '.';
22269 }
22270
22271 case '0': case '1': case '2': case '3': case '4':
22272 case '5': case '6': case '7': case '8': case '9':
22273 return parse_numeric(p, c);
22274
22275 case ')':
22276 COND_POP();
22277 CMDARG_POP();
22278 SET_LEX_STATE(EXPR_ENDFN);
22279 p->lex.paren_nest--;
22280 return c;
22281
22282 case ']':
22283 COND_POP();
22284 CMDARG_POP();
22285 SET_LEX_STATE(EXPR_END);
22286 p->lex.paren_nest--;
22287 return c;
22288
22289 case '}':
22290 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22291 if (!p->lex.brace_nest--) return tSTRING_DEND;
22292 COND_POP();
22293 CMDARG_POP();
22294 SET_LEX_STATE(EXPR_END);
22295 p->lex.paren_nest--;
22296 return c;
22297
22298 case ':':
22299 c = nextc(p);
22300 if (c == ':') {
22301 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22302 SET_LEX_STATE(EXPR_BEG);
22303 return tCOLON3;
22304 }
22305 set_yylval_id(idCOLON2);
22306 SET_LEX_STATE(EXPR_DOT);
22307 return tCOLON2;
22308 }
22309 if (IS_END() || ISSPACE(c) || c == '#') {
22310 pushback(p, c);
22311 c = warn_balanced(':', ":", "symbol literal");
22312 SET_LEX_STATE(EXPR_BEG);
22313 return c;
22314 }
22315 switch (c) {
22316 case '\'':
22317 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22318 break;
22319 case '"':
22320 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22321 break;
22322 default:
22323 pushback(p, c);
22324 break;
22325 }
22326 SET_LEX_STATE(EXPR_FNAME);
22327 return tSYMBEG;
22328
22329 case '/':
22330 if (IS_BEG()) {
22331 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22332 return tREGEXP_BEG;
22333 }
22334 if ((c = nextc(p)) == '=') {
22335 set_yylval_id('/');
22336 SET_LEX_STATE(EXPR_BEG);
22337 return tOP_ASGN;
22338 }
22339 pushback(p, c);
22340 if (IS_SPCARG(c)) {
22341 arg_ambiguous(p, '/');
22342 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22343 return tREGEXP_BEG;
22344 }
22345 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22346 return warn_balanced('/', "/", "regexp literal");
22347
22348 case '^':
22349 if ((c = nextc(p)) == '=') {
22350 set_yylval_id('^');
22351 SET_LEX_STATE(EXPR_BEG);
22352 return tOP_ASGN;
22353 }
22354 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22355 pushback(p, c);
22356 return '^';
22357
22358 case ';':
22359 SET_LEX_STATE(EXPR_BEG);
22360 p->command_start = TRUE;
22361 return ';';
22362
22363 case ',':
22364 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22365 return ',';
22366
22367 case '~':
22368 if (IS_AFTER_OPERATOR()) {
22369 if ((c = nextc(p)) != '@') {
22370 pushback(p, c);
22371 }
22372 SET_LEX_STATE(EXPR_ARG);
22373 }
22374 else {
22375 SET_LEX_STATE(EXPR_BEG);
22376 }
22377 return '~';
22378
22379 case '(':
22380 if (IS_BEG()) {
22381 c = tLPAREN;
22382 }
22383 else if (!space_seen) {
22384 /* foo( ... ) => method call, no ambiguity */
22385 }
22386 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22387 c = tLPAREN_ARG;
22388 }
22389 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22390 rb_warning0("parentheses after method name is interpreted as "
22391 "an argument list, not a decomposed argument");
22392 }
22393 p->lex.paren_nest++;
22394 COND_PUSH(0);
22395 CMDARG_PUSH(0);
22396 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22397 return c;
22398
22399 case '[':
22400 p->lex.paren_nest++;
22401 if (IS_AFTER_OPERATOR()) {
22402 if ((c = nextc(p)) == ']') {
22403 p->lex.paren_nest--;
22404 SET_LEX_STATE(EXPR_ARG);
22405 if ((c = nextc(p)) == '=') {
22406 return tASET;
22407 }
22408 pushback(p, c);
22409 return tAREF;
22410 }
22411 pushback(p, c);
22412 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22413 return '[';
22414 }
22415 else if (IS_BEG()) {
22416 c = tLBRACK;
22417 }
22418 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22419 c = tLBRACK;
22420 }
22421 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22422 COND_PUSH(0);
22423 CMDARG_PUSH(0);
22424 return c;
22425
22426 case '{':
22427 ++p->lex.brace_nest;
22428 if (lambda_beginning_p())
22429 c = tLAMBEG;
22430 else if (IS_lex_state(EXPR_LABELED))
22431 c = tLBRACE; /* hash */
22432 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22433 c = '{'; /* block (primary) */
22434 else if (IS_lex_state(EXPR_ENDARG))
22435 c = tLBRACE_ARG; /* block (expr) */
22436 else
22437 c = tLBRACE; /* hash */
22438 if (c != tLBRACE) {
22439 p->command_start = TRUE;
22440 SET_LEX_STATE(EXPR_BEG);
22441 }
22442 else {
22443 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22444 }
22445 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22446 COND_PUSH(0);
22447 CMDARG_PUSH(0);
22448 return c;
22449
22450 case '\\':
22451 c = nextc(p);
22452 if (c == '\n') {
22453 space_seen = 1;
22454 dispatch_scan_event(p, tSP);
22455 goto retry; /* skip \\n */
22456 }
22457 if (c == ' ') return tSP;
22458 if (ISSPACE(c)) return c;
22459 pushback(p, c);
22460 return '\\';
22461
22462 case '%':
22463 return parse_percent(p, space_seen, last_state);
22464
22465 case '$':
22466 return parse_gvar(p, last_state);
22467
22468 case '@':
22469 return parse_atmark(p, last_state);
22470
22471 case '_':
22472 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22473 p->ruby__end__seen = 1;
22474 p->eofp = 1;
22475#ifdef RIPPER
22476 lex_goto_eol(p);
22477 dispatch_scan_event(p, k__END__);
22478#endif
22479 return END_OF_INPUT;
22480 }
22481 newtok(p);
22482 break;
22483
22484 default:
22485 if (!parser_is_identchar(p)) {
22486 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22487 token_flush(p);
22488 goto retry;
22489 }
22490
22491 newtok(p);
22492 break;
22493 }
22494
22495 return parse_ident(p, c, cmd_state);
22496}
22497
22498static enum yytokentype
22499yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22500{
22501 enum yytokentype t;
22502
22503 p->lval = lval;
22504 lval->node = 0;
22505 p->yylloc = yylloc;
22506
22507 t = parser_yylex(p);
22508
22509 if (has_delayed_token(p))
22510 dispatch_delayed_token(p, t);
22511 else if (t != END_OF_INPUT)
22512 dispatch_scan_event(p, t);
22513
22514 return t;
22515}
22516
22517#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22518
22519static NODE*
22520node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22521{
22522 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22523
22524 rb_node_init(n, type);
22525 return n;
22526}
22527
22528static NODE *
22529nd_set_loc(NODE *nd, const YYLTYPE *loc)
22530{
22531 nd->nd_loc = *loc;
22532 nd_set_line(nd, loc->beg_pos.lineno);
22533 return nd;
22534}
22535
22536static NODE*
22537node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22538{
22539 NODE *n = node_new_internal(p, type, size, alignment);
22540
22541 nd_set_loc(n, loc);
22542 nd_set_node_id(n, parser_get_node_id(p));
22543 return n;
22544}
22545
22546#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22547
22548static rb_node_scope_t *
22549rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
22550{
22551 rb_ast_id_table_t *nd_tbl;
22552 nd_tbl = local_tbl(p);
22553 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22554 n->nd_tbl = nd_tbl;
22555 n->nd_body = nd_body;
22556 n->nd_parent = nd_parent;
22557 n->nd_args = nd_args;
22558
22559 return n;
22560}
22561
22562static rb_node_scope_t *
22563rb_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)
22564{
22565 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22566 n->nd_tbl = nd_tbl;
22567 n->nd_body = nd_body;
22568 n->nd_parent = nd_parent;
22569 n->nd_args = nd_args;
22570
22571 return n;
22572}
22573
22574static rb_node_defn_t *
22575rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22576{
22577 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22578 n->nd_mid = nd_mid;
22579 n->nd_defn = nd_defn;
22580
22581 return n;
22582}
22583
22584static rb_node_defs_t *
22585rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22586{
22587 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22588 n->nd_recv = nd_recv;
22589 n->nd_mid = nd_mid;
22590 n->nd_defn = nd_defn;
22591
22592 return n;
22593}
22594
22595static rb_node_block_t *
22596rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22597{
22598 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22599 n->nd_head = nd_head;
22600 n->nd_end = (NODE *)n;
22601 n->nd_next = 0;
22602
22603 return n;
22604}
22605
22606static rb_node_for_t *
22607rb_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)
22608{
22609 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22610 n->nd_body = nd_body;
22611 n->nd_iter = nd_iter;
22612 n->for_keyword_loc = *for_keyword_loc;
22613 n->in_keyword_loc = *in_keyword_loc;
22614 n->do_keyword_loc = *do_keyword_loc;
22615 n->end_keyword_loc = *end_keyword_loc;
22616
22617 return n;
22618}
22619
22620static rb_node_for_masgn_t *
22621rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22622{
22623 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22624 n->nd_var = nd_var;
22625
22626 return n;
22627}
22628
22629static rb_node_retry_t *
22630rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22631{
22632 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22633
22634 return n;
22635}
22636
22637static rb_node_begin_t *
22638rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22639{
22640 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22641 n->nd_body = nd_body;
22642
22643 return n;
22644}
22645
22646static rb_node_rescue_t *
22647rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22648{
22649 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22650 n->nd_head = nd_head;
22651 n->nd_resq = nd_resq;
22652 n->nd_else = nd_else;
22653
22654 return n;
22655}
22656
22657static rb_node_resbody_t *
22658rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22659{
22660 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22661 n->nd_args = nd_args;
22662 n->nd_exc_var = nd_exc_var;
22663 n->nd_body = nd_body;
22664 n->nd_next = nd_next;
22665
22666 return n;
22667}
22668
22669static rb_node_ensure_t *
22670rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22671{
22672 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22673 n->nd_head = nd_head;
22674 n->nd_ensr = nd_ensr;
22675
22676 return n;
22677}
22678
22679static rb_node_and_t *
22680rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22681{
22682 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22683 n->nd_1st = nd_1st;
22684 n->nd_2nd = nd_2nd;
22685 n->operator_loc = *operator_loc;
22686
22687 return n;
22688}
22689
22690static rb_node_or_t *
22691rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22692{
22693 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22694 n->nd_1st = nd_1st;
22695 n->nd_2nd = nd_2nd;
22696 n->operator_loc = *operator_loc;
22697
22698 return n;
22699}
22700
22701static rb_node_return_t *
22702rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22703{
22704 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22705 n->nd_stts = nd_stts;
22706 n->keyword_loc = *keyword_loc;
22707 return n;
22708}
22709
22710static rb_node_yield_t *
22711rb_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)
22712{
22713 if (nd_head) no_blockarg(p, nd_head);
22714
22715 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22716 n->nd_head = nd_head;
22717 n->keyword_loc = *keyword_loc;
22718 n->lparen_loc = *lparen_loc;
22719 n->rparen_loc = *rparen_loc;
22720
22721 return n;
22722}
22723
22724static rb_node_if_t *
22725rb_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)
22726{
22727 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22728 n->nd_cond = nd_cond;
22729 n->nd_body = nd_body;
22730 n->nd_else = nd_else;
22731 n->if_keyword_loc = *if_keyword_loc;
22732 n->then_keyword_loc = *then_keyword_loc;
22733 n->end_keyword_loc = *end_keyword_loc;
22734
22735 return n;
22736}
22737
22738static rb_node_unless_t *
22739rb_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)
22740{
22741 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22742 n->nd_cond = nd_cond;
22743 n->nd_body = nd_body;
22744 n->nd_else = nd_else;
22745 n->keyword_loc = *keyword_loc;
22746 n->then_keyword_loc = *then_keyword_loc;
22747 n->end_keyword_loc = *end_keyword_loc;
22748
22749 return n;
22750}
22751
22752static rb_node_class_t *
22753rb_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)
22754{
22755 /* Keep the order of node creation */
22756 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22757 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22758 RNODE_SCOPE(scope)->nd_parent = &n->node;
22759 n->nd_cpath = nd_cpath;
22760 n->nd_body = scope;
22761 n->nd_super = nd_super;
22762 n->class_keyword_loc = *class_keyword_loc;
22763 n->inheritance_operator_loc = *inheritance_operator_loc;
22764 n->end_keyword_loc = *end_keyword_loc;
22765
22766 return n;
22767}
22768
22769static rb_node_sclass_t *
22770rb_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)
22771{
22772 /* Keep the order of node creation */
22773 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22774 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22775 RNODE_SCOPE(scope)->nd_parent = &n->node;
22776 n->nd_recv = nd_recv;
22777 n->nd_body = scope;
22778 n->class_keyword_loc = *class_keyword_loc;
22779 n->operator_loc = *operator_loc;
22780 n->end_keyword_loc = *end_keyword_loc;
22781
22782 return n;
22783}
22784
22785static rb_node_module_t *
22786rb_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)
22787{
22788 /* Keep the order of node creation */
22789 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22790 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22791 RNODE_SCOPE(scope)->nd_parent = &n->node;
22792 n->nd_cpath = nd_cpath;
22793 n->nd_body = scope;
22794 n->module_keyword_loc = *module_keyword_loc;
22795 n->end_keyword_loc = *end_keyword_loc;
22796
22797 return n;
22798}
22799
22800static rb_node_iter_t *
22801rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22802{
22803 /* Keep the order of node creation */
22804 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22805 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22806 RNODE_SCOPE(scope)->nd_parent = &n->node;
22807 n->nd_body = scope;
22808 n->nd_iter = 0;
22809
22810 return n;
22811}
22812
22813static rb_node_lambda_t *
22814rb_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)
22815{
22816 /* Keep the order of node creation */
22817 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22818 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
22819 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
22820 RNODE_SCOPE(scope)->nd_parent = &n->node;
22821 n->nd_body = scope;
22822 n->operator_loc = *operator_loc;
22823 n->opening_loc = *opening_loc;
22824 n->closing_loc = *closing_loc;
22825
22826 return n;
22827}
22828
22829static rb_node_case_t *
22830rb_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)
22831{
22832 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22833 n->nd_head = nd_head;
22834 n->nd_body = nd_body;
22835 n->case_keyword_loc = *case_keyword_loc;
22836 n->end_keyword_loc = *end_keyword_loc;
22837
22838 return n;
22839}
22840
22841static rb_node_case2_t *
22842rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22843{
22844 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22845 n->nd_head = 0;
22846 n->nd_body = nd_body;
22847 n->case_keyword_loc = *case_keyword_loc;
22848 n->end_keyword_loc = *end_keyword_loc;
22849
22850 return n;
22851}
22852
22853static rb_node_case3_t *
22854rb_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)
22855{
22856 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22857 n->nd_head = nd_head;
22858 n->nd_body = nd_body;
22859 n->case_keyword_loc = *case_keyword_loc;
22860 n->end_keyword_loc = *end_keyword_loc;
22861
22862 return n;
22863}
22864
22865static rb_node_when_t *
22866rb_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)
22867{
22868 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22869 n->nd_head = nd_head;
22870 n->nd_body = nd_body;
22871 n->nd_next = nd_next;
22872 n->keyword_loc = *keyword_loc;
22873 n->then_keyword_loc = *then_keyword_loc;
22874
22875 return n;
22876}
22877
22878static rb_node_in_t *
22879rb_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)
22880{
22881 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22882 n->nd_head = nd_head;
22883 n->nd_body = nd_body;
22884 n->nd_next = nd_next;
22885 n->in_keyword_loc = *in_keyword_loc;
22886 n->then_keyword_loc = *then_keyword_loc;
22887 n->operator_loc = *operator_loc;
22888
22889 return n;
22890}
22891
22892static rb_node_while_t *
22893rb_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)
22894{
22895 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22896 n->nd_cond = nd_cond;
22897 n->nd_body = nd_body;
22898 n->nd_state = nd_state;
22899 n->keyword_loc = *keyword_loc;
22900 n->closing_loc = *closing_loc;
22901
22902 return n;
22903}
22904
22905static rb_node_until_t *
22906rb_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)
22907{
22908 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22909 n->nd_cond = nd_cond;
22910 n->nd_body = nd_body;
22911 n->nd_state = nd_state;
22912 n->keyword_loc = *keyword_loc;
22913 n->closing_loc = *closing_loc;
22914
22915 return n;
22916}
22917
22918static rb_node_colon2_t *
22919rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
22920{
22921 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
22922 n->nd_head = nd_head;
22923 n->nd_mid = nd_mid;
22924 n->delimiter_loc = *delimiter_loc;
22925 n->name_loc = *name_loc;
22926
22927 return n;
22928}
22929
22930static rb_node_colon3_t *
22931rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
22932{
22933 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
22934 n->nd_mid = nd_mid;
22935 n->delimiter_loc = *delimiter_loc;
22936 n->name_loc = *name_loc;
22937
22938 return n;
22939}
22940
22941static rb_node_dot2_t *
22942rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22943{
22944 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
22945 n->nd_beg = nd_beg;
22946 n->nd_end = nd_end;
22947 n->operator_loc = *operator_loc;
22948
22949 return n;
22950}
22951
22952static rb_node_dot3_t *
22953rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22954{
22955 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
22956 n->nd_beg = nd_beg;
22957 n->nd_end = nd_end;
22958 n->operator_loc = *operator_loc;
22959
22960 return n;
22961}
22962
22963static rb_node_self_t *
22964rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
22965{
22966 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
22967 n->nd_state = 1;
22968
22969 return n;
22970}
22971
22972static rb_node_nil_t *
22973rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
22974{
22975 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
22976
22977 return n;
22978}
22979
22980static rb_node_true_t *
22981rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
22982{
22983 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
22984
22985 return n;
22986}
22987
22988static rb_node_false_t *
22989rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
22990{
22991 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
22992
22993 return n;
22994}
22995
22996static rb_node_super_t *
22997rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
22998 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
22999{
23000 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23001 n->nd_args = nd_args;
23002 n->keyword_loc = *keyword_loc;
23003 n->lparen_loc = *lparen_loc;
23004 n->rparen_loc = *rparen_loc;
23005
23006 return n;
23007}
23008
23009static rb_node_zsuper_t *
23010rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23011{
23012 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23013
23014 return n;
23015}
23016
23017static rb_node_match2_t *
23018rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23019{
23020 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23021 n->nd_recv = nd_recv;
23022 n->nd_value = nd_value;
23023 n->nd_args = 0;
23024
23025 return n;
23026}
23027
23028static rb_node_match3_t *
23029rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23030{
23031 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23032 n->nd_recv = nd_recv;
23033 n->nd_value = nd_value;
23034
23035 return n;
23036}
23037
23038/* TODO: Use union for NODE_LIST2 */
23039static rb_node_list_t *
23040rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23041{
23042 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23043 n->nd_head = nd_head;
23044 n->as.nd_alen = 1;
23045 n->nd_next = 0;
23046
23047 return n;
23048}
23049
23050static rb_node_list_t *
23051rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23052{
23053 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23054 n->nd_head = nd_head;
23055 n->as.nd_alen = nd_alen;
23056 n->nd_next = nd_next;
23057
23058 return n;
23059}
23060
23061static rb_node_zlist_t *
23062rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23063{
23064 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23065
23066 return n;
23067}
23068
23069static rb_node_hash_t *
23070rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23071{
23072 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23073 n->nd_head = nd_head;
23074 n->nd_brace = 0;
23075
23076 return n;
23077}
23078
23079static rb_node_masgn_t *
23080rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23081{
23082 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23083 n->nd_head = nd_head;
23084 n->nd_value = 0;
23085 n->nd_args = nd_args;
23086
23087 return n;
23088}
23089
23090static rb_node_gasgn_t *
23091rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23092{
23093 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23094 n->nd_vid = nd_vid;
23095 n->nd_value = nd_value;
23096
23097 return n;
23098}
23099
23100static rb_node_lasgn_t *
23101rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23102{
23103 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23104 n->nd_vid = nd_vid;
23105 n->nd_value = nd_value;
23106
23107 return n;
23108}
23109
23110static rb_node_dasgn_t *
23111rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23112{
23113 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23114 n->nd_vid = nd_vid;
23115 n->nd_value = nd_value;
23116
23117 return n;
23118}
23119
23120static rb_node_iasgn_t *
23121rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23122{
23123 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23124 n->nd_vid = nd_vid;
23125 n->nd_value = nd_value;
23126
23127 return n;
23128}
23129
23130static rb_node_cvasgn_t *
23131rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23132{
23133 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23134 n->nd_vid = nd_vid;
23135 n->nd_value = nd_value;
23136
23137 return n;
23138}
23139
23140static rb_node_op_asgn1_t *
23141rb_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)
23142{
23143 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23144 n->nd_recv = nd_recv;
23145 n->nd_mid = nd_mid;
23146 n->nd_index = index;
23147 n->nd_rvalue = rvalue;
23148 n->call_operator_loc = *call_operator_loc;
23149 n->opening_loc = *opening_loc;
23150 n->closing_loc = *closing_loc;
23151 n->binary_operator_loc = *binary_operator_loc;
23152
23153 return n;
23154}
23155
23156static rb_node_op_asgn2_t *
23157rb_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)
23158{
23159 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23160 n->nd_recv = nd_recv;
23161 n->nd_value = nd_value;
23162 n->nd_vid = nd_vid;
23163 n->nd_mid = nd_mid;
23164 n->nd_aid = nd_aid;
23165 n->call_operator_loc = *call_operator_loc;
23166 n->message_loc = *message_loc;
23167 n->binary_operator_loc = *binary_operator_loc;
23168
23169 return n;
23170}
23171
23172static rb_node_op_asgn_or_t *
23173rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23174{
23175 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23176 n->nd_head = nd_head;
23177 n->nd_value = nd_value;
23178
23179 return n;
23180}
23181
23182static rb_node_op_asgn_and_t *
23183rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23184{
23185 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23186 n->nd_head = nd_head;
23187 n->nd_value = nd_value;
23188
23189 return n;
23190}
23191
23192static rb_node_gvar_t *
23193rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23194{
23195 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23196 n->nd_vid = nd_vid;
23197
23198 return n;
23199}
23200
23201static rb_node_lvar_t *
23202rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23203{
23204 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23205 n->nd_vid = nd_vid;
23206
23207 return n;
23208}
23209
23210static rb_node_dvar_t *
23211rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23212{
23213 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23214 n->nd_vid = nd_vid;
23215
23216 return n;
23217}
23218
23219static rb_node_ivar_t *
23220rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23221{
23222 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23223 n->nd_vid = nd_vid;
23224
23225 return n;
23226}
23227
23228static rb_node_const_t *
23229rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23230{
23231 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23232 n->nd_vid = nd_vid;
23233
23234 return n;
23235}
23236
23237static rb_node_cvar_t *
23238rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23239{
23240 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23241 n->nd_vid = nd_vid;
23242
23243 return n;
23244}
23245
23246static rb_node_nth_ref_t *
23247rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23248{
23249 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23250 n->nd_nth = nd_nth;
23251
23252 return n;
23253}
23254
23255static rb_node_back_ref_t *
23256rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23257{
23258 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23259 n->nd_nth = nd_nth;
23260
23261 return n;
23262}
23263
23264static rb_node_integer_t *
23265rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23266{
23267 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23268 n->val = val;
23269 n->minus = FALSE;
23270 n->base = base;
23271
23272 return n;
23273}
23274
23275static rb_node_float_t *
23276rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23277{
23278 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23279 n->val = val;
23280 n->minus = FALSE;
23281
23282 return n;
23283}
23284
23285static rb_node_rational_t *
23286rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23287{
23288 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23289 n->val = val;
23290 n->minus = FALSE;
23291 n->base = base;
23292 n->seen_point = seen_point;
23293
23294 return n;
23295}
23296
23297static rb_node_imaginary_t *
23298rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23299{
23300 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23301 n->val = val;
23302 n->minus = FALSE;
23303 n->base = base;
23304 n->seen_point = seen_point;
23305 n->type = numeric_type;
23306
23307 return n;
23308}
23309
23310static rb_node_str_t *
23311rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23312{
23313 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23314 n->string = string;
23315
23316 return n;
23317}
23318
23319/* TODO; Use union for NODE_DSTR2 */
23320static rb_node_dstr_t *
23321rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23322{
23323 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23324 n->string = string;
23325 n->as.nd_alen = nd_alen;
23326 n->nd_next = (rb_node_list_t *)nd_next;
23327
23328 return n;
23329}
23330
23331static rb_node_dstr_t *
23332rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23333{
23334 return rb_node_dstr_new0(p, string, 1, 0, loc);
23335}
23336
23337static rb_node_xstr_t *
23338rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23339{
23340 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23341 n->string = string;
23342
23343 return n;
23344}
23345
23346static rb_node_dxstr_t *
23347rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23348{
23349 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23350 n->string = string;
23351 n->as.nd_alen = nd_alen;
23352 n->nd_next = (rb_node_list_t *)nd_next;
23353
23354 return n;
23355}
23356
23357static rb_node_sym_t *
23358rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23359{
23360 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23361 n->string = rb_str_to_parser_string(p, str);
23362
23363 return n;
23364}
23365
23366static rb_node_dsym_t *
23367rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23368{
23369 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23370 n->string = string;
23371 n->as.nd_alen = nd_alen;
23372 n->nd_next = (rb_node_list_t *)nd_next;
23373
23374 return n;
23375}
23376
23377static rb_node_evstr_t *
23378rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23379{
23380 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23381 n->nd_body = nd_body;
23382 n->opening_loc = *opening_loc;
23383 n->closing_loc = *closing_loc;
23384
23385 return n;
23386}
23387
23388static rb_node_regx_t *
23389rb_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)
23390{
23391 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23392 n->string = string;
23393 n->options = options & RE_OPTION_MASK;
23394 n->opening_loc = *opening_loc;
23395 n->content_loc = *content_loc;
23396 n->closing_loc = *closing_loc;
23397
23398 return n;
23399}
23400
23401static rb_node_call_t *
23402rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23403{
23404 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23405 n->nd_recv = nd_recv;
23406 n->nd_mid = nd_mid;
23407 n->nd_args = nd_args;
23408
23409 return n;
23410}
23411
23412static rb_node_opcall_t *
23413rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23414{
23415 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23416 n->nd_recv = nd_recv;
23417 n->nd_mid = nd_mid;
23418 n->nd_args = nd_args;
23419
23420 return n;
23421}
23422
23423static rb_node_fcall_t *
23424rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23425{
23426 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23427 n->nd_mid = nd_mid;
23428 n->nd_args = nd_args;
23429
23430 return n;
23431}
23432
23433static rb_node_qcall_t *
23434rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23435{
23436 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23437 n->nd_recv = nd_recv;
23438 n->nd_mid = nd_mid;
23439 n->nd_args = nd_args;
23440
23441 return n;
23442}
23443
23444static rb_node_vcall_t *
23445rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23446{
23447 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23448 n->nd_mid = nd_mid;
23449
23450 return n;
23451}
23452
23453static rb_node_once_t *
23454rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23455{
23456 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23457 n->nd_body = nd_body;
23458
23459 return n;
23460}
23461
23462static rb_node_args_t *
23463rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23464{
23465 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23466 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23467
23468 return n;
23469}
23470
23471static rb_node_args_aux_t *
23472rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23473{
23474 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23475 n->nd_pid = nd_pid;
23476 n->nd_plen = nd_plen;
23477 n->nd_next = 0;
23478
23479 return n;
23480}
23481
23482static rb_node_opt_arg_t *
23483rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23484{
23485 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23486 n->nd_body = nd_body;
23487 n->nd_next = 0;
23488
23489 return n;
23490}
23491
23492static rb_node_kw_arg_t *
23493rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23494{
23495 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23496 n->nd_body = nd_body;
23497 n->nd_next = 0;
23498
23499 return n;
23500}
23501
23502static rb_node_postarg_t *
23503rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23504{
23505 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23506 n->nd_1st = nd_1st;
23507 n->nd_2nd = nd_2nd;
23508
23509 return n;
23510}
23511
23512static rb_node_argscat_t *
23513rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23514{
23515 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23516 n->nd_head = nd_head;
23517 n->nd_body = nd_body;
23518
23519 return n;
23520}
23521
23522static rb_node_argspush_t *
23523rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23524{
23525 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23526 n->nd_head = nd_head;
23527 n->nd_body = nd_body;
23528
23529 return n;
23530}
23531
23532static rb_node_splat_t *
23533rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23534{
23535 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23536 n->nd_head = nd_head;
23537 n->operator_loc = *operator_loc;
23538
23539 return n;
23540}
23541
23542static rb_node_block_pass_t *
23543rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23544{
23545 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23546 n->forwarding = 0;
23547 n->nd_head = 0;
23548 n->nd_body = nd_body;
23549 n->operator_loc = *operator_loc;
23550
23551 return n;
23552}
23553
23554static rb_node_alias_t *
23555rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23556{
23557 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23558 n->nd_1st = nd_1st;
23559 n->nd_2nd = nd_2nd;
23560 n->keyword_loc = *keyword_loc;
23561
23562 return n;
23563}
23564
23565static rb_node_valias_t *
23566rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23567{
23568 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23569 n->nd_alias = nd_alias;
23570 n->nd_orig = nd_orig;
23571 n->keyword_loc = *keyword_loc;
23572
23573 return n;
23574}
23575
23576static rb_node_undef_t *
23577rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23578{
23579 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23580 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23581 n->keyword_loc = NULL_LOC;
23582 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23583
23584 return n;
23585}
23586
23587static rb_node_errinfo_t *
23588rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23589{
23590 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23591
23592 return n;
23593}
23594
23595static rb_node_defined_t *
23596rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23597{
23598 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23599 n->nd_head = nd_head;
23600 n->keyword_loc = *keyword_loc;
23601
23602 return n;
23603}
23604
23605static rb_node_postexe_t *
23606rb_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)
23607{
23608 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23609 n->nd_body = nd_body;
23610 n->keyword_loc = *keyword_loc;
23611 n->opening_loc = *opening_loc;
23612 n->closing_loc = *closing_loc;
23613
23614 return n;
23615}
23616
23617static rb_node_attrasgn_t *
23618rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23619{
23620 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23621 n->nd_recv = nd_recv;
23622 n->nd_mid = nd_mid;
23623 n->nd_args = nd_args;
23624
23625 return n;
23626}
23627
23628static rb_node_aryptn_t *
23629rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23630{
23631 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23632 n->nd_pconst = 0;
23633 n->pre_args = pre_args;
23634 n->rest_arg = rest_arg;
23635 n->post_args = post_args;
23636
23637 return n;
23638}
23639
23640static rb_node_hshptn_t *
23641rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23642{
23643 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23644 n->nd_pconst = nd_pconst;
23645 n->nd_pkwargs = nd_pkwargs;
23646 n->nd_pkwrestarg = nd_pkwrestarg;
23647
23648 return n;
23649}
23650
23651static rb_node_fndptn_t *
23652rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23653{
23654 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23655 n->nd_pconst = 0;
23656 n->pre_rest_arg = pre_rest_arg;
23657 n->args = args;
23658 n->post_rest_arg = post_rest_arg;
23659
23660 return n;
23661}
23662
23663static rb_node_line_t *
23664rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23665{
23666 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23667
23668 return n;
23669}
23670
23671static rb_node_file_t *
23672rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23673{
23674 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23675 n->path = rb_str_to_parser_string(p, str);
23676
23677 return n;
23678}
23679
23680static rb_node_encoding_t *
23681rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23682{
23683 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23684 n->enc = p->enc;
23685
23686 return n;
23687}
23688
23689static rb_node_cdecl_t *
23690rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23691{
23692 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23693 n->nd_vid = nd_vid;
23694 n->nd_value = nd_value;
23695 n->nd_else = nd_else;
23696 n->shareability = shareability;
23697
23698 return n;
23699}
23700
23701static rb_node_op_cdecl_t *
23702rb_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)
23703{
23704 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23705 n->nd_head = nd_head;
23706 n->nd_value = nd_value;
23707 n->nd_aid = nd_aid;
23708 n->shareability = shareability;
23709
23710 return n;
23711}
23712
23713static rb_node_error_t *
23714rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23715{
23716 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23717
23718 return n;
23719}
23720
23721static rb_node_break_t *
23722rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23723{
23724 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23725 n->nd_stts = nd_stts;
23726 n->nd_chain = 0;
23727 n->keyword_loc = *keyword_loc;
23728
23729 return n;
23730}
23731
23732static rb_node_next_t *
23733rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23734{
23735 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23736 n->nd_stts = nd_stts;
23737 n->nd_chain = 0;
23738 n->keyword_loc = *keyword_loc;
23739
23740 return n;
23741}
23742
23743static rb_node_redo_t *
23744rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23745{
23746 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23747 n->nd_chain = 0;
23748 n->keyword_loc = *keyword_loc;
23749
23750 return n;
23751}
23752
23753static rb_node_def_temp_t *
23754rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23755{
23756 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23757 n->save.numparam_save = 0;
23758 n->save.max_numparam = 0;
23759 n->save.ctxt = p->ctxt;
23760 n->nd_def = 0;
23761 n->nd_mid = 0;
23762
23763 return n;
23764}
23765
23766static rb_node_def_temp_t *
23767def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23768{
23769 n->save.numparam_save = numparam_push(p);
23770 n->save.max_numparam = p->max_numparam;
23771 return n;
23772}
23773
23774#ifndef RIPPER
23775static enum node_type
23776nodetype(NODE *node) /* for debug */
23777{
23778 return (enum node_type)nd_type(node);
23779}
23780
23781static int
23782nodeline(NODE *node)
23783{
23784 return nd_line(node);
23785}
23786#endif
23787
23788static NODE*
23789newline_node(NODE *node)
23790{
23791 if (node) {
23792 node = remove_begin(node);
23793 nd_set_fl_newline(node);
23794 }
23795 return node;
23796}
23797
23798static void
23799fixpos(NODE *node, NODE *orig)
23800{
23801 if (!node) return;
23802 if (!orig) return;
23803 nd_set_line(node, nd_line(orig));
23804}
23805
23806static NODE*
23807block_append(struct parser_params *p, NODE *head, NODE *tail)
23808{
23809 NODE *end, *h = head, *nd;
23810
23811 if (tail == 0) return head;
23812
23813 if (h == 0) return tail;
23814 switch (nd_type(h)) {
23815 default:
23816 h = end = NEW_BLOCK(head, &head->nd_loc);
23817 head = end;
23818 break;
23819 case NODE_BLOCK:
23820 end = RNODE_BLOCK(h)->nd_end;
23821 break;
23822 }
23823
23824 nd = RNODE_BLOCK(end)->nd_head;
23825 switch (nd_type(nd)) {
23826 case NODE_RETURN:
23827 case NODE_BREAK:
23828 case NODE_NEXT:
23829 case NODE_REDO:
23830 case NODE_RETRY:
23831 rb_warning0L(nd_line(tail), "statement not reached");
23832 break;
23833
23834 default:
23835 break;
23836 }
23837
23838 if (!nd_type_p(tail, NODE_BLOCK)) {
23839 tail = NEW_BLOCK(tail, &tail->nd_loc);
23840 }
23841 RNODE_BLOCK(end)->nd_next = tail;
23842 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23843 nd_set_last_loc(head, nd_last_loc(tail));
23844 return head;
23845}
23846
23847/* append item to the list */
23848static NODE*
23849list_append(struct parser_params *p, NODE *list, NODE *item)
23850{
23851 NODE *last;
23852
23853 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23854 if (RNODE_LIST(list)->nd_next) {
23855 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23856 }
23857 else {
23858 last = list;
23859 }
23860
23861 RNODE_LIST(list)->as.nd_alen += 1;
23862 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23863 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23864
23865 nd_set_last_loc(list, nd_last_loc(item));
23866
23867 return list;
23868}
23869
23870/* concat two lists */
23871static NODE*
23872list_concat(NODE *head, NODE *tail)
23873{
23874 NODE *last;
23875
23876 if (RNODE_LIST(head)->nd_next) {
23877 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23878 }
23879 else {
23880 last = head;
23881 }
23882
23883 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23884 RNODE_LIST(last)->nd_next = tail;
23885 if (RNODE_LIST(tail)->nd_next) {
23886 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23887 }
23888 else {
23889 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23890 }
23891
23892 nd_set_last_loc(head, nd_last_loc(tail));
23893
23894 return head;
23895}
23896
23897static int
23898literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23899{
23900 if (!tail) return 1;
23901 if (!rb_parser_enc_compatible(p, head, tail)) {
23902 compile_error(p, "string literal encodings differ (%s / %s)",
23903 rb_enc_name(rb_parser_str_get_encoding(head)),
23904 rb_enc_name(rb_parser_str_get_encoding(tail)));
23905 rb_parser_str_resize(p, head, 0);
23906 rb_parser_str_resize(p, tail, 0);
23907 return 0;
23908 }
23909 rb_parser_str_buf_append(p, head, tail);
23910 return 1;
23911}
23912
23913static rb_parser_string_t *
23914string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23915{
23916 if (htype != NODE_DSTR) return NULL;
23917 if (RNODE_DSTR(head)->nd_next) {
23918 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
23919 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
23920 }
23921 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
23922 ASSUME(lit);
23923 return lit;
23924}
23925
23926#ifndef RIPPER
23927static rb_parser_string_t *
23928rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
23929{
23930 rb_parser_string_t *copy;
23931 if (!orig) return NULL;
23932 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
23933 copy->coderange = orig->coderange;
23934 copy->enc = orig->enc;
23935 return copy;
23936}
23937#endif
23938
23939/* concat two string literals */
23940static NODE *
23941literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
23942{
23943 enum node_type htype;
23944 rb_parser_string_t *lit;
23945
23946 if (!head) return tail;
23947 if (!tail) return head;
23948
23949 htype = nd_type(head);
23950 if (htype == NODE_EVSTR) {
23951 head = new_dstr(p, head, loc);
23952 htype = NODE_DSTR;
23953 }
23954 if (p->heredoc_indent > 0) {
23955 switch (htype) {
23956 case NODE_STR:
23957 head = str2dstr(p, head);
23958 case NODE_DSTR:
23959 return list_append(p, head, tail);
23960 default:
23961 break;
23962 }
23963 }
23964 switch (nd_type(tail)) {
23965 case NODE_STR:
23966 if ((lit = string_literal_head(p, htype, head)) != false) {
23967 htype = NODE_STR;
23968 }
23969 else {
23970 lit = RNODE_DSTR(head)->string;
23971 }
23972 if (htype == NODE_STR) {
23973 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
23974 error:
23975 rb_discard_node(p, head);
23976 rb_discard_node(p, tail);
23977 return 0;
23978 }
23979 rb_discard_node(p, tail);
23980 }
23981 else {
23982 list_append(p, head, tail);
23983 }
23984 break;
23985
23986 case NODE_DSTR:
23987 if (htype == NODE_STR) {
23988 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
23989 goto error;
23990 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23991 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
23992 RNODE_STR(head)->string = NULL;
23993 rb_discard_node(p, head);
23994 head = tail;
23995 }
23996 else if (!RNODE_DSTR(tail)->string) {
23997 append:
23998 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
23999 if (!RNODE_DSTR(head)->nd_next) {
24000 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24001 }
24002 else if (RNODE_DSTR(tail)->nd_next) {
24003 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24004 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24005 }
24006 rb_discard_node(p, tail);
24007 }
24008 else if ((lit = string_literal_head(p, htype, head)) != false) {
24009 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24010 goto error;
24011 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24012 RNODE_DSTR(tail)->string = 0;
24013 goto append;
24014 }
24015 else {
24016 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));
24017 RNODE_DSTR(tail)->string = 0;
24018 }
24019 break;
24020
24021 case NODE_EVSTR:
24022 if (htype == NODE_STR) {
24023 head = str2dstr(p, head);
24024 RNODE_DSTR(head)->as.nd_alen = 1;
24025 }
24026 list_append(p, head, tail);
24027 break;
24028 }
24029 return head;
24030}
24031
24032static void
24033nd_copy_flag(NODE *new_node, NODE *old_node)
24034{
24035 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24036 nd_set_line(new_node, nd_line(old_node));
24037 new_node->nd_loc = old_node->nd_loc;
24038 new_node->node_id = old_node->node_id;
24039}
24040
24041static NODE *
24042str2dstr(struct parser_params *p, NODE *node)
24043{
24044 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24045 nd_copy_flag(new_node, node);
24046 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24047 RNODE_DSTR(new_node)->as.nd_alen = 0;
24048 RNODE_DSTR(new_node)->nd_next = 0;
24049 RNODE_STR(node)->string = 0;
24050
24051 return new_node;
24052}
24053
24054static NODE *
24055str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24056{
24057 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24058 nd_copy_flag(new_node, node);
24059 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24060 RNODE_REGX(new_node)->options = options;
24061 nd_set_loc(new_node, loc);
24062 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24063 RNODE_REGX(new_node)->content_loc = *content_loc;
24064 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24065 RNODE_STR(node)->string = 0;
24066
24067 return new_node;
24068}
24069
24070static NODE *
24071evstr2dstr(struct parser_params *p, NODE *node)
24072{
24073 if (nd_type_p(node, NODE_EVSTR)) {
24074 node = new_dstr(p, node, &node->nd_loc);
24075 }
24076 return node;
24077}
24078
24079static NODE *
24080new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24081{
24082 NODE *head = node;
24083
24084 if (node) {
24085 switch (nd_type(node)) {
24086 case NODE_STR:
24087 return str2dstr(p, node);
24088 case NODE_DSTR:
24089 break;
24090 case NODE_EVSTR:
24091 return node;
24092 }
24093 }
24094 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24095}
24096
24097static NODE *
24098new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24099{
24100 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24101 return list_append(p, dstr, node);
24102}
24103
24104static NODE *
24105call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24106 const YYLTYPE *op_loc, const YYLTYPE *loc)
24107{
24108 NODE *expr;
24109 value_expr(p, recv);
24110 value_expr(p, arg1);
24111 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24112 nd_set_line(expr, op_loc->beg_pos.lineno);
24113 return expr;
24114}
24115
24116static NODE *
24117call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24118{
24119 NODE *opcall;
24120 value_expr(p, recv);
24121 opcall = NEW_OPCALL(recv, id, 0, loc);
24122 nd_set_line(opcall, op_loc->beg_pos.lineno);
24123 return opcall;
24124}
24125
24126static NODE *
24127new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24128{
24129 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24130 nd_set_line(qcall, op_loc->beg_pos.lineno);
24131 return qcall;
24132}
24133
24134static NODE*
24135new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24136{
24137 NODE *ret;
24138 if (block) block_dup_check(p, args, block);
24139 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24140 if (block) ret = method_add_block(p, ret, block, loc);
24141 fixpos(ret, recv);
24142 return ret;
24143}
24144
24146new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24147{
24149 body->node = node;
24150 body->opening_loc = *opening_loc;
24151 body->closing_loc = *closing_loc;
24152 return body;
24153}
24154
24155#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24156
24157static NODE*
24158last_expr_once_body(NODE *node)
24159{
24160 if (!node) return 0;
24161 return nd_once_body(node);
24162}
24163
24164static NODE*
24165match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24166{
24167 NODE *n;
24168 int line = op_loc->beg_pos.lineno;
24169
24170 value_expr(p, node1);
24171 value_expr(p, node2);
24172
24173 if ((n = last_expr_once_body(node1)) != 0) {
24174 switch (nd_type(n)) {
24175 case NODE_DREGX:
24176 {
24177 NODE *match = NEW_MATCH2(node1, node2, loc);
24178 nd_set_line(match, line);
24179 return match;
24180 }
24181
24182 case NODE_REGX:
24183 {
24184 const VALUE lit = rb_node_regx_string_val(n);
24185 if (!NIL_P(lit)) {
24186 NODE *match = NEW_MATCH2(node1, node2, loc);
24187 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24188 nd_set_line(match, line);
24189 return match;
24190 }
24191 }
24192 }
24193 }
24194
24195 if ((n = last_expr_once_body(node2)) != 0) {
24196 NODE *match3;
24197
24198 switch (nd_type(n)) {
24199 case NODE_DREGX:
24200 match3 = NEW_MATCH3(node2, node1, loc);
24201 return match3;
24202 }
24203 }
24204
24205 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24206 nd_set_line(n, line);
24207 return n;
24208}
24209
24210# if WARN_PAST_SCOPE
24211static int
24212past_dvar_p(struct parser_params *p, ID id)
24213{
24214 struct vtable *past = p->lvtbl->past;
24215 while (past) {
24216 if (vtable_included(past, id)) return 1;
24217 past = past->prev;
24218 }
24219 return 0;
24220}
24221# endif
24222
24223static int
24224numparam_nested_p(struct parser_params *p)
24225{
24226 struct local_vars *local = p->lvtbl;
24227 NODE *outer = local->numparam.outer;
24228 NODE *inner = local->numparam.inner;
24229 if (outer || inner) {
24230 NODE *used = outer ? outer : inner;
24231 compile_error(p, "numbered parameter is already used in %s block\n"
24232 "%s:%d: numbered parameter is already used here",
24233 outer ? "outer" : "inner",
24234 p->ruby_sourcefile, nd_line(used));
24235 parser_show_error_line(p, &used->nd_loc);
24236 return 1;
24237 }
24238 return 0;
24239}
24240
24241static int
24242numparam_used_p(struct parser_params *p)
24243{
24244 NODE *numparam = p->lvtbl->numparam.current;
24245 if (numparam) {
24246 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24247 "%s:%d: numbered parameter is already used here",
24248 p->ruby_sourcefile, nd_line(numparam));
24249 parser_show_error_line(p, &numparam->nd_loc);
24250 return 1;
24251 }
24252 return 0;
24253}
24254
24255static int
24256it_used_p(struct parser_params *p)
24257{
24258 NODE *it = p->lvtbl->it;
24259 if (it) {
24260 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24261 "%s:%d: 'it' is already used here",
24262 p->ruby_sourcefile, nd_line(it));
24263 parser_show_error_line(p, &it->nd_loc);
24264 return 1;
24265 }
24266 return 0;
24267}
24268
24269static NODE*
24270gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24271{
24272 ID *vidp = NULL;
24273 NODE *node;
24274 switch (id) {
24275 case keyword_self:
24276 return NEW_SELF(loc);
24277 case keyword_nil:
24278 return NEW_NIL(loc);
24279 case keyword_true:
24280 return NEW_TRUE(loc);
24281 case keyword_false:
24282 return NEW_FALSE(loc);
24283 case keyword__FILE__:
24284 {
24285 VALUE file = p->ruby_sourcefile_string;
24286 if (NIL_P(file))
24287 file = rb_str_new(0, 0);
24288 node = NEW_FILE(file, loc);
24289 }
24290 return node;
24291 case keyword__LINE__:
24292 return NEW_LINE(loc);
24293 case keyword__ENCODING__:
24294 return NEW_ENCODING(loc);
24295
24296 }
24297 switch (id_type(id)) {
24298 case ID_LOCAL:
24299 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24300 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24301 if (vidp) *vidp |= LVAR_USED;
24302 node = NEW_DVAR(id, loc);
24303 return node;
24304 }
24305 if (local_id_ref(p, id, &vidp)) {
24306 if (vidp) *vidp |= LVAR_USED;
24307 node = NEW_LVAR(id, loc);
24308 return node;
24309 }
24310 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24311 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24312 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24313 node = NEW_DVAR(id, loc);
24314 struct local_vars *local = p->lvtbl;
24315 if (!local->numparam.current) local->numparam.current = node;
24316 return node;
24317 }
24318# if WARN_PAST_SCOPE
24319 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24320 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24321 }
24322# endif
24323 /* method call without arguments */
24324 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24325 if (numparam_used_p(p)) return 0;
24326 if (p->max_numparam == ORDINAL_PARAM) {
24327 compile_error(p, "ordinary parameter is defined");
24328 return 0;
24329 }
24330 if (!p->it_id) {
24331 p->it_id = idItImplicit;
24332 vtable_add(p->lvtbl->args, p->it_id);
24333 }
24334 NODE *node = NEW_DVAR(p->it_id, loc);
24335 if (!p->lvtbl->it) p->lvtbl->it = node;
24336 return node;
24337 }
24338 return NEW_VCALL(id, loc);
24339 case ID_GLOBAL:
24340 return NEW_GVAR(id, loc);
24341 case ID_INSTANCE:
24342 return NEW_IVAR(id, loc);
24343 case ID_CONST:
24344 return NEW_CONST(id, loc);
24345 case ID_CLASS:
24346 return NEW_CVAR(id, loc);
24347 }
24348 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24349 return 0;
24350}
24351
24352static rb_node_opt_arg_t *
24353opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24354{
24355 rb_node_opt_arg_t *opts = opt_list;
24356 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24357
24358 while (opts->nd_next) {
24359 opts = opts->nd_next;
24360 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24361 }
24362 opts->nd_next = opt;
24363
24364 return opt_list;
24365}
24366
24367static rb_node_kw_arg_t *
24368kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24369{
24370 if (kwlist) {
24371 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24372 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24373 }
24374 return kwlist;
24375}
24376
24377static NODE *
24378new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24379{
24380 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24381 p->ctxt.has_trailing_semicolon = 0;
24382
24383 NODE *n = expr;
24384 while (n) {
24385 if (nd_type_p(n, NODE_BEGIN)) {
24386 n = RNODE_BEGIN(n)->nd_body;
24387 }
24388 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24389 n = RNODE_BLOCK(n)->nd_head;
24390 }
24391 else {
24392 break;
24393 }
24394 }
24395
24396 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24397 NODE *block = NEW_BLOCK(expr, loc);
24398 return NEW_DEFINED(block, loc, keyword_loc);
24399 }
24400
24401 return NEW_DEFINED(n, loc, keyword_loc);
24402}
24403
24404static NODE*
24405str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24406{
24407 VALUE lit;
24408 rb_parser_string_t *str = RNODE_STR(node)->string;
24409 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24410 yyerror1(loc, "invalid symbol");
24411 lit = STR_NEW0();
24412 }
24413 else {
24414 lit = rb_str_new_parser_string(str);
24415 }
24416 return NEW_SYM(lit, loc);
24417}
24418
24419static NODE*
24420symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24421{
24422 enum node_type type = nd_type(symbol);
24423 switch (type) {
24424 case NODE_DSTR:
24425 nd_set_type(symbol, NODE_DSYM);
24426 break;
24427 case NODE_STR:
24428 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24429 break;
24430 default:
24431 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24432 }
24433 return list_append(p, symbols, symbol);
24434}
24435
24436static void
24437dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24438{
24439 if (dreg->string) {
24440 reg_fragment_setenc(p, dreg->string, options);
24441 }
24442 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24443 NODE *frag = list->nd_head;
24444 if (nd_type_p(frag, NODE_STR)) {
24445 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24446 }
24447 else if (nd_type_p(frag, NODE_DSTR)) {
24448 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24449 }
24450 }
24451}
24452
24453static NODE *
24454new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24455{
24456 if (!node) {
24457 /* Check string is valid regex */
24458 rb_parser_string_t *str = STRING_NEW0();
24459 reg_compile(p, str, options);
24460 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24461 return node;
24462 }
24463 switch (nd_type(node)) {
24464 case NODE_STR:
24465 {
24466 /* Check string is valid regex */
24467 reg_compile(p, RNODE_STR(node)->string, options);
24468 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24469 }
24470 break;
24471 default:
24472 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24473 /* fall through */
24474 case NODE_DSTR:
24475 nd_set_type(node, NODE_DREGX);
24476 nd_set_loc(node, loc);
24477 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24478 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24479 if (dreg->nd_next) {
24480 dregex_fragment_setenc(p, dreg, options);
24481 }
24482 if (options & RE_OPTION_ONCE) {
24483 node = NEW_ONCE(node, loc);
24484 }
24485 break;
24486 }
24487 return node;
24488}
24489
24490static rb_node_kw_arg_t *
24491new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24492{
24493 if (!k) return 0;
24494 return NEW_KW_ARG((k), loc);
24495}
24496
24497static NODE *
24498new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24499{
24500 if (!node) {
24501 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24502 return xstr;
24503 }
24504 switch (nd_type(node)) {
24505 case NODE_STR:
24506 nd_set_type(node, NODE_XSTR);
24507 nd_set_loc(node, loc);
24508 break;
24509 case NODE_DSTR:
24510 nd_set_type(node, NODE_DXSTR);
24511 nd_set_loc(node, loc);
24512 break;
24513 default:
24514 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24515 break;
24516 }
24517 return node;
24518}
24519
24520static const
24521struct st_hash_type literal_type = {
24522 literal_cmp,
24523 literal_hash,
24524};
24525
24526static int nd_type_st_key_enable_p(NODE *node);
24527
24528static void
24529check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24530{
24531 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24532 if (!arg || !p->case_labels) return;
24533 if (!nd_type_st_key_enable_p(arg)) return;
24534
24535 if (p->case_labels == CHECK_LITERAL_WHEN) {
24536 p->case_labels = st_init_table(&literal_type);
24537 }
24538 else {
24539 st_data_t line;
24540 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24541 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24542 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24543 return;
24544 }
24545 }
24546 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24547}
24548
24549#ifdef RIPPER
24550static int
24551id_is_var(struct parser_params *p, ID id)
24552{
24553 if (is_notop_id(id)) {
24554 switch (id & ID_SCOPE_MASK) {
24555 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24556 return 1;
24557 case ID_LOCAL:
24558 if (dyna_in_block(p)) {
24559 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24560 }
24561 if (local_id(p, id)) return 1;
24562 /* method call without arguments */
24563 return 0;
24564 }
24565 }
24566 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24567 return 0;
24568}
24569#endif
24570
24571static inline enum lex_state_e
24572parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24573{
24574 if (p->debug) {
24575 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24576 }
24577 return p->lex.state = ls;
24578}
24579
24580#ifndef RIPPER
24581static void
24582flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24583{
24584 VALUE mesg = p->debug_buffer;
24585
24586 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24587 p->debug_buffer = Qnil;
24588 rb_io_puts(1, &mesg, out);
24589 }
24590 if (!NIL_P(str) && RSTRING_LEN(str)) {
24591 rb_io_write(p->debug_output, str);
24592 }
24593}
24594
24595static const char rb_parser_lex_state_names[][8] = {
24596 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24597 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24598 "LABEL", "LABELED","FITEM",
24599};
24600
24601static VALUE
24602append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24603{
24604 int i, sep = 0;
24605 unsigned int mask = 1;
24606 static const char none[] = "NONE";
24607
24608 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24609 if ((unsigned)state & mask) {
24610 if (sep) {
24611 rb_str_cat(buf, "|", 1);
24612 }
24613 sep = 1;
24614 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24615 }
24616 }
24617 if (!sep) {
24618 rb_str_cat(buf, none, sizeof(none)-1);
24619 }
24620 return buf;
24621}
24622
24623enum lex_state_e
24624rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24625 enum lex_state_e to, int line)
24626{
24627 VALUE mesg;
24628 mesg = rb_str_new_cstr("lex_state: ");
24629 append_lex_state_name(p, from, mesg);
24630 rb_str_cat_cstr(mesg, " -> ");
24631 append_lex_state_name(p, to, mesg);
24632 rb_str_catf(mesg, " at line %d\n", line);
24633 flush_debug_buffer(p, p->debug_output, mesg);
24634 return to;
24635}
24636
24637VALUE
24638rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24639{
24640 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24641}
24642
24643static void
24644append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24645{
24646 if (stack == 0) {
24647 rb_str_cat_cstr(mesg, "0");
24648 }
24649 else {
24650 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24651 for (; mask && !(stack & mask); mask >>= 1) continue;
24652 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24653 }
24654}
24655
24656void
24657rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24658 const char *name, int line)
24659{
24660 VALUE mesg = rb_sprintf("%s: ", name);
24661 append_bitstack_value(p, stack, mesg);
24662 rb_str_catf(mesg, " at line %d\n", line);
24663 flush_debug_buffer(p, p->debug_output, mesg);
24664}
24665
24666void
24667rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24668{
24669 va_list ap;
24670 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24671
24672 va_start(ap, fmt);
24673 rb_str_vcatf(mesg, fmt, ap);
24674 va_end(ap);
24675 yyerror0(RSTRING_PTR(mesg));
24676 RB_GC_GUARD(mesg);
24677
24678 mesg = rb_str_new(0, 0);
24679 append_lex_state_name(p, p->lex.state, mesg);
24680 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24681 rb_str_resize(mesg, 0);
24682 append_bitstack_value(p, p->cond_stack, mesg);
24683 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24684 rb_str_resize(mesg, 0);
24685 append_bitstack_value(p, p->cmdarg_stack, mesg);
24686 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24687 if (p->debug_output == rb_ractor_stdout())
24688 p->debug_output = rb_ractor_stderr();
24689 p->debug = TRUE;
24690}
24691
24692static YYLTYPE *
24693rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24694{
24695 yylloc->beg_pos.lineno = sourceline;
24696 yylloc->beg_pos.column = beg_pos;
24697 yylloc->end_pos.lineno = sourceline;
24698 yylloc->end_pos.column = end_pos;
24699 return yylloc;
24700}
24701
24702YYLTYPE *
24703rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24704{
24705 int sourceline = here->sourceline;
24706 int beg_pos = (int)here->offset - here->quote
24707 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24708 int end_pos = (int)here->offset + here->length + here->quote;
24709
24710 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24711}
24712
24713YYLTYPE *
24714rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24715{
24716 yylloc->beg_pos.lineno = p->delayed.beg_line;
24717 yylloc->beg_pos.column = p->delayed.beg_col;
24718 yylloc->end_pos.lineno = p->delayed.end_line;
24719 yylloc->end_pos.column = p->delayed.end_col;
24720
24721 return yylloc;
24722}
24723
24724YYLTYPE *
24725rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24726{
24727 int sourceline = p->ruby_sourceline;
24728 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24729 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24730 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24731}
24732
24733YYLTYPE *
24734rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24735{
24736 yylloc->end_pos = yylloc->beg_pos;
24737
24738 return yylloc;
24739}
24740
24741YYLTYPE *
24742rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24743{
24744 int sourceline = p->ruby_sourceline;
24745 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24746 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24747 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24748}
24749
24750YYLTYPE *
24751rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24752{
24753 int sourceline = p->ruby_sourceline;
24754 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24755 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24756 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24757}
24758#endif /* !RIPPER */
24759
24760static int
24761assignable0(struct parser_params *p, ID id, const char **err)
24762{
24763 if (!id) return -1;
24764 switch (id) {
24765 case keyword_self:
24766 *err = "Can't change the value of self";
24767 return -1;
24768 case keyword_nil:
24769 *err = "Can't assign to nil";
24770 return -1;
24771 case keyword_true:
24772 *err = "Can't assign to true";
24773 return -1;
24774 case keyword_false:
24775 *err = "Can't assign to false";
24776 return -1;
24777 case keyword__FILE__:
24778 *err = "Can't assign to __FILE__";
24779 return -1;
24780 case keyword__LINE__:
24781 *err = "Can't assign to __LINE__";
24782 return -1;
24783 case keyword__ENCODING__:
24784 *err = "Can't assign to __ENCODING__";
24785 return -1;
24786 }
24787 switch (id_type(id)) {
24788 case ID_LOCAL:
24789 if (dyna_in_block(p)) {
24790 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24791 compile_error(p, "Can't assign to numbered parameter _%d",
24792 NUMPARAM_ID_TO_IDX(id));
24793 return -1;
24794 }
24795 if (dvar_curr(p, id)) return NODE_DASGN;
24796 if (dvar_defined(p, id)) return NODE_DASGN;
24797 if (local_id(p, id)) return NODE_LASGN;
24798 dyna_var(p, id);
24799 return NODE_DASGN;
24800 }
24801 else {
24802 if (!local_id(p, id)) local_var(p, id);
24803 return NODE_LASGN;
24804 }
24805 break;
24806 case ID_GLOBAL: return NODE_GASGN;
24807 case ID_INSTANCE: return NODE_IASGN;
24808 case ID_CONST:
24809 if (!p->ctxt.in_def) return NODE_CDECL;
24810 *err = "dynamic constant assignment";
24811 return -1;
24812 case ID_CLASS: return NODE_CVASGN;
24813 default:
24814 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24815 }
24816 return -1;
24817}
24818
24819static NODE*
24820assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24821{
24822 const char *err = 0;
24823 int node_type = assignable0(p, id, &err);
24824 switch (node_type) {
24825 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24826 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24827 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24828 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24829 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24830 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24831 }
24832/* TODO: FIXME */
24833#ifndef RIPPER
24834 if (err) yyerror1(loc, err);
24835#else
24836 if (err) set_value(assign_error(p, err, p->s_lvalue));
24837#endif
24838 return NEW_ERROR(loc);
24839}
24840
24841static int
24842is_private_local_id(struct parser_params *p, ID name)
24843{
24844 VALUE s;
24845 if (name == idUScore) return 1;
24846 if (!is_local_id(name)) return 0;
24847 s = rb_id2str(name);
24848 if (!s) return 0;
24849 return RSTRING_PTR(s)[0] == '_';
24850}
24851
24852static int
24853shadowing_lvar_0(struct parser_params *p, ID name)
24854{
24855 if (dyna_in_block(p)) {
24856 if (dvar_curr(p, name)) {
24857 if (is_private_local_id(p, name)) return 1;
24858 yyerror0("duplicated argument name");
24859 }
24860 else if (dvar_defined(p, name) || local_id(p, name)) {
24861 vtable_add(p->lvtbl->vars, name);
24862 if (p->lvtbl->used) {
24863 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24864 }
24865 return 0;
24866 }
24867 }
24868 else {
24869 if (local_id(p, name)) {
24870 if (is_private_local_id(p, name)) return 1;
24871 yyerror0("duplicated argument name");
24872 }
24873 }
24874 return 1;
24875}
24876
24877static ID
24878shadowing_lvar(struct parser_params *p, ID name)
24879{
24880 shadowing_lvar_0(p, name);
24881 return name;
24882}
24883
24884static void
24885new_bv(struct parser_params *p, ID name)
24886{
24887 if (!name) return;
24888 if (!is_local_id(name)) {
24889 compile_error(p, "invalid local variable - %"PRIsVALUE,
24890 rb_id2str(name));
24891 return;
24892 }
24893 if (!shadowing_lvar_0(p, name)) return;
24894 dyna_var(p, name);
24895 ID *vidp = 0;
24896 if (dvar_defined_ref(p, name, &vidp)) {
24897 if (vidp) *vidp |= LVAR_USED;
24898 }
24899}
24900
24901static void
24902aryset_check(struct parser_params *p, NODE *args)
24903{
24904 NODE *block = 0, *kwds = 0;
24905 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
24906 block = RNODE_BLOCK_PASS(args)->nd_body;
24907 args = RNODE_BLOCK_PASS(args)->nd_head;
24908 }
24909 if (args && nd_type_p(args, NODE_ARGSCAT)) {
24910 args = RNODE_ARGSCAT(args)->nd_body;
24911 }
24912 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
24913 kwds = RNODE_ARGSPUSH(args)->nd_body;
24914 }
24915 else {
24916 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
24917 next = RNODE_LIST(next)->nd_next) {
24918 kwds = RNODE_LIST(next)->nd_head;
24919 }
24920 }
24921 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
24922 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
24923 }
24924 if (block) {
24925 yyerror1(&block->nd_loc, "block arg given in index assignment");
24926 }
24927}
24928
24929static NODE *
24930aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
24931{
24932 aryset_check(p, idx);
24933 return NEW_ATTRASGN(recv, tASET, idx, loc);
24934}
24935
24936static void
24937block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
24938{
24939 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
24940 compile_error(p, "both block arg and actual block given");
24941 }
24942}
24943
24944static NODE *
24945attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
24946{
24947 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
24948 return NEW_ATTRASGN(recv, id, 0, loc);
24949}
24950
24951static VALUE
24952rb_backref_error(struct parser_params *p, NODE *node)
24953{
24954#ifndef RIPPER
24955# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
24956#else
24957# define ERR(...) rb_sprintf(__VA_ARGS__)
24958#endif
24959 switch (nd_type(node)) {
24960 case NODE_NTH_REF:
24961 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
24962 case NODE_BACK_REF:
24963 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
24964 }
24965#undef ERR
24966 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
24967}
24968
24969static NODE *
24970arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24971{
24972 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
24973 switch (nd_type(node1)) {
24974 case NODE_LIST:
24975 return list_append(p, node1, node2);
24976 case NODE_BLOCK_PASS:
24977 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24978 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
24979 return node1;
24980 case NODE_ARGSPUSH:
24981 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
24982 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
24983 nd_set_type(node1, NODE_ARGSCAT);
24984 return node1;
24985 case NODE_ARGSCAT:
24986 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24987 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
24988 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
24989 return node1;
24990 }
24991 return NEW_ARGSPUSH(node1, node2, loc);
24992}
24993
24994static NODE *
24995arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24996{
24997 if (!node2) return node1;
24998 switch (nd_type(node1)) {
24999 case NODE_BLOCK_PASS:
25000 if (RNODE_BLOCK_PASS(node1)->nd_head)
25001 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25002 else
25003 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25004 return node1;
25005 case NODE_ARGSPUSH:
25006 if (!nd_type_p(node2, NODE_LIST)) break;
25007 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25008 nd_set_type(node1, NODE_ARGSCAT);
25009 return node1;
25010 case NODE_ARGSCAT:
25011 if (!nd_type_p(node2, NODE_LIST) ||
25012 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25013 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25014 return node1;
25015 }
25016 return NEW_ARGSCAT(node1, node2, loc);
25017}
25018
25019static NODE *
25020last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25021{
25022 NODE *n1;
25023 if ((n1 = splat_array(args)) != 0) {
25024 return list_append(p, n1, last_arg);
25025 }
25026 return arg_append(p, args, last_arg, loc);
25027}
25028
25029static NODE *
25030rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25031{
25032 NODE *n1;
25033 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25034 return list_concat(n1, rest_arg);
25035 }
25036 return arg_concat(p, args, rest_arg, loc);
25037}
25038
25039static NODE *
25040splat_array(NODE* node)
25041{
25042 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25043 if (nd_type_p(node, NODE_LIST)) return node;
25044 return 0;
25045}
25046
25047static void
25048mark_lvar_used(struct parser_params *p, NODE *rhs)
25049{
25050 ID *vidp = NULL;
25051 if (!rhs) return;
25052 switch (nd_type(rhs)) {
25053 case NODE_LASGN:
25054 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25055 if (vidp) *vidp |= LVAR_USED;
25056 }
25057 break;
25058 case NODE_DASGN:
25059 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25060 if (vidp) *vidp |= LVAR_USED;
25061 }
25062 break;
25063#if 0
25064 case NODE_MASGN:
25065 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25066 mark_lvar_used(p, rhs->nd_head);
25067 }
25068 break;
25069#endif
25070 }
25071}
25072
25073static int is_static_content(NODE *node);
25074
25075static NODE *
25076node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25077{
25078 if (!lhs) return 0;
25079
25080 switch (nd_type(lhs)) {
25081 case NODE_CDECL:
25082 case NODE_GASGN:
25083 case NODE_IASGN:
25084 case NODE_LASGN:
25085 case NODE_DASGN:
25086 case NODE_MASGN:
25087 case NODE_CVASGN:
25088 set_nd_value(p, lhs, rhs);
25089 nd_set_loc(lhs, loc);
25090 break;
25091
25092 case NODE_ATTRASGN:
25093 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25094 nd_set_loc(lhs, loc);
25095 break;
25096
25097 default:
25098 /* should not happen */
25099 break;
25100 }
25101
25102 return lhs;
25103}
25104
25105static NODE *
25106value_expr_check(struct parser_params *p, NODE *node)
25107{
25108 NODE *void_node = 0, *vn;
25109
25110 if (!node) {
25111 rb_warning0("empty expression");
25112 }
25113 while (node) {
25114 switch (nd_type(node)) {
25115 case NODE_ENSURE:
25116 vn = RNODE_ENSURE(node)->nd_head;
25117 node = RNODE_ENSURE(node)->nd_ensr;
25118 /* nd_ensr should not be NULL, check it out next */
25119 if (vn && (vn = value_expr_check(p, vn))) {
25120 goto found;
25121 }
25122 break;
25123
25124 case NODE_RESCUE:
25125 /* void only if all children are void */
25126 vn = RNODE_RESCUE(node)->nd_head;
25127 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
25128 if (!void_node) void_node = vn;
25129 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25130 if (!nd_type_p(r, NODE_RESBODY)) {
25131 compile_error(p, "unexpected node");
25132 return NULL;
25133 }
25134 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25135 void_node = 0;
25136 break;
25137 }
25138 if (!void_node) void_node = vn;
25139 }
25140 node = RNODE_RESCUE(node)->nd_else;
25141 if (!node) return void_node;
25142 break;
25143
25144 case NODE_RETURN:
25145 case NODE_BREAK:
25146 case NODE_NEXT:
25147 case NODE_REDO:
25148 case NODE_RETRY:
25149 goto found;
25150
25151 case NODE_CASE3:
25152 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
25153 compile_error(p, "unexpected node");
25154 return NULL;
25155 }
25156 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
25157 return NULL;
25158 }
25159 /* single line pattern matching with "=>" operator */
25160 goto found;
25161
25162 case NODE_BLOCK:
25163 while (RNODE_BLOCK(node)->nd_next) {
25164 node = RNODE_BLOCK(node)->nd_next;
25165 }
25166 node = RNODE_BLOCK(node)->nd_head;
25167 break;
25168
25169 case NODE_BEGIN:
25170 node = RNODE_BEGIN(node)->nd_body;
25171 break;
25172
25173 case NODE_IF:
25174 case NODE_UNLESS:
25175 if (!RNODE_IF(node)->nd_body) {
25176 return NULL;
25177 }
25178 else if (!RNODE_IF(node)->nd_else) {
25179 return NULL;
25180 }
25181 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25182 if (!vn) return NULL;
25183 if (!void_node) void_node = vn;
25184 node = RNODE_IF(node)->nd_else;
25185 break;
25186
25187 case NODE_AND:
25188 case NODE_OR:
25189 node = RNODE_AND(node)->nd_1st;
25190 break;
25191
25192 case NODE_LASGN:
25193 case NODE_DASGN:
25194 case NODE_MASGN:
25195 mark_lvar_used(p, node);
25196 return NULL;
25197
25198 default:
25199 return NULL;
25200 }
25201 }
25202
25203 return NULL;
25204
25205 found:
25206 /* return the first found node */
25207 return void_node ? void_node : node;
25208}
25209
25210static int
25211value_expr(struct parser_params *p, NODE *node)
25212{
25213 NODE *void_node = value_expr_check(p, node);
25214 if (void_node) {
25215 yyerror1(&void_node->nd_loc, "void value expression");
25216 /* or "control never reach"? */
25217 return FALSE;
25218 }
25219 return TRUE;
25220}
25221
25222static void
25223void_expr(struct parser_params *p, NODE *node)
25224{
25225 const char *useless = 0;
25226
25227 if (!RTEST(ruby_verbose)) return;
25228
25229 if (!node || !(node = nd_once_body(node))) return;
25230 switch (nd_type(node)) {
25231 case NODE_OPCALL:
25232 switch (RNODE_OPCALL(node)->nd_mid) {
25233 case '+':
25234 case '-':
25235 case '*':
25236 case '/':
25237 case '%':
25238 case tPOW:
25239 case tUPLUS:
25240 case tUMINUS:
25241 case '|':
25242 case '^':
25243 case '&':
25244 case tCMP:
25245 case '>':
25246 case tGEQ:
25247 case '<':
25248 case tLEQ:
25249 case tEQ:
25250 case tNEQ:
25251 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25252 break;
25253 }
25254 break;
25255
25256 case NODE_LVAR:
25257 case NODE_DVAR:
25258 case NODE_GVAR:
25259 case NODE_IVAR:
25260 case NODE_CVAR:
25261 case NODE_NTH_REF:
25262 case NODE_BACK_REF:
25263 useless = "a variable";
25264 break;
25265 case NODE_CONST:
25266 useless = "a constant";
25267 break;
25268 case NODE_SYM:
25269 case NODE_LINE:
25270 case NODE_FILE:
25271 case NODE_ENCODING:
25272 case NODE_INTEGER:
25273 case NODE_FLOAT:
25274 case NODE_RATIONAL:
25275 case NODE_IMAGINARY:
25276 case NODE_STR:
25277 case NODE_DSTR:
25278 case NODE_REGX:
25279 case NODE_DREGX:
25280 useless = "a literal";
25281 break;
25282 case NODE_COLON2:
25283 case NODE_COLON3:
25284 useless = "::";
25285 break;
25286 case NODE_DOT2:
25287 useless = "..";
25288 break;
25289 case NODE_DOT3:
25290 useless = "...";
25291 break;
25292 case NODE_SELF:
25293 useless = "self";
25294 break;
25295 case NODE_NIL:
25296 useless = "nil";
25297 break;
25298 case NODE_TRUE:
25299 useless = "true";
25300 break;
25301 case NODE_FALSE:
25302 useless = "false";
25303 break;
25304 case NODE_DEFINED:
25305 useless = "defined?";
25306 break;
25307 }
25308
25309 if (useless) {
25310 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25311 }
25312}
25313
25314/* warns useless use of block and returns the last statement node */
25315static NODE *
25316void_stmts(struct parser_params *p, NODE *node)
25317{
25318 NODE *const n = node;
25319 if (!RTEST(ruby_verbose)) return n;
25320 if (!node) return n;
25321 if (!nd_type_p(node, NODE_BLOCK)) return n;
25322
25323 while (RNODE_BLOCK(node)->nd_next) {
25324 void_expr(p, RNODE_BLOCK(node)->nd_head);
25325 node = RNODE_BLOCK(node)->nd_next;
25326 }
25327 return RNODE_BLOCK(node)->nd_head;
25328}
25329
25330static NODE *
25331remove_begin(NODE *node)
25332{
25333 NODE **n = &node, *n1 = node;
25334 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25335 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25336 }
25337 return node;
25338}
25339
25340static void
25341reduce_nodes(struct parser_params *p, NODE **body)
25342{
25343 NODE *node = *body;
25344
25345 if (!node) {
25346 *body = NEW_NIL(&NULL_LOC);
25347 return;
25348 }
25349#define subnodes(type, n1, n2) \
25350 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25351 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25352 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25353
25354 while (node) {
25355 int newline = (int)nd_fl_newline(node);
25356 switch (nd_type(node)) {
25357 end:
25358 case NODE_NIL:
25359 *body = 0;
25360 return;
25361 case NODE_BEGIN:
25362 *body = node = RNODE_BEGIN(node)->nd_body;
25363 if (newline && node) nd_set_fl_newline(node);
25364 continue;
25365 case NODE_BLOCK:
25366 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25367 break;
25368 case NODE_IF:
25369 case NODE_UNLESS:
25370 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25371 return;
25372 case NODE_CASE:
25373 body = &RNODE_CASE(node)->nd_body;
25374 break;
25375 case NODE_WHEN:
25376 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25377 break;
25378 case NODE_ENSURE:
25379 body = &RNODE_ENSURE(node)->nd_head;
25380 break;
25381 case NODE_RESCUE:
25382 newline = 0; // RESBODY should not be a NEWLINE
25383 if (RNODE_RESCUE(node)->nd_else) {
25384 body = &RNODE_RESCUE(node)->nd_resq;
25385 break;
25386 }
25387 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25388 break;
25389 default:
25390 return;
25391 }
25392 node = *body;
25393 if (newline && node) nd_set_fl_newline(node);
25394 }
25395
25396#undef subnodes
25397}
25398
25399static int
25400is_static_content(NODE *node)
25401{
25402 if (!node) return 1;
25403 switch (nd_type(node)) {
25404 case NODE_HASH:
25405 if (!(node = RNODE_HASH(node)->nd_head)) break;
25406 case NODE_LIST:
25407 do {
25408 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25409 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25410 case NODE_SYM:
25411 case NODE_REGX:
25412 case NODE_LINE:
25413 case NODE_FILE:
25414 case NODE_ENCODING:
25415 case NODE_INTEGER:
25416 case NODE_FLOAT:
25417 case NODE_RATIONAL:
25418 case NODE_IMAGINARY:
25419 case NODE_STR:
25420 case NODE_NIL:
25421 case NODE_TRUE:
25422 case NODE_FALSE:
25423 case NODE_ZLIST:
25424 break;
25425 default:
25426 return 0;
25427 }
25428 return 1;
25429}
25430
25431static int
25432assign_in_cond(struct parser_params *p, NODE *node)
25433{
25434 switch (nd_type(node)) {
25435 case NODE_MASGN:
25436 case NODE_LASGN:
25437 case NODE_DASGN:
25438 case NODE_GASGN:
25439 case NODE_IASGN:
25440 case NODE_CVASGN:
25441 case NODE_CDECL:
25442 break;
25443
25444 default:
25445 return 0;
25446 }
25447
25448 if (!get_nd_value(p, node)) return 1;
25449 if (is_static_content(get_nd_value(p, node))) {
25450 /* reports always */
25451 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25452 }
25453 return 1;
25454}
25455
25456enum cond_type {
25457 COND_IN_OP,
25458 COND_IN_COND,
25459 COND_IN_FF
25460};
25461
25462#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25463 switch (t) { \
25464 case COND_IN_OP: break; \
25465 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25466 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25467 } \
25468} while (0)
25469
25470static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25471
25472static NODE*
25473range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25474{
25475 enum node_type type;
25476
25477 if (node == 0) return 0;
25478
25479 type = nd_type(node);
25480 value_expr(p, node);
25481 if (type == NODE_INTEGER) {
25482 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25483 ID lineno = rb_intern("$.");
25484 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25485 }
25486 return cond0(p, node, COND_IN_FF, loc, true);
25487}
25488
25489static NODE*
25490cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25491{
25492 if (node == 0) return 0;
25493 if (!(node = nd_once_body(node))) return 0;
25494 assign_in_cond(p, node);
25495
25496 switch (nd_type(node)) {
25497 case NODE_BEGIN:
25498 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25499 break;
25500
25501 case NODE_DSTR:
25502 case NODE_EVSTR:
25503 case NODE_STR:
25504 case NODE_FILE:
25505 SWITCH_BY_COND_TYPE(type, warn, "string ");
25506 break;
25507
25508 case NODE_REGX:
25509 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25510 nd_set_type(node, NODE_MATCH);
25511 break;
25512
25513 case NODE_DREGX:
25514 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25515
25516 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25517
25518 case NODE_BLOCK:
25519 {
25520 NODE *end = RNODE_BLOCK(node)->nd_end;
25521 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25522 if (top) top = node == end;
25523 *expr = cond0(p, *expr, type, loc, top);
25524 }
25525 break;
25526
25527 case NODE_AND:
25528 case NODE_OR:
25529 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25530 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25531 break;
25532
25533 case NODE_DOT2:
25534 case NODE_DOT3:
25535 if (!top) break;
25536 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25537 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25538 switch (nd_type(node)) {
25539 case NODE_DOT2:
25540 nd_set_type(node,NODE_FLIP2);
25541 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25542 (void)flip2;
25543 break;
25544 case NODE_DOT3:
25545 nd_set_type(node, NODE_FLIP3);
25546 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25547 (void)flip3;
25548 break;
25549 }
25550 break;
25551
25552 case NODE_SYM:
25553 case NODE_DSYM:
25554 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25555 break;
25556
25557 case NODE_LINE:
25558 case NODE_ENCODING:
25559 case NODE_INTEGER:
25560 case NODE_FLOAT:
25561 case NODE_RATIONAL:
25562 case NODE_IMAGINARY:
25563 SWITCH_BY_COND_TYPE(type, warning, "");
25564 break;
25565
25566 default:
25567 break;
25568 }
25569 return node;
25570}
25571
25572static NODE*
25573cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25574{
25575 if (node == 0) return 0;
25576 return cond0(p, node, COND_IN_COND, loc, true);
25577}
25578
25579static NODE*
25580method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25581{
25582 if (node == 0) return 0;
25583 return cond0(p, node, COND_IN_OP, loc, true);
25584}
25585
25586static NODE*
25587new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25588{
25589 YYLTYPE loc = {*pos, *pos};
25590 return NEW_NIL(&loc);
25591}
25592
25593static NODE*
25594new_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)
25595{
25596 if (!cc) return right;
25597 cc = cond0(p, cc, COND_IN_COND, loc, true);
25598 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25599}
25600
25601static NODE*
25602new_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)
25603{
25604 if (!cc) return right;
25605 cc = cond0(p, cc, COND_IN_COND, loc, true);
25606 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25607}
25608
25609#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))
25610
25611static NODE*
25612logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25613 const YYLTYPE *op_loc, const YYLTYPE *loc)
25614{
25615 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25616 NODE *op;
25617 value_expr(p, left);
25618 if (left && nd_type_p(left, type)) {
25619 NODE *node = left, *second;
25620 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25621 node = second;
25622 }
25623 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25624 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25625 left->nd_loc.end_pos = loc->end_pos;
25626 return left;
25627 }
25628 op = NEW_AND_OR(type, left, right, loc, op_loc);
25629 nd_set_line(op, op_loc->beg_pos.lineno);
25630 return op;
25631}
25632
25633#undef NEW_AND_OR
25634
25635static void
25636no_blockarg(struct parser_params *p, NODE *node)
25637{
25638 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25639 compile_error(p, "block argument should not be given");
25640 }
25641}
25642
25643static NODE *
25644ret_args(struct parser_params *p, NODE *node)
25645{
25646 if (node) {
25647 no_blockarg(p, node);
25648 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25649 node = RNODE_LIST(node)->nd_head;
25650 }
25651 }
25652 return node;
25653}
25654
25655static NODE*
25656negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
25657{
25658 switch (nd_type(node)) {
25659 case NODE_INTEGER:
25660 RNODE_INTEGER(node)->minus = TRUE;
25661 break;
25662 case NODE_FLOAT:
25663 RNODE_FLOAT(node)->minus = TRUE;
25664 break;
25665 case NODE_RATIONAL:
25666 RNODE_RATIONAL(node)->minus = TRUE;
25667 break;
25668 case NODE_IMAGINARY:
25669 RNODE_IMAGINARY(node)->minus = TRUE;
25670 break;
25671 }
25672 node->nd_loc = *loc;
25673 return node;
25674}
25675
25676static NODE *
25677arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25678{
25679 if (node2) {
25680 if (!node1) return (NODE *)node2;
25681 node2->nd_head = node1;
25682 nd_set_first_lineno(node2, nd_first_lineno(node1));
25683 nd_set_first_column(node2, nd_first_column(node1));
25684 return (NODE *)node2;
25685 }
25686 return node1;
25687}
25688
25689static bool
25690args_info_empty_p(struct rb_args_info *args)
25691{
25692 if (args->pre_args_num) return false;
25693 if (args->post_args_num) return false;
25694 if (args->rest_arg) return false;
25695 if (args->opt_args) return false;
25696 if (args->block_arg) return false;
25697 if (args->kw_args) return false;
25698 if (args->kw_rest_arg) return false;
25699 return true;
25700}
25701
25702static rb_node_args_t *
25703new_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)
25704{
25705 struct rb_args_info *args = &tail->nd_ainfo;
25706
25707 if (args->forwarding) {
25708 if (rest_arg) {
25709 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25710 return tail;
25711 }
25712 rest_arg = idFWD_REST;
25713 }
25714
25715 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25716 args->pre_init = pre_args ? pre_args->nd_next : 0;
25717
25718 args->post_args_num = post_args ? post_args->nd_plen : 0;
25719 args->post_init = post_args ? post_args->nd_next : 0;
25720 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25721
25722 args->rest_arg = rest_arg;
25723
25724 args->opt_args = opt_args;
25725
25726 nd_set_loc(RNODE(tail), loc);
25727
25728 return tail;
25729}
25730
25731static rb_node_args_t *
25732new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25733{
25734 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25735 struct rb_args_info *args = &node->nd_ainfo;
25736 if (p->error_p) return node;
25737
25738 args->block_arg = block;
25739 args->kw_args = kw_args;
25740
25741 if (kw_args) {
25742 /*
25743 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25744 * variable order: k1, kr1, k2, &b, internal_id, krest
25745 * #=> <reorder>
25746 * variable order: kr1, k1, k2, internal_id, krest, &b
25747 */
25748 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25749 struct vtable *vtargs = p->lvtbl->args;
25750 rb_node_kw_arg_t *kwn = kw_args;
25751
25752 if (block) block = vtargs->tbl[vtargs->pos-1];
25753 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25754 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25755 while (kwn) {
25756 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25757 --kw_vars;
25758 --required_kw_vars;
25759 kwn = kwn->nd_next;
25760 }
25761
25762 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25763 ID vid = get_nd_vid(p, kwn->nd_body);
25764 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25765 *required_kw_vars++ = vid;
25766 }
25767 else {
25768 *kw_vars++ = vid;
25769 }
25770 }
25771
25772 arg_var(p, kw_bits);
25773 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25774 if (block) arg_var(p, block);
25775
25776 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25777 }
25778 else if (kw_rest_arg == idNil) {
25779 args->no_kwarg = 1;
25780 }
25781 else if (kw_rest_arg) {
25782 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25783 }
25784
25785 return node;
25786}
25787
25788static rb_node_args_t *
25789args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25790{
25791 if (max_numparam > NO_PARAM || it_id) {
25792 if (!args) {
25793 YYLTYPE loc = RUBY_INIT_YYLLOC();
25794 args = new_args_tail(p, 0, 0, 0, 0);
25795 nd_set_loc(RNODE(args), &loc);
25796 }
25797 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25798 }
25799 return args;
25800}
25801
25802static NODE*
25803new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25804{
25805 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25806
25807 if (pre_arg) {
25808 NODE *pre_args = NEW_LIST(pre_arg, loc);
25809 if (RNODE_ARYPTN(aryptn)->pre_args) {
25810 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25811 }
25812 else {
25813 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25814 }
25815 }
25816 return aryptn;
25817}
25818
25819static NODE*
25820new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25821{
25822 if (has_rest) {
25823 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25824 }
25825 else {
25826 rest_arg = NULL;
25827 }
25828 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25829
25830 return node;
25831}
25832
25833static NODE*
25834new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25835{
25836 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25837
25838 return fndptn;
25839}
25840
25841static NODE*
25842new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25843{
25844 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25845 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25846 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25847
25848 return node;
25849}
25850
25851static NODE*
25852new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25853{
25854 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25855 return hshptn;
25856}
25857
25858static NODE*
25859new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25860{
25861 NODE *node, *kw_rest_arg_node;
25862
25863 if (kw_rest_arg == idNil) {
25864 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25865 }
25866 else if (kw_rest_arg) {
25867 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25868 }
25869 else {
25870 kw_rest_arg_node = NULL;
25871 }
25872
25873 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25874
25875 return node;
25876}
25877
25878static NODE*
25879dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25880{
25881 if (!node) {
25882 return NEW_SYM(STR_NEW0(), loc);
25883 }
25884
25885 switch (nd_type(node)) {
25886 case NODE_DSTR:
25887 nd_set_type(node, NODE_DSYM);
25888 nd_set_loc(node, loc);
25889 break;
25890 case NODE_STR:
25891 node = str_to_sym_node(p, node, loc);
25892 break;
25893 default:
25894 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
25895 break;
25896 }
25897 return node;
25898}
25899
25900static int
25901nd_type_st_key_enable_p(NODE *node)
25902{
25903 switch (nd_type(node)) {
25904 case NODE_INTEGER:
25905 case NODE_FLOAT:
25906 case NODE_RATIONAL:
25907 case NODE_IMAGINARY:
25908 case NODE_STR:
25909 case NODE_SYM:
25910 case NODE_REGX:
25911 case NODE_LINE:
25912 case NODE_FILE:
25913 case NODE_ENCODING:
25914 return true;
25915 default:
25916 return false;
25917 }
25918}
25919
25920static VALUE
25921nd_value(struct parser_params *p, NODE *node)
25922{
25923 switch (nd_type(node)) {
25924 case NODE_STR:
25925 return rb_node_str_string_val(node);
25926 case NODE_INTEGER:
25927 return rb_node_integer_literal_val(node);
25928 case NODE_FLOAT:
25929 return rb_node_float_literal_val(node);
25930 case NODE_RATIONAL:
25931 return rb_node_rational_literal_val(node);
25932 case NODE_IMAGINARY:
25933 return rb_node_imaginary_literal_val(node);
25934 case NODE_SYM:
25935 return rb_node_sym_string_val(node);
25936 case NODE_REGX:
25937 return rb_node_regx_string_val(node);
25938 case NODE_LINE:
25939 return rb_node_line_lineno_val(node);
25940 case NODE_ENCODING:
25941 return rb_node_encoding_val(node);
25942 case NODE_FILE:
25943 return rb_node_file_path_val(node);
25944 default:
25945 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
25947 }
25948}
25949
25950static void
25951warn_duplicate_keys(struct parser_params *p, NODE *hash)
25952{
25953 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25954 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
25955 while (hash && RNODE_LIST(hash)->nd_next) {
25956 NODE *head = RNODE_LIST(hash)->nd_head;
25957 NODE *value = RNODE_LIST(hash)->nd_next;
25958 NODE *next = RNODE_LIST(value)->nd_next;
25959 st_data_t key;
25960 st_data_t data;
25961
25962 /* keyword splat, e.g. {k: 1, **z, k: 2} */
25963 if (!head) {
25964 head = value;
25965 }
25966
25967 if (nd_type_st_key_enable_p(head)) {
25968 key = (st_data_t)head;
25969
25970 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
25971 rb_warn2L(nd_line((NODE *)data),
25972 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
25973 nd_value(p, head), WARN_I(nd_line(head)));
25974 }
25975 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
25976 }
25977 hash = next;
25978 }
25979 st_free_table(p->warn_duplicate_keys_table);
25980 p->warn_duplicate_keys_table = NULL;
25981}
25982
25983static NODE *
25984new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25985{
25986 if (hash) warn_duplicate_keys(p, hash);
25987 return NEW_HASH(hash, loc);
25988}
25989
25990static void
25991error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
25992{
25993 if (is_private_local_id(p, id)) {
25994 return;
25995 }
25996 if (st_is_member(p->pvtbl, id)) {
25997 yyerror1(loc, "duplicated variable name");
25998 }
25999 else if (p->ctxt.in_alt_pattern && id) {
26000 yyerror1(loc, "variable capture in alternative pattern");
26001 }
26002 else {
26003 p->ctxt.capture_in_pattern = 1;
26004 st_insert(p->pvtbl, (st_data_t)id, 0);
26005 }
26006}
26007
26008static void
26009error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26010{
26011 if (!p->pktbl) {
26012 p->pktbl = st_init_numtable();
26013 }
26014 else if (st_is_member(p->pktbl, key)) {
26015 yyerror1(loc, "duplicated key name");
26016 return;
26017 }
26018 st_insert(p->pktbl, (st_data_t)key, 0);
26019}
26020
26021static NODE *
26022new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26023{
26024 return NEW_HASH(hash, loc);
26025}
26026
26027static NODE *
26028new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26029{
26030 NODE *asgn;
26031
26032 if (lhs) {
26033 ID vid = get_nd_vid(p, lhs);
26034 YYLTYPE lhs_loc = lhs->nd_loc;
26035 if (op == tOROP) {
26036 set_nd_value(p, lhs, rhs);
26037 nd_set_loc(lhs, loc);
26038 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26039 }
26040 else if (op == tANDOP) {
26041 set_nd_value(p, lhs, rhs);
26042 nd_set_loc(lhs, loc);
26043 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26044 }
26045 else {
26046 asgn = lhs;
26047 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26048 set_nd_value(p, asgn, rhs);
26049 nd_set_loc(asgn, loc);
26050 }
26051 }
26052 else {
26053 asgn = NEW_ERROR(loc);
26054 }
26055 return asgn;
26056}
26057
26058static NODE *
26059new_ary_op_assign(struct parser_params *p, NODE *ary,
26060 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26061 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26062{
26063 NODE *asgn;
26064
26065 aryset_check(p, args);
26066 args = make_list(args, args_loc);
26067 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26068 fixpos(asgn, ary);
26069 return asgn;
26070}
26071
26072static NODE *
26073new_attr_op_assign(struct parser_params *p, NODE *lhs,
26074 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26075 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26076{
26077 NODE *asgn;
26078
26079 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26080 fixpos(asgn, lhs);
26081 return asgn;
26082}
26083
26084static NODE *
26085new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26086{
26087 NODE *asgn;
26088
26089 if (lhs) {
26090 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26091 }
26092 else {
26093 asgn = NEW_ERROR(loc);
26094 }
26095 fixpos(asgn, lhs);
26096 return asgn;
26097}
26098
26099static NODE *
26100const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26101{
26102 if (p->ctxt.in_def) {
26103#ifndef RIPPER
26104 yyerror1(loc, "dynamic constant assignment");
26105#else
26106 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26107#endif
26108 }
26109 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26110}
26111
26112#ifdef RIPPER
26113static VALUE
26114assign_error(struct parser_params *p, const char *mesg, VALUE a)
26115{
26116 a = dispatch2(assign_error, ERR_MESG(), a);
26117 ripper_error(p);
26118 return a;
26119}
26120#endif
26121
26122static NODE *
26123new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26124{
26125 NODE *result = head;
26126 if (rescue) {
26127 NODE *tmp = rescue_else ? rescue_else : rescue;
26128 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26129
26130 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26131 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26132 }
26133 if (ensure) {
26134 result = NEW_ENSURE(result, ensure, loc);
26135 }
26136 fixpos(result, head);
26137 return result;
26138}
26139
26140static void
26141warn_unused_var(struct parser_params *p, struct local_vars *local)
26142{
26143 int cnt;
26144
26145 if (!local->used) return;
26146 cnt = local->used->pos;
26147 if (cnt != local->vars->pos) {
26148 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26149 }
26150#ifndef RIPPER
26151 ID *v = local->vars->tbl;
26152 ID *u = local->used->tbl;
26153 for (int i = 0; i < cnt; ++i) {
26154 if (!v[i] || (u[i] & LVAR_USED)) continue;
26155 if (is_private_local_id(p, v[i])) continue;
26156 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26157 }
26158#endif
26159}
26160
26161static void
26162local_push(struct parser_params *p, int toplevel_scope)
26163{
26164 struct local_vars *local;
26165 int inherits_dvars = toplevel_scope && compile_for_eval;
26166 int warn_unused_vars = RTEST(ruby_verbose);
26167
26168 local = ALLOC(struct local_vars);
26169 local->prev = p->lvtbl;
26170 local->args = vtable_alloc(0);
26171 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26172#ifndef RIPPER
26173 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26174 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26175#endif
26176 local->numparam.outer = 0;
26177 local->numparam.inner = 0;
26178 local->numparam.current = 0;
26179 local->it = 0;
26180 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26181
26182# if WARN_PAST_SCOPE
26183 local->past = 0;
26184# endif
26185 CMDARG_PUSH(0);
26186 COND_PUSH(0);
26187 p->lvtbl = local;
26188}
26189
26190static void
26191vtable_chain_free(struct parser_params *p, struct vtable *table)
26192{
26193 while (!DVARS_TERMINAL_P(table)) {
26194 struct vtable *cur_table = table;
26195 table = cur_table->prev;
26196 vtable_free(cur_table);
26197 }
26198}
26199
26200static void
26201local_free(struct parser_params *p, struct local_vars *local)
26202{
26203 vtable_chain_free(p, local->used);
26204
26205# if WARN_PAST_SCOPE
26206 vtable_chain_free(p, local->past);
26207# endif
26208
26209 vtable_chain_free(p, local->args);
26210 vtable_chain_free(p, local->vars);
26211
26212 ruby_sized_xfree(local, sizeof(struct local_vars));
26213}
26214
26215static void
26216local_pop(struct parser_params *p)
26217{
26218 struct local_vars *local = p->lvtbl->prev;
26219 if (p->lvtbl->used) {
26220 warn_unused_var(p, p->lvtbl);
26221 }
26222
26223 local_free(p, p->lvtbl);
26224 p->lvtbl = local;
26225
26226 CMDARG_POP();
26227 COND_POP();
26228}
26229
26230static rb_ast_id_table_t *
26231local_tbl(struct parser_params *p)
26232{
26233 int cnt_args = vtable_size(p->lvtbl->args);
26234 int cnt_vars = vtable_size(p->lvtbl->vars);
26235 int cnt = cnt_args + cnt_vars;
26236 int i, j;
26237 rb_ast_id_table_t *tbl;
26238
26239 if (cnt <= 0) return 0;
26240 tbl = rb_ast_new_local_table(p->ast, cnt);
26241 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26242 /* remove IDs duplicated to warn shadowing */
26243 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26244 ID id = p->lvtbl->vars->tbl[i];
26245 if (!vtable_included(p->lvtbl->args, id)) {
26246 tbl->ids[j++] = id;
26247 }
26248 }
26249 if (j < cnt) {
26250 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26251 }
26252
26253 return tbl;
26254}
26255
26256static void
26257numparam_name(struct parser_params *p, ID id)
26258{
26259 if (!NUMPARAM_ID_P(id)) return;
26260 compile_error(p, "_%d is reserved for numbered parameter",
26261 NUMPARAM_ID_TO_IDX(id));
26262}
26263
26264static void
26265arg_var(struct parser_params *p, ID id)
26266{
26267 numparam_name(p, id);
26268 vtable_add(p->lvtbl->args, id);
26269}
26270
26271static void
26272local_var(struct parser_params *p, ID id)
26273{
26274 numparam_name(p, id);
26275 vtable_add(p->lvtbl->vars, id);
26276 if (p->lvtbl->used) {
26277 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26278 }
26279}
26280
26281#ifndef RIPPER
26282int
26283rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26284{
26285 return rb_local_defined(id, iseq);
26286}
26287#endif
26288
26289static int
26290local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26291{
26292 struct vtable *vars, *args, *used;
26293
26294 vars = p->lvtbl->vars;
26295 args = p->lvtbl->args;
26296 used = p->lvtbl->used;
26297
26298 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26299 vars = vars->prev;
26300 args = args->prev;
26301 if (used) used = used->prev;
26302 }
26303
26304 if (vars && vars->prev == DVARS_INHERIT) {
26305 return rb_parser_local_defined(p, id, p->parent_iseq);
26306 }
26307 else if (vtable_included(args, id)) {
26308 return 1;
26309 }
26310 else {
26311 int i = vtable_included(vars, id);
26312 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26313 return i != 0;
26314 }
26315}
26316
26317static int
26318local_id(struct parser_params *p, ID id)
26319{
26320 return local_id_ref(p, id, NULL);
26321}
26322
26323static int
26324check_forwarding_args(struct parser_params *p)
26325{
26326 if (local_id(p, idFWD_ALL)) return TRUE;
26327 compile_error(p, "unexpected ...");
26328 return FALSE;
26329}
26330
26331static void
26332add_forwarding_args(struct parser_params *p)
26333{
26334 arg_var(p, idFWD_REST);
26335 arg_var(p, idFWD_KWREST);
26336 arg_var(p, idFWD_BLOCK);
26337 arg_var(p, idFWD_ALL);
26338}
26339
26340static void
26341forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26342{
26343 bool conflict = false;
26344
26345 struct vtable *vars, *args;
26346
26347 vars = p->lvtbl->vars;
26348 args = p->lvtbl->args;
26349
26350 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26351 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26352 vars = vars->prev;
26353 args = args->prev;
26354 }
26355
26356 bool found = false;
26357 if (vars && vars->prev == DVARS_INHERIT && !found) {
26358 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26359 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26360 }
26361 else {
26362 found = (vtable_included(args, arg) &&
26363 !(all && vtable_included(args, all)));
26364 }
26365
26366 if (!found) {
26367 compile_error(p, "no anonymous %s parameter", var);
26368 }
26369 else if (conflict) {
26370 compile_error(p, "anonymous %s parameter is also used within block", var);
26371 }
26372}
26373
26374static NODE *
26375new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26376{
26377 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26378 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26379 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26380 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26381 block->forwarding = TRUE;
26382 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26383 return arg_blk_pass(args, block);
26384}
26385
26386static NODE *
26387numparam_push(struct parser_params *p)
26388{
26389 struct local_vars *local = p->lvtbl;
26390 NODE *inner = local->numparam.inner;
26391 if (!local->numparam.outer) {
26392 local->numparam.outer = local->numparam.current;
26393 }
26394 local->numparam.inner = 0;
26395 local->numparam.current = 0;
26396 local->it = 0;
26397 return inner;
26398}
26399
26400static void
26401numparam_pop(struct parser_params *p, NODE *prev_inner)
26402{
26403 struct local_vars *local = p->lvtbl;
26404 if (prev_inner) {
26405 /* prefer first one */
26406 local->numparam.inner = prev_inner;
26407 }
26408 else if (local->numparam.current) {
26409 /* current and inner are exclusive */
26410 local->numparam.inner = local->numparam.current;
26411 }
26412 if (p->max_numparam > NO_PARAM) {
26413 /* current and outer are exclusive */
26414 local->numparam.current = local->numparam.outer;
26415 local->numparam.outer = 0;
26416 }
26417 else {
26418 /* no numbered parameter */
26419 local->numparam.current = 0;
26420 }
26421 local->it = 0;
26422}
26423
26424static const struct vtable *
26425dyna_push(struct parser_params *p)
26426{
26427 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26428 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26429 if (p->lvtbl->used) {
26430 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26431 }
26432 return p->lvtbl->args;
26433}
26434
26435static void
26436dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26437{
26438 struct vtable *tmp = *vtblp;
26439 *vtblp = tmp->prev;
26440# if WARN_PAST_SCOPE
26441 if (p->past_scope_enabled) {
26442 tmp->prev = p->lvtbl->past;
26443 p->lvtbl->past = tmp;
26444 return;
26445 }
26446# endif
26447 vtable_free(tmp);
26448}
26449
26450static void
26451dyna_pop_1(struct parser_params *p)
26452{
26453 struct vtable *tmp;
26454
26455 if ((tmp = p->lvtbl->used) != 0) {
26456 warn_unused_var(p, p->lvtbl);
26457 p->lvtbl->used = p->lvtbl->used->prev;
26458 vtable_free(tmp);
26459 }
26460 dyna_pop_vtable(p, &p->lvtbl->args);
26461 dyna_pop_vtable(p, &p->lvtbl->vars);
26462}
26463
26464static void
26465dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26466{
26467 while (p->lvtbl->args != lvargs) {
26468 dyna_pop_1(p);
26469 if (!p->lvtbl->args) {
26470 struct local_vars *local = p->lvtbl->prev;
26471 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26472 p->lvtbl = local;
26473 }
26474 }
26475 dyna_pop_1(p);
26476}
26477
26478static int
26479dyna_in_block(struct parser_params *p)
26480{
26481 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26482}
26483
26484#ifndef RIPPER
26485int
26486dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26487{
26488 struct vtable *vars, *args, *used;
26489 int i;
26490
26491 args = p->lvtbl->args;
26492 vars = p->lvtbl->vars;
26493 used = p->lvtbl->used;
26494
26495 while (!DVARS_TERMINAL_P(vars)) {
26496 if (vtable_included(args, id)) {
26497 return 1;
26498 }
26499 if ((i = vtable_included(vars, id)) != 0) {
26500 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26501 return 1;
26502 }
26503 args = args->prev;
26504 vars = vars->prev;
26505 if (!vidrefp) used = 0;
26506 if (used) used = used->prev;
26507 }
26508
26509 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26510 return rb_dvar_defined(id, p->parent_iseq);
26511 }
26512
26513 return 0;
26514}
26515#endif
26516
26517static int
26518dvar_defined(struct parser_params *p, ID id)
26519{
26520 return dvar_defined_ref(p, id, NULL);
26521}
26522
26523static int
26524dvar_curr(struct parser_params *p, ID id)
26525{
26526 return (vtable_included(p->lvtbl->args, id) ||
26527 vtable_included(p->lvtbl->vars, id));
26528}
26529
26530static void
26531reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26532{
26533 compile_error(p,
26534 "regexp encoding option '%c' differs from source encoding '%s'",
26535 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26536}
26537
26538#ifndef RIPPER
26539static rb_encoding *
26540find_enc(struct parser_params* p, const char *name)
26541{
26542 int idx = rb_enc_find_index(name);
26543 if (idx < 0) {
26544 rb_bug("unknown encoding name: %s", name);
26545 }
26546
26547 return rb_enc_from_index(idx);
26548}
26549
26550static rb_encoding *
26551kcode_to_enc(struct parser_params* p, int kcode)
26552{
26553 rb_encoding *enc;
26554
26555 switch (kcode) {
26556 case ENC_ASCII8BIT:
26557 enc = rb_ascii8bit_encoding();
26558 break;
26559 case ENC_EUC_JP:
26560 enc = find_enc(p, "EUC-JP");
26561 break;
26562 case ENC_Windows_31J:
26563 enc = find_enc(p, "Windows-31J");
26564 break;
26565 case ENC_UTF8:
26566 enc = rb_utf8_encoding();
26567 break;
26568 default:
26569 enc = NULL;
26570 break;
26571 }
26572
26573 return enc;
26574}
26575
26576int
26577rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26578{
26579 int c = RE_OPTION_ENCODING_IDX(options);
26580
26581 if (c) {
26582 int opt, idx;
26583 rb_encoding *enc;
26584
26585 char_to_option_kcode(c, &opt, &idx);
26586 enc = kcode_to_enc(p, idx);
26587 if (enc != rb_parser_str_get_encoding(str) &&
26588 !rb_parser_is_ascii_string(p, str)) {
26589 goto error;
26590 }
26591 rb_parser_string_set_encoding(str, enc);
26592 }
26593 else if (RE_OPTION_ENCODING_NONE(options)) {
26594 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26595 !rb_parser_is_ascii_string(p, str)) {
26596 c = 'n';
26597 goto error;
26598 }
26599 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26600 }
26601 else if (rb_is_usascii_enc(p->enc)) {
26602 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26603 }
26604 return 0;
26605
26606 error:
26607 return c;
26608}
26609#endif
26610
26611static void
26612reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26613{
26614 int c = rb_reg_fragment_setenc(p, str, options);
26615 if (c) reg_fragment_enc_error(p, str, c);
26616}
26617
26618#ifndef UNIVERSAL_PARSER
26619typedef struct {
26620 struct parser_params* parser;
26621 rb_encoding *enc;
26622 NODE *succ_block;
26623 const YYLTYPE *loc;
26624 rb_parser_assignable_func assignable;
26626
26627static int
26628reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26629 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26630{
26632 struct parser_params* p = arg->parser;
26633 rb_encoding *enc = arg->enc;
26634 long len = name_end - name;
26635 const char *s = (const char *)name;
26636
26637 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26638}
26639
26640static NODE *
26641reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26642{
26644
26645 arg.parser = p;
26646 arg.enc = rb_enc_get(regexp);
26647 arg.succ_block = 0;
26648 arg.loc = loc;
26649 arg.assignable = assignable;
26650 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26651
26652 if (!arg.succ_block) return 0;
26653 return RNODE_BLOCK(arg.succ_block)->nd_next;
26654}
26655#endif
26656
26657#ifndef RIPPER
26658NODE *
26659rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26660{
26661 return assignable(p, id, val, loc);
26662}
26663
26664int
26665rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26666 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26667{
26668 ID var;
26669 NODE *node, *succ;
26670
26671 if (!len) return ST_CONTINUE;
26672 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26673 return ST_CONTINUE;
26674
26675 var = intern_cstr(s, len, enc);
26676 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26677 if (!lvar_defined(p, var)) return ST_CONTINUE;
26678 }
26679 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26680 succ = *succ_block;
26681 if (!succ) succ = NEW_ERROR(loc);
26682 succ = block_append(p, succ, node);
26683 *succ_block = succ;
26684 return ST_CONTINUE;
26685}
26686#endif
26687
26688static VALUE
26689parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26690{
26691 VALUE str2;
26692 reg_fragment_setenc(p, str, options);
26693 str2 = rb_str_new_parser_string(str);
26694 return rb_parser_reg_compile(p, str2, options);
26695}
26696
26697#ifndef RIPPER
26698VALUE
26699rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26700{
26701 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26702}
26703#endif
26704
26705static VALUE
26706reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26707{
26708 VALUE re;
26709 VALUE err;
26710
26711 err = rb_errinfo();
26712 re = parser_reg_compile(p, str, options);
26713 if (NIL_P(re)) {
26714 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26715 rb_set_errinfo(err);
26716 compile_error(p, "%"PRIsVALUE, m);
26717 return Qnil;
26718 }
26719 return re;
26720}
26721
26722#ifndef RIPPER
26723void
26724rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26725{
26726 p->do_print = print;
26727 p->do_loop = loop;
26728 p->do_chomp = chomp;
26729 p->do_split = split;
26730}
26731
26732static NODE *
26733parser_append_options(struct parser_params *p, NODE *node)
26734{
26735 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26736 const YYLTYPE *const LOC = &default_location;
26737
26738 if (p->do_print) {
26739 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26740 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26741 LOC);
26742 node = block_append(p, node, print);
26743 }
26744
26745 if (p->do_loop) {
26746 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26747
26748 if (p->do_split) {
26749 ID ifs = rb_intern("$;");
26750 ID fields = rb_intern("$F");
26751 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26752 NODE *split = NEW_GASGN(fields,
26753 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26754 rb_intern("split"), args, LOC),
26755 LOC);
26756 node = block_append(p, split, node);
26757 }
26758 if (p->do_chomp) {
26759 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26760 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26761 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26762 }
26763
26764 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26765 }
26766
26767 return node;
26768}
26769
26770void
26771rb_init_parse(void)
26772{
26773 /* just to suppress unused-function warnings */
26774 (void)nodetype;
26775 (void)nodeline;
26776}
26777
26778ID
26779internal_id(struct parser_params *p)
26780{
26781 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26782}
26783#endif /* !RIPPER */
26784
26785static void
26786parser_initialize(struct parser_params *p)
26787{
26788 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26789 p->command_start = TRUE;
26790 p->ruby_sourcefile_string = Qnil;
26791 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26792 string_buffer_init(p);
26793 p->node_id = 0;
26794 p->delayed.token = NULL;
26795 p->frozen_string_literal = -1; /* not specified */
26796#ifndef RIPPER
26797 p->error_buffer = Qfalse;
26798 p->end_expect_token_locations = NULL;
26799 p->token_id = 0;
26800 p->tokens = NULL;
26801#else
26802 p->result = Qnil;
26803 p->parsing_thread = Qnil;
26804 p->s_value = Qnil;
26805 p->s_lvalue = Qnil;
26806 p->s_value_stack = rb_ary_new();
26807#endif
26808 p->debug_buffer = Qnil;
26809 p->debug_output = rb_ractor_stdout();
26810 p->enc = rb_utf8_encoding();
26811 p->exits = 0;
26812}
26813
26814#ifdef RIPPER
26815#define rb_ruby_parser_mark ripper_parser_mark
26816#define rb_ruby_parser_free ripper_parser_free
26817#define rb_ruby_parser_memsize ripper_parser_memsize
26818#endif
26819
26820void
26821rb_ruby_parser_mark(void *ptr)
26822{
26823 struct parser_params *p = (struct parser_params*)ptr;
26824
26825 rb_gc_mark(p->ruby_sourcefile_string);
26826#ifndef RIPPER
26827 rb_gc_mark(p->error_buffer);
26828#else
26829 rb_gc_mark(p->value);
26830 rb_gc_mark(p->result);
26831 rb_gc_mark(p->parsing_thread);
26832 rb_gc_mark(p->s_value);
26833 rb_gc_mark(p->s_lvalue);
26834 rb_gc_mark(p->s_value_stack);
26835#endif
26836 rb_gc_mark(p->debug_buffer);
26837 rb_gc_mark(p->debug_output);
26838}
26839
26840void
26841rb_ruby_parser_free(void *ptr)
26842{
26843 struct parser_params *p = (struct parser_params*)ptr;
26844 struct local_vars *local, *prev;
26845
26846 if (p->ast) {
26847 rb_ast_free(p->ast);
26848 }
26849
26850 if (p->warn_duplicate_keys_table) {
26851 st_free_table(p->warn_duplicate_keys_table);
26852 }
26853
26854#ifndef RIPPER
26855 if (p->tokens) {
26856 rb_parser_ary_free(p, p->tokens);
26857 }
26858#endif
26859
26860 if (p->tokenbuf) {
26861 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26862 }
26863
26864 for (local = p->lvtbl; local; local = prev) {
26865 prev = local->prev;
26866 local_free(p, local);
26867 }
26868
26869 {
26870 token_info *ptinfo;
26871 while ((ptinfo = p->token_info) != 0) {
26872 p->token_info = ptinfo->next;
26873 xfree(ptinfo);
26874 }
26875 }
26876 string_buffer_free(p);
26877
26878 if (p->pvtbl) {
26879 st_free_table(p->pvtbl);
26880 }
26881
26882 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26883 st_free_table(p->case_labels);
26884 }
26885
26886 xfree(p->lex.strterm);
26887 p->lex.strterm = 0;
26888
26889 xfree(ptr);
26890}
26891
26892size_t
26893rb_ruby_parser_memsize(const void *ptr)
26894{
26895 struct parser_params *p = (struct parser_params*)ptr;
26896 struct local_vars *local;
26897 size_t size = sizeof(*p);
26898
26899 size += p->toksiz;
26900 for (local = p->lvtbl; local; local = local->prev) {
26901 size += sizeof(*local);
26902 if (local->vars) size += local->vars->capa * sizeof(ID);
26903 }
26904 return size;
26905}
26906
26907#ifndef RIPPER
26908#undef rb_reserved_word
26909
26910const struct kwtable *
26911rb_reserved_word(const char *str, unsigned int len)
26912{
26913 return reserved_word(str, len);
26914}
26915
26916#ifdef UNIVERSAL_PARSER
26917rb_parser_t *
26918rb_ruby_parser_allocate(const rb_parser_config_t *config)
26919{
26920 /* parser_initialize expects fields to be set to 0 */
26921 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26922 p->config = config;
26923 return p;
26924}
26925
26926rb_parser_t *
26927rb_ruby_parser_new(const rb_parser_config_t *config)
26928{
26929 /* parser_initialize expects fields to be set to 0 */
26930 rb_parser_t *p = rb_ruby_parser_allocate(config);
26931 parser_initialize(p);
26932 return p;
26933}
26934#else
26935rb_parser_t *
26936rb_ruby_parser_allocate(void)
26937{
26938 /* parser_initialize expects fields to be set to 0 */
26939 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
26940 return p;
26941}
26942
26943rb_parser_t *
26944rb_ruby_parser_new(void)
26945{
26946 /* parser_initialize expects fields to be set to 0 */
26947 rb_parser_t *p = rb_ruby_parser_allocate();
26948 parser_initialize(p);
26949 return p;
26950}
26951#endif
26952
26953rb_parser_t *
26954rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
26955{
26956 p->error_buffer = main ? Qfalse : Qnil;
26957 p->parent_iseq = base;
26958 return p;
26959}
26960
26961void
26962rb_ruby_parser_set_script_lines(rb_parser_t *p)
26963{
26964 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
26965}
26966
26967void
26968rb_ruby_parser_error_tolerant(rb_parser_t *p)
26969{
26970 p->error_tolerant = 1;
26971}
26972
26973void
26974rb_ruby_parser_keep_tokens(rb_parser_t *p)
26975{
26976 p->keep_tokens = 1;
26977 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
26978}
26979
26980rb_encoding *
26981rb_ruby_parser_encoding(rb_parser_t *p)
26982{
26983 return p->enc;
26984}
26985
26986int
26987rb_ruby_parser_end_seen_p(rb_parser_t *p)
26988{
26989 return p->ruby__end__seen;
26990}
26991
26992int
26993rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
26994{
26995 p->debug = flag;
26996 return flag;
26997}
26998#endif /* !RIPPER */
26999
27000#ifdef RIPPER
27001int
27002rb_ruby_parser_get_yydebug(rb_parser_t *p)
27003{
27004 return p->debug;
27005}
27006
27007void
27008rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27009{
27010 p->value = value;
27011}
27012
27013int
27014rb_ruby_parser_error_p(rb_parser_t *p)
27015{
27016 return p->error_p;
27017}
27018
27019VALUE
27020rb_ruby_parser_debug_output(rb_parser_t *p)
27021{
27022 return p->debug_output;
27023}
27024
27025void
27026rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27027{
27028 p->debug_output = output;
27029}
27030
27031VALUE
27032rb_ruby_parser_parsing_thread(rb_parser_t *p)
27033{
27034 return p->parsing_thread;
27035}
27036
27037void
27038rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27039{
27040 p->parsing_thread = parsing_thread;
27041}
27042
27043void
27044rb_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)
27045{
27046 p->lex.gets = gets;
27047 p->lex.input = input;
27048 p->eofp = 0;
27049 p->ruby_sourcefile_string = sourcefile_string;
27050 p->ruby_sourcefile = sourcefile;
27051 p->ruby_sourceline = sourceline;
27052}
27053
27054VALUE
27055rb_ruby_parser_result(rb_parser_t *p)
27056{
27057 return p->result;
27058}
27059
27060rb_encoding *
27061rb_ruby_parser_enc(rb_parser_t *p)
27062{
27063 return p->enc;
27064}
27065
27066VALUE
27067rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27068{
27069 return p->ruby_sourcefile_string;
27070}
27071
27072int
27073rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27074{
27075 return p->ruby_sourceline;
27076}
27077
27078int
27079rb_ruby_parser_lex_state(rb_parser_t *p)
27080{
27081 return p->lex.state;
27082}
27083
27084void
27085rb_ruby_ripper_parse0(rb_parser_t *p)
27086{
27087 parser_prepare(p);
27088 p->ast = rb_ast_new();
27089 ripper_yyparse((void*)p);
27090 rb_ast_free(p->ast);
27091 p->ast = 0;
27092 p->eval_tree = 0;
27093 p->eval_tree_begin = 0;
27094}
27095
27096int
27097rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27098{
27099 return dedent_string(p, string, width);
27100}
27101
27102int
27103rb_ruby_ripper_initialized_p(rb_parser_t *p)
27104{
27105 return p->lex.input != 0;
27106}
27107
27108void
27109rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27110{
27111 parser_initialize(p);
27112}
27113
27114long
27115rb_ruby_ripper_column(rb_parser_t *p)
27116{
27117 return p->lex.ptok - p->lex.pbeg;
27118}
27119
27120long
27121rb_ruby_ripper_token_len(rb_parser_t *p)
27122{
27123 return p->lex.pcur - p->lex.ptok;
27124}
27125
27126rb_parser_string_t *
27127rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27128{
27129 return p->lex.lastline;
27130}
27131
27132VALUE
27133rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27134{
27135 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27136}
27137
27138#ifdef UNIVERSAL_PARSER
27139rb_parser_t *
27140rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27141{
27142 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27143 p->config = config;
27144 return p;
27145}
27146#endif
27147
27148struct parser_params*
27149rb_ruby_ripper_parser_allocate(void)
27150{
27151 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27152}
27153#endif /* RIPPER */
27154
27155#ifndef RIPPER
27156void
27157rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27158{
27159 va_list ap;
27160 VALUE mesg = p->debug_buffer;
27161
27162 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27163 va_start(ap, fmt);
27164 rb_str_vcatf(mesg, fmt, ap);
27165 va_end(ap);
27166 if (char_at_end(p, mesg, 0) == '\n') {
27167 rb_io_write(p->debug_output, mesg);
27168 p->debug_buffer = Qnil;
27169 }
27170}
27171
27172static void
27173parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27174{
27175 va_list ap;
27176 int lineno, column;
27177
27178 if (loc) {
27179 lineno = loc->end_pos.lineno;
27180 column = loc->end_pos.column;
27181 }
27182 else {
27183 lineno = p->ruby_sourceline;
27184 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27185 }
27186
27187 rb_io_flush(p->debug_output);
27188 p->error_p = 1;
27189 va_start(ap, fmt);
27190 p->error_buffer =
27191 rb_syntax_error_append(p->error_buffer,
27192 p->ruby_sourcefile_string,
27193 lineno, column,
27194 p->enc, fmt, ap);
27195 va_end(ap);
27196}
27197
27198static size_t
27199count_char(const char *str, int c)
27200{
27201 int n = 0;
27202 while (str[n] == c) ++n;
27203 return n;
27204}
27205
27206/*
27207 * strip enclosing double-quotes, same as the default yytnamerr except
27208 * for that single-quotes matching back-quotes do not stop stripping.
27209 *
27210 * "\"`class' keyword\"" => "`class' keyword"
27211 */
27212size_t
27213rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27214{
27215 if (*yystr == '"') {
27216 size_t yyn = 0, bquote = 0;
27217 const char *yyp = yystr;
27218
27219 while (*++yyp) {
27220 switch (*yyp) {
27221 case '\'':
27222 if (!bquote) {
27223 bquote = count_char(yyp+1, '\'') + 1;
27224 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27225 yyn += bquote;
27226 yyp += bquote - 1;
27227 break;
27228 }
27229 else {
27230 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27231 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27232 yyn += bquote;
27233 yyp += bquote - 1;
27234 bquote = 0;
27235 break;
27236 }
27237 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27238 if (yyres) memcpy(yyres + yyn, yyp, 3);
27239 yyn += 3;
27240 yyp += 2;
27241 break;
27242 }
27243 goto do_not_strip_quotes;
27244 }
27245
27246 case ',':
27247 goto do_not_strip_quotes;
27248
27249 case '\\':
27250 if (*++yyp != '\\')
27251 goto do_not_strip_quotes;
27252 /* Fall through. */
27253 default:
27254 if (yyres)
27255 yyres[yyn] = *yyp;
27256 yyn++;
27257 break;
27258
27259 case '"':
27260 case '\0':
27261 if (yyres)
27262 yyres[yyn] = '\0';
27263 return yyn;
27264 }
27265 }
27266 do_not_strip_quotes: ;
27267 }
27268
27269 if (!yyres) return strlen(yystr);
27270
27271 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27272}
27273#endif
27274
27275#ifdef RIPPER
27276#define validate(x) (void)(x)
27277
27278static VALUE
27279ripper_dispatch0(struct parser_params *p, ID mid)
27280{
27281 return rb_funcall(p->value, mid, 0);
27282}
27283
27284static VALUE
27285ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27286{
27287 validate(a);
27288 return rb_funcall(p->value, mid, 1, a);
27289}
27290
27291static VALUE
27292ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27293{
27294 validate(a);
27295 validate(b);
27296 return rb_funcall(p->value, mid, 2, a, b);
27297}
27298
27299static VALUE
27300ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27301{
27302 validate(a);
27303 validate(b);
27304 validate(c);
27305 return rb_funcall(p->value, mid, 3, a, b, c);
27306}
27307
27308static VALUE
27309ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27310{
27311 validate(a);
27312 validate(b);
27313 validate(c);
27314 validate(d);
27315 return rb_funcall(p->value, mid, 4, a, b, c, d);
27316}
27317
27318static VALUE
27319ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27320{
27321 validate(a);
27322 validate(b);
27323 validate(c);
27324 validate(d);
27325 validate(e);
27326 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27327}
27328
27329static VALUE
27330ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27331{
27332 validate(a);
27333 validate(b);
27334 validate(c);
27335 validate(d);
27336 validate(e);
27337 validate(f);
27338 validate(g);
27339 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27340}
27341
27342void
27343ripper_error(struct parser_params *p)
27344{
27345 p->error_p = TRUE;
27346}
27347
27348VALUE
27349ripper_value(struct parser_params *p)
27350{
27351 (void)yystpcpy; /* may not used in newer bison */
27352
27353 return p->value;
27354}
27355
27356#endif /* RIPPER */
27357/*
27358 * Local variables:
27359 * mode: c
27360 * c-file-style: "ruby"
27361 * End:
27362 */
#define ISSPACE
@old{rb_isspace}
Definition ctype.h:88
#define ISDIGIT
@old{rb_isdigit}
Definition ctype.h:93
#define STRCASECMP
@old{st_locale_insensitive_strcasecmp}
Definition ctype.h:102
#define ISALPHA
@old{rb_isalpha}
Definition ctype.h:92
#define STRNCASECMP
@old{st_locale_insensitive_strncasecmp}
Definition ctype.h:103
#define ISPRINT
@old{rb_isprint}
Definition ctype.h:86
#define ISXDIGIT
@old{rb_isxdigit}
Definition ctype.h:94
#define ISCNTRL
@old{rb_iscntrl}
Definition ctype.h:96
#define ISALNUM
@old{rb_isalnum}
Definition ctype.h:91
#define ENC_CODERANGE_7BIT
Old name of RUBY_ENC_CODERANGE_7BIT.
Definition coderange.h:180
#define REALLOC_N
Old name of RB_REALLOC_N.
Definition memory.h:403
#define ALLOC
Old name of RB_ALLOC.
Definition memory.h:400
#define xfree
Old name of ruby_xfree.
Definition xmalloc.h:58
#define xrealloc
Old name of ruby_xrealloc.
Definition xmalloc.h:56
#define UNREACHABLE_RETURN
Old name of RBIMPL_UNREACHABLE_RETURN.
Definition assume.h:29
#define ZALLOC
Old name of RB_ZALLOC.
Definition memory.h:402
#define ENC_CODERANGE_UNKNOWN
Old name of RUBY_ENC_CODERANGE_UNKNOWN.
Definition coderange.h:179
#define xmalloc
Old name of ruby_xmalloc.
Definition xmalloc.h:53
#define ASSUME
Old name of RBIMPL_ASSUME.
Definition assume.h:27
#define ALLOC_N
Old name of RB_ALLOC_N.
Definition memory.h:399
#define MBCLEN_CHARFOUND_LEN(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_LEN.
Definition encoding.h:517
#define FIXNUM_MAX
Old name of RUBY_FIXNUM_MAX.
Definition fixnum.h:26
#define Qnil
Old name of RUBY_Qnil.
#define Qfalse
Old name of RUBY_Qfalse.
#define NIL_P
Old name of RB_NIL_P.
#define MBCLEN_CHARFOUND_P(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_P.
Definition encoding.h:516
#define xcalloc
Old name of ruby_xcalloc.
Definition xmalloc.h:55
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition eval.c:653
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:475
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1429
VALUE rb_errinfo(void)
This is the same as $! in Ruby.
Definition eval.c:2045
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1448
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2249
Encoding relates APIs.
rb_encoding * rb_utf8_encoding(void)
Queries the encoding that represents UTF-8.
Definition encoding.c:1535
rb_encoding * rb_ascii8bit_encoding(void)
Queries the encoding that represents ASCII-8BIT a.k.a.
Definition encoding.c:1523
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition string.c:831
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1117
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1499
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1533
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3567
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1693
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1657
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1515
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:943
int capa
Designed capacity of the buffer.
Definition io.h:11
int off
Offset inside of ptr.
Definition io.h:5
int len
Length of the buffer.
Definition io.h:8
VALUE rb_ractor_stderr(void)
Queries the standard error of the current Ractor that is calling this function.
Definition ractor.c:1105
VALUE rb_ractor_stdout(void)
Queries the standard output of the current Ractor that is calling this function.
Definition ractor.c:1093
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:223
#define strdup(s)
Just another name of ruby_strdup.
Definition util.h:187
#define rb_long2int
Just another name of rb_long2int_inline.
Definition long.h:62
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition memory.h:372
#define ALLOCA_N(type, n)
Definition memory.h:292
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition memory.h:360
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:167
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:384
VALUE type(ANYARGS)
ANYARGS-ed function type.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull)).
Definition nonnull.h:30
#define RREGEXP_PTR(obj)
Convenient accessor macro.
Definition rregexp.h:45
#define StringValueCStr(v)
Identical to StringValuePtr, except it additionally checks for the contents for viability as a C stri...
Definition rstring.h:89
#define errno
Ractor-aware version of errno.
Definition ruby.h:388
#define RTEST
This is an old name of RB_TEST.
Definition lex.c:33
Definition st.h:79
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40
#define RBIMPL_WARNING_IGNORED(flag)
Suppresses a warning.
#define RBIMPL_WARNING_PUSH()
Pushes compiler warning state.
#define RBIMPL_WARNING_POP()
Pops compiler warning state.