Ruby 3.5.0dev (2025-04-25 revision ffa40d3418360eb58423ef1a5756d2ec7b18e8e7)
parse.c
1/* A Bison parser, made by Lrama 0.7.0. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48/* Identify Bison output, and Bison version. */
49#define YYBISON 30802
50
51/* Bison version string. */
52#define YYBISON_VERSION "3.8.2"
53
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 1
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
66
67/* First part of user prologue. */
68#line 12 "parse.y"
69
70
71#if !YYPURE
72# error needs pure parser
73#endif
74#define YYDEBUG 1
75#define YYERROR_VERBOSE 1
76#define YYSTACK_USE_ALLOCA 0
77
78/* For Ripper */
79#ifdef RUBY_EXTCONF_H
80# include RUBY_EXTCONF_H
81#endif
82
83#include "ruby/internal/config.h"
84
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 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
375 BITFIELD(enum rescue_context, in_rescue, 2);
376 unsigned int cant_return: 1;
377};
378
380
381#if defined(__GNUC__) && !defined(__clang__)
382// Suppress "parameter passing for argument of type 'struct
383// lex_context' changed" notes. `struct lex_context` is file scope,
384// and has no ABI compatibility issue.
388// Not sure why effective even after popped.
389#endif
390
391#include "parse.h"
392
393#define NO_LEX_CTXT (struct lex_context){0}
394
395#ifndef WARN_PAST_SCOPE
396# define WARN_PAST_SCOPE 0
397#endif
398
399#define TAB_WIDTH 8
400
401#define yydebug (p->debug) /* disable the global variable definition */
402
403#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
404#define YY_LOCATION_PRINT(File, loc, p) \
405 rb_parser_printf(p, "%d.%d-%d.%d", \
406 (loc).beg_pos.lineno, (loc).beg_pos.column,\
407 (loc).end_pos.lineno, (loc).end_pos.column)
408#define YYLLOC_DEFAULT(Current, Rhs, N) \
409 do \
410 if (N) \
411 { \
412 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
413 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
414 } \
415 else \
416 { \
417 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
418 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
419 } \
420 while (0)
421#define YY_(Msgid) \
422 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
423 "nesting too deep" : (Msgid))
424
425#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
426 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
427#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
428 rb_parser_set_location_of_delayed_token(p, &(Current))
429#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
430 rb_parser_set_location_of_heredoc_end(p, &(Current))
431#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
432 rb_parser_set_location_of_dummy_end(p, &(Current))
433#define RUBY_SET_YYLLOC_OF_NONE(Current) \
434 rb_parser_set_location_of_none(p, &(Current))
435#define RUBY_SET_YYLLOC(Current) \
436 rb_parser_set_location(p, &(Current))
437#define RUBY_INIT_YYLLOC() \
438 { \
439 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
440 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
441 }
442
443#define IS_lex_state_for(x, ls) ((x) & (ls))
444#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
445#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
446#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
447
448# define SET_LEX_STATE(ls) \
449 parser_set_lex_state(p, ls, __LINE__)
450static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
451
452typedef VALUE stack_type;
453
454static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
455
456# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
457# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
458# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
459# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
460# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
461
462/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
463 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
464#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
465#define COND_POP() BITSTACK_POP(cond_stack)
466#define COND_P() BITSTACK_SET_P(cond_stack)
467#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
468
469/* A flag to identify keyword_do_block; "do" keyword after command_call.
470 Example: `foo 1, 2 do`. */
471#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
472#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
473#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
474#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
475
476struct vtable {
477 ID *tbl;
478 int pos;
479 int capa;
480 struct vtable *prev;
481};
482
484 struct vtable *args;
485 struct vtable *vars;
486 struct vtable *used;
487# if WARN_PAST_SCOPE
488 struct vtable *past;
489# endif
490 struct local_vars *prev;
491 struct {
492 NODE *outer, *inner, *current;
493 } numparam;
494 NODE *it;
495};
496
498 NODE *node;
499 YYLTYPE opening_loc;
500 YYLTYPE closing_loc;
502
503enum {
504 ORDINAL_PARAM = -1,
505 NO_PARAM = 0,
506 NUMPARAM_MAX = 9,
507};
508
509#define DVARS_INHERIT ((void*)1)
510#define DVARS_TOPSCOPE NULL
511#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
512
513typedef struct token_info {
514 const char *token;
516 int indent;
517 int nonspc;
518 struct token_info *next;
519} token_info;
520
525
527 struct parser_string_buffer_elem *next;
528 long len; /* Total length of allocated buf */
529 long used; /* Current usage of buf */
530 rb_parser_string_t *buf[FLEX_ARY_LEN];
532
537
538#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
539
540/*
541 Structure of Lexer Buffer:
542
543 lex.pbeg lex.ptok lex.pcur lex.pend
544 | | | |
545 |------------+------------+------------|
546 |<---------->|
547 token
548*/
550 YYSTYPE *lval;
551 YYLTYPE *yylloc;
552
553 struct {
554 rb_strterm_t *strterm;
555 rb_parser_lex_gets_func *gets;
556 rb_parser_input_data input;
557 parser_string_buffer_t string_buffer;
558 rb_parser_string_t *lastline;
559 rb_parser_string_t *nextline;
560 const char *pbeg;
561 const char *pcur;
562 const char *pend;
563 const char *ptok;
564 enum lex_state_e state;
565 /* track the nest level of any parens "()[]{}" */
566 int paren_nest;
567 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
568 int lpar_beg;
569 /* track the nest level of only braces "{}" */
570 int brace_nest;
571 } lex;
572 stack_type cond_stack;
573 stack_type cmdarg_stack;
574 int tokidx;
575 int toksiz;
576 int heredoc_end;
577 int heredoc_indent;
578 int heredoc_line_indent;
579 char *tokenbuf;
580 struct local_vars *lvtbl;
581 st_table *pvtbl;
582 st_table *pktbl;
583 int line_count;
584 int ruby_sourceline; /* current line no. */
585 const char *ruby_sourcefile; /* current source file */
586 VALUE ruby_sourcefile_string;
587 rb_encoding *enc;
589 st_table *case_labels;
590 rb_node_exits_t *exits;
591
592 VALUE debug_buffer;
593 VALUE debug_output;
594
595 struct {
596 rb_parser_string_t *token;
597 int beg_line;
598 int beg_col;
599 int end_line;
600 int end_col;
601 } delayed;
602
603 rb_ast_t *ast;
604 int node_id;
605
606 st_table *warn_duplicate_keys_table;
607
608 int max_numparam;
609 ID it_id;
610
611 struct lex_context ctxt;
612
613 NODE *eval_tree_begin;
614 NODE *eval_tree;
615 const struct rb_iseq_struct *parent_iseq;
616
617#ifdef UNIVERSAL_PARSER
618 const rb_parser_config_t *config;
619#endif
620 /* compile_option */
621 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
622
623 unsigned int command_start:1;
624 unsigned int eofp: 1;
625 unsigned int ruby__end__seen: 1;
626 unsigned int debug: 1;
627 unsigned int has_shebang: 1;
628 unsigned int token_seen: 1;
629 unsigned int token_info_enabled: 1;
630# if WARN_PAST_SCOPE
631 unsigned int past_scope_enabled: 1;
632# endif
633 unsigned int error_p: 1;
634 unsigned int cr_seen: 1;
635
636#ifndef RIPPER
637 /* Ruby core only */
638
639 unsigned int do_print: 1;
640 unsigned int do_loop: 1;
641 unsigned int do_chomp: 1;
642 unsigned int do_split: 1;
643 unsigned int error_tolerant: 1;
644 unsigned int keep_tokens: 1;
645
646 VALUE error_buffer;
647 rb_parser_ary_t *debug_lines;
648 /*
649 * Store specific keyword locations to generate dummy end token.
650 * Refer to the tail of list element.
651 */
653 /* id for terms */
654 int token_id;
655 /* Array for term tokens */
656 rb_parser_ary_t *tokens;
657#else
658 /* Ripper only */
659
660 VALUE value;
661 VALUE result;
662 VALUE parsing_thread;
663 VALUE s_value; /* Token VALUE */
664 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
665 VALUE s_value_stack;
666#endif
667};
668
669#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
670#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
671#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
672static int
673numparam_id_p(struct parser_params *p, ID id)
674{
675 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
676 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
677 return idx > 0 && idx <= NUMPARAM_MAX;
678}
679static void numparam_name(struct parser_params *p, ID id);
680
681#ifdef RIPPER
682static void
683after_shift(struct parser_params *p)
684{
685 if (p->debug) {
686 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
687 }
688 rb_ary_push(p->s_value_stack, p->s_value);
689 p->s_value = Qnil;
690}
691
692static void
693before_reduce(int len, struct parser_params *p)
694{
695 // Initialize $$ with $1.
696 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
697}
698
699static void
700after_reduce(int len, struct parser_params *p)
701{
702 for (int i = 0; i < len; i++) {
703 VALUE tos = rb_ary_pop(p->s_value_stack);
704 if (p->debug) {
705 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
706 }
707 }
708 if (p->debug) {
709 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
710 }
711 rb_ary_push(p->s_value_stack, p->s_lvalue);
712 p->s_lvalue = Qnil;
713}
714
715static void
716after_shift_error_token(struct parser_params *p)
717{
718 if (p->debug) {
719 rb_parser_printf(p, "after-shift-error-token:\n");
720 }
721 rb_ary_push(p->s_value_stack, Qnil);
722}
723
724static void
725after_pop_stack(int len, struct parser_params *p)
726{
727 for (int i = 0; i < len; i++) {
728 VALUE tos = rb_ary_pop(p->s_value_stack);
729 if (p->debug) {
730 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
731 }
732 }
733}
734#else
735static void
736after_shift(struct parser_params *p)
737{
738}
739
740static void
741before_reduce(int len, struct parser_params *p)
742{
743}
744
745static void
746after_reduce(int len, struct parser_params *p)
747{
748}
749
750static void
751after_shift_error_token(struct parser_params *p)
752{
753}
754
755static void
756after_pop_stack(int len, struct parser_params *p)
757{
758}
759#endif
760
761#define intern_cstr(n,l,en) rb_intern3(n,l,en)
762
763#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
764
765#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
766#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
767#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
768#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
769#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
770#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
771
772#ifndef RIPPER
773static inline int
774char_at_end(struct parser_params *p, VALUE str, int when_empty)
775{
776 long len = RSTRING_LEN(str);
777 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
778}
779#endif
780
781static void
782pop_pvtbl(struct parser_params *p, st_table *tbl)
783{
784 st_free_table(p->pvtbl);
785 p->pvtbl = tbl;
786}
787
788static void
789pop_pktbl(struct parser_params *p, st_table *tbl)
790{
791 if (p->pktbl) st_free_table(p->pktbl);
792 p->pktbl = tbl;
793}
794
795#define STRING_BUF_DEFAULT_LEN 16
796
797static void
798string_buffer_init(struct parser_params *p)
799{
800 parser_string_buffer_t *buf = &p->lex.string_buffer;
801 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
802
803 buf->head = buf->last = xmalloc(size);
804 buf->head->len = STRING_BUF_DEFAULT_LEN;
805 buf->head->used = 0;
806 buf->head->next = NULL;
807}
808
809static void
810string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
811{
812 parser_string_buffer_t *buf = &p->lex.string_buffer;
813
814 if (buf->head->used >= buf->head->len) {
816 long n = buf->head->len * 2;
817 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
818
819 elem = xmalloc(size);
820 elem->len = n;
821 elem->used = 0;
822 elem->next = NULL;
823 buf->last->next = elem;
824 buf->last = elem;
825 }
826 buf->last->buf[buf->last->used++] = str;
827}
828
829static void
830string_buffer_free(struct parser_params *p)
831{
832 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
833
834 while (elem) {
835 parser_string_buffer_elem_t *next_elem = elem->next;
836
837 for (long i = 0; i < elem->used; i++) {
838 rb_parser_string_free(p, elem->buf[i]);
839 }
840
841 xfree(elem);
842 elem = next_elem;
843 }
844}
845
846#ifndef RIPPER
847static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
848
849static void
850debug_end_expect_token_locations(struct parser_params *p, const char *name)
851{
852 if(p->debug) {
853 VALUE mesg = rb_sprintf("%s: [", name);
854 int i = 0;
855 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
856 if (i > 0)
857 rb_str_cat_cstr(mesg, ", ");
858 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
859 i++;
860 }
861 rb_str_cat_cstr(mesg, "]\n");
862 flush_debug_buffer(p, p->debug_output, mesg);
863 }
864}
865
866static void
867push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
868{
869 if(!p->error_tolerant) return;
870
873 locations->pos = pos;
874 locations->prev = p->end_expect_token_locations;
875 p->end_expect_token_locations = locations;
876
877 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
878}
879
880static void
881pop_end_expect_token_locations(struct parser_params *p)
882{
883 if(!p->end_expect_token_locations) return;
884
885 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
886 ruby_sized_xfree(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
887 p->end_expect_token_locations = locations;
888
889 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
890}
891
893peek_end_expect_token_locations(struct parser_params *p)
894{
895 return p->end_expect_token_locations;
896}
897
898static const char *
899parser_token2char(struct parser_params *p, enum yytokentype tok)
900{
901 switch ((int) tok) {
902#define TOKEN2CHAR(tok) case tok: return (#tok);
903#define TOKEN2CHAR2(tok, name) case tok: return (name);
904 TOKEN2CHAR2(' ', "word_sep");
905 TOKEN2CHAR2('!', "!")
906 TOKEN2CHAR2('%', "%");
907 TOKEN2CHAR2('&', "&");
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('\n', "nl");
925 TOKEN2CHAR2('{', "\"{\"");
926 TOKEN2CHAR2('}', "\"}\"");
927 TOKEN2CHAR2('[', "\"[\"");
928 TOKEN2CHAR2(']', "\"]\"");
929 TOKEN2CHAR2('(', "\"(\"");
930 TOKEN2CHAR2(')', "\")\"");
931 TOKEN2CHAR2('\\', "backslash");
932 TOKEN2CHAR(keyword_class);
933 TOKEN2CHAR(keyword_module);
934 TOKEN2CHAR(keyword_def);
935 TOKEN2CHAR(keyword_undef);
936 TOKEN2CHAR(keyword_begin);
937 TOKEN2CHAR(keyword_rescue);
938 TOKEN2CHAR(keyword_ensure);
939 TOKEN2CHAR(keyword_end);
940 TOKEN2CHAR(keyword_if);
941 TOKEN2CHAR(keyword_unless);
942 TOKEN2CHAR(keyword_then);
943 TOKEN2CHAR(keyword_elsif);
944 TOKEN2CHAR(keyword_else);
945 TOKEN2CHAR(keyword_case);
946 TOKEN2CHAR(keyword_when);
947 TOKEN2CHAR(keyword_while);
948 TOKEN2CHAR(keyword_until);
949 TOKEN2CHAR(keyword_for);
950 TOKEN2CHAR(keyword_break);
951 TOKEN2CHAR(keyword_next);
952 TOKEN2CHAR(keyword_redo);
953 TOKEN2CHAR(keyword_retry);
954 TOKEN2CHAR(keyword_in);
955 TOKEN2CHAR(keyword_do);
956 TOKEN2CHAR(keyword_do_cond);
957 TOKEN2CHAR(keyword_do_block);
958 TOKEN2CHAR(keyword_do_LAMBDA);
959 TOKEN2CHAR(keyword_return);
960 TOKEN2CHAR(keyword_yield);
961 TOKEN2CHAR(keyword_super);
962 TOKEN2CHAR(keyword_self);
963 TOKEN2CHAR(keyword_nil);
964 TOKEN2CHAR(keyword_true);
965 TOKEN2CHAR(keyword_false);
966 TOKEN2CHAR(keyword_and);
967 TOKEN2CHAR(keyword_or);
968 TOKEN2CHAR(keyword_not);
969 TOKEN2CHAR(modifier_if);
970 TOKEN2CHAR(modifier_unless);
971 TOKEN2CHAR(modifier_while);
972 TOKEN2CHAR(modifier_until);
973 TOKEN2CHAR(modifier_rescue);
974 TOKEN2CHAR(keyword_alias);
975 TOKEN2CHAR(keyword_defined);
976 TOKEN2CHAR(keyword_BEGIN);
977 TOKEN2CHAR(keyword_END);
978 TOKEN2CHAR(keyword__LINE__);
979 TOKEN2CHAR(keyword__FILE__);
980 TOKEN2CHAR(keyword__ENCODING__);
981 TOKEN2CHAR(tIDENTIFIER);
982 TOKEN2CHAR(tFID);
983 TOKEN2CHAR(tGVAR);
984 TOKEN2CHAR(tIVAR);
985 TOKEN2CHAR(tCONSTANT);
986 TOKEN2CHAR(tCVAR);
987 TOKEN2CHAR(tLABEL);
988 TOKEN2CHAR(tINTEGER);
989 TOKEN2CHAR(tFLOAT);
990 TOKEN2CHAR(tRATIONAL);
991 TOKEN2CHAR(tIMAGINARY);
992 TOKEN2CHAR(tCHAR);
993 TOKEN2CHAR(tNTH_REF);
994 TOKEN2CHAR(tBACK_REF);
995 TOKEN2CHAR(tSTRING_CONTENT);
996 TOKEN2CHAR(tREGEXP_END);
997 TOKEN2CHAR(tDUMNY_END);
998 TOKEN2CHAR(tSP);
999 TOKEN2CHAR(tUPLUS);
1000 TOKEN2CHAR(tUMINUS);
1001 TOKEN2CHAR(tPOW);
1002 TOKEN2CHAR(tCMP);
1003 TOKEN2CHAR(tEQ);
1004 TOKEN2CHAR(tEQQ);
1005 TOKEN2CHAR(tNEQ);
1006 TOKEN2CHAR(tGEQ);
1007 TOKEN2CHAR(tLEQ);
1008 TOKEN2CHAR(tANDOP);
1009 TOKEN2CHAR(tOROP);
1010 TOKEN2CHAR(tMATCH);
1011 TOKEN2CHAR(tNMATCH);
1012 TOKEN2CHAR(tDOT2);
1013 TOKEN2CHAR(tDOT3);
1014 TOKEN2CHAR(tBDOT2);
1015 TOKEN2CHAR(tBDOT3);
1016 TOKEN2CHAR(tAREF);
1017 TOKEN2CHAR(tASET);
1018 TOKEN2CHAR(tLSHFT);
1019 TOKEN2CHAR(tRSHFT);
1020 TOKEN2CHAR(tANDDOT);
1021 TOKEN2CHAR(tCOLON2);
1022 TOKEN2CHAR(tCOLON3);
1023 TOKEN2CHAR(tOP_ASGN);
1024 TOKEN2CHAR(tASSOC);
1025 TOKEN2CHAR(tLPAREN);
1026 TOKEN2CHAR(tLPAREN_ARG);
1027 TOKEN2CHAR(tLBRACK);
1028 TOKEN2CHAR(tLBRACE);
1029 TOKEN2CHAR(tLBRACE_ARG);
1030 TOKEN2CHAR(tSTAR);
1031 TOKEN2CHAR(tDSTAR);
1032 TOKEN2CHAR(tAMPER);
1033 TOKEN2CHAR(tLAMBDA);
1034 TOKEN2CHAR(tSYMBEG);
1035 TOKEN2CHAR(tSTRING_BEG);
1036 TOKEN2CHAR(tXSTRING_BEG);
1037 TOKEN2CHAR(tREGEXP_BEG);
1038 TOKEN2CHAR(tWORDS_BEG);
1039 TOKEN2CHAR(tQWORDS_BEG);
1040 TOKEN2CHAR(tSYMBOLS_BEG);
1041 TOKEN2CHAR(tQSYMBOLS_BEG);
1042 TOKEN2CHAR(tSTRING_END);
1043 TOKEN2CHAR(tSTRING_DEND);
1044 TOKEN2CHAR(tSTRING_DBEG);
1045 TOKEN2CHAR(tSTRING_DVAR);
1046 TOKEN2CHAR(tLAMBEG);
1047 TOKEN2CHAR(tLABEL_END);
1048 TOKEN2CHAR(tIGNORED_NL);
1049 TOKEN2CHAR(tCOMMENT);
1050 TOKEN2CHAR(tEMBDOC_BEG);
1051 TOKEN2CHAR(tEMBDOC);
1052 TOKEN2CHAR(tEMBDOC_END);
1053 TOKEN2CHAR(tHEREDOC_BEG);
1054 TOKEN2CHAR(tHEREDOC_END);
1055 TOKEN2CHAR(k__END__);
1056 TOKEN2CHAR(tLOWEST);
1057 TOKEN2CHAR(tUMINUS_NUM);
1058 TOKEN2CHAR(tLAST_TOKEN);
1059#undef TOKEN2CHAR
1060#undef TOKEN2CHAR2
1061 }
1062
1063 rb_bug("parser_token2id: unknown token %d", tok);
1064
1065 UNREACHABLE_RETURN(0);
1066}
1067#else
1068static void
1069push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1070{
1071}
1072
1073static void
1074pop_end_expect_token_locations(struct parser_params *p)
1075{
1076}
1077#endif
1078
1079RBIMPL_ATTR_NONNULL((1, 2, 3))
1080static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1081RBIMPL_ATTR_NONNULL((1, 2))
1082static int parser_yyerror0(struct parser_params*, const char*);
1083#define yyerror0(msg) parser_yyerror0(p, (msg))
1084#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1085#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1086#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1087#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1088#define lex_eol_p(p) lex_eol_n_p(p, 0)
1089#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1090#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1091#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1092
1093static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1094static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1095static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1096static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1097static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1098
1099#ifdef RIPPER
1100#define compile_for_eval (0)
1101#else
1102#define compile_for_eval (p->parent_iseq != 0)
1103#endif
1104
1105#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1106
1107#define CALL_Q_P(q) ((q) == tANDDOT)
1108#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1109
1110#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1111
1112static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1113
1114static inline void
1115rb_discard_node(struct parser_params *p, NODE *n)
1116{
1117 rb_ast_delete_node(p->ast, n);
1118}
1119
1120static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1121static 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, const YYLTYPE *loc);
1122static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1123static 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);
1124static 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);
1125static 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);
1126static 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);
1127static 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);
1128static 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);
1129static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1130static 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);
1131static 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);
1132static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1133static 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);
1134static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1135static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1136static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1137static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1138static 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);
1139static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1140static 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);
1141static 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);
1142static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1143static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1144static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1145static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1146static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1147static 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);
1148static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1149static 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);
1150static 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);
1151static 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);
1152static 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);
1153static 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);
1154static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1155static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1156static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1157static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1158static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1159static 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);
1160static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1161static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1162static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1163static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1164static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1165static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1166static 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);
1167static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1168static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1169static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1170static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1171static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1172static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1173static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1174static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1175static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1176static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1177static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1178static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1179static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1180static 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);
1181static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1182static 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);
1183static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1184static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1185static 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);
1186static 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);
1187static 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);
1188static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1189static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1190static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1191static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1192static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1193static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1194static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1195static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1196static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1197static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1198static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1199static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1200static 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);
1201static 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);
1202static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1203static 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);
1204static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc);
1205static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc);
1206static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc);
1207static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1208static 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);
1209static 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);
1210static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1211static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1212static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1213static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1214static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1215static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1216static 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);
1217static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1218static 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);
1219static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1220static 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);
1221static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1222static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1223static 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);
1224static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1225static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1226static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1227
1228#define NEW_SCOPE(a,b,loc) (NODE *)rb_node_scope_new(p,a,b,loc)
1229#define NEW_SCOPE2(t,a,b,loc) (NODE *)rb_node_scope_new2(p,t,a,b,loc)
1230#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1231#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)
1232#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)
1233#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1234#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1235#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1236#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)
1237#define NEW_IN(c,t,e,loc) (NODE *)rb_node_in_new(p,c,t,e,loc)
1238#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)
1239#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)
1240#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1241#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)
1242#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1243#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1244#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1245#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1246#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1247#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1248#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1249#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1250#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1251#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1252#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1253#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1254#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1255#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1256#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1257#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)
1258#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)
1259#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1260#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1261#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1262#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1263#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1264#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1265#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1266#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1267#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)
1268#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1269#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1270#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1271#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1272#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1273#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1274#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)
1275#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1276#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1277#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1278#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1279#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1280#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1281#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1282#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1283#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1284#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1285#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1286#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1287#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1288#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1289#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1290#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1291#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1292#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1293#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1294#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1295#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)
1296#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1297#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1298#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1299#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1300#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1301#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1302#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1303#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1304#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1305#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1306#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1307#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1308#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1309#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1310#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1311#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)
1312#define NEW_MODULE(n,b,loc) (NODE *)rb_node_module_new(p,n,b,loc)
1313#define NEW_SCLASS(r,b,loc) (NODE *)rb_node_sclass_new(p,r,b,loc)
1314#define NEW_COLON2(c,i,loc) (NODE *)rb_node_colon2_new(p,c,i,loc)
1315#define NEW_COLON3(i,loc) (NODE *)rb_node_colon3_new(p,i,loc)
1316#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1317#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1318#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1319#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1320#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1321#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1322#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1323#define NEW_DEFINED(e,loc) (NODE *)rb_node_defined_new(p,e,loc)
1324#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)
1325#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1326#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1327#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1328#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)
1329#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1330#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1331#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1332#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1333#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1334#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1335#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1336
1337enum internal_node_type {
1338 NODE_INTERNAL_ONLY = NODE_LAST,
1339 NODE_DEF_TEMP,
1340 NODE_EXITS,
1341 NODE_INTERNAL_LAST
1342};
1343
1344static const char *
1345parser_node_name(int node)
1346{
1347 switch (node) {
1348 case NODE_DEF_TEMP:
1349 return "NODE_DEF_TEMP";
1350 case NODE_EXITS:
1351 return "NODE_EXITS";
1352 default:
1353 return ruby_node_name(node);
1354 }
1355}
1356
1357/* This node is parse.y internal */
1358struct RNode_DEF_TEMP {
1359 NODE node;
1360
1361 /* for NODE_DEFN/NODE_DEFS */
1362
1363 struct RNode *nd_def;
1364 ID nd_mid;
1365
1366 struct {
1367 int max_numparam;
1368 NODE *numparam_save;
1369 struct lex_context ctxt;
1370 } save;
1371};
1372
1373#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1374
1375static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1376static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1377static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1378static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1379static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1380
1381#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1382#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1383#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1384#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1385
1386/* Make a new internal node, which should not be appeared in the
1387 * result AST and does not have node_id and location. */
1388static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1389#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1390
1391static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1392
1393static int
1394parser_get_node_id(struct parser_params *p)
1395{
1396 int node_id = p->node_id;
1397 p->node_id++;
1398 return node_id;
1399}
1400
1401static void
1402anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1403{
1404 if (id == tANDDOT) {
1405 yyerror1(loc, "&. inside multiple assignment destination");
1406 }
1407}
1408
1409static inline void
1410set_line_body(NODE *body, int line)
1411{
1412 if (!body) return;
1413 switch (nd_type(body)) {
1414 case NODE_RESCUE:
1415 case NODE_ENSURE:
1416 nd_set_line(body, line);
1417 }
1418}
1419
1420static void
1421set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1422{
1423 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1424 nd_set_line(node, beg->end_pos.lineno);
1425}
1426
1427static NODE *
1428last_expr_node(NODE *expr)
1429{
1430 while (expr) {
1431 if (nd_type_p(expr, NODE_BLOCK)) {
1432 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1433 }
1434 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1435 expr = RNODE_BEGIN(expr)->nd_body;
1436 }
1437 else {
1438 break;
1439 }
1440 }
1441 return expr;
1442}
1443
1444#ifndef RIPPER
1445#define yyparse ruby_yyparse
1446#endif
1447
1448static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1449static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1450#define new_nil(loc) NEW_NIL(loc)
1451static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1452static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1453static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1454static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1455
1456static NODE *newline_node(NODE*);
1457static void fixpos(NODE*,NODE*);
1458
1459static int value_expr_gen(struct parser_params*,NODE*);
1460static void void_expr(struct parser_params*,NODE*);
1461static NODE *remove_begin(NODE*);
1462#define value_expr(node) value_expr_gen(p, (node))
1463static NODE *void_stmts(struct parser_params*,NODE*);
1464static void reduce_nodes(struct parser_params*,NODE**);
1465static void block_dup_check(struct parser_params*,NODE*,NODE*);
1466
1467static NODE *block_append(struct parser_params*,NODE*,NODE*);
1468static NODE *list_append(struct parser_params*,NODE*,NODE*);
1469static NODE *list_concat(NODE*,NODE*);
1470static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1471static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1472static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1473static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1474static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1475static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1476static NODE *str2dstr(struct parser_params*,NODE*);
1477static NODE *evstr2dstr(struct parser_params*,NODE*);
1478static NODE *splat_array(NODE*);
1479static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1480
1481static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1482static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1483static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1484static 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);
1485static 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;}
1486
1487static bool args_info_empty_p(struct rb_args_info *args);
1488static 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*);
1489static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1490static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1491static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1492static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1493static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1494static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1495static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1496
1497static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1498static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1499
1500static NODE* negate_lit(struct parser_params*, NODE*);
1501static void no_blockarg(struct parser_params*,NODE*);
1502static NODE *ret_args(struct parser_params*,NODE*);
1503static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1504static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1505
1506static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1507static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1508
1509static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1510static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1511
1512static VALUE rb_backref_error(struct parser_params*,NODE*);
1513static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1514
1515static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1516static 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);
1517static 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);
1518static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1519static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1520
1521static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1522
1523static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1524static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1525
1526static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1527static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1528
1529static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
1530
1531static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1532
1533#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1534
1535static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1536
1537static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1538
1539static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1540
1541static rb_ast_id_table_t *local_tbl(struct parser_params*);
1542
1543static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1544static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1545
1546static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1547static NODE *heredoc_dedent(struct parser_params*,NODE*);
1548
1549static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1550
1551static 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);
1552
1553#ifdef RIPPER
1554#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1555#define set_value(val) (p->s_lvalue = val)
1556static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1557static int id_is_var(struct parser_params *p, ID id);
1558#endif
1559
1560RUBY_SYMBOL_EXPORT_BEGIN
1561VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1562int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1563enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1564VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1565void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1566PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1567YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1568YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1569YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1570YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1571YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1572YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1573void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1574RUBY_SYMBOL_EXPORT_END
1575
1576static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1577static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1578static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1579static VALUE formal_argument_error(struct parser_params*, ID);
1580static ID shadowing_lvar(struct parser_params*,ID);
1581static void new_bv(struct parser_params*,ID);
1582
1583static void local_push(struct parser_params*,int);
1584static void local_pop(struct parser_params*);
1585static void local_var(struct parser_params*, ID);
1586static void arg_var(struct parser_params*, ID);
1587static int local_id(struct parser_params *p, ID id);
1588static int local_id_ref(struct parser_params*, ID, ID **);
1589#define internal_id rb_parser_internal_id
1590ID internal_id(struct parser_params*);
1591static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1592static int check_forwarding_args(struct parser_params*);
1593static void add_forwarding_args(struct parser_params *p);
1594static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1595
1596static const struct vtable *dyna_push(struct parser_params *);
1597static void dyna_pop(struct parser_params*, const struct vtable *);
1598static int dyna_in_block(struct parser_params*);
1599#define dyna_var(p, id) local_var(p, id)
1600static int dvar_defined(struct parser_params*, ID);
1601#define dvar_defined_ref rb_parser_dvar_defined_ref
1602int dvar_defined_ref(struct parser_params*, ID, ID**);
1603static int dvar_curr(struct parser_params*,ID);
1604
1605static int lvar_defined(struct parser_params*, ID);
1606
1607static NODE *numparam_push(struct parser_params *p);
1608static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1609
1610#define METHOD_NOT '!'
1611
1612#define idFWD_REST '*'
1613#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1614#define idFWD_BLOCK '&'
1615#define idFWD_ALL idDot3
1616#define arg_FWD_BLOCK idFWD_BLOCK
1617
1618#define RE_ONIG_OPTION_IGNORECASE 1
1619#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1620#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1621#define RE_OPTION_ONCE (1<<16)
1622#define RE_OPTION_ENCODING_SHIFT 8
1623#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1624#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1625#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1626#define RE_OPTION_MASK 0xff
1627#define RE_OPTION_ARG_ENCODING_NONE 32
1628
1629#define CHECK_LITERAL_WHEN (st_table *)1
1630#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1631
1632#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1633RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1634
1635#define TOKEN2ID(tok) ( \
1636 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1637 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1638 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1639 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1640 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1641 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1642 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1643
1644/****** Ripper *******/
1645
1646#ifdef RIPPER
1647
1648#include "eventids1.h"
1649#include "eventids2.h"
1650
1651extern const struct ripper_parser_ids ripper_parser_ids;
1652
1653static VALUE ripper_dispatch0(struct parser_params*,ID);
1654static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1655static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1656static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1657static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1658static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1659static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1660void ripper_error(struct parser_params *p);
1661
1662#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1663#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1664#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1665#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1666#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1667#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1668#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1669
1670#define yyparse ripper_yyparse
1671
1672static VALUE
1673aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1674{
1675 if (!NIL_P(pre_arg)) {
1676 if (!NIL_P(pre_args)) {
1677 rb_ary_unshift(pre_args, pre_arg);
1678 }
1679 else {
1680 pre_args = rb_ary_new_from_args(1, pre_arg);
1681 }
1682 }
1683 return pre_args;
1684}
1685
1686#define ID2VAL(id) STATIC_ID2SYM(id)
1687#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1688#endif /* RIPPER */
1689
1690#define KWD2EID(t, v) keyword_##t
1691
1692static NODE *
1693new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, const YYLTYPE *loc)
1694{
1695 body = remove_begin(body);
1696 reduce_nodes(p, &body);
1697 NODE *n = NEW_SCOPE(args, body, loc);
1698 nd_set_line(n, loc->end_pos.lineno);
1699 set_line_body(body, loc->beg_pos.lineno);
1700 return n;
1701}
1702
1703static NODE *
1704rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1705 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1706{
1707 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1708 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1709 loc.beg_pos = arg_loc->beg_pos;
1710 return NEW_RESCUE(arg, rescue, 0, &loc);
1711}
1712
1713static NODE *add_block_exit(struct parser_params *p, NODE *node);
1714static rb_node_exits_t *init_block_exit(struct parser_params *p);
1715static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1716static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1717static void clear_block_exit(struct parser_params *p, bool error);
1718
1719static void
1720next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1721{
1722 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1723}
1724
1725static void
1726restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1727{
1728 /* See: def_name action */
1729 struct lex_context ctxt = temp->save.ctxt;
1730 p->ctxt.in_def = ctxt.in_def;
1731 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1732 p->ctxt.in_rescue = ctxt.in_rescue;
1733 p->max_numparam = temp->save.max_numparam;
1734 numparam_pop(p, temp->save.numparam_save);
1735 clear_block_exit(p, true);
1736}
1737
1738static void
1739endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1740{
1741 if (is_attrset_id(mid)) {
1742 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1743 }
1744 token_info_drop(p, "def", loc->beg_pos);
1745}
1746
1747#define debug_token_line(p, name, line) do { \
1748 if (p->debug) { \
1749 const char *const pcur = p->lex.pcur; \
1750 const char *const ptok = p->lex.ptok; \
1751 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1752 line, p->ruby_sourceline, \
1753 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1754 } \
1755 } while (0)
1756
1757#define begin_definition(k, loc_beg, loc_end) \
1758 do { \
1759 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1760 /* singleton class */ \
1761 p->ctxt.cant_return = !p->ctxt.in_def; \
1762 p->ctxt.in_def = 0; \
1763 } \
1764 else if (p->ctxt.in_def) { \
1765 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1766 yyerror1(&loc, k " definition in method body"); \
1767 } \
1768 else { \
1769 p->ctxt.cant_return = 1; \
1770 } \
1771 local_push(p, 0); \
1772 } while (0)
1773
1774#ifndef RIPPER
1775# define ifndef_ripper(x) (x)
1776# define ifdef_ripper(r,x) (x)
1777#else
1778# define ifndef_ripper(x)
1779# define ifdef_ripper(r,x) (r)
1780#endif
1781
1782# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1783# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1784# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1785# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1786# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1787# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1788# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1789# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1790# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1791# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1792# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1793# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1794# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1795# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1796# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1797# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1798# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1799# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1800# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1801# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1802#ifdef RIPPER
1803extern const ID id_warn, id_warning, id_gets, id_assoc;
1804# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1805# define WARN_S_L(s,l) STR_NEW(s,l)
1806# define WARN_S(s) STR_NEW2(s)
1807# define WARN_I(i) INT2NUM(i)
1808# define WARN_ID(i) rb_id2str(i)
1809# define PRIsWARN PRIsVALUE
1810# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1811# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1812# ifdef HAVE_VA_ARGS_MACRO
1813# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1814# else
1815# define WARN_CALL rb_funcall
1816# endif
1817# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1818# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1819# ifdef HAVE_VA_ARGS_MACRO
1820# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1821# else
1822# define WARNING_CALL rb_funcall
1823# endif
1824# define compile_error ripper_compile_error
1825#else
1826# define WARN_S_L(s,l) s
1827# define WARN_S(s) s
1828# define WARN_I(i) i
1829# define WARN_ID(i) rb_id2name(i)
1830# define PRIsWARN PRIsVALUE
1831# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1832# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1833# define WARN_CALL rb_compile_warn
1834# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1835# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1836# define WARNING_CALL rb_compile_warning
1837PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1838# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1839#endif
1840
1841#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1842
1843static NODE *
1844add_block_exit(struct parser_params *p, NODE *node)
1845{
1846 if (!node) {
1847 compile_error(p, "unexpected null node");
1848 return 0;
1849 }
1850 switch (nd_type(node)) {
1851 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1852 default:
1853 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1854 return node;
1855 }
1856 if (!p->ctxt.in_defined) {
1857 rb_node_exits_t *exits = p->exits;
1858 if (exits) {
1859 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1860 exits->nd_stts = node;
1861 }
1862 }
1863 return node;
1864}
1865
1866static rb_node_exits_t *
1867init_block_exit(struct parser_params *p)
1868{
1869 rb_node_exits_t *old = p->exits;
1870 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1871 exits->nd_chain = 0;
1872 exits->nd_stts = RNODE(exits);
1873 p->exits = exits;
1874 return old;
1875}
1876
1877static rb_node_exits_t *
1878allow_block_exit(struct parser_params *p)
1879{
1880 rb_node_exits_t *exits = p->exits;
1881 p->exits = 0;
1882 return exits;
1883}
1884
1885static void
1886restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1887{
1888 p->exits = exits;
1889}
1890
1891static void
1892clear_block_exit(struct parser_params *p, bool error)
1893{
1894 rb_node_exits_t *exits = p->exits;
1895 if (!exits) return;
1896 if (error) {
1897 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1898 switch (nd_type(e)) {
1899 case NODE_BREAK:
1900 yyerror1(&e->nd_loc, "Invalid break");
1901 break;
1902 case NODE_NEXT:
1903 yyerror1(&e->nd_loc, "Invalid next");
1904 break;
1905 case NODE_REDO:
1906 yyerror1(&e->nd_loc, "Invalid redo");
1907 break;
1908 default:
1909 yyerror1(&e->nd_loc, "unexpected node");
1910 goto end_checks; /* no nd_chain */
1911 }
1912 }
1913 end_checks:;
1914 }
1915 exits->nd_stts = RNODE(exits);
1916 exits->nd_chain = 0;
1917}
1918
1919#define WARN_EOL(tok) \
1920 (looking_at_eol_p(p) ? \
1921 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1922 (void)0)
1923static int looking_at_eol_p(struct parser_params *p);
1924
1925static NODE *
1926get_nd_value(struct parser_params *p, NODE *node)
1927{
1928 switch (nd_type(node)) {
1929 case NODE_GASGN:
1930 return RNODE_GASGN(node)->nd_value;
1931 case NODE_IASGN:
1932 return RNODE_IASGN(node)->nd_value;
1933 case NODE_LASGN:
1934 return RNODE_LASGN(node)->nd_value;
1935 case NODE_DASGN:
1936 return RNODE_DASGN(node)->nd_value;
1937 case NODE_MASGN:
1938 return RNODE_MASGN(node)->nd_value;
1939 case NODE_CVASGN:
1940 return RNODE_CVASGN(node)->nd_value;
1941 case NODE_CDECL:
1942 return RNODE_CDECL(node)->nd_value;
1943 default:
1944 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1945 return 0;
1946 }
1947}
1948
1949static void
1950set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1951{
1952 switch (nd_type(node)) {
1953 case NODE_CDECL:
1954 RNODE_CDECL(node)->nd_value = rhs;
1955 break;
1956 case NODE_GASGN:
1957 RNODE_GASGN(node)->nd_value = rhs;
1958 break;
1959 case NODE_IASGN:
1960 RNODE_IASGN(node)->nd_value = rhs;
1961 break;
1962 case NODE_LASGN:
1963 RNODE_LASGN(node)->nd_value = rhs;
1964 break;
1965 case NODE_DASGN:
1966 RNODE_DASGN(node)->nd_value = rhs;
1967 break;
1968 case NODE_MASGN:
1969 RNODE_MASGN(node)->nd_value = rhs;
1970 break;
1971 case NODE_CVASGN:
1972 RNODE_CVASGN(node)->nd_value = rhs;
1973 break;
1974 default:
1975 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1976 break;
1977 }
1978}
1979
1980static ID
1981get_nd_vid(struct parser_params *p, NODE *node)
1982{
1983 switch (nd_type(node)) {
1984 case NODE_CDECL:
1985 return RNODE_CDECL(node)->nd_vid;
1986 case NODE_GASGN:
1987 return RNODE_GASGN(node)->nd_vid;
1988 case NODE_IASGN:
1989 return RNODE_IASGN(node)->nd_vid;
1990 case NODE_LASGN:
1991 return RNODE_LASGN(node)->nd_vid;
1992 case NODE_DASGN:
1993 return RNODE_DASGN(node)->nd_vid;
1994 case NODE_CVASGN:
1995 return RNODE_CVASGN(node)->nd_vid;
1996 default:
1997 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1998 return 0;
1999 }
2000}
2001
2002static NODE *
2003get_nd_args(struct parser_params *p, NODE *node)
2004{
2005 switch (nd_type(node)) {
2006 case NODE_CALL:
2007 return RNODE_CALL(node)->nd_args;
2008 case NODE_OPCALL:
2009 return RNODE_OPCALL(node)->nd_args;
2010 case NODE_FCALL:
2011 return RNODE_FCALL(node)->nd_args;
2012 case NODE_QCALL:
2013 return RNODE_QCALL(node)->nd_args;
2014 case NODE_SUPER:
2015 return RNODE_SUPER(node)->nd_args;
2016 case NODE_VCALL:
2017 case NODE_ZSUPER:
2018 case NODE_YIELD:
2019 case NODE_RETURN:
2020 case NODE_BREAK:
2021 case NODE_NEXT:
2022 return 0;
2023 default:
2024 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2025 return 0;
2026 }
2027}
2028
2029static st_index_t
2030djb2(const uint8_t *str, size_t len)
2031{
2032 st_index_t hash = 5381;
2033
2034 for (size_t i = 0; i < len; i++) {
2035 hash = ((hash << 5) + hash) + str[i];
2036 }
2037
2038 return hash;
2039}
2040
2041static st_index_t
2042parser_memhash(const void *ptr, long len)
2043{
2044 return djb2(ptr, len);
2045}
2046
2047#define PARSER_STRING_PTR(str) (str->ptr)
2048#define PARSER_STRING_LEN(str) (str->len)
2049#define PARSER_STRING_END(str) (&str->ptr[str->len])
2050#define STRING_SIZE(str) ((size_t)str->len + 1)
2051#define STRING_TERM_LEN(str) (1)
2052#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2053#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2054 SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2055 str->len = total; \
2056} while (0)
2057#define STRING_SET_LEN(str, n) do { \
2058 (str)->len = (n); \
2059} while (0)
2060#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2061 ((ptrvar) = str->ptr, \
2062 (lenvar) = str->len)
2063
2064static inline int
2065parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2066{
2067 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2068}
2069
2070static rb_parser_string_t *
2071rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2072{
2073 rb_parser_string_t *str;
2074
2075 if (len < 0) {
2076 rb_bug("negative string size (or size too big): %ld", len);
2077 }
2078
2079 str = xcalloc(1, sizeof(rb_parser_string_t));
2080 str->ptr = xcalloc(len + 1, sizeof(char));
2081
2082 if (ptr) {
2083 memcpy(PARSER_STRING_PTR(str), ptr, len);
2084 }
2085 STRING_SET_LEN(str, len);
2086 STRING_TERM_FILL(str);
2087 return str;
2088}
2089
2090static rb_parser_string_t *
2091rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2092{
2093 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2094 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2095 str->enc = enc;
2096 return str;
2097}
2098
2099#ifndef RIPPER
2100rb_parser_string_t *
2101rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2102{
2103 /* Type check */
2104 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2105 RB_GC_GUARD(str);
2106 return ret;
2107}
2108
2109void
2110rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2111{
2112 if (!str) return;
2113 xfree(PARSER_STRING_PTR(str));
2114 xfree(str);
2115}
2116#endif
2117
2118static st_index_t
2119rb_parser_str_hash(rb_parser_string_t *str)
2120{
2121 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2122}
2123
2124static st_index_t
2125rb_char_p_hash(const char *c)
2126{
2127 return parser_memhash((const void *)c, strlen(c));
2128}
2129
2130static size_t
2131rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2132{
2133 return PARSER_STRING_LEN(str);
2134}
2135
2136#ifndef RIPPER
2137static char *
2138rb_parser_string_end(rb_parser_string_t *str)
2139{
2140 return &str->ptr[str->len];
2141}
2142#endif
2143
2144static void
2145rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2146{
2147 str->enc = enc;
2148}
2149
2150static rb_encoding *
2151rb_parser_str_get_encoding(rb_parser_string_t *str)
2152{
2153 return str->enc;
2154}
2155
2156#ifndef RIPPER
2157static bool
2158PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2159{
2160 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2161}
2162#endif
2163
2164static int
2165PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2166{
2167 return str->coderange;
2168}
2169
2170static void
2171PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2172{
2173 str->coderange = coderange;
2174}
2175
2176static void
2177PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2178{
2179 rb_parser_string_set_encoding(str, enc);
2180 PARSER_ENC_CODERANGE_SET(str, cr);
2181}
2182
2183static void
2184PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2185{
2186 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2187}
2188
2189static bool
2190PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2191{
2192 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2193}
2194
2195static bool
2196PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2197{
2198 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2199}
2200
2201static const char *
2202rb_parser_search_nonascii(const char *p, const char *e)
2203{
2204 const char *s = p;
2205
2206 for (; s < e; s++) {
2207 if (*s & 0x80) return s;
2208 }
2209
2210 return NULL;
2211}
2212
2213static int
2214rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2215{
2216 const char *e = ptr + len;
2217
2218 if (enc == rb_ascii8bit_encoding()) {
2219 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2220 ptr = rb_parser_search_nonascii(ptr, e);
2221 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2222 }
2223
2224 /* parser string encoding is always asciicompat */
2225 ptr = rb_parser_search_nonascii(ptr, e);
2226 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2227 for (;;) {
2228 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2229 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2230 ptr += MBCLEN_CHARFOUND_LEN(ret);
2231 if (ptr == e) break;
2232 ptr = rb_parser_search_nonascii(ptr, e);
2233 if (!ptr) break;
2234 }
2235
2236 return RB_PARSER_ENC_CODERANGE_VALID;
2237}
2238
2239static int
2240rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2241{
2242 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2243}
2244
2245static int
2246rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2247{
2248 int cr = PARSER_ENC_CODERANGE(str);
2249
2250 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2251 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2252 PARSER_ENC_CODERANGE_SET(str, cr);
2253 }
2254
2255 return cr;
2256}
2257
2258static rb_parser_string_t *
2259rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2260{
2261 if (rb_parser_str_get_encoding(str) == enc)
2262 return str;
2263 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2264 PARSER_ENC_CODERANGE_CLEAR(str);
2265 }
2266 rb_parser_string_set_encoding(str, enc);
2267 return str;
2268}
2269
2270static bool
2271rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2272{
2273 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2274}
2275
2276static rb_encoding *
2277rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2278{
2279 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2280 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2281
2282 if (enc1 == NULL || enc2 == NULL)
2283 return 0;
2284
2285 if (enc1 == enc2) {
2286 return enc1;
2287 }
2288
2289 if (PARSER_STRING_LEN(str2) == 0)
2290 return enc1;
2291 if (PARSER_STRING_LEN(str1) == 0)
2292 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2293
2294 int cr1, cr2;
2295
2296 cr1 = rb_parser_enc_str_coderange(p, str1);
2297 cr2 = rb_parser_enc_str_coderange(p, str2);
2298
2299 if (cr1 != cr2) {
2300 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2301 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2302 }
2303
2304 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2305 return enc1;
2306 }
2307
2308 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2309 return enc2;
2310 }
2311
2312 return 0;
2313}
2314
2315static void
2316rb_parser_str_modify(rb_parser_string_t *str)
2317{
2318 PARSER_ENC_CODERANGE_CLEAR(str);
2319}
2320
2321static void
2322rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2323{
2324 long capa;
2325 const int termlen = STRING_TERM_LEN(str);
2326
2327 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2328 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2329 }
2330
2331 int cr = PARSER_ENC_CODERANGE(str);
2332 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2333 /* Leave unknown. */
2334 }
2335 else if (len > PARSER_STRING_LEN(str)) {
2336 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2337 }
2338 else if (len < PARSER_STRING_LEN(str)) {
2339 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2340 /* ASCII-only string is keeping after truncated. Valid
2341 * and broken may be invalid or valid, leave unknown. */
2342 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2343 }
2344 }
2345
2346 STRING_SET_LEN(str, len);
2347 STRING_TERM_FILL(str);
2348}
2349
2350static rb_parser_string_t *
2351rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2352{
2353 rb_parser_str_modify(str);
2354 if (len == 0) return 0;
2355
2356 long total, olen, off = -1;
2357 char *sptr;
2358 const int termlen = STRING_TERM_LEN(str);
2359
2360 PARSER_STRING_GETMEM(str, sptr, olen);
2361 if (ptr >= sptr && ptr <= sptr + olen) {
2362 off = ptr - sptr;
2363 }
2364
2365 if (olen > LONG_MAX - len) {
2366 compile_error(p, "string sizes too big");
2367 return 0;
2368 }
2369 total = olen + len;
2370 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2371 sptr = PARSER_STRING_PTR(str);
2372 if (off != -1) {
2373 ptr = sptr + off;
2374 }
2375 memcpy(sptr + olen, ptr, len);
2376 STRING_SET_LEN(str, total);
2377 STRING_TERM_FILL(str);
2378
2379 return str;
2380}
2381
2382#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2383#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2384
2385static rb_parser_string_t *
2386rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2387 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2388{
2389 int str_cr, res_cr;
2390 rb_encoding *str_enc, *res_enc;
2391
2392 str_enc = rb_parser_str_get_encoding(str);
2393 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2394
2395 if (str_enc == ptr_enc) {
2396 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2397 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2398 }
2399 }
2400 else {
2401 /* parser string encoding is always asciicompat */
2402 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2403 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2404 }
2405 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2406 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2407 str_cr = rb_parser_enc_str_coderange(p, str);
2408 }
2409 }
2410 }
2411 if (ptr_cr_ret)
2412 *ptr_cr_ret = ptr_cr;
2413
2414 if (str_enc != ptr_enc &&
2415 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2416 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2417 goto incompatible;
2418 }
2419
2420 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2421 res_enc = str_enc;
2422 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2423 }
2424 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2425 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2426 res_enc = str_enc;
2427 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2428 }
2429 else {
2430 res_enc = ptr_enc;
2431 res_cr = ptr_cr;
2432 }
2433 }
2434 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2435 res_enc = str_enc;
2436 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2437 res_cr = str_cr;
2438 else
2439 res_cr = ptr_cr;
2440 }
2441 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2442 res_enc = str_enc;
2443 res_cr = str_cr;
2444 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2445 }
2446
2447 if (len < 0) {
2448 compile_error(p, "negative string size (or size too big)");
2449 }
2450 parser_str_cat(str, ptr, len);
2451 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2452 return str;
2453
2454 incompatible:
2455 compile_error(p, "incompatible character encodings: %s and %s",
2456 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2457 UNREACHABLE_RETURN(0);
2458
2459}
2460
2461static rb_parser_string_t *
2462rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2463 rb_encoding *ptr_enc)
2464{
2465 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2466}
2467
2468static rb_parser_string_t *
2469rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2470{
2471 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2472
2473 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2474 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2475
2476 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2477
2478 return str;
2479}
2480
2481static rb_parser_string_t *
2482rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2483{
2484 if (len < 0) {
2485 rb_bug("negative string size (or size too big)");
2486 }
2487
2488 long slen = PARSER_STRING_LEN(str);
2489
2490 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2491 PARSER_ENC_CODERANGE_CLEAR(str);
2492 }
2493
2494 {
2495 long capa;
2496 const int termlen = STRING_TERM_LEN(str);
2497
2498 if ((capa = slen) < len) {
2499 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2500 }
2501 else if (len == slen) return str;
2502 STRING_SET_LEN(str, len);
2503 STRING_TERM_FILL(str);
2504 }
2505 return str;
2506}
2507
2508# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2509 ((ptrvar) = str->ptr, \
2510 (lenvar) = str->len, \
2511 (encvar) = str->enc)
2512
2513static int
2514rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2515{
2516 long len1, len2;
2517 const char *ptr1, *ptr2;
2518 rb_encoding *enc1, *enc2;
2519
2520 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2521 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2522
2523 return (len1 != len2 ||
2524 enc1 != enc2 ||
2525 memcmp(ptr1, ptr2, len1) != 0);
2526}
2527
2528static void
2529rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2530{
2531 long i;
2532 if (ary->capa < len) {
2533 ary->capa = len;
2534 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2535 for (i = ary->len; i < len; i++) {
2536 ary->data[i] = 0;
2537 }
2538 }
2539}
2540
2541/*
2542 * Do not call this directly.
2543 * Use rb_parser_ary_new_capa_for_XXX() instead.
2544 */
2545static rb_parser_ary_t *
2546parser_ary_new_capa(rb_parser_t *p, long len)
2547{
2548 if (len < 0) {
2549 rb_bug("negative array size (or size too big): %ld", len);
2550 }
2551 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2552 ary->data_type = 0;
2553 ary->len = 0;
2554 ary->capa = len;
2555 if (0 < len) {
2556 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2557 }
2558 else {
2559 ary->data = NULL;
2560 }
2561 return ary;
2562}
2563
2564#ifndef RIPPER
2565static rb_parser_ary_t *
2566rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2567{
2568 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2569 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2570 return ary;
2571}
2572
2573static rb_parser_ary_t *
2574rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2575{
2576 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2577 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2578 return ary;
2579}
2580#endif
2581
2582static rb_parser_ary_t *
2583rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2584{
2585 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2586 ary->data_type = PARSER_ARY_DATA_NODE;
2587 return ary;
2588}
2589
2590/*
2591 * Do not call this directly.
2592 * Use rb_parser_ary_push_XXX() instead.
2593 */
2594static rb_parser_ary_t *
2595parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2596{
2597 if (ary->len == ary->capa) {
2598 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2599 }
2600 ary->data[ary->len++] = val;
2601 return ary;
2602}
2603
2604#ifndef RIPPER
2605static rb_parser_ary_t *
2606rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2607{
2608 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2609 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2610 }
2611 return parser_ary_push(p, ary, val);
2612}
2613
2614static rb_parser_ary_t *
2615rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2616{
2617 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2618 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2619 }
2620 return parser_ary_push(p, ary, val);
2621}
2622#endif
2623
2624static rb_parser_ary_t *
2625rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2626{
2627 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2628 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2629 }
2630 return parser_ary_push(p, ary, val);
2631}
2632
2633#ifndef RIPPER
2634static void
2635rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2636{
2637 if (!token) return;
2638 rb_parser_string_free(p, token->str);
2639 xfree(token);
2640}
2641
2642static void
2643rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2644{
2645# define foreach_ary(ptr) \
2646 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2647 ptr < end_ary_data; ptr++)
2648 switch (ary->data_type) {
2649 case PARSER_ARY_DATA_AST_TOKEN:
2650 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2651 break;
2652 case PARSER_ARY_DATA_SCRIPT_LINE:
2653 foreach_ary(data) {rb_parser_string_free(p, *data);}
2654 break;
2655 case PARSER_ARY_DATA_NODE:
2656 /* Do nothing because nodes are freed when rb_ast_t is freed */
2657 break;
2658 default:
2659 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2660 break;
2661 }
2662# undef foreach_ary
2663 xfree(ary->data);
2664 xfree(ary);
2665}
2666
2667#endif /* !RIPPER */
2668
2669#line 2670 "parse.c"
2670
2671# ifndef YY_CAST
2672# ifdef __cplusplus
2673# define YY_CAST(Type, Val) static_cast<Type> (Val)
2674# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2675# else
2676# define YY_CAST(Type, Val) ((Type) (Val))
2677# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2678# endif
2679# endif
2680# ifndef YY_NULLPTR
2681# if defined __cplusplus
2682# if 201103L <= __cplusplus
2683# define YY_NULLPTR nullptr
2684# else
2685# define YY_NULLPTR 0
2686# endif
2687# else
2688# define YY_NULLPTR ((void*)0)
2689# endif
2690# endif
2691
2692#include "parse.h"
2693/* Symbol kind. */
2694enum yysymbol_kind_t
2695{
2696 YYSYMBOL_YYEMPTY = -2,
2697 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2698 YYSYMBOL_YYerror = 1, /* error */
2699 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2700 YYSYMBOL_keyword_class = 3, /* "'class'" */
2701 YYSYMBOL_keyword_module = 4, /* "'module'" */
2702 YYSYMBOL_keyword_def = 5, /* "'def'" */
2703 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2704 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2705 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2706 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2707 YYSYMBOL_keyword_end = 10, /* "'end'" */
2708 YYSYMBOL_keyword_if = 11, /* "'if'" */
2709 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2710 YYSYMBOL_keyword_then = 13, /* "'then'" */
2711 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2712 YYSYMBOL_keyword_else = 15, /* "'else'" */
2713 YYSYMBOL_keyword_case = 16, /* "'case'" */
2714 YYSYMBOL_keyword_when = 17, /* "'when'" */
2715 YYSYMBOL_keyword_while = 18, /* "'while'" */
2716 YYSYMBOL_keyword_until = 19, /* "'until'" */
2717 YYSYMBOL_keyword_for = 20, /* "'for'" */
2718 YYSYMBOL_keyword_break = 21, /* "'break'" */
2719 YYSYMBOL_keyword_next = 22, /* "'next'" */
2720 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2721 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2722 YYSYMBOL_keyword_in = 25, /* "'in'" */
2723 YYSYMBOL_keyword_do = 26, /* "'do'" */
2724 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2725 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2726 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2727 YYSYMBOL_keyword_return = 30, /* "'return'" */
2728 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2729 YYSYMBOL_keyword_super = 32, /* "'super'" */
2730 YYSYMBOL_keyword_self = 33, /* "'self'" */
2731 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2732 YYSYMBOL_keyword_true = 35, /* "'true'" */
2733 YYSYMBOL_keyword_false = 36, /* "'false'" */
2734 YYSYMBOL_keyword_and = 37, /* "'and'" */
2735 YYSYMBOL_keyword_or = 38, /* "'or'" */
2736 YYSYMBOL_keyword_not = 39, /* "'not'" */
2737 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2738 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2739 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2740 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2741 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2742 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2743 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2744 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2745 YYSYMBOL_keyword_END = 48, /* "'END'" */
2746 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2747 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2748 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2749 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2750 YYSYMBOL_tFID = 53, /* "method" */
2751 YYSYMBOL_tGVAR = 54, /* "global variable" */
2752 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2753 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2754 YYSYMBOL_tCVAR = 57, /* "class variable" */
2755 YYSYMBOL_tLABEL = 58, /* "label" */
2756 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2757 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2758 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2759 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2760 YYSYMBOL_tCHAR = 63, /* "char literal" */
2761 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2762 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2763 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2764 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2765 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2766 YYSYMBOL_69_ = 69, /* '.' */
2767 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2768 YYSYMBOL_tSP = 71, /* "escaped space" */
2769 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2770 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2771 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2772 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2773 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2774 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2775 YYSYMBOL_tPOW = 78, /* "**" */
2776 YYSYMBOL_tCMP = 79, /* "<=>" */
2777 YYSYMBOL_tEQ = 80, /* "==" */
2778 YYSYMBOL_tEQQ = 81, /* "===" */
2779 YYSYMBOL_tNEQ = 82, /* "!=" */
2780 YYSYMBOL_tGEQ = 83, /* ">=" */
2781 YYSYMBOL_tLEQ = 84, /* "<=" */
2782 YYSYMBOL_tANDOP = 85, /* "&&" */
2783 YYSYMBOL_tOROP = 86, /* "||" */
2784 YYSYMBOL_tMATCH = 87, /* "=~" */
2785 YYSYMBOL_tNMATCH = 88, /* "!~" */
2786 YYSYMBOL_tDOT2 = 89, /* ".." */
2787 YYSYMBOL_tDOT3 = 90, /* "..." */
2788 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2789 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2790 YYSYMBOL_tAREF = 93, /* "[]" */
2791 YYSYMBOL_tASET = 94, /* "[]=" */
2792 YYSYMBOL_tLSHFT = 95, /* "<<" */
2793 YYSYMBOL_tRSHFT = 96, /* ">>" */
2794 YYSYMBOL_tANDDOT = 97, /* "&." */
2795 YYSYMBOL_tCOLON2 = 98, /* "::" */
2796 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2797 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2798 YYSYMBOL_tASSOC = 101, /* "=>" */
2799 YYSYMBOL_tLPAREN = 102, /* "(" */
2800 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2801 YYSYMBOL_tLBRACK = 104, /* "[" */
2802 YYSYMBOL_tLBRACE = 105, /* "{" */
2803 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2804 YYSYMBOL_tSTAR = 107, /* "*" */
2805 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2806 YYSYMBOL_tAMPER = 109, /* "&" */
2807 YYSYMBOL_tLAMBDA = 110, /* "->" */
2808 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2809 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2810 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2811 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2812 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2813 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2814 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2815 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2816 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2817 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2818 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2819 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2820 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2821 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2822 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2823 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2824 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2825 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2826 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2827 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2828 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2829 YYSYMBOL_k__END__ = 132, /* k__END__ */
2830 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2831 YYSYMBOL_134_ = 134, /* '=' */
2832 YYSYMBOL_135_ = 135, /* '?' */
2833 YYSYMBOL_136_ = 136, /* ':' */
2834 YYSYMBOL_137_ = 137, /* '>' */
2835 YYSYMBOL_138_ = 138, /* '<' */
2836 YYSYMBOL_139_ = 139, /* '|' */
2837 YYSYMBOL_140_ = 140, /* '^' */
2838 YYSYMBOL_141_ = 141, /* '&' */
2839 YYSYMBOL_142_ = 142, /* '+' */
2840 YYSYMBOL_143_ = 143, /* '-' */
2841 YYSYMBOL_144_ = 144, /* '*' */
2842 YYSYMBOL_145_ = 145, /* '/' */
2843 YYSYMBOL_146_ = 146, /* '%' */
2844 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2845 YYSYMBOL_148_ = 148, /* '!' */
2846 YYSYMBOL_149_ = 149, /* '~' */
2847 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2848 YYSYMBOL_151_ = 151, /* '{' */
2849 YYSYMBOL_152_ = 152, /* '}' */
2850 YYSYMBOL_153_ = 153, /* '[' */
2851 YYSYMBOL_154_n_ = 154, /* '\n' */
2852 YYSYMBOL_155_ = 155, /* ',' */
2853 YYSYMBOL_156_ = 156, /* '`' */
2854 YYSYMBOL_157_ = 157, /* '(' */
2855 YYSYMBOL_158_ = 158, /* ')' */
2856 YYSYMBOL_159_ = 159, /* ']' */
2857 YYSYMBOL_160_ = 160, /* ';' */
2858 YYSYMBOL_161_ = 161, /* ' ' */
2859 YYSYMBOL_YYACCEPT = 162, /* $accept */
2860 YYSYMBOL_option_terms = 163, /* option_terms */
2861 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2862 YYSYMBOL_165_1 = 165, /* $@1 */
2863 YYSYMBOL_program = 166, /* program */
2864 YYSYMBOL_top_stmts = 167, /* top_stmts */
2865 YYSYMBOL_top_stmt = 168, /* top_stmt */
2866 YYSYMBOL_block_open = 169, /* block_open */
2867 YYSYMBOL_begin_block = 170, /* begin_block */
2868 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2869 YYSYMBOL_172_2 = 172, /* $@2 */
2870 YYSYMBOL_173_3 = 173, /* $@3 */
2871 YYSYMBOL_bodystmt = 174, /* bodystmt */
2872 YYSYMBOL_175_4 = 175, /* $@4 */
2873 YYSYMBOL_stmts = 176, /* stmts */
2874 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2875 YYSYMBOL_178_5 = 178, /* $@5 */
2876 YYSYMBOL_allow_exits = 179, /* allow_exits */
2877 YYSYMBOL_k_END = 180, /* k_END */
2878 YYSYMBOL_181_6 = 181, /* $@6 */
2879 YYSYMBOL_stmt = 182, /* stmt */
2880 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2881 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2882 YYSYMBOL_command_asgn = 185, /* command_asgn */
2883 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2884 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2885 YYSYMBOL_endless_command = 188, /* endless_command */
2886 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2887 YYSYMBOL_command_rhs = 190, /* command_rhs */
2888 YYSYMBOL_expr = 191, /* expr */
2889 YYSYMBOL_192_7 = 192, /* $@7 */
2890 YYSYMBOL_193_8 = 193, /* $@8 */
2891 YYSYMBOL_def_name = 194, /* def_name */
2892 YYSYMBOL_defn_head = 195, /* defn_head */
2893 YYSYMBOL_196_9 = 196, /* $@9 */
2894 YYSYMBOL_defs_head = 197, /* defs_head */
2895 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2896 YYSYMBOL_expr_value = 199, /* expr_value */
2897 YYSYMBOL_200_10 = 200, /* $@10 */
2898 YYSYMBOL_201_11 = 201, /* $@11 */
2899 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2900 YYSYMBOL_command_call = 203, /* command_call */
2901 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2902 YYSYMBOL_command_call_value = 205, /* command_call_value */
2903 YYSYMBOL_block_command = 206, /* block_command */
2904 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2905 YYSYMBOL_fcall = 208, /* fcall */
2906 YYSYMBOL_command = 209, /* command */
2907 YYSYMBOL_mlhs = 210, /* mlhs */
2908 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2909 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2910 YYSYMBOL_mlhs_mlhs_item = 213, /* mlhs_mlhs_item */
2911 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2912 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2913 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2914 YYSYMBOL_lhs = 217, /* lhs */
2915 YYSYMBOL_cname = 218, /* cname */
2916 YYSYMBOL_cpath = 219, /* cpath */
2917 YYSYMBOL_fname = 220, /* fname */
2918 YYSYMBOL_fitem = 221, /* fitem */
2919 YYSYMBOL_undef_list = 222, /* undef_list */
2920 YYSYMBOL_223_12 = 223, /* $@12 */
2921 YYSYMBOL_op = 224, /* op */
2922 YYSYMBOL_reswords = 225, /* reswords */
2923 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2924 YYSYMBOL_arg = 227, /* arg */
2925 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2926 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2927 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2928 YYSYMBOL_ternary = 231, /* ternary */
2929 YYSYMBOL_endless_arg = 232, /* endless_arg */
2930 YYSYMBOL_relop = 233, /* relop */
2931 YYSYMBOL_rel_expr = 234, /* rel_expr */
2932 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2933 YYSYMBOL_begin_defined = 236, /* begin_defined */
2934 YYSYMBOL_after_rescue = 237, /* after_rescue */
2935 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2936 YYSYMBOL_arg_value = 239, /* arg_value */
2937 YYSYMBOL_aref_args = 240, /* aref_args */
2938 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2939 YYSYMBOL_paren_args = 242, /* paren_args */
2940 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2941 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2942 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2943 YYSYMBOL_call_args = 246, /* call_args */
2944 YYSYMBOL_247_13 = 247, /* $@13 */
2945 YYSYMBOL_command_args = 248, /* command_args */
2946 YYSYMBOL_block_arg = 249, /* block_arg */
2947 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2948 YYSYMBOL_args = 251, /* args */
2949 YYSYMBOL_arg_splat = 252, /* arg_splat */
2950 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2951 YYSYMBOL_mrhs = 254, /* mrhs */
2952 YYSYMBOL_primary = 255, /* primary */
2953 YYSYMBOL_256_14 = 256, /* $@14 */
2954 YYSYMBOL_257_15 = 257, /* $@15 */
2955 YYSYMBOL_258_16 = 258, /* @16 */
2956 YYSYMBOL_259_17 = 259, /* @17 */
2957 YYSYMBOL_260_18 = 260, /* $@18 */
2958 YYSYMBOL_261_19 = 261, /* $@19 */
2959 YYSYMBOL_262_20 = 262, /* $@20 */
2960 YYSYMBOL_263_21 = 263, /* $@21 */
2961 YYSYMBOL_264_22 = 264, /* $@22 */
2962 YYSYMBOL_265_23 = 265, /* $@23 */
2963 YYSYMBOL_266_24 = 266, /* $@24 */
2964 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2965 YYSYMBOL_primary_value = 268, /* primary_value */
2966 YYSYMBOL_k_begin = 269, /* k_begin */
2967 YYSYMBOL_k_if = 270, /* k_if */
2968 YYSYMBOL_k_unless = 271, /* k_unless */
2969 YYSYMBOL_k_while = 272, /* k_while */
2970 YYSYMBOL_k_until = 273, /* k_until */
2971 YYSYMBOL_k_case = 274, /* k_case */
2972 YYSYMBOL_k_for = 275, /* k_for */
2973 YYSYMBOL_k_class = 276, /* k_class */
2974 YYSYMBOL_k_module = 277, /* k_module */
2975 YYSYMBOL_k_def = 278, /* k_def */
2976 YYSYMBOL_k_do = 279, /* k_do */
2977 YYSYMBOL_k_do_block = 280, /* k_do_block */
2978 YYSYMBOL_k_rescue = 281, /* k_rescue */
2979 YYSYMBOL_k_ensure = 282, /* k_ensure */
2980 YYSYMBOL_k_when = 283, /* k_when */
2981 YYSYMBOL_k_else = 284, /* k_else */
2982 YYSYMBOL_k_elsif = 285, /* k_elsif */
2983 YYSYMBOL_k_end = 286, /* k_end */
2984 YYSYMBOL_k_return = 287, /* k_return */
2985 YYSYMBOL_k_yield = 288, /* k_yield */
2986 YYSYMBOL_then = 289, /* then */
2987 YYSYMBOL_do = 290, /* do */
2988 YYSYMBOL_if_tail = 291, /* if_tail */
2989 YYSYMBOL_opt_else = 292, /* opt_else */
2990 YYSYMBOL_for_var = 293, /* for_var */
2991 YYSYMBOL_f_marg = 294, /* f_marg */
2992 YYSYMBOL_mlhs_f_marg = 295, /* mlhs_f_marg */
2993 YYSYMBOL_f_margs = 296, /* f_margs */
2994 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2995 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2996 YYSYMBOL_299_25 = 299, /* $@25 */
2997 YYSYMBOL_f_eq = 300, /* f_eq */
2998 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
2999 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3000 YYSYMBOL_args_tail_basic_primary_value = 303, /* args_tail_basic_primary_value */
3001 YYSYMBOL_block_args_tail = 304, /* block_args_tail */
3002 YYSYMBOL_excessed_comma = 305, /* excessed_comma */
3003 YYSYMBOL_f_opt_primary_value = 306, /* f_opt_primary_value */
3004 YYSYMBOL_f_opt_arg_primary_value = 307, /* f_opt_arg_primary_value */
3005 YYSYMBOL_opt_args_tail_block_args_tail = 308, /* opt_args_tail_block_args_tail */
3006 YYSYMBOL_block_param = 309, /* block_param */
3007 YYSYMBOL_opt_block_param_def = 310, /* opt_block_param_def */
3008 YYSYMBOL_block_param_def = 311, /* block_param_def */
3009 YYSYMBOL_opt_block_param = 312, /* opt_block_param */
3010 YYSYMBOL_opt_bv_decl = 313, /* opt_bv_decl */
3011 YYSYMBOL_bv_decls = 314, /* bv_decls */
3012 YYSYMBOL_bvar = 315, /* bvar */
3013 YYSYMBOL_max_numparam = 316, /* max_numparam */
3014 YYSYMBOL_numparam = 317, /* numparam */
3015 YYSYMBOL_it_id = 318, /* it_id */
3016 YYSYMBOL_319_26 = 319, /* @26 */
3017 YYSYMBOL_320_27 = 320, /* $@27 */
3018 YYSYMBOL_lambda = 321, /* lambda */
3019 YYSYMBOL_f_larglist = 322, /* f_larglist */
3020 YYSYMBOL_lambda_body = 323, /* lambda_body */
3021 YYSYMBOL_324_28 = 324, /* $@28 */
3022 YYSYMBOL_do_block = 325, /* do_block */
3023 YYSYMBOL_block_call = 326, /* block_call */
3024 YYSYMBOL_method_call = 327, /* method_call */
3025 YYSYMBOL_brace_block = 328, /* brace_block */
3026 YYSYMBOL_329_29 = 329, /* @29 */
3027 YYSYMBOL_brace_body = 330, /* brace_body */
3028 YYSYMBOL_331_30 = 331, /* @30 */
3029 YYSYMBOL_do_body = 332, /* do_body */
3030 YYSYMBOL_case_args = 333, /* case_args */
3031 YYSYMBOL_case_body = 334, /* case_body */
3032 YYSYMBOL_cases = 335, /* cases */
3033 YYSYMBOL_p_pvtbl = 336, /* p_pvtbl */
3034 YYSYMBOL_p_pktbl = 337, /* p_pktbl */
3035 YYSYMBOL_p_in_kwarg = 338, /* p_in_kwarg */
3036 YYSYMBOL_339_31 = 339, /* $@31 */
3037 YYSYMBOL_p_case_body = 340, /* p_case_body */
3038 YYSYMBOL_p_cases = 341, /* p_cases */
3039 YYSYMBOL_p_top_expr = 342, /* p_top_expr */
3040 YYSYMBOL_p_top_expr_body = 343, /* p_top_expr_body */
3041 YYSYMBOL_p_expr = 344, /* p_expr */
3042 YYSYMBOL_p_as = 345, /* p_as */
3043 YYSYMBOL_p_alt = 346, /* p_alt */
3044 YYSYMBOL_p_lparen = 347, /* p_lparen */
3045 YYSYMBOL_p_lbracket = 348, /* p_lbracket */
3046 YYSYMBOL_p_expr_basic = 349, /* p_expr_basic */
3047 YYSYMBOL_350_32 = 350, /* $@32 */
3048 YYSYMBOL_p_args = 351, /* p_args */
3049 YYSYMBOL_p_args_head = 352, /* p_args_head */
3050 YYSYMBOL_p_args_tail = 353, /* p_args_tail */
3051 YYSYMBOL_p_find = 354, /* p_find */
3052 YYSYMBOL_p_rest = 355, /* p_rest */
3053 YYSYMBOL_p_args_post = 356, /* p_args_post */
3054 YYSYMBOL_p_arg = 357, /* p_arg */
3055 YYSYMBOL_p_kwargs = 358, /* p_kwargs */
3056 YYSYMBOL_p_kwarg = 359, /* p_kwarg */
3057 YYSYMBOL_p_kw = 360, /* p_kw */
3058 YYSYMBOL_p_kw_label = 361, /* p_kw_label */
3059 YYSYMBOL_p_kwrest = 362, /* p_kwrest */
3060 YYSYMBOL_p_kwnorest = 363, /* p_kwnorest */
3061 YYSYMBOL_p_any_kwrest = 364, /* p_any_kwrest */
3062 YYSYMBOL_p_value = 365, /* p_value */
3063 YYSYMBOL_range_expr_p_primitive = 366, /* range_expr_p_primitive */
3064 YYSYMBOL_p_primitive = 367, /* p_primitive */
3065 YYSYMBOL_p_variable = 368, /* p_variable */
3066 YYSYMBOL_p_var_ref = 369, /* p_var_ref */
3067 YYSYMBOL_p_expr_ref = 370, /* p_expr_ref */
3068 YYSYMBOL_p_const = 371, /* p_const */
3069 YYSYMBOL_opt_rescue = 372, /* opt_rescue */
3070 YYSYMBOL_exc_list = 373, /* exc_list */
3071 YYSYMBOL_exc_var = 374, /* exc_var */
3072 YYSYMBOL_opt_ensure = 375, /* opt_ensure */
3073 YYSYMBOL_literal = 376, /* literal */
3074 YYSYMBOL_strings = 377, /* strings */
3075 YYSYMBOL_string = 378, /* string */
3076 YYSYMBOL_string1 = 379, /* string1 */
3077 YYSYMBOL_xstring = 380, /* xstring */
3078 YYSYMBOL_regexp = 381, /* regexp */
3079 YYSYMBOL_nonempty_list__ = 382, /* nonempty_list_' ' */
3080 YYSYMBOL_words_tWORDS_BEG_word_list = 383, /* words_tWORDS_BEG_word_list */
3081 YYSYMBOL_words = 384, /* words */
3082 YYSYMBOL_word_list = 385, /* word_list */
3083 YYSYMBOL_word = 386, /* word */
3084 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 387, /* words_tSYMBOLS_BEG_symbol_list */
3085 YYSYMBOL_symbols = 388, /* symbols */
3086 YYSYMBOL_symbol_list = 389, /* symbol_list */
3087 YYSYMBOL_words_tQWORDS_BEG_qword_list = 390, /* words_tQWORDS_BEG_qword_list */
3088 YYSYMBOL_qwords = 391, /* qwords */
3089 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 392, /* words_tQSYMBOLS_BEG_qsym_list */
3090 YYSYMBOL_qsymbols = 393, /* qsymbols */
3091 YYSYMBOL_qword_list = 394, /* qword_list */
3092 YYSYMBOL_qsym_list = 395, /* qsym_list */
3093 YYSYMBOL_string_contents = 396, /* string_contents */
3094 YYSYMBOL_xstring_contents = 397, /* xstring_contents */
3095 YYSYMBOL_regexp_contents = 398, /* regexp_contents */
3096 YYSYMBOL_string_content = 399, /* string_content */
3097 YYSYMBOL_400_33 = 400, /* @33 */
3098 YYSYMBOL_401_34 = 401, /* @34 */
3099 YYSYMBOL_402_35 = 402, /* @35 */
3100 YYSYMBOL_403_36 = 403, /* @36 */
3101 YYSYMBOL_string_dend = 404, /* string_dend */
3102 YYSYMBOL_string_dvar = 405, /* string_dvar */
3103 YYSYMBOL_symbol = 406, /* symbol */
3104 YYSYMBOL_ssym = 407, /* ssym */
3105 YYSYMBOL_sym = 408, /* sym */
3106 YYSYMBOL_dsym = 409, /* dsym */
3107 YYSYMBOL_numeric = 410, /* numeric */
3108 YYSYMBOL_simple_numeric = 411, /* simple_numeric */
3109 YYSYMBOL_nonlocal_var = 412, /* nonlocal_var */
3110 YYSYMBOL_user_variable = 413, /* user_variable */
3111 YYSYMBOL_keyword_variable = 414, /* keyword_variable */
3112 YYSYMBOL_var_ref = 415, /* var_ref */
3113 YYSYMBOL_var_lhs = 416, /* var_lhs */
3114 YYSYMBOL_backref = 417, /* backref */
3115 YYSYMBOL_418_37 = 418, /* $@37 */
3116 YYSYMBOL_superclass = 419, /* superclass */
3117 YYSYMBOL_f_opt_paren_args = 420, /* f_opt_paren_args */
3118 YYSYMBOL_f_paren_args = 421, /* f_paren_args */
3119 YYSYMBOL_f_arglist = 422, /* f_arglist */
3120 YYSYMBOL_423_38 = 423, /* @38 */
3121 YYSYMBOL_f_kw_arg_value = 424, /* f_kw_arg_value */
3122 YYSYMBOL_f_kwarg_arg_value = 425, /* f_kwarg_arg_value */
3123 YYSYMBOL_args_tail_basic_arg_value = 426, /* args_tail_basic_arg_value */
3124 YYSYMBOL_args_tail = 427, /* args_tail */
3125 YYSYMBOL_f_opt_arg_value = 428, /* f_opt_arg_value */
3126 YYSYMBOL_f_opt_arg_arg_value = 429, /* f_opt_arg_arg_value */
3127 YYSYMBOL_opt_args_tail_args_tail = 430, /* opt_args_tail_args_tail */
3128 YYSYMBOL_f_args = 431, /* f_args */
3129 YYSYMBOL_args_forward = 432, /* args_forward */
3130 YYSYMBOL_f_bad_arg = 433, /* f_bad_arg */
3131 YYSYMBOL_f_norm_arg = 434, /* f_norm_arg */
3132 YYSYMBOL_f_arg_asgn = 435, /* f_arg_asgn */
3133 YYSYMBOL_f_arg_item = 436, /* f_arg_item */
3134 YYSYMBOL_f_arg = 437, /* f_arg */
3135 YYSYMBOL_f_label = 438, /* f_label */
3136 YYSYMBOL_kwrest_mark = 439, /* kwrest_mark */
3137 YYSYMBOL_f_no_kwarg = 440, /* f_no_kwarg */
3138 YYSYMBOL_f_kwrest = 441, /* f_kwrest */
3139 YYSYMBOL_restarg_mark = 442, /* restarg_mark */
3140 YYSYMBOL_f_rest_arg = 443, /* f_rest_arg */
3141 YYSYMBOL_blkarg_mark = 444, /* blkarg_mark */
3142 YYSYMBOL_f_block_arg = 445, /* f_block_arg */
3143 YYSYMBOL_opt_f_block_arg = 446, /* opt_f_block_arg */
3144 YYSYMBOL_value_expr_singleton_expr = 447, /* value_expr_singleton_expr */
3145 YYSYMBOL_singleton = 448, /* singleton */
3146 YYSYMBOL_singleton_expr = 449, /* singleton_expr */
3147 YYSYMBOL_450_39 = 450, /* $@39 */
3148 YYSYMBOL_assoc_list = 451, /* assoc_list */
3149 YYSYMBOL_assocs = 452, /* assocs */
3150 YYSYMBOL_assoc = 453, /* assoc */
3151 YYSYMBOL_operation2 = 454, /* operation2 */
3152 YYSYMBOL_operation3 = 455, /* operation3 */
3153 YYSYMBOL_dot_or_colon = 456, /* dot_or_colon */
3154 YYSYMBOL_call_op = 457, /* call_op */
3155 YYSYMBOL_call_op2 = 458, /* call_op2 */
3156 YYSYMBOL_rparen = 459, /* rparen */
3157 YYSYMBOL_rbracket = 460, /* rbracket */
3158 YYSYMBOL_rbrace = 461, /* rbrace */
3159 YYSYMBOL_trailer = 462, /* trailer */
3160 YYSYMBOL_term = 463, /* term */
3161 YYSYMBOL_terms = 464, /* terms */
3162 YYSYMBOL_none = 465 /* none */
3163};
3164typedef enum yysymbol_kind_t yysymbol_kind_t;
3165
3166
3167
3168
3169#ifdef short
3170# undef short
3171#endif
3172
3173/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3174 <limits.h> and (if available) <stdint.h> are included
3175 so that the code can choose integer types of a good width. */
3176
3177#ifndef __PTRDIFF_MAX__
3178# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3179# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3180# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3181# define YY_STDINT_H
3182# endif
3183#endif
3184
3185/* Narrow types that promote to a signed type and that can represent a
3186 signed or unsigned integer of at least N bits. In tables they can
3187 save space and decrease cache pressure. Promoting to a signed type
3188 helps avoid bugs in integer arithmetic. */
3189
3190#ifdef __INT_LEAST8_MAX__
3191typedef __INT_LEAST8_TYPE__ yytype_int8;
3192#elif defined YY_STDINT_H
3193typedef int_least8_t yytype_int8;
3194#else
3195typedef signed char yytype_int8;
3196#endif
3197
3198#ifdef __INT_LEAST16_MAX__
3199typedef __INT_LEAST16_TYPE__ yytype_int16;
3200#elif defined YY_STDINT_H
3201typedef int_least16_t yytype_int16;
3202#else
3203typedef short yytype_int16;
3204#endif
3205
3206/* Work around bug in HP-UX 11.23, which defines these macros
3207 incorrectly for preprocessor constants. This workaround can likely
3208 be removed in 2023, as HPE has promised support for HP-UX 11.23
3209 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3210 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3211#ifdef __hpux
3212# undef UINT_LEAST8_MAX
3213# undef UINT_LEAST16_MAX
3214# define UINT_LEAST8_MAX 255
3215# define UINT_LEAST16_MAX 65535
3216#endif
3217
3218#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3219typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3220#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3221 && UINT_LEAST8_MAX <= INT_MAX)
3222typedef uint_least8_t yytype_uint8;
3223#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3224typedef unsigned char yytype_uint8;
3225#else
3226typedef short yytype_uint8;
3227#endif
3228
3229#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3230typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3231#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3232 && UINT_LEAST16_MAX <= INT_MAX)
3233typedef uint_least16_t yytype_uint16;
3234#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3235typedef unsigned short yytype_uint16;
3236#else
3237typedef int yytype_uint16;
3238#endif
3239
3240#ifndef YYPTRDIFF_T
3241# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3242# define YYPTRDIFF_T __PTRDIFF_TYPE__
3243# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3244# elif defined PTRDIFF_MAX
3245# ifndef ptrdiff_t
3246# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3247# endif
3248# define YYPTRDIFF_T ptrdiff_t
3249# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3250# else
3251# define YYPTRDIFF_T long
3252# define YYPTRDIFF_MAXIMUM LONG_MAX
3253# endif
3254#endif
3255
3256#ifndef YYSIZE_T
3257# ifdef __SIZE_TYPE__
3258# define YYSIZE_T __SIZE_TYPE__
3259# elif defined size_t
3260# define YYSIZE_T size_t
3261# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3262# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3263# define YYSIZE_T size_t
3264# else
3265# define YYSIZE_T unsigned
3266# endif
3267#endif
3268
3269#define YYSIZE_MAXIMUM \
3270 YY_CAST (YYPTRDIFF_T, \
3271 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3272 ? YYPTRDIFF_MAXIMUM \
3273 : YY_CAST (YYSIZE_T, -1)))
3274
3275#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3276
3277
3278/* Stored state numbers (used for stacks). */
3279typedef yytype_int16 yy_state_t;
3280
3281/* State numbers in computations. */
3282typedef int yy_state_fast_t;
3283
3284#ifndef YY_
3285# if defined YYENABLE_NLS && YYENABLE_NLS
3286# if ENABLE_NLS
3287# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3288# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3289# endif
3290# endif
3291# ifndef YY_
3292# define YY_(Msgid) Msgid
3293# endif
3294#endif
3295
3296
3297#ifndef YY_ATTRIBUTE_PURE
3298# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3299# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3300# else
3301# define YY_ATTRIBUTE_PURE
3302# endif
3303#endif
3304
3305#ifndef YY_ATTRIBUTE_UNUSED
3306# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3307# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3308# else
3309# define YY_ATTRIBUTE_UNUSED
3310# endif
3311#endif
3312
3313/* Suppress unused-variable warnings by "using" E. */
3314#if ! defined lint || defined __GNUC__
3315# define YY_USE(E) ((void) (E))
3316#else
3317# define YY_USE(E) /* empty */
3318#endif
3319
3320/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3321#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3322# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3323# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3324 _Pragma ("GCC diagnostic push") \
3325 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3326# else
3327# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3328 _Pragma ("GCC diagnostic push") \
3329 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3330 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3331# endif
3332# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3333 _Pragma ("GCC diagnostic pop")
3334#else
3335# define YY_INITIAL_VALUE(Value) Value
3336#endif
3337#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3338# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3339# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3340#endif
3341#ifndef YY_INITIAL_VALUE
3342# define YY_INITIAL_VALUE(Value) /* Nothing. */
3343#endif
3344
3345#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3346# define YY_IGNORE_USELESS_CAST_BEGIN \
3347 _Pragma ("GCC diagnostic push") \
3348 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3349# define YY_IGNORE_USELESS_CAST_END \
3350 _Pragma ("GCC diagnostic pop")
3351#endif
3352#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3353# define YY_IGNORE_USELESS_CAST_BEGIN
3354# define YY_IGNORE_USELESS_CAST_END
3355#endif
3356
3357
3358#define YY_ASSERT(E) ((void) (0 && (E)))
3359
3360#if 1
3361
3362/* The parser invokes alloca or malloc; define the necessary symbols. */
3363
3364# ifdef YYSTACK_USE_ALLOCA
3365# if YYSTACK_USE_ALLOCA
3366# ifdef __GNUC__
3367# define YYSTACK_ALLOC __builtin_alloca
3368# elif defined __BUILTIN_VA_ARG_INCR
3369# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3370# elif defined _AIX
3371# define YYSTACK_ALLOC __alloca
3372# elif defined _MSC_VER
3373# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3374# define alloca _alloca
3375# else
3376# define YYSTACK_ALLOC alloca
3377# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3378# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3379 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3380# ifndef EXIT_SUCCESS
3381# define EXIT_SUCCESS 0
3382# endif
3383# endif
3384# endif
3385# endif
3386# endif
3387
3388# ifdef YYSTACK_ALLOC
3389 /* Pacify GCC's 'empty if-body' warning. */
3390# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3391# ifndef YYSTACK_ALLOC_MAXIMUM
3392 /* The OS might guarantee only one guard page at the bottom of the stack,
3393 and a page size can be as small as 4096 bytes. So we cannot safely
3394 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3395 to allow for a few compiler-allocated temporary stack slots. */
3396# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3397# endif
3398# else
3399# define YYSTACK_ALLOC YYMALLOC
3400# define YYSTACK_FREE YYFREE
3401# ifndef YYSTACK_ALLOC_MAXIMUM
3402# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3403# endif
3404# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3405 && ! ((defined YYMALLOC || defined malloc) \
3406 && (defined YYFREE || defined free)))
3407# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3408# ifndef EXIT_SUCCESS
3409# define EXIT_SUCCESS 0
3410# endif
3411# endif
3412# ifndef YYMALLOC
3413# define YYMALLOC malloc
3414# if ! defined malloc && ! defined EXIT_SUCCESS
3415void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3416# endif
3417# endif
3418# ifndef YYFREE
3419# define YYFREE free
3420# if ! defined free && ! defined EXIT_SUCCESS
3421void free (void *); /* INFRINGES ON USER NAME SPACE */
3422# endif
3423# endif
3424# endif
3425#endif /* 1 */
3426
3427#if (! defined yyoverflow \
3428 && (! defined __cplusplus \
3429 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3430 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3431
3432/* A type that is properly aligned for any stack member. */
3433union yyalloc
3434{
3435 yy_state_t yyss_alloc;
3436 YYSTYPE yyvs_alloc;
3437 YYLTYPE yyls_alloc;
3438};
3439
3440/* The size of the maximum gap between one aligned stack and the next. */
3441# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3442
3443/* The size of an array large to enough to hold all stacks, each with
3444 N elements. */
3445# define YYSTACK_BYTES(N) \
3446 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3447 + YYSIZEOF (YYLTYPE)) \
3448 + 2 * YYSTACK_GAP_MAXIMUM)
3449
3450# define YYCOPY_NEEDED 1
3451
3452/* Relocate STACK from its old location to the new one. The
3453 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3454 elements in the stack, and YYPTR gives the new location of the
3455 stack. Advance YYPTR to a properly aligned location for the next
3456 stack. */
3457# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3458 do \
3459 { \
3460 YYPTRDIFF_T yynewbytes; \
3461 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3462 Stack = &yyptr->Stack_alloc; \
3463 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3464 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3465 } \
3466 while (0)
3467
3468#endif
3469
3470#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3471/* Copy COUNT objects from SRC to DST. The source and destination do
3472 not overlap. */
3473# ifndef YYCOPY
3474# if defined __GNUC__ && 1 < __GNUC__
3475# define YYCOPY(Dst, Src, Count) \
3476 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3477# else
3478# define YYCOPY(Dst, Src, Count) \
3479 do \
3480 { \
3481 YYPTRDIFF_T yyi; \
3482 for (yyi = 0; yyi < (Count); yyi++) \
3483 (Dst)[yyi] = (Src)[yyi]; \
3484 } \
3485 while (0)
3486# endif
3487# endif
3488#endif /* !YYCOPY_NEEDED */
3489
3490/* YYFINAL -- State number of the termination state. */
3491#define YYFINAL 143
3492/* YYLAST -- Last index in YYTABLE. */
3493#define YYLAST 16117
3494
3495/* YYNTOKENS -- Number of terminals. */
3496#define YYNTOKENS 162
3497/* YYNNTS -- Number of nonterminals. */
3498#define YYNNTS 304
3499/* YYNRULES -- Number of rules. */
3500#define YYNRULES 812
3501/* YYNSTATES -- Number of states. */
3502#define YYNSTATES 1375
3503
3504/* YYMAXUTOK -- Last valid token kind. */
3505#define YYMAXUTOK 361
3506
3507
3508/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3509 as returned by yylex, with out-of-bounds checking. */
3510#define YYTRANSLATE(YYX) \
3511 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3512 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3513 : YYSYMBOL_YYUNDEF)
3514
3515/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3516 as returned by yylex. */
3517static const yytype_uint8 yytranslate[] =
3518{
3519 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3520 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3522 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3523 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3524 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3525 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3528 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3531 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3532 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3533 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3534 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3536 2, 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, 1, 2, 3, 4,
3545 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3546 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3547 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3548 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3549 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3550 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3551 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3552 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3553 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3554 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3555 147, 150
3556};
3557
3558#if YYDEBUG
3559/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3560static const yytype_int16 yyrline[] =
3561{
3562 0, 3164, 3158, 3164, 3164, 3164, 3164, 3184, 3189, 3194,
3563 3201, 3206, 3213, 3215, 3233, 3229, 3234, 3233, 3245, 3242,
3564 3255, 3260, 3265, 3272, 3274, 3273, 3283, 3285, 3292, 3292,
3565 3297, 3302, 3310, 3319, 3326, 3332, 3338, 3349, 3360, 3369,
3566 3382, 3383, 3388, 3388, 3389, 3400, 3405, 3406, 3413, 3413,
3567 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3415,
3568 3415, 3415, 3418, 3419, 3425, 3425, 3425, 3432, 3433, 3440,
3569 3443, 3444, 3449, 3454, 3459, 3465, 3464, 3478, 3477, 3490,
3570 3493, 3504, 3514, 3513, 3527, 3527, 3528, 3534, 3534, 3534,
3571 3541, 3542, 3545, 3545, 3548, 3549, 3556, 3564, 3564, 3564,
3572 3571, 3578, 3587, 3592, 3597, 3602, 3607, 3613, 3619, 3625,
3573 3630, 3637, 3646, 3647, 3654, 3655, 3662, 3667, 3672, 3677,
3574 3677, 3677, 3682, 3687, 3692, 3697, 3702, 3707, 3714, 3715,
3575 3722, 3727, 3735, 3735, 3740, 3745, 3745, 3751, 3756, 3761,
3576 3766, 3774, 3774, 3779, 3784, 3784, 3789, 3794, 3799, 3804,
3577 3812, 3820, 3823, 3828, 3833, 3840, 3840, 3840, 3841, 3846,
3578 3849, 3854, 3857, 3862, 3862, 3870, 3871, 3872, 3873, 3874,
3579 3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3883, 3884,
3580 3885, 3886, 3887, 3888, 3889, 3890, 3891, 3892, 3893, 3894,
3581 3895, 3896, 3897, 3898, 3899, 3902, 3902, 3902, 3903, 3903,
3582 3904, 3904, 3904, 3905, 3905, 3905, 3905, 3906, 3906, 3906,
3583 3906, 3907, 3907, 3907, 3908, 3908, 3908, 3908, 3909, 3909,
3584 3909, 3909, 3910, 3910, 3910, 3910, 3911, 3911, 3911, 3911,
3585 3912, 3912, 3912, 3912, 3913, 3913, 3916, 3916, 3917, 3917,
3586 3917, 3917, 3917, 3917, 3917, 3917, 3917, 3918, 3918, 3918,
3587 3918, 3918, 3918, 3918, 3919, 3924, 3929, 3934, 3939, 3944,
3588 3949, 3954, 3959, 3964, 3969, 3974, 3979, 3984, 3985, 3990,
3589 3995, 4000, 4005, 4010, 4015, 4020, 4025, 4030, 4035, 4040,
3590 4046, 4046, 4046, 4047, 4048, 4051, 4060, 4061, 4067, 4074,
3591 4075, 4076, 4077, 4080, 4085, 4093, 4099, 4106, 4113, 4113,
3592 4116, 4117, 4118, 4123, 4130, 4135, 4144, 4149, 4159, 4171,
3593 4172, 4178, 4179, 4180, 4181, 4186, 4193, 4193, 4198, 4203,
3594 4209, 4215, 4219, 4219, 4257, 4262, 4270, 4275, 4283, 4288,
3595 4293, 4298, 4306, 4311, 4320, 4321, 4325, 4330, 4335, 4353,
3596 4353, 4353, 4353, 4353, 4353, 4353, 4353, 4354, 4355, 4356,
3597 4362, 4361, 4374, 4374, 4380, 4386, 4391, 4396, 4401, 4407,
3598 4412, 4417, 4422, 4427, 4433, 4438, 4443, 4448, 4449, 4455,
3599 4457, 4469, 4478, 4487, 4496, 4495, 4510, 4509, 4522, 4530,
3600 4530, 4531, 4574, 4573, 4596, 4595, 4615, 4614, 4633, 4631,
3601 4648, 4646, 4661, 4666, 4671, 4676, 4691, 4691, 4694, 4701,
3602 4719, 4726, 4734, 4742, 4749, 4757, 4766, 4775, 4783, 4790,
3603 4797, 4805, 4812, 4818, 4833, 4840, 4845, 4851, 4858, 4865,
3604 4866, 4867, 4870, 4871, 4874, 4876, 4885, 4886, 4893, 4894,
3605 4897, 4902, 4910, 4910, 4910, 4915, 4920, 4925, 4930, 4937,
3606 4943, 4950, 4951, 4958, 4958, 4960, 4960, 4960, 4960, 4960,
3607 4960, 4960, 4960, 4960, 4963, 4971, 4971, 4971, 4971, 4971,
3608 4971, 4976, 4981, 4986, 4991, 4996, 5002, 5007, 5012, 5017,
3609 5022, 5027, 5032, 5037, 5042, 5049, 5050, 5056, 5066, 5070,
3610 5073, 5078, 5085, 5087, 5091, 5096, 5099, 5105, 5110, 5117,
3611 5123, 5116, 5150, 5157, 5166, 5173, 5172, 5183, 5191, 5203,
3612 5213, 5222, 5229, 5236, 5247, 5253, 5258, 5264, 5274, 5279,
3613 5287, 5293, 5301, 5303, 5318, 5318, 5339, 5345, 5350, 5356,
3614 5364, 5373, 5374, 5377, 5378, 5380, 5391, 5396, 5404, 5405,
3615 5408, 5409, 5415, 5423, 5424, 5430, 5436, 5441, 5446, 5453,
3616 5456, 5463, 5466, 5471, 5474, 5481, 5488, 5489, 5490, 5497,
3617 5504, 5511, 5517, 5524, 5531, 5538, 5544, 5549, 5554, 5561,
3618 5560, 5571, 5577, 5585, 5591, 5596, 5601, 5606, 5611, 5614,
3619 5615, 5622, 5627, 5634, 5642, 5648, 5655, 5656, 5663, 5670,
3620 5675, 5680, 5685, 5692, 5694, 5701, 5707, 5719, 5720, 5735,
3621 5740, 5747, 5753, 5754, 5761, 5762, 5762, 5762, 5762, 5762,
3622 5762, 5762, 5763, 5764, 5765, 5768, 5768, 5768, 5768, 5768,
3623 5768, 5768, 5768, 5769, 5774, 5777, 5785, 5797, 5804, 5811,
3624 5816, 5821, 5829, 5849, 5852, 5857, 5861, 5864, 5869, 5872,
3625 5879, 5882, 5883, 5886, 5897, 5898, 5899, 5906, 5919, 5931,
3626 5938, 5938, 5938, 5938, 5942, 5946, 5953, 5955, 5962, 5962,
3627 5966, 5970, 5977, 5977, 5980, 5980, 5984, 5988, 5996, 6000,
3628 6008, 6012, 6020, 6024, 6032, 6036, 6062, 6065, 6064, 6079,
3629 6087, 6091, 6095, 6110, 6111, 6114, 6119, 6122, 6123, 6126,
3630 6142, 6143, 6146, 6154, 6155, 6163, 6164, 6165, 6166, 6169,
3631 6170, 6171, 6174, 6174, 6175, 6178, 6179, 6180, 6181, 6182,
3632 6183, 6184, 6187, 6197, 6204, 6204, 6211, 6212, 6216, 6215,
3633 6225, 6228, 6229, 6238, 6248, 6249, 6249, 6266, 6266, 6266,
3634 6266, 6266, 6266, 6266, 6266, 6266, 6267, 6284, 6284, 6284,
3635 6284, 6284, 6284, 6289, 6294, 6299, 6304, 6309, 6314, 6319,
3636 6324, 6329, 6334, 6339, 6344, 6349, 6355, 6362, 6373, 6382,
3637 6391, 6400, 6411, 6412, 6422, 6429, 6434, 6453, 6455, 6466,
3638 6486, 6487, 6490, 6496, 6502, 6510, 6511, 6514, 6520, 6528,
3639 6529, 6532, 6538, 6546, 6551, 6555, 6555, 6585, 6587, 6586,
3640 6599, 6600, 6607, 6609, 6634, 6639, 6644, 6651, 6657, 6662,
3641 6675, 6675, 6675, 6676, 6679, 6680, 6681, 6684, 6685, 6688,
3642 6689, 6692, 6693, 6696, 6699, 6702, 6705, 6706, 6709, 6710,
3643 6717, 6718, 6722
3644};
3645#endif
3646
3648#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3649
3650#if 1
3651/* The user-facing name of the symbol whose (internal) number is
3652 YYSYMBOL. No bounds checking. */
3653static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3654
3655/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3656 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3657static const char *const yytname[] =
3658{
3659 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3660 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3661 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3662 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3663 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3664 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3665 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3666 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3667 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3668 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3669 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3670 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3671 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3672 "\"method\"", "\"global variable\"", "\"instance variable\"",
3673 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3674 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3675 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3676 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3677 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3678 "\"escaped form feed\"", "\"escaped carriage return\"",
3679 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3680 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3681 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3682 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3683 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3684 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3685 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3686 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3687 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3688 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3689 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3690 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3691 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3692 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3693 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3694 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3695 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3696 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3697 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3698 "command_asgn", "op_asgn_command_rhs",
3699 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3700 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3701 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3702 "expr_value_do", "command_call", "value_expr_command_call",
3703 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3704 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_mlhs_item",
3705 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3706 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3707 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3708 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3709 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3710 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3711 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3712 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3713 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3714 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3715 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3716 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3717 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3718 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_f_marg",
3719 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3720 "f_kw_primary_value", "f_kwarg_primary_value",
3721 "args_tail_basic_primary_value", "block_args_tail", "excessed_comma",
3722 "f_opt_primary_value", "f_opt_arg_primary_value",
3723 "opt_args_tail_block_args_tail", "block_param", "opt_block_param_def",
3724 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3725 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3726 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3727 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3728 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3729 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3730 "p_expr", "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic",
3731 "$@32", "p_args", "p_args_head", "p_args_tail", "p_find", "p_rest",
3732 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
3733 "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3734 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3735 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3736 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3737 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3738 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3739 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3740 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3741 "string_contents", "xstring_contents", "regexp_contents",
3742 "string_content", "@33", "@34", "@35", "@36", "string_dend",
3743 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3744 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3745 "var_ref", "var_lhs", "backref", "$@37", "superclass",
3746 "f_opt_paren_args", "f_paren_args", "f_arglist", "@38", "f_kw_arg_value",
3747 "f_kwarg_arg_value", "args_tail_basic_arg_value", "args_tail",
3748 "f_opt_arg_value", "f_opt_arg_arg_value", "opt_args_tail_args_tail",
3749 "f_args", "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn",
3750 "f_arg_item", "f_arg", "f_label", "kwrest_mark", "f_no_kwarg",
3751 "f_kwrest", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
3752 "opt_f_block_arg", "value_expr_singleton_expr", "singleton",
3753 "singleton_expr", "$@39", "assoc_list", "assocs", "assoc", "operation2",
3754 "operation3", "dot_or_colon", "call_op", "call_op2", "rparen",
3755 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3756};
3757
3758static const char *
3759yysymbol_name (yysymbol_kind_t yysymbol)
3760{
3761 return yytname[yysymbol];
3762}
3763#endif
3764
3765#define YYPACT_NINF (-1157)
3766
3767#define yypact_value_is_default(Yyn) \
3768 ((Yyn) == YYPACT_NINF)
3769
3770#define YYTABLE_NINF (-813)
3771
3772#define yytable_value_is_error(Yyn) \
3773 ((Yyn) == YYTABLE_NINF)
3774
3775/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3776 STATE-NUM. */
3777static const yytype_int16 yypact[] =
3778{
3779 -1157, 5728, 173, -1157, -1157, -1157, -1157, 10499, -1157, -1157,
3780 -1157, -1157, -1157, -1157, -1157, 11554, 11554, -1157, -1157, -1157,
3781 -1157, 6788, -1157, -1157, -1157, -1157, 565, 10345, 36, 57,
3782 -1157, -1157, -1157, -1157, 6164, 6944, -1157, -1157, 6320, -1157,
3783 -1157, -1157, -1157, -1157, -1157, -1157, -1157, 13114, 13114, 13114,
3784 13114, 179, 9258, 9416, 12034, 12274, 10800, -1157, 10191, -1157,
3785 -1157, -1157, 181, 181, 181, 181, 1367, 13234, 13114, -1157,
3786 311, -1157, -1157, 1444, -1157, -1157, -1157, -1157, -1157, 601,
3787 460, 460, -1157, -1157, 242, 377, 301, -1157, 297, 13834,
3788 -1157, 353, -1157, 2423, -1157, -1157, -1157, -1157, 372, 376,
3789 -1157, 528, -1157, 11434, 11434, -1157, -1157, 9878, 13952, 14070,
3790 14188, 10036, 11554, 7412, -1157, 677, 134, -1157, -1157, 391,
3791 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3792 -1157, -1157, -1157, -1157, -1157, -1157, -1157, 350, 480, -1157,
3793 413, 512, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3794 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3795 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3796 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3797 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3798 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3799 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3800 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3801 363, -1157, -1157, -1157, -1157, -1157, -1157, 381, 13114, 477,
3802 9416, 13114, 13114, 13114, -1157, 13114, 460, 460, -1157, 415,
3803 4858, -1157, 474, -1157, -1157, -1157, 427, -1157, 632, 45,
3804 51, 499, 59, 458, -1157, -1157, 11674, -1157, 11554, -1157,
3805 -1157, 11175, 13354, 872, -1157, 491, -1157, 9574, -1157, -1157,
3806 -1157, -1157, -1157, 538, 242, -1157, 646, -1157, 553, 681,
3807 5978, 5978, 686, -1157, 9258, 613, 311, -1157, 1444, 36,
3808 662, -1157, -1157, 621, 548, 811, -1157, 474, 651, 811,
3809 -1157, 36, 767, 1367, 14306, 669, 669, 674, -1157, 652,
3810 694, 703, 715, -1157, -1157, 889, -1157, -1157, 1023, 1113,
3811 744, -1157, 678, 678, 678, 678, 801, -1157, -1157, -1157,
3812 -1157, -1157, -1157, -1157, 5880, 761, 11434, 11434, 11434, 11434,
3813 -1157, 13354, 13354, 1652, 782, 787, -1157, 1652, -1157, 791,
3814 -1157, -1157, -1157, -1157, 826, -1157, -1157, -1157, -1157, -1157,
3815 -1157, -1157, 9258, 10918, 793, -1157, -1157, 13114, 13114, 13114,
3816 13114, 13114, -1157, -1157, 13114, 13114, 13114, 13114, 13114, 13114,
3817 13114, 13114, -1157, 13114, -1157, -1157, 13114, 13114, 13114, 13114,
3818 13114, 13114, 13114, 13114, 13114, 13114, -1157, -1157, 4752, 11554,
3819 5125, 538, 8194, -1157, 601, -1157, 119, 119, 11434, 9106,
3820 9106, -1157, 311, 796, 897, -1157, -1157, 721, 937, 102,
3821 110, 122, 710, 965, 11434, 365, -1157, 840, 737, -1157,
3822 -1157, -1157, -1157, 125, 397, 558, 581, 630, 735, 753,
3823 755, 771, -1157, -1157, -1157, -1157, -1157, 835, -1157, -1157,
3824 11036, -1157, -1157, -1157, 14687, -1157, -1157, -1157, -1157, -1157,
3825 -1157, 359, -1157, -1157, -1157, 798, 846, 880, -1157, 13114,
3826 11794, -1157, -1157, 14785, 11554, 14883, -1157, -1157, 12154, -1157,
3827 13114, 36, -1157, 851, 36, 867, -1157, -1157, 865, 167,
3828 -1157, -1157, -1157, -1157, -1157, 10499, -1157, -1157, 13114, 874,
3829 14981, 14883, -1157, 57, 36, -1157, -1157, 5335, 878, 877,
3830 -1157, 12034, -1157, -1157, 12274, -1157, -1157, -1157, 491, 740,
3831 -1157, 888, -1157, -1157, 14306, 15079, 11554, 15177, -1157, -1157,
3832 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3833 1140, 246, 1230, 315, 13114, -1157, -1157, 9726, -1157, -1157,
3834 -1157, -1157, -1157, 11314, -1157, -1157, -1157, -1157, -1157, -1157,
3835 -1157, -1157, -1157, -1157, 1145, -1157, -1157, -1157, -1157, -1157,
3836 890, -1157, -1157, 893, -1157, -1157, -1157, 895, 36, -1157,
3837 -1157, -1157, 918, -1157, 898, 13114, 112, -1157, -1157, 1003,
3838 902, 1008, -1157, 13474, 8194, 311, 13474, 8194, -1157, 909,
3839 -1157, -1157, -1157, 133, 133, 12394, 36, 14306, 913, -1157,
3840 12514, -1157, 681, 2991, 2991, 2991, 2991, 3190, 2205, 2991,
3841 2991, 5978, 5978, 966, 966, -1157, 3908, 1716, 1716, 1646,
3842 53, 53, 681, 681, 681, 1703, 1703, 7568, 6476, 7880,
3843 6632, 538, -1157, 36, 916, 775, -1157, 805, -1157, 7100,
3844 -1157, -1157, 133, -1157, 8346, 1059, 8802, 206, 133, 133,
3845 1058, 1057, 142, 15275, 11554, 15373, -1157, -1157, -1157, 740,
3846 -1157, -1157, -1157, -1157, 15471, 11554, 14687, 8194, 13354, -1157,
3847 -1157, -1157, 36, -1157, -1157, -1157, 4334, 13594, 13594, 10499,
3848 -1157, 13114, 13714, 13714, 13114, -1157, 474, -1157, -1157, 458,
3849 6008, 7256, 36, 464, 473, 13114, 13114, -1157, -1157, 11914,
3850 -1157, 12154, -1157, -1157, -1157, 13354, 4858, -1157, 50, 538,
3851 538, 13594, -1157, 364, -1157, -1157, 811, 14306, 888, 554,
3852 322, 36, 72, 405, -1157, -1157, 1012, -1157, 420, -1157,
3853 181, -1157, -1157, 420, 181, -1157, 681, 952, -1157, 1145,
3854 1348, -1157, 940, 36, 958, -1157, 335, -1157, -1157, 794,
3855 -1157, 1652, -1157, -1157, 981, 13114, 1652, -1157, -1157, -1157,
3856 -1157, -1157, 1661, -1157, -1157, 565, 1073, -1157, 4858, 1075,
3857 133, -1157, 1073, 1075, 133, -1157, -1157, 971, -1157, -1157,
3858 -1157, -1157, -1157, 13114, -1157, -1157, -1157, 970, 972, 1085,
3859 -1157, -1157, 888, 14306, 1074, -1157, -1157, 1089, 1000, 4329,
3860 -1157, -1157, -1157, 747, 476, -1157, -1157, 1005, -1157, -1157,
3861 -1157, -1157, 826, 980, 824, 11794, -1157, -1157, -1157, -1157,
3862 826, -1157, 1141, -1157, 954, -1157, 1133, -1157, -1157, -1157,
3863 -1157, -1157, -1157, 12634, 133, -1157, 1058, 133, 90, 184,
3864 36, 162, 200, 11434, 311, 11434, 8194, 1179, 322, -1157,
3865 36, 133, 167, 10653, -1157, 134, 377, -1157, 4040, -1157,
3866 -1157, -1157, -1157, 13114, -1157, 565, -1157, -1157, -1157, 502,
3867 -1157, -1157, 36, 998, 167, -1157, -1157, -1157, -1157, 639,
3868 -1157, -1157, -1157, -1157, -1157, 678, -1157, 678, 678, 678,
3869 -1157, 36, -1157, 1145, -1157, 1315, -1157, -1157, 1103, 890,
3870 -1157, -1157, 1001, 1009, -1157, -1157, 1010, -1157, 1013, -1157,
3871 1001, 13474, -1157, -1157, -1157, -1157, -1157, -1157, -1157, 1015,
3872 12754, -1157, 888, 543, -1157, -1157, -1157, 15569, 11554, 15667,
3873 -1157, -1157, 13114, 13594, 13594, 1011, -1157, -1157, -1157, 13594,
3874 13594, -1157, -1157, 12874, 1133, -1157, -1157, -1157, 9106, 11434,
3875 133, -1157, -1157, 133, -1157, 13114, -1157, 199, -1157, -1157,
3876 133, -1157, 203, 206, 8194, 311, 133, -1157, -1157, -1157,
3877 -1157, -1157, -1157, 13714, 13114, 13114, -1157, 13114, 13114, -1157,
3878 12154, -1157, 1543, 5576, -1157, -1157, 1025, 1028, -1157, 1661,
3879 -1157, 1661, -1157, 1652, -1157, 1661, -1157, -1157, 1073, 1075,
3880 13114, 13114, -1157, -1157, 13114, 1030, 11314, 11314, 13594, 13114,
3881 7724, 8036, 36, 549, 618, 4610, 4610, 4858, -1157, -1157,
3882 -1157, -1157, -1157, 13594, -1157, -1157, -1157, -1157, 970, -1157,
3883 1066, -1157, 1183, -1157, -1157, 119, -1157, -1157, -1157, 12994,
3884 8498, -1157, -1157, -1157, 133, -1157, -1157, 13114, 1652, -1157,
3885 -1157, 100, 1315, 1315, 1001, 1001, 1049, 1001, 4858, 4858,
3886 1068, 1068, 1015, -1157, -1157, 4858, 624, -1157, -1157, -1157,
3887 4762, 4762, 498, -1157, 3476, 635, 1159, -1157, 1333, -1157,
3888 -1157, 33, -1157, 1078, -1157, -1157, -1157, 1064, -1157, 1067,
3889 -1157, 14615, -1157, -1157, -1157, -1157, -1157, 885, -1157, -1157,
3890 -1157, 279, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3891 -1157, 114, -1157, -1157, -1157, 14424, 119, -1157, -1157, 9106,
3892 -1157, -1157, 8954, 8346, 13114, -1157, 352, 4610, 9106, -1157,
3893 36, 91, -1157, -1157, -1157, 1028, -1157, -1157, 1661, -1157,
3894 -1157, 1323, 9726, -1157, -1157, 8194, -1157, -1157, -1157, -1157,
3895 14615, 55, 36, 5051, -1157, 36, 1070, -1157, 1060, -1157,
3896 -1157, -1157, 1072, -1157, 11434, -1157, 1169, 5051, 14615, 14615,
3897 105, 1125, 4762, 4762, 498, 358, 17, 4610, 4610, -1157,
3898 1174, -1157, 944, 139, 183, 230, 8194, 311, -1157, 954,
3899 -1157, -1157, -1157, -1157, 119, 943, 133, 1071, 1083, -1157,
3900 9726, -1157, 1001, 890, -1157, 1088, -1157, -1157, -1157, 1094,
3901 -1157, 36, 918, 1098, 14542, 1100, -1157, -1157, -1157, 347,
3902 -1157, 1125, 1108, 1109, -1157, -1157, -1157, -1157, -1157, 36,
3903 -1157, -1157, 1110, -1157, 1112, -1157, -1157, -1157, -1157, -1157,
3904 -1157, -1157, -1157, -1157, -1157, -1157, 36, 36, 36, 36,
3905 36, 36, 240, 15765, 11554, 15863, 1141, -1157, 1183, -1157,
3906 -1157, 11434, 11434, -1157, 1457, -1157, 8194, 1081, -1157, -1157,
3907 794, -1157, 1323, -1157, 1105, 14542, 1323, -1157, -1157, 1202,
3908 961, 1763, -1157, -1157, 14615, -1157, 105, -1157, 14615, 5051,
3909 500, -1157, -1157, -1157, -1157, -1157, -1157, 250, 258, 36,
3910 273, 307, -1157, -1157, 8650, -1157, -1157, -1157, 841, -1157,
3911 -1157, 133, -1157, -1157, 890, -1157, -1157, 1114, 1115, -1157,
3912 961, 1116, 1118, -1157, 15961, 1114, 1119, 36, 1119, -1157,
3913 -1157, 393, 196, 1457, -1157, -1157, -1157, 1763, -1157, 1763,
3914 -1157, 1323, -1157, 1763, -1157, 1124, 1126, -1157, 14615, -1157,
3915 -1157, -1157, -1157, -1157, 1114, 1114, 1132, 1114, -1157, -1157,
3916 1763, -1157, -1157, 1114, -1157
3917};
3918
3919/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3920 Performed when YYTABLE does not specify something else to do. Zero
3921 means the default is an error. */
3922static const yytype_int16 yydefact[] =
3923{
3924 2, 0, 0, 47, 405, 406, 407, 0, 398, 399,
3925 400, 403, 26, 26, 26, 392, 393, 394, 395, 417,
3926 418, 322, 696, 695, 697, 698, 64, 0, 64, 0,
3927 812, 700, 699, 701, 97, 99, 690, 689, 98, 691,
3928 685, 686, 687, 688, 634, 706, 707, 0, 0, 0,
3929 0, 0, 0, 0, 812, 812, 126, 489, 660, 660,
3930 662, 664, 0, 0, 0, 0, 0, 0, 0, 6,
3931 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3932 715, 715, 70, 91, 322, 90, 0, 112, 0, 116,
3933 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3934 397, 0, 350, 0, 0, 87, 87, 0, 0, 0,
3935 0, 0, 359, 322, 369, 94, 367, 339, 340, 633,
3936 635, 341, 342, 643, 343, 649, 345, 653, 344, 655,
3937 346, 632, 677, 678, 631, 683, 694, 702, 703, 347,
3938 0, 348, 7, 1, 205, 216, 206, 229, 202, 222,
3939 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3940 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3941 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3942 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3943 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3944 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3945 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3946 33, 158, 159, 161, 401, 402, 404, 0, 786, 0,
3947 0, 333, 789, 325, 660, 0, 715, 715, 316, 0,
3948 298, 299, 328, 317, 110, 321, 812, 329, 0, 702,
3949 703, 0, 348, 812, 782, 111, 812, 507, 0, 107,
3950 65, 64, 0, 0, 28, 812, 12, 0, 11, 27,
3951 295, 392, 393, 508, 0, 261, 0, 359, 362, 262,
3952 251, 252, 356, 24, 0, 0, 3, 21, 23, 64,
3953 114, 20, 352, 0, 64, 64, 300, 0, 0, 64,
3954 780, 64, 0, 0, 0, 715, 715, 124, 396, 0,
3955 132, 133, 140, 486, 680, 0, 679, 681, 0, 0,
3956 0, 640, 644, 656, 650, 658, 684, 74, 273, 274,
3957 809, 808, 5, 810, 0, 0, 0, 0, 0, 0,
3958 812, 0, 0, 746, 0, 714, 388, 746, 712, 0,
3959 390, 408, 512, 502, 100, 514, 366, 409, 514, 498,
3960 812, 130, 0, 122, 117, 812, 77, 0, 0, 0,
3961 0, 0, 291, 292, 0, 0, 0, 0, 249, 250,
3962 0, 0, 75, 0, 289, 290, 0, 0, 0, 0,
3963 0, 0, 0, 0, 0, 0, 799, 800, 802, 812,
3964 801, 0, 0, 86, 84, 85, 0, 0, 0, 0,
3965 0, 376, 3, 4, 0, 429, 428, 0, 0, 702,
3966 703, 348, 150, 151, 0, 0, 153, 812, 0, 702,
3967 703, 348, 386, 225, 218, 228, 213, 195, 196, 197,
3968 155, 156, 778, 81, 80, 777, 776, 0, 775, 109,
3969 64, 108, 802, 801, 0, 368, 636, 812, 812, 163,
3970 785, 356, 332, 788, 324, 0, 0, 0, 812, 0,
3971 0, 318, 327, 802, 812, 801, 812, 812, 0, 319,
3972 747, 64, 312, 812, 64, 812, 311, 323, 0, 64,
3973 365, 73, 30, 32, 31, 0, 812, 296, 0, 0,
3974 802, 801, 812, 0, 64, 354, 14, 0, 113, 0,
3975 357, 807, 806, 301, 807, 303, 358, 781, 0, 139,
3976 684, 127, 119, 714, 0, 802, 812, 801, 487, 666,
3977 682, 669, 667, 661, 637, 638, 663, 639, 665, 641,
3978 0, 0, 0, 0, 0, 811, 9, 0, 34, 35,
3979 36, 37, 297, 0, 71, 72, 753, 750, 749, 748,
3980 751, 759, 760, 747, 0, 766, 761, 770, 769, 765,
3981 812, 762, 719, 812, 725, 745, 728, 731, 64, 726,
3982 752, 754, 755, 757, 731, 718, 764, 442, 441, 768,
3983 731, 772, 724, 0, 0, 0, 0, 0, 486, 0,
3984 512, 101, 486, 0, 0, 0, 64, 0, 118, 131,
3985 0, 525, 259, 266, 268, 269, 270, 277, 278, 271,
3986 272, 247, 248, 275, 276, 525, 64, 263, 264, 265,
3987 254, 255, 256, 257, 258, 293, 294, 790, 792, 791,
3988 793, 322, 505, 64, 812, 790, 792, 791, 793, 322,
3989 506, 812, 0, 420, 0, 419, 0, 0, 0, 0,
3990 0, 374, 356, 802, 812, 801, 379, 384, 150, 151,
3991 152, 708, 382, 710, 802, 812, 801, 0, 0, 797,
3992 798, 82, 64, 361, 790, 791, 322, 0, 0, 0,
3993 812, 0, 0, 0, 0, 784, 330, 326, 331, 812,
3994 790, 791, 64, 790, 791, 0, 0, 783, 306, 313,
3995 308, 315, 803, 364, 29, 0, 279, 13, 355, 0,
3996 812, 0, 25, 115, 22, 353, 64, 0, 125, 794,
3997 138, 64, 790, 791, 488, 670, 0, 642, 0, 646,
3998 0, 652, 648, 0, 0, 654, 260, 0, 38, 0,
3999 440, 432, 434, 64, 437, 430, 0, 723, 774, 0,
4000 722, 0, 741, 713, 0, 0, 0, 738, 717, 591,
4001 763, 767, 0, 743, 771, 64, 59, 62, 286, 280,
4002 0, 716, 60, 281, 0, 487, 510, 0, 487, 415,
4003 416, 511, 497, 333, 92, 93, 41, 335, 0, 45,
4004 334, 129, 123, 0, 0, 69, 48, 67, 0, 304,
4005 328, 236, 42, 0, 348, 523, 523, 0, 812, 812,
4006 512, 504, 104, 0, 509, 313, 812, 812, 310, 503,
4007 102, 309, 812, 351, 812, 421, 812, 423, 88, 422,
4008 372, 373, 412, 0, 0, 525, 0, 0, 794, 355,
4009 64, 790, 791, 0, 0, 0, 0, 150, 151, 154,
4010 64, 0, 64, 0, 360, 499, 95, 50, 304, 238,
4011 57, 245, 164, 0, 787, 64, 320, 812, 812, 509,
4012 812, 812, 64, 812, 64, 56, 244, 302, 120, 509,
4013 26, 671, 668, 675, 676, 645, 647, 657, 651, 659,
4014 39, 64, 439, 0, 756, 0, 773, 720, 764, 812,
4015 730, 729, 731, 731, 444, 727, 731, 758, 731, 755,
4016 731, 0, 812, 812, 389, 391, 488, 96, 488, 338,
4017 0, 812, 121, 356, 812, 812, 812, 802, 812, 801,
4018 524, 524, 0, 0, 0, 0, 105, 804, 812, 0,
4019 0, 103, 410, 812, 18, 623, 414, 413, 0, 0,
4020 0, 424, 426, 0, 89, 0, 516, 0, 377, 523,
4021 0, 378, 509, 0, 0, 0, 0, 509, 387, 779,
4022 83, 500, 501, 0, 0, 0, 812, 0, 0, 307,
4023 314, 363, 746, 0, 431, 433, 435, 438, 721, 0,
4024 742, 0, 739, 0, 734, 0, 736, 744, 66, 288,
4025 0, 0, 26, 26, 333, 336, 0, 0, 0, 0,
4026 790, 791, 64, 790, 791, 0, 0, 285, 54, 242,
4027 55, 243, 106, 0, 52, 240, 53, 241, 624, 625,
4028 812, 626, 812, 15, 427, 0, 370, 371, 517, 0,
4029 0, 524, 375, 380, 0, 709, 383, 0, 746, 490,
4030 493, 0, 0, 0, 731, 731, 731, 731, 63, 287,
4031 812, 812, 337, 44, 68, 305, 509, 615, 621, 587,
4032 0, 0, 0, 524, 64, 524, 575, 660, 0, 614,
4033 78, 533, 539, 541, 543, 537, 536, 571, 538, 580,
4034 583, 586, 592, 593, 582, 546, 601, 594, 547, 602,
4035 603, 604, 605, 606, 607, 608, 609, 611, 610, 612,
4036 613, 590, 76, 51, 239, 0, 0, 628, 411, 0,
4037 19, 630, 0, 0, 0, 518, 812, 0, 0, 385,
4038 64, 0, 674, 673, 672, 436, 740, 735, 0, 732,
4039 737, 478, 0, 476, 475, 0, 599, 600, 151, 619,
4040 0, 563, 64, 564, 568, 64, 0, 558, 0, 812,
4041 561, 574, 0, 616, 0, 617, 0, 534, 0, 0,
4042 581, 585, 597, 598, 0, 524, 524, 0, 0, 589,
4043 0, 627, 0, 702, 703, 348, 0, 3, 16, 812,
4044 519, 521, 522, 520, 0, 530, 0, 480, 0, 495,
4045 0, 491, 731, 812, 447, 812, 453, 474, 456, 459,
4046 479, 64, 755, 459, 446, 459, 452, 513, 515, 64,
4047 556, 578, 566, 565, 557, 569, 805, 559, 588, 64,
4048 540, 535, 571, 542, 572, 576, 660, 584, 579, 595,
4049 596, 620, 545, 555, 544, 551, 64, 64, 64, 64,
4050 64, 64, 356, 802, 812, 801, 812, 629, 812, 425,
4051 526, 0, 0, 381, 0, 492, 0, 0, 733, 451,
4052 0, 450, 0, 470, 0, 0, 454, 465, 467, 0,
4053 445, 0, 472, 562, 0, 570, 0, 618, 0, 0,
4054 0, 548, 549, 550, 552, 553, 554, 794, 355, 64,
4055 790, 791, 622, 17, 0, 531, 532, 484, 64, 482,
4056 485, 0, 494, 448, 812, 458, 457, 459, 459, 477,
4057 455, 459, 459, 356, 802, 459, 567, 64, 572, 573,
4058 577, 509, 812, 0, 481, 496, 449, 0, 471, 0,
4059 468, 0, 462, 0, 464, 794, 355, 473, 0, 560,
4060 528, 529, 527, 483, 459, 459, 459, 459, 469, 463,
4061 0, 460, 466, 459, 461
4062};
4063
4064/* YYPGOTO[NTERM-NUM]. */
4065static const yytype_int16 yypgoto[] =
4066{
4067 -1157, -94, 1022, -1157, -1157, -1157, 957, -1157, 792, -12,
4068 -1157, -1157, -537, -1157, 165, 797, -1157, 5, -1157, -1157,
4069 15, -1157, -1157, -429, -1157, -1157, -546, 152, -564, -100,
4070 -1157, -1157, 436, 2755, -1157, 3121, -1157, 34, -1157, -1157,
4071 1194, -36, -1157, 696, -1157, -245, 1467, -10, 1195, -162,
4072 30, -425, -52, -1157, 0, 3606, -396, 1197, -48, 9,
4073 -1157, -1157, -5, -1157, -1157, 4536, -1157, -1157, -1157, -1157,
4074 -557, 1210, -1157, 280, 813, 67, -1157, 56, -1157, 551,
4075 21, 625, -373, -1157, 77, -1157, 41, -400, -236, 18,
4076 -394, -1157, -566, -35, -1157, -1157, -1157, -1157, -1157, -1157,
4077 -1157, -1157, -1157, -1157, -1157, -1157, 984, -1157, -1157, -1157,
4078 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
4079 -1157, -1157, 361, -1157, -256, 1929, 2367, -372, 343, 120,
4080 -798, -1157, -832, -807, 575, 424, -406, -1157, 107, 54,
4081 -1157, -1157, 180, -1157, -1156, 47, 87, -1157, 264, -1157,
4082 -1157, 118, -1157, 2, 286, 29, -66, -1157, -1157, 260,
4083 -1157, -1157, -1157, 482, -1157, -1157, -104, -1157, -515, -1157,
4084 985, -1157, -762, -1157, -735, -829, -529, -1157, 11, -1157,
4085 -1157, -897, -183, -1157, -1157, -1157, -1157, 164, -1157, -471,
4086 -1157, -922, -630, -1035, -388, -947, -805, -1157, 174, -1157,
4087 -1157, -857, 175, -1157, -1157, -652, 182, -1157, -1157, -1157,
4088 93, -1157, -1157, 92, 449, 589, -1157, 1243, 868, 906,
4089 26, -1157, 1198, -1157, 822, -1157, 1290, -1157, -1157, 1610,
4090 -1157, 1641, -1157, -1157, -58, -1157, -1157, -206, -1157, -1157,
4091 -1157, -1157, -1157, -1157, 16, -1157, -1157, -1157, -1157, -7,
4092 -49, 3405, -1, 1254, 3833, 2743, -1157, -1157, 89, 714,
4093 38, -1157, 609, -1157, -1157, -298, -703, 608, -435, -333,
4094 -229, -1141, -443, -323, -738, 215, -409, -680, -1157, -729,
4095 -1157, -589, -1157, -455, -541, -1157, -1157, -1157, -1157, -1157,
4096 32, -398, -336, -1157, -1157, -90, 1261, 597, -528, 52,
4097 -234, -24, -62, 14
4098};
4099
4100/* YYDEFGOTO[NTERM-NUM]. */
4101static const yytype_int16 yydefgoto[] =
4102{
4103 0, 332, 69, 1, 2, 70, 71, 267, 268, 651,
4104 1132, 1268, 652, 1042, 286, 287, 503, 224, 72, 495,
4105 288, 74, 75, 76, 77, 78, 776, 488, 806, 79,
4106 625, 611, 443, 236, 863, 237, 405, 406, 408, 964,
4107 409, 82, 795, 807, 83, 601, 274, 85, 86, 289,
4108 87, 521, 88, 89, 90, 239, 426, 427, 218, 219,
4109 220, 689, 640, 222, 92, 93, 94, 95, 96, 97,
4110 779, 394, 98, 552, 498, 553, 241, 242, 293, 811,
4111 828, 829, 481, 243, 482, 258, 259, 245, 471, 644,
4112 247, 799, 800, 99, 402, 509, 846, 660, 853, 1138,
4113 856, 854, 677, 594, 597, 100, 276, 102, 103, 104,
4114 105, 106, 107, 108, 109, 110, 111, 355, 358, 953,
4115 1129, 843, 958, 959, 791, 277, 278, 654, 838, 960,
4116 961, 418, 751, 752, 753, 754, 570, 764, 765, 1214,
4117 1215, 1216, 1325, 1287, 1218, 1219, 1283, 1220, 1152, 1153,
4118 1221, 1208, 1318, 1319, 528, 734, 890, 313, 1141, 114,
4119 1059, 1211, 1276, 359, 115, 116, 356, 598, 599, 602,
4120 603, 967, 844, 1203, 940, 1025, 815, 1314, 847, 1362,
4121 1204, 1090, 1231, 1092, 1093, 1187, 1188, 1094, 1296, 1162,
4122 1163, 1164, 1096, 1097, 1244, 1166, 1098, 1099, 1100, 1101,
4123 1102, 571, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111,
4124 954, 1040, 1126, 1130, 117, 118, 119, 120, 121, 122,
4125 322, 123, 124, 540, 738, 125, 126, 542, 127, 128,
4126 129, 130, 541, 543, 315, 319, 320, 533, 736, 735,
4127 891, 993, 1144, 892, 131, 132, 316, 133, 134, 135,
4128 136, 249, 250, 139, 251, 252, 855, 672, 344, 345,
4129 346, 347, 572, 573, 574, 910, 576, 577, 762, 578,
4130 579, 580, 581, 919, 583, 584, 585, 586, 587, 588,
4131 589, 590, 591, 592, 757, 446, 447, 448, 678, 298,
4132 485, 254, 719, 642, 681, 676, 401, 490, 824, 1170,
4133 513, 655, 413, 270
4134};
4135
4136/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4137 positive, shift that token. If negative, reduce the rule whose
4138 number is the opposite. If YYTABLE_NINF, syntax error. */
4139static const yytype_int16 yytable[] =
4140{
4141 138, 318, 221, 404, 404, 238, 238, 404, 334, 317,
4142 314, 400, 455, 411, 595, 142, 73, 479, 225, 226,
4143 582, 308, 221, 223, 582, 453, 643, 484, 917, 670,
4144 909, 327, 760, 246, 246, 656, 264, 364, 963, 783,
4145 285, 292, 257, 223, 812, 575, 333, 253, 253, 575,
4146 782, 138, 138, 221, 308, 311, 307, 780, 911, 326,
4147 784, 515, 641, 444, 649, 517, 291, 291, 296, 300,
4148 697, 995, 294, 308, 308, 308, 698, 335, 697, 908,
4149 707, 941, 290, 333, 970, 787, 295, 299, 311, 323,
4150 324, 325, 244, 255, 348, 348, 816, -135, 997, 728,
4151 1142, 702, 238, 1095, 1095, 353, 221, 420, 430, 430,
4152 430, 297, 1026, 536, 538, -146, 707, 698, 686, 350,
4153 1209, 755, 504, 867, 870, 354, 1326, -141, 1232, 1122,
4154 246, 367, 653, 1320, 1176, -142, 783, 641, 407, 649,
4155 861, 412, 1242, 789, 253, -704, 769, -149, 769, 767,
4156 878, -705, -141, 731, 451, 773, 1176, 885, 475, 477,
4157 351, 489, 491, 1079, 770, 720, 1189, -148, 1103, 1103,
4158 349, 260, 913, 143, 879, -64, 465, 918, 262, -141,
4159 265, 805, 802, 562, -147, -142, 501, -144, 1177, 449,
4160 260, 720, 506, -149, -696, 1326, -142, 391, 392, 393,
4161 606, 790, 1320, 889, 341, 342, -135, -791, 266, -147,
4162 -578, 957, 653, 566, 1210, 1095, 1233, 1246, 285, 527,
4163 1143, 845, 1137, -696, 507, -145, -135, -135, -143, 138,
4164 -135, 995, 1245, 837, 1051, 282, 404, 404, 404, 404,
4165 1205, 554, 555, -149, 291, -137, 238, -790, 238, 479,
4166 348, 348, 522, -148, 1160, 1145, 1169, -132, 805, 805,
4167 472, 917, 333, -146, 1339, -133, 138, 472, 351, 308,
4168 486, -147, 285, 330, 483, 350, 246, -140, 859, 331,
4169 1103, 142, 73, 138, 460, 352, -144, 462, 463, 464,
4170 253, 850, 805, -141, 257, 353, 520, -139, 291, -141,
4171 911, 906, 860, 311, 906, 945, 755, 902, 404, 697,
4172 269, 697, 740, 707, 290, 698, 969, -135, 661, 976,
4173 -145, 260, 972, 1103, 404, 466, 467, 665, 308, 720,
4174 1103, 1103, 977, 138, 739, 487, 739, -142, 1201, -138,
4175 720, -791, 321, -142, 350, 1121, 1121, 1245, 792, 73,
4176 285, 1245, 1340, 330, 1049, -136, 1252, 1254, -134, 331,
4177 330, 138, 311, 608, 1009, 741, 331, 957, 998, 842,
4178 548, 549, 550, 551, 1202, 1008, 291, 1184, 932, 1028,
4179 1030, 744, 1258, 1261, -149, 1034, 1036, 1039, 333, 238,
4180 -149, -355, 290, 352, -148, 648, 833, 658, 659, 256,
4181 -148, 138, 840, 841, -146, 357, -143, -790, 138, 138,
4182 -146, 1340, -147, 486, 1066, -791, 291, 668, -147, -355,
4183 -355, 669, 650, 291, 291, 697, 1009, -144, 1156, 1157,
4184 -136, 698, 1185, -144, 745, 360, 1186, 1054, 582, 1103,
4185 238, 673, 657, 582, 567, -396, 512, 512, 1176, 648,
4186 -704, 512, 361, 518, 1165, 372, 373, 1121, 667, 690,
4187 755, -145, 755, 876, 238, 330, -695, -145, 246, 1123,
4188 648, 331, 522, -396, -396, -355, 568, 1000, 1002, -791,
4189 882, 1004, 253, 1006, -141, 1007, 529, 365, 486, 308,
4190 221, 1337, 887, -148, 1076, -695, 648, 472, -113, 472,
4191 1121, 260, 699, 59, 714, -132, 138, 1121, 1121, 384,
4192 385, 223, 260, 457, 805, 805, 238, -64, 459, -129,
4193 805, 805, 648, 311, 924, 695, 696, 682, 925, -396,
4194 1249, 1250, 896, 461, 297, 747, 698, 896, 261, -136,
4195 486, 531, 532, 726, 1360, 497, 138, -143, 917, 468,
4196 668, 1324, 138, -143, 1158, 522, 1167, 1257, 1260, -136,
4197 -136, 291, 1225, -136, 880, 1022, 529, 696, 748, 794,
4198 297, 781, 308, 881, 794, 469, 458, 946, 862, -137,
4199 -705, 321, 470, 777, 758, 951, 777, 758, 968, 805,
4200 697, 971, 707, 138, -812, 1050, 138, 396, -144, 476,
4201 908, 641, 986, 649, 805, 978, 311, -145, 291, 917,
4202 -149, 291, 458, 478, -142, 884, 1121, 343, 1228, 755,
4203 755, 531, 532, 798, 1238, 397, 398, -697, 798, 1146,
4204 1147, 1149, 1150, 839, 1230, -133, -143, 1234, 341, 342,
4205 605, 768, 834, 502, 836, 610, -149, 876, 496, 826,
4206 -698, 794, 794, 138, 238, 138, -697, 1253, 472, 1060,
4207 648, 797, 821, 831, -134, 238, 810, -140, 291, 582,
4208 291, 648, 1279, 1133, 1281, 888, 138, -148, 486, -698,
4209 582, 399, 822, -144, 221, 794, 1159, 893, -137, 486,
4210 830, 291, 308, 1328, 575, 256, 1226, 1332, 872, -700,
4211 831, 396, 260, 511, 1046, 223, 1241, 1047, -137, -137,
4212 450, -790, -137, 472, 1052, 396, 1256, 1259, 827, 260,
4213 1056, 396, 261, 939, 948, 1140, 311, 866, -700, 397,
4214 473, 1304, 1305, 1306, 831, 582, -97, 687, 688, 1321,
4215 821, 883, 1224, 397, 500, 1213, 396, 874, 694, 397,
4216 525, 522, -145, 404, 1196, 404, 705, 706, -143, 367,
4217 575, 981, 1366, -702, 895, 696, 897, 297, 308, 898,
4218 899, 505, -703, -134, 397, 452, 497, 1278, 817, -692,
4219 510, 1341, 721, 1346, -348, 474, 502, -64, 1251, 260,
4220 396, -702, -702, -134, -134, 823, -112, -134, 1139, 474,
4221 -703, -703, 311, 516, -699, 526, 396, -692, -692, -356,
4222 529, 537, -348, -348, 926, 444, 396, 928, 397, 663,
4223 -148, 915, -701, 519, -692, 906, 343, 1226, 1222, 524,
4224 974, 1226, 1270, -699, 397, 674, 1226, -356, -356, 539,
4225 -693, -139, 1091, 1091, 397, 937, 955, -702, 962, 929,
4226 962, -701, 561, -692, 823, 138, -703, 883, 221, 404,
4227 1012, -97, 1013, -692, 529, 531, 532, -97, -348, -693,
4228 291, 1224, 562, 1224, 664, 826, 1213, 1224, 512, 544,
4229 1213, 696, 1224, 823, 785, 1213, 508, 973, 788, 975,
4230 675, 1309, 1226, -356, 1226, 992, 1226, 472, 1226, 966,
4231 938, 1161, 566, 567, 679, 827, 1336, 794, 794, -144,
4232 1338, 777, 547, 794, 794, 1226, 593, 534, 1181, 531,
4233 532, -711, 691, 758, 948, 596, 492, 921, 238, 720,
4234 -135, 832, 600, 680, 648, 568, 493, 494, 1224, -145,
4235 1224, 1213, 1224, 1213, 1224, 1213, 1044, 1213, 609, 839,
4236 1273, 1055, 486, 662, 1091, 529, 545, 138, -143, 1222,
4237 -136, 1224, 666, 1222, 1213, 260, 514, 1041, 956, 957,
4238 873, 798, 291, 138, 1182, 1183, 912, 1229, 671, -134,
4239 692, 1061, 794, 1271, 1272, 101, 1015, 920, 291, 1010,
4240 1011, -98, 138, 1045, 1161, 260, 1343, 794, 1016, 248,
4241 248, 1017, 823, 1019, 1161, 1161, 709, 291, 530, 1038,
4242 531, 532, 823, 396, 693, 138, 138, 1070, 1071, 523,
4243 523, 1048, 711, 712, 1120, 1120, 717, 983, 1222, 1172,
4244 396, 1073, 1074, -129, -693, 725, 101, 101, 1136, 1175,
4245 309, 397, 1263, 727, 367, 756, 297, 683, 759, 138,
4246 761, 248, -443, 766, 1127, 771, 1131, 772, 397, 1334,
4247 774, 786, -693, -693, 291, 1345, 36, 37, 803, 39,
4248 1072, 825, 835, 309, 404, 842, 45, 46, 708, 1120,
4249 1120, 710, 845, 1120, 1154, 1154, 713, 248, 248, 529,
4250 308, 248, 417, 428, 428, 903, 248, 1264, 943, 944,
4251 1120, 723, 1265, 1267, 900, 1135, 949, 950, 389, 390,
4252 391, 392, 393, 905, 675, 914, -98, 922, -693, 923,
4253 1198, 1199, -98, 927, 1194, -328, 1206, 930, 138, 931,
4254 933, 138, 138, 934, 935, 507, 1120, 138, 529, 947,
4255 1227, 942, 534, 291, 531, 532, 291, 291, 957, 952,
4256 962, 138, 291, 990, 138, 770, 999, 984, 985, 1120,
4257 987, 988, 1120, 1032, 1001, 1003, 291, 1125, 1005, 291,
4258 -332, 404, 404, 333, 823, 763, 1120, 1120, 1120, 529,
4259 1062, 1120, 1120, 1063, 1266, -330, 1120, 1120, 1300, 308,
4260 1200, 534, 1128, 531, 532, 138, 1238, 556, 1277, 557,
4261 558, 559, 560, 801, 1148, -794, 529, 1151, 1239, 138,
4262 291, 1171, 1236, 962, 101, 1018, 1064, 1178, 1065, 1179,
4263 1067, 1077, 1180, 430, 291, 1235, 1176, 758, 1033, 758,
4264 1262, 1274, 535, 1322, 531, 532, 823, 1168, 869, 871,
4265 248, 1275, 248, 1280, 1329, 248, 248, 749, -794, 1282,
4266 308, 101, 750, 1286, 238, 1291, 869, 871, 1333, 737,
4267 648, 531, 532, 1294, 1295, 1298, 1057, 1299, 101, 1347,
4268 1349, 1351, 886, 1353, 1358, 138, -794, -794, 486, 864,
4269 955, -790, 1131, -791, 430, 1089, 1089, 1370, 309, 499,
4270 291, 546, 1207, 1120, 1197, 722, 529, 1120, 1120, 980,
4271 410, 796, 1342, 415, 724, 1315, 1316, 432, 395, 715,
4272 1288, 865, 1292, 138, 823, 1043, 1053, 823, 101, 1269,
4273 248, 248, 248, 248, 901, 248, 248, 996, 291, 1285,
4274 -794, 1217, -794, 1331, 1323, 1155, -790, 823, 758, 1284,
4275 1089, 1089, 1243, 604, 1089, 1363, 101, 309, 982, 742,
4276 904, 531, 532, 1361, 1247, 1248, 962, 1120, 1240, 1312,
4277 1313, 1089, 456, 1212, 743, 445, 1223, 556, 907, 557,
4278 558, 559, 560, 1207, 916, 556, 454, 557, 558, 559,
4279 560, 561, 0, 248, 0, 1173, 101, 36, 37, 1359,
4280 39, 0, 248, 101, 101, 0, 0, 1089, 0, 0,
4281 556, 562, 557, 558, 559, 560, 0, 0, 248, 0,
4282 0, 823, 823, 823, 1348, 1350, 0, 749, 1352, 1354,
4283 1089, 0, 1357, 1089, 886, 564, 40, 41, 42, 43,
4284 565, 566, 567, 0, 248, 1174, 0, 1089, 1089, 1089,
4285 0, 0, 1089, 1089, 0, 0, 0, 1089, 1089, 1237,
4286 0, 1368, 1369, 1371, 1372, 0, 0, 0, 248, 979,
4287 1374, 823, 0, 0, 568, 0, 0, 569, 84, 0,
4288 1344, 0, 0, 0, 1112, 1112, 0, 0, 0, 989,
4289 0, 991, 84, 84, 336, 337, 338, 339, 340, 1168,
4290 0, 101, 0, 0, 1029, 1031, 0, 1327, 994, 0,
4291 1035, 1037, 0, 0, 0, 0, 1335, 0, 309, 1317,
4292 248, 557, 558, 559, 560, 0, 0, 0, 0, 84,
4293 84, 0, 0, 0, 0, 0, 0, 0, 0, 1112,
4294 1112, 101, 0, 1112, 84, 1029, 1031, 101, 1035, 1037,
4295 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4296 1112, 0, 0, 0, 1089, 0, 0, 0, 1089, 1089,
4297 0, 0, 0, 0, 1364, 0, 1365, 0, 1367, 0,
4298 84, 84, 0, 0, 84, 0, 0, 248, 101, 84,
4299 248, 101, 0, 0, 1124, 1373, 1112, 0, 0, 248,
4300 0, 309, 0, 0, 813, 556, 0, 557, 558, 559,
4301 560, 561, 0, 0, 0, 0, 0, 0, 1124, 1112,
4302 0, 0, 1112, 0, 1113, 1113, 0, 0, 1089, 0,
4303 0, 562, 0, 0, 0, 0, 1112, 1112, 1112, 0,
4304 0, 1112, 1112, 0, 0, 563, 1112, 1112, 101, 0,
4305 101, 0, 0, 0, 0, 564, 0, 0, 248, 0,
4306 565, 566, 567, 0, 0, 0, 0, 0, 0, 248,
4307 0, 101, 248, 0, 0, 0, 0, 0, 0, 1113,
4308 1113, 813, 813, 1113, 0, 0, 0, 0, 0, 0,
4309 0, 0, 0, 0, 568, 0, 0, 569, 0, 0,
4310 1113, 0, 0, 0, 0, 0, 0, 84, 0, 248,
4311 1058, 0, 0, 0, 556, 813, 557, 558, 559, 560,
4312 561, 309, 0, 556, 0, 557, 558, 559, 560, 561,
4313 0, 0, 0, 84, 367, 84, 1113, 0, 84, 84,
4314 562, 0, 0, 0, 84, 0, 0, 0, 0, 562,
4315 0, 380, 381, 1112, 563, 0, 0, 1112, 1112, 1113,
4316 0, 84, 1113, 563, 564, 0, 0, 0, 0, 565,
4317 566, 567, 0, 564, 0, 0, 1113, 1113, 1113, 566,
4318 567, 1113, 1113, 0, 0, 0, 1113, 1113, 0, 0,
4319 0, 367, 0, 1255, 0, 0, 0, 309, 389, 390,
4320 391, 392, 393, 568, 367, 0, 569, 0, 380, 381,
4321 0, 84, 568, 84, 84, 84, 84, 1112, 84, 84,
4322 0, 380, 381, 0, 0, 556, 0, 557, 558, 559,
4323 560, 561, 0, 0, 0, 0, 1293, 0, 0, 84,
4324 0, 0, 0, 0, 0, 0, 1297, 248, 0, 248,
4325 101, 562, 386, 387, 388, 389, 390, 391, 392, 393,
4326 0, 0, 0, 1301, 1302, 1303, 0, 388, 389, 390,
4327 391, 392, 393, 0, 0, 564, 84, 0, 0, 84,
4328 0, 566, 567, 0, 0, 84, 84, 84, 0, 0,
4329 0, 0, 0, 1113, 0, 0, 0, 1113, 1113, 0,
4330 0, 84, 0, 1114, 1114, 0, 0, 0, 0, 0,
4331 0, 0, 0, 0, 568, 248, 0, 0, 0, 0,
4332 0, 0, 0, 0, 0, 0, 0, 84, 0, 0,
4333 0, 0, 248, 0, 0, 0, 0, 813, 813, 0,
4334 112, 1115, 1115, 813, 813, 0, 0, 0, 0, 0,
4335 0, 84, 101, 248, 112, 112, 0, 1113, 1114, 1114,
4336 0, 0, 1114, 0, 0, 0, 0, 0, 101, 0,
4337 0, 0, 0, 0, 0, 0, 0, 0, 0, 1114,
4338 0, 0, 0, 0, 84, 0, 0, 101, 0, 0,
4339 0, 112, 112, 0, 0, 0, 1115, 1115, 0, 0,
4340 1115, 0, 0, 84, 0, 0, 112, 0, 0, 0,
4341 101, 101, 813, 0, 0, 1114, 0, 1115, 0, 0,
4342 0, 0, 0, 0, 84, 0, 0, 813, 0, 0,
4343 84, 0, 0, 0, 0, 0, 0, 0, 1114, 0,
4344 0, 1114, 112, 112, 101, 0, 112, 0, 0, 0,
4345 0, 112, 0, 1115, 0, 1114, 1114, 1114, 0, 0,
4346 1114, 1114, 0, 0, 0, 1114, 1114, 0, 0, 0,
4347 84, 84, 0, 84, 84, 0, 1115, 0, 0, 1115,
4348 0, 0, 84, 0, 0, 0, 0, 84, 0, 0,
4349 0, 0, 0, 1115, 1115, 1115, 0, 0, 1115, 1115,
4350 0, 0, 0, 1115, 1115, 0, 0, 0, 0, 0,
4351 0, 0, 0, 0, 0, 0, 0, 0, 0, 1192,
4352 0, 0, 0, 101, 0, 0, 101, 101, 0, 0,
4353 0, 84, 101, 84, 0, 0, 0, 0, 0, 0,
4354 0, 84, 0, 0, 0, 0, 101, 0, 0, 101,
4355 0, 0, 84, 0, 84, 84, 0, 0, 0, 0,
4356 0, 0, 0, 0, 84, 84, 0, 0, 248, 112,
4357 0, 0, 1114, 0, 0, 0, 1114, 1114, 0, 0,
4358 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4359 101, 0, 84, 0, 0, 112, 0, 112, 84, 0,
4360 112, 112, 0, 0, 101, 0, 112, 0, 0, 0,
4361 1115, 0, 0, 0, 1115, 1115, 0, 0, 1290, 0,
4362 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4363 0, 0, 0, 1116, 1116, 0, 1114, 0, 0, 0,
4364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4365 0, 0, 0, 0, 0, 0, 0, 0, 248, 0,
4366 0, 0, 0, 0, 0, 248, 248, 0, 0, 0,
4367 101, 0, 0, 112, 1115, 112, 112, 112, 112, 1330,
4368 112, 112, 0, 0, 0, 0, 0, 0, 1116, 1116,
4369 0, 0, 1116, 367, 368, 369, 370, 371, 372, 373,
4370 374, 112, 376, 377, 0, 0, 0, 0, 101, 1116,
4371 380, 381, 0, 0, 0, 0, 0, 0, 0, 0,
4372 0, 0, 0, 0, 0, 1117, 1117, 0, 0, 0,
4373 84, 0, 84, 84, 0, 0, 0, 0, 112, 0,
4374 0, 112, 0, 0, 0, 1116, 0, 112, 112, 112,
4375 0, 0, 384, 385, 386, 387, 388, 389, 390, 391,
4376 392, 393, 0, 112, 0, 0, 0, 0, 1116, 0,
4377 0, 1116, 0, 0, 0, 0, 0, 0, 113, 0,
4378 1117, 1117, 0, 0, 1117, 1116, 1116, 1116, 0, 112,
4379 1116, 1116, 113, 113, 0, 1116, 1116, 0, 84, 0,
4380 0, 1117, 0, 0, 0, 0, 0, 0, 0, 0,
4381 0, 0, 0, 112, 0, 84, 0, 0, 0, 0,
4382 84, 84, 0, 0, 0, 0, 84, 84, 0, 113,
4383 113, 0, 0, 0, 0, 84, 84, 1117, 0, 0,
4384 0, 0, 0, 0, 113, 0, 112, 0, 0, 0,
4385 0, 84, 0, 0, 0, 0, 0, 0, 366, 0,
4386 1117, 0, 0, 1117, 0, 112, 0, 0, 0, 0,
4387 84, 0, 0, 0, 0, 0, 0, 1117, 1117, 1117,
4388 113, 113, 1117, 1117, 113, 0, 112, 1117, 1117, 113,
4389 0, 0, 112, 84, 84, 84, 0, 0, 0, 0,
4390 0, 0, 1116, 0, 0, 0, 1116, 1116, 0, 0,
4391 84, 367, 368, 369, 370, 371, 372, 373, 374, 375,
4392 376, 377, 378, 379, 0, 0, 0, 84, 380, 381,
4393 0, 0, 112, 112, 382, 112, 112, 0, 0, 0,
4394 0, 0, 0, 0, 112, 0, 0, 0, 0, 112,
4395 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4396 0, 0, 0, 0, 0, 0, 1116, 0, 383, 0,
4397 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4399 0, 0, 0, 112, 1117, 112, 0, 0, 1117, 1117,
4400 0, 0, 0, 112, 0, 0, 84, 113, 0, 84,
4401 84, 0, 0, 0, 112, 84, 112, 112, 0, 0,
4402 0, 0, 0, 0, 0, 0, 112, 112, 0, 84,
4403 0, 0, 84, 113, 0, 113, 0, 0, 113, 113,
4404 0, 0, 0, 0, 113, 1118, 1118, 0, 0, 0,
4405 0, 84, 0, 0, 112, 0, 0, 0, 1117, 0,
4406 112, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4407 0, 0, 0, 84, 0, 0, 1119, 1119, 0, 0,
4408 0, 0, 0, 0, 0, 0, 0, 84, 0, 0,
4409 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4410 1118, 1118, 0, 0, 1118, 0, 0, 0, 0, 0,
4411 0, 113, 0, 113, 113, 113, 113, 0, 113, 113,
4412 0, 1118, 0, 0, 0, 0, 0, 0, 0, 0,
4413 0, 1119, 1119, 0, 0, 1119, 0, 0, 0, 113,
4414 0, 84, 0, 0, 0, 0, 0, 0, 84, 84,
4415 0, 0, 1119, 84, 141, 0, 0, 1118, 0, 0,
4416 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4417 0, 0, 0, 0, 0, 0, 113, 0, 0, 113,
4418 1118, 0, 0, 1118, 0, 113, 113, 113, 1119, 0,
4419 0, 84, 112, 0, 112, 112, 0, 1118, 1118, 1118,
4420 0, 113, 1118, 1118, 0, 141, 141, 1118, 1118, 312,
4421 0, 1119, 0, 0, 1119, 0, 0, 80, 80, 0,
4422 0, 305, 0, 0, 0, 0, 0, 113, 1119, 1119,
4423 1119, 0, 0, 1119, 1119, 0, 0, 0, 1119, 1119,
4424 0, 0, 312, 0, 0, 0, 0, 0, 0, 0,
4425 0, 113, 0, 0, 305, 0, 0, 0, 0, 0,
4426 112, 421, 431, 431, 0, 0, 0, 0, 0, 0,
4427 0, 0, 0, 305, 305, 305, 0, 112, 0, 0,
4428 0, 0, 112, 112, 113, 0, 0, 0, 112, 112,
4429 0, 0, 0, 0, 0, 0, 0, 112, 112, 0,
4430 0, 0, 0, 113, 0, 0, 0, 0, 0, 0,
4431 0, 0, 0, 112, 1118, 0, 0, 0, 1118, 1118,
4432 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4433 113, 0, 112, 0, 0, 0, 0, 0, 0, 0,
4434 0, 0, 0, 0, 0, 1119, 0, 0, 0, 1119,
4435 1119, 0, 0, 0, 0, 112, 112, 112, 0, 0,
4436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4437 113, 113, 112, 113, 113, 0, 0, 0, 1118, 0,
4438 0, 0, 113, 141, 0, 0, 0, 113, 0, 112,
4439 0, 0, 0, 0, 0, 80, 0, 0, 0, 0,
4440 0, 0, 0, 0, 0, 0, 0, 0, 0, 1119,
4441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4442 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4443 0, 113, 80, 113, 0, 0, 0, 141, 0, 0,
4444 0, 113, 0, 0, 0, 0, 0, 0, 0, 80,
4445 0, 0, 113, 0, 113, 113, 0, 312, 0, 0,
4446 0, 0, 0, 0, 113, 113, 0, 0, 112, 305,
4447 0, 112, 112, 0, 0, 0, 0, 112, 0, 367,
4448 -813, -813, -813, -813, 372, 373, 0, 141, -813, -813,
4449 0, 112, 113, 0, 112, 0, 380, 381, 113, 80,
4450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4451 0, 0, 0, 112, 0, 141, 312, 0, 0, 0,
4452 0, 0, 0, 0, 0, 0, 0, 80, 305, 0,
4453 0, 0, 81, 0, 0, 112, 0, 0, 384, 385,
4454 386, 387, 388, 389, 390, 391, 392, 393, 0, 112,
4455 0, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4456 0, 0, 141, 141, 0, 0, 0, 80, 0, 0,
4457 0, 0, 0, 0, 80, 80, 0, 0, 0, 0,
4458 0, 0, 0, 81, 81, 0, 0, 306, 0, 0,
4459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4460 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4461 112, 112, 0, 0, 0, 112, 0, 0, 0, 0,
4462 306, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4463 113, 0, 113, 113, 0, 0, 0, 0, 0, 306,
4464 306, 306, 0, 0, 0, 0, 0, 0, 0, 0,
4465 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4466 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4467 0, 0, 80, 0, 0, 0, 0, 312, 367, 368,
4468 369, 370, 371, 372, 373, 0, 0, 376, 377, 305,
4469 0, 0, 0, 0, 0, 380, 381, 0, 113, 0,
4470 141, 0, 0, 0, 0, 0, 141, 0, 0, 0,
4471 0, 0, 80, 0, 0, 113, 0, 0, 80, 0,
4472 113, 113, 0, 0, 0, 0, 113, 113, 0, 0,
4473 0, 0, 0, 0, 0, 113, 113, 384, 385, 386,
4474 387, 388, 389, 390, 391, 392, 393, 141, 0, 0,
4475 141, 113, 0, 0, 0, 0, 0, 0, 0, 80,
4476 312, 81, 80, 814, 0, 0, 0, 0, 0, 0,
4477 113, 0, 305, 0, 0, 80, 0, 0, 0, 0,
4478 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4479 0, 0, 0, 113, 113, 113, 0, 0, 81, 0,
4480 0, 0, 0, 0, 0, 0, 0, 141, 0, 141,
4481 113, 0, 0, 0, 0, 81, 137, 0, 0, 80,
4482 0, 80, 0, 0, 0, 0, 0, 113, 0, 0,
4483 141, 0, 0, 0, 0, 306, 0, 0, 0, 0,
4484 814, 814, 80, 0, 0, 0, 0, 0, 0, 0,
4485 0, 0, 80, 80, 0, 0, 0, 0, 0, 0,
4486 0, 0, 0, 0, 0, 81, 0, 137, 137, 0,
4487 0, 310, 0, 0, 814, 0, 0, 0, 0, 0,
4488 312, 0, 0, 0, 0, 0, 80, 0, 0, 894,
4489 0, 0, 305, 81, 306, 0, 0, 0, 0, 0,
4490 0, 0, 0, 0, 310, 0, 113, 0, 0, 113,
4491 113, 0, 0, 0, 0, 113, 0, 0, 0, 22,
4492 23, 24, 25, 419, 429, 429, 429, 0, 0, 113,
4493 0, 0, 113, 81, 0, 31, 32, 33, 1077, 0,
4494 81, 81, 1078, 0, 0, 40, 41, 42, 43, 44,
4495 0, 113, 0, 0, 0, 0, 312, 0, 0, 0,
4496 0, 0, 0, 0, 0, 0, 0, 0, 305, 0,
4497 0, 0, 0, 113, 0, 0, 0, 1080, 1081, 0,
4498 0, 0, 0, 0, 0, 1082, 0, 113, 1083, 0,
4499 1084, 1085, 0, 1086, 0, 0, 57, 58, 59, 60,
4500 61, 62, 63, 64, 65, 0, 0, 0, 0, 141,
4501 0, 0, 0, 0, 0, 0, 0, 91, 0, 0,
4502 0, 80, 0, 0, 0, 0, 1088, 0, 0, 0,
4503 0, 0, 0, 303, 0, 0, 0, 0, 81, 0,
4504 260, 113, 0, 0, 0, 137, 0, 0, 113, 113,
4505 0, 0, 0, 113, 0, 306, 0, 0, 0, 0,
4506 0, 0, 0, 0, 0, 0, 0, 0, 91, 91,
4507 0, 0, 0, 0, 0, 0, 0, 0, 81, 0,
4508 0, 0, 137, 0, 81, 0, 0, 0, 0, 0,
4509 0, 113, 0, 0, 0, 0, 814, 814, 0, 137,
4510 0, 0, 814, 814, 0, 0, 0, 0, 80, 80,
4511 0, 141, 0, 0, 80, 80, 0, 0, 0, 310,
4512 0, 0, 0, 80, 416, 81, 0, 141, 81, 0,
4513 0, 0, 0, 0, 0, 0, 0, 0, 306, 80,
4514 0, 81, 0, 0, 0, 0, 141, 0, 0, 137,
4515 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4516 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4517 141, 814, 0, 0, 0, 0, 0, 137, 310, 0,
4518 0, 80, 80, 80, 0, 81, 814, 81, 0, 0,
4519 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4520 0, 0, 0, 141, 0, 0, 0, 0, 81, 0,
4521 0, 0, 0, 0, 0, 80, 0, 137, 81, 81,
4522 0, 0, 0, 0, 137, 137, 0, 0, 0, 0,
4523 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4524 0, 0, 0, 0, 140, 0, 91, 0, 0, 0,
4525 0, 0, 81, 0, 0, 0, 0, 0, 306, 0,
4526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4527 0, 0, 0, 0, 0, 0, 0, 0, 1195, 0,
4528 0, 0, 141, 91, 0, 141, 141, 0, 0, 0,
4529 305, 141, 0, 0, 80, 140, 140, 80, 80, 0,
4530 91, 0, 0, 80, 0, 141, 0, 0, 141, 0,
4531 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4532 80, 0, 137, 0, 0, 0, 0, 0, 0, 0,
4533 0, 0, 0, 0, 306, 0, 0, 0, 0, 310,
4534 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4535 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4536 0, 80, 137, 141, 0, 0, 0, 0, 137, 0,
4537 0, 0, 0, 0, 0, 80, 0, 431, 91, 0,
4538 0, 0, 0, 0, 0, 0, 0, 81, 0, 305,
4539 0, 0, 0, 0, 0, 0, 367, 368, 369, 370,
4540 371, 372, 373, 374, 375, 376, 377, 378, 379, 137,
4541 0, 0, 137, 380, 381, 0, 0, 0, 91, 0,
4542 0, 0, 310, 0, 0, 91, 91, 0, 0, 141,
4543 0, 0, 0, 0, 0, 0, 0, 0, 431, 0,
4544 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4545 305, 0, 0, 383, 0, 384, 385, 386, 387, 388,
4546 389, 390, 391, 392, 393, 0, 0, 141, 0, 137,
4547 0, 137, 260, 140, 81, 81, 0, 0, 0, 80,
4548 81, 81, 0, 0, 0, 0, 0, 0, 0, 81,
4549 0, 0, 137, 0, 936, 0, 0, 0, 0, 0,
4550 0, 0, 0, 0, 0, 81, 0, 0, 0, 0,
4551 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4552 0, 0, 0, 91, 81, 0, 0, 140, 367, 368,
4553 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4554 379, 0, 310, 0, 0, 380, 381, 81, 81, 81,
4555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4556 0, 0, 0, 91, 81, 0, 0, 0, 0, 91,
4557 0, 0, 0, 0, 0, 0, 0, 140, 0, 0,
4558 0, 81, 0, 0, 0, 383, 0, 384, 385, 386,
4559 387, 388, 389, 390, 391, 392, 393, 0, 0, 0,
4560 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4561 91, 0, 0, 91, 0, 0, 0, 0, 310, 0,
4562 0, 0, 0, 0, 0, 0, 808, 0, 0, 0,
4563 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4564 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4565 0, 0, 140, 140, 0, 0, 306, 0, 0, 0,
4566 81, 0, 0, 81, 81, 0, 0, 0, 0, 81,
4567 91, 137, 91, 0, 0, 0, 0, 0, 0, 0,
4568 0, 0, 0, 81, 0, 0, 81, 0, 0, 0,
4569 0, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4570 0, 0, 0, 808, 808, 0, 0, 0, 0, 0,
4571 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4572 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
4573 0, 0, 0, 0, 0, 0, 0, 808, 0, 0,
4574 0, 81, 0, 0, -812, 0, 0, 0, 0, 0,
4575 140, 0, -812, -812, -812, 306, 0, -812, -812, -812,
4576 0, -812, 0, 0, 0, 0, 0, 0, 0, -812,
4577 -812, -812, 0, 137, 0, 0, 0, 0, 0, 0,
4578 0, -812, -812, 936, -812, -812, -812, -812, -812, 137,
4579 140, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4580 0, 0, 0, 0, 0, 0, 0, 81, 137, 0,
4581 0, 0, -812, -812, 0, 0, 306, 367, 368, 369,
4582 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4583 0, 137, 137, 0, 380, 381, 0, 140, 0, 0,
4584 140, -812, -812, 0, 0, 81, 0, 0, 0, 0,
4585 0, 0, 0, 140, 0, 0, 0, 0, 0, 0,
4586 0, 0, 0, 0, -812, 137, 0, 0, 0, 0,
4587 0, 0, 91, 0, 383, 0, 384, 385, 386, 387,
4588 388, 389, 390, 391, 392, 393, 0, 0, 0, 0,
4589 0, 0, 0, 0, -298, -812, -812, 140, -812, 140,
4590 0, 256, -812, 0, -812, 0, 0, 0, 0, 0,
4591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4592 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4593 140, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4594 1193, 0, 0, 0, 137, 0, 0, 137, 137, 0,
4595 0, 0, 0, 137, 0, 0, 0, 0, 0, 808,
4596 808, 240, 240, 0, 140, 808, 808, 137, 0, 0,
4597 137, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4598 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4599 91, 0, 0, 275, 279, 280, 281, 0, 0, 0,
4600 240, 240, 0, 0, 0, 0, 0, 0, 0, 91,
4601 0, 137, 0, 328, 329, 0, 0, 0, 0, 0,
4602 0, 0, 0, 0, 0, 137, 0, 0, 0, 0,
4603 0, 0, 91, 91, 808, 0, 0, 0, 0, 429,
4604 0, 0, 0, 0, 0, 0, 0, 0, 0, 808,
4605 0, 0, 0, 22, 23, 24, 25, 0, 240, 0,
4606 0, 0, 0, 0, 0, 0, 91, 0, 0, 31,
4607 32, 33, 1077, 0, 0, 0, 1078, 0, 1079, 40,
4608 41, 42, 43, 44, 0, 0, 0, 0, 0, 0,
4609 0, 137, 0, 0, 0, 0, 0, 0, 562, 140,
4610 429, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4611 0, 1080, 1081, 0, 0, 0, 0, 0, 0, 1082,
4612 0, 0, 1083, 0, 1084, 1085, 0, 1086, 566, 137,
4613 57, 58, 1087, 60, 61, 62, 63, 64, 65, 0,
4614 0, 1191, 0, 0, 0, 91, 0, 0, 91, 91,
4615 0, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4616 1088, 0, 0, 0, 0, 0, 0, 303, 91, 0,
4617 0, 91, 0, 0, 240, 0, 0, 240, 240, 240,
4618 0, 328, 0, 0, 0, 0, 140, 140, 0, 0,
4619 0, 0, 140, 140, 0, 0, 0, 0, 0, 0,
4620 0, 140, 240, 0, 240, 22, 23, 24, 25, 0,
4621 0, 0, 91, 0, 637, 638, 0, 140, 639, 0,
4622 0, 31, 32, 33, 0, 0, 91, 0, 0, 0,
4623 0, 40, 41, 42, 43, 44, 140, 0, 188, 189,
4624 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
4625 198, 0, 0, 0, 0, 199, 200, 201, 202, 140,
4626 140, 140, 0, 0, 0, 0, 0, 0, 0, 203,
4627 204, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4628 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4629 65, 0, 91, 140, 0, 0, 0, 0, 0, 205,
4630 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
4631 215, 216, 0, 612, 613, 614, 615, 616, 217, 303,
4632 617, 618, 619, 620, 621, 622, 623, 624, 0, 626,
4633 91, 0, 627, 628, 629, 630, 631, 632, 633, 634,
4634 635, 636, 0, 0, 0, 240, 367, 368, 369, 370,
4635 371, 372, 373, 374, 375, 376, 377, 378, 379, 0,
4636 0, 0, 0, 380, 381, 0, 0, 0, 0, 0,
4637 0, 0, 140, 0, 0, 140, 140, 0, 0, 0,
4638 0, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4639 0, 0, 0, 0, 0, 140, 240, 0, 140, 0,
4640 0, 0, 0, 383, 0, 384, 385, 386, 387, 388,
4641 389, 390, 391, 392, 393, 240, 240, 0, 0, 0,
4642 240, 0, 0, 0, 240, 0, 281, 0, 0, 0,
4643 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4644 0, 0, 0, 0, 716, 0, 0, 0, 0, 0,
4645 0, 0, 0, 140, 0, 0, 0, 240, 0, 0,
4646 240, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4647 0, 0, 240, 0, 0, 0, 0, 0, 0, 0,
4648 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4649 746, 0, 0, 0, 22, 23, 24, 25, 0, 0,
4650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4651 31, 32, 33, 1077, 0, 0, 0, 1078, 0, 140,
4652 40, 41, 42, 43, 44, 0, 0, 0, 0, 0,
4653 0, 240, 0, 0, 0, 0, 0, 0, 0, 778,
4654 0, 0, 778, 0, 0, 0, 0, 0, 0, 0,
4655 0, 240, 1080, 1081, 0, 0, 809, 140, 0, 0,
4656 1082, 0, 0, 1083, 0, 1084, 1085, 0, 1086, 0,
4657 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4658 0, 0, 0, 0, 0, 0, 0, 645, 646, 0,
4659 0, 647, 0, 0, 0, 0, 0, 0, 0, 0,
4660 0, 1088, 0, 0, 0, 0, 0, 0, 303, 0,
4661 240, 188, 189, 190, 191, 192, 193, 194, 195, 196,
4662 0, 240, 197, 198, 0, 0, 0, 0, 199, 200,
4663 201, 202, 0, 868, 868, 0, 0, 240, 778, 778,
4664 868, 0, 203, 204, 0, 0, 0, 0, 0, 0,
4665 0, 868, 868, 0, 0, 240, 0, 240, 0, 0,
4666 0, 0, 0, 0, 0, 0, 0, 868, 0, 0,
4667 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
4668 213, 214, 0, 215, 216, 0, 0, 0, 0, 0,
4669 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
4670 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4671 0, 240, 0, 0, 0, 0, 0, 0, 0, 0,
4672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4673 0, 0, 0, 0, 0, 0, 0, 0, 0, 240,
4674 0, 0, 0, 0, 0, -4, 3, 0, 4, 5,
4675 6, 7, 8, -4, -4, -4, 9, 10, 0, -4,
4676 -4, 11, -4, 12, 13, 14, 15, 16, 17, 18,
4677 -4, 240, 0, 0, 0, 19, 20, 21, 22, 23,
4678 24, 25, 0, 0, 26, 0, 0, 0, 0, 240,
4679 27, 28, 283, 30, 31, 32, 33, 34, 35, 36,
4680 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4681 46, 0, 0, -4, 0, 0, 0, 0, 0, 868,
4682 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4683 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
4684 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
4685 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4686 62, 63, 64, 65, 0, -4, 0, 778, 0, 0,
4687 0, 0, 0, 0, 0, 0, 240, 0, 0, 0,
4688 0, 0, 0, 0, 240, 0, 0, 0, 1027, 868,
4689 868, 0, 66, 67, 68, 868, 868, -4, 0, 240,
4690 0, 0, 0, -4, 0, 545, 0, 0, 0, 0,
4691 0, 240, 0, 0, 0, 0, 0, 0, 0, 0,
4692 0, 0, 0, 0, 0, 0, 0, 0, 0, 778,
4693 868, 868, 0, 868, 868, 0, 240, 0, 0, 0,
4694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4695 0, 0, 0, 0, 0, 0, 1068, 1069, 0, 0,
4696 240, 0, 0, 0, 868, 1075, 0, 0, 0, 0,
4697 0, 0, 0, 0, 0, 0, 0, 0, 0, 868,
4698 0, 0, 0, 0, 0, 0, -812, 3, 0, 4,
4699 5, 6, 7, 8, 0, 240, 0, 9, 10, 0,
4700 0, 0, 11, 868, 12, 13, 14, 15, 16, 17,
4701 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4702 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4703 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
4704 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4705 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
4706 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4707 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4708 240, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4709 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4710 61, 62, 63, 64, 65, 0, -812, 0, 0, 0,
4711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4713 0, 0, 0, 66, 67, 68, 0, 0, -812, 3,
4714 -812, 4, 5, 6, 7, 8, -812, 0, 0, 9,
4715 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4716 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4717 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4718 0, 0, 0, 27, 28, 29, 30, 31, 32, 33,
4719 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4720 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
4721 240, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4722 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4723 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4724 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4725 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
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, 66, 67, 68, 0, 0,
4729 -4, 3, -812, 4, 5, 6, 7, 8, -812, 0,
4730 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
4731 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
4732 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4733 0, 0, 0, 0, 0, 27, 28, 29, 30, 31,
4734 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
4735 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
4736 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
4737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4738 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4739 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
4740 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4741 0, 0, 0, 0, 0, 0, 0, 0, -794, 0,
4742 0, 0, 0, 0, 0, 0, -794, -794, -794, 0,
4743 0, -794, -794, -794, 0, -794, 0, 66, 67, 68,
4744 0, 0, -4, -794, -794, -794, -794, -794, 0, 0,
4745 545, 0, 0, 0, 0, -794, -794, 0, -794, -794,
4746 -794, -794, -794, 0, 0, 0, 367, 368, 369, 370,
4747 371, 372, 373, 374, 375, 376, 377, -813, -813, 0,
4748 0, 0, 0, 380, 381, 0, -794, -794, 0, 0,
4749 0, 0, 0, 0, 0, 0, -794, -794, -794, -794,
4750 -794, -794, -794, -794, -794, -794, -794, -794, -794, 0,
4751 0, 0, 0, -794, -794, -794, -794, 0, 877, -794,
4752 0, 0, 0, 0, -794, 384, 385, 386, 387, 388,
4753 389, 390, 391, 392, 393, 0, 0, 0, -794, 0,
4754 0, -794, 0, 0, 0, 0, 0, 0, 0, 0,
4755 0, 0, -146, -794, -794, -794, -794, -794, -794, -794,
4756 -794, -794, -794, -794, -794, 0, 0, 0, 0, -794,
4757 -794, -794, -794, -794, -692, 0, -794, -794, -794, 0,
4758 0, 0, -692, -692, -692, 0, 0, -692, -692, -692,
4759 0, -692, 0, 0, 0, 0, 0, 0, 0, -692,
4760 0, -692, -692, -692, 0, 0, 0, 0, 0, 0,
4761 0, -692, -692, 0, -692, -692, -692, -692, -692, 0,
4762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4764 0, 0, -692, -692, 0, 0, 0, 0, 0, 0,
4765 0, 0, -692, -692, -692, -692, -692, -692, -692, -692,
4766 -692, -692, -692, -692, -692, 0, 0, 0, 0, -692,
4767 -692, -692, -692, 0, -692, -692, 0, 0, 0, 0,
4768 -692, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4769 0, 0, 0, 0, -692, 0, 0, -692, 0, 0,
4770 0, 0, 0, 0, 0, 0, 0, 0, -692, -692,
4771 -692, -692, -692, -692, -692, -692, -692, -692, -692, -692,
4772 -692, 0, 0, 0, 0, 0, -692, -692, -692, -692,
4773 -693, 0, -692, -692, -692, 0, 0, 0, -693, -693,
4774 -693, 0, 0, -693, -693, -693, 0, -693, 0, 0,
4775 0, 0, 0, 0, 0, -693, 0, -693, -693, -693,
4776 0, 0, 0, 0, 0, 0, 0, -693, -693, 0,
4777 -693, -693, -693, -693, -693, 0, 0, 0, 0, 0,
4778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4779 0, 0, 0, 0, 0, 0, 0, 0, -693, -693,
4780 0, 0, 0, 0, 0, 0, 0, 0, -693, -693,
4781 -693, -693, -693, -693, -693, -693, -693, -693, -693, -693,
4782 -693, 0, 0, 0, 0, -693, -693, -693, -693, 0,
4783 -693, -693, 0, 0, 0, 0, -693, 0, 0, 0,
4784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4785 -693, 0, 0, -693, 0, 0, 0, 0, 0, 0,
4786 0, 0, 0, 0, -693, -693, -693, -693, -693, -693,
4787 -693, -693, -693, -693, -693, -693, -693, 0, 0, 0,
4788 0, 0, -693, -693, -693, -693, -795, 0, -693, -693,
4789 -693, 0, 0, 0, -795, -795, -795, 0, 0, -795,
4790 -795, -795, 0, -795, 0, 0, 0, 0, 0, 0,
4791 0, -795, -795, -795, -795, -795, 0, 0, 0, 0,
4792 0, 0, 0, -795, -795, 0, -795, -795, -795, -795,
4793 -795, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4794 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4795 0, 0, 0, 0, -795, -795, 0, 0, 0, 0,
4796 0, 0, 0, 0, -795, -795, -795, -795, -795, -795,
4797 -795, -795, -795, -795, -795, -795, -795, 0, 0, 0,
4798 0, -795, -795, -795, -795, 0, 0, -795, 0, 0,
4799 0, 0, -795, 0, 0, 0, 0, 0, 0, 0,
4800 0, 0, 0, 0, 0, 0, -795, 0, 0, -795,
4801 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4802 0, -795, -795, -795, -795, -795, -795, -795, -795, -795,
4803 -795, -795, -795, 0, 0, 0, 0, -795, -795, -795,
4804 -795, -795, -796, 0, -795, -795, -795, 0, 0, 0,
4805 -796, -796, -796, 0, 0, -796, -796, -796, 0, -796,
4806 0, 0, 0, 0, 0, 0, 0, -796, -796, -796,
4807 -796, -796, 0, 0, 0, 0, 0, 0, 0, -796,
4808 -796, 0, -796, -796, -796, -796, -796, 0, 0, 0,
4809 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4811 -796, -796, 0, 0, 0, 0, 0, 0, 0, 0,
4812 -796, -796, -796, -796, -796, -796, -796, -796, -796, -796,
4813 -796, -796, -796, 0, 0, 0, 0, -796, -796, -796,
4814 -796, 0, 0, -796, 0, 0, 0, 0, -796, 0,
4815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4816 0, 0, -796, 0, 0, -796, 0, 0, 0, 0,
4817 0, 0, 0, 0, 0, 0, 0, -796, -796, -796,
4818 -796, -796, -796, -796, -796, -796, -796, -796, -796, 0,
4819 0, 0, 0, -796, -796, -796, -796, -796, -508, 0,
4820 -796, -796, -796, 0, 0, 0, -508, -508, -508, 0,
4821 0, -508, -508, -508, 0, -508, 0, 0, 0, 0,
4822 0, 0, 0, -508, -508, -508, -508, 0, 0, 0,
4823 0, 0, 0, 0, 0, -508, -508, 0, -508, -508,
4824 -508, -508, -508, 0, 0, 0, 0, 0, 0, 0,
4825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4826 0, 0, 0, 0, 0, 0, -508, -508, 0, 0,
4827 0, 0, 0, 0, 0, 0, -508, -508, -508, -508,
4828 -508, -508, -508, -508, -508, -508, -508, -508, -508, 0,
4829 0, 0, 0, -508, -508, -508, -508, 0, 0, -508,
4830 0, 0, 0, 0, -508, 0, 0, 0, 0, 0,
4831 0, 0, 0, 0, 0, 0, 0, 0, -508, 0,
4832 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4833 0, 0, 0, -508, 0, -508, -508, -508, -508, -508,
4834 -508, -508, -508, -508, -508, 0, 0, 0, 0, -508,
4835 -508, -508, -508, -508, -349, 256, -508, -508, -508, 0,
4836 0, 0, -349, -349, -349, 0, 0, -349, -349, -349,
4837 0, -349, 0, 0, 0, 0, 0, 0, 0, -349,
4838 0, -349, -349, -349, 0, 0, 0, 0, 0, 0,
4839 0, -349, -349, 0, -349, -349, -349, -349, -349, 0,
4840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4842 0, 0, -349, -349, 0, 0, 0, 0, 0, 0,
4843 0, 0, -349, -349, -349, -349, -349, -349, -349, -349,
4844 -349, -349, -349, -349, -349, 0, 0, 0, 0, -349,
4845 -349, -349, -349, 0, 0, -349, 0, 0, 0, 0,
4846 -349, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4847 0, 0, 0, 0, -349, 0, 0, -349, 0, 0,
4848 0, 0, 0, 0, 0, 0, 0, 0, 0, -349,
4849 -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
4850 -349, 0, 0, 0, 0, 0, -349, -349, -349, -349,
4851 -812, 0, -349, -349, -349, 0, 0, 0, -812, -812,
4852 -812, 0, 0, -812, -812, -812, 0, -812, 0, 0,
4853 0, 0, 0, 0, 0, -812, -812, -812, -812, 0,
4854 0, 0, 0, 0, 0, 0, 0, -812, -812, 0,
4855 -812, -812, -812, -812, -812, 0, 0, 0, 0, 0,
4856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4857 0, 0, 0, 0, 0, 0, 0, 0, -812, -812,
4858 0, 0, 0, 0, 0, 0, 0, 0, -812, -812,
4859 -812, -812, -812, -812, -812, -812, -812, -812, -812, -812,
4860 -812, 0, 0, 0, 0, -812, -812, -812, -812, 0,
4861 0, -812, 0, 0, 0, 0, -812, 0, 0, 0,
4862 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4863 -812, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4864 0, 0, 0, 0, 0, -812, 0, -812, -812, -812,
4865 -812, -812, -812, -812, -812, -812, -812, 0, 0, 0,
4866 0, -812, -812, -812, -812, -812, -355, 256, -812, -812,
4867 -812, 0, 0, 0, -355, -355, -355, 0, 0, -355,
4868 -355, -355, 0, -355, 0, 0, 0, 0, 0, 0,
4869 0, -355, 0, -355, -355, 0, 0, 0, 0, 0,
4870 0, 0, 0, -355, -355, 0, -355, -355, -355, -355,
4871 -355, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4872 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4873 0, 0, 0, 0, -355, -355, 0, 0, 0, 0,
4874 0, 0, 0, 0, -355, -355, -355, -355, -355, -355,
4875 -355, -355, -355, -355, -355, -355, -355, 0, 0, 0,
4876 0, -355, -355, -355, -355, 0, 878, -355, 0, 0,
4877 0, 0, -355, 0, 0, 0, 0, 0, 0, 0,
4878 0, 0, 0, 0, 0, 0, -355, 0, 0, 0,
4879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4880 -147, -355, 0, -355, -355, -355, -355, -355, -355, -355,
4881 -355, -355, -355, 0, 0, 0, 0, 820, -355, -355,
4882 -355, -355, -362, 0, -355, -355, -355, 0, 0, 0,
4883 -362, -362, -362, 0, 0, -362, -362, -362, 0, -362,
4884 0, 0, 0, 0, 0, 0, 0, -362, 0, -362,
4885 -362, 0, 0, 0, 0, 0, 0, 0, 0, -362,
4886 -362, 0, -362, -362, -362, -362, -362, 0, 0, 0,
4887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4888 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4889 -362, -362, 0, 0, 0, 0, 0, 0, 0, 0,
4890 -362, -362, -362, -362, -362, -362, -362, -362, -362, -362,
4891 -362, -362, -362, 0, 0, 0, 0, -362, -362, -362,
4892 -362, 0, 0, -362, 0, 0, 0, 0, -362, 0,
4893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4894 0, 0, -362, 0, 0, 0, 0, 0, 0, 0,
4895 0, 0, 0, 0, 0, 0, 0, -362, 0, -362,
4896 -362, -362, -362, -362, -362, -362, -362, -362, -362, 0,
4897 0, 0, 0, 0, -362, -362, -362, -362, -794, 450,
4898 -362, -362, -362, 0, 0, 0, -794, -794, -794, 0,
4899 0, 0, -794, -794, 0, -794, 0, 0, 0, 0,
4900 0, 0, 0, -794, -794, 0, 0, 0, 0, 0,
4901 0, 0, 0, 0, 0, -794, -794, 0, -794, -794,
4902 -794, -794, -794, 0, 0, 0, 0, 0, 0, 0,
4903 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4904 0, 0, 0, 0, 0, 0, -794, -794, 0, 0,
4905 0, 0, 0, 0, 0, 0, -794, -794, -794, -794,
4906 -794, -794, -794, -794, -794, -794, -794, -794, -794, 0,
4907 0, 0, 0, -794, -794, -794, -794, 0, 818, -794,
4908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4909 0, 0, 0, 0, 0, 0, 0, 0, -794, 0,
4910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4911 0, 0, -146, -794, 0, -794, -794, -794, -794, -794,
4912 -794, -794, -794, -794, -794, 0, 0, 0, 0, -794,
4913 -794, -794, -794, -137, -794, 0, -794, 0, -794, 0,
4914 0, 0, -794, -794, -794, 0, 0, 0, -794, -794,
4915 0, -794, 0, 0, 0, 0, 0, 0, 0, -794,
4916 -794, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4917 0, -794, -794, 0, -794, -794, -794, -794, -794, 0,
4918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4920 0, 0, -794, -794, 0, 0, 0, 0, 0, 0,
4921 0, 0, -794, -794, -794, -794, -794, -794, -794, -794,
4922 -794, -794, -794, -794, -794, 0, 0, 0, 0, -794,
4923 -794, -794, -794, 0, 818, -794, 0, 0, 0, 0,
4924 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4925 0, 0, 0, 0, -794, 0, 0, 0, 0, 0,
4926 0, 0, 0, 0, 0, 0, 0, 0, -146, -794,
4927 0, -794, -794, -794, -794, -794, -794, -794, -794, -794,
4928 -794, 0, 0, 0, 0, -794, -794, -794, -794, -794,
4929 -355, 0, -794, 0, -794, 0, 0, 0, -355, -355,
4930 -355, 0, 0, 0, -355, -355, 0, -355, 0, 0,
4931 0, 0, 0, 0, 0, -355, 0, 0, 0, 0,
4932 0, 0, 0, 0, 0, 0, 0, -355, -355, 0,
4933 -355, -355, -355, -355, -355, 0, 0, 0, 0, 0,
4934 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4935 0, 0, 0, 0, 0, 0, 0, 0, -355, -355,
4936 0, 0, 0, 0, 0, 0, 0, 0, -355, -355,
4937 -355, -355, -355, -355, -355, -355, -355, -355, -355, -355,
4938 -355, 0, 0, 0, 0, -355, -355, -355, -355, 0,
4939 819, -355, 0, 0, 0, 0, 0, 0, 0, 0,
4940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4941 -355, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4942 0, 0, 0, 0, -147, -355, 0, -355, -355, -355,
4943 -355, -355, -355, -355, -355, -355, -355, 0, 0, 0,
4944 0, 820, -355, -355, -355, -138, -355, 0, -355, 0,
4945 -355, 0, 0, 0, -355, -355, -355, 0, 0, 0,
4946 -355, -355, 0, -355, 0, 0, 0, 0, 0, 0,
4947 0, -355, 0, 0, 0, 0, 0, 0, 0, 0,
4948 0, 0, 0, -355, -355, 0, -355, -355, -355, -355,
4949 -355, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4950 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4951 0, 0, 0, 0, -355, -355, 0, 0, 0, 0,
4952 0, 0, 0, 0, -355, -355, -355, -355, -355, -355,
4953 -355, -355, -355, -355, -355, -355, -355, 0, 0, 0,
4954 0, -355, -355, -355, -355, 0, 819, -355, 0, 0,
4955 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4956 0, 0, 0, 0, 0, 0, -355, 0, 0, 0,
4957 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4958 -147, -355, 0, -355, -355, -355, -355, -355, -355, -355,
4959 -355, -355, -355, 0, 0, 0, 0, 820, -355, -355,
4960 -355, -355, 0, 0, -355, 3, -355, 4, 5, 6,
4961 7, 8, -812, -812, -812, 9, 10, 0, 0, -812,
4962 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4963 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4964 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4965 28, 283, 30, 31, 32, 33, 34, 35, 36, 37,
4966 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4967 0, 0, -812, 0, 0, 0, 0, 0, 0, 0,
4968 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4969 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4970 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4971 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4972 63, 64, 65, 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, 0, 0, 0, 0,
4975 0, 66, 67, 68, 0, 0, 0, 3, -812, 4,
4976 5, 6, 7, 8, -812, 0, -812, 9, 10, 0,
4977 -812, -812, 11, 0, 12, 13, 14, 15, 16, 17,
4978 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4979 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4980 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
4981 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4982 45, 46, 0, 0, -812, 0, 0, 0, 0, 0,
4983 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4984 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4985 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4986 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4987 61, 62, 63, 64, 65, 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, 0, 0,
4990 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
4991 -812, 4, 5, 6, 7, 8, -812, 0, -812, 9,
4992 10, 0, 0, -812, 11, -812, 12, 13, 14, 15,
4993 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4994 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4995 0, 0, 0, 27, 28, 283, 30, 31, 32, 33,
4996 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4997 43, 44, 45, 46, 0, 0, -812, 0, 0, 0,
4998 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4999 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5000 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5001 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5002 59, 60, 61, 62, 63, 64, 65, 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 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5006 0, 3, -812, 4, 5, 6, 7, 8, -812, 0,
5007 -812, 9, 10, 0, 0, -812, 11, 0, 12, 13,
5008 14, 15, 16, 17, 18, -812, 0, 0, 0, 0,
5009 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5010 0, 0, 0, 0, 0, 27, 28, 283, 30, 31,
5011 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5012 41, 42, 43, 44, 45, 46, 0, 0, -812, 0,
5013 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5014 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5015 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5016 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5017 57, 58, 59, 60, 61, 62, 63, 64, 65, 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, 0, 0, 0, 0, 0, 66, 67, 68,
5021 0, 0, 0, 3, -812, 4, 5, 6, 7, 8,
5022 -812, 0, -812, 9, 10, 0, 0, -812, 11, 0,
5023 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5024 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5025 0, 26, 0, 0, 0, 0, 0, 27, 28, 283,
5026 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5027 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5028 -812, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5029 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5030 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5031 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5032 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5033 65, 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, 0, 0, 0, 0, 0, 66,
5036 67, 68, 0, 0, 0, 3, -812, 4, 5, 6,
5037 7, 8, -812, -812, -812, 9, 10, 0, 0, 0,
5038 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5039 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5040 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5041 28, 283, 30, 31, 32, 33, 34, 35, 36, 37,
5042 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5043 0, 0, -812, 0, 0, 0, 0, 0, 0, 0,
5044 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5045 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5046 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5047 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5048 63, 64, 65, 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, 0, 0, 0, 0,
5051 0, 66, 67, 68, 0, 0, 0, 3, -812, 4,
5052 5, 6, 7, 8, -812, 0, -812, 9, 10, 0,
5053 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5054 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5055 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5056 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
5057 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5058 45, 46, 0, 0, -812, 0, 0, 0, 0, 0,
5059 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5060 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5061 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5062 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5063 61, 62, 63, 64, 65, 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, 0, 0,
5066 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5067 -812, 4, 5, 6, 7, 8, -812, 0, 0, 9,
5068 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5069 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5070 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5071 0, 0, 0, 27, 28, 283, 30, 31, 32, 33,
5072 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5073 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5074 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5075 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5076 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5077 284, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5078 59, 60, 61, 62, 63, 64, 65, 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 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5082 0, 0, -812, 0, 0, 0, -812, 3, -812, 4,
5083 5, 6, 7, 8, 0, 0, 0, 9, 10, 0,
5084 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5085 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5086 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5087 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
5088 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5089 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5090 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5091 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5092 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5093 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5094 61, 62, 63, 64, 65, 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, 0, 0,
5097 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5098 -812, 0, 0, 0, -812, 3, -812, 4, 5, 6,
5099 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5100 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5101 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5102 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5103 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
5104 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5106 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5107 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5108 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5109 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5110 63, 64, 65, 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, 0, 0, 0, 0,
5113 0, 66, 67, 68, 0, 0, -812, 3, -812, 4,
5114 5, 6, 7, 8, -812, 0, 0, 9, 10, 0,
5115 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5116 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5117 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5118 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
5119 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5120 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5121 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5122 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5123 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5124 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5125 61, 62, 63, 64, 65, 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, 0, 0,
5128 0, 0, 0, 66, 67, 68, 0, 0, -812, 403,
5129 -812, 4, 5, 6, 0, 8, -812, 0, 0, 9,
5130 10, 0, 0, 0, 11, -3, 12, 13, 14, 15,
5131 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5132 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5133 0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5134 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5135 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5136 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5137 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5138 50, 0, 0, 0, 0, 0, 0, 229, 0, 0,
5139 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5140 59, 60, 61, 62, 63, 64, 65, 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 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5144 0, 0, 330, 0, 0, 0, 0, 0, 331, 144,
5145 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5146 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5147 165, 166, 167, 0, 0, 0, 168, 169, 170, 433,
5148 434, 435, 436, 175, 176, 177, 0, 0, 0, 0,
5149 0, 178, 179, 180, 181, 437, 438, 439, 440, 186,
5150 36, 37, 441, 39, 0, 0, 0, 0, 0, 0,
5151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5152 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5153 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5154 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5155 0, 0, 0, 203, 204, 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, 0, 0,
5158 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5159 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5160 0, 0, 217, 442, 144, 145, 146, 147, 148, 149,
5161 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5162 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5163 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
5164 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5165 182, 183, 184, 185, 186, 36, 37, 187, 39, 0,
5166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5167 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5168 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5169 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5170 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
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, 0, 0, 0, 0, 0, 205, 206,
5174 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5175 216, 0, 0, 0, 0, 0, 0, 217, 144, 145,
5176 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5177 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
5178 166, 167, 0, 0, 0, 168, 169, 170, 171, 172,
5179 173, 174, 175, 176, 177, 0, 0, 0, 0, 0,
5180 178, 179, 180, 181, 182, 183, 184, 185, 186, 263,
5181 0, 187, 0, 0, 0, 0, 0, 0, 0, 0,
5182 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5183 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5184 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5185 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5186 0, 0, 203, 204, 0, 0, 58, 0, 0, 0,
5187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5189 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5190 213, 214, 0, 215, 216, 0, 0, 0, 0, 0,
5191 0, 217, 144, 145, 146, 147, 148, 149, 150, 151,
5192 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
5193 162, 163, 164, 165, 166, 167, 0, 0, 0, 168,
5194 169, 170, 171, 172, 173, 174, 175, 176, 177, 0,
5195 0, 0, 0, 0, 178, 179, 180, 181, 182, 183,
5196 184, 185, 186, 0, 0, 187, 0, 0, 0, 0,
5197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5198 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5199 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5200 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5201 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5202 58, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5203 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5204 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5205 209, 210, 211, 212, 213, 214, 0, 215, 216, 0,
5206 0, 0, 0, 0, 0, 217, 144, 145, 146, 147,
5207 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5208 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5209 0, 0, 0, 168, 169, 170, 171, 172, 173, 174,
5210 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5211 180, 181, 182, 183, 184, 185, 186, 0, 0, 187,
5212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5213 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5214 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5215 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5217 203, 204, 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, 0, 0, 0, 0, 0,
5220 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5221 0, 215, 216, 4, 5, 6, 0, 8, 0, 217,
5222 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5223 14, 271, 272, 17, 18, 0, 0, 0, 0, 0,
5224 19, 20, 273, 22, 23, 24, 25, 0, 0, 227,
5225 0, 0, 0, 0, 0, 0, 301, 0, 0, 31,
5226 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5227 41, 42, 43, 44, 45, 46, 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, 0, 0, 0, 0, 0, 302,
5231 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5232 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5233 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5234 10, 0, 0, 0, 11, 0, 12, 13, 14, 271,
5235 272, 17, 18, 0, 0, 0, 0, 303, 19, 20,
5236 273, 22, 23, 24, 25, 304, 0, 227, 0, 0,
5237 0, 0, 0, 0, 301, 0, 0, 31, 32, 33,
5238 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5239 43, 44, 45, 46, 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, 0, 0, 0, 0, 0, 302, 0, 0,
5243 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5244 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5245 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5246 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5247 18, 0, 0, 0, 0, 303, 19, 20, 21, 22,
5248 23, 24, 25, 607, 0, 227, 0, 0, 0, 0,
5249 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5250 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5251 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5252 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5253 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5254 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5255 54, 55, 0, 231, 232, 233, 57, 58, 234, 60,
5256 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5258 0, 0, 0, 0, 0, 0, 0, 0, 4, 5,
5259 6, 0, 8, 66, 235, 68, 9, 10, 0, 0,
5260 260, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5261 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5262 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5263 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5264 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5265 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5266 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5267 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5268 0, 0, 0, 0, 229, 0, 0, 230, 53, 54,
5269 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5270 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5272 0, 0, 0, 0, 0, 3, 0, 4, 5, 6,
5273 7, 8, 66, 67, 68, 9, 10, 0, 0, 260,
5274 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5275 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5276 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5277 28, 0, 30, 31, 32, 33, 34, 35, 36, 37,
5278 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5279 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5280 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5281 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5282 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5283 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5284 63, 64, 65, 0, 0, 403, 0, 4, 5, 6,
5285 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5286 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5287 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5288 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
5289 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5290 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5292 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5293 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5294 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5295 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5296 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5297 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5298 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5299 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5300 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5301 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5302 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5303 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5304 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5305 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5306 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5307 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5308 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5309 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5310 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5311 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5312 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5313 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5314 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5315 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5316 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5317 0, 0, 0, 0, 0, 49, 480, 0, 0, 0,
5318 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5319 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5320 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5321 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5322 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5323 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5324 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5325 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5326 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5327 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5328 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5329 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5330 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5331 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5332 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5333 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5334 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5335 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5336 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5337 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5338 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5339 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5340 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5341 0, 0, 0, 0, 0, 49, 480, 0, 0, 0,
5342 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5343 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5344 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5345 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5346 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5347 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5348 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5349 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5350 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5351 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5352 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5353 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5354 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5355 0, 231, 232, 0, 57, 58, 234, 60, 61, 62,
5356 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5357 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5358 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5359 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5360 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5361 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5362 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5363 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5364 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5365 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5366 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5367 0, 0, 232, 233, 57, 58, 234, 60, 61, 62,
5368 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5369 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5370 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5371 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5372 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5373 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5374 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5375 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5376 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5377 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5378 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5379 0, 0, 232, 0, 57, 58, 234, 60, 61, 62,
5380 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5381 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5382 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5383 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5384 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5385 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5386 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5387 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5388 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5389 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5390 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5391 0, 793, 0, 0, 57, 58, 59, 60, 61, 62,
5392 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5393 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5394 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5395 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5396 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5397 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5398 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5400 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5401 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5402 0, 0, 0, 804, 0, 0, 230, 53, 54, 55,
5403 0, 793, 0, 0, 57, 58, 59, 60, 61, 62,
5404 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5405 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5406 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5407 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5408 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5409 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5410 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5411 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5412 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5413 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5414 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5415 0, 965, 0, 0, 57, 58, 59, 60, 61, 62,
5416 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5417 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5418 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5419 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5420 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5421 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5422 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5423 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5424 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5425 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5426 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5427 0, 1014, 0, 0, 57, 58, 59, 60, 61, 62,
5428 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5429 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5430 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5431 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5432 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5433 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5434 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5435 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5436 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5437 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5438 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5439 0, 793, 0, 0, 57, 58, 59, 60, 61, 62,
5440 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5441 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5442 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5443 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5444 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5445 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5446 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5447 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5448 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5449 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5450 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5451 0, 1134, 0, 0, 57, 58, 59, 60, 61, 62,
5452 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5453 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5454 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5455 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5456 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5457 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5458 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5460 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5461 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5462 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5463 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5464 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5465 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5466 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5467 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5468 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5469 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5470 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5472 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5473 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5474 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5475 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5476 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5477 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5478 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5479 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5480 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
5481 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5482 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5483 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5484 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5485 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5486 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5487 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5488 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5489 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5490 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5491 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5492 25, 0, 0, 775, 0, 0, 0, 0, 0, 0,
5493 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5494 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5495 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5496 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5497 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5498 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5499 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5500 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5501 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5502 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5503 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5504 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5505 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5506 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5508 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5509 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5510 0, 0, 0, 804, 0, 0, 230, 53, 54, 55,
5511 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5512 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5513 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5514 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5515 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5516 25, 0, 0, 875, 0, 0, 0, 0, 0, 0,
5517 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5518 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5520 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5521 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5522 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5523 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5524 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5525 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5526 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5527 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5528 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5529 301, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5530 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
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, 0, 0,
5534 0, 0, 0, 302, 0, 0, 362, 53, 54, 55,
5535 0, 363, 0, 0, 57, 58, 59, 60, 61, 62,
5536 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5537 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5538 12, 13, 14, 271, 272, 17, 18, 0, 0, 0,
5539 0, 303, 19, 20, 273, 22, 23, 24, 25, 0,
5540 0, 227, 0, 0, 0, 0, 0, 0, 301, 0,
5541 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5542 0, 40, 41, 42, 43, 44, 45, 46, 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, 0, 0, 0, 0,
5546 0, 414, 0, 0, 52, 53, 54, 55, 0, 56,
5547 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5548 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5549 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5550 14, 271, 272, 17, 18, 0, 0, 0, 0, 303,
5551 19, 20, 273, 22, 23, 24, 25, 0, 0, 227,
5552 0, 0, 0, 0, 0, 0, 301, 0, 0, 31,
5553 32, 33, 422, 35, 36, 37, 423, 39, 0, 40,
5554 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5557 0, 0, 0, 0, 0, 424, 0, 0, 0, 425,
5558 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5559 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5560 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5561 10, 0, 0, 0, 11, 0, 12, 13, 14, 271,
5562 272, 17, 18, 0, 0, 0, 0, 303, 19, 20,
5563 273, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5564 0, 0, 0, 0, 301, 0, 0, 31, 32, 33,
5565 422, 35, 36, 37, 423, 39, 0, 40, 41, 42,
5566 43, 44, 45, 46, 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, 0, 0, 0, 0, 0, 425, 0, 0,
5570 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5571 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5572 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5573 0, 0, 11, 0, 12, 13, 14, 271, 272, 17,
5574 18, 0, 0, 0, 0, 303, 19, 20, 273, 22,
5575 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5576 0, 0, 301, 0, 0, 31, 32, 33, 34, 35,
5577 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5578 45, 46, 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 0, 0, 0, 0, 0, 302, 0, 0, 362, 53,
5582 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5583 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5584 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5585 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5586 0, 0, 0, 303, 19, 20, 273, 22, 23, 24,
5587 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5588 301, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5589 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
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, 0, 0,
5593 0, 0, 0, 1190, 0, 0, 230, 53, 54, 55,
5594 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5595 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5596 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5597 12, 13, 14, 271, 272, 17, 18, 0, 0, 0,
5598 0, 303, 19, 20, 273, 22, 23, 24, 25, 0,
5599 0, 227, 0, 0, 0, 0, 0, 0, 301, 0,
5600 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5601 0, 40, 41, 42, 43, 44, 45, 46, 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, 0, 0, 0, 0,
5605 0, 1289, 0, 0, 230, 53, 54, 55, 22, 23,
5606 24, 25, 57, 58, 59, 60, 61, 62, 63, 64,
5607 65, 0, 0, 0, 31, 32, 33, 1077, 0, 0,
5608 0, 1078, 0, 0, 40, 41, 42, 43, 44, 0,
5609 0, 0, 0, 0, 0, 0, 0, 0, 0, 303,
5610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5611 0, 0, 0, 0, 0, 0, 1080, 1081, 0, 0,
5612 0, 0, 0, 0, 1082, 0, 0, 1083, 0, 1084,
5613 1085, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5614 62, 63, 64, 65, 0, 0, 0, 0, 0, 684,
5615 646, 0, 0, 685, 0, 0, 0, 0, 0, 0,
5616 0, 0, 0, 0, 0, 1088, 0, 0, 0, 0,
5617 0, 0, 303, 188, 189, 190, 191, 192, 193, 194,
5618 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5619 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5620 0, 0, 0, 0, 203, 204, 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, 0,
5623 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5624 211, 212, 213, 214, 0, 215, 216, 700, 638, 0,
5625 0, 701, 0, 217, 0, 0, 0, 0, 0, 0,
5626 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5627 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5628 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5629 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5630 0, 0, 203, 204, 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, 0, 0, 0,
5633 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5634 213, 214, 0, 215, 216, 703, 646, 0, 0, 704,
5635 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5636 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5637 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5638 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5640 203, 204, 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, 0, 0, 0, 0, 0,
5643 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5644 0, 215, 216, 700, 638, 0, 0, 718, 0, 217,
5645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5646 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5647 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5648 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5649 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
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, 0, 0, 0, 0, 0, 205, 206,
5653 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5654 216, 729, 638, 0, 0, 730, 0, 217, 0, 0,
5655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5656 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5657 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5658 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5659 0, 0, 0, 0, 0, 0, 203, 204, 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, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5663 209, 210, 211, 212, 213, 214, 0, 215, 216, 732,
5664 646, 0, 0, 733, 0, 217, 0, 0, 0, 0,
5665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5666 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5667 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5668 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5669 0, 0, 0, 0, 203, 204, 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, 0,
5672 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5673 211, 212, 213, 214, 0, 215, 216, 848, 638, 0,
5674 0, 849, 0, 217, 0, 0, 0, 0, 0, 0,
5675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5676 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5677 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5678 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5679 0, 0, 203, 204, 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, 0, 0, 0,
5682 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5683 213, 214, 0, 215, 216, 851, 646, 0, 0, 852,
5684 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5685 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5686 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5687 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5688 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5689 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5693 0, 215, 216, 857, 638, 0, 0, 858, 0, 217,
5694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5695 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5696 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5697 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5698 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
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, 0, 0, 0, 0, 0, 205, 206,
5702 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5703 216, 1020, 638, 0, 0, 1021, 0, 217, 0, 0,
5704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5705 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5706 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5707 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5708 0, 0, 0, 0, 0, 0, 203, 204, 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, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5712 209, 210, 211, 212, 213, 214, 0, 215, 216, 1023,
5713 646, 0, 0, 1024, 0, 217, 0, 0, 0, 0,
5714 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5715 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5716 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5717 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5718 0, 0, 0, 0, 203, 204, 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, 0,
5721 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5722 211, 212, 213, 214, 0, 215, 216, 1307, 638, 0,
5723 0, 1308, 0, 217, 0, 0, 0, 0, 0, 0,
5724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5725 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5726 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5727 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5728 0, 0, 203, 204, 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, 0, 0, 0,
5731 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5732 213, 214, 0, 215, 216, 1310, 646, 0, 0, 1311,
5733 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5734 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5735 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5736 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5738 203, 204, 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, 0, 0, 0, 0, 0,
5741 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5742 0, 215, 216, 1355, 638, 0, 0, 1356, 0, 217,
5743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5744 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5745 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5746 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5747 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
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, 0, 0, 0, 0, 0, 205, 206,
5751 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5752 216, 0, 0, 0, 0, 0, 0, 217
5753};
5754
5755static const yytype_int16 yycheck[] =
5756{
5757 1, 59, 7, 103, 104, 15, 16, 107, 70, 58,
5758 58, 101, 116, 107, 347, 1, 1, 253, 13, 14,
5759 343, 56, 27, 7, 347, 115, 399, 256, 766, 425,
5760 759, 67, 573, 15, 16, 407, 27, 89, 836, 596,
5761 52, 53, 21, 27, 610, 343, 70, 15, 16, 347,
5762 596, 52, 53, 58, 89, 56, 56, 594, 761, 66,
5763 597, 295, 398, 111, 400, 299, 52, 53, 54, 55,
5764 470, 903, 54, 108, 109, 110, 470, 72, 478, 759,
5765 478, 816, 52, 107, 846, 600, 54, 55, 89, 63,
5766 64, 65, 15, 16, 80, 81, 625, 25, 905, 524,
5767 0, 474, 112, 1025, 1026, 84, 111, 108, 109, 110,
5768 111, 55, 941, 319, 320, 25, 514, 511, 454, 81,
5769 29, 564, 284, 687, 688, 84, 1282, 25, 1163, 1026,
5770 112, 78, 13, 1274, 101, 25, 693, 473, 104, 475,
5771 677, 107, 1177, 10, 112, 100, 34, 25, 34, 584,
5772 100, 100, 13, 526, 113, 590, 101, 721, 248, 100,
5773 26, 261, 262, 58, 52, 501, 52, 25, 1025, 1026,
5774 81, 154, 761, 0, 702, 158, 234, 766, 26, 134,
5775 28, 610, 607, 78, 134, 134, 276, 25, 155, 112,
5776 154, 527, 286, 134, 69, 1351, 13, 144, 145, 146,
5777 362, 68, 1343, 731, 37, 38, 134, 157, 151, 25,
5778 155, 15, 13, 108, 123, 1137, 1163, 112, 230, 309,
5779 120, 25, 1051, 98, 286, 25, 154, 155, 25, 230,
5780 158, 1063, 1179, 27, 969, 56, 336, 337, 338, 339,
5781 1137, 341, 342, 13, 230, 155, 256, 157, 258, 485,
5782 236, 237, 304, 13, 1083, 1062, 1085, 155, 687, 688,
5783 246, 999, 286, 13, 1299, 155, 267, 253, 26, 304,
5784 256, 13, 284, 154, 256, 237, 258, 155, 674, 160,
5785 1137, 267, 267, 284, 228, 151, 13, 231, 232, 233,
5786 258, 664, 721, 154, 273, 274, 303, 155, 284, 160,
5787 1003, 756, 675, 304, 759, 820, 749, 750, 408, 709,
5788 30, 711, 66, 711, 284, 709, 845, 155, 412, 856,
5789 13, 154, 850, 1180, 424, 236, 237, 417, 363, 665,
5790 1187, 1188, 860, 334, 540, 258, 542, 154, 1136, 155,
5791 676, 157, 161, 160, 306, 1025, 1026, 1294, 604, 334,
5792 362, 1298, 1299, 154, 155, 155, 1185, 1186, 155, 160,
5793 154, 362, 363, 363, 921, 119, 160, 15, 909, 17,
5794 336, 337, 338, 339, 1136, 921, 362, 98, 803, 943,
5795 944, 66, 1187, 1188, 154, 949, 950, 953, 412, 399,
5796 160, 69, 362, 151, 154, 400, 652, 409, 410, 157,
5797 160, 402, 658, 659, 154, 28, 13, 157, 409, 410,
5798 160, 1358, 154, 399, 1003, 157, 402, 52, 160, 97,
5799 98, 56, 401, 409, 410, 825, 983, 154, 1080, 1081,
5800 25, 825, 153, 160, 119, 134, 157, 974, 761, 1296,
5801 450, 427, 408, 766, 109, 69, 294, 295, 101, 454,
5802 100, 299, 155, 301, 1084, 83, 84, 1137, 424, 100,
5803 903, 154, 905, 699, 474, 154, 69, 160, 450, 1033,
5804 475, 160, 524, 97, 98, 153, 141, 912, 913, 157,
5805 709, 916, 450, 918, 134, 920, 66, 134, 474, 524,
5806 495, 1296, 726, 134, 1022, 98, 501, 483, 134, 485,
5807 1180, 154, 470, 112, 495, 155, 507, 1187, 1188, 137,
5808 138, 495, 154, 100, 943, 944, 526, 159, 155, 155,
5809 949, 950, 527, 524, 780, 469, 470, 450, 784, 153,
5810 1182, 1183, 738, 56, 478, 547, 930, 743, 157, 134,
5811 526, 121, 122, 511, 1342, 265, 547, 154, 1286, 134,
5812 52, 1280, 553, 160, 56, 607, 1084, 1187, 1188, 154,
5813 155, 547, 1151, 158, 100, 938, 66, 511, 553, 605,
5814 514, 595, 607, 100, 610, 101, 100, 822, 678, 25,
5815 100, 161, 155, 593, 570, 830, 596, 573, 844, 1018,
5816 990, 847, 990, 594, 134, 967, 597, 69, 134, 100,
5817 1280, 937, 100, 939, 1033, 861, 607, 134, 594, 1347,
5818 134, 597, 100, 155, 134, 715, 1296, 157, 1155, 1062,
5819 1063, 121, 122, 605, 124, 97, 98, 69, 610, 1064,
5820 1065, 1066, 1067, 657, 1162, 155, 134, 1165, 37, 38,
5821 360, 585, 654, 100, 656, 365, 134, 883, 157, 100,
5822 69, 687, 688, 654, 664, 656, 98, 1185, 644, 992,
5823 665, 605, 641, 649, 25, 675, 610, 155, 654, 992,
5824 656, 676, 1213, 1045, 1215, 727, 677, 134, 664, 98,
5825 1003, 153, 641, 134, 689, 721, 1082, 736, 134, 675,
5826 649, 677, 727, 1282, 992, 157, 1151, 1286, 689, 69,
5827 686, 69, 154, 155, 960, 689, 1177, 963, 154, 155,
5828 157, 157, 158, 699, 970, 69, 1187, 1188, 100, 154,
5829 976, 69, 157, 813, 100, 1058, 727, 686, 98, 97,
5830 98, 1259, 1260, 1261, 720, 1058, 26, 457, 458, 1276,
5831 719, 709, 1151, 97, 98, 1151, 69, 691, 468, 97,
5832 98, 803, 134, 853, 1126, 855, 476, 477, 134, 78,
5833 1058, 865, 1351, 69, 738, 709, 740, 711, 803, 743,
5834 744, 158, 69, 134, 97, 98, 496, 1212, 626, 69,
5835 159, 1309, 502, 1324, 69, 153, 100, 152, 1184, 154,
5836 69, 97, 98, 154, 155, 643, 134, 158, 1054, 153,
5837 97, 98, 803, 152, 69, 153, 69, 97, 98, 69,
5838 66, 67, 97, 98, 785, 863, 69, 788, 97, 98,
5839 134, 765, 69, 56, 69, 1280, 157, 1282, 1151, 155,
5840 854, 1286, 1204, 98, 97, 98, 1291, 97, 98, 161,
5841 69, 155, 1025, 1026, 97, 98, 832, 153, 834, 793,
5842 836, 98, 58, 98, 702, 856, 153, 825, 863, 959,
5843 926, 151, 928, 153, 66, 121, 122, 157, 153, 98,
5844 856, 1280, 78, 1282, 153, 100, 1282, 1286, 726, 78,
5845 1286, 825, 1291, 731, 598, 1291, 289, 853, 602, 855,
5846 153, 1264, 1347, 153, 1349, 890, 1351, 883, 1353, 843,
5847 153, 1084, 108, 109, 69, 100, 1294, 943, 944, 134,
5848 1298, 921, 151, 949, 950, 1370, 134, 119, 1101, 121,
5849 122, 134, 124, 909, 100, 134, 54, 775, 938, 1265,
5850 155, 651, 106, 98, 939, 141, 64, 65, 1347, 134,
5851 1349, 1347, 1351, 1349, 1353, 1351, 958, 1353, 155, 973,
5852 1206, 975, 938, 56, 1137, 66, 160, 958, 134, 1282,
5853 155, 1370, 25, 1286, 1370, 154, 155, 953, 14, 15,
5854 690, 953, 958, 974, 89, 90, 761, 1160, 138, 155,
5855 134, 993, 1018, 40, 41, 1, 930, 772, 974, 922,
5856 923, 26, 993, 959, 1177, 154, 155, 1033, 931, 15,
5857 16, 934, 850, 936, 1187, 1188, 155, 993, 119, 953,
5858 121, 122, 860, 69, 134, 1016, 1017, 1012, 1013, 305,
5859 306, 965, 155, 158, 1025, 1026, 152, 875, 1351, 1087,
5860 69, 1016, 1017, 155, 69, 158, 52, 53, 1050, 1088,
5861 56, 97, 98, 155, 78, 155, 990, 450, 155, 1050,
5862 155, 67, 134, 155, 1040, 52, 1042, 155, 97, 98,
5863 52, 152, 97, 98, 1050, 1321, 54, 55, 155, 57,
5864 1014, 155, 13, 89, 1174, 17, 64, 65, 481, 1080,
5865 1081, 484, 25, 1084, 1070, 1071, 489, 103, 104, 66,
5866 1125, 107, 108, 109, 110, 155, 112, 153, 818, 819,
5867 1101, 504, 1192, 1197, 152, 1049, 826, 827, 142, 143,
5868 144, 145, 146, 155, 153, 134, 151, 44, 153, 44,
5869 1132, 1133, 157, 152, 1125, 155, 1138, 155, 1129, 44,
5870 56, 1132, 1133, 44, 134, 1197, 1137, 1138, 66, 159,
5871 1152, 136, 119, 1129, 121, 122, 1132, 1133, 15, 8,
5872 1136, 1152, 1138, 155, 1155, 52, 155, 877, 878, 1160,
5873 880, 881, 1163, 152, 155, 155, 1152, 101, 155, 1155,
5874 155, 1271, 1272, 1197, 1022, 578, 1177, 1178, 1179, 66,
5875 155, 1182, 1183, 155, 1196, 155, 1187, 1188, 1246, 1224,
5876 1134, 119, 9, 121, 122, 1196, 124, 52, 1210, 54,
5877 55, 56, 57, 606, 155, 26, 66, 139, 1174, 1210,
5878 1196, 52, 152, 1199, 230, 935, 1001, 139, 1003, 155,
5879 1005, 52, 155, 1224, 1210, 155, 101, 1213, 948, 1215,
5880 56, 160, 119, 152, 121, 122, 1084, 1085, 687, 688,
5881 256, 158, 258, 155, 139, 261, 262, 102, 69, 155,
5882 1285, 267, 107, 155, 1264, 155, 705, 706, 56, 119,
5883 1265, 121, 122, 155, 155, 155, 986, 155, 284, 155,
5884 155, 155, 721, 155, 155, 1276, 97, 98, 1264, 682,
5885 1266, 157, 1268, 157, 1285, 1025, 1026, 155, 304, 267,
5886 1276, 334, 1140, 1294, 1129, 503, 66, 1298, 1299, 863,
5887 106, 605, 1314, 108, 507, 1271, 1272, 110, 98, 496,
5888 1223, 686, 1225, 1314, 1162, 954, 973, 1165, 334, 1199,
5889 336, 337, 338, 339, 749, 341, 342, 903, 1314, 1222,
5890 151, 1151, 153, 1286, 1280, 1071, 157, 1185, 1324, 1221,
5891 1080, 1081, 1178, 358, 1084, 1343, 362, 363, 866, 119,
5892 753, 121, 122, 1342, 1180, 1180, 1342, 1358, 1176, 1266,
5893 1268, 1101, 119, 1148, 542, 111, 1151, 52, 759, 54,
5894 55, 56, 57, 1221, 766, 52, 115, 54, 55, 56,
5895 57, 58, -1, 399, -1, 52, 402, 54, 55, 1337,
5896 57, -1, 408, 409, 410, -1, -1, 1137, -1, -1,
5897 52, 78, 54, 55, 56, 57, -1, -1, 424, -1,
5898 -1, 1259, 1260, 1261, 1327, 1328, -1, 102, 1331, 1332,
5899 1160, -1, 1335, 1163, 873, 102, 59, 60, 61, 62,
5900 107, 108, 109, -1, 450, 102, -1, 1177, 1178, 1179,
5901 -1, -1, 1182, 1183, -1, -1, -1, 1187, 1188, 1169,
5902 -1, 1364, 1365, 1366, 1367, -1, -1, -1, 474, 862,
5903 1373, 1309, -1, -1, 141, -1, -1, 144, 1, -1,
5904 1318, -1, -1, -1, 1025, 1026, -1, -1, -1, 882,
5905 -1, 884, 15, 16, 40, 41, 42, 43, 44, 1337,
5906 -1, 507, -1, -1, 943, 944, -1, 1282, 901, -1,
5907 949, 950, -1, -1, -1, -1, 1291, -1, 524, 52,
5908 526, 54, 55, 56, 57, -1, -1, -1, -1, 52,
5909 53, -1, -1, -1, -1, -1, -1, -1, -1, 1080,
5910 1081, 547, -1, 1084, 67, 984, 985, 553, 987, 988,
5911 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5912 1101, -1, -1, -1, 1294, -1, -1, -1, 1298, 1299,
5913 -1, -1, -1, -1, 1349, -1, 1351, -1, 1353, -1,
5914 103, 104, -1, -1, 107, -1, -1, 593, 594, 112,
5915 596, 597, -1, -1, 1033, 1370, 1137, -1, -1, 605,
5916 -1, 607, -1, -1, 610, 52, -1, 54, 55, 56,
5917 57, 58, -1, -1, -1, -1, -1, -1, 1057, 1160,
5918 -1, -1, 1163, -1, 1025, 1026, -1, -1, 1358, -1,
5919 -1, 78, -1, -1, -1, -1, 1177, 1178, 1179, -1,
5920 -1, 1182, 1183, -1, -1, 92, 1187, 1188, 654, -1,
5921 656, -1, -1, -1, -1, 102, -1, -1, 664, -1,
5922 107, 108, 109, -1, -1, -1, -1, -1, -1, 675,
5923 -1, 677, 678, -1, -1, -1, -1, -1, -1, 1080,
5924 1081, 687, 688, 1084, -1, -1, -1, -1, -1, -1,
5925 -1, -1, -1, -1, 141, -1, -1, 144, -1, -1,
5926 1101, -1, -1, -1, -1, -1, -1, 230, -1, 715,
5927 157, -1, -1, -1, 52, 721, 54, 55, 56, 57,
5928 58, 727, -1, 52, -1, 54, 55, 56, 57, 58,
5929 -1, -1, -1, 256, 78, 258, 1137, -1, 261, 262,
5930 78, -1, -1, -1, 267, -1, -1, -1, -1, 78,
5931 -1, 95, 96, 1294, 92, -1, -1, 1298, 1299, 1160,
5932 -1, 284, 1163, 92, 102, -1, -1, -1, -1, 107,
5933 108, 109, -1, 102, -1, -1, 1177, 1178, 1179, 108,
5934 109, 1182, 1183, -1, -1, -1, 1187, 1188, -1, -1,
5935 -1, 78, -1, 1186, -1, -1, -1, 803, 142, 143,
5936 144, 145, 146, 141, 78, -1, 144, -1, 95, 96,
5937 -1, 334, 141, 336, 337, 338, 339, 1358, 341, 342,
5938 -1, 95, 96, -1, -1, 52, -1, 54, 55, 56,
5939 57, 58, -1, -1, -1, -1, 1229, -1, -1, 362,
5940 -1, -1, -1, -1, -1, -1, 1239, 853, -1, 855,
5941 856, 78, 139, 140, 141, 142, 143, 144, 145, 146,
5942 -1, -1, -1, 1256, 1257, 1258, -1, 141, 142, 143,
5943 144, 145, 146, -1, -1, 102, 399, -1, -1, 402,
5944 -1, 108, 109, -1, -1, 408, 409, 410, -1, -1,
5945 -1, -1, -1, 1294, -1, -1, -1, 1298, 1299, -1,
5946 -1, 424, -1, 1025, 1026, -1, -1, -1, -1, -1,
5947 -1, -1, -1, -1, 141, 921, -1, -1, -1, -1,
5948 -1, -1, -1, -1, -1, -1, -1, 450, -1, -1,
5949 -1, -1, 938, -1, -1, -1, -1, 943, 944, -1,
5950 1, 1025, 1026, 949, 950, -1, -1, -1, -1, -1,
5951 -1, 474, 958, 959, 15, 16, -1, 1358, 1080, 1081,
5952 -1, -1, 1084, -1, -1, -1, -1, -1, 974, -1,
5953 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1101,
5954 -1, -1, -1, -1, 507, -1, -1, 993, -1, -1,
5955 -1, 52, 53, -1, -1, -1, 1080, 1081, -1, -1,
5956 1084, -1, -1, 526, -1, -1, 67, -1, -1, -1,
5957 1016, 1017, 1018, -1, -1, 1137, -1, 1101, -1, -1,
5958 -1, -1, -1, -1, 547, -1, -1, 1033, -1, -1,
5959 553, -1, -1, -1, -1, -1, -1, -1, 1160, -1,
5960 -1, 1163, 103, 104, 1050, -1, 107, -1, -1, -1,
5961 -1, 112, -1, 1137, -1, 1177, 1178, 1179, -1, -1,
5962 1182, 1183, -1, -1, -1, 1187, 1188, -1, -1, -1,
5963 593, 594, -1, 596, 597, -1, 1160, -1, -1, 1163,
5964 -1, -1, 605, -1, -1, -1, -1, 610, -1, -1,
5965 -1, -1, -1, 1177, 1178, 1179, -1, -1, 1182, 1183,
5966 -1, -1, -1, 1187, 1188, -1, -1, -1, -1, -1,
5967 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1125,
5968 -1, -1, -1, 1129, -1, -1, 1132, 1133, -1, -1,
5969 -1, 654, 1138, 656, -1, -1, -1, -1, -1, -1,
5970 -1, 664, -1, -1, -1, -1, 1152, -1, -1, 1155,
5971 -1, -1, 675, -1, 677, 678, -1, -1, -1, -1,
5972 -1, -1, -1, -1, 687, 688, -1, -1, 1174, 230,
5973 -1, -1, 1294, -1, -1, -1, 1298, 1299, -1, -1,
5974 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5975 1196, -1, 715, -1, -1, 256, -1, 258, 721, -1,
5976 261, 262, -1, -1, 1210, -1, 267, -1, -1, -1,
5977 1294, -1, -1, -1, 1298, 1299, -1, -1, 1224, -1,
5978 -1, -1, -1, 284, -1, -1, -1, -1, -1, -1,
5979 -1, -1, -1, 1025, 1026, -1, 1358, -1, -1, -1,
5980 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5981 -1, -1, -1, -1, -1, -1, -1, -1, 1264, -1,
5982 -1, -1, -1, -1, -1, 1271, 1272, -1, -1, -1,
5983 1276, -1, -1, 334, 1358, 336, 337, 338, 339, 1285,
5984 341, 342, -1, -1, -1, -1, -1, -1, 1080, 1081,
5985 -1, -1, 1084, 78, 79, 80, 81, 82, 83, 84,
5986 85, 362, 87, 88, -1, -1, -1, -1, 1314, 1101,
5987 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
5988 -1, -1, -1, -1, -1, 1025, 1026, -1, -1, -1,
5989 853, -1, 855, 856, -1, -1, -1, -1, 399, -1,
5990 -1, 402, -1, -1, -1, 1137, -1, 408, 409, 410,
5991 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
5992 145, 146, -1, 424, -1, -1, -1, -1, 1160, -1,
5993 -1, 1163, -1, -1, -1, -1, -1, -1, 1, -1,
5994 1080, 1081, -1, -1, 1084, 1177, 1178, 1179, -1, 450,
5995 1182, 1183, 15, 16, -1, 1187, 1188, -1, 921, -1,
5996 -1, 1101, -1, -1, -1, -1, -1, -1, -1, -1,
5997 -1, -1, -1, 474, -1, 938, -1, -1, -1, -1,
5998 943, 944, -1, -1, -1, -1, 949, 950, -1, 52,
5999 53, -1, -1, -1, -1, 958, 959, 1137, -1, -1,
6000 -1, -1, -1, -1, 67, -1, 507, -1, -1, -1,
6001 -1, 974, -1, -1, -1, -1, -1, -1, 25, -1,
6002 1160, -1, -1, 1163, -1, 526, -1, -1, -1, -1,
6003 993, -1, -1, -1, -1, -1, -1, 1177, 1178, 1179,
6004 103, 104, 1182, 1183, 107, -1, 547, 1187, 1188, 112,
6005 -1, -1, 553, 1016, 1017, 1018, -1, -1, -1, -1,
6006 -1, -1, 1294, -1, -1, -1, 1298, 1299, -1, -1,
6007 1033, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6008 87, 88, 89, 90, -1, -1, -1, 1050, 95, 96,
6009 -1, -1, 593, 594, 101, 596, 597, -1, -1, -1,
6010 -1, -1, -1, -1, 605, -1, -1, -1, -1, 610,
6011 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6012 -1, -1, -1, -1, -1, -1, 1358, -1, 135, -1,
6013 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6015 -1, -1, -1, 654, 1294, 656, -1, -1, 1298, 1299,
6016 -1, -1, -1, 664, -1, -1, 1129, 230, -1, 1132,
6017 1133, -1, -1, -1, 675, 1138, 677, 678, -1, -1,
6018 -1, -1, -1, -1, -1, -1, 687, 688, -1, 1152,
6019 -1, -1, 1155, 256, -1, 258, -1, -1, 261, 262,
6020 -1, -1, -1, -1, 267, 1025, 1026, -1, -1, -1,
6021 -1, 1174, -1, -1, 715, -1, -1, -1, 1358, -1,
6022 721, 284, -1, -1, -1, -1, -1, -1, -1, -1,
6023 -1, -1, -1, 1196, -1, -1, 1025, 1026, -1, -1,
6024 -1, -1, -1, -1, -1, -1, -1, 1210, -1, -1,
6025 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6026 1080, 1081, -1, -1, 1084, -1, -1, -1, -1, -1,
6027 -1, 334, -1, 336, 337, 338, 339, -1, 341, 342,
6028 -1, 1101, -1, -1, -1, -1, -1, -1, -1, -1,
6029 -1, 1080, 1081, -1, -1, 1084, -1, -1, -1, 362,
6030 -1, 1264, -1, -1, -1, -1, -1, -1, 1271, 1272,
6031 -1, -1, 1101, 1276, 1, -1, -1, 1137, -1, -1,
6032 -1, -1, -1, -1, -1, -1, 1, -1, -1, -1,
6033 -1, -1, -1, -1, -1, -1, 399, -1, -1, 402,
6034 1160, -1, -1, 1163, -1, 408, 409, 410, 1137, -1,
6035 -1, 1314, 853, -1, 855, 856, -1, 1177, 1178, 1179,
6036 -1, 424, 1182, 1183, -1, 52, 53, 1187, 1188, 56,
6037 -1, 1160, -1, -1, 1163, -1, -1, 52, 53, -1,
6038 -1, 56, -1, -1, -1, -1, -1, 450, 1177, 1178,
6039 1179, -1, -1, 1182, 1183, -1, -1, -1, 1187, 1188,
6040 -1, -1, 89, -1, -1, -1, -1, -1, -1, -1,
6041 -1, 474, -1, -1, 89, -1, -1, -1, -1, -1,
6042 921, 108, 109, 110, -1, -1, -1, -1, -1, -1,
6043 -1, -1, -1, 108, 109, 110, -1, 938, -1, -1,
6044 -1, -1, 943, 944, 507, -1, -1, -1, 949, 950,
6045 -1, -1, -1, -1, -1, -1, -1, 958, 959, -1,
6046 -1, -1, -1, 526, -1, -1, -1, -1, -1, -1,
6047 -1, -1, -1, 974, 1294, -1, -1, -1, 1298, 1299,
6048 -1, -1, -1, -1, 547, -1, -1, -1, -1, -1,
6049 553, -1, 993, -1, -1, -1, -1, -1, -1, -1,
6050 -1, -1, -1, -1, -1, 1294, -1, -1, -1, 1298,
6051 1299, -1, -1, -1, -1, 1016, 1017, 1018, -1, -1,
6052 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6053 593, 594, 1033, 596, 597, -1, -1, -1, 1358, -1,
6054 -1, -1, 605, 230, -1, -1, -1, 610, -1, 1050,
6055 -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
6056 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1358,
6057 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6058 267, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6059 -1, 654, 267, 656, -1, -1, -1, 284, -1, -1,
6060 -1, 664, -1, -1, -1, -1, -1, -1, -1, 284,
6061 -1, -1, 675, -1, 677, 678, -1, 304, -1, -1,
6062 -1, -1, -1, -1, 687, 688, -1, -1, 1129, 304,
6063 -1, 1132, 1133, -1, -1, -1, -1, 1138, -1, 78,
6064 79, 80, 81, 82, 83, 84, -1, 334, 87, 88,
6065 -1, 1152, 715, -1, 1155, -1, 95, 96, 721, 334,
6066 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6067 -1, -1, -1, 1174, -1, 362, 363, -1, -1, -1,
6068 -1, -1, -1, -1, -1, -1, -1, 362, 363, -1,
6069 -1, -1, 1, -1, -1, 1196, -1, -1, 137, 138,
6070 139, 140, 141, 142, 143, 144, 145, 146, -1, 1210,
6071 -1, -1, -1, -1, -1, 402, -1, -1, -1, -1,
6072 -1, -1, 409, 410, -1, -1, -1, 402, -1, -1,
6073 -1, -1, -1, -1, 409, 410, -1, -1, -1, -1,
6074 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
6075 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6076 -1, -1, -1, 1264, -1, -1, -1, -1, -1, -1,
6077 1271, 1272, -1, -1, -1, 1276, -1, -1, -1, -1,
6078 89, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6079 853, -1, 855, 856, -1, -1, -1, -1, -1, 108,
6080 109, 110, -1, -1, -1, -1, -1, -1, -1, -1,
6081 -1, -1, -1, 1314, -1, -1, -1, -1, -1, -1,
6082 507, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6083 -1, -1, 507, -1, -1, -1, -1, 524, 78, 79,
6084 80, 81, 82, 83, 84, -1, -1, 87, 88, 524,
6085 -1, -1, -1, -1, -1, 95, 96, -1, 921, -1,
6086 547, -1, -1, -1, -1, -1, 553, -1, -1, -1,
6087 -1, -1, 547, -1, -1, 938, -1, -1, 553, -1,
6088 943, 944, -1, -1, -1, -1, 949, 950, -1, -1,
6089 -1, -1, -1, -1, -1, 958, 959, 137, 138, 139,
6090 140, 141, 142, 143, 144, 145, 146, 594, -1, -1,
6091 597, 974, -1, -1, -1, -1, -1, -1, -1, 594,
6092 607, 230, 597, 610, -1, -1, -1, -1, -1, -1,
6093 993, -1, 607, -1, -1, 610, -1, -1, -1, -1,
6094 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6095 -1, -1, -1, 1016, 1017, 1018, -1, -1, 267, -1,
6096 -1, -1, -1, -1, -1, -1, -1, 654, -1, 656,
6097 1033, -1, -1, -1, -1, 284, 1, -1, -1, 654,
6098 -1, 656, -1, -1, -1, -1, -1, 1050, -1, -1,
6099 677, -1, -1, -1, -1, 304, -1, -1, -1, -1,
6100 687, 688, 677, -1, -1, -1, -1, -1, -1, -1,
6101 -1, -1, 687, 688, -1, -1, -1, -1, -1, -1,
6102 -1, -1, -1, -1, -1, 334, -1, 52, 53, -1,
6103 -1, 56, -1, -1, 721, -1, -1, -1, -1, -1,
6104 727, -1, -1, -1, -1, -1, 721, -1, -1, 736,
6105 -1, -1, 727, 362, 363, -1, -1, -1, -1, -1,
6106 -1, -1, -1, -1, 89, -1, 1129, -1, -1, 1132,
6107 1133, -1, -1, -1, -1, 1138, -1, -1, -1, 33,
6108 34, 35, 36, 108, 109, 110, 111, -1, -1, 1152,
6109 -1, -1, 1155, 402, -1, 49, 50, 51, 52, -1,
6110 409, 410, 56, -1, -1, 59, 60, 61, 62, 63,
6111 -1, 1174, -1, -1, -1, -1, 803, -1, -1, -1,
6112 -1, -1, -1, -1, -1, -1, -1, -1, 803, -1,
6113 -1, -1, -1, 1196, -1, -1, -1, 91, 92, -1,
6114 -1, -1, -1, -1, -1, 99, -1, 1210, 102, -1,
6115 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6116 114, 115, 116, 117, 118, -1, -1, -1, -1, 856,
6117 -1, -1, -1, -1, -1, -1, -1, 1, -1, -1,
6118 -1, 856, -1, -1, -1, -1, 140, -1, -1, -1,
6119 -1, -1, -1, 147, -1, -1, -1, -1, 507, -1,
6120 154, 1264, -1, -1, -1, 230, -1, -1, 1271, 1272,
6121 -1, -1, -1, 1276, -1, 524, -1, -1, -1, -1,
6122 -1, -1, -1, -1, -1, -1, -1, -1, 52, 53,
6123 -1, -1, -1, -1, -1, -1, -1, -1, 547, -1,
6124 -1, -1, 267, -1, 553, -1, -1, -1, -1, -1,
6125 -1, 1314, -1, -1, -1, -1, 943, 944, -1, 284,
6126 -1, -1, 949, 950, -1, -1, -1, -1, 943, 944,
6127 -1, 958, -1, -1, 949, 950, -1, -1, -1, 304,
6128 -1, -1, -1, 958, 108, 594, -1, 974, 597, -1,
6129 -1, -1, -1, -1, -1, -1, -1, -1, 607, 974,
6130 -1, 610, -1, -1, -1, -1, 993, -1, -1, 334,
6131 -1, -1, -1, -1, -1, -1, -1, -1, 993, -1,
6132 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1016,
6133 1017, 1018, -1, -1, -1, -1, -1, 362, 363, -1,
6134 -1, 1016, 1017, 1018, -1, 654, 1033, 656, -1, -1,
6135 -1, -1, -1, -1, -1, -1, -1, -1, 1033, -1,
6136 -1, -1, -1, 1050, -1, -1, -1, -1, 677, -1,
6137 -1, -1, -1, -1, -1, 1050, -1, 402, 687, 688,
6138 -1, -1, -1, -1, 409, 410, -1, -1, -1, -1,
6139 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6140 -1, -1, -1, -1, 1, -1, 230, -1, -1, -1,
6141 -1, -1, 721, -1, -1, -1, -1, -1, 727, -1,
6142 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6143 -1, -1, -1, -1, -1, -1, -1, -1, 1125, -1,
6144 -1, -1, 1129, 267, -1, 1132, 1133, -1, -1, -1,
6145 1125, 1138, -1, -1, 1129, 52, 53, 1132, 1133, -1,
6146 284, -1, -1, 1138, -1, 1152, -1, -1, 1155, -1,
6147 -1, -1, -1, -1, -1, -1, -1, 1152, -1, -1,
6148 1155, -1, 507, -1, -1, -1, -1, -1, -1, -1,
6149 -1, -1, -1, -1, 803, -1, -1, -1, -1, 524,
6150 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1196,
6151 334, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6152 -1, 1196, 547, 1210, -1, -1, -1, -1, 553, -1,
6153 -1, -1, -1, -1, -1, 1210, -1, 1224, 362, -1,
6154 -1, -1, -1, -1, -1, -1, -1, 856, -1, 1224,
6155 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6156 82, 83, 84, 85, 86, 87, 88, 89, 90, 594,
6157 -1, -1, 597, 95, 96, -1, -1, -1, 402, -1,
6158 -1, -1, 607, -1, -1, 409, 410, -1, -1, 1276,
6159 -1, -1, -1, -1, -1, -1, -1, -1, 1285, -1,
6160 -1, 1276, -1, -1, -1, -1, -1, -1, -1, -1,
6161 1285, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6162 142, 143, 144, 145, 146, -1, -1, 1314, -1, 654,
6163 -1, 656, 154, 230, 943, 944, -1, -1, -1, 1314,
6164 949, 950, -1, -1, -1, -1, -1, -1, -1, 958,
6165 -1, -1, 677, -1, 44, -1, -1, -1, -1, -1,
6166 -1, -1, -1, -1, -1, 974, -1, -1, -1, -1,
6167 267, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6168 -1, -1, -1, 507, 993, -1, -1, 284, 78, 79,
6169 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6170 90, -1, 727, -1, -1, 95, 96, 1016, 1017, 1018,
6171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6172 -1, -1, -1, 547, 1033, -1, -1, -1, -1, 553,
6173 -1, -1, -1, -1, -1, -1, -1, 334, -1, -1,
6174 -1, 1050, -1, -1, -1, 135, -1, 137, 138, 139,
6175 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6176 -1, -1, -1, -1, -1, 362, -1, -1, -1, -1,
6177 594, -1, -1, 597, -1, -1, -1, -1, 803, -1,
6178 -1, -1, -1, -1, -1, -1, 610, -1, -1, -1,
6179 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6180 -1, -1, -1, -1, -1, 402, -1, -1, -1, -1,
6181 -1, -1, 409, 410, -1, -1, 1125, -1, -1, -1,
6182 1129, -1, -1, 1132, 1133, -1, -1, -1, -1, 1138,
6183 654, 856, 656, -1, -1, -1, -1, -1, -1, -1,
6184 -1, -1, -1, 1152, -1, -1, 1155, -1, -1, -1,
6185 -1, -1, -1, 677, -1, -1, -1, -1, -1, -1,
6186 -1, -1, -1, 687, 688, -1, -1, -1, -1, -1,
6187 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6188 -1, -1, -1, -1, -1, -1, -1, 1196, -1, -1,
6189 -1, -1, -1, -1, -1, -1, -1, 721, -1, -1,
6190 -1, 1210, -1, -1, 0, -1, -1, -1, -1, -1,
6191 507, -1, 8, 9, 10, 1224, -1, 13, 14, 15,
6192 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6193 26, 27, -1, 958, -1, -1, -1, -1, -1, -1,
6194 -1, 37, 38, 44, 40, 41, 42, 43, 44, 974,
6195 547, -1, -1, -1, -1, -1, 553, -1, -1, -1,
6196 -1, -1, -1, -1, -1, -1, -1, 1276, 993, -1,
6197 -1, -1, 68, 69, -1, -1, 1285, 78, 79, 80,
6198 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6199 -1, 1016, 1017, -1, 95, 96, -1, 594, -1, -1,
6200 597, 97, 98, -1, -1, 1314, -1, -1, -1, -1,
6201 -1, -1, -1, 610, -1, -1, -1, -1, -1, -1,
6202 -1, -1, -1, -1, 120, 1050, -1, -1, -1, -1,
6203 -1, -1, 856, -1, 135, -1, 137, 138, 139, 140,
6204 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6205 -1, -1, -1, -1, 155, 151, 152, 654, 154, 656,
6206 -1, 157, 158, -1, 160, -1, -1, -1, -1, -1,
6207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6208 677, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6209 687, 688, -1, -1, -1, -1, -1, -1, -1, -1,
6210 1125, -1, -1, -1, 1129, -1, -1, 1132, 1133, -1,
6211 -1, -1, -1, 1138, -1, -1, -1, -1, -1, 943,
6212 944, 15, 16, -1, 721, 949, 950, 1152, -1, -1,
6213 1155, -1, -1, -1, 958, -1, -1, -1, -1, -1,
6214 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6215 974, -1, -1, 47, 48, 49, 50, -1, -1, -1,
6216 54, 55, -1, -1, -1, -1, -1, -1, -1, 993,
6217 -1, 1196, -1, 67, 68, -1, -1, -1, -1, -1,
6218 -1, -1, -1, -1, -1, 1210, -1, -1, -1, -1,
6219 -1, -1, 1016, 1017, 1018, -1, -1, -1, -1, 1224,
6220 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1033,
6221 -1, -1, -1, 33, 34, 35, 36, -1, 112, -1,
6222 -1, -1, -1, -1, -1, -1, 1050, -1, -1, 49,
6223 50, 51, 52, -1, -1, -1, 56, -1, 58, 59,
6224 60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
6225 -1, 1276, -1, -1, -1, -1, -1, -1, 78, 856,
6226 1285, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6227 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6228 -1, -1, 102, -1, 104, 105, -1, 107, 108, 1314,
6229 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6230 -1, 1125, -1, -1, -1, 1129, -1, -1, 1132, 1133,
6231 -1, -1, -1, -1, 1138, -1, -1, -1, -1, -1,
6232 140, -1, -1, -1, -1, -1, -1, 147, 1152, -1,
6233 -1, 1155, -1, -1, 228, -1, -1, 231, 232, 233,
6234 -1, 235, -1, -1, -1, -1, 943, 944, -1, -1,
6235 -1, -1, 949, 950, -1, -1, -1, -1, -1, -1,
6236 -1, 958, 256, -1, 258, 33, 34, 35, 36, -1,
6237 -1, -1, 1196, -1, 52, 53, -1, 974, 56, -1,
6238 -1, 49, 50, 51, -1, -1, 1210, -1, -1, -1,
6239 -1, 59, 60, 61, 62, 63, 993, -1, 76, 77,
6240 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6241 88, -1, -1, -1, -1, 93, 94, 95, 96, 1016,
6242 1017, 1018, -1, -1, -1, -1, -1, -1, -1, 107,
6243 108, -1, -1, -1, -1, -1, 1033, -1, -1, -1,
6244 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6245 118, -1, 1276, 1050, -1, -1, -1, -1, -1, 137,
6246 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6247 148, 149, -1, 367, 368, 369, 370, 371, 156, 147,
6248 374, 375, 376, 377, 378, 379, 380, 381, -1, 383,
6249 1314, -1, 386, 387, 388, 389, 390, 391, 392, 393,
6250 394, 395, -1, -1, -1, 399, 78, 79, 80, 81,
6251 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6252 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1,
6253 -1, -1, 1129, -1, -1, 1132, 1133, -1, -1, -1,
6254 -1, 1138, -1, -1, -1, -1, -1, -1, -1, -1,
6255 -1, -1, -1, -1, -1, 1152, 450, -1, 1155, -1,
6256 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6257 142, 143, 144, 145, 146, 469, 470, -1, -1, -1,
6258 474, -1, -1, -1, 478, -1, 480, -1, -1, -1,
6259 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1196,
6260 -1, -1, -1, -1, 498, -1, -1, -1, -1, -1,
6261 -1, -1, -1, 1210, -1, -1, -1, 511, -1, -1,
6262 514, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6263 -1, -1, 526, -1, -1, -1, -1, -1, -1, -1,
6264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6265 544, -1, -1, -1, 33, 34, 35, 36, -1, -1,
6266 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6267 49, 50, 51, 52, -1, -1, -1, 56, -1, 1276,
6268 59, 60, 61, 62, 63, -1, -1, -1, -1, -1,
6269 -1, 585, -1, -1, -1, -1, -1, -1, -1, 593,
6270 -1, -1, 596, -1, -1, -1, -1, -1, -1, -1,
6271 -1, 605, 91, 92, -1, -1, 610, 1314, -1, -1,
6272 99, -1, -1, 102, -1, 104, 105, -1, 107, -1,
6273 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6274 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6275 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
6276 -1, 140, -1, -1, -1, -1, -1, -1, 147, -1,
6277 664, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6278 -1, 675, 87, 88, -1, -1, -1, -1, 93, 94,
6279 95, 96, -1, 687, 688, -1, -1, 691, 692, 693,
6280 694, -1, 107, 108, -1, -1, -1, -1, -1, -1,
6281 -1, 705, 706, -1, -1, 709, -1, 711, -1, -1,
6282 -1, -1, -1, -1, -1, -1, -1, 721, -1, -1,
6283 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6284 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
6285 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
6286 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6287 -1, 765, -1, -1, -1, -1, -1, -1, -1, -1,
6288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6289 -1, -1, -1, -1, -1, -1, -1, -1, -1, 793,
6290 -1, -1, -1, -1, -1, 0, 1, -1, 3, 4,
6291 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
6292 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6293 25, 825, -1, -1, -1, 30, 31, 32, 33, 34,
6294 35, 36, -1, -1, 39, -1, -1, -1, -1, 843,
6295 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6296 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6297 65, -1, -1, 68, -1, -1, -1, -1, -1, 873,
6298 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6299 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6300 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6301 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6302 115, 116, 117, 118, -1, 120, -1, 921, -1, -1,
6303 -1, -1, -1, -1, -1, -1, 930, -1, -1, -1,
6304 -1, -1, -1, -1, 938, -1, -1, -1, 942, 943,
6305 944, -1, 147, 148, 149, 949, 950, 152, -1, 953,
6306 -1, -1, -1, 158, -1, 160, -1, -1, -1, -1,
6307 -1, 965, -1, -1, -1, -1, -1, -1, -1, -1,
6308 -1, -1, -1, -1, -1, -1, -1, -1, -1, 983,
6309 984, 985, -1, 987, 988, -1, 990, -1, -1, -1,
6310 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6311 -1, -1, -1, -1, -1, -1, 1010, 1011, -1, -1,
6312 1014, -1, -1, -1, 1018, 1019, -1, -1, -1, -1,
6313 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1033,
6314 -1, -1, -1, -1, -1, -1, 0, 1, -1, 3,
6315 4, 5, 6, 7, -1, 1049, -1, 11, 12, -1,
6316 -1, -1, 16, 1057, 18, 19, 20, 21, 22, 23,
6317 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6318 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6319 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6320 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6321 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6322 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6323 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6324 1134, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6325 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6326 114, 115, 116, 117, 118, -1, 120, -1, -1, -1,
6327 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6328 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6329 -1, -1, -1, 147, 148, 149, -1, -1, 0, 1,
6330 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6331 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6332 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6333 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6334 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6335 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6336 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6337 1264, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6338 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6339 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6340 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6341 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6342 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6344 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6345 0, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6346 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6347 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6348 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6349 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6350 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6351 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6352 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6354 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6355 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6356 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6357 -1, -1, -1, -1, -1, -1, -1, -1, 0, -1,
6358 -1, -1, -1, -1, -1, -1, 8, 9, 10, -1,
6359 -1, 13, 14, 15, -1, 17, -1, 147, 148, 149,
6360 -1, -1, 152, 25, 26, 27, 28, 29, -1, -1,
6361 160, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6362 42, 43, 44, -1, -1, -1, 78, 79, 80, 81,
6363 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6364 -1, -1, -1, 95, 96, -1, 68, 69, -1, -1,
6365 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6366 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6367 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6368 -1, -1, -1, -1, 106, 137, 138, 139, 140, 141,
6369 142, 143, 144, 145, 146, -1, -1, -1, 120, -1,
6370 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6371 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6372 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6373 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6374 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6375 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6376 -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6377 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6380 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6381 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6382 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6383 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6384 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6385 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6386 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6387 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6388 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6389 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6390 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6391 -1, -1, -1, -1, -1, 25, -1, 27, 28, 29,
6392 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6393 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6394 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6395 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6396 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6397 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6398 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6399 100, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6400 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6401 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6402 -1, -1, -1, -1, 134, 135, 136, 137, 138, 139,
6403 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6404 -1, -1, 152, 153, 154, 155, 0, -1, 158, 159,
6405 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6406 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6407 -1, 25, 26, 27, 28, 29, -1, -1, -1, -1,
6408 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6409 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6410 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6411 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6412 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6413 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6414 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6415 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6416 -1, -1, -1, -1, -1, -1, 120, -1, -1, 123,
6417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6418 -1, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6419 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6420 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6421 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6422 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
6423 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6424 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6425 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6427 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6428 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6429 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6430 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6431 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6432 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6433 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6434 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6435 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6436 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6437 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6438 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6439 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6440 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6442 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6443 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6444 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6445 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6446 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6447 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6449 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6450 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6451 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6452 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6453 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6454 -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6455 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6456 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6457 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6458 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6459 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6460 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6461 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6462 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6463 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6464 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6465 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6466 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6467 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6468 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6469 -1, -1, -1, -1, -1, 25, 26, 27, 28, -1,
6470 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6471 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6472 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6473 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6474 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6475 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6476 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6477 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6478 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6479 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6480 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6481 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6482 -1, 151, 152, 153, 154, 155, 0, 157, 158, 159,
6483 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6484 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6485 -1, 25, -1, 27, 28, -1, -1, -1, -1, -1,
6486 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6487 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6488 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6489 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6490 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6491 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6492 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6493 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6494 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6495 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6496 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6497 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6498 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6499 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6500 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6501 28, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6502 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6503 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6504 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6505 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6506 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6507 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6508 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6509 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6510 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6511 -1, -1, -1, -1, -1, -1, -1, 135, -1, 137,
6512 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6513 -1, -1, -1, -1, 152, 153, 154, 155, 0, 157,
6514 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6515 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6516 -1, -1, -1, 25, 26, -1, -1, -1, -1, -1,
6517 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6518 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6519 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6520 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6521 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6522 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6523 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6524 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6525 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6526 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6527 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6528 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6529 152, 153, 154, 155, 0, -1, 158, -1, 160, -1,
6530 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
6531 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6532 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6533 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6534 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6535 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6536 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6537 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6538 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6539 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6540 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6541 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6542 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6543 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6544 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6545 0, -1, 158, -1, 160, -1, -1, -1, 8, 9,
6546 10, -1, -1, -1, 14, 15, -1, 17, -1, -1,
6547 -1, -1, -1, -1, -1, 25, -1, -1, -1, -1,
6548 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6549 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6550 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6551 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6552 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6553 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6554 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6555 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
6556 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6557 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6558 -1, -1, -1, -1, 134, 135, -1, 137, 138, 139,
6559 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6560 -1, 151, 152, 153, 154, 155, 0, -1, 158, -1,
6561 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6562 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6563 -1, 25, -1, -1, -1, -1, -1, -1, -1, -1,
6564 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6565 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6566 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6567 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6568 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6569 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6570 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6572 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6573 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6574 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6575 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6576 154, 155, -1, -1, 158, 1, 160, 3, 4, 5,
6577 6, 7, 8, 9, 10, 11, 12, -1, -1, 15,
6578 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6579 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6580 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6581 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6582 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6583 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6584 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6585 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6586 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6587 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6588 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6590 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6591 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6592 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6593 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
6594 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6595 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6596 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6597 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6598 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6599 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6600 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6601 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6602 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6603 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6604 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6605 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6606 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6607 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6608 12, -1, -1, 15, 16, 17, 18, 19, 20, 21,
6609 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6610 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6611 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6612 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6613 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6614 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6615 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6616 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6617 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6618 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6619 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6621 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6622 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6623 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
6624 20, 21, 22, 23, 24, 25, -1, -1, -1, -1,
6625 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6626 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6627 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6628 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6629 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6630 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6631 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6632 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6633 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6634 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6635 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6636 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6637 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6638 160, -1, 10, 11, 12, -1, -1, 15, 16, -1,
6639 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6640 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6641 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6642 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6643 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6644 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6646 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6647 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6648 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6649 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6650 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6651 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6652 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6653 6, 7, 160, 9, 10, 11, 12, -1, -1, -1,
6654 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6655 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6656 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6657 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6658 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6659 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6660 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6662 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6663 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6664 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6665 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6666 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6667 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6668 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6669 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6670 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6671 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6672 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6673 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6674 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6675 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6677 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6678 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6679 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6680 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6682 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6683 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6684 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6685 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6686 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6687 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6688 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6689 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6690 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6691 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6692 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6693 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6694 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6695 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6696 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6697 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6698 -1, -1, 154, -1, -1, -1, 158, 1, 160, 3,
6699 4, 5, 6, 7, -1, -1, -1, 11, 12, -1,
6700 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6701 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6702 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6703 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6704 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6705 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6706 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6707 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6708 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6709 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6710 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6711 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6713 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6714 154, -1, -1, -1, 158, 1, 160, 3, 4, 5,
6715 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6716 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6717 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6718 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6719 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6720 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6721 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6722 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6723 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6724 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6725 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6726 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6727 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6728 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6729 -1, 147, 148, 149, -1, -1, 152, 1, 154, 3,
6730 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6731 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6732 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6733 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6734 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6735 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6736 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6737 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6738 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6739 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6740 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6741 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6742 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6743 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6744 -1, -1, -1, 147, 148, 149, -1, -1, 152, 1,
6745 154, 3, 4, 5, -1, 7, 160, -1, -1, 11,
6746 12, -1, -1, -1, 16, 17, 18, 19, 20, 21,
6747 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6748 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6749 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6750 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6751 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6752 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6753 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6754 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6755 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6756 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6757 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6758 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6759 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6760 -1, -1, 154, -1, -1, -1, -1, -1, 160, 3,
6761 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6762 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6763 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6764 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6765 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6766 54, 55, 56, 57, -1, -1, -1, -1, -1, -1,
6767 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6768 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6769 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6770 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6771 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
6772 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6773 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6774 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6775 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6776 -1, -1, 156, 157, 3, 4, 5, 6, 7, 8,
6777 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6778 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6779 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6780 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6781 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6782 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6783 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6784 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6785 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6786 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6787 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6788 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6789 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6790 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6791 149, -1, -1, -1, -1, -1, -1, 156, 3, 4,
6792 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
6793 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6794 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
6795 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
6796 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6797 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
6798 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6799 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6800 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
6801 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, 107, 108, -1, -1, 111, -1, -1, -1,
6803 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6804 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6805 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6806 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
6807 -1, 156, 3, 4, 5, 6, 7, 8, 9, 10,
6808 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6809 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6810 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6811 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6812 51, 52, 53, -1, -1, 56, -1, -1, -1, -1,
6813 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6814 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6815 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6816 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6817 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
6818 111, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6819 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6820 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
6821 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
6822 -1, -1, -1, -1, -1, 156, 3, 4, 5, 6,
6823 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6824 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6825 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6826 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6827 47, 48, 49, 50, 51, 52, 53, -1, -1, 56,
6828 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6829 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6830 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6831 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6833 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6834 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6835 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6836 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6837 -1, 148, 149, 3, 4, 5, -1, 7, -1, 156,
6838 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6839 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6840 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6841 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6842 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6843 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6844 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6845 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6846 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
6847 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6848 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6849 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6850 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6851 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
6852 32, 33, 34, 35, 36, 155, -1, 39, -1, -1,
6853 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6854 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6855 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6856 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6857 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6858 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6859 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6860 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
6861 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6862 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6863 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
6864 34, 35, 36, 155, -1, 39, -1, -1, -1, -1,
6865 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6866 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6867 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6868 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6869 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6870 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6871 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
6872 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6873 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6874 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
6875 5, -1, 7, 147, 148, 149, 11, 12, -1, -1,
6876 154, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6877 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6878 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6879 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6880 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6881 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6882 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6883 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6884 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6885 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6886 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6887 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6888 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
6889 6, 7, 147, 148, 149, 11, 12, -1, -1, 154,
6890 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6891 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6892 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6893 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
6894 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6895 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6896 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6897 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6898 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6899 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6900 116, 117, 118, -1, -1, 1, -1, 3, 4, 5,
6901 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6902 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6903 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6904 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6905 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6906 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6907 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6908 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6909 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6910 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6911 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
6912 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6913 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6914 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6915 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6916 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6917 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6918 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6919 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6920 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6921 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6922 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6923 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6924 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6925 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6926 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6927 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6928 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6929 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6930 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6931 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6932 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6933 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6934 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6935 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6936 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6937 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6938 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6939 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6940 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6941 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6942 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6943 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6944 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6945 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6946 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6947 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6948 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6949 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6950 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6951 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6952 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6953 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6954 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6955 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6956 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6957 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6958 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6959 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6960 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6961 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6962 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6963 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6964 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6965 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6966 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6967 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6968 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6969 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6970 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6971 -1, 107, 108, -1, 110, 111, 112, 113, 114, 115,
6972 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6973 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6974 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6975 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6976 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6977 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6978 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6979 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6980 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6981 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6982 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6983 -1, -1, 108, 109, 110, 111, 112, 113, 114, 115,
6984 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6985 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6986 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6987 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6988 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6989 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6990 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6991 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6992 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6993 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6994 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6995 -1, -1, 108, -1, 110, 111, 112, 113, 114, 115,
6996 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6997 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6998 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6999 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7000 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7001 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7002 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7003 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7004 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7005 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7006 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7007 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7008 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7009 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7010 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7011 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7012 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7013 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7014 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7016 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7017 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7018 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7019 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7020 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7021 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7022 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7023 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7024 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7025 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7026 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7027 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7028 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7029 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7030 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7031 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7032 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7033 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7034 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7035 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7036 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7037 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7038 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7039 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7040 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7041 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7042 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7043 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7044 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7045 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7046 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7047 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7048 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7049 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7050 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7051 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7052 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7053 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7054 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7055 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7056 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7057 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7058 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7059 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7060 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7061 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7062 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7063 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7064 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7065 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7066 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7067 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7068 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7069 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7070 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7071 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7072 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7073 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7074 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7075 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7076 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7077 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7078 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7079 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7080 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7081 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7082 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7083 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7084 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7085 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7086 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7087 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7088 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7089 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7090 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7091 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7092 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7093 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7094 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7095 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7096 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7097 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7098 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7099 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7100 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7101 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7102 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7103 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7104 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7105 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7106 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7107 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7108 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7109 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7110 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7111 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7112 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7113 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7114 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7115 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7116 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7117 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7118 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7119 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7120 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7121 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7122 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7123 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7124 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7125 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7126 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7127 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7128 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7129 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7130 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7131 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7132 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7133 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7134 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7135 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7136 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7137 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7138 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7139 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7140 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7141 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7142 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7143 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7144 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7145 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7146 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7147 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7148 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7149 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7150 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7151 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7152 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7153 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7154 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7155 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7156 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7157 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7158 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7159 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7160 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7162 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7163 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7164 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7165 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7166 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7167 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7168 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7169 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7170 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7173 -1, -1, -1, -1, -1, 95, -1, -1, -1, 99,
7174 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7175 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7176 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7177 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7178 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7179 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7180 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7181 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7182 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7183 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7184 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7185 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7186 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7187 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7188 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7189 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7190 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7191 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7192 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7193 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7194 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7195 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7196 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7197 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7198 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7199 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7200 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7201 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7202 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7203 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7204 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7205 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7208 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7209 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7210 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7211 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7212 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7213 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7214 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7215 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7216 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7217 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7220 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7221 -1, 99, -1, -1, 102, 103, 104, 105, 33, 34,
7222 35, 36, 110, 111, 112, 113, 114, 115, 116, 117,
7223 118, -1, -1, -1, 49, 50, 51, 52, -1, -1,
7224 -1, 56, -1, -1, 59, 60, 61, 62, 63, -1,
7225 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
7226 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7227 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
7228 -1, -1, -1, -1, 99, -1, -1, 102, -1, 104,
7229 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7230 115, 116, 117, 118, -1, -1, -1, -1, -1, 52,
7231 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
7232 -1, -1, -1, -1, -1, 140, -1, -1, -1, -1,
7233 -1, -1, 147, 76, 77, 78, 79, 80, 81, 82,
7234 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7235 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7236 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7237 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7239 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7240 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7241 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7242 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7243 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7244 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7245 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7246 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7247 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7249 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7250 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7251 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7252 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7253 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7254 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7256 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7257 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7259 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7260 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7262 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7263 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7264 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7265 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7266 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7267 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7268 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7269 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7270 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7271 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7272 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7273 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7274 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7275 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7276 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7277 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7278 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7279 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7280 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7281 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7282 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7283 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7284 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7285 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7286 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7287 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7288 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7289 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7290 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7291 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7292 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7293 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7294 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7295 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7296 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7298 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7299 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7300 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7301 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7302 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7303 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7304 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7305 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7306 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7307 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7308 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7309 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7310 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7311 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7312 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7313 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7314 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7315 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7316 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7317 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7318 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7319 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7320 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7321 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7322 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7323 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7324 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7326 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7327 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7328 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7329 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7330 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7331 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7332 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7333 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7334 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7335 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7337 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7338 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7339 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7341 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7342 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7343 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7344 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7345 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7346 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7347 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7348 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7349 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7350 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7351 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7352 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7354 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7357 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7358 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7359 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7360 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7361 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7362 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7363 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7364 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7365 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7366 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7367 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7368 149, -1, -1, -1, -1, -1, -1, 156
7369};
7370
7371/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7372 state STATE-NUM. */
7373static const yytype_int16 yystos[] =
7374{
7375 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7376 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7377 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7378 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7379 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7380 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7381 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7382 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7383 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7384 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7385 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7386 277, 278, 287, 288, 321, 326, 327, 376, 377, 378,
7387 379, 380, 381, 383, 384, 387, 388, 390, 391, 392,
7388 393, 406, 407, 409, 410, 411, 412, 413, 414, 415,
7389 416, 417, 465, 0, 3, 4, 5, 6, 7, 8,
7390 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7391 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7392 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7393 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7394 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7395 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7396 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7397 222, 224, 225, 406, 179, 179, 179, 39, 58, 99,
7398 102, 107, 108, 109, 112, 148, 195, 197, 209, 217,
7399 227, 238, 239, 245, 246, 249, 251, 252, 268, 413,
7400 414, 416, 417, 452, 453, 246, 157, 242, 247, 248,
7401 154, 157, 189, 54, 221, 189, 151, 169, 170, 235,
7402 465, 21, 22, 32, 208, 227, 268, 287, 288, 227,
7403 227, 227, 56, 47, 102, 171, 176, 177, 182, 211,
7404 212, 465, 171, 240, 251, 452, 465, 239, 451, 452,
7405 465, 46, 99, 147, 155, 195, 197, 216, 255, 268,
7406 413, 414, 417, 319, 220, 396, 408, 412, 396, 397,
7407 398, 161, 382, 382, 382, 382, 411, 203, 227, 227,
7408 154, 160, 163, 463, 464, 179, 40, 41, 42, 43,
7409 44, 37, 38, 157, 420, 421, 422, 423, 465, 420,
7410 422, 26, 151, 242, 248, 279, 328, 28, 280, 325,
7411 134, 155, 102, 107, 214, 134, 25, 78, 79, 80,
7412 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
7413 95, 96, 101, 135, 137, 138, 139, 140, 141, 142,
7414 143, 144, 145, 146, 233, 233, 69, 97, 98, 153,
7415 457, 458, 256, 1, 191, 198, 199, 199, 200, 202,
7416 202, 163, 199, 464, 99, 210, 217, 268, 293, 413,
7417 414, 417, 52, 56, 95, 99, 218, 219, 268, 413,
7418 414, 417, 219, 33, 34, 35, 36, 49, 50, 51,
7419 52, 56, 157, 194, 220, 415, 447, 448, 449, 246,
7420 157, 248, 98, 457, 458, 328, 379, 100, 100, 155,
7421 239, 56, 239, 239, 239, 396, 420, 420, 134, 101,
7422 155, 250, 465, 98, 153, 457, 100, 100, 155, 250,
7423 92, 244, 246, 251, 432, 452, 465, 246, 189, 191,
7424 459, 191, 54, 64, 65, 181, 157, 235, 236, 164,
7425 98, 457, 100, 178, 211, 158, 163, 464, 459, 257,
7426 159, 155, 189, 462, 155, 462, 152, 462, 189, 56,
7427 411, 213, 214, 421, 155, 98, 153, 457, 316, 66,
7428 119, 121, 122, 399, 119, 119, 399, 67, 399, 161,
7429 385, 394, 389, 395, 78, 160, 168, 151, 199, 199,
7430 199, 199, 235, 237, 191, 191, 52, 54, 55, 56,
7431 57, 58, 78, 92, 102, 107, 108, 109, 141, 144,
7432 298, 363, 424, 425, 426, 427, 428, 429, 431, 432,
7433 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
7434 443, 444, 445, 134, 265, 431, 134, 266, 329, 330,
7435 106, 207, 331, 332, 332, 235, 211, 155, 216, 155,
7436 235, 193, 227, 227, 227, 227, 227, 227, 227, 227,
7437 227, 227, 227, 227, 227, 192, 227, 227, 227, 227,
7438 227, 227, 227, 227, 227, 227, 227, 52, 53, 56,
7439 224, 454, 455, 244, 251, 52, 53, 56, 224, 454,
7440 242, 171, 174, 13, 289, 463, 289, 199, 171, 171,
7441 259, 163, 56, 98, 153, 457, 25, 199, 52, 56,
7442 218, 138, 419, 465, 98, 153, 457, 264, 450, 69,
7443 98, 456, 246, 459, 52, 56, 454, 235, 235, 223,
7444 100, 124, 134, 134, 235, 239, 239, 249, 252, 452,
7445 52, 56, 244, 52, 56, 235, 235, 453, 459, 155,
7446 459, 155, 158, 459, 221, 236, 227, 152, 56, 454,
7447 454, 235, 170, 459, 177, 158, 452, 155, 213, 52,
7448 56, 244, 52, 56, 317, 401, 400, 119, 386, 399,
7449 66, 119, 119, 386, 66, 119, 227, 171, 182, 102,
7450 107, 294, 295, 296, 297, 434, 155, 446, 465, 155,
7451 446, 155, 430, 459, 299, 300, 155, 430, 239, 34,
7452 52, 52, 155, 430, 52, 39, 188, 209, 227, 232,
7453 174, 463, 188, 232, 174, 316, 152, 330, 316, 10,
7454 68, 286, 286, 107, 203, 204, 205, 239, 251, 253,
7455 254, 459, 213, 155, 99, 185, 190, 205, 217, 227,
7456 239, 241, 254, 268, 417, 338, 338, 189, 100, 100,
7457 151, 242, 248, 189, 460, 155, 100, 100, 242, 243,
7458 248, 465, 235, 286, 171, 13, 171, 27, 290, 463,
7459 286, 286, 17, 283, 334, 25, 258, 340, 52, 56,
7460 244, 52, 56, 260, 263, 418, 262, 52, 56, 218,
7461 244, 174, 191, 196, 459, 243, 248, 190, 227, 241,
7462 190, 241, 221, 235, 239, 39, 250, 100, 100, 460,
7463 100, 100, 432, 452, 191, 190, 241, 462, 214, 460,
7464 318, 402, 405, 412, 417, 382, 399, 382, 382, 382,
7465 152, 296, 434, 155, 459, 155, 445, 424, 439, 441,
7466 427, 428, 437, 443, 134, 239, 429, 436, 443, 435,
7467 437, 189, 44, 44, 286, 286, 317, 152, 317, 239,
7468 155, 44, 213, 56, 44, 134, 44, 98, 153, 457,
7469 336, 336, 136, 235, 235, 330, 207, 159, 100, 235,
7470 235, 207, 8, 281, 372, 465, 14, 15, 284, 285,
7471 291, 292, 465, 292, 201, 107, 239, 333, 286, 338,
7472 334, 286, 460, 199, 463, 199, 174, 460, 286, 459,
7473 194, 328, 325, 189, 235, 235, 100, 235, 235, 459,
7474 155, 459, 179, 403, 459, 294, 297, 295, 446, 155,
7475 430, 155, 430, 155, 430, 155, 430, 430, 188, 232,
7476 237, 237, 318, 318, 107, 239, 237, 237, 235, 237,
7477 52, 56, 244, 52, 56, 337, 337, 227, 190, 241,
7478 190, 241, 152, 235, 190, 241, 190, 241, 239, 254,
7479 373, 465, 175, 284, 171, 199, 286, 286, 239, 155,
7480 289, 336, 286, 290, 174, 463, 286, 235, 157, 322,
7481 431, 171, 155, 155, 437, 437, 443, 437, 227, 227,
7482 179, 179, 239, 182, 182, 227, 460, 52, 56, 58,
7483 91, 92, 99, 102, 104, 105, 107, 112, 140, 321,
7484 343, 344, 345, 346, 349, 353, 354, 355, 358, 359,
7485 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
7486 370, 371, 376, 377, 380, 381, 384, 388, 391, 393,
7487 414, 439, 343, 190, 241, 101, 374, 465, 9, 282,
7488 375, 465, 172, 289, 107, 239, 171, 337, 261, 286,
7489 431, 320, 0, 120, 404, 295, 430, 430, 155, 430,
7490 430, 139, 310, 311, 465, 310, 367, 367, 56, 218,
7491 337, 344, 351, 352, 353, 354, 357, 460, 189, 337,
7492 461, 52, 396, 52, 102, 412, 101, 155, 139, 155,
7493 155, 344, 89, 90, 98, 153, 157, 347, 348, 52,
7494 99, 217, 268, 413, 414, 417, 289, 176, 171, 171,
7495 239, 292, 334, 335, 342, 343, 171, 189, 313, 29,
7496 123, 323, 437, 298, 301, 302, 303, 304, 306, 307,
7497 309, 312, 435, 437, 438, 443, 445, 171, 174, 344,
7498 460, 344, 355, 357, 460, 155, 152, 235, 124, 199,
7499 368, 351, 355, 349, 356, 357, 112, 360, 364, 367,
7500 367, 218, 337, 460, 337, 459, 351, 354, 358, 351,
7501 354, 358, 56, 98, 153, 457, 171, 163, 173, 291,
7502 289, 40, 41, 286, 160, 158, 324, 171, 430, 446,
7503 155, 446, 155, 308, 313, 300, 155, 305, 308, 99,
7504 268, 155, 308, 459, 155, 155, 350, 459, 155, 155,
7505 396, 459, 459, 459, 460, 460, 460, 52, 56, 244,
7506 52, 56, 372, 375, 339, 199, 199, 52, 314, 315,
7507 433, 174, 152, 301, 441, 304, 306, 437, 443, 139,
7508 268, 307, 443, 56, 98, 437, 356, 358, 356, 355,
7509 357, 460, 171, 155, 189, 286, 446, 155, 308, 155,
7510 308, 155, 308, 155, 308, 52, 56, 308, 155, 461,
7511 292, 340, 341, 315, 437, 437, 443, 437, 308, 308,
7512 155, 308, 308, 437, 308
7513};
7514
7515/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7516static const yytype_int16 yyr1[] =
7517{
7518 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7519 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7520 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7521 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7522 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7523 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7524 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7525 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7526 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7527 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7528 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7529 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7530 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7531 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7532 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7533 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7534 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7535 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7536 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7537 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7538 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7539 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7540 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7541 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7542 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7543 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7544 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7545 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7546 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7547 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7548 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7549 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7550 246, 246, 247, 248, 249, 249, 250, 250, 251, 251,
7551 251, 251, 252, 252, 253, 253, 254, 254, 254, 255,
7552 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7553 256, 255, 257, 255, 255, 255, 255, 255, 255, 255,
7554 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7555 255, 255, 255, 255, 258, 255, 259, 255, 255, 260,
7556 261, 255, 262, 255, 263, 255, 264, 255, 265, 255,
7557 266, 255, 255, 255, 255, 255, 267, 268, 269, 270,
7558 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
7559 281, 282, 283, 284, 285, 286, 286, 287, 288, 289,
7560 289, 289, 290, 290, 291, 291, 292, 292, 293, 293,
7561 294, 294, 295, 295, 296, 296, 296, 296, 296, 297,
7562 297, 298, 298, 299, 300, 301, 301, 302, 302, 303,
7563 303, 303, 303, 304, 305, 306, 307, 307, 308, 308,
7564 309, 309, 309, 309, 309, 309, 309, 309, 309, 309,
7565 309, 309, 309, 309, 309, 310, 310, 311, 312, 312,
7566 313, 313, 314, 314, 315, 315, 316, 317, 318, 319,
7567 320, 321, 322, 322, 323, 324, 323, 325, 326, 326,
7568 326, 326, 327, 327, 327, 327, 327, 327, 327, 327,
7569 328, 328, 329, 330, 331, 332, 333, 333, 333, 333,
7570 334, 335, 335, 336, 337, 338, 339, 340, 341, 341,
7571 342, 342, 342, 343, 343, 343, 343, 343, 343, 344,
7572 345, 345, 346, 346, 347, 348, 349, 349, 349, 349,
7573 349, 349, 349, 349, 349, 349, 349, 349, 349, 350,
7574 349, 349, 349, 351, 351, 351, 351, 351, 351, 352,
7575 352, 353, 353, 354, 355, 355, 356, 356, 357, 358,
7576 358, 358, 358, 359, 359, 360, 360, 361, 361, 362,
7577 362, 363, 364, 364, 365, 366, 366, 366, 366, 366,
7578 366, 365, 365, 365, 365, 367, 367, 367, 367, 367,
7579 367, 367, 367, 367, 367, 368, 369, 369, 370, 371,
7580 371, 371, 372, 372, 373, 373, 373, 374, 374, 375,
7581 375, 376, 376, 377, 378, 378, 378, 379, 380, 381,
7582 382, 382, 383, 384, 385, 385, 386, 386, 387, 388,
7583 389, 389, 390, 391, 392, 393, 394, 394, 395, 395,
7584 396, 396, 397, 397, 398, 398, 399, 400, 399, 401,
7585 402, 403, 399, 404, 404, 405, 405, 406, 406, 407,
7586 408, 408, 409, 410, 410, 411, 411, 411, 411, 412,
7587 412, 412, 413, 413, 413, 414, 414, 414, 414, 414,
7588 414, 414, 415, 415, 416, 416, 417, 417, 418, 419,
7589 419, 420, 420, 421, 422, 423, 422, 424, 424, 425,
7590 425, 426, 426, 426, 426, 427, 427, 428, 429, 429,
7591 430, 430, 431, 431, 431, 431, 431, 431, 431, 431,
7592 431, 431, 431, 431, 431, 431, 431, 432, 433, 433,
7593 433, 433, 434, 434, 435, 436, 436, 437, 437, 438,
7594 439, 439, 440, 441, 441, 442, 442, 443, 443, 444,
7595 444, 445, 445, 446, 446, 447, 448, 449, 450, 449,
7596 451, 451, 452, 452, 453, 453, 453, 453, 453, 453,
7597 454, 454, 454, 454, 455, 455, 455, 456, 456, 457,
7598 457, 458, 458, 459, 460, 461, 462, 462, 463, 463,
7599 464, 464, 465
7600};
7601
7602/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7603static const yytype_int8 yyr2[] =
7604{
7605 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7606 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7607 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7608 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7609 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7610 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7611 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7612 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7613 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7614 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7615 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7616 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7617 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7618 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7619 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7620 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7621 1, 1, 1, 0, 4, 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, 1, 1, 1, 1,
7627 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7628 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7629 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7630 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7631 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7632 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7633 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7634 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7635 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7636 1, 1, 1, 2, 4, 2, 1, 1, 2, 2,
7637 4, 1, 0, 2, 2, 1, 2, 1, 1, 1,
7638 3, 3, 2, 1, 1, 1, 3, 4, 2, 1,
7639 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7640 0, 4, 0, 4, 3, 3, 2, 3, 3, 1,
7641 4, 3, 1, 6, 4, 3, 2, 1, 2, 1,
7642 6, 6, 4, 4, 0, 6, 0, 5, 5, 0,
7643 0, 9, 0, 6, 0, 7, 0, 5, 0, 5,
7644 0, 5, 1, 1, 1, 1, 1, 1, 1, 1,
7645 1, 2, 2, 1, 2, 1, 1, 1, 1, 1,
7646 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7647 1, 2, 1, 1, 1, 5, 1, 2, 1, 1,
7648 1, 3, 1, 3, 1, 3, 5, 1, 3, 2,
7649 1, 1, 1, 0, 2, 2, 1, 1, 3, 4,
7650 2, 2, 1, 1, 1, 3, 1, 3, 2, 0,
7651 6, 8, 4, 6, 4, 2, 6, 2, 4, 6,
7652 2, 4, 2, 4, 1, 1, 1, 4, 0, 1,
7653 1, 4, 1, 3, 1, 1, 0, 0, 0, 0,
7654 0, 9, 4, 1, 3, 0, 4, 3, 2, 4,
7655 5, 5, 2, 4, 4, 3, 3, 2, 1, 4,
7656 3, 3, 0, 7, 0, 7, 1, 2, 3, 4,
7657 5, 1, 1, 0, 0, 0, 0, 9, 1, 1,
7658 1, 3, 3, 1, 2, 3, 1, 1, 1, 1,
7659 3, 1, 3, 1, 2, 2, 1, 1, 4, 4,
7660 4, 3, 4, 4, 4, 3, 3, 3, 2, 0,
7661 6, 2, 4, 1, 1, 2, 2, 4, 1, 2,
7662 3, 1, 3, 5, 2, 1, 1, 3, 1, 3,
7663 1, 2, 1, 1, 3, 2, 1, 1, 3, 2,
7664 1, 2, 1, 1, 1, 3, 3, 2, 2, 2,
7665 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7666 1, 1, 1, 1, 1, 1, 2, 2, 4, 2,
7667 3, 1, 6, 1, 1, 1, 1, 2, 1, 3,
7668 1, 1, 1, 1, 1, 1, 2, 3, 3, 3,
7669 1, 2, 4, 1, 0, 3, 1, 2, 4, 1,
7670 0, 3, 4, 1, 4, 1, 0, 3, 0, 3,
7671 0, 2, 0, 2, 0, 2, 1, 0, 3, 0,
7672 0, 0, 6, 1, 1, 1, 1, 1, 1, 2,
7673 1, 1, 3, 1, 2, 1, 1, 1, 1, 1,
7674 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7675 1, 1, 1, 1, 1, 1, 1, 1, 0, 4,
7676 1, 1, 1, 3, 1, 0, 3, 2, 1, 1,
7677 3, 4, 2, 2, 1, 1, 1, 3, 1, 3,
7678 2, 0, 6, 8, 4, 6, 4, 6, 2, 4,
7679 6, 2, 4, 2, 4, 1, 0, 1, 1, 1,
7680 1, 1, 1, 1, 1, 1, 3, 1, 3, 1,
7681 1, 1, 1, 2, 1, 1, 1, 2, 1, 1,
7682 1, 2, 1, 2, 1, 1, 1, 1, 0, 4,
7683 1, 2, 1, 3, 3, 2, 1, 4, 2, 1,
7684 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7685 1, 1, 1, 2, 2, 2, 1, 1, 1, 1,
7686 1, 2, 0
7687};
7688
7689
7690enum { YYENOMEM = -2 };
7691
7692#define yyerrok (yyerrstatus = 0)
7693#define yyclearin (yychar = YYEMPTY)
7694
7695#define YYACCEPT goto yyacceptlab
7696#define YYABORT goto yyabortlab
7697#define YYERROR goto yyerrorlab
7698#define YYNOMEM goto yyexhaustedlab
7699
7700
7701#define YYRECOVERING() (!!yyerrstatus)
7702
7703#define YYBACKUP(Token, Value) \
7704 do \
7705 if (yychar == YYEMPTY) \
7706 { \
7707 yychar = (Token); \
7708 yylval = (Value); \
7709 YYPOPSTACK (yylen); \
7710 yystate = *yyssp; \
7711 goto yybackup; \
7712 } \
7713 else \
7714 { \
7715 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7716 YYERROR; \
7717 } \
7718 while (0)
7719
7720/* Backward compatibility with an undocumented macro.
7721 Use YYerror or YYUNDEF. */
7722#define YYERRCODE YYUNDEF
7723
7724/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7725 If N is 0, then set CURRENT to the empty location which ends
7726 the previous symbol: RHS[0] (always defined). */
7727
7728#ifndef YYLLOC_DEFAULT
7729# define YYLLOC_DEFAULT(Current, Rhs, N) \
7730 do \
7731 if (N) \
7732 { \
7733 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7734 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7735 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7736 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7737 } \
7738 else \
7739 { \
7740 (Current).first_line = (Current).last_line = \
7741 YYRHSLOC (Rhs, 0).last_line; \
7742 (Current).first_column = (Current).last_column = \
7743 YYRHSLOC (Rhs, 0).last_column; \
7744 } \
7745 while (0)
7746#endif
7747
7748#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7749
7750
7751/* Enable debugging if requested. */
7752#if YYDEBUG
7753
7754# ifndef YYFPRINTF
7755# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7756# define YYFPRINTF fprintf
7757# endif
7758
7759# define YYDPRINTF(Args) \
7760do { \
7761 if (yydebug) \
7762 YYFPRINTF Args; \
7763} while (0)
7764
7765
7766/* YYLOCATION_PRINT -- Print the location on the stream.
7767 This macro was not mandated originally: define only if we know
7768 we won't break user code: when these are the locations we know. */
7769
7770# ifndef YYLOCATION_PRINT
7771
7772# if defined YY_LOCATION_PRINT
7773
7774 /* Temporary convenience wrapper in case some people defined the
7775 undocumented and private YY_LOCATION_PRINT macros. */
7776# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7777
7778# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7779
7780/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7781
7782YY_ATTRIBUTE_UNUSED
7783static int
7784yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7785{
7786 int res = 0;
7787 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7788 if (0 <= yylocp->first_line)
7789 {
7790 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7791 if (0 <= yylocp->first_column)
7792 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7793 }
7794 if (0 <= yylocp->last_line)
7795 {
7796 if (yylocp->first_line < yylocp->last_line)
7797 {
7798 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7799 if (0 <= end_col)
7800 res += YYFPRINTF (yyo, ".%d", end_col);
7801 }
7802 else if (0 <= end_col && yylocp->first_column < end_col)
7803 res += YYFPRINTF (yyo, "-%d", end_col);
7804 }
7805 return res;
7806}
7807
7808# define YYLOCATION_PRINT yy_location_print_
7809
7810 /* Temporary convenience wrapper in case some people defined the
7811 undocumented and private YY_LOCATION_PRINT macros. */
7812# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7813
7814# else
7815
7816# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7817 /* Temporary convenience wrapper in case some people defined the
7818 undocumented and private YY_LOCATION_PRINT macros. */
7819# define YY_LOCATION_PRINT YYLOCATION_PRINT
7820
7821# endif
7822# endif /* !defined YYLOCATION_PRINT */
7823
7824
7825# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7826do { \
7827 if (yydebug) \
7828 { \
7829 YYFPRINTF (stderr, "%s ", Title); \
7830 yy_symbol_print (stderr, \
7831 Kind, Value, Location, p); \
7832 YYFPRINTF (stderr, "\n"); \
7833 } \
7834} while (0)
7835
7836
7837/*-----------------------------------.
7838| Print this symbol's value on YYO. |
7839`-----------------------------------*/
7840
7841static void
7842yy_symbol_value_print (FILE *yyo,
7843 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7844{
7845 FILE *yyoutput = yyo;
7846 YY_USE (yyoutput);
7847 YY_USE (yylocationp);
7848 YY_USE (p);
7849 if (!yyvaluep)
7850 return;
7851 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7852switch (yykind)
7853 {
7854 case YYSYMBOL_keyword_class: /* "'class'" */
7855#line 2625 "parse.y"
7856 {
7857 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7858}
7859#line 7860 "parse.c"
7860 break;
7861
7862 case YYSYMBOL_keyword_module: /* "'module'" */
7863#line 2625 "parse.y"
7864 {
7865 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7866}
7867#line 7868 "parse.c"
7868 break;
7869
7870 case YYSYMBOL_keyword_def: /* "'def'" */
7871#line 2625 "parse.y"
7872 {
7873 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7874}
7875#line 7876 "parse.c"
7876 break;
7877
7878 case YYSYMBOL_keyword_undef: /* "'undef'" */
7879#line 2625 "parse.y"
7880 {
7881 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7882}
7883#line 7884 "parse.c"
7884 break;
7885
7886 case YYSYMBOL_keyword_begin: /* "'begin'" */
7887#line 2625 "parse.y"
7888 {
7889 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7890}
7891#line 7892 "parse.c"
7892 break;
7893
7894 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
7895#line 2625 "parse.y"
7896 {
7897 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7898}
7899#line 7900 "parse.c"
7900 break;
7901
7902 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
7903#line 2625 "parse.y"
7904 {
7905 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7906}
7907#line 7908 "parse.c"
7908 break;
7909
7910 case YYSYMBOL_keyword_end: /* "'end'" */
7911#line 2625 "parse.y"
7912 {
7913 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7914}
7915#line 7916 "parse.c"
7916 break;
7917
7918 case YYSYMBOL_keyword_if: /* "'if'" */
7919#line 2625 "parse.y"
7920 {
7921 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7922}
7923#line 7924 "parse.c"
7924 break;
7925
7926 case YYSYMBOL_keyword_unless: /* "'unless'" */
7927#line 2625 "parse.y"
7928 {
7929 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7930}
7931#line 7932 "parse.c"
7932 break;
7933
7934 case YYSYMBOL_keyword_then: /* "'then'" */
7935#line 2625 "parse.y"
7936 {
7937 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7938}
7939#line 7940 "parse.c"
7940 break;
7941
7942 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
7943#line 2625 "parse.y"
7944 {
7945 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7946}
7947#line 7948 "parse.c"
7948 break;
7949
7950 case YYSYMBOL_keyword_else: /* "'else'" */
7951#line 2625 "parse.y"
7952 {
7953 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7954}
7955#line 7956 "parse.c"
7956 break;
7957
7958 case YYSYMBOL_keyword_case: /* "'case'" */
7959#line 2625 "parse.y"
7960 {
7961 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7962}
7963#line 7964 "parse.c"
7964 break;
7965
7966 case YYSYMBOL_keyword_when: /* "'when'" */
7967#line 2625 "parse.y"
7968 {
7969 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7970}
7971#line 7972 "parse.c"
7972 break;
7973
7974 case YYSYMBOL_keyword_while: /* "'while'" */
7975#line 2625 "parse.y"
7976 {
7977 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7978}
7979#line 7980 "parse.c"
7980 break;
7981
7982 case YYSYMBOL_keyword_until: /* "'until'" */
7983#line 2625 "parse.y"
7984 {
7985 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7986}
7987#line 7988 "parse.c"
7988 break;
7989
7990 case YYSYMBOL_keyword_for: /* "'for'" */
7991#line 2625 "parse.y"
7992 {
7993 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7994}
7995#line 7996 "parse.c"
7996 break;
7997
7998 case YYSYMBOL_keyword_break: /* "'break'" */
7999#line 2625 "parse.y"
8000 {
8001 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8002}
8003#line 8004 "parse.c"
8004 break;
8005
8006 case YYSYMBOL_keyword_next: /* "'next'" */
8007#line 2625 "parse.y"
8008 {
8009 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8010}
8011#line 8012 "parse.c"
8012 break;
8013
8014 case YYSYMBOL_keyword_redo: /* "'redo'" */
8015#line 2625 "parse.y"
8016 {
8017 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8018}
8019#line 8020 "parse.c"
8020 break;
8021
8022 case YYSYMBOL_keyword_retry: /* "'retry'" */
8023#line 2625 "parse.y"
8024 {
8025 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8026}
8027#line 8028 "parse.c"
8028 break;
8029
8030 case YYSYMBOL_keyword_in: /* "'in'" */
8031#line 2625 "parse.y"
8032 {
8033 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8034}
8035#line 8036 "parse.c"
8036 break;
8037
8038 case YYSYMBOL_keyword_do: /* "'do'" */
8039#line 2625 "parse.y"
8040 {
8041 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8042}
8043#line 8044 "parse.c"
8044 break;
8045
8046 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8047#line 2625 "parse.y"
8048 {
8049 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8050}
8051#line 8052 "parse.c"
8052 break;
8053
8054 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8055#line 2625 "parse.y"
8056 {
8057 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8058}
8059#line 8060 "parse.c"
8060 break;
8061
8062 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8063#line 2625 "parse.y"
8064 {
8065 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8066}
8067#line 8068 "parse.c"
8068 break;
8069
8070 case YYSYMBOL_keyword_return: /* "'return'" */
8071#line 2625 "parse.y"
8072 {
8073 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8074}
8075#line 8076 "parse.c"
8076 break;
8077
8078 case YYSYMBOL_keyword_yield: /* "'yield'" */
8079#line 2625 "parse.y"
8080 {
8081 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8082}
8083#line 8084 "parse.c"
8084 break;
8085
8086 case YYSYMBOL_keyword_super: /* "'super'" */
8087#line 2625 "parse.y"
8088 {
8089 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8090}
8091#line 8092 "parse.c"
8092 break;
8093
8094 case YYSYMBOL_keyword_self: /* "'self'" */
8095#line 2625 "parse.y"
8096 {
8097 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8098}
8099#line 8100 "parse.c"
8100 break;
8101
8102 case YYSYMBOL_keyword_nil: /* "'nil'" */
8103#line 2625 "parse.y"
8104 {
8105 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8106}
8107#line 8108 "parse.c"
8108 break;
8109
8110 case YYSYMBOL_keyword_true: /* "'true'" */
8111#line 2625 "parse.y"
8112 {
8113 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8114}
8115#line 8116 "parse.c"
8116 break;
8117
8118 case YYSYMBOL_keyword_false: /* "'false'" */
8119#line 2625 "parse.y"
8120 {
8121 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8122}
8123#line 8124 "parse.c"
8124 break;
8125
8126 case YYSYMBOL_keyword_and: /* "'and'" */
8127#line 2625 "parse.y"
8128 {
8129 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8130}
8131#line 8132 "parse.c"
8132 break;
8133
8134 case YYSYMBOL_keyword_or: /* "'or'" */
8135#line 2625 "parse.y"
8136 {
8137 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8138}
8139#line 8140 "parse.c"
8140 break;
8141
8142 case YYSYMBOL_keyword_not: /* "'not'" */
8143#line 2625 "parse.y"
8144 {
8145 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8146}
8147#line 8148 "parse.c"
8148 break;
8149
8150 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8151#line 2625 "parse.y"
8152 {
8153 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8154}
8155#line 8156 "parse.c"
8156 break;
8157
8158 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8159#line 2625 "parse.y"
8160 {
8161 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8162}
8163#line 8164 "parse.c"
8164 break;
8165
8166 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8167#line 2625 "parse.y"
8168 {
8169 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8170}
8171#line 8172 "parse.c"
8172 break;
8173
8174 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8175#line 2625 "parse.y"
8176 {
8177 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8178}
8179#line 8180 "parse.c"
8180 break;
8181
8182 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8183#line 2625 "parse.y"
8184 {
8185 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8186}
8187#line 8188 "parse.c"
8188 break;
8189
8190 case YYSYMBOL_keyword_alias: /* "'alias'" */
8191#line 2625 "parse.y"
8192 {
8193 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8194}
8195#line 8196 "parse.c"
8196 break;
8197
8198 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8199#line 2625 "parse.y"
8200 {
8201 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8202}
8203#line 8204 "parse.c"
8204 break;
8205
8206 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8207#line 2625 "parse.y"
8208 {
8209 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8210}
8211#line 8212 "parse.c"
8212 break;
8213
8214 case YYSYMBOL_keyword_END: /* "'END'" */
8215#line 2625 "parse.y"
8216 {
8217 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8218}
8219#line 8220 "parse.c"
8220 break;
8221
8222 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8223#line 2625 "parse.y"
8224 {
8225 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8226}
8227#line 8228 "parse.c"
8228 break;
8229
8230 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8231#line 2625 "parse.y"
8232 {
8233 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8234}
8235#line 8236 "parse.c"
8236 break;
8237
8238 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8239#line 2625 "parse.y"
8240 {
8241 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8242}
8243#line 8244 "parse.c"
8244 break;
8245
8246 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8247#line 2625 "parse.y"
8248 {
8249 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8250}
8251#line 8252 "parse.c"
8252 break;
8253
8254 case YYSYMBOL_tFID: /* "method" */
8255#line 2625 "parse.y"
8256 {
8257 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8258}
8259#line 8260 "parse.c"
8260 break;
8261
8262 case YYSYMBOL_tGVAR: /* "global variable" */
8263#line 2625 "parse.y"
8264 {
8265 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8266}
8267#line 8268 "parse.c"
8268 break;
8269
8270 case YYSYMBOL_tIVAR: /* "instance variable" */
8271#line 2625 "parse.y"
8272 {
8273 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8274}
8275#line 8276 "parse.c"
8276 break;
8277
8278 case YYSYMBOL_tCONSTANT: /* "constant" */
8279#line 2625 "parse.y"
8280 {
8281 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8282}
8283#line 8284 "parse.c"
8284 break;
8285
8286 case YYSYMBOL_tCVAR: /* "class variable" */
8287#line 2625 "parse.y"
8288 {
8289 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8290}
8291#line 8292 "parse.c"
8292 break;
8293
8294 case YYSYMBOL_tLABEL: /* "label" */
8295#line 2625 "parse.y"
8296 {
8297 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8298}
8299#line 8300 "parse.c"
8300 break;
8301
8302 case YYSYMBOL_tINTEGER: /* "integer literal" */
8303#line 2628 "parse.y"
8304 {
8305 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8306 case NODE_INTEGER:
8307 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8308 break;
8309 case NODE_FLOAT:
8310 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8311 break;
8312 case NODE_RATIONAL:
8313 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8314 break;
8315 case NODE_IMAGINARY:
8316 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8317 break;
8318 default:
8319 break;
8320 }
8321}
8322#line 8323 "parse.c"
8323 break;
8324
8325 case YYSYMBOL_tFLOAT: /* "float literal" */
8326#line 2628 "parse.y"
8327 {
8328 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8329 case NODE_INTEGER:
8330 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8331 break;
8332 case NODE_FLOAT:
8333 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8334 break;
8335 case NODE_RATIONAL:
8336 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8337 break;
8338 case NODE_IMAGINARY:
8339 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8340 break;
8341 default:
8342 break;
8343 }
8344}
8345#line 8346 "parse.c"
8346 break;
8347
8348 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8349#line 2628 "parse.y"
8350 {
8351 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8352 case NODE_INTEGER:
8353 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8354 break;
8355 case NODE_FLOAT:
8356 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8357 break;
8358 case NODE_RATIONAL:
8359 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8360 break;
8361 case NODE_IMAGINARY:
8362 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8363 break;
8364 default:
8365 break;
8366 }
8367}
8368#line 8369 "parse.c"
8369 break;
8370
8371 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8372#line 2628 "parse.y"
8373 {
8374 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8375 case NODE_INTEGER:
8376 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8377 break;
8378 case NODE_FLOAT:
8379 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8380 break;
8381 case NODE_RATIONAL:
8382 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8383 break;
8384 case NODE_IMAGINARY:
8385 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8386 break;
8387 default:
8388 break;
8389 }
8390}
8391#line 8392 "parse.c"
8392 break;
8393
8394 case YYSYMBOL_tCHAR: /* "char literal" */
8395#line 2628 "parse.y"
8396 {
8397 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8398 case NODE_INTEGER:
8399 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8400 break;
8401 case NODE_FLOAT:
8402 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8403 break;
8404 case NODE_RATIONAL:
8405 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8406 break;
8407 case NODE_IMAGINARY:
8408 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8409 break;
8410 default:
8411 break;
8412 }
8413}
8414#line 8415 "parse.c"
8415 break;
8416
8417 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8418#line 2646 "parse.y"
8419 {
8420 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8421}
8422#line 8423 "parse.c"
8423 break;
8424
8425 case YYSYMBOL_tBACK_REF: /* "back reference" */
8426#line 2649 "parse.y"
8427 {
8428 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8429}
8430#line 8431 "parse.c"
8431 break;
8432
8433 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8434#line 2628 "parse.y"
8435 {
8436 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8437 case NODE_INTEGER:
8438 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8439 break;
8440 case NODE_FLOAT:
8441 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8442 break;
8443 case NODE_RATIONAL:
8444 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8445 break;
8446 case NODE_IMAGINARY:
8447 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8448 break;
8449 default:
8450 break;
8451 }
8452}
8453#line 8454 "parse.c"
8454 break;
8455
8456 case YYSYMBOL_69_: /* '.' */
8457#line 2625 "parse.y"
8458 {
8459 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8460}
8461#line 8462 "parse.c"
8462 break;
8463
8464 case YYSYMBOL_70_backslash_: /* "backslash" */
8465#line 2625 "parse.y"
8466 {
8467 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8468}
8469#line 8470 "parse.c"
8470 break;
8471
8472 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8473#line 2625 "parse.y"
8474 {
8475 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8476}
8477#line 8478 "parse.c"
8478 break;
8479
8480 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8481#line 2625 "parse.y"
8482 {
8483 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8484}
8485#line 8486 "parse.c"
8486 break;
8487
8488 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8489#line 2625 "parse.y"
8490 {
8491 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8492}
8493#line 8494 "parse.c"
8494 break;
8495
8496 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8497#line 2625 "parse.y"
8498 {
8499 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8500}
8501#line 8502 "parse.c"
8502 break;
8503
8504 case YYSYMBOL_tANDDOT: /* "&." */
8505#line 2625 "parse.y"
8506 {
8507 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8508}
8509#line 8510 "parse.c"
8510 break;
8511
8512 case YYSYMBOL_tCOLON2: /* "::" */
8513#line 2625 "parse.y"
8514 {
8515 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8516}
8517#line 8518 "parse.c"
8518 break;
8519
8520 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8521#line 2625 "parse.y"
8522 {
8523 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8524}
8525#line 8526 "parse.c"
8526 break;
8527
8528 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8529#line 2616 "parse.y"
8530 {
8531 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8532 rb_parser_printf(p, "NODE_SPECIAL");
8533 }
8534 else if (((*yyvaluep).node)) {
8535 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8536 }
8537}
8538#line 8539 "parse.c"
8539 break;
8540
8541 case YYSYMBOL_top_stmts: /* top_stmts */
8542#line 2616 "parse.y"
8543 {
8544 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8545 rb_parser_printf(p, "NODE_SPECIAL");
8546 }
8547 else if (((*yyvaluep).node)) {
8548 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8549 }
8550}
8551#line 8552 "parse.c"
8552 break;
8553
8554 case YYSYMBOL_top_stmt: /* top_stmt */
8555#line 2616 "parse.y"
8556 {
8557 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8558 rb_parser_printf(p, "NODE_SPECIAL");
8559 }
8560 else if (((*yyvaluep).node)) {
8561 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8562 }
8563}
8564#line 8565 "parse.c"
8565 break;
8566
8567 case YYSYMBOL_block_open: /* block_open */
8568#line 2616 "parse.y"
8569 {
8570 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8571 rb_parser_printf(p, "NODE_SPECIAL");
8572 }
8573 else if (((*yyvaluep).node_exits)) {
8574 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8575 }
8576}
8577#line 8578 "parse.c"
8578 break;
8579
8580 case YYSYMBOL_begin_block: /* begin_block */
8581#line 2616 "parse.y"
8582 {
8583 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8584 rb_parser_printf(p, "NODE_SPECIAL");
8585 }
8586 else if (((*yyvaluep).node)) {
8587 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8588 }
8589}
8590#line 8591 "parse.c"
8591 break;
8592
8593 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8594#line 2616 "parse.y"
8595 {
8596 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8597 rb_parser_printf(p, "NODE_SPECIAL");
8598 }
8599 else if (((*yyvaluep).node)) {
8600 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8601 }
8602}
8603#line 8604 "parse.c"
8604 break;
8605
8606 case YYSYMBOL_bodystmt: /* bodystmt */
8607#line 2616 "parse.y"
8608 {
8609 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8610 rb_parser_printf(p, "NODE_SPECIAL");
8611 }
8612 else if (((*yyvaluep).node)) {
8613 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8614 }
8615}
8616#line 8617 "parse.c"
8617 break;
8618
8619 case YYSYMBOL_stmts: /* stmts */
8620#line 2616 "parse.y"
8621 {
8622 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8623 rb_parser_printf(p, "NODE_SPECIAL");
8624 }
8625 else if (((*yyvaluep).node)) {
8626 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8627 }
8628}
8629#line 8630 "parse.c"
8630 break;
8631
8632 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8633#line 2616 "parse.y"
8634 {
8635 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8636 rb_parser_printf(p, "NODE_SPECIAL");
8637 }
8638 else if (((*yyvaluep).node)) {
8639 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8640 }
8641}
8642#line 8643 "parse.c"
8643 break;
8644
8645 case YYSYMBOL_allow_exits: /* allow_exits */
8646#line 2616 "parse.y"
8647 {
8648 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8649 rb_parser_printf(p, "NODE_SPECIAL");
8650 }
8651 else if (((*yyvaluep).node_exits)) {
8652 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8653 }
8654}
8655#line 8656 "parse.c"
8656 break;
8657
8658 case YYSYMBOL_stmt: /* stmt */
8659#line 2616 "parse.y"
8660 {
8661 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8662 rb_parser_printf(p, "NODE_SPECIAL");
8663 }
8664 else if (((*yyvaluep).node)) {
8665 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8666 }
8667}
8668#line 8669 "parse.c"
8669 break;
8670
8671 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8672#line 2616 "parse.y"
8673 {
8674 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8675 rb_parser_printf(p, "NODE_SPECIAL");
8676 }
8677 else if (((*yyvaluep).node)) {
8678 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8679 }
8680}
8681#line 8682 "parse.c"
8682 break;
8683
8684 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8685#line 2616 "parse.y"
8686 {
8687 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8688 rb_parser_printf(p, "NODE_SPECIAL");
8689 }
8690 else if (((*yyvaluep).node)) {
8691 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8692 }
8693}
8694#line 8695 "parse.c"
8695 break;
8696
8697 case YYSYMBOL_command_asgn: /* command_asgn */
8698#line 2616 "parse.y"
8699 {
8700 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8701 rb_parser_printf(p, "NODE_SPECIAL");
8702 }
8703 else if (((*yyvaluep).node)) {
8704 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8705 }
8706}
8707#line 8708 "parse.c"
8708 break;
8709
8710 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8711#line 2616 "parse.y"
8712 {
8713 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8714 rb_parser_printf(p, "NODE_SPECIAL");
8715 }
8716 else if (((*yyvaluep).node)) {
8717 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8718 }
8719}
8720#line 8721 "parse.c"
8721 break;
8722
8723 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8724#line 2616 "parse.y"
8725 {
8726 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8727 rb_parser_printf(p, "NODE_SPECIAL");
8728 }
8729 else if (((*yyvaluep).node)) {
8730 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8731 }
8732}
8733#line 8734 "parse.c"
8734 break;
8735
8736 case YYSYMBOL_endless_command: /* endless_command */
8737#line 2616 "parse.y"
8738 {
8739 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8740 rb_parser_printf(p, "NODE_SPECIAL");
8741 }
8742 else if (((*yyvaluep).node)) {
8743 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8744 }
8745}
8746#line 8747 "parse.c"
8747 break;
8748
8749 case YYSYMBOL_command_rhs: /* command_rhs */
8750#line 2616 "parse.y"
8751 {
8752 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8753 rb_parser_printf(p, "NODE_SPECIAL");
8754 }
8755 else if (((*yyvaluep).node)) {
8756 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8757 }
8758}
8759#line 8760 "parse.c"
8760 break;
8761
8762 case YYSYMBOL_expr: /* expr */
8763#line 2616 "parse.y"
8764 {
8765 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8766 rb_parser_printf(p, "NODE_SPECIAL");
8767 }
8768 else if (((*yyvaluep).node)) {
8769 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8770 }
8771}
8772#line 8773 "parse.c"
8773 break;
8774
8775 case YYSYMBOL_def_name: /* def_name */
8776#line 2625 "parse.y"
8777 {
8778 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8779}
8780#line 8781 "parse.c"
8781 break;
8782
8783 case YYSYMBOL_defn_head: /* defn_head */
8784#line 2616 "parse.y"
8785 {
8786 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8787 rb_parser_printf(p, "NODE_SPECIAL");
8788 }
8789 else if (((*yyvaluep).node_def_temp)) {
8790 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8791 }
8792}
8793#line 8794 "parse.c"
8794 break;
8795
8796 case YYSYMBOL_defs_head: /* defs_head */
8797#line 2616 "parse.y"
8798 {
8799 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8800 rb_parser_printf(p, "NODE_SPECIAL");
8801 }
8802 else if (((*yyvaluep).node_def_temp)) {
8803 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8804 }
8805}
8806#line 8807 "parse.c"
8807 break;
8808
8809 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8810#line 2616 "parse.y"
8811 {
8812 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8813 rb_parser_printf(p, "NODE_SPECIAL");
8814 }
8815 else if (((*yyvaluep).node)) {
8816 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8817 }
8818}
8819#line 8820 "parse.c"
8820 break;
8821
8822 case YYSYMBOL_expr_value: /* expr_value */
8823#line 2616 "parse.y"
8824 {
8825 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8826 rb_parser_printf(p, "NODE_SPECIAL");
8827 }
8828 else if (((*yyvaluep).node)) {
8829 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8830 }
8831}
8832#line 8833 "parse.c"
8833 break;
8834
8835 case YYSYMBOL_expr_value_do: /* expr_value_do */
8836#line 2616 "parse.y"
8837 {
8838 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8839 rb_parser_printf(p, "NODE_SPECIAL");
8840 }
8841 else if (((*yyvaluep).node)) {
8842 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8843 }
8844}
8845#line 8846 "parse.c"
8846 break;
8847
8848 case YYSYMBOL_command_call: /* command_call */
8849#line 2616 "parse.y"
8850 {
8851 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8852 rb_parser_printf(p, "NODE_SPECIAL");
8853 }
8854 else if (((*yyvaluep).node)) {
8855 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8856 }
8857}
8858#line 8859 "parse.c"
8859 break;
8860
8861 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
8862#line 2616 "parse.y"
8863 {
8864 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8865 rb_parser_printf(p, "NODE_SPECIAL");
8866 }
8867 else if (((*yyvaluep).node)) {
8868 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8869 }
8870}
8871#line 8872 "parse.c"
8872 break;
8873
8874 case YYSYMBOL_command_call_value: /* command_call_value */
8875#line 2616 "parse.y"
8876 {
8877 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8878 rb_parser_printf(p, "NODE_SPECIAL");
8879 }
8880 else if (((*yyvaluep).node)) {
8881 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8882 }
8883}
8884#line 8885 "parse.c"
8885 break;
8886
8887 case YYSYMBOL_block_command: /* block_command */
8888#line 2616 "parse.y"
8889 {
8890 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8891 rb_parser_printf(p, "NODE_SPECIAL");
8892 }
8893 else if (((*yyvaluep).node)) {
8894 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8895 }
8896}
8897#line 8898 "parse.c"
8898 break;
8899
8900 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
8901#line 2616 "parse.y"
8902 {
8903 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8904 rb_parser_printf(p, "NODE_SPECIAL");
8905 }
8906 else if (((*yyvaluep).node)) {
8907 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8908 }
8909}
8910#line 8911 "parse.c"
8911 break;
8912
8913 case YYSYMBOL_fcall: /* fcall */
8914#line 2616 "parse.y"
8915 {
8916 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8917 rb_parser_printf(p, "NODE_SPECIAL");
8918 }
8919 else if (((*yyvaluep).node_fcall)) {
8920 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8921 }
8922}
8923#line 8924 "parse.c"
8924 break;
8925
8926 case YYSYMBOL_command: /* command */
8927#line 2616 "parse.y"
8928 {
8929 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8930 rb_parser_printf(p, "NODE_SPECIAL");
8931 }
8932 else if (((*yyvaluep).node)) {
8933 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8934 }
8935}
8936#line 8937 "parse.c"
8937 break;
8938
8939 case YYSYMBOL_mlhs: /* mlhs */
8940#line 2616 "parse.y"
8941 {
8942 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8943 rb_parser_printf(p, "NODE_SPECIAL");
8944 }
8945 else if (((*yyvaluep).node_masgn)) {
8946 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8947 }
8948}
8949#line 8950 "parse.c"
8950 break;
8951
8952 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
8953#line 2616 "parse.y"
8954 {
8955 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8956 rb_parser_printf(p, "NODE_SPECIAL");
8957 }
8958 else if (((*yyvaluep).node_masgn)) {
8959 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8960 }
8961}
8962#line 8963 "parse.c"
8963 break;
8964
8965 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
8966#line 2616 "parse.y"
8967 {
8968 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8969 rb_parser_printf(p, "NODE_SPECIAL");
8970 }
8971 else if (((*yyvaluep).node_masgn)) {
8972 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8973 }
8974}
8975#line 8976 "parse.c"
8976 break;
8977
8978 case YYSYMBOL_mlhs_mlhs_item: /* mlhs_mlhs_item */
8979#line 2616 "parse.y"
8980 {
8981 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8982 rb_parser_printf(p, "NODE_SPECIAL");
8983 }
8984 else if (((*yyvaluep).node)) {
8985 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8986 }
8987}
8988#line 8989 "parse.c"
8989 break;
8990
8991 case YYSYMBOL_mlhs_item: /* mlhs_item */
8992#line 2616 "parse.y"
8993 {
8994 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8995 rb_parser_printf(p, "NODE_SPECIAL");
8996 }
8997 else if (((*yyvaluep).node)) {
8998 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8999 }
9000}
9001#line 9002 "parse.c"
9002 break;
9003
9004 case YYSYMBOL_mlhs_head: /* mlhs_head */
9005#line 2616 "parse.y"
9006 {
9007 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9008 rb_parser_printf(p, "NODE_SPECIAL");
9009 }
9010 else if (((*yyvaluep).node)) {
9011 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9012 }
9013}
9014#line 9015 "parse.c"
9015 break;
9016
9017 case YYSYMBOL_mlhs_node: /* mlhs_node */
9018#line 2616 "parse.y"
9019 {
9020 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9021 rb_parser_printf(p, "NODE_SPECIAL");
9022 }
9023 else if (((*yyvaluep).node)) {
9024 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9025 }
9026}
9027#line 9028 "parse.c"
9028 break;
9029
9030 case YYSYMBOL_lhs: /* lhs */
9031#line 2616 "parse.y"
9032 {
9033 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9034 rb_parser_printf(p, "NODE_SPECIAL");
9035 }
9036 else if (((*yyvaluep).node)) {
9037 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9038 }
9039}
9040#line 9041 "parse.c"
9041 break;
9042
9043 case YYSYMBOL_cname: /* cname */
9044#line 2625 "parse.y"
9045 {
9046 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9047}
9048#line 9049 "parse.c"
9049 break;
9050
9051 case YYSYMBOL_cpath: /* cpath */
9052#line 2616 "parse.y"
9053 {
9054 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9055 rb_parser_printf(p, "NODE_SPECIAL");
9056 }
9057 else if (((*yyvaluep).node)) {
9058 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9059 }
9060}
9061#line 9062 "parse.c"
9062 break;
9063
9064 case YYSYMBOL_fname: /* fname */
9065#line 2625 "parse.y"
9066 {
9067 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9068}
9069#line 9070 "parse.c"
9070 break;
9071
9072 case YYSYMBOL_fitem: /* fitem */
9073#line 2616 "parse.y"
9074 {
9075 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9076 rb_parser_printf(p, "NODE_SPECIAL");
9077 }
9078 else if (((*yyvaluep).node)) {
9079 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9080 }
9081}
9082#line 9083 "parse.c"
9083 break;
9084
9085 case YYSYMBOL_undef_list: /* undef_list */
9086#line 2616 "parse.y"
9087 {
9088 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9089 rb_parser_printf(p, "NODE_SPECIAL");
9090 }
9091 else if (((*yyvaluep).node)) {
9092 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9093 }
9094}
9095#line 9096 "parse.c"
9096 break;
9097
9098 case YYSYMBOL_op: /* op */
9099#line 2625 "parse.y"
9100 {
9101 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9102}
9103#line 9104 "parse.c"
9104 break;
9105
9106 case YYSYMBOL_reswords: /* reswords */
9107#line 2625 "parse.y"
9108 {
9109 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9110}
9111#line 9112 "parse.c"
9112 break;
9113
9114 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9115#line 2616 "parse.y"
9116 {
9117 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9118 rb_parser_printf(p, "NODE_SPECIAL");
9119 }
9120 else if (((*yyvaluep).node)) {
9121 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9122 }
9123}
9124#line 9125 "parse.c"
9125 break;
9126
9127 case YYSYMBOL_arg: /* arg */
9128#line 2616 "parse.y"
9129 {
9130 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9131 rb_parser_printf(p, "NODE_SPECIAL");
9132 }
9133 else if (((*yyvaluep).node)) {
9134 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9135 }
9136}
9137#line 9138 "parse.c"
9138 break;
9139
9140 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9141#line 2616 "parse.y"
9142 {
9143 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9144 rb_parser_printf(p, "NODE_SPECIAL");
9145 }
9146 else if (((*yyvaluep).node)) {
9147 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9148 }
9149}
9150#line 9151 "parse.c"
9151 break;
9152
9153 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9154#line 2616 "parse.y"
9155 {
9156 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9157 rb_parser_printf(p, "NODE_SPECIAL");
9158 }
9159 else if (((*yyvaluep).node)) {
9160 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9161 }
9162}
9163#line 9164 "parse.c"
9164 break;
9165
9166 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9167#line 2616 "parse.y"
9168 {
9169 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9170 rb_parser_printf(p, "NODE_SPECIAL");
9171 }
9172 else if (((*yyvaluep).node)) {
9173 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9174 }
9175}
9176#line 9177 "parse.c"
9177 break;
9178
9179 case YYSYMBOL_ternary: /* ternary */
9180#line 2616 "parse.y"
9181 {
9182 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9183 rb_parser_printf(p, "NODE_SPECIAL");
9184 }
9185 else if (((*yyvaluep).node)) {
9186 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9187 }
9188}
9189#line 9190 "parse.c"
9190 break;
9191
9192 case YYSYMBOL_endless_arg: /* endless_arg */
9193#line 2616 "parse.y"
9194 {
9195 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9196 rb_parser_printf(p, "NODE_SPECIAL");
9197 }
9198 else if (((*yyvaluep).node)) {
9199 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9200 }
9201}
9202#line 9203 "parse.c"
9203 break;
9204
9205 case YYSYMBOL_relop: /* relop */
9206#line 2625 "parse.y"
9207 {
9208 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9209}
9210#line 9211 "parse.c"
9211 break;
9212
9213 case YYSYMBOL_rel_expr: /* rel_expr */
9214#line 2616 "parse.y"
9215 {
9216 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9217 rb_parser_printf(p, "NODE_SPECIAL");
9218 }
9219 else if (((*yyvaluep).node)) {
9220 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9221 }
9222}
9223#line 9224 "parse.c"
9224 break;
9225
9226 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9227#line 2616 "parse.y"
9228 {
9229 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9230 rb_parser_printf(p, "NODE_SPECIAL");
9231 }
9232 else if (((*yyvaluep).node)) {
9233 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9234 }
9235}
9236#line 9237 "parse.c"
9237 break;
9238
9239 case YYSYMBOL_arg_value: /* arg_value */
9240#line 2616 "parse.y"
9241 {
9242 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9243 rb_parser_printf(p, "NODE_SPECIAL");
9244 }
9245 else if (((*yyvaluep).node)) {
9246 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9247 }
9248}
9249#line 9250 "parse.c"
9250 break;
9251
9252 case YYSYMBOL_aref_args: /* aref_args */
9253#line 2616 "parse.y"
9254 {
9255 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9256 rb_parser_printf(p, "NODE_SPECIAL");
9257 }
9258 else if (((*yyvaluep).node)) {
9259 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9260 }
9261}
9262#line 9263 "parse.c"
9263 break;
9264
9265 case YYSYMBOL_arg_rhs: /* arg_rhs */
9266#line 2616 "parse.y"
9267 {
9268 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9269 rb_parser_printf(p, "NODE_SPECIAL");
9270 }
9271 else if (((*yyvaluep).node)) {
9272 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9273 }
9274}
9275#line 9276 "parse.c"
9276 break;
9277
9278 case YYSYMBOL_paren_args: /* paren_args */
9279#line 2616 "parse.y"
9280 {
9281 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9282 rb_parser_printf(p, "NODE_SPECIAL");
9283 }
9284 else if (((*yyvaluep).node)) {
9285 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9286 }
9287}
9288#line 9289 "parse.c"
9289 break;
9290
9291 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9292#line 2616 "parse.y"
9293 {
9294 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9295 rb_parser_printf(p, "NODE_SPECIAL");
9296 }
9297 else if (((*yyvaluep).node)) {
9298 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9299 }
9300}
9301#line 9302 "parse.c"
9302 break;
9303
9304 case YYSYMBOL_opt_call_args: /* opt_call_args */
9305#line 2616 "parse.y"
9306 {
9307 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9308 rb_parser_printf(p, "NODE_SPECIAL");
9309 }
9310 else if (((*yyvaluep).node)) {
9311 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9312 }
9313}
9314#line 9315 "parse.c"
9315 break;
9316
9317 case YYSYMBOL_value_expr_command: /* value_expr_command */
9318#line 2616 "parse.y"
9319 {
9320 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9321 rb_parser_printf(p, "NODE_SPECIAL");
9322 }
9323 else if (((*yyvaluep).node)) {
9324 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9325 }
9326}
9327#line 9328 "parse.c"
9328 break;
9329
9330 case YYSYMBOL_call_args: /* call_args */
9331#line 2616 "parse.y"
9332 {
9333 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9334 rb_parser_printf(p, "NODE_SPECIAL");
9335 }
9336 else if (((*yyvaluep).node)) {
9337 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9338 }
9339}
9340#line 9341 "parse.c"
9341 break;
9342
9343 case YYSYMBOL_command_args: /* command_args */
9344#line 2616 "parse.y"
9345 {
9346 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9347 rb_parser_printf(p, "NODE_SPECIAL");
9348 }
9349 else if (((*yyvaluep).node)) {
9350 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9351 }
9352}
9353#line 9354 "parse.c"
9354 break;
9355
9356 case YYSYMBOL_block_arg: /* block_arg */
9357#line 2616 "parse.y"
9358 {
9359 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9360 rb_parser_printf(p, "NODE_SPECIAL");
9361 }
9362 else if (((*yyvaluep).node_block_pass)) {
9363 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9364 }
9365}
9366#line 9367 "parse.c"
9367 break;
9368
9369 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9370#line 2616 "parse.y"
9371 {
9372 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9373 rb_parser_printf(p, "NODE_SPECIAL");
9374 }
9375 else if (((*yyvaluep).node_block_pass)) {
9376 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9377 }
9378}
9379#line 9380 "parse.c"
9380 break;
9381
9382 case YYSYMBOL_args: /* args */
9383#line 2616 "parse.y"
9384 {
9385 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9386 rb_parser_printf(p, "NODE_SPECIAL");
9387 }
9388 else if (((*yyvaluep).node)) {
9389 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9390 }
9391}
9392#line 9393 "parse.c"
9393 break;
9394
9395 case YYSYMBOL_arg_splat: /* arg_splat */
9396#line 2616 "parse.y"
9397 {
9398 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9399 rb_parser_printf(p, "NODE_SPECIAL");
9400 }
9401 else if (((*yyvaluep).node)) {
9402 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9403 }
9404}
9405#line 9406 "parse.c"
9406 break;
9407
9408 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9409#line 2616 "parse.y"
9410 {
9411 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9412 rb_parser_printf(p, "NODE_SPECIAL");
9413 }
9414 else if (((*yyvaluep).node)) {
9415 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9416 }
9417}
9418#line 9419 "parse.c"
9419 break;
9420
9421 case YYSYMBOL_mrhs: /* mrhs */
9422#line 2616 "parse.y"
9423 {
9424 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9425 rb_parser_printf(p, "NODE_SPECIAL");
9426 }
9427 else if (((*yyvaluep).node)) {
9428 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9429 }
9430}
9431#line 9432 "parse.c"
9432 break;
9433
9434 case YYSYMBOL_primary: /* primary */
9435#line 2616 "parse.y"
9436 {
9437 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9438 rb_parser_printf(p, "NODE_SPECIAL");
9439 }
9440 else if (((*yyvaluep).node)) {
9441 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9442 }
9443}
9444#line 9445 "parse.c"
9445 break;
9446
9447 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9448#line 2616 "parse.y"
9449 {
9450 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9451 rb_parser_printf(p, "NODE_SPECIAL");
9452 }
9453 else if (((*yyvaluep).node)) {
9454 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9455 }
9456}
9457#line 9458 "parse.c"
9458 break;
9459
9460 case YYSYMBOL_primary_value: /* primary_value */
9461#line 2616 "parse.y"
9462 {
9463 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9464 rb_parser_printf(p, "NODE_SPECIAL");
9465 }
9466 else if (((*yyvaluep).node)) {
9467 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9468 }
9469}
9470#line 9471 "parse.c"
9471 break;
9472
9473 case YYSYMBOL_k_while: /* k_while */
9474#line 2616 "parse.y"
9475 {
9476 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9477 rb_parser_printf(p, "NODE_SPECIAL");
9478 }
9479 else if (((*yyvaluep).node_exits)) {
9480 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9481 }
9482}
9483#line 9484 "parse.c"
9484 break;
9485
9486 case YYSYMBOL_k_until: /* k_until */
9487#line 2616 "parse.y"
9488 {
9489 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9490 rb_parser_printf(p, "NODE_SPECIAL");
9491 }
9492 else if (((*yyvaluep).node_exits)) {
9493 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9494 }
9495}
9496#line 9497 "parse.c"
9497 break;
9498
9499 case YYSYMBOL_k_for: /* k_for */
9500#line 2616 "parse.y"
9501 {
9502 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9503 rb_parser_printf(p, "NODE_SPECIAL");
9504 }
9505 else if (((*yyvaluep).node_exits)) {
9506 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9507 }
9508}
9509#line 9510 "parse.c"
9510 break;
9511
9512 case YYSYMBOL_k_def: /* k_def */
9513#line 2616 "parse.y"
9514 {
9515 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9516 rb_parser_printf(p, "NODE_SPECIAL");
9517 }
9518 else if (((*yyvaluep).node_def_temp)) {
9519 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9520 }
9521}
9522#line 9523 "parse.c"
9523 break;
9524
9525 case YYSYMBOL_do: /* do */
9526#line 2625 "parse.y"
9527 {
9528 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9529}
9530#line 9531 "parse.c"
9531 break;
9532
9533 case YYSYMBOL_if_tail: /* if_tail */
9534#line 2616 "parse.y"
9535 {
9536 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9537 rb_parser_printf(p, "NODE_SPECIAL");
9538 }
9539 else if (((*yyvaluep).node)) {
9540 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9541 }
9542}
9543#line 9544 "parse.c"
9544 break;
9545
9546 case YYSYMBOL_opt_else: /* opt_else */
9547#line 2616 "parse.y"
9548 {
9549 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9550 rb_parser_printf(p, "NODE_SPECIAL");
9551 }
9552 else if (((*yyvaluep).node)) {
9553 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9554 }
9555}
9556#line 9557 "parse.c"
9557 break;
9558
9559 case YYSYMBOL_for_var: /* for_var */
9560#line 2616 "parse.y"
9561 {
9562 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9563 rb_parser_printf(p, "NODE_SPECIAL");
9564 }
9565 else if (((*yyvaluep).node)) {
9566 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9567 }
9568}
9569#line 9570 "parse.c"
9570 break;
9571
9572 case YYSYMBOL_f_marg: /* f_marg */
9573#line 2616 "parse.y"
9574 {
9575 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9576 rb_parser_printf(p, "NODE_SPECIAL");
9577 }
9578 else if (((*yyvaluep).node)) {
9579 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9580 }
9581}
9582#line 9583 "parse.c"
9583 break;
9584
9585 case YYSYMBOL_mlhs_f_marg: /* mlhs_f_marg */
9586#line 2616 "parse.y"
9587 {
9588 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9589 rb_parser_printf(p, "NODE_SPECIAL");
9590 }
9591 else if (((*yyvaluep).node)) {
9592 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9593 }
9594}
9595#line 9596 "parse.c"
9596 break;
9597
9598 case YYSYMBOL_f_margs: /* f_margs */
9599#line 2616 "parse.y"
9600 {
9601 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9602 rb_parser_printf(p, "NODE_SPECIAL");
9603 }
9604 else if (((*yyvaluep).node_masgn)) {
9605 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9606 }
9607}
9608#line 9609 "parse.c"
9609 break;
9610
9611 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9612#line 2616 "parse.y"
9613 {
9614 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9615 rb_parser_printf(p, "NODE_SPECIAL");
9616 }
9617 else if (((*yyvaluep).node)) {
9618 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9619 }
9620}
9621#line 9622 "parse.c"
9622 break;
9623
9624 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9625#line 2625 "parse.y"
9626 {
9627 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9628}
9629#line 9630 "parse.c"
9630 break;
9631
9632 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9633#line 2616 "parse.y"
9634 {
9635 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9636 rb_parser_printf(p, "NODE_SPECIAL");
9637 }
9638 else if (((*yyvaluep).node_kw_arg)) {
9639 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9640 }
9641}
9642#line 9643 "parse.c"
9643 break;
9644
9645 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9646#line 2616 "parse.y"
9647 {
9648 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9649 rb_parser_printf(p, "NODE_SPECIAL");
9650 }
9651 else if (((*yyvaluep).node_kw_arg)) {
9652 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9653 }
9654}
9655#line 9656 "parse.c"
9656 break;
9657
9658 case YYSYMBOL_args_tail_basic_primary_value: /* args_tail_basic_primary_value */
9659#line 2616 "parse.y"
9660 {
9661 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9662 rb_parser_printf(p, "NODE_SPECIAL");
9663 }
9664 else if (((*yyvaluep).node_args)) {
9665 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9666 }
9667}
9668#line 9669 "parse.c"
9669 break;
9670
9671 case YYSYMBOL_block_args_tail: /* block_args_tail */
9672#line 2616 "parse.y"
9673 {
9674 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9675 rb_parser_printf(p, "NODE_SPECIAL");
9676 }
9677 else if (((*yyvaluep).node_args)) {
9678 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9679 }
9680}
9681#line 9682 "parse.c"
9682 break;
9683
9684 case YYSYMBOL_excessed_comma: /* excessed_comma */
9685#line 2625 "parse.y"
9686 {
9687 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9688}
9689#line 9690 "parse.c"
9690 break;
9691
9692 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9693#line 2616 "parse.y"
9694 {
9695 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9696 rb_parser_printf(p, "NODE_SPECIAL");
9697 }
9698 else if (((*yyvaluep).node_opt_arg)) {
9699 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9700 }
9701}
9702#line 9703 "parse.c"
9703 break;
9704
9705 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9706#line 2616 "parse.y"
9707 {
9708 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9709 rb_parser_printf(p, "NODE_SPECIAL");
9710 }
9711 else if (((*yyvaluep).node_opt_arg)) {
9712 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9713 }
9714}
9715#line 9716 "parse.c"
9716 break;
9717
9718 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9719#line 2616 "parse.y"
9720 {
9721 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9722 rb_parser_printf(p, "NODE_SPECIAL");
9723 }
9724 else if (((*yyvaluep).node_args)) {
9725 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9726 }
9727}
9728#line 9729 "parse.c"
9729 break;
9730
9731 case YYSYMBOL_block_param: /* block_param */
9732#line 2616 "parse.y"
9733 {
9734 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9735 rb_parser_printf(p, "NODE_SPECIAL");
9736 }
9737 else if (((*yyvaluep).node_args)) {
9738 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9739 }
9740}
9741#line 9742 "parse.c"
9742 break;
9743
9744 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9745#line 2616 "parse.y"
9746 {
9747 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9748 rb_parser_printf(p, "NODE_SPECIAL");
9749 }
9750 else if (((*yyvaluep).node_args)) {
9751 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9752 }
9753}
9754#line 9755 "parse.c"
9755 break;
9756
9757 case YYSYMBOL_block_param_def: /* block_param_def */
9758#line 2616 "parse.y"
9759 {
9760 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9761 rb_parser_printf(p, "NODE_SPECIAL");
9762 }
9763 else if (((*yyvaluep).node_args)) {
9764 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9765 }
9766}
9767#line 9768 "parse.c"
9768 break;
9769
9770 case YYSYMBOL_opt_block_param: /* opt_block_param */
9771#line 2616 "parse.y"
9772 {
9773 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9774 rb_parser_printf(p, "NODE_SPECIAL");
9775 }
9776 else if (((*yyvaluep).node_args)) {
9777 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9778 }
9779}
9780#line 9781 "parse.c"
9781 break;
9782
9783 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9784#line 2625 "parse.y"
9785 {
9786 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9787}
9788#line 9789 "parse.c"
9789 break;
9790
9791 case YYSYMBOL_bv_decls: /* bv_decls */
9792#line 2625 "parse.y"
9793 {
9794 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9795}
9796#line 9797 "parse.c"
9797 break;
9798
9799 case YYSYMBOL_bvar: /* bvar */
9800#line 2625 "parse.y"
9801 {
9802 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9803}
9804#line 9805 "parse.c"
9805 break;
9806
9807 case YYSYMBOL_numparam: /* numparam */
9808#line 2616 "parse.y"
9809 {
9810 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9811 rb_parser_printf(p, "NODE_SPECIAL");
9812 }
9813 else if (((*yyvaluep).node)) {
9814 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9815 }
9816}
9817#line 9818 "parse.c"
9818 break;
9819
9820 case YYSYMBOL_it_id: /* it_id */
9821#line 2625 "parse.y"
9822 {
9823 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9824}
9825#line 9826 "parse.c"
9826 break;
9827
9828 case YYSYMBOL_lambda: /* lambda */
9829#line 2616 "parse.y"
9830 {
9831 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9832 rb_parser_printf(p, "NODE_SPECIAL");
9833 }
9834 else if (((*yyvaluep).node)) {
9835 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9836 }
9837}
9838#line 9839 "parse.c"
9839 break;
9840
9841 case YYSYMBOL_f_larglist: /* f_larglist */
9842#line 2616 "parse.y"
9843 {
9844 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9845 rb_parser_printf(p, "NODE_SPECIAL");
9846 }
9847 else if (((*yyvaluep).node_args)) {
9848 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9849 }
9850}
9851#line 9852 "parse.c"
9852 break;
9853
9854 case YYSYMBOL_do_block: /* do_block */
9855#line 2616 "parse.y"
9856 {
9857 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9858 rb_parser_printf(p, "NODE_SPECIAL");
9859 }
9860 else if (((*yyvaluep).node)) {
9861 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9862 }
9863}
9864#line 9865 "parse.c"
9865 break;
9866
9867 case YYSYMBOL_block_call: /* block_call */
9868#line 2616 "parse.y"
9869 {
9870 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9871 rb_parser_printf(p, "NODE_SPECIAL");
9872 }
9873 else if (((*yyvaluep).node)) {
9874 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9875 }
9876}
9877#line 9878 "parse.c"
9878 break;
9879
9880 case YYSYMBOL_method_call: /* method_call */
9881#line 2616 "parse.y"
9882 {
9883 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9884 rb_parser_printf(p, "NODE_SPECIAL");
9885 }
9886 else if (((*yyvaluep).node)) {
9887 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9888 }
9889}
9890#line 9891 "parse.c"
9891 break;
9892
9893 case YYSYMBOL_brace_block: /* brace_block */
9894#line 2616 "parse.y"
9895 {
9896 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9897 rb_parser_printf(p, "NODE_SPECIAL");
9898 }
9899 else if (((*yyvaluep).node)) {
9900 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9901 }
9902}
9903#line 9904 "parse.c"
9904 break;
9905
9906 case YYSYMBOL_brace_body: /* brace_body */
9907#line 2616 "parse.y"
9908 {
9909 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9910 rb_parser_printf(p, "NODE_SPECIAL");
9911 }
9912 else if (((*yyvaluep).node)) {
9913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9914 }
9915}
9916#line 9917 "parse.c"
9917 break;
9918
9919 case YYSYMBOL_do_body: /* do_body */
9920#line 2616 "parse.y"
9921 {
9922 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9923 rb_parser_printf(p, "NODE_SPECIAL");
9924 }
9925 else if (((*yyvaluep).node)) {
9926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9927 }
9928}
9929#line 9930 "parse.c"
9930 break;
9931
9932 case YYSYMBOL_case_args: /* case_args */
9933#line 2616 "parse.y"
9934 {
9935 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9936 rb_parser_printf(p, "NODE_SPECIAL");
9937 }
9938 else if (((*yyvaluep).node)) {
9939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9940 }
9941}
9942#line 9943 "parse.c"
9943 break;
9944
9945 case YYSYMBOL_case_body: /* case_body */
9946#line 2616 "parse.y"
9947 {
9948 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9949 rb_parser_printf(p, "NODE_SPECIAL");
9950 }
9951 else if (((*yyvaluep).node)) {
9952 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9953 }
9954}
9955#line 9956 "parse.c"
9956 break;
9957
9958 case YYSYMBOL_cases: /* cases */
9959#line 2616 "parse.y"
9960 {
9961 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9962 rb_parser_printf(p, "NODE_SPECIAL");
9963 }
9964 else if (((*yyvaluep).node)) {
9965 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9966 }
9967}
9968#line 9969 "parse.c"
9969 break;
9970
9971 case YYSYMBOL_p_case_body: /* p_case_body */
9972#line 2616 "parse.y"
9973 {
9974 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9975 rb_parser_printf(p, "NODE_SPECIAL");
9976 }
9977 else if (((*yyvaluep).node)) {
9978 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9979 }
9980}
9981#line 9982 "parse.c"
9982 break;
9983
9984 case YYSYMBOL_p_cases: /* p_cases */
9985#line 2616 "parse.y"
9986 {
9987 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9988 rb_parser_printf(p, "NODE_SPECIAL");
9989 }
9990 else if (((*yyvaluep).node)) {
9991 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9992 }
9993}
9994#line 9995 "parse.c"
9995 break;
9996
9997 case YYSYMBOL_p_top_expr: /* p_top_expr */
9998#line 2616 "parse.y"
9999 {
10000 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10001 rb_parser_printf(p, "NODE_SPECIAL");
10002 }
10003 else if (((*yyvaluep).node)) {
10004 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10005 }
10006}
10007#line 10008 "parse.c"
10008 break;
10009
10010 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10011#line 2616 "parse.y"
10012 {
10013 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10014 rb_parser_printf(p, "NODE_SPECIAL");
10015 }
10016 else if (((*yyvaluep).node)) {
10017 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10018 }
10019}
10020#line 10021 "parse.c"
10021 break;
10022
10023 case YYSYMBOL_p_expr: /* p_expr */
10024#line 2616 "parse.y"
10025 {
10026 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10027 rb_parser_printf(p, "NODE_SPECIAL");
10028 }
10029 else if (((*yyvaluep).node)) {
10030 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10031 }
10032}
10033#line 10034 "parse.c"
10034 break;
10035
10036 case YYSYMBOL_p_as: /* p_as */
10037#line 2616 "parse.y"
10038 {
10039 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10040 rb_parser_printf(p, "NODE_SPECIAL");
10041 }
10042 else if (((*yyvaluep).node)) {
10043 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10044 }
10045}
10046#line 10047 "parse.c"
10047 break;
10048
10049 case YYSYMBOL_p_alt: /* p_alt */
10050#line 2616 "parse.y"
10051 {
10052 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10053 rb_parser_printf(p, "NODE_SPECIAL");
10054 }
10055 else if (((*yyvaluep).node)) {
10056 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10057 }
10058}
10059#line 10060 "parse.c"
10060 break;
10061
10062 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10063#line 2616 "parse.y"
10064 {
10065 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10066 rb_parser_printf(p, "NODE_SPECIAL");
10067 }
10068 else if (((*yyvaluep).node)) {
10069 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10070 }
10071}
10072#line 10073 "parse.c"
10073 break;
10074
10075 case YYSYMBOL_p_args: /* p_args */
10076#line 2616 "parse.y"
10077 {
10078 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10079 rb_parser_printf(p, "NODE_SPECIAL");
10080 }
10081 else if (((*yyvaluep).node)) {
10082 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10083 }
10084}
10085#line 10086 "parse.c"
10086 break;
10087
10088 case YYSYMBOL_p_args_head: /* p_args_head */
10089#line 2616 "parse.y"
10090 {
10091 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10092 rb_parser_printf(p, "NODE_SPECIAL");
10093 }
10094 else if (((*yyvaluep).node)) {
10095 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10096 }
10097}
10098#line 10099 "parse.c"
10099 break;
10100
10101 case YYSYMBOL_p_args_tail: /* p_args_tail */
10102#line 2616 "parse.y"
10103 {
10104 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10105 rb_parser_printf(p, "NODE_SPECIAL");
10106 }
10107 else if (((*yyvaluep).node)) {
10108 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10109 }
10110}
10111#line 10112 "parse.c"
10112 break;
10113
10114 case YYSYMBOL_p_find: /* p_find */
10115#line 2616 "parse.y"
10116 {
10117 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10118 rb_parser_printf(p, "NODE_SPECIAL");
10119 }
10120 else if (((*yyvaluep).node)) {
10121 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10122 }
10123}
10124#line 10125 "parse.c"
10125 break;
10126
10127 case YYSYMBOL_p_rest: /* p_rest */
10128#line 2616 "parse.y"
10129 {
10130 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10131 rb_parser_printf(p, "NODE_SPECIAL");
10132 }
10133 else if (((*yyvaluep).node)) {
10134 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10135 }
10136}
10137#line 10138 "parse.c"
10138 break;
10139
10140 case YYSYMBOL_p_args_post: /* p_args_post */
10141#line 2616 "parse.y"
10142 {
10143 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10144 rb_parser_printf(p, "NODE_SPECIAL");
10145 }
10146 else if (((*yyvaluep).node)) {
10147 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10148 }
10149}
10150#line 10151 "parse.c"
10151 break;
10152
10153 case YYSYMBOL_p_arg: /* p_arg */
10154#line 2616 "parse.y"
10155 {
10156 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10157 rb_parser_printf(p, "NODE_SPECIAL");
10158 }
10159 else if (((*yyvaluep).node)) {
10160 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10161 }
10162}
10163#line 10164 "parse.c"
10164 break;
10165
10166 case YYSYMBOL_p_kwargs: /* p_kwargs */
10167#line 2616 "parse.y"
10168 {
10169 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10170 rb_parser_printf(p, "NODE_SPECIAL");
10171 }
10172 else if (((*yyvaluep).node)) {
10173 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10174 }
10175}
10176#line 10177 "parse.c"
10177 break;
10178
10179 case YYSYMBOL_p_kwarg: /* p_kwarg */
10180#line 2616 "parse.y"
10181 {
10182 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10183 rb_parser_printf(p, "NODE_SPECIAL");
10184 }
10185 else if (((*yyvaluep).node)) {
10186 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10187 }
10188}
10189#line 10190 "parse.c"
10190 break;
10191
10192 case YYSYMBOL_p_kw: /* p_kw */
10193#line 2616 "parse.y"
10194 {
10195 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10196 rb_parser_printf(p, "NODE_SPECIAL");
10197 }
10198 else if (((*yyvaluep).node)) {
10199 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10200 }
10201}
10202#line 10203 "parse.c"
10203 break;
10204
10205 case YYSYMBOL_p_kw_label: /* p_kw_label */
10206#line 2625 "parse.y"
10207 {
10208 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10209}
10210#line 10211 "parse.c"
10211 break;
10212
10213 case YYSYMBOL_p_kwrest: /* p_kwrest */
10214#line 2625 "parse.y"
10215 {
10216 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10217}
10218#line 10219 "parse.c"
10219 break;
10220
10221 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10222#line 2625 "parse.y"
10223 {
10224 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10225}
10226#line 10227 "parse.c"
10227 break;
10228
10229 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10230#line 2625 "parse.y"
10231 {
10232 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10233}
10234#line 10235 "parse.c"
10235 break;
10236
10237 case YYSYMBOL_p_value: /* p_value */
10238#line 2616 "parse.y"
10239 {
10240 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10241 rb_parser_printf(p, "NODE_SPECIAL");
10242 }
10243 else if (((*yyvaluep).node)) {
10244 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10245 }
10246}
10247#line 10248 "parse.c"
10248 break;
10249
10250 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10251#line 2616 "parse.y"
10252 {
10253 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10254 rb_parser_printf(p, "NODE_SPECIAL");
10255 }
10256 else if (((*yyvaluep).node)) {
10257 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10258 }
10259}
10260#line 10261 "parse.c"
10261 break;
10262
10263 case YYSYMBOL_p_primitive: /* p_primitive */
10264#line 2616 "parse.y"
10265 {
10266 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10267 rb_parser_printf(p, "NODE_SPECIAL");
10268 }
10269 else if (((*yyvaluep).node)) {
10270 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10271 }
10272}
10273#line 10274 "parse.c"
10274 break;
10275
10276 case YYSYMBOL_p_variable: /* p_variable */
10277#line 2616 "parse.y"
10278 {
10279 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10280 rb_parser_printf(p, "NODE_SPECIAL");
10281 }
10282 else if (((*yyvaluep).node)) {
10283 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10284 }
10285}
10286#line 10287 "parse.c"
10287 break;
10288
10289 case YYSYMBOL_p_var_ref: /* p_var_ref */
10290#line 2616 "parse.y"
10291 {
10292 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10293 rb_parser_printf(p, "NODE_SPECIAL");
10294 }
10295 else if (((*yyvaluep).node)) {
10296 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10297 }
10298}
10299#line 10300 "parse.c"
10300 break;
10301
10302 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10303#line 2616 "parse.y"
10304 {
10305 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10306 rb_parser_printf(p, "NODE_SPECIAL");
10307 }
10308 else if (((*yyvaluep).node)) {
10309 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10310 }
10311}
10312#line 10313 "parse.c"
10313 break;
10314
10315 case YYSYMBOL_p_const: /* p_const */
10316#line 2616 "parse.y"
10317 {
10318 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10319 rb_parser_printf(p, "NODE_SPECIAL");
10320 }
10321 else if (((*yyvaluep).node)) {
10322 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10323 }
10324}
10325#line 10326 "parse.c"
10326 break;
10327
10328 case YYSYMBOL_opt_rescue: /* opt_rescue */
10329#line 2616 "parse.y"
10330 {
10331 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10332 rb_parser_printf(p, "NODE_SPECIAL");
10333 }
10334 else if (((*yyvaluep).node)) {
10335 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10336 }
10337}
10338#line 10339 "parse.c"
10339 break;
10340
10341 case YYSYMBOL_exc_list: /* exc_list */
10342#line 2616 "parse.y"
10343 {
10344 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10345 rb_parser_printf(p, "NODE_SPECIAL");
10346 }
10347 else if (((*yyvaluep).node)) {
10348 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10349 }
10350}
10351#line 10352 "parse.c"
10352 break;
10353
10354 case YYSYMBOL_exc_var: /* exc_var */
10355#line 2616 "parse.y"
10356 {
10357 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10358 rb_parser_printf(p, "NODE_SPECIAL");
10359 }
10360 else if (((*yyvaluep).node)) {
10361 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10362 }
10363}
10364#line 10365 "parse.c"
10365 break;
10366
10367 case YYSYMBOL_opt_ensure: /* opt_ensure */
10368#line 2616 "parse.y"
10369 {
10370 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10371 rb_parser_printf(p, "NODE_SPECIAL");
10372 }
10373 else if (((*yyvaluep).node)) {
10374 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10375 }
10376}
10377#line 10378 "parse.c"
10378 break;
10379
10380 case YYSYMBOL_literal: /* literal */
10381#line 2616 "parse.y"
10382 {
10383 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10384 rb_parser_printf(p, "NODE_SPECIAL");
10385 }
10386 else if (((*yyvaluep).node)) {
10387 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10388 }
10389}
10390#line 10391 "parse.c"
10391 break;
10392
10393 case YYSYMBOL_strings: /* strings */
10394#line 2616 "parse.y"
10395 {
10396 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10397 rb_parser_printf(p, "NODE_SPECIAL");
10398 }
10399 else if (((*yyvaluep).node)) {
10400 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10401 }
10402}
10403#line 10404 "parse.c"
10404 break;
10405
10406 case YYSYMBOL_string: /* string */
10407#line 2616 "parse.y"
10408 {
10409 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10410 rb_parser_printf(p, "NODE_SPECIAL");
10411 }
10412 else if (((*yyvaluep).node)) {
10413 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10414 }
10415}
10416#line 10417 "parse.c"
10417 break;
10418
10419 case YYSYMBOL_string1: /* string1 */
10420#line 2616 "parse.y"
10421 {
10422 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10423 rb_parser_printf(p, "NODE_SPECIAL");
10424 }
10425 else if (((*yyvaluep).node)) {
10426 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10427 }
10428}
10429#line 10430 "parse.c"
10430 break;
10431
10432 case YYSYMBOL_xstring: /* xstring */
10433#line 2616 "parse.y"
10434 {
10435 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10436 rb_parser_printf(p, "NODE_SPECIAL");
10437 }
10438 else if (((*yyvaluep).node)) {
10439 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10440 }
10441}
10442#line 10443 "parse.c"
10443 break;
10444
10445 case YYSYMBOL_regexp: /* regexp */
10446#line 2616 "parse.y"
10447 {
10448 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10449 rb_parser_printf(p, "NODE_SPECIAL");
10450 }
10451 else if (((*yyvaluep).node)) {
10452 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10453 }
10454}
10455#line 10456 "parse.c"
10456 break;
10457
10458 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10459#line 2616 "parse.y"
10460 {
10461 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10462 rb_parser_printf(p, "NODE_SPECIAL");
10463 }
10464 else if (((*yyvaluep).node)) {
10465 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10466 }
10467}
10468#line 10469 "parse.c"
10469 break;
10470
10471 case YYSYMBOL_words: /* words */
10472#line 2616 "parse.y"
10473 {
10474 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10475 rb_parser_printf(p, "NODE_SPECIAL");
10476 }
10477 else if (((*yyvaluep).node)) {
10478 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10479 }
10480}
10481#line 10482 "parse.c"
10482 break;
10483
10484 case YYSYMBOL_word_list: /* word_list */
10485#line 2616 "parse.y"
10486 {
10487 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10488 rb_parser_printf(p, "NODE_SPECIAL");
10489 }
10490 else if (((*yyvaluep).node)) {
10491 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10492 }
10493}
10494#line 10495 "parse.c"
10495 break;
10496
10497 case YYSYMBOL_word: /* word */
10498#line 2616 "parse.y"
10499 {
10500 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10501 rb_parser_printf(p, "NODE_SPECIAL");
10502 }
10503 else if (((*yyvaluep).node)) {
10504 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10505 }
10506}
10507#line 10508 "parse.c"
10508 break;
10509
10510 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10511#line 2616 "parse.y"
10512 {
10513 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10514 rb_parser_printf(p, "NODE_SPECIAL");
10515 }
10516 else if (((*yyvaluep).node)) {
10517 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10518 }
10519}
10520#line 10521 "parse.c"
10521 break;
10522
10523 case YYSYMBOL_symbols: /* symbols */
10524#line 2616 "parse.y"
10525 {
10526 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10527 rb_parser_printf(p, "NODE_SPECIAL");
10528 }
10529 else if (((*yyvaluep).node)) {
10530 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10531 }
10532}
10533#line 10534 "parse.c"
10534 break;
10535
10536 case YYSYMBOL_symbol_list: /* symbol_list */
10537#line 2616 "parse.y"
10538 {
10539 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10540 rb_parser_printf(p, "NODE_SPECIAL");
10541 }
10542 else if (((*yyvaluep).node)) {
10543 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10544 }
10545}
10546#line 10547 "parse.c"
10547 break;
10548
10549 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10550#line 2616 "parse.y"
10551 {
10552 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10553 rb_parser_printf(p, "NODE_SPECIAL");
10554 }
10555 else if (((*yyvaluep).node)) {
10556 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10557 }
10558}
10559#line 10560 "parse.c"
10560 break;
10561
10562 case YYSYMBOL_qwords: /* qwords */
10563#line 2616 "parse.y"
10564 {
10565 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10566 rb_parser_printf(p, "NODE_SPECIAL");
10567 }
10568 else if (((*yyvaluep).node)) {
10569 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10570 }
10571}
10572#line 10573 "parse.c"
10573 break;
10574
10575 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10576#line 2616 "parse.y"
10577 {
10578 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10579 rb_parser_printf(p, "NODE_SPECIAL");
10580 }
10581 else if (((*yyvaluep).node)) {
10582 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10583 }
10584}
10585#line 10586 "parse.c"
10586 break;
10587
10588 case YYSYMBOL_qsymbols: /* qsymbols */
10589#line 2616 "parse.y"
10590 {
10591 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10592 rb_parser_printf(p, "NODE_SPECIAL");
10593 }
10594 else if (((*yyvaluep).node)) {
10595 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10596 }
10597}
10598#line 10599 "parse.c"
10599 break;
10600
10601 case YYSYMBOL_qword_list: /* qword_list */
10602#line 2616 "parse.y"
10603 {
10604 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10605 rb_parser_printf(p, "NODE_SPECIAL");
10606 }
10607 else if (((*yyvaluep).node)) {
10608 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10609 }
10610}
10611#line 10612 "parse.c"
10612 break;
10613
10614 case YYSYMBOL_qsym_list: /* qsym_list */
10615#line 2616 "parse.y"
10616 {
10617 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10618 rb_parser_printf(p, "NODE_SPECIAL");
10619 }
10620 else if (((*yyvaluep).node)) {
10621 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10622 }
10623}
10624#line 10625 "parse.c"
10625 break;
10626
10627 case YYSYMBOL_string_contents: /* string_contents */
10628#line 2616 "parse.y"
10629 {
10630 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10631 rb_parser_printf(p, "NODE_SPECIAL");
10632 }
10633 else if (((*yyvaluep).node)) {
10634 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10635 }
10636}
10637#line 10638 "parse.c"
10638 break;
10639
10640 case YYSYMBOL_xstring_contents: /* xstring_contents */
10641#line 2616 "parse.y"
10642 {
10643 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10644 rb_parser_printf(p, "NODE_SPECIAL");
10645 }
10646 else if (((*yyvaluep).node)) {
10647 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10648 }
10649}
10650#line 10651 "parse.c"
10651 break;
10652
10653 case YYSYMBOL_regexp_contents: /* regexp_contents */
10654#line 2616 "parse.y"
10655 {
10656 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10657 rb_parser_printf(p, "NODE_SPECIAL");
10658 }
10659 else if (((*yyvaluep).node)) {
10660 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10661 }
10662}
10663#line 10664 "parse.c"
10664 break;
10665
10666 case YYSYMBOL_string_content: /* string_content */
10667#line 2616 "parse.y"
10668 {
10669 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10670 rb_parser_printf(p, "NODE_SPECIAL");
10671 }
10672 else if (((*yyvaluep).node)) {
10673 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10674 }
10675}
10676#line 10677 "parse.c"
10677 break;
10678
10679 case YYSYMBOL_string_dvar: /* string_dvar */
10680#line 2616 "parse.y"
10681 {
10682 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10683 rb_parser_printf(p, "NODE_SPECIAL");
10684 }
10685 else if (((*yyvaluep).node)) {
10686 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10687 }
10688}
10689#line 10690 "parse.c"
10690 break;
10691
10692 case YYSYMBOL_symbol: /* symbol */
10693#line 2616 "parse.y"
10694 {
10695 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10696 rb_parser_printf(p, "NODE_SPECIAL");
10697 }
10698 else if (((*yyvaluep).node)) {
10699 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10700 }
10701}
10702#line 10703 "parse.c"
10703 break;
10704
10705 case YYSYMBOL_ssym: /* ssym */
10706#line 2616 "parse.y"
10707 {
10708 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10709 rb_parser_printf(p, "NODE_SPECIAL");
10710 }
10711 else if (((*yyvaluep).node)) {
10712 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10713 }
10714}
10715#line 10716 "parse.c"
10716 break;
10717
10718 case YYSYMBOL_sym: /* sym */
10719#line 2625 "parse.y"
10720 {
10721 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10722}
10723#line 10724 "parse.c"
10724 break;
10725
10726 case YYSYMBOL_dsym: /* dsym */
10727#line 2616 "parse.y"
10728 {
10729 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10730 rb_parser_printf(p, "NODE_SPECIAL");
10731 }
10732 else if (((*yyvaluep).node)) {
10733 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10734 }
10735}
10736#line 10737 "parse.c"
10737 break;
10738
10739 case YYSYMBOL_numeric: /* numeric */
10740#line 2616 "parse.y"
10741 {
10742 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10743 rb_parser_printf(p, "NODE_SPECIAL");
10744 }
10745 else if (((*yyvaluep).node)) {
10746 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10747 }
10748}
10749#line 10750 "parse.c"
10750 break;
10751
10752 case YYSYMBOL_simple_numeric: /* simple_numeric */
10753#line 2616 "parse.y"
10754 {
10755 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10756 rb_parser_printf(p, "NODE_SPECIAL");
10757 }
10758 else if (((*yyvaluep).node)) {
10759 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10760 }
10761}
10762#line 10763 "parse.c"
10763 break;
10764
10765 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10766#line 2625 "parse.y"
10767 {
10768 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10769}
10770#line 10771 "parse.c"
10771 break;
10772
10773 case YYSYMBOL_user_variable: /* user_variable */
10774#line 2625 "parse.y"
10775 {
10776 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10777}
10778#line 10779 "parse.c"
10779 break;
10780
10781 case YYSYMBOL_keyword_variable: /* keyword_variable */
10782#line 2625 "parse.y"
10783 {
10784 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10785}
10786#line 10787 "parse.c"
10787 break;
10788
10789 case YYSYMBOL_var_ref: /* var_ref */
10790#line 2616 "parse.y"
10791 {
10792 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10793 rb_parser_printf(p, "NODE_SPECIAL");
10794 }
10795 else if (((*yyvaluep).node)) {
10796 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10797 }
10798}
10799#line 10800 "parse.c"
10800 break;
10801
10802 case YYSYMBOL_var_lhs: /* var_lhs */
10803#line 2616 "parse.y"
10804 {
10805 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10806 rb_parser_printf(p, "NODE_SPECIAL");
10807 }
10808 else if (((*yyvaluep).node)) {
10809 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10810 }
10811}
10812#line 10813 "parse.c"
10813 break;
10814
10815 case YYSYMBOL_backref: /* backref */
10816#line 2616 "parse.y"
10817 {
10818 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10819 rb_parser_printf(p, "NODE_SPECIAL");
10820 }
10821 else if (((*yyvaluep).node)) {
10822 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10823 }
10824}
10825#line 10826 "parse.c"
10826 break;
10827
10828 case YYSYMBOL_superclass: /* superclass */
10829#line 2616 "parse.y"
10830 {
10831 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10832 rb_parser_printf(p, "NODE_SPECIAL");
10833 }
10834 else if (((*yyvaluep).node)) {
10835 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10836 }
10837}
10838#line 10839 "parse.c"
10839 break;
10840
10841 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
10842#line 2616 "parse.y"
10843 {
10844 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10845 rb_parser_printf(p, "NODE_SPECIAL");
10846 }
10847 else if (((*yyvaluep).node_args)) {
10848 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10849 }
10850}
10851#line 10852 "parse.c"
10852 break;
10853
10854 case YYSYMBOL_f_paren_args: /* f_paren_args */
10855#line 2616 "parse.y"
10856 {
10857 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10858 rb_parser_printf(p, "NODE_SPECIAL");
10859 }
10860 else if (((*yyvaluep).node_args)) {
10861 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10862 }
10863}
10864#line 10865 "parse.c"
10865 break;
10866
10867 case YYSYMBOL_f_arglist: /* f_arglist */
10868#line 2616 "parse.y"
10869 {
10870 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10871 rb_parser_printf(p, "NODE_SPECIAL");
10872 }
10873 else if (((*yyvaluep).node_args)) {
10874 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10875 }
10876}
10877#line 10878 "parse.c"
10878 break;
10879
10880 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
10881#line 2616 "parse.y"
10882 {
10883 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10884 rb_parser_printf(p, "NODE_SPECIAL");
10885 }
10886 else if (((*yyvaluep).node_kw_arg)) {
10887 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10888 }
10889}
10890#line 10891 "parse.c"
10891 break;
10892
10893 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
10894#line 2616 "parse.y"
10895 {
10896 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10897 rb_parser_printf(p, "NODE_SPECIAL");
10898 }
10899 else if (((*yyvaluep).node_kw_arg)) {
10900 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10901 }
10902}
10903#line 10904 "parse.c"
10904 break;
10905
10906 case YYSYMBOL_args_tail_basic_arg_value: /* args_tail_basic_arg_value */
10907#line 2616 "parse.y"
10908 {
10909 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10910 rb_parser_printf(p, "NODE_SPECIAL");
10911 }
10912 else if (((*yyvaluep).node_args)) {
10913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10914 }
10915}
10916#line 10917 "parse.c"
10917 break;
10918
10919 case YYSYMBOL_args_tail: /* args_tail */
10920#line 2616 "parse.y"
10921 {
10922 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10923 rb_parser_printf(p, "NODE_SPECIAL");
10924 }
10925 else if (((*yyvaluep).node_args)) {
10926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10927 }
10928}
10929#line 10930 "parse.c"
10930 break;
10931
10932 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
10933#line 2616 "parse.y"
10934 {
10935 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10936 rb_parser_printf(p, "NODE_SPECIAL");
10937 }
10938 else if (((*yyvaluep).node_opt_arg)) {
10939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10940 }
10941}
10942#line 10943 "parse.c"
10943 break;
10944
10945 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
10946#line 2616 "parse.y"
10947 {
10948 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10949 rb_parser_printf(p, "NODE_SPECIAL");
10950 }
10951 else if (((*yyvaluep).node_opt_arg)) {
10952 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10953 }
10954}
10955#line 10956 "parse.c"
10956 break;
10957
10958 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
10959#line 2616 "parse.y"
10960 {
10961 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10962 rb_parser_printf(p, "NODE_SPECIAL");
10963 }
10964 else if (((*yyvaluep).node_args)) {
10965 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10966 }
10967}
10968#line 10969 "parse.c"
10969 break;
10970
10971 case YYSYMBOL_f_args: /* f_args */
10972#line 2616 "parse.y"
10973 {
10974 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10975 rb_parser_printf(p, "NODE_SPECIAL");
10976 }
10977 else if (((*yyvaluep).node_args)) {
10978 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10979 }
10980}
10981#line 10982 "parse.c"
10982 break;
10983
10984 case YYSYMBOL_args_forward: /* args_forward */
10985#line 2625 "parse.y"
10986 {
10987 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10988}
10989#line 10990 "parse.c"
10990 break;
10991
10992 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
10993#line 2625 "parse.y"
10994 {
10995 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10996}
10997#line 10998 "parse.c"
10998 break;
10999
11000 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11001#line 2625 "parse.y"
11002 {
11003 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11004}
11005#line 11006 "parse.c"
11006 break;
11007
11008 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11009#line 2625 "parse.y"
11010 {
11011 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11012}
11013#line 11014 "parse.c"
11014 break;
11015
11016 case YYSYMBOL_f_arg_item: /* f_arg_item */
11017#line 2616 "parse.y"
11018 {
11019 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11020 rb_parser_printf(p, "NODE_SPECIAL");
11021 }
11022 else if (((*yyvaluep).node_args_aux)) {
11023 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11024 }
11025}
11026#line 11027 "parse.c"
11027 break;
11028
11029 case YYSYMBOL_f_arg: /* f_arg */
11030#line 2616 "parse.y"
11031 {
11032 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11033 rb_parser_printf(p, "NODE_SPECIAL");
11034 }
11035 else if (((*yyvaluep).node_args_aux)) {
11036 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11037 }
11038}
11039#line 11040 "parse.c"
11040 break;
11041
11042 case YYSYMBOL_f_label: /* f_label */
11043#line 2625 "parse.y"
11044 {
11045 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11046}
11047#line 11048 "parse.c"
11048 break;
11049
11050 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11051#line 2625 "parse.y"
11052 {
11053 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11054}
11055#line 11056 "parse.c"
11056 break;
11057
11058 case YYSYMBOL_f_kwrest: /* f_kwrest */
11059#line 2625 "parse.y"
11060 {
11061 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11062}
11063#line 11064 "parse.c"
11064 break;
11065
11066 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11067#line 2625 "parse.y"
11068 {
11069 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11070}
11071#line 11072 "parse.c"
11072 break;
11073
11074 case YYSYMBOL_f_block_arg: /* f_block_arg */
11075#line 2625 "parse.y"
11076 {
11077 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11078}
11079#line 11080 "parse.c"
11080 break;
11081
11082 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
11083#line 2625 "parse.y"
11084 {
11085 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11086}
11087#line 11088 "parse.c"
11088 break;
11089
11090 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11091#line 2616 "parse.y"
11092 {
11093 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11094 rb_parser_printf(p, "NODE_SPECIAL");
11095 }
11096 else if (((*yyvaluep).node)) {
11097 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11098 }
11099}
11100#line 11101 "parse.c"
11101 break;
11102
11103 case YYSYMBOL_singleton: /* singleton */
11104#line 2616 "parse.y"
11105 {
11106 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11107 rb_parser_printf(p, "NODE_SPECIAL");
11108 }
11109 else if (((*yyvaluep).node)) {
11110 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11111 }
11112}
11113#line 11114 "parse.c"
11114 break;
11115
11116 case YYSYMBOL_singleton_expr: /* singleton_expr */
11117#line 2616 "parse.y"
11118 {
11119 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11120 rb_parser_printf(p, "NODE_SPECIAL");
11121 }
11122 else if (((*yyvaluep).node)) {
11123 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11124 }
11125}
11126#line 11127 "parse.c"
11127 break;
11128
11129 case YYSYMBOL_assoc_list: /* assoc_list */
11130#line 2616 "parse.y"
11131 {
11132 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11133 rb_parser_printf(p, "NODE_SPECIAL");
11134 }
11135 else if (((*yyvaluep).node)) {
11136 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11137 }
11138}
11139#line 11140 "parse.c"
11140 break;
11141
11142 case YYSYMBOL_assocs: /* assocs */
11143#line 2616 "parse.y"
11144 {
11145 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11146 rb_parser_printf(p, "NODE_SPECIAL");
11147 }
11148 else if (((*yyvaluep).node)) {
11149 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11150 }
11151}
11152#line 11153 "parse.c"
11153 break;
11154
11155 case YYSYMBOL_assoc: /* assoc */
11156#line 2616 "parse.y"
11157 {
11158 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11159 rb_parser_printf(p, "NODE_SPECIAL");
11160 }
11161 else if (((*yyvaluep).node)) {
11162 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11163 }
11164}
11165#line 11166 "parse.c"
11166 break;
11167
11168 case YYSYMBOL_operation2: /* operation2 */
11169#line 2625 "parse.y"
11170 {
11171 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11172}
11173#line 11174 "parse.c"
11174 break;
11175
11176 case YYSYMBOL_operation3: /* operation3 */
11177#line 2625 "parse.y"
11178 {
11179 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11180}
11181#line 11182 "parse.c"
11182 break;
11183
11184 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11185#line 2625 "parse.y"
11186 {
11187 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11188}
11189#line 11190 "parse.c"
11190 break;
11191
11192 case YYSYMBOL_call_op: /* call_op */
11193#line 2625 "parse.y"
11194 {
11195 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11196}
11197#line 11198 "parse.c"
11198 break;
11199
11200 case YYSYMBOL_call_op2: /* call_op2 */
11201#line 2625 "parse.y"
11202 {
11203 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11204}
11205#line 11206 "parse.c"
11206 break;
11207
11208 case YYSYMBOL_none: /* none */
11209#line 2616 "parse.y"
11210 {
11211 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11212 rb_parser_printf(p, "NODE_SPECIAL");
11213 }
11214 else if (((*yyvaluep).node)) {
11215 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11216 }
11217}
11218#line 11219 "parse.c"
11219 break;
11220
11221 default:
11222 break;
11223 }
11224 YY_IGNORE_MAYBE_UNINITIALIZED_END
11225}
11226
11227
11228/*---------------------------.
11229| Print this symbol on YYO. |
11230`---------------------------*/
11231
11232static void
11233yy_symbol_print (FILE *yyo,
11234 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11235{
11236 YYFPRINTF (yyo, "%s %s (",
11237 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11238
11239 YYLOCATION_PRINT (yyo, yylocationp, p);
11240 YYFPRINTF (yyo, ": ");
11241 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11242 YYFPRINTF (yyo, ")");
11243}
11244
11245/*------------------------------------------------------------------.
11246| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11247| TOP (included). |
11248`------------------------------------------------------------------*/
11249
11250static void
11251yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11252{
11253 YYFPRINTF (stderr, "Stack now");
11254 for (; yybottom <= yytop; yybottom++)
11255 {
11256 int yybot = *yybottom;
11257 YYFPRINTF (stderr, " %d", yybot);
11258 }
11259 YYFPRINTF (stderr, "\n");
11260}
11261
11262# define YY_STACK_PRINT(Bottom, Top, p) \
11263do { \
11264 if (yydebug) \
11265 yy_stack_print ((Bottom), (Top), p); \
11266} while (0)
11267
11268
11269/*------------------------------------------------.
11270| Report that the YYRULE is going to be reduced. |
11271`------------------------------------------------*/
11272
11273static void
11274yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11275 int yyrule, struct parser_params *p)
11276{
11277 int yylno = yyrline[yyrule];
11278 int yynrhs = yyr2[yyrule];
11279 int yyi;
11280 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11281 yyrule - 1, yylno);
11282 /* The symbols being reduced. */
11283 for (yyi = 0; yyi < yynrhs; yyi++)
11284 {
11285 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11286 yy_symbol_print (stderr,
11287 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11288 &yyvsp[(yyi + 1) - (yynrhs)],
11289 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11290 YYFPRINTF (stderr, "\n");
11291 }
11292}
11293
11294# define YY_REDUCE_PRINT(Rule, p) \
11295do { \
11296 if (yydebug) \
11297 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11298} while (0)
11299
11300/* Nonzero means print parse trace. It is left uninitialized so that
11301 multiple parsers can coexist. */
11302#ifndef yydebug
11303int yydebug;
11304#endif
11305#else /* !YYDEBUG */
11306# define YYDPRINTF(Args) ((void) 0)
11307# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11308# define YY_STACK_PRINT(Bottom, Top, p)
11309# define YY_REDUCE_PRINT(Rule, p)
11310#endif /* !YYDEBUG */
11311
11312
11313/* YYINITDEPTH -- initial size of the parser's stacks. */
11314#ifndef YYINITDEPTH
11315# define YYINITDEPTH 200
11316#endif
11317
11318/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11319 if the built-in stack extension method is used).
11320
11321 Do not make this value too large; the results are undefined if
11322 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11323 evaluated with infinite-precision integer arithmetic. */
11324
11325#ifndef YYMAXDEPTH
11326# define YYMAXDEPTH 10000
11327#endif
11328
11329
11330/* Context of a parse error. */
11331typedef struct
11332{
11333 yy_state_t *yyssp;
11334 yysymbol_kind_t yytoken;
11335 YYLTYPE *yylloc;
11336} yypcontext_t;
11337
11338/* Put in YYARG at most YYARGN of the expected tokens given the
11339 current YYCTX, and return the number of tokens stored in YYARG. If
11340 YYARG is null, return the number of expected tokens (guaranteed to
11341 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11342 Return 0 if there are more than YYARGN expected tokens, yet fill
11343 YYARG up to YYARGN. */
11344static int
11345yypcontext_expected_tokens (const yypcontext_t *yyctx,
11346 yysymbol_kind_t yyarg[], int yyargn)
11347{
11348 /* Actual size of YYARG. */
11349 int yycount = 0;
11350 int yyn = yypact[+*yyctx->yyssp];
11351 if (!yypact_value_is_default (yyn))
11352 {
11353 /* Start YYX at -YYN if negative to avoid negative indexes in
11354 YYCHECK. In other words, skip the first -YYN actions for
11355 this state because they are default actions. */
11356 int yyxbegin = yyn < 0 ? -yyn : 0;
11357 /* Stay within bounds of both yycheck and yytname. */
11358 int yychecklim = YYLAST - yyn + 1;
11359 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11360 int yyx;
11361 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11362 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11363 && !yytable_value_is_error (yytable[yyx + yyn]))
11364 {
11365 if (!yyarg)
11366 ++yycount;
11367 else if (yycount == yyargn)
11368 return 0;
11369 else
11370 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11371 }
11372 }
11373 if (yyarg && yycount == 0 && 0 < yyargn)
11374 yyarg[0] = YYSYMBOL_YYEMPTY;
11375 return yycount;
11376}
11377
11378
11379
11380
11381#ifndef yystrlen
11382# if defined __GLIBC__ && defined _STRING_H
11383# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11384# else
11385/* Return the length of YYSTR. */
11386static YYPTRDIFF_T
11387yystrlen (const char *yystr)
11388{
11389 YYPTRDIFF_T yylen;
11390 for (yylen = 0; yystr[yylen]; yylen++)
11391 continue;
11392 return yylen;
11393}
11394# endif
11395#endif
11396
11397#ifndef yystpcpy
11398# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11399# define yystpcpy stpcpy
11400# else
11401/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11402 YYDEST. */
11403static char *
11404yystpcpy (char *yydest, const char *yysrc)
11405{
11406 char *yyd = yydest;
11407 const char *yys = yysrc;
11408
11409 while ((*yyd++ = *yys++) != '\0')
11410 continue;
11411
11412 return yyd - 1;
11413}
11414# endif
11415#endif
11416
11417#ifndef yytnamerr
11418/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11419 quotes and backslashes, so that it's suitable for yyerror. The
11420 heuristic is that double-quoting is unnecessary unless the string
11421 contains an apostrophe, a comma, or backslash (other than
11422 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11423 null, do not copy; instead, return the length of what the result
11424 would have been. */
11425static YYPTRDIFF_T
11426yytnamerr (char *yyres, const char *yystr)
11427{
11428 if (*yystr == '"')
11429 {
11430 YYPTRDIFF_T yyn = 0;
11431 char const *yyp = yystr;
11432 for (;;)
11433 switch (*++yyp)
11434 {
11435 case '\'':
11436 case ',':
11437 goto do_not_strip_quotes;
11438
11439 case '\\':
11440 if (*++yyp != '\\')
11441 goto do_not_strip_quotes;
11442 else
11443 goto append;
11444
11445 append:
11446 default:
11447 if (yyres)
11448 yyres[yyn] = *yyp;
11449 yyn++;
11450 break;
11451
11452 case '"':
11453 if (yyres)
11454 yyres[yyn] = '\0';
11455 return yyn;
11456 }
11457 do_not_strip_quotes: ;
11458 }
11459
11460 if (yyres)
11461 return yystpcpy (yyres, yystr) - yyres;
11462 else
11463 return yystrlen (yystr);
11464}
11465#endif
11466
11467
11468static int
11469yy_syntax_error_arguments (const yypcontext_t *yyctx,
11470 yysymbol_kind_t yyarg[], int yyargn)
11471{
11472 /* Actual size of YYARG. */
11473 int yycount = 0;
11474 /* There are many possibilities here to consider:
11475 - If this state is a consistent state with a default action, then
11476 the only way this function was invoked is if the default action
11477 is an error action. In that case, don't check for expected
11478 tokens because there are none.
11479 - The only way there can be no lookahead present (in yychar) is if
11480 this state is a consistent state with a default action. Thus,
11481 detecting the absence of a lookahead is sufficient to determine
11482 that there is no unexpected or expected token to report. In that
11483 case, just report a simple "syntax error".
11484 - Don't assume there isn't a lookahead just because this state is a
11485 consistent state with a default action. There might have been a
11486 previous inconsistent state, consistent state with a non-default
11487 action, or user semantic action that manipulated yychar.
11488 - Of course, the expected token list depends on states to have
11489 correct lookahead information, and it depends on the parser not
11490 to perform extra reductions after fetching a lookahead from the
11491 scanner and before detecting a syntax error. Thus, state merging
11492 (from LALR or IELR) and default reductions corrupt the expected
11493 token list. However, the list is correct for canonical LR with
11494 one exception: it will still contain any token that will not be
11495 accepted due to an error action in a later state.
11496 */
11497 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11498 {
11499 int yyn;
11500 if (yyarg)
11501 yyarg[yycount] = yyctx->yytoken;
11502 ++yycount;
11503 yyn = yypcontext_expected_tokens (yyctx,
11504 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11505 if (yyn == YYENOMEM)
11506 return YYENOMEM;
11507 else
11508 yycount += yyn;
11509 }
11510 return yycount;
11511}
11512
11513/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11514 about the unexpected token YYTOKEN for the state stack whose top is
11515 YYSSP.
11516
11517 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11518 not large enough to hold the message. In that case, also set
11519 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11520 required number of bytes is too large to store. */
11521static int
11522yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11523 const yypcontext_t *yyctx, struct parser_params *p)
11524{
11525 enum { YYARGS_MAX = 5 };
11526 /* Internationalized format string. */
11527 const char *yyformat = YY_NULLPTR;
11528 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11529 one per "expected"). */
11530 yysymbol_kind_t yyarg[YYARGS_MAX];
11531 /* Cumulated lengths of YYARG. */
11532 YYPTRDIFF_T yysize = 0;
11533
11534 /* Actual size of YYARG. */
11535 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11536 if (yycount == YYENOMEM)
11537 return YYENOMEM;
11538
11539 switch (yycount)
11540 {
11541#define YYCASE_(N, S) \
11542 case N: \
11543 yyformat = S; \
11544 break
11545 default: /* Avoid compiler warnings. */
11546 YYCASE_(0, YY_("syntax error"));
11547 YYCASE_(1, YY_("syntax error, unexpected %s"));
11548 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11549 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11550 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11551 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11552#undef YYCASE_
11553 }
11554
11555 /* Compute error message size. Don't count the "%s"s, but reserve
11556 room for the terminator. */
11557 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11558 {
11559 int yyi;
11560 for (yyi = 0; yyi < yycount; ++yyi)
11561 {
11562 YYPTRDIFF_T yysize1
11563 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11564 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11565 yysize = yysize1;
11566 else
11567 return YYENOMEM;
11568 }
11569 }
11570
11571 if (*yymsg_alloc < yysize)
11572 {
11573 *yymsg_alloc = 2 * yysize;
11574 if (! (yysize <= *yymsg_alloc
11575 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11576 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11577 return -1;
11578 }
11579
11580 /* Avoid sprintf, as that infringes on the user's name space.
11581 Don't have undefined behavior even if the translation
11582 produced a string with the wrong number of "%s"s. */
11583 {
11584 char *yyp = *yymsg;
11585 int yyi = 0;
11586 while ((*yyp = *yyformat) != '\0')
11587 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11588 {
11589 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11590 yyformat += 2;
11591 }
11592 else
11593 {
11594 ++yyp;
11595 ++yyformat;
11596 }
11597 }
11598 return 0;
11599}
11600
11601
11602/*-----------------------------------------------.
11603| Release the memory associated to this symbol. |
11604`-----------------------------------------------*/
11605
11606static void
11607yydestruct (const char *yymsg,
11608 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11609{
11610 YY_USE (yyvaluep);
11611 YY_USE (yylocationp);
11612 YY_USE (p);
11613 if (!yymsg)
11614 yymsg = "Deleting";
11615 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11616
11617 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11618 switch (yykind)
11619 {
11620 case YYSYMBOL_258_16: /* @16 */
11621#line 2653 "parse.y"
11622 {
11623 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11624}
11625#line 11626 "parse.c"
11626 break;
11627
11628 case YYSYMBOL_259_17: /* @17 */
11629#line 2653 "parse.y"
11630 {
11631 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11632}
11633#line 11634 "parse.c"
11634 break;
11635
11636 default:
11637 break;
11638 }
11639 YY_IGNORE_MAYBE_UNINITIALIZED_END
11640}
11641
11642
11643
11644
11645
11646
11647/*----------.
11648| yyparse. |
11649`----------*/
11650
11651int
11652yyparse (struct parser_params *p)
11653{
11654/* Lookahead token kind. */
11655int yychar;
11656
11657
11658/* The semantic value of the lookahead symbol. */
11659/* Default value used for initialization, for pacifying older GCCs
11660 or non-GCC compilers. */
11661#ifdef __cplusplus
11662static const YYSTYPE yyval_default = {};
11663(void) yyval_default;
11664#else
11665YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11666#endif
11667YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11668
11669/* Location data for the lookahead symbol. */
11670static const YYLTYPE yyloc_default
11671# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11672 = { 1, 1, 1, 1 }
11673# endif
11674;
11675YYLTYPE yylloc = yyloc_default;
11676
11677 /* Number of syntax errors so far. */
11678 int yynerrs = 0;
11679 YY_USE (yynerrs); /* Silence compiler warning. */
11680
11681 yy_state_fast_t yystate = 0;
11682 /* Number of tokens to shift before error messages enabled. */
11683 int yyerrstatus = 0;
11684
11685 /* Refer to the stacks through separate pointers, to allow yyoverflow
11686 to reallocate them elsewhere. */
11687
11688 /* Their size. */
11689 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11690
11691 /* The state stack: array, bottom, top. */
11692 yy_state_t yyssa[YYINITDEPTH];
11693 yy_state_t *yyss = yyssa;
11694 yy_state_t *yyssp = yyss;
11695
11696 /* The semantic value stack: array, bottom, top. */
11697 YYSTYPE yyvsa[YYINITDEPTH];
11698 YYSTYPE *yyvs = yyvsa;
11699 YYSTYPE *yyvsp = yyvs;
11700
11701 /* The location stack: array, bottom, top. */
11702 YYLTYPE yylsa[YYINITDEPTH];
11703 YYLTYPE *yyls = yylsa;
11704 YYLTYPE *yylsp = yyls;
11705
11706 int yyn;
11707 /* The return value of yyparse. */
11708 int yyresult;
11709 /* Lookahead symbol kind. */
11710 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11711 /* The variables used to return semantic value and location from the
11712 action routines. */
11713 YYSTYPE yyval;
11714 YYLTYPE yyloc;
11715
11716 /* The locations where the error started and ended. */
11717 YYLTYPE yyerror_range[3];
11718
11719 /* Buffer for error messages, and its allocated size. */
11720 char yymsgbuf[128];
11721 char *yymsg = yymsgbuf;
11722 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11723
11724#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11725
11726 /* The number of symbols on the RHS of the reduced rule.
11727 Keep to zero when no symbol should be popped. */
11728 int yylen = 0;
11729
11730 YYDPRINTF ((stderr, "Starting parse\n"));
11731
11732 yychar = YYEMPTY; /* Cause a token to be read. */
11733
11734
11735 /* User initialization code. */
11736#line 2660 "parse.y"
11737 {
11738 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11739}
11740
11741#line 11742 "parse.c"
11742
11743 yylsp[0] = yylloc;
11744 goto yysetstate;
11745
11746
11747/*------------------------------------------------------------.
11748| yynewstate -- push a new state, which is found in yystate. |
11749`------------------------------------------------------------*/
11750yynewstate:
11751 /* In all cases, when you get here, the value and location stacks
11752 have just been pushed. So pushing a state here evens the stacks. */
11753 yyssp++;
11754
11755
11756/*--------------------------------------------------------------------.
11757| yysetstate -- set current state (the top of the stack) to yystate. |
11758`--------------------------------------------------------------------*/
11759yysetstate:
11760 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11761 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11762 YY_IGNORE_USELESS_CAST_BEGIN
11763 *yyssp = YY_CAST (yy_state_t, yystate);
11764 YY_IGNORE_USELESS_CAST_END
11765 YY_STACK_PRINT (yyss, yyssp, p);
11766
11767 if (yyss + yystacksize - 1 <= yyssp)
11768#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11769 YYNOMEM;
11770#else
11771 {
11772 /* Get the current used size of the three stacks, in elements. */
11773 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11774
11775# if defined yyoverflow
11776 {
11777 /* Give user a chance to reallocate the stack. Use copies of
11778 these so that the &'s don't force the real ones into
11779 memory. */
11780 yy_state_t *yyss1 = yyss;
11781 YYSTYPE *yyvs1 = yyvs;
11782 YYLTYPE *yyls1 = yyls;
11783
11784 /* Each stack pointer address is followed by the size of the
11785 data in use in that stack, in bytes. This used to be a
11786 conditional around just the two extra args, but that might
11787 be undefined if yyoverflow is a macro. */
11788 yyoverflow (YY_("memory exhausted"),
11789 &yyss1, yysize * YYSIZEOF (*yyssp),
11790 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11791 &yyls1, yysize * YYSIZEOF (*yylsp),
11792 &yystacksize);
11793 yyss = yyss1;
11794 yyvs = yyvs1;
11795 yyls = yyls1;
11796 }
11797# else /* defined YYSTACK_RELOCATE */
11798 /* Extend the stack our own way. */
11799 if (YYMAXDEPTH <= yystacksize)
11800 YYNOMEM;
11801 yystacksize *= 2;
11802 if (YYMAXDEPTH < yystacksize)
11803 yystacksize = YYMAXDEPTH;
11804
11805 {
11806 yy_state_t *yyss1 = yyss;
11807 union yyalloc *yyptr =
11808 YY_CAST (union yyalloc *,
11809 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11810 if (! yyptr)
11811 YYNOMEM;
11812 YYSTACK_RELOCATE (yyss_alloc, yyss);
11813 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11814 YYSTACK_RELOCATE (yyls_alloc, yyls);
11815# undef YYSTACK_RELOCATE
11816 if (yyss1 != yyssa)
11817 YYSTACK_FREE (yyss1);
11818 }
11819# endif
11820
11821 yyssp = yyss + yysize - 1;
11822 yyvsp = yyvs + yysize - 1;
11823 yylsp = yyls + yysize - 1;
11824
11825 YY_IGNORE_USELESS_CAST_BEGIN
11826 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11827 YY_CAST (long, yystacksize)));
11828 YY_IGNORE_USELESS_CAST_END
11829
11830 if (yyss + yystacksize - 1 <= yyssp)
11831 YYABORT;
11832 }
11833#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11834
11835
11836 if (yystate == YYFINAL)
11837 YYACCEPT;
11838
11839 goto yybackup;
11840
11841
11842/*-----------.
11843| yybackup. |
11844`-----------*/
11845yybackup:
11846 /* Do appropriate processing given the current state. Read a
11847 lookahead token if we need one and don't already have one. */
11848
11849 /* First try to decide what to do without reference to lookahead token. */
11850 yyn = yypact[yystate];
11851 if (yypact_value_is_default (yyn))
11852 goto yydefault;
11853
11854 /* Not known => get a lookahead token if don't already have one. */
11855
11856 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11857 if (yychar == YYEMPTY)
11858 {
11859 YYDPRINTF ((stderr, "Reading a token\n"));
11860 yychar = yylex (&yylval, &yylloc, p);
11861 }
11862
11863 if (yychar <= END_OF_INPUT)
11864 {
11865 yychar = END_OF_INPUT;
11866 yytoken = YYSYMBOL_YYEOF;
11867 YYDPRINTF ((stderr, "Now at end of input.\n"));
11868 }
11869 else if (yychar == YYerror)
11870 {
11871 /* The scanner already issued an error message, process directly
11872 to error recovery. But do not keep the error token as
11873 lookahead, it is too special and may lead us to an endless
11874 loop in error recovery. */
11875 yychar = YYUNDEF;
11876 yytoken = YYSYMBOL_YYerror;
11877 yyerror_range[1] = yylloc;
11878 goto yyerrlab1;
11879 }
11880 else
11881 {
11882 yytoken = YYTRANSLATE (yychar);
11883 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11884 }
11885
11886 /* If the proper action on seeing token YYTOKEN is to reduce or to
11887 detect an error, take that action. */
11888 yyn += yytoken;
11889 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11890 goto yydefault;
11891 yyn = yytable[yyn];
11892 if (yyn <= 0)
11893 {
11894 if (yytable_value_is_error (yyn))
11895 goto yyerrlab;
11896 yyn = -yyn;
11897 goto yyreduce;
11898 }
11899
11900 /* Count tokens shifted since error; after three, turn off error
11901 status. */
11902 if (yyerrstatus)
11903 yyerrstatus--;
11904
11905 /* Shift the lookahead token. */
11906 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11907 yystate = yyn;
11908 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11909 *++yyvsp = yylval;
11910 YY_IGNORE_MAYBE_UNINITIALIZED_END
11911 *++yylsp = yylloc;
11912 /* %after-shift code. */
11913#line 2663 "parse.y"
11914 {after_shift(p);}
11915#line 11916 "parse.c"
11916
11917
11918 /* Discard the shifted token. */
11919 yychar = YYEMPTY;
11920 goto yynewstate;
11921
11922
11923/*-----------------------------------------------------------.
11924| yydefault -- do the default action for the current state. |
11925`-----------------------------------------------------------*/
11926yydefault:
11927 yyn = yydefact[yystate];
11928 if (yyn == 0)
11929 goto yyerrlab;
11930 goto yyreduce;
11931
11932
11933/*-----------------------------.
11934| yyreduce -- do a reduction. |
11935`-----------------------------*/
11936yyreduce:
11937 /* yyn is the number of a rule to reduce with. */
11938 yylen = yyr2[yyn];
11939
11940 /* If YYLEN is nonzero, implement the default value of the action:
11941 '$$ = $1'.
11942
11943 Otherwise, the following line sets YYVAL to garbage.
11944 This behavior is undocumented and Bison
11945 users should not rely upon it. Assigning to YYVAL
11946 unconditionally makes the parser a bit smaller, and it avoids a
11947 GCC warning that YYVAL may be used uninitialized. */
11948 yyval = yyvsp[1-yylen];
11949 /* %before-reduce function. */
11950#line 2664 "parse.y"
11951 {before_reduce(yylen, p);}
11952#line 11953 "parse.c"
11953
11954
11955 /* Default location. */
11956 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
11957 yyerror_range[1] = yyloc;
11958 YY_REDUCE_PRINT (yyn, p);
11959 switch (yyn)
11960 {
11961 case 2: /* $@1: %empty */
11962#line 3158 "parse.y"
11963 {
11964 SET_LEX_STATE(EXPR_BEG);
11965 local_push(p, ifndef_ripper(1)+0);
11966 /* jumps are possible in the top-level loop. */
11967 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
11968 }
11969#line 11970 "parse.c"
11970 break;
11971
11972 case 5: /* compstmt_top_stmts: top_stmts option_terms */
11973#line 2973 "parse.y"
11974 {
11975 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11976 }
11977#line 11978 "parse.c"
11978 break;
11979
11980 case 6: /* program: $@1 compstmt_top_stmts */
11981#line 3165 "parse.y"
11982 {
11983 if ((yyvsp[0].node) && !compile_for_eval) {
11984 NODE *node = (yyvsp[0].node);
11985 /* last expression should not be void */
11986 if (nd_type_p(node, NODE_BLOCK)) {
11987 while (RNODE_BLOCK(node)->nd_next) {
11988 node = RNODE_BLOCK(node)->nd_next;
11989 }
11990 node = RNODE_BLOCK(node)->nd_head;
11991 }
11992 node = remove_begin(node);
11993 void_expr(p, node);
11994 }
11995 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), &(yyloc));
11996 /*% ripper[final]: program!($:2) %*/
11997 local_pop(p);
11998 }
11999#line 12000 "parse.c"
12000 break;
12001
12002 case 7: /* top_stmts: none */
12003#line 3185 "parse.y"
12004 {
12005 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12006 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12007 }
12008#line 12009 "parse.c"
12009 break;
12010
12011 case 8: /* top_stmts: top_stmt */
12012#line 3190 "parse.y"
12013 {
12014 (yyval.node) = newline_node((yyvsp[0].node));
12015 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12016 }
12017#line 12018 "parse.c"
12018 break;
12019
12020 case 9: /* top_stmts: top_stmts terms top_stmt */
12021#line 3195 "parse.y"
12022 {
12023 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12024 /*% ripper: stmts_add!($:1, $:3) %*/
12025 }
12026#line 12027 "parse.c"
12027 break;
12028
12029 case 10: /* top_stmt: stmt */
12030#line 3202 "parse.y"
12031 {
12032 clear_block_exit(p, true);
12033 (yyval.node) = (yyvsp[0].node);
12034 }
12035#line 12036 "parse.c"
12036 break;
12037
12038 case 11: /* top_stmt: "'BEGIN'" begin_block */
12039#line 3207 "parse.y"
12040 {
12041 (yyval.node) = (yyvsp[0].node);
12042 /*% ripper: $:2 %*/
12043 }
12044#line 12045 "parse.c"
12045 break;
12046
12047 case 12: /* block_open: '{' */
12048#line 3213 "parse.y"
12049 {(yyval.node_exits) = init_block_exit(p);}
12050#line 12051 "parse.c"
12051 break;
12052
12053 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12054#line 3216 "parse.y"
12055 {
12056 restore_block_exit(p, (yyvsp[-2].node_exits));
12057 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12058 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12059 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12060 /*% ripper: BEGIN!($:2) %*/
12061 }
12062#line 12063 "parse.c"
12063 break;
12064
12065 case 14: /* compstmt_stmts: stmts option_terms */
12066#line 2973 "parse.y"
12067 {
12068 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12069 }
12070#line 12071 "parse.c"
12071 break;
12072
12073 case 15: /* $@2: %empty */
12074#line 3229 "parse.y"
12075 {
12076 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12077 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12078 }
12079#line 12080 "parse.c"
12080 break;
12081
12082 case 16: /* $@3: %empty */
12083#line 3234 "parse.y"
12084 {
12085 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12086 }
12087#line 12088 "parse.c"
12088 break;
12089
12090 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12091#line 3238 "parse.y"
12092 {
12093 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12094 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12095 }
12096#line 12097 "parse.c"
12097 break;
12098
12099 case 18: /* $@4: %empty */
12100#line 3245 "parse.y"
12101 {
12102 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12103 }
12104#line 12105 "parse.c"
12105 break;
12106
12107 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12108#line 3249 "parse.y"
12109 {
12110 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12111 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12112 }
12113#line 12114 "parse.c"
12114 break;
12115
12116 case 20: /* stmts: none */
12117#line 3256 "parse.y"
12118 {
12119 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12120 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12121 }
12122#line 12123 "parse.c"
12123 break;
12124
12125 case 21: /* stmts: stmt_or_begin */
12126#line 3261 "parse.y"
12127 {
12128 (yyval.node) = newline_node((yyvsp[0].node));
12129 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12130 }
12131#line 12132 "parse.c"
12132 break;
12133
12134 case 22: /* stmts: stmts terms stmt_or_begin */
12135#line 3266 "parse.y"
12136 {
12137 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12138 /*% ripper: stmts_add!($:1, $:3) %*/
12139 }
12140#line 12141 "parse.c"
12141 break;
12142
12143 case 24: /* $@5: %empty */
12144#line 3274 "parse.y"
12145 {
12146 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12147 }
12148#line 12149 "parse.c"
12149 break;
12150
12151 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12152#line 3278 "parse.y"
12153 {
12154 (yyval.node) = (yyvsp[0].node);
12155 }
12156#line 12157 "parse.c"
12157 break;
12158
12159 case 26: /* allow_exits: %empty */
12160#line 3283 "parse.y"
12161 {(yyval.node_exits) = allow_block_exit(p);}
12162#line 12163 "parse.c"
12163 break;
12164
12165 case 27: /* k_END: "'END'" lex_ctxt */
12166#line 3286 "parse.y"
12167 {
12168 (yyval.ctxt) = (yyvsp[0].ctxt);
12169 p->ctxt.in_rescue = before_rescue;
12170 /*% ripper: $:2 %*/
12171 }
12172#line 12173 "parse.c"
12173 break;
12174
12175 case 28: /* $@6: %empty */
12176#line 3292 "parse.y"
12177 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12178#line 12179 "parse.c"
12179 break;
12180
12181 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12182#line 3293 "parse.y"
12183 {
12184 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12185 /*% ripper: alias!($:2, $:4) %*/
12186 }
12187#line 12188 "parse.c"
12188 break;
12189
12190 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12191#line 3298 "parse.y"
12192 {
12193 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12194 /*% ripper: var_alias!($:2, $:3) %*/
12195 }
12196#line 12197 "parse.c"
12197 break;
12198
12199 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12200#line 3303 "parse.y"
12201 {
12202 char buf[2];
12203 buf[0] = '$';
12204 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12205 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12206 /*% ripper: var_alias!($:2, $:3) %*/
12207 }
12208#line 12209 "parse.c"
12209 break;
12210
12211 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12212#line 3311 "parse.y"
12213 {
12214 static const char mesg[] = "can't make alias for the number variables";
12215 /*%%%*/
12216 yyerror1(&(yylsp[0]), mesg);
12217 /*% %*/
12218 (yyval.node) = NEW_ERROR(&(yyloc));
12219 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
12220 }
12221#line 12222 "parse.c"
12222 break;
12223
12224 case 33: /* stmt: "'undef'" undef_list */
12225#line 3320 "parse.y"
12226 {
12227 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12228 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12229 (yyval.node) = (yyvsp[0].node);
12230 /*% ripper: undef!($:2) %*/
12231 }
12232#line 12233 "parse.c"
12233 break;
12234
12235 case 34: /* stmt: stmt "'if' modifier" expr_value */
12236#line 3327 "parse.y"
12237 {
12238 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12239 fixpos((yyval.node), (yyvsp[0].node));
12240 /*% ripper: if_mod!($:3, $:1) %*/
12241 }
12242#line 12243 "parse.c"
12243 break;
12244
12245 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12246#line 3333 "parse.y"
12247 {
12248 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12249 fixpos((yyval.node), (yyvsp[0].node));
12250 /*% ripper: unless_mod!($:3, $:1) %*/
12251 }
12252#line 12253 "parse.c"
12253 break;
12254
12255 case 36: /* stmt: stmt "'while' modifier" expr_value */
12256#line 3339 "parse.y"
12257 {
12258 clear_block_exit(p, false);
12259 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12260 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12261 }
12262 else {
12263 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12264 }
12265 /*% ripper: while_mod!($:3, $:1) %*/
12266 }
12267#line 12268 "parse.c"
12268 break;
12269
12270 case 37: /* stmt: stmt "'until' modifier" expr_value */
12271#line 3350 "parse.y"
12272 {
12273 clear_block_exit(p, false);
12274 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12275 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12276 }
12277 else {
12278 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12279 }
12280 /*% ripper: until_mod!($:3, $:1) %*/
12281 }
12282#line 12283 "parse.c"
12283 break;
12284
12285 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12286#line 3361 "parse.y"
12287 {
12288 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12289 NODE *resq;
12290 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12291 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12292 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12293 /*% ripper: rescue_mod!($:1, $:4) %*/
12294 }
12295#line 12296 "parse.c"
12296 break;
12297
12298 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12299#line 3370 "parse.y"
12300 {
12301 if (p->ctxt.in_def) {
12302 rb_warn0("END in method; use at_exit");
12303 }
12304 restore_block_exit(p, (yyvsp[-3].node_exits));
12305 p->ctxt = (yyvsp[-4].ctxt);
12306 {
12307 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, &(yyloc));
12308 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12309 }
12310 /*% ripper: END!($:compstmt) %*/
12311 }
12312#line 12313 "parse.c"
12313 break;
12314
12315 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12316#line 3384 "parse.y"
12317 {
12318 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12319 /*% ripper: massign!($:1, $:4) %*/
12320 }
12321#line 12322 "parse.c"
12322 break;
12323
12324 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12325#line 2918 "parse.y"
12326 {
12327 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12328 /*% ripper: assign!($:1, $:4) %*/
12329 }
12330#line 12331 "parse.c"
12331 break;
12332
12333 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12334#line 3391 "parse.y"
12335 {
12336 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12337 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12338 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12339 loc.beg_pos = (yylsp[-3]).beg_pos;
12340 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12341 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12342 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12343 }
12344#line 12345 "parse.c"
12345 break;
12346
12347 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12348#line 3401 "parse.y"
12349 {
12350 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12351 /*% ripper: massign!($:1, $:4) %*/
12352 }
12353#line 12354 "parse.c"
12354 break;
12355
12356 case 47: /* stmt: error */
12357#line 3407 "parse.y"
12358 {
12359 (void)yynerrs;
12360 (yyval.node) = NEW_ERROR(&(yyloc));
12361 }
12362#line 12363 "parse.c"
12363 break;
12364
12365 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12366#line 2918 "parse.y"
12367 {
12368 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12369 /*% ripper: assign!($:1, $:4) %*/
12370 }
12371#line 12372 "parse.c"
12372 break;
12373
12374 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12375#line 3043 "parse.y"
12376 {
12377 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12378 /*% ripper: opassign!($:1, $:2, $:4) %*/
12379 }
12380#line 12381 "parse.c"
12381 break;
12382
12383 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12384#line 3048 "parse.y"
12385 {
12386 (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]));
12387 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12388 }
12389#line 12390 "parse.c"
12390 break;
12391
12392 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12393#line 3053 "parse.y"
12394 {
12395 (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]));
12396 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12397 }
12398#line 12399 "parse.c"
12399 break;
12400
12401 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12402#line 3058 "parse.y"
12403 {
12404 (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]));
12405 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12406 }
12407#line 12408 "parse.c"
12408 break;
12409
12410 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12411#line 3063 "parse.y"
12412 {
12413 (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]));
12414 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12415 }
12416#line 12417 "parse.c"
12417 break;
12418
12419 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12420#line 3068 "parse.y"
12421 {
12422 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12423 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12424 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12425 }
12426#line 12427 "parse.c"
12427 break;
12428
12429 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12430#line 3074 "parse.y"
12431 {
12432 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12433 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12434 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
12435 }
12436#line 12437 "parse.c"
12437 break;
12438
12439 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12440#line 3080 "parse.y"
12441 {
12442 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12443 (yyval.node) = NEW_ERROR(&(yyloc));
12444 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12445 }
12446#line 12447 "parse.c"
12447 break;
12448
12449 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12450#line 2948 "parse.y"
12451 {
12452 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12453 restore_defun(p, (yyvsp[-3].node_def_temp));
12454 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12455 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12456 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12457 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12458 /*% ripper: def!($:head, $:args, $:$) %*/
12459 local_pop(p);
12460 }
12461#line 12462 "parse.c"
12462 break;
12463
12464 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12465#line 2959 "parse.y"
12466 {
12467 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12468 restore_defun(p, (yyvsp[-3].node_def_temp));
12469 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12470 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12471 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12472 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12473 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12474 local_pop(p);
12475 }
12476#line 12477 "parse.c"
12477 break;
12478
12479 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12480#line 3420 "parse.y"
12481 {
12482 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12483 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12484 /*% ripper: rescue_mod!($:1, $:4) %*/
12485 }
12486#line 12487 "parse.c"
12487 break;
12488
12489 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12490#line 3426 "parse.y"
12491 {
12492 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12493 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12494 }
12495#line 12496 "parse.c"
12496 break;
12497
12498 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12499#line 3434 "parse.y"
12500 {
12501 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12502 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12503 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12504 /*% ripper: rescue_mod!($:1, $:4) %*/
12505 }
12506#line 12507 "parse.c"
12507 break;
12508
12509 case 71: /* expr: expr "'and'" expr */
12510#line 3445 "parse.y"
12511 {
12512 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12513 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12514 }
12515#line 12516 "parse.c"
12516 break;
12517
12518 case 72: /* expr: expr "'or'" expr */
12519#line 3450 "parse.y"
12520 {
12521 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12522 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12523 }
12524#line 12525 "parse.c"
12525 break;
12526
12527 case 73: /* expr: "'not'" option_'\n' expr */
12528#line 3455 "parse.y"
12529 {
12530 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12531 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12532 }
12533#line 12534 "parse.c"
12534 break;
12535
12536 case 74: /* expr: '!' command_call */
12537#line 3460 "parse.y"
12538 {
12539 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12540 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12541 }
12542#line 12543 "parse.c"
12543 break;
12544
12545 case 75: /* $@7: %empty */
12546#line 3465 "parse.y"
12547 {
12548 value_expr((yyvsp[-1].node));
12549 }
12550#line 12551 "parse.c"
12551 break;
12552
12553 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12554#line 3470 "parse.y"
12555 {
12556 pop_pktbl(p, (yyvsp[-1].tbl));
12557 pop_pvtbl(p, (yyvsp[-2].tbl));
12558 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12559 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), 0, 0, &(yylsp[0])), &(yyloc), &NULL_LOC, &NULL_LOC);
12560 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12561 }
12562#line 12563 "parse.c"
12563 break;
12564
12565 case 77: /* $@8: %empty */
12566#line 3478 "parse.y"
12567 {
12568 value_expr((yyvsp[-1].node));
12569 }
12570#line 12571 "parse.c"
12571 break;
12572
12573 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12574#line 3483 "parse.y"
12575 {
12576 pop_pktbl(p, (yyvsp[-1].tbl));
12577 pop_pvtbl(p, (yyvsp[-2].tbl));
12578 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12579 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), NEW_TRUE(&(yylsp[0])), NEW_FALSE(&(yylsp[0])), &(yylsp[0])), &(yyloc), &NULL_LOC, &NULL_LOC);
12580 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12581 }
12582#line 12583 "parse.c"
12583 break;
12584
12585 case 80: /* def_name: fname */
12586#line 3494 "parse.y"
12587 {
12588 numparam_name(p, (yyvsp[0].id));
12589 local_push(p, 0);
12590 p->ctxt.in_def = 1;
12591 p->ctxt.in_rescue = before_rescue;
12592 p->ctxt.cant_return = 0;
12593 (yyval.id) = (yyvsp[0].id);
12594 }
12595#line 12596 "parse.c"
12596 break;
12597
12598 case 81: /* defn_head: k_def def_name */
12599#line 3505 "parse.y"
12600 {
12601 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12602 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12603 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12604 /*% ripper: $:def_name %*/
12605 }
12606#line 12607 "parse.c"
12607 break;
12608
12609 case 82: /* $@9: %empty */
12610#line 3514 "parse.y"
12611 {
12612 SET_LEX_STATE(EXPR_FNAME);
12613 }
12614#line 12615 "parse.c"
12615 break;
12616
12617 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12618#line 3518 "parse.y"
12619 {
12620 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12621 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12622 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12623 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12624 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12625 }
12626#line 12627 "parse.c"
12627 break;
12628
12629 case 84: /* value_expr_expr: expr */
12630#line 3143 "parse.y"
12631 {
12632 value_expr((yyvsp[0].node));
12633 (yyval.node) = (yyvsp[0].node);
12634 }
12635#line 12636 "parse.c"
12636 break;
12637
12638 case 86: /* expr_value: error */
12639#line 3529 "parse.y"
12640 {
12641 (yyval.node) = NEW_ERROR(&(yyloc));
12642 }
12643#line 12644 "parse.c"
12644 break;
12645
12646 case 87: /* $@10: %empty */
12647#line 3534 "parse.y"
12648 {COND_PUSH(1);}
12649#line 12650 "parse.c"
12650 break;
12651
12652 case 88: /* $@11: %empty */
12653#line 3534 "parse.y"
12654 {COND_POP();}
12655#line 12656 "parse.c"
12656 break;
12657
12658 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12659#line 3535 "parse.y"
12660 {
12661 (yyval.node) = (yyvsp[-2].node);
12662 /*% ripper: $:2 %*/
12663 }
12664#line 12665 "parse.c"
12665 break;
12666
12667 case 92: /* value_expr_command_call: command_call */
12668#line 3143 "parse.y"
12669 {
12670 value_expr((yyvsp[0].node));
12671 (yyval.node) = (yyvsp[0].node);
12672 }
12673#line 12674 "parse.c"
12674 break;
12675
12676 case 95: /* block_command: block_call call_op2 operation2 command_args */
12677#line 3550 "parse.y"
12678 {
12679 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12680 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12681 }
12682#line 12683 "parse.c"
12683 break;
12684
12685 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
12686#line 3557 "parse.y"
12687 {
12688 (yyval.node) = (yyvsp[-1].node);
12689 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12690 /*% ripper: $:2 %*/
12691 }
12692#line 12693 "parse.c"
12693 break;
12694
12695 case 97: /* fcall: "local variable or method" */
12696#line 3565 "parse.y"
12697 {
12698 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12699 /*% ripper: $:1 %*/
12700 }
12701#line 12702 "parse.c"
12702 break;
12703
12704 case 98: /* fcall: "constant" */
12705#line 3565 "parse.y"
12706 {
12707 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12708 /*% ripper: $:1 %*/
12709 }
12710#line 12711 "parse.c"
12711 break;
12712
12713 case 99: /* fcall: "method" */
12714#line 3565 "parse.y"
12715 {
12716 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12717 /*% ripper: $:1 %*/
12718 }
12719#line 12720 "parse.c"
12720 break;
12721
12722 case 100: /* command: fcall command_args */
12723#line 3572 "parse.y"
12724 {
12725 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12726 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12727 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12728 /*% ripper: command!($:1, $:2) %*/
12729 }
12730#line 12731 "parse.c"
12731 break;
12732
12733 case 101: /* command: fcall command_args cmd_brace_block */
12734#line 3579 "parse.y"
12735 {
12736 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12737 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12738 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12739 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12740 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12741 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12742 }
12743#line 12744 "parse.c"
12744 break;
12745
12746 case 102: /* command: primary_value call_op operation2 command_args */
12747#line 3588 "parse.y"
12748 {
12749 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12750 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12751 }
12752#line 12753 "parse.c"
12753 break;
12754
12755 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12756#line 3593 "parse.y"
12757 {
12758 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12759 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12760 }
12761#line 12762 "parse.c"
12762 break;
12763
12764 case 104: /* command: primary_value "::" operation2 command_args */
12765#line 3598 "parse.y"
12766 {
12767 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12768 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12769 }
12770#line 12771 "parse.c"
12771 break;
12772
12773 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12774#line 3603 "parse.y"
12775 {
12776 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12777 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12778 }
12779#line 12780 "parse.c"
12780 break;
12781
12782 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
12783#line 3608 "parse.y"
12784 {
12785 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12786 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12787 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12788 }
12789#line 12790 "parse.c"
12790 break;
12791
12792 case 107: /* command: "'super'" command_args */
12793#line 3614 "parse.y"
12794 {
12795 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12796 fixpos((yyval.node), (yyvsp[0].node));
12797 /*% ripper: super!($:2) %*/
12798 }
12799#line 12800 "parse.c"
12800 break;
12801
12802 case 108: /* command: k_yield command_args */
12803#line 3620 "parse.y"
12804 {
12805 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12806 fixpos((yyval.node), (yyvsp[0].node));
12807 /*% ripper: yield!($:2) %*/
12808 }
12809#line 12810 "parse.c"
12810 break;
12811
12812 case 109: /* command: k_return call_args */
12813#line 3626 "parse.y"
12814 {
12815 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12816 /*% ripper: return!($:2) %*/
12817 }
12818#line 12819 "parse.c"
12819 break;
12820
12821 case 110: /* command: "'break'" call_args */
12822#line 3631 "parse.y"
12823 {
12824 NODE *args = 0;
12825 args = ret_args(p, (yyvsp[0].node));
12826 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12827 /*% ripper: break!($:2) %*/
12828 }
12829#line 12830 "parse.c"
12830 break;
12831
12832 case 111: /* command: "'next'" call_args */
12833#line 3638 "parse.y"
12834 {
12835 NODE *args = 0;
12836 args = ret_args(p, (yyvsp[0].node));
12837 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12838 /*% ripper: next!($:2) %*/
12839 }
12840#line 12841 "parse.c"
12841 break;
12842
12843 case 113: /* mlhs: "(" mlhs_inner rparen */
12844#line 3648 "parse.y"
12845 {
12846 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12847 /*% ripper: mlhs_paren!($:2) %*/
12848 }
12849#line 12850 "parse.c"
12850 break;
12851
12852 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
12853#line 3656 "parse.y"
12854 {
12855 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12856 /*% ripper: mlhs_paren!($:2) %*/
12857 }
12858#line 12859 "parse.c"
12859 break;
12860
12861 case 116: /* mlhs_basic: mlhs_head */
12862#line 3663 "parse.y"
12863 {
12864 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12865 /*% ripper: $:1 %*/
12866 }
12867#line 12868 "parse.c"
12868 break;
12869
12870 case 117: /* mlhs_basic: mlhs_head mlhs_item */
12871#line 3668 "parse.y"
12872 {
12873 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12874 /*% ripper: mlhs_add!($:1, $:2) %*/
12875 }
12876#line 12877 "parse.c"
12877 break;
12878
12879 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
12880#line 3673 "parse.y"
12881 {
12882 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12883 /*% ripper: mlhs_add_star!($:1, $:3) %*/
12884 }
12885#line 12886 "parse.c"
12886 break;
12887
12888 case 119: /* mlhs_mlhs_item: mlhs_item */
12889#line 3030 "parse.y"
12890 {
12891 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12892 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12893 }
12894#line 12895 "parse.c"
12895 break;
12896
12897 case 120: /* mlhs_mlhs_item: mlhs_mlhs_item ',' mlhs_item */
12898#line 3035 "parse.y"
12899 {
12900 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12901 /*% ripper: mlhs_add!($:1, $:3) %*/
12902 }
12903#line 12904 "parse.c"
12904 break;
12905
12906 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_mlhs_item */
12907#line 3678 "parse.y"
12908 {
12909 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12910 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12911 }
12912#line 12913 "parse.c"
12913 break;
12914
12915 case 122: /* mlhs_basic: mlhs_head "*" */
12916#line 3683 "parse.y"
12917 {
12918 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12919 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
12920 }
12921#line 12922 "parse.c"
12922 break;
12923
12924 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_mlhs_item */
12925#line 3688 "parse.y"
12926 {
12927 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12928 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
12929 }
12930#line 12931 "parse.c"
12931 break;
12932
12933 case 124: /* mlhs_basic: "*" mlhs_node */
12934#line 3693 "parse.y"
12935 {
12936 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
12937 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
12938 }
12939#line 12940 "parse.c"
12940 break;
12941
12942 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_mlhs_item */
12943#line 3698 "parse.y"
12944 {
12945 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12946 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
12947 }
12948#line 12949 "parse.c"
12949 break;
12950
12951 case 126: /* mlhs_basic: "*" */
12952#line 3703 "parse.y"
12953 {
12954 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12955 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
12956 }
12957#line 12958 "parse.c"
12958 break;
12959
12960 case 127: /* mlhs_basic: "*" ',' mlhs_mlhs_item */
12961#line 3708 "parse.y"
12962 {
12963 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12964 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
12965 }
12966#line 12967 "parse.c"
12967 break;
12968
12969 case 129: /* mlhs_item: "(" mlhs_inner rparen */
12970#line 3716 "parse.y"
12971 {
12972 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
12973 /*% ripper: mlhs_paren!($:2) %*/
12974 }
12975#line 12976 "parse.c"
12976 break;
12977
12978 case 130: /* mlhs_head: mlhs_item ',' */
12979#line 3723 "parse.y"
12980 {
12981 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
12982 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12983 }
12984#line 12985 "parse.c"
12985 break;
12986
12987 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
12988#line 3728 "parse.y"
12989 {
12990 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
12991 /*% ripper: mlhs_add!($:1, $:2) %*/
12992 }
12993#line 12994 "parse.c"
12994 break;
12995
12996 case 132: /* mlhs_node: user_variable */
12997#line 3736 "parse.y"
12998 {
12999 /*% ripper: var_field!($:1) %*/
13000 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13001 }
13002#line 13003 "parse.c"
13003 break;
13004
13005 case 133: /* mlhs_node: keyword_variable */
13006#line 3736 "parse.y"
13007 {
13008 /*% ripper: var_field!($:1) %*/
13009 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13010 }
13011#line 13012 "parse.c"
13012 break;
13013
13014 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13015#line 3741 "parse.y"
13016 {
13017 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13018 /*% ripper: aref_field!($:1, $:3) %*/
13019 }
13020#line 13021 "parse.c"
13021 break;
13022
13023 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13024#line 3746 "parse.y"
13025 {
13026 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13027 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13028 /*% ripper: field!($:1, $:2, $:3) %*/
13029 }
13030#line 13031 "parse.c"
13031 break;
13032
13033 case 136: /* mlhs_node: primary_value call_op "constant" */
13034#line 3746 "parse.y"
13035 {
13036 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13037 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13038 /*% ripper: field!($:1, $:2, $:3) %*/
13039 }
13040#line 13041 "parse.c"
13041 break;
13042
13043 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13044#line 3752 "parse.y"
13045 {
13046 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13047 /*% ripper: const_path_field!($:1, $:3) %*/
13048 }
13049#line 13050 "parse.c"
13050 break;
13051
13052 case 138: /* mlhs_node: primary_value "::" "constant" */
13053#line 3757 "parse.y"
13054 {
13055 /*% ripper: const_path_field!($:1, $:3) %*/
13056 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
13057 }
13058#line 13059 "parse.c"
13059 break;
13060
13061 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13062#line 3762 "parse.y"
13063 {
13064 /*% ripper: top_const_field!($:2) %*/
13065 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
13066 }
13067#line 13068 "parse.c"
13068 break;
13069
13070 case 140: /* mlhs_node: backref */
13071#line 3767 "parse.y"
13072 {
13073 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13074 (yyval.node) = NEW_ERROR(&(yyloc));
13075 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13076 }
13077#line 13078 "parse.c"
13078 break;
13079
13080 case 141: /* lhs: user_variable */
13081#line 3775 "parse.y"
13082 {
13083 /*% ripper: var_field!($:1) %*/
13084 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13085 }
13086#line 13087 "parse.c"
13087 break;
13088
13089 case 142: /* lhs: keyword_variable */
13090#line 3775 "parse.y"
13091 {
13092 /*% ripper: var_field!($:1) %*/
13093 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13094 }
13095#line 13096 "parse.c"
13096 break;
13097
13098 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13099#line 3780 "parse.y"
13100 {
13101 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13102 /*% ripper: aref_field!($:1, $:3) %*/
13103 }
13104#line 13105 "parse.c"
13105 break;
13106
13107 case 144: /* lhs: primary_value call_op "local variable or method" */
13108#line 3785 "parse.y"
13109 {
13110 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13111 /*% ripper: field!($:1, $:2, $:3) %*/
13112 }
13113#line 13114 "parse.c"
13114 break;
13115
13116 case 145: /* lhs: primary_value call_op "constant" */
13117#line 3785 "parse.y"
13118 {
13119 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13120 /*% ripper: field!($:1, $:2, $:3) %*/
13121 }
13122#line 13123 "parse.c"
13123 break;
13124
13125 case 146: /* lhs: primary_value "::" "local variable or method" */
13126#line 3790 "parse.y"
13127 {
13128 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13129 /*% ripper: field!($:1, $:2, $:3) %*/
13130 }
13131#line 13132 "parse.c"
13132 break;
13133
13134 case 147: /* lhs: primary_value "::" "constant" */
13135#line 3795 "parse.y"
13136 {
13137 /*% ripper: const_path_field!($:1, $:3) %*/
13138 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
13139 }
13140#line 13141 "parse.c"
13141 break;
13142
13143 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13144#line 3800 "parse.y"
13145 {
13146 /*% ripper: top_const_field!($:2) %*/
13147 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
13148 }
13149#line 13150 "parse.c"
13150 break;
13151
13152 case 149: /* lhs: backref */
13153#line 3805 "parse.y"
13154 {
13155 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13156 (yyval.node) = NEW_ERROR(&(yyloc));
13157 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13158 }
13159#line 13160 "parse.c"
13160 break;
13161
13162 case 150: /* cname: "local variable or method" */
13163#line 3813 "parse.y"
13164 {
13165 static const char mesg[] = "class/module name must be CONSTANT";
13166 /*%%%*/
13167 yyerror1(&(yylsp[0]), mesg);
13168 /*% %*/
13169 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13170 }
13171#line 13172 "parse.c"
13172 break;
13173
13174 case 152: /* cpath: ":: at EXPR_BEG" cname */
13175#line 3824 "parse.y"
13176 {
13177 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
13178 /*% ripper: top_const_ref!($:2) %*/
13179 }
13180#line 13181 "parse.c"
13181 break;
13182
13183 case 153: /* cpath: cname */
13184#line 3829 "parse.y"
13185 {
13186 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc));
13187 /*% ripper: const_ref!($:1) %*/
13188 }
13189#line 13190 "parse.c"
13190 break;
13191
13192 case 154: /* cpath: primary_value "::" cname */
13193#line 3834 "parse.y"
13194 {
13195 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
13196 /*% ripper: const_path_ref!($:1, $:3) %*/
13197 }
13198#line 13199 "parse.c"
13199 break;
13200
13201 case 158: /* fname: op */
13202#line 3842 "parse.y"
13203 {
13204 SET_LEX_STATE(EXPR_ENDFN);
13205 (yyval.id) = (yyvsp[0].id);
13206 }
13207#line 13208 "parse.c"
13208 break;
13209
13210 case 160: /* fitem: fname */
13211#line 3850 "parse.y"
13212 {
13213 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13214 /*% ripper: symbol_literal!($:1) %*/
13215 }
13216#line 13217 "parse.c"
13217 break;
13218
13219 case 162: /* undef_list: fitem */
13220#line 3858 "parse.y"
13221 {
13222 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13223 /*% ripper: rb_ary_new3(1, $:1) %*/
13224 }
13225#line 13226 "parse.c"
13226 break;
13227
13228 case 163: /* $@12: %empty */
13229#line 3862 "parse.y"
13230 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13231#line 13232 "parse.c"
13232 break;
13233
13234 case 164: /* undef_list: undef_list ',' $@12 fitem */
13235#line 3863 "parse.y"
13236 {
13237 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13238 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13239 /*% ripper: rb_ary_push($:1, $:4) %*/
13240 }
13241#line 13242 "parse.c"
13242 break;
13243
13244 case 165: /* op: '|' */
13245#line 3870 "parse.y"
13246 { (yyval.id) = '|'; }
13247#line 13248 "parse.c"
13248 break;
13249
13250 case 166: /* op: '^' */
13251#line 3871 "parse.y"
13252 { (yyval.id) = '^'; }
13253#line 13254 "parse.c"
13254 break;
13255
13256 case 167: /* op: '&' */
13257#line 3872 "parse.y"
13258 { (yyval.id) = '&'; }
13259#line 13260 "parse.c"
13260 break;
13261
13262 case 168: /* op: "<=>" */
13263#line 3873 "parse.y"
13264 { (yyval.id) = tCMP; }
13265#line 13266 "parse.c"
13266 break;
13267
13268 case 169: /* op: "==" */
13269#line 3874 "parse.y"
13270 { (yyval.id) = tEQ; }
13271#line 13272 "parse.c"
13272 break;
13273
13274 case 170: /* op: "===" */
13275#line 3875 "parse.y"
13276 { (yyval.id) = tEQQ; }
13277#line 13278 "parse.c"
13278 break;
13279
13280 case 171: /* op: "=~" */
13281#line 3876 "parse.y"
13282 { (yyval.id) = tMATCH; }
13283#line 13284 "parse.c"
13284 break;
13285
13286 case 172: /* op: "!~" */
13287#line 3877 "parse.y"
13288 { (yyval.id) = tNMATCH; }
13289#line 13290 "parse.c"
13290 break;
13291
13292 case 173: /* op: '>' */
13293#line 3878 "parse.y"
13294 { (yyval.id) = '>'; }
13295#line 13296 "parse.c"
13296 break;
13297
13298 case 174: /* op: ">=" */
13299#line 3879 "parse.y"
13300 { (yyval.id) = tGEQ; }
13301#line 13302 "parse.c"
13302 break;
13303
13304 case 175: /* op: '<' */
13305#line 3880 "parse.y"
13306 { (yyval.id) = '<'; }
13307#line 13308 "parse.c"
13308 break;
13309
13310 case 176: /* op: "<=" */
13311#line 3881 "parse.y"
13312 { (yyval.id) = tLEQ; }
13313#line 13314 "parse.c"
13314 break;
13315
13316 case 177: /* op: "!=" */
13317#line 3882 "parse.y"
13318 { (yyval.id) = tNEQ; }
13319#line 13320 "parse.c"
13320 break;
13321
13322 case 178: /* op: "<<" */
13323#line 3883 "parse.y"
13324 { (yyval.id) = tLSHFT; }
13325#line 13326 "parse.c"
13326 break;
13327
13328 case 179: /* op: ">>" */
13329#line 3884 "parse.y"
13330 { (yyval.id) = tRSHFT; }
13331#line 13332 "parse.c"
13332 break;
13333
13334 case 180: /* op: '+' */
13335#line 3885 "parse.y"
13336 { (yyval.id) = '+'; }
13337#line 13338 "parse.c"
13338 break;
13339
13340 case 181: /* op: '-' */
13341#line 3886 "parse.y"
13342 { (yyval.id) = '-'; }
13343#line 13344 "parse.c"
13344 break;
13345
13346 case 182: /* op: '*' */
13347#line 3887 "parse.y"
13348 { (yyval.id) = '*'; }
13349#line 13350 "parse.c"
13350 break;
13351
13352 case 183: /* op: "*" */
13353#line 3888 "parse.y"
13354 { (yyval.id) = '*'; }
13355#line 13356 "parse.c"
13356 break;
13357
13358 case 184: /* op: '/' */
13359#line 3889 "parse.y"
13360 { (yyval.id) = '/'; }
13361#line 13362 "parse.c"
13362 break;
13363
13364 case 185: /* op: '%' */
13365#line 3890 "parse.y"
13366 { (yyval.id) = '%'; }
13367#line 13368 "parse.c"
13368 break;
13369
13370 case 186: /* op: "**" */
13371#line 3891 "parse.y"
13372 { (yyval.id) = tPOW; }
13373#line 13374 "parse.c"
13374 break;
13375
13376 case 187: /* op: "**arg" */
13377#line 3892 "parse.y"
13378 { (yyval.id) = tDSTAR; }
13379#line 13380 "parse.c"
13380 break;
13381
13382 case 188: /* op: '!' */
13383#line 3893 "parse.y"
13384 { (yyval.id) = '!'; }
13385#line 13386 "parse.c"
13386 break;
13387
13388 case 189: /* op: '~' */
13389#line 3894 "parse.y"
13390 { (yyval.id) = '~'; }
13391#line 13392 "parse.c"
13392 break;
13393
13394 case 190: /* op: "unary+" */
13395#line 3895 "parse.y"
13396 { (yyval.id) = tUPLUS; }
13397#line 13398 "parse.c"
13398 break;
13399
13400 case 191: /* op: "unary-" */
13401#line 3896 "parse.y"
13402 { (yyval.id) = tUMINUS; }
13403#line 13404 "parse.c"
13404 break;
13405
13406 case 192: /* op: "[]" */
13407#line 3897 "parse.y"
13408 { (yyval.id) = tAREF; }
13409#line 13410 "parse.c"
13410 break;
13411
13412 case 193: /* op: "[]=" */
13413#line 3898 "parse.y"
13414 { (yyval.id) = tASET; }
13415#line 13416 "parse.c"
13416 break;
13417
13418 case 194: /* op: '`' */
13419#line 3899 "parse.y"
13420 { (yyval.id) = '`'; }
13421#line 13422 "parse.c"
13422 break;
13423
13424 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13425#line 2918 "parse.y"
13426 {
13427 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13428 /*% ripper: assign!($:1, $:4) %*/
13429 }
13430#line 13431 "parse.c"
13431 break;
13432
13433 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13434#line 3043 "parse.y"
13435 {
13436 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13437 /*% ripper: opassign!($:1, $:2, $:4) %*/
13438 }
13439#line 13440 "parse.c"
13440 break;
13441
13442 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13443#line 3048 "parse.y"
13444 {
13445 (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]));
13446 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13447 }
13448#line 13449 "parse.c"
13449 break;
13450
13451 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13452#line 3053 "parse.y"
13453 {
13454 (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]));
13455 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13456 }
13457#line 13458 "parse.c"
13458 break;
13459
13460 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13461#line 3058 "parse.y"
13462 {
13463 (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]));
13464 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13465 }
13466#line 13467 "parse.c"
13467 break;
13468
13469 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13470#line 3063 "parse.y"
13471 {
13472 (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]));
13473 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13474 }
13475#line 13476 "parse.c"
13476 break;
13477
13478 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13479#line 3068 "parse.y"
13480 {
13481 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13482 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13483 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13484 }
13485#line 13486 "parse.c"
13486 break;
13487
13488 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13489#line 3074 "parse.y"
13490 {
13491 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13492 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13493 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13494 }
13495#line 13496 "parse.c"
13496 break;
13497
13498 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13499#line 3080 "parse.y"
13500 {
13501 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13502 (yyval.node) = NEW_ERROR(&(yyloc));
13503 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13504 }
13505#line 13506 "parse.c"
13506 break;
13507
13508 case 247: /* range_expr_arg: arg ".." arg */
13509#line 3102 "parse.y"
13510 {
13511 value_expr((yyvsp[-2].node));
13512 value_expr((yyvsp[0].node));
13513 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13514 /*% ripper: dot2!($:1, $:3) %*/
13515 }
13516#line 13517 "parse.c"
13517 break;
13518
13519 case 248: /* range_expr_arg: arg "..." arg */
13520#line 3109 "parse.y"
13521 {
13522 value_expr((yyvsp[-2].node));
13523 value_expr((yyvsp[0].node));
13524 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13525 /*% ripper: dot3!($:1, $:3) %*/
13526 }
13527#line 13528 "parse.c"
13528 break;
13529
13530 case 249: /* range_expr_arg: arg ".." */
13531#line 3116 "parse.y"
13532 {
13533 value_expr((yyvsp[-1].node));
13534 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13535 /*% ripper: dot2!($:1, Qnil) %*/
13536 }
13537#line 13538 "parse.c"
13538 break;
13539
13540 case 250: /* range_expr_arg: arg "..." */
13541#line 3122 "parse.y"
13542 {
13543 value_expr((yyvsp[-1].node));
13544 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13545 /*% ripper: dot3!($:1, Qnil) %*/
13546 }
13547#line 13548 "parse.c"
13548 break;
13549
13550 case 251: /* range_expr_arg: "(.." arg */
13551#line 3128 "parse.y"
13552 {
13553 value_expr((yyvsp[0].node));
13554 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13555 /*% ripper: dot2!(Qnil, $:2) %*/
13556 }
13557#line 13558 "parse.c"
13558 break;
13559
13560 case 252: /* range_expr_arg: "(..." arg */
13561#line 3134 "parse.y"
13562 {
13563 value_expr((yyvsp[0].node));
13564 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13565 /*% ripper: dot3!(Qnil, $:2) %*/
13566 }
13567#line 13568 "parse.c"
13568 break;
13569
13570 case 254: /* arg: arg '+' arg */
13571#line 3920 "parse.y"
13572 {
13573 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13574 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13575 }
13576#line 13577 "parse.c"
13577 break;
13578
13579 case 255: /* arg: arg '-' arg */
13580#line 3925 "parse.y"
13581 {
13582 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13583 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13584 }
13585#line 13586 "parse.c"
13586 break;
13587
13588 case 256: /* arg: arg '*' arg */
13589#line 3930 "parse.y"
13590 {
13591 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13592 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13593 }
13594#line 13595 "parse.c"
13595 break;
13596
13597 case 257: /* arg: arg '/' arg */
13598#line 3935 "parse.y"
13599 {
13600 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13601 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13602 }
13603#line 13604 "parse.c"
13604 break;
13605
13606 case 258: /* arg: arg '%' arg */
13607#line 3940 "parse.y"
13608 {
13609 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13610 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13611 }
13612#line 13613 "parse.c"
13613 break;
13614
13615 case 259: /* arg: arg "**" arg */
13616#line 3945 "parse.y"
13617 {
13618 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13619 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13620 }
13621#line 13622 "parse.c"
13622 break;
13623
13624 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13625#line 3950 "parse.y"
13626 {
13627 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13628 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13629 }
13630#line 13631 "parse.c"
13631 break;
13632
13633 case 261: /* arg: "unary+" arg */
13634#line 3955 "parse.y"
13635 {
13636 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13637 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13638 }
13639#line 13640 "parse.c"
13640 break;
13641
13642 case 262: /* arg: "unary-" arg */
13643#line 3960 "parse.y"
13644 {
13645 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13646 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13647 }
13648#line 13649 "parse.c"
13649 break;
13650
13651 case 263: /* arg: arg '|' arg */
13652#line 3965 "parse.y"
13653 {
13654 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13655 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13656 }
13657#line 13658 "parse.c"
13658 break;
13659
13660 case 264: /* arg: arg '^' arg */
13661#line 3970 "parse.y"
13662 {
13663 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13664 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13665 }
13666#line 13667 "parse.c"
13667 break;
13668
13669 case 265: /* arg: arg '&' arg */
13670#line 3975 "parse.y"
13671 {
13672 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13673 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13674 }
13675#line 13676 "parse.c"
13676 break;
13677
13678 case 266: /* arg: arg "<=>" arg */
13679#line 3980 "parse.y"
13680 {
13681 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13682 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13683 }
13684#line 13685 "parse.c"
13685 break;
13686
13687 case 268: /* arg: arg "==" arg */
13688#line 3986 "parse.y"
13689 {
13690 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13691 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13692 }
13693#line 13694 "parse.c"
13694 break;
13695
13696 case 269: /* arg: arg "===" arg */
13697#line 3991 "parse.y"
13698 {
13699 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13700 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13701 }
13702#line 13703 "parse.c"
13703 break;
13704
13705 case 270: /* arg: arg "!=" arg */
13706#line 3996 "parse.y"
13707 {
13708 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13709 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13710 }
13711#line 13712 "parse.c"
13712 break;
13713
13714 case 271: /* arg: arg "=~" arg */
13715#line 4001 "parse.y"
13716 {
13717 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13718 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13719 }
13720#line 13721 "parse.c"
13721 break;
13722
13723 case 272: /* arg: arg "!~" arg */
13724#line 4006 "parse.y"
13725 {
13726 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13727 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13728 }
13729#line 13730 "parse.c"
13730 break;
13731
13732 case 273: /* arg: '!' arg */
13733#line 4011 "parse.y"
13734 {
13735 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13736 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13737 }
13738#line 13739 "parse.c"
13739 break;
13740
13741 case 274: /* arg: '~' arg */
13742#line 4016 "parse.y"
13743 {
13744 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13745 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13746 }
13747#line 13748 "parse.c"
13748 break;
13749
13750 case 275: /* arg: arg "<<" arg */
13751#line 4021 "parse.y"
13752 {
13753 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13754 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13755 }
13756#line 13757 "parse.c"
13757 break;
13758
13759 case 276: /* arg: arg ">>" arg */
13760#line 4026 "parse.y"
13761 {
13762 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13763 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13764 }
13765#line 13766 "parse.c"
13766 break;
13767
13768 case 277: /* arg: arg "&&" arg */
13769#line 4031 "parse.y"
13770 {
13771 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13772 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13773 }
13774#line 13775 "parse.c"
13775 break;
13776
13777 case 278: /* arg: arg "||" arg */
13778#line 4036 "parse.y"
13779 {
13780 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13781 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13782 }
13783#line 13784 "parse.c"
13784 break;
13785
13786 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
13787#line 4041 "parse.y"
13788 {
13789 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13790 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc));
13791 /*% ripper: defined!($:4) %*/
13792 }
13793#line 13794 "parse.c"
13794 break;
13795
13796 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
13797#line 2948 "parse.y"
13798 {
13799 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13800 restore_defun(p, (yyvsp[-3].node_def_temp));
13801 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13802 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13803 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13804 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13805 /*% ripper: def!($:head, $:args, $:$) %*/
13806 local_pop(p);
13807 }
13808#line 13809 "parse.c"
13809 break;
13810
13811 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
13812#line 2959 "parse.y"
13813 {
13814 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13815 restore_defun(p, (yyvsp[-3].node_def_temp));
13816 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13817 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13818 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13819 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13820 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13821 local_pop(p);
13822 }
13823#line 13824 "parse.c"
13824 break;
13825
13826 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
13827#line 4052 "parse.y"
13828 {
13829 value_expr((yyvsp[-5].node));
13830 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
13831 fixpos((yyval.node), (yyvsp[-5].node));
13832 /*% ripper: ifop!($:1, $:3, $:6) %*/
13833 }
13834#line 13835 "parse.c"
13835 break;
13836
13837 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13838#line 4062 "parse.y"
13839 {
13840 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13841 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13842 /*% ripper: rescue_mod!($:1, $:4) %*/
13843 }
13844#line 13845 "parse.c"
13845 break;
13846
13847 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
13848#line 4068 "parse.y"
13849 {
13850 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13851 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13852 }
13853#line 13854 "parse.c"
13854 break;
13855
13856 case 289: /* relop: '>' */
13857#line 4074 "parse.y"
13858 {(yyval.id) = '>';}
13859#line 13860 "parse.c"
13860 break;
13861
13862 case 290: /* relop: '<' */
13863#line 4075 "parse.y"
13864 {(yyval.id) = '<';}
13865#line 13866 "parse.c"
13866 break;
13867
13868 case 291: /* relop: ">=" */
13869#line 4076 "parse.y"
13870 {(yyval.id) = idGE;}
13871#line 13872 "parse.c"
13872 break;
13873
13874 case 292: /* relop: "<=" */
13875#line 4077 "parse.y"
13876 {(yyval.id) = idLE;}
13877#line 13878 "parse.c"
13878 break;
13879
13880 case 293: /* rel_expr: arg relop arg */
13881#line 4081 "parse.y"
13882 {
13883 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13884 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13885 }
13886#line 13887 "parse.c"
13887 break;
13888
13889 case 294: /* rel_expr: rel_expr relop arg */
13890#line 4086 "parse.y"
13891 {
13892 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13893 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13894 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13895 }
13896#line 13897 "parse.c"
13897 break;
13898
13899 case 295: /* lex_ctxt: none */
13900#line 4094 "parse.y"
13901 {
13902 (yyval.ctxt) = p->ctxt;
13903 }
13904#line 13905 "parse.c"
13905 break;
13906
13907 case 296: /* begin_defined: lex_ctxt */
13908#line 4100 "parse.y"
13909 {
13910 p->ctxt.in_defined = 1;
13911 (yyval.ctxt) = (yyvsp[0].ctxt);
13912 }
13913#line 13914 "parse.c"
13914 break;
13915
13916 case 297: /* after_rescue: lex_ctxt */
13917#line 4107 "parse.y"
13918 {
13919 p->ctxt.in_rescue = after_rescue;
13920 (yyval.ctxt) = (yyvsp[0].ctxt);
13921 }
13922#line 13923 "parse.c"
13923 break;
13924
13925 case 298: /* value_expr_arg: arg */
13926#line 3143 "parse.y"
13927 {
13928 value_expr((yyvsp[0].node));
13929 (yyval.node) = (yyvsp[0].node);
13930 }
13931#line 13932 "parse.c"
13932 break;
13933
13934 case 302: /* aref_args: args ',' assocs trailer */
13935#line 4119 "parse.y"
13936 {
13937 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13938 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13939 }
13940#line 13941 "parse.c"
13941 break;
13942
13943 case 303: /* aref_args: assocs trailer */
13944#line 4124 "parse.y"
13945 {
13946 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
13947 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13948 }
13949#line 13950 "parse.c"
13950 break;
13951
13952 case 304: /* arg_rhs: arg */
13953#line 4131 "parse.y"
13954 {
13955 value_expr((yyvsp[0].node));
13956 (yyval.node) = (yyvsp[0].node);
13957 }
13958#line 13959 "parse.c"
13959 break;
13960
13961 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
13962#line 4136 "parse.y"
13963 {
13964 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13965 value_expr((yyvsp[-3].node));
13966 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13967 /*% ripper: rescue_mod!($:1, $:4) %*/
13968 }
13969#line 13970 "parse.c"
13970 break;
13971
13972 case 306: /* paren_args: '(' opt_call_args rparen */
13973#line 4145 "parse.y"
13974 {
13975 (yyval.node) = (yyvsp[-1].node);
13976 /*% ripper: arg_paren!($:2) %*/
13977 }
13978#line 13979 "parse.c"
13979 break;
13980
13981 case 307: /* paren_args: '(' args ',' args_forward rparen */
13982#line 4150 "parse.y"
13983 {
13984 if (!check_forwarding_args(p)) {
13985 (yyval.node) = 0;
13986 }
13987 else {
13988 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
13989 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
13990 }
13991 }
13992#line 13993 "parse.c"
13993 break;
13994
13995 case 308: /* paren_args: '(' args_forward rparen */
13996#line 4160 "parse.y"
13997 {
13998 if (!check_forwarding_args(p)) {
13999 (yyval.node) = 0;
14000 }
14001 else {
14002 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14003 /*% ripper: arg_paren!($:2) %*/
14004 }
14005 }
14006#line 14007 "parse.c"
14007 break;
14008
14009 case 310: /* opt_paren_args: paren_args */
14010#line 4173 "parse.y"
14011 {
14012 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14013 }
14014#line 14015 "parse.c"
14015 break;
14016
14017 case 314: /* opt_call_args: args ',' assocs ',' */
14018#line 4182 "parse.y"
14019 {
14020 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14021 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14022 }
14023#line 14024 "parse.c"
14024 break;
14025
14026 case 315: /* opt_call_args: assocs ',' */
14027#line 4187 "parse.y"
14028 {
14029 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14030 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14031 }
14032#line 14033 "parse.c"
14033 break;
14034
14035 case 316: /* value_expr_command: command */
14036#line 3143 "parse.y"
14037 {
14038 value_expr((yyvsp[0].node));
14039 (yyval.node) = (yyvsp[0].node);
14040 }
14041#line 14042 "parse.c"
14042 break;
14043
14044 case 317: /* call_args: value_expr_command */
14045#line 4194 "parse.y"
14046 {
14047 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14048 /*% ripper: args_add!(args_new!, $:1) %*/
14049 }
14050#line 14051 "parse.c"
14051 break;
14052
14053 case 318: /* call_args: args opt_block_arg */
14054#line 4199 "parse.y"
14055 {
14056 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14057 /*% ripper: args_add_block!($:1, $:2) %*/
14058 }
14059#line 14060 "parse.c"
14060 break;
14061
14062 case 319: /* call_args: assocs opt_block_arg */
14063#line 4204 "parse.y"
14064 {
14065 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14066 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14067 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14068 }
14069#line 14070 "parse.c"
14070 break;
14071
14072 case 320: /* call_args: args ',' assocs opt_block_arg */
14073#line 4210 "parse.y"
14074 {
14075 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14076 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14077 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14078 }
14079#line 14080 "parse.c"
14080 break;
14081
14082 case 322: /* $@13: %empty */
14083#line 4219 "parse.y"
14084 {
14085 /* If call_args starts with a open paren '(' or '[',
14086 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14087 * but the push must be done after CMDARG_PUSH(1).
14088 * So this code makes them consistent by first cancelling
14089 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14090 * and finally redoing CMDARG_PUSH(0).
14091 */
14092 int lookahead = 0;
14093 switch (yychar) {
14094 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14095 lookahead = 1;
14096 }
14097 if (lookahead) CMDARG_POP();
14098 CMDARG_PUSH(1);
14099 if (lookahead) CMDARG_PUSH(0);
14100 }
14101#line 14102 "parse.c"
14102 break;
14103
14104 case 323: /* command_args: $@13 call_args */
14105#line 4237 "parse.y"
14106 {
14107 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14108 * but the push must be done after CMDARG_POP() in the parser.
14109 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14110 * CMDARG_POP() to pop 1 pushed by command_args,
14111 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14112 */
14113 int lookahead = 0;
14114 switch (yychar) {
14115 case tLBRACE_ARG:
14116 lookahead = 1;
14117 }
14118 if (lookahead) CMDARG_POP();
14119 CMDARG_POP();
14120 if (lookahead) CMDARG_PUSH(0);
14121 (yyval.node) = (yyvsp[0].node);
14122 /*% ripper: $:2 %*/
14123 }
14124#line 14125 "parse.c"
14125 break;
14126
14127 case 324: /* block_arg: "&" arg_value */
14128#line 4258 "parse.y"
14129 {
14130 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14131 /*% ripper: $:2 %*/
14132 }
14133#line 14134 "parse.c"
14134 break;
14135
14136 case 325: /* block_arg: "&" */
14137#line 4263 "parse.y"
14138 {
14139 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14140 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14141 /*% ripper: Qnil %*/
14142 }
14143#line 14144 "parse.c"
14144 break;
14145
14146 case 326: /* opt_block_arg: ',' block_arg */
14147#line 4271 "parse.y"
14148 {
14149 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14150 /*% ripper: $:2 %*/
14151 }
14152#line 14153 "parse.c"
14153 break;
14154
14155 case 327: /* opt_block_arg: none */
14156#line 4276 "parse.y"
14157 {
14158 (yyval.node_block_pass) = 0;
14159 /*% ripper: Qfalse %*/
14160 }
14161#line 14162 "parse.c"
14162 break;
14163
14164 case 328: /* args: arg_value */
14165#line 4284 "parse.y"
14166 {
14167 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14168 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14169 }
14170#line 14171 "parse.c"
14171 break;
14172
14173 case 329: /* args: arg_splat */
14174#line 4289 "parse.y"
14175 {
14176 (yyval.node) = (yyvsp[0].node);
14177 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14178 }
14179#line 14180 "parse.c"
14180 break;
14181
14182 case 330: /* args: args ',' arg_value */
14183#line 4294 "parse.y"
14184 {
14185 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14186 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14187 }
14188#line 14189 "parse.c"
14189 break;
14190
14191 case 331: /* args: args ',' arg_splat */
14192#line 4299 "parse.y"
14193 {
14194 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14195 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14196 }
14197#line 14198 "parse.c"
14198 break;
14199
14200 case 332: /* arg_splat: "*" arg_value */
14201#line 4307 "parse.y"
14202 {
14203 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14204 /*% ripper: $:arg_value %*/
14205 }
14206#line 14207 "parse.c"
14207 break;
14208
14209 case 333: /* arg_splat: "*" */
14210#line 4312 "parse.y"
14211 {
14212 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14213 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14214 /*% ripper: Qnil %*/
14215 }
14216#line 14217 "parse.c"
14217 break;
14218
14219 case 336: /* mrhs: args ',' arg_value */
14220#line 4326 "parse.y"
14221 {
14222 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14223 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14224 }
14225#line 14226 "parse.c"
14226 break;
14227
14228 case 337: /* mrhs: args ',' "*" arg_value */
14229#line 4331 "parse.y"
14230 {
14231 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14232 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14233 }
14234#line 14235 "parse.c"
14235 break;
14236
14237 case 338: /* mrhs: "*" arg_value */
14238#line 4336 "parse.y"
14239 {
14240 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14241 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14242 }
14243#line 14244 "parse.c"
14244 break;
14245
14246 case 349: /* primary: "method" */
14247#line 4357 "parse.y"
14248 {
14249 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14250 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
14251 }
14252#line 14253 "parse.c"
14253 break;
14254
14255 case 350: /* $@14: %empty */
14256#line 4362 "parse.y"
14257 {
14258 CMDARG_PUSH(0);
14259 }
14260#line 14261 "parse.c"
14261 break;
14262
14263 case 351: /* primary: k_begin $@14 bodystmt k_end */
14264#line 4367 "parse.y"
14265 {
14266 CMDARG_POP();
14267 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14268 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14269 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14270 /*% ripper: begin!($:3) %*/
14271 }
14272#line 14273 "parse.c"
14273 break;
14274
14275 case 352: /* $@15: %empty */
14276#line 4374 "parse.y"
14277 {SET_LEX_STATE(EXPR_ENDARG);}
14278#line 14279 "parse.c"
14279 break;
14280
14281 case 353: /* primary: "( arg" compstmt_stmts $@15 ')' */
14282#line 4375 "parse.y"
14283 {
14284 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14285 (yyval.node) = (yyvsp[-2].node);
14286 /*% ripper: paren!($:2) %*/
14287 }
14288#line 14289 "parse.c"
14289 break;
14290
14291 case 354: /* primary: "(" compstmt_stmts ')' */
14292#line 4381 "parse.y"
14293 {
14294 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14295 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14296 /*% ripper: paren!($:2) %*/
14297 }
14298#line 14299 "parse.c"
14299 break;
14300
14301 case 355: /* primary: primary_value "::" "constant" */
14302#line 4387 "parse.y"
14303 {
14304 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
14305 /*% ripper: const_path_ref!($:1, $:3) %*/
14306 }
14307#line 14308 "parse.c"
14308 break;
14309
14310 case 356: /* primary: ":: at EXPR_BEG" "constant" */
14311#line 4392 "parse.y"
14312 {
14313 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
14314 /*% ripper: top_const_ref!($:2) %*/
14315 }
14316#line 14317 "parse.c"
14317 break;
14318
14319 case 357: /* primary: "[" aref_args ']' */
14320#line 4397 "parse.y"
14321 {
14322 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14323 /*% ripper: array!($:2) %*/
14324 }
14325#line 14326 "parse.c"
14326 break;
14327
14328 case 358: /* primary: "{" assoc_list '}' */
14329#line 4402 "parse.y"
14330 {
14331 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14332 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14333 /*% ripper: hash!($:2) %*/
14334 }
14335#line 14336 "parse.c"
14336 break;
14337
14338 case 359: /* primary: k_return */
14339#line 4408 "parse.y"
14340 {
14341 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14342 /*% ripper: return0! %*/
14343 }
14344#line 14345 "parse.c"
14345 break;
14346
14347 case 360: /* primary: k_yield '(' call_args rparen */
14348#line 4413 "parse.y"
14349 {
14350 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14351 /*% ripper: yield!(paren!($:3)) %*/
14352 }
14353#line 14354 "parse.c"
14354 break;
14355
14356 case 361: /* primary: k_yield '(' rparen */
14357#line 4418 "parse.y"
14358 {
14359 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14360 /*% ripper: yield!(paren!(args_new!)) %*/
14361 }
14362#line 14363 "parse.c"
14363 break;
14364
14365 case 362: /* primary: k_yield */
14366#line 4423 "parse.y"
14367 {
14368 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14369 /*% ripper: yield0! %*/
14370 }
14371#line 14372 "parse.c"
14372 break;
14373
14374 case 363: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14375#line 4428 "parse.y"
14376 {
14377 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14378 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc));
14379 /*% ripper: defined!($:5) %*/
14380 }
14381#line 14382 "parse.c"
14382 break;
14383
14384 case 364: /* primary: "'not'" '(' expr rparen */
14385#line 4434 "parse.y"
14386 {
14387 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14388 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14389 }
14390#line 14391 "parse.c"
14391 break;
14392
14393 case 365: /* primary: "'not'" '(' rparen */
14394#line 4439 "parse.y"
14395 {
14396 (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14397 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14398 }
14399#line 14400 "parse.c"
14400 break;
14401
14402 case 366: /* primary: fcall brace_block */
14403#line 4444 "parse.y"
14404 {
14405 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14406 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14407 }
14408#line 14409 "parse.c"
14409 break;
14410
14411 case 368: /* primary: method_call brace_block */
14412#line 4450 "parse.y"
14413 {
14414 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14415 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14416 /*% ripper: method_add_block!($:1, $:2) %*/
14417 }
14418#line 14419 "parse.c"
14419 break;
14420
14421 case 370: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14422#line 4460 "parse.y"
14423 {
14424 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14425 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14426
14427 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14428 fixpos((yyval.node), (yyvsp[-4].node));
14429 /*% ripper: if!($:2, $:4, $:5) %*/
14430 }
14431#line 14432 "parse.c"
14432 break;
14433
14434 case 371: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14435#line 4472 "parse.y"
14436 {
14437 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14438 fixpos((yyval.node), (yyvsp[-4].node));
14439 /*% ripper: unless!($:2, $:4, $:5) %*/
14440 }
14441#line 14442 "parse.c"
14442 break;
14443
14444 case 372: /* primary: k_while expr_value_do compstmt_stmts k_end */
14445#line 4480 "parse.y"
14446 {
14447 restore_block_exit(p, (yyvsp[-3].node_exits));
14448 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14449 fixpos((yyval.node), (yyvsp[-2].node));
14450 /*% ripper: while!($:2, $:3) %*/
14451 }
14452#line 14453 "parse.c"
14453 break;
14454
14455 case 373: /* primary: k_until expr_value_do compstmt_stmts k_end */
14456#line 4489 "parse.y"
14457 {
14458 restore_block_exit(p, (yyvsp[-3].node_exits));
14459 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14460 fixpos((yyval.node), (yyvsp[-2].node));
14461 /*% ripper: until!($:2, $:3) %*/
14462 }
14463#line 14464 "parse.c"
14464 break;
14465
14466 case 374: /* @16: %empty */
14467#line 4496 "parse.y"
14468 {
14469 (yyval.labels) = p->case_labels;
14470 p->case_labels = CHECK_LITERAL_WHEN;
14471 }
14472#line 14473 "parse.c"
14473 break;
14474
14475 case 375: /* primary: k_case expr_value option_terms @16 case_body k_end */
14476#line 4502 "parse.y"
14477 {
14478 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14479 p->case_labels = (yyvsp[-2].labels);
14480 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14481 fixpos((yyval.node), (yyvsp[-4].node));
14482 /*% ripper: case!($:2, $:5) %*/
14483 }
14484#line 14485 "parse.c"
14485 break;
14486
14487 case 376: /* @17: %empty */
14488#line 4510 "parse.y"
14489 {
14490 (yyval.labels) = p->case_labels;
14491 p->case_labels = 0;
14492 }
14493#line 14494 "parse.c"
14494 break;
14495
14496 case 377: /* primary: k_case option_terms @17 case_body k_end */
14497#line 4516 "parse.y"
14498 {
14499 if (p->case_labels) st_free_table(p->case_labels);
14500 p->case_labels = (yyvsp[-2].labels);
14501 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14502 /*% ripper: case!(Qnil, $:4) %*/
14503 }
14504#line 14505 "parse.c"
14505 break;
14506
14507 case 378: /* primary: k_case expr_value option_terms p_case_body k_end */
14508#line 4525 "parse.y"
14509 {
14510 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14511 /*% ripper: case!($:2, $:4) %*/
14512 }
14513#line 14514 "parse.c"
14514 break;
14515
14516 case 379: /* $@18: %empty */
14517#line 4530 "parse.y"
14518 {COND_PUSH(1);}
14519#line 14520 "parse.c"
14520 break;
14521
14522 case 380: /* $@19: %empty */
14523#line 4530 "parse.y"
14524 {COND_POP();}
14525#line 14526 "parse.c"
14526 break;
14527
14528 case 381: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14529#line 4533 "parse.y"
14530 {
14531 restore_block_exit(p, (yyvsp[-8].node_exits));
14532 /*
14533 * for a, b, c in e
14534 * #=>
14535 * e.each{|*x| a, b, c = x}
14536 *
14537 * for a in e
14538 * #=>
14539 * e.each{|x| a, = x}
14540 */
14541 ID id = internal_id(p);
14542 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14543 rb_node_args_t *args;
14544 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14545 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14546 tbl->ids[0] = id; /* internal id */
14547
14548 switch (nd_type((yyvsp[-7].node))) {
14549 case NODE_LASGN:
14550 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14551 set_nd_value(p, (yyvsp[-7].node), internal_var);
14552 id = 0;
14553 m->nd_plen = 1;
14554 m->nd_next = (yyvsp[-7].node);
14555 break;
14556 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14557 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14558 break;
14559 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14560 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]));
14561 }
14562 /* {|*internal_id| <m> = internal_id; ... } */
14563 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-7])), &(yylsp[-7]));
14564 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), &(yyloc));
14565 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14566 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14567 fixpos((yyval.node), (yyvsp[-7].node));
14568 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14569 }
14570#line 14571 "parse.c"
14571 break;
14572
14573 case 382: /* $@20: %empty */
14574#line 4574 "parse.y"
14575 {
14576 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14577 }
14578#line 14579 "parse.c"
14579 break;
14580
14581 case 383: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14582#line 4579 "parse.y"
14583 {
14584 YYLTYPE inheritance_operator_loc = NULL_LOC;
14585 if ((yyvsp[-3].node)) {
14586 inheritance_operator_loc = (yylsp[-3]);
14587 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14588 }
14589 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14590 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14591 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14592 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14593 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14594 local_pop(p);
14595 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14596 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14597 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14598 }
14599#line 14600 "parse.c"
14600 break;
14601
14602 case 384: /* $@21: %empty */
14603#line 4596 "parse.y"
14604 {
14605 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14606 }
14607#line 14608 "parse.c"
14608 break;
14609
14610 case 385: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14611#line 4602 "parse.y"
14612 {
14613 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
14614 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14615 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14616 fixpos((yyval.node), (yyvsp[-4].node));
14617 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14618 local_pop(p);
14619 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14620 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14621 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14622 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14623 }
14624#line 14625 "parse.c"
14625 break;
14626
14627 case 386: /* $@22: %empty */
14628#line 4615 "parse.y"
14629 {
14630 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14631 }
14632#line 14633 "parse.c"
14633 break;
14634
14635 case 387: /* primary: k_module cpath $@22 bodystmt k_end */
14636#line 4620 "parse.y"
14637 {
14638 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
14639 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14640 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14641 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14642 /*% ripper: module!($:cpath, $:bodystmt) %*/
14643 local_pop(p);
14644 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14645 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14646 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14647 }
14648#line 14649 "parse.c"
14649 break;
14650
14651 case 388: /* $@23: %empty */
14652#line 4633 "parse.y"
14653 {
14654 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14655 }
14656#line 14657 "parse.c"
14657 break;
14658
14659 case 389: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14660#line 4638 "parse.y"
14661 {
14662 restore_defun(p, (yyvsp[-4].node_def_temp));
14663 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14664 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14665 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14666 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14667 local_pop(p);
14668 }
14669#line 14670 "parse.c"
14670 break;
14671
14672 case 390: /* $@24: %empty */
14673#line 4648 "parse.y"
14674 {
14675 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14676 }
14677#line 14678 "parse.c"
14678 break;
14679
14680 case 391: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14681#line 4653 "parse.y"
14682 {
14683 restore_defun(p, (yyvsp[-4].node_def_temp));
14684 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14685 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14686 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14687 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14688 local_pop(p);
14689 }
14690#line 14691 "parse.c"
14691 break;
14692
14693 case 392: /* primary: "'break'" */
14694#line 4662 "parse.y"
14695 {
14696 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14697 /*% ripper: break!(args_new!) %*/
14698 }
14699#line 14700 "parse.c"
14700 break;
14701
14702 case 393: /* primary: "'next'" */
14703#line 4667 "parse.y"
14704 {
14705 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14706 /*% ripper: next!(args_new!) %*/
14707 }
14708#line 14709 "parse.c"
14709 break;
14710
14711 case 394: /* primary: "'redo'" */
14712#line 4672 "parse.y"
14713 {
14714 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14715 /*% ripper: redo! %*/
14716 }
14717#line 14718 "parse.c"
14718 break;
14719
14720 case 395: /* primary: "'retry'" */
14721#line 4677 "parse.y"
14722 {
14723 if (!p->ctxt.in_defined) {
14724 switch (p->ctxt.in_rescue) {
14725 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14726 case after_rescue: /* ok */ break;
14727 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14728 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14729 }
14730 }
14731 (yyval.node) = NEW_RETRY(&(yyloc));
14732 /*% ripper: retry! %*/
14733 }
14734#line 14735 "parse.c"
14735 break;
14736
14737 case 396: /* value_expr_primary: primary */
14738#line 3143 "parse.y"
14739 {
14740 value_expr((yyvsp[0].node));
14741 (yyval.node) = (yyvsp[0].node);
14742 }
14743#line 14744 "parse.c"
14744 break;
14745
14746 case 398: /* k_begin: "'begin'" */
14747#line 4695 "parse.y"
14748 {
14749 token_info_push(p, "begin", &(yyloc));
14750 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14751 }
14752#line 14753 "parse.c"
14753 break;
14754
14755 case 399: /* k_if: "'if'" */
14756#line 4702 "parse.y"
14757 {
14758 WARN_EOL("if");
14759 token_info_push(p, "if", &(yyloc));
14760 if (p->token_info && p->token_info->nonspc &&
14761 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14762 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14763 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14764 beg += rb_strlen_lit("else");
14765 while (beg < tok && ISSPACE(*beg)) beg++;
14766 if (beg == tok) {
14767 p->token_info->nonspc = 0;
14768 }
14769 }
14770 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14771 }
14772#line 14773 "parse.c"
14773 break;
14774
14775 case 400: /* k_unless: "'unless'" */
14776#line 4720 "parse.y"
14777 {
14778 token_info_push(p, "unless", &(yyloc));
14779 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14780 }
14781#line 14782 "parse.c"
14782 break;
14783
14784 case 401: /* k_while: "'while'" allow_exits */
14785#line 4727 "parse.y"
14786 {
14787 (yyval.node_exits) = (yyvsp[0].node_exits);
14788 token_info_push(p, "while", &(yyloc));
14789 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14790 }
14791#line 14792 "parse.c"
14792 break;
14793
14794 case 402: /* k_until: "'until'" allow_exits */
14795#line 4735 "parse.y"
14796 {
14797 (yyval.node_exits) = (yyvsp[0].node_exits);
14798 token_info_push(p, "until", &(yyloc));
14799 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14800 }
14801#line 14802 "parse.c"
14802 break;
14803
14804 case 403: /* k_case: "'case'" */
14805#line 4743 "parse.y"
14806 {
14807 token_info_push(p, "case", &(yyloc));
14808 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14809 }
14810#line 14811 "parse.c"
14811 break;
14812
14813 case 404: /* k_for: "'for'" allow_exits */
14814#line 4750 "parse.y"
14815 {
14816 (yyval.node_exits) = (yyvsp[0].node_exits);
14817 token_info_push(p, "for", &(yyloc));
14818 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14819 }
14820#line 14821 "parse.c"
14821 break;
14822
14823 case 405: /* k_class: "'class'" */
14824#line 4758 "parse.y"
14825 {
14826 token_info_push(p, "class", &(yyloc));
14827 (yyval.ctxt) = p->ctxt;
14828 p->ctxt.in_rescue = before_rescue;
14829 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14830 }
14831#line 14832 "parse.c"
14832 break;
14833
14834 case 406: /* k_module: "'module'" */
14835#line 4767 "parse.y"
14836 {
14837 token_info_push(p, "module", &(yyloc));
14838 (yyval.ctxt) = p->ctxt;
14839 p->ctxt.in_rescue = before_rescue;
14840 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14841 }
14842#line 14843 "parse.c"
14843 break;
14844
14845 case 407: /* k_def: "'def'" */
14846#line 4776 "parse.y"
14847 {
14848 token_info_push(p, "def", &(yyloc));
14849 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14850 p->ctxt.in_argdef = 1;
14851 }
14852#line 14853 "parse.c"
14853 break;
14854
14855 case 408: /* k_do: "'do'" */
14856#line 4784 "parse.y"
14857 {
14858 token_info_push(p, "do", &(yyloc));
14859 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14860 }
14861#line 14862 "parse.c"
14862 break;
14863
14864 case 409: /* k_do_block: "'do' for block" */
14865#line 4791 "parse.y"
14866 {
14867 token_info_push(p, "do", &(yyloc));
14868 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14869 }
14870#line 14871 "parse.c"
14871 break;
14872
14873 case 410: /* k_rescue: "'rescue'" */
14874#line 4798 "parse.y"
14875 {
14876 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14877 (yyval.ctxt) = p->ctxt;
14878 p->ctxt.in_rescue = after_rescue;
14879 }
14880#line 14881 "parse.c"
14881 break;
14882
14883 case 411: /* k_ensure: "'ensure'" */
14884#line 4806 "parse.y"
14885 {
14886 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14887 (yyval.ctxt) = p->ctxt;
14888 }
14889#line 14890 "parse.c"
14890 break;
14891
14892 case 412: /* k_when: "'when'" */
14893#line 4813 "parse.y"
14894 {
14895 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14896 }
14897#line 14898 "parse.c"
14898 break;
14899
14900 case 413: /* k_else: "'else'" */
14901#line 4819 "parse.y"
14902 {
14903 token_info *ptinfo_beg = p->token_info;
14904 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
14905 token_info_warn(p, "else", p->token_info, same, &(yyloc));
14906 if (same) {
14907 token_info e;
14908 e.next = ptinfo_beg->next;
14909 e.token = "else";
14910 token_info_setup(&e, p->lex.pbeg, &(yyloc));
14911 if (!e.nonspc) *ptinfo_beg = e;
14912 }
14913 }
14914#line 14915 "parse.c"
14915 break;
14916
14917 case 414: /* k_elsif: "'elsif'" */
14918#line 4834 "parse.y"
14919 {
14920 WARN_EOL("elsif");
14921 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
14922 }
14923#line 14924 "parse.c"
14924 break;
14925
14926 case 415: /* k_end: "'end'" */
14927#line 4841 "parse.y"
14928 {
14929 token_info_pop(p, "end", &(yyloc));
14930 pop_end_expect_token_locations(p);
14931 }
14932#line 14933 "parse.c"
14933 break;
14934
14935 case 416: /* k_end: "dummy end" */
14936#line 4846 "parse.y"
14937 {
14938 compile_error(p, "syntax error, unexpected end-of-input");
14939 }
14940#line 14941 "parse.c"
14941 break;
14942
14943 case 417: /* k_return: "'return'" */
14944#line 4852 "parse.y"
14945 {
14946 if (p->ctxt.cant_return && !dyna_in_block(p))
14947 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
14948 }
14949#line 14950 "parse.c"
14950 break;
14951
14952 case 418: /* k_yield: "'yield'" */
14953#line 4859 "parse.y"
14954 {
14955 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
14956 yyerror1(&(yylsp[0]), "Invalid yield");
14957 }
14958#line 14959 "parse.c"
14959 break;
14960
14961 case 423: /* do: "'do' for condition" */
14962#line 4871 "parse.y"
14963 { (yyval.id) = keyword_do_cond; }
14964#line 14965 "parse.c"
14965 break;
14966
14967 case 425: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
14968#line 4878 "parse.y"
14969 {
14970 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
14971 fixpos((yyval.node), (yyvsp[-3].node));
14972 /*% ripper: elsif!($:2, $:4, $:5) %*/
14973 }
14974#line 14975 "parse.c"
14975 break;
14976
14977 case 427: /* opt_else: k_else compstmt_stmts */
14978#line 4887 "parse.y"
14979 {
14980 (yyval.node) = (yyvsp[0].node);
14981 /*% ripper: else!($:2) %*/
14982 }
14983#line 14984 "parse.c"
14984 break;
14985
14986 case 430: /* f_marg: f_norm_arg */
14987#line 4898 "parse.y"
14988 {
14989 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
14990 mark_lvar_used(p, (yyval.node));
14991 }
14992#line 14993 "parse.c"
14993 break;
14994
14995 case 431: /* f_marg: "(" f_margs rparen */
14996#line 4903 "parse.y"
14997 {
14998 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
14999 /*% ripper: mlhs_paren!($:2) %*/
15000 }
15001#line 15002 "parse.c"
15002 break;
15003
15004 case 432: /* mlhs_f_marg: f_marg */
15005#line 3030 "parse.y"
15006 {
15007 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15008 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15009 }
15010#line 15011 "parse.c"
15011 break;
15012
15013 case 433: /* mlhs_f_marg: mlhs_f_marg ',' f_marg */
15014#line 3035 "parse.y"
15015 {
15016 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15017 /*% ripper: mlhs_add!($:1, $:3) %*/
15018 }
15019#line 15020 "parse.c"
15020 break;
15021
15022 case 434: /* f_margs: mlhs_f_marg */
15023#line 4911 "parse.y"
15024 {
15025 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15026 /*% ripper: $:1 %*/
15027 }
15028#line 15029 "parse.c"
15029 break;
15030
15031 case 435: /* f_margs: mlhs_f_marg ',' f_rest_marg */
15032#line 4916 "parse.y"
15033 {
15034 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15035 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15036 }
15037#line 15038 "parse.c"
15038 break;
15039
15040 case 436: /* f_margs: mlhs_f_marg ',' f_rest_marg ',' mlhs_f_marg */
15041#line 4921 "parse.y"
15042 {
15043 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15044 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15045 }
15046#line 15047 "parse.c"
15047 break;
15048
15049 case 437: /* f_margs: f_rest_marg */
15050#line 4926 "parse.y"
15051 {
15052 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15053 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15054 }
15055#line 15056 "parse.c"
15056 break;
15057
15058 case 438: /* f_margs: f_rest_marg ',' mlhs_f_marg */
15059#line 4931 "parse.y"
15060 {
15061 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15062 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15063 }
15064#line 15065 "parse.c"
15065 break;
15066
15067 case 439: /* f_rest_marg: "*" f_norm_arg */
15068#line 4938 "parse.y"
15069 {
15070 /*% ripper: $:2 %*/
15071 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15072 mark_lvar_used(p, (yyval.node));
15073 }
15074#line 15075 "parse.c"
15075 break;
15076
15077 case 440: /* f_rest_marg: "*" */
15078#line 4944 "parse.y"
15079 {
15080 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15081 /*% ripper: Qnil %*/
15082 }
15083#line 15084 "parse.c"
15084 break;
15085
15086 case 442: /* f_any_kwrest: f_no_kwarg */
15087#line 4952 "parse.y"
15088 {
15089 (yyval.id) = idNil;
15090 /*% ripper: ID2VAL(idNil) %*/
15091 }
15092#line 15093 "parse.c"
15093 break;
15094
15095 case 443: /* $@25: %empty */
15096#line 4958 "parse.y"
15097 {p->ctxt.in_argdef = 0;}
15098#line 15099 "parse.c"
15099 break;
15100
15101 case 445: /* f_kw_primary_value: f_label primary_value */
15102#line 3002 "parse.y"
15103 {
15104 p->ctxt.in_argdef = 1;
15105 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15106 /*% ripper: [$:$, $:value] %*/
15107 }
15108#line 15109 "parse.c"
15109 break;
15110
15111 case 446: /* f_kw_primary_value: f_label */
15112#line 3008 "parse.y"
15113 {
15114 p->ctxt.in_argdef = 1;
15115 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15116 /*% ripper: [$:$, 0] %*/
15117 }
15118#line 15119 "parse.c"
15119 break;
15120
15121 case 447: /* f_kwarg_primary_value: f_kw_primary_value */
15122#line 3017 "parse.y"
15123 {
15124 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15125 /*% ripper: rb_ary_new3(1, $:1) %*/
15126 }
15127#line 15128 "parse.c"
15128 break;
15129
15130 case 448: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15131#line 3022 "parse.y"
15132 {
15133 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15134 /*% ripper: rb_ary_push($:1, $:3) %*/
15135 }
15136#line 15137 "parse.c"
15137 break;
15138
15139 case 449: /* args_tail_basic_primary_value: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
15140#line 2926 "parse.y"
15141 {
15142 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15143 /*% ripper: [$:1, $:3, $:4] %*/
15144 }
15145#line 15146 "parse.c"
15146 break;
15147
15148 case 450: /* args_tail_basic_primary_value: f_kwarg_primary_value opt_f_block_arg */
15149#line 2931 "parse.y"
15150 {
15151 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15152 /*% ripper: [$:1, Qnil, $:2] %*/
15153 }
15154#line 15155 "parse.c"
15155 break;
15156
15157 case 451: /* args_tail_basic_primary_value: f_any_kwrest opt_f_block_arg */
15158#line 2936 "parse.y"
15159 {
15160 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15161 /*% ripper: [Qnil, $:1, $:2] %*/
15162 }
15163#line 15164 "parse.c"
15164 break;
15165
15166 case 452: /* args_tail_basic_primary_value: f_block_arg */
15167#line 2941 "parse.y"
15168 {
15169 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15170 /*% ripper: [Qnil, Qnil, $:1] %*/
15171 }
15172#line 15173 "parse.c"
15173 break;
15174
15175 case 454: /* excessed_comma: ',' */
15176#line 4964 "parse.y"
15177 {
15178 /* magic number for rest_id in iseq_set_arguments() */
15179 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15180 /*% ripper: excessed_comma! %*/
15181 }
15182#line 15183 "parse.c"
15183 break;
15184
15185 case 455: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15186#line 2980 "parse.y"
15187 {
15188 p->ctxt.in_argdef = 1;
15189 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15190 /*% ripper: [$:$, $:3] %*/
15191 }
15192#line 15193 "parse.c"
15193 break;
15194
15195 case 456: /* f_opt_arg_primary_value: f_opt_primary_value */
15196#line 2989 "parse.y"
15197 {
15198 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15199 /*% ripper: rb_ary_new3(1, $:1) %*/
15200 }
15201#line 15202 "parse.c"
15202 break;
15203
15204 case 457: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15205#line 2994 "parse.y"
15206 {
15207 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15208 /*% ripper: rb_ary_push($:1, $:3) %*/
15209 }
15210#line 15211 "parse.c"
15211 break;
15212
15213 case 458: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15214#line 3089 "parse.y"
15215 {
15216 (yyval.node_args) = (yyvsp[0].node_args);
15217 /*% ripper: $:2 %*/
15218 }
15219#line 15220 "parse.c"
15220 break;
15221
15222 case 459: /* opt_args_tail_block_args_tail: %empty */
15223#line 3094 "parse.y"
15224 {
15225 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15226 /*% ripper: [Qnil, Qnil, Qnil] %*/
15227 }
15228#line 15229 "parse.c"
15229 break;
15230
15231 case 460: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15232#line 4972 "parse.y"
15233 {
15234 (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));
15235 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
15236 }
15237#line 15238 "parse.c"
15238 break;
15239
15240 case 461: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15241#line 4977 "parse.y"
15242 {
15243 (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));
15244 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
15245 }
15246#line 15247 "parse.c"
15247 break;
15248
15249 case 462: /* block_param: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail */
15250#line 4982 "parse.y"
15251 {
15252 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15253 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
15254 }
15255#line 15256 "parse.c"
15256 break;
15257
15258 case 463: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15259#line 4987 "parse.y"
15260 {
15261 (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));
15262 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
15263 }
15264#line 15265 "parse.c"
15265 break;
15266
15267 case 464: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
15268#line 4992 "parse.y"
15269 {
15270 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15271 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
15272 }
15273#line 15274 "parse.c"
15274 break;
15275
15276 case 465: /* block_param: f_arg excessed_comma */
15277#line 4997 "parse.y"
15278 {
15279 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15280 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15281 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
15282 }
15283#line 15284 "parse.c"
15284 break;
15285
15286 case 466: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15287#line 5003 "parse.y"
15288 {
15289 (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));
15290 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
15291 }
15292#line 15293 "parse.c"
15293 break;
15294
15295 case 467: /* block_param: f_arg opt_args_tail_block_args_tail */
15296#line 5008 "parse.y"
15297 {
15298 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15299 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
15300 }
15301#line 15302 "parse.c"
15302 break;
15303
15304 case 468: /* block_param: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15305#line 5013 "parse.y"
15306 {
15307 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15308 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
15309 }
15310#line 15311 "parse.c"
15311 break;
15312
15313 case 469: /* block_param: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15314#line 5018 "parse.y"
15315 {
15316 (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));
15317 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
15318 }
15319#line 15320 "parse.c"
15320 break;
15321
15322 case 470: /* block_param: f_opt_arg_primary_value opt_args_tail_block_args_tail */
15323#line 5023 "parse.y"
15324 {
15325 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15326 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
15327 }
15328#line 15329 "parse.c"
15329 break;
15330
15331 case 471: /* block_param: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15332#line 5028 "parse.y"
15333 {
15334 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15335 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
15336 }
15337#line 15338 "parse.c"
15338 break;
15339
15340 case 472: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
15341#line 5033 "parse.y"
15342 {
15343 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15344 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
15345 }
15346#line 15347 "parse.c"
15347 break;
15348
15349 case 473: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15350#line 5038 "parse.y"
15351 {
15352 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15353 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
15354 }
15355#line 15356 "parse.c"
15356 break;
15357
15358 case 474: /* block_param: block_args_tail */
15359#line 5043 "parse.y"
15360 {
15361 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15362 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
15363 }
15364#line 15365 "parse.c"
15365 break;
15366
15367 case 476: /* opt_block_param_def: block_param_def */
15368#line 5051 "parse.y"
15369 {
15370 p->command_start = TRUE;
15371 }
15372#line 15373 "parse.c"
15373 break;
15374
15375 case 477: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15376#line 5057 "parse.y"
15377 {
15378 p->max_numparam = ORDINAL_PARAM;
15379 p->ctxt.in_argdef = 0;
15380 (yyval.node_args) = (yyvsp[-2].node_args);
15381 /*% ripper: block_var!($:2, $:3) %*/
15382 }
15383#line 15384 "parse.c"
15384 break;
15385
15386 case 478: /* opt_block_param: %empty */
15387#line 5066 "parse.y"
15388 {
15389 (yyval.node_args) = 0;
15390 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15391 }
15392#line 15393 "parse.c"
15393 break;
15394
15395 case 480: /* opt_bv_decl: option_'\n' */
15396#line 5074 "parse.y"
15397 {
15398 (yyval.id) = 0;
15399 /*% ripper: Qfalse %*/
15400 }
15401#line 15402 "parse.c"
15402 break;
15403
15404 case 481: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15405#line 5079 "parse.y"
15406 {
15407 (yyval.id) = 0;
15408 /*% ripper: $:3 %*/
15409 }
15410#line 15411 "parse.c"
15411 break;
15412
15413 case 484: /* bvar: "local variable or method" */
15414#line 5092 "parse.y"
15415 {
15416 new_bv(p, (yyvsp[0].id));
15417 /*% ripper: $:1 %*/
15418 }
15419#line 15420 "parse.c"
15420 break;
15421
15422 case 486: /* max_numparam: %empty */
15423#line 5099 "parse.y"
15424 {
15425 (yyval.num) = p->max_numparam;
15426 p->max_numparam = 0;
15427 }
15428#line 15429 "parse.c"
15429 break;
15430
15431 case 487: /* numparam: %empty */
15432#line 5105 "parse.y"
15433 {
15434 (yyval.node) = numparam_push(p);
15435 }
15436#line 15437 "parse.c"
15437 break;
15438
15439 case 488: /* it_id: %empty */
15440#line 5110 "parse.y"
15441 {
15442 (yyval.id) = p->it_id;
15443 p->it_id = 0;
15444 }
15445#line 15446 "parse.c"
15446 break;
15447
15448 case 489: /* @26: %empty */
15449#line 5117 "parse.y"
15450 {
15451 token_info_push(p, "->", &(yylsp[0]));
15452 (yyval.vars) = dyna_push(p);
15453 }
15454#line 15455 "parse.c"
15455 break;
15456
15457 case 490: /* $@27: %empty */
15458#line 5123 "parse.y"
15459 {
15460 CMDARG_PUSH(0);
15461 }
15462#line 15463 "parse.c"
15463 break;
15464
15465 case 491: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15466#line 5127 "parse.y"
15467 {
15468 int max_numparam = p->max_numparam;
15469 ID it_id = p->it_id;
15470 p->lex.lpar_beg = (yyvsp[-8].num);
15471 p->max_numparam = (yyvsp[-6].num);
15472 p->it_id = (yyvsp[-4].id);
15473 restore_block_exit(p, (yyvsp[-3].node_exits));
15474 CMDARG_POP();
15475 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15476 {
15477 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15478 (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);
15479 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15480 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15481 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15482 xfree((yyvsp[0].locations_lambda_body));
15483 }
15484 /*% ripper: lambda!($:args, $:body) %*/
15485 numparam_pop(p, (yyvsp[-5].node));
15486 dyna_pop(p, (yyvsp[-7].vars));
15487 }
15488#line 15489 "parse.c"
15489 break;
15490
15491 case 492: /* f_larglist: '(' f_args opt_bv_decl ')' */
15492#line 5151 "parse.y"
15493 {
15494 p->ctxt.in_argdef = 0;
15495 (yyval.node_args) = (yyvsp[-2].node_args);
15496 p->max_numparam = ORDINAL_PARAM;
15497 /*% ripper: paren!($:2) %*/
15498 }
15499#line 15500 "parse.c"
15500 break;
15501
15502 case 493: /* f_larglist: f_args */
15503#line 5158 "parse.y"
15504 {
15505 p->ctxt.in_argdef = 0;
15506 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15507 p->max_numparam = ORDINAL_PARAM;
15508 (yyval.node_args) = (yyvsp[0].node_args);
15509 }
15510#line 15511 "parse.c"
15511 break;
15512
15513 case 494: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15514#line 5167 "parse.y"
15515 {
15516 token_info_pop(p, "}", &(yylsp[0]));
15517 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15518 /*% ripper: $:2 %*/
15519 }
15520#line 15521 "parse.c"
15521 break;
15522
15523 case 495: /* $@28: %empty */
15524#line 5173 "parse.y"
15525 {
15526 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15527 }
15528#line 15529 "parse.c"
15529 break;
15530
15531 case 496: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15532#line 5177 "parse.y"
15533 {
15534 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15535 /*% ripper: $:3 %*/
15536 }
15537#line 15538 "parse.c"
15538 break;
15539
15540 case 497: /* do_block: k_do_block do_body k_end */
15541#line 5184 "parse.y"
15542 {
15543 (yyval.node) = (yyvsp[-1].node);
15544 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15545 /*% ripper: $:2 %*/
15546 }
15547#line 15548 "parse.c"
15548 break;
15549
15550 case 498: /* block_call: command do_block */
15551#line 5192 "parse.y"
15552 {
15553 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15554 compile_error(p, "block given to yield");
15555 }
15556 else {
15557 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15558 }
15559 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15560 fixpos((yyval.node), (yyvsp[-1].node));
15561 /*% ripper: method_add_block!($:1, $:2) %*/
15562 }
15563#line 15564 "parse.c"
15564 break;
15565
15566 case 499: /* block_call: block_call call_op2 operation2 opt_paren_args */
15567#line 5204 "parse.y"
15568 {
15569 bool has_args = (yyvsp[0].node) != 0;
15570 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15571 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15572 /*% ripper: call!($:1, $:2, $:3) %*/
15573 if (has_args) {
15574 /*% ripper: method_add_arg!($:$, $:4) %*/
15575 }
15576 }
15577#line 15578 "parse.c"
15578 break;
15579
15580 case 500: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15581#line 5214 "parse.y"
15582 {
15583 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15584 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15585 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
15586 if ((yyvsp[0].node)) {
15587 /*% ripper: method_add_block!($:$, $:5) %*/
15588 }
15589 }
15590#line 15591 "parse.c"
15591 break;
15592
15593 case 501: /* block_call: block_call call_op2 operation2 command_args do_block */
15594#line 5223 "parse.y"
15595 {
15596 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15597 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15598 }
15599#line 15600 "parse.c"
15600 break;
15601
15602 case 502: /* method_call: fcall paren_args */
15603#line 5230 "parse.y"
15604 {
15605 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15606 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15607 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15608 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15609 }
15610#line 15611 "parse.c"
15611 break;
15612
15613 case 503: /* method_call: primary_value call_op operation2 opt_paren_args */
15614#line 5237 "parse.y"
15615 {
15616 bool has_args = (yyvsp[0].node) != 0;
15617 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15618 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15619 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15620 /*% ripper: call!($:1, $:2, $:3) %*/
15621 if (has_args) {
15622 /*% ripper: method_add_arg!($:$, $:4) %*/
15623 }
15624 }
15625#line 15626 "parse.c"
15626 break;
15627
15628 case 504: /* method_call: primary_value "::" operation2 paren_args */
15629#line 5248 "parse.y"
15630 {
15631 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15632 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15633 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15634 }
15635#line 15636 "parse.c"
15636 break;
15637
15638 case 505: /* method_call: primary_value "::" operation3 */
15639#line 5254 "parse.y"
15640 {
15641 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15642 /*% ripper: call!($:1, $:2, $:3) %*/
15643 }
15644#line 15645 "parse.c"
15645 break;
15646
15647 case 506: /* method_call: primary_value call_op2 paren_args */
15648#line 5259 "parse.y"
15649 {
15650 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15651 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15652 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15653 }
15654#line 15655 "parse.c"
15655 break;
15656
15657 case 507: /* method_call: "'super'" paren_args */
15658#line 5265 "parse.y"
15659 {
15660 rb_code_location_t lparen_loc = (yylsp[0]);
15661 rb_code_location_t rparen_loc = (yylsp[0]);
15662 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15663 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15664
15665 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15666 /*% ripper: super!($:2) %*/
15667 }
15668#line 15669 "parse.c"
15669 break;
15670
15671 case 508: /* method_call: "'super'" */
15672#line 5275 "parse.y"
15673 {
15674 (yyval.node) = NEW_ZSUPER(&(yyloc));
15675 /*% ripper: zsuper! %*/
15676 }
15677#line 15678 "parse.c"
15678 break;
15679
15680 case 509: /* method_call: primary_value '[' opt_call_args rbracket */
15681#line 5280 "parse.y"
15682 {
15683 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15684 fixpos((yyval.node), (yyvsp[-3].node));
15685 /*% ripper: aref!($:1, $:3) %*/
15686 }
15687#line 15688 "parse.c"
15688 break;
15689
15690 case 510: /* brace_block: '{' brace_body '}' */
15691#line 5288 "parse.y"
15692 {
15693 (yyval.node) = (yyvsp[-1].node);
15694 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15695 /*% ripper: $:2 %*/
15696 }
15697#line 15698 "parse.c"
15698 break;
15699
15700 case 511: /* brace_block: k_do do_body k_end */
15701#line 5294 "parse.y"
15702 {
15703 (yyval.node) = (yyvsp[-1].node);
15704 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15705 /*% ripper: $:2 %*/
15706 }
15707#line 15708 "parse.c"
15708 break;
15709
15710 case 512: /* @29: %empty */
15711#line 5301 "parse.y"
15712 {(yyval.vars) = dyna_push(p);}
15713#line 15714 "parse.c"
15714 break;
15715
15716 case 513: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
15717#line 5304 "parse.y"
15718 {
15719 int max_numparam = p->max_numparam;
15720 ID it_id = p->it_id;
15721 p->max_numparam = (yyvsp[-5].num);
15722 p->it_id = (yyvsp[-3].id);
15723 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15724 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15725 /*% ripper: brace_block!($:args, $:compstmt) %*/
15726 restore_block_exit(p, (yyvsp[-2].node_exits));
15727 numparam_pop(p, (yyvsp[-4].node));
15728 dyna_pop(p, (yyvsp[-6].vars));
15729 }
15730#line 15731 "parse.c"
15731 break;
15732
15733 case 514: /* @30: %empty */
15734#line 5318 "parse.y"
15735 {
15736 (yyval.vars) = dyna_push(p);
15737 CMDARG_PUSH(0);
15738 }
15739#line 15740 "parse.c"
15740 break;
15741
15742 case 515: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
15743#line 5324 "parse.y"
15744 {
15745 int max_numparam = p->max_numparam;
15746 ID it_id = p->it_id;
15747 p->max_numparam = (yyvsp[-5].num);
15748 p->it_id = (yyvsp[-3].id);
15749 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15750 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15751 /*% ripper: do_block!($:args, $:bodystmt) %*/
15752 CMDARG_POP();
15753 restore_block_exit(p, (yyvsp[-2].node_exits));
15754 numparam_pop(p, (yyvsp[-4].node));
15755 dyna_pop(p, (yyvsp[-6].vars));
15756 }
15757#line 15758 "parse.c"
15758 break;
15759
15760 case 516: /* case_args: arg_value */
15761#line 5340 "parse.y"
15762 {
15763 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15764 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15765 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15766 }
15767#line 15768 "parse.c"
15768 break;
15769
15770 case 517: /* case_args: "*" arg_value */
15771#line 5346 "parse.y"
15772 {
15773 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15774 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15775 }
15776#line 15777 "parse.c"
15777 break;
15778
15779 case 518: /* case_args: case_args ',' arg_value */
15780#line 5351 "parse.y"
15781 {
15782 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15783 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15784 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15785 }
15786#line 15787 "parse.c"
15787 break;
15788
15789 case 519: /* case_args: case_args ',' "*" arg_value */
15790#line 5357 "parse.y"
15791 {
15792 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15793 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15794 }
15795#line 15796 "parse.c"
15796 break;
15797
15798 case 520: /* case_body: k_when case_args then compstmt_stmts cases */
15799#line 5366 "parse.y"
15800 {
15801 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15802 fixpos((yyval.node), (yyvsp[-3].node));
15803 /*% ripper: when!($:2, $:4, $:5) %*/
15804 }
15805#line 15806 "parse.c"
15806 break;
15807
15808 case 523: /* p_pvtbl: %empty */
15809#line 5377 "parse.y"
15810 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15811#line 15812 "parse.c"
15812 break;
15813
15814 case 524: /* p_pktbl: %empty */
15815#line 5378 "parse.y"
15816 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15817#line 15818 "parse.c"
15818 break;
15819
15820 case 525: /* p_in_kwarg: %empty */
15821#line 5380 "parse.y"
15822 {
15823 (yyval.ctxt) = p->ctxt;
15824 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15825 p->command_start = FALSE;
15826 p->ctxt.in_kwarg = 1;
15827 }
15828#line 15829 "parse.c"
15829 break;
15830
15831 case 526: /* $@31: %empty */
15832#line 5391 "parse.y"
15833 {
15834 pop_pktbl(p, (yyvsp[-2].tbl));
15835 pop_pvtbl(p, (yyvsp[-3].tbl));
15836 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15837 }
15838#line 15839 "parse.c"
15839 break;
15840
15841 case 527: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
15842#line 5398 "parse.y"
15843 {
15844 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15845 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15846 }
15847#line 15848 "parse.c"
15848 break;
15849
15850 case 531: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15851#line 5410 "parse.y"
15852 {
15853 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15854 fixpos((yyval.node), (yyvsp[0].node));
15855 /*% ripper: if_mod!($:3, $:1) %*/
15856 }
15857#line 15858 "parse.c"
15858 break;
15859
15860 case 532: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15861#line 5416 "parse.y"
15862 {
15863 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15864 fixpos((yyval.node), (yyvsp[0].node));
15865 /*% ripper: unless_mod!($:3, $:1) %*/
15866 }
15867#line 15868 "parse.c"
15868 break;
15869
15870 case 534: /* p_top_expr_body: p_expr ',' */
15871#line 5425 "parse.y"
15872 {
15873 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15874 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15875 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15876 }
15877#line 15878 "parse.c"
15878 break;
15879
15880 case 535: /* p_top_expr_body: p_expr ',' p_args */
15881#line 5431 "parse.y"
15882 {
15883 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15884 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15885 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15886 }
15887#line 15888 "parse.c"
15888 break;
15889
15890 case 536: /* p_top_expr_body: p_find */
15891#line 5437 "parse.y"
15892 {
15893 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15894 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15895 }
15896#line 15897 "parse.c"
15897 break;
15898
15899 case 537: /* p_top_expr_body: p_args_tail */
15900#line 5442 "parse.y"
15901 {
15902 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
15903 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
15904 }
15905#line 15906 "parse.c"
15906 break;
15907
15908 case 538: /* p_top_expr_body: p_kwargs */
15909#line 5447 "parse.y"
15910 {
15911 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15912 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
15913 }
15914#line 15915 "parse.c"
15915 break;
15916
15917 case 540: /* p_as: p_expr "=>" p_variable */
15918#line 5457 "parse.y"
15919 {
15920 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
15921 n = list_append(p, n, (yyvsp[0].node));
15922 (yyval.node) = new_hash(p, n, &(yyloc));
15923 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
15924 }
15925#line 15926 "parse.c"
15926 break;
15927
15928 case 542: /* p_alt: p_alt '|' p_expr_basic */
15929#line 5467 "parse.y"
15930 {
15931 (yyval.node) = NEW_OR((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15932 /*% ripper: binary!($:1, ID2VAL(idOr), $:3) %*/
15933 }
15934#line 15935 "parse.c"
15935 break;
15936
15937 case 544: /* p_lparen: '(' p_pktbl */
15938#line 5475 "parse.y"
15939 {
15940 (yyval.tbl) = (yyvsp[0].tbl);
15941 /*% ripper: $:2 %*/
15942 }
15943#line 15944 "parse.c"
15944 break;
15945
15946 case 545: /* p_lbracket: '[' p_pktbl */
15947#line 5482 "parse.y"
15948 {
15949 (yyval.tbl) = (yyvsp[0].tbl);
15950 /*% ripper: $:2 %*/
15951 }
15952#line 15953 "parse.c"
15953 break;
15954
15955 case 548: /* p_expr_basic: p_const p_lparen p_args rparen */
15956#line 5491 "parse.y"
15957 {
15958 pop_pktbl(p, (yyvsp[-2].tbl));
15959 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15960 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15961 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
15962 }
15963#line 15964 "parse.c"
15964 break;
15965
15966 case 549: /* p_expr_basic: p_const p_lparen p_find rparen */
15967#line 5498 "parse.y"
15968 {
15969 pop_pktbl(p, (yyvsp[-2].tbl));
15970 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15971 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15972 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
15973 }
15974#line 15975 "parse.c"
15975 break;
15976
15977 case 550: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
15978#line 5505 "parse.y"
15979 {
15980 pop_pktbl(p, (yyvsp[-2].tbl));
15981 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15982 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15983 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
15984 }
15985#line 15986 "parse.c"
15986 break;
15987
15988 case 551: /* p_expr_basic: p_const '(' rparen */
15989#line 5512 "parse.y"
15990 {
15991 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15992 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
15993 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
15994 }
15995#line 15996 "parse.c"
15996 break;
15997
15998 case 552: /* p_expr_basic: p_const p_lbracket p_args rbracket */
15999#line 5518 "parse.y"
16000 {
16001 pop_pktbl(p, (yyvsp[-2].tbl));
16002 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16003 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16004 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16005 }
16006#line 16007 "parse.c"
16007 break;
16008
16009 case 553: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16010#line 5525 "parse.y"
16011 {
16012 pop_pktbl(p, (yyvsp[-2].tbl));
16013 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16014 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16015 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16016 }
16017#line 16018 "parse.c"
16018 break;
16019
16020 case 554: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16021#line 5532 "parse.y"
16022 {
16023 pop_pktbl(p, (yyvsp[-2].tbl));
16024 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16025 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16026 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16027 }
16028#line 16029 "parse.c"
16029 break;
16030
16031 case 555: /* p_expr_basic: p_const '[' rbracket */
16032#line 5539 "parse.y"
16033 {
16034 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16035 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16036 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
16037 }
16038#line 16039 "parse.c"
16039 break;
16040
16041 case 556: /* p_expr_basic: "[" p_args rbracket */
16042#line 5545 "parse.y"
16043 {
16044 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16045 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16046 }
16047#line 16048 "parse.c"
16048 break;
16049
16050 case 557: /* p_expr_basic: "[" p_find rbracket */
16051#line 5550 "parse.y"
16052 {
16053 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16054 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16055 }
16056#line 16057 "parse.c"
16057 break;
16058
16059 case 558: /* p_expr_basic: "[" rbracket */
16060#line 5555 "parse.y"
16061 {
16062 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16063 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16064 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16065 }
16066#line 16067 "parse.c"
16067 break;
16068
16069 case 559: /* $@32: %empty */
16070#line 5561 "parse.y"
16071 {
16072 p->ctxt.in_kwarg = 0;
16073 }
16074#line 16075 "parse.c"
16075 break;
16076
16077 case 560: /* p_expr_basic: "{" p_pktbl lex_ctxt $@32 p_kwargs rbrace */
16078#line 5565 "parse.y"
16079 {
16080 pop_pktbl(p, (yyvsp[-4].tbl));
16081 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16082 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16083 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16084 }
16085#line 16086 "parse.c"
16086 break;
16087
16088 case 561: /* p_expr_basic: "{" rbrace */
16089#line 5572 "parse.y"
16090 {
16091 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16092 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16093 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16094 }
16095#line 16096 "parse.c"
16096 break;
16097
16098 case 562: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16099#line 5578 "parse.y"
16100 {
16101 pop_pktbl(p, (yyvsp[-2].tbl));
16102 (yyval.node) = (yyvsp[-1].node);
16103 /*% ripper: $:p_expr %*/
16104 }
16105#line 16106 "parse.c"
16106 break;
16107
16108 case 563: /* p_args: p_expr */
16109#line 5586 "parse.y"
16110 {
16111 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16112 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16113 /*% ripper: [[$:1], Qnil, Qnil] %*/
16114 }
16115#line 16116 "parse.c"
16116 break;
16117
16118 case 564: /* p_args: p_args_head */
16119#line 5592 "parse.y"
16120 {
16121 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16122 /*% ripper: [$:1, Qnil, Qnil] %*/
16123 }
16124#line 16125 "parse.c"
16125 break;
16126
16127 case 565: /* p_args: p_args_head p_arg */
16128#line 5597 "parse.y"
16129 {
16130 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16131 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16132 }
16133#line 16134 "parse.c"
16134 break;
16135
16136 case 566: /* p_args: p_args_head p_rest */
16137#line 5602 "parse.y"
16138 {
16139 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16140 /*% ripper: [$:1, $:2, Qnil] %*/
16141 }
16142#line 16143 "parse.c"
16143 break;
16144
16145 case 567: /* p_args: p_args_head p_rest ',' p_args_post */
16146#line 5607 "parse.y"
16147 {
16148 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16149 /*% ripper: [$:1, $:2, $:4] %*/
16150 }
16151#line 16152 "parse.c"
16152 break;
16153
16154 case 570: /* p_args_head: p_args_head p_arg ',' */
16155#line 5616 "parse.y"
16156 {
16157 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16158 /*% ripper: rb_ary_concat($:1, $:2) %*/
16159 }
16160#line 16161 "parse.c"
16161 break;
16162
16163 case 571: /* p_args_tail: p_rest */
16164#line 5623 "parse.y"
16165 {
16166 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16167 /*% ripper: [Qnil, $:1, Qnil] %*/
16168 }
16169#line 16170 "parse.c"
16170 break;
16171
16172 case 572: /* p_args_tail: p_rest ',' p_args_post */
16173#line 5628 "parse.y"
16174 {
16175 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16176 /*% ripper: [Qnil, $:1, $:3] %*/
16177 }
16178#line 16179 "parse.c"
16179 break;
16180
16181 case 573: /* p_find: p_rest ',' p_args_post ',' p_rest */
16182#line 5635 "parse.y"
16183 {
16184 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16185 /*% ripper: [$:1, $:3, $:5] %*/
16186 }
16187#line 16188 "parse.c"
16188 break;
16189
16190 case 574: /* p_rest: "*" "local variable or method" */
16191#line 5643 "parse.y"
16192 {
16193 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16194 /*% ripper: var_field!($:2) %*/
16195 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16196 }
16197#line 16198 "parse.c"
16198 break;
16199
16200 case 575: /* p_rest: "*" */
16201#line 5649 "parse.y"
16202 {
16203 (yyval.node) = 0;
16204 /*% ripper: var_field!(Qnil) %*/
16205 }
16206#line 16207 "parse.c"
16207 break;
16208
16209 case 577: /* p_args_post: p_args_post ',' p_arg */
16210#line 5657 "parse.y"
16211 {
16212 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16213 /*% ripper: rb_ary_concat($:1, $:3) %*/
16214 }
16215#line 16216 "parse.c"
16216 break;
16217
16218 case 578: /* p_arg: p_expr */
16219#line 5664 "parse.y"
16220 {
16221 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16222 /*% ripper: [$:1] %*/
16223 }
16224#line 16225 "parse.c"
16225 break;
16226
16227 case 579: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16228#line 5671 "parse.y"
16229 {
16230 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16231 /*% ripper: [$:1, $:3] %*/
16232 }
16233#line 16234 "parse.c"
16234 break;
16235
16236 case 580: /* p_kwargs: p_kwarg */
16237#line 5676 "parse.y"
16238 {
16239 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16240 /*% ripper: [$:1, Qnil] %*/
16241 }
16242#line 16243 "parse.c"
16243 break;
16244
16245 case 581: /* p_kwargs: p_kwarg ',' */
16246#line 5681 "parse.y"
16247 {
16248 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16249 /*% ripper: [$:1, Qnil] %*/
16250 }
16251#line 16252 "parse.c"
16252 break;
16253
16254 case 582: /* p_kwargs: p_any_kwrest */
16255#line 5686 "parse.y"
16256 {
16257 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16258 /*% ripper: [[], $:1] %*/
16259 }
16260#line 16261 "parse.c"
16261 break;
16262
16263 case 584: /* p_kwarg: p_kwarg ',' p_kw */
16264#line 5695 "parse.y"
16265 {
16266 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16267 /*% ripper: rb_ary_push($:1, $:3) %*/
16268 }
16269#line 16270 "parse.c"
16270 break;
16271
16272 case 585: /* p_kw: p_kw_label p_expr */
16273#line 5702 "parse.y"
16274 {
16275 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16276 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16277 /*% ripper: [$:1, $:2] %*/
16278 }
16279#line 16280 "parse.c"
16280 break;
16281
16282 case 586: /* p_kw: p_kw_label */
16283#line 5708 "parse.y"
16284 {
16285 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16286 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16287 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16288 }
16289 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16290 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16291 /*% ripper: [$:1, Qnil] %*/
16292 }
16293#line 16294 "parse.c"
16294 break;
16295
16296 case 588: /* p_kw_label: "string literal" string_contents tLABEL_END */
16297#line 5721 "parse.y"
16298 {
16299 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16300 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16301 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16302 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16303 }
16304 else {
16305 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16306 (yyval.id) = rb_intern_str(STR_NEW0());
16307 }
16308 /*% ripper: $:2 %*/
16309 }
16310#line 16311 "parse.c"
16311 break;
16312
16313 case 589: /* p_kwrest: kwrest_mark "local variable or method" */
16314#line 5736 "parse.y"
16315 {
16316 (yyval.id) = (yyvsp[0].id);
16317 /*% ripper: var_field!($:2) %*/
16318 }
16319#line 16320 "parse.c"
16320 break;
16321
16322 case 590: /* p_kwrest: kwrest_mark */
16323#line 5741 "parse.y"
16324 {
16325 (yyval.id) = 0;
16326 /*% ripper: Qnil %*/
16327 }
16328#line 16329 "parse.c"
16329 break;
16330
16331 case 591: /* p_kwnorest: kwrest_mark "'nil'" */
16332#line 5748 "parse.y"
16333 {
16334 (yyval.id) = 0;
16335 }
16336#line 16337 "parse.c"
16337 break;
16338
16339 case 593: /* p_any_kwrest: p_kwnorest */
16340#line 5755 "parse.y"
16341 {
16342 (yyval.id) = idNil;
16343 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16344 }
16345#line 16346 "parse.c"
16346 break;
16347
16348 case 595: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16349#line 3102 "parse.y"
16350 {
16351 value_expr((yyvsp[-2].node));
16352 value_expr((yyvsp[0].node));
16353 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16354 /*% ripper: dot2!($:1, $:3) %*/
16355 }
16356#line 16357 "parse.c"
16357 break;
16358
16359 case 596: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16360#line 3109 "parse.y"
16361 {
16362 value_expr((yyvsp[-2].node));
16363 value_expr((yyvsp[0].node));
16364 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16365 /*% ripper: dot3!($:1, $:3) %*/
16366 }
16367#line 16368 "parse.c"
16368 break;
16369
16370 case 597: /* range_expr_p_primitive: p_primitive ".." */
16371#line 3116 "parse.y"
16372 {
16373 value_expr((yyvsp[-1].node));
16374 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16375 /*% ripper: dot2!($:1, Qnil) %*/
16376 }
16377#line 16378 "parse.c"
16378 break;
16379
16380 case 598: /* range_expr_p_primitive: p_primitive "..." */
16381#line 3122 "parse.y"
16382 {
16383 value_expr((yyvsp[-1].node));
16384 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16385 /*% ripper: dot3!($:1, Qnil) %*/
16386 }
16387#line 16388 "parse.c"
16388 break;
16389
16390 case 599: /* range_expr_p_primitive: "(.." p_primitive */
16391#line 3128 "parse.y"
16392 {
16393 value_expr((yyvsp[0].node));
16394 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16395 /*% ripper: dot2!(Qnil, $:2) %*/
16396 }
16397#line 16398 "parse.c"
16398 break;
16399
16400 case 600: /* range_expr_p_primitive: "(..." p_primitive */
16401#line 3134 "parse.y"
16402 {
16403 value_expr((yyvsp[0].node));
16404 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16405 /*% ripper: dot3!(Qnil, $:2) %*/
16406 }
16407#line 16408 "parse.c"
16408 break;
16409
16410 case 613: /* p_primitive: keyword_variable */
16411#line 5770 "parse.y"
16412 {
16413 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16414 /*% ripper: var_ref!($:1) %*/
16415 }
16416#line 16417 "parse.c"
16417 break;
16418
16419 case 615: /* p_variable: "local variable or method" */
16420#line 5778 "parse.y"
16421 {
16422 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16423 /*% ripper: var_field!($:1) %*/
16424 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16425 }
16426#line 16427 "parse.c"
16427 break;
16428
16429 case 616: /* p_var_ref: '^' "local variable or method" */
16430#line 5786 "parse.y"
16431 {
16432 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16433 if (!n) {
16434 n = NEW_ERROR(&(yyloc));
16435 }
16436 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16437 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16438 }
16439 (yyval.node) = n;
16440 /*% ripper: var_ref!($:2) %*/
16441 }
16442#line 16443 "parse.c"
16443 break;
16444
16445 case 617: /* p_var_ref: '^' nonlocal_var */
16446#line 5798 "parse.y"
16447 {
16448 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16449 /*% ripper: var_ref!($:2) %*/
16450 }
16451#line 16452 "parse.c"
16452 break;
16453
16454 case 618: /* p_expr_ref: '^' "(" expr_value rparen */
16455#line 5805 "parse.y"
16456 {
16457 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16458 /*% ripper: begin!($:3) %*/
16459 }
16460#line 16461 "parse.c"
16461 break;
16462
16463 case 619: /* p_const: ":: at EXPR_BEG" cname */
16464#line 5812 "parse.y"
16465 {
16466 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
16467 /*% ripper: top_const_ref!($:2) %*/
16468 }
16469#line 16470 "parse.c"
16470 break;
16471
16472 case 620: /* p_const: p_const "::" cname */
16473#line 5817 "parse.y"
16474 {
16475 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
16476 /*% ripper: const_path_ref!($:1, $:3) %*/
16477 }
16478#line 16479 "parse.c"
16479 break;
16480
16481 case 621: /* p_const: "constant" */
16482#line 5822 "parse.y"
16483 {
16484 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16485 /*% ripper: var_ref!($:1) %*/
16486 }
16487#line 16488 "parse.c"
16488 break;
16489
16490 case 622: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16491#line 5831 "parse.y"
16492 {
16493 NODE *err = (yyvsp[-3].node);
16494 if ((yyvsp[-3].node)) {
16495 err = NEW_ERRINFO(&(yylsp[-3]));
16496 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16497 }
16498 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16499 if ((yyvsp[-4].node)) {
16500 fixpos((yyval.node), (yyvsp[-4].node));
16501 }
16502 else if ((yyvsp[-3].node)) {
16503 fixpos((yyval.node), (yyvsp[-3].node));
16504 }
16505 else {
16506 fixpos((yyval.node), (yyvsp[-1].node));
16507 }
16508 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16509 }
16510#line 16511 "parse.c"
16511 break;
16512
16513 case 624: /* exc_list: arg_value */
16514#line 5853 "parse.y"
16515 {
16516 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16517 /*% ripper: rb_ary_new3(1, $:1) %*/
16518 }
16519#line 16520 "parse.c"
16520 break;
16521
16522 case 625: /* exc_list: mrhs */
16523#line 5858 "parse.y"
16524 {
16525 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16526 }
16527#line 16528 "parse.c"
16528 break;
16529
16530 case 627: /* exc_var: "=>" lhs */
16531#line 5865 "parse.y"
16532 {
16533 (yyval.node) = (yyvsp[0].node);
16534 /*% ripper: $:2 %*/
16535 }
16536#line 16537 "parse.c"
16537 break;
16538
16539 case 629: /* opt_ensure: k_ensure stmts option_terms */
16540#line 5873 "parse.y"
16541 {
16542 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16543 (yyval.node) = (yyvsp[-1].node);
16544 void_expr(p, void_stmts(p, (yyval.node)));
16545 /*% ripper: ensure!($:2) %*/
16546 }
16547#line 16548 "parse.c"
16548 break;
16549
16550 case 633: /* strings: string */
16551#line 5887 "parse.y"
16552 {
16553 if (!(yyvsp[0].node)) {
16554 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16555 } else {
16556 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16557 }
16558 /*% ripper: $:1 %*/
16559 }
16560#line 16561 "parse.c"
16561 break;
16562
16563 case 636: /* string: string string1 */
16564#line 5900 "parse.y"
16565 {
16566 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16567 /*% ripper: string_concat!($:1, $:2) %*/
16568 }
16569#line 16570 "parse.c"
16570 break;
16571
16572 case 637: /* string1: "string literal" string_contents "terminator" */
16573#line 5907 "parse.y"
16574 {
16575 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16576 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16577 /*% ripper: $:2 %*/
16578 if (p->heredoc_indent > 0) {
16579 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16580 p->heredoc_indent = 0;
16581 }
16582 /*% ripper: string_literal!($:$) %*/
16583 }
16584#line 16585 "parse.c"
16585 break;
16586
16587 case 638: /* xstring: "backtick literal" xstring_contents "terminator" */
16588#line 5920 "parse.y"
16589 {
16590 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16591 /*% ripper: $:2 %*/
16592 if (p->heredoc_indent > 0) {
16593 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16594 p->heredoc_indent = 0;
16595 }
16596 /*% ripper: xstring_literal!($:$) %*/
16597 }
16598#line 16599 "parse.c"
16599 break;
16600
16601 case 639: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16602#line 5932 "parse.y"
16603 {
16604 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16605 /*% ripper: regexp_literal!($:2, $:3) %*/
16606 }
16607#line 16608 "parse.c"
16608 break;
16609
16610 case 642: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16611#line 3151 "parse.y"
16612 {
16613 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16614 /*% ripper: array!($:3) %*/
16615 }
16616#line 16617 "parse.c"
16617 break;
16618
16619 case 644: /* word_list: %empty */
16620#line 5942 "parse.y"
16621 {
16622 (yyval.node) = 0;
16623 /*% ripper: words_new! %*/
16624 }
16625#line 16626 "parse.c"
16626 break;
16627
16628 case 645: /* word_list: word_list word nonempty_list_' ' */
16629#line 5947 "parse.y"
16630 {
16631 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16632 /*% ripper: words_add!($:1, $:2) %*/
16633 }
16634#line 16635 "parse.c"
16635 break;
16636
16637 case 647: /* word: word string_content */
16638#line 5956 "parse.y"
16639 {
16640 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16641 /*% ripper: word_add!($:1, $:2) %*/
16642 }
16643#line 16644 "parse.c"
16644 break;
16645
16646 case 648: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16647#line 3151 "parse.y"
16648 {
16649 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16650 /*% ripper: array!($:3) %*/
16651 }
16652#line 16653 "parse.c"
16653 break;
16654
16655 case 650: /* symbol_list: %empty */
16656#line 5966 "parse.y"
16657 {
16658 (yyval.node) = 0;
16659 /*% ripper: symbols_new! %*/
16660 }
16661#line 16662 "parse.c"
16662 break;
16663
16664 case 651: /* symbol_list: symbol_list word nonempty_list_' ' */
16665#line 5971 "parse.y"
16666 {
16667 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16668 /*% ripper: symbols_add!($:1, $:2) %*/
16669 }
16670#line 16671 "parse.c"
16671 break;
16672
16673 case 652: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16674#line 3151 "parse.y"
16675 {
16676 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16677 /*% ripper: array!($:3) %*/
16678 }
16679#line 16680 "parse.c"
16680 break;
16681
16682 case 654: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16683#line 3151 "parse.y"
16684 {
16685 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16686 /*% ripper: array!($:3) %*/
16687 }
16688#line 16689 "parse.c"
16689 break;
16690
16691 case 656: /* qword_list: %empty */
16692#line 5984 "parse.y"
16693 {
16694 (yyval.node) = 0;
16695 /*% ripper: qwords_new! %*/
16696 }
16697#line 16698 "parse.c"
16698 break;
16699
16700 case 657: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16701#line 5989 "parse.y"
16702 {
16703 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16704 /*% ripper: qwords_add!($:1, $:2) %*/
16705 }
16706#line 16707 "parse.c"
16707 break;
16708
16709 case 658: /* qsym_list: %empty */
16710#line 5996 "parse.y"
16711 {
16712 (yyval.node) = 0;
16713 /*% ripper: qsymbols_new! %*/
16714 }
16715#line 16716 "parse.c"
16716 break;
16717
16718 case 659: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16719#line 6001 "parse.y"
16720 {
16721 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16722 /*% ripper: qsymbols_add!($:1, $:2) %*/
16723 }
16724#line 16725 "parse.c"
16725 break;
16726
16727 case 660: /* string_contents: %empty */
16728#line 6008 "parse.y"
16729 {
16730 (yyval.node) = 0;
16731 /*% ripper: string_content! %*/
16732 }
16733#line 16734 "parse.c"
16734 break;
16735
16736 case 661: /* string_contents: string_contents string_content */
16737#line 6013 "parse.y"
16738 {
16739 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16740 /*% ripper: string_add!($:1, $:2) %*/
16741 }
16742#line 16743 "parse.c"
16743 break;
16744
16745 case 662: /* xstring_contents: %empty */
16746#line 6020 "parse.y"
16747 {
16748 (yyval.node) = 0;
16749 /*% ripper: xstring_new! %*/
16750 }
16751#line 16752 "parse.c"
16752 break;
16753
16754 case 663: /* xstring_contents: xstring_contents string_content */
16755#line 6025 "parse.y"
16756 {
16757 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16758 /*% ripper: xstring_add!($:1, $:2) %*/
16759 }
16760#line 16761 "parse.c"
16761 break;
16762
16763 case 664: /* regexp_contents: %empty */
16764#line 6032 "parse.y"
16765 {
16766 (yyval.node) = 0;
16767 /*% ripper: regexp_new! %*/
16768 }
16769#line 16770 "parse.c"
16770 break;
16771
16772 case 665: /* regexp_contents: regexp_contents string_content */
16773#line 6037 "parse.y"
16774 {
16775 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16776 if (!head) {
16777 (yyval.node) = tail;
16778 }
16779 else if (!tail) {
16780 (yyval.node) = head;
16781 }
16782 else {
16783 switch (nd_type(head)) {
16784 case NODE_STR:
16785 head = str2dstr(p, head);
16786 break;
16787 case NODE_DSTR:
16788 break;
16789 default:
16790 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16791 break;
16792 }
16793 (yyval.node) = list_append(p, head, tail);
16794 }
16795 /*% ripper: regexp_add!($:1, $:2) %*/
16796 }
16797#line 16798 "parse.c"
16798 break;
16799
16800 case 667: /* @33: %empty */
16801#line 6065 "parse.y"
16802 {
16803 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16804 (yyval.strterm) = p->lex.strterm;
16805 p->lex.strterm = 0;
16806 SET_LEX_STATE(EXPR_BEG);
16807 }
16808#line 16809 "parse.c"
16809 break;
16810
16811 case 668: /* string_content: tSTRING_DVAR @33 string_dvar */
16812#line 6072 "parse.y"
16813 {
16814 p->lex.strterm = (yyvsp[-1].strterm);
16815 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
16816 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16817 /*% ripper: string_dvar!($:3) %*/
16818 }
16819#line 16820 "parse.c"
16820 break;
16821
16822 case 669: /* @34: %empty */
16823#line 6079 "parse.y"
16824 {
16825 CMDARG_PUSH(0);
16826 COND_PUSH(0);
16827 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16828 (yyval.strterm) = p->lex.strterm;
16829 p->lex.strterm = 0;
16830 SET_LEX_STATE(EXPR_BEG);
16831 }
16832#line 16833 "parse.c"
16833 break;
16834
16835 case 670: /* @35: %empty */
16836#line 6087 "parse.y"
16837 {
16838 (yyval.num) = p->lex.brace_nest;
16839 p->lex.brace_nest = 0;
16840 }
16841#line 16842 "parse.c"
16842 break;
16843
16844 case 671: /* @36: %empty */
16845#line 6091 "parse.y"
16846 {
16847 (yyval.num) = p->heredoc_indent;
16848 p->heredoc_indent = 0;
16849 }
16850#line 16851 "parse.c"
16851 break;
16852
16853 case 672: /* string_content: "'#{'" @34 @35 @36 compstmt_stmts string_dend */
16854#line 6096 "parse.y"
16855 {
16856 COND_POP();
16857 CMDARG_POP();
16858 p->lex.strterm = (yyvsp[-4].strterm);
16859 SET_LEX_STATE((yyvsp[-5].state));
16860 p->lex.brace_nest = (yyvsp[-3].num);
16861 p->heredoc_indent = (yyvsp[-2].num);
16862 p->heredoc_line_indent = -1;
16863 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16864 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
16865 /*% ripper: string_embexpr!($:compstmt) %*/
16866 }
16867#line 16868 "parse.c"
16868 break;
16869
16870 case 675: /* string_dvar: nonlocal_var */
16871#line 6115 "parse.y"
16872 {
16873 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16874 /*% ripper: var_ref!($:1) %*/
16875 }
16876#line 16877 "parse.c"
16877 break;
16878
16879 case 679: /* ssym: "symbol literal" sym */
16880#line 6127 "parse.y"
16881 {
16882 SET_LEX_STATE(EXPR_END);
16883 VALUE str = rb_id2str((yyvsp[0].id));
16884 /*
16885 * TODO:
16886 * set_yylval_noname sets invalid id to yylval.
16887 * This branch can be removed once yylval is changed to
16888 * hold lexed string.
16889 */
16890 if (!str) str = STR_NEW0();
16891 (yyval.node) = NEW_SYM(str, &(yyloc));
16892 /*% ripper: symbol_literal!(symbol!($:2)) %*/
16893 }
16894#line 16895 "parse.c"
16895 break;
16896
16897 case 682: /* dsym: "symbol literal" string_contents "terminator" */
16898#line 6147 "parse.y"
16899 {
16900 SET_LEX_STATE(EXPR_END);
16901 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
16902 /*% ripper: dyna_symbol!($:2) %*/
16903 }
16904#line 16905 "parse.c"
16905 break;
16906
16907 case 684: /* numeric: tUMINUS_NUM simple_numeric */
16908#line 6156 "parse.y"
16909 {
16910 (yyval.node) = (yyvsp[0].node);
16911 negate_lit(p, (yyval.node));
16912 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
16913 }
16914#line 16915 "parse.c"
16915 break;
16916
16917 case 695: /* keyword_variable: "'nil'" */
16918#line 6178 "parse.y"
16919 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
16920#line 16921 "parse.c"
16921 break;
16922
16923 case 696: /* keyword_variable: "'self'" */
16924#line 6179 "parse.y"
16925 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
16926#line 16927 "parse.c"
16927 break;
16928
16929 case 697: /* keyword_variable: "'true'" */
16930#line 6180 "parse.y"
16931 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
16932#line 16933 "parse.c"
16933 break;
16934
16935 case 698: /* keyword_variable: "'false'" */
16936#line 6181 "parse.y"
16937 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
16938#line 16939 "parse.c"
16939 break;
16940
16941 case 699: /* keyword_variable: "'__FILE__'" */
16942#line 6182 "parse.y"
16943 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
16944#line 16945 "parse.c"
16945 break;
16946
16947 case 700: /* keyword_variable: "'__LINE__'" */
16948#line 6183 "parse.y"
16949 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
16950#line 16951 "parse.c"
16951 break;
16952
16953 case 701: /* keyword_variable: "'__ENCODING__'" */
16954#line 6184 "parse.y"
16955 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
16956#line 16957 "parse.c"
16957 break;
16958
16959 case 702: /* var_ref: user_variable */
16960#line 6188 "parse.y"
16961 {
16962 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16963 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
16964 /*% ripper: var_ref!($:1) %*/
16965 }
16966 else {
16967 /*% ripper: vcall!($:1) %*/
16968 }
16969 }
16970#line 16971 "parse.c"
16971 break;
16972
16973 case 703: /* var_ref: keyword_variable */
16974#line 6198 "parse.y"
16975 {
16976 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16977 /*% ripper: var_ref!($:1) %*/
16978 }
16979#line 16980 "parse.c"
16980 break;
16981
16982 case 704: /* var_lhs: user_variable */
16983#line 6205 "parse.y"
16984 {
16985 /*% ripper: var_field!($:1) %*/
16986 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16987 }
16988#line 16989 "parse.c"
16989 break;
16990
16991 case 705: /* var_lhs: keyword_variable */
16992#line 6205 "parse.y"
16993 {
16994 /*% ripper: var_field!($:1) %*/
16995 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16996 }
16997#line 16998 "parse.c"
16998 break;
16999
17000 case 708: /* $@37: %empty */
17001#line 6216 "parse.y"
17002 {
17003 SET_LEX_STATE(EXPR_BEG);
17004 p->command_start = TRUE;
17005 }
17006#line 17007 "parse.c"
17007 break;
17008
17009 case 709: /* superclass: '<' $@37 expr_value term */
17010#line 6221 "parse.y"
17011 {
17012 (yyval.node) = (yyvsp[-1].node);
17013 /*% ripper: $:3 %*/
17014 }
17015#line 17016 "parse.c"
17016 break;
17017
17018 case 712: /* f_opt_paren_args: none */
17019#line 6230 "parse.y"
17020 {
17021 p->ctxt.in_argdef = 0;
17022 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
17023 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
17024 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17025 }
17026#line 17027 "parse.c"
17027 break;
17028
17029 case 713: /* f_paren_args: '(' f_args rparen */
17030#line 6239 "parse.y"
17031 {
17032 (yyval.node_args) = (yyvsp[-1].node_args);
17033 /*% ripper: paren!($:2) %*/
17034 SET_LEX_STATE(EXPR_BEG);
17035 p->command_start = TRUE;
17036 p->ctxt.in_argdef = 0;
17037 }
17038#line 17039 "parse.c"
17039 break;
17040
17041 case 715: /* @38: %empty */
17042#line 6249 "parse.y"
17043 {
17044 (yyval.ctxt) = p->ctxt;
17045 p->ctxt.in_kwarg = 1;
17046 p->ctxt.in_argdef = 1;
17047 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17048 }
17049#line 17050 "parse.c"
17050 break;
17051
17052 case 716: /* f_arglist: @38 f_args term */
17053#line 6256 "parse.y"
17054 {
17055 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17056 p->ctxt.in_argdef = 0;
17057 (yyval.node_args) = (yyvsp[-1].node_args);
17058 SET_LEX_STATE(EXPR_BEG);
17059 p->command_start = TRUE;
17060 /*% ripper: $:2 %*/
17061 }
17062#line 17063 "parse.c"
17063 break;
17064
17065 case 717: /* f_kw_arg_value: f_label arg_value */
17066#line 3002 "parse.y"
17067 {
17068 p->ctxt.in_argdef = 1;
17069 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17070 /*% ripper: [$:$, $:value] %*/
17071 }
17072#line 17073 "parse.c"
17073 break;
17074
17075 case 718: /* f_kw_arg_value: f_label */
17076#line 3008 "parse.y"
17077 {
17078 p->ctxt.in_argdef = 1;
17079 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17080 /*% ripper: [$:$, 0] %*/
17081 }
17082#line 17083 "parse.c"
17083 break;
17084
17085 case 719: /* f_kwarg_arg_value: f_kw_arg_value */
17086#line 3017 "parse.y"
17087 {
17088 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17089 /*% ripper: rb_ary_new3(1, $:1) %*/
17090 }
17091#line 17092 "parse.c"
17092 break;
17093
17094 case 720: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17095#line 3022 "parse.y"
17096 {
17097 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17098 /*% ripper: rb_ary_push($:1, $:3) %*/
17099 }
17100#line 17101 "parse.c"
17101 break;
17102
17103 case 721: /* args_tail_basic_arg_value: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
17104#line 2926 "parse.y"
17105 {
17106 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17107 /*% ripper: [$:1, $:3, $:4] %*/
17108 }
17109#line 17110 "parse.c"
17110 break;
17111
17112 case 722: /* args_tail_basic_arg_value: f_kwarg_arg_value opt_f_block_arg */
17113#line 2931 "parse.y"
17114 {
17115 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17116 /*% ripper: [$:1, Qnil, $:2] %*/
17117 }
17118#line 17119 "parse.c"
17119 break;
17120
17121 case 723: /* args_tail_basic_arg_value: f_any_kwrest opt_f_block_arg */
17122#line 2936 "parse.y"
17123 {
17124 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17125 /*% ripper: [Qnil, $:1, $:2] %*/
17126 }
17127#line 17128 "parse.c"
17128 break;
17129
17130 case 724: /* args_tail_basic_arg_value: f_block_arg */
17131#line 2941 "parse.y"
17132 {
17133 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17134 /*% ripper: [Qnil, Qnil, $:1] %*/
17135 }
17136#line 17137 "parse.c"
17137 break;
17138
17139 case 726: /* args_tail: args_forward */
17140#line 6268 "parse.y"
17141 {
17142 ID fwd = (yyvsp[0].id);
17143 if (lambda_beginning_p() ||
17144 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
17145 yyerror0("unexpected ... in lambda argument");
17146 fwd = 0;
17147 }
17148 else {
17149 add_forwarding_args(p);
17150 }
17151 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
17152 (yyval.node_args)->nd_ainfo.forwarding = 1;
17153 /*% ripper: [Qnil, $:1, Qnil] %*/
17154 }
17155#line 17156 "parse.c"
17156 break;
17157
17158 case 727: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17159#line 2980 "parse.y"
17160 {
17161 p->ctxt.in_argdef = 1;
17162 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17163 /*% ripper: [$:$, $:3] %*/
17164 }
17165#line 17166 "parse.c"
17166 break;
17167
17168 case 728: /* f_opt_arg_arg_value: f_opt_arg_value */
17169#line 2989 "parse.y"
17170 {
17171 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17172 /*% ripper: rb_ary_new3(1, $:1) %*/
17173 }
17174#line 17175 "parse.c"
17175 break;
17176
17177 case 729: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17178#line 2994 "parse.y"
17179 {
17180 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17181 /*% ripper: rb_ary_push($:1, $:3) %*/
17182 }
17183#line 17184 "parse.c"
17184 break;
17185
17186 case 730: /* opt_args_tail_args_tail: ',' args_tail */
17187#line 3089 "parse.y"
17188 {
17189 (yyval.node_args) = (yyvsp[0].node_args);
17190 /*% ripper: $:2 %*/
17191 }
17192#line 17193 "parse.c"
17193 break;
17194
17195 case 731: /* opt_args_tail_args_tail: %empty */
17196#line 3094 "parse.y"
17197 {
17198 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17199 /*% ripper: [Qnil, Qnil, Qnil] %*/
17200 }
17201#line 17202 "parse.c"
17202 break;
17203
17204 case 732: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17205#line 6285 "parse.y"
17206 {
17207 (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));
17208 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
17209 }
17210#line 17211 "parse.c"
17211 break;
17212
17213 case 733: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17214#line 6290 "parse.y"
17215 {
17216 (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));
17217 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
17218 }
17219#line 17220 "parse.c"
17220 break;
17221
17222 case 734: /* f_args: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail */
17223#line 6295 "parse.y"
17224 {
17225 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17226 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
17227 }
17228#line 17229 "parse.c"
17229 break;
17230
17231 case 735: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17232#line 6300 "parse.y"
17233 {
17234 (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));
17235 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
17236 }
17237#line 17238 "parse.c"
17238 break;
17239
17240 case 736: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
17241#line 6305 "parse.y"
17242 {
17243 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17244 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
17245 }
17246#line 17247 "parse.c"
17247 break;
17248
17249 case 737: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17250#line 6310 "parse.y"
17251 {
17252 (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));
17253 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
17254 }
17255#line 17256 "parse.c"
17256 break;
17257
17258 case 738: /* f_args: f_arg opt_args_tail_args_tail */
17259#line 6315 "parse.y"
17260 {
17261 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17262 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
17263 }
17264#line 17265 "parse.c"
17265 break;
17266
17267 case 739: /* f_args: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17268#line 6320 "parse.y"
17269 {
17270 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17271 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
17272 }
17273#line 17274 "parse.c"
17274 break;
17275
17276 case 740: /* f_args: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17277#line 6325 "parse.y"
17278 {
17279 (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));
17280 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
17281 }
17282#line 17283 "parse.c"
17283 break;
17284
17285 case 741: /* f_args: f_opt_arg_arg_value opt_args_tail_args_tail */
17286#line 6330 "parse.y"
17287 {
17288 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17289 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
17290 }
17291#line 17292 "parse.c"
17292 break;
17293
17294 case 742: /* f_args: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17295#line 6335 "parse.y"
17296 {
17297 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17298 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
17299 }
17300#line 17301 "parse.c"
17301 break;
17302
17303 case 743: /* f_args: f_rest_arg opt_args_tail_args_tail */
17304#line 6340 "parse.y"
17305 {
17306 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17307 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
17308 }
17309#line 17310 "parse.c"
17310 break;
17311
17312 case 744: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
17313#line 6345 "parse.y"
17314 {
17315 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17316 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
17317 }
17318#line 17319 "parse.c"
17319 break;
17320
17321 case 745: /* f_args: args_tail */
17322#line 6350 "parse.y"
17323 {
17324 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17325 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
17326 }
17327#line 17328 "parse.c"
17328 break;
17329
17330 case 746: /* f_args: %empty */
17331#line 6355 "parse.y"
17332 {
17333 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17334 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
17335 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17336 }
17337#line 17338 "parse.c"
17338 break;
17339
17340 case 747: /* args_forward: "(..." */
17341#line 6363 "parse.y"
17342 {
17343#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
17344 (yyval.id) = 0;
17345#else
17346 (yyval.id) = idFWD_KWREST;
17347#endif
17348 /*% ripper: args_forward! %*/
17349 }
17350#line 17351 "parse.c"
17351 break;
17352
17353 case 748: /* f_bad_arg: "constant" */
17354#line 6374 "parse.y"
17355 {
17356 static const char mesg[] = "formal argument cannot be a constant";
17357 /*%%%*/
17358 yyerror1(&(yylsp[0]), mesg);
17359 /*% %*/
17360 (yyval.id) = 0;
17361 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17362 }
17363#line 17364 "parse.c"
17364 break;
17365
17366 case 749: /* f_bad_arg: "instance variable" */
17367#line 6383 "parse.y"
17368 {
17369 static const char mesg[] = "formal argument cannot be an instance variable";
17370 /*%%%*/
17371 yyerror1(&(yylsp[0]), mesg);
17372 /*% %*/
17373 (yyval.id) = 0;
17374 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17375 }
17376#line 17377 "parse.c"
17377 break;
17378
17379 case 750: /* f_bad_arg: "global variable" */
17380#line 6392 "parse.y"
17381 {
17382 static const char mesg[] = "formal argument cannot be a global variable";
17383 /*%%%*/
17384 yyerror1(&(yylsp[0]), mesg);
17385 /*% %*/
17386 (yyval.id) = 0;
17387 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17388 }
17389#line 17390 "parse.c"
17390 break;
17391
17392 case 751: /* f_bad_arg: "class variable" */
17393#line 6401 "parse.y"
17394 {
17395 static const char mesg[] = "formal argument cannot be a class variable";
17396 /*%%%*/
17397 yyerror1(&(yylsp[0]), mesg);
17398 /*% %*/
17399 (yyval.id) = 0;
17400 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17401 }
17402#line 17403 "parse.c"
17403 break;
17404
17405 case 753: /* f_norm_arg: "local variable or method" */
17406#line 6413 "parse.y"
17407 {
17408 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17409 if (e) {
17410 /*% ripper[error]: param_error!(?e, $:1) %*/
17411 }
17412 p->max_numparam = ORDINAL_PARAM;
17413 }
17414#line 17415 "parse.c"
17415 break;
17416
17417 case 754: /* f_arg_asgn: f_norm_arg */
17418#line 6423 "parse.y"
17419 {
17420 arg_var(p, (yyvsp[0].id));
17421 (yyval.id) = (yyvsp[0].id);
17422 }
17423#line 17424 "parse.c"
17424 break;
17425
17426 case 755: /* f_arg_item: f_arg_asgn */
17427#line 6430 "parse.y"
17428 {
17429 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17430 /*% ripper: $:1 %*/
17431 }
17432#line 17433 "parse.c"
17433 break;
17434
17435 case 756: /* f_arg_item: "(" f_margs rparen */
17436#line 6435 "parse.y"
17437 {
17438 ID tid = internal_id(p);
17439 YYLTYPE loc;
17440 loc.beg_pos = (yylsp[-1]).beg_pos;
17441 loc.end_pos = (yylsp[-1]).beg_pos;
17442 arg_var(p, tid);
17443 if (dyna_in_block(p)) {
17444 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17445 }
17446 else {
17447 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17448 }
17449 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17450 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17451 /*% ripper: mlhs_paren!($:2) %*/
17452 }
17453#line 17454 "parse.c"
17454 break;
17455
17456 case 758: /* f_arg: f_arg ',' f_arg_item */
17457#line 6456 "parse.y"
17458 {
17459 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17460 (yyval.node_args_aux)->nd_plen++;
17461 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17462 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17463 /*% ripper: rb_ary_push($:1, $:3) %*/
17464 }
17465#line 17466 "parse.c"
17466 break;
17467
17468 case 759: /* f_label: "label" */
17469#line 6467 "parse.y"
17470 {
17471 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17472 if (e) {
17473 (yyval.id) = 0;
17474 /*% ripper[error]: param_error!(?e, $:1) %*/
17475 }
17476 /*
17477 * Workaround for Prism::ParseTest#test_filepath for
17478 * "unparser/corpus/literal/def.txt"
17479 *
17480 * See the discussion on https://github.com/ruby/ruby/pull/9923
17481 */
17482 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17483 /*% ripper: $:1 %*/
17484 p->max_numparam = ORDINAL_PARAM;
17485 p->ctxt.in_argdef = 0;
17486 }
17487#line 17488 "parse.c"
17488 break;
17489
17490 case 762: /* f_no_kwarg: p_kwnorest */
17491#line 6491 "parse.y"
17492 {
17493 /*% ripper: nokw_param!(Qnil) %*/
17494 }
17495#line 17496 "parse.c"
17496 break;
17497
17498 case 763: /* f_kwrest: kwrest_mark "local variable or method" */
17499#line 6497 "parse.y"
17500 {
17501 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17502 (yyval.id) = (yyvsp[0].id);
17503 /*% ripper: kwrest_param!($:2) %*/
17504 }
17505#line 17506 "parse.c"
17506 break;
17507
17508 case 764: /* f_kwrest: kwrest_mark */
17509#line 6503 "parse.y"
17510 {
17511 arg_var(p, idFWD_KWREST);
17512 (yyval.id) = idFWD_KWREST;
17513 /*% ripper: kwrest_param!(Qnil) %*/
17514 }
17515#line 17516 "parse.c"
17516 break;
17517
17518 case 767: /* f_rest_arg: restarg_mark "local variable or method" */
17519#line 6515 "parse.y"
17520 {
17521 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17522 (yyval.id) = (yyvsp[0].id);
17523 /*% ripper: rest_param!($:2) %*/
17524 }
17525#line 17526 "parse.c"
17526 break;
17527
17528 case 768: /* f_rest_arg: restarg_mark */
17529#line 6521 "parse.y"
17530 {
17531 arg_var(p, idFWD_REST);
17532 (yyval.id) = idFWD_REST;
17533 /*% ripper: rest_param!(Qnil) %*/
17534 }
17535#line 17536 "parse.c"
17536 break;
17537
17538 case 771: /* f_block_arg: blkarg_mark "local variable or method" */
17539#line 6533 "parse.y"
17540 {
17541 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17542 (yyval.id) = (yyvsp[0].id);
17543 /*% ripper: blockarg!($:2) %*/
17544 }
17545#line 17546 "parse.c"
17546 break;
17547
17548 case 772: /* f_block_arg: blkarg_mark */
17549#line 6539 "parse.y"
17550 {
17551 arg_var(p, idFWD_BLOCK);
17552 (yyval.id) = idFWD_BLOCK;
17553 /*% ripper: blockarg!(Qnil) %*/
17554 }
17555#line 17556 "parse.c"
17556 break;
17557
17558 case 773: /* opt_f_block_arg: ',' f_block_arg */
17559#line 6547 "parse.y"
17560 {
17561 (yyval.id) = (yyvsp[0].id);
17562 /*% ripper: $:2 %*/
17563 }
17564#line 17565 "parse.c"
17565 break;
17566
17567 case 775: /* value_expr_singleton_expr: singleton_expr */
17568#line 3143 "parse.y"
17569 {
17570 value_expr((yyvsp[0].node));
17571 (yyval.node) = (yyvsp[0].node);
17572 }
17573#line 17574 "parse.c"
17574 break;
17575
17576 case 776: /* singleton: value_expr_singleton_expr */
17577#line 6556 "parse.y"
17578 {
17579 NODE *expr = last_expr_node((yyvsp[0].node));
17580 switch (nd_type(expr)) {
17581 case NODE_STR:
17582 case NODE_DSTR:
17583 case NODE_XSTR:
17584 case NODE_DXSTR:
17585 case NODE_REGX:
17586 case NODE_DREGX:
17587 case NODE_SYM:
17588 case NODE_LINE:
17589 case NODE_FILE:
17590 case NODE_ENCODING:
17591 case NODE_INTEGER:
17592 case NODE_FLOAT:
17593 case NODE_RATIONAL:
17594 case NODE_IMAGINARY:
17595 case NODE_DSYM:
17596 case NODE_LIST:
17597 case NODE_ZLIST:
17598 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17599 break;
17600 default:
17601 break;
17602 }
17603 (yyval.node) = (yyvsp[0].node);
17604 }
17605#line 17606 "parse.c"
17606 break;
17607
17608 case 778: /* $@39: %empty */
17609#line 6587 "parse.y"
17610 {
17611 SET_LEX_STATE(EXPR_BEG);
17612 p->ctxt.in_argdef = 0;
17613 }
17614#line 17615 "parse.c"
17615 break;
17616
17617 case 779: /* singleton_expr: '(' $@39 expr rparen */
17618#line 6592 "parse.y"
17619 {
17620 p->ctxt.in_argdef = 1;
17621 (yyval.node) = (yyvsp[-1].node);
17622 /*% ripper: paren!($:3) %*/
17623 }
17624#line 17625 "parse.c"
17625 break;
17626
17627 case 781: /* assoc_list: assocs trailer */
17628#line 6601 "parse.y"
17629 {
17630 (yyval.node) = (yyvsp[-1].node);
17631 /*% ripper: assoclist_from_args!($:1) %*/
17632 }
17633#line 17634 "parse.c"
17634 break;
17635
17636 case 783: /* assocs: assocs ',' assoc */
17637#line 6610 "parse.y"
17638 {
17639 NODE *assocs = (yyvsp[-2].node);
17640 NODE *tail = (yyvsp[0].node);
17641 if (!assocs) {
17642 assocs = tail;
17643 }
17644 else if (tail) {
17645 if (RNODE_LIST(assocs)->nd_head) {
17646 NODE *n = RNODE_LIST(tail)->nd_next;
17647 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17648 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17649 /* DSTAR */
17650 tail = RNODE_HASH(n)->nd_head;
17651 }
17652 }
17653 if (tail) {
17654 assocs = list_concat(assocs, tail);
17655 }
17656 }
17657 (yyval.node) = assocs;
17658 /*% ripper: rb_ary_push($:1, $:3) %*/
17659 }
17660#line 17661 "parse.c"
17661 break;
17662
17663 case 784: /* assoc: arg_value "=>" arg_value */
17664#line 6635 "parse.y"
17665 {
17666 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17667 /*% ripper: assoc_new!($:1, $:3) %*/
17668 }
17669#line 17670 "parse.c"
17670 break;
17671
17672 case 785: /* assoc: "label" arg_value */
17673#line 6640 "parse.y"
17674 {
17675 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17676 /*% ripper: assoc_new!($:1, $:2) %*/
17677 }
17678#line 17679 "parse.c"
17679 break;
17680
17681 case 786: /* assoc: "label" */
17682#line 6645 "parse.y"
17683 {
17684 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17685 if (!val) val = NEW_ERROR(&(yyloc));
17686 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17687 /*% ripper: assoc_new!($:1, Qnil) %*/
17688 }
17689#line 17690 "parse.c"
17690 break;
17691
17692 case 787: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17693#line 6652 "parse.y"
17694 {
17695 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17696 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17697 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17698 }
17699#line 17700 "parse.c"
17700 break;
17701
17702 case 788: /* assoc: "**arg" arg_value */
17703#line 6658 "parse.y"
17704 {
17705 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17706 /*% ripper: assoc_splat!($:2) %*/
17707 }
17708#line 17709 "parse.c"
17709 break;
17710
17711 case 789: /* assoc: "**arg" */
17712#line 6663 "parse.y"
17713 {
17714 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17715 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17716 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17717 /*% ripper: assoc_splat!(Qnil) %*/
17718 }
17719#line 17720 "parse.c"
17720 break;
17721
17722 case 808: /* term: ';' */
17723#line 6709 "parse.y"
17724 {yyerrok;token_flush(p);}
17725#line 17726 "parse.c"
17726 break;
17727
17728 case 809: /* term: '\n' */
17729#line 6711 "parse.y"
17730 {
17731 (yyloc).end_pos = (yyloc).beg_pos;
17732 token_flush(p);
17733 }
17734#line 17735 "parse.c"
17735 break;
17736
17737 case 811: /* terms: terms ';' */
17738#line 6718 "parse.y"
17739 {yyerrok;}
17740#line 17741 "parse.c"
17741 break;
17742
17743 case 812: /* none: %empty */
17744#line 6722 "parse.y"
17745 {
17746 (yyval.node) = 0;
17747 /*% ripper: Qnil %*/
17748 }
17749#line 17750 "parse.c"
17750 break;
17751
17752
17753#line 17754 "parse.c"
17754
17755 default: break;
17756 }
17757 /* User semantic actions sometimes alter yychar, and that requires
17758 that yytoken be updated with the new translation. We take the
17759 approach of translating immediately before every use of yytoken.
17760 One alternative is translating here after every semantic action,
17761 but that translation would be missed if the semantic action invokes
17762 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17763 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17764 incorrect destructor might then be invoked immediately. In the
17765 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17766 to an incorrect destructor call or verbose syntax error message
17767 before the lookahead is translated. */
17768 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17769
17770 YYPOPSTACK (yylen);
17771 /* %after-reduce function. */
17772#line 2665 "parse.y"
17773 {after_reduce(yylen, p);}
17774#line 17775 "parse.c"
17775
17776 yylen = 0;
17777
17778 *++yyvsp = yyval;
17779 *++yylsp = yyloc;
17780
17781 /* Now 'shift' the result of the reduction. Determine what state
17782 that goes to, based on the state we popped back to and the rule
17783 number reduced by. */
17784 {
17785 const int yylhs = yyr1[yyn] - YYNTOKENS;
17786 const int yyi = yypgoto[yylhs] + *yyssp;
17787 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17788 ? yytable[yyi]
17789 : yydefgoto[yylhs]);
17790 }
17791
17792 goto yynewstate;
17793
17794
17795/*--------------------------------------.
17796| yyerrlab -- here on detecting error. |
17797`--------------------------------------*/
17798yyerrlab:
17799 /* Make sure we have latest lookahead translation. See comments at
17800 user semantic actions for why this is necessary. */
17801 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17802 /* If not already recovering from an error, report this error. */
17803 if (!yyerrstatus)
17804 {
17805 ++yynerrs;
17806 {
17807 yypcontext_t yyctx
17808 = {yyssp, yytoken, &yylloc};
17809 char const *yymsgp = YY_("syntax error");
17810 int yysyntax_error_status;
17811 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17812 if (yysyntax_error_status == 0)
17813 yymsgp = yymsg;
17814 else if (yysyntax_error_status == -1)
17815 {
17816 if (yymsg != yymsgbuf)
17817 YYSTACK_FREE (yymsg);
17818 yymsg = YY_CAST (char *,
17819 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17820 if (yymsg)
17821 {
17822 yysyntax_error_status
17823 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17824 yymsgp = yymsg;
17825 }
17826 else
17827 {
17828 yymsg = yymsgbuf;
17829 yymsg_alloc = sizeof yymsgbuf;
17830 yysyntax_error_status = YYENOMEM;
17831 }
17832 }
17833 yyerror (&yylloc, p, yymsgp);
17834 if (yysyntax_error_status == YYENOMEM)
17835 YYNOMEM;
17836 }
17837 }
17838
17839 yyerror_range[1] = yylloc;
17840 if (yyerrstatus == 3)
17841 {
17842 /* If just tried and failed to reuse lookahead token after an
17843 error, discard it. */
17844
17845 if (yychar <= END_OF_INPUT)
17846 {
17847 /* Return failure if at end of input. */
17848 if (yychar == END_OF_INPUT)
17849 YYABORT;
17850 }
17851 else
17852 {
17853 yydestruct ("Error: discarding",
17854 yytoken, &yylval, &yylloc, p);
17855 yychar = YYEMPTY;
17856 }
17857 }
17858
17859 /* Else will try to reuse lookahead token after shifting the error
17860 token. */
17861 goto yyerrlab1;
17862
17863
17864/*---------------------------------------------------.
17865| yyerrorlab -- error raised explicitly by YYERROR. |
17866`---------------------------------------------------*/
17867yyerrorlab:
17868 /* Pacify compilers when the user code never invokes YYERROR and the
17869 label yyerrorlab therefore never appears in user code. */
17870 if (0)
17871 YYERROR;
17872 ++yynerrs;
17873
17874 /* Do not reclaim the symbols of the rule whose action triggered
17875 this YYERROR. */
17876 YYPOPSTACK (yylen);
17877 /* %after-pop-stack function. */
17878#line 2667 "parse.y"
17879 {after_pop_stack(yylen, p);}
17880#line 17881 "parse.c"
17881
17882 yylen = 0;
17883 YY_STACK_PRINT (yyss, yyssp, p);
17884 yystate = *yyssp;
17885 goto yyerrlab1;
17886
17887
17888/*-------------------------------------------------------------.
17889| yyerrlab1 -- common code for both syntax error and YYERROR. |
17890`-------------------------------------------------------------*/
17891yyerrlab1:
17892 yyerrstatus = 3; /* Each real token shifted decrements this. */
17893
17894 /* Pop stack until we find a state that shifts the error token. */
17895 for (;;)
17896 {
17897 yyn = yypact[yystate];
17898 if (!yypact_value_is_default (yyn))
17899 {
17900 yyn += YYSYMBOL_YYerror;
17901 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
17902 {
17903 yyn = yytable[yyn];
17904 if (0 < yyn)
17905 break;
17906 }
17907 }
17908
17909 /* Pop the current state because it cannot handle the error token. */
17910 if (yyssp == yyss)
17911 YYABORT;
17912
17913 yyerror_range[1] = *yylsp;
17914 yydestruct ("Error: popping",
17915 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
17916 YYPOPSTACK (1);
17917 /* %after-pop-stack function. */
17918#line 2667 "parse.y"
17919 {after_pop_stack(1, p);}
17920#line 17921 "parse.c"
17921
17922 yystate = *yyssp;
17923 YY_STACK_PRINT (yyss, yyssp, p);
17924 }
17925
17926 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17927 *++yyvsp = yylval;
17928 YY_IGNORE_MAYBE_UNINITIALIZED_END
17929
17930 yyerror_range[2] = yylloc;
17931 ++yylsp;
17932 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
17933
17934 /* Shift the error token. */
17935 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
17936 /* %after-shift-error-token code. */
17937#line 2666 "parse.y"
17938 {after_shift_error_token(p);}
17939#line 17940 "parse.c"
17940
17941
17942 yystate = yyn;
17943 goto yynewstate;
17944
17945
17946/*-------------------------------------.
17947| yyacceptlab -- YYACCEPT comes here. |
17948`-------------------------------------*/
17949yyacceptlab:
17950 yyresult = 0;
17951 goto yyreturnlab;
17952
17953
17954/*-----------------------------------.
17955| yyabortlab -- YYABORT comes here. |
17956`-----------------------------------*/
17957yyabortlab:
17958 yyresult = 1;
17959 goto yyreturnlab;
17960
17961
17962/*-----------------------------------------------------------.
17963| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
17964`-----------------------------------------------------------*/
17965yyexhaustedlab:
17966 yyerror (&yylloc, p, YY_("memory exhausted"));
17967 yyresult = 2;
17968 goto yyreturnlab;
17969
17970
17971/*----------------------------------------------------------.
17972| yyreturnlab -- parsing is finished, clean up and return. |
17973`----------------------------------------------------------*/
17974yyreturnlab:
17975 if (yychar != YYEMPTY)
17976 {
17977 /* Make sure we have latest lookahead translation. See comments at
17978 user semantic actions for why this is necessary. */
17979 yytoken = YYTRANSLATE (yychar);
17980 yydestruct ("Cleanup: discarding lookahead",
17981 yytoken, &yylval, &yylloc, p);
17982 }
17983 /* Do not reclaim the symbols of the rule whose action triggered
17984 this YYABORT or YYACCEPT. */
17985 YYPOPSTACK (yylen);
17986 YY_STACK_PRINT (yyss, yyssp, p);
17987 while (yyssp != yyss)
17988 {
17989 yydestruct ("Cleanup: popping",
17990 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
17991 YYPOPSTACK (1);
17992 }
17993#ifndef yyoverflow
17994 if (yyss != yyssa)
17995 YYSTACK_FREE (yyss);
17996#endif
17997 if (yymsg != yymsgbuf)
17998 YYSTACK_FREE (yymsg);
17999 return yyresult;
18000}
18001
18002#line 6727 "parse.y"
18003
18004# undef p
18005# undef yylex
18006# undef yylval
18007# define yylval (*p->lval)
18008
18009static int regx_options(struct parser_params*);
18010static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18011static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18012static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18013static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18014
18015#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18016
18017# define set_yylval_node(x) { \
18018 YYLTYPE _cur_loc; \
18019 rb_parser_set_location(p, &_cur_loc); \
18020 yylval.node = (x); \
18021 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18022}
18023# define set_yylval_str(x) \
18024do { \
18025 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18026 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18027} while(0)
18028# define set_yylval_num(x) { \
18029 yylval.num = (x); \
18030 set_parser_s_value(x); \
18031}
18032# define set_yylval_id(x) (yylval.id = (x))
18033# define set_yylval_name(x) { \
18034 (yylval.id = (x)); \
18035 set_parser_s_value(ID2SYM(x)); \
18036}
18037# define yylval_id() (yylval.id)
18038
18039#define set_yylval_noname() set_yylval_id(keyword_nil)
18040#define has_delayed_token(p) (p->delayed.token != NULL)
18041
18042#ifndef RIPPER
18043#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18044#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18045
18046static bool
18047parser_has_token(struct parser_params *p)
18048{
18049 const char *const pcur = p->lex.pcur;
18050 const char *const ptok = p->lex.ptok;
18051 if (p->keep_tokens && (pcur < ptok)) {
18052 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18053 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18054 }
18055 return pcur > ptok;
18056}
18057
18058static const char *
18059escaped_char(int c)
18060{
18061 switch (c) {
18062 case '"': return "\\\"";
18063 case '\\': return "\\\\";
18064 case '\0': return "\\0";
18065 case '\n': return "\\n";
18066 case '\r': return "\\r";
18067 case '\t': return "\\t";
18068 case '\f': return "\\f";
18069 case '\013': return "\\v";
18070 case '\010': return "\\b";
18071 case '\007': return "\\a";
18072 case '\033': return "\\e";
18073 case '\x7f': return "\\c?";
18074 }
18075 return NULL;
18076}
18077
18078static rb_parser_string_t *
18079rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18080{
18081 rb_encoding *enc = p->enc;
18082 const char *ptr = str->ptr;
18083 const char *pend = ptr + str->len;
18084 const char *prev = ptr;
18085 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18086 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18087
18088 while (ptr < pend) {
18089 unsigned int c;
18090 const char *cc;
18091 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18092 if (!MBCLEN_CHARFOUND_P(n)) {
18093 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18094 n = rb_enc_mbminlen(enc);
18095 if (pend < ptr + n)
18096 n = (int)(pend - ptr);
18097 while (n--) {
18098 c = *ptr & 0xf0 >> 4;
18099 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18100 c = *ptr & 0x0f;
18101 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18102 parser_str_cat(result, charbuf, 4);
18103 prev = ++ptr;
18104 }
18105 continue;
18106 }
18107 n = MBCLEN_CHARFOUND_LEN(n);
18108 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18109 ptr += n;
18110 cc = escaped_char(c);
18111 if (cc) {
18112 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18113 parser_str_cat_cstr(result, cc);
18114 prev = ptr;
18115 }
18116 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18117 }
18118 else {
18119 if (ptr - n > prev) {
18120 parser_str_cat(result, prev, ptr - n - prev);
18121 prev = ptr - n;
18122 }
18123 parser_str_cat(result, prev, ptr - prev);
18124 prev = ptr;
18125 }
18126 }
18127 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18128
18129 return result;
18130}
18131
18132static void
18133parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18134{
18136 token->id = p->token_id;
18137 token->type_name = parser_token2char(p, t);
18138 token->str = str;
18139 token->loc.beg_pos = p->yylloc->beg_pos;
18140 token->loc.end_pos = p->yylloc->end_pos;
18141 rb_parser_ary_push_ast_token(p, p->tokens, token);
18142 p->token_id++;
18143
18144 if (p->debug) {
18145 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18146 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18147 line, token->id, token->type_name, str_escaped->ptr,
18148 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18149 token->loc.end_pos.lineno, token->loc.end_pos.column);
18150 rb_parser_string_free(p, str_escaped);
18151 }
18152}
18153
18154static void
18155parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18156{
18157 debug_token_line(p, "parser_dispatch_scan_event", line);
18158
18159 if (!parser_has_token(p)) return;
18160
18161 RUBY_SET_YYLLOC(*p->yylloc);
18162
18163 if (p->keep_tokens) {
18164 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18165 parser_append_tokens(p, str, t, line);
18166 }
18167
18168 token_flush(p);
18169}
18170
18171#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18172static void
18173parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18174{
18175 debug_token_line(p, "parser_dispatch_delayed_token", line);
18176
18177 if (!has_delayed_token(p)) return;
18178
18179 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18180
18181 if (p->keep_tokens) {
18182 /* p->delayed.token is freed by rb_parser_tokens_free */
18183 parser_append_tokens(p, p->delayed.token, t, line);
18184 } else {
18185 rb_parser_string_free(p, p->delayed.token);
18186 }
18187
18188 p->delayed.token = NULL;
18189}
18190#else
18191#define literal_flush(p, ptr) ((void)(ptr))
18192
18193static int
18194ripper_has_scan_event(struct parser_params *p)
18195{
18196 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18197 return p->lex.pcur > p->lex.ptok;
18198}
18199
18200static VALUE
18201ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18202{
18203 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18204 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18205 RUBY_SET_YYLLOC(*p->yylloc);
18206 token_flush(p);
18207 return rval;
18208}
18209
18210static void
18211ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18212{
18213 if (!ripper_has_scan_event(p)) return;
18214
18215 set_parser_s_value(ripper_scan_event_val(p, t));
18216}
18217#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18218
18219static void
18220ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18221{
18222 /* save and adjust the location to delayed token for callbacks */
18223 int saved_line = p->ruby_sourceline;
18224 const char *saved_tokp = p->lex.ptok;
18225 VALUE s_value, str;
18226
18227 if (!has_delayed_token(p)) return;
18228 p->ruby_sourceline = p->delayed.beg_line;
18229 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18230 str = rb_str_new_mutable_parser_string(p->delayed.token);
18231 rb_parser_string_free(p, p->delayed.token);
18232 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18233 set_parser_s_value(s_value);
18234 p->delayed.token = NULL;
18235 p->ruby_sourceline = saved_line;
18236 p->lex.ptok = saved_tokp;
18237}
18238#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18239#endif /* RIPPER */
18240
18241static inline int
18242is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18243{
18244 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18245}
18246
18247static inline int
18248parser_is_identchar(struct parser_params *p)
18249{
18250 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18251}
18252
18253static inline int
18254parser_isascii(struct parser_params *p)
18255{
18256 return ISASCII(*(p->lex.pcur-1));
18257}
18258
18259static void
18260token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18261{
18262 int column = 1, nonspc = 0, i;
18263 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18264 if (*ptr == '\t') {
18265 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18266 }
18267 column++;
18268 if (*ptr != ' ' && *ptr != '\t') {
18269 nonspc = 1;
18270 }
18271 }
18272
18273 ptinfo->beg = loc->beg_pos;
18274 ptinfo->indent = column;
18275 ptinfo->nonspc = nonspc;
18276}
18277
18278static void
18279token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18280{
18281 token_info *ptinfo;
18282
18283 if (!p->token_info_enabled) return;
18284 ptinfo = ALLOC(token_info);
18285 ptinfo->token = token;
18286 ptinfo->next = p->token_info;
18287 token_info_setup(ptinfo, p->lex.pbeg, loc);
18288
18289 p->token_info = ptinfo;
18290}
18291
18292static void
18293token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18294{
18295 token_info *ptinfo_beg = p->token_info;
18296
18297 if (!ptinfo_beg) return;
18298
18299 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18300 token_info_warn(p, token, ptinfo_beg, 1, loc);
18301
18302 p->token_info = ptinfo_beg->next;
18303 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18304}
18305
18306static void
18307token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18308{
18309 token_info *ptinfo_beg = p->token_info;
18310
18311 if (!ptinfo_beg) return;
18312 p->token_info = ptinfo_beg->next;
18313
18314 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18315 ptinfo_beg->beg.column != beg_pos.column ||
18316 strcmp(ptinfo_beg->token, token)) {
18317 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18318 beg_pos.lineno, beg_pos.column, token,
18319 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18320 ptinfo_beg->token);
18321 }
18322
18323 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18324}
18325
18326static void
18327token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18328{
18329 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18330 if (!p->token_info_enabled) return;
18331 if (!ptinfo_beg) return;
18332 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18333 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18334 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18335 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18336 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18337 rb_warn3L(ptinfo_end->beg.lineno,
18338 "mismatched indentations at '%s' with '%s' at %d",
18339 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18340}
18341
18342static int
18343parser_precise_mbclen(struct parser_params *p, const char *ptr)
18344{
18345 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18346 if (!MBCLEN_CHARFOUND_P(len)) {
18347 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18348 return -1;
18349 }
18350 return len;
18351}
18352
18353#ifndef RIPPER
18354static inline void
18355parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18356{
18357 rb_parser_string_t *str;
18358 int lineno = p->ruby_sourceline;
18359 if (!yylloc) {
18360 return;
18361 }
18362 else if (yylloc->beg_pos.lineno == lineno) {
18363 str = p->lex.lastline;
18364 }
18365 else {
18366 return;
18367 }
18368 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18369}
18370
18371static int
18372parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18373{
18374#if 0
18375 YYLTYPE current;
18376
18377 if (!yylloc) {
18378 yylloc = RUBY_SET_YYLLOC(current);
18379 }
18380 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18381 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18382 yylloc = 0;
18383 }
18384#endif
18385 parser_compile_error(p, yylloc, "%s", msg);
18386 parser_show_error_line(p, yylloc);
18387 return 0;
18388}
18389
18390static int
18391parser_yyerror0(struct parser_params *p, const char *msg)
18392{
18393 YYLTYPE current;
18394 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18395}
18396
18397void
18398ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18399{
18400 VALUE mesg;
18401 const int max_line_margin = 30;
18402 const char *ptr, *ptr_end, *pt, *pb;
18403 const char *pre = "", *post = "", *pend;
18404 const char *code = "", *caret = "";
18405 const char *lim;
18406 const char *const pbeg = PARSER_STRING_PTR(str);
18407 char *buf;
18408 long len;
18409 int i;
18410
18411 if (!yylloc) return;
18412 pend = rb_parser_string_end(str);
18413 if (pend > pbeg && pend[-1] == '\n') {
18414 if (--pend > pbeg && pend[-1] == '\r') --pend;
18415 }
18416
18417 pt = pend;
18418 if (lineno == yylloc->end_pos.lineno &&
18419 (pend - pbeg) > yylloc->end_pos.column) {
18420 pt = pbeg + yylloc->end_pos.column;
18421 }
18422
18423 ptr = ptr_end = pt;
18424 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18425 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18426
18427 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18428 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18429
18430 len = ptr_end - ptr;
18431 if (len > 4) {
18432 if (ptr > pbeg) {
18433 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18434 if (ptr > pbeg) pre = "...";
18435 }
18436 if (ptr_end < pend) {
18437 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18438 if (ptr_end < pend) post = "...";
18439 }
18440 }
18441 pb = pbeg;
18442 if (lineno == yylloc->beg_pos.lineno) {
18443 pb += yylloc->beg_pos.column;
18444 if (pb > pt) pb = pt;
18445 }
18446 if (pb < ptr) pb = ptr;
18447 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18448 return;
18449 }
18450 if (RTEST(errbuf)) {
18451 mesg = rb_attr_get(errbuf, idMesg);
18452 if (char_at_end(p, mesg, '\n') != '\n')
18453 rb_str_cat_cstr(mesg, "\n");
18454 }
18455 else {
18456 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18457 }
18458 if (!errbuf && rb_stderr_tty_p()) {
18459#define CSI_BEGIN "\033["
18460#define CSI_SGR "m"
18461 rb_str_catf(mesg,
18462 CSI_BEGIN""CSI_SGR"%s" /* pre */
18463 CSI_BEGIN"1"CSI_SGR"%.*s"
18464 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18465 CSI_BEGIN";1"CSI_SGR"%.*s"
18466 CSI_BEGIN""CSI_SGR"%s" /* post */
18467 "\n",
18468 pre,
18469 (int)(pb - ptr), ptr,
18470 (int)(pt - pb), pb,
18471 (int)(ptr_end - pt), pt,
18472 post);
18473 }
18474 else {
18475 char *p2;
18476
18477 len = ptr_end - ptr;
18478 lim = pt < pend ? pt : pend;
18479 i = (int)(lim - ptr);
18480 buf = ALLOCA_N(char, i+2);
18481 code = ptr;
18482 caret = p2 = buf;
18483 if (ptr <= pb) {
18484 while (ptr < pb) {
18485 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18486 }
18487 *p2++ = '^';
18488 ptr++;
18489 }
18490 if (lim > ptr) {
18491 memset(p2, '~', (lim - ptr));
18492 p2 += (lim - ptr);
18493 }
18494 *p2 = '\0';
18495 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18496 pre, (int)len, code, post,
18497 pre, caret);
18498 }
18499 if (!errbuf) rb_write_error_str(mesg);
18500}
18501#else
18502
18503static int
18504parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18505{
18506 const char *pcur = 0, *ptok = 0;
18507 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18508 p->ruby_sourceline == yylloc->end_pos.lineno) {
18509 pcur = p->lex.pcur;
18510 ptok = p->lex.ptok;
18511 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18512 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18513 }
18514 parser_yyerror0(p, msg);
18515 if (pcur) {
18516 p->lex.ptok = ptok;
18517 p->lex.pcur = pcur;
18518 }
18519 return 0;
18520}
18521
18522static int
18523parser_yyerror0(struct parser_params *p, const char *msg)
18524{
18525 dispatch1(parse_error, STR_NEW2(msg));
18526 ripper_error(p);
18527 return 0;
18528}
18529
18530static inline void
18531parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18532{
18533}
18534#endif /* !RIPPER */
18535
18536static int
18537vtable_size(const struct vtable *tbl)
18538{
18539 if (!DVARS_TERMINAL_P(tbl)) {
18540 return tbl->pos;
18541 }
18542 else {
18543 return 0;
18544 }
18545}
18546
18547static struct vtable *
18548vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18549{
18550 struct vtable *tbl = ALLOC(struct vtable);
18551 tbl->pos = 0;
18552 tbl->capa = 8;
18553 tbl->tbl = ALLOC_N(ID, tbl->capa);
18554 tbl->prev = prev;
18555#ifndef RIPPER
18556 if (p->debug) {
18557 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18558 }
18559#endif
18560 return tbl;
18561}
18562#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18563
18564static void
18565vtable_free_gen(struct parser_params *p, int line, const char *name,
18566 struct vtable *tbl)
18567{
18568#ifndef RIPPER
18569 if (p->debug) {
18570 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18571 }
18572#endif
18573 if (!DVARS_TERMINAL_P(tbl)) {
18574 if (tbl->tbl) {
18575 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18576 }
18577 ruby_sized_xfree(tbl, sizeof(*tbl));
18578 }
18579}
18580#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18581
18582static void
18583vtable_add_gen(struct parser_params *p, int line, const char *name,
18584 struct vtable *tbl, ID id)
18585{
18586#ifndef RIPPER
18587 if (p->debug) {
18588 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18589 line, name, (void *)tbl, rb_id2name(id));
18590 }
18591#endif
18592 if (DVARS_TERMINAL_P(tbl)) {
18593 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18594 return;
18595 }
18596 if (tbl->pos == tbl->capa) {
18597 tbl->capa = tbl->capa * 2;
18598 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18599 }
18600 tbl->tbl[tbl->pos++] = id;
18601}
18602#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18603
18604static void
18605vtable_pop_gen(struct parser_params *p, int line, const char *name,
18606 struct vtable *tbl, int n)
18607{
18608 if (p->debug) {
18609 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18610 line, name, (void *)tbl, n);
18611 }
18612 if (tbl->pos < n) {
18613 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18614 return;
18615 }
18616 tbl->pos -= n;
18617}
18618#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18619
18620static int
18621vtable_included(const struct vtable * tbl, ID id)
18622{
18623 int i;
18624
18625 if (!DVARS_TERMINAL_P(tbl)) {
18626 for (i = 0; i < tbl->pos; i++) {
18627 if (tbl->tbl[i] == id) {
18628 return i+1;
18629 }
18630 }
18631 }
18632 return 0;
18633}
18634
18635static void parser_prepare(struct parser_params *p);
18636
18637static int
18638e_option_supplied(struct parser_params *p)
18639{
18640 return strcmp(p->ruby_sourcefile, "-e") == 0;
18641}
18642
18643#ifndef RIPPER
18644static NODE *parser_append_options(struct parser_params *p, NODE *node);
18645
18646static VALUE
18647yycompile0(VALUE arg)
18648{
18649 int n;
18650 NODE *tree;
18651 struct parser_params *p = (struct parser_params *)arg;
18652 int cov = FALSE;
18653
18654 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18655 cov = TRUE;
18656 }
18657
18658 if (p->debug_lines) {
18659 p->ast->body.script_lines = p->debug_lines;
18660 }
18661
18662 parser_prepare(p);
18663#define RUBY_DTRACE_PARSE_HOOK(name) \
18664 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18665 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18666 }
18667 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18668 n = yyparse(p);
18669 RUBY_DTRACE_PARSE_HOOK(END);
18670
18671 p->debug_lines = 0;
18672
18673 xfree(p->lex.strterm);
18674 p->lex.strterm = 0;
18675 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18676 if (n || p->error_p) {
18677 VALUE mesg = p->error_buffer;
18678 if (!mesg) {
18679 mesg = syntax_error_new();
18680 }
18681 if (!p->error_tolerant) {
18682 rb_set_errinfo(mesg);
18683 return FALSE;
18684 }
18685 }
18686 tree = p->eval_tree;
18687 if (!tree) {
18688 tree = NEW_NIL(&NULL_LOC);
18689 }
18690 else {
18691 rb_parser_ary_t *tokens = p->tokens;
18692 NODE *prelude;
18693 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18694 prelude = block_append(p, p->eval_tree_begin, body);
18695 RNODE_SCOPE(tree)->nd_body = prelude;
18696 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18697 p->ast->body.coverage_enabled = cov;
18698 if (p->keep_tokens) {
18699 p->ast->node_buffer->tokens = tokens;
18700 p->tokens = NULL;
18701 }
18702 }
18703 p->ast->body.root = tree;
18704 p->ast->body.line_count = p->line_count;
18705 return TRUE;
18706}
18707
18708static rb_ast_t *
18709yycompile(struct parser_params *p, VALUE fname, int line)
18710{
18711 rb_ast_t *ast;
18712 if (NIL_P(fname)) {
18713 p->ruby_sourcefile_string = Qnil;
18714 p->ruby_sourcefile = "(none)";
18715 }
18716 else {
18717 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18718 p->ruby_sourcefile = StringValueCStr(fname);
18719 }
18720 p->ruby_sourceline = line - 1;
18721
18722 p->lvtbl = NULL;
18723
18724 p->ast = ast = rb_ast_new();
18725 compile_callback(yycompile0, (VALUE)p);
18726 p->ast = 0;
18727
18728 while (p->lvtbl) {
18729 local_pop(p);
18730 }
18731
18732 return ast;
18733}
18734#endif /* !RIPPER */
18735
18736static rb_encoding *
18737must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18738{
18739 rb_encoding *enc = rb_parser_str_get_encoding(s);
18740 if (!rb_enc_asciicompat(enc)) {
18741 rb_raise(rb_eArgError, "invalid source encoding");
18742 }
18743 return enc;
18744}
18745
18746static rb_parser_string_t *
18747lex_getline(struct parser_params *p)
18748{
18749 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18750 if (!line) return 0;
18751 p->line_count++;
18752 string_buffer_append(p, line);
18753 must_be_ascii_compatible(p, line);
18754 return line;
18755}
18756
18757#ifndef RIPPER
18758rb_ast_t*
18759rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18760{
18761 p->lex.gets = gets;
18762 p->lex.input = input;
18763 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18764
18765 return yycompile(p, fname, line);
18766}
18767#endif /* !RIPPER */
18768
18769#define STR_FUNC_ESCAPE 0x01
18770#define STR_FUNC_EXPAND 0x02
18771#define STR_FUNC_REGEXP 0x04
18772#define STR_FUNC_QWORDS 0x08
18773#define STR_FUNC_SYMBOL 0x10
18774#define STR_FUNC_INDENT 0x20
18775#define STR_FUNC_LABEL 0x40
18776#define STR_FUNC_LIST 0x4000
18777#define STR_FUNC_TERM 0x8000
18778
18779enum string_type {
18780 str_label = STR_FUNC_LABEL,
18781 str_squote = (0),
18782 str_dquote = (STR_FUNC_EXPAND),
18783 str_xquote = (STR_FUNC_EXPAND),
18784 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18785 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18786 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18787 str_ssym = (STR_FUNC_SYMBOL),
18788 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18789};
18790
18791static rb_parser_string_t *
18792parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18793{
18794 rb_parser_string_t *pstr;
18795
18796 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18797
18798 if (!(func & STR_FUNC_REGEXP)) {
18799 if (rb_parser_is_ascii_string(p, pstr)) {
18800 }
18801 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18802 /* everything is valid in ASCII-8BIT */
18803 enc = rb_ascii8bit_encoding();
18804 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18805 }
18806 }
18807
18808 return pstr;
18809}
18810
18811static int
18812strterm_is_heredoc(rb_strterm_t *strterm)
18813{
18814 return strterm->heredoc;
18815}
18816
18817static rb_strterm_t *
18818new_strterm(struct parser_params *p, int func, int term, int paren)
18819{
18820 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18821 strterm->u.literal.func = func;
18822 strterm->u.literal.term = term;
18823 strterm->u.literal.paren = paren;
18824 return strterm;
18825}
18826
18827static rb_strterm_t *
18828new_heredoc(struct parser_params *p)
18829{
18830 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18831 strterm->heredoc = true;
18832 return strterm;
18833}
18834
18835#define peek(p,c) peek_n(p, (c), 0)
18836#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18837#define peekc(p) peekc_n(p, 0)
18838#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18839
18840#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18841static void
18842parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18843{
18844 debug_token_line(p, "add_delayed_token", line);
18845
18846 if (tok < end) {
18847 if (has_delayed_token(p)) {
18848 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18849 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18850 int end_col = (next_line ? 0 : p->delayed.end_col);
18851 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18852 dispatch_delayed_token(p, tSTRING_CONTENT);
18853 }
18854 }
18855 if (!has_delayed_token(p)) {
18856 p->delayed.token = rb_parser_string_new(p, 0, 0);
18857 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18858 p->delayed.beg_line = p->ruby_sourceline;
18859 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18860 }
18861 parser_str_cat(p->delayed.token, tok, end - tok);
18862 p->delayed.end_line = p->ruby_sourceline;
18863 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
18864 p->lex.ptok = end;
18865 }
18866}
18867
18868static void
18869set_lastline(struct parser_params *p, rb_parser_string_t *str)
18870{
18871 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
18872 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
18873 p->lex.lastline = str;
18874}
18875
18876static int
18877nextline(struct parser_params *p, int set_encoding)
18878{
18879 rb_parser_string_t *str = p->lex.nextline;
18880 p->lex.nextline = 0;
18881 if (!str) {
18882 if (p->eofp)
18883 return -1;
18884
18885 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
18886 goto end_of_input;
18887 }
18888
18889 if (!p->lex.input || !(str = lex_getline(p))) {
18890 end_of_input:
18891 p->eofp = 1;
18892 lex_goto_eol(p);
18893 return -1;
18894 }
18895#ifndef RIPPER
18896 if (p->debug_lines) {
18897 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
18898 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
18899 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
18900 }
18901#endif
18902 p->cr_seen = FALSE;
18903 }
18904 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
18905 /* after here-document without terminator */
18906 goto end_of_input;
18907 }
18908 add_delayed_token(p, p->lex.ptok, p->lex.pend);
18909 if (p->heredoc_end > 0) {
18910 p->ruby_sourceline = p->heredoc_end;
18911 p->heredoc_end = 0;
18912 }
18913 p->ruby_sourceline++;
18914 set_lastline(p, str);
18915 token_flush(p);
18916 return 0;
18917}
18918
18919static int
18920parser_cr(struct parser_params *p, int c)
18921{
18922 if (peek(p, '\n')) {
18923 p->lex.pcur++;
18924 c = '\n';
18925 }
18926 return c;
18927}
18928
18929static inline int
18930nextc0(struct parser_params *p, int set_encoding)
18931{
18932 int c;
18933
18934 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
18935 if (nextline(p, set_encoding)) return -1;
18936 }
18937 c = (unsigned char)*p->lex.pcur++;
18938 if (UNLIKELY(c == '\r')) {
18939 c = parser_cr(p, c);
18940 }
18941
18942 return c;
18943}
18944#define nextc(p) nextc0(p, TRUE)
18945
18946static void
18947pushback(struct parser_params *p, int c)
18948{
18949 if (c == -1) return;
18950 p->eofp = 0;
18951 p->lex.pcur--;
18952 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
18953 p->lex.pcur--;
18954 }
18955}
18956
18957#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
18958
18959#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
18960#define tok(p) (p)->tokenbuf
18961#define toklen(p) (p)->tokidx
18962
18963static int
18964looking_at_eol_p(struct parser_params *p)
18965{
18966 const char *ptr = p->lex.pcur;
18967 while (!lex_eol_ptr_p(p, ptr)) {
18968 int c = (unsigned char)*ptr++;
18969 int eol = (c == '\n' || c == '#');
18970 if (eol || !ISSPACE(c)) {
18971 return eol;
18972 }
18973 }
18974 return TRUE;
18975}
18976
18977static char*
18978newtok(struct parser_params *p)
18979{
18980 p->tokidx = 0;
18981 if (!p->tokenbuf) {
18982 p->toksiz = 60;
18983 p->tokenbuf = ALLOC_N(char, 60);
18984 }
18985 if (p->toksiz > 4096) {
18986 p->toksiz = 60;
18987 REALLOC_N(p->tokenbuf, char, 60);
18988 }
18989 return p->tokenbuf;
18990}
18991
18992static char *
18993tokspace(struct parser_params *p, int n)
18994{
18995 p->tokidx += n;
18996
18997 if (p->tokidx >= p->toksiz) {
18998 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
18999 REALLOC_N(p->tokenbuf, char, p->toksiz);
19000 }
19001 return &p->tokenbuf[p->tokidx-n];
19002}
19003
19004static void
19005tokadd(struct parser_params *p, int c)
19006{
19007 p->tokenbuf[p->tokidx++] = (char)c;
19008 if (p->tokidx >= p->toksiz) {
19009 p->toksiz *= 2;
19010 REALLOC_N(p->tokenbuf, char, p->toksiz);
19011 }
19012}
19013
19014static int
19015tok_hex(struct parser_params *p, size_t *numlen)
19016{
19017 int c;
19018
19019 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19020 if (!*numlen) {
19021 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19022 yyerror0("invalid hex escape");
19023 dispatch_scan_event(p, tSTRING_CONTENT);
19024 return 0;
19025 }
19026 p->lex.pcur += *numlen;
19027 return c;
19028}
19029
19030#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19031
19032static int
19033escaped_control_code(int c)
19034{
19035 int c2 = 0;
19036 switch (c) {
19037 case ' ':
19038 c2 = 's';
19039 break;
19040 case '\n':
19041 c2 = 'n';
19042 break;
19043 case '\t':
19044 c2 = 't';
19045 break;
19046 case '\v':
19047 c2 = 'v';
19048 break;
19049 case '\r':
19050 c2 = 'r';
19051 break;
19052 case '\f':
19053 c2 = 'f';
19054 break;
19055 }
19056 return c2;
19057}
19058
19059#define WARN_SPACE_CHAR(c, prefix) \
19060 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19061
19062static int
19063tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19064 int regexp_literal, const char *begin)
19065{
19066 const int wide = !begin;
19067 size_t numlen;
19068 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19069
19070 p->lex.pcur += numlen;
19071 if (p->lex.strterm == NULL ||
19072 strterm_is_heredoc(p->lex.strterm) ||
19073 (p->lex.strterm->u.literal.func != str_regexp)) {
19074 if (!begin) begin = p->lex.pcur;
19075 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19076 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19077 yyerror0("invalid Unicode escape");
19078 dispatch_scan_event(p, tSTRING_CONTENT);
19079 return wide && numlen > 0;
19080 }
19081 if (codepoint > 0x10ffff) {
19082 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19083 yyerror0("invalid Unicode codepoint (too large)");
19084 dispatch_scan_event(p, tSTRING_CONTENT);
19085 return wide;
19086 }
19087 if ((codepoint & 0xfffff800) == 0xd800) {
19088 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19089 yyerror0("invalid Unicode codepoint");
19090 dispatch_scan_event(p, tSTRING_CONTENT);
19091 return wide;
19092 }
19093 }
19094 if (regexp_literal) {
19095 tokcopy(p, (int)numlen);
19096 }
19097 else if (codepoint >= 0x80) {
19098 rb_encoding *utf8 = rb_utf8_encoding();
19099 if (*encp && utf8 != *encp) {
19100 YYLTYPE loc = RUBY_INIT_YYLLOC();
19101 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19102 parser_show_error_line(p, &loc);
19103 return wide;
19104 }
19105 *encp = utf8;
19106 tokaddmbc(p, codepoint, *encp);
19107 }
19108 else {
19109 tokadd(p, codepoint);
19110 }
19111 return TRUE;
19112}
19113
19114static int tokadd_mbchar(struct parser_params *p, int c);
19115
19116static int
19117tokskip_mbchar(struct parser_params *p)
19118{
19119 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19120 if (len > 0) {
19121 p->lex.pcur += len - 1;
19122 }
19123 return len;
19124}
19125
19126/* return value is for ?\u3042 */
19127static void
19128tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19129 int term, int symbol_literal, int regexp_literal)
19130{
19131 /*
19132 * If `term` is not -1, then we allow multiple codepoints in \u{}
19133 * upto `term` byte, otherwise we're parsing a character literal.
19134 * And then add the codepoints to the current token.
19135 */
19136 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19137
19138 const int open_brace = '{', close_brace = '}';
19139
19140 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19141
19142 if (peek(p, open_brace)) { /* handle \u{...} form */
19143 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19144 /*
19145 * Skip parsing validation code and copy bytes as-is until term or
19146 * closing brace, in order to correctly handle extended regexps where
19147 * invalid unicode escapes are allowed in comments. The regexp parser
19148 * does its own validation and will catch any issues.
19149 */
19150 tokadd(p, open_brace);
19151 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19152 int c = peekc(p);
19153 if (c == close_brace) {
19154 tokadd(p, c);
19155 ++p->lex.pcur;
19156 break;
19157 }
19158 else if (c == term) {
19159 break;
19160 }
19161 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19162 tokadd(p, c);
19163 c = *++p->lex.pcur;
19164 }
19165 tokadd_mbchar(p, c);
19166 }
19167 }
19168 else {
19169 const char *second = NULL;
19170 int c, last = nextc(p);
19171 if (lex_eol_p(p)) goto unterminated;
19172 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19173 while (c != close_brace) {
19174 if (c == term) goto unterminated;
19175 if (second == multiple_codepoints)
19176 second = p->lex.pcur;
19177 if (regexp_literal) tokadd(p, last);
19178 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19179 break;
19180 }
19181 while (ISSPACE(c = peekc(p))) {
19182 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19183 last = c;
19184 }
19185 if (term == -1 && !second)
19186 second = multiple_codepoints;
19187 }
19188
19189 if (c != close_brace) {
19190 unterminated:
19191 flush_string_content(p, rb_utf8_encoding(), 0);
19192 yyerror0("unterminated Unicode escape");
19193 dispatch_scan_event(p, tSTRING_CONTENT);
19194 return;
19195 }
19196 if (second && second != multiple_codepoints) {
19197 const char *pcur = p->lex.pcur;
19198 p->lex.pcur = second;
19199 dispatch_scan_event(p, tSTRING_CONTENT);
19200 token_flush(p);
19201 p->lex.pcur = pcur;
19202 yyerror0(multiple_codepoints);
19203 token_flush(p);
19204 }
19205
19206 if (regexp_literal) tokadd(p, close_brace);
19207 nextc(p);
19208 }
19209 }
19210 else { /* handle \uxxxx form */
19211 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19212 token_flush(p);
19213 return;
19214 }
19215 }
19216}
19217
19218#define ESCAPE_CONTROL 1
19219#define ESCAPE_META 2
19220
19221static int
19222read_escape(struct parser_params *p, int flags, const char *begin)
19223{
19224 int c;
19225 size_t numlen;
19226
19227 switch (c = nextc(p)) {
19228 case '\\': /* Backslash */
19229 return c;
19230
19231 case 'n': /* newline */
19232 return '\n';
19233
19234 case 't': /* horizontal tab */
19235 return '\t';
19236
19237 case 'r': /* carriage-return */
19238 return '\r';
19239
19240 case 'f': /* form-feed */
19241 return '\f';
19242
19243 case 'v': /* vertical tab */
19244 return '\13';
19245
19246 case 'a': /* alarm(bell) */
19247 return '\007';
19248
19249 case 'e': /* escape */
19250 return 033;
19251
19252 case '0': case '1': case '2': case '3': /* octal constant */
19253 case '4': case '5': case '6': case '7':
19254 pushback(p, c);
19255 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19256 p->lex.pcur += numlen;
19257 return c;
19258
19259 case 'x': /* hex constant */
19260 c = tok_hex(p, &numlen);
19261 if (numlen == 0) return 0;
19262 return c;
19263
19264 case 'b': /* backspace */
19265 return '\010';
19266
19267 case 's': /* space */
19268 return ' ';
19269
19270 case 'M':
19271 if (flags & ESCAPE_META) goto eof;
19272 if ((c = nextc(p)) != '-') {
19273 goto eof;
19274 }
19275 if ((c = nextc(p)) == '\\') {
19276 switch (peekc(p)) {
19277 case 'u': case 'U':
19278 nextc(p);
19279 goto eof;
19280 }
19281 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19282 }
19283 else if (c == -1) goto eof;
19284 else if (!ISASCII(c)) {
19285 tokskip_mbchar(p);
19286 goto eof;
19287 }
19288 else {
19289 int c2 = escaped_control_code(c);
19290 if (c2) {
19291 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19292 WARN_SPACE_CHAR(c2, "\\M-");
19293 }
19294 else {
19295 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19296 }
19297 }
19298 else if (ISCNTRL(c)) goto eof;
19299 return ((c & 0xff) | 0x80);
19300 }
19301
19302 case 'C':
19303 if ((c = nextc(p)) != '-') {
19304 goto eof;
19305 }
19306 case 'c':
19307 if (flags & ESCAPE_CONTROL) goto eof;
19308 if ((c = nextc(p))== '\\') {
19309 switch (peekc(p)) {
19310 case 'u': case 'U':
19311 nextc(p);
19312 goto eof;
19313 }
19314 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19315 }
19316 else if (c == '?')
19317 return 0177;
19318 else if (c == -1) goto eof;
19319 else if (!ISASCII(c)) {
19320 tokskip_mbchar(p);
19321 goto eof;
19322 }
19323 else {
19324 int c2 = escaped_control_code(c);
19325 if (c2) {
19326 if (ISCNTRL(c)) {
19327 if (flags & ESCAPE_META) {
19328 WARN_SPACE_CHAR(c2, "\\M-");
19329 }
19330 else {
19331 WARN_SPACE_CHAR(c2, "");
19332 }
19333 }
19334 else {
19335 if (flags & ESCAPE_META) {
19336 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19337 }
19338 else {
19339 WARN_SPACE_CHAR(c2, "\\C-");
19340 }
19341 }
19342 }
19343 else if (ISCNTRL(c)) goto eof;
19344 }
19345 return c & 0x9f;
19346
19347 eof:
19348 case -1:
19349 flush_string_content(p, p->enc, p->lex.pcur - begin);
19350 yyerror0("Invalid escape character syntax");
19351 dispatch_scan_event(p, tSTRING_CONTENT);
19352 return '\0';
19353
19354 default:
19355 if (!ISASCII(c)) {
19356 tokskip_mbchar(p);
19357 goto eof;
19358 }
19359 return c;
19360 }
19361}
19362
19363static void
19364tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19365{
19366 int len = rb_enc_codelen(c, enc);
19367 rb_enc_mbcput(c, tokspace(p, len), enc);
19368}
19369
19370static int
19371tokadd_escape(struct parser_params *p)
19372{
19373 int c;
19374 size_t numlen;
19375 const char *begin = p->lex.pcur;
19376
19377 switch (c = nextc(p)) {
19378 case '\n':
19379 return 0; /* just ignore */
19380
19381 case '0': case '1': case '2': case '3': /* octal constant */
19382 case '4': case '5': case '6': case '7':
19383 {
19384 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19385 if (numlen == 0) goto eof;
19386 p->lex.pcur += numlen;
19387 tokcopy(p, (int)numlen + 1);
19388 }
19389 return 0;
19390
19391 case 'x': /* hex constant */
19392 {
19393 tok_hex(p, &numlen);
19394 if (numlen == 0) return -1;
19395 tokcopy(p, (int)numlen + 2);
19396 }
19397 return 0;
19398
19399 eof:
19400 case -1:
19401 flush_string_content(p, p->enc, p->lex.pcur - begin);
19402 yyerror0("Invalid escape character syntax");
19403 token_flush(p);
19404 return -1;
19405
19406 default:
19407 tokadd(p, '\\');
19408 tokadd(p, c);
19409 }
19410 return 0;
19411}
19412
19413static int
19414char_to_option(int c)
19415{
19416 int val;
19417
19418 switch (c) {
19419 case 'i':
19420 val = RE_ONIG_OPTION_IGNORECASE;
19421 break;
19422 case 'x':
19423 val = RE_ONIG_OPTION_EXTEND;
19424 break;
19425 case 'm':
19426 val = RE_ONIG_OPTION_MULTILINE;
19427 break;
19428 default:
19429 val = 0;
19430 break;
19431 }
19432 return val;
19433}
19434
19435#define ARG_ENCODING_FIXED 16
19436#define ARG_ENCODING_NONE 32
19437#define ENC_ASCII8BIT 1
19438#define ENC_EUC_JP 2
19439#define ENC_Windows_31J 3
19440#define ENC_UTF8 4
19441
19442static int
19443char_to_option_kcode(int c, int *option, int *kcode)
19444{
19445 *option = 0;
19446
19447 switch (c) {
19448 case 'n':
19449 *kcode = ENC_ASCII8BIT;
19450 return (*option = ARG_ENCODING_NONE);
19451 case 'e':
19452 *kcode = ENC_EUC_JP;
19453 break;
19454 case 's':
19455 *kcode = ENC_Windows_31J;
19456 break;
19457 case 'u':
19458 *kcode = ENC_UTF8;
19459 break;
19460 default:
19461 *kcode = -1;
19462 return (*option = char_to_option(c));
19463 }
19464 *option = ARG_ENCODING_FIXED;
19465 return 1;
19466}
19467
19468static int
19469regx_options(struct parser_params *p)
19470{
19471 int kcode = 0;
19472 int kopt = 0;
19473 int options = 0;
19474 int c, opt, kc;
19475
19476 newtok(p);
19477 while (c = nextc(p), ISALPHA(c)) {
19478 if (c == 'o') {
19479 options |= RE_OPTION_ONCE;
19480 }
19481 else if (char_to_option_kcode(c, &opt, &kc)) {
19482 if (kc >= 0) {
19483 if (kc != ENC_ASCII8BIT) kcode = c;
19484 kopt = opt;
19485 }
19486 else {
19487 options |= opt;
19488 }
19489 }
19490 else {
19491 tokadd(p, c);
19492 }
19493 }
19494 options |= kopt;
19495 pushback(p, c);
19496 if (toklen(p)) {
19497 YYLTYPE loc = RUBY_INIT_YYLLOC();
19498 tokfix(p);
19499 compile_error(p, "unknown regexp option%s - %*s",
19500 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19501 parser_show_error_line(p, &loc);
19502 }
19503 return options | RE_OPTION_ENCODING(kcode);
19504}
19505
19506static int
19507tokadd_mbchar(struct parser_params *p, int c)
19508{
19509 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19510 if (len < 0) return -1;
19511 tokadd(p, c);
19512 p->lex.pcur += --len;
19513 if (len > 0) tokcopy(p, len);
19514 return c;
19515}
19516
19517static inline int
19518simple_re_meta(int c)
19519{
19520 switch (c) {
19521 case '$': case '*': case '+': case '.':
19522 case '?': case '^': case '|':
19523 case ')': case ']': case '}': case '>':
19524 return TRUE;
19525 default:
19526 return FALSE;
19527 }
19528}
19529
19530static int
19531parser_update_heredoc_indent(struct parser_params *p, int c)
19532{
19533 if (p->heredoc_line_indent == -1) {
19534 if (c == '\n') p->heredoc_line_indent = 0;
19535 }
19536 else {
19537 if (c == ' ') {
19538 p->heredoc_line_indent++;
19539 return TRUE;
19540 }
19541 else if (c == '\t') {
19542 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19543 p->heredoc_line_indent = w * TAB_WIDTH;
19544 return TRUE;
19545 }
19546 else if (c != '\n') {
19547 if (p->heredoc_indent > p->heredoc_line_indent) {
19548 p->heredoc_indent = p->heredoc_line_indent;
19549 }
19550 p->heredoc_line_indent = -1;
19551 }
19552 else {
19553 /* Whitespace only line has no indentation */
19554 p->heredoc_line_indent = 0;
19555 }
19556 }
19557 return FALSE;
19558}
19559
19560static void
19561parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19562{
19563 YYLTYPE loc = RUBY_INIT_YYLLOC();
19564 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19565 compile_error(p, "%s mixed within %s source", n1, n2);
19566 parser_show_error_line(p, &loc);
19567}
19568
19569static void
19570parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19571{
19572 const char *pos = p->lex.pcur;
19573 p->lex.pcur = beg;
19574 parser_mixed_error(p, enc1, enc2);
19575 p->lex.pcur = pos;
19576}
19577
19578static inline char
19579nibble_char_upper(unsigned int c)
19580{
19581 c &= 0xf;
19582 return c + (c < 10 ? '0' : 'A' - 10);
19583}
19584
19585static int
19586tokadd_string(struct parser_params *p,
19587 int func, int term, int paren, long *nest,
19588 rb_encoding **encp, rb_encoding **enc)
19589{
19590 int c;
19591 bool erred = false;
19592#ifdef RIPPER
19593 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19594 int top_of_line = FALSE;
19595#endif
19596
19597#define mixed_error(enc1, enc2) \
19598 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19599#define mixed_escape(beg, enc1, enc2) \
19600 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19601
19602 while ((c = nextc(p)) != -1) {
19603 if (p->heredoc_indent > 0) {
19604 parser_update_heredoc_indent(p, c);
19605 }
19606#ifdef RIPPER
19607 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19608 pushback(p, c);
19609 break;
19610 }
19611#endif
19612
19613 if (paren && c == paren) {
19614 ++*nest;
19615 }
19616 else if (c == term) {
19617 if (!nest || !*nest) {
19618 pushback(p, c);
19619 break;
19620 }
19621 --*nest;
19622 }
19623 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19624 unsigned char c2 = *p->lex.pcur;
19625 if (c2 == '$' || c2 == '@' || c2 == '{') {
19626 pushback(p, c);
19627 break;
19628 }
19629 }
19630 else if (c == '\\') {
19631 c = nextc(p);
19632 switch (c) {
19633 case '\n':
19634 if (func & STR_FUNC_QWORDS) break;
19635 if (func & STR_FUNC_EXPAND) {
19636 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19637 continue;
19638 if (c == term) {
19639 c = '\\';
19640 goto terminate;
19641 }
19642 }
19643 tokadd(p, '\\');
19644 break;
19645
19646 case '\\':
19647 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19648 break;
19649
19650 case 'u':
19651 if ((func & STR_FUNC_EXPAND) == 0) {
19652 tokadd(p, '\\');
19653 break;
19654 }
19655 tokadd_utf8(p, enc, term,
19656 func & STR_FUNC_SYMBOL,
19657 func & STR_FUNC_REGEXP);
19658 continue;
19659
19660 default:
19661 if (c == -1) return -1;
19662 if (!ISASCII(c)) {
19663 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19664 goto non_ascii;
19665 }
19666 if (func & STR_FUNC_REGEXP) {
19667 switch (c) {
19668 case 'c':
19669 case 'C':
19670 case 'M': {
19671 pushback(p, c);
19672 c = read_escape(p, 0, p->lex.pcur - 1);
19673
19674 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19675 *t++ = '\\';
19676 *t++ = 'x';
19677 *t++ = nibble_char_upper(c >> 4);
19678 *t++ = nibble_char_upper(c);
19679 continue;
19680 }
19681 }
19682
19683 if (c == term && !simple_re_meta(c)) {
19684 tokadd(p, c);
19685 continue;
19686 }
19687 pushback(p, c);
19688 if ((c = tokadd_escape(p)) < 0)
19689 return -1;
19690 if (*enc && *enc != *encp) {
19691 mixed_escape(p->lex.ptok+2, *enc, *encp);
19692 }
19693 continue;
19694 }
19695 else if (func & STR_FUNC_EXPAND) {
19696 pushback(p, c);
19697 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19698 c = read_escape(p, 0, p->lex.pcur - 1);
19699 }
19700 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19701 /* ignore backslashed spaces in %w */
19702 }
19703 else if (c != term && !(paren && c == paren)) {
19704 tokadd(p, '\\');
19705 pushback(p, c);
19706 continue;
19707 }
19708 }
19709 }
19710 else if (!parser_isascii(p)) {
19711 non_ascii:
19712 if (!*enc) {
19713 *enc = *encp;
19714 }
19715 else if (*enc != *encp) {
19716 mixed_error(*enc, *encp);
19717 continue;
19718 }
19719 if (tokadd_mbchar(p, c) == -1) return -1;
19720 continue;
19721 }
19722 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19723 pushback(p, c);
19724 break;
19725 }
19726 if (c & 0x80) {
19727 if (!*enc) {
19728 *enc = *encp;
19729 }
19730 else if (*enc != *encp) {
19731 mixed_error(*enc, *encp);
19732 continue;
19733 }
19734 }
19735 tokadd(p, c);
19736#ifdef RIPPER
19737 top_of_line = (c == '\n');
19738#endif
19739 }
19740 terminate:
19741 if (*enc) *encp = *enc;
19742 return c;
19743}
19744
19745#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19746
19747static void
19748flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19749{
19750 p->lex.pcur -= back;
19751 if (has_delayed_token(p)) {
19752 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19753 if (len > 0) {
19754 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19755 p->delayed.end_line = p->ruby_sourceline;
19756 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19757 }
19758 dispatch_delayed_token(p, tSTRING_CONTENT);
19759 p->lex.ptok = p->lex.pcur;
19760 }
19761 dispatch_scan_event(p, tSTRING_CONTENT);
19762 p->lex.pcur += back;
19763}
19764
19765/* this can be shared with ripper, since it's independent from struct
19766 * parser_params. */
19767#ifndef RIPPER
19768#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19769#define SPECIAL_PUNCT(idx) ( \
19770 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19771 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19772 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19773 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19774 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19775 BIT('0', idx))
19776const uint_least32_t ruby_global_name_punct_bits[] = {
19777 SPECIAL_PUNCT(0),
19778 SPECIAL_PUNCT(1),
19779 SPECIAL_PUNCT(2),
19780};
19781#undef BIT
19782#undef SPECIAL_PUNCT
19783#endif
19784
19785static enum yytokentype
19786parser_peek_variable_name(struct parser_params *p)
19787{
19788 int c;
19789 const char *ptr = p->lex.pcur;
19790
19791 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19792 c = *ptr++;
19793 switch (c) {
19794 case '$':
19795 if ((c = *ptr) == '-') {
19796 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19797 c = *ptr;
19798 }
19799 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19800 return tSTRING_DVAR;
19801 }
19802 break;
19803 case '@':
19804 if ((c = *ptr) == '@') {
19805 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19806 c = *ptr;
19807 }
19808 break;
19809 case '{':
19810 p->lex.pcur = ptr;
19811 p->command_start = TRUE;
19812 yylval.state = p->lex.state;
19813 return tSTRING_DBEG;
19814 default:
19815 return 0;
19816 }
19817 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19818 return tSTRING_DVAR;
19819 return 0;
19820}
19821
19822#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19823#define IS_END() IS_lex_state(EXPR_END_ANY)
19824#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19825#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19826#define IS_LABEL_POSSIBLE() (\
19827 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19828 IS_ARG())
19829#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19830#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19831
19832static inline enum yytokentype
19833parser_string_term(struct parser_params *p, int func)
19834{
19835 xfree(p->lex.strterm);
19836 p->lex.strterm = 0;
19837 if (func & STR_FUNC_REGEXP) {
19838 set_yylval_num(regx_options(p));
19839 dispatch_scan_event(p, tREGEXP_END);
19840 SET_LEX_STATE(EXPR_END);
19841 return tREGEXP_END;
19842 }
19843 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19844 nextc(p);
19845 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19846 return tLABEL_END;
19847 }
19848 SET_LEX_STATE(EXPR_END);
19849 return tSTRING_END;
19850}
19851
19852static enum yytokentype
19853parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19854{
19855 int func = quote->func;
19856 int term = quote->term;
19857 int paren = quote->paren;
19858 int c, space = 0;
19859 rb_encoding *enc = p->enc;
19860 rb_encoding *base_enc = 0;
19861 rb_parser_string_t *lit;
19862
19863 if (func & STR_FUNC_TERM) {
19864 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
19865 SET_LEX_STATE(EXPR_END);
19866 xfree(p->lex.strterm);
19867 p->lex.strterm = 0;
19868 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
19869 }
19870 c = nextc(p);
19871 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19872 while (c != '\n' && ISSPACE(c = nextc(p)));
19873 space = 1;
19874 }
19875 if (func & STR_FUNC_LIST) {
19876 quote->func &= ~STR_FUNC_LIST;
19877 space = 1;
19878 }
19879 if (c == term && !quote->nest) {
19880 if (func & STR_FUNC_QWORDS) {
19881 quote->func |= STR_FUNC_TERM;
19882 pushback(p, c); /* dispatch the term at tSTRING_END */
19883 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19884 return ' ';
19885 }
19886 return parser_string_term(p, func);
19887 }
19888 if (space) {
19889 if (!ISSPACE(c)) pushback(p, c);
19890 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19891 return ' ';
19892 }
19893 newtok(p);
19894 if ((func & STR_FUNC_EXPAND) && c == '#') {
19895 enum yytokentype t = parser_peek_variable_name(p);
19896 if (t) return t;
19897 tokadd(p, '#');
19898 c = nextc(p);
19899 }
19900 pushback(p, c);
19901 if (tokadd_string(p, func, term, paren, &quote->nest,
19902 &enc, &base_enc) == -1) {
19903 if (p->eofp) {
19904#ifndef RIPPER
19905# define unterminated_literal(mesg) yyerror0(mesg)
19906#else
19907# define unterminated_literal(mesg) compile_error(p, mesg)
19908#endif
19909 literal_flush(p, p->lex.pcur);
19910 if (func & STR_FUNC_QWORDS) {
19911 /* no content to add, bailing out here */
19912 unterminated_literal("unterminated list meets end of file");
19913 xfree(p->lex.strterm);
19914 p->lex.strterm = 0;
19915 return tSTRING_END;
19916 }
19917 if (func & STR_FUNC_REGEXP) {
19918 unterminated_literal("unterminated regexp meets end of file");
19919 }
19920 else {
19921 unterminated_literal("unterminated string meets end of file");
19922 }
19923 quote->func |= STR_FUNC_TERM;
19924 }
19925 }
19926
19927 tokfix(p);
19928 lit = STR_NEW3(tok(p), toklen(p), enc, func);
19929 set_yylval_str(lit);
19930 flush_string_content(p, enc, 0);
19931
19932 return tSTRING_CONTENT;
19933}
19934
19935static enum yytokentype
19936heredoc_identifier(struct parser_params *p)
19937{
19938 /*
19939 * term_len is length of `<<"END"` except `END`,
19940 * in this case term_len is 4 (<, <, " and ").
19941 */
19942 long len, offset = p->lex.pcur - p->lex.pbeg;
19943 int c = nextc(p), term, func = 0, quote = 0;
19944 enum yytokentype token = tSTRING_BEG;
19945 int indent = 0;
19946
19947 if (c == '-') {
19948 c = nextc(p);
19949 func = STR_FUNC_INDENT;
19950 offset++;
19951 }
19952 else if (c == '~') {
19953 c = nextc(p);
19954 func = STR_FUNC_INDENT;
19955 offset++;
19956 indent = INT_MAX;
19957 }
19958 switch (c) {
19959 case '\'':
19960 func |= str_squote; goto quoted;
19961 case '"':
19962 func |= str_dquote; goto quoted;
19963 case '`':
19964 token = tXSTRING_BEG;
19965 func |= str_xquote; goto quoted;
19966
19967 quoted:
19968 quote++;
19969 offset++;
19970 term = c;
19971 len = 0;
19972 while ((c = nextc(p)) != term) {
19973 if (c == -1 || c == '\r' || c == '\n') {
19974 yyerror0("unterminated here document identifier");
19975 return -1;
19976 }
19977 }
19978 break;
19979
19980 default:
19981 if (!parser_is_identchar(p)) {
19982 pushback(p, c);
19983 if (func & STR_FUNC_INDENT) {
19984 pushback(p, indent > 0 ? '~' : '-');
19985 }
19986 return 0;
19987 }
19988 func |= str_dquote;
19989 do {
19990 int n = parser_precise_mbclen(p, p->lex.pcur-1);
19991 if (n < 0) return 0;
19992 p->lex.pcur += --n;
19993 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
19994 pushback(p, c);
19995 break;
19996 }
19997
19998 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
19999 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20000 yyerror0("too long here document identifier");
20001 dispatch_scan_event(p, tHEREDOC_BEG);
20002 lex_goto_eol(p);
20003
20004 p->lex.strterm = new_heredoc(p);
20005 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20006 here->offset = offset;
20007 here->sourceline = p->ruby_sourceline;
20008 here->length = (unsigned)len;
20009 here->quote = quote;
20010 here->func = func;
20011 here->lastline = p->lex.lastline;
20012
20013 token_flush(p);
20014 p->heredoc_indent = indent;
20015 p->heredoc_line_indent = 0;
20016 return token;
20017}
20018
20019static void
20020heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20021{
20022 rb_parser_string_t *line;
20023 rb_strterm_t *term = p->lex.strterm;
20024
20025 p->lex.strterm = 0;
20026 line = here->lastline;
20027 p->lex.lastline = line;
20028 p->lex.pbeg = PARSER_STRING_PTR(line);
20029 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20030 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20031 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20032 p->heredoc_end = p->ruby_sourceline;
20033 p->ruby_sourceline = (int)here->sourceline;
20034 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20035 p->eofp = 0;
20036 xfree(term);
20037}
20038
20039static int
20040dedent_string_column(const char *str, long len, int width)
20041{
20042 int i, col = 0;
20043
20044 for (i = 0; i < len && col < width; i++) {
20045 if (str[i] == ' ') {
20046 col++;
20047 }
20048 else if (str[i] == '\t') {
20049 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20050 if (n > width) break;
20051 col = n;
20052 }
20053 else {
20054 break;
20055 }
20056 }
20057
20058 return i;
20059}
20060
20061static int
20062dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20063{
20064 char *str;
20065 long len;
20066 int i;
20067
20068 len = PARSER_STRING_LEN(string);
20069 str = PARSER_STRING_PTR(string);
20070
20071 i = dedent_string_column(str, len, width);
20072 if (!i) return 0;
20073
20074 rb_parser_str_modify(string);
20075 str = PARSER_STRING_PTR(string);
20076 if (PARSER_STRING_LEN(string) != len)
20077 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20078 MEMMOVE(str, str + i, char, len - i);
20079 rb_parser_str_set_len(p, string, len - i);
20080 return i;
20081}
20082
20083static NODE *
20084heredoc_dedent(struct parser_params *p, NODE *root)
20085{
20086 NODE *node, *str_node, *prev_node;
20087 int indent = p->heredoc_indent;
20088 rb_parser_string_t *prev_lit = 0;
20089
20090 if (indent <= 0) return root;
20091 if (!root) return root;
20092
20093 prev_node = node = str_node = root;
20094 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20095
20096 while (str_node) {
20097 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20098 if (nd_fl_newline(str_node)) {
20099 dedent_string(p, lit, indent);
20100 }
20101 if (!prev_lit) {
20102 prev_lit = lit;
20103 }
20104 else if (!literal_concat0(p, prev_lit, lit)) {
20105 return 0;
20106 }
20107 else {
20108 NODE *end = RNODE_LIST(node)->as.nd_end;
20109 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20110 if (!node) {
20111 if (nd_type_p(prev_node, NODE_DSTR))
20112 nd_set_type(prev_node, NODE_STR);
20113 break;
20114 }
20115 RNODE_LIST(node)->as.nd_end = end;
20116 goto next_str;
20117 }
20118
20119 str_node = 0;
20120 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20121 next_str:
20122 if (!nd_type_p(node, NODE_LIST)) break;
20123 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20124 enum node_type type = nd_type(str_node);
20125 if (type == NODE_STR || type == NODE_DSTR) break;
20126 prev_lit = 0;
20127 str_node = 0;
20128 }
20129 }
20130 }
20131 return root;
20132}
20133
20134static int
20135whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20136{
20137 const char *beg = p->lex.pbeg;
20138 const char *ptr = p->lex.pend;
20139
20140 if (ptr - beg < len) return FALSE;
20141 if (ptr > beg && ptr[-1] == '\n') {
20142 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20143 if (ptr - beg < len) return FALSE;
20144 }
20145 if (strncmp(eos, ptr -= len, len)) return FALSE;
20146 if (indent) {
20147 while (beg < ptr && ISSPACE(*beg)) beg++;
20148 }
20149 return beg == ptr;
20150}
20151
20152static int
20153word_match_p(struct parser_params *p, const char *word, long len)
20154{
20155 if (strncmp(p->lex.pcur, word, len)) return 0;
20156 if (lex_eol_n_p(p, len)) return 1;
20157 int c = (unsigned char)p->lex.pcur[len];
20158 if (ISSPACE(c)) return 1;
20159 switch (c) {
20160 case '\0': case '\004': case '\032': return 1;
20161 }
20162 return 0;
20163}
20164
20165#define NUM_SUFFIX_R (1<<0)
20166#define NUM_SUFFIX_I (1<<1)
20167#define NUM_SUFFIX_ALL 3
20168
20169static int
20170number_literal_suffix(struct parser_params *p, int mask)
20171{
20172 int c, result = 0;
20173 const char *lastp = p->lex.pcur;
20174
20175 while ((c = nextc(p)) != -1) {
20176 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20177 result |= (mask & NUM_SUFFIX_I);
20178 mask &= ~NUM_SUFFIX_I;
20179 /* r after i, rational of complex is disallowed */
20180 mask &= ~NUM_SUFFIX_R;
20181 continue;
20182 }
20183 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20184 result |= (mask & NUM_SUFFIX_R);
20185 mask &= ~NUM_SUFFIX_R;
20186 continue;
20187 }
20188 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20189 p->lex.pcur = lastp;
20190 literal_flush(p, p->lex.pcur);
20191 return 0;
20192 }
20193 pushback(p, c);
20194 break;
20195 }
20196 return result;
20197}
20198
20199static enum yytokentype
20200set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20201{
20202 enum rb_numeric_type numeric_type = integer_literal;
20203
20204 if (type == tFLOAT) {
20205 numeric_type = float_literal;
20206 }
20207
20208 if (suffix & NUM_SUFFIX_R) {
20209 type = tRATIONAL;
20210 numeric_type = rational_literal;
20211 }
20212 if (suffix & NUM_SUFFIX_I) {
20213 type = tIMAGINARY;
20214 }
20215
20216 switch (type) {
20217 case tINTEGER:
20218 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20219 break;
20220 case tFLOAT:
20221 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20222 break;
20223 case tRATIONAL:
20224 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20225 break;
20226 case tIMAGINARY:
20227 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20228 (void)numeric_type; /* for ripper */
20229 break;
20230 default:
20231 rb_bug("unexpected token: %d", type);
20232 }
20233 SET_LEX_STATE(EXPR_END);
20234 return type;
20235}
20236
20237#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20238static void
20239parser_dispatch_heredoc_end(struct parser_params *p, int line)
20240{
20241 if (has_delayed_token(p))
20242 dispatch_delayed_token(p, tSTRING_CONTENT);
20243
20244#ifdef RIPPER
20245 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20246 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20247#else
20248 if (p->keep_tokens) {
20249 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20250 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20251 parser_append_tokens(p, str, tHEREDOC_END, line);
20252 }
20253#endif
20254
20255 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20256 lex_goto_eol(p);
20257 token_flush(p);
20258}
20259
20260static enum yytokentype
20261here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20262{
20263 int c, func, indent = 0;
20264 const char *eos, *ptr, *ptr_end;
20265 long len;
20266 rb_parser_string_t *str = 0;
20267 rb_encoding *enc = p->enc;
20268 rb_encoding *base_enc = 0;
20269 int bol;
20270#ifdef RIPPER
20271 VALUE s_value;
20272#endif
20273
20274 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20275 len = here->length;
20276 indent = (func = here->func) & STR_FUNC_INDENT;
20277
20278 if ((c = nextc(p)) == -1) {
20279 error:
20280#ifdef RIPPER
20281 if (!has_delayed_token(p)) {
20282 dispatch_scan_event(p, tSTRING_CONTENT);
20283 }
20284 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20285 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20286 if (!(func & STR_FUNC_REGEXP)) {
20287 int cr = ENC_CODERANGE_UNKNOWN;
20288 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20289 if (cr != ENC_CODERANGE_7BIT &&
20290 rb_is_usascii_enc(p->enc) &&
20291 enc != rb_utf8_encoding()) {
20292 enc = rb_ascii8bit_encoding();
20293 }
20294 }
20295 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20296 }
20297 dispatch_delayed_token(p, tSTRING_CONTENT);
20298 }
20299 else {
20300 dispatch_delayed_token(p, tSTRING_CONTENT);
20301 dispatch_scan_event(p, tSTRING_CONTENT);
20302 }
20303 lex_goto_eol(p);
20304#endif
20305 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20306 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20307 (int)len, eos);
20308 token_flush(p);
20309 SET_LEX_STATE(EXPR_END);
20310 return tSTRING_END;
20311 }
20312 bol = was_bol(p);
20313 if (!bol) {
20314 /* not beginning of line, cannot be the terminator */
20315 }
20316 else if (p->heredoc_line_indent == -1) {
20317 /* `heredoc_line_indent == -1` means
20318 * - "after an interpolation in the same line", or
20319 * - "in a continuing line"
20320 */
20321 p->heredoc_line_indent = 0;
20322 }
20323 else if (whole_match_p(p, eos, len, indent)) {
20324 dispatch_heredoc_end(p);
20325 restore:
20326 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20327 token_flush(p);
20328 SET_LEX_STATE(EXPR_END);
20329 return tSTRING_END;
20330 }
20331
20332 if (!(func & STR_FUNC_EXPAND)) {
20333 do {
20334 ptr = PARSER_STRING_PTR(p->lex.lastline);
20335 ptr_end = p->lex.pend;
20336 if (ptr_end > ptr) {
20337 switch (ptr_end[-1]) {
20338 case '\n':
20339 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20340 ptr_end++;
20341 break;
20342 }
20343 case '\r':
20344 --ptr_end;
20345 }
20346 }
20347
20348 if (p->heredoc_indent > 0) {
20349 long i = 0;
20350 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20351 i++;
20352 p->heredoc_line_indent = 0;
20353 }
20354
20355 if (str)
20356 parser_str_cat(str, ptr, ptr_end - ptr);
20357 else
20358 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20359 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20360 lex_goto_eol(p);
20361 if (p->heredoc_indent > 0) {
20362 goto flush_str;
20363 }
20364 if (nextc(p) == -1) {
20365 if (str) {
20366 rb_parser_string_free(p, str);
20367 str = 0;
20368 }
20369 goto error;
20370 }
20371 } while (!whole_match_p(p, eos, len, indent));
20372 }
20373 else {
20374 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20375 newtok(p);
20376 if (c == '#') {
20377 enum yytokentype t = parser_peek_variable_name(p);
20378 if (p->heredoc_line_indent != -1) {
20379 if (p->heredoc_indent > p->heredoc_line_indent) {
20380 p->heredoc_indent = p->heredoc_line_indent;
20381 }
20382 p->heredoc_line_indent = -1;
20383 }
20384 if (t) return t;
20385 tokadd(p, '#');
20386 c = nextc(p);
20387 }
20388 do {
20389 pushback(p, c);
20390 enc = p->enc;
20391 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20392 if (p->eofp) goto error;
20393 goto restore;
20394 }
20395 if (c != '\n') {
20396 if (c == '\\') p->heredoc_line_indent = -1;
20397 flush:
20398 str = STR_NEW3(tok(p), toklen(p), enc, func);
20399 flush_str:
20400 set_yylval_str(str);
20401#ifndef RIPPER
20402 if (bol) nd_set_fl_newline(yylval.node);
20403#endif
20404 flush_string_content(p, enc, 0);
20405 return tSTRING_CONTENT;
20406 }
20407 tokadd(p, nextc(p));
20408 if (p->heredoc_indent > 0) {
20409 lex_goto_eol(p);
20410 goto flush;
20411 }
20412 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20413 if ((c = nextc(p)) == -1) goto error;
20414 } while (!whole_match_p(p, eos, len, indent));
20415 str = STR_NEW3(tok(p), toklen(p), enc, func);
20416 }
20417 dispatch_heredoc_end(p);
20418 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20419 token_flush(p);
20420 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20421#ifdef RIPPER
20422 /* Preserve s_value for set_yylval_str */
20423 s_value = p->s_value;
20424#endif
20425 set_yylval_str(str);
20426#ifdef RIPPER
20427 set_parser_s_value(s_value);
20428#endif
20429
20430#ifndef RIPPER
20431 if (bol) nd_set_fl_newline(yylval.node);
20432#endif
20433 return tSTRING_CONTENT;
20434}
20435
20436#include "lex.c"
20437
20438static int
20439arg_ambiguous(struct parser_params *p, char c)
20440{
20441#ifndef RIPPER
20442 if (c == '/') {
20443 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20444 }
20445 else {
20446 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20447 }
20448#else
20449 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20450#endif
20451 return TRUE;
20452}
20453
20454/* returns true value if formal argument error;
20455 * Qtrue, or error message if ripper */
20456static VALUE
20457formal_argument_error(struct parser_params *p, ID id)
20458{
20459 switch (id_type(id)) {
20460 case ID_LOCAL:
20461 break;
20462#ifndef RIPPER
20463# define ERR(mesg) (yyerror0(mesg), Qtrue)
20464#else
20465# define ERR(mesg) WARN_S(mesg)
20466#endif
20467 case ID_CONST:
20468 return ERR("formal argument cannot be a constant");
20469 case ID_INSTANCE:
20470 return ERR("formal argument cannot be an instance variable");
20471 case ID_GLOBAL:
20472 return ERR("formal argument cannot be a global variable");
20473 case ID_CLASS:
20474 return ERR("formal argument cannot be a class variable");
20475 default:
20476 return ERR("formal argument must be local variable");
20477#undef ERR
20478 }
20479 shadowing_lvar(p, id);
20480
20481 return Qfalse;
20482}
20483
20484static int
20485lvar_defined(struct parser_params *p, ID id)
20486{
20487 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20488}
20489
20490/* emacsen -*- hack */
20491static long
20492parser_encode_length(struct parser_params *p, const char *name, long len)
20493{
20494 long nlen;
20495
20496 if (len > 5 && name[nlen = len - 5] == '-') {
20497 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20498 return nlen;
20499 }
20500 if (len > 4 && name[nlen = len - 4] == '-') {
20501 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20502 return nlen;
20503 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20504 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20505 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20506 return nlen;
20507 }
20508 return len;
20509}
20510
20511static void
20512parser_set_encode(struct parser_params *p, const char *name)
20513{
20514 rb_encoding *enc;
20515 VALUE excargs[3];
20516 int idx = 0;
20517
20518 const char *wrong = 0;
20519 switch (*name) {
20520 case 'e': case 'E': wrong = "external"; break;
20521 case 'i': case 'I': wrong = "internal"; break;
20522 case 'f': case 'F': wrong = "filesystem"; break;
20523 case 'l': case 'L': wrong = "locale"; break;
20524 }
20525 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20526 idx = rb_enc_find_index(name);
20527 if (idx < 0) {
20528 unknown:
20529 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20530 error:
20531 excargs[0] = rb_eArgError;
20532 excargs[2] = rb_make_backtrace();
20533 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20534 VALUE exc = rb_make_exception(3, excargs);
20535 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20536
20537 rb_ast_free(p->ast);
20538 p->ast = NULL;
20539
20540 rb_exc_raise(exc);
20541 }
20542 enc = rb_enc_from_index(idx);
20543 if (!rb_enc_asciicompat(enc)) {
20544 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20545 goto error;
20546 }
20547 p->enc = enc;
20548#ifndef RIPPER
20549 if (p->debug_lines) {
20550 long i;
20551 for (i = 0; i < p->debug_lines->len; i++) {
20552 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20553 }
20554 }
20555#endif
20556}
20557
20558static bool
20559comment_at_top(struct parser_params *p)
20560{
20561 if (p->token_seen) return false;
20562 return (p->line_count == (p->has_shebang ? 2 : 1));
20563}
20564
20565typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20566typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20567
20568static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20569
20570static void
20571magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20572{
20573 if (!comment_at_top(p)) {
20574 return;
20575 }
20576 parser_set_encode(p, val);
20577}
20578
20579static int
20580parser_get_bool(struct parser_params *p, const char *name, const char *val)
20581{
20582 switch (*val) {
20583 case 't': case 'T':
20584 if (STRCASECMP(val, "true") == 0) {
20585 return TRUE;
20586 }
20587 break;
20588 case 'f': case 'F':
20589 if (STRCASECMP(val, "false") == 0) {
20590 return FALSE;
20591 }
20592 break;
20593 }
20594 return parser_invalid_pragma_value(p, name, val);
20595}
20596
20597static int
20598parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20599{
20600 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20601 return -1;
20602}
20603
20604static void
20605parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20606{
20607 int b = parser_get_bool(p, name, val);
20608 if (b >= 0) p->token_info_enabled = b;
20609}
20610
20611static void
20612parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20613{
20614 int b;
20615
20616 if (p->token_seen) {
20617 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20618 return;
20619 }
20620
20621 b = parser_get_bool(p, name, val);
20622 if (b < 0) return;
20623
20624 p->frozen_string_literal = b;
20625}
20626
20627static void
20628parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20629{
20630 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20631 if (*s == ' ' || *s == '\t') continue;
20632 if (*s == '#') break;
20633 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20634 return;
20635 }
20636
20637 switch (*val) {
20638 case 'n': case 'N':
20639 if (STRCASECMP(val, "none") == 0) {
20640 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20641 return;
20642 }
20643 break;
20644 case 'l': case 'L':
20645 if (STRCASECMP(val, "literal") == 0) {
20646 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20647 return;
20648 }
20649 break;
20650 case 'e': case 'E':
20651 if (STRCASECMP(val, "experimental_copy") == 0) {
20652 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20653 return;
20654 }
20655 if (STRCASECMP(val, "experimental_everything") == 0) {
20656 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20657 return;
20658 }
20659 break;
20660 }
20661 parser_invalid_pragma_value(p, name, val);
20662}
20663
20664# if WARN_PAST_SCOPE
20665static void
20666parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20667{
20668 int b = parser_get_bool(p, name, val);
20669 if (b >= 0) p->past_scope_enabled = b;
20670}
20671# endif
20672
20674 const char *name;
20675 rb_magic_comment_setter_t func;
20676 rb_magic_comment_length_t length;
20677};
20678
20679static const struct magic_comment magic_comments[] = {
20680 {"coding", magic_comment_encoding, parser_encode_length},
20681 {"encoding", magic_comment_encoding, parser_encode_length},
20682 {"frozen_string_literal", parser_set_frozen_string_literal},
20683 {"shareable_constant_value", parser_set_shareable_constant_value},
20684 {"warn_indent", parser_set_token_info},
20685# if WARN_PAST_SCOPE
20686 {"warn_past_scope", parser_set_past_scope},
20687# endif
20688};
20689
20690static const char *
20691magic_comment_marker(const char *str, long len)
20692{
20693 long i = 2;
20694
20695 while (i < len) {
20696 switch (str[i]) {
20697 case '-':
20698 if (str[i-1] == '*' && str[i-2] == '-') {
20699 return str + i + 1;
20700 }
20701 i += 2;
20702 break;
20703 case '*':
20704 if (i + 1 >= len) return 0;
20705 if (str[i+1] != '-') {
20706 i += 4;
20707 }
20708 else if (str[i-1] != '-') {
20709 i += 2;
20710 }
20711 else {
20712 return str + i + 2;
20713 }
20714 break;
20715 default:
20716 i += 3;
20717 break;
20718 }
20719 }
20720 return 0;
20721}
20722
20723static int
20724parser_magic_comment(struct parser_params *p, const char *str, long len)
20725{
20726 int indicator = 0;
20727 VALUE name = 0, val = 0;
20728 const char *beg, *end, *vbeg, *vend;
20729#define str_copy(_s, _p, _n) ((_s) \
20730 ? (void)(rb_str_resize((_s), (_n)), \
20731 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20732 : (void)((_s) = STR_NEW((_p), (_n))))
20733
20734 if (len <= 7) return FALSE;
20735 if (!!(beg = magic_comment_marker(str, len))) {
20736 if (!(end = magic_comment_marker(beg, str + len - beg)))
20737 return FALSE;
20738 indicator = TRUE;
20739 str = beg;
20740 len = end - beg - 3;
20741 }
20742
20743 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20744 while (len > 0) {
20745 const struct magic_comment *mc = magic_comments;
20746 char *s;
20747 int i;
20748 long n = 0;
20749
20750 for (; len > 0 && *str; str++, --len) {
20751 switch (*str) {
20752 case '\'': case '"': case ':': case ';':
20753 continue;
20754 }
20755 if (!ISSPACE(*str)) break;
20756 }
20757 for (beg = str; len > 0; str++, --len) {
20758 switch (*str) {
20759 case '\'': case '"': case ':': case ';':
20760 break;
20761 default:
20762 if (ISSPACE(*str)) break;
20763 continue;
20764 }
20765 break;
20766 }
20767 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20768 if (!len) break;
20769 if (*str != ':') {
20770 if (!indicator) return FALSE;
20771 continue;
20772 }
20773
20774 do str++; while (--len > 0 && ISSPACE(*str));
20775 if (!len) break;
20776 const char *tok_beg = str;
20777 if (*str == '"') {
20778 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20779 if (*str == '\\') {
20780 --len;
20781 ++str;
20782 }
20783 }
20784 vend = str;
20785 if (len) {
20786 --len;
20787 ++str;
20788 }
20789 }
20790 else {
20791 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20792 vend = str;
20793 }
20794 const char *tok_end = str;
20795 if (indicator) {
20796 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20797 }
20798 else {
20799 while (len > 0 && (ISSPACE(*str))) --len, str++;
20800 if (len) return FALSE;
20801 }
20802
20803 n = end - beg;
20804 str_copy(name, beg, n);
20805 s = RSTRING_PTR(name);
20806 for (i = 0; i < n; ++i) {
20807 if (s[i] == '-') s[i] = '_';
20808 }
20809 do {
20810 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20811 n = vend - vbeg;
20812 if (mc->length) {
20813 n = (*mc->length)(p, vbeg, n);
20814 }
20815 str_copy(val, vbeg, n);
20816 p->lex.ptok = tok_beg;
20817 p->lex.pcur = tok_end;
20818 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20819 break;
20820 }
20821 } while (++mc < magic_comments + numberof(magic_comments));
20822#ifdef RIPPER
20823 str_copy(val, vbeg, vend - vbeg);
20824 dispatch2(magic_comment, name, val);
20825#endif
20826 }
20827
20828 return TRUE;
20829}
20830
20831static void
20832set_file_encoding(struct parser_params *p, const char *str, const char *send)
20833{
20834 int sep = 0;
20835 const char *beg = str;
20836 VALUE s;
20837
20838 for (;;) {
20839 if (send - str <= 6) return;
20840 switch (str[6]) {
20841 case 'C': case 'c': str += 6; continue;
20842 case 'O': case 'o': str += 5; continue;
20843 case 'D': case 'd': str += 4; continue;
20844 case 'I': case 'i': str += 3; continue;
20845 case 'N': case 'n': str += 2; continue;
20846 case 'G': case 'g': str += 1; continue;
20847 case '=': case ':':
20848 sep = 1;
20849 str += 6;
20850 break;
20851 default:
20852 str += 6;
20853 if (ISSPACE(*str)) break;
20854 continue;
20855 }
20856 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20857 sep = 0;
20858 }
20859 for (;;) {
20860 do {
20861 if (++str >= send) return;
20862 } while (ISSPACE(*str));
20863 if (sep) break;
20864 if (*str != '=' && *str != ':') return;
20865 sep = 1;
20866 str++;
20867 }
20868 beg = str;
20869 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
20870 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
20871 p->lex.ptok = beg;
20872 p->lex.pcur = str;
20873 parser_set_encode(p, RSTRING_PTR(s));
20874 rb_str_resize(s, 0);
20875}
20876
20877static void
20878parser_prepare(struct parser_params *p)
20879{
20880 int c = nextc0(p, FALSE);
20881 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
20882 switch (c) {
20883 case '#':
20884 if (peek(p, '!')) p->has_shebang = 1;
20885 break;
20886 case 0xef: /* UTF-8 BOM marker */
20887 if (!lex_eol_n_p(p, 2) &&
20888 (unsigned char)p->lex.pcur[0] == 0xbb &&
20889 (unsigned char)p->lex.pcur[1] == 0xbf) {
20890 p->enc = rb_utf8_encoding();
20891 p->lex.pcur += 2;
20892#ifndef RIPPER
20893 if (p->debug_lines) {
20894 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
20895 }
20896#endif
20897 p->lex.pbeg = p->lex.pcur;
20898 token_flush(p);
20899 return;
20900 }
20901 break;
20902 case -1: /* end of script. */
20903 return;
20904 }
20905 pushback(p, c);
20906 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
20907}
20908
20909#ifndef RIPPER
20910#define ambiguous_operator(tok, op, syn) ( \
20911 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
20912 rb_warning0("even though it seems like "syn""))
20913#else
20914#define ambiguous_operator(tok, op, syn) \
20915 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
20916#endif
20917#define warn_balanced(tok, op, syn) ((void) \
20918 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
20919 space_seen && !ISSPACE(c) && \
20920 (ambiguous_operator(tok, op, syn), 0)), \
20921 (enum yytokentype)(tok))
20922
20923static enum yytokentype
20924no_digits(struct parser_params *p)
20925{
20926 yyerror0("numeric literal without digits");
20927 if (peek(p, '_')) nextc(p);
20928 /* dummy 0, for tUMINUS_NUM at numeric */
20929 return set_number_literal(p, tINTEGER, 0, 10, 0);
20930}
20931
20932static enum yytokentype
20933parse_numeric(struct parser_params *p, int c)
20934{
20935 int is_float, seen_point, seen_e, nondigit;
20936 int suffix;
20937
20938 is_float = seen_point = seen_e = nondigit = 0;
20939 SET_LEX_STATE(EXPR_END);
20940 newtok(p);
20941 if (c == '-' || c == '+') {
20942 tokadd(p, c);
20943 c = nextc(p);
20944 }
20945 if (c == '0') {
20946 int start = toklen(p);
20947 c = nextc(p);
20948 if (c == 'x' || c == 'X') {
20949 /* hexadecimal */
20950 c = nextc(p);
20951 if (c != -1 && ISXDIGIT(c)) {
20952 do {
20953 if (c == '_') {
20954 if (nondigit) break;
20955 nondigit = c;
20956 continue;
20957 }
20958 if (!ISXDIGIT(c)) break;
20959 nondigit = 0;
20960 tokadd(p, c);
20961 } while ((c = nextc(p)) != -1);
20962 }
20963 pushback(p, c);
20964 tokfix(p);
20965 if (toklen(p) == start) {
20966 return no_digits(p);
20967 }
20968 else if (nondigit) goto trailing_uc;
20969 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20970 return set_number_literal(p, tINTEGER, suffix, 16, 0);
20971 }
20972 if (c == 'b' || c == 'B') {
20973 /* binary */
20974 c = nextc(p);
20975 if (c == '0' || c == '1') {
20976 do {
20977 if (c == '_') {
20978 if (nondigit) break;
20979 nondigit = c;
20980 continue;
20981 }
20982 if (c != '0' && c != '1') break;
20983 nondigit = 0;
20984 tokadd(p, c);
20985 } while ((c = nextc(p)) != -1);
20986 }
20987 pushback(p, c);
20988 tokfix(p);
20989 if (toklen(p) == start) {
20990 return no_digits(p);
20991 }
20992 else if (nondigit) goto trailing_uc;
20993 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20994 return set_number_literal(p, tINTEGER, suffix, 2, 0);
20995 }
20996 if (c == 'd' || c == 'D') {
20997 /* decimal */
20998 c = nextc(p);
20999 if (c != -1 && ISDIGIT(c)) {
21000 do {
21001 if (c == '_') {
21002 if (nondigit) break;
21003 nondigit = c;
21004 continue;
21005 }
21006 if (!ISDIGIT(c)) break;
21007 nondigit = 0;
21008 tokadd(p, c);
21009 } while ((c = nextc(p)) != -1);
21010 }
21011 pushback(p, c);
21012 tokfix(p);
21013 if (toklen(p) == start) {
21014 return no_digits(p);
21015 }
21016 else if (nondigit) goto trailing_uc;
21017 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21018 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21019 }
21020 if (c == '_') {
21021 /* 0_0 */
21022 goto octal_number;
21023 }
21024 if (c == 'o' || c == 'O') {
21025 /* prefixed octal */
21026 c = nextc(p);
21027 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21028 tokfix(p);
21029 return no_digits(p);
21030 }
21031 }
21032 if (c >= '0' && c <= '7') {
21033 /* octal */
21034 octal_number:
21035 do {
21036 if (c == '_') {
21037 if (nondigit) break;
21038 nondigit = c;
21039 continue;
21040 }
21041 if (c < '0' || c > '9') break;
21042 if (c > '7') goto invalid_octal;
21043 nondigit = 0;
21044 tokadd(p, c);
21045 } while ((c = nextc(p)) != -1);
21046 if (toklen(p) > start) {
21047 pushback(p, c);
21048 tokfix(p);
21049 if (nondigit) goto trailing_uc;
21050 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21051 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21052 }
21053 if (nondigit) {
21054 pushback(p, c);
21055 goto trailing_uc;
21056 }
21057 }
21058 if (c > '7' && c <= '9') {
21059 invalid_octal:
21060 yyerror0("Invalid octal digit");
21061 }
21062 else if (c == '.' || c == 'e' || c == 'E') {
21063 tokadd(p, '0');
21064 }
21065 else {
21066 pushback(p, c);
21067 tokfix(p);
21068 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21069 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21070 }
21071 }
21072
21073 for (;;) {
21074 switch (c) {
21075 case '0': case '1': case '2': case '3': case '4':
21076 case '5': case '6': case '7': case '8': case '9':
21077 nondigit = 0;
21078 tokadd(p, c);
21079 break;
21080
21081 case '.':
21082 if (nondigit) goto trailing_uc;
21083 if (seen_point || seen_e) {
21084 goto decode_num;
21085 }
21086 else {
21087 int c0 = nextc(p);
21088 if (c0 == -1 || !ISDIGIT(c0)) {
21089 pushback(p, c0);
21090 goto decode_num;
21091 }
21092 c = c0;
21093 }
21094 seen_point = toklen(p);
21095 tokadd(p, '.');
21096 tokadd(p, c);
21097 is_float++;
21098 nondigit = 0;
21099 break;
21100
21101 case 'e':
21102 case 'E':
21103 if (nondigit) {
21104 pushback(p, c);
21105 c = nondigit;
21106 goto decode_num;
21107 }
21108 if (seen_e) {
21109 goto decode_num;
21110 }
21111 nondigit = c;
21112 c = nextc(p);
21113 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21114 pushback(p, c);
21115 c = nondigit;
21116 nondigit = 0;
21117 goto decode_num;
21118 }
21119 tokadd(p, nondigit);
21120 seen_e++;
21121 is_float++;
21122 tokadd(p, c);
21123 nondigit = (c == '-' || c == '+') ? c : 0;
21124 break;
21125
21126 case '_': /* `_' in number just ignored */
21127 if (nondigit) goto decode_num;
21128 nondigit = c;
21129 break;
21130
21131 default:
21132 goto decode_num;
21133 }
21134 c = nextc(p);
21135 }
21136
21137 decode_num:
21138 pushback(p, c);
21139 if (nondigit) {
21140 trailing_uc:
21141 literal_flush(p, p->lex.pcur - 1);
21142 YYLTYPE loc = RUBY_INIT_YYLLOC();
21143 compile_error(p, "trailing '%c' in number", nondigit);
21144 parser_show_error_line(p, &loc);
21145 }
21146 tokfix(p);
21147 if (is_float) {
21148 enum yytokentype type = tFLOAT;
21149
21150 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21151 if (suffix & NUM_SUFFIX_R) {
21152 type = tRATIONAL;
21153 }
21154 else {
21155 strtod(tok(p), 0);
21156 if (errno == ERANGE) {
21157 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21158 errno = 0;
21159 }
21160 }
21161 return set_number_literal(p, type, suffix, 0, seen_point);
21162 }
21163 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21164 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21165}
21166
21167static enum yytokentype
21168parse_qmark(struct parser_params *p, int space_seen)
21169{
21170 rb_encoding *enc;
21171 register int c;
21172 rb_parser_string_t *lit;
21173 const char *start = p->lex.pcur;
21174
21175 if (IS_END()) {
21176 SET_LEX_STATE(EXPR_VALUE);
21177 return '?';
21178 }
21179 c = nextc(p);
21180 if (c == -1) {
21181 compile_error(p, "incomplete character syntax");
21182 return 0;
21183 }
21184 if (rb_enc_isspace(c, p->enc)) {
21185 if (!IS_ARG()) {
21186 int c2 = escaped_control_code(c);
21187 if (c2) {
21188 WARN_SPACE_CHAR(c2, "?");
21189 }
21190 }
21191 ternary:
21192 pushback(p, c);
21193 SET_LEX_STATE(EXPR_VALUE);
21194 return '?';
21195 }
21196 newtok(p);
21197 enc = p->enc;
21198 int w = parser_precise_mbclen(p, start);
21199 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21200 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21201 if (space_seen) {
21202 const char *ptr = start;
21203 do {
21204 int n = parser_precise_mbclen(p, ptr);
21205 if (n < 0) return -1;
21206 ptr += n;
21207 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21208 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21209 " a conditional operator, put a space after '?'",
21210 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21211 }
21212 goto ternary;
21213 }
21214 else if (c == '\\') {
21215 if (peek(p, 'u')) {
21216 nextc(p);
21217 enc = rb_utf8_encoding();
21218 tokadd_utf8(p, &enc, -1, 0, 0);
21219 }
21220 else if (!ISASCII(c = peekc(p)) && c != -1) {
21221 nextc(p);
21222 if (tokadd_mbchar(p, c) == -1) return 0;
21223 }
21224 else {
21225 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21226 tokadd(p, c);
21227 }
21228 }
21229 else {
21230 if (tokadd_mbchar(p, c) == -1) return 0;
21231 }
21232 tokfix(p);
21233 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21234 set_yylval_str(lit);
21235 SET_LEX_STATE(EXPR_END);
21236 return tCHAR;
21237}
21238
21239static enum yytokentype
21240parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21241{
21242 register int c;
21243 const char *ptok = p->lex.pcur;
21244
21245 if (IS_BEG()) {
21246 int term;
21247 int paren;
21248
21249 c = nextc(p);
21250 quotation:
21251 if (c == -1) goto unterminated;
21252 if (!ISALNUM(c)) {
21253 term = c;
21254 if (!ISASCII(c)) goto unknown;
21255 c = 'Q';
21256 }
21257 else {
21258 term = nextc(p);
21259 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21260 unknown:
21261 pushback(p, term);
21262 c = parser_precise_mbclen(p, p->lex.pcur);
21263 if (c < 0) return 0;
21264 p->lex.pcur += c;
21265 yyerror0("unknown type of %string");
21266 return 0;
21267 }
21268 }
21269 if (term == -1) {
21270 unterminated:
21271 compile_error(p, "unterminated quoted string meets end of file");
21272 return 0;
21273 }
21274 paren = term;
21275 if (term == '(') term = ')';
21276 else if (term == '[') term = ']';
21277 else if (term == '{') term = '}';
21278 else if (term == '<') term = '>';
21279 else paren = 0;
21280
21281 p->lex.ptok = ptok-1;
21282 switch (c) {
21283 case 'Q':
21284 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21285 return tSTRING_BEG;
21286
21287 case 'q':
21288 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21289 return tSTRING_BEG;
21290
21291 case 'W':
21292 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21293 return tWORDS_BEG;
21294
21295 case 'w':
21296 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21297 return tQWORDS_BEG;
21298
21299 case 'I':
21300 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21301 return tSYMBOLS_BEG;
21302
21303 case 'i':
21304 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21305 return tQSYMBOLS_BEG;
21306
21307 case 'x':
21308 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21309 return tXSTRING_BEG;
21310
21311 case 'r':
21312 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21313 return tREGEXP_BEG;
21314
21315 case 's':
21316 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21317 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21318 return tSYMBEG;
21319
21320 default:
21321 yyerror0("unknown type of %string");
21322 return 0;
21323 }
21324 }
21325 if ((c = nextc(p)) == '=') {
21326 set_yylval_id('%');
21327 SET_LEX_STATE(EXPR_BEG);
21328 return tOP_ASGN;
21329 }
21330 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21331 goto quotation;
21332 }
21333 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21334 pushback(p, c);
21335 return warn_balanced('%', "%%", "string literal");
21336}
21337
21338static int
21339tokadd_ident(struct parser_params *p, int c)
21340{
21341 do {
21342 if (tokadd_mbchar(p, c) == -1) return -1;
21343 c = nextc(p);
21344 } while (parser_is_identchar(p));
21345 pushback(p, c);
21346 return 0;
21347}
21348
21349static ID
21350tokenize_ident(struct parser_params *p)
21351{
21352 ID ident = TOK_INTERN();
21353
21354 set_yylval_name(ident);
21355
21356 return ident;
21357}
21358
21359static int
21360parse_numvar(struct parser_params *p)
21361{
21362 size_t len;
21363 int overflow;
21364 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21365 const unsigned long nth_ref_max =
21366 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21367 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21368 * turned into a Fixnum, in compile.c */
21369
21370 if (overflow || n > nth_ref_max) {
21371 /* compile_error()? */
21372 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21373 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21374 }
21375 else {
21376 return (int)n;
21377 }
21378}
21379
21380static enum yytokentype
21381parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21382{
21383 const char *ptr = p->lex.pcur;
21384 register int c;
21385
21386 SET_LEX_STATE(EXPR_END);
21387 p->lex.ptok = ptr - 1; /* from '$' */
21388 newtok(p);
21389 c = nextc(p);
21390 switch (c) {
21391 case '_': /* $_: last read line string */
21392 c = nextc(p);
21393 if (parser_is_identchar(p)) {
21394 tokadd(p, '$');
21395 tokadd(p, '_');
21396 break;
21397 }
21398 pushback(p, c);
21399 c = '_';
21400 /* fall through */
21401 case '~': /* $~: match-data */
21402 case '*': /* $*: argv */
21403 case '$': /* $$: pid */
21404 case '?': /* $?: last status */
21405 case '!': /* $!: error string */
21406 case '@': /* $@: error position */
21407 case '/': /* $/: input record separator */
21408 case '\\': /* $\: output record separator */
21409 case ';': /* $;: field separator */
21410 case ',': /* $,: output field separator */
21411 case '.': /* $.: last read line number */
21412 case '=': /* $=: ignorecase */
21413 case ':': /* $:: load path */
21414 case '<': /* $<: default input handle */
21415 case '>': /* $>: default output handle */
21416 case '\"': /* $": already loaded files */
21417 tokadd(p, '$');
21418 tokadd(p, c);
21419 goto gvar;
21420
21421 case '-':
21422 tokadd(p, '$');
21423 tokadd(p, c);
21424 c = nextc(p);
21425 if (parser_is_identchar(p)) {
21426 if (tokadd_mbchar(p, c) == -1) return 0;
21427 }
21428 else {
21429 pushback(p, c);
21430 pushback(p, '-');
21431 return '$';
21432 }
21433 gvar:
21434 tokenize_ident(p);
21435 return tGVAR;
21436
21437 case '&': /* $&: last match */
21438 case '`': /* $`: string before last match */
21439 case '\'': /* $': string after last match */
21440 case '+': /* $+: string matches last paren. */
21441 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21442 tokadd(p, '$');
21443 tokadd(p, c);
21444 goto gvar;
21445 }
21446 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21447 return tBACK_REF;
21448
21449 case '1': case '2': case '3':
21450 case '4': case '5': case '6':
21451 case '7': case '8': case '9':
21452 tokadd(p, '$');
21453 do {
21454 tokadd(p, c);
21455 c = nextc(p);
21456 } while (c != -1 && ISDIGIT(c));
21457 pushback(p, c);
21458 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21459 tokfix(p);
21460 c = parse_numvar(p);
21461 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21462 return tNTH_REF;
21463
21464 default:
21465 if (!parser_is_identchar(p)) {
21466 YYLTYPE loc = RUBY_INIT_YYLLOC();
21467 if (c == -1 || ISSPACE(c)) {
21468 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21469 }
21470 else {
21471 pushback(p, c);
21472 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21473 }
21474 parser_show_error_line(p, &loc);
21475 set_yylval_noname();
21476 return tGVAR;
21477 }
21478 /* fall through */
21479 case '0':
21480 tokadd(p, '$');
21481 }
21482
21483 if (tokadd_ident(p, c)) return 0;
21484 SET_LEX_STATE(EXPR_END);
21485 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21486 tokenize_ident(p);
21487 }
21488 else {
21489 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21490 set_yylval_noname();
21491 }
21492 return tGVAR;
21493}
21494
21495static bool
21496parser_numbered_param(struct parser_params *p, int n)
21497{
21498 if (n < 0) return false;
21499
21500 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21501 return false;
21502 }
21503 if (p->max_numparam == ORDINAL_PARAM) {
21504 compile_error(p, "ordinary parameter is defined");
21505 return false;
21506 }
21507 struct vtable *args = p->lvtbl->args;
21508 if (p->max_numparam < n) {
21509 p->max_numparam = n;
21510 }
21511 while (n > args->pos) {
21512 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21513 }
21514 return true;
21515}
21516
21517static enum yytokentype
21518parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21519{
21520 const char *ptr = p->lex.pcur;
21521 enum yytokentype result = tIVAR;
21522 register int c = nextc(p);
21523 YYLTYPE loc;
21524
21525 p->lex.ptok = ptr - 1; /* from '@' */
21526 newtok(p);
21527 tokadd(p, '@');
21528 if (c == '@') {
21529 result = tCVAR;
21530 tokadd(p, '@');
21531 c = nextc(p);
21532 }
21533 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21534 if (c == -1 || !parser_is_identchar(p)) {
21535 pushback(p, c);
21536 RUBY_SET_YYLLOC(loc);
21537 if (result == tIVAR) {
21538 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21539 }
21540 else {
21541 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21542 }
21543 parser_show_error_line(p, &loc);
21544 set_yylval_noname();
21545 SET_LEX_STATE(EXPR_END);
21546 return result;
21547 }
21548 else if (ISDIGIT(c)) {
21549 pushback(p, c);
21550 RUBY_SET_YYLLOC(loc);
21551 if (result == tIVAR) {
21552 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21553 }
21554 else {
21555 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21556 }
21557 parser_show_error_line(p, &loc);
21558 set_yylval_noname();
21559 SET_LEX_STATE(EXPR_END);
21560 return result;
21561 }
21562
21563 if (tokadd_ident(p, c)) return 0;
21564 tokenize_ident(p);
21565 return result;
21566}
21567
21568static enum yytokentype
21569parse_ident(struct parser_params *p, int c, int cmd_state)
21570{
21571 enum yytokentype result;
21572 bool is_ascii = true;
21573 const enum lex_state_e last_state = p->lex.state;
21574 ID ident;
21575 int enforce_keyword_end = 0;
21576
21577 do {
21578 if (!ISASCII(c)) is_ascii = false;
21579 if (tokadd_mbchar(p, c) == -1) return 0;
21580 c = nextc(p);
21581 } while (parser_is_identchar(p));
21582 if ((c == '!' || c == '?') && !peek(p, '=')) {
21583 result = tFID;
21584 tokadd(p, c);
21585 }
21586 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21587 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21588 result = tIDENTIFIER;
21589 tokadd(p, c);
21590 }
21591 else {
21592 result = tCONSTANT; /* assume provisionally */
21593 pushback(p, c);
21594 }
21595 tokfix(p);
21596
21597 if (IS_LABEL_POSSIBLE()) {
21598 if (IS_LABEL_SUFFIX(0)) {
21599 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21600 nextc(p);
21601 tokenize_ident(p);
21602 return tLABEL;
21603 }
21604 }
21605
21606#ifndef RIPPER
21607 if (peek_end_expect_token_locations(p)) {
21608 const rb_code_position_t *end_pos;
21609 int lineno, column;
21610 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21611
21612 end_pos = peek_end_expect_token_locations(p)->pos;
21613 lineno = end_pos->lineno;
21614 column = end_pos->column;
21615
21616 if (p->debug) {
21617 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21618 p->ruby_sourceline, beg_pos, lineno, column);
21619 }
21620
21621 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21622 const struct kwtable *kw;
21623
21624 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21625 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21626 enforce_keyword_end = 1;
21627 }
21628 }
21629 }
21630#endif
21631
21632 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21633 const struct kwtable *kw;
21634
21635 /* See if it is a reserved word. */
21636 kw = rb_reserved_word(tok(p), toklen(p));
21637 if (kw) {
21638 enum lex_state_e state = p->lex.state;
21639 if (IS_lex_state_for(state, EXPR_FNAME)) {
21640 SET_LEX_STATE(EXPR_ENDFN);
21641 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21642 return kw->id[0];
21643 }
21644 SET_LEX_STATE(kw->state);
21645 if (IS_lex_state(EXPR_BEG)) {
21646 p->command_start = TRUE;
21647 }
21648 if (kw->id[0] == keyword_do) {
21649 if (lambda_beginning_p()) {
21650 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21651 return keyword_do_LAMBDA;
21652 }
21653 if (COND_P()) return keyword_do_cond;
21654 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21655 return keyword_do_block;
21656 return keyword_do;
21657 }
21658 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21659 return kw->id[0];
21660 else {
21661 if (kw->id[0] != kw->id[1])
21662 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21663 return kw->id[1];
21664 }
21665 }
21666 }
21667
21668 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21669 if (cmd_state) {
21670 SET_LEX_STATE(EXPR_CMDARG);
21671 }
21672 else {
21673 SET_LEX_STATE(EXPR_ARG);
21674 }
21675 }
21676 else if (p->lex.state == EXPR_FNAME) {
21677 SET_LEX_STATE(EXPR_ENDFN);
21678 }
21679 else {
21680 SET_LEX_STATE(EXPR_END);
21681 }
21682
21683 ident = tokenize_ident(p);
21684 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21685 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21686 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21687 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21688 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21689 }
21690 return result;
21691}
21692
21693static void
21694warn_cr(struct parser_params *p)
21695{
21696 if (!p->cr_seen) {
21697 p->cr_seen = TRUE;
21698 /* carried over with p->lex.nextline for nextc() */
21699 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21700 }
21701}
21702
21703static enum yytokentype
21704parser_yylex(struct parser_params *p)
21705{
21706 register int c;
21707 int space_seen = 0;
21708 int cmd_state;
21709 int label;
21710 enum lex_state_e last_state;
21711 int fallthru = FALSE;
21712 int token_seen = p->token_seen;
21713
21714 if (p->lex.strterm) {
21715 if (strterm_is_heredoc(p->lex.strterm)) {
21716 token_flush(p);
21717 return here_document(p, &p->lex.strterm->u.heredoc);
21718 }
21719 else {
21720 token_flush(p);
21721 return parse_string(p, &p->lex.strterm->u.literal);
21722 }
21723 }
21724 cmd_state = p->command_start;
21725 p->command_start = FALSE;
21726 p->token_seen = TRUE;
21727#ifndef RIPPER
21728 token_flush(p);
21729#endif
21730 retry:
21731 last_state = p->lex.state;
21732 switch (c = nextc(p)) {
21733 case '\0': /* NUL */
21734 case '\004': /* ^D */
21735 case '\032': /* ^Z */
21736 case -1: /* end of script. */
21737 p->eofp = 1;
21738#ifndef RIPPER
21739 if (p->end_expect_token_locations) {
21740 pop_end_expect_token_locations(p);
21741 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21742 return tDUMNY_END;
21743 }
21744#endif
21745 /* Set location for end-of-input because dispatch_scan_event is not called. */
21746 RUBY_SET_YYLLOC(*p->yylloc);
21747 return END_OF_INPUT;
21748
21749 /* white spaces */
21750 case '\r':
21751 warn_cr(p);
21752 /* fall through */
21753 case ' ': case '\t': case '\f':
21754 case '\13': /* '\v' */
21755 space_seen = 1;
21756 while ((c = nextc(p))) {
21757 switch (c) {
21758 case '\r':
21759 warn_cr(p);
21760 /* fall through */
21761 case ' ': case '\t': case '\f':
21762 case '\13': /* '\v' */
21763 break;
21764 default:
21765 goto outofloop;
21766 }
21767 }
21768 outofloop:
21769 pushback(p, c);
21770 dispatch_scan_event(p, tSP);
21771#ifndef RIPPER
21772 token_flush(p);
21773#endif
21774 goto retry;
21775
21776 case '#': /* it's a comment */
21777 p->token_seen = token_seen;
21778 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21779 /* no magic_comment in shebang line */
21780 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21781 if (comment_at_top(p)) {
21782 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21783 }
21784 }
21785 p->lex.pcur = pcur, p->lex.ptok = ptok;
21786 lex_goto_eol(p);
21787 dispatch_scan_event(p, tCOMMENT);
21788 fallthru = TRUE;
21789 /* fall through */
21790 case '\n':
21791 p->token_seen = token_seen;
21792 rb_parser_string_t *prevline = p->lex.lastline;
21793 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21794 !IS_lex_state(EXPR_LABELED));
21795 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21796 if (!fallthru) {
21797 dispatch_scan_event(p, tIGNORED_NL);
21798 }
21799 fallthru = FALSE;
21800 if (!c && p->ctxt.in_kwarg) {
21801 goto normal_newline;
21802 }
21803 goto retry;
21804 }
21805 while (1) {
21806 switch (c = nextc(p)) {
21807 case ' ': case '\t': case '\f': case '\r':
21808 case '\13': /* '\v' */
21809 space_seen = 1;
21810 break;
21811 case '#':
21812 pushback(p, c);
21813 if (space_seen) {
21814 dispatch_scan_event(p, tSP);
21815 token_flush(p);
21816 }
21817 goto retry;
21818 case '&':
21819 case '.': {
21820 dispatch_delayed_token(p, tIGNORED_NL);
21821 if (peek(p, '.') == (c == '&')) {
21822 pushback(p, c);
21823 dispatch_scan_event(p, tSP);
21824 goto retry;
21825 }
21826 }
21827 default:
21828 p->ruby_sourceline--;
21829 p->lex.nextline = p->lex.lastline;
21830 set_lastline(p, prevline);
21831 case -1: /* EOF no decrement*/
21832 if (c == -1 && space_seen) {
21833 dispatch_scan_event(p, tSP);
21834 }
21835 lex_goto_eol(p);
21836 if (c != -1) {
21837 token_flush(p);
21838 RUBY_SET_YYLLOC(*p->yylloc);
21839 }
21840 goto normal_newline;
21841 }
21842 }
21843 normal_newline:
21844 p->command_start = TRUE;
21845 SET_LEX_STATE(EXPR_BEG);
21846 return '\n';
21847
21848 case '*':
21849 if ((c = nextc(p)) == '*') {
21850 if ((c = nextc(p)) == '=') {
21851 set_yylval_id(idPow);
21852 SET_LEX_STATE(EXPR_BEG);
21853 return tOP_ASGN;
21854 }
21855 pushback(p, c);
21856 if (IS_SPCARG(c)) {
21857 rb_warning0("'**' interpreted as argument prefix");
21858 c = tDSTAR;
21859 }
21860 else if (IS_BEG()) {
21861 c = tDSTAR;
21862 }
21863 else {
21864 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
21865 }
21866 }
21867 else {
21868 if (c == '=') {
21869 set_yylval_id('*');
21870 SET_LEX_STATE(EXPR_BEG);
21871 return tOP_ASGN;
21872 }
21873 pushback(p, c);
21874 if (IS_SPCARG(c)) {
21875 rb_warning0("'*' interpreted as argument prefix");
21876 c = tSTAR;
21877 }
21878 else if (IS_BEG()) {
21879 c = tSTAR;
21880 }
21881 else {
21882 c = warn_balanced('*', "*", "argument prefix");
21883 }
21884 }
21885 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21886 return c;
21887
21888 case '!':
21889 c = nextc(p);
21890 if (IS_AFTER_OPERATOR()) {
21891 SET_LEX_STATE(EXPR_ARG);
21892 if (c == '@') {
21893 return '!';
21894 }
21895 }
21896 else {
21897 SET_LEX_STATE(EXPR_BEG);
21898 }
21899 if (c == '=') {
21900 return tNEQ;
21901 }
21902 if (c == '~') {
21903 return tNMATCH;
21904 }
21905 pushback(p, c);
21906 return '!';
21907
21908 case '=':
21909 if (was_bol(p)) {
21910 /* skip embedded rd document */
21911 if (word_match_p(p, "begin", 5)) {
21912 int first_p = TRUE;
21913
21914 lex_goto_eol(p);
21915 dispatch_scan_event(p, tEMBDOC_BEG);
21916 for (;;) {
21917 lex_goto_eol(p);
21918 if (!first_p) {
21919 dispatch_scan_event(p, tEMBDOC);
21920 }
21921 first_p = FALSE;
21922 c = nextc(p);
21923 if (c == -1) {
21924 compile_error(p, "embedded document meets end of file");
21925 return END_OF_INPUT;
21926 }
21927 if (c == '=' && word_match_p(p, "end", 3)) {
21928 break;
21929 }
21930 pushback(p, c);
21931 }
21932 lex_goto_eol(p);
21933 dispatch_scan_event(p, tEMBDOC_END);
21934 goto retry;
21935 }
21936 }
21937
21938 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21939 if ((c = nextc(p)) == '=') {
21940 if ((c = nextc(p)) == '=') {
21941 return tEQQ;
21942 }
21943 pushback(p, c);
21944 return tEQ;
21945 }
21946 if (c == '~') {
21947 return tMATCH;
21948 }
21949 else if (c == '>') {
21950 return tASSOC;
21951 }
21952 pushback(p, c);
21953 return '=';
21954
21955 case '<':
21956 c = nextc(p);
21957 if (c == '<' &&
21958 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
21959 !IS_END() &&
21960 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
21961 enum yytokentype token = heredoc_identifier(p);
21962 if (token) return token < 0 ? 0 : token;
21963 }
21964 if (IS_AFTER_OPERATOR()) {
21965 SET_LEX_STATE(EXPR_ARG);
21966 }
21967 else {
21968 if (IS_lex_state(EXPR_CLASS))
21969 p->command_start = TRUE;
21970 SET_LEX_STATE(EXPR_BEG);
21971 }
21972 if (c == '=') {
21973 if ((c = nextc(p)) == '>') {
21974 return tCMP;
21975 }
21976 pushback(p, c);
21977 return tLEQ;
21978 }
21979 if (c == '<') {
21980 if ((c = nextc(p)) == '=') {
21981 set_yylval_id(idLTLT);
21982 SET_LEX_STATE(EXPR_BEG);
21983 return tOP_ASGN;
21984 }
21985 pushback(p, c);
21986 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
21987 }
21988 pushback(p, c);
21989 return '<';
21990
21991 case '>':
21992 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21993 if ((c = nextc(p)) == '=') {
21994 return tGEQ;
21995 }
21996 if (c == '>') {
21997 if ((c = nextc(p)) == '=') {
21998 set_yylval_id(idGTGT);
21999 SET_LEX_STATE(EXPR_BEG);
22000 return tOP_ASGN;
22001 }
22002 pushback(p, c);
22003 return tRSHFT;
22004 }
22005 pushback(p, c);
22006 return '>';
22007
22008 case '"':
22009 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22010 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22011 p->lex.ptok = p->lex.pcur-1;
22012 return tSTRING_BEG;
22013
22014 case '`':
22015 if (IS_lex_state(EXPR_FNAME)) {
22016 SET_LEX_STATE(EXPR_ENDFN);
22017 return c;
22018 }
22019 if (IS_lex_state(EXPR_DOT)) {
22020 if (cmd_state)
22021 SET_LEX_STATE(EXPR_CMDARG);
22022 else
22023 SET_LEX_STATE(EXPR_ARG);
22024 return c;
22025 }
22026 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22027 return tXSTRING_BEG;
22028
22029 case '\'':
22030 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22031 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22032 p->lex.ptok = p->lex.pcur-1;
22033 return tSTRING_BEG;
22034
22035 case '?':
22036 return parse_qmark(p, space_seen);
22037
22038 case '&':
22039 if ((c = nextc(p)) == '&') {
22040 SET_LEX_STATE(EXPR_BEG);
22041 if ((c = nextc(p)) == '=') {
22042 set_yylval_id(idANDOP);
22043 SET_LEX_STATE(EXPR_BEG);
22044 return tOP_ASGN;
22045 }
22046 pushback(p, c);
22047 return tANDOP;
22048 }
22049 else if (c == '=') {
22050 set_yylval_id('&');
22051 SET_LEX_STATE(EXPR_BEG);
22052 return tOP_ASGN;
22053 }
22054 else if (c == '.') {
22055 set_yylval_id(idANDDOT);
22056 SET_LEX_STATE(EXPR_DOT);
22057 return tANDDOT;
22058 }
22059 pushback(p, c);
22060 if (IS_SPCARG(c)) {
22061 if ((c != ':') ||
22062 (c = peekc_n(p, 1)) == -1 ||
22063 !(c == '\'' || c == '"' ||
22064 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22065 rb_warning0("'&' interpreted as argument prefix");
22066 }
22067 c = tAMPER;
22068 }
22069 else if (IS_BEG()) {
22070 c = tAMPER;
22071 }
22072 else {
22073 c = warn_balanced('&', "&", "argument prefix");
22074 }
22075 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22076 return c;
22077
22078 case '|':
22079 if ((c = nextc(p)) == '|') {
22080 SET_LEX_STATE(EXPR_BEG);
22081 if ((c = nextc(p)) == '=') {
22082 set_yylval_id(idOROP);
22083 SET_LEX_STATE(EXPR_BEG);
22084 return tOP_ASGN;
22085 }
22086 pushback(p, c);
22087 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22088 c = '|';
22089 pushback(p, '|');
22090 return c;
22091 }
22092 return tOROP;
22093 }
22094 if (c == '=') {
22095 set_yylval_id('|');
22096 SET_LEX_STATE(EXPR_BEG);
22097 return tOP_ASGN;
22098 }
22099 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22100 pushback(p, c);
22101 return '|';
22102
22103 case '+':
22104 c = nextc(p);
22105 if (IS_AFTER_OPERATOR()) {
22106 SET_LEX_STATE(EXPR_ARG);
22107 if (c == '@') {
22108 return tUPLUS;
22109 }
22110 pushback(p, c);
22111 return '+';
22112 }
22113 if (c == '=') {
22114 set_yylval_id('+');
22115 SET_LEX_STATE(EXPR_BEG);
22116 return tOP_ASGN;
22117 }
22118 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22119 SET_LEX_STATE(EXPR_BEG);
22120 pushback(p, c);
22121 if (c != -1 && ISDIGIT(c)) {
22122 return parse_numeric(p, '+');
22123 }
22124 return tUPLUS;
22125 }
22126 SET_LEX_STATE(EXPR_BEG);
22127 pushback(p, c);
22128 return warn_balanced('+', "+", "unary operator");
22129
22130 case '-':
22131 c = nextc(p);
22132 if (IS_AFTER_OPERATOR()) {
22133 SET_LEX_STATE(EXPR_ARG);
22134 if (c == '@') {
22135 return tUMINUS;
22136 }
22137 pushback(p, c);
22138 return '-';
22139 }
22140 if (c == '=') {
22141 set_yylval_id('-');
22142 SET_LEX_STATE(EXPR_BEG);
22143 return tOP_ASGN;
22144 }
22145 if (c == '>') {
22146 SET_LEX_STATE(EXPR_ENDFN);
22147 yylval.num = p->lex.lpar_beg;
22148 p->lex.lpar_beg = p->lex.paren_nest;
22149 return tLAMBDA;
22150 }
22151 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22152 SET_LEX_STATE(EXPR_BEG);
22153 pushback(p, c);
22154 if (c != -1 && ISDIGIT(c)) {
22155 return tUMINUS_NUM;
22156 }
22157 return tUMINUS;
22158 }
22159 SET_LEX_STATE(EXPR_BEG);
22160 pushback(p, c);
22161 return warn_balanced('-', "-", "unary operator");
22162
22163 case '.': {
22164 int is_beg = IS_BEG();
22165 SET_LEX_STATE(EXPR_BEG);
22166 if ((c = nextc(p)) == '.') {
22167 if ((c = nextc(p)) == '.') {
22168 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22169 SET_LEX_STATE(EXPR_ENDARG);
22170 return tBDOT3;
22171 }
22172 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22173 rb_warn0("... at EOL, should be parenthesized?");
22174 }
22175 return is_beg ? tBDOT3 : tDOT3;
22176 }
22177 pushback(p, c);
22178 return is_beg ? tBDOT2 : tDOT2;
22179 }
22180 pushback(p, c);
22181 if (c != -1 && ISDIGIT(c)) {
22182 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22183 parse_numeric(p, '.');
22184 if (ISDIGIT(prev)) {
22185 yyerror0("unexpected fraction part after numeric literal");
22186 }
22187 else {
22188 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22189 }
22190 SET_LEX_STATE(EXPR_END);
22191 p->lex.ptok = p->lex.pcur;
22192 goto retry;
22193 }
22194 set_yylval_id('.');
22195 SET_LEX_STATE(EXPR_DOT);
22196 return '.';
22197 }
22198
22199 case '0': case '1': case '2': case '3': case '4':
22200 case '5': case '6': case '7': case '8': case '9':
22201 return parse_numeric(p, c);
22202
22203 case ')':
22204 COND_POP();
22205 CMDARG_POP();
22206 SET_LEX_STATE(EXPR_ENDFN);
22207 p->lex.paren_nest--;
22208 return c;
22209
22210 case ']':
22211 COND_POP();
22212 CMDARG_POP();
22213 SET_LEX_STATE(EXPR_END);
22214 p->lex.paren_nest--;
22215 return c;
22216
22217 case '}':
22218 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22219 if (!p->lex.brace_nest--) return tSTRING_DEND;
22220 COND_POP();
22221 CMDARG_POP();
22222 SET_LEX_STATE(EXPR_END);
22223 p->lex.paren_nest--;
22224 return c;
22225
22226 case ':':
22227 c = nextc(p);
22228 if (c == ':') {
22229 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22230 SET_LEX_STATE(EXPR_BEG);
22231 return tCOLON3;
22232 }
22233 set_yylval_id(idCOLON2);
22234 SET_LEX_STATE(EXPR_DOT);
22235 return tCOLON2;
22236 }
22237 if (IS_END() || ISSPACE(c) || c == '#') {
22238 pushback(p, c);
22239 c = warn_balanced(':', ":", "symbol literal");
22240 SET_LEX_STATE(EXPR_BEG);
22241 return c;
22242 }
22243 switch (c) {
22244 case '\'':
22245 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22246 break;
22247 case '"':
22248 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22249 break;
22250 default:
22251 pushback(p, c);
22252 break;
22253 }
22254 SET_LEX_STATE(EXPR_FNAME);
22255 return tSYMBEG;
22256
22257 case '/':
22258 if (IS_BEG()) {
22259 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22260 return tREGEXP_BEG;
22261 }
22262 if ((c = nextc(p)) == '=') {
22263 set_yylval_id('/');
22264 SET_LEX_STATE(EXPR_BEG);
22265 return tOP_ASGN;
22266 }
22267 pushback(p, c);
22268 if (IS_SPCARG(c)) {
22269 arg_ambiguous(p, '/');
22270 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22271 return tREGEXP_BEG;
22272 }
22273 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22274 return warn_balanced('/', "/", "regexp literal");
22275
22276 case '^':
22277 if ((c = nextc(p)) == '=') {
22278 set_yylval_id('^');
22279 SET_LEX_STATE(EXPR_BEG);
22280 return tOP_ASGN;
22281 }
22282 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22283 pushback(p, c);
22284 return '^';
22285
22286 case ';':
22287 SET_LEX_STATE(EXPR_BEG);
22288 p->command_start = TRUE;
22289 return ';';
22290
22291 case ',':
22292 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22293 return ',';
22294
22295 case '~':
22296 if (IS_AFTER_OPERATOR()) {
22297 if ((c = nextc(p)) != '@') {
22298 pushback(p, c);
22299 }
22300 SET_LEX_STATE(EXPR_ARG);
22301 }
22302 else {
22303 SET_LEX_STATE(EXPR_BEG);
22304 }
22305 return '~';
22306
22307 case '(':
22308 if (IS_BEG()) {
22309 c = tLPAREN;
22310 }
22311 else if (!space_seen) {
22312 /* foo( ... ) => method call, no ambiguity */
22313 }
22314 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22315 c = tLPAREN_ARG;
22316 }
22317 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22318 rb_warning0("parentheses after method name is interpreted as "
22319 "an argument list, not a decomposed argument");
22320 }
22321 p->lex.paren_nest++;
22322 COND_PUSH(0);
22323 CMDARG_PUSH(0);
22324 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22325 return c;
22326
22327 case '[':
22328 p->lex.paren_nest++;
22329 if (IS_AFTER_OPERATOR()) {
22330 if ((c = nextc(p)) == ']') {
22331 p->lex.paren_nest--;
22332 SET_LEX_STATE(EXPR_ARG);
22333 if ((c = nextc(p)) == '=') {
22334 return tASET;
22335 }
22336 pushback(p, c);
22337 return tAREF;
22338 }
22339 pushback(p, c);
22340 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22341 return '[';
22342 }
22343 else if (IS_BEG()) {
22344 c = tLBRACK;
22345 }
22346 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22347 c = tLBRACK;
22348 }
22349 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22350 COND_PUSH(0);
22351 CMDARG_PUSH(0);
22352 return c;
22353
22354 case '{':
22355 ++p->lex.brace_nest;
22356 if (lambda_beginning_p())
22357 c = tLAMBEG;
22358 else if (IS_lex_state(EXPR_LABELED))
22359 c = tLBRACE; /* hash */
22360 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22361 c = '{'; /* block (primary) */
22362 else if (IS_lex_state(EXPR_ENDARG))
22363 c = tLBRACE_ARG; /* block (expr) */
22364 else
22365 c = tLBRACE; /* hash */
22366 if (c != tLBRACE) {
22367 p->command_start = TRUE;
22368 SET_LEX_STATE(EXPR_BEG);
22369 }
22370 else {
22371 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22372 }
22373 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22374 COND_PUSH(0);
22375 CMDARG_PUSH(0);
22376 return c;
22377
22378 case '\\':
22379 c = nextc(p);
22380 if (c == '\n') {
22381 space_seen = 1;
22382 dispatch_scan_event(p, tSP);
22383 goto retry; /* skip \\n */
22384 }
22385 if (c == ' ') return tSP;
22386 if (ISSPACE(c)) return c;
22387 pushback(p, c);
22388 return '\\';
22389
22390 case '%':
22391 return parse_percent(p, space_seen, last_state);
22392
22393 case '$':
22394 return parse_gvar(p, last_state);
22395
22396 case '@':
22397 return parse_atmark(p, last_state);
22398
22399 case '_':
22400 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22401 p->ruby__end__seen = 1;
22402 p->eofp = 1;
22403#ifdef RIPPER
22404 lex_goto_eol(p);
22405 dispatch_scan_event(p, k__END__);
22406#endif
22407 return END_OF_INPUT;
22408 }
22409 newtok(p);
22410 break;
22411
22412 default:
22413 if (!parser_is_identchar(p)) {
22414 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22415 token_flush(p);
22416 goto retry;
22417 }
22418
22419 newtok(p);
22420 break;
22421 }
22422
22423 return parse_ident(p, c, cmd_state);
22424}
22425
22426static enum yytokentype
22427yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22428{
22429 enum yytokentype t;
22430
22431 p->lval = lval;
22432 lval->node = 0;
22433 p->yylloc = yylloc;
22434
22435 t = parser_yylex(p);
22436
22437 if (has_delayed_token(p))
22438 dispatch_delayed_token(p, t);
22439 else if (t != END_OF_INPUT)
22440 dispatch_scan_event(p, t);
22441
22442 return t;
22443}
22444
22445#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22446
22447static NODE*
22448node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22449{
22450 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22451
22452 rb_node_init(n, type);
22453 return n;
22454}
22455
22456static NODE *
22457nd_set_loc(NODE *nd, const YYLTYPE *loc)
22458{
22459 nd->nd_loc = *loc;
22460 nd_set_line(nd, loc->beg_pos.lineno);
22461 return nd;
22462}
22463
22464static NODE*
22465node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22466{
22467 NODE *n = node_new_internal(p, type, size, alignment);
22468
22469 nd_set_loc(n, loc);
22470 nd_set_node_id(n, parser_get_node_id(p));
22471 return n;
22472}
22473
22474#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22475
22476static rb_node_scope_t *
22477rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22478{
22479 rb_ast_id_table_t *nd_tbl;
22480 nd_tbl = local_tbl(p);
22481 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22482 n->nd_tbl = nd_tbl;
22483 n->nd_body = nd_body;
22484 n->nd_args = nd_args;
22485
22486 return n;
22487}
22488
22489static rb_node_scope_t *
22490rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22491{
22492 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22493 n->nd_tbl = nd_tbl;
22494 n->nd_body = nd_body;
22495 n->nd_args = nd_args;
22496
22497 return n;
22498}
22499
22500static rb_node_defn_t *
22501rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22502{
22503 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22504 n->nd_mid = nd_mid;
22505 n->nd_defn = nd_defn;
22506
22507 return n;
22508}
22509
22510static rb_node_defs_t *
22511rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22512{
22513 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22514 n->nd_recv = nd_recv;
22515 n->nd_mid = nd_mid;
22516 n->nd_defn = nd_defn;
22517
22518 return n;
22519}
22520
22521static rb_node_block_t *
22522rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22523{
22524 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22525 n->nd_head = nd_head;
22526 n->nd_end = (NODE *)n;
22527 n->nd_next = 0;
22528
22529 return n;
22530}
22531
22532static rb_node_for_t *
22533rb_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)
22534{
22535 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22536 n->nd_body = nd_body;
22537 n->nd_iter = nd_iter;
22538 n->for_keyword_loc = *for_keyword_loc;
22539 n->in_keyword_loc = *in_keyword_loc;
22540 n->do_keyword_loc = *do_keyword_loc;
22541 n->end_keyword_loc = *end_keyword_loc;
22542
22543 return n;
22544}
22545
22546static rb_node_for_masgn_t *
22547rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22548{
22549 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22550 n->nd_var = nd_var;
22551
22552 return n;
22553}
22554
22555static rb_node_retry_t *
22556rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22557{
22558 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22559
22560 return n;
22561}
22562
22563static rb_node_begin_t *
22564rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22565{
22566 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22567 n->nd_body = nd_body;
22568
22569 return n;
22570}
22571
22572static rb_node_rescue_t *
22573rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22574{
22575 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22576 n->nd_head = nd_head;
22577 n->nd_resq = nd_resq;
22578 n->nd_else = nd_else;
22579
22580 return n;
22581}
22582
22583static rb_node_resbody_t *
22584rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22585{
22586 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22587 n->nd_args = nd_args;
22588 n->nd_exc_var = nd_exc_var;
22589 n->nd_body = nd_body;
22590 n->nd_next = nd_next;
22591
22592 return n;
22593}
22594
22595static rb_node_ensure_t *
22596rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22597{
22598 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22599 n->nd_head = nd_head;
22600 n->nd_ensr = nd_ensr;
22601
22602 return n;
22603}
22604
22605static rb_node_and_t *
22606rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22607{
22608 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22609 n->nd_1st = nd_1st;
22610 n->nd_2nd = nd_2nd;
22611 n->operator_loc = *operator_loc;
22612
22613 return n;
22614}
22615
22616static rb_node_or_t *
22617rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22618{
22619 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22620 n->nd_1st = nd_1st;
22621 n->nd_2nd = nd_2nd;
22622 n->operator_loc = *operator_loc;
22623
22624 return n;
22625}
22626
22627static rb_node_return_t *
22628rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22629{
22630 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22631 n->nd_stts = nd_stts;
22632 n->keyword_loc = *keyword_loc;
22633 return n;
22634}
22635
22636static rb_node_yield_t *
22637rb_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)
22638{
22639 if (nd_head) no_blockarg(p, nd_head);
22640
22641 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22642 n->nd_head = nd_head;
22643 n->keyword_loc = *keyword_loc;
22644 n->lparen_loc = *lparen_loc;
22645 n->rparen_loc = *rparen_loc;
22646
22647 return n;
22648}
22649
22650static rb_node_if_t *
22651rb_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)
22652{
22653 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22654 n->nd_cond = nd_cond;
22655 n->nd_body = nd_body;
22656 n->nd_else = nd_else;
22657 n->if_keyword_loc = *if_keyword_loc;
22658 n->then_keyword_loc = *then_keyword_loc;
22659 n->end_keyword_loc = *end_keyword_loc;
22660
22661 return n;
22662}
22663
22664static rb_node_unless_t *
22665rb_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)
22666{
22667 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22668 n->nd_cond = nd_cond;
22669 n->nd_body = nd_body;
22670 n->nd_else = nd_else;
22671 n->keyword_loc = *keyword_loc;
22672 n->then_keyword_loc = *then_keyword_loc;
22673 n->end_keyword_loc = *end_keyword_loc;
22674
22675 return n;
22676}
22677
22678static rb_node_class_t *
22679rb_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)
22680{
22681 /* Keep the order of node creation */
22682 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22683 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22684 n->nd_cpath = nd_cpath;
22685 n->nd_body = scope;
22686 n->nd_super = nd_super;
22687 n->class_keyword_loc = *class_keyword_loc;
22688 n->inheritance_operator_loc = *inheritance_operator_loc;
22689 n->end_keyword_loc = *end_keyword_loc;
22690
22691 return n;
22692}
22693
22694static rb_node_sclass_t *
22695rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc)
22696{
22697 /* Keep the order of node creation */
22698 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22699 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22700 n->nd_recv = nd_recv;
22701 n->nd_body = scope;
22702
22703 return n;
22704}
22705
22706static rb_node_module_t *
22707rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc)
22708{
22709 /* Keep the order of node creation */
22710 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22711 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22712 n->nd_cpath = nd_cpath;
22713 n->nd_body = scope;
22714
22715 return n;
22716}
22717
22718static rb_node_iter_t *
22719rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22720{
22721 /* Keep the order of node creation */
22722 NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22723 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22724 n->nd_body = scope;
22725 n->nd_iter = 0;
22726
22727 return n;
22728}
22729
22730static rb_node_lambda_t *
22731rb_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)
22732{
22733 /* Keep the order of node creation */
22734 NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22735 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
22736 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
22737 n->nd_body = scope;
22738 n->operator_loc = *operator_loc;
22739 n->opening_loc = *opening_loc;
22740 n->closing_loc = *closing_loc;
22741
22742 return n;
22743}
22744
22745static rb_node_case_t *
22746rb_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)
22747{
22748 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22749 n->nd_head = nd_head;
22750 n->nd_body = nd_body;
22751 n->case_keyword_loc = *case_keyword_loc;
22752 n->end_keyword_loc = *end_keyword_loc;
22753
22754 return n;
22755}
22756
22757static rb_node_case2_t *
22758rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22759{
22760 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22761 n->nd_head = 0;
22762 n->nd_body = nd_body;
22763 n->case_keyword_loc = *case_keyword_loc;
22764 n->end_keyword_loc = *end_keyword_loc;
22765
22766 return n;
22767}
22768
22769static rb_node_case3_t *
22770rb_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)
22771{
22772 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22773 n->nd_head = nd_head;
22774 n->nd_body = nd_body;
22775 n->case_keyword_loc = *case_keyword_loc;
22776 n->end_keyword_loc = *end_keyword_loc;
22777
22778 return n;
22779}
22780
22781static rb_node_when_t *
22782rb_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)
22783{
22784 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22785 n->nd_head = nd_head;
22786 n->nd_body = nd_body;
22787 n->nd_next = nd_next;
22788 n->keyword_loc = *keyword_loc;
22789 n->then_keyword_loc = *then_keyword_loc;
22790
22791 return n;
22792}
22793
22794static rb_node_in_t *
22795rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22796{
22797 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22798 n->nd_head = nd_head;
22799 n->nd_body = nd_body;
22800 n->nd_next = nd_next;
22801
22802 return n;
22803}
22804
22805static rb_node_while_t *
22806rb_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)
22807{
22808 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22809 n->nd_cond = nd_cond;
22810 n->nd_body = nd_body;
22811 n->nd_state = nd_state;
22812 n->keyword_loc = *keyword_loc;
22813 n->closing_loc = *closing_loc;
22814
22815 return n;
22816}
22817
22818static rb_node_until_t *
22819rb_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)
22820{
22821 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22822 n->nd_cond = nd_cond;
22823 n->nd_body = nd_body;
22824 n->nd_state = nd_state;
22825 n->keyword_loc = *keyword_loc;
22826 n->closing_loc = *closing_loc;
22827
22828 return n;
22829}
22830
22831static rb_node_colon2_t *
22832rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc)
22833{
22834 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
22835 n->nd_head = nd_head;
22836 n->nd_mid = nd_mid;
22837
22838 return n;
22839}
22840
22841static rb_node_colon3_t *
22842rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
22843{
22844 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
22845 n->nd_mid = nd_mid;
22846
22847 return n;
22848}
22849
22850static rb_node_dot2_t *
22851rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22852{
22853 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
22854 n->nd_beg = nd_beg;
22855 n->nd_end = nd_end;
22856 n->operator_loc = *operator_loc;
22857
22858 return n;
22859}
22860
22861static rb_node_dot3_t *
22862rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22863{
22864 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
22865 n->nd_beg = nd_beg;
22866 n->nd_end = nd_end;
22867 n->operator_loc = *operator_loc;
22868
22869 return n;
22870}
22871
22872static rb_node_self_t *
22873rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
22874{
22875 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
22876 n->nd_state = 1;
22877
22878 return n;
22879}
22880
22881static rb_node_nil_t *
22882rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
22883{
22884 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
22885
22886 return n;
22887}
22888
22889static rb_node_true_t *
22890rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
22891{
22892 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
22893
22894 return n;
22895}
22896
22897static rb_node_false_t *
22898rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
22899{
22900 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
22901
22902 return n;
22903}
22904
22905static rb_node_super_t *
22906rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
22907 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
22908{
22909 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
22910 n->nd_args = nd_args;
22911 n->keyword_loc = *keyword_loc;
22912 n->lparen_loc = *lparen_loc;
22913 n->rparen_loc = *rparen_loc;
22914
22915 return n;
22916}
22917
22918static rb_node_zsuper_t *
22919rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
22920{
22921 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
22922
22923 return n;
22924}
22925
22926static rb_node_match2_t *
22927rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22928{
22929 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
22930 n->nd_recv = nd_recv;
22931 n->nd_value = nd_value;
22932 n->nd_args = 0;
22933
22934 return n;
22935}
22936
22937static rb_node_match3_t *
22938rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22939{
22940 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
22941 n->nd_recv = nd_recv;
22942 n->nd_value = nd_value;
22943
22944 return n;
22945}
22946
22947/* TODO: Use union for NODE_LIST2 */
22948static rb_node_list_t *
22949rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22950{
22951 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22952 n->nd_head = nd_head;
22953 n->as.nd_alen = 1;
22954 n->nd_next = 0;
22955
22956 return n;
22957}
22958
22959static rb_node_list_t *
22960rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22961{
22962 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22963 n->nd_head = nd_head;
22964 n->as.nd_alen = nd_alen;
22965 n->nd_next = nd_next;
22966
22967 return n;
22968}
22969
22970static rb_node_zlist_t *
22971rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
22972{
22973 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
22974
22975 return n;
22976}
22977
22978static rb_node_hash_t *
22979rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22980{
22981 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
22982 n->nd_head = nd_head;
22983 n->nd_brace = 0;
22984
22985 return n;
22986}
22987
22988static rb_node_masgn_t *
22989rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
22990{
22991 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
22992 n->nd_head = nd_head;
22993 n->nd_value = 0;
22994 n->nd_args = nd_args;
22995
22996 return n;
22997}
22998
22999static rb_node_gasgn_t *
23000rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23001{
23002 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23003 n->nd_vid = nd_vid;
23004 n->nd_value = nd_value;
23005
23006 return n;
23007}
23008
23009static rb_node_lasgn_t *
23010rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23011{
23012 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23013 n->nd_vid = nd_vid;
23014 n->nd_value = nd_value;
23015
23016 return n;
23017}
23018
23019static rb_node_dasgn_t *
23020rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23021{
23022 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23023 n->nd_vid = nd_vid;
23024 n->nd_value = nd_value;
23025
23026 return n;
23027}
23028
23029static rb_node_iasgn_t *
23030rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23031{
23032 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23033 n->nd_vid = nd_vid;
23034 n->nd_value = nd_value;
23035
23036 return n;
23037}
23038
23039static rb_node_cvasgn_t *
23040rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23041{
23042 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23043 n->nd_vid = nd_vid;
23044 n->nd_value = nd_value;
23045
23046 return n;
23047}
23048
23049static rb_node_op_asgn1_t *
23050rb_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)
23051{
23052 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23053 n->nd_recv = nd_recv;
23054 n->nd_mid = nd_mid;
23055 n->nd_index = index;
23056 n->nd_rvalue = rvalue;
23057 n->call_operator_loc = *call_operator_loc;
23058 n->opening_loc = *opening_loc;
23059 n->closing_loc = *closing_loc;
23060 n->binary_operator_loc = *binary_operator_loc;
23061
23062 return n;
23063}
23064
23065static rb_node_op_asgn2_t *
23066rb_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)
23067{
23068 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23069 n->nd_recv = nd_recv;
23070 n->nd_value = nd_value;
23071 n->nd_vid = nd_vid;
23072 n->nd_mid = nd_mid;
23073 n->nd_aid = nd_aid;
23074 n->call_operator_loc = *call_operator_loc;
23075 n->message_loc = *message_loc;
23076 n->binary_operator_loc = *binary_operator_loc;
23077
23078 return n;
23079}
23080
23081static rb_node_op_asgn_or_t *
23082rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23083{
23084 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23085 n->nd_head = nd_head;
23086 n->nd_value = nd_value;
23087
23088 return n;
23089}
23090
23091static rb_node_op_asgn_and_t *
23092rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23093{
23094 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23095 n->nd_head = nd_head;
23096 n->nd_value = nd_value;
23097
23098 return n;
23099}
23100
23101static rb_node_gvar_t *
23102rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23103{
23104 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23105 n->nd_vid = nd_vid;
23106
23107 return n;
23108}
23109
23110static rb_node_lvar_t *
23111rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23112{
23113 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23114 n->nd_vid = nd_vid;
23115
23116 return n;
23117}
23118
23119static rb_node_dvar_t *
23120rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23121{
23122 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23123 n->nd_vid = nd_vid;
23124
23125 return n;
23126}
23127
23128static rb_node_ivar_t *
23129rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23130{
23131 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23132 n->nd_vid = nd_vid;
23133
23134 return n;
23135}
23136
23137static rb_node_const_t *
23138rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23139{
23140 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23141 n->nd_vid = nd_vid;
23142
23143 return n;
23144}
23145
23146static rb_node_cvar_t *
23147rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23148{
23149 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23150 n->nd_vid = nd_vid;
23151
23152 return n;
23153}
23154
23155static rb_node_nth_ref_t *
23156rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23157{
23158 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23159 n->nd_nth = nd_nth;
23160
23161 return n;
23162}
23163
23164static rb_node_back_ref_t *
23165rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23166{
23167 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23168 n->nd_nth = nd_nth;
23169
23170 return n;
23171}
23172
23173static rb_node_integer_t *
23174rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23175{
23176 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23177 n->val = val;
23178 n->minus = FALSE;
23179 n->base = base;
23180
23181 return n;
23182}
23183
23184static rb_node_float_t *
23185rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23186{
23187 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23188 n->val = val;
23189 n->minus = FALSE;
23190
23191 return n;
23192}
23193
23194static rb_node_rational_t *
23195rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23196{
23197 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23198 n->val = val;
23199 n->minus = FALSE;
23200 n->base = base;
23201 n->seen_point = seen_point;
23202
23203 return n;
23204}
23205
23206static rb_node_imaginary_t *
23207rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23208{
23209 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23210 n->val = val;
23211 n->minus = FALSE;
23212 n->base = base;
23213 n->seen_point = seen_point;
23214 n->type = numeric_type;
23215
23216 return n;
23217}
23218
23219static rb_node_str_t *
23220rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23221{
23222 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23223 n->string = string;
23224
23225 return n;
23226}
23227
23228/* TODO; Use union for NODE_DSTR2 */
23229static rb_node_dstr_t *
23230rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23231{
23232 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23233 n->string = string;
23234 n->as.nd_alen = nd_alen;
23235 n->nd_next = (rb_node_list_t *)nd_next;
23236
23237 return n;
23238}
23239
23240static rb_node_dstr_t *
23241rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23242{
23243 return rb_node_dstr_new0(p, string, 1, 0, loc);
23244}
23245
23246static rb_node_xstr_t *
23247rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23248{
23249 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23250 n->string = string;
23251
23252 return n;
23253}
23254
23255static rb_node_dxstr_t *
23256rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23257{
23258 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23259 n->string = string;
23260 n->as.nd_alen = nd_alen;
23261 n->nd_next = (rb_node_list_t *)nd_next;
23262
23263 return n;
23264}
23265
23266static rb_node_sym_t *
23267rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23268{
23269 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23270 n->string = rb_str_to_parser_string(p, str);
23271
23272 return n;
23273}
23274
23275static rb_node_dsym_t *
23276rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23277{
23278 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23279 n->string = string;
23280 n->as.nd_alen = nd_alen;
23281 n->nd_next = (rb_node_list_t *)nd_next;
23282
23283 return n;
23284}
23285
23286static rb_node_evstr_t *
23287rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23288{
23289 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23290 n->nd_body = nd_body;
23291 n->opening_loc = *opening_loc;
23292 n->closing_loc = *closing_loc;
23293
23294 return n;
23295}
23296
23297static rb_node_regx_t *
23298rb_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)
23299{
23300 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23301 n->string = string;
23302 n->options = options & RE_OPTION_MASK;
23303 n->opening_loc = *opening_loc;
23304 n->content_loc = *content_loc;
23305 n->closing_loc = *closing_loc;
23306
23307 return n;
23308}
23309
23310static rb_node_call_t *
23311rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23312{
23313 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23314 n->nd_recv = nd_recv;
23315 n->nd_mid = nd_mid;
23316 n->nd_args = nd_args;
23317
23318 return n;
23319}
23320
23321static rb_node_opcall_t *
23322rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23323{
23324 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23325 n->nd_recv = nd_recv;
23326 n->nd_mid = nd_mid;
23327 n->nd_args = nd_args;
23328
23329 return n;
23330}
23331
23332static rb_node_fcall_t *
23333rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23334{
23335 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23336 n->nd_mid = nd_mid;
23337 n->nd_args = nd_args;
23338
23339 return n;
23340}
23341
23342static rb_node_qcall_t *
23343rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23344{
23345 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23346 n->nd_recv = nd_recv;
23347 n->nd_mid = nd_mid;
23348 n->nd_args = nd_args;
23349
23350 return n;
23351}
23352
23353static rb_node_vcall_t *
23354rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23355{
23356 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23357 n->nd_mid = nd_mid;
23358
23359 return n;
23360}
23361
23362static rb_node_once_t *
23363rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23364{
23365 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23366 n->nd_body = nd_body;
23367
23368 return n;
23369}
23370
23371static rb_node_args_t *
23372rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23373{
23374 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23375 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23376
23377 return n;
23378}
23379
23380static rb_node_args_aux_t *
23381rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23382{
23383 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23384 n->nd_pid = nd_pid;
23385 n->nd_plen = nd_plen;
23386 n->nd_next = 0;
23387
23388 return n;
23389}
23390
23391static rb_node_opt_arg_t *
23392rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23393{
23394 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23395 n->nd_body = nd_body;
23396 n->nd_next = 0;
23397
23398 return n;
23399}
23400
23401static rb_node_kw_arg_t *
23402rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23403{
23404 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23405 n->nd_body = nd_body;
23406 n->nd_next = 0;
23407
23408 return n;
23409}
23410
23411static rb_node_postarg_t *
23412rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23413{
23414 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23415 n->nd_1st = nd_1st;
23416 n->nd_2nd = nd_2nd;
23417
23418 return n;
23419}
23420
23421static rb_node_argscat_t *
23422rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23423{
23424 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23425 n->nd_head = nd_head;
23426 n->nd_body = nd_body;
23427
23428 return n;
23429}
23430
23431static rb_node_argspush_t *
23432rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23433{
23434 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23435 n->nd_head = nd_head;
23436 n->nd_body = nd_body;
23437
23438 return n;
23439}
23440
23441static rb_node_splat_t *
23442rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23443{
23444 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23445 n->nd_head = nd_head;
23446 n->operator_loc = *operator_loc;
23447
23448 return n;
23449}
23450
23451static rb_node_block_pass_t *
23452rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23453{
23454 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23455 n->forwarding = 0;
23456 n->nd_head = 0;
23457 n->nd_body = nd_body;
23458 n->operator_loc = *operator_loc;
23459
23460 return n;
23461}
23462
23463static rb_node_alias_t *
23464rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23465{
23466 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23467 n->nd_1st = nd_1st;
23468 n->nd_2nd = nd_2nd;
23469 n->keyword_loc = *keyword_loc;
23470
23471 return n;
23472}
23473
23474static rb_node_valias_t *
23475rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23476{
23477 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23478 n->nd_alias = nd_alias;
23479 n->nd_orig = nd_orig;
23480 n->keyword_loc = *keyword_loc;
23481
23482 return n;
23483}
23484
23485static rb_node_undef_t *
23486rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23487{
23488 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23489 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23490 n->keyword_loc = NULL_LOC;
23491 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23492
23493 return n;
23494}
23495
23496static rb_node_errinfo_t *
23497rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23498{
23499 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23500
23501 return n;
23502}
23503
23504static rb_node_defined_t *
23505rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23506{
23507 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23508 n->nd_head = nd_head;
23509
23510 return n;
23511}
23512
23513static rb_node_postexe_t *
23514rb_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)
23515{
23516 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23517 n->nd_body = nd_body;
23518 n->keyword_loc = *keyword_loc;
23519 n->opening_loc = *opening_loc;
23520 n->closing_loc = *closing_loc;
23521
23522 return n;
23523}
23524
23525static rb_node_attrasgn_t *
23526rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23527{
23528 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23529 n->nd_recv = nd_recv;
23530 n->nd_mid = nd_mid;
23531 n->nd_args = nd_args;
23532
23533 return n;
23534}
23535
23536static rb_node_aryptn_t *
23537rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23538{
23539 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23540 n->nd_pconst = 0;
23541 n->pre_args = pre_args;
23542 n->rest_arg = rest_arg;
23543 n->post_args = post_args;
23544
23545 return n;
23546}
23547
23548static rb_node_hshptn_t *
23549rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23550{
23551 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23552 n->nd_pconst = nd_pconst;
23553 n->nd_pkwargs = nd_pkwargs;
23554 n->nd_pkwrestarg = nd_pkwrestarg;
23555
23556 return n;
23557}
23558
23559static rb_node_fndptn_t *
23560rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23561{
23562 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23563 n->nd_pconst = 0;
23564 n->pre_rest_arg = pre_rest_arg;
23565 n->args = args;
23566 n->post_rest_arg = post_rest_arg;
23567
23568 return n;
23569}
23570
23571static rb_node_line_t *
23572rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23573{
23574 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23575
23576 return n;
23577}
23578
23579static rb_node_file_t *
23580rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23581{
23582 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23583 n->path = rb_str_to_parser_string(p, str);
23584
23585 return n;
23586}
23587
23588static rb_node_encoding_t *
23589rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23590{
23591 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23592 n->enc = p->enc;
23593
23594 return n;
23595}
23596
23597static rb_node_cdecl_t *
23598rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23599{
23600 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23601 n->nd_vid = nd_vid;
23602 n->nd_value = nd_value;
23603 n->nd_else = nd_else;
23604 n->shareability = shareability;
23605
23606 return n;
23607}
23608
23609static rb_node_op_cdecl_t *
23610rb_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)
23611{
23612 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23613 n->nd_head = nd_head;
23614 n->nd_value = nd_value;
23615 n->nd_aid = nd_aid;
23616 n->shareability = shareability;
23617
23618 return n;
23619}
23620
23621static rb_node_error_t *
23622rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23623{
23624 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23625
23626 return n;
23627}
23628
23629static rb_node_break_t *
23630rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23631{
23632 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23633 n->nd_stts = nd_stts;
23634 n->nd_chain = 0;
23635 n->keyword_loc = *keyword_loc;
23636
23637 return n;
23638}
23639
23640static rb_node_next_t *
23641rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23642{
23643 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23644 n->nd_stts = nd_stts;
23645 n->nd_chain = 0;
23646 n->keyword_loc = *keyword_loc;
23647
23648 return n;
23649}
23650
23651static rb_node_redo_t *
23652rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23653{
23654 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23655 n->nd_chain = 0;
23656 n->keyword_loc = *keyword_loc;
23657
23658 return n;
23659}
23660
23661static rb_node_def_temp_t *
23662rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23663{
23664 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23665 n->save.numparam_save = 0;
23666 n->save.max_numparam = 0;
23667 n->save.ctxt = p->ctxt;
23668 n->nd_def = 0;
23669 n->nd_mid = 0;
23670
23671 return n;
23672}
23673
23674static rb_node_def_temp_t *
23675def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23676{
23677 n->save.numparam_save = numparam_push(p);
23678 n->save.max_numparam = p->max_numparam;
23679 return n;
23680}
23681
23682#ifndef RIPPER
23683static enum node_type
23684nodetype(NODE *node) /* for debug */
23685{
23686 return (enum node_type)nd_type(node);
23687}
23688
23689static int
23690nodeline(NODE *node)
23691{
23692 return nd_line(node);
23693}
23694#endif
23695
23696static NODE*
23697newline_node(NODE *node)
23698{
23699 if (node) {
23700 node = remove_begin(node);
23701 nd_set_fl_newline(node);
23702 }
23703 return node;
23704}
23705
23706static void
23707fixpos(NODE *node, NODE *orig)
23708{
23709 if (!node) return;
23710 if (!orig) return;
23711 nd_set_line(node, nd_line(orig));
23712}
23713
23714static NODE*
23715block_append(struct parser_params *p, NODE *head, NODE *tail)
23716{
23717 NODE *end, *h = head, *nd;
23718
23719 if (tail == 0) return head;
23720
23721 if (h == 0) return tail;
23722 switch (nd_type(h)) {
23723 default:
23724 h = end = NEW_BLOCK(head, &head->nd_loc);
23725 head = end;
23726 break;
23727 case NODE_BLOCK:
23728 end = RNODE_BLOCK(h)->nd_end;
23729 break;
23730 }
23731
23732 nd = RNODE_BLOCK(end)->nd_head;
23733 switch (nd_type(nd)) {
23734 case NODE_RETURN:
23735 case NODE_BREAK:
23736 case NODE_NEXT:
23737 case NODE_REDO:
23738 case NODE_RETRY:
23739 rb_warning0L(nd_line(tail), "statement not reached");
23740 break;
23741
23742 default:
23743 break;
23744 }
23745
23746 if (!nd_type_p(tail, NODE_BLOCK)) {
23747 tail = NEW_BLOCK(tail, &tail->nd_loc);
23748 }
23749 RNODE_BLOCK(end)->nd_next = tail;
23750 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23751 nd_set_last_loc(head, nd_last_loc(tail));
23752 return head;
23753}
23754
23755/* append item to the list */
23756static NODE*
23757list_append(struct parser_params *p, NODE *list, NODE *item)
23758{
23759 NODE *last;
23760
23761 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23762 if (RNODE_LIST(list)->nd_next) {
23763 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23764 }
23765 else {
23766 last = list;
23767 }
23768
23769 RNODE_LIST(list)->as.nd_alen += 1;
23770 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23771 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23772
23773 nd_set_last_loc(list, nd_last_loc(item));
23774
23775 return list;
23776}
23777
23778/* concat two lists */
23779static NODE*
23780list_concat(NODE *head, NODE *tail)
23781{
23782 NODE *last;
23783
23784 if (RNODE_LIST(head)->nd_next) {
23785 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23786 }
23787 else {
23788 last = head;
23789 }
23790
23791 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23792 RNODE_LIST(last)->nd_next = tail;
23793 if (RNODE_LIST(tail)->nd_next) {
23794 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23795 }
23796 else {
23797 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23798 }
23799
23800 nd_set_last_loc(head, nd_last_loc(tail));
23801
23802 return head;
23803}
23804
23805static int
23806literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23807{
23808 if (!tail) return 1;
23809 if (!rb_parser_enc_compatible(p, head, tail)) {
23810 compile_error(p, "string literal encodings differ (%s / %s)",
23811 rb_enc_name(rb_parser_str_get_encoding(head)),
23812 rb_enc_name(rb_parser_str_get_encoding(tail)));
23813 rb_parser_str_resize(p, head, 0);
23814 rb_parser_str_resize(p, tail, 0);
23815 return 0;
23816 }
23817 rb_parser_str_buf_append(p, head, tail);
23818 return 1;
23819}
23820
23821static rb_parser_string_t *
23822string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23823{
23824 if (htype != NODE_DSTR) return NULL;
23825 if (RNODE_DSTR(head)->nd_next) {
23826 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
23827 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
23828 }
23829 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
23830 ASSUME(lit);
23831 return lit;
23832}
23833
23834#ifndef RIPPER
23835static rb_parser_string_t *
23836rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
23837{
23838 rb_parser_string_t *copy;
23839 if (!orig) return NULL;
23840 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
23841 copy->coderange = orig->coderange;
23842 copy->enc = orig->enc;
23843 return copy;
23844}
23845#endif
23846
23847/* concat two string literals */
23848static NODE *
23849literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
23850{
23851 enum node_type htype;
23852 rb_parser_string_t *lit;
23853
23854 if (!head) return tail;
23855 if (!tail) return head;
23856
23857 htype = nd_type(head);
23858 if (htype == NODE_EVSTR) {
23859 head = new_dstr(p, head, loc);
23860 htype = NODE_DSTR;
23861 }
23862 if (p->heredoc_indent > 0) {
23863 switch (htype) {
23864 case NODE_STR:
23865 head = str2dstr(p, head);
23866 case NODE_DSTR:
23867 return list_append(p, head, tail);
23868 default:
23869 break;
23870 }
23871 }
23872 switch (nd_type(tail)) {
23873 case NODE_STR:
23874 if ((lit = string_literal_head(p, htype, head)) != false) {
23875 htype = NODE_STR;
23876 }
23877 else {
23878 lit = RNODE_DSTR(head)->string;
23879 }
23880 if (htype == NODE_STR) {
23881 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
23882 error:
23883 rb_discard_node(p, head);
23884 rb_discard_node(p, tail);
23885 return 0;
23886 }
23887 rb_discard_node(p, tail);
23888 }
23889 else {
23890 list_append(p, head, tail);
23891 }
23892 break;
23893
23894 case NODE_DSTR:
23895 if (htype == NODE_STR) {
23896 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
23897 goto error;
23898 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23899 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
23900 RNODE_STR(head)->string = NULL;
23901 rb_discard_node(p, head);
23902 head = tail;
23903 }
23904 else if (!RNODE_DSTR(tail)->string) {
23905 append:
23906 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
23907 if (!RNODE_DSTR(head)->nd_next) {
23908 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
23909 }
23910 else if (RNODE_DSTR(tail)->nd_next) {
23911 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
23912 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
23913 }
23914 rb_discard_node(p, tail);
23915 }
23916 else if ((lit = string_literal_head(p, htype, head)) != false) {
23917 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
23918 goto error;
23919 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23920 RNODE_DSTR(tail)->string = 0;
23921 goto append;
23922 }
23923 else {
23924 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));
23925 RNODE_DSTR(tail)->string = 0;
23926 }
23927 break;
23928
23929 case NODE_EVSTR:
23930 if (htype == NODE_STR) {
23931 head = str2dstr(p, head);
23932 RNODE_DSTR(head)->as.nd_alen = 1;
23933 }
23934 list_append(p, head, tail);
23935 break;
23936 }
23937 return head;
23938}
23939
23940static void
23941nd_copy_flag(NODE *new_node, NODE *old_node)
23942{
23943 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
23944 nd_set_line(new_node, nd_line(old_node));
23945 new_node->nd_loc = old_node->nd_loc;
23946 new_node->node_id = old_node->node_id;
23947}
23948
23949static NODE *
23950str2dstr(struct parser_params *p, NODE *node)
23951{
23952 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
23953 nd_copy_flag(new_node, node);
23954 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
23955 RNODE_DSTR(new_node)->as.nd_alen = 0;
23956 RNODE_DSTR(new_node)->nd_next = 0;
23957 RNODE_STR(node)->string = 0;
23958
23959 return new_node;
23960}
23961
23962static NODE *
23963str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
23964{
23965 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
23966 nd_copy_flag(new_node, node);
23967 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
23968 RNODE_REGX(new_node)->options = options;
23969 nd_set_loc(new_node, loc);
23970 RNODE_REGX(new_node)->opening_loc = *opening_loc;
23971 RNODE_REGX(new_node)->content_loc = *content_loc;
23972 RNODE_REGX(new_node)->closing_loc = *closing_loc;
23973 RNODE_STR(node)->string = 0;
23974
23975 return new_node;
23976}
23977
23978static NODE *
23979evstr2dstr(struct parser_params *p, NODE *node)
23980{
23981 if (nd_type_p(node, NODE_EVSTR)) {
23982 node = new_dstr(p, node, &node->nd_loc);
23983 }
23984 return node;
23985}
23986
23987static NODE *
23988new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23989{
23990 NODE *head = node;
23991
23992 if (node) {
23993 switch (nd_type(node)) {
23994 case NODE_STR:
23995 return str2dstr(p, node);
23996 case NODE_DSTR:
23997 break;
23998 case NODE_EVSTR:
23999 return node;
24000 }
24001 }
24002 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24003}
24004
24005static NODE *
24006new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24007{
24008 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24009 return list_append(p, dstr, node);
24010}
24011
24012static NODE *
24013call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24014 const YYLTYPE *op_loc, const YYLTYPE *loc)
24015{
24016 NODE *expr;
24017 value_expr(recv);
24018 value_expr(arg1);
24019 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24020 nd_set_line(expr, op_loc->beg_pos.lineno);
24021 return expr;
24022}
24023
24024static NODE *
24025call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24026{
24027 NODE *opcall;
24028 value_expr(recv);
24029 opcall = NEW_OPCALL(recv, id, 0, loc);
24030 nd_set_line(opcall, op_loc->beg_pos.lineno);
24031 return opcall;
24032}
24033
24034static NODE *
24035new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24036{
24037 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24038 nd_set_line(qcall, op_loc->beg_pos.lineno);
24039 return qcall;
24040}
24041
24042static NODE*
24043new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24044{
24045 NODE *ret;
24046 if (block) block_dup_check(p, args, block);
24047 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24048 if (block) ret = method_add_block(p, ret, block, loc);
24049 fixpos(ret, recv);
24050 return ret;
24051}
24052
24054new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24055{
24057 body->node = node;
24058 body->opening_loc = *opening_loc;
24059 body->closing_loc = *closing_loc;
24060 return body;
24061}
24062
24063#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24064
24065static NODE*
24066last_expr_once_body(NODE *node)
24067{
24068 if (!node) return 0;
24069 return nd_once_body(node);
24070}
24071
24072static NODE*
24073match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24074{
24075 NODE *n;
24076 int line = op_loc->beg_pos.lineno;
24077
24078 value_expr(node1);
24079 value_expr(node2);
24080
24081 if ((n = last_expr_once_body(node1)) != 0) {
24082 switch (nd_type(n)) {
24083 case NODE_DREGX:
24084 {
24085 NODE *match = NEW_MATCH2(node1, node2, loc);
24086 nd_set_line(match, line);
24087 return match;
24088 }
24089
24090 case NODE_REGX:
24091 {
24092 const VALUE lit = rb_node_regx_string_val(n);
24093 if (!NIL_P(lit)) {
24094 NODE *match = NEW_MATCH2(node1, node2, loc);
24095 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24096 nd_set_line(match, line);
24097 return match;
24098 }
24099 }
24100 }
24101 }
24102
24103 if ((n = last_expr_once_body(node2)) != 0) {
24104 NODE *match3;
24105
24106 switch (nd_type(n)) {
24107 case NODE_DREGX:
24108 match3 = NEW_MATCH3(node2, node1, loc);
24109 return match3;
24110 }
24111 }
24112
24113 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24114 nd_set_line(n, line);
24115 return n;
24116}
24117
24118# if WARN_PAST_SCOPE
24119static int
24120past_dvar_p(struct parser_params *p, ID id)
24121{
24122 struct vtable *past = p->lvtbl->past;
24123 while (past) {
24124 if (vtable_included(past, id)) return 1;
24125 past = past->prev;
24126 }
24127 return 0;
24128}
24129# endif
24130
24131static int
24132numparam_nested_p(struct parser_params *p)
24133{
24134 struct local_vars *local = p->lvtbl;
24135 NODE *outer = local->numparam.outer;
24136 NODE *inner = local->numparam.inner;
24137 if (outer || inner) {
24138 NODE *used = outer ? outer : inner;
24139 compile_error(p, "numbered parameter is already used in\n"
24140 "%s:%d: %s block here",
24141 p->ruby_sourcefile, nd_line(used),
24142 outer ? "outer" : "inner");
24143 parser_show_error_line(p, &used->nd_loc);
24144 return 1;
24145 }
24146 return 0;
24147}
24148
24149static int
24150numparam_used_p(struct parser_params *p)
24151{
24152 NODE *numparam = p->lvtbl->numparam.current;
24153 if (numparam) {
24154 compile_error(p, "numbered parameter is already used in\n"
24155 "%s:%d: current block here",
24156 p->ruby_sourcefile, nd_line(numparam));
24157 parser_show_error_line(p, &numparam->nd_loc);
24158 return 1;
24159 }
24160 return 0;
24161}
24162
24163static int
24164it_used_p(struct parser_params *p)
24165{
24166 NODE *it = p->lvtbl->it;
24167 if (it) {
24168 compile_error(p, "'it' is already used in\n"
24169 "%s:%d: current block here",
24170 p->ruby_sourcefile, nd_line(it));
24171 parser_show_error_line(p, &it->nd_loc);
24172 return 1;
24173 }
24174 return 0;
24175}
24176
24177static NODE*
24178gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24179{
24180 ID *vidp = NULL;
24181 NODE *node;
24182 switch (id) {
24183 case keyword_self:
24184 return NEW_SELF(loc);
24185 case keyword_nil:
24186 return NEW_NIL(loc);
24187 case keyword_true:
24188 return NEW_TRUE(loc);
24189 case keyword_false:
24190 return NEW_FALSE(loc);
24191 case keyword__FILE__:
24192 {
24193 VALUE file = p->ruby_sourcefile_string;
24194 if (NIL_P(file))
24195 file = rb_str_new(0, 0);
24196 node = NEW_FILE(file, loc);
24197 }
24198 return node;
24199 case keyword__LINE__:
24200 return NEW_LINE(loc);
24201 case keyword__ENCODING__:
24202 return NEW_ENCODING(loc);
24203
24204 }
24205 switch (id_type(id)) {
24206 case ID_LOCAL:
24207 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24208 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24209 if (vidp) *vidp |= LVAR_USED;
24210 node = NEW_DVAR(id, loc);
24211 return node;
24212 }
24213 if (local_id_ref(p, id, &vidp)) {
24214 if (vidp) *vidp |= LVAR_USED;
24215 node = NEW_LVAR(id, loc);
24216 return node;
24217 }
24218 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24219 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24220 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24221 node = NEW_DVAR(id, loc);
24222 struct local_vars *local = p->lvtbl;
24223 if (!local->numparam.current) local->numparam.current = node;
24224 return node;
24225 }
24226# if WARN_PAST_SCOPE
24227 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24228 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24229 }
24230# endif
24231 /* method call without arguments */
24232 if (dyna_in_block(p) && id == rb_intern("it") && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24233 if (numparam_used_p(p)) return 0;
24234 if (p->max_numparam == ORDINAL_PARAM) {
24235 compile_error(p, "ordinary parameter is defined");
24236 return 0;
24237 }
24238 if (!p->it_id) {
24239 p->it_id = internal_id(p);
24240 vtable_add(p->lvtbl->args, p->it_id);
24241 }
24242 NODE *node = NEW_DVAR(p->it_id, loc);
24243 if (!p->lvtbl->it) p->lvtbl->it = node;
24244 return node;
24245 }
24246 return NEW_VCALL(id, loc);
24247 case ID_GLOBAL:
24248 return NEW_GVAR(id, loc);
24249 case ID_INSTANCE:
24250 return NEW_IVAR(id, loc);
24251 case ID_CONST:
24252 return NEW_CONST(id, loc);
24253 case ID_CLASS:
24254 return NEW_CVAR(id, loc);
24255 }
24256 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24257 return 0;
24258}
24259
24260static rb_node_opt_arg_t *
24261opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24262{
24263 rb_node_opt_arg_t *opts = opt_list;
24264 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24265
24266 while (opts->nd_next) {
24267 opts = opts->nd_next;
24268 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24269 }
24270 opts->nd_next = opt;
24271
24272 return opt_list;
24273}
24274
24275static rb_node_kw_arg_t *
24276kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24277{
24278 if (kwlist) {
24279 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24280 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24281 }
24282 return kwlist;
24283}
24284
24285static NODE *
24286new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
24287{
24288 NODE *n = expr;
24289 while (n) {
24290 if (nd_type_p(n, NODE_BEGIN)) {
24291 n = RNODE_BEGIN(n)->nd_body;
24292 }
24293 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24294 n = RNODE_BLOCK(n)->nd_head;
24295 }
24296 else {
24297 break;
24298 }
24299 }
24300 return NEW_DEFINED(n, loc);
24301}
24302
24303static NODE*
24304str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24305{
24306 VALUE lit;
24307 rb_parser_string_t *str = RNODE_STR(node)->string;
24308 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24309 yyerror1(loc, "invalid symbol");
24310 lit = STR_NEW0();
24311 }
24312 else {
24313 lit = rb_str_new_parser_string(str);
24314 }
24315 return NEW_SYM(lit, loc);
24316}
24317
24318static NODE*
24319symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24320{
24321 enum node_type type = nd_type(symbol);
24322 switch (type) {
24323 case NODE_DSTR:
24324 nd_set_type(symbol, NODE_DSYM);
24325 break;
24326 case NODE_STR:
24327 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24328 break;
24329 default:
24330 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24331 }
24332 return list_append(p, symbols, symbol);
24333}
24334
24335static void
24336dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24337{
24338 if (dreg->string) {
24339 reg_fragment_setenc(p, dreg->string, options);
24340 }
24341 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24342 NODE *frag = list->nd_head;
24343 if (nd_type_p(frag, NODE_STR)) {
24344 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24345 }
24346 else if (nd_type_p(frag, NODE_DSTR)) {
24347 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24348 }
24349 }
24350}
24351
24352static NODE *
24353new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24354{
24355 if (!node) {
24356 /* Check string is valid regex */
24357 rb_parser_string_t *str = STRING_NEW0();
24358 reg_compile(p, str, options);
24359 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24360 return node;
24361 }
24362 switch (nd_type(node)) {
24363 case NODE_STR:
24364 {
24365 /* Check string is valid regex */
24366 reg_compile(p, RNODE_STR(node)->string, options);
24367 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24368 }
24369 break;
24370 default:
24371 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24372 /* fall through */
24373 case NODE_DSTR:
24374 nd_set_type(node, NODE_DREGX);
24375 nd_set_loc(node, loc);
24376 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24377 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24378 if (dreg->nd_next) {
24379 dregex_fragment_setenc(p, dreg, options);
24380 }
24381 if (options & RE_OPTION_ONCE) {
24382 node = NEW_ONCE(node, loc);
24383 }
24384 break;
24385 }
24386 return node;
24387}
24388
24389static rb_node_kw_arg_t *
24390new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24391{
24392 if (!k) return 0;
24393 return NEW_KW_ARG((k), loc);
24394}
24395
24396static NODE *
24397new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24398{
24399 if (!node) {
24400 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24401 return xstr;
24402 }
24403 switch (nd_type(node)) {
24404 case NODE_STR:
24405 nd_set_type(node, NODE_XSTR);
24406 nd_set_loc(node, loc);
24407 break;
24408 case NODE_DSTR:
24409 nd_set_type(node, NODE_DXSTR);
24410 nd_set_loc(node, loc);
24411 break;
24412 default:
24413 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24414 break;
24415 }
24416 return node;
24417}
24418
24419static const
24420struct st_hash_type literal_type = {
24421 literal_cmp,
24422 literal_hash,
24423};
24424
24425static int nd_type_st_key_enable_p(NODE *node);
24426
24427static void
24428check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24429{
24430 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24431 if (!arg || !p->case_labels) return;
24432 if (!nd_type_st_key_enable_p(arg)) return;
24433
24434 if (p->case_labels == CHECK_LITERAL_WHEN) {
24435 p->case_labels = st_init_table(&literal_type);
24436 }
24437 else {
24438 st_data_t line;
24439 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24440 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24441 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24442 return;
24443 }
24444 }
24445 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24446}
24447
24448#ifdef RIPPER
24449static int
24450id_is_var(struct parser_params *p, ID id)
24451{
24452 if (is_notop_id(id)) {
24453 switch (id & ID_SCOPE_MASK) {
24454 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24455 return 1;
24456 case ID_LOCAL:
24457 if (dyna_in_block(p)) {
24458 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24459 }
24460 if (local_id(p, id)) return 1;
24461 /* method call without arguments */
24462 return 0;
24463 }
24464 }
24465 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24466 return 0;
24467}
24468#endif
24469
24470static inline enum lex_state_e
24471parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24472{
24473 if (p->debug) {
24474 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24475 }
24476 return p->lex.state = ls;
24477}
24478
24479#ifndef RIPPER
24480static void
24481flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24482{
24483 VALUE mesg = p->debug_buffer;
24484
24485 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24486 p->debug_buffer = Qnil;
24487 rb_io_puts(1, &mesg, out);
24488 }
24489 if (!NIL_P(str) && RSTRING_LEN(str)) {
24490 rb_io_write(p->debug_output, str);
24491 }
24492}
24493
24494static const char rb_parser_lex_state_names[][8] = {
24495 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24496 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24497 "LABEL", "LABELED","FITEM",
24498};
24499
24500static VALUE
24501append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24502{
24503 int i, sep = 0;
24504 unsigned int mask = 1;
24505 static const char none[] = "NONE";
24506
24507 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24508 if ((unsigned)state & mask) {
24509 if (sep) {
24510 rb_str_cat(buf, "|", 1);
24511 }
24512 sep = 1;
24513 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24514 }
24515 }
24516 if (!sep) {
24517 rb_str_cat(buf, none, sizeof(none)-1);
24518 }
24519 return buf;
24520}
24521
24522enum lex_state_e
24523rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24524 enum lex_state_e to, int line)
24525{
24526 VALUE mesg;
24527 mesg = rb_str_new_cstr("lex_state: ");
24528 append_lex_state_name(p, from, mesg);
24529 rb_str_cat_cstr(mesg, " -> ");
24530 append_lex_state_name(p, to, mesg);
24531 rb_str_catf(mesg, " at line %d\n", line);
24532 flush_debug_buffer(p, p->debug_output, mesg);
24533 return to;
24534}
24535
24536VALUE
24537rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24538{
24539 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24540}
24541
24542static void
24543append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24544{
24545 if (stack == 0) {
24546 rb_str_cat_cstr(mesg, "0");
24547 }
24548 else {
24549 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24550 for (; mask && !(stack & mask); mask >>= 1) continue;
24551 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24552 }
24553}
24554
24555void
24556rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24557 const char *name, int line)
24558{
24559 VALUE mesg = rb_sprintf("%s: ", name);
24560 append_bitstack_value(p, stack, mesg);
24561 rb_str_catf(mesg, " at line %d\n", line);
24562 flush_debug_buffer(p, p->debug_output, mesg);
24563}
24564
24565void
24566rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24567{
24568 va_list ap;
24569 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24570
24571 va_start(ap, fmt);
24572 rb_str_vcatf(mesg, fmt, ap);
24573 va_end(ap);
24574 yyerror0(RSTRING_PTR(mesg));
24575 RB_GC_GUARD(mesg);
24576
24577 mesg = rb_str_new(0, 0);
24578 append_lex_state_name(p, p->lex.state, mesg);
24579 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24580 rb_str_resize(mesg, 0);
24581 append_bitstack_value(p, p->cond_stack, mesg);
24582 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24583 rb_str_resize(mesg, 0);
24584 append_bitstack_value(p, p->cmdarg_stack, mesg);
24585 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24586 if (p->debug_output == rb_ractor_stdout())
24587 p->debug_output = rb_ractor_stderr();
24588 p->debug = TRUE;
24589}
24590
24591static YYLTYPE *
24592rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24593{
24594 yylloc->beg_pos.lineno = sourceline;
24595 yylloc->beg_pos.column = beg_pos;
24596 yylloc->end_pos.lineno = sourceline;
24597 yylloc->end_pos.column = end_pos;
24598 return yylloc;
24599}
24600
24601YYLTYPE *
24602rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24603{
24604 int sourceline = here->sourceline;
24605 int beg_pos = (int)here->offset - here->quote
24606 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24607 int end_pos = (int)here->offset + here->length + here->quote;
24608
24609 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24610}
24611
24612YYLTYPE *
24613rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24614{
24615 yylloc->beg_pos.lineno = p->delayed.beg_line;
24616 yylloc->beg_pos.column = p->delayed.beg_col;
24617 yylloc->end_pos.lineno = p->delayed.end_line;
24618 yylloc->end_pos.column = p->delayed.end_col;
24619
24620 return yylloc;
24621}
24622
24623YYLTYPE *
24624rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24625{
24626 int sourceline = p->ruby_sourceline;
24627 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24628 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24629 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24630}
24631
24632YYLTYPE *
24633rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24634{
24635 yylloc->end_pos = yylloc->beg_pos;
24636
24637 return yylloc;
24638}
24639
24640YYLTYPE *
24641rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24642{
24643 int sourceline = p->ruby_sourceline;
24644 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24645 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24646 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24647}
24648
24649YYLTYPE *
24650rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24651{
24652 int sourceline = p->ruby_sourceline;
24653 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24654 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24655 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24656}
24657#endif /* !RIPPER */
24658
24659static int
24660assignable0(struct parser_params *p, ID id, const char **err)
24661{
24662 if (!id) return -1;
24663 switch (id) {
24664 case keyword_self:
24665 *err = "Can't change the value of self";
24666 return -1;
24667 case keyword_nil:
24668 *err = "Can't assign to nil";
24669 return -1;
24670 case keyword_true:
24671 *err = "Can't assign to true";
24672 return -1;
24673 case keyword_false:
24674 *err = "Can't assign to false";
24675 return -1;
24676 case keyword__FILE__:
24677 *err = "Can't assign to __FILE__";
24678 return -1;
24679 case keyword__LINE__:
24680 *err = "Can't assign to __LINE__";
24681 return -1;
24682 case keyword__ENCODING__:
24683 *err = "Can't assign to __ENCODING__";
24684 return -1;
24685 }
24686 switch (id_type(id)) {
24687 case ID_LOCAL:
24688 if (dyna_in_block(p)) {
24689 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24690 compile_error(p, "Can't assign to numbered parameter _%d",
24691 NUMPARAM_ID_TO_IDX(id));
24692 return -1;
24693 }
24694 if (dvar_curr(p, id)) return NODE_DASGN;
24695 if (dvar_defined(p, id)) return NODE_DASGN;
24696 if (local_id(p, id)) return NODE_LASGN;
24697 dyna_var(p, id);
24698 return NODE_DASGN;
24699 }
24700 else {
24701 if (!local_id(p, id)) local_var(p, id);
24702 return NODE_LASGN;
24703 }
24704 break;
24705 case ID_GLOBAL: return NODE_GASGN;
24706 case ID_INSTANCE: return NODE_IASGN;
24707 case ID_CONST:
24708 if (!p->ctxt.in_def) return NODE_CDECL;
24709 *err = "dynamic constant assignment";
24710 return -1;
24711 case ID_CLASS: return NODE_CVASGN;
24712 default:
24713 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24714 }
24715 return -1;
24716}
24717
24718static NODE*
24719assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24720{
24721 const char *err = 0;
24722 int node_type = assignable0(p, id, &err);
24723 switch (node_type) {
24724 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24725 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24726 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24727 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24728 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24729 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24730 }
24731/* TODO: FIXME */
24732#ifndef RIPPER
24733 if (err) yyerror1(loc, err);
24734#else
24735 if (err) set_value(assign_error(p, err, p->s_lvalue));
24736#endif
24737 return NEW_ERROR(loc);
24738}
24739
24740static int
24741is_private_local_id(struct parser_params *p, ID name)
24742{
24743 VALUE s;
24744 if (name == idUScore) return 1;
24745 if (!is_local_id(name)) return 0;
24746 s = rb_id2str(name);
24747 if (!s) return 0;
24748 return RSTRING_PTR(s)[0] == '_';
24749}
24750
24751static int
24752shadowing_lvar_0(struct parser_params *p, ID name)
24753{
24754 if (dyna_in_block(p)) {
24755 if (dvar_curr(p, name)) {
24756 if (is_private_local_id(p, name)) return 1;
24757 yyerror0("duplicated argument name");
24758 }
24759 else if (dvar_defined(p, name) || local_id(p, name)) {
24760 vtable_add(p->lvtbl->vars, name);
24761 if (p->lvtbl->used) {
24762 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24763 }
24764 return 0;
24765 }
24766 }
24767 else {
24768 if (local_id(p, name)) {
24769 if (is_private_local_id(p, name)) return 1;
24770 yyerror0("duplicated argument name");
24771 }
24772 }
24773 return 1;
24774}
24775
24776static ID
24777shadowing_lvar(struct parser_params *p, ID name)
24778{
24779 shadowing_lvar_0(p, name);
24780 return name;
24781}
24782
24783static void
24784new_bv(struct parser_params *p, ID name)
24785{
24786 if (!name) return;
24787 if (!is_local_id(name)) {
24788 compile_error(p, "invalid local variable - %"PRIsVALUE,
24789 rb_id2str(name));
24790 return;
24791 }
24792 if (!shadowing_lvar_0(p, name)) return;
24793 dyna_var(p, name);
24794 ID *vidp = 0;
24795 if (dvar_defined_ref(p, name, &vidp)) {
24796 if (vidp) *vidp |= LVAR_USED;
24797 }
24798}
24799
24800static void
24801aryset_check(struct parser_params *p, NODE *args)
24802{
24803 NODE *block = 0, *kwds = 0;
24804 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
24805 block = RNODE_BLOCK_PASS(args)->nd_body;
24806 args = RNODE_BLOCK_PASS(args)->nd_head;
24807 }
24808 if (args && nd_type_p(args, NODE_ARGSCAT)) {
24809 args = RNODE_ARGSCAT(args)->nd_body;
24810 }
24811 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
24812 kwds = RNODE_ARGSPUSH(args)->nd_body;
24813 }
24814 else {
24815 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
24816 next = RNODE_LIST(next)->nd_next) {
24817 kwds = RNODE_LIST(next)->nd_head;
24818 }
24819 }
24820 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
24821 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
24822 }
24823 if (block) {
24824 yyerror1(&block->nd_loc, "block arg given in index assignment");
24825 }
24826}
24827
24828static NODE *
24829aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
24830{
24831 aryset_check(p, idx);
24832 return NEW_ATTRASGN(recv, tASET, idx, loc);
24833}
24834
24835static void
24836block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
24837{
24838 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
24839 compile_error(p, "both block arg and actual block given");
24840 }
24841}
24842
24843static NODE *
24844attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
24845{
24846 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
24847 return NEW_ATTRASGN(recv, id, 0, loc);
24848}
24849
24850static VALUE
24851rb_backref_error(struct parser_params *p, NODE *node)
24852{
24853#ifndef RIPPER
24854# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
24855#else
24856# define ERR(...) rb_sprintf(__VA_ARGS__)
24857#endif
24858 switch (nd_type(node)) {
24859 case NODE_NTH_REF:
24860 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
24861 case NODE_BACK_REF:
24862 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
24863 }
24864#undef ERR
24865 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
24866}
24867
24868static NODE *
24869arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24870{
24871 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
24872 switch (nd_type(node1)) {
24873 case NODE_LIST:
24874 return list_append(p, node1, node2);
24875 case NODE_BLOCK_PASS:
24876 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24877 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
24878 return node1;
24879 case NODE_ARGSPUSH:
24880 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
24881 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
24882 nd_set_type(node1, NODE_ARGSCAT);
24883 return node1;
24884 case NODE_ARGSCAT:
24885 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24886 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
24887 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
24888 return node1;
24889 }
24890 return NEW_ARGSPUSH(node1, node2, loc);
24891}
24892
24893static NODE *
24894arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24895{
24896 if (!node2) return node1;
24897 switch (nd_type(node1)) {
24898 case NODE_BLOCK_PASS:
24899 if (RNODE_BLOCK_PASS(node1)->nd_head)
24900 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24901 else
24902 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
24903 return node1;
24904 case NODE_ARGSPUSH:
24905 if (!nd_type_p(node2, NODE_LIST)) break;
24906 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
24907 nd_set_type(node1, NODE_ARGSCAT);
24908 return node1;
24909 case NODE_ARGSCAT:
24910 if (!nd_type_p(node2, NODE_LIST) ||
24911 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24912 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
24913 return node1;
24914 }
24915 return NEW_ARGSCAT(node1, node2, loc);
24916}
24917
24918static NODE *
24919last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
24920{
24921 NODE *n1;
24922 if ((n1 = splat_array(args)) != 0) {
24923 return list_append(p, n1, last_arg);
24924 }
24925 return arg_append(p, args, last_arg, loc);
24926}
24927
24928static NODE *
24929rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
24930{
24931 NODE *n1;
24932 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
24933 return list_concat(n1, rest_arg);
24934 }
24935 return arg_concat(p, args, rest_arg, loc);
24936}
24937
24938static NODE *
24939splat_array(NODE* node)
24940{
24941 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
24942 if (nd_type_p(node, NODE_LIST)) return node;
24943 return 0;
24944}
24945
24946static void
24947mark_lvar_used(struct parser_params *p, NODE *rhs)
24948{
24949 ID *vidp = NULL;
24950 if (!rhs) return;
24951 switch (nd_type(rhs)) {
24952 case NODE_LASGN:
24953 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
24954 if (vidp) *vidp |= LVAR_USED;
24955 }
24956 break;
24957 case NODE_DASGN:
24958 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
24959 if (vidp) *vidp |= LVAR_USED;
24960 }
24961 break;
24962#if 0
24963 case NODE_MASGN:
24964 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
24965 mark_lvar_used(p, rhs->nd_head);
24966 }
24967 break;
24968#endif
24969 }
24970}
24971
24972static int is_static_content(NODE *node);
24973
24974static NODE *
24975node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
24976{
24977 if (!lhs) return 0;
24978
24979 switch (nd_type(lhs)) {
24980 case NODE_CDECL:
24981 case NODE_GASGN:
24982 case NODE_IASGN:
24983 case NODE_LASGN:
24984 case NODE_DASGN:
24985 case NODE_MASGN:
24986 case NODE_CVASGN:
24987 set_nd_value(p, lhs, rhs);
24988 nd_set_loc(lhs, loc);
24989 break;
24990
24991 case NODE_ATTRASGN:
24992 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
24993 nd_set_loc(lhs, loc);
24994 break;
24995
24996 default:
24997 /* should not happen */
24998 break;
24999 }
25000
25001 return lhs;
25002}
25003
25004static NODE *
25005value_expr_check(struct parser_params *p, NODE *node)
25006{
25007 NODE *void_node = 0, *vn;
25008
25009 if (!node) {
25010 rb_warning0("empty expression");
25011 }
25012 while (node) {
25013 switch (nd_type(node)) {
25014 case NODE_ENSURE:
25015 vn = RNODE_ENSURE(node)->nd_head;
25016 node = RNODE_ENSURE(node)->nd_ensr;
25017 /* nd_ensr should not be NULL, check it out next */
25018 if (vn && (vn = value_expr_check(p, vn))) {
25019 goto found;
25020 }
25021 break;
25022
25023 case NODE_RESCUE:
25024 /* void only if all children are void */
25025 vn = RNODE_RESCUE(node)->nd_head;
25026 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
25027 if (!void_node) void_node = vn;
25028 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25029 if (!nd_type_p(r, NODE_RESBODY)) {
25030 compile_error(p, "unexpected node");
25031 return NULL;
25032 }
25033 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25034 void_node = 0;
25035 break;
25036 }
25037 if (!void_node) void_node = vn;
25038 }
25039 node = RNODE_RESCUE(node)->nd_else;
25040 if (!node) return void_node;
25041 break;
25042
25043 case NODE_RETURN:
25044 case NODE_BREAK:
25045 case NODE_NEXT:
25046 case NODE_REDO:
25047 case NODE_RETRY:
25048 goto found;
25049
25050 case NODE_CASE3:
25051 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
25052 compile_error(p, "unexpected node");
25053 return NULL;
25054 }
25055 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
25056 return NULL;
25057 }
25058 /* single line pattern matching with "=>" operator */
25059 goto found;
25060
25061 case NODE_BLOCK:
25062 while (RNODE_BLOCK(node)->nd_next) {
25063 node = RNODE_BLOCK(node)->nd_next;
25064 }
25065 node = RNODE_BLOCK(node)->nd_head;
25066 break;
25067
25068 case NODE_BEGIN:
25069 node = RNODE_BEGIN(node)->nd_body;
25070 break;
25071
25072 case NODE_IF:
25073 case NODE_UNLESS:
25074 if (!RNODE_IF(node)->nd_body) {
25075 return NULL;
25076 }
25077 else if (!RNODE_IF(node)->nd_else) {
25078 return NULL;
25079 }
25080 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25081 if (!vn) return NULL;
25082 if (!void_node) void_node = vn;
25083 node = RNODE_IF(node)->nd_else;
25084 break;
25085
25086 case NODE_AND:
25087 case NODE_OR:
25088 node = RNODE_AND(node)->nd_1st;
25089 break;
25090
25091 case NODE_LASGN:
25092 case NODE_DASGN:
25093 case NODE_MASGN:
25094 mark_lvar_used(p, node);
25095 return NULL;
25096
25097 default:
25098 return NULL;
25099 }
25100 }
25101
25102 return NULL;
25103
25104 found:
25105 /* return the first found node */
25106 return void_node ? void_node : node;
25107}
25108
25109static int
25110value_expr_gen(struct parser_params *p, NODE *node)
25111{
25112 NODE *void_node = value_expr_check(p, node);
25113 if (void_node) {
25114 yyerror1(&void_node->nd_loc, "void value expression");
25115 /* or "control never reach"? */
25116 return FALSE;
25117 }
25118 return TRUE;
25119}
25120
25121static void
25122void_expr(struct parser_params *p, NODE *node)
25123{
25124 const char *useless = 0;
25125
25126 if (!RTEST(ruby_verbose)) return;
25127
25128 if (!node || !(node = nd_once_body(node))) return;
25129 switch (nd_type(node)) {
25130 case NODE_OPCALL:
25131 switch (RNODE_OPCALL(node)->nd_mid) {
25132 case '+':
25133 case '-':
25134 case '*':
25135 case '/':
25136 case '%':
25137 case tPOW:
25138 case tUPLUS:
25139 case tUMINUS:
25140 case '|':
25141 case '^':
25142 case '&':
25143 case tCMP:
25144 case '>':
25145 case tGEQ:
25146 case '<':
25147 case tLEQ:
25148 case tEQ:
25149 case tNEQ:
25150 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25151 break;
25152 }
25153 break;
25154
25155 case NODE_LVAR:
25156 case NODE_DVAR:
25157 case NODE_GVAR:
25158 case NODE_IVAR:
25159 case NODE_CVAR:
25160 case NODE_NTH_REF:
25161 case NODE_BACK_REF:
25162 useless = "a variable";
25163 break;
25164 case NODE_CONST:
25165 useless = "a constant";
25166 break;
25167 case NODE_SYM:
25168 case NODE_LINE:
25169 case NODE_FILE:
25170 case NODE_ENCODING:
25171 case NODE_INTEGER:
25172 case NODE_FLOAT:
25173 case NODE_RATIONAL:
25174 case NODE_IMAGINARY:
25175 case NODE_STR:
25176 case NODE_DSTR:
25177 case NODE_REGX:
25178 case NODE_DREGX:
25179 useless = "a literal";
25180 break;
25181 case NODE_COLON2:
25182 case NODE_COLON3:
25183 useless = "::";
25184 break;
25185 case NODE_DOT2:
25186 useless = "..";
25187 break;
25188 case NODE_DOT3:
25189 useless = "...";
25190 break;
25191 case NODE_SELF:
25192 useless = "self";
25193 break;
25194 case NODE_NIL:
25195 useless = "nil";
25196 break;
25197 case NODE_TRUE:
25198 useless = "true";
25199 break;
25200 case NODE_FALSE:
25201 useless = "false";
25202 break;
25203 case NODE_DEFINED:
25204 useless = "defined?";
25205 break;
25206 }
25207
25208 if (useless) {
25209 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25210 }
25211}
25212
25213/* warns useless use of block and returns the last statement node */
25214static NODE *
25215void_stmts(struct parser_params *p, NODE *node)
25216{
25217 NODE *const n = node;
25218 if (!RTEST(ruby_verbose)) return n;
25219 if (!node) return n;
25220 if (!nd_type_p(node, NODE_BLOCK)) return n;
25221
25222 while (RNODE_BLOCK(node)->nd_next) {
25223 void_expr(p, RNODE_BLOCK(node)->nd_head);
25224 node = RNODE_BLOCK(node)->nd_next;
25225 }
25226 return RNODE_BLOCK(node)->nd_head;
25227}
25228
25229static NODE *
25230remove_begin(NODE *node)
25231{
25232 NODE **n = &node, *n1 = node;
25233 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25234 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25235 }
25236 return node;
25237}
25238
25239static void
25240reduce_nodes(struct parser_params *p, NODE **body)
25241{
25242 NODE *node = *body;
25243
25244 if (!node) {
25245 *body = NEW_NIL(&NULL_LOC);
25246 return;
25247 }
25248#define subnodes(type, n1, n2) \
25249 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25250 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25251 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25252
25253 while (node) {
25254 int newline = (int)nd_fl_newline(node);
25255 switch (nd_type(node)) {
25256 end:
25257 case NODE_NIL:
25258 *body = 0;
25259 return;
25260 case NODE_BEGIN:
25261 *body = node = RNODE_BEGIN(node)->nd_body;
25262 if (newline && node) nd_set_fl_newline(node);
25263 continue;
25264 case NODE_BLOCK:
25265 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25266 break;
25267 case NODE_IF:
25268 case NODE_UNLESS:
25269 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25270 return;
25271 case NODE_CASE:
25272 body = &RNODE_CASE(node)->nd_body;
25273 break;
25274 case NODE_WHEN:
25275 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25276 break;
25277 case NODE_ENSURE:
25278 body = &RNODE_ENSURE(node)->nd_head;
25279 break;
25280 case NODE_RESCUE:
25281 newline = 0; // RESBODY should not be a NEWLINE
25282 if (RNODE_RESCUE(node)->nd_else) {
25283 body = &RNODE_RESCUE(node)->nd_resq;
25284 break;
25285 }
25286 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25287 break;
25288 default:
25289 return;
25290 }
25291 node = *body;
25292 if (newline && node) nd_set_fl_newline(node);
25293 }
25294
25295#undef subnodes
25296}
25297
25298static int
25299is_static_content(NODE *node)
25300{
25301 if (!node) return 1;
25302 switch (nd_type(node)) {
25303 case NODE_HASH:
25304 if (!(node = RNODE_HASH(node)->nd_head)) break;
25305 case NODE_LIST:
25306 do {
25307 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25308 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25309 case NODE_SYM:
25310 case NODE_REGX:
25311 case NODE_LINE:
25312 case NODE_FILE:
25313 case NODE_ENCODING:
25314 case NODE_INTEGER:
25315 case NODE_FLOAT:
25316 case NODE_RATIONAL:
25317 case NODE_IMAGINARY:
25318 case NODE_STR:
25319 case NODE_NIL:
25320 case NODE_TRUE:
25321 case NODE_FALSE:
25322 case NODE_ZLIST:
25323 break;
25324 default:
25325 return 0;
25326 }
25327 return 1;
25328}
25329
25330static int
25331assign_in_cond(struct parser_params *p, NODE *node)
25332{
25333 switch (nd_type(node)) {
25334 case NODE_MASGN:
25335 case NODE_LASGN:
25336 case NODE_DASGN:
25337 case NODE_GASGN:
25338 case NODE_IASGN:
25339 case NODE_CVASGN:
25340 case NODE_CDECL:
25341 break;
25342
25343 default:
25344 return 0;
25345 }
25346
25347 if (!get_nd_value(p, node)) return 1;
25348 if (is_static_content(get_nd_value(p, node))) {
25349 /* reports always */
25350 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25351 }
25352 return 1;
25353}
25354
25355enum cond_type {
25356 COND_IN_OP,
25357 COND_IN_COND,
25358 COND_IN_FF
25359};
25360
25361#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25362 switch (t) { \
25363 case COND_IN_OP: break; \
25364 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25365 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25366 } \
25367} while (0)
25368
25369static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25370
25371static NODE*
25372range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25373{
25374 enum node_type type;
25375
25376 if (node == 0) return 0;
25377
25378 type = nd_type(node);
25379 value_expr(node);
25380 if (type == NODE_INTEGER) {
25381 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25382 ID lineno = rb_intern("$.");
25383 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25384 }
25385 return cond0(p, node, COND_IN_FF, loc, true);
25386}
25387
25388static NODE*
25389cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25390{
25391 if (node == 0) return 0;
25392 if (!(node = nd_once_body(node))) return 0;
25393 assign_in_cond(p, node);
25394
25395 switch (nd_type(node)) {
25396 case NODE_BEGIN:
25397 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25398 break;
25399
25400 case NODE_DSTR:
25401 case NODE_EVSTR:
25402 case NODE_STR:
25403 case NODE_FILE:
25404 SWITCH_BY_COND_TYPE(type, warn, "string ");
25405 break;
25406
25407 case NODE_REGX:
25408 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25409 nd_set_type(node, NODE_MATCH);
25410 break;
25411
25412 case NODE_DREGX:
25413 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25414
25415 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25416
25417 case NODE_BLOCK:
25418 {
25419 NODE *end = RNODE_BLOCK(node)->nd_end;
25420 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25421 if (top) top = node == end;
25422 *expr = cond0(p, *expr, type, loc, top);
25423 }
25424 break;
25425
25426 case NODE_AND:
25427 case NODE_OR:
25428 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25429 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25430 break;
25431
25432 case NODE_DOT2:
25433 case NODE_DOT3:
25434 if (!top) break;
25435 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25436 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25437 switch (nd_type(node)) {
25438 case NODE_DOT2:
25439 nd_set_type(node,NODE_FLIP2);
25440 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25441 (void)flip2;
25442 break;
25443 case NODE_DOT3:
25444 nd_set_type(node, NODE_FLIP3);
25445 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25446 (void)flip3;
25447 break;
25448 }
25449 break;
25450
25451 case NODE_SYM:
25452 case NODE_DSYM:
25453 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25454 break;
25455
25456 case NODE_LINE:
25457 case NODE_ENCODING:
25458 case NODE_INTEGER:
25459 case NODE_FLOAT:
25460 case NODE_RATIONAL:
25461 case NODE_IMAGINARY:
25462 SWITCH_BY_COND_TYPE(type, warning, "");
25463 break;
25464
25465 default:
25466 break;
25467 }
25468 return node;
25469}
25470
25471static NODE*
25472cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25473{
25474 if (node == 0) return 0;
25475 return cond0(p, node, COND_IN_COND, loc, true);
25476}
25477
25478static NODE*
25479method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25480{
25481 if (node == 0) return 0;
25482 return cond0(p, node, COND_IN_OP, loc, true);
25483}
25484
25485static NODE*
25486new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25487{
25488 YYLTYPE loc = {*pos, *pos};
25489 return NEW_NIL(&loc);
25490}
25491
25492static NODE*
25493new_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)
25494{
25495 if (!cc) return right;
25496 cc = cond0(p, cc, COND_IN_COND, loc, true);
25497 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25498}
25499
25500static NODE*
25501new_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)
25502{
25503 if (!cc) return right;
25504 cc = cond0(p, cc, COND_IN_COND, loc, true);
25505 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25506}
25507
25508#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))
25509
25510static NODE*
25511logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25512 const YYLTYPE *op_loc, const YYLTYPE *loc)
25513{
25514 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25515 NODE *op;
25516 value_expr(left);
25517 if (left && nd_type_p(left, type)) {
25518 NODE *node = left, *second;
25519 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25520 node = second;
25521 }
25522 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25523 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25524 left->nd_loc.end_pos = loc->end_pos;
25525 return left;
25526 }
25527 op = NEW_AND_OR(type, left, right, loc, op_loc);
25528 nd_set_line(op, op_loc->beg_pos.lineno);
25529 return op;
25530}
25531
25532#undef NEW_AND_OR
25533
25534static void
25535no_blockarg(struct parser_params *p, NODE *node)
25536{
25537 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25538 compile_error(p, "block argument should not be given");
25539 }
25540}
25541
25542static NODE *
25543ret_args(struct parser_params *p, NODE *node)
25544{
25545 if (node) {
25546 no_blockarg(p, node);
25547 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25548 node = RNODE_LIST(node)->nd_head;
25549 }
25550 }
25551 return node;
25552}
25553
25554static NODE*
25555negate_lit(struct parser_params *p, NODE* node)
25556{
25557 switch (nd_type(node)) {
25558 case NODE_INTEGER:
25559 RNODE_INTEGER(node)->minus = TRUE;
25560 break;
25561 case NODE_FLOAT:
25562 RNODE_FLOAT(node)->minus = TRUE;
25563 break;
25564 case NODE_RATIONAL:
25565 RNODE_RATIONAL(node)->minus = TRUE;
25566 break;
25567 case NODE_IMAGINARY:
25568 RNODE_IMAGINARY(node)->minus = TRUE;
25569 break;
25570 }
25571 return node;
25572}
25573
25574static NODE *
25575arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25576{
25577 if (node2) {
25578 if (!node1) return (NODE *)node2;
25579 node2->nd_head = node1;
25580 nd_set_first_lineno(node2, nd_first_lineno(node1));
25581 nd_set_first_column(node2, nd_first_column(node1));
25582 return (NODE *)node2;
25583 }
25584 return node1;
25585}
25586
25587static bool
25588args_info_empty_p(struct rb_args_info *args)
25589{
25590 if (args->pre_args_num) return false;
25591 if (args->post_args_num) return false;
25592 if (args->rest_arg) return false;
25593 if (args->opt_args) return false;
25594 if (args->block_arg) return false;
25595 if (args->kw_args) return false;
25596 if (args->kw_rest_arg) return false;
25597 return true;
25598}
25599
25600static rb_node_args_t *
25601new_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)
25602{
25603 struct rb_args_info *args = &tail->nd_ainfo;
25604
25605 if (args->forwarding) {
25606 if (rest_arg) {
25607 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25608 return tail;
25609 }
25610 rest_arg = idFWD_REST;
25611 }
25612
25613 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25614 args->pre_init = pre_args ? pre_args->nd_next : 0;
25615
25616 args->post_args_num = post_args ? post_args->nd_plen : 0;
25617 args->post_init = post_args ? post_args->nd_next : 0;
25618 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25619
25620 args->rest_arg = rest_arg;
25621
25622 args->opt_args = opt_args;
25623
25624#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25625 args->ruby2_keywords = args->forwarding;
25626#else
25627 args->ruby2_keywords = 0;
25628#endif
25629
25630 nd_set_loc(RNODE(tail), loc);
25631
25632 return tail;
25633}
25634
25635static rb_node_args_t *
25636new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25637{
25638 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25639 struct rb_args_info *args = &node->nd_ainfo;
25640 if (p->error_p) return node;
25641
25642 args->block_arg = block;
25643 args->kw_args = kw_args;
25644
25645 if (kw_args) {
25646 /*
25647 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25648 * variable order: k1, kr1, k2, &b, internal_id, krest
25649 * #=> <reorder>
25650 * variable order: kr1, k1, k2, internal_id, krest, &b
25651 */
25652 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25653 struct vtable *vtargs = p->lvtbl->args;
25654 rb_node_kw_arg_t *kwn = kw_args;
25655
25656 if (block) block = vtargs->tbl[vtargs->pos-1];
25657 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25658 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25659 while (kwn) {
25660 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25661 --kw_vars;
25662 --required_kw_vars;
25663 kwn = kwn->nd_next;
25664 }
25665
25666 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25667 ID vid = get_nd_vid(p, kwn->nd_body);
25668 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25669 *required_kw_vars++ = vid;
25670 }
25671 else {
25672 *kw_vars++ = vid;
25673 }
25674 }
25675
25676 arg_var(p, kw_bits);
25677 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25678 if (block) arg_var(p, block);
25679
25680 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25681 }
25682 else if (kw_rest_arg == idNil) {
25683 args->no_kwarg = 1;
25684 }
25685 else if (kw_rest_arg) {
25686 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25687 }
25688
25689 return node;
25690}
25691
25692static rb_node_args_t *
25693args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25694{
25695 if (max_numparam > NO_PARAM || it_id) {
25696 if (!args) {
25697 YYLTYPE loc = RUBY_INIT_YYLLOC();
25698 args = new_args_tail(p, 0, 0, 0, 0);
25699 nd_set_loc(RNODE(args), &loc);
25700 }
25701 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25702 }
25703 return args;
25704}
25705
25706static NODE*
25707new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25708{
25709 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25710
25711 if (pre_arg) {
25712 NODE *pre_args = NEW_LIST(pre_arg, loc);
25713 if (RNODE_ARYPTN(aryptn)->pre_args) {
25714 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25715 }
25716 else {
25717 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25718 }
25719 }
25720 return aryptn;
25721}
25722
25723static NODE*
25724new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25725{
25726 if (has_rest) {
25727 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25728 }
25729 else {
25730 rest_arg = NULL;
25731 }
25732 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25733
25734 return node;
25735}
25736
25737static NODE*
25738new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25739{
25740 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25741
25742 return fndptn;
25743}
25744
25745static NODE*
25746new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25747{
25748 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25749 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25750 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25751
25752 return node;
25753}
25754
25755static NODE*
25756new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25757{
25758 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25759 return hshptn;
25760}
25761
25762static NODE*
25763new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25764{
25765 NODE *node, *kw_rest_arg_node;
25766
25767 if (kw_rest_arg == idNil) {
25768 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25769 }
25770 else if (kw_rest_arg) {
25771 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25772 }
25773 else {
25774 kw_rest_arg_node = NULL;
25775 }
25776
25777 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25778
25779 return node;
25780}
25781
25782static NODE*
25783dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25784{
25785 if (!node) {
25786 return NEW_SYM(STR_NEW0(), loc);
25787 }
25788
25789 switch (nd_type(node)) {
25790 case NODE_DSTR:
25791 nd_set_type(node, NODE_DSYM);
25792 nd_set_loc(node, loc);
25793 break;
25794 case NODE_STR:
25795 node = str_to_sym_node(p, node, loc);
25796 break;
25797 default:
25798 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
25799 break;
25800 }
25801 return node;
25802}
25803
25804static int
25805nd_type_st_key_enable_p(NODE *node)
25806{
25807 switch (nd_type(node)) {
25808 case NODE_INTEGER:
25809 case NODE_FLOAT:
25810 case NODE_RATIONAL:
25811 case NODE_IMAGINARY:
25812 case NODE_STR:
25813 case NODE_SYM:
25814 case NODE_REGX:
25815 case NODE_LINE:
25816 case NODE_FILE:
25817 case NODE_ENCODING:
25818 return true;
25819 default:
25820 return false;
25821 }
25822}
25823
25824static VALUE
25825nd_value(struct parser_params *p, NODE *node)
25826{
25827 switch (nd_type(node)) {
25828 case NODE_STR:
25829 return rb_node_str_string_val(node);
25830 case NODE_INTEGER:
25831 return rb_node_integer_literal_val(node);
25832 case NODE_FLOAT:
25833 return rb_node_float_literal_val(node);
25834 case NODE_RATIONAL:
25835 return rb_node_rational_literal_val(node);
25836 case NODE_IMAGINARY:
25837 return rb_node_imaginary_literal_val(node);
25838 case NODE_SYM:
25839 return rb_node_sym_string_val(node);
25840 case NODE_REGX:
25841 return rb_node_regx_string_val(node);
25842 case NODE_LINE:
25843 return rb_node_line_lineno_val(node);
25844 case NODE_ENCODING:
25845 return rb_node_encoding_val(node);
25846 case NODE_FILE:
25847 return rb_node_file_path_val(node);
25848 default:
25849 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
25851 }
25852}
25853
25854static void
25855warn_duplicate_keys(struct parser_params *p, NODE *hash)
25856{
25857 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25858 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
25859 while (hash && RNODE_LIST(hash)->nd_next) {
25860 NODE *head = RNODE_LIST(hash)->nd_head;
25861 NODE *value = RNODE_LIST(hash)->nd_next;
25862 NODE *next = RNODE_LIST(value)->nd_next;
25863 st_data_t key;
25864 st_data_t data;
25865
25866 /* keyword splat, e.g. {k: 1, **z, k: 2} */
25867 if (!head) {
25868 head = value;
25869 }
25870
25871 if (nd_type_st_key_enable_p(head)) {
25872 key = (st_data_t)head;
25873
25874 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
25875 rb_warn2L(nd_line((NODE *)data),
25876 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
25877 nd_value(p, head), WARN_I(nd_line(head)));
25878 }
25879 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
25880 }
25881 hash = next;
25882 }
25883 st_free_table(p->warn_duplicate_keys_table);
25884 p->warn_duplicate_keys_table = NULL;
25885}
25886
25887static NODE *
25888new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25889{
25890 if (hash) warn_duplicate_keys(p, hash);
25891 return NEW_HASH(hash, loc);
25892}
25893
25894static void
25895error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
25896{
25897 if (is_private_local_id(p, id)) {
25898 return;
25899 }
25900 if (st_is_member(p->pvtbl, id)) {
25901 yyerror1(loc, "duplicated variable name");
25902 }
25903 else {
25904 st_insert(p->pvtbl, (st_data_t)id, 0);
25905 }
25906}
25907
25908static void
25909error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
25910{
25911 if (!p->pktbl) {
25912 p->pktbl = st_init_numtable();
25913 }
25914 else if (st_is_member(p->pktbl, key)) {
25915 yyerror1(loc, "duplicated key name");
25916 return;
25917 }
25918 st_insert(p->pktbl, (st_data_t)key, 0);
25919}
25920
25921static NODE *
25922new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25923{
25924 return NEW_HASH(hash, loc);
25925}
25926
25927static NODE *
25928new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25929{
25930 NODE *asgn;
25931
25932 if (lhs) {
25933 ID vid = get_nd_vid(p, lhs);
25934 YYLTYPE lhs_loc = lhs->nd_loc;
25935 if (op == tOROP) {
25936 set_nd_value(p, lhs, rhs);
25937 nd_set_loc(lhs, loc);
25938 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
25939 }
25940 else if (op == tANDOP) {
25941 set_nd_value(p, lhs, rhs);
25942 nd_set_loc(lhs, loc);
25943 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
25944 }
25945 else {
25946 asgn = lhs;
25947 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
25948 set_nd_value(p, asgn, rhs);
25949 nd_set_loc(asgn, loc);
25950 }
25951 }
25952 else {
25953 asgn = NEW_ERROR(loc);
25954 }
25955 return asgn;
25956}
25957
25958static NODE *
25959new_ary_op_assign(struct parser_params *p, NODE *ary,
25960 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
25961 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
25962{
25963 NODE *asgn;
25964
25965 aryset_check(p, args);
25966 args = make_list(args, args_loc);
25967 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
25968 fixpos(asgn, ary);
25969 return asgn;
25970}
25971
25972static NODE *
25973new_attr_op_assign(struct parser_params *p, NODE *lhs,
25974 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
25975 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
25976{
25977 NODE *asgn;
25978
25979 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
25980 fixpos(asgn, lhs);
25981 return asgn;
25982}
25983
25984static NODE *
25985new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25986{
25987 NODE *asgn;
25988
25989 if (lhs) {
25990 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
25991 }
25992 else {
25993 asgn = NEW_ERROR(loc);
25994 }
25995 fixpos(asgn, lhs);
25996 return asgn;
25997}
25998
25999static NODE *
26000const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26001{
26002 if (p->ctxt.in_def) {
26003#ifndef RIPPER
26004 yyerror1(loc, "dynamic constant assignment");
26005#else
26006 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26007#endif
26008 }
26009 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26010}
26011
26012#ifdef RIPPER
26013static VALUE
26014assign_error(struct parser_params *p, const char *mesg, VALUE a)
26015{
26016 a = dispatch2(assign_error, ERR_MESG(), a);
26017 ripper_error(p);
26018 return a;
26019}
26020#endif
26021
26022static NODE *
26023new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26024{
26025 NODE *result = head;
26026 if (rescue) {
26027 NODE *tmp = rescue_else ? rescue_else : rescue;
26028 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26029
26030 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26031 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26032 }
26033 if (ensure) {
26034 result = NEW_ENSURE(result, ensure, loc);
26035 }
26036 fixpos(result, head);
26037 return result;
26038}
26039
26040static void
26041warn_unused_var(struct parser_params *p, struct local_vars *local)
26042{
26043 int cnt;
26044
26045 if (!local->used) return;
26046 cnt = local->used->pos;
26047 if (cnt != local->vars->pos) {
26048 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26049 }
26050#ifndef RIPPER
26051 ID *v = local->vars->tbl;
26052 ID *u = local->used->tbl;
26053 for (int i = 0; i < cnt; ++i) {
26054 if (!v[i] || (u[i] & LVAR_USED)) continue;
26055 if (is_private_local_id(p, v[i])) continue;
26056 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26057 }
26058#endif
26059}
26060
26061static void
26062local_push(struct parser_params *p, int toplevel_scope)
26063{
26064 struct local_vars *local;
26065 int inherits_dvars = toplevel_scope && compile_for_eval;
26066 int warn_unused_vars = RTEST(ruby_verbose);
26067
26068 local = ALLOC(struct local_vars);
26069 local->prev = p->lvtbl;
26070 local->args = vtable_alloc(0);
26071 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26072#ifndef RIPPER
26073 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26074 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26075#endif
26076 local->numparam.outer = 0;
26077 local->numparam.inner = 0;
26078 local->numparam.current = 0;
26079 local->it = 0;
26080 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26081
26082# if WARN_PAST_SCOPE
26083 local->past = 0;
26084# endif
26085 CMDARG_PUSH(0);
26086 COND_PUSH(0);
26087 p->lvtbl = local;
26088}
26089
26090static void
26091vtable_chain_free(struct parser_params *p, struct vtable *table)
26092{
26093 while (!DVARS_TERMINAL_P(table)) {
26094 struct vtable *cur_table = table;
26095 table = cur_table->prev;
26096 vtable_free(cur_table);
26097 }
26098}
26099
26100static void
26101local_free(struct parser_params *p, struct local_vars *local)
26102{
26103 vtable_chain_free(p, local->used);
26104
26105# if WARN_PAST_SCOPE
26106 vtable_chain_free(p, local->past);
26107# endif
26108
26109 vtable_chain_free(p, local->args);
26110 vtable_chain_free(p, local->vars);
26111
26112 ruby_sized_xfree(local, sizeof(struct local_vars));
26113}
26114
26115static void
26116local_pop(struct parser_params *p)
26117{
26118 struct local_vars *local = p->lvtbl->prev;
26119 if (p->lvtbl->used) {
26120 warn_unused_var(p, p->lvtbl);
26121 }
26122
26123 local_free(p, p->lvtbl);
26124 p->lvtbl = local;
26125
26126 CMDARG_POP();
26127 COND_POP();
26128}
26129
26130static rb_ast_id_table_t *
26131local_tbl(struct parser_params *p)
26132{
26133 int cnt_args = vtable_size(p->lvtbl->args);
26134 int cnt_vars = vtable_size(p->lvtbl->vars);
26135 int cnt = cnt_args + cnt_vars;
26136 int i, j;
26137 rb_ast_id_table_t *tbl;
26138
26139 if (cnt <= 0) return 0;
26140 tbl = rb_ast_new_local_table(p->ast, cnt);
26141 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26142 /* remove IDs duplicated to warn shadowing */
26143 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26144 ID id = p->lvtbl->vars->tbl[i];
26145 if (!vtable_included(p->lvtbl->args, id)) {
26146 tbl->ids[j++] = id;
26147 }
26148 }
26149 if (j < cnt) {
26150 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26151 }
26152
26153 return tbl;
26154}
26155
26156static void
26157numparam_name(struct parser_params *p, ID id)
26158{
26159 if (!NUMPARAM_ID_P(id)) return;
26160 compile_error(p, "_%d is reserved for numbered parameter",
26161 NUMPARAM_ID_TO_IDX(id));
26162}
26163
26164static void
26165arg_var(struct parser_params *p, ID id)
26166{
26167 numparam_name(p, id);
26168 vtable_add(p->lvtbl->args, id);
26169}
26170
26171static void
26172local_var(struct parser_params *p, ID id)
26173{
26174 numparam_name(p, id);
26175 vtable_add(p->lvtbl->vars, id);
26176 if (p->lvtbl->used) {
26177 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26178 }
26179}
26180
26181#ifndef RIPPER
26182int
26183rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26184{
26185 return rb_local_defined(id, iseq);
26186}
26187#endif
26188
26189static int
26190local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26191{
26192 struct vtable *vars, *args, *used;
26193
26194 vars = p->lvtbl->vars;
26195 args = p->lvtbl->args;
26196 used = p->lvtbl->used;
26197
26198 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26199 vars = vars->prev;
26200 args = args->prev;
26201 if (used) used = used->prev;
26202 }
26203
26204 if (vars && vars->prev == DVARS_INHERIT) {
26205 return rb_parser_local_defined(p, id, p->parent_iseq);
26206 }
26207 else if (vtable_included(args, id)) {
26208 return 1;
26209 }
26210 else {
26211 int i = vtable_included(vars, id);
26212 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26213 return i != 0;
26214 }
26215}
26216
26217static int
26218local_id(struct parser_params *p, ID id)
26219{
26220 return local_id_ref(p, id, NULL);
26221}
26222
26223static int
26224check_forwarding_args(struct parser_params *p)
26225{
26226 if (local_id(p, idFWD_ALL)) return TRUE;
26227 compile_error(p, "unexpected ...");
26228 return FALSE;
26229}
26230
26231static void
26232add_forwarding_args(struct parser_params *p)
26233{
26234 arg_var(p, idFWD_REST);
26235#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26236 arg_var(p, idFWD_KWREST);
26237#endif
26238 arg_var(p, idFWD_BLOCK);
26239 arg_var(p, idFWD_ALL);
26240}
26241
26242static void
26243forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26244{
26245 bool conflict = false;
26246
26247 struct vtable *vars, *args;
26248
26249 vars = p->lvtbl->vars;
26250 args = p->lvtbl->args;
26251
26252 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26253 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26254 vars = vars->prev;
26255 args = args->prev;
26256 }
26257
26258 bool found = false;
26259 if (vars && vars->prev == DVARS_INHERIT && !found) {
26260 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26261 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26262 }
26263 else {
26264 found = (vtable_included(args, arg) &&
26265 !(all && vtable_included(args, all)));
26266 }
26267
26268 if (!found) {
26269 compile_error(p, "no anonymous %s parameter", var);
26270 }
26271 else if (conflict) {
26272 compile_error(p, "anonymous %s parameter is also used within block", var);
26273 }
26274}
26275
26276static NODE *
26277new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26278{
26279 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26280#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26281 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26282#endif
26283 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26284 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26285 block->forwarding = TRUE;
26286#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26287 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26288#endif
26289 return arg_blk_pass(args, block);
26290}
26291
26292static NODE *
26293numparam_push(struct parser_params *p)
26294{
26295 struct local_vars *local = p->lvtbl;
26296 NODE *inner = local->numparam.inner;
26297 if (!local->numparam.outer) {
26298 local->numparam.outer = local->numparam.current;
26299 }
26300 local->numparam.inner = 0;
26301 local->numparam.current = 0;
26302 local->it = 0;
26303 return inner;
26304}
26305
26306static void
26307numparam_pop(struct parser_params *p, NODE *prev_inner)
26308{
26309 struct local_vars *local = p->lvtbl;
26310 if (prev_inner) {
26311 /* prefer first one */
26312 local->numparam.inner = prev_inner;
26313 }
26314 else if (local->numparam.current) {
26315 /* current and inner are exclusive */
26316 local->numparam.inner = local->numparam.current;
26317 }
26318 if (p->max_numparam > NO_PARAM) {
26319 /* current and outer are exclusive */
26320 local->numparam.current = local->numparam.outer;
26321 local->numparam.outer = 0;
26322 }
26323 else {
26324 /* no numbered parameter */
26325 local->numparam.current = 0;
26326 }
26327 local->it = 0;
26328}
26329
26330static const struct vtable *
26331dyna_push(struct parser_params *p)
26332{
26333 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26334 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26335 if (p->lvtbl->used) {
26336 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26337 }
26338 return p->lvtbl->args;
26339}
26340
26341static void
26342dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26343{
26344 struct vtable *tmp = *vtblp;
26345 *vtblp = tmp->prev;
26346# if WARN_PAST_SCOPE
26347 if (p->past_scope_enabled) {
26348 tmp->prev = p->lvtbl->past;
26349 p->lvtbl->past = tmp;
26350 return;
26351 }
26352# endif
26353 vtable_free(tmp);
26354}
26355
26356static void
26357dyna_pop_1(struct parser_params *p)
26358{
26359 struct vtable *tmp;
26360
26361 if ((tmp = p->lvtbl->used) != 0) {
26362 warn_unused_var(p, p->lvtbl);
26363 p->lvtbl->used = p->lvtbl->used->prev;
26364 vtable_free(tmp);
26365 }
26366 dyna_pop_vtable(p, &p->lvtbl->args);
26367 dyna_pop_vtable(p, &p->lvtbl->vars);
26368}
26369
26370static void
26371dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26372{
26373 while (p->lvtbl->args != lvargs) {
26374 dyna_pop_1(p);
26375 if (!p->lvtbl->args) {
26376 struct local_vars *local = p->lvtbl->prev;
26377 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26378 p->lvtbl = local;
26379 }
26380 }
26381 dyna_pop_1(p);
26382}
26383
26384static int
26385dyna_in_block(struct parser_params *p)
26386{
26387 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26388}
26389
26390#ifndef RIPPER
26391int
26392dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26393{
26394 struct vtable *vars, *args, *used;
26395 int i;
26396
26397 args = p->lvtbl->args;
26398 vars = p->lvtbl->vars;
26399 used = p->lvtbl->used;
26400
26401 while (!DVARS_TERMINAL_P(vars)) {
26402 if (vtable_included(args, id)) {
26403 return 1;
26404 }
26405 if ((i = vtable_included(vars, id)) != 0) {
26406 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26407 return 1;
26408 }
26409 args = args->prev;
26410 vars = vars->prev;
26411 if (!vidrefp) used = 0;
26412 if (used) used = used->prev;
26413 }
26414
26415 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26416 return rb_dvar_defined(id, p->parent_iseq);
26417 }
26418
26419 return 0;
26420}
26421#endif
26422
26423static int
26424dvar_defined(struct parser_params *p, ID id)
26425{
26426 return dvar_defined_ref(p, id, NULL);
26427}
26428
26429static int
26430dvar_curr(struct parser_params *p, ID id)
26431{
26432 return (vtable_included(p->lvtbl->args, id) ||
26433 vtable_included(p->lvtbl->vars, id));
26434}
26435
26436static void
26437reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26438{
26439 compile_error(p,
26440 "regexp encoding option '%c' differs from source encoding '%s'",
26441 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26442}
26443
26444#ifndef RIPPER
26445static rb_encoding *
26446find_enc(struct parser_params* p, const char *name)
26447{
26448 int idx = rb_enc_find_index(name);
26449 if (idx < 0) {
26450 rb_bug("unknown encoding name: %s", name);
26451 }
26452
26453 return rb_enc_from_index(idx);
26454}
26455
26456static rb_encoding *
26457kcode_to_enc(struct parser_params* p, int kcode)
26458{
26459 rb_encoding *enc;
26460
26461 switch (kcode) {
26462 case ENC_ASCII8BIT:
26463 enc = rb_ascii8bit_encoding();
26464 break;
26465 case ENC_EUC_JP:
26466 enc = find_enc(p, "EUC-JP");
26467 break;
26468 case ENC_Windows_31J:
26469 enc = find_enc(p, "Windows-31J");
26470 break;
26471 case ENC_UTF8:
26472 enc = rb_utf8_encoding();
26473 break;
26474 default:
26475 enc = NULL;
26476 break;
26477 }
26478
26479 return enc;
26480}
26481
26482int
26483rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26484{
26485 int c = RE_OPTION_ENCODING_IDX(options);
26486
26487 if (c) {
26488 int opt, idx;
26489 rb_encoding *enc;
26490
26491 char_to_option_kcode(c, &opt, &idx);
26492 enc = kcode_to_enc(p, idx);
26493 if (enc != rb_parser_str_get_encoding(str) &&
26494 !rb_parser_is_ascii_string(p, str)) {
26495 goto error;
26496 }
26497 rb_parser_string_set_encoding(str, enc);
26498 }
26499 else if (RE_OPTION_ENCODING_NONE(options)) {
26500 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26501 !rb_parser_is_ascii_string(p, str)) {
26502 c = 'n';
26503 goto error;
26504 }
26505 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26506 }
26507 else if (rb_is_usascii_enc(p->enc)) {
26508 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26509 }
26510 return 0;
26511
26512 error:
26513 return c;
26514}
26515#endif
26516
26517static void
26518reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26519{
26520 int c = rb_reg_fragment_setenc(p, str, options);
26521 if (c) reg_fragment_enc_error(p, str, c);
26522}
26523
26524#ifndef UNIVERSAL_PARSER
26525typedef struct {
26526 struct parser_params* parser;
26527 rb_encoding *enc;
26528 NODE *succ_block;
26529 const YYLTYPE *loc;
26530 rb_parser_assignable_func assignable;
26532
26533static int
26534reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26535 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26536{
26538 struct parser_params* p = arg->parser;
26539 rb_encoding *enc = arg->enc;
26540 long len = name_end - name;
26541 const char *s = (const char *)name;
26542
26543 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26544}
26545
26546static NODE *
26547reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26548{
26550
26551 arg.parser = p;
26552 arg.enc = rb_enc_get(regexp);
26553 arg.succ_block = 0;
26554 arg.loc = loc;
26555 arg.assignable = assignable;
26556 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26557
26558 if (!arg.succ_block) return 0;
26559 return RNODE_BLOCK(arg.succ_block)->nd_next;
26560}
26561#endif
26562
26563#ifndef RIPPER
26564NODE *
26565rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26566{
26567 return assignable(p, id, val, loc);
26568}
26569
26570int
26571rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26572 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26573{
26574 ID var;
26575 NODE *node, *succ;
26576
26577 if (!len) return ST_CONTINUE;
26578 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26579 return ST_CONTINUE;
26580
26581 var = intern_cstr(s, len, enc);
26582 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26583 if (!lvar_defined(p, var)) return ST_CONTINUE;
26584 }
26585 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26586 succ = *succ_block;
26587 if (!succ) succ = NEW_ERROR(loc);
26588 succ = block_append(p, succ, node);
26589 *succ_block = succ;
26590 return ST_CONTINUE;
26591}
26592#endif
26593
26594static VALUE
26595parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26596{
26597 VALUE str2;
26598 reg_fragment_setenc(p, str, options);
26599 str2 = rb_str_new_parser_string(str);
26600 return rb_parser_reg_compile(p, str2, options);
26601}
26602
26603#ifndef RIPPER
26604VALUE
26605rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26606{
26607 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26608}
26609#endif
26610
26611static VALUE
26612reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26613{
26614 VALUE re;
26615 VALUE err;
26616
26617 err = rb_errinfo();
26618 re = parser_reg_compile(p, str, options);
26619 if (NIL_P(re)) {
26620 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26621 rb_set_errinfo(err);
26622 compile_error(p, "%"PRIsVALUE, m);
26623 return Qnil;
26624 }
26625 return re;
26626}
26627
26628#ifndef RIPPER
26629void
26630rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26631{
26632 p->do_print = print;
26633 p->do_loop = loop;
26634 p->do_chomp = chomp;
26635 p->do_split = split;
26636}
26637
26638static NODE *
26639parser_append_options(struct parser_params *p, NODE *node)
26640{
26641 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26642 const YYLTYPE *const LOC = &default_location;
26643
26644 if (p->do_print) {
26645 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26646 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26647 LOC);
26648 node = block_append(p, node, print);
26649 }
26650
26651 if (p->do_loop) {
26652 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26653
26654 if (p->do_split) {
26655 ID ifs = rb_intern("$;");
26656 ID fields = rb_intern("$F");
26657 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26658 NODE *split = NEW_GASGN(fields,
26659 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26660 rb_intern("split"), args, LOC),
26661 LOC);
26662 node = block_append(p, split, node);
26663 }
26664 if (p->do_chomp) {
26665 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26666 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26667 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26668 }
26669
26670 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26671 }
26672
26673 return node;
26674}
26675
26676void
26677rb_init_parse(void)
26678{
26679 /* just to suppress unused-function warnings */
26680 (void)nodetype;
26681 (void)nodeline;
26682}
26683
26684ID
26685internal_id(struct parser_params *p)
26686{
26687 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26688}
26689#endif /* !RIPPER */
26690
26691static void
26692parser_initialize(struct parser_params *p)
26693{
26694 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26695 p->command_start = TRUE;
26696 p->ruby_sourcefile_string = Qnil;
26697 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26698 string_buffer_init(p);
26699 p->node_id = 0;
26700 p->delayed.token = NULL;
26701 p->frozen_string_literal = -1; /* not specified */
26702#ifndef RIPPER
26703 p->error_buffer = Qfalse;
26704 p->end_expect_token_locations = NULL;
26705 p->token_id = 0;
26706 p->tokens = NULL;
26707#else
26708 p->result = Qnil;
26709 p->parsing_thread = Qnil;
26710 p->s_value = Qnil;
26711 p->s_lvalue = Qnil;
26712 p->s_value_stack = rb_ary_new();
26713#endif
26714 p->debug_buffer = Qnil;
26715 p->debug_output = rb_ractor_stdout();
26716 p->enc = rb_utf8_encoding();
26717 p->exits = 0;
26718}
26719
26720#ifdef RIPPER
26721#define rb_ruby_parser_mark ripper_parser_mark
26722#define rb_ruby_parser_free ripper_parser_free
26723#define rb_ruby_parser_memsize ripper_parser_memsize
26724#endif
26725
26726void
26727rb_ruby_parser_mark(void *ptr)
26728{
26729 struct parser_params *p = (struct parser_params*)ptr;
26730
26731 rb_gc_mark(p->ruby_sourcefile_string);
26732#ifndef RIPPER
26733 rb_gc_mark(p->error_buffer);
26734#else
26735 rb_gc_mark(p->value);
26736 rb_gc_mark(p->result);
26737 rb_gc_mark(p->parsing_thread);
26738 rb_gc_mark(p->s_value);
26739 rb_gc_mark(p->s_lvalue);
26740 rb_gc_mark(p->s_value_stack);
26741#endif
26742 rb_gc_mark(p->debug_buffer);
26743 rb_gc_mark(p->debug_output);
26744}
26745
26746void
26747rb_ruby_parser_free(void *ptr)
26748{
26749 struct parser_params *p = (struct parser_params*)ptr;
26750 struct local_vars *local, *prev;
26751
26752 if (p->ast) {
26753 rb_ast_free(p->ast);
26754 }
26755
26756 if (p->warn_duplicate_keys_table) {
26757 st_free_table(p->warn_duplicate_keys_table);
26758 }
26759
26760#ifndef RIPPER
26761 if (p->tokens) {
26762 rb_parser_ary_free(p, p->tokens);
26763 }
26764#endif
26765
26766 if (p->tokenbuf) {
26767 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26768 }
26769
26770 for (local = p->lvtbl; local; local = prev) {
26771 prev = local->prev;
26772 local_free(p, local);
26773 }
26774
26775 {
26776 token_info *ptinfo;
26777 while ((ptinfo = p->token_info) != 0) {
26778 p->token_info = ptinfo->next;
26779 xfree(ptinfo);
26780 }
26781 }
26782 string_buffer_free(p);
26783
26784 if (p->pvtbl) {
26785 st_free_table(p->pvtbl);
26786 }
26787
26788 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26789 st_free_table(p->case_labels);
26790 }
26791
26792 xfree(p->lex.strterm);
26793 p->lex.strterm = 0;
26794
26795 xfree(ptr);
26796}
26797
26798size_t
26799rb_ruby_parser_memsize(const void *ptr)
26800{
26801 struct parser_params *p = (struct parser_params*)ptr;
26802 struct local_vars *local;
26803 size_t size = sizeof(*p);
26804
26805 size += p->toksiz;
26806 for (local = p->lvtbl; local; local = local->prev) {
26807 size += sizeof(*local);
26808 if (local->vars) size += local->vars->capa * sizeof(ID);
26809 }
26810 return size;
26811}
26812
26813#ifndef RIPPER
26814#undef rb_reserved_word
26815
26816const struct kwtable *
26817rb_reserved_word(const char *str, unsigned int len)
26818{
26819 return reserved_word(str, len);
26820}
26821
26822#ifdef UNIVERSAL_PARSER
26824rb_ruby_parser_allocate(const rb_parser_config_t *config)
26825{
26826 /* parser_initialize expects fields to be set to 0 */
26827 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26828 p->config = config;
26829 return p;
26830}
26831
26833rb_ruby_parser_new(const rb_parser_config_t *config)
26834{
26835 /* parser_initialize expects fields to be set to 0 */
26836 rb_parser_t *p = rb_ruby_parser_allocate(config);
26837 parser_initialize(p);
26838 return p;
26839}
26840#else
26842rb_ruby_parser_allocate(void)
26843{
26844 /* parser_initialize expects fields to be set to 0 */
26845 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
26846 return p;
26847}
26848
26850rb_ruby_parser_new(void)
26851{
26852 /* parser_initialize expects fields to be set to 0 */
26853 rb_parser_t *p = rb_ruby_parser_allocate();
26854 parser_initialize(p);
26855 return p;
26856}
26857#endif
26858
26860rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
26861{
26862 p->error_buffer = main ? Qfalse : Qnil;
26863 p->parent_iseq = base;
26864 return p;
26865}
26866
26867void
26868rb_ruby_parser_set_script_lines(rb_parser_t *p)
26869{
26870 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
26871}
26872
26873void
26874rb_ruby_parser_error_tolerant(rb_parser_t *p)
26875{
26876 p->error_tolerant = 1;
26877}
26878
26879void
26880rb_ruby_parser_keep_tokens(rb_parser_t *p)
26881{
26882 p->keep_tokens = 1;
26883 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
26884}
26885
26887rb_ruby_parser_encoding(rb_parser_t *p)
26888{
26889 return p->enc;
26890}
26891
26892int
26893rb_ruby_parser_end_seen_p(rb_parser_t *p)
26894{
26895 return p->ruby__end__seen;
26896}
26897
26898int
26899rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
26900{
26901 p->debug = flag;
26902 return flag;
26903}
26904#endif /* !RIPPER */
26905
26906#ifdef RIPPER
26907int
26908rb_ruby_parser_get_yydebug(rb_parser_t *p)
26909{
26910 return p->debug;
26911}
26912
26913void
26914rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
26915{
26916 p->value = value;
26917}
26918
26919int
26920rb_ruby_parser_error_p(rb_parser_t *p)
26921{
26922 return p->error_p;
26923}
26924
26925VALUE
26926rb_ruby_parser_debug_output(rb_parser_t *p)
26927{
26928 return p->debug_output;
26929}
26930
26931void
26932rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
26933{
26934 p->debug_output = output;
26935}
26936
26937VALUE
26938rb_ruby_parser_parsing_thread(rb_parser_t *p)
26939{
26940 return p->parsing_thread;
26941}
26942
26943void
26944rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
26945{
26946 p->parsing_thread = parsing_thread;
26947}
26948
26949void
26950rb_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)
26951{
26952 p->lex.gets = gets;
26953 p->lex.input = input;
26954 p->eofp = 0;
26955 p->ruby_sourcefile_string = sourcefile_string;
26956 p->ruby_sourcefile = sourcefile;
26957 p->ruby_sourceline = sourceline;
26958}
26959
26960VALUE
26961rb_ruby_parser_result(rb_parser_t *p)
26962{
26963 return p->result;
26964}
26965
26967rb_ruby_parser_enc(rb_parser_t *p)
26968{
26969 return p->enc;
26970}
26971
26972VALUE
26973rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
26974{
26975 return p->ruby_sourcefile_string;
26976}
26977
26978int
26979rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
26980{
26981 return p->ruby_sourceline;
26982}
26983
26984int
26985rb_ruby_parser_lex_state(rb_parser_t *p)
26986{
26987 return p->lex.state;
26988}
26989
26990void
26991rb_ruby_ripper_parse0(rb_parser_t *p)
26992{
26993 parser_prepare(p);
26994 p->ast = rb_ast_new();
26995 ripper_yyparse((void*)p);
26996 rb_ast_free(p->ast);
26997 p->ast = 0;
26998 p->eval_tree = 0;
26999 p->eval_tree_begin = 0;
27000}
27001
27002int
27003rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27004{
27005 return dedent_string(p, string, width);
27006}
27007
27008int
27009rb_ruby_ripper_initialized_p(rb_parser_t *p)
27010{
27011 return p->lex.input != 0;
27012}
27013
27014void
27015rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27016{
27017 parser_initialize(p);
27018}
27019
27020long
27021rb_ruby_ripper_column(rb_parser_t *p)
27022{
27023 return p->lex.ptok - p->lex.pbeg;
27024}
27025
27026long
27027rb_ruby_ripper_token_len(rb_parser_t *p)
27028{
27029 return p->lex.pcur - p->lex.ptok;
27030}
27031
27033rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27034{
27035 return p->lex.lastline;
27036}
27037
27038VALUE
27039rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27040{
27041 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27042}
27043
27044#ifdef UNIVERSAL_PARSER
27046rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27047{
27048 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27049 p->config = config;
27050 return p;
27051}
27052#endif
27053
27054struct parser_params*
27055rb_ruby_ripper_parser_allocate(void)
27056{
27057 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27058}
27059#endif /* RIPPER */
27060
27061#ifndef RIPPER
27062void
27063rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27064{
27065 va_list ap;
27066 VALUE mesg = p->debug_buffer;
27067
27068 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27069 va_start(ap, fmt);
27070 rb_str_vcatf(mesg, fmt, ap);
27071 va_end(ap);
27072 if (char_at_end(p, mesg, 0) == '\n') {
27073 rb_io_write(p->debug_output, mesg);
27074 p->debug_buffer = Qnil;
27075 }
27076}
27077
27078static void
27079parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27080{
27081 va_list ap;
27082 int lineno, column;
27083
27084 if (loc) {
27085 lineno = loc->end_pos.lineno;
27086 column = loc->end_pos.column;
27087 }
27088 else {
27089 lineno = p->ruby_sourceline;
27090 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27091 }
27092
27093 rb_io_flush(p->debug_output);
27094 p->error_p = 1;
27095 va_start(ap, fmt);
27096 p->error_buffer =
27097 rb_syntax_error_append(p->error_buffer,
27098 p->ruby_sourcefile_string,
27099 lineno, column,
27100 p->enc, fmt, ap);
27101 va_end(ap);
27102}
27103
27104static size_t
27105count_char(const char *str, int c)
27106{
27107 int n = 0;
27108 while (str[n] == c) ++n;
27109 return n;
27110}
27111
27112/*
27113 * strip enclosing double-quotes, same as the default yytnamerr except
27114 * for that single-quotes matching back-quotes do not stop stripping.
27115 *
27116 * "\"`class' keyword\"" => "`class' keyword"
27117 */
27118size_t
27119rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27120{
27121 if (*yystr == '"') {
27122 size_t yyn = 0, bquote = 0;
27123 const char *yyp = yystr;
27124
27125 while (*++yyp) {
27126 switch (*yyp) {
27127 case '\'':
27128 if (!bquote) {
27129 bquote = count_char(yyp+1, '\'') + 1;
27130 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27131 yyn += bquote;
27132 yyp += bquote - 1;
27133 break;
27134 }
27135 else {
27136 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27137 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27138 yyn += bquote;
27139 yyp += bquote - 1;
27140 bquote = 0;
27141 break;
27142 }
27143 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27144 if (yyres) memcpy(yyres + yyn, yyp, 3);
27145 yyn += 3;
27146 yyp += 2;
27147 break;
27148 }
27149 goto do_not_strip_quotes;
27150 }
27151
27152 case ',':
27153 goto do_not_strip_quotes;
27154
27155 case '\\':
27156 if (*++yyp != '\\')
27157 goto do_not_strip_quotes;
27158 /* Fall through. */
27159 default:
27160 if (yyres)
27161 yyres[yyn] = *yyp;
27162 yyn++;
27163 break;
27164
27165 case '"':
27166 case '\0':
27167 if (yyres)
27168 yyres[yyn] = '\0';
27169 return yyn;
27170 }
27171 }
27172 do_not_strip_quotes: ;
27173 }
27174
27175 if (!yyres) return strlen(yystr);
27176
27177 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27178}
27179#endif
27180
27181#ifdef RIPPER
27182#define validate(x) (void)(x)
27183
27184static VALUE
27185ripper_dispatch0(struct parser_params *p, ID mid)
27186{
27187 return rb_funcall(p->value, mid, 0);
27188}
27189
27190static VALUE
27191ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27192{
27193 validate(a);
27194 return rb_funcall(p->value, mid, 1, a);
27195}
27196
27197static VALUE
27198ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27199{
27200 validate(a);
27201 validate(b);
27202 return rb_funcall(p->value, mid, 2, a, b);
27203}
27204
27205static VALUE
27206ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27207{
27208 validate(a);
27209 validate(b);
27210 validate(c);
27211 return rb_funcall(p->value, mid, 3, a, b, c);
27212}
27213
27214static VALUE
27215ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27216{
27217 validate(a);
27218 validate(b);
27219 validate(c);
27220 validate(d);
27221 return rb_funcall(p->value, mid, 4, a, b, c, d);
27222}
27223
27224static VALUE
27225ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27226{
27227 validate(a);
27228 validate(b);
27229 validate(c);
27230 validate(d);
27231 validate(e);
27232 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27233}
27234
27235static VALUE
27236ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27237{
27238 validate(a);
27239 validate(b);
27240 validate(c);
27241 validate(d);
27242 validate(e);
27243 validate(f);
27244 validate(g);
27245 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27246}
27247
27248void
27249ripper_error(struct parser_params *p)
27250{
27251 p->error_p = TRUE;
27252}
27253
27254VALUE
27255ripper_value(struct parser_params *p)
27256{
27257 (void)yystpcpy; /* may not used in newer bison */
27258
27259 return p->value;
27260}
27261
27262#endif /* RIPPER */
27263/*
27264 * Local variables:
27265 * mode: c
27266 * c-file-style: "ruby"
27267 * End:
27268 */
#define ENC_CODERANGE_7BIT
Old name of RUBY_ENC_CODERANGE_7BIT.
Definition coderange.h:180
#define REALLOC_N
Old name of RB_REALLOC_N.
Definition memory.h:403
#define ISSPACE
Old name of rb_isspace.
Definition ctype.h:88
#define ALLOC
Old name of RB_ALLOC.
Definition memory.h:400
#define xfree
Old name of ruby_xfree.
Definition xmalloc.h:58
#define UNREACHABLE_RETURN
Old name of RBIMPL_UNREACHABLE_RETURN.
Definition assume.h:29
#define ZALLOC
Old name of RB_ZALLOC.
Definition memory.h:402
#define ENC_CODERANGE_UNKNOWN
Old name of RUBY_ENC_CODERANGE_UNKNOWN.
Definition coderange.h:179
#define xmalloc
Old name of ruby_xmalloc.
Definition xmalloc.h:53
#define ISDIGIT
Old name of rb_isdigit.
Definition ctype.h:93
#define ASSUME
Old name of RBIMPL_ASSUME.
Definition assume.h:27
#define ALLOC_N
Old name of RB_ALLOC_N.
Definition memory.h:399
#define MBCLEN_CHARFOUND_LEN(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_LEN.
Definition encoding.h:517
#define STRCASECMP
Old name of st_locale_insensitive_strcasecmp.
Definition ctype.h:102
#define ISALPHA
Old name of rb_isalpha.
Definition ctype.h:92
#define STRNCASECMP
Old name of st_locale_insensitive_strncasecmp.
Definition ctype.h:103
#define ISASCII
Old name of rb_isascii.
Definition ctype.h:85
#define Qnil
Old name of RUBY_Qnil.
#define Qfalse
Old name of RUBY_Qfalse.
#define NIL_P
Old name of RB_NIL_P.
#define MBCLEN_CHARFOUND_P(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_P.
Definition encoding.h:516
#define ISPRINT
Old name of rb_isprint.
Definition ctype.h:86
#define xcalloc
Old name of ruby_xcalloc.
Definition xmalloc.h:55
#define ISXDIGIT
Old name of rb_isxdigit.
Definition ctype.h:94
#define ISCNTRL
Old name of rb_iscntrl.
Definition ctype.h:96
#define ISALNUM
Old name of rb_isalnum.
Definition ctype.h:91
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition eval.c:676
#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:1428
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1447
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2162
Encoding relates APIs.
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition string.c:1154
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1099
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1498
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1532
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3836
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1692
#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:1656
#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:1514
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:933
int len
Length of the buffer.
Definition io.h:8
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:223
#define strdup(s)
Just another name of ruby_strdup.
Definition util.h:187
#define rb_long2int
Just another name of rb_long2int_inline.
Definition long.h:62
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition memory.h:372
#define ALLOCA_N(type, n)
Definition memory.h:292
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition memory.h:360
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:167
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:384
VALUE type(ANYARGS)
ANYARGS-ed function type.
Functions related to nodes in the AST.
#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.