Ruby 3.5.0dev (2025-02-19 revision 27ba268b75bbe461460b31426e377b42d4935f70)
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_TERMINTOR ((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);
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);
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) (NODE *)rb_node_class_new(p,n,b,s,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) (NODE *)rb_node_postexe_new(p,b,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 NODE *ret_args(struct parser_params*,NODE*);
1502static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1503static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
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_lhs_mrhs = 183, /* asgn_lhs_mrhs */
2881 YYSYMBOL_asgn_lhs_command_rhs = 184, /* asgn_lhs_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_item = 213, /* mlhs_item */
2911 YYSYMBOL_mlhs_head = 214, /* mlhs_head */
2912 YYSYMBOL_mlhs_post = 215, /* mlhs_post */
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_lhs_arg_rhs = 226, /* asgn_lhs_arg_rhs */
2924 YYSYMBOL_arg = 227, /* arg */
2925 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2926 YYSYMBOL_def_endless_method_endless_arg = 229, /* def_endless_method_endless_arg */
2927 YYSYMBOL_endless_arg = 230, /* endless_arg */
2928 YYSYMBOL_relop = 231, /* relop */
2929 YYSYMBOL_rel_expr = 232, /* rel_expr */
2930 YYSYMBOL_lex_ctxt = 233, /* lex_ctxt */
2931 YYSYMBOL_begin_defined = 234, /* begin_defined */
2932 YYSYMBOL_after_rescue = 235, /* after_rescue */
2933 YYSYMBOL_value_expr_arg = 236, /* value_expr_arg */
2934 YYSYMBOL_arg_value = 237, /* arg_value */
2935 YYSYMBOL_aref_args = 238, /* aref_args */
2936 YYSYMBOL_arg_rhs = 239, /* arg_rhs */
2937 YYSYMBOL_paren_args = 240, /* paren_args */
2938 YYSYMBOL_opt_paren_args = 241, /* opt_paren_args */
2939 YYSYMBOL_opt_call_args = 242, /* opt_call_args */
2940 YYSYMBOL_value_expr_command = 243, /* value_expr_command */
2941 YYSYMBOL_call_args = 244, /* call_args */
2942 YYSYMBOL_245_13 = 245, /* $@13 */
2943 YYSYMBOL_command_args = 246, /* command_args */
2944 YYSYMBOL_block_arg = 247, /* block_arg */
2945 YYSYMBOL_opt_block_arg = 248, /* opt_block_arg */
2946 YYSYMBOL_args = 249, /* args */
2947 YYSYMBOL_arg_splat = 250, /* arg_splat */
2948 YYSYMBOL_mrhs_arg = 251, /* mrhs_arg */
2949 YYSYMBOL_mrhs = 252, /* mrhs */
2950 YYSYMBOL_primary = 253, /* primary */
2951 YYSYMBOL_254_14 = 254, /* $@14 */
2952 YYSYMBOL_255_15 = 255, /* $@15 */
2953 YYSYMBOL_256_16 = 256, /* @16 */
2954 YYSYMBOL_257_17 = 257, /* @17 */
2955 YYSYMBOL_258_18 = 258, /* $@18 */
2956 YYSYMBOL_259_19 = 259, /* $@19 */
2957 YYSYMBOL_260_20 = 260, /* $@20 */
2958 YYSYMBOL_261_21 = 261, /* $@21 */
2959 YYSYMBOL_262_22 = 262, /* $@22 */
2960 YYSYMBOL_263_23 = 263, /* $@23 */
2961 YYSYMBOL_264_24 = 264, /* $@24 */
2962 YYSYMBOL_value_expr_primary = 265, /* value_expr_primary */
2963 YYSYMBOL_primary_value = 266, /* primary_value */
2964 YYSYMBOL_k_begin = 267, /* k_begin */
2965 YYSYMBOL_k_if = 268, /* k_if */
2966 YYSYMBOL_k_unless = 269, /* k_unless */
2967 YYSYMBOL_k_while = 270, /* k_while */
2968 YYSYMBOL_k_until = 271, /* k_until */
2969 YYSYMBOL_k_case = 272, /* k_case */
2970 YYSYMBOL_k_for = 273, /* k_for */
2971 YYSYMBOL_k_class = 274, /* k_class */
2972 YYSYMBOL_k_module = 275, /* k_module */
2973 YYSYMBOL_k_def = 276, /* k_def */
2974 YYSYMBOL_k_do = 277, /* k_do */
2975 YYSYMBOL_k_do_block = 278, /* k_do_block */
2976 YYSYMBOL_k_rescue = 279, /* k_rescue */
2977 YYSYMBOL_k_ensure = 280, /* k_ensure */
2978 YYSYMBOL_k_when = 281, /* k_when */
2979 YYSYMBOL_k_else = 282, /* k_else */
2980 YYSYMBOL_k_elsif = 283, /* k_elsif */
2981 YYSYMBOL_k_end = 284, /* k_end */
2982 YYSYMBOL_k_return = 285, /* k_return */
2983 YYSYMBOL_k_yield = 286, /* k_yield */
2984 YYSYMBOL_then = 287, /* then */
2985 YYSYMBOL_do = 288, /* do */
2986 YYSYMBOL_if_tail = 289, /* if_tail */
2987 YYSYMBOL_opt_else = 290, /* opt_else */
2988 YYSYMBOL_for_var = 291, /* for_var */
2989 YYSYMBOL_f_marg = 292, /* f_marg */
2990 YYSYMBOL_f_marg_list = 293, /* f_marg_list */
2991 YYSYMBOL_f_margs = 294, /* f_margs */
2992 YYSYMBOL_f_rest_marg = 295, /* f_rest_marg */
2993 YYSYMBOL_f_any_kwrest = 296, /* f_any_kwrest */
2994 YYSYMBOL_297_25 = 297, /* $@25 */
2995 YYSYMBOL_f_eq = 298, /* f_eq */
2996 YYSYMBOL_f_kw_primary_value = 299, /* f_kw_primary_value */
2997 YYSYMBOL_f_kwarg_primary_value = 300, /* f_kwarg_primary_value */
2998 YYSYMBOL_block_args_tail = 301, /* block_args_tail */
2999 YYSYMBOL_excessed_comma = 302, /* excessed_comma */
3000 YYSYMBOL_f_opt_primary_value = 303, /* f_opt_primary_value */
3001 YYSYMBOL_f_optarg_primary_value = 304, /* f_optarg_primary_value */
3002 YYSYMBOL_opt_args_tail_block_args_tail = 305, /* opt_args_tail_block_args_tail */
3003 YYSYMBOL_block_param = 306, /* block_param */
3004 YYSYMBOL_opt_block_param = 307, /* opt_block_param */
3005 YYSYMBOL_block_param_def = 308, /* block_param_def */
3006 YYSYMBOL_opt_bv_decl = 309, /* opt_bv_decl */
3007 YYSYMBOL_bv_decls = 310, /* bv_decls */
3008 YYSYMBOL_bvar = 311, /* bvar */
3009 YYSYMBOL_max_numparam = 312, /* max_numparam */
3010 YYSYMBOL_numparam = 313, /* numparam */
3011 YYSYMBOL_it_id = 314, /* it_id */
3012 YYSYMBOL_315_26 = 315, /* @26 */
3013 YYSYMBOL_316_27 = 316, /* $@27 */
3014 YYSYMBOL_lambda = 317, /* lambda */
3015 YYSYMBOL_f_larglist = 318, /* f_larglist */
3016 YYSYMBOL_lambda_body = 319, /* lambda_body */
3017 YYSYMBOL_320_28 = 320, /* $@28 */
3018 YYSYMBOL_do_block = 321, /* do_block */
3019 YYSYMBOL_block_call = 322, /* block_call */
3020 YYSYMBOL_method_call = 323, /* method_call */
3021 YYSYMBOL_brace_block = 324, /* brace_block */
3022 YYSYMBOL_325_29 = 325, /* @29 */
3023 YYSYMBOL_brace_body = 326, /* brace_body */
3024 YYSYMBOL_327_30 = 327, /* @30 */
3025 YYSYMBOL_do_body = 328, /* do_body */
3026 YYSYMBOL_case_args = 329, /* case_args */
3027 YYSYMBOL_case_body = 330, /* case_body */
3028 YYSYMBOL_cases = 331, /* cases */
3029 YYSYMBOL_p_pvtbl = 332, /* p_pvtbl */
3030 YYSYMBOL_p_pktbl = 333, /* p_pktbl */
3031 YYSYMBOL_p_in_kwarg = 334, /* p_in_kwarg */
3032 YYSYMBOL_335_31 = 335, /* $@31 */
3033 YYSYMBOL_p_case_body = 336, /* p_case_body */
3034 YYSYMBOL_p_cases = 337, /* p_cases */
3035 YYSYMBOL_p_top_expr = 338, /* p_top_expr */
3036 YYSYMBOL_p_top_expr_body = 339, /* p_top_expr_body */
3037 YYSYMBOL_p_expr = 340, /* p_expr */
3038 YYSYMBOL_p_as = 341, /* p_as */
3039 YYSYMBOL_p_alt = 342, /* p_alt */
3040 YYSYMBOL_p_lparen = 343, /* p_lparen */
3041 YYSYMBOL_p_lbracket = 344, /* p_lbracket */
3042 YYSYMBOL_p_expr_basic = 345, /* p_expr_basic */
3043 YYSYMBOL_346_32 = 346, /* $@32 */
3044 YYSYMBOL_p_args = 347, /* p_args */
3045 YYSYMBOL_p_args_head = 348, /* p_args_head */
3046 YYSYMBOL_p_args_tail = 349, /* p_args_tail */
3047 YYSYMBOL_p_find = 350, /* p_find */
3048 YYSYMBOL_p_rest = 351, /* p_rest */
3049 YYSYMBOL_p_args_post = 352, /* p_args_post */
3050 YYSYMBOL_p_arg = 353, /* p_arg */
3051 YYSYMBOL_p_kwargs = 354, /* p_kwargs */
3052 YYSYMBOL_p_kwarg = 355, /* p_kwarg */
3053 YYSYMBOL_p_kw = 356, /* p_kw */
3054 YYSYMBOL_p_kw_label = 357, /* p_kw_label */
3055 YYSYMBOL_p_kwrest = 358, /* p_kwrest */
3056 YYSYMBOL_p_kwnorest = 359, /* p_kwnorest */
3057 YYSYMBOL_p_any_kwrest = 360, /* p_any_kwrest */
3058 YYSYMBOL_p_value = 361, /* p_value */
3059 YYSYMBOL_p_primitive = 362, /* p_primitive */
3060 YYSYMBOL_value_expr_p_primitive = 363, /* value_expr_p_primitive */
3061 YYSYMBOL_p_primitive_value = 364, /* p_primitive_value */
3062 YYSYMBOL_p_variable = 365, /* p_variable */
3063 YYSYMBOL_p_var_ref = 366, /* p_var_ref */
3064 YYSYMBOL_p_expr_ref = 367, /* p_expr_ref */
3065 YYSYMBOL_p_const = 368, /* p_const */
3066 YYSYMBOL_opt_rescue = 369, /* opt_rescue */
3067 YYSYMBOL_exc_list = 370, /* exc_list */
3068 YYSYMBOL_exc_var = 371, /* exc_var */
3069 YYSYMBOL_opt_ensure = 372, /* opt_ensure */
3070 YYSYMBOL_literal = 373, /* literal */
3071 YYSYMBOL_strings = 374, /* strings */
3072 YYSYMBOL_string = 375, /* string */
3073 YYSYMBOL_string1 = 376, /* string1 */
3074 YYSYMBOL_xstring = 377, /* xstring */
3075 YYSYMBOL_regexp = 378, /* regexp */
3076 YYSYMBOL_nonempty_list__ = 379, /* nonempty_list_' ' */
3077 YYSYMBOL_words_tWORDS_BEG_word_list = 380, /* words_tWORDS_BEG_word_list */
3078 YYSYMBOL_words = 381, /* words */
3079 YYSYMBOL_word_list = 382, /* word_list */
3080 YYSYMBOL_word = 383, /* word */
3081 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 384, /* words_tSYMBOLS_BEG_symbol_list */
3082 YYSYMBOL_symbols = 385, /* symbols */
3083 YYSYMBOL_symbol_list = 386, /* symbol_list */
3084 YYSYMBOL_words_tQWORDS_BEG_qword_list = 387, /* words_tQWORDS_BEG_qword_list */
3085 YYSYMBOL_qwords = 388, /* qwords */
3086 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 389, /* words_tQSYMBOLS_BEG_qsym_list */
3087 YYSYMBOL_qsymbols = 390, /* qsymbols */
3088 YYSYMBOL_qword_list = 391, /* qword_list */
3089 YYSYMBOL_qsym_list = 392, /* qsym_list */
3090 YYSYMBOL_string_contents = 393, /* string_contents */
3091 YYSYMBOL_xstring_contents = 394, /* xstring_contents */
3092 YYSYMBOL_regexp_contents = 395, /* regexp_contents */
3093 YYSYMBOL_string_content = 396, /* string_content */
3094 YYSYMBOL_397_33 = 397, /* @33 */
3095 YYSYMBOL_398_34 = 398, /* @34 */
3096 YYSYMBOL_399_35 = 399, /* @35 */
3097 YYSYMBOL_400_36 = 400, /* @36 */
3098 YYSYMBOL_string_dend = 401, /* string_dend */
3099 YYSYMBOL_string_dvar = 402, /* string_dvar */
3100 YYSYMBOL_symbol = 403, /* symbol */
3101 YYSYMBOL_ssym = 404, /* ssym */
3102 YYSYMBOL_sym = 405, /* sym */
3103 YYSYMBOL_dsym = 406, /* dsym */
3104 YYSYMBOL_numeric = 407, /* numeric */
3105 YYSYMBOL_simple_numeric = 408, /* simple_numeric */
3106 YYSYMBOL_nonlocal_var = 409, /* nonlocal_var */
3107 YYSYMBOL_user_variable = 410, /* user_variable */
3108 YYSYMBOL_keyword_variable = 411, /* keyword_variable */
3109 YYSYMBOL_var_ref = 412, /* var_ref */
3110 YYSYMBOL_var_lhs = 413, /* var_lhs */
3111 YYSYMBOL_backref = 414, /* backref */
3112 YYSYMBOL_415_37 = 415, /* $@37 */
3113 YYSYMBOL_superclass = 416, /* superclass */
3114 YYSYMBOL_f_opt_paren_args = 417, /* f_opt_paren_args */
3115 YYSYMBOL_f_paren_args = 418, /* f_paren_args */
3116 YYSYMBOL_f_arglist = 419, /* f_arglist */
3117 YYSYMBOL_420_38 = 420, /* @38 */
3118 YYSYMBOL_f_kw_arg_value = 421, /* f_kw_arg_value */
3119 YYSYMBOL_f_kwarg_arg_value = 422, /* f_kwarg_arg_value */
3120 YYSYMBOL_args_tail = 423, /* args_tail */
3121 YYSYMBOL_f_opt_arg_value = 424, /* f_opt_arg_value */
3122 YYSYMBOL_f_optarg_arg_value = 425, /* f_optarg_arg_value */
3123 YYSYMBOL_opt_args_tail_args_tail = 426, /* opt_args_tail_args_tail */
3124 YYSYMBOL_f_args = 427, /* f_args */
3125 YYSYMBOL_args_forward = 428, /* args_forward */
3126 YYSYMBOL_f_bad_arg = 429, /* f_bad_arg */
3127 YYSYMBOL_f_norm_arg = 430, /* f_norm_arg */
3128 YYSYMBOL_f_arg_asgn = 431, /* f_arg_asgn */
3129 YYSYMBOL_f_arg_item = 432, /* f_arg_item */
3130 YYSYMBOL_f_arg = 433, /* f_arg */
3131 YYSYMBOL_f_label = 434, /* f_label */
3132 YYSYMBOL_kwrest_mark = 435, /* kwrest_mark */
3133 YYSYMBOL_f_no_kwarg = 436, /* f_no_kwarg */
3134 YYSYMBOL_f_kwrest = 437, /* f_kwrest */
3135 YYSYMBOL_restarg_mark = 438, /* restarg_mark */
3136 YYSYMBOL_f_rest_arg = 439, /* f_rest_arg */
3137 YYSYMBOL_blkarg_mark = 440, /* blkarg_mark */
3138 YYSYMBOL_f_block_arg = 441, /* f_block_arg */
3139 YYSYMBOL_opt_f_block_arg = 442, /* opt_f_block_arg */
3140 YYSYMBOL_value_expr_var_ref = 443, /* value_expr_var_ref */
3141 YYSYMBOL_singleton = 444, /* singleton */
3142 YYSYMBOL_445_39 = 445, /* $@39 */
3143 YYSYMBOL_assoc_list = 446, /* assoc_list */
3144 YYSYMBOL_assocs = 447, /* assocs */
3145 YYSYMBOL_assoc = 448, /* assoc */
3146 YYSYMBOL_operation = 449, /* operation */
3147 YYSYMBOL_operation2 = 450, /* operation2 */
3148 YYSYMBOL_operation3 = 451, /* operation3 */
3149 YYSYMBOL_dot_or_colon = 452, /* dot_or_colon */
3150 YYSYMBOL_call_op = 453, /* call_op */
3151 YYSYMBOL_call_op2 = 454, /* call_op2 */
3152 YYSYMBOL_rparen = 455, /* rparen */
3153 YYSYMBOL_rbracket = 456, /* rbracket */
3154 YYSYMBOL_rbrace = 457, /* rbrace */
3155 YYSYMBOL_trailer = 458, /* trailer */
3156 YYSYMBOL_term = 459, /* term */
3157 YYSYMBOL_terms = 460, /* terms */
3158 YYSYMBOL_none = 461 /* none */
3159};
3160typedef enum yysymbol_kind_t yysymbol_kind_t;
3161
3162
3163
3164
3165#ifdef short
3166# undef short
3167#endif
3168
3169/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3170 <limits.h> and (if available) <stdint.h> are included
3171 so that the code can choose integer types of a good width. */
3172
3173#ifndef __PTRDIFF_MAX__
3174# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3175# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3176# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3177# define YY_STDINT_H
3178# endif
3179#endif
3180
3181/* Narrow types that promote to a signed type and that can represent a
3182 signed or unsigned integer of at least N bits. In tables they can
3183 save space and decrease cache pressure. Promoting to a signed type
3184 helps avoid bugs in integer arithmetic. */
3185
3186#ifdef __INT_LEAST8_MAX__
3187typedef __INT_LEAST8_TYPE__ yytype_int8;
3188#elif defined YY_STDINT_H
3189typedef int_least8_t yytype_int8;
3190#else
3191typedef signed char yytype_int8;
3192#endif
3193
3194#ifdef __INT_LEAST16_MAX__
3195typedef __INT_LEAST16_TYPE__ yytype_int16;
3196#elif defined YY_STDINT_H
3197typedef int_least16_t yytype_int16;
3198#else
3199typedef short yytype_int16;
3200#endif
3201
3202/* Work around bug in HP-UX 11.23, which defines these macros
3203 incorrectly for preprocessor constants. This workaround can likely
3204 be removed in 2023, as HPE has promised support for HP-UX 11.23
3205 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3206 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3207#ifdef __hpux
3208# undef UINT_LEAST8_MAX
3209# undef UINT_LEAST16_MAX
3210# define UINT_LEAST8_MAX 255
3211# define UINT_LEAST16_MAX 65535
3212#endif
3213
3214#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3215typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3216#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3217 && UINT_LEAST8_MAX <= INT_MAX)
3218typedef uint_least8_t yytype_uint8;
3219#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3220typedef unsigned char yytype_uint8;
3221#else
3222typedef short yytype_uint8;
3223#endif
3224
3225#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3226typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3227#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3228 && UINT_LEAST16_MAX <= INT_MAX)
3229typedef uint_least16_t yytype_uint16;
3230#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3231typedef unsigned short yytype_uint16;
3232#else
3233typedef int yytype_uint16;
3234#endif
3235
3236#ifndef YYPTRDIFF_T
3237# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3238# define YYPTRDIFF_T __PTRDIFF_TYPE__
3239# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3240# elif defined PTRDIFF_MAX
3241# ifndef ptrdiff_t
3242# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3243# endif
3244# define YYPTRDIFF_T ptrdiff_t
3245# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3246# else
3247# define YYPTRDIFF_T long
3248# define YYPTRDIFF_MAXIMUM LONG_MAX
3249# endif
3250#endif
3251
3252#ifndef YYSIZE_T
3253# ifdef __SIZE_TYPE__
3254# define YYSIZE_T __SIZE_TYPE__
3255# elif defined size_t
3256# define YYSIZE_T size_t
3257# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3258# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3259# define YYSIZE_T size_t
3260# else
3261# define YYSIZE_T unsigned
3262# endif
3263#endif
3264
3265#define YYSIZE_MAXIMUM \
3266 YY_CAST (YYPTRDIFF_T, \
3267 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3268 ? YYPTRDIFF_MAXIMUM \
3269 : YY_CAST (YYSIZE_T, -1)))
3270
3271#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3272
3273
3274/* Stored state numbers (used for stacks). */
3275typedef yytype_int16 yy_state_t;
3276
3277/* State numbers in computations. */
3278typedef int yy_state_fast_t;
3279
3280#ifndef YY_
3281# if defined YYENABLE_NLS && YYENABLE_NLS
3282# if ENABLE_NLS
3283# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3284# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3285# endif
3286# endif
3287# ifndef YY_
3288# define YY_(Msgid) Msgid
3289# endif
3290#endif
3291
3292
3293#ifndef YY_ATTRIBUTE_PURE
3294# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3295# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3296# else
3297# define YY_ATTRIBUTE_PURE
3298# endif
3299#endif
3300
3301#ifndef YY_ATTRIBUTE_UNUSED
3302# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3303# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3304# else
3305# define YY_ATTRIBUTE_UNUSED
3306# endif
3307#endif
3308
3309/* Suppress unused-variable warnings by "using" E. */
3310#if ! defined lint || defined __GNUC__
3311# define YY_USE(E) ((void) (E))
3312#else
3313# define YY_USE(E) /* empty */
3314#endif
3315
3316/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3317#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3318# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3319# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3320 _Pragma ("GCC diagnostic push") \
3321 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3322# else
3323# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3324 _Pragma ("GCC diagnostic push") \
3325 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3326 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3327# endif
3328# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3329 _Pragma ("GCC diagnostic pop")
3330#else
3331# define YY_INITIAL_VALUE(Value) Value
3332#endif
3333#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3334# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3335# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3336#endif
3337#ifndef YY_INITIAL_VALUE
3338# define YY_INITIAL_VALUE(Value) /* Nothing. */
3339#endif
3340
3341#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3342# define YY_IGNORE_USELESS_CAST_BEGIN \
3343 _Pragma ("GCC diagnostic push") \
3344 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3345# define YY_IGNORE_USELESS_CAST_END \
3346 _Pragma ("GCC diagnostic pop")
3347#endif
3348#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3349# define YY_IGNORE_USELESS_CAST_BEGIN
3350# define YY_IGNORE_USELESS_CAST_END
3351#endif
3352
3353
3354#define YY_ASSERT(E) ((void) (0 && (E)))
3355
3356#if 1
3357
3358/* The parser invokes alloca or malloc; define the necessary symbols. */
3359
3360# ifdef YYSTACK_USE_ALLOCA
3361# if YYSTACK_USE_ALLOCA
3362# ifdef __GNUC__
3363# define YYSTACK_ALLOC __builtin_alloca
3364# elif defined __BUILTIN_VA_ARG_INCR
3365# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3366# elif defined _AIX
3367# define YYSTACK_ALLOC __alloca
3368# elif defined _MSC_VER
3369# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3370# define alloca _alloca
3371# else
3372# define YYSTACK_ALLOC alloca
3373# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3374# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3375 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3376# ifndef EXIT_SUCCESS
3377# define EXIT_SUCCESS 0
3378# endif
3379# endif
3380# endif
3381# endif
3382# endif
3383
3384# ifdef YYSTACK_ALLOC
3385 /* Pacify GCC's 'empty if-body' warning. */
3386# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3387# ifndef YYSTACK_ALLOC_MAXIMUM
3388 /* The OS might guarantee only one guard page at the bottom of the stack,
3389 and a page size can be as small as 4096 bytes. So we cannot safely
3390 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3391 to allow for a few compiler-allocated temporary stack slots. */
3392# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3393# endif
3394# else
3395# define YYSTACK_ALLOC YYMALLOC
3396# define YYSTACK_FREE YYFREE
3397# ifndef YYSTACK_ALLOC_MAXIMUM
3398# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3399# endif
3400# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3401 && ! ((defined YYMALLOC || defined malloc) \
3402 && (defined YYFREE || defined free)))
3403# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3404# ifndef EXIT_SUCCESS
3405# define EXIT_SUCCESS 0
3406# endif
3407# endif
3408# ifndef YYMALLOC
3409# define YYMALLOC malloc
3410# if ! defined malloc && ! defined EXIT_SUCCESS
3411void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3412# endif
3413# endif
3414# ifndef YYFREE
3415# define YYFREE free
3416# if ! defined free && ! defined EXIT_SUCCESS
3417void free (void *); /* INFRINGES ON USER NAME SPACE */
3418# endif
3419# endif
3420# endif
3421#endif /* 1 */
3422
3423#if (! defined yyoverflow \
3424 && (! defined __cplusplus \
3425 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3426 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3427
3428/* A type that is properly aligned for any stack member. */
3429union yyalloc
3430{
3431 yy_state_t yyss_alloc;
3432 YYSTYPE yyvs_alloc;
3433 YYLTYPE yyls_alloc;
3434};
3435
3436/* The size of the maximum gap between one aligned stack and the next. */
3437# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3438
3439/* The size of an array large to enough to hold all stacks, each with
3440 N elements. */
3441# define YYSTACK_BYTES(N) \
3442 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3443 + YYSIZEOF (YYLTYPE)) \
3444 + 2 * YYSTACK_GAP_MAXIMUM)
3445
3446# define YYCOPY_NEEDED 1
3447
3448/* Relocate STACK from its old location to the new one. The
3449 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3450 elements in the stack, and YYPTR gives the new location of the
3451 stack. Advance YYPTR to a properly aligned location for the next
3452 stack. */
3453# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3454 do \
3455 { \
3456 YYPTRDIFF_T yynewbytes; \
3457 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3458 Stack = &yyptr->Stack_alloc; \
3459 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3460 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3461 } \
3462 while (0)
3463
3464#endif
3465
3466#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3467/* Copy COUNT objects from SRC to DST. The source and destination do
3468 not overlap. */
3469# ifndef YYCOPY
3470# if defined __GNUC__ && 1 < __GNUC__
3471# define YYCOPY(Dst, Src, Count) \
3472 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3473# else
3474# define YYCOPY(Dst, Src, Count) \
3475 do \
3476 { \
3477 YYPTRDIFF_T yyi; \
3478 for (yyi = 0; yyi < (Count); yyi++) \
3479 (Dst)[yyi] = (Src)[yyi]; \
3480 } \
3481 while (0)
3482# endif
3483# endif
3484#endif /* !YYCOPY_NEEDED */
3485
3486/* YYFINAL -- State number of the termination state. */
3487#define YYFINAL 142
3488/* YYLAST -- Last index in YYTABLE. */
3489#define YYLAST 15666
3490
3491/* YYNTOKENS -- Number of terminals. */
3492#define YYNTOKENS 162
3493/* YYNNTS -- Number of nonterminals. */
3494#define YYNNTS 300
3495/* YYNRULES -- Number of rules. */
3496#define YYNRULES 806
3497/* YYNSTATES -- Number of states. */
3498#define YYNSTATES 1369
3499
3500/* YYMAXUTOK -- Last valid token kind. */
3501#define YYMAXUTOK 361
3502
3503
3504/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3505 as returned by yylex, with out-of-bounds checking. */
3506#define YYTRANSLATE(YYX) \
3507 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3508 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3509 : YYSYMBOL_YYUNDEF)
3510
3511/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3512 as returned by yylex. */
3513static const yytype_uint8 yytranslate[] =
3514{
3515 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3516 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3517 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3518 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3519 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3520 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3521 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3524 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3527 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3528 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3529 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3530 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3534 2, 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, 1, 2, 3, 4,
3541 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3542 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3543 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3544 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3545 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3546 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3547 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3548 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3549 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3550 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3551 147, 150
3552};
3553
3554#if YYDEBUG
3555/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3556static const yytype_int16 yyrline[] =
3557{
3558 0, 3084, 3078, 3084, 3084, 3084, 3084, 3104, 3109, 3114,
3559 3121, 3126, 3133, 3135, 3153, 3149, 3154, 3153, 3165, 3162,
3560 3175, 3180, 3185, 3192, 3194, 3193, 3203, 3205, 3212, 3212,
3561 3217, 3222, 3230, 3239, 3246, 3252, 3258, 3269, 3280, 3289,
3562 3302, 3303, 3308, 3308, 3309, 3320, 3325, 3326, 3333, 3333,
3563 3334, 3334, 3334, 3334, 3334, 3334, 3334, 3334, 3335, 3335,
3564 3335, 3338, 3339, 3345, 3345, 3345, 3352, 3353, 3360, 3363,
3565 3364, 3369, 3374, 3379, 3385, 3384, 3398, 3397, 3410, 3413,
3566 3424, 3434, 3433, 3447, 3447, 3448, 3454, 3454, 3454, 3461,
3567 3462, 3465, 3465, 3468, 3469, 3476, 3484, 3491, 3498, 3507,
3568 3512, 3517, 3522, 3527, 3533, 3539, 3545, 3550, 3557, 3566,
3569 3567, 3574, 3575, 3582, 3587, 3592, 3597, 3602, 3607, 3612,
3570 3617, 3622, 3627, 3634, 3635, 3642, 3647, 3654, 3659, 3666,
3571 3666, 3671, 3676, 3676, 3682, 3687, 3692, 3697, 3705, 3705,
3572 3710, 3715, 3720, 3725, 3730, 3735, 3740, 3748, 3756, 3759,
3573 3764, 3769, 3776, 3776, 3776, 3777, 3782, 3785, 3790, 3793,
3574 3798, 3798, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813,
3575 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823,
3576 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3832, 3833,
3577 3834, 3835, 3838, 3838, 3838, 3839, 3839, 3840, 3840, 3840,
3578 3841, 3841, 3841, 3841, 3842, 3842, 3842, 3842, 3843, 3843,
3579 3843, 3844, 3844, 3844, 3844, 3845, 3845, 3845, 3845, 3846,
3580 3846, 3846, 3846, 3847, 3847, 3847, 3847, 3848, 3848, 3848,
3581 3848, 3849, 3849, 3852, 3852, 3853, 3853, 3853, 3853, 3853,
3582 3853, 3853, 3853, 3854, 3860, 3867, 3874, 3880, 3886, 3892,
3583 3898, 3903, 3908, 3913, 3918, 3923, 3928, 3933, 3938, 3943,
3584 3948, 3953, 3958, 3963, 3964, 3969, 3974, 3979, 3984, 3989,
3585 3994, 3999, 4004, 4009, 4014, 4019, 4025, 4032, 4032, 4032,
3586 4033, 4036, 4037, 4043, 4050, 4051, 4052, 4053, 4056, 4061,
3587 4069, 4075, 4082, 4089, 4089, 4092, 4093, 4094, 4099, 4106,
3588 4111, 4120, 4125, 4135, 4147, 4148, 4154, 4155, 4156, 4157,
3589 4162, 4169, 4169, 4174, 4179, 4185, 4191, 4195, 4195, 4233,
3590 4238, 4246, 4251, 4259, 4264, 4269, 4274, 4282, 4287, 4296,
3591 4297, 4301, 4306, 4311, 4329, 4329, 4329, 4329, 4329, 4329,
3592 4329, 4329, 4330, 4331, 4332, 4338, 4337, 4350, 4350, 4356,
3593 4362, 4367, 4372, 4377, 4383, 4388, 4393, 4398, 4403, 4409,
3594 4414, 4419, 4424, 4425, 4431, 4433, 4445, 4454, 4463, 4472,
3595 4471, 4486, 4485, 4498, 4506, 4506, 4507, 4550, 4549, 4567,
3596 4566, 4586, 4585, 4604, 4602, 4619, 4617, 4632, 4637, 4642,
3597 4647, 4662, 4662, 4665, 4672, 4690, 4697, 4705, 4713, 4720,
3598 4728, 4737, 4746, 4754, 4761, 4768, 4776, 4783, 4789, 4804,
3599 4811, 4816, 4822, 4829, 4836, 4837, 4838, 4841, 4842, 4845,
3600 4847, 4856, 4857, 4864, 4865, 4868, 4873, 4880, 4885, 4892,
3601 4897, 4902, 4907, 4912, 4919, 4925, 4932, 4933, 4940, 4940,
3602 4942, 4942, 4942, 4942, 4942, 4947, 4952, 4957, 4964, 4972,
3603 4972, 4972, 4972, 4972, 4972, 4977, 4982, 4987, 4992, 4997,
3604 5003, 5008, 5013, 5018, 5023, 5028, 5033, 5038, 5043, 5050,
3605 5051, 5057, 5064, 5074, 5079, 5086, 5088, 5092, 5097, 5103,
3606 5109, 5114, 5121, 5127, 5120, 5154, 5161, 5170, 5177, 5176,
3607 5187, 5195, 5207, 5217, 5226, 5233, 5240, 5251, 5257, 5262,
3608 5268, 5274, 5284, 5289, 5297, 5303, 5311, 5313, 5328, 5328,
3609 5349, 5355, 5360, 5366, 5374, 5383, 5384, 5387, 5388, 5390,
3610 5401, 5406, 5414, 5415, 5418, 5419, 5425, 5433, 5434, 5440,
3611 5446, 5451, 5456, 5463, 5466, 5473, 5476, 5481, 5484, 5491,
3612 5498, 5499, 5500, 5507, 5514, 5521, 5527, 5534, 5541, 5548,
3613 5554, 5559, 5564, 5571, 5570, 5581, 5587, 5595, 5601, 5606,
3614 5611, 5616, 5621, 5624, 5625, 5632, 5637, 5644, 5652, 5658,
3615 5665, 5666, 5673, 5680, 5685, 5690, 5695, 5702, 5704, 5711,
3616 5717, 5729, 5730, 5745, 5750, 5757, 5763, 5764, 5771, 5772,
3617 5777, 5782, 5787, 5792, 5793, 5794, 5795, 5800, 5807, 5807,
3618 5807, 5807, 5807, 5807, 5807, 5807, 5808, 5813, 5816, 5816,
3619 5819, 5827, 5839, 5846, 5853, 5858, 5863, 5871, 5891, 5894,
3620 5899, 5903, 5906, 5911, 5914, 5921, 5924, 5925, 5928, 5939,
3621 5940, 5941, 5948, 5961, 5973, 5980, 5980, 5980, 5980, 5984,
3622 5988, 5995, 5997, 6004, 6004, 6008, 6012, 6019, 6019, 6022,
3623 6022, 6026, 6030, 6038, 6042, 6050, 6054, 6062, 6066, 6074,
3624 6078, 6104, 6107, 6106, 6121, 6129, 6133, 6137, 6152, 6153,
3625 6156, 6161, 6164, 6165, 6168, 6184, 6185, 6188, 6196, 6197,
3626 6205, 6206, 6207, 6208, 6211, 6212, 6213, 6216, 6216, 6217,
3627 6220, 6221, 6222, 6223, 6224, 6225, 6226, 6229, 6239, 6246,
3628 6246, 6253, 6254, 6258, 6257, 6268, 6274, 6275, 6284, 6294,
3629 6295, 6295, 6312, 6312, 6312, 6312, 6312, 6317, 6322, 6327,
3630 6332, 6349, 6349, 6349, 6349, 6349, 6349, 6354, 6359, 6364,
3631 6369, 6374, 6379, 6384, 6389, 6394, 6399, 6404, 6409, 6414,
3632 6420, 6427, 6438, 6447, 6456, 6465, 6476, 6477, 6487, 6494,
3633 6499, 6518, 6520, 6531, 6551, 6552, 6555, 6561, 6567, 6575,
3634 6576, 6579, 6585, 6593, 6594, 6597, 6603, 6611, 6616, 6623,
3635 6623, 6625, 6624, 6662, 6663, 6670, 6672, 6697, 6702, 6707,
3636 6714, 6720, 6725, 6734, 6734, 6734, 6737, 6738, 6741, 6742,
3637 6743, 6746, 6747, 6750, 6751, 6754, 6755, 6758, 6761, 6764,
3638 6767, 6768, 6771, 6772, 6779, 6780, 6784
3639};
3640#endif
3641
3643#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3644
3645#if 1
3646/* The user-facing name of the symbol whose (internal) number is
3647 YYSYMBOL. No bounds checking. */
3648static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3649
3650/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3651 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3652static const char *const yytname[] =
3653{
3654 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3655 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3656 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3657 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3658 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3659 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3660 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3661 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3662 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3663 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3664 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3665 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3666 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3667 "\"method\"", "\"global variable\"", "\"instance variable\"",
3668 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3669 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3670 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3671 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3672 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3673 "\"escaped form feed\"", "\"escaped carriage return\"",
3674 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3675 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3676 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3677 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3678 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3679 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3680 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3681 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3682 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3683 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3684 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3685 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3686 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3687 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3688 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3689 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3690 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3691 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3692 "allow_exits", "k_END", "$@6", "stmt", "asgn_lhs_mrhs",
3693 "asgn_lhs_command_rhs", "command_asgn", "op_asgn_command_rhs",
3694 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3695 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3696 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3697 "expr_value_do", "command_call", "value_expr_command_call",
3698 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3699 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head",
3700 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fitem",
3701 "undef_list", "$@12", "op", "reswords", "asgn_lhs_arg_rhs", "arg",
3702 "op_asgn_arg_rhs", "def_endless_method_endless_arg", "endless_arg",
3703 "relop", "rel_expr", "lex_ctxt", "begin_defined", "after_rescue",
3704 "value_expr_arg", "arg_value", "aref_args", "arg_rhs", "paren_args",
3705 "opt_paren_args", "opt_call_args", "value_expr_command", "call_args",
3706 "$@13", "command_args", "block_arg", "opt_block_arg", "args",
3707 "arg_splat", "mrhs_arg", "mrhs", "primary", "$@14", "$@15", "@16", "@17",
3708 "$@18", "$@19", "$@20", "$@21", "$@22", "$@23", "$@24",
3709 "value_expr_primary", "primary_value", "k_begin", "k_if", "k_unless",
3710 "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def",
3711 "k_do", "k_do_block", "k_rescue", "k_ensure", "k_when", "k_else",
3712 "k_elsif", "k_end", "k_return", "k_yield", "then", "do", "if_tail",
3713 "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs", "f_rest_marg",
3714 "f_any_kwrest", "$@25", "f_eq", "f_kw_primary_value",
3715 "f_kwarg_primary_value", "block_args_tail", "excessed_comma",
3716 "f_opt_primary_value", "f_optarg_primary_value",
3717 "opt_args_tail_block_args_tail", "block_param", "opt_block_param",
3718 "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "max_numparam",
3719 "numparam", "it_id", "@26", "$@27", "lambda", "f_larglist",
3720 "lambda_body", "$@28", "do_block", "block_call", "method_call",
3721 "brace_block", "@29", "brace_body", "@30", "do_body", "case_args",
3722 "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg", "$@31",
3723 "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body", "p_expr",
3724 "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic", "$@32",
3725 "p_args", "p_args_head", "p_args_tail", "p_find", "p_rest",
3726 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
3727 "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value", "p_primitive",
3728 "value_expr_p_primitive", "p_primitive_value", "p_variable", "p_var_ref",
3729 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3730 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3731 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3732 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3733 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3734 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3735 "string_contents", "xstring_contents", "regexp_contents",
3736 "string_content", "@33", "@34", "@35", "@36", "string_dend",
3737 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3738 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3739 "var_ref", "var_lhs", "backref", "$@37", "superclass",
3740 "f_opt_paren_args", "f_paren_args", "f_arglist", "@38", "f_kw_arg_value",
3741 "f_kwarg_arg_value", "args_tail", "f_opt_arg_value",
3742 "f_optarg_arg_value", "opt_args_tail_args_tail", "f_args",
3743 "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item",
3744 "f_arg", "f_label", "kwrest_mark", "f_no_kwarg", "f_kwrest",
3745 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
3746 "opt_f_block_arg", "value_expr_var_ref", "singleton", "$@39",
3747 "assoc_list", "assocs", "assoc", "operation", "operation2", "operation3",
3748 "dot_or_colon", "call_op", "call_op2", "rparen", "rbracket", "rbrace",
3749 "trailer", "term", "terms", "none", YY_NULLPTR
3750};
3751
3752static const char *
3753yysymbol_name (yysymbol_kind_t yysymbol)
3754{
3755 return yytname[yysymbol];
3756}
3757#endif
3758
3759#define YYPACT_NINF (-1164)
3760
3761#define yypact_value_is_default(Yyn) \
3762 ((Yyn) == YYPACT_NINF)
3763
3764#define YYTABLE_NINF (-807)
3765
3766#define yytable_value_is_error(Yyn) \
3767 ((Yyn) == YYTABLE_NINF)
3768
3769/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3770 STATE-NUM. */
3771static const yytype_int16 yypact[] =
3772{
3773 -1164, 5274, 135, -1164, -1164, -1164, -1164, 9887, -1164, -1164,
3774 -1164, -1164, -1164, -1164, -1164, 10942, 10942, -1164, -1164, -1164,
3775 -1164, 6176, -1164, -1164, -1164, -1164, 557, 9733, -4, 27,
3776 -1164, -1164, -1164, -1164, 5552, 6332, -1164, -1164, 5708, -1164,
3777 -1164, -1164, -1164, -1164, -1164, -1164, -1164, 12382, 12382, 12382,
3778 12382, 138, 8646, 8804, 11422, 11662, 10188, -1164, 9579, -1164,
3779 -1164, -1164, 41, 41, 41, 41, 1234, 12502, 12382, -1164,
3780 321, -1164, -1164, 1293, -1164, -1164, -1164, -1164, -1164, 463,
3781 -5, -5, -1164, -1164, 87, 141, 76, -1164, 72, 12982,
3782 -1164, 118, -1164, 4129, -1164, -1164, 777, 342, -1164, 409,
3783 -1164, 10822, 10822, -1164, -1164, 9266, 13100, 13218, 13336, 9424,
3784 10942, 6800, -1164, 779, 74, -1164, -1164, 186, -1164, -1164,
3785 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3786 -1164, -1164, -1164, -1164, -1164, 66, 371, -1164, 211, 526,
3787 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3788 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3789 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3790 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3791 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3792 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3793 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3794 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, 242,
3795 -1164, -1164, -1164, -1164, -1164, -1164, 276, 12382, 426, 8804,
3796 12382, 12382, 12382, -1164, 12382, -5, -5, -1164, 197, 5522,
3797 -1164, 505, -1164, -1164, -1164, 458, -1164, 419, 349, 478,
3798 539, 480, 489, -1164, -1164, 11062, -1164, 10942, -1164, -1164,
3799 10563, 12622, 1101, -1164, 517, -1164, 8962, -1164, -1164, -1164,
3800 -1164, -1164, 522, 87, -1164, 742, -1164, 530, 615, 5678,
3801 5678, 639, -1164, 8646, 544, 321, -1164, 1293, -4, 625,
3802 -1164, -1164, 575, 396, 600, -1164, 505, 619, 600, -1164,
3803 -4, 748, 1234, 13454, 667, 667, 661, -1164, 758, 769,
3804 775, 820, -1164, -1164, 332, -1164, -1164, 659, 802, 679,
3805 -1164, 671, 671, 671, 671, 750, -1164, -1164, -1164, -1164,
3806 -1164, -1164, -1164, 5426, 712, 10822, 10822, 10822, 10822, -1164,
3807 12622, 12622, 2032, 754, 768, -1164, 2032, -1164, 778, -1164,
3808 -1164, -1164, -1164, 814, -1164, -1164, -1164, -1164, -1164, -1164,
3809 -1164, 8646, 10306, 729, -1164, -1164, 12382, 12382, 12382, 12382,
3810 12382, -1164, -1164, 12382, 12382, 12382, 12382, 12382, 12382, 12382,
3811 12382, -1164, 12382, -1164, -1164, 12382, 12382, 12382, 12382, 12382,
3812 12382, 12382, 12382, 12382, 12382, -1164, -1164, 13942, 10942, 14040,
3813 7582, -1164, 463, -1164, 107, 107, 10822, 8494, 8494, -1164,
3814 321, 798, 889, -1164, -1164, 841, 912, 98, 148, 165,
3815 844, 917, 10822, 380, -1164, 818, 871, -1164, -1164, -1164,
3816 -1164, 82, 93, 389, 410, 471, 519, 635, 708, 717,
3817 -1164, -1164, -1164, -1164, -1164, 789, -1164, 10424, -1164, -1164,
3818 -1164, 15510, -1164, -1164, -1164, -1164, -1164, -1164, 486, -1164,
3819 -1164, -1164, 516, 838, 845, -1164, 12382, 11182, -1164, -1164,
3820 14138, 10942, 14236, -1164, -1164, 11542, -1164, 12382, -4, -1164,
3821 826, -4, 827, -1164, -1164, 817, 174, -1164, -1164, -1164,
3822 -1164, -1164, 9887, -1164, -1164, 12382, 833, 14334, 14236, -1164,
3823 27, -4, -1164, -1164, 4809, 836, 840, -1164, 11422, -1164,
3824 -1164, 11662, -1164, -1164, -1164, 517, 1011, -1164, -1164, 851,
3825 -1164, 13454, 14432, 10942, 14530, -1164, -1164, -1164, -1164, -1164,
3826 -1164, -1164, -1164, -1164, -1164, -1164, -1164, 881, 113, 1075,
3827 304, 12382, -1164, -1164, 9114, -1164, -1164, -1164, -1164, -1164,
3828 10702, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
3829 -1164, 1246, -1164, -1164, -1164, -1164, -1164, 857, -1164, -1164,
3830 858, -1164, -1164, 863, -4, -1164, -1164, -1164, 891, -1164,
3831 868, 12382, 356, -1164, -1164, 976, 876, 980, -1164, 12742,
3832 7582, 321, 12742, 7582, -1164, 898, -1164, -1164, -1164, 116,
3833 116, 11782, -4, 13454, 888, -1164, 11782, -1164, 615, 3356,
3834 3356, 3356, 3356, 4352, 2905, 3356, 3356, 5678, 5678, 479,
3835 479, -1164, 3886, 969, 969, 1181, 485, 485, 615, 615,
3836 615, 1910, 1910, 6956, 5864, 7268, 6020, -1164, -1164, 522,
3837 -1164, -4, 896, 796, -1164, 855, -1164, -1164, 6488, -1164,
3838 116, -1164, 7734, 1041, 8190, 241, 116, 116, 1038, 1032,
3839 168, 14628, 10942, 14726, -1164, -1164, -1164, 1011, -1164, -1164,
3840 -1164, 14824, 10942, 14922, 7582, 12622, -1164, -1164, -1164, -4,
3841 -1164, -1164, -1164, 2576, 12502, 12502, 9887, 12382, 12862, 12862,
3842 12382, -1164, 505, -1164, -1164, 489, 4566, 6644, -4, 498,
3843 515, 12382, 12382, -1164, -1164, 11302, -1164, 11542, -1164, -1164,
3844 -1164, 12622, 5522, -1164, 493, 522, 522, 12382, -1164, 9,
3845 -1164, -1164, 600, 13454, 851, 638, 728, -4, 633, 665,
3846 -1164, -1164, 1419, -1164, 38, -1164, 41, -1164, -1164, 38,
3847 41, -1164, 615, 906, -1164, 1246, 1308, -1164, 904, -4,
3848 918, -1164, 30, -1164, -1164, 1144, -1164, 2032, -1164, -1164,
3849 927, 12382, 2032, -1164, -1164, -1164, -1164, -1164, 1484, -1164,
3850 -1164, 557, 1023, -1164, 5522, 1042, 116, -1164, 1023, 1042,
3851 116, -1164, -1164, 929, -1164, -1164, -1164, -1164, -1164, 12382,
3852 -1164, -1164, -1164, 946, 947, 1051, -1164, -1164, 851, 13454,
3853 -1164, -1164, 1060, 973, 4254, -1164, -1164, -1164, 1021, 564,
3854 -1164, -1164, 987, -1164, -1164, -1164, -1164, 814, 957, 887,
3855 11182, -1164, -1164, -1164, -1164, 814, -1164, 1123, -1164, 586,
3856 -1164, 1118, -1164, -1164, -1164, -1164, -1164, -1164, 11902, 116,
3857 -1164, 1038, 116, 178, 258, -4, 190, 238, 10822, 321,
3858 10822, 7582, 940, 728, -1164, -4, 116, 174, 10041, -1164,
3859 74, 141, -1164, 6923, -1164, -1164, -1164, -1164, -1164, 557,
3860 -1164, -1164, -1164, 610, -1164, -1164, -4, 982, 174, -1164,
3861 -1164, -1164, 675, -1164, -1164, -1164, -1164, -1164, 671, -1164,
3862 671, 671, 671, -1164, -4, -1164, 1246, -1164, 1324, -1164,
3863 -1164, 1086, 857, -1164, -1164, 991, 994, -1164, -1164, 999,
3864 -1164, 1005, -1164, 991, 12742, -1164, -1164, -1164, -1164, -1164,
3865 -1164, -1164, 1006, 12022, -1164, 851, -1164, -1164, -1164, 15020,
3866 10942, 15118, -1164, -1164, 12382, 12502, 12502, 990, -1164, -1164,
3867 -1164, 12502, 12502, -1164, -1164, 12142, 1118, -1164, -1164, -1164,
3868 8494, 10822, 116, -1164, -1164, 116, -1164, 12382, -1164, 152,
3869 -1164, -1164, 116, -1164, 249, 241, 7582, 321, 116, -1164,
3870 -1164, -1164, -1164, -1164, -1164, 12862, 12382, 12382, -1164, 12382,
3871 12382, -1164, 11542, -1164, 1792, 5122, -1164, -1164, 1008, 1018,
3872 -1164, 1484, -1164, 1484, -1164, 2032, -1164, 1484, -1164, -1164,
3873 1023, 1042, 12382, 12382, -1164, -1164, 12382, 1024, 10702, 10702,
3874 12502, 12382, 7112, 7424, -4, 623, 650, 4938, 4938, 5522,
3875 -1164, -1164, -1164, -1164, -1164, 12502, -1164, -1164, -1164, -1164,
3876 946, -1164, 1077, -1164, 1177, -1164, -1164, 107, -1164, -1164,
3877 -1164, 12262, 7886, -1164, -1164, -1164, 116, -1164, -1164, 12382,
3878 2032, -1164, -1164, 109, 1324, 1324, 991, 991, 1036, 991,
3879 5522, 5522, 1056, 1056, 1006, -1164, -1164, 5522, 702, -1164,
3880 -1164, -1164, 1621, 1621, 421, -1164, 13763, 500, 1146, -1164,
3881 1300, -1164, -1164, 245, -1164, 1062, -1164, -1164, -1164, 1050,
3882 -1164, 1058, -1164, 13954, -1164, -1164, -1164, -1164, 785, -1164,
3883 804, -1164, -1164, -1164, 44, -1164, -1164, -1164, -1164, -1164,
3884 -1164, -1164, -1164, -1164, 382, -1164, -1164, -1164, 13572, 107,
3885 -1164, -1164, 8494, -1164, -1164, 8342, 7734, 12382, -1164, 759,
3886 4938, 8494, -1164, -4, 99, -1164, -1164, -1164, 1018, -1164,
3887 -1164, 1484, -1164, -1164, 1734, 9114, -1164, -1164, 7582, -1164,
3888 -1164, -1164, -1164, -1164, 13954, 286, -4, 13862, -1164, -4,
3889 1059, -1164, 1065, -1164, -1164, -1164, 1145, -1164, 10822, -1164,
3890 1167, 13862, 13954, 13954, 1134, 1119, 1621, 1621, 421, 227,
3891 433, 4938, 4938, -1164, 1169, -1164, 1030, 176, 275, 303,
3892 7582, 321, -1164, 586, -1164, -1164, -1164, -1164, 107, 893,
3893 116, 1067, 1070, -1164, 9114, -1164, 991, 857, -1164, 1076,
3894 -1164, -1164, 1078, -4, 1091, 891, 1081, 13690, 1084, -1164,
3895 -1164, -1164, 60, -1164, 1119, 1085, 1089, -1164, -1164, -1164,
3896 -1164, -1164, -4, -1164, -1164, 1093, -1164, 1094, -1164, -1164,
3897 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -4,
3898 -4, -4, -4, -4, -4, 314, 15216, 10942, 15314, 1123,
3899 -1164, 1177, -1164, -1164, 10822, 10822, -1164, 1314, -1164, 7582,
3900 1099, -1164, -1164, 1144, -1164, 2160, -1164, 1115, -1164, 13690,
3901 2160, -1164, -1164, 1200, 1037, 1383, -1164, -1164, 13954, -1164,
3902 1134, -1164, 13954, 13862, 306, -1164, -1164, -1164, -1164, -1164,
3903 -1164, 127, 164, -4, 367, 369, -1164, -1164, 8038, -1164,
3904 -1164, -1164, 799, -1164, -1164, 116, -1164, -1164, 857, -1164,
3905 -1164, 1102, 1103, -1164, 1037, 1108, 1110, -1164, 15412, 1102,
3906 1117, -4, 1117, -1164, -1164, 379, 550, 1314, -1164, -1164,
3907 -1164, 1383, -1164, 1383, -1164, 2160, -1164, 1383, -1164, 1124,
3908 1125, -1164, 13954, -1164, -1164, -1164, -1164, -1164, 1102, 1102,
3909 1129, 1102, -1164, -1164, 1383, -1164, -1164, 1102, -1164
3910};
3911
3912/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3913 Performed when YYTABLE does not specify something else to do. Zero
3914 means the default is an error. */
3915static const yytype_int16 yydefact[] =
3916{
3917 2, 0, 0, 47, 400, 401, 402, 0, 393, 394,
3918 395, 398, 26, 26, 26, 387, 388, 389, 390, 412,
3919 413, 317, 691, 690, 692, 693, 63, 0, 63, 0,
3920 806, 695, 694, 696, 783, 785, 685, 684, 784, 686,
3921 680, 681, 682, 683, 629, 701, 702, 0, 0, 0,
3922 0, 0, 0, 0, 806, 806, 121, 482, 655, 655,
3923 657, 659, 0, 0, 0, 0, 0, 0, 0, 6,
3924 3, 8, 26, 10, 43, 49, 40, 57, 60, 46,
3925 710, 710, 69, 90, 317, 89, 0, 109, 0, 113,
3926 123, 0, 234, 78, 242, 279, 263, 280, 392, 0,
3927 345, 0, 0, 86, 86, 0, 0, 0, 0, 0,
3928 354, 317, 364, 93, 362, 334, 335, 628, 630, 336,
3929 337, 638, 338, 644, 340, 648, 339, 650, 341, 627,
3930 672, 673, 626, 678, 689, 697, 698, 342, 0, 343,
3931 96, 7, 1, 202, 213, 203, 226, 199, 219, 209,
3932 208, 229, 230, 224, 207, 206, 201, 227, 231, 232,
3933 211, 200, 214, 218, 220, 212, 205, 221, 228, 223,
3934 222, 215, 225, 210, 198, 217, 216, 197, 204, 195,
3935 196, 192, 193, 194, 152, 154, 153, 187, 188, 183,
3936 165, 166, 167, 174, 171, 173, 168, 169, 189, 190,
3937 175, 176, 180, 184, 170, 172, 162, 163, 164, 177,
3938 178, 179, 181, 182, 185, 186, 191, 157, 159, 33,
3939 155, 156, 158, 396, 397, 399, 0, 779, 0, 0,
3940 328, 782, 320, 655, 0, 710, 710, 311, 0, 293,
3941 294, 323, 312, 107, 316, 806, 324, 0, 697, 698,
3942 0, 343, 806, 775, 108, 806, 501, 0, 104, 64,
3943 63, 0, 0, 28, 806, 12, 0, 11, 27, 290,
3944 387, 388, 502, 0, 257, 0, 354, 357, 258, 248,
3945 249, 351, 24, 0, 0, 3, 21, 23, 63, 111,
3946 20, 347, 0, 63, 63, 295, 0, 0, 63, 773,
3947 63, 0, 0, 0, 710, 710, 119, 391, 0, 129,
3948 130, 137, 479, 675, 0, 674, 676, 0, 0, 0,
3949 635, 639, 651, 645, 653, 679, 73, 269, 270, 803,
3950 802, 5, 804, 0, 0, 0, 0, 0, 0, 806,
3951 0, 0, 740, 0, 709, 383, 740, 707, 0, 385,
3952 403, 506, 495, 97, 508, 361, 404, 508, 491, 806,
3953 125, 0, 117, 114, 806, 76, 0, 0, 0, 0,
3954 0, 286, 287, 0, 0, 0, 0, 246, 247, 0,
3955 0, 74, 0, 284, 285, 0, 0, 0, 0, 0,
3956 0, 0, 0, 0, 0, 793, 794, 0, 806, 0,
3957 0, 85, 83, 84, 0, 0, 0, 0, 0, 371,
3958 3, 4, 0, 424, 423, 0, 0, 697, 698, 343,
3959 147, 148, 0, 0, 150, 705, 0, 697, 698, 343,
3960 381, 222, 215, 225, 210, 192, 193, 194, 152, 153,
3961 771, 80, 79, 769, 770, 0, 106, 63, 105, 796,
3962 795, 0, 363, 631, 806, 806, 160, 778, 351, 327,
3963 781, 319, 0, 0, 0, 806, 0, 0, 313, 322,
3964 0, 806, 0, 806, 806, 0, 314, 741, 63, 307,
3965 806, 63, 806, 306, 318, 0, 63, 360, 72, 30,
3966 32, 31, 0, 806, 291, 0, 0, 0, 0, 806,
3967 0, 63, 349, 14, 0, 110, 0, 352, 801, 800,
3968 296, 801, 298, 353, 774, 0, 136, 679, 127, 122,
3969 709, 0, 0, 806, 0, 480, 661, 677, 664, 662,
3970 656, 632, 633, 658, 634, 660, 636, 0, 0, 0,
3971 0, 0, 805, 9, 0, 34, 35, 36, 37, 292,
3972 0, 70, 71, 747, 744, 743, 742, 745, 753, 754,
3973 741, 0, 760, 755, 764, 763, 759, 806, 756, 714,
3974 806, 739, 722, 725, 63, 720, 746, 748, 749, 751,
3975 725, 713, 758, 437, 436, 762, 725, 766, 719, 0,
3976 0, 0, 0, 0, 479, 0, 506, 98, 479, 0,
3977 0, 0, 63, 0, 115, 126, 0, 519, 255, 262,
3978 264, 265, 266, 273, 274, 267, 268, 244, 245, 271,
3979 272, 519, 63, 259, 260, 261, 250, 251, 252, 253,
3980 254, 288, 289, 783, 785, 784, 787, 500, 786, 317,
3981 498, 63, 806, 783, 785, 784, 787, 499, 317, 806,
3982 0, 415, 0, 414, 0, 0, 0, 0, 0, 369,
3983 351, 0, 806, 0, 374, 379, 147, 148, 149, 703,
3984 377, 0, 806, 0, 0, 0, 791, 792, 81, 63,
3985 356, 783, 784, 317, 0, 0, 0, 0, 0, 0,
3986 0, 777, 325, 321, 326, 806, 783, 784, 63, 783,
3987 784, 0, 0, 776, 301, 308, 303, 310, 797, 359,
3988 29, 0, 275, 13, 350, 0, 806, 0, 25, 112,
3989 22, 348, 63, 0, 120, 788, 135, 63, 783, 784,
3990 481, 665, 0, 637, 0, 641, 0, 647, 643, 0,
3991 0, 649, 256, 0, 38, 0, 435, 427, 429, 63,
3992 432, 425, 0, 718, 768, 0, 717, 0, 735, 708,
3993 0, 0, 0, 732, 712, 585, 757, 761, 0, 737,
3994 765, 63, 58, 61, 281, 277, 0, 711, 59, 278,
3995 0, 480, 504, 0, 480, 410, 411, 505, 490, 328,
3996 91, 92, 41, 330, 0, 45, 329, 124, 118, 0,
3997 68, 48, 66, 0, 299, 323, 233, 42, 0, 343,
3998 517, 517, 0, 806, 806, 506, 497, 101, 0, 503,
3999 308, 806, 806, 305, 496, 99, 304, 806, 346, 806,
4000 416, 806, 418, 87, 417, 367, 368, 407, 0, 0,
4001 519, 0, 0, 788, 350, 63, 783, 784, 0, 0,
4002 0, 0, 147, 148, 151, 63, 0, 63, 0, 355,
4003 492, 94, 50, 299, 235, 56, 241, 161, 780, 63,
4004 315, 806, 806, 503, 806, 806, 63, 806, 63, 243,
4005 297, 128, 503, 26, 666, 663, 670, 671, 640, 642,
4006 652, 646, 654, 39, 63, 434, 0, 750, 0, 767,
4007 715, 758, 806, 724, 723, 725, 725, 439, 721, 725,
4008 752, 725, 749, 725, 0, 806, 806, 384, 386, 481,
4009 95, 481, 333, 0, 806, 116, 806, 806, 806, 0,
4010 806, 0, 518, 518, 0, 0, 0, 0, 102, 798,
4011 806, 0, 0, 100, 405, 806, 18, 618, 409, 408,
4012 0, 0, 0, 419, 421, 0, 88, 0, 510, 0,
4013 372, 517, 0, 373, 503, 0, 0, 0, 0, 503,
4014 382, 772, 82, 493, 494, 0, 0, 0, 806, 0,
4015 0, 302, 309, 358, 740, 0, 426, 428, 430, 433,
4016 716, 0, 736, 0, 733, 0, 728, 0, 730, 738,
4017 65, 283, 0, 0, 26, 26, 328, 331, 0, 0,
4018 0, 0, 783, 784, 63, 783, 784, 0, 0, 276,
4019 54, 239, 55, 240, 103, 0, 52, 237, 53, 238,
4020 619, 620, 806, 621, 806, 15, 422, 0, 365, 366,
4021 511, 0, 0, 518, 370, 375, 0, 704, 378, 0,
4022 740, 483, 486, 0, 0, 0, 725, 725, 725, 725,
4023 62, 282, 806, 806, 332, 44, 67, 300, 503, 610,
4024 616, 581, 0, 0, 0, 518, 63, 518, 569, 655,
4025 0, 607, 77, 527, 533, 535, 537, 531, 530, 565,
4026 532, 574, 577, 580, 586, 587, 576, 540, 588, 609,
4027 0, 541, 593, 594, 595, 598, 599, 600, 601, 602,
4028 604, 603, 605, 606, 584, 75, 51, 236, 0, 0,
4029 623, 406, 0, 19, 625, 0, 0, 0, 512, 806,
4030 0, 0, 380, 63, 0, 669, 668, 667, 431, 734,
4031 729, 0, 726, 731, 63, 0, 470, 469, 0, 608,
4032 596, 597, 148, 614, 0, 557, 63, 558, 562, 63,
4033 0, 552, 0, 806, 555, 568, 0, 611, 0, 612,
4034 0, 528, 0, 0, 575, 579, 591, 592, 0, 518,
4035 518, 0, 0, 583, 0, 622, 0, 697, 698, 343,
4036 0, 3, 16, 806, 513, 515, 516, 514, 0, 524,
4037 0, 473, 0, 488, 0, 484, 725, 806, 442, 806,
4038 468, 450, 453, 63, 0, 749, 453, 441, 453, 447,
4039 507, 509, 63, 550, 572, 560, 559, 551, 563, 799,
4040 553, 582, 63, 534, 529, 565, 536, 566, 570, 655,
4041 578, 573, 589, 590, 615, 539, 549, 538, 545, 63,
4042 63, 63, 63, 63, 63, 351, 0, 806, 0, 806,
4043 624, 806, 420, 520, 0, 0, 376, 0, 485, 0,
4044 0, 727, 446, 0, 445, 0, 464, 0, 471, 0,
4045 448, 459, 461, 0, 440, 0, 466, 556, 0, 564,
4046 0, 613, 0, 0, 0, 542, 543, 544, 546, 547,
4047 548, 788, 350, 63, 783, 784, 617, 17, 0, 525,
4048 526, 477, 63, 475, 478, 0, 487, 443, 806, 452,
4049 451, 453, 453, 472, 449, 453, 453, 351, 0, 453,
4050 561, 63, 566, 567, 571, 503, 806, 0, 474, 489,
4051 444, 0, 465, 0, 462, 0, 456, 0, 458, 788,
4052 350, 467, 0, 554, 522, 523, 521, 476, 453, 453,
4053 453, 453, 463, 457, 0, 454, 460, 453, 455
4054};
4055
4056/* YYPGOTO[NTERM-NUM]. */
4057static const yytype_int16 yypgoto[] =
4058{
4059 -1164, -102, 1020, -1164, -1164, -1164, 956, -1164, 805, 84,
4060 -1164, -1164, -529, -1164, 177, 807, -1164, 0, -1164, -1164,
4061 11, -1164, -1164, 216, -1164, -1164, -558, 91, -587, -65,
4062 -1164, -1164, 448, 2874, -1164, 3109, -1164, -80, -1164, -1164,
4063 1204, 35, -1164, 715, -1164, -650, 1358, 5, 1203, -169,
4064 18, -62, -1164, -422, 7, 3237, -417, 1211, -53, -3,
4065 -1164, -1164, 21, -1164, -1164, 4090, -1164, -1164, -551, 1224,
4066 -1164, 997, 828, 504, -1164, 1276, -1164, 732, 32, 645,
4067 -353, -1164, 43, -1164, -49, -334, -234, 95, -340, -1164,
4068 -549, -24, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
4069 -1164, -1164, -1164, -1164, 977, -1164, -1164, -1164, -1164, -1164,
4070 -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164, -1164,
4071 383, -1164, -437, 1889, 2420, -395, 365, 147, -800, -1164,
4072 -818, -812, 596, 450, -897, -1164, 132, 69, -1164, 205,
4073 -1164, -1163, 78, 191, -1164, 309, -1164, -996, -1164, 45,
4074 137, -112, -70, -1164, -1164, 955, -1164, -1164, -1164, 525,
4075 -1164, -1164, -107, -1164, -520, -1164, 1031, -1164, -761, -1164,
4076 -730, -889, -544, -1164, 51, -1164, -1164, -894, -119, -1164,
4077 -1164, -1164, -1164, 217, -1164, 6, -1164, -592, -973, -1070,
4078 -471, -999, -975, -1164, 221, -1164, -1164, -896, 223, -1164,
4079 -630, -1164, -617, 220, -1164, -1164, -1164, 134, -1164, -1164,
4080 130, 1247, 1337, -1164, 1283, 1482, 1615, 26, -1164, 2071,
4081 -1164, 865, -1164, 2244, -1164, -1164, 2625, -1164, 2773, -1164,
4082 -1164, -57, -1164, -1164, -163, -1164, -1164, -1164, -1164, -1164,
4083 -1164, 22, -1164, -1164, -1164, -1164, 8, -54, 446, -1,
4084 1296, 2725, 2343, -1164, -1164, 4, 657, -6, -1164, 653,
4085 -1164, -299, -731, 651, -547, -329, -236, -1133, -328, -292,
4086 -746, -533, -416, -608, -1164, -725, -1164, -511, -1164, -438,
4087 -562, -1164, -1164, -1164, -1164, 77, -415, 219, -326, -1164,
4088 -1164, -90, -1164, 920, 755, 83, -256, -59, -69, 14
4089};
4090
4091/* YYDEFGOTO[NTERM-NUM]. */
4092static const yytype_int16 yydefgoto[] =
4093{
4094 0, 331, 69, 1, 2, 70, 71, 266, 267, 649,
4095 1125, 1261, 650, 1034, 285, 286, 500, 223, 72, 492,
4096 287, 74, 75, 76, 77, 78, 772, 485, 801, 79,
4097 621, 607, 441, 235, 858, 236, 403, 404, 406, 956,
4098 407, 82, 791, 802, 83, 597, 273, 85, 86, 288,
4099 87, 88, 89, 519, 90, 238, 424, 425, 217, 218,
4100 219, 686, 636, 221, 92, 93, 94, 95, 775, 393,
4101 96, 549, 495, 550, 240, 241, 292, 806, 637, 824,
4102 478, 242, 479, 257, 258, 244, 468, 642, 246, 795,
4103 796, 97, 400, 506, 841, 658, 848, 1131, 851, 849,
4104 674, 590, 593, 98, 275, 100, 101, 102, 103, 104,
4105 105, 106, 107, 108, 109, 354, 357, 945, 1122, 838,
4106 950, 951, 787, 276, 277, 652, 833, 952, 953, 416,
4107 747, 748, 749, 750, 567, 760, 761, 1208, 1209, 1319,
4108 1281, 1211, 1212, 1276, 1213, 1145, 1146, 1202, 1312, 1313,
4109 525, 730, 883, 312, 1134, 112, 1051, 1205, 1269, 358,
4110 113, 114, 355, 594, 595, 598, 599, 959, 839, 1197,
4111 932, 1017, 810, 1308, 842, 1356, 1198, 1082, 1224, 1084,
4112 1085, 1181, 1182, 1086, 1290, 1156, 1157, 1158, 1088, 1089,
4113 1237, 1160, 1090, 1091, 1092, 1093, 1094, 568, 1096, 1097,
4114 1098, 1099, 1100, 1101, 1102, 1103, 1104, 946, 1032, 1119,
4115 1123, 115, 116, 117, 118, 119, 120, 321, 121, 122,
4116 537, 734, 123, 124, 539, 125, 126, 127, 128, 538,
4117 540, 314, 318, 319, 530, 732, 731, 884, 985, 1137,
4118 885, 129, 130, 315, 131, 132, 133, 134, 248, 249,
4119 137, 250, 251, 850, 670, 343, 344, 345, 346, 569,
4120 570, 903, 572, 573, 758, 574, 575, 576, 577, 912,
4121 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
4122 753, 444, 445, 675, 297, 482, 253, 140, 715, 640,
4123 678, 673, 451, 487, 819, 1164, 510, 653, 411, 269
4124};
4125
4126/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4127 positive, shift that token. If negative, reduce the rule whose
4128 number is the opposite. If YYTABLE_NINF, syntax error. */
4129static const yytype_int16 yytable[] =
4130{
4131 136, 333, 317, 409, 316, 313, 668, 452, 756, 399,
4132 654, 332, 73, 224, 225, 141, 910, 591, 476, 481,
4133 237, 237, 405, 450, 263, 410, 904, 363, 220, 222,
4134 902, 955, 307, 763, 778, 353, 402, 402, 512, 769,
4135 402, 779, 514, 571, 1018, 641, 332, 571, 220, 222,
4136 578, 136, 136, 256, 578, 310, 442, 807, 243, 254,
4137 703, 776, 448, 306, 780, 307, 290, 290, 295, 299,
4138 289, 639, 334, 648, 325, 349, 783, 811, 987, 220,
4139 962, 933, 307, 307, 307, 348, 989, 1225, 310, 322,
4140 323, 324, 252, 252, 347, 347, 703, 862, 865, 724,
4141 350, 1235, 326, 1159, 526, 418, 428, 428, 428, 1135,
4142 245, 245, 1320, 350, 501, 237, 352, 261, 698, 264,
4143 651, 1095, 1095, -138, 1115, 683, 785, 694, 1203, -806,
4144 220, 294, 298, 693, 1314, 142, 284, 291, 779, 564,
4145 -142, 693, 1178, -110, 639, 856, 648, 901, 1214, 293,
4146 259, -691, 342, 446, 1130, 533, 535, 472, 1226, 528,
4147 529, 1170, -690, 788, -124, 651, -699, 938, 694, 356,
4148 727, 565, 716, -139, 1238, 943, 462, -144, 265, 736,
4149 -691, 798, 1320, 503, 786, 498, 1154, 252, 1163, -138,
4150 -146, -690, 602, -145, 281, 486, 488, 1179, 716, 320,
4151 -138, 1180, 320, -142, 1314, 245, 1251, 1254, 1250, 1253,
4152 359, 340, 341, 828, 259, -141, 504, 1277, 524, 835,
4153 836, -129, 1204, 1333, 905, 351, 332, 360, 136, 1136,
4154 349, 1043, 737, 751, 1095, 913, 1199, 987, 351, 463,
4155 464, 518, 1138, 290, 255, 910, 906, 1207, 476, 347,
4156 347, 911, 364, -129, 854, 545, 546, 547, 548, 469,
4157 237, 329, 237, -143, 904, 136, 469, 330, 832, 483,
4158 402, 402, 402, 402, -140, 551, 552, 73, 1095, 307,
4159 141, -142, 136, -144, -783, 1095, 1095, -142, -139, 1238,
4160 1245, 1247, 703, 1238, 1334, 937, 961, 290, 59, 349,
4161 484, 289, 310, -130, 256, 352, 329, 1041, 659, 845,
4162 517, 454, 330, 284, 899, 1331, -146, 899, -144, 855,
4163 -137, -784, 968, -136, -144, 663, 655, -145, 259, 1195,
4164 -138, 465, 136, -134, 252, -783, -138, 716, 307, 917,
4165 990, 402, 665, 918, 73, -132, 1170, 716, 1020, 1022,
4166 480, 332, 245, 1334, 1026, 1028, 1000, 402, 992, 994,
4167 136, 310, 996, 1001, 998, 694, 999, 284, 1196, 604,
4168 740, 693, 526, 693, 735, 290, 735, 925, 1207, 289,
4169 -141, 259, -143, 1207, 509, 509, -63, 1170, 1207, 509,
4170 765, 515, -140, -133, 1095, 329, 1031, 456, 526, 136,
4171 1171, 330, 960, 237, -131, 963, 136, 136, 766, 1114,
4172 1114, -391, 483, -135, 290, -784, 765, 751, 895, 970,
4173 646, 290, 290, 741, 1001, 1087, 1087, 528, 529, -139,
4174 1231, 647, 666, 260, 1183, -139, 667, 1046, 1116, -391,
4175 -391, -572, 1149, 1149, 1207, 284, 1207, 135, 1207, -699,
4176 1207, 527, 237, 528, 529, 1150, 1151, -146, -692, 518,
4177 1056, 870, 1057, -146, 1059, 578, 880, 1207, -145, 876,
4178 578, -700, 646, 666, -145, 329, 237, 1152, 395, -693,
4179 694, 330, 458, -138, 1058, 483, 693, -692, 395, 710,
4180 679, 656, 657, 646, 469, -391, 469, 307, 135, 135,
4181 340, 341, 309, 136, 647, -139, 396, 397, -693, 1139,
4182 1140, 1142, 1143, 220, 222, 1038, 396, 470, 1039, 646,
4183 310, -141, 1114, -143, 252, 1044, -130, -141, 237, -143,
4184 647, 1048, 777, -140, 910, 309, 1354, 483, 1087, -140,
4185 -695, 518, 245, 136, 695, 646, 1149, 1149, 1318, 136,
4186 259, 508, 417, 427, 427, 427, 647, 366, 290, 1242,
4187 1243, 744, 398, 366, 1042, 949, 1114, 703, 751, -695,
4188 751, 889, 471, 1114, 1114, 840, 889, 1014, -700, 307,
4189 474, 754, 526, 694, 754, 722, 499, 259, -694, 136,
4190 817, -63, 136, 872, 773, 910, 834, 773, 874, 825,
4191 948, 949, 310, 639, 290, 648, 466, 290, 1206, 1132,
4192 857, 1216, -139, 467, -146, 875, 638, -694, 638, 1221,
4193 -145, 388, 389, 390, 391, 392, 455, -144, 743, 390,
4194 391, 392, -141, 1218, 861, 531, 790, 528, 529, 473,
4195 687, 790, 1126, 870, 475, 1272, 878, 1274, 693, -143,
4196 -784, 136, -63, 136, 259, 1052, 469, 1153, -132, 1271,
4197 -146, 881, 826, -134, 455, 901, 290, 237, 290, 919,
4198 638, 816, 921, 136, 493, 135, 483, 237, 886, 255,
4199 823, -137, 1114, 867, 646, 571, 483, 447, 290, 638,
4200 -133, 638, 578, 366, 646, 647, 794, 826, -146, 307,
4201 -131, 794, 502, 578, -696, 647, 1219, 220, 222, 469,
4202 978, 259, 135, 812, 260, 823, 638, 638, 931, 790,
4203 790, 1133, 310, 821, 1190, 526, 751, 751, 1217, 135,
4204 826, 781, 818, -696, 507, 784, 829, 518, 831, 499,
4205 1315, 638, 1321, 638, -140, 526, 534, 816, 823, 309,
4206 822, 571, 1329, 973, 259, 511, 1340, -141, 578, -109,
4207 888, 1244, 890, 1266, 1322, 891, 892, -132, 965, 1326,
4208 967, 513, -134, -145, 949, 307, 837, -687, 531, 135,
4209 528, 529, 877, 402, -143, 402, -688, -132, -132, 818,
4210 966, -132, -134, -134, -136, -783, -134, -350, 310, -133,
4211 528, 529, 940, 1263, 516, 442, -687, 135, 309, -131,
4212 1358, 395, 1359, 509, 1361, -688, 521, 1330, 818, -133,
4213 -133, 1332, 800, -133, 342, -350, -350, 395, 541, -131,
4214 -131, 1367, 536, -131, 1360, 899, -140, 1219, -697, 396,
4215 497, 947, 1219, 954, -698, 954, 135, 1219, 395, 1004,
4216 136, 1005, 1215, 135, 135, 396, 522, 1217, 676, 1217,
4217 371, 372, 914, 544, 1217, 290, -697, -697, 526, 1217,
4218 -783, 1037, -698, -698, -608, -608, 396, 449, 1339, 220,
4219 638, -350, 638, 984, 605, -784, 402, 677, 589, -343,
4220 638, 469, 638, 1176, 1177, 471, 821, 877, 1083, 1083,
4221 800, 800, -706, 1219, 1303, 1219, 834, 1219, 1047, 1219,
4222 395, 523, 592, -687, 383, 384, 754, -343, -343, 773,
4223 596, 532, -697, 528, 529, 1217, 1219, 1217, -698, 1217,
4224 -141, 1217, 716, 1264, 1265, 237, 818, 664, 396, 661,
4225 395, -687, -687, -784, 483, 660, 818, 526, 1217, 136,
4226 135, -132, 646, 259, 1337, 822, 669, 1155, 542, 1033,
4227 975, 520, 520, 647, 290, 136, -788, 309, 396, 671,
4228 790, 790, 688, -343, 1175, 708, 790, 790, 99, 689,
4229 290, 705, 707, 1215, 136, 713, -688, 940, 1215, -143,
4230 135, -124, 247, 247, 662, -783, 135, -687, 721, 290,
4231 733, -783, 528, 529, 1062, 1063, 723, 136, 136, -788,
4232 -133, 1083, 752, 755, -688, -688, 1113, 1113, 757, 1065,
4233 1066, -140, 1166, 762, 672, -438, 1169, 268, 767, 99,
4234 99, 768, 770, 308, 1036, 1222, 135, -788, -788, 135,
4235 794, 136, -131, 799, 247, 790, 1120, 366, 1124, 309,
4236 782, 820, 1155, 1215, 830, 837, 290, 840, 893, 896,
4237 790, 907, 1155, 1155, 379, 380, 308, 915, -784, 1053,
4238 -688, 1113, 1113, 898, -784, 1113, 1147, 1147, 247, 247,
4239 -351, 920, 247, 415, 426, 426, 916, 247, 1232, 1260,
4240 395, -788, 1113, -788, 307, 924, 1258, -783, 135, 395,
4241 135, -323, 923, 402, 926, 818, 395, 927, -351, -351,
4242 387, 388, 389, 390, 391, 392, 939, 1188, 396, 929,
4243 135, 136, 504, 934, 136, 136, 1129, 396, 1256, 1113,
4244 136, 944, 332, 949, 396, 1328, 290, 982, 766, 290,
4245 290, 526, 1024, 954, 136, 290, 991, 136, 638, 993,
4246 638, 800, 800, 1113, 995, 489, 1113, 800, 800, 290,
4247 997, -327, 290, 1054, -351, 490, 491, 818, 1162, 309,
4248 1113, 1113, 1113, 1055, 930, 1113, 1113, 1234, 1118, -325,
4249 1113, 1113, 1294, 1257, 1309, 1310, 1121, 1249, 1252, 136,
4250 672, 1141, 1071, 307, 738, 1144, 528, 529, 1165, 402,
4251 402, 1172, 558, 136, 290, 1173, 99, 954, 505, 1192,
4252 1193, 526, 559, 1174, 1228, 1200, 428, 1229, 290, 1069,
4253 1170, 754, 559, 754, 1201, 1255, 800, 1267, 1268, 1220,
4254 1278, 1273, 247, 1275, 247, 1201, 1280, 247, 247, 1285,
4255 1288, 800, 563, 99, 1289, 309, 1239, 818, 1292, 1293,
4256 818, 1316, 563, 564, 1323, 307, 1327, 1341, 1343, 366,
4257 99, 494, 237, 1345, 531, 1347, 528, 529, 136, 1231,
4258 818, 483, 1352, 947, 1259, 1124, 379, 380, 428, 646,
4259 308, -783, -784, 290, 1364, 565, 496, 1113, 1270, 543,
4260 647, 1113, 1113, 40, 41, 42, 43, 135, 553, 1191,
4261 554, 555, 556, 557, 1201, 718, 972, 136, 408, 413,
4262 99, 720, 247, 247, 247, 247, 792, 247, 247, 430,
4263 394, 711, 290, 388, 389, 390, 391, 392, 860, 1035,
4264 1045, 296, 754, 335, 336, 337, 338, 339, 99, 308,
4265 1262, 894, 1317, 818, 818, 818, 988, 1279, 745, 1210,
4266 954, 1113, 1167, 746, 36, 37, 601, 39, 1325, 84,
4267 553, 606, 554, 555, 556, 557, 1311, 680, 554, 555,
4268 556, 557, 1148, 84, 84, 247, 553, 99, 554, 555,
4269 556, 557, 1357, 247, 99, 99, 974, 1355, 600, 1236,
4270 1233, 1307, 1336, 1306, 818, 1240, 135, 1241, 704, 247,
4271 453, 706, 1168, 1338, 739, 443, 709, 1282, 900, 1286,
4272 84, 84, 135, 909, 1353, 0, 864, 866, 0, 1002,
4273 1003, 719, 1162, 0, 247, 84, 745, 0, 1008, 0,
4274 1009, 135, 1011, 864, 866, 553, 0, 554, 555, 556,
4275 557, 558, 0, 0, 0, 0, 0, 0, 247, 879,
4276 0, 684, 685, 873, 135, 135, 0, 0, 0, 84,
4277 84, 559, 690, 84, 0, 0, 0, 0, 84, 0,
4278 701, 702, 0, 36, 37, 638, 39, 638, 0, 0,
4279 0, 99, 882, 45, 46, 561, 0, 0, 135, 0,
4280 494, 563, 564, 0, 759, 0, 717, 0, 308, 0,
4281 247, 0, 0, 457, 0, 0, 459, 460, 461, 0,
4282 0, 0, 1342, 1344, 0, 0, 1346, 1348, 0, 0,
4283 1351, 99, 797, 0, 565, 0, 0, 99, 0, 0,
4284 0, 0, 0, 0, 0, 0, 553, 0, 554, 555,
4285 556, 557, 558, 0, 0, 0, 0, 638, 0, 1362,
4286 1363, 1365, 1366, 0, 0, 0, 0, 0, 1368, 0,
4287 0, 0, 559, 0, 1187, 0, 247, 99, 135, 247,
4288 99, 135, 135, 0, 0, 0, 560, 135, 247, 0,
4289 308, 0, 0, 808, 0, 0, 561, 84, 0, 0,
4290 0, 135, 563, 564, 135, 0, 0, 0, 0, 859,
4291 964, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4292 969, 0, 0, 84, 0, 84, 0, 0, 84, 84,
4293 0, 0, 0, 0, 84, 565, 0, 0, 0, 99,
4294 0, 99, 0, 0, 0, 0, 135, 0, 0, 247,
4295 0, 84, 0, 0, 0, 0, 827, 0, 0, 247,
4296 135, 99, 247, 0, 22, 23, 24, 25, 0, 0,
4297 0, 808, 808, 427, 0, 0, 0, 1021, 1023, 897,
4298 31, 32, 33, 1027, 1029, 0, 0, 0, 0, 0,
4299 40, 41, 42, 43, 44, 0, 0, 0, 247, 0,
4300 0, 84, 0, 84, 84, 84, 84, 0, 84, 84,
4301 308, 0, 0, 0, 0, 0, 0, 0, 1021, 1023,
4302 0, 1027, 1029, 0, 0, 135, 0, 0, 0, 84,
4303 0, 0, 0, 0, 0, 427, 0, 0, 0, 0,
4304 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4305 0, 0, 691, 692, 0, 0, 0, 0, 0, 0,
4306 0, 296, 0, 0, 135, 0, 84, 1117, 84, 0,
4307 0, 0, 0, 0, 84, 84, 84, 0, 302, 1068,
4308 0, 0, 0, 0, 0, 0, 308, 971, 0, 0,
4309 84, 1117, 0, 0, 692, 0, 553, 296, 554, 555,
4310 556, 557, 558, 0, 0, 0, 981, 0, 983, 0,
4311 0, 0, 0, 0, 0, 84, 0, 0, 0, 0,
4312 935, 936, 559, 0, 986, 0, 0, 0, 941, 942,
4313 0, 0, 0, 0, 0, 247, 0, 247, 99, 84,
4314 0, 1161, 0, 0, 0, 0, 561, 0, 0, 0,
4315 0, 562, 563, 564, 553, 0, 554, 555, 556, 557,
4316 558, 0, 0, 0, 0, 0, 0, 764, 0, 0,
4317 0, 0, 84, 0, 0, 0, 0, 0, 976, 977,
4318 559, 979, 980, 0, 0, 565, 0, 793, 566, 0,
4319 0, 84, 805, 0, 560, 0, 0, 0, 259, 0,
4320 110, 247, 0, 0, 561, 0, 0, 0, 0, 562,
4321 563, 564, 84, 0, 110, 110, 0, 247, 84, 0,
4322 0, 1223, 808, 808, 1227, 0, 0, 0, 808, 808,
4323 0, 0, 0, 0, 1010, 0, 0, 99, 247, 0,
4324 0, 0, 0, 565, 1246, 0, 566, 1025, 0, 0,
4325 0, 110, 110, 99, 0, 0, 0, 84, 84, 1050,
4326 84, 84, 0, 0, 0, 0, 110, 0, 0, 84,
4327 0, 0, 99, 868, 84, 0, 0, 0, 0, 0,
4328 0, 0, 1081, 1081, 0, 1049, 0, 0, 0, 0,
4329 0, 692, 0, 296, 0, 99, 99, 808, 366, 0,
4330 110, 110, 0, 0, 110, 0, 0, 0, 0, 110,
4331 0, 0, 808, 0, 0, 379, 380, 1298, 1299, 1300,
4332 84, 0, 84, 0, 0, 0, 0, 0, 0, 99,
4333 84, 0, 0, 0, 0, 0, 0, 1081, 1081, 0,
4334 84, 1081, 84, 84, 0, 0, 0, 908, 0, 0,
4335 0, 0, 84, 84, 0, 0, 0, 0, 1081, 385,
4336 386, 387, 388, 389, 390, 391, 392, 0, 1335, 0,
4337 0, 0, 0, 0, 0, 922, 0, 0, 0, 84,
4338 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4339 0, 0, 0, 0, 553, 1081, 554, 555, 556, 557,
4340 558, 0, 0, 0, 0, 1186, 692, 0, 0, 99,
4341 1248, 0, 99, 99, 0, 0, 0, 0, 99, 1081,
4342 559, 0, 1081, 0, 958, 0, 0, 0, 110, 0,
4343 0, 0, 99, 0, 560, 99, 1081, 1081, 1081, 0,
4344 0, 1081, 1081, 0, 561, 0, 1081, 1081, 0, 562,
4345 563, 564, 1287, 0, 110, 247, 110, 0, 0, 110,
4346 110, 0, 1291, 0, 0, 110, 0, 0, 0, 0,
4347 1230, 0, 0, 0, 0, 0, 0, 99, 0, 1295,
4348 1296, 1297, 110, 565, 0, 0, 566, 0, 0, 0,
4349 0, 99, 0, 0, 0, 0, 0, 0, 0, 0,
4350 0, 0, 0, 0, 1284, 0, 0, 0, 0, 1007,
4351 0, 0, 0, 0, 0, 0, 84, 0, 84, 84,
4352 0, 0, 553, 0, 554, 555, 556, 557, 558, 0,
4353 0, 1030, 110, 0, 110, 110, 110, 110, 0, 110,
4354 110, 0, 0, 1040, 247, 0, 0, 0, 559, 0,
4355 0, 247, 247, 1081, 0, 0, 99, 1081, 1081, 0,
4356 110, 0, 0, 0, 0, 0, 1324, 0, 296, 0,
4357 0, 0, 561, 0, 1105, 1105, 0, 562, 563, 564,
4358 0, 0, 84, 0, 0, 0, 0, 0, 0, 0,
4359 0, 0, 1064, 0, 0, 99, 0, 110, 84, 110,
4360 0, 0, 0, 84, 84, 110, 110, 110, 0, 84,
4361 84, 565, 0, 0, 566, 0, 0, 1081, 84, 84,
4362 0, 110, 0, 0, 0, 0, 0, 1128, 0, 1105,
4363 1105, 0, 0, 1105, 84, 0, 0, 0, 0, 0,
4364 0, 0, 0, 0, 0, 0, 110, 0, 0, 0,
4365 1105, 0, 0, 84, 139, 0, 0, 0, 0, 0,
4366 0, 0, 0, 0, 1106, 1106, 0, 0, 0, 0,
4367 110, 0, 0, 0, 0, 0, 84, 84, 84, 0,
4368 0, 0, 0, 0, 0, 0, 0, 1105, 0, 0,
4369 0, 0, 0, 84, 0, 0, 0, 0, 0, 0,
4370 0, 0, 0, 110, 0, 139, 139, 0, 0, 311,
4371 84, 1105, 0, 1194, 1105, 0, 0, 0, 0, 1106,
4372 1106, 0, 110, 1106, 0, 0, 0, 0, 1105, 1105,
4373 1105, 111, 0, 1105, 1105, 0, 0, 0, 1105, 1105,
4374 1106, 0, 311, 110, 0, 111, 111, 0, 0, 110,
4375 0, 0, 0, 0, 0, 0, 0, 0, 0, 419,
4376 429, 429, 0, 0, 0, 0, 0, 0, 0, 0,
4377 0, 0, 0, 0, 0, 0, 0, 1106, 0, 0,
4378 0, 0, 111, 111, 0, 0, 0, 0, 110, 110,
4379 84, 110, 110, 84, 84, 0, 0, 111, 0, 84,
4380 110, 1106, 0, 0, 1106, 110, 0, 0, 0, 1107,
4381 1107, 0, 0, 84, 0, 0, 84, 0, 1106, 1106,
4382 1106, 0, 0, 1106, 1106, 0, 0, 0, 1106, 1106,
4383 0, 111, 111, 0, 0, 111, 84, 0, 0, 0,
4384 111, 0, 0, 0, 0, 1105, 0, 0, 0, 1105,
4385 1105, 110, 0, 110, 0, 0, 0, 0, 84, 0,
4386 0, 110, 0, 0, 1107, 1107, 0, 0, 1107, 0,
4387 0, 110, 84, 110, 110, 0, 0, 0, 0, 0,
4388 0, 0, 139, 110, 110, 1107, -806, 0, 0, 0,
4389 0, 0, 0, 0, -806, -806, -806, 0, 0, -806,
4390 -806, -806, 0, -806, 0, 0, 0, 0, 0, 1105,
4391 110, -806, -806, -806, 0, 0, 0, 0, 0, 139,
4392 0, 0, 1107, -806, -806, 84, -806, -806, -806, -806,
4393 -806, 0, 84, 84, 0, 1106, 139, 84, 0, 1106,
4394 1106, 0, 1108, 1108, 0, 0, 1107, 0, 0, 1107,
4395 0, 0, 0, 0, -806, -806, 311, 0, 0, 111,
4396 0, 0, 0, 1107, 1107, 1107, 0, 0, 1107, 1107,
4397 0, 0, 0, 1107, 1107, 0, 84, 0, 0, 0,
4398 0, 0, 0, -806, -806, 111, 139, 111, 0, 0,
4399 111, 111, 0, 0, 0, 0, 111, 1108, 1108, 1106,
4400 0, 1108, 0, 0, 0, 0, -806, 0, 0, 0,
4401 0, 0, 0, 111, 139, 311, 0, 0, 1108, 0,
4402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4403 0, 0, 0, 0, 0, 0, 138, -806, -806, 0,
4404 -806, 0, 0, 255, -806, 0, -806, 110, 0, 110,
4405 110, 0, 0, 139, 0, 1108, 0, 0, 0, 0,
4406 139, 139, 0, 111, 0, 111, 111, 111, 111, 0,
4407 111, 111, 0, 0, 0, 0, 0, 0, 0, 1108,
4408 1107, 0, 1108, 0, 1107, 1107, 0, 138, 138, 0,
4409 0, 111, 0, 0, 0, 0, 1108, 1108, 1108, 0,
4410 0, 1108, 1108, 0, 0, 0, 1108, 1108, 0, 0,
4411 0, 0, 0, 110, 0, 0, 0, 0, 0, 0,
4412 0, 0, 0, 0, 0, 0, 0, 0, 111, 110,
4413 111, 0, 0, 0, 110, 110, 111, 111, 111, 0,
4414 110, 110, 0, 0, 1107, 0, 0, 0, 0, 110,
4415 110, 0, 111, 0, 0, 0, 0, 139, 0, 0,
4416 0, 0, 0, 0, 0, 110, 0, 0, 0, 0,
4417 0, 0, 0, 0, 311, 0, 0, 111, 0, 0,
4418 0, 0, 0, 0, 110, 80, 0, 0, 0, 0,
4419 0, 0, 0, 0, 0, 0, 0, 139, 0, 0,
4420 0, 111, 0, 139, 0, 0, 0, 110, 110, 110,
4421 0, 0, 0, 1108, 0, 0, 0, 1108, 1108, 0,
4422 0, 0, 0, 0, 110, 0, 0, 0, 0, 0,
4423 0, 0, 0, 0, 111, 0, 80, 80, 0, 0,
4424 304, 110, 0, 139, 0, 0, 139, 0, 0, 0,
4425 0, 0, 0, 111, 0, 0, 311, 0, 0, 809,
4426 0, 0, 0, 0, 138, 0, 0, 0, 0, 0,
4427 0, 0, 0, 304, 111, 0, 0, 1108, 0, 0,
4428 111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4429 304, 304, 304, 366, 367, 368, 369, 370, 371, 372,
4430 373, 138, 375, 376, 0, 139, 0, 139, 0, 0,
4431 379, 380, 0, 0, 0, 0, 0, 0, 138, 111,
4432 111, 110, 111, 111, 110, 110, 0, 139, 0, 0,
4433 110, 111, 0, 0, 0, 0, 111, 809, 809, 0,
4434 0, 0, 0, 0, 110, 0, 0, 110, 0, 0,
4435 0, 0, 383, 384, 385, 386, 387, 388, 389, 390,
4436 391, 392, 0, 0, 0, 0, 0, 110, 138, 0,
4437 0, 0, 0, 0, 0, 0, 311, 0, 0, 0,
4438 0, 0, 111, 0, 111, 887, 0, 0, 0, 110,
4439 0, 0, 111, 0, 0, 0, 138, 0, 1109, 1109,
4440 0, 0, 111, 110, 111, 111, 0, 0, 0, 0,
4441 0, 0, 0, 80, 111, 111, 0, 0, 0, 0,
4442 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4443 0, 0, 0, 0, 0, 138, 0, 0, 0, 0,
4444 0, 111, 138, 138, 0, 0, 0, 0, 0, 0,
4445 80, 0, 311, 1109, 1109, 0, 110, 1109, 0, 0,
4446 0, 0, 0, 110, 110, 0, 0, 80, 110, 0,
4447 0, 81, 81, 0, 1109, 305, 0, 0, 0, 0,
4448 0, 0, 0, 0, 0, 0, 0, 304, 0, 0,
4449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4450 0, 0, 0, 0, 139, 0, 0, 110, 305, 0,
4451 0, 1109, 0, 0, 0, 0, 0, 80, 0, 0,
4452 0, 0, 0, 0, 0, 305, 305, 305, 0, 0,
4453 0, 0, 0, 0, 0, 1109, 0, 0, 1109, 138,
4454 0, 0, 0, 0, 0, 80, 304, 0, 91, 0,
4455 0, 0, 1109, 1109, 1109, 0, 0, 1109, 1109, 0,
4456 0, 0, 1109, 1109, 0, 0, 0, 0, 0, 0,
4457 0, 1110, 1110, 0, 0, 0, 0, 0, 111, 138,
4458 111, 111, 0, 0, 80, 138, 0, 0, 809, 809,
4459 0, 80, 80, 0, 809, 809, 0, 0, 0, 91,
4460 91, 0, 0, 139, 0, 0, 0, 0, 0, 0,
4461 0, 0, 0, 0, 0, 0, 0, 0, 0, 139,
4462 0, 0, 0, 0, 0, 138, 1110, 1110, 138, 0,
4463 1110, 0, 0, 0, 0, 0, 0, 0, 139, 0,
4464 0, 138, 0, 0, 111, 0, 0, 1110, 81, 0,
4465 0, 0, 0, 414, 0, 0, 0, 0, 0, 0,
4466 111, 139, 139, 809, 0, 111, 111, 0, 0, 1109,
4467 0, 111, 111, 1109, 1109, 0, 0, 0, 809, 0,
4468 111, 111, 0, 0, 1110, 81, 0, 138, 80, 138,
4469 0, 0, 0, 0, 0, 139, 111, 0, 0, 0,
4470 0, 0, 81, 0, 0, 304, 0, 0, 1110, 138,
4471 0, 1110, 0, 0, 0, 111, 0, 0, 0, 138,
4472 138, 0, 305, 0, 0, 1110, 1110, 1110, 80, 0,
4473 1110, 1110, 0, 1109, 80, 1110, 1110, 0, 111, 111,
4474 111, 0, 0, 0, 366, -807, -807, -807, -807, 371,
4475 372, 0, 81, -807, -807, 111, 0, 0, 0, 0,
4476 0, 379, 380, 0, 0, 0, 0, 0, 0, 0,
4477 0, 1189, 111, 0, 80, 139, 91, 80, 139, 139,
4478 81, 305, 0, 0, 139, 0, 0, 304, 0, 0,
4479 80, 0, 0, 0, 0, 0, 0, 0, 139, 0,
4480 0, 139, 0, 383, 384, 385, 386, 387, 388, 389,
4481 390, 391, 392, 91, 0, 0, 0, 0, 0, 81,
4482 0, 0, 0, 0, 0, 0, 81, 81, 0, 0,
4483 91, 0, 0, 0, 0, 0, 80, 0, 80, 0,
4484 0, 0, 1110, 139, 0, 0, 1110, 1110, 0, 0,
4485 0, 0, 111, 0, 0, 111, 111, 139, 80, 0,
4486 0, 111, 0, 0, 0, 0, 0, 0, 80, 80,
4487 429, 0, 0, 0, 0, 111, 0, 0, 111, 0,
4488 91, 0, 0, 0, 0, 0, 138, 0, 0, 0,
4489 0, 0, 0, 0, 0, 0, 0, 0, 111, 0,
4490 0, 0, 0, 0, 0, 0, 1110, 304, 91, 0,
4491 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4492 111, 0, 139, 81, 0, 0, 0, 0, 0, 0,
4493 0, 0, 429, 0, 111, 0, 0, 0, 0, 0,
4494 305, 0, 0, 0, 0, 0, 0, 91, 0, 0,
4495 0, 0, 1111, 1111, 91, 91, 0, 0, 0, 0,
4496 0, 139, 0, 81, 0, 0, 0, 0, 0, 81,
4497 138, 138, 0, 0, 0, 0, 138, 138, 0, 0,
4498 0, 0, 0, 304, 0, 138, 0, 111, 0, 0,
4499 0, 0, 0, 0, 111, 111, 0, 0, 0, 111,
4500 0, 138, 0, 0, 0, 0, 0, 1111, 1111, 81,
4501 0, 1111, 81, 0, 0, 0, 0, 0, 0, 0,
4502 138, 0, 305, 0, 0, 81, 0, 0, 1111, 0,
4503 0, 0, 0, 0, 0, 80, 0, 0, 111, 0,
4504 0, 0, 0, 138, 138, 138, 0, 0, 0, 0,
4505 0, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4506 138, 0, 0, 0, 0, 1111, 0, 0, 0, 0,
4507 0, 81, 0, 81, 0, 0, 0, 138, 0, 0,
4508 0, 0, 0, 0, 0, 0, 0, 0, 0, 1111,
4509 0, 91, 1111, 81, 0, 0, 0, 91, 0, 0,
4510 1112, 1112, 0, 81, 81, 0, 1111, 1111, 1111, 0,
4511 0, 1111, 1111, 0, 0, 0, 1111, 1111, 0, 80,
4512 80, 0, 0, 0, 0, 80, 80, 0, 0, 0,
4513 0, 0, 0, 0, 80, 0, 0, 91, 0, 0,
4514 91, 0, 305, 0, 0, 0, 0, 0, 0, 0,
4515 80, 0, 0, 803, 0, 1112, 1112, 138, 0, 1112,
4516 138, 138, 0, 0, 0, 0, 138, 0, 0, 80,
4517 0, 0, 0, 0, 0, 0, 1112, 0, 0, 0,
4518 138, 0, 0, 138, 0, 0, 0, 0, 0, 0,
4519 0, 0, 80, 80, 80, 0, 0, 0, 0, 91,
4520 0, 91, 0, 0, 0, 0, 0, 0, 0, 80,
4521 0, 0, 0, 1112, 0, 0, 0, 0, 305, 0,
4522 0, 91, 0, 1111, 0, 138, 80, 1111, 1111, 0,
4523 0, 803, 803, 0, 0, 0, 0, 1112, 0, 138,
4524 1112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4525 0, 0, 0, 0, 1112, 1112, 1112, 0, 0, 1112,
4526 1112, 0, 0, 0, 1112, 1112, 0, 0, 0, 0,
4527 81, 0, 0, 0, 366, 367, 368, 369, 370, 371,
4528 372, 373, 374, 375, 376, 377, 378, 1111, 0, 0,
4529 0, 379, 380, 0, 0, 0, 0, 0, 0, 0,
4530 0, 0, 304, 0, 138, 0, 80, 0, 0, 80,
4531 80, 0, 0, 0, 0, 80, 0, 0, 0, 0,
4532 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4533 0, 382, 80, 383, 384, 385, 386, 387, 388, 389,
4534 390, 391, 392, 138, 0, 0, 0, 0, 0, 0,
4535 259, 0, 0, 0, 81, 81, 0, 0, 0, 0,
4536 81, 81, 0, 0, 0, 0, 0, 0, 0, 81,
4537 0, 1112, 0, 0, 80, 1112, 1112, 0, 0, 0,
4538 0, 0, 0, 0, 0, 81, 0, 0, 80, 0,
4539 0, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4540 0, 304, 0, 0, 81, 0, 0, 0, 0, 0,
4541 0, 0, 0, 0, 0, 239, 239, 0, 0, 0,
4542 0, 0, 0, 0, 0, 0, 0, 81, 81, 81,
4543 0, 0, 0, 0, 0, 1112, 0, 0, 0, 0,
4544 0, 0, 0, 0, 81, 0, 0, 274, 278, 279,
4545 280, 0, 0, 80, 239, 239, 0, 0, 0, 0,
4546 0, 81, 0, 304, 365, 0, 0, 327, 328, 0,
4547 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4548 0, 0, 803, 803, 0, 0, 0, 0, 803, 803,
4549 0, 0, 80, 0, 0, 0, 0, 91, 0, 0,
4550 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4551 239, 0, 0, 91, 0, 0, 0, 366, 367, 368,
4552 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4553 0, 0, 91, 0, 379, 380, 0, 305, 0, 0,
4554 381, 81, 0, 0, 81, 81, 0, 0, 0, 0,
4555 81, 0, 0, 0, 0, 91, 91, 803, 0, 0,
4556 0, 0, 0, 0, 81, 0, 0, 81, 0, 0,
4557 0, 0, 803, 0, 382, 0, 383, 384, 385, 386,
4558 387, 388, 389, 390, 391, 392, 0, 0, 0, 91,
4559 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4560 0, 0, 0, 0, 0, 0, 0, 0, 928, 81,
4561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4562 0, 0, 0, 81, 0, 0, 0, 239, 0, 0,
4563 239, 239, 239, 0, 327, 0, 305, 0, 0, 0,
4564 0, 0, 366, 367, 368, 369, 370, 371, 372, 373,
4565 374, 375, 376, 377, 378, 239, 0, 239, 0, 379,
4566 380, 0, 0, 0, 0, 1185, 0, 0, 0, 91,
4567 0, 0, 91, 91, 0, 0, 0, 0, 91, 0,
4568 0, 0, 0, 0, 0, 0, 0, 0, 81, 0,
4569 0, 0, 91, 0, 0, 91, 0, 0, 305, 382,
4570 0, 383, 384, 385, 386, 387, 388, 389, 390, 391,
4571 392, 0, 0, 0, 0, 0, 0, 0, 0, -293,
4572 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
4573 0, 0, 0, 0, 0, 0, 0, 91, 0, 0,
4574 366, 367, 368, 369, 370, 371, 372, 0, 0, 375,
4575 376, 91, 0, 0, 0, 0, 0, 379, 380, 0,
4576 0, 0, 0, 0, 0, 0, 608, 609, 610, 611,
4577 612, 0, 0, 613, 614, 615, 616, 617, 618, 619,
4578 620, 0, 622, 0, 0, 623, 624, 625, 626, 627,
4579 628, 629, 630, 631, 632, 0, 0, 0, 239, 383,
4580 384, 385, 386, 387, 388, 389, 390, 391, 392, 0,
4581 0, 0, 0, 0, 0, 0, 91, 0, 0, 0,
4582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4584 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4585 0, 0, 0, 0, 0, 91, 0, 0, 0, 0,
4586 0, 0, 0, 0, 0, 0, 239, 239, 0, 0,
4587 0, 239, 0, 0, 0, 239, -788, 280, 0, 0,
4588 0, 0, 0, 0, -788, -788, -788, 0, 0, -788,
4589 -788, -788, 0, -788, 0, 712, 0, 0, 0, 0,
4590 0, -788, -788, -788, -788, -788, 0, 0, 239, 0,
4591 0, 239, 0, -788, -788, 0, -788, -788, -788, -788,
4592 -788, 0, 0, 239, 0, 0, 0, 0, 0, 0,
4593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4594 0, 742, 0, 0, -788, -788, 0, 0, 0, 0,
4595 0, 0, 0, 0, -788, -788, -788, -788, -788, -788,
4596 -788, -788, -788, -788, -788, -788, -788, 0, 0, 0,
4597 0, -788, -788, -788, -788, 0, 871, -788, 0, 0,
4598 0, 239, -788, 0, 0, 0, 0, 0, 0, 774,
4599 0, 0, 774, 0, 0, 0, -788, 0, 0, -788,
4600 0, 239, 0, 0, 0, 0, 804, 0, 0, 0,
4601 -142, -788, -788, -788, -788, -788, -788, -788, -788, -788,
4602 -788, -788, -788, 0, 0, 0, 0, -788, -788, -788,
4603 -788, -788, 0, 0, -788, -788, -788, 0, 0, 0,
4604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4605 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4606 0, 0, 239, 0, 0, 0, 0, 0, 0, 0,
4607 0, 0, 239, 0, 0, 0, 0, 0, 0, 0,
4608 0, 0, 0, 0, 863, 863, 0, 239, 774, 774,
4609 863, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4610 0, 863, 863, 0, 0, 239, 0, 239, 0, 0,
4611 0, 0, 0, 0, 0, 0, 0, 863, 0, -4,
4612 3, 0, 4, 5, 6, 7, 8, -4, -4, -4,
4613 9, 10, 0, -4, -4, 11, -4, 12, 13, 14,
4614 15, 16, 17, 18, -4, 0, 0, 0, 0, 19,
4615 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
4616 0, 239, 0, 0, 27, 28, 282, 30, 31, 32,
4617 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4618 42, 43, 44, 45, 46, 0, 0, -4, 0, 239,
4619 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4621 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
4622 239, 52, 53, 54, 55, 0, 56, 0, 0, 57,
4623 58, 59, 60, 61, 62, 63, 64, 65, 239, -4,
4624 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4625 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4626 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4627 0, -4, 0, 0, 0, 0, 0, -4, 0, 542,
4628 0, 22, 23, 24, 25, 0, 0, 0, 0, 0,
4629 0, 0, 0, 0, 0, 0, 0, 31, 32, 33,
4630 1069, 0, 0, 0, 1070, 0, 1071, 40, 41, 42,
4631 43, 44, 0, 0, 774, 0, 0, 0, 0, 0,
4632 0, 0, 0, 239, 0, 0, 559, 0, 0, 0,
4633 239, 0, 0, 0, 1019, 863, 863, 0, 0, 1072,
4634 1073, 863, 863, 0, 0, 239, 0, 1074, 0, 0,
4635 1075, 0, 1076, 1077, 0, 1078, 563, 239, 57, 58,
4636 1079, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4637 0, 0, 0, 0, 0, 774, 863, 863, 0, 863,
4638 863, 0, 239, 0, 0, 0, 0, 0, 1080, 0,
4639 0, 0, 0, 0, 0, 302, 0, 0, 0, 0,
4640 0, 0, 1060, 1061, 0, 0, 239, 0, 0, 0,
4641 863, 1067, 0, 0, 0, 0, 0, 0, 0, 0,
4642 0, 0, 0, 0, 0, 863, 0, 0, 0, 0,
4643 0, 0, -806, 3, 0, 4, 5, 6, 7, 8,
4644 0, 239, 0, 9, 10, 0, 0, 0, 11, 863,
4645 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
4646 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4647 0, 26, 0, 0, 0, 0, 0, 27, 28, 282,
4648 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4649 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4650 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
4651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4652 0, 0, 0, 49, 50, 0, 0, 239, 0, 0,
4653 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
4654 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4655 65, 0, -806, 0, 0, 0, 0, 0, 0, 0,
4656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4657 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4658 67, 68, 0, 0, -806, 3, -806, 4, 5, 6,
4659 7, 8, -806, 0, 0, 9, 10, 0, 0, 0,
4660 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4661 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4662 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4663 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
4664 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4665 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4666 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4667 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4668 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4669 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4670 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4671 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4673 0, 66, 67, 68, 0, 0, -4, 3, -806, 4,
4674 5, 6, 7, 8, -806, 0, 0, 9, 10, 0,
4675 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
4676 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4677 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4678 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
4679 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4680 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
4681 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4682 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4683 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4684 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4685 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4686 0, 0, -687, 0, 0, 0, 0, 0, 0, 0,
4687 -687, -687, -687, 0, 0, -687, -687, -687, 0, -687,
4688 0, 0, 0, 66, 67, 68, 0, -687, -4, -687,
4689 -687, -687, 0, 0, 0, 0, 542, 0, 0, -687,
4690 -687, 0, -687, -687, -687, -687, -687, 0, 0, 0,
4691 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
4692 376, 377, 378, 0, 0, 0, 0, 379, 380, 0,
4693 -687, -687, 0, 0, 0, 0, 0, 0, 0, 0,
4694 -687, -687, -687, -687, -687, -687, -687, -687, -687, -687,
4695 -687, -687, -687, 0, 0, 0, 0, -687, -687, -687,
4696 -687, 0, -687, -687, 0, 0, 0, 382, -687, 383,
4697 384, 385, 386, 387, 388, 389, 390, 391, 392, 0,
4698 0, 0, -687, 0, 0, -687, 0, 0, 0, 0,
4699 0, 0, 0, 0, 0, 0, -687, -687, -687, -687,
4700 -687, -687, -687, -687, -687, -687, -687, -687, -687, 0,
4701 0, 0, 0, 0, -687, -687, -687, -687, -688, 0,
4702 -687, -687, -687, 0, 0, 0, -688, -688, -688, 0,
4703 0, -688, -688, -688, 0, -688, 0, 0, 0, 0,
4704 0, 0, 0, -688, 0, -688, -688, -688, 0, 0,
4705 0, 0, 0, 0, 0, -688, -688, 0, -688, -688,
4706 -688, -688, -688, 0, 0, 0, 366, 367, 368, 369,
4707 370, 371, 372, 373, 374, 375, 376, -807, -807, 0,
4708 0, 0, 0, 379, 380, 0, -688, -688, 0, 0,
4709 0, 0, 0, 0, 0, 0, -688, -688, -688, -688,
4710 -688, -688, -688, -688, -688, -688, -688, -688, -688, 0,
4711 0, 0, 0, -688, -688, -688, -688, 0, -688, -688,
4712 0, 0, 0, 0, -688, 383, 384, 385, 386, 387,
4713 388, 389, 390, 391, 392, 0, 0, 0, -688, 0,
4714 0, -688, 0, 0, 0, 0, 0, 0, 0, 0,
4715 0, 0, -688, -688, -688, -688, -688, -688, -688, -688,
4716 -688, -688, -688, -688, -688, 0, 0, 0, 0, 0,
4717 -688, -688, -688, -688, -789, 0, -688, -688, -688, 0,
4718 0, 0, -789, -789, -789, 0, 0, -789, -789, -789,
4719 0, -789, 0, 0, 0, 0, 0, 0, 0, -789,
4720 -789, -789, -789, -789, 0, 0, 0, 0, 0, 0,
4721 0, -789, -789, 0, -789, -789, -789, -789, -789, 0,
4722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4724 0, 0, -789, -789, 0, 0, 0, 0, 0, 0,
4725 0, 0, -789, -789, -789, -789, -789, -789, -789, -789,
4726 -789, -789, -789, -789, -789, 0, 0, 0, 0, -789,
4727 -789, -789, -789, 0, 0, -789, 0, 0, 0, 0,
4728 -789, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4729 0, 0, 0, 0, -789, 0, 0, -789, 0, 0,
4730 0, 0, 0, 0, 0, 0, 0, 0, 0, -789,
4731 -789, -789, -789, -789, -789, -789, -789, -789, -789, -789,
4732 -789, 0, 0, 0, 0, -789, -789, -789, -789, -789,
4733 -790, 0, -789, -789, -789, 0, 0, 0, -790, -790,
4734 -790, 0, 0, -790, -790, -790, 0, -790, 0, 0,
4735 0, 0, 0, 0, 0, -790, -790, -790, -790, -790,
4736 0, 0, 0, 0, 0, 0, 0, -790, -790, 0,
4737 -790, -790, -790, -790, -790, 0, 0, 0, 0, 0,
4738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4739 0, 0, 0, 0, 0, 0, 0, 0, -790, -790,
4740 0, 0, 0, 0, 0, 0, 0, 0, -790, -790,
4741 -790, -790, -790, -790, -790, -790, -790, -790, -790, -790,
4742 -790, 0, 0, 0, 0, -790, -790, -790, -790, 0,
4743 0, -790, 0, 0, 0, 0, -790, 0, 0, 0,
4744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4745 -790, 0, 0, -790, 0, 0, 0, 0, 0, 0,
4746 0, 0, 0, 0, 0, -790, -790, -790, -790, -790,
4747 -790, -790, -790, -790, -790, -790, -790, 0, 0, 0,
4748 0, -790, -790, -790, -790, -790, -502, 0, -790, -790,
4749 -790, 0, 0, 0, -502, -502, -502, 0, 0, -502,
4750 -502, -502, 0, -502, 0, 0, 0, 0, 0, 0,
4751 0, -502, -502, -502, -502, 0, 0, 0, 0, 0,
4752 0, 0, 0, -502, -502, 0, -502, -502, -502, -502,
4753 -502, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4754 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4755 0, 0, 0, 0, -502, -502, 0, 0, 0, 0,
4756 0, 0, 0, 0, -502, -502, -502, -502, -502, -502,
4757 -502, -502, -502, -502, -502, -502, -502, 0, 0, 0,
4758 0, -502, -502, -502, -502, 0, 0, -502, 0, 0,
4759 0, 0, -502, 0, 0, 0, 0, 0, 0, 0,
4760 0, 0, 0, 0, 0, 0, -502, 0, 0, 0,
4761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4762 0, -502, 0, -502, -502, -502, -502, -502, -502, -502,
4763 -502, -502, -502, 0, 0, 0, 0, -502, -502, -502,
4764 -502, -502, -344, 255, -502, -502, -502, 0, 0, 0,
4765 -344, -344, -344, 0, 0, -344, -344, -344, 0, -344,
4766 0, 0, 0, 0, 0, 0, 0, -344, 0, -344,
4767 -344, -344, 0, 0, 0, 0, 0, 0, 0, -344,
4768 -344, 0, -344, -344, -344, -344, -344, 0, 0, 0,
4769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4771 -344, -344, 0, 0, 0, 0, 0, 0, 0, 0,
4772 -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
4773 -344, -344, -344, 0, 0, 0, 0, -344, -344, -344,
4774 -344, 0, 0, -344, 0, 0, 0, 0, -344, 0,
4775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4776 0, 0, -344, 0, 0, -344, 0, 0, 0, 0,
4777 0, 0, 0, 0, 0, 0, 0, -344, -344, -344,
4778 -344, -344, -344, -344, -344, -344, -344, -344, -344, 0,
4779 0, 0, 0, 0, -344, -344, -344, -344, -806, 0,
4780 -344, -344, -344, 0, 0, 0, -806, -806, -806, 0,
4781 0, -806, -806, -806, 0, -806, 0, 0, 0, 0,
4782 0, 0, 0, -806, -806, -806, -806, 0, 0, 0,
4783 0, 0, 0, 0, 0, -806, -806, 0, -806, -806,
4784 -806, -806, -806, 0, 0, 0, 0, 0, 0, 0,
4785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4786 0, 0, 0, 0, 0, 0, -806, -806, 0, 0,
4787 0, 0, 0, 0, 0, 0, -806, -806, -806, -806,
4788 -806, -806, -806, -806, -806, -806, -806, -806, -806, 0,
4789 0, 0, 0, -806, -806, -806, -806, 0, 0, -806,
4790 0, 0, 0, 0, -806, 0, 0, 0, 0, 0,
4791 0, 0, 0, 0, 0, 0, 0, 0, -806, 0,
4792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4793 0, 0, 0, -806, 0, -806, -806, -806, -806, -806,
4794 -806, -806, -806, -806, -806, 0, 0, 0, 0, -806,
4795 -806, -806, -806, -806, -350, 255, -806, -806, -806, 0,
4796 0, 0, -350, -350, -350, 0, 0, -350, -350, -350,
4797 0, -350, 0, 0, 0, 0, 0, 0, 0, -350,
4798 0, -350, -350, 0, 0, 0, 0, 0, 0, 0,
4799 0, -350, -350, 0, -350, -350, -350, -350, -350, 0,
4800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4801 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4802 0, 0, -350, -350, 0, 0, 0, 0, 0, 0,
4803 0, 0, -350, -350, -350, -350, -350, -350, -350, -350,
4804 -350, -350, -350, -350, -350, 0, 0, 0, 0, -350,
4805 -350, -350, -350, 0, 872, -350, 0, 0, 0, 0,
4806 -350, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4807 0, 0, 0, 0, -350, 0, 0, 0, 0, 0,
4808 0, 0, 0, 0, 0, 0, 0, 0, -144, -350,
4809 0, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4810 -350, 0, 0, 0, 0, 815, -350, -350, -350, -350,
4811 -357, 0, -350, -350, -350, 0, 0, 0, -357, -357,
4812 -357, 0, 0, -357, -357, -357, 0, -357, 0, 0,
4813 0, 0, 0, 0, 0, -357, 0, -357, -357, 0,
4814 0, 0, 0, 0, 0, 0, 0, -357, -357, 0,
4815 -357, -357, -357, -357, -357, 0, 0, 0, 0, 0,
4816 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4817 0, 0, 0, 0, 0, 0, 0, 0, -357, -357,
4818 0, 0, 0, 0, 0, 0, 0, 0, -357, -357,
4819 -357, -357, -357, -357, -357, -357, -357, -357, -357, -357,
4820 -357, 0, 0, 0, 0, -357, -357, -357, -357, 0,
4821 0, -357, 0, 0, 0, 0, -357, 0, 0, 0,
4822 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4823 -357, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4824 0, 0, 0, 0, 0, -357, 0, -357, -357, -357,
4825 -357, -357, -357, -357, -357, -357, -357, 0, 0, 0,
4826 0, 0, -357, -357, -357, -357, -788, 447, -357, -357,
4827 -357, 0, 0, 0, -788, -788, -788, 928, 0, 0,
4828 -788, -788, 0, -788, 0, 0, 0, 0, 0, 0,
4829 0, -788, -788, 0, 0, 0, 0, 0, 0, 0,
4830 0, 0, 0, -788, -788, 0, -788, -788, -788, -788,
4831 -788, 366, 367, 368, 369, 370, 371, 372, 373, 374,
4832 375, 376, 377, 378, 0, 0, 0, 0, 379, 380,
4833 0, 0, 0, 0, -788, -788, 0, 0, 0, 0,
4834 0, 0, 0, 0, -788, -788, -788, -788, -788, -788,
4835 -788, -788, -788, -788, -788, -788, -788, 0, 0, 0,
4836 0, -788, -788, -788, -788, 0, 813, -788, 382, 0,
4837 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
4838 0, 0, 0, 0, 0, 0, -788, 0, 0, 0,
4839 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4840 -142, -788, 0, -788, -788, -788, -788, -788, -788, -788,
4841 -788, -788, -788, 0, 0, 0, 0, -788, -788, -788,
4842 -788, -134, -788, 0, -788, 0, -788, 0, 0, 0,
4843 -788, -788, -788, 0, 0, 0, -788, -788, 0, -788,
4844 0, 0, 0, 0, 0, 0, 0, -788, -788, 0,
4845 0, 0, 0, 0, 0, 0, 0, 0, 0, -788,
4846 -788, 0, -788, -788, -788, -788, -788, 0, 0, 0,
4847 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4849 -788, -788, 0, 0, 0, 0, 0, 0, 0, 0,
4850 -788, -788, -788, -788, -788, -788, -788, -788, -788, -788,
4851 -788, -788, -788, 0, 0, 0, 0, -788, -788, -788,
4852 -788, 0, 813, -788, 0, 0, 0, 0, 0, 0,
4853 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4854 0, 0, -788, 0, 0, 0, 0, 0, 0, 0,
4855 0, 0, 0, 0, 0, 0, -142, -788, 0, -788,
4856 -788, -788, -788, -788, -788, -788, -788, -788, -788, 0,
4857 0, 0, 0, -788, -788, -788, -788, -788, -350, 0,
4858 -788, 0, -788, 0, 0, 0, -350, -350, -350, 0,
4859 0, 0, -350, -350, 0, -350, 0, 0, 0, 0,
4860 0, 0, 0, -350, 0, 0, 0, 0, 0, 0,
4861 0, 0, 0, 0, 0, -350, -350, 0, -350, -350,
4862 -350, -350, -350, 0, 0, 0, 0, 0, 0, 0,
4863 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4864 0, 0, 0, 0, 0, 0, -350, -350, 0, 0,
4865 0, 0, 0, 0, 0, 0, -350, -350, -350, -350,
4866 -350, -350, -350, -350, -350, -350, -350, -350, -350, 0,
4867 0, 0, 0, -350, -350, -350, -350, 0, 814, -350,
4868 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4869 0, 0, 0, 0, 0, 0, 0, 0, -350, 0,
4870 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4871 0, 0, -144, -350, 0, -350, -350, -350, -350, -350,
4872 -350, -350, -350, -350, -350, 0, 0, 0, 0, 815,
4873 -350, -350, -350, -135, -350, 0, -350, 0, -350, 0,
4874 0, 0, -350, -350, -350, 0, 0, 0, -350, -350,
4875 0, -350, 0, 0, 0, 0, 0, 0, 0, -350,
4876 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4877 0, -350, -350, 0, -350, -350, -350, -350, -350, 0,
4878 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4880 0, 0, -350, -350, 0, 0, 0, 0, 0, 0,
4881 0, 0, -350, -350, -350, -350, -350, -350, -350, -350,
4882 -350, -350, -350, -350, -350, 0, 0, 0, 0, -350,
4883 -350, -350, -350, 0, 814, -350, 0, 0, 0, 0,
4884 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4885 0, 0, 0, 0, -350, 0, 0, 0, 0, 0,
4886 0, 0, 0, 0, 0, 0, 0, 0, -144, -350,
4887 0, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4888 -350, 0, 0, 0, 0, 815, -350, -350, -350, -350,
4889 0, 0, -350, 3, -350, 4, 5, 6, 7, 8,
4890 -806, -806, -806, 9, 10, 0, 0, -806, 11, 0,
4891 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
4892 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4893 0, 26, 0, 0, 0, 0, 0, 27, 28, 282,
4894 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4895 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4896 -806, 0, 0, 0, 0, 0, 0, 0, 47, 48,
4897 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4898 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
4899 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
4900 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4901 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4903 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4904 67, 68, 0, 0, 0, 3, -806, 4, 5, 6,
4905 7, 8, -806, 0, -806, 9, 10, 0, -806, -806,
4906 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4907 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4908 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4909 28, 282, 30, 31, 32, 33, 34, 35, 36, 37,
4910 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4911 0, 0, -806, 0, 0, 0, 0, 0, 0, 0,
4912 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4913 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4914 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4915 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4916 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4917 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4919 0, 66, 67, 68, 0, 0, 0, 3, -806, 4,
4920 5, 6, 7, 8, -806, 0, -806, 9, 10, 0,
4921 0, -806, 11, -806, 12, 13, 14, 15, 16, 17,
4922 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4923 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4924 0, 27, 28, 282, 30, 31, 32, 33, 34, 35,
4925 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4926 45, 46, 0, 0, -806, 0, 0, 0, 0, 0,
4927 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4928 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4929 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4930 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4931 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4934 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
4935 -806, 4, 5, 6, 7, 8, -806, 0, -806, 9,
4936 10, 0, 0, -806, 11, 0, 12, 13, 14, 15,
4937 16, 17, 18, -806, 0, 0, 0, 0, 19, 20,
4938 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4939 0, 0, 0, 27, 28, 282, 30, 31, 32, 33,
4940 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4941 43, 44, 45, 46, 0, 0, -806, 0, 0, 0,
4942 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4943 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4944 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4945 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4946 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4947 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4949 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
4950 0, 3, -806, 4, 5, 6, 7, 8, -806, 0,
4951 -806, 9, 10, 0, 0, -806, 11, 0, 12, 13,
4952 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
4953 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4954 0, 0, 0, 0, 0, 27, 28, 282, 30, 31,
4955 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
4956 41, 42, 43, 44, 45, 46, 0, 0, -806, 0,
4957 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
4958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4959 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4960 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
4961 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4962 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4963 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4964 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
4965 0, 0, 0, 3, -806, 4, 5, 6, 7, 8,
4966 -806, -806, -806, 9, 10, 0, 0, 0, 11, 0,
4967 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
4968 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4969 0, 26, 0, 0, 0, 0, 0, 27, 28, 282,
4970 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4971 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4972 -806, 0, 0, 0, 0, 0, 0, 0, 47, 48,
4973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4974 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
4975 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
4976 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4977 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4978 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4979 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
4980 67, 68, 0, 0, 0, 3, -806, 4, 5, 6,
4981 7, 8, -806, 0, -806, 9, 10, 0, 0, 0,
4982 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4983 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4984 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4985 28, 282, 30, 31, 32, 33, 34, 35, 36, 37,
4986 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4987 0, 0, -806, 0, 0, 0, 0, 0, 0, 0,
4988 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4989 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4990 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4991 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4992 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4993 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4994 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4995 0, 66, 67, 68, 0, 0, 0, 3, -806, 4,
4996 5, 6, 7, 8, -806, 0, 0, 9, 10, 0,
4997 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
4998 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4999 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5000 0, 27, 28, 282, 30, 31, 32, 33, 34, 35,
5001 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5002 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5003 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5004 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5005 0, 0, 0, 0, 0, 51, 0, 0, 283, 53,
5006 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5007 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5009 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5010 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5011 -806, 0, 0, 0, -806, 3, -806, 4, 5, 6,
5012 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5013 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5014 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5015 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5016 28, 282, 30, 31, 32, 33, 34, 35, 36, 37,
5017 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5019 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5020 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5021 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5022 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5023 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5024 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5025 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5026 0, 66, 67, 68, 0, 0, 0, 0, -806, 0,
5027 0, 0, -806, 3, -806, 4, 5, 6, 7, 8,
5028 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5029 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5030 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5031 0, 26, 0, 0, 0, 0, 0, 27, 28, 29,
5032 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5033 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5034 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5036 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5037 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5038 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5039 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5040 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5041 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5042 67, 68, 0, 0, -806, 3, -806, 4, 5, 6,
5043 7, 8, -806, 0, 0, 9, 10, 0, 0, 0,
5044 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5045 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5046 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5047 28, 282, 30, 31, 32, 33, 34, 35, 36, 37,
5048 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5050 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5051 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5052 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5053 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5054 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5055 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5056 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5057 0, 66, 67, 68, 0, 0, -806, 401, -806, 4,
5058 5, 6, 0, 8, -806, 0, 0, 9, 10, 0,
5059 0, 0, 11, -3, 12, 13, 14, 15, 16, 17,
5060 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5061 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5062 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5063 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5064 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5065 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5066 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5067 0, 0, 0, 0, 0, 228, 0, 0, 229, 53,
5068 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5069 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5070 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5071 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5072 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5073 329, 0, 0, 0, 0, 0, 330, 143, 144, 145,
5074 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5075 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
5076 166, 0, 0, 0, 167, 168, 169, 431, 432, 433,
5077 434, 174, 175, 176, 0, 0, 0, 0, 0, 177,
5078 178, 179, 180, 435, 436, 437, 438, 185, 36, 37,
5079 439, 39, 0, 0, 0, 0, 0, 0, 0, 0,
5080 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5081 187, 188, 189, 190, 191, 192, 193, 194, 195, 0,
5082 0, 196, 197, 0, 0, 0, 0, 198, 199, 200,
5083 201, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5084 0, 202, 203, 0, 0, 0, 0, 0, 0, 0,
5085 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5086 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5087 0, 204, 205, 206, 207, 208, 209, 210, 211, 212,
5088 213, 0, 214, 215, 0, 0, 0, 0, 0, 0,
5089 216, 440, 143, 144, 145, 146, 147, 148, 149, 150,
5090 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5091 161, 162, 163, 164, 165, 166, 0, 0, 0, 167,
5092 168, 169, 170, 171, 172, 173, 174, 175, 176, 0,
5093 0, 0, 0, 0, 177, 178, 179, 180, 181, 182,
5094 183, 184, 185, 36, 37, 186, 39, 0, 0, 0,
5095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5096 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
5097 192, 193, 194, 195, 0, 0, 196, 197, 0, 0,
5098 0, 0, 198, 199, 200, 201, 0, 0, 0, 0,
5099 0, 0, 0, 0, 0, 0, 202, 203, 0, 0,
5100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5102 0, 0, 0, 0, 0, 0, 204, 205, 206, 207,
5103 208, 209, 210, 211, 212, 213, 0, 214, 215, 0,
5104 0, 0, 0, 0, 0, 216, 143, 144, 145, 146,
5105 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5106 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5107 0, 0, 0, 167, 168, 169, 170, 171, 172, 173,
5108 174, 175, 176, 0, 0, 0, 0, 0, 177, 178,
5109 179, 180, 181, 182, 183, 184, 185, 262, 0, 186,
5110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5111 0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
5112 188, 189, 190, 191, 192, 193, 194, 195, 0, 0,
5113 196, 197, 0, 0, 0, 0, 198, 199, 200, 201,
5114 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5115 202, 203, 0, 0, 58, 0, 0, 0, 0, 0,
5116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5118 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5119 0, 214, 215, 0, 0, 0, 0, 0, 0, 216,
5120 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5121 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5122 163, 164, 165, 166, 0, 0, 0, 167, 168, 169,
5123 170, 171, 172, 173, 174, 175, 176, 0, 0, 0,
5124 0, 0, 177, 178, 179, 180, 181, 182, 183, 184,
5125 185, 0, 0, 186, 0, 0, 0, 0, 0, 0,
5126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5127 0, 0, 0, 187, 188, 189, 190, 191, 192, 193,
5128 194, 195, 0, 0, 196, 197, 0, 0, 0, 0,
5129 198, 199, 200, 201, 0, 0, 0, 0, 0, 0,
5130 0, 0, 0, 0, 202, 203, 0, 0, 58, 0,
5131 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5133 0, 0, 0, 0, 204, 205, 206, 207, 208, 209,
5134 210, 211, 212, 213, 0, 214, 215, 0, 0, 0,
5135 0, 0, 0, 216, 143, 144, 145, 146, 147, 148,
5136 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
5137 159, 160, 161, 162, 163, 164, 165, 166, 0, 0,
5138 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
5139 176, 0, 0, 0, 0, 0, 177, 178, 179, 180,
5140 181, 182, 183, 184, 185, 0, 0, 186, 0, 0,
5141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5142 0, 0, 0, 0, 0, 0, 0, 187, 188, 189,
5143 190, 191, 192, 193, 194, 195, 0, 0, 196, 197,
5144 0, 0, 0, 0, 198, 199, 200, 201, 0, 0,
5145 0, 0, 0, 0, 0, 0, 0, 0, 202, 203,
5146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5147 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5148 0, 0, 0, 0, 0, 0, 0, 0, 204, 205,
5149 206, 207, 208, 209, 210, 211, 212, 213, 0, 214,
5150 215, 4, 5, 6, 0, 8, 0, 216, 0, 9,
5151 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5152 271, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5153 272, 22, 23, 24, 25, 0, 0, 226, 0, 0,
5154 0, 0, 0, 0, 300, 0, 0, 31, 32, 33,
5155 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5156 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5157 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5158 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5159 0, 0, 0, 0, 0, 0, 0, 301, 0, 0,
5160 229, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5161 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5162 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5163 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5164 18, 0, 0, 0, 0, 302, 19, 20, 272, 22,
5165 23, 24, 25, 303, 0, 226, 0, 0, 0, 0,
5166 0, 0, 300, 0, 0, 31, 32, 33, 34, 35,
5167 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5168 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5170 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5171 0, 0, 0, 0, 0, 301, 0, 0, 229, 53,
5172 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5173 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5174 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5175 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5176 0, 0, 0, 302, 19, 20, 21, 22, 23, 24,
5177 25, 603, 0, 226, 0, 0, 0, 0, 0, 0,
5178 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5179 38, 39, 227, 40, 41, 42, 43, 44, 45, 46,
5180 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5181 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5182 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5183 0, 0, 0, 228, 0, 0, 229, 53, 54, 55,
5184 0, 230, 231, 232, 57, 58, 233, 60, 61, 62,
5185 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5186 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5187 0, 0, 0, 0, 0, 0, 4, 5, 6, 0,
5188 8, 66, 234, 68, 9, 10, 0, 0, 259, 11,
5189 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5190 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5191 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5192 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5193 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5194 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5195 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5196 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5197 0, 0, 228, 0, 0, 229, 53, 54, 55, 0,
5198 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5199 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5201 0, 0, 0, 3, 0, 4, 5, 6, 7, 8,
5202 66, 67, 68, 9, 10, 0, 0, 259, 11, 0,
5203 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5204 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5205 0, 26, 0, 0, 0, 0, 0, 27, 28, 0,
5206 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5207 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5208 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5210 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5211 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5212 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5213 65, 0, 0, 401, 0, 4, 5, 6, 0, 8,
5214 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5215 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5216 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5217 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5218 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5219 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5220 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5221 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5222 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5223 0, 228, 0, 0, 229, 53, 54, 55, 0, 0,
5224 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5225 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5226 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5227 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5228 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5229 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5230 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5231 227, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5232 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5234 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5235 0, 228, 0, 0, 229, 53, 54, 55, 0, 230,
5236 231, 232, 57, 58, 233, 60, 61, 62, 63, 64,
5237 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5238 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5239 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5240 234, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5241 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5242 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5243 227, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5244 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5245 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5246 0, 0, 0, 49, 477, 0, 0, 0, 0, 0,
5247 0, 228, 0, 0, 229, 53, 54, 55, 0, 230,
5248 231, 232, 57, 58, 233, 60, 61, 62, 63, 64,
5249 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5250 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5251 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5252 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5253 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5254 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5255 227, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5256 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5258 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5259 0, 228, 0, 0, 229, 53, 54, 55, 0, 230,
5260 231, 232, 57, 58, 233, 60, 61, 62, 63, 64,
5261 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5262 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5263 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5264 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5265 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5266 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5267 227, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5268 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5269 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5270 0, 0, 0, 49, 477, 0, 0, 0, 0, 0,
5271 0, 228, 0, 0, 229, 53, 54, 55, 0, 230,
5272 231, 232, 57, 58, 233, 60, 61, 62, 63, 64,
5273 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5274 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5275 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5276 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5277 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5278 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5279 227, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5280 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5282 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5283 0, 228, 0, 0, 229, 53, 54, 55, 0, 230,
5284 231, 0, 57, 58, 233, 60, 61, 62, 63, 64,
5285 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5286 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5287 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5288 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5289 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5290 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5291 227, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5292 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5293 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5294 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5295 0, 228, 0, 0, 229, 53, 54, 55, 0, 0,
5296 231, 232, 57, 58, 233, 60, 61, 62, 63, 64,
5297 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5298 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5299 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5300 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5301 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5302 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5303 227, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5304 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5305 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5306 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5307 0, 228, 0, 0, 229, 53, 54, 55, 0, 0,
5308 231, 0, 57, 58, 233, 60, 61, 62, 63, 64,
5309 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5310 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5311 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5312 234, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5313 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5314 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5315 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5316 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5317 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5318 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5319 0, 228, 0, 0, 229, 53, 54, 55, 0, 789,
5320 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5321 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5322 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5323 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5324 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5325 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5326 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5327 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5328 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5330 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5331 0, 228, 0, 0, 229, 53, 54, 55, 0, 957,
5332 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5333 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5334 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5335 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5336 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5337 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5338 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5339 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5340 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5342 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5343 0, 228, 0, 0, 229, 53, 54, 55, 0, 1006,
5344 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5345 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5346 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5347 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5348 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5349 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5350 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5351 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5352 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5353 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5354 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5355 0, 228, 0, 0, 229, 53, 54, 55, 0, 789,
5356 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5357 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5358 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5359 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5360 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5361 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5362 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5363 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5364 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5365 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5366 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5367 0, 228, 0, 0, 229, 53, 54, 55, 0, 1127,
5368 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5369 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5370 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5371 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5372 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5373 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5374 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5375 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5376 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5377 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5378 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5379 0, 228, 0, 0, 229, 53, 54, 55, 0, 0,
5380 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5381 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5382 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5383 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5384 234, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5385 0, 226, 0, 0, 0, 0, 0, 0, 28, 0,
5386 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5387 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5388 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5389 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5390 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5391 0, 228, 0, 0, 229, 53, 54, 55, 0, 0,
5392 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5393 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5394 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5395 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5396 234, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5397 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5398 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5399 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5400 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5401 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5402 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5403 0, 228, 0, 0, 229, 53, 54, 55, 0, 0,
5404 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5405 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5406 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5407 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5408 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5409 0, 771, 0, 0, 0, 0, 0, 0, 28, 0,
5410 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5411 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5412 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5414 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5415 0, 228, 0, 0, 229, 53, 54, 55, 0, 0,
5416 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5417 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5418 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5419 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5420 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5421 0, 869, 0, 0, 0, 0, 0, 0, 28, 0,
5422 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5423 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5424 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5425 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5426 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5427 0, 228, 0, 0, 229, 53, 54, 55, 0, 0,
5428 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5429 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5430 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5431 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5432 234, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5433 0, 226, 0, 0, 0, 0, 0, 0, 300, 0,
5434 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5435 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5437 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5438 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5439 0, 301, 0, 0, 361, 53, 54, 55, 0, 362,
5440 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5441 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5442 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5443 14, 270, 271, 17, 18, 0, 0, 0, 0, 302,
5444 19, 20, 272, 22, 23, 24, 25, 0, 0, 226,
5445 0, 0, 0, 0, 0, 0, 300, 0, 0, 31,
5446 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5447 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5450 0, 0, 0, 0, 0, 0, 0, 0, 0, 412,
5451 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5452 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5453 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5454 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5455 271, 17, 18, 0, 0, 0, 0, 302, 19, 20,
5456 272, 22, 23, 24, 25, 0, 0, 226, 0, 0,
5457 0, 0, 0, 0, 300, 0, 0, 31, 32, 33,
5458 420, 35, 36, 37, 421, 39, 0, 40, 41, 42,
5459 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5461 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5462 0, 0, 0, 422, 0, 0, 0, 423, 0, 0,
5463 229, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5464 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5465 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5466 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5467 18, 0, 0, 0, 0, 302, 19, 20, 272, 22,
5468 23, 24, 25, 0, 0, 226, 0, 0, 0, 0,
5469 0, 0, 300, 0, 0, 31, 32, 33, 420, 35,
5470 36, 37, 421, 39, 0, 40, 41, 42, 43, 44,
5471 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5473 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5474 0, 0, 0, 0, 0, 423, 0, 0, 229, 53,
5475 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5476 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5477 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5478 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5479 0, 0, 0, 302, 19, 20, 272, 22, 23, 24,
5480 25, 0, 0, 226, 0, 0, 0, 0, 0, 0,
5481 300, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5485 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5486 0, 0, 0, 301, 0, 0, 361, 53, 54, 55,
5487 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5488 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5489 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5490 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5491 0, 302, 19, 20, 272, 22, 23, 24, 25, 0,
5492 0, 226, 0, 0, 0, 0, 0, 0, 300, 0,
5493 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5494 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5495 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5497 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5498 0, 1184, 0, 0, 229, 53, 54, 55, 0, 0,
5499 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5500 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5501 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5502 14, 270, 271, 17, 18, 0, 0, 0, 0, 302,
5503 19, 20, 272, 22, 23, 24, 25, 0, 0, 226,
5504 0, 0, 0, 0, 0, 0, 300, 0, 0, 31,
5505 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5506 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5509 0, 0, 0, 0, 0, 0, 0, 0, 0, 1283,
5510 0, 0, 229, 53, 54, 55, 22, 23, 24, 25,
5511 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5512 0, 0, 31, 32, 33, 1069, 0, 0, 0, 1070,
5513 0, 0, 40, 41, 42, 43, 44, 0, 0, 0,
5514 0, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5515 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5516 0, 0, 0, 0, 1072, 1073, 0, 0, 0, 0,
5517 0, 0, 1074, 0, 0, 1075, 0, 1076, 1077, 0,
5518 1078, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5519 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5520 0, 0, 0, 0, 0, 22, 23, 24, 25, 0,
5521 0, 0, 0, 1080, 0, 0, 0, 0, 0, 0,
5522 302, 31, 32, 33, 1069, 0, 0, 259, 1070, 0,
5523 0, 40, 41, 42, 43, 44, 0, 0, 0, 0,
5524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5525 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5526 0, 0, 0, 1072, 1073, 0, 0, 0, 0, 0,
5527 0, 1074, 0, 0, 1075, 0, 1076, 1077, 0, 1078,
5528 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5529 65, 0, 0, 0, 0, 0, 0, 22, 23, 24,
5530 25, 0, 0, 0, 633, 634, 0, 0, 635, 0,
5531 0, 0, 1080, 31, 32, 33, 1069, 0, 0, 302,
5532 1070, 0, 0, 40, 41, 42, 43, 44, 187, 188,
5533 189, 190, 191, 192, 193, 194, 195, 0, 0, 196,
5534 197, 0, 0, 0, 0, 198, 199, 200, 201, 0,
5535 0, 0, 0, 0, 0, 1072, 1073, 0, 0, 202,
5536 203, 0, 0, 1074, 0, 0, 1075, 0, 1076, 1077,
5537 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5538 63, 64, 65, 0, 0, 0, 0, 0, 0, 204,
5539 205, 206, 207, 208, 209, 210, 211, 212, 213, 0,
5540 214, 215, 643, 644, 1080, 0, 645, 0, 216, 255,
5541 0, 302, 0, 0, 0, 0, 0, 0, 0, 0,
5542 0, 0, 0, 0, 0, 0, 187, 188, 189, 190,
5543 191, 192, 193, 194, 195, 0, 0, 196, 197, 0,
5544 0, 0, 0, 198, 199, 200, 201, 0, 0, 0,
5545 0, 0, 0, 0, 0, 0, 0, 202, 203, 0,
5546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5547 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5548 0, 0, 0, 0, 0, 0, 0, 204, 205, 206,
5549 207, 208, 209, 210, 211, 212, 213, 0, 214, 215,
5550 696, 634, 0, 0, 697, 0, 216, 255, 0, 0,
5551 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5552 0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
5553 193, 194, 195, 0, 0, 196, 197, 0, 0, 0,
5554 0, 198, 199, 200, 201, 0, 0, 0, 0, 0,
5555 0, 0, 0, 0, 0, 202, 203, 0, 0, 0,
5556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5557 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5558 0, 0, 0, 0, 0, 204, 205, 206, 207, 208,
5559 209, 210, 211, 212, 213, 0, 214, 215, 699, 644,
5560 0, 0, 700, 0, 216, 255, 0, 0, 0, 0,
5561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5562 0, 0, 187, 188, 189, 190, 191, 192, 193, 194,
5563 195, 0, 0, 196, 197, 0, 0, 0, 0, 198,
5564 199, 200, 201, 0, 0, 0, 0, 0, 0, 0,
5565 0, 0, 0, 202, 203, 0, 0, 0, 0, 0,
5566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5567 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5568 0, 0, 0, 204, 205, 206, 207, 208, 209, 210,
5569 211, 212, 213, 0, 214, 215, 696, 634, 0, 0,
5570 714, 0, 216, 255, 0, 0, 0, 0, 0, 0,
5571 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5572 187, 188, 189, 190, 191, 192, 193, 194, 195, 0,
5573 0, 196, 197, 0, 0, 0, 0, 198, 199, 200,
5574 201, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5575 0, 202, 203, 0, 0, 0, 0, 0, 0, 0,
5576 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5577 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5578 0, 204, 205, 206, 207, 208, 209, 210, 211, 212,
5579 213, 0, 214, 215, 725, 634, 0, 0, 726, 0,
5580 216, 255, 0, 0, 0, 0, 0, 0, 0, 0,
5581 0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
5582 189, 190, 191, 192, 193, 194, 195, 0, 0, 196,
5583 197, 0, 0, 0, 0, 198, 199, 200, 201, 0,
5584 0, 0, 0, 0, 0, 0, 0, 0, 0, 202,
5585 203, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5586 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5587 0, 0, 0, 0, 0, 0, 0, 0, 0, 204,
5588 205, 206, 207, 208, 209, 210, 211, 212, 213, 0,
5589 214, 215, 728, 644, 0, 0, 729, 0, 216, 255,
5590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5591 0, 0, 0, 0, 0, 0, 187, 188, 189, 190,
5592 191, 192, 193, 194, 195, 0, 0, 196, 197, 0,
5593 0, 0, 0, 198, 199, 200, 201, 0, 0, 0,
5594 0, 0, 0, 0, 0, 0, 0, 202, 203, 0,
5595 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5596 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5597 0, 0, 0, 0, 0, 0, 0, 204, 205, 206,
5598 207, 208, 209, 210, 211, 212, 213, 0, 214, 215,
5599 843, 634, 0, 0, 844, 0, 216, 255, 0, 0,
5600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5601 0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
5602 193, 194, 195, 0, 0, 196, 197, 0, 0, 0,
5603 0, 198, 199, 200, 201, 0, 0, 0, 0, 0,
5604 0, 0, 0, 0, 0, 202, 203, 0, 0, 0,
5605 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5607 0, 0, 0, 0, 0, 204, 205, 206, 207, 208,
5608 209, 210, 211, 212, 213, 0, 214, 215, 846, 644,
5609 0, 0, 847, 0, 216, 255, 0, 0, 0, 0,
5610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5611 0, 0, 187, 188, 189, 190, 191, 192, 193, 194,
5612 195, 0, 0, 196, 197, 0, 0, 0, 0, 198,
5613 199, 200, 201, 0, 0, 0, 0, 0, 0, 0,
5614 0, 0, 0, 202, 203, 0, 0, 0, 0, 0,
5615 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5616 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5617 0, 0, 0, 204, 205, 206, 207, 208, 209, 210,
5618 211, 212, 213, 0, 214, 215, 852, 634, 0, 0,
5619 853, 0, 216, 255, 0, 0, 0, 0, 0, 0,
5620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5621 187, 188, 189, 190, 191, 192, 193, 194, 195, 0,
5622 0, 196, 197, 0, 0, 0, 0, 198, 199, 200,
5623 201, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5624 0, 202, 203, 0, 0, 0, 0, 0, 0, 0,
5625 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5626 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5627 0, 204, 205, 206, 207, 208, 209, 210, 211, 212,
5628 213, 0, 214, 215, 681, 644, 0, 0, 682, 0,
5629 216, 255, 0, 0, 0, 0, 0, 0, 0, 0,
5630 0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
5631 189, 190, 191, 192, 193, 194, 195, 0, 0, 196,
5632 197, 0, 0, 0, 0, 198, 199, 200, 201, 0,
5633 0, 0, 0, 0, 0, 0, 0, 0, 0, 202,
5634 203, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5635 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5636 0, 0, 0, 0, 0, 0, 0, 0, 0, 204,
5637 205, 206, 207, 208, 209, 210, 211, 212, 213, 0,
5638 214, 215, 1012, 634, 0, 0, 1013, 0, 216, 255,
5639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5640 0, 0, 0, 0, 0, 0, 187, 188, 189, 190,
5641 191, 192, 193, 194, 195, 0, 0, 196, 197, 0,
5642 0, 0, 0, 198, 199, 200, 201, 0, 0, 0,
5643 0, 0, 0, 0, 0, 0, 0, 202, 203, 0,
5644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5646 0, 0, 0, 0, 0, 0, 0, 204, 205, 206,
5647 207, 208, 209, 210, 211, 212, 213, 0, 214, 215,
5648 1015, 644, 0, 0, 1016, 0, 216, 255, 0, 0,
5649 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5650 0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
5651 193, 194, 195, 0, 0, 196, 197, 0, 0, 0,
5652 0, 198, 199, 200, 201, 0, 0, 0, 0, 0,
5653 0, 0, 0, 0, 0, 202, 203, 0, 0, 0,
5654 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5656 0, 0, 0, 0, 0, 204, 205, 206, 207, 208,
5657 209, 210, 211, 212, 213, 0, 214, 215, 1301, 634,
5658 0, 0, 1302, 0, 216, 255, 0, 0, 0, 0,
5659 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5660 0, 0, 187, 188, 189, 190, 191, 192, 193, 194,
5661 195, 0, 0, 196, 197, 0, 0, 0, 0, 198,
5662 199, 200, 201, 0, 0, 0, 0, 0, 0, 0,
5663 0, 0, 0, 202, 203, 0, 0, 0, 0, 0,
5664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5666 0, 0, 0, 204, 205, 206, 207, 208, 209, 210,
5667 211, 212, 213, 0, 214, 215, 1304, 644, 0, 0,
5668 1305, 0, 216, 255, 0, 0, 0, 0, 0, 0,
5669 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5670 187, 188, 189, 190, 191, 192, 193, 194, 195, 0,
5671 0, 196, 197, 0, 0, 0, 0, 198, 199, 200,
5672 201, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5673 0, 202, 203, 0, 0, 0, 0, 0, 0, 0,
5674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5676 0, 204, 205, 206, 207, 208, 209, 210, 211, 212,
5677 213, 0, 214, 215, 1349, 634, 0, 0, 1350, 0,
5678 216, 255, 0, 0, 0, 0, 0, 0, 0, 0,
5679 0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
5680 189, 190, 191, 192, 193, 194, 195, 0, 0, 196,
5681 197, 0, 0, 0, 0, 198, 199, 200, 201, 0,
5682 0, 0, 0, 0, 0, 0, 0, 0, 0, 202,
5683 203, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5685 0, 0, 0, 0, 0, 0, 0, 0, 0, 204,
5686 205, 206, 207, 208, 209, 210, 211, 212, 213, 0,
5687 214, 215, 681, 644, 0, 0, 682, 0, 216, 255,
5688 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5689 0, 0, 0, 0, 0, 0, 187, 188, 189, 190,
5690 191, 192, 193, 194, 195, 0, 0, 196, 197, 0,
5691 0, 0, 0, 198, 199, 200, 201, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 202, 203, 0,
5693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5695 0, 0, 0, 0, 0, 0, 0, 204, 205, 206,
5696 207, 208, 209, 210, 211, 212, 213, 0, 214, 215,
5697 0, 0, 0, 0, 0, 0, 216
5698};
5699
5700static const yytype_int16 yycheck[] =
5701{
5702 1, 70, 59, 105, 58, 58, 423, 114, 570, 99,
5703 405, 70, 1, 13, 14, 1, 762, 346, 252, 255,
5704 15, 16, 102, 113, 27, 105, 757, 89, 7, 7,
5705 755, 831, 56, 580, 592, 84, 101, 102, 294, 586,
5706 105, 592, 298, 342, 933, 398, 105, 346, 27, 27,
5707 342, 52, 53, 21, 346, 56, 109, 606, 15, 16,
5708 475, 590, 111, 56, 593, 89, 52, 53, 54, 55,
5709 52, 397, 72, 399, 66, 81, 596, 621, 896, 58,
5710 841, 811, 106, 107, 108, 81, 898, 1157, 89, 63,
5711 64, 65, 15, 16, 80, 81, 511, 684, 685, 521,
5712 26, 1171, 67, 1076, 66, 106, 107, 108, 109, 0,
5713 15, 16, 1275, 26, 283, 110, 84, 26, 471, 28,
5714 13, 1017, 1018, 25, 1018, 451, 10, 467, 29, 134,
5715 109, 54, 55, 467, 1267, 0, 52, 53, 689, 109,
5716 13, 475, 98, 134, 470, 674, 472, 755, 1144, 54,
5717 154, 69, 157, 110, 1043, 318, 319, 247, 1157, 121,
5718 122, 101, 69, 600, 155, 13, 100, 817, 508, 28,
5719 523, 141, 498, 25, 1173, 825, 233, 13, 151, 66,
5720 98, 603, 1345, 285, 68, 275, 1075, 110, 1077, 13,
5721 25, 98, 361, 25, 56, 260, 261, 153, 524, 161,
5722 134, 157, 161, 25, 1337, 110, 1181, 1182, 1181, 1182,
5723 134, 37, 38, 650, 154, 25, 285, 1213, 308, 656,
5724 657, 155, 123, 1293, 757, 151, 285, 155, 229, 120,
5725 236, 961, 119, 561, 1130, 768, 1130, 1055, 151, 235,
5726 236, 303, 1054, 229, 157, 991, 757, 1144, 482, 235,
5727 236, 762, 134, 155, 671, 335, 336, 337, 338, 245,
5728 255, 154, 257, 25, 995, 266, 252, 160, 27, 255,
5729 335, 336, 337, 338, 25, 340, 341, 266, 1174, 303,
5730 266, 154, 283, 25, 157, 1181, 1182, 160, 13, 1288,
5731 1179, 1180, 707, 1292, 1293, 815, 840, 283, 112, 305,
5732 257, 283, 303, 155, 272, 273, 154, 155, 410, 662,
5733 302, 100, 160, 229, 752, 1290, 13, 755, 154, 672,
5734 155, 157, 851, 155, 160, 415, 406, 13, 154, 1129,
5735 154, 134, 333, 155, 257, 157, 160, 663, 362, 776,
5736 902, 406, 422, 780, 333, 155, 101, 673, 935, 936,
5737 255, 410, 257, 1352, 941, 942, 914, 422, 905, 906,
5738 361, 362, 909, 914, 911, 705, 913, 283, 1129, 362,
5739 66, 705, 66, 707, 537, 361, 539, 799, 1275, 361,
5740 13, 154, 13, 1280, 293, 294, 159, 101, 1285, 298,
5741 34, 300, 13, 155, 1290, 154, 945, 155, 66, 400,
5742 155, 160, 839, 398, 155, 842, 407, 408, 52, 1017,
5743 1018, 69, 398, 155, 400, 157, 34, 745, 746, 856,
5744 399, 407, 408, 119, 975, 1017, 1018, 121, 122, 154,
5745 124, 399, 52, 157, 52, 160, 56, 966, 1025, 97,
5746 98, 155, 1072, 1073, 1341, 361, 1343, 1, 1345, 100,
5747 1347, 119, 447, 121, 122, 1072, 1073, 154, 69, 521,
5748 993, 695, 995, 160, 997, 757, 722, 1364, 154, 705,
5749 762, 100, 451, 52, 160, 154, 471, 56, 69, 69,
5750 820, 160, 56, 134, 995, 471, 820, 98, 69, 492,
5751 447, 407, 408, 472, 480, 153, 482, 521, 52, 53,
5752 37, 38, 56, 504, 472, 134, 97, 98, 98, 1056,
5753 1057, 1058, 1059, 492, 492, 952, 97, 98, 955, 498,
5754 521, 154, 1130, 154, 447, 962, 155, 160, 523, 160,
5755 498, 968, 591, 154, 1280, 89, 1336, 523, 1130, 160,
5756 69, 603, 447, 544, 467, 524, 1176, 1177, 1273, 550,
5757 154, 155, 106, 107, 108, 109, 524, 78, 544, 1176,
5758 1177, 550, 153, 78, 959, 15, 1174, 982, 896, 98,
5759 898, 734, 153, 1181, 1182, 25, 739, 930, 100, 603,
5760 100, 567, 66, 923, 570, 508, 100, 154, 69, 590,
5761 639, 158, 593, 100, 589, 1341, 655, 592, 100, 648,
5762 14, 15, 603, 929, 590, 931, 101, 593, 1141, 1046,
5763 675, 1144, 134, 155, 134, 100, 397, 98, 399, 1148,
5764 134, 142, 143, 144, 145, 146, 100, 134, 544, 144,
5765 145, 146, 134, 1144, 683, 119, 601, 121, 122, 100,
5766 124, 606, 1037, 877, 155, 1207, 711, 1209, 982, 134,
5767 157, 652, 152, 654, 154, 984, 642, 1074, 25, 1206,
5768 134, 723, 648, 25, 100, 1273, 652, 662, 654, 781,
5769 451, 639, 784, 674, 157, 229, 662, 672, 732, 157,
5770 648, 155, 1290, 686, 663, 984, 672, 157, 674, 470,
5771 25, 472, 984, 78, 673, 663, 601, 683, 134, 723,
5772 25, 606, 158, 995, 69, 673, 1144, 686, 686, 695,
5773 100, 154, 266, 622, 157, 683, 497, 498, 808, 684,
5774 685, 1050, 723, 100, 1119, 66, 1054, 1055, 1144, 283,
5775 716, 594, 641, 98, 159, 598, 652, 799, 654, 100,
5776 1269, 522, 1275, 524, 134, 66, 67, 715, 716, 303,
5777 100, 1050, 1285, 860, 154, 155, 1318, 134, 1050, 134,
5778 734, 1178, 736, 1200, 1275, 739, 740, 134, 848, 1280,
5779 850, 152, 134, 134, 15, 799, 17, 69, 119, 333,
5780 121, 122, 705, 848, 134, 850, 69, 154, 155, 698,
5781 849, 158, 154, 155, 155, 157, 158, 69, 799, 134,
5782 121, 122, 100, 1198, 56, 858, 98, 361, 362, 134,
5783 1343, 69, 1345, 722, 1347, 98, 155, 1288, 727, 154,
5784 155, 1292, 606, 158, 157, 97, 98, 69, 78, 154,
5785 155, 1364, 161, 158, 1345, 1273, 134, 1275, 69, 97,
5786 98, 827, 1280, 829, 69, 831, 400, 1285, 69, 919,
5787 851, 921, 1144, 407, 408, 97, 98, 1273, 69, 1275,
5788 83, 84, 771, 151, 1280, 851, 97, 98, 66, 1285,
5789 26, 951, 97, 98, 89, 90, 97, 98, 1315, 858,
5790 661, 153, 663, 883, 155, 157, 951, 98, 134, 69,
5791 671, 877, 673, 89, 90, 153, 100, 820, 1017, 1018,
5792 684, 685, 134, 1341, 1257, 1343, 965, 1345, 967, 1347,
5793 69, 153, 134, 69, 137, 138, 902, 97, 98, 914,
5794 106, 119, 153, 121, 122, 1341, 1364, 1343, 153, 1345,
5795 134, 1347, 1258, 40, 41, 930, 845, 25, 97, 98,
5796 69, 97, 98, 26, 930, 56, 855, 66, 1364, 950,
5797 504, 155, 931, 154, 155, 100, 138, 1076, 160, 945,
5798 869, 304, 305, 931, 950, 966, 26, 521, 97, 98,
5799 935, 936, 134, 153, 1093, 158, 941, 942, 1, 134,
5800 966, 155, 155, 1275, 985, 152, 69, 100, 1280, 134,
5801 544, 155, 15, 16, 153, 151, 550, 153, 158, 985,
5802 119, 157, 121, 122, 1004, 1005, 155, 1008, 1009, 69,
5803 155, 1130, 155, 155, 97, 98, 1017, 1018, 155, 1008,
5804 1009, 134, 1079, 155, 153, 134, 1080, 30, 52, 52,
5805 53, 155, 52, 56, 950, 1154, 590, 97, 98, 593,
5806 945, 1042, 155, 155, 67, 1010, 1032, 78, 1034, 603,
5807 152, 155, 1171, 1345, 13, 17, 1042, 25, 152, 155,
5808 1025, 134, 1181, 1182, 95, 96, 89, 44, 151, 985,
5809 153, 1072, 1073, 155, 157, 1076, 1062, 1063, 101, 102,
5810 69, 152, 105, 106, 107, 108, 44, 110, 1168, 1191,
5811 69, 151, 1093, 153, 1118, 44, 1186, 157, 652, 69,
5812 654, 155, 155, 1168, 44, 1014, 69, 134, 97, 98,
5813 141, 142, 143, 144, 145, 146, 159, 1118, 97, 98,
5814 674, 1122, 1191, 136, 1125, 1126, 1042, 97, 98, 1130,
5815 1131, 8, 1191, 15, 97, 98, 1122, 155, 52, 1125,
5816 1126, 66, 152, 1129, 1145, 1131, 155, 1148, 929, 155,
5817 931, 935, 936, 1154, 155, 54, 1157, 941, 942, 1145,
5818 155, 155, 1148, 155, 153, 64, 65, 1076, 1077, 723,
5819 1171, 1172, 1173, 155, 153, 1176, 1177, 1171, 101, 155,
5820 1181, 1182, 1239, 153, 1264, 1265, 9, 1181, 1182, 1190,
5821 153, 155, 58, 1217, 119, 139, 121, 122, 52, 1264,
5822 1265, 139, 58, 1204, 1190, 155, 229, 1193, 288, 1125,
5823 1126, 66, 78, 155, 155, 1131, 1217, 152, 1204, 52,
5824 101, 1207, 78, 1209, 1133, 56, 1010, 160, 158, 1145,
5825 139, 155, 255, 155, 257, 1144, 155, 260, 261, 155,
5826 155, 1025, 108, 266, 155, 799, 112, 1156, 155, 155,
5827 1159, 152, 108, 109, 139, 1279, 56, 155, 155, 78,
5828 283, 264, 1257, 155, 119, 155, 121, 122, 1269, 124,
5829 1179, 1257, 155, 1259, 1190, 1261, 95, 96, 1279, 1258,
5830 303, 157, 157, 1269, 155, 141, 266, 1288, 1204, 333,
5831 1258, 1292, 1293, 59, 60, 61, 62, 851, 52, 1122,
5832 54, 55, 56, 57, 1213, 500, 858, 1308, 104, 106,
5833 333, 504, 335, 336, 337, 338, 601, 340, 341, 108,
5834 96, 493, 1308, 142, 143, 144, 145, 146, 683, 946,
5835 965, 55, 1318, 40, 41, 42, 43, 44, 361, 362,
5836 1193, 745, 1273, 1252, 1253, 1254, 896, 1215, 102, 1144,
5837 1336, 1352, 52, 107, 54, 55, 359, 57, 1280, 1,
5838 52, 364, 54, 55, 56, 57, 52, 447, 54, 55,
5839 56, 57, 1063, 15, 16, 398, 52, 400, 54, 55,
5840 56, 57, 1337, 406, 407, 408, 861, 1336, 357, 1172,
5841 1170, 1261, 1308, 1259, 1303, 1174, 950, 1174, 478, 422,
5842 117, 481, 102, 1312, 539, 109, 486, 1216, 755, 1218,
5843 52, 53, 966, 762, 1331, -1, 684, 685, -1, 915,
5844 916, 501, 1331, -1, 447, 67, 102, -1, 924, -1,
5845 926, 985, 928, 701, 702, 52, -1, 54, 55, 56,
5846 57, 58, -1, -1, -1, -1, -1, -1, 471, 717,
5847 -1, 454, 455, 698, 1008, 1009, -1, -1, -1, 101,
5848 102, 78, 465, 105, -1, -1, -1, -1, 110, -1,
5849 473, 474, -1, 54, 55, 1256, 57, 1258, -1, -1,
5850 -1, 504, 727, 64, 65, 102, -1, -1, 1042, -1,
5851 493, 108, 109, -1, 574, -1, 499, -1, 521, -1,
5852 523, -1, -1, 227, -1, -1, 230, 231, 232, -1,
5853 -1, -1, 1321, 1322, -1, -1, 1325, 1326, -1, -1,
5854 1329, 544, 602, -1, 141, -1, -1, 550, -1, -1,
5855 -1, -1, -1, -1, -1, -1, 52, -1, 54, 55,
5856 56, 57, 58, -1, -1, -1, -1, 1328, -1, 1358,
5857 1359, 1360, 1361, -1, -1, -1, -1, -1, 1367, -1,
5858 -1, -1, 78, -1, 1118, -1, 589, 590, 1122, 592,
5859 593, 1125, 1126, -1, -1, -1, 92, 1131, 601, -1,
5860 603, -1, -1, 606, -1, -1, 102, 229, -1, -1,
5861 -1, 1145, 108, 109, 1148, -1, -1, -1, -1, 679,
5862 845, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5863 855, -1, -1, 255, -1, 257, -1, -1, 260, 261,
5864 -1, -1, -1, -1, 266, 141, -1, -1, -1, 652,
5865 -1, 654, -1, -1, -1, -1, 1190, -1, -1, 662,
5866 -1, 283, -1, -1, -1, -1, 649, -1, -1, 672,
5867 1204, 674, 675, -1, 33, 34, 35, 36, -1, -1,
5868 -1, 684, 685, 1217, -1, -1, -1, 935, 936, 749,
5869 49, 50, 51, 941, 942, -1, -1, -1, -1, -1,
5870 59, 60, 61, 62, 63, -1, -1, -1, 711, -1,
5871 -1, 333, -1, 335, 336, 337, 338, -1, 340, 341,
5872 723, -1, -1, -1, -1, -1, -1, -1, 976, 977,
5873 -1, 979, 980, -1, -1, 1269, -1, -1, -1, 361,
5874 -1, -1, -1, -1, -1, 1279, -1, -1, -1, -1,
5875 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5876 -1, -1, 466, 467, -1, -1, -1, -1, -1, -1,
5877 -1, 475, -1, -1, 1308, -1, 398, 1025, 400, -1,
5878 -1, -1, -1, -1, 406, 407, 408, -1, 147, 1014,
5879 -1, -1, -1, -1, -1, -1, 799, 857, -1, -1,
5880 422, 1049, -1, -1, 508, -1, 52, 511, 54, 55,
5881 56, 57, 58, -1, -1, -1, 876, -1, 878, -1,
5882 -1, -1, -1, -1, -1, 447, -1, -1, -1, -1,
5883 813, 814, 78, -1, 894, -1, -1, -1, 821, 822,
5884 -1, -1, -1, -1, -1, 848, -1, 850, 851, 471,
5885 -1, 1076, -1, -1, -1, -1, 102, -1, -1, -1,
5886 -1, 107, 108, 109, 52, -1, 54, 55, 56, 57,
5887 58, -1, -1, -1, -1, -1, -1, 581, -1, -1,
5888 -1, -1, 504, -1, -1, -1, -1, -1, 871, 872,
5889 78, 874, 875, -1, -1, 141, -1, 601, 144, -1,
5890 -1, 523, 606, -1, 92, -1, -1, -1, 154, -1,
5891 1, 914, -1, -1, 102, -1, -1, -1, -1, 107,
5892 108, 109, 544, -1, 15, 16, -1, 930, 550, -1,
5893 -1, 1156, 935, 936, 1159, -1, -1, -1, 941, 942,
5894 -1, -1, -1, -1, 927, -1, -1, 950, 951, -1,
5895 -1, -1, -1, 141, 1179, -1, 144, 940, -1, -1,
5896 -1, 52, 53, 966, -1, -1, -1, 589, 590, 157,
5897 592, 593, -1, -1, -1, -1, 67, -1, -1, 601,
5898 -1, -1, 985, 687, 606, -1, -1, -1, -1, -1,
5899 -1, -1, 1017, 1018, -1, 978, -1, -1, -1, -1,
5900 -1, 705, -1, 707, -1, 1008, 1009, 1010, 78, -1,
5901 101, 102, -1, -1, 105, -1, -1, -1, -1, 110,
5902 -1, -1, 1025, -1, -1, 95, 96, 1252, 1253, 1254,
5903 652, -1, 654, -1, -1, -1, -1, -1, -1, 1042,
5904 662, -1, -1, -1, -1, -1, -1, 1072, 1073, -1,
5905 672, 1076, 674, 675, -1, -1, -1, 761, -1, -1,
5906 -1, -1, 684, 685, -1, -1, -1, -1, 1093, 139,
5907 140, 141, 142, 143, 144, 145, 146, -1, 1303, -1,
5908 -1, -1, -1, -1, -1, 789, -1, -1, -1, 711,
5909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5910 -1, -1, -1, -1, 52, 1130, 54, 55, 56, 57,
5911 58, -1, -1, -1, -1, 1118, 820, -1, -1, 1122,
5912 1180, -1, 1125, 1126, -1, -1, -1, -1, 1131, 1154,
5913 78, -1, 1157, -1, 838, -1, -1, -1, 229, -1,
5914 -1, -1, 1145, -1, 92, 1148, 1171, 1172, 1173, -1,
5915 -1, 1176, 1177, -1, 102, -1, 1181, 1182, -1, 107,
5916 108, 109, 1222, -1, 255, 1168, 257, -1, -1, 260,
5917 261, -1, 1232, -1, -1, 266, -1, -1, -1, -1,
5918 1163, -1, -1, -1, -1, -1, -1, 1190, -1, 1249,
5919 1250, 1251, 283, 141, -1, -1, 144, -1, -1, -1,
5920 -1, 1204, -1, -1, -1, -1, -1, -1, -1, -1,
5921 -1, -1, -1, -1, 1217, -1, -1, -1, -1, 923,
5922 -1, -1, -1, -1, -1, -1, 848, -1, 850, 851,
5923 -1, -1, 52, -1, 54, 55, 56, 57, 58, -1,
5924 -1, 945, 333, -1, 335, 336, 337, 338, -1, 340,
5925 341, -1, -1, 957, 1257, -1, -1, -1, 78, -1,
5926 -1, 1264, 1265, 1288, -1, -1, 1269, 1292, 1293, -1,
5927 361, -1, -1, -1, -1, -1, 1279, -1, 982, -1,
5928 -1, -1, 102, -1, 1017, 1018, -1, 107, 108, 109,
5929 -1, -1, 914, -1, -1, -1, -1, -1, -1, -1,
5930 -1, -1, 1006, -1, -1, 1308, -1, 398, 930, 400,
5931 -1, -1, -1, 935, 936, 406, 407, 408, -1, 941,
5932 942, 141, -1, -1, 144, -1, -1, 1352, 950, 951,
5933 -1, 422, -1, -1, -1, -1, -1, 1041, -1, 1072,
5934 1073, -1, -1, 1076, 966, -1, -1, -1, -1, -1,
5935 -1, -1, -1, -1, -1, -1, 447, -1, -1, -1,
5936 1093, -1, -1, 985, 1, -1, -1, -1, -1, -1,
5937 -1, -1, -1, -1, 1017, 1018, -1, -1, -1, -1,
5938 471, -1, -1, -1, -1, -1, 1008, 1009, 1010, -1,
5939 -1, -1, -1, -1, -1, -1, -1, 1130, -1, -1,
5940 -1, -1, -1, 1025, -1, -1, -1, -1, -1, -1,
5941 -1, -1, -1, 504, -1, 52, 53, -1, -1, 56,
5942 1042, 1154, -1, 1127, 1157, -1, -1, -1, -1, 1072,
5943 1073, -1, 523, 1076, -1, -1, -1, -1, 1171, 1172,
5944 1173, 1, -1, 1176, 1177, -1, -1, -1, 1181, 1182,
5945 1093, -1, 89, 544, -1, 15, 16, -1, -1, 550,
5946 -1, -1, -1, -1, -1, -1, -1, -1, -1, 106,
5947 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
5948 -1, -1, -1, -1, -1, -1, -1, 1130, -1, -1,
5949 -1, -1, 52, 53, -1, -1, -1, -1, 589, 590,
5950 1122, 592, 593, 1125, 1126, -1, -1, 67, -1, 1131,
5951 601, 1154, -1, -1, 1157, 606, -1, -1, -1, 1017,
5952 1018, -1, -1, 1145, -1, -1, 1148, -1, 1171, 1172,
5953 1173, -1, -1, 1176, 1177, -1, -1, -1, 1181, 1182,
5954 -1, 101, 102, -1, -1, 105, 1168, -1, -1, -1,
5955 110, -1, -1, -1, -1, 1288, -1, -1, -1, 1292,
5956 1293, 652, -1, 654, -1, -1, -1, -1, 1190, -1,
5957 -1, 662, -1, -1, 1072, 1073, -1, -1, 1076, -1,
5958 -1, 672, 1204, 674, 675, -1, -1, -1, -1, -1,
5959 -1, -1, 229, 684, 685, 1093, 0, -1, -1, -1,
5960 -1, -1, -1, -1, 8, 9, 10, -1, -1, 13,
5961 14, 15, -1, 17, -1, -1, -1, -1, -1, 1352,
5962 711, 25, 26, 27, -1, -1, -1, -1, -1, 266,
5963 -1, -1, 1130, 37, 38, 1257, 40, 41, 42, 43,
5964 44, -1, 1264, 1265, -1, 1288, 283, 1269, -1, 1292,
5965 1293, -1, 1017, 1018, -1, -1, 1154, -1, -1, 1157,
5966 -1, -1, -1, -1, 68, 69, 303, -1, -1, 229,
5967 -1, -1, -1, 1171, 1172, 1173, -1, -1, 1176, 1177,
5968 -1, -1, -1, 1181, 1182, -1, 1308, -1, -1, -1,
5969 -1, -1, -1, 97, 98, 255, 333, 257, -1, -1,
5970 260, 261, -1, -1, -1, -1, 266, 1072, 1073, 1352,
5971 -1, 1076, -1, -1, -1, -1, 120, -1, -1, -1,
5972 -1, -1, -1, 283, 361, 362, -1, -1, 1093, -1,
5973 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5974 -1, -1, -1, -1, -1, -1, 1, 151, 152, -1,
5975 154, -1, -1, 157, 158, -1, 160, 848, -1, 850,
5976 851, -1, -1, 400, -1, 1130, -1, -1, -1, -1,
5977 407, 408, -1, 333, -1, 335, 336, 337, 338, -1,
5978 340, 341, -1, -1, -1, -1, -1, -1, -1, 1154,
5979 1288, -1, 1157, -1, 1292, 1293, -1, 52, 53, -1,
5980 -1, 361, -1, -1, -1, -1, 1171, 1172, 1173, -1,
5981 -1, 1176, 1177, -1, -1, -1, 1181, 1182, -1, -1,
5982 -1, -1, -1, 914, -1, -1, -1, -1, -1, -1,
5983 -1, -1, -1, -1, -1, -1, -1, -1, 398, 930,
5984 400, -1, -1, -1, 935, 936, 406, 407, 408, -1,
5985 941, 942, -1, -1, 1352, -1, -1, -1, -1, 950,
5986 951, -1, 422, -1, -1, -1, -1, 504, -1, -1,
5987 -1, -1, -1, -1, -1, 966, -1, -1, -1, -1,
5988 -1, -1, -1, -1, 521, -1, -1, 447, -1, -1,
5989 -1, -1, -1, -1, 985, 1, -1, -1, -1, -1,
5990 -1, -1, -1, -1, -1, -1, -1, 544, -1, -1,
5991 -1, 471, -1, 550, -1, -1, -1, 1008, 1009, 1010,
5992 -1, -1, -1, 1288, -1, -1, -1, 1292, 1293, -1,
5993 -1, -1, -1, -1, 1025, -1, -1, -1, -1, -1,
5994 -1, -1, -1, -1, 504, -1, 52, 53, -1, -1,
5995 56, 1042, -1, 590, -1, -1, 593, -1, -1, -1,
5996 -1, -1, -1, 523, -1, -1, 603, -1, -1, 606,
5997 -1, -1, -1, -1, 229, -1, -1, -1, -1, -1,
5998 -1, -1, -1, 89, 544, -1, -1, 1352, -1, -1,
5999 550, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6000 106, 107, 108, 78, 79, 80, 81, 82, 83, 84,
6001 85, 266, 87, 88, -1, 652, -1, 654, -1, -1,
6002 95, 96, -1, -1, -1, -1, -1, -1, 283, 589,
6003 590, 1122, 592, 593, 1125, 1126, -1, 674, -1, -1,
6004 1131, 601, -1, -1, -1, -1, 606, 684, 685, -1,
6005 -1, -1, -1, -1, 1145, -1, -1, 1148, -1, -1,
6006 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6007 145, 146, -1, -1, -1, -1, -1, 1168, 333, -1,
6008 -1, -1, -1, -1, -1, -1, 723, -1, -1, -1,
6009 -1, -1, 652, -1, 654, 732, -1, -1, -1, 1190,
6010 -1, -1, 662, -1, -1, -1, 361, -1, 1017, 1018,
6011 -1, -1, 672, 1204, 674, 675, -1, -1, -1, -1,
6012 -1, -1, -1, 229, 684, 685, -1, -1, -1, -1,
6013 1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6014 -1, -1, -1, -1, -1, 400, -1, -1, -1, -1,
6015 -1, 711, 407, 408, -1, -1, -1, -1, -1, -1,
6016 266, -1, 799, 1072, 1073, -1, 1257, 1076, -1, -1,
6017 -1, -1, -1, 1264, 1265, -1, -1, 283, 1269, -1,
6018 -1, 52, 53, -1, 1093, 56, -1, -1, -1, -1,
6019 -1, -1, -1, -1, -1, -1, -1, 303, -1, -1,
6020 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6021 -1, -1, -1, -1, 851, -1, -1, 1308, 89, -1,
6022 -1, 1130, -1, -1, -1, -1, -1, 333, -1, -1,
6023 -1, -1, -1, -1, -1, 106, 107, 108, -1, -1,
6024 -1, -1, -1, -1, -1, 1154, -1, -1, 1157, 504,
6025 -1, -1, -1, -1, -1, 361, 362, -1, 1, -1,
6026 -1, -1, 1171, 1172, 1173, -1, -1, 1176, 1177, -1,
6027 -1, -1, 1181, 1182, -1, -1, -1, -1, -1, -1,
6028 -1, 1017, 1018, -1, -1, -1, -1, -1, 848, 544,
6029 850, 851, -1, -1, 400, 550, -1, -1, 935, 936,
6030 -1, 407, 408, -1, 941, 942, -1, -1, -1, 52,
6031 53, -1, -1, 950, -1, -1, -1, -1, -1, -1,
6032 -1, -1, -1, -1, -1, -1, -1, -1, -1, 966,
6033 -1, -1, -1, -1, -1, 590, 1072, 1073, 593, -1,
6034 1076, -1, -1, -1, -1, -1, -1, -1, 985, -1,
6035 -1, 606, -1, -1, 914, -1, -1, 1093, 229, -1,
6036 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6037 930, 1008, 1009, 1010, -1, 935, 936, -1, -1, 1288,
6038 -1, 941, 942, 1292, 1293, -1, -1, -1, 1025, -1,
6039 950, 951, -1, -1, 1130, 266, -1, 652, 504, 654,
6040 -1, -1, -1, -1, -1, 1042, 966, -1, -1, -1,
6041 -1, -1, 283, -1, -1, 521, -1, -1, 1154, 674,
6042 -1, 1157, -1, -1, -1, 985, -1, -1, -1, 684,
6043 685, -1, 303, -1, -1, 1171, 1172, 1173, 544, -1,
6044 1176, 1177, -1, 1352, 550, 1181, 1182, -1, 1008, 1009,
6045 1010, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6046 84, -1, 333, 87, 88, 1025, -1, -1, -1, -1,
6047 -1, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6048 -1, 1118, 1042, -1, 590, 1122, 229, 593, 1125, 1126,
6049 361, 362, -1, -1, 1131, -1, -1, 603, -1, -1,
6050 606, -1, -1, -1, -1, -1, -1, -1, 1145, -1,
6051 -1, 1148, -1, 137, 138, 139, 140, 141, 142, 143,
6052 144, 145, 146, 266, -1, -1, -1, -1, -1, 400,
6053 -1, -1, -1, -1, -1, -1, 407, 408, -1, -1,
6054 283, -1, -1, -1, -1, -1, 652, -1, 654, -1,
6055 -1, -1, 1288, 1190, -1, -1, 1292, 1293, -1, -1,
6056 -1, -1, 1122, -1, -1, 1125, 1126, 1204, 674, -1,
6057 -1, 1131, -1, -1, -1, -1, -1, -1, 684, 685,
6058 1217, -1, -1, -1, -1, 1145, -1, -1, 1148, -1,
6059 333, -1, -1, -1, -1, -1, 851, -1, -1, -1,
6060 -1, -1, -1, -1, -1, -1, -1, -1, 1168, -1,
6061 -1, -1, -1, -1, -1, -1, 1352, 723, 361, -1,
6062 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6063 1190, -1, 1269, 504, -1, -1, -1, -1, -1, -1,
6064 -1, -1, 1279, -1, 1204, -1, -1, -1, -1, -1,
6065 521, -1, -1, -1, -1, -1, -1, 400, -1, -1,
6066 -1, -1, 1017, 1018, 407, 408, -1, -1, -1, -1,
6067 -1, 1308, -1, 544, -1, -1, -1, -1, -1, 550,
6068 935, 936, -1, -1, -1, -1, 941, 942, -1, -1,
6069 -1, -1, -1, 799, -1, 950, -1, 1257, -1, -1,
6070 -1, -1, -1, -1, 1264, 1265, -1, -1, -1, 1269,
6071 -1, 966, -1, -1, -1, -1, -1, 1072, 1073, 590,
6072 -1, 1076, 593, -1, -1, -1, -1, -1, -1, -1,
6073 985, -1, 603, -1, -1, 606, -1, -1, 1093, -1,
6074 -1, -1, -1, -1, -1, 851, -1, -1, 1308, -1,
6075 -1, -1, -1, 1008, 1009, 1010, -1, -1, -1, -1,
6076 -1, 504, -1, -1, -1, -1, -1, -1, -1, -1,
6077 1025, -1, -1, -1, -1, 1130, -1, -1, -1, -1,
6078 -1, 652, -1, 654, -1, -1, -1, 1042, -1, -1,
6079 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1154,
6080 -1, 544, 1157, 674, -1, -1, -1, 550, -1, -1,
6081 1017, 1018, -1, 684, 685, -1, 1171, 1172, 1173, -1,
6082 -1, 1176, 1177, -1, -1, -1, 1181, 1182, -1, 935,
6083 936, -1, -1, -1, -1, 941, 942, -1, -1, -1,
6084 -1, -1, -1, -1, 950, -1, -1, 590, -1, -1,
6085 593, -1, 723, -1, -1, -1, -1, -1, -1, -1,
6086 966, -1, -1, 606, -1, 1072, 1073, 1122, -1, 1076,
6087 1125, 1126, -1, -1, -1, -1, 1131, -1, -1, 985,
6088 -1, -1, -1, -1, -1, -1, 1093, -1, -1, -1,
6089 1145, -1, -1, 1148, -1, -1, -1, -1, -1, -1,
6090 -1, -1, 1008, 1009, 1010, -1, -1, -1, -1, 652,
6091 -1, 654, -1, -1, -1, -1, -1, -1, -1, 1025,
6092 -1, -1, -1, 1130, -1, -1, -1, -1, 799, -1,
6093 -1, 674, -1, 1288, -1, 1190, 1042, 1292, 1293, -1,
6094 -1, 684, 685, -1, -1, -1, -1, 1154, -1, 1204,
6095 1157, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6096 -1, -1, -1, -1, 1171, 1172, 1173, -1, -1, 1176,
6097 1177, -1, -1, -1, 1181, 1182, -1, -1, -1, -1,
6098 851, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6099 84, 85, 86, 87, 88, 89, 90, 1352, -1, -1,
6100 -1, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6101 -1, -1, 1118, -1, 1269, -1, 1122, -1, -1, 1125,
6102 1126, -1, -1, -1, -1, 1131, -1, -1, -1, -1,
6103 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1145,
6104 -1, 135, 1148, 137, 138, 139, 140, 141, 142, 143,
6105 144, 145, 146, 1308, -1, -1, -1, -1, -1, -1,
6106 154, -1, -1, -1, 935, 936, -1, -1, -1, -1,
6107 941, 942, -1, -1, -1, -1, -1, -1, -1, 950,
6108 -1, 1288, -1, -1, 1190, 1292, 1293, -1, -1, -1,
6109 -1, -1, -1, -1, -1, 966, -1, -1, 1204, -1,
6110 -1, -1, -1, -1, -1, -1, -1, -1, 851, -1,
6111 -1, 1217, -1, -1, 985, -1, -1, -1, -1, -1,
6112 -1, -1, -1, -1, -1, 15, 16, -1, -1, -1,
6113 -1, -1, -1, -1, -1, -1, -1, 1008, 1009, 1010,
6114 -1, -1, -1, -1, -1, 1352, -1, -1, -1, -1,
6115 -1, -1, -1, -1, 1025, -1, -1, 47, 48, 49,
6116 50, -1, -1, 1269, 54, 55, -1, -1, -1, -1,
6117 -1, 1042, -1, 1279, 25, -1, -1, 67, 68, -1,
6118 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6119 -1, -1, 935, 936, -1, -1, -1, -1, 941, 942,
6120 -1, -1, 1308, -1, -1, -1, -1, 950, -1, -1,
6121 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6122 110, -1, -1, 966, -1, -1, -1, 78, 79, 80,
6123 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6124 -1, -1, 985, -1, 95, 96, -1, 1118, -1, -1,
6125 101, 1122, -1, -1, 1125, 1126, -1, -1, -1, -1,
6126 1131, -1, -1, -1, -1, 1008, 1009, 1010, -1, -1,
6127 -1, -1, -1, -1, 1145, -1, -1, 1148, -1, -1,
6128 -1, -1, 1025, -1, 135, -1, 137, 138, 139, 140,
6129 141, 142, 143, 144, 145, 146, -1, -1, -1, 1042,
6130 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6131 -1, -1, -1, -1, -1, -1, -1, -1, 44, 1190,
6132 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6133 -1, -1, -1, 1204, -1, -1, -1, 227, -1, -1,
6134 230, 231, 232, -1, 234, -1, 1217, -1, -1, -1,
6135 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6136 86, 87, 88, 89, 90, 255, -1, 257, -1, 95,
6137 96, -1, -1, -1, -1, 1118, -1, -1, -1, 1122,
6138 -1, -1, 1125, 1126, -1, -1, -1, -1, 1131, -1,
6139 -1, -1, -1, -1, -1, -1, -1, -1, 1269, -1,
6140 -1, -1, 1145, -1, -1, 1148, -1, -1, 1279, 135,
6141 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6142 146, -1, -1, -1, -1, -1, -1, -1, -1, 155,
6143 -1, -1, -1, -1, -1, -1, -1, 1308, -1, -1,
6144 -1, -1, -1, -1, -1, -1, -1, 1190, -1, -1,
6145 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6146 88, 1204, -1, -1, -1, -1, -1, 95, 96, -1,
6147 -1, -1, -1, -1, -1, -1, 366, 367, 368, 369,
6148 370, -1, -1, 373, 374, 375, 376, 377, 378, 379,
6149 380, -1, 382, -1, -1, 385, 386, 387, 388, 389,
6150 390, 391, 392, 393, 394, -1, -1, -1, 398, 137,
6151 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6152 -1, -1, -1, -1, -1, -1, 1269, -1, -1, -1,
6153 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6154 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6155 -1, -1, -1, -1, -1, -1, -1, 447, -1, -1,
6156 -1, -1, -1, -1, -1, 1308, -1, -1, -1, -1,
6157 -1, -1, -1, -1, -1, -1, 466, 467, -1, -1,
6158 -1, 471, -1, -1, -1, 475, 0, 477, -1, -1,
6159 -1, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6160 14, 15, -1, 17, -1, 495, -1, -1, -1, -1,
6161 -1, 25, 26, 27, 28, 29, -1, -1, 508, -1,
6162 -1, 511, -1, 37, 38, -1, 40, 41, 42, 43,
6163 44, -1, -1, 523, -1, -1, -1, -1, -1, -1,
6164 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6165 -1, 541, -1, -1, 68, 69, -1, -1, -1, -1,
6166 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6167 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6168 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6169 -1, 581, 106, -1, -1, -1, -1, -1, -1, 589,
6170 -1, -1, 592, -1, -1, -1, 120, -1, -1, 123,
6171 -1, 601, -1, -1, -1, -1, 606, -1, -1, -1,
6172 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6173 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6174 154, 155, -1, -1, 158, 159, 160, -1, -1, -1,
6175 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6177 -1, -1, 662, -1, -1, -1, -1, -1, -1, -1,
6178 -1, -1, 672, -1, -1, -1, -1, -1, -1, -1,
6179 -1, -1, -1, -1, 684, 685, -1, 687, 688, 689,
6180 690, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6181 -1, 701, 702, -1, -1, 705, -1, 707, -1, -1,
6182 -1, -1, -1, -1, -1, -1, -1, 717, -1, 0,
6183 1, -1, 3, 4, 5, 6, 7, 8, 9, 10,
6184 11, 12, -1, 14, 15, 16, 17, 18, 19, 20,
6185 21, 22, 23, 24, 25, -1, -1, -1, -1, 30,
6186 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6187 -1, 761, -1, -1, 45, 46, 47, 48, 49, 50,
6188 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6189 61, 62, 63, 64, 65, -1, -1, 68, -1, 789,
6190 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6191 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6192 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6193 820, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6194 111, 112, 113, 114, 115, 116, 117, 118, 838, 120,
6195 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6196 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6197 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6198 -1, 152, -1, -1, -1, -1, -1, 158, -1, 160,
6199 -1, 33, 34, 35, 36, -1, -1, -1, -1, -1,
6200 -1, -1, -1, -1, -1, -1, -1, 49, 50, 51,
6201 52, -1, -1, -1, 56, -1, 58, 59, 60, 61,
6202 62, 63, -1, -1, 914, -1, -1, -1, -1, -1,
6203 -1, -1, -1, 923, -1, -1, 78, -1, -1, -1,
6204 930, -1, -1, -1, 934, 935, 936, -1, -1, 91,
6205 92, 941, 942, -1, -1, 945, -1, 99, -1, -1,
6206 102, -1, 104, 105, -1, 107, 108, 957, 110, 111,
6207 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6208 -1, -1, -1, -1, -1, 975, 976, 977, -1, 979,
6209 980, -1, 982, -1, -1, -1, -1, -1, 140, -1,
6210 -1, -1, -1, -1, -1, 147, -1, -1, -1, -1,
6211 -1, -1, 1002, 1003, -1, -1, 1006, -1, -1, -1,
6212 1010, 1011, -1, -1, -1, -1, -1, -1, -1, -1,
6213 -1, -1, -1, -1, -1, 1025, -1, -1, -1, -1,
6214 -1, -1, 0, 1, -1, 3, 4, 5, 6, 7,
6215 -1, 1041, -1, 11, 12, -1, -1, -1, 16, 1049,
6216 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6217 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6218 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6219 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6220 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6221 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6222 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6223 -1, -1, -1, 91, 92, -1, -1, 1127, -1, -1,
6224 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6225 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6226 118, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6227 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6228 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6229 148, 149, -1, -1, 0, 1, 154, 3, 4, 5,
6230 6, 7, 160, -1, -1, 11, 12, -1, -1, -1,
6231 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6232 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6233 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6234 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6235 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6236 -1, -1, -1, -1, -1, -1, -1, 1257, -1, -1,
6237 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6238 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6239 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6240 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6241 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6242 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6243 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6244 -1, 147, 148, 149, -1, -1, 0, 1, 154, 3,
6245 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6246 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6247 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6248 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6249 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6250 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6251 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6252 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6253 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6254 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6255 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6256 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6257 -1, -1, 0, -1, -1, -1, -1, -1, -1, -1,
6258 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6259 -1, -1, -1, 147, 148, 149, -1, 25, 152, 27,
6260 28, 29, -1, -1, -1, -1, 160, -1, -1, 37,
6261 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6262 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6263 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6264 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6265 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6266 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6267 98, -1, 100, 101, -1, -1, -1, 135, 106, 137,
6268 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6269 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6270 -1, -1, -1, -1, -1, -1, 134, 135, 136, 137,
6271 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6272 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6273 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6274 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6275 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6276 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6277 42, 43, 44, -1, -1, -1, 78, 79, 80, 81,
6278 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6279 -1, -1, -1, 95, 96, -1, 68, 69, -1, -1,
6280 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6281 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6282 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6283 -1, -1, -1, -1, 106, 137, 138, 139, 140, 141,
6284 142, 143, 144, 145, 146, -1, -1, -1, 120, -1,
6285 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6286 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6287 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6288 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6289 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6290 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6291 26, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6292 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6293 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6294 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6295 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6296 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6297 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6298 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6299 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6300 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6301 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6302 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6303 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6304 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6305 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6306 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6307 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6308 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6309 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6310 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6311 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6312 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6313 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6314 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6315 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6316 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6317 -1, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6318 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6319 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6320 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6321 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6322 -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
6323 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6324 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6326 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6327 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6328 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6329 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6330 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6331 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6332 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6333 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6334 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6335 154, 155, 0, 157, 158, 159, 160, -1, -1, -1,
6336 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6337 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6338 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6339 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6342 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6343 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6344 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6345 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6346 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6347 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6348 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6349 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6350 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6351 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6352 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6353 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6354 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6355 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6357 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6358 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6359 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6360 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6361 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6362 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6363 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6364 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6365 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6366 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6367 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6368 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6369 -1, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6370 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6371 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6373 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6374 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6375 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6376 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6377 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6378 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6379 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6380 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6381 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6382 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6383 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6384 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6385 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6386 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6388 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6389 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6390 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6391 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6392 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6394 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6395 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6396 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6397 -1, -1, 152, 153, 154, 155, 0, 157, 158, 159,
6398 160, -1, -1, -1, 8, 9, 10, 44, -1, -1,
6399 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6400 -1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
6401 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6402 44, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6403 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6404 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6405 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6406 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6407 -1, 95, 96, 97, 98, -1, 100, 101, 135, -1,
6408 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6409 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6410 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6411 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6412 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6413 154, 155, 0, -1, 158, -1, 160, -1, -1, -1,
6414 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6415 -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
6416 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6417 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6418 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6419 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6420 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6421 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6422 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6423 98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6424 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6425 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6426 -1, -1, -1, -1, -1, -1, 134, 135, -1, 137,
6427 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6428 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6429 158, -1, 160, -1, -1, -1, 8, 9, 10, -1,
6430 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6431 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6432 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6433 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6434 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6435 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6436 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6437 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6438 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6440 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6442 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6443 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6444 152, 153, 154, 155, 0, -1, 158, -1, 160, -1,
6445 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
6446 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6448 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6450 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6451 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6452 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6453 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6454 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6455 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6456 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6457 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6458 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6459 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6460 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6461 8, 9, 10, 11, 12, -1, -1, 15, 16, -1,
6462 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6463 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6464 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6465 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6466 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6467 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6469 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6470 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6471 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6472 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6473 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6474 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6475 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6476 6, 7, 160, -1, 10, 11, 12, -1, 14, 15,
6477 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6478 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6479 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6480 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6481 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6482 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6483 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6484 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6485 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6486 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6487 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6488 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6490 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6491 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6492 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6493 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6494 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6495 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6496 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6497 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6498 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6499 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6500 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6501 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6502 114, 115, 116, 117, 118, -1, -1, -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 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6506 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6507 12, -1, -1, 15, 16, -1, 18, 19, 20, 21,
6508 22, 23, 24, 25, -1, -1, -1, -1, 30, 31,
6509 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6510 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6511 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6512 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6513 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6514 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6515 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6516 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6517 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6518 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6519 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6520 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6521 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6522 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
6523 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6524 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6525 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6526 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6527 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6528 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6529 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6530 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6531 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6532 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6533 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6534 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6535 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6536 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6537 160, 9, 10, 11, 12, -1, -1, -1, 16, -1,
6538 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6539 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6540 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6541 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6542 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6543 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6544 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6545 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6546 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6547 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6548 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6549 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6550 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6551 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6552 6, 7, 160, -1, 10, 11, 12, -1, -1, -1,
6553 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6554 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6555 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6556 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6557 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6558 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6559 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6560 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6561 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6562 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6563 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6564 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6566 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6567 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6568 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6569 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6570 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6571 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6572 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6573 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6574 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6575 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6576 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6577 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6578 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6579 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6580 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6581 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6582 154, -1, -1, -1, 158, 1, 160, 3, 4, 5,
6583 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6584 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6585 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6586 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6587 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6588 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6590 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6591 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6592 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6593 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6594 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6595 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6596 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6597 -1, 147, 148, 149, -1, -1, -1, -1, 154, -1,
6598 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6599 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6600 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6601 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6602 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6603 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6604 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6605 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6606 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6607 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6608 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6609 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6610 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6611 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6612 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6613 148, 149, -1, -1, 152, 1, 154, 3, 4, 5,
6614 6, 7, 160, -1, -1, 11, 12, -1, -1, -1,
6615 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6616 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6617 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6618 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6619 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6621 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6622 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6623 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6624 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6625 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6626 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6627 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6628 -1, 147, 148, 149, -1, -1, 152, 1, 154, 3,
6629 4, 5, -1, 7, 160, -1, -1, 11, 12, -1,
6630 -1, -1, 16, 17, 18, 19, 20, 21, 22, 23,
6631 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6632 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6633 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6634 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6635 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6636 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6637 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6638 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6639 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
6640 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6641 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6642 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6643 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6644 154, -1, -1, -1, -1, -1, 160, 3, 4, 5,
6645 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6646 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6647 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6648 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6649 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6650 56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
6651 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6652 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6653 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6654 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6655 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
6656 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6657 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6658 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6659 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
6660 156, 157, 3, 4, 5, 6, 7, 8, 9, 10,
6661 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6662 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6663 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6664 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6665 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
6666 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6667 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6668 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6669 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6670 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
6671 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6672 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6673 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
6674 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
6675 -1, -1, -1, -1, -1, 156, 3, 4, 5, 6,
6676 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6677 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6678 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6679 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6680 47, 48, 49, 50, 51, 52, 53, 54, -1, 56,
6681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6682 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6683 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6684 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6685 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6686 107, 108, -1, -1, 111, -1, -1, -1, -1, -1,
6687 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6688 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6689 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6690 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6691 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
6692 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
6693 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
6694 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
6695 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6696 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
6697 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6698 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
6699 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
6700 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
6701 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
6702 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6703 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6704 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
6705 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
6706 -1, -1, -1, 156, 3, 4, 5, 6, 7, 8,
6707 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6708 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6709 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6710 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6711 49, 50, 51, 52, 53, -1, -1, 56, -1, -1,
6712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6713 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6714 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6715 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6716 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6717 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6718 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6719 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6720 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6721 149, 3, 4, 5, -1, 7, -1, 156, -1, 11,
6722 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6723 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6724 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6725 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6726 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6727 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6728 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6729 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6730 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6731 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6732 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
6733 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6734 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6735 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
6736 34, 35, 36, 155, -1, 39, -1, -1, -1, -1,
6737 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6738 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6739 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6740 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6741 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6742 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6743 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
6744 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
6745 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6746 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6747 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
6748 36, 155, -1, 39, -1, -1, -1, -1, -1, -1,
6749 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6750 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6751 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6752 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6753 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6754 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6755 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6756 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6757 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6758 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
6759 7, 147, 148, 149, 11, 12, -1, -1, 154, 16,
6760 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6761 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6762 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6763 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6764 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6765 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6766 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6767 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6768 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6769 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6770 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6771 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6772 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
6773 147, 148, 149, 11, 12, -1, -1, 154, 16, -1,
6774 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6775 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6776 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
6777 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6778 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6779 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6780 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6781 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6782 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6783 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6784 118, -1, -1, 1, -1, 3, 4, 5, -1, 7,
6785 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6786 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6787 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6788 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6789 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6790 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6791 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6792 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6793 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6794 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6795 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6796 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6797 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6798 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6799 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6800 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6801 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6802 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6803 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6804 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6805 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6806 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6807 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
6808 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6809 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6810 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6811 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6812 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6813 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6814 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6815 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6816 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6817 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6818 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6819 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
6820 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6821 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6822 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6823 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6824 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6825 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6826 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6827 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6828 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6829 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6830 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6831 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
6832 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6833 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6834 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6835 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6836 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6837 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6838 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6839 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6840 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6841 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6842 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6843 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
6844 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6845 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6846 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6847 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6848 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6849 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6850 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6851 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6852 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6853 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6854 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6855 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6856 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6857 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6858 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6859 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6860 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6861 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6862 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6863 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6864 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6865 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6866 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6867 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
6868 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6869 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6870 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6871 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6872 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6873 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6874 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6875 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6877 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6878 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6879 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6880 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6881 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6882 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6883 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6884 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6885 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6886 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6887 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6888 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6889 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6890 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6891 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6892 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6893 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6894 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6895 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6896 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6897 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6898 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6899 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6900 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6901 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6902 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6903 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6904 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6905 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6906 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6907 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6908 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6909 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6910 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6911 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6912 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6913 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6914 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6915 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6916 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6917 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6918 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6919 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6920 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6921 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6922 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6923 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6925 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6926 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6927 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6928 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6929 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6930 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6931 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6932 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6933 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6934 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6935 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6936 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6937 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6938 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6939 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6940 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6941 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6942 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6943 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6944 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6945 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6946 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6947 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6948 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6949 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6950 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6951 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6952 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6953 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6954 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6955 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6956 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6957 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6958 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6959 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6960 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6961 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6962 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6963 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6964 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6965 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6966 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6967 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6968 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6969 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6970 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6971 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6972 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6973 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6974 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6975 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6976 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6977 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6978 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6979 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6980 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6981 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6982 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6983 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6984 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6985 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6986 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6987 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6988 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6989 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6990 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
6991 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
6992 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6993 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6994 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6995 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6996 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6997 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6998 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6999 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7000 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7001 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7002 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7003 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7004 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7005 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7006 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7007 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7008 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7009 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7010 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7011 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7012 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7013 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7014 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7015 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7016 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7017 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7018 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7019 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7020 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7021 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7022 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
7023 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7024 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7025 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7026 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7027 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7028 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7029 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7030 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7031 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7032 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7033 -1, -1, -1, 95, -1, -1, -1, 99, -1, -1,
7034 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7035 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7036 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7037 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7038 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7039 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7040 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7041 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7042 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7043 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7044 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7045 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7046 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7047 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7048 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7049 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7050 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7051 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7052 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7053 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7054 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7055 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7056 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7057 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7058 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7059 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7060 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7061 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7062 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7063 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7064 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7065 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7066 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7067 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7068 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7069 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7070 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7071 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7072 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7073 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7074 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7075 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7076 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7077 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7078 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7079 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7080 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7081 -1, -1, 102, 103, 104, 105, 33, 34, 35, 36,
7082 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7083 -1, -1, 49, 50, 51, 52, -1, -1, -1, 56,
7084 -1, -1, 59, 60, 61, 62, 63, -1, -1, -1,
7085 -1, -1, -1, -1, -1, -1, -1, 147, -1, -1,
7086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7087 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7088 -1, -1, 99, -1, -1, 102, -1, 104, 105, -1,
7089 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7090 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
7091 -1, -1, -1, -1, -1, 33, 34, 35, 36, -1,
7092 -1, -1, -1, 140, -1, -1, -1, -1, -1, -1,
7093 147, 49, 50, 51, 52, -1, -1, 154, 56, -1,
7094 -1, 59, 60, 61, 62, 63, -1, -1, -1, -1,
7095 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7096 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7097 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7098 -1, 99, -1, -1, 102, -1, 104, 105, -1, 107,
7099 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7100 118, -1, -1, -1, -1, -1, -1, 33, 34, 35,
7101 36, -1, -1, -1, 52, 53, -1, -1, 56, -1,
7102 -1, -1, 140, 49, 50, 51, 52, -1, -1, 147,
7103 56, -1, -1, 59, 60, 61, 62, 63, 76, 77,
7104 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7105 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7106 -1, -1, -1, -1, -1, 91, 92, -1, -1, 107,
7107 108, -1, -1, 99, -1, -1, 102, -1, 104, 105,
7108 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7109 116, 117, 118, -1, -1, -1, -1, -1, -1, 137,
7110 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7111 148, 149, 52, 53, 140, -1, 56, -1, 156, 157,
7112 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
7113 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7114 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7115 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7116 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7118 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7119 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7120 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7121 52, 53, -1, -1, 56, -1, 156, 157, -1, -1,
7122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7123 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7124 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7125 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7126 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7127 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7128 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7129 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7130 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7131 -1, -1, 56, -1, 156, 157, -1, -1, -1, -1,
7132 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7133 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7134 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7135 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7136 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7137 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7138 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7139 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7140 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7141 56, -1, 156, 157, -1, -1, -1, -1, -1, -1,
7142 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7143 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7144 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7145 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7146 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7147 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7148 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7149 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7150 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7151 156, 157, -1, -1, -1, -1, -1, -1, -1, -1,
7152 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7153 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7154 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7155 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7156 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7158 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7159 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7160 148, 149, 52, 53, -1, -1, 56, -1, 156, 157,
7161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7162 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7163 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7164 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7165 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7167 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7168 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7169 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7170 52, 53, -1, -1, 56, -1, 156, 157, -1, -1,
7171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7172 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7173 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7174 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7175 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7177 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7178 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7179 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7180 -1, -1, 56, -1, 156, 157, -1, -1, -1, -1,
7181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7182 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7183 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7184 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7185 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7186 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7187 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7188 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7189 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7190 56, -1, 156, 157, -1, -1, -1, -1, -1, -1,
7191 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7192 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7193 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7194 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7195 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7196 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7198 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7199 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7200 156, 157, -1, -1, -1, -1, -1, -1, -1, -1,
7201 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7202 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7203 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7204 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7205 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7207 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7208 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7209 148, 149, 52, 53, -1, -1, 56, -1, 156, 157,
7210 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7211 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7212 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7213 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7214 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7216 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7217 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7218 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7219 52, 53, -1, -1, 56, -1, 156, 157, -1, -1,
7220 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7221 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7222 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7223 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7224 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7225 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7226 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7227 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7228 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7229 -1, -1, 56, -1, 156, 157, -1, -1, -1, -1,
7230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7231 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7232 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7233 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7234 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7235 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7236 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7237 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7238 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7239 56, -1, 156, 157, -1, -1, -1, -1, -1, -1,
7240 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7241 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7242 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7243 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7244 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7245 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7246 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7247 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7248 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7249 156, 157, -1, -1, -1, -1, -1, -1, -1, -1,
7250 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7251 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7252 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7253 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7254 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7256 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7257 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7258 148, 149, 52, 53, -1, -1, 56, -1, 156, 157,
7259 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7260 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7261 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7262 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7263 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7266 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7267 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7268 -1, -1, -1, -1, -1, -1, 156
7269};
7270
7271/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7272 state STATE-NUM. */
7273static const yytype_int16 yystos[] =
7274{
7275 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7276 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7277 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7278 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7279 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7280 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7281 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7282 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7283 195, 197, 203, 206, 208, 209, 210, 212, 213, 214,
7284 216, 217, 226, 227, 228, 229, 232, 253, 265, 266,
7285 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7286 285, 286, 317, 322, 323, 373, 374, 375, 376, 377,
7287 378, 380, 381, 384, 385, 387, 388, 389, 390, 403,
7288 404, 406, 407, 408, 409, 410, 411, 412, 413, 414,
7289 449, 461, 0, 3, 4, 5, 6, 7, 8, 9,
7290 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
7291 20, 21, 22, 23, 24, 25, 26, 30, 31, 32,
7292 33, 34, 35, 36, 37, 38, 39, 45, 46, 47,
7293 48, 49, 50, 51, 52, 53, 56, 76, 77, 78,
7294 79, 80, 81, 82, 83, 84, 87, 88, 93, 94,
7295 95, 96, 107, 108, 137, 138, 139, 140, 141, 142,
7296 143, 144, 145, 146, 148, 149, 156, 220, 221, 222,
7297 224, 225, 403, 179, 179, 179, 39, 58, 99, 102,
7298 107, 108, 109, 112, 148, 195, 197, 209, 217, 227,
7299 236, 237, 243, 244, 247, 249, 250, 266, 410, 411,
7300 413, 414, 447, 448, 244, 157, 240, 245, 246, 154,
7301 157, 189, 54, 221, 189, 151, 169, 170, 233, 461,
7302 21, 22, 32, 208, 227, 266, 285, 286, 227, 227,
7303 227, 56, 47, 102, 171, 176, 177, 182, 211, 212,
7304 461, 171, 238, 249, 447, 461, 237, 446, 447, 461,
7305 46, 99, 147, 155, 195, 197, 216, 253, 266, 410,
7306 411, 414, 315, 220, 393, 405, 409, 393, 394, 395,
7307 161, 379, 379, 379, 379, 408, 203, 227, 227, 154,
7308 160, 163, 459, 460, 179, 40, 41, 42, 43, 44,
7309 37, 38, 157, 417, 418, 419, 420, 461, 417, 419,
7310 26, 151, 240, 246, 277, 324, 28, 278, 321, 134,
7311 155, 102, 107, 213, 134, 25, 78, 79, 80, 81,
7312 82, 83, 84, 85, 86, 87, 88, 89, 90, 95,
7313 96, 101, 135, 137, 138, 139, 140, 141, 142, 143,
7314 144, 145, 146, 231, 231, 69, 97, 98, 153, 453,
7315 254, 1, 191, 198, 199, 199, 200, 202, 202, 163,
7316 199, 460, 99, 210, 217, 266, 291, 410, 411, 414,
7317 52, 56, 95, 99, 218, 219, 266, 410, 411, 414,
7318 219, 33, 34, 35, 36, 49, 50, 51, 52, 56,
7319 157, 194, 220, 412, 443, 444, 244, 157, 246, 98,
7320 453, 454, 324, 376, 100, 100, 155, 237, 56, 237,
7321 237, 237, 393, 417, 417, 134, 101, 155, 248, 461,
7322 98, 153, 453, 100, 100, 155, 248, 92, 242, 244,
7323 249, 428, 447, 461, 244, 189, 191, 455, 191, 54,
7324 64, 65, 181, 157, 233, 234, 164, 98, 453, 100,
7325 178, 211, 158, 163, 460, 455, 255, 159, 155, 189,
7326 458, 155, 458, 152, 458, 189, 56, 408, 213, 215,
7327 418, 155, 98, 153, 453, 312, 66, 119, 121, 122,
7328 396, 119, 119, 396, 67, 396, 161, 382, 391, 386,
7329 392, 78, 160, 168, 151, 199, 199, 199, 199, 233,
7330 235, 191, 191, 52, 54, 55, 56, 57, 58, 78,
7331 92, 102, 107, 108, 109, 141, 144, 296, 359, 421,
7332 422, 423, 424, 425, 427, 428, 429, 430, 431, 432,
7333 433, 434, 435, 436, 437, 438, 439, 440, 441, 134,
7334 263, 427, 134, 264, 325, 326, 106, 207, 327, 328,
7335 328, 233, 211, 155, 216, 155, 233, 193, 227, 227,
7336 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7337 227, 192, 227, 227, 227, 227, 227, 227, 227, 227,
7338 227, 227, 227, 52, 53, 56, 224, 240, 449, 450,
7339 451, 242, 249, 52, 53, 56, 224, 240, 450, 171,
7340 174, 13, 287, 459, 287, 199, 171, 171, 257, 163,
7341 56, 98, 153, 453, 25, 199, 52, 56, 218, 138,
7342 416, 98, 153, 453, 262, 445, 69, 98, 452, 244,
7343 455, 52, 56, 450, 233, 233, 223, 124, 134, 134,
7344 233, 237, 237, 247, 250, 447, 52, 56, 242, 52,
7345 56, 233, 233, 448, 455, 155, 455, 155, 158, 455,
7346 221, 234, 227, 152, 56, 450, 450, 233, 170, 455,
7347 177, 158, 447, 155, 215, 52, 56, 242, 52, 56,
7348 313, 398, 397, 119, 383, 396, 66, 119, 119, 383,
7349 66, 119, 227, 171, 182, 102, 107, 292, 293, 294,
7350 295, 430, 155, 442, 461, 155, 442, 155, 426, 455,
7351 297, 298, 155, 426, 237, 34, 52, 52, 155, 426,
7352 52, 39, 188, 209, 227, 230, 174, 459, 188, 230,
7353 174, 312, 152, 326, 312, 10, 68, 284, 284, 107,
7354 203, 204, 205, 237, 249, 251, 252, 455, 215, 155,
7355 185, 190, 205, 217, 227, 237, 239, 252, 266, 414,
7356 334, 334, 189, 100, 100, 151, 240, 246, 189, 456,
7357 155, 100, 100, 240, 241, 246, 461, 233, 284, 171,
7358 13, 171, 27, 288, 459, 284, 284, 17, 281, 330,
7359 25, 256, 336, 52, 56, 242, 52, 56, 258, 261,
7360 415, 260, 52, 56, 218, 242, 174, 191, 196, 455,
7361 241, 246, 190, 227, 239, 190, 239, 221, 237, 39,
7362 248, 100, 100, 456, 100, 100, 428, 447, 191, 239,
7363 458, 213, 456, 314, 399, 402, 409, 414, 379, 396,
7364 379, 379, 379, 152, 294, 430, 155, 455, 155, 441,
7365 421, 435, 437, 423, 424, 433, 439, 134, 237, 425,
7366 432, 439, 431, 433, 189, 44, 44, 284, 284, 313,
7367 152, 313, 237, 155, 44, 215, 44, 134, 44, 98,
7368 153, 453, 332, 332, 136, 233, 233, 326, 207, 159,
7369 100, 233, 233, 207, 8, 279, 369, 461, 14, 15,
7370 282, 283, 289, 290, 461, 290, 201, 107, 237, 329,
7371 284, 334, 330, 284, 456, 199, 459, 199, 174, 456,
7372 284, 455, 194, 324, 321, 189, 233, 233, 100, 233,
7373 233, 455, 155, 455, 179, 400, 455, 292, 295, 293,
7374 442, 155, 426, 155, 426, 155, 426, 155, 426, 426,
7375 188, 230, 235, 235, 314, 314, 107, 237, 235, 235,
7376 233, 235, 52, 56, 242, 52, 56, 333, 333, 227,
7377 190, 239, 190, 239, 152, 233, 190, 239, 190, 239,
7378 237, 252, 370, 461, 175, 282, 171, 199, 284, 284,
7379 237, 155, 287, 332, 284, 288, 174, 459, 284, 233,
7380 157, 318, 427, 171, 155, 155, 433, 433, 439, 433,
7381 227, 227, 179, 179, 237, 182, 182, 227, 456, 52,
7382 56, 58, 91, 92, 99, 102, 104, 105, 107, 112,
7383 140, 317, 339, 340, 341, 342, 345, 349, 350, 351,
7384 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
7385 364, 365, 366, 367, 368, 373, 374, 377, 378, 381,
7386 385, 388, 390, 411, 435, 339, 190, 239, 101, 371,
7387 461, 9, 280, 372, 461, 172, 287, 107, 237, 171,
7388 333, 259, 284, 427, 316, 0, 120, 401, 293, 426,
7389 426, 155, 426, 426, 139, 307, 308, 461, 307, 362,
7390 364, 364, 56, 218, 333, 340, 347, 348, 349, 350,
7391 353, 456, 189, 333, 457, 52, 393, 52, 102, 409,
7392 101, 155, 139, 155, 155, 340, 89, 90, 98, 153,
7393 157, 343, 344, 52, 99, 217, 266, 410, 411, 414,
7394 287, 176, 171, 171, 237, 290, 330, 331, 338, 339,
7395 171, 189, 309, 29, 123, 319, 433, 296, 299, 300,
7396 301, 303, 304, 306, 309, 431, 433, 434, 439, 441,
7397 171, 174, 340, 456, 340, 351, 353, 456, 155, 152,
7398 233, 124, 199, 365, 347, 351, 345, 352, 353, 112,
7399 356, 360, 364, 364, 218, 333, 456, 333, 455, 347,
7400 350, 354, 347, 350, 354, 56, 98, 153, 453, 171,
7401 163, 173, 289, 287, 40, 41, 284, 160, 158, 320,
7402 171, 426, 442, 155, 442, 155, 305, 309, 139, 298,
7403 155, 302, 305, 99, 266, 155, 305, 455, 155, 155,
7404 346, 455, 155, 155, 393, 455, 455, 455, 456, 456,
7405 456, 52, 56, 242, 52, 56, 369, 372, 335, 199,
7406 199, 52, 310, 311, 429, 174, 152, 299, 437, 301,
7407 303, 433, 439, 139, 266, 304, 439, 56, 98, 433,
7408 352, 354, 352, 351, 353, 456, 171, 155, 189, 284,
7409 442, 155, 305, 155, 305, 155, 305, 155, 305, 52,
7410 56, 305, 155, 457, 290, 336, 337, 311, 433, 433,
7411 439, 433, 305, 305, 155, 305, 305, 433, 305
7412};
7413
7414/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7415static const yytype_int16 yyr1[] =
7416{
7417 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7418 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7419 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7420 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7421 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7422 186, 186, 186, 186, 186, 186, 186, 185, 187, 187,
7423 185, 188, 188, 189, 189, 188, 190, 190, 190, 191,
7424 191, 191, 191, 191, 192, 191, 193, 191, 191, 194,
7425 195, 196, 197, 198, 199, 199, 200, 201, 202, 203,
7426 203, 204, 205, 206, 206, 207, 208, 209, 209, 209,
7427 209, 209, 209, 209, 209, 209, 209, 209, 209, 210,
7428 210, 211, 211, 212, 212, 212, 212, 212, 212, 212,
7429 212, 212, 212, 213, 213, 214, 214, 215, 215, 216,
7430 216, 216, 216, 216, 216, 216, 216, 216, 217, 217,
7431 217, 217, 217, 217, 217, 217, 217, 218, 218, 219,
7432 219, 219, 220, 220, 220, 220, 220, 221, 221, 222,
7433 223, 222, 224, 224, 224, 224, 224, 224, 224, 224,
7434 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7435 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7436 224, 224, 225, 225, 225, 225, 225, 225, 225, 225,
7437 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7438 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7439 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7440 225, 225, 225, 226, 227, 228, 228, 228, 228, 228,
7441 228, 228, 227, 227, 227, 227, 227, 227, 227, 227,
7442 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7443 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7444 227, 227, 227, 227, 227, 227, 227, 229, 229, 227,
7445 227, 230, 230, 230, 231, 231, 231, 231, 232, 232,
7446 233, 234, 235, 236, 237, 238, 238, 238, 238, 239,
7447 239, 240, 240, 240, 241, 241, 242, 242, 242, 242,
7448 242, 243, 244, 244, 244, 244, 244, 245, 246, 247,
7449 247, 248, 248, 249, 249, 249, 249, 250, 250, 251,
7450 251, 252, 252, 252, 253, 253, 253, 253, 253, 253,
7451 253, 253, 253, 253, 253, 254, 253, 255, 253, 253,
7452 253, 253, 253, 253, 253, 253, 253, 253, 253, 253,
7453 253, 253, 253, 253, 253, 253, 253, 253, 253, 256,
7454 253, 257, 253, 253, 258, 259, 253, 260, 253, 261,
7455 253, 262, 253, 263, 253, 264, 253, 253, 253, 253,
7456 253, 265, 266, 267, 268, 269, 270, 271, 272, 273,
7457 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
7458 284, 284, 285, 286, 287, 287, 287, 288, 288, 289,
7459 289, 290, 290, 291, 291, 292, 292, 293, 293, 294,
7460 294, 294, 294, 294, 295, 295, 296, 296, 297, 298,
7461 299, 299, 300, 300, 301, 301, 301, 301, 302, 303,
7462 304, 304, 305, 305, 306, 306, 306, 306, 306, 306,
7463 306, 306, 306, 306, 306, 306, 306, 306, 306, 307,
7464 307, 308, 308, 309, 309, 310, 310, 311, 311, 312,
7465 313, 314, 315, 316, 317, 318, 318, 319, 320, 319,
7466 321, 322, 322, 322, 322, 323, 323, 323, 323, 323,
7467 323, 323, 323, 323, 324, 324, 325, 326, 327, 328,
7468 329, 329, 329, 329, 330, 331, 331, 332, 333, 334,
7469 335, 336, 337, 337, 338, 338, 338, 339, 339, 339,
7470 339, 339, 339, 340, 341, 341, 342, 342, 343, 344,
7471 345, 345, 345, 345, 345, 345, 345, 345, 345, 345,
7472 345, 345, 345, 346, 345, 345, 345, 347, 347, 347,
7473 347, 347, 347, 348, 348, 349, 349, 350, 351, 351,
7474 352, 352, 353, 354, 354, 354, 354, 355, 355, 356,
7475 356, 357, 357, 358, 358, 359, 360, 360, 361, 361,
7476 361, 361, 361, 361, 361, 361, 361, 361, 362, 362,
7477 362, 362, 362, 362, 362, 362, 362, 362, 363, 364,
7478 365, 366, 366, 367, 368, 368, 368, 369, 369, 370,
7479 370, 370, 371, 371, 372, 372, 373, 373, 374, 375,
7480 375, 375, 376, 377, 378, 379, 379, 380, 381, 382,
7481 382, 383, 383, 384, 385, 386, 386, 387, 388, 389,
7482 390, 391, 391, 392, 392, 393, 393, 394, 394, 395,
7483 395, 396, 397, 396, 398, 399, 400, 396, 401, 401,
7484 402, 402, 403, 403, 404, 405, 405, 406, 407, 407,
7485 408, 408, 408, 408, 409, 409, 409, 410, 410, 410,
7486 411, 411, 411, 411, 411, 411, 411, 412, 412, 413,
7487 413, 414, 414, 415, 416, 416, 417, 417, 418, 419,
7488 420, 419, 421, 421, 422, 422, 423, 423, 423, 423,
7489 423, 424, 425, 425, 426, 426, 427, 427, 427, 427,
7490 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
7491 427, 428, 429, 429, 429, 429, 430, 430, 431, 432,
7492 432, 433, 433, 434, 435, 435, 436, 437, 437, 438,
7493 438, 439, 439, 440, 440, 441, 441, 442, 442, 443,
7494 444, 445, 444, 446, 446, 447, 447, 448, 448, 448,
7495 448, 448, 448, 449, 449, 449, 450, 450, 451, 451,
7496 451, 452, 452, 453, 453, 454, 454, 455, 456, 457,
7497 458, 458, 459, 459, 460, 460, 461
7498};
7499
7500/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7501static const yytype_int8 yyr2[] =
7502{
7503 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7504 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7505 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7506 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7507 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7508 4, 7, 6, 6, 6, 6, 4, 1, 4, 4,
7509 1, 1, 4, 0, 1, 3, 1, 4, 1, 1,
7510 3, 3, 3, 2, 0, 7, 0, 7, 1, 1,
7511 2, 0, 5, 1, 1, 1, 0, 0, 4, 1,
7512 1, 1, 1, 1, 4, 3, 1, 2, 3, 4,
7513 5, 4, 5, 6, 2, 2, 2, 2, 2, 1,
7514 3, 1, 3, 1, 2, 3, 5, 2, 4, 2,
7515 4, 1, 3, 1, 3, 2, 3, 1, 3, 1,
7516 1, 4, 3, 3, 3, 3, 2, 1, 1, 1,
7517 4, 3, 3, 3, 3, 2, 1, 1, 1, 2,
7518 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
7519 0, 4, 1, 1, 1, 1, 1, 1, 1, 1,
7520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7522 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7523 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7524 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7525 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7526 1, 1, 1, 4, 1, 4, 7, 6, 6, 6,
7527 6, 4, 1, 5, 3, 3, 2, 2, 2, 2,
7528 3, 3, 3, 3, 3, 3, 4, 2, 2, 3,
7529 3, 3, 3, 1, 3, 3, 3, 3, 3, 2,
7530 2, 3, 3, 3, 3, 4, 6, 4, 4, 1,
7531 1, 1, 4, 3, 1, 1, 1, 1, 3, 3,
7532 1, 1, 1, 1, 1, 1, 2, 4, 2, 1,
7533 4, 3, 5, 3, 1, 1, 1, 1, 2, 4,
7534 2, 1, 1, 2, 2, 4, 1, 0, 2, 2,
7535 1, 2, 1, 1, 1, 3, 3, 2, 1, 1,
7536 1, 3, 4, 2, 1, 1, 1, 1, 1, 1,
7537 1, 1, 1, 1, 1, 0, 4, 0, 4, 3,
7538 3, 2, 3, 3, 1, 4, 3, 1, 6, 4,
7539 3, 2, 1, 2, 1, 6, 6, 4, 4, 0,
7540 6, 0, 5, 5, 0, 0, 9, 0, 6, 0,
7541 7, 0, 5, 0, 5, 0, 5, 1, 1, 1,
7542 1, 1, 1, 1, 1, 1, 2, 2, 1, 2,
7543 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7544 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
7545 5, 1, 2, 1, 1, 1, 3, 1, 3, 1,
7546 3, 5, 1, 3, 2, 1, 1, 1, 0, 2,
7547 2, 1, 1, 3, 4, 2, 2, 1, 1, 3,
7548 1, 3, 2, 0, 6, 8, 4, 6, 4, 2,
7549 6, 2, 4, 6, 2, 4, 2, 4, 1, 1,
7550 1, 3, 4, 1, 4, 1, 3, 1, 1, 0,
7551 0, 0, 0, 0, 9, 4, 1, 3, 0, 4,
7552 3, 2, 4, 5, 5, 2, 4, 4, 3, 3,
7553 3, 2, 1, 4, 3, 3, 0, 7, 0, 7,
7554 1, 2, 3, 4, 5, 1, 1, 0, 0, 0,
7555 0, 9, 1, 1, 1, 3, 3, 1, 2, 3,
7556 1, 1, 1, 1, 3, 1, 3, 1, 2, 2,
7557 1, 1, 4, 4, 4, 3, 4, 4, 4, 3,
7558 3, 3, 2, 0, 6, 2, 4, 1, 1, 2,
7559 2, 4, 1, 2, 3, 1, 3, 5, 2, 1,
7560 1, 3, 1, 3, 1, 2, 1, 1, 3, 2,
7561 1, 1, 3, 2, 1, 2, 1, 1, 1, 3,
7562 3, 2, 2, 1, 1, 1, 2, 2, 1, 1,
7563 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7564 1, 2, 2, 4, 2, 3, 1, 6, 1, 1,
7565 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7566 1, 2, 3, 3, 3, 1, 2, 4, 1, 0,
7567 3, 1, 2, 4, 1, 0, 3, 4, 1, 4,
7568 1, 0, 3, 0, 3, 0, 2, 0, 2, 0,
7569 2, 1, 0, 3, 0, 0, 0, 6, 1, 1,
7570 1, 1, 1, 1, 2, 1, 1, 3, 1, 2,
7571 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7572 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7573 1, 1, 1, 0, 4, 0, 1, 1, 3, 1,
7574 0, 3, 2, 1, 1, 3, 4, 2, 2, 1,
7575 1, 3, 1, 3, 2, 0, 6, 8, 4, 6,
7576 4, 6, 2, 4, 6, 2, 4, 2, 4, 1,
7577 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7578 3, 1, 3, 1, 1, 1, 1, 2, 1, 1,
7579 1, 2, 1, 1, 1, 2, 1, 2, 1, 1,
7580 1, 0, 4, 1, 2, 1, 3, 3, 2, 1,
7581 4, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7582 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
7583 1, 1, 1, 1, 1, 2, 0
7584};
7585
7586
7587enum { YYENOMEM = -2 };
7588
7589#define yyerrok (yyerrstatus = 0)
7590#define yyclearin (yychar = YYEMPTY)
7591
7592#define YYACCEPT goto yyacceptlab
7593#define YYABORT goto yyabortlab
7594#define YYERROR goto yyerrorlab
7595#define YYNOMEM goto yyexhaustedlab
7596
7597
7598#define YYRECOVERING() (!!yyerrstatus)
7599
7600#define YYBACKUP(Token, Value) \
7601 do \
7602 if (yychar == YYEMPTY) \
7603 { \
7604 yychar = (Token); \
7605 yylval = (Value); \
7606 YYPOPSTACK (yylen); \
7607 yystate = *yyssp; \
7608 goto yybackup; \
7609 } \
7610 else \
7611 { \
7612 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7613 YYERROR; \
7614 } \
7615 while (0)
7616
7617/* Backward compatibility with an undocumented macro.
7618 Use YYerror or YYUNDEF. */
7619#define YYERRCODE YYUNDEF
7620
7621/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7622 If N is 0, then set CURRENT to the empty location which ends
7623 the previous symbol: RHS[0] (always defined). */
7624
7625#ifndef YYLLOC_DEFAULT
7626# define YYLLOC_DEFAULT(Current, Rhs, N) \
7627 do \
7628 if (N) \
7629 { \
7630 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7631 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7632 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7633 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7634 } \
7635 else \
7636 { \
7637 (Current).first_line = (Current).last_line = \
7638 YYRHSLOC (Rhs, 0).last_line; \
7639 (Current).first_column = (Current).last_column = \
7640 YYRHSLOC (Rhs, 0).last_column; \
7641 } \
7642 while (0)
7643#endif
7644
7645#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7646
7647
7648/* Enable debugging if requested. */
7649#if YYDEBUG
7650
7651# ifndef YYFPRINTF
7652# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7653# define YYFPRINTF fprintf
7654# endif
7655
7656# define YYDPRINTF(Args) \
7657do { \
7658 if (yydebug) \
7659 YYFPRINTF Args; \
7660} while (0)
7661
7662
7663/* YYLOCATION_PRINT -- Print the location on the stream.
7664 This macro was not mandated originally: define only if we know
7665 we won't break user code: when these are the locations we know. */
7666
7667# ifndef YYLOCATION_PRINT
7668
7669# if defined YY_LOCATION_PRINT
7670
7671 /* Temporary convenience wrapper in case some people defined the
7672 undocumented and private YY_LOCATION_PRINT macros. */
7673# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7674
7675# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7676
7677/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7678
7679YY_ATTRIBUTE_UNUSED
7680static int
7681yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7682{
7683 int res = 0;
7684 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7685 if (0 <= yylocp->first_line)
7686 {
7687 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7688 if (0 <= yylocp->first_column)
7689 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7690 }
7691 if (0 <= yylocp->last_line)
7692 {
7693 if (yylocp->first_line < yylocp->last_line)
7694 {
7695 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7696 if (0 <= end_col)
7697 res += YYFPRINTF (yyo, ".%d", end_col);
7698 }
7699 else if (0 <= end_col && yylocp->first_column < end_col)
7700 res += YYFPRINTF (yyo, "-%d", end_col);
7701 }
7702 return res;
7703}
7704
7705# define YYLOCATION_PRINT yy_location_print_
7706
7707 /* Temporary convenience wrapper in case some people defined the
7708 undocumented and private YY_LOCATION_PRINT macros. */
7709# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7710
7711# else
7712
7713# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7714 /* Temporary convenience wrapper in case some people defined the
7715 undocumented and private YY_LOCATION_PRINT macros. */
7716# define YY_LOCATION_PRINT YYLOCATION_PRINT
7717
7718# endif
7719# endif /* !defined YYLOCATION_PRINT */
7720
7721
7722# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7723do { \
7724 if (yydebug) \
7725 { \
7726 YYFPRINTF (stderr, "%s ", Title); \
7727 yy_symbol_print (stderr, \
7728 Kind, Value, Location, p); \
7729 YYFPRINTF (stderr, "\n"); \
7730 } \
7731} while (0)
7732
7733
7734/*-----------------------------------.
7735| Print this symbol's value on YYO. |
7736`-----------------------------------*/
7737
7738static void
7739yy_symbol_value_print (FILE *yyo,
7740 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7741{
7742 FILE *yyoutput = yyo;
7743 YY_USE (yyoutput);
7744 YY_USE (yylocationp);
7745 YY_USE (p);
7746 if (!yyvaluep)
7747 return;
7748 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7749switch (yykind)
7750 {
7751 case YYSYMBOL_keyword_class: /* "'class'" */
7752#line 2625 "parse.y"
7753 {
7754 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7755}
7756#line 7757 "parse.c"
7757 break;
7758
7759 case YYSYMBOL_keyword_module: /* "'module'" */
7760#line 2625 "parse.y"
7761 {
7762 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7763}
7764#line 7765 "parse.c"
7765 break;
7766
7767 case YYSYMBOL_keyword_def: /* "'def'" */
7768#line 2625 "parse.y"
7769 {
7770 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7771}
7772#line 7773 "parse.c"
7773 break;
7774
7775 case YYSYMBOL_keyword_undef: /* "'undef'" */
7776#line 2625 "parse.y"
7777 {
7778 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7779}
7780#line 7781 "parse.c"
7781 break;
7782
7783 case YYSYMBOL_keyword_begin: /* "'begin'" */
7784#line 2625 "parse.y"
7785 {
7786 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7787}
7788#line 7789 "parse.c"
7789 break;
7790
7791 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
7792#line 2625 "parse.y"
7793 {
7794 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7795}
7796#line 7797 "parse.c"
7797 break;
7798
7799 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
7800#line 2625 "parse.y"
7801 {
7802 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7803}
7804#line 7805 "parse.c"
7805 break;
7806
7807 case YYSYMBOL_keyword_end: /* "'end'" */
7808#line 2625 "parse.y"
7809 {
7810 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7811}
7812#line 7813 "parse.c"
7813 break;
7814
7815 case YYSYMBOL_keyword_if: /* "'if'" */
7816#line 2625 "parse.y"
7817 {
7818 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7819}
7820#line 7821 "parse.c"
7821 break;
7822
7823 case YYSYMBOL_keyword_unless: /* "'unless'" */
7824#line 2625 "parse.y"
7825 {
7826 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7827}
7828#line 7829 "parse.c"
7829 break;
7830
7831 case YYSYMBOL_keyword_then: /* "'then'" */
7832#line 2625 "parse.y"
7833 {
7834 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7835}
7836#line 7837 "parse.c"
7837 break;
7838
7839 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
7840#line 2625 "parse.y"
7841 {
7842 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7843}
7844#line 7845 "parse.c"
7845 break;
7846
7847 case YYSYMBOL_keyword_else: /* "'else'" */
7848#line 2625 "parse.y"
7849 {
7850 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7851}
7852#line 7853 "parse.c"
7853 break;
7854
7855 case YYSYMBOL_keyword_case: /* "'case'" */
7856#line 2625 "parse.y"
7857 {
7858 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7859}
7860#line 7861 "parse.c"
7861 break;
7862
7863 case YYSYMBOL_keyword_when: /* "'when'" */
7864#line 2625 "parse.y"
7865 {
7866 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7867}
7868#line 7869 "parse.c"
7869 break;
7870
7871 case YYSYMBOL_keyword_while: /* "'while'" */
7872#line 2625 "parse.y"
7873 {
7874 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7875}
7876#line 7877 "parse.c"
7877 break;
7878
7879 case YYSYMBOL_keyword_until: /* "'until'" */
7880#line 2625 "parse.y"
7881 {
7882 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7883}
7884#line 7885 "parse.c"
7885 break;
7886
7887 case YYSYMBOL_keyword_for: /* "'for'" */
7888#line 2625 "parse.y"
7889 {
7890 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7891}
7892#line 7893 "parse.c"
7893 break;
7894
7895 case YYSYMBOL_keyword_break: /* "'break'" */
7896#line 2625 "parse.y"
7897 {
7898 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7899}
7900#line 7901 "parse.c"
7901 break;
7902
7903 case YYSYMBOL_keyword_next: /* "'next'" */
7904#line 2625 "parse.y"
7905 {
7906 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7907}
7908#line 7909 "parse.c"
7909 break;
7910
7911 case YYSYMBOL_keyword_redo: /* "'redo'" */
7912#line 2625 "parse.y"
7913 {
7914 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7915}
7916#line 7917 "parse.c"
7917 break;
7918
7919 case YYSYMBOL_keyword_retry: /* "'retry'" */
7920#line 2625 "parse.y"
7921 {
7922 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7923}
7924#line 7925 "parse.c"
7925 break;
7926
7927 case YYSYMBOL_keyword_in: /* "'in'" */
7928#line 2625 "parse.y"
7929 {
7930 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7931}
7932#line 7933 "parse.c"
7933 break;
7934
7935 case YYSYMBOL_keyword_do: /* "'do'" */
7936#line 2625 "parse.y"
7937 {
7938 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7939}
7940#line 7941 "parse.c"
7941 break;
7942
7943 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
7944#line 2625 "parse.y"
7945 {
7946 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7947}
7948#line 7949 "parse.c"
7949 break;
7950
7951 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
7952#line 2625 "parse.y"
7953 {
7954 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7955}
7956#line 7957 "parse.c"
7957 break;
7958
7959 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
7960#line 2625 "parse.y"
7961 {
7962 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7963}
7964#line 7965 "parse.c"
7965 break;
7966
7967 case YYSYMBOL_keyword_return: /* "'return'" */
7968#line 2625 "parse.y"
7969 {
7970 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7971}
7972#line 7973 "parse.c"
7973 break;
7974
7975 case YYSYMBOL_keyword_yield: /* "'yield'" */
7976#line 2625 "parse.y"
7977 {
7978 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7979}
7980#line 7981 "parse.c"
7981 break;
7982
7983 case YYSYMBOL_keyword_super: /* "'super'" */
7984#line 2625 "parse.y"
7985 {
7986 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7987}
7988#line 7989 "parse.c"
7989 break;
7990
7991 case YYSYMBOL_keyword_self: /* "'self'" */
7992#line 2625 "parse.y"
7993 {
7994 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7995}
7996#line 7997 "parse.c"
7997 break;
7998
7999 case YYSYMBOL_keyword_nil: /* "'nil'" */
8000#line 2625 "parse.y"
8001 {
8002 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8003}
8004#line 8005 "parse.c"
8005 break;
8006
8007 case YYSYMBOL_keyword_true: /* "'true'" */
8008#line 2625 "parse.y"
8009 {
8010 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8011}
8012#line 8013 "parse.c"
8013 break;
8014
8015 case YYSYMBOL_keyword_false: /* "'false'" */
8016#line 2625 "parse.y"
8017 {
8018 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8019}
8020#line 8021 "parse.c"
8021 break;
8022
8023 case YYSYMBOL_keyword_and: /* "'and'" */
8024#line 2625 "parse.y"
8025 {
8026 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8027}
8028#line 8029 "parse.c"
8029 break;
8030
8031 case YYSYMBOL_keyword_or: /* "'or'" */
8032#line 2625 "parse.y"
8033 {
8034 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8035}
8036#line 8037 "parse.c"
8037 break;
8038
8039 case YYSYMBOL_keyword_not: /* "'not'" */
8040#line 2625 "parse.y"
8041 {
8042 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8043}
8044#line 8045 "parse.c"
8045 break;
8046
8047 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8048#line 2625 "parse.y"
8049 {
8050 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8051}
8052#line 8053 "parse.c"
8053 break;
8054
8055 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8056#line 2625 "parse.y"
8057 {
8058 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8059}
8060#line 8061 "parse.c"
8061 break;
8062
8063 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8064#line 2625 "parse.y"
8065 {
8066 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8067}
8068#line 8069 "parse.c"
8069 break;
8070
8071 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8072#line 2625 "parse.y"
8073 {
8074 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8075}
8076#line 8077 "parse.c"
8077 break;
8078
8079 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8080#line 2625 "parse.y"
8081 {
8082 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8083}
8084#line 8085 "parse.c"
8085 break;
8086
8087 case YYSYMBOL_keyword_alias: /* "'alias'" */
8088#line 2625 "parse.y"
8089 {
8090 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8091}
8092#line 8093 "parse.c"
8093 break;
8094
8095 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8096#line 2625 "parse.y"
8097 {
8098 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8099}
8100#line 8101 "parse.c"
8101 break;
8102
8103 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8104#line 2625 "parse.y"
8105 {
8106 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8107}
8108#line 8109 "parse.c"
8109 break;
8110
8111 case YYSYMBOL_keyword_END: /* "'END'" */
8112#line 2625 "parse.y"
8113 {
8114 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8115}
8116#line 8117 "parse.c"
8117 break;
8118
8119 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8120#line 2625 "parse.y"
8121 {
8122 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8123}
8124#line 8125 "parse.c"
8125 break;
8126
8127 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8128#line 2625 "parse.y"
8129 {
8130 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8131}
8132#line 8133 "parse.c"
8133 break;
8134
8135 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8136#line 2625 "parse.y"
8137 {
8138 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8139}
8140#line 8141 "parse.c"
8141 break;
8142
8143 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8144#line 2625 "parse.y"
8145 {
8146 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8147}
8148#line 8149 "parse.c"
8149 break;
8150
8151 case YYSYMBOL_tFID: /* "method" */
8152#line 2625 "parse.y"
8153 {
8154 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8155}
8156#line 8157 "parse.c"
8157 break;
8158
8159 case YYSYMBOL_tGVAR: /* "global variable" */
8160#line 2625 "parse.y"
8161 {
8162 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8163}
8164#line 8165 "parse.c"
8165 break;
8166
8167 case YYSYMBOL_tIVAR: /* "instance variable" */
8168#line 2625 "parse.y"
8169 {
8170 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8171}
8172#line 8173 "parse.c"
8173 break;
8174
8175 case YYSYMBOL_tCONSTANT: /* "constant" */
8176#line 2625 "parse.y"
8177 {
8178 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8179}
8180#line 8181 "parse.c"
8181 break;
8182
8183 case YYSYMBOL_tCVAR: /* "class variable" */
8184#line 2625 "parse.y"
8185 {
8186 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8187}
8188#line 8189 "parse.c"
8189 break;
8190
8191 case YYSYMBOL_tLABEL: /* "label" */
8192#line 2625 "parse.y"
8193 {
8194 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8195}
8196#line 8197 "parse.c"
8197 break;
8198
8199 case YYSYMBOL_tINTEGER: /* "integer literal" */
8200#line 2628 "parse.y"
8201 {
8202 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8203 case NODE_INTEGER:
8204 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8205 break;
8206 case NODE_FLOAT:
8207 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8208 break;
8209 case NODE_RATIONAL:
8210 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8211 break;
8212 case NODE_IMAGINARY:
8213 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8214 break;
8215 default:
8216 break;
8217 }
8218}
8219#line 8220 "parse.c"
8220 break;
8221
8222 case YYSYMBOL_tFLOAT: /* "float literal" */
8223#line 2628 "parse.y"
8224 {
8225 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8226 case NODE_INTEGER:
8227 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8228 break;
8229 case NODE_FLOAT:
8230 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8231 break;
8232 case NODE_RATIONAL:
8233 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8234 break;
8235 case NODE_IMAGINARY:
8236 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8237 break;
8238 default:
8239 break;
8240 }
8241}
8242#line 8243 "parse.c"
8243 break;
8244
8245 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8246#line 2628 "parse.y"
8247 {
8248 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8249 case NODE_INTEGER:
8250 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8251 break;
8252 case NODE_FLOAT:
8253 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8254 break;
8255 case NODE_RATIONAL:
8256 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8257 break;
8258 case NODE_IMAGINARY:
8259 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8260 break;
8261 default:
8262 break;
8263 }
8264}
8265#line 8266 "parse.c"
8266 break;
8267
8268 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8269#line 2628 "parse.y"
8270 {
8271 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8272 case NODE_INTEGER:
8273 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8274 break;
8275 case NODE_FLOAT:
8276 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8277 break;
8278 case NODE_RATIONAL:
8279 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8280 break;
8281 case NODE_IMAGINARY:
8282 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8283 break;
8284 default:
8285 break;
8286 }
8287}
8288#line 8289 "parse.c"
8289 break;
8290
8291 case YYSYMBOL_tCHAR: /* "char literal" */
8292#line 2628 "parse.y"
8293 {
8294 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8295 case NODE_INTEGER:
8296 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8297 break;
8298 case NODE_FLOAT:
8299 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8300 break;
8301 case NODE_RATIONAL:
8302 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8303 break;
8304 case NODE_IMAGINARY:
8305 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8306 break;
8307 default:
8308 break;
8309 }
8310}
8311#line 8312 "parse.c"
8312 break;
8313
8314 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8315#line 2646 "parse.y"
8316 {
8317 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8318}
8319#line 8320 "parse.c"
8320 break;
8321
8322 case YYSYMBOL_tBACK_REF: /* "back reference" */
8323#line 2649 "parse.y"
8324 {
8325 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8326}
8327#line 8328 "parse.c"
8328 break;
8329
8330 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8331#line 2628 "parse.y"
8332 {
8333 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8334 case NODE_INTEGER:
8335 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8336 break;
8337 case NODE_FLOAT:
8338 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8339 break;
8340 case NODE_RATIONAL:
8341 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8342 break;
8343 case NODE_IMAGINARY:
8344 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8345 break;
8346 default:
8347 break;
8348 }
8349}
8350#line 8351 "parse.c"
8351 break;
8352
8353 case YYSYMBOL_69_: /* '.' */
8354#line 2625 "parse.y"
8355 {
8356 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8357}
8358#line 8359 "parse.c"
8359 break;
8360
8361 case YYSYMBOL_70_backslash_: /* "backslash" */
8362#line 2625 "parse.y"
8363 {
8364 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8365}
8366#line 8367 "parse.c"
8367 break;
8368
8369 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8370#line 2625 "parse.y"
8371 {
8372 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8373}
8374#line 8375 "parse.c"
8375 break;
8376
8377 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8378#line 2625 "parse.y"
8379 {
8380 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8381}
8382#line 8383 "parse.c"
8383 break;
8384
8385 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8386#line 2625 "parse.y"
8387 {
8388 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8389}
8390#line 8391 "parse.c"
8391 break;
8392
8393 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8394#line 2625 "parse.y"
8395 {
8396 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8397}
8398#line 8399 "parse.c"
8399 break;
8400
8401 case YYSYMBOL_tANDDOT: /* "&." */
8402#line 2625 "parse.y"
8403 {
8404 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8405}
8406#line 8407 "parse.c"
8407 break;
8408
8409 case YYSYMBOL_tCOLON2: /* "::" */
8410#line 2625 "parse.y"
8411 {
8412 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8413}
8414#line 8415 "parse.c"
8415 break;
8416
8417 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8418#line 2625 "parse.y"
8419 {
8420 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8421}
8422#line 8423 "parse.c"
8423 break;
8424
8425 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8426#line 2616 "parse.y"
8427 {
8428 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8429 rb_parser_printf(p, "NODE_SPECIAL");
8430 }
8431 else if (((*yyvaluep).node)) {
8432 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8433 }
8434}
8435#line 8436 "parse.c"
8436 break;
8437
8438 case YYSYMBOL_top_stmts: /* top_stmts */
8439#line 2616 "parse.y"
8440 {
8441 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8442 rb_parser_printf(p, "NODE_SPECIAL");
8443 }
8444 else if (((*yyvaluep).node)) {
8445 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8446 }
8447}
8448#line 8449 "parse.c"
8449 break;
8450
8451 case YYSYMBOL_top_stmt: /* top_stmt */
8452#line 2616 "parse.y"
8453 {
8454 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8455 rb_parser_printf(p, "NODE_SPECIAL");
8456 }
8457 else if (((*yyvaluep).node)) {
8458 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8459 }
8460}
8461#line 8462 "parse.c"
8462 break;
8463
8464 case YYSYMBOL_block_open: /* block_open */
8465#line 2616 "parse.y"
8466 {
8467 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8468 rb_parser_printf(p, "NODE_SPECIAL");
8469 }
8470 else if (((*yyvaluep).node_exits)) {
8471 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8472 }
8473}
8474#line 8475 "parse.c"
8475 break;
8476
8477 case YYSYMBOL_begin_block: /* begin_block */
8478#line 2616 "parse.y"
8479 {
8480 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8481 rb_parser_printf(p, "NODE_SPECIAL");
8482 }
8483 else if (((*yyvaluep).node)) {
8484 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8485 }
8486}
8487#line 8488 "parse.c"
8488 break;
8489
8490 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8491#line 2616 "parse.y"
8492 {
8493 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8494 rb_parser_printf(p, "NODE_SPECIAL");
8495 }
8496 else if (((*yyvaluep).node)) {
8497 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8498 }
8499}
8500#line 8501 "parse.c"
8501 break;
8502
8503 case YYSYMBOL_bodystmt: /* bodystmt */
8504#line 2616 "parse.y"
8505 {
8506 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8507 rb_parser_printf(p, "NODE_SPECIAL");
8508 }
8509 else if (((*yyvaluep).node)) {
8510 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8511 }
8512}
8513#line 8514 "parse.c"
8514 break;
8515
8516 case YYSYMBOL_stmts: /* stmts */
8517#line 2616 "parse.y"
8518 {
8519 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8520 rb_parser_printf(p, "NODE_SPECIAL");
8521 }
8522 else if (((*yyvaluep).node)) {
8523 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8524 }
8525}
8526#line 8527 "parse.c"
8527 break;
8528
8529 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8530#line 2616 "parse.y"
8531 {
8532 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8533 rb_parser_printf(p, "NODE_SPECIAL");
8534 }
8535 else if (((*yyvaluep).node)) {
8536 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8537 }
8538}
8539#line 8540 "parse.c"
8540 break;
8541
8542 case YYSYMBOL_allow_exits: /* allow_exits */
8543#line 2616 "parse.y"
8544 {
8545 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8546 rb_parser_printf(p, "NODE_SPECIAL");
8547 }
8548 else if (((*yyvaluep).node_exits)) {
8549 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8550 }
8551}
8552#line 8553 "parse.c"
8553 break;
8554
8555 case YYSYMBOL_stmt: /* stmt */
8556#line 2616 "parse.y"
8557 {
8558 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8559 rb_parser_printf(p, "NODE_SPECIAL");
8560 }
8561 else if (((*yyvaluep).node)) {
8562 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8563 }
8564}
8565#line 8566 "parse.c"
8566 break;
8567
8568 case YYSYMBOL_asgn_lhs_mrhs: /* asgn_lhs_mrhs */
8569#line 2616 "parse.y"
8570 {
8571 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8572 rb_parser_printf(p, "NODE_SPECIAL");
8573 }
8574 else if (((*yyvaluep).node)) {
8575 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8576 }
8577}
8578#line 8579 "parse.c"
8579 break;
8580
8581 case YYSYMBOL_asgn_lhs_command_rhs: /* asgn_lhs_command_rhs */
8582#line 2616 "parse.y"
8583 {
8584 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8585 rb_parser_printf(p, "NODE_SPECIAL");
8586 }
8587 else if (((*yyvaluep).node)) {
8588 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8589 }
8590}
8591#line 8592 "parse.c"
8592 break;
8593
8594 case YYSYMBOL_command_asgn: /* command_asgn */
8595#line 2616 "parse.y"
8596 {
8597 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8598 rb_parser_printf(p, "NODE_SPECIAL");
8599 }
8600 else if (((*yyvaluep).node)) {
8601 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8602 }
8603}
8604#line 8605 "parse.c"
8605 break;
8606
8607 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8608#line 2616 "parse.y"
8609 {
8610 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8611 rb_parser_printf(p, "NODE_SPECIAL");
8612 }
8613 else if (((*yyvaluep).node)) {
8614 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8615 }
8616}
8617#line 8618 "parse.c"
8618 break;
8619
8620 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8621#line 2616 "parse.y"
8622 {
8623 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8624 rb_parser_printf(p, "NODE_SPECIAL");
8625 }
8626 else if (((*yyvaluep).node)) {
8627 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8628 }
8629}
8630#line 8631 "parse.c"
8631 break;
8632
8633 case YYSYMBOL_endless_command: /* endless_command */
8634#line 2616 "parse.y"
8635 {
8636 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8637 rb_parser_printf(p, "NODE_SPECIAL");
8638 }
8639 else if (((*yyvaluep).node)) {
8640 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8641 }
8642}
8643#line 8644 "parse.c"
8644 break;
8645
8646 case YYSYMBOL_command_rhs: /* command_rhs */
8647#line 2616 "parse.y"
8648 {
8649 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8650 rb_parser_printf(p, "NODE_SPECIAL");
8651 }
8652 else if (((*yyvaluep).node)) {
8653 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8654 }
8655}
8656#line 8657 "parse.c"
8657 break;
8658
8659 case YYSYMBOL_expr: /* expr */
8660#line 2616 "parse.y"
8661 {
8662 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8663 rb_parser_printf(p, "NODE_SPECIAL");
8664 }
8665 else if (((*yyvaluep).node)) {
8666 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8667 }
8668}
8669#line 8670 "parse.c"
8670 break;
8671
8672 case YYSYMBOL_def_name: /* def_name */
8673#line 2625 "parse.y"
8674 {
8675 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8676}
8677#line 8678 "parse.c"
8678 break;
8679
8680 case YYSYMBOL_defn_head: /* defn_head */
8681#line 2616 "parse.y"
8682 {
8683 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8684 rb_parser_printf(p, "NODE_SPECIAL");
8685 }
8686 else if (((*yyvaluep).node_def_temp)) {
8687 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8688 }
8689}
8690#line 8691 "parse.c"
8691 break;
8692
8693 case YYSYMBOL_defs_head: /* defs_head */
8694#line 2616 "parse.y"
8695 {
8696 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8697 rb_parser_printf(p, "NODE_SPECIAL");
8698 }
8699 else if (((*yyvaluep).node_def_temp)) {
8700 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8701 }
8702}
8703#line 8704 "parse.c"
8704 break;
8705
8706 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8707#line 2616 "parse.y"
8708 {
8709 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8710 rb_parser_printf(p, "NODE_SPECIAL");
8711 }
8712 else if (((*yyvaluep).node)) {
8713 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8714 }
8715}
8716#line 8717 "parse.c"
8717 break;
8718
8719 case YYSYMBOL_expr_value: /* expr_value */
8720#line 2616 "parse.y"
8721 {
8722 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8723 rb_parser_printf(p, "NODE_SPECIAL");
8724 }
8725 else if (((*yyvaluep).node)) {
8726 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8727 }
8728}
8729#line 8730 "parse.c"
8730 break;
8731
8732 case YYSYMBOL_expr_value_do: /* expr_value_do */
8733#line 2616 "parse.y"
8734 {
8735 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8736 rb_parser_printf(p, "NODE_SPECIAL");
8737 }
8738 else if (((*yyvaluep).node)) {
8739 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8740 }
8741}
8742#line 8743 "parse.c"
8743 break;
8744
8745 case YYSYMBOL_command_call: /* command_call */
8746#line 2616 "parse.y"
8747 {
8748 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8749 rb_parser_printf(p, "NODE_SPECIAL");
8750 }
8751 else if (((*yyvaluep).node)) {
8752 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8753 }
8754}
8755#line 8756 "parse.c"
8756 break;
8757
8758 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
8759#line 2616 "parse.y"
8760 {
8761 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8762 rb_parser_printf(p, "NODE_SPECIAL");
8763 }
8764 else if (((*yyvaluep).node)) {
8765 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8766 }
8767}
8768#line 8769 "parse.c"
8769 break;
8770
8771 case YYSYMBOL_command_call_value: /* command_call_value */
8772#line 2616 "parse.y"
8773 {
8774 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8775 rb_parser_printf(p, "NODE_SPECIAL");
8776 }
8777 else if (((*yyvaluep).node)) {
8778 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8779 }
8780}
8781#line 8782 "parse.c"
8782 break;
8783
8784 case YYSYMBOL_block_command: /* block_command */
8785#line 2616 "parse.y"
8786 {
8787 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8788 rb_parser_printf(p, "NODE_SPECIAL");
8789 }
8790 else if (((*yyvaluep).node)) {
8791 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8792 }
8793}
8794#line 8795 "parse.c"
8795 break;
8796
8797 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
8798#line 2616 "parse.y"
8799 {
8800 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8801 rb_parser_printf(p, "NODE_SPECIAL");
8802 }
8803 else if (((*yyvaluep).node)) {
8804 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8805 }
8806}
8807#line 8808 "parse.c"
8808 break;
8809
8810 case YYSYMBOL_fcall: /* fcall */
8811#line 2616 "parse.y"
8812 {
8813 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8814 rb_parser_printf(p, "NODE_SPECIAL");
8815 }
8816 else if (((*yyvaluep).node_fcall)) {
8817 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8818 }
8819}
8820#line 8821 "parse.c"
8821 break;
8822
8823 case YYSYMBOL_command: /* command */
8824#line 2616 "parse.y"
8825 {
8826 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8827 rb_parser_printf(p, "NODE_SPECIAL");
8828 }
8829 else if (((*yyvaluep).node)) {
8830 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8831 }
8832}
8833#line 8834 "parse.c"
8834 break;
8835
8836 case YYSYMBOL_mlhs: /* mlhs */
8837#line 2616 "parse.y"
8838 {
8839 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8840 rb_parser_printf(p, "NODE_SPECIAL");
8841 }
8842 else if (((*yyvaluep).node_masgn)) {
8843 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8844 }
8845}
8846#line 8847 "parse.c"
8847 break;
8848
8849 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
8850#line 2616 "parse.y"
8851 {
8852 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8853 rb_parser_printf(p, "NODE_SPECIAL");
8854 }
8855 else if (((*yyvaluep).node_masgn)) {
8856 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8857 }
8858}
8859#line 8860 "parse.c"
8860 break;
8861
8862 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
8863#line 2616 "parse.y"
8864 {
8865 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8866 rb_parser_printf(p, "NODE_SPECIAL");
8867 }
8868 else if (((*yyvaluep).node_masgn)) {
8869 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8870 }
8871}
8872#line 8873 "parse.c"
8873 break;
8874
8875 case YYSYMBOL_mlhs_item: /* mlhs_item */
8876#line 2616 "parse.y"
8877 {
8878 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8879 rb_parser_printf(p, "NODE_SPECIAL");
8880 }
8881 else if (((*yyvaluep).node)) {
8882 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8883 }
8884}
8885#line 8886 "parse.c"
8886 break;
8887
8888 case YYSYMBOL_mlhs_head: /* mlhs_head */
8889#line 2616 "parse.y"
8890 {
8891 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8892 rb_parser_printf(p, "NODE_SPECIAL");
8893 }
8894 else if (((*yyvaluep).node)) {
8895 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8896 }
8897}
8898#line 8899 "parse.c"
8899 break;
8900
8901 case YYSYMBOL_mlhs_post: /* mlhs_post */
8902#line 2616 "parse.y"
8903 {
8904 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8905 rb_parser_printf(p, "NODE_SPECIAL");
8906 }
8907 else if (((*yyvaluep).node)) {
8908 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8909 }
8910}
8911#line 8912 "parse.c"
8912 break;
8913
8914 case YYSYMBOL_mlhs_node: /* mlhs_node */
8915#line 2616 "parse.y"
8916 {
8917 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8918 rb_parser_printf(p, "NODE_SPECIAL");
8919 }
8920 else if (((*yyvaluep).node)) {
8921 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8922 }
8923}
8924#line 8925 "parse.c"
8925 break;
8926
8927 case YYSYMBOL_lhs: /* lhs */
8928#line 2616 "parse.y"
8929 {
8930 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8931 rb_parser_printf(p, "NODE_SPECIAL");
8932 }
8933 else if (((*yyvaluep).node)) {
8934 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8935 }
8936}
8937#line 8938 "parse.c"
8938 break;
8939
8940 case YYSYMBOL_cname: /* cname */
8941#line 2625 "parse.y"
8942 {
8943 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8944}
8945#line 8946 "parse.c"
8946 break;
8947
8948 case YYSYMBOL_cpath: /* cpath */
8949#line 2616 "parse.y"
8950 {
8951 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8952 rb_parser_printf(p, "NODE_SPECIAL");
8953 }
8954 else if (((*yyvaluep).node)) {
8955 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8956 }
8957}
8958#line 8959 "parse.c"
8959 break;
8960
8961 case YYSYMBOL_fname: /* fname */
8962#line 2625 "parse.y"
8963 {
8964 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8965}
8966#line 8967 "parse.c"
8967 break;
8968
8969 case YYSYMBOL_fitem: /* fitem */
8970#line 2616 "parse.y"
8971 {
8972 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8973 rb_parser_printf(p, "NODE_SPECIAL");
8974 }
8975 else if (((*yyvaluep).node)) {
8976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8977 }
8978}
8979#line 8980 "parse.c"
8980 break;
8981
8982 case YYSYMBOL_undef_list: /* undef_list */
8983#line 2616 "parse.y"
8984 {
8985 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8986 rb_parser_printf(p, "NODE_SPECIAL");
8987 }
8988 else if (((*yyvaluep).node)) {
8989 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8990 }
8991}
8992#line 8993 "parse.c"
8993 break;
8994
8995 case YYSYMBOL_op: /* op */
8996#line 2625 "parse.y"
8997 {
8998 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8999}
9000#line 9001 "parse.c"
9001 break;
9002
9003 case YYSYMBOL_reswords: /* reswords */
9004#line 2625 "parse.y"
9005 {
9006 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9007}
9008#line 9009 "parse.c"
9009 break;
9010
9011 case YYSYMBOL_asgn_lhs_arg_rhs: /* asgn_lhs_arg_rhs */
9012#line 2616 "parse.y"
9013 {
9014 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9015 rb_parser_printf(p, "NODE_SPECIAL");
9016 }
9017 else if (((*yyvaluep).node)) {
9018 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9019 }
9020}
9021#line 9022 "parse.c"
9022 break;
9023
9024 case YYSYMBOL_arg: /* arg */
9025#line 2616 "parse.y"
9026 {
9027 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9028 rb_parser_printf(p, "NODE_SPECIAL");
9029 }
9030 else if (((*yyvaluep).node)) {
9031 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9032 }
9033}
9034#line 9035 "parse.c"
9035 break;
9036
9037 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9038#line 2616 "parse.y"
9039 {
9040 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9041 rb_parser_printf(p, "NODE_SPECIAL");
9042 }
9043 else if (((*yyvaluep).node)) {
9044 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9045 }
9046}
9047#line 9048 "parse.c"
9048 break;
9049
9050 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9051#line 2616 "parse.y"
9052 {
9053 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9054 rb_parser_printf(p, "NODE_SPECIAL");
9055 }
9056 else if (((*yyvaluep).node)) {
9057 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9058 }
9059}
9060#line 9061 "parse.c"
9061 break;
9062
9063 case YYSYMBOL_endless_arg: /* endless_arg */
9064#line 2616 "parse.y"
9065 {
9066 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9067 rb_parser_printf(p, "NODE_SPECIAL");
9068 }
9069 else if (((*yyvaluep).node)) {
9070 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9071 }
9072}
9073#line 9074 "parse.c"
9074 break;
9075
9076 case YYSYMBOL_relop: /* relop */
9077#line 2625 "parse.y"
9078 {
9079 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9080}
9081#line 9082 "parse.c"
9082 break;
9083
9084 case YYSYMBOL_rel_expr: /* rel_expr */
9085#line 2616 "parse.y"
9086 {
9087 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9088 rb_parser_printf(p, "NODE_SPECIAL");
9089 }
9090 else if (((*yyvaluep).node)) {
9091 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9092 }
9093}
9094#line 9095 "parse.c"
9095 break;
9096
9097 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9098#line 2616 "parse.y"
9099 {
9100 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9101 rb_parser_printf(p, "NODE_SPECIAL");
9102 }
9103 else if (((*yyvaluep).node)) {
9104 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9105 }
9106}
9107#line 9108 "parse.c"
9108 break;
9109
9110 case YYSYMBOL_arg_value: /* arg_value */
9111#line 2616 "parse.y"
9112 {
9113 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9114 rb_parser_printf(p, "NODE_SPECIAL");
9115 }
9116 else if (((*yyvaluep).node)) {
9117 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9118 }
9119}
9120#line 9121 "parse.c"
9121 break;
9122
9123 case YYSYMBOL_aref_args: /* aref_args */
9124#line 2616 "parse.y"
9125 {
9126 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9127 rb_parser_printf(p, "NODE_SPECIAL");
9128 }
9129 else if (((*yyvaluep).node)) {
9130 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9131 }
9132}
9133#line 9134 "parse.c"
9134 break;
9135
9136 case YYSYMBOL_arg_rhs: /* arg_rhs */
9137#line 2616 "parse.y"
9138 {
9139 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9140 rb_parser_printf(p, "NODE_SPECIAL");
9141 }
9142 else if (((*yyvaluep).node)) {
9143 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9144 }
9145}
9146#line 9147 "parse.c"
9147 break;
9148
9149 case YYSYMBOL_paren_args: /* paren_args */
9150#line 2616 "parse.y"
9151 {
9152 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9153 rb_parser_printf(p, "NODE_SPECIAL");
9154 }
9155 else if (((*yyvaluep).node)) {
9156 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9157 }
9158}
9159#line 9160 "parse.c"
9160 break;
9161
9162 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9163#line 2616 "parse.y"
9164 {
9165 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9166 rb_parser_printf(p, "NODE_SPECIAL");
9167 }
9168 else if (((*yyvaluep).node)) {
9169 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9170 }
9171}
9172#line 9173 "parse.c"
9173 break;
9174
9175 case YYSYMBOL_opt_call_args: /* opt_call_args */
9176#line 2616 "parse.y"
9177 {
9178 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9179 rb_parser_printf(p, "NODE_SPECIAL");
9180 }
9181 else if (((*yyvaluep).node)) {
9182 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9183 }
9184}
9185#line 9186 "parse.c"
9186 break;
9187
9188 case YYSYMBOL_value_expr_command: /* value_expr_command */
9189#line 2616 "parse.y"
9190 {
9191 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9192 rb_parser_printf(p, "NODE_SPECIAL");
9193 }
9194 else if (((*yyvaluep).node)) {
9195 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9196 }
9197}
9198#line 9199 "parse.c"
9199 break;
9200
9201 case YYSYMBOL_call_args: /* call_args */
9202#line 2616 "parse.y"
9203 {
9204 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9205 rb_parser_printf(p, "NODE_SPECIAL");
9206 }
9207 else if (((*yyvaluep).node)) {
9208 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9209 }
9210}
9211#line 9212 "parse.c"
9212 break;
9213
9214 case YYSYMBOL_command_args: /* command_args */
9215#line 2616 "parse.y"
9216 {
9217 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9218 rb_parser_printf(p, "NODE_SPECIAL");
9219 }
9220 else if (((*yyvaluep).node)) {
9221 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9222 }
9223}
9224#line 9225 "parse.c"
9225 break;
9226
9227 case YYSYMBOL_block_arg: /* block_arg */
9228#line 2616 "parse.y"
9229 {
9230 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9231 rb_parser_printf(p, "NODE_SPECIAL");
9232 }
9233 else if (((*yyvaluep).node_block_pass)) {
9234 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9235 }
9236}
9237#line 9238 "parse.c"
9238 break;
9239
9240 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9241#line 2616 "parse.y"
9242 {
9243 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9244 rb_parser_printf(p, "NODE_SPECIAL");
9245 }
9246 else if (((*yyvaluep).node_block_pass)) {
9247 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9248 }
9249}
9250#line 9251 "parse.c"
9251 break;
9252
9253 case YYSYMBOL_args: /* args */
9254#line 2616 "parse.y"
9255 {
9256 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9257 rb_parser_printf(p, "NODE_SPECIAL");
9258 }
9259 else if (((*yyvaluep).node)) {
9260 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9261 }
9262}
9263#line 9264 "parse.c"
9264 break;
9265
9266 case YYSYMBOL_arg_splat: /* arg_splat */
9267#line 2616 "parse.y"
9268 {
9269 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9270 rb_parser_printf(p, "NODE_SPECIAL");
9271 }
9272 else if (((*yyvaluep).node)) {
9273 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9274 }
9275}
9276#line 9277 "parse.c"
9277 break;
9278
9279 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9280#line 2616 "parse.y"
9281 {
9282 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9283 rb_parser_printf(p, "NODE_SPECIAL");
9284 }
9285 else if (((*yyvaluep).node)) {
9286 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9287 }
9288}
9289#line 9290 "parse.c"
9290 break;
9291
9292 case YYSYMBOL_mrhs: /* mrhs */
9293#line 2616 "parse.y"
9294 {
9295 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9296 rb_parser_printf(p, "NODE_SPECIAL");
9297 }
9298 else if (((*yyvaluep).node)) {
9299 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9300 }
9301}
9302#line 9303 "parse.c"
9303 break;
9304
9305 case YYSYMBOL_primary: /* primary */
9306#line 2616 "parse.y"
9307 {
9308 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9309 rb_parser_printf(p, "NODE_SPECIAL");
9310 }
9311 else if (((*yyvaluep).node)) {
9312 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9313 }
9314}
9315#line 9316 "parse.c"
9316 break;
9317
9318 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9319#line 2616 "parse.y"
9320 {
9321 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9322 rb_parser_printf(p, "NODE_SPECIAL");
9323 }
9324 else if (((*yyvaluep).node)) {
9325 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9326 }
9327}
9328#line 9329 "parse.c"
9329 break;
9330
9331 case YYSYMBOL_primary_value: /* primary_value */
9332#line 2616 "parse.y"
9333 {
9334 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9335 rb_parser_printf(p, "NODE_SPECIAL");
9336 }
9337 else if (((*yyvaluep).node)) {
9338 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9339 }
9340}
9341#line 9342 "parse.c"
9342 break;
9343
9344 case YYSYMBOL_k_while: /* k_while */
9345#line 2616 "parse.y"
9346 {
9347 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9348 rb_parser_printf(p, "NODE_SPECIAL");
9349 }
9350 else if (((*yyvaluep).node_exits)) {
9351 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9352 }
9353}
9354#line 9355 "parse.c"
9355 break;
9356
9357 case YYSYMBOL_k_until: /* k_until */
9358#line 2616 "parse.y"
9359 {
9360 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9361 rb_parser_printf(p, "NODE_SPECIAL");
9362 }
9363 else if (((*yyvaluep).node_exits)) {
9364 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9365 }
9366}
9367#line 9368 "parse.c"
9368 break;
9369
9370 case YYSYMBOL_k_for: /* k_for */
9371#line 2616 "parse.y"
9372 {
9373 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9374 rb_parser_printf(p, "NODE_SPECIAL");
9375 }
9376 else if (((*yyvaluep).node_exits)) {
9377 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9378 }
9379}
9380#line 9381 "parse.c"
9381 break;
9382
9383 case YYSYMBOL_k_def: /* k_def */
9384#line 2616 "parse.y"
9385 {
9386 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9387 rb_parser_printf(p, "NODE_SPECIAL");
9388 }
9389 else if (((*yyvaluep).node_def_temp)) {
9390 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9391 }
9392}
9393#line 9394 "parse.c"
9394 break;
9395
9396 case YYSYMBOL_do: /* do */
9397#line 2625 "parse.y"
9398 {
9399 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9400}
9401#line 9402 "parse.c"
9402 break;
9403
9404 case YYSYMBOL_if_tail: /* if_tail */
9405#line 2616 "parse.y"
9406 {
9407 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9408 rb_parser_printf(p, "NODE_SPECIAL");
9409 }
9410 else if (((*yyvaluep).node)) {
9411 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9412 }
9413}
9414#line 9415 "parse.c"
9415 break;
9416
9417 case YYSYMBOL_opt_else: /* opt_else */
9418#line 2616 "parse.y"
9419 {
9420 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9421 rb_parser_printf(p, "NODE_SPECIAL");
9422 }
9423 else if (((*yyvaluep).node)) {
9424 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9425 }
9426}
9427#line 9428 "parse.c"
9428 break;
9429
9430 case YYSYMBOL_for_var: /* for_var */
9431#line 2616 "parse.y"
9432 {
9433 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9434 rb_parser_printf(p, "NODE_SPECIAL");
9435 }
9436 else if (((*yyvaluep).node)) {
9437 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9438 }
9439}
9440#line 9441 "parse.c"
9441 break;
9442
9443 case YYSYMBOL_f_marg: /* f_marg */
9444#line 2616 "parse.y"
9445 {
9446 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9447 rb_parser_printf(p, "NODE_SPECIAL");
9448 }
9449 else if (((*yyvaluep).node)) {
9450 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9451 }
9452}
9453#line 9454 "parse.c"
9454 break;
9455
9456 case YYSYMBOL_f_marg_list: /* f_marg_list */
9457#line 2616 "parse.y"
9458 {
9459 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9460 rb_parser_printf(p, "NODE_SPECIAL");
9461 }
9462 else if (((*yyvaluep).node)) {
9463 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9464 }
9465}
9466#line 9467 "parse.c"
9467 break;
9468
9469 case YYSYMBOL_f_margs: /* f_margs */
9470#line 2616 "parse.y"
9471 {
9472 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9473 rb_parser_printf(p, "NODE_SPECIAL");
9474 }
9475 else if (((*yyvaluep).node_masgn)) {
9476 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9477 }
9478}
9479#line 9480 "parse.c"
9480 break;
9481
9482 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9483#line 2616 "parse.y"
9484 {
9485 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9486 rb_parser_printf(p, "NODE_SPECIAL");
9487 }
9488 else if (((*yyvaluep).node)) {
9489 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9490 }
9491}
9492#line 9493 "parse.c"
9493 break;
9494
9495 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9496#line 2625 "parse.y"
9497 {
9498 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9499}
9500#line 9501 "parse.c"
9501 break;
9502
9503 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9504#line 2616 "parse.y"
9505 {
9506 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9507 rb_parser_printf(p, "NODE_SPECIAL");
9508 }
9509 else if (((*yyvaluep).node_kw_arg)) {
9510 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9511 }
9512}
9513#line 9514 "parse.c"
9514 break;
9515
9516 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9517#line 2616 "parse.y"
9518 {
9519 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9520 rb_parser_printf(p, "NODE_SPECIAL");
9521 }
9522 else if (((*yyvaluep).node_kw_arg)) {
9523 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9524 }
9525}
9526#line 9527 "parse.c"
9527 break;
9528
9529 case YYSYMBOL_block_args_tail: /* block_args_tail */
9530#line 2616 "parse.y"
9531 {
9532 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9533 rb_parser_printf(p, "NODE_SPECIAL");
9534 }
9535 else if (((*yyvaluep).node_args)) {
9536 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9537 }
9538}
9539#line 9540 "parse.c"
9540 break;
9541
9542 case YYSYMBOL_excessed_comma: /* excessed_comma */
9543#line 2625 "parse.y"
9544 {
9545 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9546}
9547#line 9548 "parse.c"
9548 break;
9549
9550 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9551#line 2616 "parse.y"
9552 {
9553 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9554 rb_parser_printf(p, "NODE_SPECIAL");
9555 }
9556 else if (((*yyvaluep).node_opt_arg)) {
9557 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9558 }
9559}
9560#line 9561 "parse.c"
9561 break;
9562
9563 case YYSYMBOL_f_optarg_primary_value: /* f_optarg_primary_value */
9564#line 2616 "parse.y"
9565 {
9566 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9567 rb_parser_printf(p, "NODE_SPECIAL");
9568 }
9569 else if (((*yyvaluep).node_opt_arg)) {
9570 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9571 }
9572}
9573#line 9574 "parse.c"
9574 break;
9575
9576 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9577#line 2616 "parse.y"
9578 {
9579 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9580 rb_parser_printf(p, "NODE_SPECIAL");
9581 }
9582 else if (((*yyvaluep).node_args)) {
9583 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9584 }
9585}
9586#line 9587 "parse.c"
9587 break;
9588
9589 case YYSYMBOL_block_param: /* block_param */
9590#line 2616 "parse.y"
9591 {
9592 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9593 rb_parser_printf(p, "NODE_SPECIAL");
9594 }
9595 else if (((*yyvaluep).node_args)) {
9596 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9597 }
9598}
9599#line 9600 "parse.c"
9600 break;
9601
9602 case YYSYMBOL_opt_block_param: /* opt_block_param */
9603#line 2616 "parse.y"
9604 {
9605 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9606 rb_parser_printf(p, "NODE_SPECIAL");
9607 }
9608 else if (((*yyvaluep).node_args)) {
9609 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9610 }
9611}
9612#line 9613 "parse.c"
9613 break;
9614
9615 case YYSYMBOL_block_param_def: /* block_param_def */
9616#line 2616 "parse.y"
9617 {
9618 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9619 rb_parser_printf(p, "NODE_SPECIAL");
9620 }
9621 else if (((*yyvaluep).node_args)) {
9622 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9623 }
9624}
9625#line 9626 "parse.c"
9626 break;
9627
9628 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9629#line 2625 "parse.y"
9630 {
9631 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9632}
9633#line 9634 "parse.c"
9634 break;
9635
9636 case YYSYMBOL_bv_decls: /* bv_decls */
9637#line 2625 "parse.y"
9638 {
9639 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9640}
9641#line 9642 "parse.c"
9642 break;
9643
9644 case YYSYMBOL_bvar: /* bvar */
9645#line 2625 "parse.y"
9646 {
9647 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9648}
9649#line 9650 "parse.c"
9650 break;
9651
9652 case YYSYMBOL_numparam: /* numparam */
9653#line 2616 "parse.y"
9654 {
9655 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9656 rb_parser_printf(p, "NODE_SPECIAL");
9657 }
9658 else if (((*yyvaluep).node)) {
9659 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9660 }
9661}
9662#line 9663 "parse.c"
9663 break;
9664
9665 case YYSYMBOL_it_id: /* it_id */
9666#line 2625 "parse.y"
9667 {
9668 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9669}
9670#line 9671 "parse.c"
9671 break;
9672
9673 case YYSYMBOL_lambda: /* lambda */
9674#line 2616 "parse.y"
9675 {
9676 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9677 rb_parser_printf(p, "NODE_SPECIAL");
9678 }
9679 else if (((*yyvaluep).node)) {
9680 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9681 }
9682}
9683#line 9684 "parse.c"
9684 break;
9685
9686 case YYSYMBOL_f_larglist: /* f_larglist */
9687#line 2616 "parse.y"
9688 {
9689 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9690 rb_parser_printf(p, "NODE_SPECIAL");
9691 }
9692 else if (((*yyvaluep).node_args)) {
9693 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9694 }
9695}
9696#line 9697 "parse.c"
9697 break;
9698
9699 case YYSYMBOL_do_block: /* do_block */
9700#line 2616 "parse.y"
9701 {
9702 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9703 rb_parser_printf(p, "NODE_SPECIAL");
9704 }
9705 else if (((*yyvaluep).node)) {
9706 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9707 }
9708}
9709#line 9710 "parse.c"
9710 break;
9711
9712 case YYSYMBOL_block_call: /* block_call */
9713#line 2616 "parse.y"
9714 {
9715 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9716 rb_parser_printf(p, "NODE_SPECIAL");
9717 }
9718 else if (((*yyvaluep).node)) {
9719 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9720 }
9721}
9722#line 9723 "parse.c"
9723 break;
9724
9725 case YYSYMBOL_method_call: /* method_call */
9726#line 2616 "parse.y"
9727 {
9728 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9729 rb_parser_printf(p, "NODE_SPECIAL");
9730 }
9731 else if (((*yyvaluep).node)) {
9732 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9733 }
9734}
9735#line 9736 "parse.c"
9736 break;
9737
9738 case YYSYMBOL_brace_block: /* brace_block */
9739#line 2616 "parse.y"
9740 {
9741 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9742 rb_parser_printf(p, "NODE_SPECIAL");
9743 }
9744 else if (((*yyvaluep).node)) {
9745 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9746 }
9747}
9748#line 9749 "parse.c"
9749 break;
9750
9751 case YYSYMBOL_brace_body: /* brace_body */
9752#line 2616 "parse.y"
9753 {
9754 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9755 rb_parser_printf(p, "NODE_SPECIAL");
9756 }
9757 else if (((*yyvaluep).node)) {
9758 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9759 }
9760}
9761#line 9762 "parse.c"
9762 break;
9763
9764 case YYSYMBOL_do_body: /* do_body */
9765#line 2616 "parse.y"
9766 {
9767 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9768 rb_parser_printf(p, "NODE_SPECIAL");
9769 }
9770 else if (((*yyvaluep).node)) {
9771 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9772 }
9773}
9774#line 9775 "parse.c"
9775 break;
9776
9777 case YYSYMBOL_case_args: /* case_args */
9778#line 2616 "parse.y"
9779 {
9780 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9781 rb_parser_printf(p, "NODE_SPECIAL");
9782 }
9783 else if (((*yyvaluep).node)) {
9784 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9785 }
9786}
9787#line 9788 "parse.c"
9788 break;
9789
9790 case YYSYMBOL_case_body: /* case_body */
9791#line 2616 "parse.y"
9792 {
9793 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9794 rb_parser_printf(p, "NODE_SPECIAL");
9795 }
9796 else if (((*yyvaluep).node)) {
9797 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9798 }
9799}
9800#line 9801 "parse.c"
9801 break;
9802
9803 case YYSYMBOL_cases: /* cases */
9804#line 2616 "parse.y"
9805 {
9806 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9807 rb_parser_printf(p, "NODE_SPECIAL");
9808 }
9809 else if (((*yyvaluep).node)) {
9810 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9811 }
9812}
9813#line 9814 "parse.c"
9814 break;
9815
9816 case YYSYMBOL_p_case_body: /* p_case_body */
9817#line 2616 "parse.y"
9818 {
9819 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9820 rb_parser_printf(p, "NODE_SPECIAL");
9821 }
9822 else if (((*yyvaluep).node)) {
9823 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9824 }
9825}
9826#line 9827 "parse.c"
9827 break;
9828
9829 case YYSYMBOL_p_cases: /* p_cases */
9830#line 2616 "parse.y"
9831 {
9832 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9833 rb_parser_printf(p, "NODE_SPECIAL");
9834 }
9835 else if (((*yyvaluep).node)) {
9836 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9837 }
9838}
9839#line 9840 "parse.c"
9840 break;
9841
9842 case YYSYMBOL_p_top_expr: /* p_top_expr */
9843#line 2616 "parse.y"
9844 {
9845 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9846 rb_parser_printf(p, "NODE_SPECIAL");
9847 }
9848 else if (((*yyvaluep).node)) {
9849 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9850 }
9851}
9852#line 9853 "parse.c"
9853 break;
9854
9855 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
9856#line 2616 "parse.y"
9857 {
9858 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9859 rb_parser_printf(p, "NODE_SPECIAL");
9860 }
9861 else if (((*yyvaluep).node)) {
9862 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9863 }
9864}
9865#line 9866 "parse.c"
9866 break;
9867
9868 case YYSYMBOL_p_expr: /* p_expr */
9869#line 2616 "parse.y"
9870 {
9871 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9872 rb_parser_printf(p, "NODE_SPECIAL");
9873 }
9874 else if (((*yyvaluep).node)) {
9875 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9876 }
9877}
9878#line 9879 "parse.c"
9879 break;
9880
9881 case YYSYMBOL_p_as: /* p_as */
9882#line 2616 "parse.y"
9883 {
9884 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9885 rb_parser_printf(p, "NODE_SPECIAL");
9886 }
9887 else if (((*yyvaluep).node)) {
9888 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9889 }
9890}
9891#line 9892 "parse.c"
9892 break;
9893
9894 case YYSYMBOL_p_alt: /* p_alt */
9895#line 2616 "parse.y"
9896 {
9897 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9898 rb_parser_printf(p, "NODE_SPECIAL");
9899 }
9900 else if (((*yyvaluep).node)) {
9901 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9902 }
9903}
9904#line 9905 "parse.c"
9905 break;
9906
9907 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
9908#line 2616 "parse.y"
9909 {
9910 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9911 rb_parser_printf(p, "NODE_SPECIAL");
9912 }
9913 else if (((*yyvaluep).node)) {
9914 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9915 }
9916}
9917#line 9918 "parse.c"
9918 break;
9919
9920 case YYSYMBOL_p_args: /* p_args */
9921#line 2616 "parse.y"
9922 {
9923 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9924 rb_parser_printf(p, "NODE_SPECIAL");
9925 }
9926 else if (((*yyvaluep).node)) {
9927 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9928 }
9929}
9930#line 9931 "parse.c"
9931 break;
9932
9933 case YYSYMBOL_p_args_head: /* p_args_head */
9934#line 2616 "parse.y"
9935 {
9936 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9937 rb_parser_printf(p, "NODE_SPECIAL");
9938 }
9939 else if (((*yyvaluep).node)) {
9940 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9941 }
9942}
9943#line 9944 "parse.c"
9944 break;
9945
9946 case YYSYMBOL_p_args_tail: /* p_args_tail */
9947#line 2616 "parse.y"
9948 {
9949 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9950 rb_parser_printf(p, "NODE_SPECIAL");
9951 }
9952 else if (((*yyvaluep).node)) {
9953 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9954 }
9955}
9956#line 9957 "parse.c"
9957 break;
9958
9959 case YYSYMBOL_p_find: /* p_find */
9960#line 2616 "parse.y"
9961 {
9962 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9963 rb_parser_printf(p, "NODE_SPECIAL");
9964 }
9965 else if (((*yyvaluep).node)) {
9966 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9967 }
9968}
9969#line 9970 "parse.c"
9970 break;
9971
9972 case YYSYMBOL_p_rest: /* p_rest */
9973#line 2616 "parse.y"
9974 {
9975 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9976 rb_parser_printf(p, "NODE_SPECIAL");
9977 }
9978 else if (((*yyvaluep).node)) {
9979 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9980 }
9981}
9982#line 9983 "parse.c"
9983 break;
9984
9985 case YYSYMBOL_p_args_post: /* p_args_post */
9986#line 2616 "parse.y"
9987 {
9988 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9989 rb_parser_printf(p, "NODE_SPECIAL");
9990 }
9991 else if (((*yyvaluep).node)) {
9992 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9993 }
9994}
9995#line 9996 "parse.c"
9996 break;
9997
9998 case YYSYMBOL_p_arg: /* p_arg */
9999#line 2616 "parse.y"
10000 {
10001 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10002 rb_parser_printf(p, "NODE_SPECIAL");
10003 }
10004 else if (((*yyvaluep).node)) {
10005 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10006 }
10007}
10008#line 10009 "parse.c"
10009 break;
10010
10011 case YYSYMBOL_p_kwargs: /* p_kwargs */
10012#line 2616 "parse.y"
10013 {
10014 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10015 rb_parser_printf(p, "NODE_SPECIAL");
10016 }
10017 else if (((*yyvaluep).node)) {
10018 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10019 }
10020}
10021#line 10022 "parse.c"
10022 break;
10023
10024 case YYSYMBOL_p_kwarg: /* p_kwarg */
10025#line 2616 "parse.y"
10026 {
10027 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10028 rb_parser_printf(p, "NODE_SPECIAL");
10029 }
10030 else if (((*yyvaluep).node)) {
10031 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10032 }
10033}
10034#line 10035 "parse.c"
10035 break;
10036
10037 case YYSYMBOL_p_kw: /* p_kw */
10038#line 2616 "parse.y"
10039 {
10040 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10041 rb_parser_printf(p, "NODE_SPECIAL");
10042 }
10043 else if (((*yyvaluep).node)) {
10044 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10045 }
10046}
10047#line 10048 "parse.c"
10048 break;
10049
10050 case YYSYMBOL_p_kw_label: /* p_kw_label */
10051#line 2625 "parse.y"
10052 {
10053 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10054}
10055#line 10056 "parse.c"
10056 break;
10057
10058 case YYSYMBOL_p_kwrest: /* p_kwrest */
10059#line 2625 "parse.y"
10060 {
10061 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10062}
10063#line 10064 "parse.c"
10064 break;
10065
10066 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10067#line 2625 "parse.y"
10068 {
10069 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10070}
10071#line 10072 "parse.c"
10072 break;
10073
10074 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10075#line 2625 "parse.y"
10076 {
10077 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10078}
10079#line 10080 "parse.c"
10080 break;
10081
10082 case YYSYMBOL_p_value: /* p_value */
10083#line 2616 "parse.y"
10084 {
10085 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10086 rb_parser_printf(p, "NODE_SPECIAL");
10087 }
10088 else if (((*yyvaluep).node)) {
10089 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10090 }
10091}
10092#line 10093 "parse.c"
10093 break;
10094
10095 case YYSYMBOL_p_primitive: /* p_primitive */
10096#line 2616 "parse.y"
10097 {
10098 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10099 rb_parser_printf(p, "NODE_SPECIAL");
10100 }
10101 else if (((*yyvaluep).node)) {
10102 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10103 }
10104}
10105#line 10106 "parse.c"
10106 break;
10107
10108 case YYSYMBOL_value_expr_p_primitive: /* value_expr_p_primitive */
10109#line 2616 "parse.y"
10110 {
10111 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10112 rb_parser_printf(p, "NODE_SPECIAL");
10113 }
10114 else if (((*yyvaluep).node)) {
10115 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10116 }
10117}
10118#line 10119 "parse.c"
10119 break;
10120
10121 case YYSYMBOL_p_primitive_value: /* p_primitive_value */
10122#line 2616 "parse.y"
10123 {
10124 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10125 rb_parser_printf(p, "NODE_SPECIAL");
10126 }
10127 else if (((*yyvaluep).node)) {
10128 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10129 }
10130}
10131#line 10132 "parse.c"
10132 break;
10133
10134 case YYSYMBOL_p_variable: /* p_variable */
10135#line 2616 "parse.y"
10136 {
10137 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10138 rb_parser_printf(p, "NODE_SPECIAL");
10139 }
10140 else if (((*yyvaluep).node)) {
10141 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10142 }
10143}
10144#line 10145 "parse.c"
10145 break;
10146
10147 case YYSYMBOL_p_var_ref: /* p_var_ref */
10148#line 2616 "parse.y"
10149 {
10150 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10151 rb_parser_printf(p, "NODE_SPECIAL");
10152 }
10153 else if (((*yyvaluep).node)) {
10154 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10155 }
10156}
10157#line 10158 "parse.c"
10158 break;
10159
10160 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10161#line 2616 "parse.y"
10162 {
10163 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10164 rb_parser_printf(p, "NODE_SPECIAL");
10165 }
10166 else if (((*yyvaluep).node)) {
10167 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10168 }
10169}
10170#line 10171 "parse.c"
10171 break;
10172
10173 case YYSYMBOL_p_const: /* p_const */
10174#line 2616 "parse.y"
10175 {
10176 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10177 rb_parser_printf(p, "NODE_SPECIAL");
10178 }
10179 else if (((*yyvaluep).node)) {
10180 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10181 }
10182}
10183#line 10184 "parse.c"
10184 break;
10185
10186 case YYSYMBOL_opt_rescue: /* opt_rescue */
10187#line 2616 "parse.y"
10188 {
10189 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10190 rb_parser_printf(p, "NODE_SPECIAL");
10191 }
10192 else if (((*yyvaluep).node)) {
10193 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10194 }
10195}
10196#line 10197 "parse.c"
10197 break;
10198
10199 case YYSYMBOL_exc_list: /* exc_list */
10200#line 2616 "parse.y"
10201 {
10202 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10203 rb_parser_printf(p, "NODE_SPECIAL");
10204 }
10205 else if (((*yyvaluep).node)) {
10206 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10207 }
10208}
10209#line 10210 "parse.c"
10210 break;
10211
10212 case YYSYMBOL_exc_var: /* exc_var */
10213#line 2616 "parse.y"
10214 {
10215 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10216 rb_parser_printf(p, "NODE_SPECIAL");
10217 }
10218 else if (((*yyvaluep).node)) {
10219 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10220 }
10221}
10222#line 10223 "parse.c"
10223 break;
10224
10225 case YYSYMBOL_opt_ensure: /* opt_ensure */
10226#line 2616 "parse.y"
10227 {
10228 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10229 rb_parser_printf(p, "NODE_SPECIAL");
10230 }
10231 else if (((*yyvaluep).node)) {
10232 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10233 }
10234}
10235#line 10236 "parse.c"
10236 break;
10237
10238 case YYSYMBOL_literal: /* literal */
10239#line 2616 "parse.y"
10240 {
10241 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10242 rb_parser_printf(p, "NODE_SPECIAL");
10243 }
10244 else if (((*yyvaluep).node)) {
10245 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10246 }
10247}
10248#line 10249 "parse.c"
10249 break;
10250
10251 case YYSYMBOL_strings: /* strings */
10252#line 2616 "parse.y"
10253 {
10254 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10255 rb_parser_printf(p, "NODE_SPECIAL");
10256 }
10257 else if (((*yyvaluep).node)) {
10258 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10259 }
10260}
10261#line 10262 "parse.c"
10262 break;
10263
10264 case YYSYMBOL_string: /* string */
10265#line 2616 "parse.y"
10266 {
10267 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10268 rb_parser_printf(p, "NODE_SPECIAL");
10269 }
10270 else if (((*yyvaluep).node)) {
10271 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10272 }
10273}
10274#line 10275 "parse.c"
10275 break;
10276
10277 case YYSYMBOL_string1: /* string1 */
10278#line 2616 "parse.y"
10279 {
10280 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10281 rb_parser_printf(p, "NODE_SPECIAL");
10282 }
10283 else if (((*yyvaluep).node)) {
10284 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10285 }
10286}
10287#line 10288 "parse.c"
10288 break;
10289
10290 case YYSYMBOL_xstring: /* xstring */
10291#line 2616 "parse.y"
10292 {
10293 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10294 rb_parser_printf(p, "NODE_SPECIAL");
10295 }
10296 else if (((*yyvaluep).node)) {
10297 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10298 }
10299}
10300#line 10301 "parse.c"
10301 break;
10302
10303 case YYSYMBOL_regexp: /* regexp */
10304#line 2616 "parse.y"
10305 {
10306 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10307 rb_parser_printf(p, "NODE_SPECIAL");
10308 }
10309 else if (((*yyvaluep).node)) {
10310 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10311 }
10312}
10313#line 10314 "parse.c"
10314 break;
10315
10316 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10317#line 2616 "parse.y"
10318 {
10319 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10320 rb_parser_printf(p, "NODE_SPECIAL");
10321 }
10322 else if (((*yyvaluep).node)) {
10323 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10324 }
10325}
10326#line 10327 "parse.c"
10327 break;
10328
10329 case YYSYMBOL_words: /* words */
10330#line 2616 "parse.y"
10331 {
10332 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10333 rb_parser_printf(p, "NODE_SPECIAL");
10334 }
10335 else if (((*yyvaluep).node)) {
10336 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10337 }
10338}
10339#line 10340 "parse.c"
10340 break;
10341
10342 case YYSYMBOL_word_list: /* word_list */
10343#line 2616 "parse.y"
10344 {
10345 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10346 rb_parser_printf(p, "NODE_SPECIAL");
10347 }
10348 else if (((*yyvaluep).node)) {
10349 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10350 }
10351}
10352#line 10353 "parse.c"
10353 break;
10354
10355 case YYSYMBOL_word: /* word */
10356#line 2616 "parse.y"
10357 {
10358 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10359 rb_parser_printf(p, "NODE_SPECIAL");
10360 }
10361 else if (((*yyvaluep).node)) {
10362 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10363 }
10364}
10365#line 10366 "parse.c"
10366 break;
10367
10368 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10369#line 2616 "parse.y"
10370 {
10371 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10372 rb_parser_printf(p, "NODE_SPECIAL");
10373 }
10374 else if (((*yyvaluep).node)) {
10375 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10376 }
10377}
10378#line 10379 "parse.c"
10379 break;
10380
10381 case YYSYMBOL_symbols: /* symbols */
10382#line 2616 "parse.y"
10383 {
10384 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10385 rb_parser_printf(p, "NODE_SPECIAL");
10386 }
10387 else if (((*yyvaluep).node)) {
10388 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10389 }
10390}
10391#line 10392 "parse.c"
10392 break;
10393
10394 case YYSYMBOL_symbol_list: /* symbol_list */
10395#line 2616 "parse.y"
10396 {
10397 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10398 rb_parser_printf(p, "NODE_SPECIAL");
10399 }
10400 else if (((*yyvaluep).node)) {
10401 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10402 }
10403}
10404#line 10405 "parse.c"
10405 break;
10406
10407 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10408#line 2616 "parse.y"
10409 {
10410 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10411 rb_parser_printf(p, "NODE_SPECIAL");
10412 }
10413 else if (((*yyvaluep).node)) {
10414 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10415 }
10416}
10417#line 10418 "parse.c"
10418 break;
10419
10420 case YYSYMBOL_qwords: /* qwords */
10421#line 2616 "parse.y"
10422 {
10423 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10424 rb_parser_printf(p, "NODE_SPECIAL");
10425 }
10426 else if (((*yyvaluep).node)) {
10427 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10428 }
10429}
10430#line 10431 "parse.c"
10431 break;
10432
10433 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10434#line 2616 "parse.y"
10435 {
10436 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10437 rb_parser_printf(p, "NODE_SPECIAL");
10438 }
10439 else if (((*yyvaluep).node)) {
10440 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10441 }
10442}
10443#line 10444 "parse.c"
10444 break;
10445
10446 case YYSYMBOL_qsymbols: /* qsymbols */
10447#line 2616 "parse.y"
10448 {
10449 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10450 rb_parser_printf(p, "NODE_SPECIAL");
10451 }
10452 else if (((*yyvaluep).node)) {
10453 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10454 }
10455}
10456#line 10457 "parse.c"
10457 break;
10458
10459 case YYSYMBOL_qword_list: /* qword_list */
10460#line 2616 "parse.y"
10461 {
10462 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10463 rb_parser_printf(p, "NODE_SPECIAL");
10464 }
10465 else if (((*yyvaluep).node)) {
10466 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10467 }
10468}
10469#line 10470 "parse.c"
10470 break;
10471
10472 case YYSYMBOL_qsym_list: /* qsym_list */
10473#line 2616 "parse.y"
10474 {
10475 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10476 rb_parser_printf(p, "NODE_SPECIAL");
10477 }
10478 else if (((*yyvaluep).node)) {
10479 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10480 }
10481}
10482#line 10483 "parse.c"
10483 break;
10484
10485 case YYSYMBOL_string_contents: /* string_contents */
10486#line 2616 "parse.y"
10487 {
10488 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10489 rb_parser_printf(p, "NODE_SPECIAL");
10490 }
10491 else if (((*yyvaluep).node)) {
10492 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10493 }
10494}
10495#line 10496 "parse.c"
10496 break;
10497
10498 case YYSYMBOL_xstring_contents: /* xstring_contents */
10499#line 2616 "parse.y"
10500 {
10501 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10502 rb_parser_printf(p, "NODE_SPECIAL");
10503 }
10504 else if (((*yyvaluep).node)) {
10505 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10506 }
10507}
10508#line 10509 "parse.c"
10509 break;
10510
10511 case YYSYMBOL_regexp_contents: /* regexp_contents */
10512#line 2616 "parse.y"
10513 {
10514 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10515 rb_parser_printf(p, "NODE_SPECIAL");
10516 }
10517 else if (((*yyvaluep).node)) {
10518 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10519 }
10520}
10521#line 10522 "parse.c"
10522 break;
10523
10524 case YYSYMBOL_string_content: /* string_content */
10525#line 2616 "parse.y"
10526 {
10527 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10528 rb_parser_printf(p, "NODE_SPECIAL");
10529 }
10530 else if (((*yyvaluep).node)) {
10531 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10532 }
10533}
10534#line 10535 "parse.c"
10535 break;
10536
10537 case YYSYMBOL_string_dvar: /* string_dvar */
10538#line 2616 "parse.y"
10539 {
10540 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10541 rb_parser_printf(p, "NODE_SPECIAL");
10542 }
10543 else if (((*yyvaluep).node)) {
10544 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10545 }
10546}
10547#line 10548 "parse.c"
10548 break;
10549
10550 case YYSYMBOL_symbol: /* symbol */
10551#line 2616 "parse.y"
10552 {
10553 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10554 rb_parser_printf(p, "NODE_SPECIAL");
10555 }
10556 else if (((*yyvaluep).node)) {
10557 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10558 }
10559}
10560#line 10561 "parse.c"
10561 break;
10562
10563 case YYSYMBOL_ssym: /* ssym */
10564#line 2616 "parse.y"
10565 {
10566 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10567 rb_parser_printf(p, "NODE_SPECIAL");
10568 }
10569 else if (((*yyvaluep).node)) {
10570 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10571 }
10572}
10573#line 10574 "parse.c"
10574 break;
10575
10576 case YYSYMBOL_sym: /* sym */
10577#line 2625 "parse.y"
10578 {
10579 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10580}
10581#line 10582 "parse.c"
10582 break;
10583
10584 case YYSYMBOL_dsym: /* dsym */
10585#line 2616 "parse.y"
10586 {
10587 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10588 rb_parser_printf(p, "NODE_SPECIAL");
10589 }
10590 else if (((*yyvaluep).node)) {
10591 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10592 }
10593}
10594#line 10595 "parse.c"
10595 break;
10596
10597 case YYSYMBOL_numeric: /* numeric */
10598#line 2616 "parse.y"
10599 {
10600 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10601 rb_parser_printf(p, "NODE_SPECIAL");
10602 }
10603 else if (((*yyvaluep).node)) {
10604 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10605 }
10606}
10607#line 10608 "parse.c"
10608 break;
10609
10610 case YYSYMBOL_simple_numeric: /* simple_numeric */
10611#line 2616 "parse.y"
10612 {
10613 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10614 rb_parser_printf(p, "NODE_SPECIAL");
10615 }
10616 else if (((*yyvaluep).node)) {
10617 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10618 }
10619}
10620#line 10621 "parse.c"
10621 break;
10622
10623 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10624#line 2625 "parse.y"
10625 {
10626 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10627}
10628#line 10629 "parse.c"
10629 break;
10630
10631 case YYSYMBOL_user_variable: /* user_variable */
10632#line 2625 "parse.y"
10633 {
10634 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10635}
10636#line 10637 "parse.c"
10637 break;
10638
10639 case YYSYMBOL_keyword_variable: /* keyword_variable */
10640#line 2625 "parse.y"
10641 {
10642 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10643}
10644#line 10645 "parse.c"
10645 break;
10646
10647 case YYSYMBOL_var_ref: /* var_ref */
10648#line 2616 "parse.y"
10649 {
10650 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10651 rb_parser_printf(p, "NODE_SPECIAL");
10652 }
10653 else if (((*yyvaluep).node)) {
10654 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10655 }
10656}
10657#line 10658 "parse.c"
10658 break;
10659
10660 case YYSYMBOL_var_lhs: /* var_lhs */
10661#line 2616 "parse.y"
10662 {
10663 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10664 rb_parser_printf(p, "NODE_SPECIAL");
10665 }
10666 else if (((*yyvaluep).node)) {
10667 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10668 }
10669}
10670#line 10671 "parse.c"
10671 break;
10672
10673 case YYSYMBOL_backref: /* backref */
10674#line 2616 "parse.y"
10675 {
10676 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10677 rb_parser_printf(p, "NODE_SPECIAL");
10678 }
10679 else if (((*yyvaluep).node)) {
10680 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10681 }
10682}
10683#line 10684 "parse.c"
10684 break;
10685
10686 case YYSYMBOL_superclass: /* superclass */
10687#line 2616 "parse.y"
10688 {
10689 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10690 rb_parser_printf(p, "NODE_SPECIAL");
10691 }
10692 else if (((*yyvaluep).node)) {
10693 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10694 }
10695}
10696#line 10697 "parse.c"
10697 break;
10698
10699 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
10700#line 2616 "parse.y"
10701 {
10702 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10703 rb_parser_printf(p, "NODE_SPECIAL");
10704 }
10705 else if (((*yyvaluep).node_args)) {
10706 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10707 }
10708}
10709#line 10710 "parse.c"
10710 break;
10711
10712 case YYSYMBOL_f_paren_args: /* f_paren_args */
10713#line 2616 "parse.y"
10714 {
10715 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10716 rb_parser_printf(p, "NODE_SPECIAL");
10717 }
10718 else if (((*yyvaluep).node_args)) {
10719 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10720 }
10721}
10722#line 10723 "parse.c"
10723 break;
10724
10725 case YYSYMBOL_f_arglist: /* f_arglist */
10726#line 2616 "parse.y"
10727 {
10728 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10729 rb_parser_printf(p, "NODE_SPECIAL");
10730 }
10731 else if (((*yyvaluep).node_args)) {
10732 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10733 }
10734}
10735#line 10736 "parse.c"
10736 break;
10737
10738 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
10739#line 2616 "parse.y"
10740 {
10741 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10742 rb_parser_printf(p, "NODE_SPECIAL");
10743 }
10744 else if (((*yyvaluep).node_kw_arg)) {
10745 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10746 }
10747}
10748#line 10749 "parse.c"
10749 break;
10750
10751 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
10752#line 2616 "parse.y"
10753 {
10754 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10755 rb_parser_printf(p, "NODE_SPECIAL");
10756 }
10757 else if (((*yyvaluep).node_kw_arg)) {
10758 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10759 }
10760}
10761#line 10762 "parse.c"
10762 break;
10763
10764 case YYSYMBOL_args_tail: /* args_tail */
10765#line 2616 "parse.y"
10766 {
10767 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10768 rb_parser_printf(p, "NODE_SPECIAL");
10769 }
10770 else if (((*yyvaluep).node_args)) {
10771 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10772 }
10773}
10774#line 10775 "parse.c"
10775 break;
10776
10777 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
10778#line 2616 "parse.y"
10779 {
10780 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10781 rb_parser_printf(p, "NODE_SPECIAL");
10782 }
10783 else if (((*yyvaluep).node_opt_arg)) {
10784 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10785 }
10786}
10787#line 10788 "parse.c"
10788 break;
10789
10790 case YYSYMBOL_f_optarg_arg_value: /* f_optarg_arg_value */
10791#line 2616 "parse.y"
10792 {
10793 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10794 rb_parser_printf(p, "NODE_SPECIAL");
10795 }
10796 else if (((*yyvaluep).node_opt_arg)) {
10797 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10798 }
10799}
10800#line 10801 "parse.c"
10801 break;
10802
10803 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
10804#line 2616 "parse.y"
10805 {
10806 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10807 rb_parser_printf(p, "NODE_SPECIAL");
10808 }
10809 else if (((*yyvaluep).node_args)) {
10810 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10811 }
10812}
10813#line 10814 "parse.c"
10814 break;
10815
10816 case YYSYMBOL_f_args: /* f_args */
10817#line 2616 "parse.y"
10818 {
10819 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10820 rb_parser_printf(p, "NODE_SPECIAL");
10821 }
10822 else if (((*yyvaluep).node_args)) {
10823 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10824 }
10825}
10826#line 10827 "parse.c"
10827 break;
10828
10829 case YYSYMBOL_args_forward: /* args_forward */
10830#line 2625 "parse.y"
10831 {
10832 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10833}
10834#line 10835 "parse.c"
10835 break;
10836
10837 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
10838#line 2625 "parse.y"
10839 {
10840 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10841}
10842#line 10843 "parse.c"
10843 break;
10844
10845 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
10846#line 2625 "parse.y"
10847 {
10848 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10849}
10850#line 10851 "parse.c"
10851 break;
10852
10853 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
10854#line 2625 "parse.y"
10855 {
10856 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10857}
10858#line 10859 "parse.c"
10859 break;
10860
10861 case YYSYMBOL_f_arg_item: /* f_arg_item */
10862#line 2616 "parse.y"
10863 {
10864 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
10865 rb_parser_printf(p, "NODE_SPECIAL");
10866 }
10867 else if (((*yyvaluep).node_args_aux)) {
10868 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
10869 }
10870}
10871#line 10872 "parse.c"
10872 break;
10873
10874 case YYSYMBOL_f_arg: /* f_arg */
10875#line 2616 "parse.y"
10876 {
10877 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
10878 rb_parser_printf(p, "NODE_SPECIAL");
10879 }
10880 else if (((*yyvaluep).node_args_aux)) {
10881 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
10882 }
10883}
10884#line 10885 "parse.c"
10885 break;
10886
10887 case YYSYMBOL_f_label: /* f_label */
10888#line 2625 "parse.y"
10889 {
10890 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10891}
10892#line 10893 "parse.c"
10893 break;
10894
10895 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
10896#line 2625 "parse.y"
10897 {
10898 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10899}
10900#line 10901 "parse.c"
10901 break;
10902
10903 case YYSYMBOL_f_kwrest: /* f_kwrest */
10904#line 2625 "parse.y"
10905 {
10906 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10907}
10908#line 10909 "parse.c"
10909 break;
10910
10911 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
10912#line 2625 "parse.y"
10913 {
10914 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10915}
10916#line 10917 "parse.c"
10917 break;
10918
10919 case YYSYMBOL_f_block_arg: /* f_block_arg */
10920#line 2625 "parse.y"
10921 {
10922 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10923}
10924#line 10925 "parse.c"
10925 break;
10926
10927 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
10928#line 2625 "parse.y"
10929 {
10930 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10931}
10932#line 10933 "parse.c"
10933 break;
10934
10935 case YYSYMBOL_value_expr_var_ref: /* value_expr_var_ref */
10936#line 2616 "parse.y"
10937 {
10938 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10939 rb_parser_printf(p, "NODE_SPECIAL");
10940 }
10941 else if (((*yyvaluep).node)) {
10942 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10943 }
10944}
10945#line 10946 "parse.c"
10946 break;
10947
10948 case YYSYMBOL_singleton: /* singleton */
10949#line 2616 "parse.y"
10950 {
10951 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10952 rb_parser_printf(p, "NODE_SPECIAL");
10953 }
10954 else if (((*yyvaluep).node)) {
10955 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10956 }
10957}
10958#line 10959 "parse.c"
10959 break;
10960
10961 case YYSYMBOL_assoc_list: /* assoc_list */
10962#line 2616 "parse.y"
10963 {
10964 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10965 rb_parser_printf(p, "NODE_SPECIAL");
10966 }
10967 else if (((*yyvaluep).node)) {
10968 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10969 }
10970}
10971#line 10972 "parse.c"
10972 break;
10973
10974 case YYSYMBOL_assocs: /* assocs */
10975#line 2616 "parse.y"
10976 {
10977 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10978 rb_parser_printf(p, "NODE_SPECIAL");
10979 }
10980 else if (((*yyvaluep).node)) {
10981 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10982 }
10983}
10984#line 10985 "parse.c"
10985 break;
10986
10987 case YYSYMBOL_assoc: /* assoc */
10988#line 2616 "parse.y"
10989 {
10990 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10991 rb_parser_printf(p, "NODE_SPECIAL");
10992 }
10993 else if (((*yyvaluep).node)) {
10994 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10995 }
10996}
10997#line 10998 "parse.c"
10998 break;
10999
11000 case YYSYMBOL_operation: /* operation */
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_operation2: /* operation2 */
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_operation3: /* operation3 */
11017#line 2625 "parse.y"
11018 {
11019 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11020}
11021#line 11022 "parse.c"
11022 break;
11023
11024 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11025#line 2625 "parse.y"
11026 {
11027 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11028}
11029#line 11030 "parse.c"
11030 break;
11031
11032 case YYSYMBOL_call_op: /* call_op */
11033#line 2625 "parse.y"
11034 {
11035 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11036}
11037#line 11038 "parse.c"
11038 break;
11039
11040 case YYSYMBOL_call_op2: /* call_op2 */
11041#line 2625 "parse.y"
11042 {
11043 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11044}
11045#line 11046 "parse.c"
11046 break;
11047
11048 case YYSYMBOL_none: /* none */
11049#line 2616 "parse.y"
11050 {
11051 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11052 rb_parser_printf(p, "NODE_SPECIAL");
11053 }
11054 else if (((*yyvaluep).node)) {
11055 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11056 }
11057}
11058#line 11059 "parse.c"
11059 break;
11060
11061 default:
11062 break;
11063 }
11064 YY_IGNORE_MAYBE_UNINITIALIZED_END
11065}
11066
11067
11068/*---------------------------.
11069| Print this symbol on YYO. |
11070`---------------------------*/
11071
11072static void
11073yy_symbol_print (FILE *yyo,
11074 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11075{
11076 YYFPRINTF (yyo, "%s %s (",
11077 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11078
11079 YYLOCATION_PRINT (yyo, yylocationp, p);
11080 YYFPRINTF (yyo, ": ");
11081 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11082 YYFPRINTF (yyo, ")");
11083}
11084
11085/*------------------------------------------------------------------.
11086| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11087| TOP (included). |
11088`------------------------------------------------------------------*/
11089
11090static void
11091yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11092{
11093 YYFPRINTF (stderr, "Stack now");
11094 for (; yybottom <= yytop; yybottom++)
11095 {
11096 int yybot = *yybottom;
11097 YYFPRINTF (stderr, " %d", yybot);
11098 }
11099 YYFPRINTF (stderr, "\n");
11100}
11101
11102# define YY_STACK_PRINT(Bottom, Top, p) \
11103do { \
11104 if (yydebug) \
11105 yy_stack_print ((Bottom), (Top), p); \
11106} while (0)
11107
11108
11109/*------------------------------------------------.
11110| Report that the YYRULE is going to be reduced. |
11111`------------------------------------------------*/
11112
11113static void
11114yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11115 int yyrule, struct parser_params *p)
11116{
11117 int yylno = yyrline[yyrule];
11118 int yynrhs = yyr2[yyrule];
11119 int yyi;
11120 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11121 yyrule - 1, yylno);
11122 /* The symbols being reduced. */
11123 for (yyi = 0; yyi < yynrhs; yyi++)
11124 {
11125 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11126 yy_symbol_print (stderr,
11127 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11128 &yyvsp[(yyi + 1) - (yynrhs)],
11129 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11130 YYFPRINTF (stderr, "\n");
11131 }
11132}
11133
11134# define YY_REDUCE_PRINT(Rule, p) \
11135do { \
11136 if (yydebug) \
11137 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11138} while (0)
11139
11140/* Nonzero means print parse trace. It is left uninitialized so that
11141 multiple parsers can coexist. */
11142#ifndef yydebug
11143int yydebug;
11144#endif
11145#else /* !YYDEBUG */
11146# define YYDPRINTF(Args) ((void) 0)
11147# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11148# define YY_STACK_PRINT(Bottom, Top, p)
11149# define YY_REDUCE_PRINT(Rule, p)
11150#endif /* !YYDEBUG */
11151
11152
11153/* YYINITDEPTH -- initial size of the parser's stacks. */
11154#ifndef YYINITDEPTH
11155# define YYINITDEPTH 200
11156#endif
11157
11158/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11159 if the built-in stack extension method is used).
11160
11161 Do not make this value too large; the results are undefined if
11162 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11163 evaluated with infinite-precision integer arithmetic. */
11164
11165#ifndef YYMAXDEPTH
11166# define YYMAXDEPTH 10000
11167#endif
11168
11169
11170/* Context of a parse error. */
11171typedef struct
11172{
11173 yy_state_t *yyssp;
11174 yysymbol_kind_t yytoken;
11175 YYLTYPE *yylloc;
11176} yypcontext_t;
11177
11178/* Put in YYARG at most YYARGN of the expected tokens given the
11179 current YYCTX, and return the number of tokens stored in YYARG. If
11180 YYARG is null, return the number of expected tokens (guaranteed to
11181 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11182 Return 0 if there are more than YYARGN expected tokens, yet fill
11183 YYARG up to YYARGN. */
11184static int
11185yypcontext_expected_tokens (const yypcontext_t *yyctx,
11186 yysymbol_kind_t yyarg[], int yyargn)
11187{
11188 /* Actual size of YYARG. */
11189 int yycount = 0;
11190 int yyn = yypact[+*yyctx->yyssp];
11191 if (!yypact_value_is_default (yyn))
11192 {
11193 /* Start YYX at -YYN if negative to avoid negative indexes in
11194 YYCHECK. In other words, skip the first -YYN actions for
11195 this state because they are default actions. */
11196 int yyxbegin = yyn < 0 ? -yyn : 0;
11197 /* Stay within bounds of both yycheck and yytname. */
11198 int yychecklim = YYLAST - yyn + 1;
11199 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11200 int yyx;
11201 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11202 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11203 && !yytable_value_is_error (yytable[yyx + yyn]))
11204 {
11205 if (!yyarg)
11206 ++yycount;
11207 else if (yycount == yyargn)
11208 return 0;
11209 else
11210 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11211 }
11212 }
11213 if (yyarg && yycount == 0 && 0 < yyargn)
11214 yyarg[0] = YYSYMBOL_YYEMPTY;
11215 return yycount;
11216}
11217
11218
11219
11220
11221#ifndef yystrlen
11222# if defined __GLIBC__ && defined _STRING_H
11223# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11224# else
11225/* Return the length of YYSTR. */
11226static YYPTRDIFF_T
11227yystrlen (const char *yystr)
11228{
11229 YYPTRDIFF_T yylen;
11230 for (yylen = 0; yystr[yylen]; yylen++)
11231 continue;
11232 return yylen;
11233}
11234# endif
11235#endif
11236
11237#ifndef yystpcpy
11238# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11239# define yystpcpy stpcpy
11240# else
11241/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11242 YYDEST. */
11243static char *
11244yystpcpy (char *yydest, const char *yysrc)
11245{
11246 char *yyd = yydest;
11247 const char *yys = yysrc;
11248
11249 while ((*yyd++ = *yys++) != '\0')
11250 continue;
11251
11252 return yyd - 1;
11253}
11254# endif
11255#endif
11256
11257#ifndef yytnamerr
11258/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11259 quotes and backslashes, so that it's suitable for yyerror. The
11260 heuristic is that double-quoting is unnecessary unless the string
11261 contains an apostrophe, a comma, or backslash (other than
11262 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11263 null, do not copy; instead, return the length of what the result
11264 would have been. */
11265static YYPTRDIFF_T
11266yytnamerr (char *yyres, const char *yystr)
11267{
11268 if (*yystr == '"')
11269 {
11270 YYPTRDIFF_T yyn = 0;
11271 char const *yyp = yystr;
11272 for (;;)
11273 switch (*++yyp)
11274 {
11275 case '\'':
11276 case ',':
11277 goto do_not_strip_quotes;
11278
11279 case '\\':
11280 if (*++yyp != '\\')
11281 goto do_not_strip_quotes;
11282 else
11283 goto append;
11284
11285 append:
11286 default:
11287 if (yyres)
11288 yyres[yyn] = *yyp;
11289 yyn++;
11290 break;
11291
11292 case '"':
11293 if (yyres)
11294 yyres[yyn] = '\0';
11295 return yyn;
11296 }
11297 do_not_strip_quotes: ;
11298 }
11299
11300 if (yyres)
11301 return yystpcpy (yyres, yystr) - yyres;
11302 else
11303 return yystrlen (yystr);
11304}
11305#endif
11306
11307
11308static int
11309yy_syntax_error_arguments (const yypcontext_t *yyctx,
11310 yysymbol_kind_t yyarg[], int yyargn)
11311{
11312 /* Actual size of YYARG. */
11313 int yycount = 0;
11314 /* There are many possibilities here to consider:
11315 - If this state is a consistent state with a default action, then
11316 the only way this function was invoked is if the default action
11317 is an error action. In that case, don't check for expected
11318 tokens because there are none.
11319 - The only way there can be no lookahead present (in yychar) is if
11320 this state is a consistent state with a default action. Thus,
11321 detecting the absence of a lookahead is sufficient to determine
11322 that there is no unexpected or expected token to report. In that
11323 case, just report a simple "syntax error".
11324 - Don't assume there isn't a lookahead just because this state is a
11325 consistent state with a default action. There might have been a
11326 previous inconsistent state, consistent state with a non-default
11327 action, or user semantic action that manipulated yychar.
11328 - Of course, the expected token list depends on states to have
11329 correct lookahead information, and it depends on the parser not
11330 to perform extra reductions after fetching a lookahead from the
11331 scanner and before detecting a syntax error. Thus, state merging
11332 (from LALR or IELR) and default reductions corrupt the expected
11333 token list. However, the list is correct for canonical LR with
11334 one exception: it will still contain any token that will not be
11335 accepted due to an error action in a later state.
11336 */
11337 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11338 {
11339 int yyn;
11340 if (yyarg)
11341 yyarg[yycount] = yyctx->yytoken;
11342 ++yycount;
11343 yyn = yypcontext_expected_tokens (yyctx,
11344 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11345 if (yyn == YYENOMEM)
11346 return YYENOMEM;
11347 else
11348 yycount += yyn;
11349 }
11350 return yycount;
11351}
11352
11353/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11354 about the unexpected token YYTOKEN for the state stack whose top is
11355 YYSSP.
11356
11357 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11358 not large enough to hold the message. In that case, also set
11359 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11360 required number of bytes is too large to store. */
11361static int
11362yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11363 const yypcontext_t *yyctx, struct parser_params *p)
11364{
11365 enum { YYARGS_MAX = 5 };
11366 /* Internationalized format string. */
11367 const char *yyformat = YY_NULLPTR;
11368 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11369 one per "expected"). */
11370 yysymbol_kind_t yyarg[YYARGS_MAX];
11371 /* Cumulated lengths of YYARG. */
11372 YYPTRDIFF_T yysize = 0;
11373
11374 /* Actual size of YYARG. */
11375 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11376 if (yycount == YYENOMEM)
11377 return YYENOMEM;
11378
11379 switch (yycount)
11380 {
11381#define YYCASE_(N, S) \
11382 case N: \
11383 yyformat = S; \
11384 break
11385 default: /* Avoid compiler warnings. */
11386 YYCASE_(0, YY_("syntax error"));
11387 YYCASE_(1, YY_("syntax error, unexpected %s"));
11388 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11389 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11390 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11391 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11392#undef YYCASE_
11393 }
11394
11395 /* Compute error message size. Don't count the "%s"s, but reserve
11396 room for the terminator. */
11397 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11398 {
11399 int yyi;
11400 for (yyi = 0; yyi < yycount; ++yyi)
11401 {
11402 YYPTRDIFF_T yysize1
11403 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11404 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11405 yysize = yysize1;
11406 else
11407 return YYENOMEM;
11408 }
11409 }
11410
11411 if (*yymsg_alloc < yysize)
11412 {
11413 *yymsg_alloc = 2 * yysize;
11414 if (! (yysize <= *yymsg_alloc
11415 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11416 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11417 return -1;
11418 }
11419
11420 /* Avoid sprintf, as that infringes on the user's name space.
11421 Don't have undefined behavior even if the translation
11422 produced a string with the wrong number of "%s"s. */
11423 {
11424 char *yyp = *yymsg;
11425 int yyi = 0;
11426 while ((*yyp = *yyformat) != '\0')
11427 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11428 {
11429 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11430 yyformat += 2;
11431 }
11432 else
11433 {
11434 ++yyp;
11435 ++yyformat;
11436 }
11437 }
11438 return 0;
11439}
11440
11441
11442/*-----------------------------------------------.
11443| Release the memory associated to this symbol. |
11444`-----------------------------------------------*/
11445
11446static void
11447yydestruct (const char *yymsg,
11448 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11449{
11450 YY_USE (yyvaluep);
11451 YY_USE (yylocationp);
11452 YY_USE (p);
11453 if (!yymsg)
11454 yymsg = "Deleting";
11455 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11456
11457 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11458 switch (yykind)
11459 {
11460 case YYSYMBOL_256_16: /* @16 */
11461#line 2653 "parse.y"
11462 {
11463 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11464}
11465#line 11466 "parse.c"
11466 break;
11467
11468 case YYSYMBOL_257_17: /* @17 */
11469#line 2653 "parse.y"
11470 {
11471 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11472}
11473#line 11474 "parse.c"
11474 break;
11475
11476 default:
11477 break;
11478 }
11479 YY_IGNORE_MAYBE_UNINITIALIZED_END
11480}
11481
11482
11483
11484
11485
11486
11487/*----------.
11488| yyparse. |
11489`----------*/
11490
11491int
11492yyparse (struct parser_params *p)
11493{
11494/* Lookahead token kind. */
11495int yychar;
11496
11497
11498/* The semantic value of the lookahead symbol. */
11499/* Default value used for initialization, for pacifying older GCCs
11500 or non-GCC compilers. */
11501#ifdef __cplusplus
11502static const YYSTYPE yyval_default = {};
11503(void) yyval_default;
11504#else
11505YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11506#endif
11507YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11508
11509/* Location data for the lookahead symbol. */
11510static const YYLTYPE yyloc_default
11511# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11512 = { 1, 1, 1, 1 }
11513# endif
11514;
11515YYLTYPE yylloc = yyloc_default;
11516
11517 /* Number of syntax errors so far. */
11518 int yynerrs = 0;
11519 YY_USE (yynerrs); /* Silence compiler warning. */
11520
11521 yy_state_fast_t yystate = 0;
11522 /* Number of tokens to shift before error messages enabled. */
11523 int yyerrstatus = 0;
11524
11525 /* Refer to the stacks through separate pointers, to allow yyoverflow
11526 to reallocate them elsewhere. */
11527
11528 /* Their size. */
11529 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11530
11531 /* The state stack: array, bottom, top. */
11532 yy_state_t yyssa[YYINITDEPTH];
11533 yy_state_t *yyss = yyssa;
11534 yy_state_t *yyssp = yyss;
11535
11536 /* The semantic value stack: array, bottom, top. */
11537 YYSTYPE yyvsa[YYINITDEPTH];
11538 YYSTYPE *yyvs = yyvsa;
11539 YYSTYPE *yyvsp = yyvs;
11540
11541 /* The location stack: array, bottom, top. */
11542 YYLTYPE yylsa[YYINITDEPTH];
11543 YYLTYPE *yyls = yylsa;
11544 YYLTYPE *yylsp = yyls;
11545
11546 int yyn;
11547 /* The return value of yyparse. */
11548 int yyresult;
11549 /* Lookahead symbol kind. */
11550 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11551 /* The variables used to return semantic value and location from the
11552 action routines. */
11553 YYSTYPE yyval;
11554 YYLTYPE yyloc;
11555
11556 /* The locations where the error started and ended. */
11557 YYLTYPE yyerror_range[3];
11558
11559 /* Buffer for error messages, and its allocated size. */
11560 char yymsgbuf[128];
11561 char *yymsg = yymsgbuf;
11562 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11563
11564#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11565
11566 /* The number of symbols on the RHS of the reduced rule.
11567 Keep to zero when no symbol should be popped. */
11568 int yylen = 0;
11569
11570 YYDPRINTF ((stderr, "Starting parse\n"));
11571
11572 yychar = YYEMPTY; /* Cause a token to be read. */
11573
11574
11575 /* User initialization code. */
11576#line 2660 "parse.y"
11577 {
11578 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11579}
11580
11581#line 11582 "parse.c"
11582
11583 yylsp[0] = yylloc;
11584 goto yysetstate;
11585
11586
11587/*------------------------------------------------------------.
11588| yynewstate -- push a new state, which is found in yystate. |
11589`------------------------------------------------------------*/
11590yynewstate:
11591 /* In all cases, when you get here, the value and location stacks
11592 have just been pushed. So pushing a state here evens the stacks. */
11593 yyssp++;
11594
11595
11596/*--------------------------------------------------------------------.
11597| yysetstate -- set current state (the top of the stack) to yystate. |
11598`--------------------------------------------------------------------*/
11599yysetstate:
11600 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11601 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11602 YY_IGNORE_USELESS_CAST_BEGIN
11603 *yyssp = YY_CAST (yy_state_t, yystate);
11604 YY_IGNORE_USELESS_CAST_END
11605 YY_STACK_PRINT (yyss, yyssp, p);
11606
11607 if (yyss + yystacksize - 1 <= yyssp)
11608#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11609 YYNOMEM;
11610#else
11611 {
11612 /* Get the current used size of the three stacks, in elements. */
11613 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11614
11615# if defined yyoverflow
11616 {
11617 /* Give user a chance to reallocate the stack. Use copies of
11618 these so that the &'s don't force the real ones into
11619 memory. */
11620 yy_state_t *yyss1 = yyss;
11621 YYSTYPE *yyvs1 = yyvs;
11622 YYLTYPE *yyls1 = yyls;
11623
11624 /* Each stack pointer address is followed by the size of the
11625 data in use in that stack, in bytes. This used to be a
11626 conditional around just the two extra args, but that might
11627 be undefined if yyoverflow is a macro. */
11628 yyoverflow (YY_("memory exhausted"),
11629 &yyss1, yysize * YYSIZEOF (*yyssp),
11630 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11631 &yyls1, yysize * YYSIZEOF (*yylsp),
11632 &yystacksize);
11633 yyss = yyss1;
11634 yyvs = yyvs1;
11635 yyls = yyls1;
11636 }
11637# else /* defined YYSTACK_RELOCATE */
11638 /* Extend the stack our own way. */
11639 if (YYMAXDEPTH <= yystacksize)
11640 YYNOMEM;
11641 yystacksize *= 2;
11642 if (YYMAXDEPTH < yystacksize)
11643 yystacksize = YYMAXDEPTH;
11644
11645 {
11646 yy_state_t *yyss1 = yyss;
11647 union yyalloc *yyptr =
11648 YY_CAST (union yyalloc *,
11649 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11650 if (! yyptr)
11651 YYNOMEM;
11652 YYSTACK_RELOCATE (yyss_alloc, yyss);
11653 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11654 YYSTACK_RELOCATE (yyls_alloc, yyls);
11655# undef YYSTACK_RELOCATE
11656 if (yyss1 != yyssa)
11657 YYSTACK_FREE (yyss1);
11658 }
11659# endif
11660
11661 yyssp = yyss + yysize - 1;
11662 yyvsp = yyvs + yysize - 1;
11663 yylsp = yyls + yysize - 1;
11664
11665 YY_IGNORE_USELESS_CAST_BEGIN
11666 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11667 YY_CAST (long, yystacksize)));
11668 YY_IGNORE_USELESS_CAST_END
11669
11670 if (yyss + yystacksize - 1 <= yyssp)
11671 YYABORT;
11672 }
11673#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11674
11675
11676 if (yystate == YYFINAL)
11677 YYACCEPT;
11678
11679 goto yybackup;
11680
11681
11682/*-----------.
11683| yybackup. |
11684`-----------*/
11685yybackup:
11686 /* Do appropriate processing given the current state. Read a
11687 lookahead token if we need one and don't already have one. */
11688
11689 /* First try to decide what to do without reference to lookahead token. */
11690 yyn = yypact[yystate];
11691 if (yypact_value_is_default (yyn))
11692 goto yydefault;
11693
11694 /* Not known => get a lookahead token if don't already have one. */
11695
11696 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11697 if (yychar == YYEMPTY)
11698 {
11699 YYDPRINTF ((stderr, "Reading a token\n"));
11700 yychar = yylex (&yylval, &yylloc, p);
11701 }
11702
11703 if (yychar <= END_OF_INPUT)
11704 {
11705 yychar = END_OF_INPUT;
11706 yytoken = YYSYMBOL_YYEOF;
11707 YYDPRINTF ((stderr, "Now at end of input.\n"));
11708 }
11709 else if (yychar == YYerror)
11710 {
11711 /* The scanner already issued an error message, process directly
11712 to error recovery. But do not keep the error token as
11713 lookahead, it is too special and may lead us to an endless
11714 loop in error recovery. */
11715 yychar = YYUNDEF;
11716 yytoken = YYSYMBOL_YYerror;
11717 yyerror_range[1] = yylloc;
11718 goto yyerrlab1;
11719 }
11720 else
11721 {
11722 yytoken = YYTRANSLATE (yychar);
11723 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11724 }
11725
11726 /* If the proper action on seeing token YYTOKEN is to reduce or to
11727 detect an error, take that action. */
11728 yyn += yytoken;
11729 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11730 goto yydefault;
11731 yyn = yytable[yyn];
11732 if (yyn <= 0)
11733 {
11734 if (yytable_value_is_error (yyn))
11735 goto yyerrlab;
11736 yyn = -yyn;
11737 goto yyreduce;
11738 }
11739
11740 /* Count tokens shifted since error; after three, turn off error
11741 status. */
11742 if (yyerrstatus)
11743 yyerrstatus--;
11744
11745 /* Shift the lookahead token. */
11746 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11747 yystate = yyn;
11748 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11749 *++yyvsp = yylval;
11750 YY_IGNORE_MAYBE_UNINITIALIZED_END
11751 *++yylsp = yylloc;
11752 /* %after-shift code. */
11753#line 2663 "parse.y"
11754 {after_shift(p);}
11755#line 11756 "parse.c"
11756
11757
11758 /* Discard the shifted token. */
11759 yychar = YYEMPTY;
11760 goto yynewstate;
11761
11762
11763/*-----------------------------------------------------------.
11764| yydefault -- do the default action for the current state. |
11765`-----------------------------------------------------------*/
11766yydefault:
11767 yyn = yydefact[yystate];
11768 if (yyn == 0)
11769 goto yyerrlab;
11770 goto yyreduce;
11771
11772
11773/*-----------------------------.
11774| yyreduce -- do a reduction. |
11775`-----------------------------*/
11776yyreduce:
11777 /* yyn is the number of a rule to reduce with. */
11778 yylen = yyr2[yyn];
11779
11780 /* If YYLEN is nonzero, implement the default value of the action:
11781 '$$ = $1'.
11782
11783 Otherwise, the following line sets YYVAL to garbage.
11784 This behavior is undocumented and Bison
11785 users should not rely upon it. Assigning to YYVAL
11786 unconditionally makes the parser a bit smaller, and it avoids a
11787 GCC warning that YYVAL may be used uninitialized. */
11788 yyval = yyvsp[1-yylen];
11789 /* %before-reduce function. */
11790#line 2664 "parse.y"
11791 {before_reduce(yylen, p);}
11792#line 11793 "parse.c"
11793
11794
11795 /* Default location. */
11796 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
11797 yyerror_range[1] = yyloc;
11798 YY_REDUCE_PRINT (yyn, p);
11799 switch (yyn)
11800 {
11801 case 2: /* $@1: %empty */
11802#line 3078 "parse.y"
11803 {
11804 SET_LEX_STATE(EXPR_BEG);
11805 local_push(p, ifndef_ripper(1)+0);
11806 /* jumps are possible in the top-level loop. */
11807 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
11808 }
11809#line 11810 "parse.c"
11810 break;
11811
11812 case 5: /* compstmt_top_stmts: top_stmts option_terms */
11813#line 2954 "parse.y"
11814 {
11815 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11816 }
11817#line 11818 "parse.c"
11818 break;
11819
11820 case 6: /* program: $@1 compstmt_top_stmts */
11821#line 3085 "parse.y"
11822 {
11823 if ((yyvsp[0].node) && !compile_for_eval) {
11824 NODE *node = (yyvsp[0].node);
11825 /* last expression should not be void */
11826 if (nd_type_p(node, NODE_BLOCK)) {
11827 while (RNODE_BLOCK(node)->nd_next) {
11828 node = RNODE_BLOCK(node)->nd_next;
11829 }
11830 node = RNODE_BLOCK(node)->nd_head;
11831 }
11832 node = remove_begin(node);
11833 void_expr(p, node);
11834 }
11835 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), &(yyloc));
11836 /*% ripper[final]: program!($:2) %*/
11837 local_pop(p);
11838 }
11839#line 11840 "parse.c"
11840 break;
11841
11842 case 7: /* top_stmts: none */
11843#line 3105 "parse.y"
11844 {
11845 (yyval.node) = NEW_BEGIN(0, &(yyloc));
11846 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
11847 }
11848#line 11849 "parse.c"
11849 break;
11850
11851 case 8: /* top_stmts: top_stmt */
11852#line 3110 "parse.y"
11853 {
11854 (yyval.node) = newline_node((yyvsp[0].node));
11855 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
11856 }
11857#line 11858 "parse.c"
11858 break;
11859
11860 case 9: /* top_stmts: top_stmts terms top_stmt */
11861#line 3115 "parse.y"
11862 {
11863 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
11864 /*% ripper: stmts_add!($:1, $:3) %*/
11865 }
11866#line 11867 "parse.c"
11867 break;
11868
11869 case 10: /* top_stmt: stmt */
11870#line 3122 "parse.y"
11871 {
11872 clear_block_exit(p, true);
11873 (yyval.node) = (yyvsp[0].node);
11874 }
11875#line 11876 "parse.c"
11876 break;
11877
11878 case 11: /* top_stmt: "'BEGIN'" begin_block */
11879#line 3127 "parse.y"
11880 {
11881 (yyval.node) = (yyvsp[0].node);
11882 /*% ripper: $:2 %*/
11883 }
11884#line 11885 "parse.c"
11885 break;
11886
11887 case 12: /* block_open: '{' */
11888#line 3133 "parse.y"
11889 {(yyval.node_exits) = init_block_exit(p);}
11890#line 11891 "parse.c"
11891 break;
11892
11893 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
11894#line 3136 "parse.y"
11895 {
11896 restore_block_exit(p, (yyvsp[-2].node_exits));
11897 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
11898 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
11899 (yyval.node) = NEW_BEGIN(0, &(yyloc));
11900 /*% ripper: BEGIN!($:2) %*/
11901 }
11902#line 11903 "parse.c"
11903 break;
11904
11905 case 14: /* compstmt_stmts: stmts option_terms */
11906#line 2954 "parse.y"
11907 {
11908 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11909 }
11910#line 11911 "parse.c"
11911 break;
11912
11913 case 15: /* $@2: %empty */
11914#line 3149 "parse.y"
11915 {
11916 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
11917 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
11918 }
11919#line 11920 "parse.c"
11920 break;
11921
11922 case 16: /* $@3: %empty */
11923#line 3154 "parse.y"
11924 {
11925 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
11926 }
11927#line 11928 "parse.c"
11928 break;
11929
11930 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
11931#line 3158 "parse.y"
11932 {
11933 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
11934 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
11935 }
11936#line 11937 "parse.c"
11937 break;
11938
11939 case 18: /* $@4: %empty */
11940#line 3165 "parse.y"
11941 {
11942 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
11943 }
11944#line 11945 "parse.c"
11945 break;
11946
11947 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
11948#line 3169 "parse.y"
11949 {
11950 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
11951 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
11952 }
11953#line 11954 "parse.c"
11954 break;
11955
11956 case 20: /* stmts: none */
11957#line 3176 "parse.y"
11958 {
11959 (yyval.node) = NEW_BEGIN(0, &(yyloc));
11960 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
11961 }
11962#line 11963 "parse.c"
11963 break;
11964
11965 case 21: /* stmts: stmt_or_begin */
11966#line 3181 "parse.y"
11967 {
11968 (yyval.node) = newline_node((yyvsp[0].node));
11969 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
11970 }
11971#line 11972 "parse.c"
11972 break;
11973
11974 case 22: /* stmts: stmts terms stmt_or_begin */
11975#line 3186 "parse.y"
11976 {
11977 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
11978 /*% ripper: stmts_add!($:1, $:3) %*/
11979 }
11980#line 11981 "parse.c"
11981 break;
11982
11983 case 24: /* $@5: %empty */
11984#line 3194 "parse.y"
11985 {
11986 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
11987 }
11988#line 11989 "parse.c"
11989 break;
11990
11991 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
11992#line 3198 "parse.y"
11993 {
11994 (yyval.node) = (yyvsp[0].node);
11995 }
11996#line 11997 "parse.c"
11997 break;
11998
11999 case 26: /* allow_exits: %empty */
12000#line 3203 "parse.y"
12001 {(yyval.node_exits) = allow_block_exit(p);}
12002#line 12003 "parse.c"
12003 break;
12004
12005 case 27: /* k_END: "'END'" lex_ctxt */
12006#line 3206 "parse.y"
12007 {
12008 (yyval.ctxt) = (yyvsp[0].ctxt);
12009 p->ctxt.in_rescue = before_rescue;
12010 /*% ripper: $:2 %*/
12011 }
12012#line 12013 "parse.c"
12013 break;
12014
12015 case 28: /* $@6: %empty */
12016#line 3212 "parse.y"
12017 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12018#line 12019 "parse.c"
12019 break;
12020
12021 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12022#line 3213 "parse.y"
12023 {
12024 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12025 /*% ripper: alias!($:2, $:4) %*/
12026 }
12027#line 12028 "parse.c"
12028 break;
12029
12030 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12031#line 3218 "parse.y"
12032 {
12033 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12034 /*% ripper: var_alias!($:2, $:3) %*/
12035 }
12036#line 12037 "parse.c"
12037 break;
12038
12039 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12040#line 3223 "parse.y"
12041 {
12042 char buf[2];
12043 buf[0] = '$';
12044 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12045 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12046 /*% ripper: var_alias!($:2, $:3) %*/
12047 }
12048#line 12049 "parse.c"
12049 break;
12050
12051 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12052#line 3231 "parse.y"
12053 {
12054 static const char mesg[] = "can't make alias for the number variables";
12055 /*%%%*/
12056 yyerror1(&(yylsp[0]), mesg);
12057 /*% %*/
12058 (yyval.node) = NEW_ERROR(&(yyloc));
12059 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
12060 }
12061#line 12062 "parse.c"
12062 break;
12063
12064 case 33: /* stmt: "'undef'" undef_list */
12065#line 3240 "parse.y"
12066 {
12067 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12068 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12069 (yyval.node) = (yyvsp[0].node);
12070 /*% ripper: undef!($:2) %*/
12071 }
12072#line 12073 "parse.c"
12073 break;
12074
12075 case 34: /* stmt: stmt "'if' modifier" expr_value */
12076#line 3247 "parse.y"
12077 {
12078 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12079 fixpos((yyval.node), (yyvsp[0].node));
12080 /*% ripper: if_mod!($:3, $:1) %*/
12081 }
12082#line 12083 "parse.c"
12083 break;
12084
12085 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12086#line 3253 "parse.y"
12087 {
12088 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12089 fixpos((yyval.node), (yyvsp[0].node));
12090 /*% ripper: unless_mod!($:3, $:1) %*/
12091 }
12092#line 12093 "parse.c"
12093 break;
12094
12095 case 36: /* stmt: stmt "'while' modifier" expr_value */
12096#line 3259 "parse.y"
12097 {
12098 clear_block_exit(p, false);
12099 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12100 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12101 }
12102 else {
12103 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12104 }
12105 /*% ripper: while_mod!($:3, $:1) %*/
12106 }
12107#line 12108 "parse.c"
12108 break;
12109
12110 case 37: /* stmt: stmt "'until' modifier" expr_value */
12111#line 3270 "parse.y"
12112 {
12113 clear_block_exit(p, false);
12114 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12115 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12116 }
12117 else {
12118 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12119 }
12120 /*% ripper: until_mod!($:3, $:1) %*/
12121 }
12122#line 12123 "parse.c"
12123 break;
12124
12125 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12126#line 3281 "parse.y"
12127 {
12128 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12129 NODE *resq;
12130 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12131 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12132 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12133 /*% ripper: rescue_mod!($:1, $:4) %*/
12134 }
12135#line 12136 "parse.c"
12136 break;
12137
12138 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12139#line 3290 "parse.y"
12140 {
12141 if (p->ctxt.in_def) {
12142 rb_warn0("END in method; use at_exit");
12143 }
12144 restore_block_exit(p, (yyvsp[-3].node_exits));
12145 p->ctxt = (yyvsp[-4].ctxt);
12146 {
12147 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, &(yyloc));
12148 (yyval.node) = NEW_POSTEXE(scope, &(yyloc));
12149 }
12150 /*% ripper: END!($:compstmt) %*/
12151 }
12152#line 12153 "parse.c"
12153 break;
12154
12155 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12156#line 3304 "parse.y"
12157 {
12158 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12159 /*% ripper: massign!($:1, $:4) %*/
12160 }
12161#line 12162 "parse.c"
12162 break;
12163
12164 case 42: /* asgn_lhs_mrhs: lhs '=' lex_ctxt mrhs */
12165#line 2921 "parse.y"
12166 {
12167 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12168 /*% ripper: assign!($:1, $:4) %*/
12169 }
12170#line 12171 "parse.c"
12171 break;
12172
12173 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12174#line 3311 "parse.y"
12175 {
12176 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12177 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12178 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12179 loc.beg_pos = (yylsp[-3]).beg_pos;
12180 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12181 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12182 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12183 }
12184#line 12185 "parse.c"
12185 break;
12186
12187 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12188#line 3321 "parse.y"
12189 {
12190 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12191 /*% ripper: massign!($:1, $:4) %*/
12192 }
12193#line 12194 "parse.c"
12194 break;
12195
12196 case 47: /* stmt: error */
12197#line 3327 "parse.y"
12198 {
12199 (void)yynerrs;
12200 (yyval.node) = NEW_ERROR(&(yyloc));
12201 }
12202#line 12203 "parse.c"
12203 break;
12204
12205 case 48: /* asgn_lhs_command_rhs: lhs '=' lex_ctxt command_rhs */
12206#line 2921 "parse.y"
12207 {
12208 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12209 /*% ripper: assign!($:1, $:4) %*/
12210 }
12211#line 12212 "parse.c"
12212 break;
12213
12214 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12215#line 3010 "parse.y"
12216 {
12217 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12218 /*% ripper: opassign!($:1, $:2, $:4) %*/
12219 }
12220#line 12221 "parse.c"
12221 break;
12222
12223 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12224#line 3015 "parse.y"
12225 {
12226 (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]));
12227 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12228 }
12229#line 12230 "parse.c"
12230 break;
12231
12232 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12233#line 3020 "parse.y"
12234 {
12235 (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]));
12236 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12237 }
12238#line 12239 "parse.c"
12239 break;
12240
12241 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12242#line 3025 "parse.y"
12243 {
12244 (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]));
12245 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12246 }
12247#line 12248 "parse.c"
12248 break;
12249
12250 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12251#line 3030 "parse.y"
12252 {
12253 (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]));
12254 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12255 }
12256#line 12257 "parse.c"
12257 break;
12258
12259 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12260#line 3035 "parse.y"
12261 {
12262 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12263 (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));
12264 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12265 }
12266#line 12267 "parse.c"
12267 break;
12268
12269 case 56: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12270#line 3041 "parse.y"
12271 {
12272 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12273 (yyval.node) = NEW_ERROR(&(yyloc));
12274 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12275 }
12276#line 12277 "parse.c"
12277 break;
12278
12279 case 58: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12280#line 2929 "parse.y"
12281 {
12282 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12283 restore_defun(p, (yyvsp[-3].node_def_temp));
12284 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12285 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12286 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12287 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12288 /*% ripper: def!($:head, $:args, $:$) %*/
12289 local_pop(p);
12290 }
12291#line 12292 "parse.c"
12292 break;
12293
12294 case 59: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12295#line 2940 "parse.y"
12296 {
12297 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12298 restore_defun(p, (yyvsp[-3].node_def_temp));
12299 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12300 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12301 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12302 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12303 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12304 local_pop(p);
12305 }
12306#line 12307 "parse.c"
12307 break;
12308
12309 case 62: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12310#line 3340 "parse.y"
12311 {
12312 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12313 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12314 /*% ripper: rescue_mod!($:1, $:4) %*/
12315 }
12316#line 12317 "parse.c"
12317 break;
12318
12319 case 65: /* endless_command: "'not'" option_'\n' endless_command */
12320#line 3346 "parse.y"
12321 {
12322 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12323 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12324 }
12325#line 12326 "parse.c"
12326 break;
12327
12328 case 67: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12329#line 3354 "parse.y"
12330 {
12331 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12332 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12333 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12334 /*% ripper: rescue_mod!($:1, $:4) %*/
12335 }
12336#line 12337 "parse.c"
12337 break;
12338
12339 case 70: /* expr: expr "'and'" expr */
12340#line 3365 "parse.y"
12341 {
12342 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12343 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12344 }
12345#line 12346 "parse.c"
12346 break;
12347
12348 case 71: /* expr: expr "'or'" expr */
12349#line 3370 "parse.y"
12350 {
12351 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12352 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12353 }
12354#line 12355 "parse.c"
12355 break;
12356
12357 case 72: /* expr: "'not'" option_'\n' expr */
12358#line 3375 "parse.y"
12359 {
12360 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12361 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12362 }
12363#line 12364 "parse.c"
12364 break;
12365
12366 case 73: /* expr: '!' command_call */
12367#line 3380 "parse.y"
12368 {
12369 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12370 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12371 }
12372#line 12373 "parse.c"
12373 break;
12374
12375 case 74: /* $@7: %empty */
12376#line 3385 "parse.y"
12377 {
12378 value_expr((yyvsp[-1].node));
12379 }
12380#line 12381 "parse.c"
12381 break;
12382
12383 case 75: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12384#line 3390 "parse.y"
12385 {
12386 pop_pktbl(p, (yyvsp[-1].tbl));
12387 pop_pvtbl(p, (yyvsp[-2].tbl));
12388 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12389 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), 0, 0, &(yylsp[0])), &(yyloc), &NULL_LOC, &NULL_LOC);
12390 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12391 }
12392#line 12393 "parse.c"
12393 break;
12394
12395 case 76: /* $@8: %empty */
12396#line 3398 "parse.y"
12397 {
12398 value_expr((yyvsp[-1].node));
12399 }
12400#line 12401 "parse.c"
12401 break;
12402
12403 case 77: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12404#line 3403 "parse.y"
12405 {
12406 pop_pktbl(p, (yyvsp[-1].tbl));
12407 pop_pvtbl(p, (yyvsp[-2].tbl));
12408 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12409 (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);
12410 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12411 }
12412#line 12413 "parse.c"
12413 break;
12414
12415 case 79: /* def_name: fname */
12416#line 3414 "parse.y"
12417 {
12418 numparam_name(p, (yyvsp[0].id));
12419 local_push(p, 0);
12420 p->ctxt.in_def = 1;
12421 p->ctxt.in_rescue = before_rescue;
12422 p->ctxt.cant_return = 0;
12423 (yyval.id) = (yyvsp[0].id);
12424 }
12425#line 12426 "parse.c"
12426 break;
12427
12428 case 80: /* defn_head: k_def def_name */
12429#line 3425 "parse.y"
12430 {
12431 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12432 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12433 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12434 /*% ripper: $:def_name %*/
12435 }
12436#line 12437 "parse.c"
12437 break;
12438
12439 case 81: /* $@9: %empty */
12440#line 3434 "parse.y"
12441 {
12442 SET_LEX_STATE(EXPR_FNAME);
12443 }
12444#line 12445 "parse.c"
12445 break;
12446
12447 case 82: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12448#line 3438 "parse.y"
12449 {
12450 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12451 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12452 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12453 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12454 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12455 }
12456#line 12457 "parse.c"
12457 break;
12458
12459 case 83: /* value_expr_expr: expr */
12460#line 3063 "parse.y"
12461 {
12462 value_expr((yyvsp[0].node));
12463 (yyval.node) = (yyvsp[0].node);
12464 }
12465#line 12466 "parse.c"
12466 break;
12467
12468 case 85: /* expr_value: error */
12469#line 3449 "parse.y"
12470 {
12471 (yyval.node) = NEW_ERROR(&(yyloc));
12472 }
12473#line 12474 "parse.c"
12474 break;
12475
12476 case 86: /* $@10: %empty */
12477#line 3454 "parse.y"
12478 {COND_PUSH(1);}
12479#line 12480 "parse.c"
12480 break;
12481
12482 case 87: /* $@11: %empty */
12483#line 3454 "parse.y"
12484 {COND_POP();}
12485#line 12486 "parse.c"
12486 break;
12487
12488 case 88: /* expr_value_do: $@10 expr_value do $@11 */
12489#line 3455 "parse.y"
12490 {
12491 (yyval.node) = (yyvsp[-2].node);
12492 /*% ripper: $:2 %*/
12493 }
12494#line 12495 "parse.c"
12495 break;
12496
12497 case 91: /* value_expr_command_call: command_call */
12498#line 3063 "parse.y"
12499 {
12500 value_expr((yyvsp[0].node));
12501 (yyval.node) = (yyvsp[0].node);
12502 }
12503#line 12504 "parse.c"
12504 break;
12505
12506 case 94: /* block_command: block_call call_op2 operation2 command_args */
12507#line 3470 "parse.y"
12508 {
12509 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12510 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12511 }
12512#line 12513 "parse.c"
12513 break;
12514
12515 case 95: /* cmd_brace_block: "{ arg" brace_body '}' */
12516#line 3477 "parse.y"
12517 {
12518 (yyval.node) = (yyvsp[-1].node);
12519 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12520 /*% ripper: $:2 %*/
12521 }
12522#line 12523 "parse.c"
12523 break;
12524
12525 case 96: /* fcall: operation */
12526#line 3485 "parse.y"
12527 {
12528 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12529 /*% ripper: $:1 %*/
12530 }
12531#line 12532 "parse.c"
12532 break;
12533
12534 case 97: /* command: fcall command_args */
12535#line 3492 "parse.y"
12536 {
12537 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12538 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12539 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12540 /*% ripper: command!($:1, $:2) %*/
12541 }
12542#line 12543 "parse.c"
12543 break;
12544
12545 case 98: /* command: fcall command_args cmd_brace_block */
12546#line 3499 "parse.y"
12547 {
12548 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12549 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12550 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12551 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12552 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12553 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12554 }
12555#line 12556 "parse.c"
12556 break;
12557
12558 case 99: /* command: primary_value call_op operation2 command_args */
12559#line 3508 "parse.y"
12560 {
12561 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12562 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12563 }
12564#line 12565 "parse.c"
12565 break;
12566
12567 case 100: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12568#line 3513 "parse.y"
12569 {
12570 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12571 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12572 }
12573#line 12574 "parse.c"
12574 break;
12575
12576 case 101: /* command: primary_value "::" operation2 command_args */
12577#line 3518 "parse.y"
12578 {
12579 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12580 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12581 }
12582#line 12583 "parse.c"
12583 break;
12584
12585 case 102: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12586#line 3523 "parse.y"
12587 {
12588 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12589 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12590 }
12591#line 12592 "parse.c"
12592 break;
12593
12594 case 103: /* command: primary_value "::" "constant" '{' brace_body '}' */
12595#line 3528 "parse.y"
12596 {
12597 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12598 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12599 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12600 }
12601#line 12602 "parse.c"
12602 break;
12603
12604 case 104: /* command: "'super'" command_args */
12605#line 3534 "parse.y"
12606 {
12607 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12608 fixpos((yyval.node), (yyvsp[0].node));
12609 /*% ripper: super!($:2) %*/
12610 }
12611#line 12612 "parse.c"
12612 break;
12613
12614 case 105: /* command: k_yield command_args */
12615#line 3540 "parse.y"
12616 {
12617 (yyval.node) = new_yield(p, (yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12618 fixpos((yyval.node), (yyvsp[0].node));
12619 /*% ripper: yield!($:2) %*/
12620 }
12621#line 12622 "parse.c"
12622 break;
12623
12624 case 106: /* command: k_return call_args */
12625#line 3546 "parse.y"
12626 {
12627 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12628 /*% ripper: return!($:2) %*/
12629 }
12630#line 12631 "parse.c"
12631 break;
12632
12633 case 107: /* command: "'break'" call_args */
12634#line 3551 "parse.y"
12635 {
12636 NODE *args = 0;
12637 args = ret_args(p, (yyvsp[0].node));
12638 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12639 /*% ripper: break!($:2) %*/
12640 }
12641#line 12642 "parse.c"
12642 break;
12643
12644 case 108: /* command: "'next'" call_args */
12645#line 3558 "parse.y"
12646 {
12647 NODE *args = 0;
12648 args = ret_args(p, (yyvsp[0].node));
12649 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12650 /*% ripper: next!($:2) %*/
12651 }
12652#line 12653 "parse.c"
12653 break;
12654
12655 case 110: /* mlhs: "(" mlhs_inner rparen */
12656#line 3568 "parse.y"
12657 {
12658 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12659 /*% ripper: mlhs_paren!($:2) %*/
12660 }
12661#line 12662 "parse.c"
12662 break;
12663
12664 case 112: /* mlhs_inner: "(" mlhs_inner rparen */
12665#line 3576 "parse.y"
12666 {
12667 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12668 /*% ripper: mlhs_paren!($:2) %*/
12669 }
12670#line 12671 "parse.c"
12671 break;
12672
12673 case 113: /* mlhs_basic: mlhs_head */
12674#line 3583 "parse.y"
12675 {
12676 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12677 /*% ripper: $:1 %*/
12678 }
12679#line 12680 "parse.c"
12680 break;
12681
12682 case 114: /* mlhs_basic: mlhs_head mlhs_item */
12683#line 3588 "parse.y"
12684 {
12685 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12686 /*% ripper: mlhs_add!($:1, $:2) %*/
12687 }
12688#line 12689 "parse.c"
12689 break;
12690
12691 case 115: /* mlhs_basic: mlhs_head "*" mlhs_node */
12692#line 3593 "parse.y"
12693 {
12694 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12695 /*% ripper: mlhs_add_star!($:1, $:3) %*/
12696 }
12697#line 12698 "parse.c"
12698 break;
12699
12700 case 116: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_post */
12701#line 3598 "parse.y"
12702 {
12703 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12704 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12705 }
12706#line 12707 "parse.c"
12707 break;
12708
12709 case 117: /* mlhs_basic: mlhs_head "*" */
12710#line 3603 "parse.y"
12711 {
12712 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12713 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
12714 }
12715#line 12716 "parse.c"
12716 break;
12717
12718 case 118: /* mlhs_basic: mlhs_head "*" ',' mlhs_post */
12719#line 3608 "parse.y"
12720 {
12721 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12722 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
12723 }
12724#line 12725 "parse.c"
12725 break;
12726
12727 case 119: /* mlhs_basic: "*" mlhs_node */
12728#line 3613 "parse.y"
12729 {
12730 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
12731 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
12732 }
12733#line 12734 "parse.c"
12734 break;
12735
12736 case 120: /* mlhs_basic: "*" mlhs_node ',' mlhs_post */
12737#line 3618 "parse.y"
12738 {
12739 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12740 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
12741 }
12742#line 12743 "parse.c"
12743 break;
12744
12745 case 121: /* mlhs_basic: "*" */
12746#line 3623 "parse.y"
12747 {
12748 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12749 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
12750 }
12751#line 12752 "parse.c"
12752 break;
12753
12754 case 122: /* mlhs_basic: "*" ',' mlhs_post */
12755#line 3628 "parse.y"
12756 {
12757 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12758 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
12759 }
12760#line 12761 "parse.c"
12761 break;
12762
12763 case 124: /* mlhs_item: "(" mlhs_inner rparen */
12764#line 3636 "parse.y"
12765 {
12766 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
12767 /*% ripper: mlhs_paren!($:2) %*/
12768 }
12769#line 12770 "parse.c"
12770 break;
12771
12772 case 125: /* mlhs_head: mlhs_item ',' */
12773#line 3643 "parse.y"
12774 {
12775 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
12776 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12777 }
12778#line 12779 "parse.c"
12779 break;
12780
12781 case 126: /* mlhs_head: mlhs_head mlhs_item ',' */
12782#line 3648 "parse.y"
12783 {
12784 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
12785 /*% ripper: mlhs_add!($:1, $:2) %*/
12786 }
12787#line 12788 "parse.c"
12788 break;
12789
12790 case 127: /* mlhs_post: mlhs_item */
12791#line 3655 "parse.y"
12792 {
12793 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12794 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12795 }
12796#line 12797 "parse.c"
12797 break;
12798
12799 case 128: /* mlhs_post: mlhs_post ',' mlhs_item */
12800#line 3660 "parse.y"
12801 {
12802 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12803 /*% ripper: mlhs_add!($:1, $:3) %*/
12804 }
12805#line 12806 "parse.c"
12806 break;
12807
12808 case 129: /* mlhs_node: user_variable */
12809#line 3667 "parse.y"
12810 {
12811 /*% ripper: var_field!($:1) %*/
12812 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12813 }
12814#line 12815 "parse.c"
12815 break;
12816
12817 case 130: /* mlhs_node: keyword_variable */
12818#line 3667 "parse.y"
12819 {
12820 /*% ripper: var_field!($:1) %*/
12821 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12822 }
12823#line 12824 "parse.c"
12824 break;
12825
12826 case 131: /* mlhs_node: primary_value '[' opt_call_args rbracket */
12827#line 3672 "parse.y"
12828 {
12829 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
12830 /*% ripper: aref_field!($:1, $:3) %*/
12831 }
12832#line 12833 "parse.c"
12833 break;
12834
12835 case 132: /* mlhs_node: primary_value call_op "local variable or method" */
12836#line 3677 "parse.y"
12837 {
12838 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
12839 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12840 /*% ripper: field!($:1, $:2, $:3) %*/
12841 }
12842#line 12843 "parse.c"
12843 break;
12844
12845 case 133: /* mlhs_node: primary_value call_op "constant" */
12846#line 3677 "parse.y"
12847 {
12848 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
12849 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12850 /*% ripper: field!($:1, $:2, $:3) %*/
12851 }
12852#line 12853 "parse.c"
12853 break;
12854
12855 case 134: /* mlhs_node: primary_value "::" "local variable or method" */
12856#line 3683 "parse.y"
12857 {
12858 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
12859 /*% ripper: const_path_field!($:1, $:3) %*/
12860 }
12861#line 12862 "parse.c"
12862 break;
12863
12864 case 135: /* mlhs_node: primary_value "::" "constant" */
12865#line 3688 "parse.y"
12866 {
12867 /*% ripper: const_path_field!($:1, $:3) %*/
12868 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
12869 }
12870#line 12871 "parse.c"
12871 break;
12872
12873 case 136: /* mlhs_node: ":: at EXPR_BEG" "constant" */
12874#line 3693 "parse.y"
12875 {
12876 /*% ripper: top_const_field!($:2) %*/
12877 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
12878 }
12879#line 12880 "parse.c"
12880 break;
12881
12882 case 137: /* mlhs_node: backref */
12883#line 3698 "parse.y"
12884 {
12885 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
12886 (yyval.node) = NEW_ERROR(&(yyloc));
12887 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
12888 }
12889#line 12890 "parse.c"
12890 break;
12891
12892 case 138: /* lhs: user_variable */
12893#line 3706 "parse.y"
12894 {
12895 /*% ripper: var_field!($:1) %*/
12896 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12897 }
12898#line 12899 "parse.c"
12899 break;
12900
12901 case 139: /* lhs: keyword_variable */
12902#line 3706 "parse.y"
12903 {
12904 /*% ripper: var_field!($:1) %*/
12905 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12906 }
12907#line 12908 "parse.c"
12908 break;
12909
12910 case 140: /* lhs: primary_value '[' opt_call_args rbracket */
12911#line 3711 "parse.y"
12912 {
12913 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
12914 /*% ripper: aref_field!($:1, $:3) %*/
12915 }
12916#line 12917 "parse.c"
12917 break;
12918
12919 case 141: /* lhs: primary_value call_op "local variable or method" */
12920#line 3716 "parse.y"
12921 {
12922 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12923 /*% ripper: field!($:1, $:2, $:3) %*/
12924 }
12925#line 12926 "parse.c"
12926 break;
12927
12928 case 142: /* lhs: primary_value "::" "local variable or method" */
12929#line 3721 "parse.y"
12930 {
12931 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
12932 /*% ripper: field!($:1, $:2, $:3) %*/
12933 }
12934#line 12935 "parse.c"
12935 break;
12936
12937 case 143: /* lhs: primary_value call_op "constant" */
12938#line 3726 "parse.y"
12939 {
12940 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12941 /*% ripper: field!($:1, $:2, $:3) %*/
12942 }
12943#line 12944 "parse.c"
12944 break;
12945
12946 case 144: /* lhs: primary_value "::" "constant" */
12947#line 3731 "parse.y"
12948 {
12949 /*% ripper: const_path_field!($:1, $:3) %*/
12950 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
12951 }
12952#line 12953 "parse.c"
12953 break;
12954
12955 case 145: /* lhs: ":: at EXPR_BEG" "constant" */
12956#line 3736 "parse.y"
12957 {
12958 /*% ripper: top_const_field!($:2) %*/
12959 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
12960 }
12961#line 12962 "parse.c"
12962 break;
12963
12964 case 146: /* lhs: backref */
12965#line 3741 "parse.y"
12966 {
12967 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
12968 (yyval.node) = NEW_ERROR(&(yyloc));
12969 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
12970 }
12971#line 12972 "parse.c"
12972 break;
12973
12974 case 147: /* cname: "local variable or method" */
12975#line 3749 "parse.y"
12976 {
12977 static const char mesg[] = "class/module name must be CONSTANT";
12978 /*%%%*/
12979 yyerror1(&(yylsp[0]), mesg);
12980 /*% %*/
12981 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
12982 }
12983#line 12984 "parse.c"
12984 break;
12985
12986 case 149: /* cpath: ":: at EXPR_BEG" cname */
12987#line 3760 "parse.y"
12988 {
12989 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
12990 /*% ripper: top_const_ref!($:2) %*/
12991 }
12992#line 12993 "parse.c"
12993 break;
12994
12995 case 150: /* cpath: cname */
12996#line 3765 "parse.y"
12997 {
12998 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc));
12999 /*% ripper: const_ref!($:1) %*/
13000 }
13001#line 13002 "parse.c"
13002 break;
13003
13004 case 151: /* cpath: primary_value "::" cname */
13005#line 3770 "parse.y"
13006 {
13007 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
13008 /*% ripper: const_path_ref!($:1, $:3) %*/
13009 }
13010#line 13011 "parse.c"
13011 break;
13012
13013 case 155: /* fname: op */
13014#line 3778 "parse.y"
13015 {
13016 SET_LEX_STATE(EXPR_ENDFN);
13017 (yyval.id) = (yyvsp[0].id);
13018 }
13019#line 13020 "parse.c"
13020 break;
13021
13022 case 157: /* fitem: fname */
13023#line 3786 "parse.y"
13024 {
13025 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13026 /*% ripper: symbol_literal!($:1) %*/
13027 }
13028#line 13029 "parse.c"
13029 break;
13030
13031 case 159: /* undef_list: fitem */
13032#line 3794 "parse.y"
13033 {
13034 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13035 /*% ripper: rb_ary_new3(1, $:1) %*/
13036 }
13037#line 13038 "parse.c"
13038 break;
13039
13040 case 160: /* $@12: %empty */
13041#line 3798 "parse.y"
13042 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13043#line 13044 "parse.c"
13044 break;
13045
13046 case 161: /* undef_list: undef_list ',' $@12 fitem */
13047#line 3799 "parse.y"
13048 {
13049 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13050 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13051 /*% ripper: rb_ary_push($:1, $:4) %*/
13052 }
13053#line 13054 "parse.c"
13054 break;
13055
13056 case 162: /* op: '|' */
13057#line 3806 "parse.y"
13058 { (yyval.id) = '|'; }
13059#line 13060 "parse.c"
13060 break;
13061
13062 case 163: /* op: '^' */
13063#line 3807 "parse.y"
13064 { (yyval.id) = '^'; }
13065#line 13066 "parse.c"
13066 break;
13067
13068 case 164: /* op: '&' */
13069#line 3808 "parse.y"
13070 { (yyval.id) = '&'; }
13071#line 13072 "parse.c"
13072 break;
13073
13074 case 165: /* op: "<=>" */
13075#line 3809 "parse.y"
13076 { (yyval.id) = tCMP; }
13077#line 13078 "parse.c"
13078 break;
13079
13080 case 166: /* op: "==" */
13081#line 3810 "parse.y"
13082 { (yyval.id) = tEQ; }
13083#line 13084 "parse.c"
13084 break;
13085
13086 case 167: /* op: "===" */
13087#line 3811 "parse.y"
13088 { (yyval.id) = tEQQ; }
13089#line 13090 "parse.c"
13090 break;
13091
13092 case 168: /* op: "=~" */
13093#line 3812 "parse.y"
13094 { (yyval.id) = tMATCH; }
13095#line 13096 "parse.c"
13096 break;
13097
13098 case 169: /* op: "!~" */
13099#line 3813 "parse.y"
13100 { (yyval.id) = tNMATCH; }
13101#line 13102 "parse.c"
13102 break;
13103
13104 case 170: /* op: '>' */
13105#line 3814 "parse.y"
13106 { (yyval.id) = '>'; }
13107#line 13108 "parse.c"
13108 break;
13109
13110 case 171: /* op: ">=" */
13111#line 3815 "parse.y"
13112 { (yyval.id) = tGEQ; }
13113#line 13114 "parse.c"
13114 break;
13115
13116 case 172: /* op: '<' */
13117#line 3816 "parse.y"
13118 { (yyval.id) = '<'; }
13119#line 13120 "parse.c"
13120 break;
13121
13122 case 173: /* op: "<=" */
13123#line 3817 "parse.y"
13124 { (yyval.id) = tLEQ; }
13125#line 13126 "parse.c"
13126 break;
13127
13128 case 174: /* op: "!=" */
13129#line 3818 "parse.y"
13130 { (yyval.id) = tNEQ; }
13131#line 13132 "parse.c"
13132 break;
13133
13134 case 175: /* op: "<<" */
13135#line 3819 "parse.y"
13136 { (yyval.id) = tLSHFT; }
13137#line 13138 "parse.c"
13138 break;
13139
13140 case 176: /* op: ">>" */
13141#line 3820 "parse.y"
13142 { (yyval.id) = tRSHFT; }
13143#line 13144 "parse.c"
13144 break;
13145
13146 case 177: /* op: '+' */
13147#line 3821 "parse.y"
13148 { (yyval.id) = '+'; }
13149#line 13150 "parse.c"
13150 break;
13151
13152 case 178: /* op: '-' */
13153#line 3822 "parse.y"
13154 { (yyval.id) = '-'; }
13155#line 13156 "parse.c"
13156 break;
13157
13158 case 179: /* op: '*' */
13159#line 3823 "parse.y"
13160 { (yyval.id) = '*'; }
13161#line 13162 "parse.c"
13162 break;
13163
13164 case 180: /* op: "*" */
13165#line 3824 "parse.y"
13166 { (yyval.id) = '*'; }
13167#line 13168 "parse.c"
13168 break;
13169
13170 case 181: /* op: '/' */
13171#line 3825 "parse.y"
13172 { (yyval.id) = '/'; }
13173#line 13174 "parse.c"
13174 break;
13175
13176 case 182: /* op: '%' */
13177#line 3826 "parse.y"
13178 { (yyval.id) = '%'; }
13179#line 13180 "parse.c"
13180 break;
13181
13182 case 183: /* op: "**" */
13183#line 3827 "parse.y"
13184 { (yyval.id) = tPOW; }
13185#line 13186 "parse.c"
13186 break;
13187
13188 case 184: /* op: "**arg" */
13189#line 3828 "parse.y"
13190 { (yyval.id) = tDSTAR; }
13191#line 13192 "parse.c"
13192 break;
13193
13194 case 185: /* op: '!' */
13195#line 3829 "parse.y"
13196 { (yyval.id) = '!'; }
13197#line 13198 "parse.c"
13198 break;
13199
13200 case 186: /* op: '~' */
13201#line 3830 "parse.y"
13202 { (yyval.id) = '~'; }
13203#line 13204 "parse.c"
13204 break;
13205
13206 case 187: /* op: "unary+" */
13207#line 3831 "parse.y"
13208 { (yyval.id) = tUPLUS; }
13209#line 13210 "parse.c"
13210 break;
13211
13212 case 188: /* op: "unary-" */
13213#line 3832 "parse.y"
13214 { (yyval.id) = tUMINUS; }
13215#line 13216 "parse.c"
13216 break;
13217
13218 case 189: /* op: "[]" */
13219#line 3833 "parse.y"
13220 { (yyval.id) = tAREF; }
13221#line 13222 "parse.c"
13222 break;
13223
13224 case 190: /* op: "[]=" */
13225#line 3834 "parse.y"
13226 { (yyval.id) = tASET; }
13227#line 13228 "parse.c"
13228 break;
13229
13230 case 191: /* op: '`' */
13231#line 3835 "parse.y"
13232 { (yyval.id) = '`'; }
13233#line 13234 "parse.c"
13234 break;
13235
13236 case 233: /* asgn_lhs_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13237#line 2921 "parse.y"
13238 {
13239 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13240 /*% ripper: assign!($:1, $:4) %*/
13241 }
13242#line 13243 "parse.c"
13243 break;
13244
13245 case 235: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13246#line 3010 "parse.y"
13247 {
13248 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13249 /*% ripper: opassign!($:1, $:2, $:4) %*/
13250 }
13251#line 13252 "parse.c"
13252 break;
13253
13254 case 236: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13255#line 3015 "parse.y"
13256 {
13257 (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]));
13258 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13259 }
13260#line 13261 "parse.c"
13261 break;
13262
13263 case 237: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13264#line 3020 "parse.y"
13265 {
13266 (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]));
13267 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13268 }
13269#line 13270 "parse.c"
13270 break;
13271
13272 case 238: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13273#line 3025 "parse.y"
13274 {
13275 (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]));
13276 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13277 }
13278#line 13279 "parse.c"
13279 break;
13280
13281 case 239: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13282#line 3030 "parse.y"
13283 {
13284 (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]));
13285 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13286 }
13287#line 13288 "parse.c"
13288 break;
13289
13290 case 240: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13291#line 3035 "parse.y"
13292 {
13293 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13294 (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));
13295 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13296 }
13297#line 13298 "parse.c"
13298 break;
13299
13300 case 241: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13301#line 3041 "parse.y"
13302 {
13303 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13304 (yyval.node) = NEW_ERROR(&(yyloc));
13305 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13306 }
13307#line 13308 "parse.c"
13308 break;
13309
13310 case 243: /* arg: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13311#line 3855 "parse.y"
13312 {
13313 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13314 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13315 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13316 }
13317#line 13318 "parse.c"
13318 break;
13319
13320 case 244: /* arg: arg ".." arg */
13321#line 3861 "parse.y"
13322 {
13323 value_expr((yyvsp[-2].node));
13324 value_expr((yyvsp[0].node));
13325 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13326 /*% ripper: dot2!($:1, $:3) %*/
13327 }
13328#line 13329 "parse.c"
13329 break;
13330
13331 case 245: /* arg: arg "..." arg */
13332#line 3868 "parse.y"
13333 {
13334 value_expr((yyvsp[-2].node));
13335 value_expr((yyvsp[0].node));
13336 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13337 /*% ripper: dot3!($:1, $:3) %*/
13338 }
13339#line 13340 "parse.c"
13340 break;
13341
13342 case 246: /* arg: arg ".." */
13343#line 3875 "parse.y"
13344 {
13345 value_expr((yyvsp[-1].node));
13346 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13347 /*% ripper: dot2!($:1, Qnil) %*/
13348 }
13349#line 13350 "parse.c"
13350 break;
13351
13352 case 247: /* arg: arg "..." */
13353#line 3881 "parse.y"
13354 {
13355 value_expr((yyvsp[-1].node));
13356 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13357 /*% ripper: dot3!($:1, Qnil) %*/
13358 }
13359#line 13360 "parse.c"
13360 break;
13361
13362 case 248: /* arg: "(.." arg */
13363#line 3887 "parse.y"
13364 {
13365 value_expr((yyvsp[0].node));
13366 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13367 /*% ripper: dot2!(Qnil, $:2) %*/
13368 }
13369#line 13370 "parse.c"
13370 break;
13371
13372 case 249: /* arg: "(..." arg */
13373#line 3893 "parse.y"
13374 {
13375 value_expr((yyvsp[0].node));
13376 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13377 /*% ripper: dot3!(Qnil, $:2) %*/
13378 }
13379#line 13380 "parse.c"
13380 break;
13381
13382 case 250: /* arg: arg '+' arg */
13383#line 3899 "parse.y"
13384 {
13385 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13386 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13387 }
13388#line 13389 "parse.c"
13389 break;
13390
13391 case 251: /* arg: arg '-' arg */
13392#line 3904 "parse.y"
13393 {
13394 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13395 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13396 }
13397#line 13398 "parse.c"
13398 break;
13399
13400 case 252: /* arg: arg '*' arg */
13401#line 3909 "parse.y"
13402 {
13403 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13404 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13405 }
13406#line 13407 "parse.c"
13407 break;
13408
13409 case 253: /* arg: arg '/' arg */
13410#line 3914 "parse.y"
13411 {
13412 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13413 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13414 }
13415#line 13416 "parse.c"
13416 break;
13417
13418 case 254: /* arg: arg '%' arg */
13419#line 3919 "parse.y"
13420 {
13421 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13422 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13423 }
13424#line 13425 "parse.c"
13425 break;
13426
13427 case 255: /* arg: arg "**" arg */
13428#line 3924 "parse.y"
13429 {
13430 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13431 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13432 }
13433#line 13434 "parse.c"
13434 break;
13435
13436 case 256: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13437#line 3929 "parse.y"
13438 {
13439 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13440 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13441 }
13442#line 13443 "parse.c"
13443 break;
13444
13445 case 257: /* arg: "unary+" arg */
13446#line 3934 "parse.y"
13447 {
13448 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13449 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13450 }
13451#line 13452 "parse.c"
13452 break;
13453
13454 case 258: /* arg: "unary-" arg */
13455#line 3939 "parse.y"
13456 {
13457 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13458 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13459 }
13460#line 13461 "parse.c"
13461 break;
13462
13463 case 259: /* arg: arg '|' arg */
13464#line 3944 "parse.y"
13465 {
13466 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13467 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13468 }
13469#line 13470 "parse.c"
13470 break;
13471
13472 case 260: /* arg: arg '^' arg */
13473#line 3949 "parse.y"
13474 {
13475 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13476 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13477 }
13478#line 13479 "parse.c"
13479 break;
13480
13481 case 261: /* arg: arg '&' arg */
13482#line 3954 "parse.y"
13483 {
13484 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13485 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13486 }
13487#line 13488 "parse.c"
13488 break;
13489
13490 case 262: /* arg: arg "<=>" arg */
13491#line 3959 "parse.y"
13492 {
13493 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13494 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13495 }
13496#line 13497 "parse.c"
13497 break;
13498
13499 case 264: /* arg: arg "==" arg */
13500#line 3965 "parse.y"
13501 {
13502 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13503 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13504 }
13505#line 13506 "parse.c"
13506 break;
13507
13508 case 265: /* arg: arg "===" arg */
13509#line 3970 "parse.y"
13510 {
13511 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13512 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13513 }
13514#line 13515 "parse.c"
13515 break;
13516
13517 case 266: /* arg: arg "!=" arg */
13518#line 3975 "parse.y"
13519 {
13520 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13521 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13522 }
13523#line 13524 "parse.c"
13524 break;
13525
13526 case 267: /* arg: arg "=~" arg */
13527#line 3980 "parse.y"
13528 {
13529 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13530 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13531 }
13532#line 13533 "parse.c"
13533 break;
13534
13535 case 268: /* arg: arg "!~" arg */
13536#line 3985 "parse.y"
13537 {
13538 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13539 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13540 }
13541#line 13542 "parse.c"
13542 break;
13543
13544 case 269: /* arg: '!' arg */
13545#line 3990 "parse.y"
13546 {
13547 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13548 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13549 }
13550#line 13551 "parse.c"
13551 break;
13552
13553 case 270: /* arg: '~' arg */
13554#line 3995 "parse.y"
13555 {
13556 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13557 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13558 }
13559#line 13560 "parse.c"
13560 break;
13561
13562 case 271: /* arg: arg "<<" arg */
13563#line 4000 "parse.y"
13564 {
13565 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13566 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13567 }
13568#line 13569 "parse.c"
13569 break;
13570
13571 case 272: /* arg: arg ">>" arg */
13572#line 4005 "parse.y"
13573 {
13574 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13575 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13576 }
13577#line 13578 "parse.c"
13578 break;
13579
13580 case 273: /* arg: arg "&&" arg */
13581#line 4010 "parse.y"
13582 {
13583 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13584 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13585 }
13586#line 13587 "parse.c"
13587 break;
13588
13589 case 274: /* arg: arg "||" arg */
13590#line 4015 "parse.y"
13591 {
13592 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13593 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13594 }
13595#line 13596 "parse.c"
13596 break;
13597
13598 case 275: /* arg: "'defined?'" option_'\n' begin_defined arg */
13599#line 4020 "parse.y"
13600 {
13601 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13602 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc));
13603 /*% ripper: defined!($:4) %*/
13604 }
13605#line 13606 "parse.c"
13606 break;
13607
13608 case 276: /* arg: arg '?' arg option_'\n' ':' arg */
13609#line 4026 "parse.y"
13610 {
13611 value_expr((yyvsp[-5].node));
13612 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
13613 fixpos((yyval.node), (yyvsp[-5].node));
13614 /*% ripper: ifop!($:1, $:3, $:6) %*/
13615 }
13616#line 13617 "parse.c"
13617 break;
13618
13619 case 277: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
13620#line 2929 "parse.y"
13621 {
13622 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13623 restore_defun(p, (yyvsp[-3].node_def_temp));
13624 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13625 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13626 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13627 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13628 /*% ripper: def!($:head, $:args, $:$) %*/
13629 local_pop(p);
13630 }
13631#line 13632 "parse.c"
13632 break;
13633
13634 case 278: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
13635#line 2940 "parse.y"
13636 {
13637 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13638 restore_defun(p, (yyvsp[-3].node_def_temp));
13639 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13640 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13641 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13642 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13643 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13644 local_pop(p);
13645 }
13646#line 13647 "parse.c"
13647 break;
13648
13649 case 282: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13650#line 4038 "parse.y"
13651 {
13652 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13653 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13654 /*% ripper: rescue_mod!($:1, $:4) %*/
13655 }
13656#line 13657 "parse.c"
13657 break;
13658
13659 case 283: /* endless_arg: "'not'" option_'\n' endless_arg */
13660#line 4044 "parse.y"
13661 {
13662 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13663 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13664 }
13665#line 13666 "parse.c"
13666 break;
13667
13668 case 284: /* relop: '>' */
13669#line 4050 "parse.y"
13670 {(yyval.id) = '>';}
13671#line 13672 "parse.c"
13672 break;
13673
13674 case 285: /* relop: '<' */
13675#line 4051 "parse.y"
13676 {(yyval.id) = '<';}
13677#line 13678 "parse.c"
13678 break;
13679
13680 case 286: /* relop: ">=" */
13681#line 4052 "parse.y"
13682 {(yyval.id) = idGE;}
13683#line 13684 "parse.c"
13684 break;
13685
13686 case 287: /* relop: "<=" */
13687#line 4053 "parse.y"
13688 {(yyval.id) = idLE;}
13689#line 13690 "parse.c"
13690 break;
13691
13692 case 288: /* rel_expr: arg relop arg */
13693#line 4057 "parse.y"
13694 {
13695 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13696 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13697 }
13698#line 13699 "parse.c"
13699 break;
13700
13701 case 289: /* rel_expr: rel_expr relop arg */
13702#line 4062 "parse.y"
13703 {
13704 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13705 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13706 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13707 }
13708#line 13709 "parse.c"
13709 break;
13710
13711 case 290: /* lex_ctxt: none */
13712#line 4070 "parse.y"
13713 {
13714 (yyval.ctxt) = p->ctxt;
13715 }
13716#line 13717 "parse.c"
13717 break;
13718
13719 case 291: /* begin_defined: lex_ctxt */
13720#line 4076 "parse.y"
13721 {
13722 p->ctxt.in_defined = 1;
13723 (yyval.ctxt) = (yyvsp[0].ctxt);
13724 }
13725#line 13726 "parse.c"
13726 break;
13727
13728 case 292: /* after_rescue: lex_ctxt */
13729#line 4083 "parse.y"
13730 {
13731 p->ctxt.in_rescue = after_rescue;
13732 (yyval.ctxt) = (yyvsp[0].ctxt);
13733 }
13734#line 13735 "parse.c"
13735 break;
13736
13737 case 293: /* value_expr_arg: arg */
13738#line 3063 "parse.y"
13739 {
13740 value_expr((yyvsp[0].node));
13741 (yyval.node) = (yyvsp[0].node);
13742 }
13743#line 13744 "parse.c"
13744 break;
13745
13746 case 297: /* aref_args: args ',' assocs trailer */
13747#line 4095 "parse.y"
13748 {
13749 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13750 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13751 }
13752#line 13753 "parse.c"
13753 break;
13754
13755 case 298: /* aref_args: assocs trailer */
13756#line 4100 "parse.y"
13757 {
13758 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
13759 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13760 }
13761#line 13762 "parse.c"
13762 break;
13763
13764 case 299: /* arg_rhs: arg */
13765#line 4107 "parse.y"
13766 {
13767 value_expr((yyvsp[0].node));
13768 (yyval.node) = (yyvsp[0].node);
13769 }
13770#line 13771 "parse.c"
13771 break;
13772
13773 case 300: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
13774#line 4112 "parse.y"
13775 {
13776 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13777 value_expr((yyvsp[-3].node));
13778 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13779 /*% ripper: rescue_mod!($:1, $:4) %*/
13780 }
13781#line 13782 "parse.c"
13782 break;
13783
13784 case 301: /* paren_args: '(' opt_call_args rparen */
13785#line 4121 "parse.y"
13786 {
13787 (yyval.node) = (yyvsp[-1].node);
13788 /*% ripper: arg_paren!($:2) %*/
13789 }
13790#line 13791 "parse.c"
13791 break;
13792
13793 case 302: /* paren_args: '(' args ',' args_forward rparen */
13794#line 4126 "parse.y"
13795 {
13796 if (!check_forwarding_args(p)) {
13797 (yyval.node) = 0;
13798 }
13799 else {
13800 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
13801 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
13802 }
13803 }
13804#line 13805 "parse.c"
13805 break;
13806
13807 case 303: /* paren_args: '(' args_forward rparen */
13808#line 4136 "parse.y"
13809 {
13810 if (!check_forwarding_args(p)) {
13811 (yyval.node) = 0;
13812 }
13813 else {
13814 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
13815 /*% ripper: arg_paren!($:2) %*/
13816 }
13817 }
13818#line 13819 "parse.c"
13819 break;
13820
13821 case 305: /* opt_paren_args: paren_args */
13822#line 4149 "parse.y"
13823 {
13824 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
13825 }
13826#line 13827 "parse.c"
13827 break;
13828
13829 case 309: /* opt_call_args: args ',' assocs ',' */
13830#line 4158 "parse.y"
13831 {
13832 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13833 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13834 }
13835#line 13836 "parse.c"
13836 break;
13837
13838 case 310: /* opt_call_args: assocs ',' */
13839#line 4163 "parse.y"
13840 {
13841 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
13842 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13843 }
13844#line 13845 "parse.c"
13845 break;
13846
13847 case 311: /* value_expr_command: command */
13848#line 3063 "parse.y"
13849 {
13850 value_expr((yyvsp[0].node));
13851 (yyval.node) = (yyvsp[0].node);
13852 }
13853#line 13854 "parse.c"
13854 break;
13855
13856 case 312: /* call_args: value_expr_command */
13857#line 4170 "parse.y"
13858 {
13859 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13860 /*% ripper: args_add!(args_new!, $:1) %*/
13861 }
13862#line 13863 "parse.c"
13863 break;
13864
13865 case 313: /* call_args: args opt_block_arg */
13866#line 4175 "parse.y"
13867 {
13868 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
13869 /*% ripper: args_add_block!($:1, $:2) %*/
13870 }
13871#line 13872 "parse.c"
13872 break;
13873
13874 case 314: /* call_args: assocs opt_block_arg */
13875#line 4180 "parse.y"
13876 {
13877 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
13878 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
13879 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
13880 }
13881#line 13882 "parse.c"
13882 break;
13883
13884 case 315: /* call_args: args ',' assocs opt_block_arg */
13885#line 4186 "parse.y"
13886 {
13887 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13888 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
13889 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
13890 }
13891#line 13892 "parse.c"
13892 break;
13893
13894 case 317: /* $@13: %empty */
13895#line 4195 "parse.y"
13896 {
13897 /* If call_args starts with a open paren '(' or '[',
13898 * look-ahead reading of the letters calls CMDARG_PUSH(0),
13899 * but the push must be done after CMDARG_PUSH(1).
13900 * So this code makes them consistent by first cancelling
13901 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
13902 * and finally redoing CMDARG_PUSH(0).
13903 */
13904 int lookahead = 0;
13905 switch (yychar) {
13906 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
13907 lookahead = 1;
13908 }
13909 if (lookahead) CMDARG_POP();
13910 CMDARG_PUSH(1);
13911 if (lookahead) CMDARG_PUSH(0);
13912 }
13913#line 13914 "parse.c"
13914 break;
13915
13916 case 318: /* command_args: $@13 call_args */
13917#line 4213 "parse.y"
13918 {
13919 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
13920 * but the push must be done after CMDARG_POP() in the parser.
13921 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
13922 * CMDARG_POP() to pop 1 pushed by command_args,
13923 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
13924 */
13925 int lookahead = 0;
13926 switch (yychar) {
13927 case tLBRACE_ARG:
13928 lookahead = 1;
13929 }
13930 if (lookahead) CMDARG_POP();
13931 CMDARG_POP();
13932 if (lookahead) CMDARG_PUSH(0);
13933 (yyval.node) = (yyvsp[0].node);
13934 /*% ripper: $:2 %*/
13935 }
13936#line 13937 "parse.c"
13937 break;
13938
13939 case 319: /* block_arg: "&" arg_value */
13940#line 4234 "parse.y"
13941 {
13942 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13943 /*% ripper: $:2 %*/
13944 }
13945#line 13946 "parse.c"
13946 break;
13947
13948 case 320: /* block_arg: "&" */
13949#line 4239 "parse.y"
13950 {
13951 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
13952 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
13953 /*% ripper: Qnil %*/
13954 }
13955#line 13956 "parse.c"
13956 break;
13957
13958 case 321: /* opt_block_arg: ',' block_arg */
13959#line 4247 "parse.y"
13960 {
13961 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
13962 /*% ripper: $:2 %*/
13963 }
13964#line 13965 "parse.c"
13965 break;
13966
13967 case 322: /* opt_block_arg: none */
13968#line 4252 "parse.y"
13969 {
13970 (yyval.node_block_pass) = 0;
13971 /*% ripper: Qfalse %*/
13972 }
13973#line 13974 "parse.c"
13974 break;
13975
13976 case 323: /* args: arg_value */
13977#line 4260 "parse.y"
13978 {
13979 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13980 /*% ripper: args_add!(args_new!, $:arg_value) %*/
13981 }
13982#line 13983 "parse.c"
13983 break;
13984
13985 case 324: /* args: arg_splat */
13986#line 4265 "parse.y"
13987 {
13988 (yyval.node) = (yyvsp[0].node);
13989 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
13990 }
13991#line 13992 "parse.c"
13992 break;
13993
13994 case 325: /* args: args ',' arg_value */
13995#line 4270 "parse.y"
13996 {
13997 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13998 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
13999 }
14000#line 14001 "parse.c"
14001 break;
14002
14003 case 326: /* args: args ',' arg_splat */
14004#line 4275 "parse.y"
14005 {
14006 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14007 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14008 }
14009#line 14010 "parse.c"
14010 break;
14011
14012 case 327: /* arg_splat: "*" arg_value */
14013#line 4283 "parse.y"
14014 {
14015 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14016 /*% ripper: $:arg_value %*/
14017 }
14018#line 14019 "parse.c"
14019 break;
14020
14021 case 328: /* arg_splat: "*" */
14022#line 4288 "parse.y"
14023 {
14024 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14025 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14026 /*% ripper: Qnil %*/
14027 }
14028#line 14029 "parse.c"
14029 break;
14030
14031 case 331: /* mrhs: args ',' arg_value */
14032#line 4302 "parse.y"
14033 {
14034 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14035 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14036 }
14037#line 14038 "parse.c"
14038 break;
14039
14040 case 332: /* mrhs: args ',' "*" arg_value */
14041#line 4307 "parse.y"
14042 {
14043 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14044 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14045 }
14046#line 14047 "parse.c"
14047 break;
14048
14049 case 333: /* mrhs: "*" arg_value */
14050#line 4312 "parse.y"
14051 {
14052 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14053 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14054 }
14055#line 14056 "parse.c"
14056 break;
14057
14058 case 344: /* primary: "method" */
14059#line 4333 "parse.y"
14060 {
14061 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14062 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
14063 }
14064#line 14065 "parse.c"
14065 break;
14066
14067 case 345: /* $@14: %empty */
14068#line 4338 "parse.y"
14069 {
14070 CMDARG_PUSH(0);
14071 }
14072#line 14073 "parse.c"
14073 break;
14074
14075 case 346: /* primary: k_begin $@14 bodystmt k_end */
14076#line 4343 "parse.y"
14077 {
14078 CMDARG_POP();
14079 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14080 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14081 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14082 /*% ripper: begin!($:3) %*/
14083 }
14084#line 14085 "parse.c"
14085 break;
14086
14087 case 347: /* $@15: %empty */
14088#line 4350 "parse.y"
14089 {SET_LEX_STATE(EXPR_ENDARG);}
14090#line 14091 "parse.c"
14091 break;
14092
14093 case 348: /* primary: "( arg" compstmt_stmts $@15 ')' */
14094#line 4351 "parse.y"
14095 {
14096 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14097 (yyval.node) = (yyvsp[-2].node);
14098 /*% ripper: paren!($:2) %*/
14099 }
14100#line 14101 "parse.c"
14101 break;
14102
14103 case 349: /* primary: "(" compstmt_stmts ')' */
14104#line 4357 "parse.y"
14105 {
14106 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14107 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14108 /*% ripper: paren!($:2) %*/
14109 }
14110#line 14111 "parse.c"
14111 break;
14112
14113 case 350: /* primary: primary_value "::" "constant" */
14114#line 4363 "parse.y"
14115 {
14116 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
14117 /*% ripper: const_path_ref!($:1, $:3) %*/
14118 }
14119#line 14120 "parse.c"
14120 break;
14121
14122 case 351: /* primary: ":: at EXPR_BEG" "constant" */
14123#line 4368 "parse.y"
14124 {
14125 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
14126 /*% ripper: top_const_ref!($:2) %*/
14127 }
14128#line 14129 "parse.c"
14129 break;
14130
14131 case 352: /* primary: "[" aref_args ']' */
14132#line 4373 "parse.y"
14133 {
14134 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14135 /*% ripper: array!($:2) %*/
14136 }
14137#line 14138 "parse.c"
14138 break;
14139
14140 case 353: /* primary: "{" assoc_list '}' */
14141#line 4378 "parse.y"
14142 {
14143 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14144 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14145 /*% ripper: hash!($:2) %*/
14146 }
14147#line 14148 "parse.c"
14148 break;
14149
14150 case 354: /* primary: k_return */
14151#line 4384 "parse.y"
14152 {
14153 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14154 /*% ripper: return0! %*/
14155 }
14156#line 14157 "parse.c"
14157 break;
14158
14159 case 355: /* primary: k_yield '(' call_args rparen */
14160#line 4389 "parse.y"
14161 {
14162 (yyval.node) = new_yield(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14163 /*% ripper: yield!(paren!($:3)) %*/
14164 }
14165#line 14166 "parse.c"
14166 break;
14167
14168 case 356: /* primary: k_yield '(' rparen */
14169#line 4394 "parse.y"
14170 {
14171 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14172 /*% ripper: yield!(paren!(args_new!)) %*/
14173 }
14174#line 14175 "parse.c"
14175 break;
14176
14177 case 357: /* primary: k_yield */
14178#line 4399 "parse.y"
14179 {
14180 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14181 /*% ripper: yield0! %*/
14182 }
14183#line 14184 "parse.c"
14184 break;
14185
14186 case 358: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14187#line 4404 "parse.y"
14188 {
14189 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14190 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc));
14191 /*% ripper: defined!($:5) %*/
14192 }
14193#line 14194 "parse.c"
14194 break;
14195
14196 case 359: /* primary: "'not'" '(' expr rparen */
14197#line 4410 "parse.y"
14198 {
14199 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14200 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14201 }
14202#line 14203 "parse.c"
14203 break;
14204
14205 case 360: /* primary: "'not'" '(' rparen */
14206#line 4415 "parse.y"
14207 {
14208 (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14209 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14210 }
14211#line 14212 "parse.c"
14212 break;
14213
14214 case 361: /* primary: fcall brace_block */
14215#line 4420 "parse.y"
14216 {
14217 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14218 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14219 }
14220#line 14221 "parse.c"
14221 break;
14222
14223 case 363: /* primary: method_call brace_block */
14224#line 4426 "parse.y"
14225 {
14226 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14227 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14228 /*% ripper: method_add_block!($:1, $:2) %*/
14229 }
14230#line 14231 "parse.c"
14231 break;
14232
14233 case 365: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14234#line 4436 "parse.y"
14235 {
14236 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14237 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14238
14239 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14240 fixpos((yyval.node), (yyvsp[-4].node));
14241 /*% ripper: if!($:2, $:4, $:5) %*/
14242 }
14243#line 14244 "parse.c"
14244 break;
14245
14246 case 366: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14247#line 4448 "parse.y"
14248 {
14249 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14250 fixpos((yyval.node), (yyvsp[-4].node));
14251 /*% ripper: unless!($:2, $:4, $:5) %*/
14252 }
14253#line 14254 "parse.c"
14254 break;
14255
14256 case 367: /* primary: k_while expr_value_do compstmt_stmts k_end */
14257#line 4456 "parse.y"
14258 {
14259 restore_block_exit(p, (yyvsp[-3].node_exits));
14260 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14261 fixpos((yyval.node), (yyvsp[-2].node));
14262 /*% ripper: while!($:2, $:3) %*/
14263 }
14264#line 14265 "parse.c"
14265 break;
14266
14267 case 368: /* primary: k_until expr_value_do compstmt_stmts k_end */
14268#line 4465 "parse.y"
14269 {
14270 restore_block_exit(p, (yyvsp[-3].node_exits));
14271 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14272 fixpos((yyval.node), (yyvsp[-2].node));
14273 /*% ripper: until!($:2, $:3) %*/
14274 }
14275#line 14276 "parse.c"
14276 break;
14277
14278 case 369: /* @16: %empty */
14279#line 4472 "parse.y"
14280 {
14281 (yyval.labels) = p->case_labels;
14282 p->case_labels = CHECK_LITERAL_WHEN;
14283 }
14284#line 14285 "parse.c"
14285 break;
14286
14287 case 370: /* primary: k_case expr_value option_terms @16 case_body k_end */
14288#line 4478 "parse.y"
14289 {
14290 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14291 p->case_labels = (yyvsp[-2].labels);
14292 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14293 fixpos((yyval.node), (yyvsp[-4].node));
14294 /*% ripper: case!($:2, $:5) %*/
14295 }
14296#line 14297 "parse.c"
14297 break;
14298
14299 case 371: /* @17: %empty */
14300#line 4486 "parse.y"
14301 {
14302 (yyval.labels) = p->case_labels;
14303 p->case_labels = 0;
14304 }
14305#line 14306 "parse.c"
14306 break;
14307
14308 case 372: /* primary: k_case option_terms @17 case_body k_end */
14309#line 4492 "parse.y"
14310 {
14311 if (p->case_labels) st_free_table(p->case_labels);
14312 p->case_labels = (yyvsp[-2].labels);
14313 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14314 /*% ripper: case!(Qnil, $:4) %*/
14315 }
14316#line 14317 "parse.c"
14317 break;
14318
14319 case 373: /* primary: k_case expr_value option_terms p_case_body k_end */
14320#line 4501 "parse.y"
14321 {
14322 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14323 /*% ripper: case!($:2, $:4) %*/
14324 }
14325#line 14326 "parse.c"
14326 break;
14327
14328 case 374: /* $@18: %empty */
14329#line 4506 "parse.y"
14330 {COND_PUSH(1);}
14331#line 14332 "parse.c"
14332 break;
14333
14334 case 375: /* $@19: %empty */
14335#line 4506 "parse.y"
14336 {COND_POP();}
14337#line 14338 "parse.c"
14338 break;
14339
14340 case 376: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14341#line 4509 "parse.y"
14342 {
14343 restore_block_exit(p, (yyvsp[-8].node_exits));
14344 /*
14345 * for a, b, c in e
14346 * #=>
14347 * e.each{|*x| a, b, c = x}
14348 *
14349 * for a in e
14350 * #=>
14351 * e.each{|x| a, = x}
14352 */
14353 ID id = internal_id(p);
14354 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14355 rb_node_args_t *args;
14356 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14357 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14358 tbl->ids[0] = id; /* internal id */
14359
14360 switch (nd_type((yyvsp[-7].node))) {
14361 case NODE_LASGN:
14362 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14363 set_nd_value(p, (yyvsp[-7].node), internal_var);
14364 id = 0;
14365 m->nd_plen = 1;
14366 m->nd_next = (yyvsp[-7].node);
14367 break;
14368 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14369 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14370 break;
14371 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14372 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]));
14373 }
14374 /* {|*internal_id| <m> = internal_id; ... } */
14375 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-7])), &(yylsp[-7]));
14376 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), &(yyloc));
14377 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14378 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14379 fixpos((yyval.node), (yyvsp[-7].node));
14380 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14381 }
14382#line 14383 "parse.c"
14383 break;
14384
14385 case 377: /* $@20: %empty */
14386#line 4550 "parse.y"
14387 {
14388 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14389 }
14390#line 14391 "parse.c"
14391 break;
14392
14393 case 378: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14394#line 4555 "parse.y"
14395 {
14396 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc));
14397 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14398 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14399 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14400 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14401 local_pop(p);
14402 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14403 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14404 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14405 }
14406#line 14407 "parse.c"
14407 break;
14408
14409 case 379: /* $@21: %empty */
14410#line 4567 "parse.y"
14411 {
14412 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14413 }
14414#line 14415 "parse.c"
14415 break;
14416
14417 case 380: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14418#line 4573 "parse.y"
14419 {
14420 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
14421 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14422 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14423 fixpos((yyval.node), (yyvsp[-4].node));
14424 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14425 local_pop(p);
14426 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14427 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14428 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14429 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14430 }
14431#line 14432 "parse.c"
14432 break;
14433
14434 case 381: /* $@22: %empty */
14435#line 4586 "parse.y"
14436 {
14437 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14438 }
14439#line 14440 "parse.c"
14440 break;
14441
14442 case 382: /* primary: k_module cpath $@22 bodystmt k_end */
14443#line 4591 "parse.y"
14444 {
14445 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
14446 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14447 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14448 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14449 /*% ripper: module!($:cpath, $:bodystmt) %*/
14450 local_pop(p);
14451 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14452 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14453 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14454 }
14455#line 14456 "parse.c"
14456 break;
14457
14458 case 383: /* $@23: %empty */
14459#line 4604 "parse.y"
14460 {
14461 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14462 }
14463#line 14464 "parse.c"
14464 break;
14465
14466 case 384: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14467#line 4609 "parse.y"
14468 {
14469 restore_defun(p, (yyvsp[-4].node_def_temp));
14470 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14471 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14472 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14473 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14474 local_pop(p);
14475 }
14476#line 14477 "parse.c"
14477 break;
14478
14479 case 385: /* $@24: %empty */
14480#line 4619 "parse.y"
14481 {
14482 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14483 }
14484#line 14485 "parse.c"
14485 break;
14486
14487 case 386: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14488#line 4624 "parse.y"
14489 {
14490 restore_defun(p, (yyvsp[-4].node_def_temp));
14491 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14492 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14493 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14494 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14495 local_pop(p);
14496 }
14497#line 14498 "parse.c"
14498 break;
14499
14500 case 387: /* primary: "'break'" */
14501#line 4633 "parse.y"
14502 {
14503 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14504 /*% ripper: break!(args_new!) %*/
14505 }
14506#line 14507 "parse.c"
14507 break;
14508
14509 case 388: /* primary: "'next'" */
14510#line 4638 "parse.y"
14511 {
14512 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14513 /*% ripper: next!(args_new!) %*/
14514 }
14515#line 14516 "parse.c"
14516 break;
14517
14518 case 389: /* primary: "'redo'" */
14519#line 4643 "parse.y"
14520 {
14521 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14522 /*% ripper: redo! %*/
14523 }
14524#line 14525 "parse.c"
14525 break;
14526
14527 case 390: /* primary: "'retry'" */
14528#line 4648 "parse.y"
14529 {
14530 if (!p->ctxt.in_defined) {
14531 switch (p->ctxt.in_rescue) {
14532 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14533 case after_rescue: /* ok */ break;
14534 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14535 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14536 }
14537 }
14538 (yyval.node) = NEW_RETRY(&(yyloc));
14539 /*% ripper: retry! %*/
14540 }
14541#line 14542 "parse.c"
14542 break;
14543
14544 case 391: /* value_expr_primary: primary */
14545#line 3063 "parse.y"
14546 {
14547 value_expr((yyvsp[0].node));
14548 (yyval.node) = (yyvsp[0].node);
14549 }
14550#line 14551 "parse.c"
14551 break;
14552
14553 case 393: /* k_begin: "'begin'" */
14554#line 4666 "parse.y"
14555 {
14556 token_info_push(p, "begin", &(yyloc));
14557 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14558 }
14559#line 14560 "parse.c"
14560 break;
14561
14562 case 394: /* k_if: "'if'" */
14563#line 4673 "parse.y"
14564 {
14565 WARN_EOL("if");
14566 token_info_push(p, "if", &(yyloc));
14567 if (p->token_info && p->token_info->nonspc &&
14568 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14569 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14570 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14571 beg += rb_strlen_lit("else");
14572 while (beg < tok && ISSPACE(*beg)) beg++;
14573 if (beg == tok) {
14574 p->token_info->nonspc = 0;
14575 }
14576 }
14577 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14578 }
14579#line 14580 "parse.c"
14580 break;
14581
14582 case 395: /* k_unless: "'unless'" */
14583#line 4691 "parse.y"
14584 {
14585 token_info_push(p, "unless", &(yyloc));
14586 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14587 }
14588#line 14589 "parse.c"
14589 break;
14590
14591 case 396: /* k_while: "'while'" allow_exits */
14592#line 4698 "parse.y"
14593 {
14594 (yyval.node_exits) = (yyvsp[0].node_exits);
14595 token_info_push(p, "while", &(yyloc));
14596 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14597 }
14598#line 14599 "parse.c"
14599 break;
14600
14601 case 397: /* k_until: "'until'" allow_exits */
14602#line 4706 "parse.y"
14603 {
14604 (yyval.node_exits) = (yyvsp[0].node_exits);
14605 token_info_push(p, "until", &(yyloc));
14606 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14607 }
14608#line 14609 "parse.c"
14609 break;
14610
14611 case 398: /* k_case: "'case'" */
14612#line 4714 "parse.y"
14613 {
14614 token_info_push(p, "case", &(yyloc));
14615 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14616 }
14617#line 14618 "parse.c"
14618 break;
14619
14620 case 399: /* k_for: "'for'" allow_exits */
14621#line 4721 "parse.y"
14622 {
14623 (yyval.node_exits) = (yyvsp[0].node_exits);
14624 token_info_push(p, "for", &(yyloc));
14625 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14626 }
14627#line 14628 "parse.c"
14628 break;
14629
14630 case 400: /* k_class: "'class'" */
14631#line 4729 "parse.y"
14632 {
14633 token_info_push(p, "class", &(yyloc));
14634 (yyval.ctxt) = p->ctxt;
14635 p->ctxt.in_rescue = before_rescue;
14636 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14637 }
14638#line 14639 "parse.c"
14639 break;
14640
14641 case 401: /* k_module: "'module'" */
14642#line 4738 "parse.y"
14643 {
14644 token_info_push(p, "module", &(yyloc));
14645 (yyval.ctxt) = p->ctxt;
14646 p->ctxt.in_rescue = before_rescue;
14647 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14648 }
14649#line 14650 "parse.c"
14650 break;
14651
14652 case 402: /* k_def: "'def'" */
14653#line 4747 "parse.y"
14654 {
14655 token_info_push(p, "def", &(yyloc));
14656 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14657 p->ctxt.in_argdef = 1;
14658 }
14659#line 14660 "parse.c"
14660 break;
14661
14662 case 403: /* k_do: "'do'" */
14663#line 4755 "parse.y"
14664 {
14665 token_info_push(p, "do", &(yyloc));
14666 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14667 }
14668#line 14669 "parse.c"
14669 break;
14670
14671 case 404: /* k_do_block: "'do' for block" */
14672#line 4762 "parse.y"
14673 {
14674 token_info_push(p, "do", &(yyloc));
14675 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14676 }
14677#line 14678 "parse.c"
14678 break;
14679
14680 case 405: /* k_rescue: "'rescue'" */
14681#line 4769 "parse.y"
14682 {
14683 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14684 (yyval.ctxt) = p->ctxt;
14685 p->ctxt.in_rescue = after_rescue;
14686 }
14687#line 14688 "parse.c"
14688 break;
14689
14690 case 406: /* k_ensure: "'ensure'" */
14691#line 4777 "parse.y"
14692 {
14693 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14694 (yyval.ctxt) = p->ctxt;
14695 }
14696#line 14697 "parse.c"
14697 break;
14698
14699 case 407: /* k_when: "'when'" */
14700#line 4784 "parse.y"
14701 {
14702 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14703 }
14704#line 14705 "parse.c"
14705 break;
14706
14707 case 408: /* k_else: "'else'" */
14708#line 4790 "parse.y"
14709 {
14710 token_info *ptinfo_beg = p->token_info;
14711 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
14712 token_info_warn(p, "else", p->token_info, same, &(yyloc));
14713 if (same) {
14714 token_info e;
14715 e.next = ptinfo_beg->next;
14716 e.token = "else";
14717 token_info_setup(&e, p->lex.pbeg, &(yyloc));
14718 if (!e.nonspc) *ptinfo_beg = e;
14719 }
14720 }
14721#line 14722 "parse.c"
14722 break;
14723
14724 case 409: /* k_elsif: "'elsif'" */
14725#line 4805 "parse.y"
14726 {
14727 WARN_EOL("elsif");
14728 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
14729 }
14730#line 14731 "parse.c"
14731 break;
14732
14733 case 410: /* k_end: "'end'" */
14734#line 4812 "parse.y"
14735 {
14736 token_info_pop(p, "end", &(yyloc));
14737 pop_end_expect_token_locations(p);
14738 }
14739#line 14740 "parse.c"
14740 break;
14741
14742 case 411: /* k_end: "dummy end" */
14743#line 4817 "parse.y"
14744 {
14745 compile_error(p, "syntax error, unexpected end-of-input");
14746 }
14747#line 14748 "parse.c"
14748 break;
14749
14750 case 412: /* k_return: "'return'" */
14751#line 4823 "parse.y"
14752 {
14753 if (p->ctxt.cant_return && !dyna_in_block(p))
14754 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
14755 }
14756#line 14757 "parse.c"
14757 break;
14758
14759 case 413: /* k_yield: "'yield'" */
14760#line 4830 "parse.y"
14761 {
14762 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
14763 yyerror1(&(yylsp[0]), "Invalid yield");
14764 }
14765#line 14766 "parse.c"
14766 break;
14767
14768 case 418: /* do: "'do' for condition" */
14769#line 4842 "parse.y"
14770 { (yyval.id) = keyword_do_cond; }
14771#line 14772 "parse.c"
14772 break;
14773
14774 case 420: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
14775#line 4849 "parse.y"
14776 {
14777 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
14778 fixpos((yyval.node), (yyvsp[-3].node));
14779 /*% ripper: elsif!($:2, $:4, $:5) %*/
14780 }
14781#line 14782 "parse.c"
14782 break;
14783
14784 case 422: /* opt_else: k_else compstmt_stmts */
14785#line 4858 "parse.y"
14786 {
14787 (yyval.node) = (yyvsp[0].node);
14788 /*% ripper: else!($:2) %*/
14789 }
14790#line 14791 "parse.c"
14791 break;
14792
14793 case 425: /* f_marg: f_norm_arg */
14794#line 4869 "parse.y"
14795 {
14796 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
14797 mark_lvar_used(p, (yyval.node));
14798 }
14799#line 14800 "parse.c"
14800 break;
14801
14802 case 426: /* f_marg: "(" f_margs rparen */
14803#line 4874 "parse.y"
14804 {
14805 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
14806 /*% ripper: mlhs_paren!($:2) %*/
14807 }
14808#line 14809 "parse.c"
14809 break;
14810
14811 case 427: /* f_marg_list: f_marg */
14812#line 4881 "parse.y"
14813 {
14814 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14815 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
14816 }
14817#line 14818 "parse.c"
14818 break;
14819
14820 case 428: /* f_marg_list: f_marg_list ',' f_marg */
14821#line 4886 "parse.y"
14822 {
14823 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
14824 /*% ripper: mlhs_add!($:1, $:3) %*/
14825 }
14826#line 14827 "parse.c"
14827 break;
14828
14829 case 429: /* f_margs: f_marg_list */
14830#line 4893 "parse.y"
14831 {
14832 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
14833 /*% ripper: $:1 %*/
14834 }
14835#line 14836 "parse.c"
14836 break;
14837
14838 case 430: /* f_margs: f_marg_list ',' f_rest_marg */
14839#line 4898 "parse.y"
14840 {
14841 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14842 /*% ripper: mlhs_add_star!($:1, $:3) %*/
14843 }
14844#line 14845 "parse.c"
14845 break;
14846
14847 case 431: /* f_margs: f_marg_list ',' f_rest_marg ',' f_marg_list */
14848#line 4903 "parse.y"
14849 {
14850 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
14851 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
14852 }
14853#line 14854 "parse.c"
14854 break;
14855
14856 case 432: /* f_margs: f_rest_marg */
14857#line 4908 "parse.y"
14858 {
14859 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
14860 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
14861 }
14862#line 14863 "parse.c"
14863 break;
14864
14865 case 433: /* f_margs: f_rest_marg ',' f_marg_list */
14866#line 4913 "parse.y"
14867 {
14868 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
14869 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
14870 }
14871#line 14872 "parse.c"
14872 break;
14873
14874 case 434: /* f_rest_marg: "*" f_norm_arg */
14875#line 4920 "parse.y"
14876 {
14877 /*% ripper: $:2 %*/
14878 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
14879 mark_lvar_used(p, (yyval.node));
14880 }
14881#line 14882 "parse.c"
14882 break;
14883
14884 case 435: /* f_rest_marg: "*" */
14885#line 4926 "parse.y"
14886 {
14887 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
14888 /*% ripper: Qnil %*/
14889 }
14890#line 14891 "parse.c"
14891 break;
14892
14893 case 437: /* f_any_kwrest: f_no_kwarg */
14894#line 4934 "parse.y"
14895 {
14896 (yyval.id) = idNil;
14897 /*% ripper: ID2VAL(idNil) %*/
14898 }
14899#line 14900 "parse.c"
14900 break;
14901
14902 case 438: /* $@25: %empty */
14903#line 4940 "parse.y"
14904 {p->ctxt.in_argdef = 0;}
14905#line 14906 "parse.c"
14906 break;
14907
14908 case 440: /* f_kw_primary_value: f_label primary_value */
14909#line 2982 "parse.y"
14910 {
14911 p->ctxt.in_argdef = 1;
14912 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
14913 /*% ripper: [$:$, $:value] %*/
14914 }
14915#line 14916 "parse.c"
14916 break;
14917
14918 case 441: /* f_kw_primary_value: f_label */
14919#line 2988 "parse.y"
14920 {
14921 p->ctxt.in_argdef = 1;
14922 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
14923 /*% ripper: [$:$, 0] %*/
14924 }
14925#line 14926 "parse.c"
14926 break;
14927
14928 case 442: /* f_kwarg_primary_value: f_kw_primary_value */
14929#line 2997 "parse.y"
14930 {
14931 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
14932 /*% ripper: rb_ary_new3(1, $:1) %*/
14933 }
14934#line 14935 "parse.c"
14935 break;
14936
14937 case 443: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
14938#line 3002 "parse.y"
14939 {
14940 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
14941 /*% ripper: rb_ary_push($:1, $:3) %*/
14942 }
14943#line 14944 "parse.c"
14944 break;
14945
14946 case 444: /* block_args_tail: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
14947#line 4943 "parse.y"
14948 {
14949 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
14950 /*% ripper: [$:1, $:3, $:4] %*/
14951 }
14952#line 14953 "parse.c"
14953 break;
14954
14955 case 445: /* block_args_tail: f_kwarg_primary_value opt_f_block_arg */
14956#line 4948 "parse.y"
14957 {
14958 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
14959 /*% ripper: [$:1, Qnil, $:2] %*/
14960 }
14961#line 14962 "parse.c"
14962 break;
14963
14964 case 446: /* block_args_tail: f_any_kwrest opt_f_block_arg */
14965#line 4953 "parse.y"
14966 {
14967 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
14968 /*% ripper: [Qnil, $:1, $:2] %*/
14969 }
14970#line 14971 "parse.c"
14971 break;
14972
14973 case 447: /* block_args_tail: f_block_arg */
14974#line 4958 "parse.y"
14975 {
14976 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
14977 /*% ripper: [Qnil, Qnil, $:1] %*/
14978 }
14979#line 14980 "parse.c"
14980 break;
14981
14982 case 448: /* excessed_comma: ',' */
14983#line 4965 "parse.y"
14984 {
14985 /* magic number for rest_id in iseq_set_arguments() */
14986 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
14987 /*% ripper: excessed_comma! %*/
14988 }
14989#line 14990 "parse.c"
14990 break;
14991
14992 case 449: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
14993#line 2961 "parse.y"
14994 {
14995 p->ctxt.in_argdef = 1;
14996 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
14997 /*% ripper: [$:$, $:3] %*/
14998 }
14999#line 15000 "parse.c"
15000 break;
15001
15002 case 450: /* f_optarg_primary_value: f_opt_primary_value */
15003#line 2970 "parse.y"
15004 {
15005 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15006 /*% ripper: rb_ary_new3(1, $:1) %*/
15007 }
15008#line 15009 "parse.c"
15009 break;
15010
15011 case 451: /* f_optarg_primary_value: f_optarg_primary_value ',' f_opt_primary_value */
15012#line 2975 "parse.y"
15013 {
15014 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15015 /*% ripper: rb_ary_push($:1, $:3) %*/
15016 }
15017#line 15018 "parse.c"
15018 break;
15019
15020 case 452: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15021#line 3050 "parse.y"
15022 {
15023 (yyval.node_args) = (yyvsp[0].node_args);
15024 /*% ripper: $:2 %*/
15025 }
15026#line 15027 "parse.c"
15027 break;
15028
15029 case 453: /* opt_args_tail_block_args_tail: %empty */
15030#line 3055 "parse.y"
15031 {
15032 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15033 /*% ripper: [Qnil, Qnil, Qnil] %*/
15034 }
15035#line 15036 "parse.c"
15036 break;
15037
15038 case 454: /* block_param: f_arg ',' f_optarg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15039#line 4973 "parse.y"
15040 {
15041 (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));
15042 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
15043 }
15044#line 15045 "parse.c"
15045 break;
15046
15047 case 455: /* block_param: f_arg ',' f_optarg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15048#line 4978 "parse.y"
15049 {
15050 (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));
15051 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
15052 }
15053#line 15054 "parse.c"
15054 break;
15055
15056 case 456: /* block_param: f_arg ',' f_optarg_primary_value opt_args_tail_block_args_tail */
15057#line 4983 "parse.y"
15058 {
15059 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15060 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
15061 }
15062#line 15063 "parse.c"
15063 break;
15064
15065 case 457: /* block_param: f_arg ',' f_optarg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15066#line 4988 "parse.y"
15067 {
15068 (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));
15069 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
15070 }
15071#line 15072 "parse.c"
15072 break;
15073
15074 case 458: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
15075#line 4993 "parse.y"
15076 {
15077 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15078 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
15079 }
15080#line 15081 "parse.c"
15081 break;
15082
15083 case 459: /* block_param: f_arg excessed_comma */
15084#line 4998 "parse.y"
15085 {
15086 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15087 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15088 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
15089 }
15090#line 15091 "parse.c"
15091 break;
15092
15093 case 460: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15094#line 5004 "parse.y"
15095 {
15096 (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));
15097 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
15098 }
15099#line 15100 "parse.c"
15100 break;
15101
15102 case 461: /* block_param: f_arg opt_args_tail_block_args_tail */
15103#line 5009 "parse.y"
15104 {
15105 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15106 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
15107 }
15108#line 15109 "parse.c"
15109 break;
15110
15111 case 462: /* block_param: f_optarg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15112#line 5014 "parse.y"
15113 {
15114 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15115 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
15116 }
15117#line 15118 "parse.c"
15118 break;
15119
15120 case 463: /* block_param: f_optarg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15121#line 5019 "parse.y"
15122 {
15123 (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));
15124 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
15125 }
15126#line 15127 "parse.c"
15127 break;
15128
15129 case 464: /* block_param: f_optarg_primary_value opt_args_tail_block_args_tail */
15130#line 5024 "parse.y"
15131 {
15132 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15133 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
15134 }
15135#line 15136 "parse.c"
15136 break;
15137
15138 case 465: /* block_param: f_optarg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15139#line 5029 "parse.y"
15140 {
15141 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15142 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
15143 }
15144#line 15145 "parse.c"
15145 break;
15146
15147 case 466: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
15148#line 5034 "parse.y"
15149 {
15150 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15151 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
15152 }
15153#line 15154 "parse.c"
15154 break;
15155
15156 case 467: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15157#line 5039 "parse.y"
15158 {
15159 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15160 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
15161 }
15162#line 15163 "parse.c"
15163 break;
15164
15165 case 468: /* block_param: block_args_tail */
15166#line 5044 "parse.y"
15167 {
15168 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15169 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
15170 }
15171#line 15172 "parse.c"
15172 break;
15173
15174 case 470: /* opt_block_param: block_param_def */
15175#line 5052 "parse.y"
15176 {
15177 p->command_start = TRUE;
15178 }
15179#line 15180 "parse.c"
15180 break;
15181
15182 case 471: /* block_param_def: '|' opt_bv_decl '|' */
15183#line 5058 "parse.y"
15184 {
15185 p->max_numparam = ORDINAL_PARAM;
15186 p->ctxt.in_argdef = 0;
15187 (yyval.node_args) = 0;
15188 /*% ripper: block_var!(params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), $:2) %*/
15189 }
15190#line 15191 "parse.c"
15191 break;
15192
15193 case 472: /* block_param_def: '|' block_param opt_bv_decl '|' */
15194#line 5065 "parse.y"
15195 {
15196 p->max_numparam = ORDINAL_PARAM;
15197 p->ctxt.in_argdef = 0;
15198 (yyval.node_args) = (yyvsp[-2].node_args);
15199 /*% ripper: block_var!($:2, $:3) %*/
15200 }
15201#line 15202 "parse.c"
15202 break;
15203
15204 case 473: /* opt_bv_decl: option_'\n' */
15205#line 5075 "parse.y"
15206 {
15207 (yyval.id) = 0;
15208 /*% ripper: Qfalse %*/
15209 }
15210#line 15211 "parse.c"
15211 break;
15212
15213 case 474: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15214#line 5080 "parse.y"
15215 {
15216 (yyval.id) = 0;
15217 /*% ripper: $:3 %*/
15218 }
15219#line 15220 "parse.c"
15220 break;
15221
15222 case 477: /* bvar: "local variable or method" */
15223#line 5093 "parse.y"
15224 {
15225 new_bv(p, (yyvsp[0].id));
15226 /*% ripper: $:1 %*/
15227 }
15228#line 15229 "parse.c"
15229 break;
15230
15231 case 478: /* bvar: f_bad_arg */
15232#line 5098 "parse.y"
15233 {
15234 (yyval.id) = 0;
15235 }
15236#line 15237 "parse.c"
15237 break;
15238
15239 case 479: /* max_numparam: %empty */
15240#line 5103 "parse.y"
15241 {
15242 (yyval.num) = p->max_numparam;
15243 p->max_numparam = 0;
15244 }
15245#line 15246 "parse.c"
15246 break;
15247
15248 case 480: /* numparam: %empty */
15249#line 5109 "parse.y"
15250 {
15251 (yyval.node) = numparam_push(p);
15252 }
15253#line 15254 "parse.c"
15254 break;
15255
15256 case 481: /* it_id: %empty */
15257#line 5114 "parse.y"
15258 {
15259 (yyval.id) = p->it_id;
15260 p->it_id = 0;
15261 }
15262#line 15263 "parse.c"
15263 break;
15264
15265 case 482: /* @26: %empty */
15266#line 5121 "parse.y"
15267 {
15268 token_info_push(p, "->", &(yylsp[0]));
15269 (yyval.vars) = dyna_push(p);
15270 }
15271#line 15272 "parse.c"
15272 break;
15273
15274 case 483: /* $@27: %empty */
15275#line 5127 "parse.y"
15276 {
15277 CMDARG_PUSH(0);
15278 }
15279#line 15280 "parse.c"
15280 break;
15281
15282 case 484: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15283#line 5131 "parse.y"
15284 {
15285 int max_numparam = p->max_numparam;
15286 ID it_id = p->it_id;
15287 p->lex.lpar_beg = (yyvsp[-8].num);
15288 p->max_numparam = (yyvsp[-6].num);
15289 p->it_id = (yyvsp[-4].id);
15290 restore_block_exit(p, (yyvsp[-3].node_exits));
15291 CMDARG_POP();
15292 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15293 {
15294 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15295 (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);
15296 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15297 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15298 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15299 xfree((yyvsp[0].locations_lambda_body));
15300 }
15301 /*% ripper: lambda!($:args, $:body) %*/
15302 numparam_pop(p, (yyvsp[-5].node));
15303 dyna_pop(p, (yyvsp[-7].vars));
15304 }
15305#line 15306 "parse.c"
15306 break;
15307
15308 case 485: /* f_larglist: '(' f_args opt_bv_decl ')' */
15309#line 5155 "parse.y"
15310 {
15311 p->ctxt.in_argdef = 0;
15312 (yyval.node_args) = (yyvsp[-2].node_args);
15313 p->max_numparam = ORDINAL_PARAM;
15314 /*% ripper: paren!($:2) %*/
15315 }
15316#line 15317 "parse.c"
15317 break;
15318
15319 case 486: /* f_larglist: f_args */
15320#line 5162 "parse.y"
15321 {
15322 p->ctxt.in_argdef = 0;
15323 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15324 p->max_numparam = ORDINAL_PARAM;
15325 (yyval.node_args) = (yyvsp[0].node_args);
15326 }
15327#line 15328 "parse.c"
15328 break;
15329
15330 case 487: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15331#line 5171 "parse.y"
15332 {
15333 token_info_pop(p, "}", &(yylsp[0]));
15334 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15335 /*% ripper: $:2 %*/
15336 }
15337#line 15338 "parse.c"
15338 break;
15339
15340 case 488: /* $@28: %empty */
15341#line 5177 "parse.y"
15342 {
15343 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15344 }
15345#line 15346 "parse.c"
15346 break;
15347
15348 case 489: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15349#line 5181 "parse.y"
15350 {
15351 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15352 /*% ripper: $:3 %*/
15353 }
15354#line 15355 "parse.c"
15355 break;
15356
15357 case 490: /* do_block: k_do_block do_body k_end */
15358#line 5188 "parse.y"
15359 {
15360 (yyval.node) = (yyvsp[-1].node);
15361 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15362 /*% ripper: $:2 %*/
15363 }
15364#line 15365 "parse.c"
15365 break;
15366
15367 case 491: /* block_call: command do_block */
15368#line 5196 "parse.y"
15369 {
15370 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15371 compile_error(p, "block given to yield");
15372 }
15373 else {
15374 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15375 }
15376 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15377 fixpos((yyval.node), (yyvsp[-1].node));
15378 /*% ripper: method_add_block!($:1, $:2) %*/
15379 }
15380#line 15381 "parse.c"
15381 break;
15382
15383 case 492: /* block_call: block_call call_op2 operation2 opt_paren_args */
15384#line 5208 "parse.y"
15385 {
15386 bool has_args = (yyvsp[0].node) != 0;
15387 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15388 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15389 /*% ripper: call!($:1, $:2, $:3) %*/
15390 if (has_args) {
15391 /*% ripper: method_add_arg!($:$, $:4) %*/
15392 }
15393 }
15394#line 15395 "parse.c"
15395 break;
15396
15397 case 493: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15398#line 5218 "parse.y"
15399 {
15400 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15401 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15402 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
15403 if ((yyvsp[0].node)) {
15404 /*% ripper: method_add_block!($:$, $:5) %*/
15405 }
15406 }
15407#line 15408 "parse.c"
15408 break;
15409
15410 case 494: /* block_call: block_call call_op2 operation2 command_args do_block */
15411#line 5227 "parse.y"
15412 {
15413 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15414 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15415 }
15416#line 15417 "parse.c"
15417 break;
15418
15419 case 495: /* method_call: fcall paren_args */
15420#line 5234 "parse.y"
15421 {
15422 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15423 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15424 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15425 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15426 }
15427#line 15428 "parse.c"
15428 break;
15429
15430 case 496: /* method_call: primary_value call_op operation2 opt_paren_args */
15431#line 5241 "parse.y"
15432 {
15433 bool has_args = (yyvsp[0].node) != 0;
15434 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15435 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15436 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15437 /*% ripper: call!($:1, $:2, $:3) %*/
15438 if (has_args) {
15439 /*% ripper: method_add_arg!($:$, $:4) %*/
15440 }
15441 }
15442#line 15443 "parse.c"
15443 break;
15444
15445 case 497: /* method_call: primary_value "::" operation2 paren_args */
15446#line 5252 "parse.y"
15447 {
15448 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15449 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15450 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15451 }
15452#line 15453 "parse.c"
15453 break;
15454
15455 case 498: /* method_call: primary_value "::" operation3 */
15456#line 5258 "parse.y"
15457 {
15458 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15459 /*% ripper: call!($:1, $:2, $:3) %*/
15460 }
15461#line 15462 "parse.c"
15462 break;
15463
15464 case 499: /* method_call: primary_value call_op paren_args */
15465#line 5263 "parse.y"
15466 {
15467 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15468 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15469 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15470 }
15471#line 15472 "parse.c"
15472 break;
15473
15474 case 500: /* method_call: primary_value "::" paren_args */
15475#line 5269 "parse.y"
15476 {
15477 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15478 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15479 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15480 }
15481#line 15482 "parse.c"
15482 break;
15483
15484 case 501: /* method_call: "'super'" paren_args */
15485#line 5275 "parse.y"
15486 {
15487 rb_code_location_t lparen_loc = (yylsp[0]);
15488 rb_code_location_t rparen_loc = (yylsp[0]);
15489 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15490 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15491
15492 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15493 /*% ripper: super!($:2) %*/
15494 }
15495#line 15496 "parse.c"
15496 break;
15497
15498 case 502: /* method_call: "'super'" */
15499#line 5285 "parse.y"
15500 {
15501 (yyval.node) = NEW_ZSUPER(&(yyloc));
15502 /*% ripper: zsuper! %*/
15503 }
15504#line 15505 "parse.c"
15505 break;
15506
15507 case 503: /* method_call: primary_value '[' opt_call_args rbracket */
15508#line 5290 "parse.y"
15509 {
15510 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15511 fixpos((yyval.node), (yyvsp[-3].node));
15512 /*% ripper: aref!($:1, $:3) %*/
15513 }
15514#line 15515 "parse.c"
15515 break;
15516
15517 case 504: /* brace_block: '{' brace_body '}' */
15518#line 5298 "parse.y"
15519 {
15520 (yyval.node) = (yyvsp[-1].node);
15521 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15522 /*% ripper: $:2 %*/
15523 }
15524#line 15525 "parse.c"
15525 break;
15526
15527 case 505: /* brace_block: k_do do_body k_end */
15528#line 5304 "parse.y"
15529 {
15530 (yyval.node) = (yyvsp[-1].node);
15531 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15532 /*% ripper: $:2 %*/
15533 }
15534#line 15535 "parse.c"
15535 break;
15536
15537 case 506: /* @29: %empty */
15538#line 5311 "parse.y"
15539 {(yyval.vars) = dyna_push(p);}
15540#line 15541 "parse.c"
15541 break;
15542
15543 case 507: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param compstmt_stmts */
15544#line 5314 "parse.y"
15545 {
15546 int max_numparam = p->max_numparam;
15547 ID it_id = p->it_id;
15548 p->max_numparam = (yyvsp[-5].num);
15549 p->it_id = (yyvsp[-3].id);
15550 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15551 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15552 /*% ripper: brace_block!($:args, $:compstmt) %*/
15553 restore_block_exit(p, (yyvsp[-2].node_exits));
15554 numparam_pop(p, (yyvsp[-4].node));
15555 dyna_pop(p, (yyvsp[-6].vars));
15556 }
15557#line 15558 "parse.c"
15558 break;
15559
15560 case 508: /* @30: %empty */
15561#line 5328 "parse.y"
15562 {
15563 (yyval.vars) = dyna_push(p);
15564 CMDARG_PUSH(0);
15565 }
15566#line 15567 "parse.c"
15567 break;
15568
15569 case 509: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param bodystmt */
15570#line 5334 "parse.y"
15571 {
15572 int max_numparam = p->max_numparam;
15573 ID it_id = p->it_id;
15574 p->max_numparam = (yyvsp[-5].num);
15575 p->it_id = (yyvsp[-3].id);
15576 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15577 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15578 /*% ripper: do_block!($:args, $:bodystmt) %*/
15579 CMDARG_POP();
15580 restore_block_exit(p, (yyvsp[-2].node_exits));
15581 numparam_pop(p, (yyvsp[-4].node));
15582 dyna_pop(p, (yyvsp[-6].vars));
15583 }
15584#line 15585 "parse.c"
15585 break;
15586
15587 case 510: /* case_args: arg_value */
15588#line 5350 "parse.y"
15589 {
15590 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15591 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15592 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15593 }
15594#line 15595 "parse.c"
15595 break;
15596
15597 case 511: /* case_args: "*" arg_value */
15598#line 5356 "parse.y"
15599 {
15600 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15601 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15602 }
15603#line 15604 "parse.c"
15604 break;
15605
15606 case 512: /* case_args: case_args ',' arg_value */
15607#line 5361 "parse.y"
15608 {
15609 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15610 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15611 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15612 }
15613#line 15614 "parse.c"
15614 break;
15615
15616 case 513: /* case_args: case_args ',' "*" arg_value */
15617#line 5367 "parse.y"
15618 {
15619 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15620 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15621 }
15622#line 15623 "parse.c"
15623 break;
15624
15625 case 514: /* case_body: k_when case_args then compstmt_stmts cases */
15626#line 5376 "parse.y"
15627 {
15628 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15629 fixpos((yyval.node), (yyvsp[-3].node));
15630 /*% ripper: when!($:2, $:4, $:5) %*/
15631 }
15632#line 15633 "parse.c"
15633 break;
15634
15635 case 517: /* p_pvtbl: %empty */
15636#line 5387 "parse.y"
15637 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15638#line 15639 "parse.c"
15639 break;
15640
15641 case 518: /* p_pktbl: %empty */
15642#line 5388 "parse.y"
15643 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15644#line 15645 "parse.c"
15645 break;
15646
15647 case 519: /* p_in_kwarg: %empty */
15648#line 5390 "parse.y"
15649 {
15650 (yyval.ctxt) = p->ctxt;
15651 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15652 p->command_start = FALSE;
15653 p->ctxt.in_kwarg = 1;
15654 }
15655#line 15656 "parse.c"
15656 break;
15657
15658 case 520: /* $@31: %empty */
15659#line 5401 "parse.y"
15660 {
15661 pop_pktbl(p, (yyvsp[-2].tbl));
15662 pop_pvtbl(p, (yyvsp[-3].tbl));
15663 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15664 }
15665#line 15666 "parse.c"
15666 break;
15667
15668 case 521: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
15669#line 5408 "parse.y"
15670 {
15671 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15672 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15673 }
15674#line 15675 "parse.c"
15675 break;
15676
15677 case 525: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15678#line 5420 "parse.y"
15679 {
15680 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15681 fixpos((yyval.node), (yyvsp[0].node));
15682 /*% ripper: if_mod!($:3, $:1) %*/
15683 }
15684#line 15685 "parse.c"
15685 break;
15686
15687 case 526: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15688#line 5426 "parse.y"
15689 {
15690 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15691 fixpos((yyval.node), (yyvsp[0].node));
15692 /*% ripper: unless_mod!($:3, $:1) %*/
15693 }
15694#line 15695 "parse.c"
15695 break;
15696
15697 case 528: /* p_top_expr_body: p_expr ',' */
15698#line 5435 "parse.y"
15699 {
15700 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15701 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15702 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15703 }
15704#line 15705 "parse.c"
15705 break;
15706
15707 case 529: /* p_top_expr_body: p_expr ',' p_args */
15708#line 5441 "parse.y"
15709 {
15710 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15711 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15712 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15713 }
15714#line 15715 "parse.c"
15715 break;
15716
15717 case 530: /* p_top_expr_body: p_find */
15718#line 5447 "parse.y"
15719 {
15720 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15721 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15722 }
15723#line 15724 "parse.c"
15724 break;
15725
15726 case 531: /* p_top_expr_body: p_args_tail */
15727#line 5452 "parse.y"
15728 {
15729 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
15730 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
15731 }
15732#line 15733 "parse.c"
15733 break;
15734
15735 case 532: /* p_top_expr_body: p_kwargs */
15736#line 5457 "parse.y"
15737 {
15738 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15739 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
15740 }
15741#line 15742 "parse.c"
15742 break;
15743
15744 case 534: /* p_as: p_expr "=>" p_variable */
15745#line 5467 "parse.y"
15746 {
15747 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
15748 n = list_append(p, n, (yyvsp[0].node));
15749 (yyval.node) = new_hash(p, n, &(yyloc));
15750 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
15751 }
15752#line 15753 "parse.c"
15753 break;
15754
15755 case 536: /* p_alt: p_alt '|' p_expr_basic */
15756#line 5477 "parse.y"
15757 {
15758 (yyval.node) = NEW_OR((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15759 /*% ripper: binary!($:1, ID2VAL(idOr), $:3) %*/
15760 }
15761#line 15762 "parse.c"
15762 break;
15763
15764 case 538: /* p_lparen: '(' p_pktbl */
15765#line 5485 "parse.y"
15766 {
15767 (yyval.tbl) = (yyvsp[0].tbl);
15768 /*% ripper: $:2 %*/
15769 }
15770#line 15771 "parse.c"
15771 break;
15772
15773 case 539: /* p_lbracket: '[' p_pktbl */
15774#line 5492 "parse.y"
15775 {
15776 (yyval.tbl) = (yyvsp[0].tbl);
15777 /*% ripper: $:2 %*/
15778 }
15779#line 15780 "parse.c"
15780 break;
15781
15782 case 542: /* p_expr_basic: p_const p_lparen p_args rparen */
15783#line 5501 "parse.y"
15784 {
15785 pop_pktbl(p, (yyvsp[-2].tbl));
15786 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15787 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15788 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
15789 }
15790#line 15791 "parse.c"
15791 break;
15792
15793 case 543: /* p_expr_basic: p_const p_lparen p_find rparen */
15794#line 5508 "parse.y"
15795 {
15796 pop_pktbl(p, (yyvsp[-2].tbl));
15797 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15798 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15799 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
15800 }
15801#line 15802 "parse.c"
15802 break;
15803
15804 case 544: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
15805#line 5515 "parse.y"
15806 {
15807 pop_pktbl(p, (yyvsp[-2].tbl));
15808 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15809 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15810 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
15811 }
15812#line 15813 "parse.c"
15813 break;
15814
15815 case 545: /* p_expr_basic: p_const '(' rparen */
15816#line 5522 "parse.y"
15817 {
15818 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15819 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
15820 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
15821 }
15822#line 15823 "parse.c"
15823 break;
15824
15825 case 546: /* p_expr_basic: p_const p_lbracket p_args rbracket */
15826#line 5528 "parse.y"
15827 {
15828 pop_pktbl(p, (yyvsp[-2].tbl));
15829 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15830 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15831 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
15832 }
15833#line 15834 "parse.c"
15834 break;
15835
15836 case 547: /* p_expr_basic: p_const p_lbracket p_find rbracket */
15837#line 5535 "parse.y"
15838 {
15839 pop_pktbl(p, (yyvsp[-2].tbl));
15840 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15841 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15842 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
15843 }
15844#line 15845 "parse.c"
15845 break;
15846
15847 case 548: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
15848#line 5542 "parse.y"
15849 {
15850 pop_pktbl(p, (yyvsp[-2].tbl));
15851 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15852 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15853 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
15854 }
15855#line 15856 "parse.c"
15856 break;
15857
15858 case 549: /* p_expr_basic: p_const '[' rbracket */
15859#line 5549 "parse.y"
15860 {
15861 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15862 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
15863 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
15864 }
15865#line 15866 "parse.c"
15866 break;
15867
15868 case 550: /* p_expr_basic: "[" p_args rbracket */
15869#line 5555 "parse.y"
15870 {
15871 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
15872 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
15873 }
15874#line 15875 "parse.c"
15875 break;
15876
15877 case 551: /* p_expr_basic: "[" p_find rbracket */
15878#line 5560 "parse.y"
15879 {
15880 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
15881 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
15882 }
15883#line 15884 "parse.c"
15884 break;
15885
15886 case 552: /* p_expr_basic: "[" rbracket */
15887#line 5565 "parse.y"
15888 {
15889 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15890 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
15891 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
15892 }
15893#line 15894 "parse.c"
15894 break;
15895
15896 case 553: /* $@32: %empty */
15897#line 5571 "parse.y"
15898 {
15899 p->ctxt.in_kwarg = 0;
15900 }
15901#line 15902 "parse.c"
15902 break;
15903
15904 case 554: /* p_expr_basic: "{" p_pktbl lex_ctxt $@32 p_kwargs rbrace */
15905#line 5575 "parse.y"
15906 {
15907 pop_pktbl(p, (yyvsp[-4].tbl));
15908 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
15909 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
15910 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
15911 }
15912#line 15913 "parse.c"
15913 break;
15914
15915 case 555: /* p_expr_basic: "{" rbrace */
15916#line 5582 "parse.y"
15917 {
15918 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
15919 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
15920 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
15921 }
15922#line 15923 "parse.c"
15923 break;
15924
15925 case 556: /* p_expr_basic: "(" p_pktbl p_expr rparen */
15926#line 5588 "parse.y"
15927 {
15928 pop_pktbl(p, (yyvsp[-2].tbl));
15929 (yyval.node) = (yyvsp[-1].node);
15930 /*% ripper: $:p_expr %*/
15931 }
15932#line 15933 "parse.c"
15933 break;
15934
15935 case 557: /* p_args: p_expr */
15936#line 5596 "parse.y"
15937 {
15938 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
15939 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
15940 /*% ripper: [[$:1], Qnil, Qnil] %*/
15941 }
15942#line 15943 "parse.c"
15943 break;
15944
15945 case 558: /* p_args: p_args_head */
15946#line 5602 "parse.y"
15947 {
15948 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
15949 /*% ripper: [$:1, Qnil, Qnil] %*/
15950 }
15951#line 15952 "parse.c"
15952 break;
15953
15954 case 559: /* p_args: p_args_head p_arg */
15955#line 5607 "parse.y"
15956 {
15957 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
15958 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
15959 }
15960#line 15961 "parse.c"
15961 break;
15962
15963 case 560: /* p_args: p_args_head p_rest */
15964#line 5612 "parse.y"
15965 {
15966 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
15967 /*% ripper: [$:1, $:2, Qnil] %*/
15968 }
15969#line 15970 "parse.c"
15970 break;
15971
15972 case 561: /* p_args: p_args_head p_rest ',' p_args_post */
15973#line 5617 "parse.y"
15974 {
15975 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15976 /*% ripper: [$:1, $:2, $:4] %*/
15977 }
15978#line 15979 "parse.c"
15979 break;
15980
15981 case 564: /* p_args_head: p_args_head p_arg ',' */
15982#line 5626 "parse.y"
15983 {
15984 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
15985 /*% ripper: rb_ary_concat($:1, $:2) %*/
15986 }
15987#line 15988 "parse.c"
15988 break;
15989
15990 case 565: /* p_args_tail: p_rest */
15991#line 5633 "parse.y"
15992 {
15993 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
15994 /*% ripper: [Qnil, $:1, Qnil] %*/
15995 }
15996#line 15997 "parse.c"
15997 break;
15998
15999 case 566: /* p_args_tail: p_rest ',' p_args_post */
16000#line 5638 "parse.y"
16001 {
16002 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16003 /*% ripper: [Qnil, $:1, $:3] %*/
16004 }
16005#line 16006 "parse.c"
16006 break;
16007
16008 case 567: /* p_find: p_rest ',' p_args_post ',' p_rest */
16009#line 5645 "parse.y"
16010 {
16011 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16012 /*% ripper: [$:1, $:3, $:5] %*/
16013 }
16014#line 16015 "parse.c"
16015 break;
16016
16017 case 568: /* p_rest: "*" "local variable or method" */
16018#line 5653 "parse.y"
16019 {
16020 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16021 /*% ripper: var_field!($:2) %*/
16022 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16023 }
16024#line 16025 "parse.c"
16025 break;
16026
16027 case 569: /* p_rest: "*" */
16028#line 5659 "parse.y"
16029 {
16030 (yyval.node) = 0;
16031 /*% ripper: var_field!(Qnil) %*/
16032 }
16033#line 16034 "parse.c"
16034 break;
16035
16036 case 571: /* p_args_post: p_args_post ',' p_arg */
16037#line 5667 "parse.y"
16038 {
16039 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16040 /*% ripper: rb_ary_concat($:1, $:3) %*/
16041 }
16042#line 16043 "parse.c"
16043 break;
16044
16045 case 572: /* p_arg: p_expr */
16046#line 5674 "parse.y"
16047 {
16048 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16049 /*% ripper: [$:1] %*/
16050 }
16051#line 16052 "parse.c"
16052 break;
16053
16054 case 573: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16055#line 5681 "parse.y"
16056 {
16057 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16058 /*% ripper: [$:1, $:3] %*/
16059 }
16060#line 16061 "parse.c"
16061 break;
16062
16063 case 574: /* p_kwargs: p_kwarg */
16064#line 5686 "parse.y"
16065 {
16066 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16067 /*% ripper: [$:1, Qnil] %*/
16068 }
16069#line 16070 "parse.c"
16070 break;
16071
16072 case 575: /* p_kwargs: p_kwarg ',' */
16073#line 5691 "parse.y"
16074 {
16075 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16076 /*% ripper: [$:1, Qnil] %*/
16077 }
16078#line 16079 "parse.c"
16079 break;
16080
16081 case 576: /* p_kwargs: p_any_kwrest */
16082#line 5696 "parse.y"
16083 {
16084 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16085 /*% ripper: [[], $:1] %*/
16086 }
16087#line 16088 "parse.c"
16088 break;
16089
16090 case 578: /* p_kwarg: p_kwarg ',' p_kw */
16091#line 5705 "parse.y"
16092 {
16093 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16094 /*% ripper: rb_ary_push($:1, $:3) %*/
16095 }
16096#line 16097 "parse.c"
16097 break;
16098
16099 case 579: /* p_kw: p_kw_label p_expr */
16100#line 5712 "parse.y"
16101 {
16102 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16103 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16104 /*% ripper: [$:1, $:2] %*/
16105 }
16106#line 16107 "parse.c"
16107 break;
16108
16109 case 580: /* p_kw: p_kw_label */
16110#line 5718 "parse.y"
16111 {
16112 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16113 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16114 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16115 }
16116 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16117 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16118 /*% ripper: [$:1, Qnil] %*/
16119 }
16120#line 16121 "parse.c"
16121 break;
16122
16123 case 582: /* p_kw_label: "string literal" string_contents tLABEL_END */
16124#line 5731 "parse.y"
16125 {
16126 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16127 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16128 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16129 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16130 }
16131 else {
16132 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16133 (yyval.id) = rb_intern_str(STR_NEW0());
16134 }
16135 /*% ripper: $:2 %*/
16136 }
16137#line 16138 "parse.c"
16138 break;
16139
16140 case 583: /* p_kwrest: kwrest_mark "local variable or method" */
16141#line 5746 "parse.y"
16142 {
16143 (yyval.id) = (yyvsp[0].id);
16144 /*% ripper: var_field!($:2) %*/
16145 }
16146#line 16147 "parse.c"
16147 break;
16148
16149 case 584: /* p_kwrest: kwrest_mark */
16150#line 5751 "parse.y"
16151 {
16152 (yyval.id) = 0;
16153 /*% ripper: Qnil %*/
16154 }
16155#line 16156 "parse.c"
16156 break;
16157
16158 case 585: /* p_kwnorest: kwrest_mark "'nil'" */
16159#line 5758 "parse.y"
16160 {
16161 (yyval.id) = 0;
16162 }
16163#line 16164 "parse.c"
16164 break;
16165
16166 case 587: /* p_any_kwrest: p_kwnorest */
16167#line 5765 "parse.y"
16168 {
16169 (yyval.id) = idNil;
16170 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16171 }
16172#line 16173 "parse.c"
16173 break;
16174
16175 case 589: /* p_value: p_primitive_value ".." p_primitive_value */
16176#line 5773 "parse.y"
16177 {
16178 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16179 /*% ripper: dot2!($:1, $:3) %*/
16180 }
16181#line 16182 "parse.c"
16182 break;
16183
16184 case 590: /* p_value: p_primitive_value "..." p_primitive_value */
16185#line 5778 "parse.y"
16186 {
16187 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16188 /*% ripper: dot3!($:1, $:3) %*/
16189 }
16190#line 16191 "parse.c"
16191 break;
16192
16193 case 591: /* p_value: p_primitive_value ".." */
16194#line 5783 "parse.y"
16195 {
16196 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16197 /*% ripper: dot2!($:1, Qnil) %*/
16198 }
16199#line 16200 "parse.c"
16200 break;
16201
16202 case 592: /* p_value: p_primitive_value "..." */
16203#line 5788 "parse.y"
16204 {
16205 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16206 /*% ripper: dot3!($:1, Qnil) %*/
16207 }
16208#line 16209 "parse.c"
16209 break;
16210
16211 case 596: /* p_value: "(.." p_primitive_value */
16212#line 5796 "parse.y"
16213 {
16214 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16215 /*% ripper: dot2!(Qnil, $:2) %*/
16216 }
16217#line 16218 "parse.c"
16218 break;
16219
16220 case 597: /* p_value: "(..." p_primitive_value */
16221#line 5801 "parse.y"
16222 {
16223 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16224 /*% ripper: dot3!(Qnil, $:2) %*/
16225 }
16226#line 16227 "parse.c"
16227 break;
16228
16229 case 606: /* p_primitive: keyword_variable */
16230#line 5809 "parse.y"
16231 {
16232 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16233 /*% ripper: var_ref!($:1) %*/
16234 }
16235#line 16236 "parse.c"
16236 break;
16237
16238 case 608: /* value_expr_p_primitive: p_primitive */
16239#line 3063 "parse.y"
16240 {
16241 value_expr((yyvsp[0].node));
16242 (yyval.node) = (yyvsp[0].node);
16243 }
16244#line 16245 "parse.c"
16245 break;
16246
16247 case 610: /* p_variable: "local variable or method" */
16248#line 5820 "parse.y"
16249 {
16250 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16251 /*% ripper: var_field!($:1) %*/
16252 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16253 }
16254#line 16255 "parse.c"
16255 break;
16256
16257 case 611: /* p_var_ref: '^' "local variable or method" */
16258#line 5828 "parse.y"
16259 {
16260 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16261 if (!n) {
16262 n = NEW_ERROR(&(yyloc));
16263 }
16264 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16265 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16266 }
16267 (yyval.node) = n;
16268 /*% ripper: var_ref!($:2) %*/
16269 }
16270#line 16271 "parse.c"
16271 break;
16272
16273 case 612: /* p_var_ref: '^' nonlocal_var */
16274#line 5840 "parse.y"
16275 {
16276 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16277 /*% ripper: var_ref!($:2) %*/
16278 }
16279#line 16280 "parse.c"
16280 break;
16281
16282 case 613: /* p_expr_ref: '^' "(" expr_value rparen */
16283#line 5847 "parse.y"
16284 {
16285 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16286 /*% ripper: begin!($:3) %*/
16287 }
16288#line 16289 "parse.c"
16289 break;
16290
16291 case 614: /* p_const: ":: at EXPR_BEG" cname */
16292#line 5854 "parse.y"
16293 {
16294 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
16295 /*% ripper: top_const_ref!($:2) %*/
16296 }
16297#line 16298 "parse.c"
16298 break;
16299
16300 case 615: /* p_const: p_const "::" cname */
16301#line 5859 "parse.y"
16302 {
16303 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
16304 /*% ripper: const_path_ref!($:1, $:3) %*/
16305 }
16306#line 16307 "parse.c"
16307 break;
16308
16309 case 616: /* p_const: "constant" */
16310#line 5864 "parse.y"
16311 {
16312 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16313 /*% ripper: var_ref!($:1) %*/
16314 }
16315#line 16316 "parse.c"
16316 break;
16317
16318 case 617: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16319#line 5873 "parse.y"
16320 {
16321 NODE *err = (yyvsp[-3].node);
16322 if ((yyvsp[-3].node)) {
16323 err = NEW_ERRINFO(&(yylsp[-3]));
16324 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16325 }
16326 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16327 if ((yyvsp[-4].node)) {
16328 fixpos((yyval.node), (yyvsp[-4].node));
16329 }
16330 else if ((yyvsp[-3].node)) {
16331 fixpos((yyval.node), (yyvsp[-3].node));
16332 }
16333 else {
16334 fixpos((yyval.node), (yyvsp[-1].node));
16335 }
16336 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16337 }
16338#line 16339 "parse.c"
16339 break;
16340
16341 case 619: /* exc_list: arg_value */
16342#line 5895 "parse.y"
16343 {
16344 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16345 /*% ripper: rb_ary_new3(1, $:1) %*/
16346 }
16347#line 16348 "parse.c"
16348 break;
16349
16350 case 620: /* exc_list: mrhs */
16351#line 5900 "parse.y"
16352 {
16353 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16354 }
16355#line 16356 "parse.c"
16356 break;
16357
16358 case 622: /* exc_var: "=>" lhs */
16359#line 5907 "parse.y"
16360 {
16361 (yyval.node) = (yyvsp[0].node);
16362 /*% ripper: $:2 %*/
16363 }
16364#line 16365 "parse.c"
16365 break;
16366
16367 case 624: /* opt_ensure: k_ensure stmts option_terms */
16368#line 5915 "parse.y"
16369 {
16370 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16371 (yyval.node) = (yyvsp[-1].node);
16372 void_expr(p, void_stmts(p, (yyval.node)));
16373 /*% ripper: ensure!($:2) %*/
16374 }
16375#line 16376 "parse.c"
16376 break;
16377
16378 case 628: /* strings: string */
16379#line 5929 "parse.y"
16380 {
16381 if (!(yyvsp[0].node)) {
16382 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16383 } else {
16384 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16385 }
16386 /*% ripper: $:1 %*/
16387 }
16388#line 16389 "parse.c"
16389 break;
16390
16391 case 631: /* string: string string1 */
16392#line 5942 "parse.y"
16393 {
16394 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16395 /*% ripper: string_concat!($:1, $:2) %*/
16396 }
16397#line 16398 "parse.c"
16398 break;
16399
16400 case 632: /* string1: "string literal" string_contents "terminator" */
16401#line 5949 "parse.y"
16402 {
16403 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16404 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16405 /*% ripper: $:2 %*/
16406 if (p->heredoc_indent > 0) {
16407 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16408 p->heredoc_indent = 0;
16409 }
16410 /*% ripper: string_literal!($:$) %*/
16411 }
16412#line 16413 "parse.c"
16413 break;
16414
16415 case 633: /* xstring: "backtick literal" xstring_contents "terminator" */
16416#line 5962 "parse.y"
16417 {
16418 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16419 /*% ripper: $:2 %*/
16420 if (p->heredoc_indent > 0) {
16421 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16422 p->heredoc_indent = 0;
16423 }
16424 /*% ripper: xstring_literal!($:$) %*/
16425 }
16426#line 16427 "parse.c"
16427 break;
16428
16429 case 634: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16430#line 5974 "parse.y"
16431 {
16432 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16433 /*% ripper: regexp_literal!($:2, $:3) %*/
16434 }
16435#line 16436 "parse.c"
16436 break;
16437
16438 case 637: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16439#line 3071 "parse.y"
16440 {
16441 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16442 /*% ripper: array!($:3) %*/
16443 }
16444#line 16445 "parse.c"
16445 break;
16446
16447 case 639: /* word_list: %empty */
16448#line 5984 "parse.y"
16449 {
16450 (yyval.node) = 0;
16451 /*% ripper: words_new! %*/
16452 }
16453#line 16454 "parse.c"
16454 break;
16455
16456 case 640: /* word_list: word_list word nonempty_list_' ' */
16457#line 5989 "parse.y"
16458 {
16459 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16460 /*% ripper: words_add!($:1, $:2) %*/
16461 }
16462#line 16463 "parse.c"
16463 break;
16464
16465 case 642: /* word: word string_content */
16466#line 5998 "parse.y"
16467 {
16468 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16469 /*% ripper: word_add!($:1, $:2) %*/
16470 }
16471#line 16472 "parse.c"
16472 break;
16473
16474 case 643: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16475#line 3071 "parse.y"
16476 {
16477 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16478 /*% ripper: array!($:3) %*/
16479 }
16480#line 16481 "parse.c"
16481 break;
16482
16483 case 645: /* symbol_list: %empty */
16484#line 6008 "parse.y"
16485 {
16486 (yyval.node) = 0;
16487 /*% ripper: symbols_new! %*/
16488 }
16489#line 16490 "parse.c"
16490 break;
16491
16492 case 646: /* symbol_list: symbol_list word nonempty_list_' ' */
16493#line 6013 "parse.y"
16494 {
16495 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16496 /*% ripper: symbols_add!($:1, $:2) %*/
16497 }
16498#line 16499 "parse.c"
16499 break;
16500
16501 case 647: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16502#line 3071 "parse.y"
16503 {
16504 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16505 /*% ripper: array!($:3) %*/
16506 }
16507#line 16508 "parse.c"
16508 break;
16509
16510 case 649: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16511#line 3071 "parse.y"
16512 {
16513 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16514 /*% ripper: array!($:3) %*/
16515 }
16516#line 16517 "parse.c"
16517 break;
16518
16519 case 651: /* qword_list: %empty */
16520#line 6026 "parse.y"
16521 {
16522 (yyval.node) = 0;
16523 /*% ripper: qwords_new! %*/
16524 }
16525#line 16526 "parse.c"
16526 break;
16527
16528 case 652: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16529#line 6031 "parse.y"
16530 {
16531 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16532 /*% ripper: qwords_add!($:1, $:2) %*/
16533 }
16534#line 16535 "parse.c"
16535 break;
16536
16537 case 653: /* qsym_list: %empty */
16538#line 6038 "parse.y"
16539 {
16540 (yyval.node) = 0;
16541 /*% ripper: qsymbols_new! %*/
16542 }
16543#line 16544 "parse.c"
16544 break;
16545
16546 case 654: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16547#line 6043 "parse.y"
16548 {
16549 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16550 /*% ripper: qsymbols_add!($:1, $:2) %*/
16551 }
16552#line 16553 "parse.c"
16553 break;
16554
16555 case 655: /* string_contents: %empty */
16556#line 6050 "parse.y"
16557 {
16558 (yyval.node) = 0;
16559 /*% ripper: string_content! %*/
16560 }
16561#line 16562 "parse.c"
16562 break;
16563
16564 case 656: /* string_contents: string_contents string_content */
16565#line 6055 "parse.y"
16566 {
16567 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16568 /*% ripper: string_add!($:1, $:2) %*/
16569 }
16570#line 16571 "parse.c"
16571 break;
16572
16573 case 657: /* xstring_contents: %empty */
16574#line 6062 "parse.y"
16575 {
16576 (yyval.node) = 0;
16577 /*% ripper: xstring_new! %*/
16578 }
16579#line 16580 "parse.c"
16580 break;
16581
16582 case 658: /* xstring_contents: xstring_contents string_content */
16583#line 6067 "parse.y"
16584 {
16585 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16586 /*% ripper: xstring_add!($:1, $:2) %*/
16587 }
16588#line 16589 "parse.c"
16589 break;
16590
16591 case 659: /* regexp_contents: %empty */
16592#line 6074 "parse.y"
16593 {
16594 (yyval.node) = 0;
16595 /*% ripper: regexp_new! %*/
16596 }
16597#line 16598 "parse.c"
16598 break;
16599
16600 case 660: /* regexp_contents: regexp_contents string_content */
16601#line 6079 "parse.y"
16602 {
16603 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16604 if (!head) {
16605 (yyval.node) = tail;
16606 }
16607 else if (!tail) {
16608 (yyval.node) = head;
16609 }
16610 else {
16611 switch (nd_type(head)) {
16612 case NODE_STR:
16613 head = str2dstr(p, head);
16614 break;
16615 case NODE_DSTR:
16616 break;
16617 default:
16618 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16619 break;
16620 }
16621 (yyval.node) = list_append(p, head, tail);
16622 }
16623 /*% ripper: regexp_add!($:1, $:2) %*/
16624 }
16625#line 16626 "parse.c"
16626 break;
16627
16628 case 662: /* @33: %empty */
16629#line 6107 "parse.y"
16630 {
16631 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16632 (yyval.strterm) = p->lex.strterm;
16633 p->lex.strterm = 0;
16634 SET_LEX_STATE(EXPR_BEG);
16635 }
16636#line 16637 "parse.c"
16637 break;
16638
16639 case 663: /* string_content: tSTRING_DVAR @33 string_dvar */
16640#line 6114 "parse.y"
16641 {
16642 p->lex.strterm = (yyvsp[-1].strterm);
16643 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
16644 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16645 /*% ripper: string_dvar!($:3) %*/
16646 }
16647#line 16648 "parse.c"
16648 break;
16649
16650 case 664: /* @34: %empty */
16651#line 6121 "parse.y"
16652 {
16653 CMDARG_PUSH(0);
16654 COND_PUSH(0);
16655 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16656 (yyval.strterm) = p->lex.strterm;
16657 p->lex.strterm = 0;
16658 SET_LEX_STATE(EXPR_BEG);
16659 }
16660#line 16661 "parse.c"
16661 break;
16662
16663 case 665: /* @35: %empty */
16664#line 6129 "parse.y"
16665 {
16666 (yyval.num) = p->lex.brace_nest;
16667 p->lex.brace_nest = 0;
16668 }
16669#line 16670 "parse.c"
16670 break;
16671
16672 case 666: /* @36: %empty */
16673#line 6133 "parse.y"
16674 {
16675 (yyval.num) = p->heredoc_indent;
16676 p->heredoc_indent = 0;
16677 }
16678#line 16679 "parse.c"
16679 break;
16680
16681 case 667: /* string_content: "'#{'" @34 @35 @36 compstmt_stmts string_dend */
16682#line 6138 "parse.y"
16683 {
16684 COND_POP();
16685 CMDARG_POP();
16686 p->lex.strterm = (yyvsp[-4].strterm);
16687 SET_LEX_STATE((yyvsp[-5].state));
16688 p->lex.brace_nest = (yyvsp[-3].num);
16689 p->heredoc_indent = (yyvsp[-2].num);
16690 p->heredoc_line_indent = -1;
16691 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16692 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
16693 /*% ripper: string_embexpr!($:compstmt) %*/
16694 }
16695#line 16696 "parse.c"
16696 break;
16697
16698 case 670: /* string_dvar: nonlocal_var */
16699#line 6157 "parse.y"
16700 {
16701 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16702 /*% ripper: var_ref!($:1) %*/
16703 }
16704#line 16705 "parse.c"
16705 break;
16706
16707 case 674: /* ssym: "symbol literal" sym */
16708#line 6169 "parse.y"
16709 {
16710 SET_LEX_STATE(EXPR_END);
16711 VALUE str = rb_id2str((yyvsp[0].id));
16712 /*
16713 * TODO:
16714 * set_yylval_noname sets invalid id to yylval.
16715 * This branch can be removed once yylval is changed to
16716 * hold lexed string.
16717 */
16718 if (!str) str = STR_NEW0();
16719 (yyval.node) = NEW_SYM(str, &(yyloc));
16720 /*% ripper: symbol_literal!(symbol!($:2)) %*/
16721 }
16722#line 16723 "parse.c"
16723 break;
16724
16725 case 677: /* dsym: "symbol literal" string_contents "terminator" */
16726#line 6189 "parse.y"
16727 {
16728 SET_LEX_STATE(EXPR_END);
16729 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
16730 /*% ripper: dyna_symbol!($:2) %*/
16731 }
16732#line 16733 "parse.c"
16733 break;
16734
16735 case 679: /* numeric: tUMINUS_NUM simple_numeric */
16736#line 6198 "parse.y"
16737 {
16738 (yyval.node) = (yyvsp[0].node);
16739 negate_lit(p, (yyval.node));
16740 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
16741 }
16742#line 16743 "parse.c"
16743 break;
16744
16745 case 690: /* keyword_variable: "'nil'" */
16746#line 6220 "parse.y"
16747 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
16748#line 16749 "parse.c"
16749 break;
16750
16751 case 691: /* keyword_variable: "'self'" */
16752#line 6221 "parse.y"
16753 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
16754#line 16755 "parse.c"
16755 break;
16756
16757 case 692: /* keyword_variable: "'true'" */
16758#line 6222 "parse.y"
16759 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
16760#line 16761 "parse.c"
16761 break;
16762
16763 case 693: /* keyword_variable: "'false'" */
16764#line 6223 "parse.y"
16765 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
16766#line 16767 "parse.c"
16767 break;
16768
16769 case 694: /* keyword_variable: "'__FILE__'" */
16770#line 6224 "parse.y"
16771 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
16772#line 16773 "parse.c"
16773 break;
16774
16775 case 695: /* keyword_variable: "'__LINE__'" */
16776#line 6225 "parse.y"
16777 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
16778#line 16779 "parse.c"
16779 break;
16780
16781 case 696: /* keyword_variable: "'__ENCODING__'" */
16782#line 6226 "parse.y"
16783 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
16784#line 16785 "parse.c"
16785 break;
16786
16787 case 697: /* var_ref: user_variable */
16788#line 6230 "parse.y"
16789 {
16790 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16791 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
16792 /*% ripper: var_ref!($:1) %*/
16793 }
16794 else {
16795 /*% ripper: vcall!($:1) %*/
16796 }
16797 }
16798#line 16799 "parse.c"
16799 break;
16800
16801 case 698: /* var_ref: keyword_variable */
16802#line 6240 "parse.y"
16803 {
16804 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16805 /*% ripper: var_ref!($:1) %*/
16806 }
16807#line 16808 "parse.c"
16808 break;
16809
16810 case 699: /* var_lhs: user_variable */
16811#line 6247 "parse.y"
16812 {
16813 /*% ripper: var_field!($:1) %*/
16814 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16815 }
16816#line 16817 "parse.c"
16817 break;
16818
16819 case 700: /* var_lhs: keyword_variable */
16820#line 6247 "parse.y"
16821 {
16822 /*% ripper: var_field!($:1) %*/
16823 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16824 }
16825#line 16826 "parse.c"
16826 break;
16827
16828 case 703: /* $@37: %empty */
16829#line 6258 "parse.y"
16830 {
16831 SET_LEX_STATE(EXPR_BEG);
16832 p->command_start = TRUE;
16833 }
16834#line 16835 "parse.c"
16835 break;
16836
16837 case 704: /* superclass: '<' $@37 expr_value term */
16838#line 6263 "parse.y"
16839 {
16840 (yyval.node) = (yyvsp[-1].node);
16841 /*% ripper: $:3 %*/
16842 }
16843#line 16844 "parse.c"
16844 break;
16845
16846 case 705: /* superclass: %empty */
16847#line 6268 "parse.y"
16848 {
16849 (yyval.node) = 0;
16850 /*% ripper: Qnil %*/
16851 }
16852#line 16853 "parse.c"
16853 break;
16854
16855 case 707: /* f_opt_paren_args: none */
16856#line 6276 "parse.y"
16857 {
16858 p->ctxt.in_argdef = 0;
16859 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
16860 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
16861 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
16862 }
16863#line 16864 "parse.c"
16864 break;
16865
16866 case 708: /* f_paren_args: '(' f_args rparen */
16867#line 6285 "parse.y"
16868 {
16869 (yyval.node_args) = (yyvsp[-1].node_args);
16870 /*% ripper: paren!($:2) %*/
16871 SET_LEX_STATE(EXPR_BEG);
16872 p->command_start = TRUE;
16873 p->ctxt.in_argdef = 0;
16874 }
16875#line 16876 "parse.c"
16876 break;
16877
16878 case 710: /* @38: %empty */
16879#line 6295 "parse.y"
16880 {
16881 (yyval.ctxt) = p->ctxt;
16882 p->ctxt.in_kwarg = 1;
16883 p->ctxt.in_argdef = 1;
16884 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
16885 }
16886#line 16887 "parse.c"
16887 break;
16888
16889 case 711: /* f_arglist: @38 f_args term */
16890#line 6302 "parse.y"
16891 {
16892 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
16893 p->ctxt.in_argdef = 0;
16894 (yyval.node_args) = (yyvsp[-1].node_args);
16895 SET_LEX_STATE(EXPR_BEG);
16896 p->command_start = TRUE;
16897 /*% ripper: $:2 %*/
16898 }
16899#line 16900 "parse.c"
16900 break;
16901
16902 case 712: /* f_kw_arg_value: f_label arg_value */
16903#line 2982 "parse.y"
16904 {
16905 p->ctxt.in_argdef = 1;
16906 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
16907 /*% ripper: [$:$, $:value] %*/
16908 }
16909#line 16910 "parse.c"
16910 break;
16911
16912 case 713: /* f_kw_arg_value: f_label */
16913#line 2988 "parse.y"
16914 {
16915 p->ctxt.in_argdef = 1;
16916 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
16917 /*% ripper: [$:$, 0] %*/
16918 }
16919#line 16920 "parse.c"
16920 break;
16921
16922 case 714: /* f_kwarg_arg_value: f_kw_arg_value */
16923#line 2997 "parse.y"
16924 {
16925 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
16926 /*% ripper: rb_ary_new3(1, $:1) %*/
16927 }
16928#line 16929 "parse.c"
16929 break;
16930
16931 case 715: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
16932#line 3002 "parse.y"
16933 {
16934 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
16935 /*% ripper: rb_ary_push($:1, $:3) %*/
16936 }
16937#line 16938 "parse.c"
16938 break;
16939
16940 case 716: /* args_tail: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
16941#line 6313 "parse.y"
16942 {
16943 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
16944 /*% ripper: [$:1, $:3, $:4] %*/
16945 }
16946#line 16947 "parse.c"
16947 break;
16948
16949 case 717: /* args_tail: f_kwarg_arg_value opt_f_block_arg */
16950#line 6318 "parse.y"
16951 {
16952 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
16953 /*% ripper: [$:1, Qnil, $:2] %*/
16954 }
16955#line 16956 "parse.c"
16956 break;
16957
16958 case 718: /* args_tail: f_any_kwrest opt_f_block_arg */
16959#line 6323 "parse.y"
16960 {
16961 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
16962 /*% ripper: [Qnil, $:1, $:2] %*/
16963 }
16964#line 16965 "parse.c"
16965 break;
16966
16967 case 719: /* args_tail: f_block_arg */
16968#line 6328 "parse.y"
16969 {
16970 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
16971 /*% ripper: [Qnil, Qnil, $:1] %*/
16972 }
16973#line 16974 "parse.c"
16974 break;
16975
16976 case 720: /* args_tail: args_forward */
16977#line 6333 "parse.y"
16978 {
16979 ID fwd = (yyvsp[0].id);
16980 if (lambda_beginning_p() ||
16981 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
16982 yyerror0("unexpected ... in lambda argument");
16983 fwd = 0;
16984 }
16985 else {
16986 add_forwarding_args(p);
16987 }
16988 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
16989 (yyval.node_args)->nd_ainfo.forwarding = 1;
16990 /*% ripper: [Qnil, $:1, Qnil] %*/
16991 }
16992#line 16993 "parse.c"
16993 break;
16994
16995 case 721: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
16996#line 2961 "parse.y"
16997 {
16998 p->ctxt.in_argdef = 1;
16999 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17000 /*% ripper: [$:$, $:3] %*/
17001 }
17002#line 17003 "parse.c"
17003 break;
17004
17005 case 722: /* f_optarg_arg_value: f_opt_arg_value */
17006#line 2970 "parse.y"
17007 {
17008 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17009 /*% ripper: rb_ary_new3(1, $:1) %*/
17010 }
17011#line 17012 "parse.c"
17012 break;
17013
17014 case 723: /* f_optarg_arg_value: f_optarg_arg_value ',' f_opt_arg_value */
17015#line 2975 "parse.y"
17016 {
17017 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17018 /*% ripper: rb_ary_push($:1, $:3) %*/
17019 }
17020#line 17021 "parse.c"
17021 break;
17022
17023 case 724: /* opt_args_tail_args_tail: ',' args_tail */
17024#line 3050 "parse.y"
17025 {
17026 (yyval.node_args) = (yyvsp[0].node_args);
17027 /*% ripper: $:2 %*/
17028 }
17029#line 17030 "parse.c"
17030 break;
17031
17032 case 725: /* opt_args_tail_args_tail: %empty */
17033#line 3055 "parse.y"
17034 {
17035 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17036 /*% ripper: [Qnil, Qnil, Qnil] %*/
17037 }
17038#line 17039 "parse.c"
17039 break;
17040
17041 case 726: /* f_args: f_arg ',' f_optarg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17042#line 6350 "parse.y"
17043 {
17044 (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));
17045 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
17046 }
17047#line 17048 "parse.c"
17048 break;
17049
17050 case 727: /* f_args: f_arg ',' f_optarg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17051#line 6355 "parse.y"
17052 {
17053 (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));
17054 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
17055 }
17056#line 17057 "parse.c"
17057 break;
17058
17059 case 728: /* f_args: f_arg ',' f_optarg_arg_value opt_args_tail_args_tail */
17060#line 6360 "parse.y"
17061 {
17062 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17063 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
17064 }
17065#line 17066 "parse.c"
17066 break;
17067
17068 case 729: /* f_args: f_arg ',' f_optarg_arg_value ',' f_arg opt_args_tail_args_tail */
17069#line 6365 "parse.y"
17070 {
17071 (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));
17072 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
17073 }
17074#line 17075 "parse.c"
17075 break;
17076
17077 case 730: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
17078#line 6370 "parse.y"
17079 {
17080 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17081 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
17082 }
17083#line 17084 "parse.c"
17084 break;
17085
17086 case 731: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17087#line 6375 "parse.y"
17088 {
17089 (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));
17090 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
17091 }
17092#line 17093 "parse.c"
17093 break;
17094
17095 case 732: /* f_args: f_arg opt_args_tail_args_tail */
17096#line 6380 "parse.y"
17097 {
17098 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17099 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
17100 }
17101#line 17102 "parse.c"
17102 break;
17103
17104 case 733: /* f_args: f_optarg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17105#line 6385 "parse.y"
17106 {
17107 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17108 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
17109 }
17110#line 17111 "parse.c"
17111 break;
17112
17113 case 734: /* f_args: f_optarg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17114#line 6390 "parse.y"
17115 {
17116 (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));
17117 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
17118 }
17119#line 17120 "parse.c"
17120 break;
17121
17122 case 735: /* f_args: f_optarg_arg_value opt_args_tail_args_tail */
17123#line 6395 "parse.y"
17124 {
17125 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17126 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
17127 }
17128#line 17129 "parse.c"
17129 break;
17130
17131 case 736: /* f_args: f_optarg_arg_value ',' f_arg opt_args_tail_args_tail */
17132#line 6400 "parse.y"
17133 {
17134 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17135 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
17136 }
17137#line 17138 "parse.c"
17138 break;
17139
17140 case 737: /* f_args: f_rest_arg opt_args_tail_args_tail */
17141#line 6405 "parse.y"
17142 {
17143 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17144 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
17145 }
17146#line 17147 "parse.c"
17147 break;
17148
17149 case 738: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
17150#line 6410 "parse.y"
17151 {
17152 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17153 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
17154 }
17155#line 17156 "parse.c"
17156 break;
17157
17158 case 739: /* f_args: args_tail */
17159#line 6415 "parse.y"
17160 {
17161 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17162 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
17163 }
17164#line 17165 "parse.c"
17165 break;
17166
17167 case 740: /* f_args: %empty */
17168#line 6420 "parse.y"
17169 {
17170 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17171 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
17172 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17173 }
17174#line 17175 "parse.c"
17175 break;
17176
17177 case 741: /* args_forward: "(..." */
17178#line 6428 "parse.y"
17179 {
17180#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
17181 (yyval.id) = 0;
17182#else
17183 (yyval.id) = idFWD_KWREST;
17184#endif
17185 /*% ripper: args_forward! %*/
17186 }
17187#line 17188 "parse.c"
17188 break;
17189
17190 case 742: /* f_bad_arg: "constant" */
17191#line 6439 "parse.y"
17192 {
17193 static const char mesg[] = "formal argument cannot be a constant";
17194 /*%%%*/
17195 yyerror1(&(yylsp[0]), mesg);
17196 /*% %*/
17197 (yyval.id) = 0;
17198 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17199 }
17200#line 17201 "parse.c"
17201 break;
17202
17203 case 743: /* f_bad_arg: "instance variable" */
17204#line 6448 "parse.y"
17205 {
17206 static const char mesg[] = "formal argument cannot be an instance variable";
17207 /*%%%*/
17208 yyerror1(&(yylsp[0]), mesg);
17209 /*% %*/
17210 (yyval.id) = 0;
17211 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17212 }
17213#line 17214 "parse.c"
17214 break;
17215
17216 case 744: /* f_bad_arg: "global variable" */
17217#line 6457 "parse.y"
17218 {
17219 static const char mesg[] = "formal argument cannot be a global variable";
17220 /*%%%*/
17221 yyerror1(&(yylsp[0]), mesg);
17222 /*% %*/
17223 (yyval.id) = 0;
17224 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17225 }
17226#line 17227 "parse.c"
17227 break;
17228
17229 case 745: /* f_bad_arg: "class variable" */
17230#line 6466 "parse.y"
17231 {
17232 static const char mesg[] = "formal argument cannot be a class variable";
17233 /*%%%*/
17234 yyerror1(&(yylsp[0]), mesg);
17235 /*% %*/
17236 (yyval.id) = 0;
17237 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17238 }
17239#line 17240 "parse.c"
17240 break;
17241
17242 case 747: /* f_norm_arg: "local variable or method" */
17243#line 6478 "parse.y"
17244 {
17245 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17246 if (e) {
17247 /*% ripper[error]: param_error!(?e, $:1) %*/
17248 }
17249 p->max_numparam = ORDINAL_PARAM;
17250 }
17251#line 17252 "parse.c"
17252 break;
17253
17254 case 748: /* f_arg_asgn: f_norm_arg */
17255#line 6488 "parse.y"
17256 {
17257 arg_var(p, (yyvsp[0].id));
17258 (yyval.id) = (yyvsp[0].id);
17259 }
17260#line 17261 "parse.c"
17261 break;
17262
17263 case 749: /* f_arg_item: f_arg_asgn */
17264#line 6495 "parse.y"
17265 {
17266 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17267 /*% ripper: $:1 %*/
17268 }
17269#line 17270 "parse.c"
17270 break;
17271
17272 case 750: /* f_arg_item: "(" f_margs rparen */
17273#line 6500 "parse.y"
17274 {
17275 ID tid = internal_id(p);
17276 YYLTYPE loc;
17277 loc.beg_pos = (yylsp[-1]).beg_pos;
17278 loc.end_pos = (yylsp[-1]).beg_pos;
17279 arg_var(p, tid);
17280 if (dyna_in_block(p)) {
17281 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17282 }
17283 else {
17284 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17285 }
17286 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17287 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17288 /*% ripper: mlhs_paren!($:2) %*/
17289 }
17290#line 17291 "parse.c"
17291 break;
17292
17293 case 752: /* f_arg: f_arg ',' f_arg_item */
17294#line 6521 "parse.y"
17295 {
17296 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17297 (yyval.node_args_aux)->nd_plen++;
17298 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17299 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17300 /*% ripper: rb_ary_push($:1, $:3) %*/
17301 }
17302#line 17303 "parse.c"
17303 break;
17304
17305 case 753: /* f_label: "label" */
17306#line 6532 "parse.y"
17307 {
17308 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17309 if (e) {
17310 (yyval.id) = 0;
17311 /*% ripper[error]: param_error!(?e, $:1) %*/
17312 }
17313 /*
17314 * Workaround for Prism::ParseTest#test_filepath for
17315 * "unparser/corpus/literal/def.txt"
17316 *
17317 * See the discussion on https://github.com/ruby/ruby/pull/9923
17318 */
17319 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17320 /*% ripper: $:1 %*/
17321 p->max_numparam = ORDINAL_PARAM;
17322 p->ctxt.in_argdef = 0;
17323 }
17324#line 17325 "parse.c"
17325 break;
17326
17327 case 756: /* f_no_kwarg: p_kwnorest */
17328#line 6556 "parse.y"
17329 {
17330 /*% ripper: nokw_param!(Qnil) %*/
17331 }
17332#line 17333 "parse.c"
17333 break;
17334
17335 case 757: /* f_kwrest: kwrest_mark "local variable or method" */
17336#line 6562 "parse.y"
17337 {
17338 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17339 (yyval.id) = (yyvsp[0].id);
17340 /*% ripper: kwrest_param!($:2) %*/
17341 }
17342#line 17343 "parse.c"
17343 break;
17344
17345 case 758: /* f_kwrest: kwrest_mark */
17346#line 6568 "parse.y"
17347 {
17348 arg_var(p, idFWD_KWREST);
17349 (yyval.id) = idFWD_KWREST;
17350 /*% ripper: kwrest_param!(Qnil) %*/
17351 }
17352#line 17353 "parse.c"
17353 break;
17354
17355 case 761: /* f_rest_arg: restarg_mark "local variable or method" */
17356#line 6580 "parse.y"
17357 {
17358 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17359 (yyval.id) = (yyvsp[0].id);
17360 /*% ripper: rest_param!($:2) %*/
17361 }
17362#line 17363 "parse.c"
17363 break;
17364
17365 case 762: /* f_rest_arg: restarg_mark */
17366#line 6586 "parse.y"
17367 {
17368 arg_var(p, idFWD_REST);
17369 (yyval.id) = idFWD_REST;
17370 /*% ripper: rest_param!(Qnil) %*/
17371 }
17372#line 17373 "parse.c"
17373 break;
17374
17375 case 765: /* f_block_arg: blkarg_mark "local variable or method" */
17376#line 6598 "parse.y"
17377 {
17378 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17379 (yyval.id) = (yyvsp[0].id);
17380 /*% ripper: blockarg!($:2) %*/
17381 }
17382#line 17383 "parse.c"
17383 break;
17384
17385 case 766: /* f_block_arg: blkarg_mark */
17386#line 6604 "parse.y"
17387 {
17388 arg_var(p, idFWD_BLOCK);
17389 (yyval.id) = idFWD_BLOCK;
17390 /*% ripper: blockarg!(Qnil) %*/
17391 }
17392#line 17393 "parse.c"
17393 break;
17394
17395 case 767: /* opt_f_block_arg: ',' f_block_arg */
17396#line 6612 "parse.y"
17397 {
17398 (yyval.id) = (yyvsp[0].id);
17399 /*% ripper: $:2 %*/
17400 }
17401#line 17402 "parse.c"
17402 break;
17403
17404 case 768: /* opt_f_block_arg: none */
17405#line 6617 "parse.y"
17406 {
17407 (yyval.id) = 0;
17408 /*% ripper: Qnil %*/
17409 }
17410#line 17411 "parse.c"
17411 break;
17412
17413 case 769: /* value_expr_var_ref: var_ref */
17414#line 3063 "parse.y"
17415 {
17416 value_expr((yyvsp[0].node));
17417 (yyval.node) = (yyvsp[0].node);
17418 }
17419#line 17420 "parse.c"
17420 break;
17421
17422 case 771: /* $@39: %empty */
17423#line 6625 "parse.y"
17424 {
17425 SET_LEX_STATE(EXPR_BEG);
17426 p->ctxt.in_argdef = 0;
17427 }
17428#line 17429 "parse.c"
17429 break;
17430
17431 case 772: /* singleton: '(' $@39 expr rparen */
17432#line 6630 "parse.y"
17433 {
17434 p->ctxt.in_argdef = 1;
17435 NODE *expr = last_expr_node((yyvsp[-1].node));
17436 switch (nd_type(expr)) {
17437 case NODE_STR:
17438 case NODE_DSTR:
17439 case NODE_XSTR:
17440 case NODE_DXSTR:
17441 case NODE_REGX:
17442 case NODE_DREGX:
17443 case NODE_SYM:
17444 case NODE_LINE:
17445 case NODE_FILE:
17446 case NODE_ENCODING:
17447 case NODE_INTEGER:
17448 case NODE_FLOAT:
17449 case NODE_RATIONAL:
17450 case NODE_IMAGINARY:
17451 case NODE_DSYM:
17452 case NODE_LIST:
17453 case NODE_ZLIST:
17454 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17455 break;
17456 default:
17457 value_expr((yyvsp[-1].node));
17458 break;
17459 }
17460 (yyval.node) = (yyvsp[-1].node);
17461 /*% ripper: paren!($:3) %*/
17462 }
17463#line 17464 "parse.c"
17464 break;
17465
17466 case 774: /* assoc_list: assocs trailer */
17467#line 6664 "parse.y"
17468 {
17469 (yyval.node) = (yyvsp[-1].node);
17470 /*% ripper: assoclist_from_args!($:1) %*/
17471 }
17472#line 17473 "parse.c"
17473 break;
17474
17475 case 776: /* assocs: assocs ',' assoc */
17476#line 6673 "parse.y"
17477 {
17478 NODE *assocs = (yyvsp[-2].node);
17479 NODE *tail = (yyvsp[0].node);
17480 if (!assocs) {
17481 assocs = tail;
17482 }
17483 else if (tail) {
17484 if (RNODE_LIST(assocs)->nd_head) {
17485 NODE *n = RNODE_LIST(tail)->nd_next;
17486 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17487 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17488 /* DSTAR */
17489 tail = RNODE_HASH(n)->nd_head;
17490 }
17491 }
17492 if (tail) {
17493 assocs = list_concat(assocs, tail);
17494 }
17495 }
17496 (yyval.node) = assocs;
17497 /*% ripper: rb_ary_push($:1, $:3) %*/
17498 }
17499#line 17500 "parse.c"
17500 break;
17501
17502 case 777: /* assoc: arg_value "=>" arg_value */
17503#line 6698 "parse.y"
17504 {
17505 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17506 /*% ripper: assoc_new!($:1, $:3) %*/
17507 }
17508#line 17509 "parse.c"
17509 break;
17510
17511 case 778: /* assoc: "label" arg_value */
17512#line 6703 "parse.y"
17513 {
17514 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17515 /*% ripper: assoc_new!($:1, $:2) %*/
17516 }
17517#line 17518 "parse.c"
17518 break;
17519
17520 case 779: /* assoc: "label" */
17521#line 6708 "parse.y"
17522 {
17523 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17524 if (!val) val = NEW_ERROR(&(yyloc));
17525 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17526 /*% ripper: assoc_new!($:1, Qnil) %*/
17527 }
17528#line 17529 "parse.c"
17529 break;
17530
17531 case 780: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17532#line 6715 "parse.y"
17533 {
17534 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17535 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17536 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17537 }
17538#line 17539 "parse.c"
17539 break;
17540
17541 case 781: /* assoc: "**arg" arg_value */
17542#line 6721 "parse.y"
17543 {
17544 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17545 /*% ripper: assoc_splat!($:2) %*/
17546 }
17547#line 17548 "parse.c"
17548 break;
17549
17550 case 782: /* assoc: "**arg" */
17551#line 6726 "parse.y"
17552 {
17553 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17554 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17555 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17556 /*% ripper: assoc_splat!(Qnil) %*/
17557 }
17558#line 17559 "parse.c"
17559 break;
17560
17561 case 802: /* term: ';' */
17562#line 6771 "parse.y"
17563 {yyerrok;token_flush(p);}
17564#line 17565 "parse.c"
17565 break;
17566
17567 case 803: /* term: '\n' */
17568#line 6773 "parse.y"
17569 {
17570 (yyloc).end_pos = (yyloc).beg_pos;
17571 token_flush(p);
17572 }
17573#line 17574 "parse.c"
17574 break;
17575
17576 case 805: /* terms: terms ';' */
17577#line 6780 "parse.y"
17578 {yyerrok;}
17579#line 17580 "parse.c"
17580 break;
17581
17582 case 806: /* none: %empty */
17583#line 6784 "parse.y"
17584 {
17585 (yyval.node) = 0;
17586 }
17587#line 17588 "parse.c"
17588 break;
17589
17590
17591#line 17592 "parse.c"
17592
17593 default: break;
17594 }
17595 /* User semantic actions sometimes alter yychar, and that requires
17596 that yytoken be updated with the new translation. We take the
17597 approach of translating immediately before every use of yytoken.
17598 One alternative is translating here after every semantic action,
17599 but that translation would be missed if the semantic action invokes
17600 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17601 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17602 incorrect destructor might then be invoked immediately. In the
17603 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17604 to an incorrect destructor call or verbose syntax error message
17605 before the lookahead is translated. */
17606 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17607
17608 YYPOPSTACK (yylen);
17609 /* %after-reduce function. */
17610#line 2665 "parse.y"
17611 {after_reduce(yylen, p);}
17612#line 17613 "parse.c"
17613
17614 yylen = 0;
17615
17616 *++yyvsp = yyval;
17617 *++yylsp = yyloc;
17618
17619 /* Now 'shift' the result of the reduction. Determine what state
17620 that goes to, based on the state we popped back to and the rule
17621 number reduced by. */
17622 {
17623 const int yylhs = yyr1[yyn] - YYNTOKENS;
17624 const int yyi = yypgoto[yylhs] + *yyssp;
17625 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17626 ? yytable[yyi]
17627 : yydefgoto[yylhs]);
17628 }
17629
17630 goto yynewstate;
17631
17632
17633/*--------------------------------------.
17634| yyerrlab -- here on detecting error. |
17635`--------------------------------------*/
17636yyerrlab:
17637 /* Make sure we have latest lookahead translation. See comments at
17638 user semantic actions for why this is necessary. */
17639 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17640 /* If not already recovering from an error, report this error. */
17641 if (!yyerrstatus)
17642 {
17643 ++yynerrs;
17644 {
17645 yypcontext_t yyctx
17646 = {yyssp, yytoken, &yylloc};
17647 char const *yymsgp = YY_("syntax error");
17648 int yysyntax_error_status;
17649 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17650 if (yysyntax_error_status == 0)
17651 yymsgp = yymsg;
17652 else if (yysyntax_error_status == -1)
17653 {
17654 if (yymsg != yymsgbuf)
17655 YYSTACK_FREE (yymsg);
17656 yymsg = YY_CAST (char *,
17657 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17658 if (yymsg)
17659 {
17660 yysyntax_error_status
17661 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17662 yymsgp = yymsg;
17663 }
17664 else
17665 {
17666 yymsg = yymsgbuf;
17667 yymsg_alloc = sizeof yymsgbuf;
17668 yysyntax_error_status = YYENOMEM;
17669 }
17670 }
17671 yyerror (&yylloc, p, yymsgp);
17672 if (yysyntax_error_status == YYENOMEM)
17673 YYNOMEM;
17674 }
17675 }
17676
17677 yyerror_range[1] = yylloc;
17678 if (yyerrstatus == 3)
17679 {
17680 /* If just tried and failed to reuse lookahead token after an
17681 error, discard it. */
17682
17683 if (yychar <= END_OF_INPUT)
17684 {
17685 /* Return failure if at end of input. */
17686 if (yychar == END_OF_INPUT)
17687 YYABORT;
17688 }
17689 else
17690 {
17691 yydestruct ("Error: discarding",
17692 yytoken, &yylval, &yylloc, p);
17693 yychar = YYEMPTY;
17694 }
17695 }
17696
17697 /* Else will try to reuse lookahead token after shifting the error
17698 token. */
17699 goto yyerrlab1;
17700
17701
17702/*---------------------------------------------------.
17703| yyerrorlab -- error raised explicitly by YYERROR. |
17704`---------------------------------------------------*/
17705yyerrorlab:
17706 /* Pacify compilers when the user code never invokes YYERROR and the
17707 label yyerrorlab therefore never appears in user code. */
17708 if (0)
17709 YYERROR;
17710 ++yynerrs;
17711
17712 /* Do not reclaim the symbols of the rule whose action triggered
17713 this YYERROR. */
17714 YYPOPSTACK (yylen);
17715 /* %after-pop-stack function. */
17716#line 2667 "parse.y"
17717 {after_pop_stack(yylen, p);}
17718#line 17719 "parse.c"
17719
17720 yylen = 0;
17721 YY_STACK_PRINT (yyss, yyssp, p);
17722 yystate = *yyssp;
17723 goto yyerrlab1;
17724
17725
17726/*-------------------------------------------------------------.
17727| yyerrlab1 -- common code for both syntax error and YYERROR. |
17728`-------------------------------------------------------------*/
17729yyerrlab1:
17730 yyerrstatus = 3; /* Each real token shifted decrements this. */
17731
17732 /* Pop stack until we find a state that shifts the error token. */
17733 for (;;)
17734 {
17735 yyn = yypact[yystate];
17736 if (!yypact_value_is_default (yyn))
17737 {
17738 yyn += YYSYMBOL_YYerror;
17739 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
17740 {
17741 yyn = yytable[yyn];
17742 if (0 < yyn)
17743 break;
17744 }
17745 }
17746
17747 /* Pop the current state because it cannot handle the error token. */
17748 if (yyssp == yyss)
17749 YYABORT;
17750
17751 yyerror_range[1] = *yylsp;
17752 yydestruct ("Error: popping",
17753 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
17754 YYPOPSTACK (1);
17755 /* %after-pop-stack function. */
17756#line 2667 "parse.y"
17757 {after_pop_stack(1, p);}
17758#line 17759 "parse.c"
17759
17760 yystate = *yyssp;
17761 YY_STACK_PRINT (yyss, yyssp, p);
17762 }
17763
17764 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17765 *++yyvsp = yylval;
17766 YY_IGNORE_MAYBE_UNINITIALIZED_END
17767
17768 yyerror_range[2] = yylloc;
17769 ++yylsp;
17770 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
17771
17772 /* Shift the error token. */
17773 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
17774 /* %after-shift-error-token code. */
17775#line 2666 "parse.y"
17776 {after_shift_error_token(p);}
17777#line 17778 "parse.c"
17778
17779
17780 yystate = yyn;
17781 goto yynewstate;
17782
17783
17784/*-------------------------------------.
17785| yyacceptlab -- YYACCEPT comes here. |
17786`-------------------------------------*/
17787yyacceptlab:
17788 yyresult = 0;
17789 goto yyreturnlab;
17790
17791
17792/*-----------------------------------.
17793| yyabortlab -- YYABORT comes here. |
17794`-----------------------------------*/
17795yyabortlab:
17796 yyresult = 1;
17797 goto yyreturnlab;
17798
17799
17800/*-----------------------------------------------------------.
17801| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
17802`-----------------------------------------------------------*/
17803yyexhaustedlab:
17804 yyerror (&yylloc, p, YY_("memory exhausted"));
17805 yyresult = 2;
17806 goto yyreturnlab;
17807
17808
17809/*----------------------------------------------------------.
17810| yyreturnlab -- parsing is finished, clean up and return. |
17811`----------------------------------------------------------*/
17812yyreturnlab:
17813 if (yychar != YYEMPTY)
17814 {
17815 /* Make sure we have latest lookahead translation. See comments at
17816 user semantic actions for why this is necessary. */
17817 yytoken = YYTRANSLATE (yychar);
17818 yydestruct ("Cleanup: discarding lookahead",
17819 yytoken, &yylval, &yylloc, p);
17820 }
17821 /* Do not reclaim the symbols of the rule whose action triggered
17822 this YYABORT or YYACCEPT. */
17823 YYPOPSTACK (yylen);
17824 YY_STACK_PRINT (yyss, yyssp, p);
17825 while (yyssp != yyss)
17826 {
17827 yydestruct ("Cleanup: popping",
17828 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
17829 YYPOPSTACK (1);
17830 }
17831#ifndef yyoverflow
17832 if (yyss != yyssa)
17833 YYSTACK_FREE (yyss);
17834#endif
17835 if (yymsg != yymsgbuf)
17836 YYSTACK_FREE (yymsg);
17837 return yyresult;
17838}
17839
17840#line 6788 "parse.y"
17841
17842# undef p
17843# undef yylex
17844# undef yylval
17845# define yylval (*p->lval)
17846
17847static int regx_options(struct parser_params*);
17848static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
17849static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
17850static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
17851static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
17852
17853#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
17854
17855# define set_yylval_node(x) { \
17856 YYLTYPE _cur_loc; \
17857 rb_parser_set_location(p, &_cur_loc); \
17858 yylval.node = (x); \
17859 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
17860}
17861# define set_yylval_str(x) \
17862do { \
17863 set_yylval_node(NEW_STR(x, &_cur_loc)); \
17864 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
17865} while(0)
17866# define set_yylval_num(x) { \
17867 yylval.num = (x); \
17868 set_parser_s_value(x); \
17869}
17870# define set_yylval_id(x) (yylval.id = (x))
17871# define set_yylval_name(x) { \
17872 (yylval.id = (x)); \
17873 set_parser_s_value(ID2SYM(x)); \
17874}
17875# define yylval_id() (yylval.id)
17876
17877#define set_yylval_noname() set_yylval_id(keyword_nil)
17878#define has_delayed_token(p) (p->delayed.token != NULL)
17879
17880#ifndef RIPPER
17881#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
17882#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
17883
17884static bool
17885parser_has_token(struct parser_params *p)
17886{
17887 const char *const pcur = p->lex.pcur;
17888 const char *const ptok = p->lex.ptok;
17889 if (p->keep_tokens && (pcur < ptok)) {
17890 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
17891 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
17892 }
17893 return pcur > ptok;
17894}
17895
17896static const char *
17897escaped_char(int c)
17898{
17899 switch (c) {
17900 case '"': return "\\\"";
17901 case '\\': return "\\\\";
17902 case '\0': return "\\0";
17903 case '\n': return "\\n";
17904 case '\r': return "\\r";
17905 case '\t': return "\\t";
17906 case '\f': return "\\f";
17907 case '\013': return "\\v";
17908 case '\010': return "\\b";
17909 case '\007': return "\\a";
17910 case '\033': return "\\e";
17911 case '\x7f': return "\\c?";
17912 }
17913 return NULL;
17914}
17915
17916static rb_parser_string_t *
17917rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
17918{
17919 rb_encoding *enc = p->enc;
17920 const char *ptr = str->ptr;
17921 const char *pend = ptr + str->len;
17922 const char *prev = ptr;
17923 char charbuf[5] = {'\\', 'x', 0, 0, 0};
17924 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
17925
17926 while (ptr < pend) {
17927 unsigned int c;
17928 const char *cc;
17929 int n = rb_enc_precise_mbclen(ptr, pend, enc);
17930 if (!MBCLEN_CHARFOUND_P(n)) {
17931 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
17932 n = rb_enc_mbminlen(enc);
17933 if (pend < ptr + n)
17934 n = (int)(pend - ptr);
17935 while (n--) {
17936 c = *ptr & 0xf0 >> 4;
17937 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
17938 c = *ptr & 0x0f;
17939 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
17940 parser_str_cat(result, charbuf, 4);
17941 prev = ++ptr;
17942 }
17943 continue;
17944 }
17945 n = MBCLEN_CHARFOUND_LEN(n);
17946 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
17947 ptr += n;
17948 cc = escaped_char(c);
17949 if (cc) {
17950 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
17951 parser_str_cat_cstr(result, cc);
17952 prev = ptr;
17953 }
17954 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
17955 }
17956 else {
17957 if (ptr - n > prev) {
17958 parser_str_cat(result, prev, ptr - n - prev);
17959 prev = ptr - n;
17960 }
17961 parser_str_cat(result, prev, ptr - prev);
17962 prev = ptr;
17963 }
17964 }
17965 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
17966
17967 return result;
17968}
17969
17970static void
17971parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
17972{
17974 token->id = p->token_id;
17975 token->type_name = parser_token2char(p, t);
17976 token->str = str;
17977 token->loc.beg_pos = p->yylloc->beg_pos;
17978 token->loc.end_pos = p->yylloc->end_pos;
17979 rb_parser_ary_push_ast_token(p, p->tokens, token);
17980 p->token_id++;
17981
17982 if (p->debug) {
17983 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
17984 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
17985 line, token->id, token->type_name, str_escaped->ptr,
17986 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
17987 token->loc.end_pos.lineno, token->loc.end_pos.column);
17988 rb_parser_string_free(p, str_escaped);
17989 }
17990}
17991
17992static void
17993parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
17994{
17995 debug_token_line(p, "parser_dispatch_scan_event", line);
17996
17997 if (!parser_has_token(p)) return;
17998
17999 RUBY_SET_YYLLOC(*p->yylloc);
18000
18001 if (p->keep_tokens) {
18002 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18003 parser_append_tokens(p, str, t, line);
18004 }
18005
18006 token_flush(p);
18007}
18008
18009#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18010static void
18011parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18012{
18013 debug_token_line(p, "parser_dispatch_delayed_token", line);
18014
18015 if (!has_delayed_token(p)) return;
18016
18017 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18018
18019 if (p->keep_tokens) {
18020 /* p->delayed.token is freed by rb_parser_tokens_free */
18021 parser_append_tokens(p, p->delayed.token, t, line);
18022 } else {
18023 rb_parser_string_free(p, p->delayed.token);
18024 }
18025
18026 p->delayed.token = NULL;
18027}
18028#else
18029#define literal_flush(p, ptr) ((void)(ptr))
18030
18031static int
18032ripper_has_scan_event(struct parser_params *p)
18033{
18034 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18035 return p->lex.pcur > p->lex.ptok;
18036}
18037
18038static VALUE
18039ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18040{
18041 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18042 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18043 RUBY_SET_YYLLOC(*p->yylloc);
18044 token_flush(p);
18045 return rval;
18046}
18047
18048static void
18049ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18050{
18051 if (!ripper_has_scan_event(p)) return;
18052
18053 set_parser_s_value(ripper_scan_event_val(p, t));
18054}
18055#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18056
18057static void
18058ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18059{
18060 /* save and adjust the location to delayed token for callbacks */
18061 int saved_line = p->ruby_sourceline;
18062 const char *saved_tokp = p->lex.ptok;
18063 VALUE s_value, str;
18064
18065 if (!has_delayed_token(p)) return;
18066 p->ruby_sourceline = p->delayed.beg_line;
18067 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18068 str = rb_str_new_mutable_parser_string(p->delayed.token);
18069 rb_parser_string_free(p, p->delayed.token);
18070 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18071 set_parser_s_value(s_value);
18072 p->delayed.token = NULL;
18073 p->ruby_sourceline = saved_line;
18074 p->lex.ptok = saved_tokp;
18075}
18076#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18077#endif /* RIPPER */
18078
18079static inline int
18080is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18081{
18082 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18083}
18084
18085static inline int
18086parser_is_identchar(struct parser_params *p)
18087{
18088 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18089}
18090
18091static inline int
18092parser_isascii(struct parser_params *p)
18093{
18094 return ISASCII(*(p->lex.pcur-1));
18095}
18096
18097static void
18098token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18099{
18100 int column = 1, nonspc = 0, i;
18101 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18102 if (*ptr == '\t') {
18103 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18104 }
18105 column++;
18106 if (*ptr != ' ' && *ptr != '\t') {
18107 nonspc = 1;
18108 }
18109 }
18110
18111 ptinfo->beg = loc->beg_pos;
18112 ptinfo->indent = column;
18113 ptinfo->nonspc = nonspc;
18114}
18115
18116static void
18117token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18118{
18119 token_info *ptinfo;
18120
18121 if (!p->token_info_enabled) return;
18122 ptinfo = ALLOC(token_info);
18123 ptinfo->token = token;
18124 ptinfo->next = p->token_info;
18125 token_info_setup(ptinfo, p->lex.pbeg, loc);
18126
18127 p->token_info = ptinfo;
18128}
18129
18130static void
18131token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18132{
18133 token_info *ptinfo_beg = p->token_info;
18134
18135 if (!ptinfo_beg) return;
18136
18137 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18138 token_info_warn(p, token, ptinfo_beg, 1, loc);
18139
18140 p->token_info = ptinfo_beg->next;
18141 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18142}
18143
18144static void
18145token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18146{
18147 token_info *ptinfo_beg = p->token_info;
18148
18149 if (!ptinfo_beg) return;
18150 p->token_info = ptinfo_beg->next;
18151
18152 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18153 ptinfo_beg->beg.column != beg_pos.column ||
18154 strcmp(ptinfo_beg->token, token)) {
18155 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18156 beg_pos.lineno, beg_pos.column, token,
18157 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18158 ptinfo_beg->token);
18159 }
18160
18161 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18162}
18163
18164static void
18165token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18166{
18167 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18168 if (!p->token_info_enabled) return;
18169 if (!ptinfo_beg) return;
18170 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18171 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18172 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18173 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18174 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18175 rb_warn3L(ptinfo_end->beg.lineno,
18176 "mismatched indentations at '%s' with '%s' at %d",
18177 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18178}
18179
18180static int
18181parser_precise_mbclen(struct parser_params *p, const char *ptr)
18182{
18183 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18184 if (!MBCLEN_CHARFOUND_P(len)) {
18185 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18186 return -1;
18187 }
18188 return len;
18189}
18190
18191#ifndef RIPPER
18192static inline void
18193parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18194{
18195 rb_parser_string_t *str;
18196 int lineno = p->ruby_sourceline;
18197 if (!yylloc) {
18198 return;
18199 }
18200 else if (yylloc->beg_pos.lineno == lineno) {
18201 str = p->lex.lastline;
18202 }
18203 else {
18204 return;
18205 }
18206 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18207}
18208
18209static int
18210parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18211{
18212#if 0
18213 YYLTYPE current;
18214
18215 if (!yylloc) {
18216 yylloc = RUBY_SET_YYLLOC(current);
18217 }
18218 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18219 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18220 yylloc = 0;
18221 }
18222#endif
18223 parser_compile_error(p, yylloc, "%s", msg);
18224 parser_show_error_line(p, yylloc);
18225 return 0;
18226}
18227
18228static int
18229parser_yyerror0(struct parser_params *p, const char *msg)
18230{
18231 YYLTYPE current;
18232 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18233}
18234
18235void
18236ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18237{
18238 VALUE mesg;
18239 const int max_line_margin = 30;
18240 const char *ptr, *ptr_end, *pt, *pb;
18241 const char *pre = "", *post = "", *pend;
18242 const char *code = "", *caret = "";
18243 const char *lim;
18244 const char *const pbeg = PARSER_STRING_PTR(str);
18245 char *buf;
18246 long len;
18247 int i;
18248
18249 if (!yylloc) return;
18250 pend = rb_parser_string_end(str);
18251 if (pend > pbeg && pend[-1] == '\n') {
18252 if (--pend > pbeg && pend[-1] == '\r') --pend;
18253 }
18254
18255 pt = pend;
18256 if (lineno == yylloc->end_pos.lineno &&
18257 (pend - pbeg) > yylloc->end_pos.column) {
18258 pt = pbeg + yylloc->end_pos.column;
18259 }
18260
18261 ptr = ptr_end = pt;
18262 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18263 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18264
18265 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18266 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18267
18268 len = ptr_end - ptr;
18269 if (len > 4) {
18270 if (ptr > pbeg) {
18271 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18272 if (ptr > pbeg) pre = "...";
18273 }
18274 if (ptr_end < pend) {
18275 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18276 if (ptr_end < pend) post = "...";
18277 }
18278 }
18279 pb = pbeg;
18280 if (lineno == yylloc->beg_pos.lineno) {
18281 pb += yylloc->beg_pos.column;
18282 if (pb > pt) pb = pt;
18283 }
18284 if (pb < ptr) pb = ptr;
18285 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18286 return;
18287 }
18288 if (RTEST(errbuf)) {
18289 mesg = rb_attr_get(errbuf, idMesg);
18290 if (char_at_end(p, mesg, '\n') != '\n')
18291 rb_str_cat_cstr(mesg, "\n");
18292 }
18293 else {
18294 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18295 }
18296 if (!errbuf && rb_stderr_tty_p()) {
18297#define CSI_BEGIN "\033["
18298#define CSI_SGR "m"
18299 rb_str_catf(mesg,
18300 CSI_BEGIN""CSI_SGR"%s" /* pre */
18301 CSI_BEGIN"1"CSI_SGR"%.*s"
18302 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18303 CSI_BEGIN";1"CSI_SGR"%.*s"
18304 CSI_BEGIN""CSI_SGR"%s" /* post */
18305 "\n",
18306 pre,
18307 (int)(pb - ptr), ptr,
18308 (int)(pt - pb), pb,
18309 (int)(ptr_end - pt), pt,
18310 post);
18311 }
18312 else {
18313 char *p2;
18314
18315 len = ptr_end - ptr;
18316 lim = pt < pend ? pt : pend;
18317 i = (int)(lim - ptr);
18318 buf = ALLOCA_N(char, i+2);
18319 code = ptr;
18320 caret = p2 = buf;
18321 if (ptr <= pb) {
18322 while (ptr < pb) {
18323 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18324 }
18325 *p2++ = '^';
18326 ptr++;
18327 }
18328 if (lim > ptr) {
18329 memset(p2, '~', (lim - ptr));
18330 p2 += (lim - ptr);
18331 }
18332 *p2 = '\0';
18333 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18334 pre, (int)len, code, post,
18335 pre, caret);
18336 }
18337 if (!errbuf) rb_write_error_str(mesg);
18338}
18339#else
18340
18341static int
18342parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18343{
18344 const char *pcur = 0, *ptok = 0;
18345 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18346 p->ruby_sourceline == yylloc->end_pos.lineno) {
18347 pcur = p->lex.pcur;
18348 ptok = p->lex.ptok;
18349 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18350 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18351 }
18352 parser_yyerror0(p, msg);
18353 if (pcur) {
18354 p->lex.ptok = ptok;
18355 p->lex.pcur = pcur;
18356 }
18357 return 0;
18358}
18359
18360static int
18361parser_yyerror0(struct parser_params *p, const char *msg)
18362{
18363 dispatch1(parse_error, STR_NEW2(msg));
18364 ripper_error(p);
18365 return 0;
18366}
18367
18368static inline void
18369parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18370{
18371}
18372#endif /* !RIPPER */
18373
18374static int
18375vtable_size(const struct vtable *tbl)
18376{
18377 if (!DVARS_TERMINAL_P(tbl)) {
18378 return tbl->pos;
18379 }
18380 else {
18381 return 0;
18382 }
18383}
18384
18385static struct vtable *
18386vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18387{
18388 struct vtable *tbl = ALLOC(struct vtable);
18389 tbl->pos = 0;
18390 tbl->capa = 8;
18391 tbl->tbl = ALLOC_N(ID, tbl->capa);
18392 tbl->prev = prev;
18393#ifndef RIPPER
18394 if (p->debug) {
18395 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18396 }
18397#endif
18398 return tbl;
18399}
18400#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18401
18402static void
18403vtable_free_gen(struct parser_params *p, int line, const char *name,
18404 struct vtable *tbl)
18405{
18406#ifndef RIPPER
18407 if (p->debug) {
18408 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18409 }
18410#endif
18411 if (!DVARS_TERMINAL_P(tbl)) {
18412 if (tbl->tbl) {
18413 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18414 }
18415 ruby_sized_xfree(tbl, sizeof(*tbl));
18416 }
18417}
18418#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18419
18420static void
18421vtable_add_gen(struct parser_params *p, int line, const char *name,
18422 struct vtable *tbl, ID id)
18423{
18424#ifndef RIPPER
18425 if (p->debug) {
18426 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18427 line, name, (void *)tbl, rb_id2name(id));
18428 }
18429#endif
18430 if (DVARS_TERMINAL_P(tbl)) {
18431 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18432 return;
18433 }
18434 if (tbl->pos == tbl->capa) {
18435 tbl->capa = tbl->capa * 2;
18436 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18437 }
18438 tbl->tbl[tbl->pos++] = id;
18439}
18440#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18441
18442static void
18443vtable_pop_gen(struct parser_params *p, int line, const char *name,
18444 struct vtable *tbl, int n)
18445{
18446 if (p->debug) {
18447 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18448 line, name, (void *)tbl, n);
18449 }
18450 if (tbl->pos < n) {
18451 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18452 return;
18453 }
18454 tbl->pos -= n;
18455}
18456#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18457
18458static int
18459vtable_included(const struct vtable * tbl, ID id)
18460{
18461 int i;
18462
18463 if (!DVARS_TERMINAL_P(tbl)) {
18464 for (i = 0; i < tbl->pos; i++) {
18465 if (tbl->tbl[i] == id) {
18466 return i+1;
18467 }
18468 }
18469 }
18470 return 0;
18471}
18472
18473static void parser_prepare(struct parser_params *p);
18474
18475static int
18476e_option_supplied(struct parser_params *p)
18477{
18478 return strcmp(p->ruby_sourcefile, "-e") == 0;
18479}
18480
18481#ifndef RIPPER
18482static NODE *parser_append_options(struct parser_params *p, NODE *node);
18483
18484static VALUE
18485yycompile0(VALUE arg)
18486{
18487 int n;
18488 NODE *tree;
18489 struct parser_params *p = (struct parser_params *)arg;
18490 int cov = FALSE;
18491
18492 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18493 cov = TRUE;
18494 }
18495
18496 if (p->debug_lines) {
18497 p->ast->body.script_lines = p->debug_lines;
18498 }
18499
18500 parser_prepare(p);
18501#define RUBY_DTRACE_PARSE_HOOK(name) \
18502 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18503 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18504 }
18505 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18506 n = yyparse(p);
18507 RUBY_DTRACE_PARSE_HOOK(END);
18508
18509 p->debug_lines = 0;
18510
18511 xfree(p->lex.strterm);
18512 p->lex.strterm = 0;
18513 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18514 if (n || p->error_p) {
18515 VALUE mesg = p->error_buffer;
18516 if (!mesg) {
18517 mesg = syntax_error_new();
18518 }
18519 if (!p->error_tolerant) {
18520 rb_set_errinfo(mesg);
18521 return FALSE;
18522 }
18523 }
18524 tree = p->eval_tree;
18525 if (!tree) {
18526 tree = NEW_NIL(&NULL_LOC);
18527 }
18528 else {
18529 rb_parser_ary_t *tokens = p->tokens;
18530 NODE *prelude;
18531 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18532 prelude = block_append(p, p->eval_tree_begin, body);
18533 RNODE_SCOPE(tree)->nd_body = prelude;
18534 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18535 p->ast->body.coverage_enabled = cov;
18536 if (p->keep_tokens) {
18537 p->ast->node_buffer->tokens = tokens;
18538 p->tokens = NULL;
18539 }
18540 }
18541 p->ast->body.root = tree;
18542 p->ast->body.line_count = p->line_count;
18543 return TRUE;
18544}
18545
18546static rb_ast_t *
18547yycompile(struct parser_params *p, VALUE fname, int line)
18548{
18549 rb_ast_t *ast;
18550 if (NIL_P(fname)) {
18551 p->ruby_sourcefile_string = Qnil;
18552 p->ruby_sourcefile = "(none)";
18553 }
18554 else {
18555 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18556 p->ruby_sourcefile = StringValueCStr(fname);
18557 }
18558 p->ruby_sourceline = line - 1;
18559
18560 p->lvtbl = NULL;
18561
18562 p->ast = ast = rb_ast_new();
18563 compile_callback(yycompile0, (VALUE)p);
18564 p->ast = 0;
18565
18566 while (p->lvtbl) {
18567 local_pop(p);
18568 }
18569
18570 return ast;
18571}
18572#endif /* !RIPPER */
18573
18574static rb_encoding *
18575must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18576{
18577 rb_encoding *enc = rb_parser_str_get_encoding(s);
18578 if (!rb_enc_asciicompat(enc)) {
18579 rb_raise(rb_eArgError, "invalid source encoding");
18580 }
18581 return enc;
18582}
18583
18584static rb_parser_string_t *
18585lex_getline(struct parser_params *p)
18586{
18587 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18588 if (!line) return 0;
18589 p->line_count++;
18590 string_buffer_append(p, line);
18591 must_be_ascii_compatible(p, line);
18592 return line;
18593}
18594
18595#ifndef RIPPER
18596rb_ast_t*
18597rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18598{
18599 p->lex.gets = gets;
18600 p->lex.input = input;
18601 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18602
18603 return yycompile(p, fname, line);
18604}
18605#endif /* !RIPPER */
18606
18607#define STR_FUNC_ESCAPE 0x01
18608#define STR_FUNC_EXPAND 0x02
18609#define STR_FUNC_REGEXP 0x04
18610#define STR_FUNC_QWORDS 0x08
18611#define STR_FUNC_SYMBOL 0x10
18612#define STR_FUNC_INDENT 0x20
18613#define STR_FUNC_LABEL 0x40
18614#define STR_FUNC_LIST 0x4000
18615#define STR_FUNC_TERM 0x8000
18616
18617enum string_type {
18618 str_label = STR_FUNC_LABEL,
18619 str_squote = (0),
18620 str_dquote = (STR_FUNC_EXPAND),
18621 str_xquote = (STR_FUNC_EXPAND),
18622 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18623 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18624 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18625 str_ssym = (STR_FUNC_SYMBOL),
18626 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18627};
18628
18629static rb_parser_string_t *
18630parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18631{
18632 rb_parser_string_t *pstr;
18633
18634 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18635
18636 if (!(func & STR_FUNC_REGEXP)) {
18637 if (rb_parser_is_ascii_string(p, pstr)) {
18638 }
18639 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18640 /* everything is valid in ASCII-8BIT */
18641 enc = rb_ascii8bit_encoding();
18642 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18643 }
18644 }
18645
18646 return pstr;
18647}
18648
18649static int
18650strterm_is_heredoc(rb_strterm_t *strterm)
18651{
18652 return strterm->heredoc;
18653}
18654
18655static rb_strterm_t *
18656new_strterm(struct parser_params *p, int func, int term, int paren)
18657{
18658 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18659 strterm->u.literal.func = func;
18660 strterm->u.literal.term = term;
18661 strterm->u.literal.paren = paren;
18662 return strterm;
18663}
18664
18665static rb_strterm_t *
18666new_heredoc(struct parser_params *p)
18667{
18668 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18669 strterm->heredoc = true;
18670 return strterm;
18671}
18672
18673#define peek(p,c) peek_n(p, (c), 0)
18674#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18675#define peekc(p) peekc_n(p, 0)
18676#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18677
18678#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18679static void
18680parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18681{
18682 debug_token_line(p, "add_delayed_token", line);
18683
18684 if (tok < end) {
18685 if (has_delayed_token(p)) {
18686 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18687 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18688 int end_col = (next_line ? 0 : p->delayed.end_col);
18689 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18690 dispatch_delayed_token(p, tSTRING_CONTENT);
18691 }
18692 }
18693 if (!has_delayed_token(p)) {
18694 p->delayed.token = rb_parser_string_new(p, 0, 0);
18695 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18696 p->delayed.beg_line = p->ruby_sourceline;
18697 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18698 }
18699 parser_str_cat(p->delayed.token, tok, end - tok);
18700 p->delayed.end_line = p->ruby_sourceline;
18701 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
18702 p->lex.ptok = end;
18703 }
18704}
18705
18706static void
18707set_lastline(struct parser_params *p, rb_parser_string_t *str)
18708{
18709 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
18710 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
18711 p->lex.lastline = str;
18712}
18713
18714static int
18715nextline(struct parser_params *p, int set_encoding)
18716{
18717 rb_parser_string_t *str = p->lex.nextline;
18718 p->lex.nextline = 0;
18719 if (!str) {
18720 if (p->eofp)
18721 return -1;
18722
18723 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
18724 goto end_of_input;
18725 }
18726
18727 if (!p->lex.input || !(str = lex_getline(p))) {
18728 end_of_input:
18729 p->eofp = 1;
18730 lex_goto_eol(p);
18731 return -1;
18732 }
18733#ifndef RIPPER
18734 if (p->debug_lines) {
18735 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
18736 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
18737 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
18738 }
18739#endif
18740 p->cr_seen = FALSE;
18741 }
18742 else if (str == AFTER_HEREDOC_WITHOUT_TERMINTOR) {
18743 /* after here-document without terminator */
18744 goto end_of_input;
18745 }
18746 add_delayed_token(p, p->lex.ptok, p->lex.pend);
18747 if (p->heredoc_end > 0) {
18748 p->ruby_sourceline = p->heredoc_end;
18749 p->heredoc_end = 0;
18750 }
18751 p->ruby_sourceline++;
18752 set_lastline(p, str);
18753 token_flush(p);
18754 return 0;
18755}
18756
18757static int
18758parser_cr(struct parser_params *p, int c)
18759{
18760 if (peek(p, '\n')) {
18761 p->lex.pcur++;
18762 c = '\n';
18763 }
18764 return c;
18765}
18766
18767static inline int
18768nextc0(struct parser_params *p, int set_encoding)
18769{
18770 int c;
18771
18772 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINTOR)) {
18773 if (nextline(p, set_encoding)) return -1;
18774 }
18775 c = (unsigned char)*p->lex.pcur++;
18776 if (UNLIKELY(c == '\r')) {
18777 c = parser_cr(p, c);
18778 }
18779
18780 return c;
18781}
18782#define nextc(p) nextc0(p, TRUE)
18783
18784static void
18785pushback(struct parser_params *p, int c)
18786{
18787 if (c == -1) return;
18788 p->eofp = 0;
18789 p->lex.pcur--;
18790 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
18791 p->lex.pcur--;
18792 }
18793}
18794
18795#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
18796
18797#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
18798#define tok(p) (p)->tokenbuf
18799#define toklen(p) (p)->tokidx
18800
18801static int
18802looking_at_eol_p(struct parser_params *p)
18803{
18804 const char *ptr = p->lex.pcur;
18805 while (!lex_eol_ptr_p(p, ptr)) {
18806 int c = (unsigned char)*ptr++;
18807 int eol = (c == '\n' || c == '#');
18808 if (eol || !ISSPACE(c)) {
18809 return eol;
18810 }
18811 }
18812 return TRUE;
18813}
18814
18815static char*
18816newtok(struct parser_params *p)
18817{
18818 p->tokidx = 0;
18819 if (!p->tokenbuf) {
18820 p->toksiz = 60;
18821 p->tokenbuf = ALLOC_N(char, 60);
18822 }
18823 if (p->toksiz > 4096) {
18824 p->toksiz = 60;
18825 REALLOC_N(p->tokenbuf, char, 60);
18826 }
18827 return p->tokenbuf;
18828}
18829
18830static char *
18831tokspace(struct parser_params *p, int n)
18832{
18833 p->tokidx += n;
18834
18835 if (p->tokidx >= p->toksiz) {
18836 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
18837 REALLOC_N(p->tokenbuf, char, p->toksiz);
18838 }
18839 return &p->tokenbuf[p->tokidx-n];
18840}
18841
18842static void
18843tokadd(struct parser_params *p, int c)
18844{
18845 p->tokenbuf[p->tokidx++] = (char)c;
18846 if (p->tokidx >= p->toksiz) {
18847 p->toksiz *= 2;
18848 REALLOC_N(p->tokenbuf, char, p->toksiz);
18849 }
18850}
18851
18852static int
18853tok_hex(struct parser_params *p, size_t *numlen)
18854{
18855 int c;
18856
18857 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
18858 if (!*numlen) {
18859 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
18860 yyerror0("invalid hex escape");
18861 dispatch_scan_event(p, tSTRING_CONTENT);
18862 return 0;
18863 }
18864 p->lex.pcur += *numlen;
18865 return c;
18866}
18867
18868#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
18869
18870static int
18871escaped_control_code(int c)
18872{
18873 int c2 = 0;
18874 switch (c) {
18875 case ' ':
18876 c2 = 's';
18877 break;
18878 case '\n':
18879 c2 = 'n';
18880 break;
18881 case '\t':
18882 c2 = 't';
18883 break;
18884 case '\v':
18885 c2 = 'v';
18886 break;
18887 case '\r':
18888 c2 = 'r';
18889 break;
18890 case '\f':
18891 c2 = 'f';
18892 break;
18893 }
18894 return c2;
18895}
18896
18897#define WARN_SPACE_CHAR(c, prefix) \
18898 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
18899
18900static int
18901tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
18902 int regexp_literal, const char *begin)
18903{
18904 const int wide = !begin;
18905 size_t numlen;
18906 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
18907
18908 p->lex.pcur += numlen;
18909 if (p->lex.strterm == NULL ||
18910 strterm_is_heredoc(p->lex.strterm) ||
18911 (p->lex.strterm->u.literal.func != str_regexp)) {
18912 if (!begin) begin = p->lex.pcur;
18913 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
18914 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18915 yyerror0("invalid Unicode escape");
18916 dispatch_scan_event(p, tSTRING_CONTENT);
18917 return wide && numlen > 0;
18918 }
18919 if (codepoint > 0x10ffff) {
18920 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18921 yyerror0("invalid Unicode codepoint (too large)");
18922 dispatch_scan_event(p, tSTRING_CONTENT);
18923 return wide;
18924 }
18925 if ((codepoint & 0xfffff800) == 0xd800) {
18926 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18927 yyerror0("invalid Unicode codepoint");
18928 dispatch_scan_event(p, tSTRING_CONTENT);
18929 return wide;
18930 }
18931 }
18932 if (regexp_literal) {
18933 tokcopy(p, (int)numlen);
18934 }
18935 else if (codepoint >= 0x80) {
18936 rb_encoding *utf8 = rb_utf8_encoding();
18937 if (*encp && utf8 != *encp) {
18938 YYLTYPE loc = RUBY_INIT_YYLLOC();
18939 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
18940 parser_show_error_line(p, &loc);
18941 return wide;
18942 }
18943 *encp = utf8;
18944 tokaddmbc(p, codepoint, *encp);
18945 }
18946 else {
18947 tokadd(p, codepoint);
18948 }
18949 return TRUE;
18950}
18951
18952static int tokadd_mbchar(struct parser_params *p, int c);
18953
18954static int
18955tokskip_mbchar(struct parser_params *p)
18956{
18957 int len = parser_precise_mbclen(p, p->lex.pcur-1);
18958 if (len > 0) {
18959 p->lex.pcur += len - 1;
18960 }
18961 return len;
18962}
18963
18964/* return value is for ?\u3042 */
18965static void
18966tokadd_utf8(struct parser_params *p, rb_encoding **encp,
18967 int term, int symbol_literal, int regexp_literal)
18968{
18969 /*
18970 * If `term` is not -1, then we allow multiple codepoints in \u{}
18971 * upto `term` byte, otherwise we're parsing a character literal.
18972 * And then add the codepoints to the current token.
18973 */
18974 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
18975
18976 const int open_brace = '{', close_brace = '}';
18977
18978 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
18979
18980 if (peek(p, open_brace)) { /* handle \u{...} form */
18981 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
18982 /*
18983 * Skip parsing validation code and copy bytes as-is until term or
18984 * closing brace, in order to correctly handle extended regexps where
18985 * invalid unicode escapes are allowed in comments. The regexp parser
18986 * does its own validation and will catch any issues.
18987 */
18988 tokadd(p, open_brace);
18989 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
18990 int c = peekc(p);
18991 if (c == close_brace) {
18992 tokadd(p, c);
18993 ++p->lex.pcur;
18994 break;
18995 }
18996 else if (c == term) {
18997 break;
18998 }
18999 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19000 tokadd(p, c);
19001 c = *++p->lex.pcur;
19002 }
19003 tokadd_mbchar(p, c);
19004 }
19005 }
19006 else {
19007 const char *second = NULL;
19008 int c, last = nextc(p);
19009 if (lex_eol_p(p)) goto unterminated;
19010 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19011 while (c != close_brace) {
19012 if (c == term) goto unterminated;
19013 if (second == multiple_codepoints)
19014 second = p->lex.pcur;
19015 if (regexp_literal) tokadd(p, last);
19016 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19017 break;
19018 }
19019 while (ISSPACE(c = peekc(p))) {
19020 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19021 last = c;
19022 }
19023 if (term == -1 && !second)
19024 second = multiple_codepoints;
19025 }
19026
19027 if (c != close_brace) {
19028 unterminated:
19029 flush_string_content(p, rb_utf8_encoding(), 0);
19030 yyerror0("unterminated Unicode escape");
19031 dispatch_scan_event(p, tSTRING_CONTENT);
19032 return;
19033 }
19034 if (second && second != multiple_codepoints) {
19035 const char *pcur = p->lex.pcur;
19036 p->lex.pcur = second;
19037 dispatch_scan_event(p, tSTRING_CONTENT);
19038 token_flush(p);
19039 p->lex.pcur = pcur;
19040 yyerror0(multiple_codepoints);
19041 token_flush(p);
19042 }
19043
19044 if (regexp_literal) tokadd(p, close_brace);
19045 nextc(p);
19046 }
19047 }
19048 else { /* handle \uxxxx form */
19049 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19050 token_flush(p);
19051 return;
19052 }
19053 }
19054}
19055
19056#define ESCAPE_CONTROL 1
19057#define ESCAPE_META 2
19058
19059static int
19060read_escape(struct parser_params *p, int flags, const char *begin)
19061{
19062 int c;
19063 size_t numlen;
19064
19065 switch (c = nextc(p)) {
19066 case '\\': /* Backslash */
19067 return c;
19068
19069 case 'n': /* newline */
19070 return '\n';
19071
19072 case 't': /* horizontal tab */
19073 return '\t';
19074
19075 case 'r': /* carriage-return */
19076 return '\r';
19077
19078 case 'f': /* form-feed */
19079 return '\f';
19080
19081 case 'v': /* vertical tab */
19082 return '\13';
19083
19084 case 'a': /* alarm(bell) */
19085 return '\007';
19086
19087 case 'e': /* escape */
19088 return 033;
19089
19090 case '0': case '1': case '2': case '3': /* octal constant */
19091 case '4': case '5': case '6': case '7':
19092 pushback(p, c);
19093 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19094 p->lex.pcur += numlen;
19095 return c;
19096
19097 case 'x': /* hex constant */
19098 c = tok_hex(p, &numlen);
19099 if (numlen == 0) return 0;
19100 return c;
19101
19102 case 'b': /* backspace */
19103 return '\010';
19104
19105 case 's': /* space */
19106 return ' ';
19107
19108 case 'M':
19109 if (flags & ESCAPE_META) goto eof;
19110 if ((c = nextc(p)) != '-') {
19111 goto eof;
19112 }
19113 if ((c = nextc(p)) == '\\') {
19114 switch (peekc(p)) {
19115 case 'u': case 'U':
19116 nextc(p);
19117 goto eof;
19118 }
19119 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19120 }
19121 else if (c == -1) goto eof;
19122 else if (!ISASCII(c)) {
19123 tokskip_mbchar(p);
19124 goto eof;
19125 }
19126 else {
19127 int c2 = escaped_control_code(c);
19128 if (c2) {
19129 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19130 WARN_SPACE_CHAR(c2, "\\M-");
19131 }
19132 else {
19133 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19134 }
19135 }
19136 else if (ISCNTRL(c)) goto eof;
19137 return ((c & 0xff) | 0x80);
19138 }
19139
19140 case 'C':
19141 if ((c = nextc(p)) != '-') {
19142 goto eof;
19143 }
19144 case 'c':
19145 if (flags & ESCAPE_CONTROL) goto eof;
19146 if ((c = nextc(p))== '\\') {
19147 switch (peekc(p)) {
19148 case 'u': case 'U':
19149 nextc(p);
19150 goto eof;
19151 }
19152 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19153 }
19154 else if (c == '?')
19155 return 0177;
19156 else if (c == -1) goto eof;
19157 else if (!ISASCII(c)) {
19158 tokskip_mbchar(p);
19159 goto eof;
19160 }
19161 else {
19162 int c2 = escaped_control_code(c);
19163 if (c2) {
19164 if (ISCNTRL(c)) {
19165 if (flags & ESCAPE_META) {
19166 WARN_SPACE_CHAR(c2, "\\M-");
19167 }
19168 else {
19169 WARN_SPACE_CHAR(c2, "");
19170 }
19171 }
19172 else {
19173 if (flags & ESCAPE_META) {
19174 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19175 }
19176 else {
19177 WARN_SPACE_CHAR(c2, "\\C-");
19178 }
19179 }
19180 }
19181 else if (ISCNTRL(c)) goto eof;
19182 }
19183 return c & 0x9f;
19184
19185 eof:
19186 case -1:
19187 flush_string_content(p, p->enc, p->lex.pcur - begin);
19188 yyerror0("Invalid escape character syntax");
19189 dispatch_scan_event(p, tSTRING_CONTENT);
19190 return '\0';
19191
19192 default:
19193 if (!ISASCII(c)) {
19194 tokskip_mbchar(p);
19195 goto eof;
19196 }
19197 return c;
19198 }
19199}
19200
19201static void
19202tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19203{
19204 int len = rb_enc_codelen(c, enc);
19205 rb_enc_mbcput(c, tokspace(p, len), enc);
19206}
19207
19208static int
19209tokadd_escape(struct parser_params *p)
19210{
19211 int c;
19212 size_t numlen;
19213 const char *begin = p->lex.pcur;
19214
19215 switch (c = nextc(p)) {
19216 case '\n':
19217 return 0; /* just ignore */
19218
19219 case '0': case '1': case '2': case '3': /* octal constant */
19220 case '4': case '5': case '6': case '7':
19221 {
19222 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19223 if (numlen == 0) goto eof;
19224 p->lex.pcur += numlen;
19225 tokcopy(p, (int)numlen + 1);
19226 }
19227 return 0;
19228
19229 case 'x': /* hex constant */
19230 {
19231 tok_hex(p, &numlen);
19232 if (numlen == 0) return -1;
19233 tokcopy(p, (int)numlen + 2);
19234 }
19235 return 0;
19236
19237 eof:
19238 case -1:
19239 flush_string_content(p, p->enc, p->lex.pcur - begin);
19240 yyerror0("Invalid escape character syntax");
19241 token_flush(p);
19242 return -1;
19243
19244 default:
19245 tokadd(p, '\\');
19246 tokadd(p, c);
19247 }
19248 return 0;
19249}
19250
19251static int
19252char_to_option(int c)
19253{
19254 int val;
19255
19256 switch (c) {
19257 case 'i':
19258 val = RE_ONIG_OPTION_IGNORECASE;
19259 break;
19260 case 'x':
19261 val = RE_ONIG_OPTION_EXTEND;
19262 break;
19263 case 'm':
19264 val = RE_ONIG_OPTION_MULTILINE;
19265 break;
19266 default:
19267 val = 0;
19268 break;
19269 }
19270 return val;
19271}
19272
19273#define ARG_ENCODING_FIXED 16
19274#define ARG_ENCODING_NONE 32
19275#define ENC_ASCII8BIT 1
19276#define ENC_EUC_JP 2
19277#define ENC_Windows_31J 3
19278#define ENC_UTF8 4
19279
19280static int
19281char_to_option_kcode(int c, int *option, int *kcode)
19282{
19283 *option = 0;
19284
19285 switch (c) {
19286 case 'n':
19287 *kcode = ENC_ASCII8BIT;
19288 return (*option = ARG_ENCODING_NONE);
19289 case 'e':
19290 *kcode = ENC_EUC_JP;
19291 break;
19292 case 's':
19293 *kcode = ENC_Windows_31J;
19294 break;
19295 case 'u':
19296 *kcode = ENC_UTF8;
19297 break;
19298 default:
19299 *kcode = -1;
19300 return (*option = char_to_option(c));
19301 }
19302 *option = ARG_ENCODING_FIXED;
19303 return 1;
19304}
19305
19306static int
19307regx_options(struct parser_params *p)
19308{
19309 int kcode = 0;
19310 int kopt = 0;
19311 int options = 0;
19312 int c, opt, kc;
19313
19314 newtok(p);
19315 while (c = nextc(p), ISALPHA(c)) {
19316 if (c == 'o') {
19317 options |= RE_OPTION_ONCE;
19318 }
19319 else if (char_to_option_kcode(c, &opt, &kc)) {
19320 if (kc >= 0) {
19321 if (kc != ENC_ASCII8BIT) kcode = c;
19322 kopt = opt;
19323 }
19324 else {
19325 options |= opt;
19326 }
19327 }
19328 else {
19329 tokadd(p, c);
19330 }
19331 }
19332 options |= kopt;
19333 pushback(p, c);
19334 if (toklen(p)) {
19335 YYLTYPE loc = RUBY_INIT_YYLLOC();
19336 tokfix(p);
19337 compile_error(p, "unknown regexp option%s - %*s",
19338 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19339 parser_show_error_line(p, &loc);
19340 }
19341 return options | RE_OPTION_ENCODING(kcode);
19342}
19343
19344static int
19345tokadd_mbchar(struct parser_params *p, int c)
19346{
19347 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19348 if (len < 0) return -1;
19349 tokadd(p, c);
19350 p->lex.pcur += --len;
19351 if (len > 0) tokcopy(p, len);
19352 return c;
19353}
19354
19355static inline int
19356simple_re_meta(int c)
19357{
19358 switch (c) {
19359 case '$': case '*': case '+': case '.':
19360 case '?': case '^': case '|':
19361 case ')': case ']': case '}': case '>':
19362 return TRUE;
19363 default:
19364 return FALSE;
19365 }
19366}
19367
19368static int
19369parser_update_heredoc_indent(struct parser_params *p, int c)
19370{
19371 if (p->heredoc_line_indent == -1) {
19372 if (c == '\n') p->heredoc_line_indent = 0;
19373 }
19374 else {
19375 if (c == ' ') {
19376 p->heredoc_line_indent++;
19377 return TRUE;
19378 }
19379 else if (c == '\t') {
19380 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19381 p->heredoc_line_indent = w * TAB_WIDTH;
19382 return TRUE;
19383 }
19384 else if (c != '\n') {
19385 if (p->heredoc_indent > p->heredoc_line_indent) {
19386 p->heredoc_indent = p->heredoc_line_indent;
19387 }
19388 p->heredoc_line_indent = -1;
19389 }
19390 else {
19391 /* Whitespace only line has no indentation */
19392 p->heredoc_line_indent = 0;
19393 }
19394 }
19395 return FALSE;
19396}
19397
19398static void
19399parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19400{
19401 YYLTYPE loc = RUBY_INIT_YYLLOC();
19402 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19403 compile_error(p, "%s mixed within %s source", n1, n2);
19404 parser_show_error_line(p, &loc);
19405}
19406
19407static void
19408parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19409{
19410 const char *pos = p->lex.pcur;
19411 p->lex.pcur = beg;
19412 parser_mixed_error(p, enc1, enc2);
19413 p->lex.pcur = pos;
19414}
19415
19416static inline char
19417nibble_char_upper(unsigned int c)
19418{
19419 c &= 0xf;
19420 return c + (c < 10 ? '0' : 'A' - 10);
19421}
19422
19423static int
19424tokadd_string(struct parser_params *p,
19425 int func, int term, int paren, long *nest,
19426 rb_encoding **encp, rb_encoding **enc)
19427{
19428 int c;
19429 bool erred = false;
19430#ifdef RIPPER
19431 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19432 int top_of_line = FALSE;
19433#endif
19434
19435#define mixed_error(enc1, enc2) \
19436 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19437#define mixed_escape(beg, enc1, enc2) \
19438 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19439
19440 while ((c = nextc(p)) != -1) {
19441 if (p->heredoc_indent > 0) {
19442 parser_update_heredoc_indent(p, c);
19443 }
19444#ifdef RIPPER
19445 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19446 pushback(p, c);
19447 break;
19448 }
19449#endif
19450
19451 if (paren && c == paren) {
19452 ++*nest;
19453 }
19454 else if (c == term) {
19455 if (!nest || !*nest) {
19456 pushback(p, c);
19457 break;
19458 }
19459 --*nest;
19460 }
19461 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19462 unsigned char c2 = *p->lex.pcur;
19463 if (c2 == '$' || c2 == '@' || c2 == '{') {
19464 pushback(p, c);
19465 break;
19466 }
19467 }
19468 else if (c == '\\') {
19469 c = nextc(p);
19470 switch (c) {
19471 case '\n':
19472 if (func & STR_FUNC_QWORDS) break;
19473 if (func & STR_FUNC_EXPAND) {
19474 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19475 continue;
19476 if (c == term) {
19477 c = '\\';
19478 goto terminate;
19479 }
19480 }
19481 tokadd(p, '\\');
19482 break;
19483
19484 case '\\':
19485 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19486 break;
19487
19488 case 'u':
19489 if ((func & STR_FUNC_EXPAND) == 0) {
19490 tokadd(p, '\\');
19491 break;
19492 }
19493 tokadd_utf8(p, enc, term,
19494 func & STR_FUNC_SYMBOL,
19495 func & STR_FUNC_REGEXP);
19496 continue;
19497
19498 default:
19499 if (c == -1) return -1;
19500 if (!ISASCII(c)) {
19501 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19502 goto non_ascii;
19503 }
19504 if (func & STR_FUNC_REGEXP) {
19505 switch (c) {
19506 case 'c':
19507 case 'C':
19508 case 'M': {
19509 pushback(p, c);
19510 c = read_escape(p, 0, p->lex.pcur - 1);
19511
19512 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19513 *t++ = '\\';
19514 *t++ = 'x';
19515 *t++ = nibble_char_upper(c >> 4);
19516 *t++ = nibble_char_upper(c);
19517 continue;
19518 }
19519 }
19520
19521 if (c == term && !simple_re_meta(c)) {
19522 tokadd(p, c);
19523 continue;
19524 }
19525 pushback(p, c);
19526 if ((c = tokadd_escape(p)) < 0)
19527 return -1;
19528 if (*enc && *enc != *encp) {
19529 mixed_escape(p->lex.ptok+2, *enc, *encp);
19530 }
19531 continue;
19532 }
19533 else if (func & STR_FUNC_EXPAND) {
19534 pushback(p, c);
19535 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19536 c = read_escape(p, 0, p->lex.pcur - 1);
19537 }
19538 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19539 /* ignore backslashed spaces in %w */
19540 }
19541 else if (c != term && !(paren && c == paren)) {
19542 tokadd(p, '\\');
19543 pushback(p, c);
19544 continue;
19545 }
19546 }
19547 }
19548 else if (!parser_isascii(p)) {
19549 non_ascii:
19550 if (!*enc) {
19551 *enc = *encp;
19552 }
19553 else if (*enc != *encp) {
19554 mixed_error(*enc, *encp);
19555 continue;
19556 }
19557 if (tokadd_mbchar(p, c) == -1) return -1;
19558 continue;
19559 }
19560 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19561 pushback(p, c);
19562 break;
19563 }
19564 if (c & 0x80) {
19565 if (!*enc) {
19566 *enc = *encp;
19567 }
19568 else if (*enc != *encp) {
19569 mixed_error(*enc, *encp);
19570 continue;
19571 }
19572 }
19573 tokadd(p, c);
19574#ifdef RIPPER
19575 top_of_line = (c == '\n');
19576#endif
19577 }
19578 terminate:
19579 if (*enc) *encp = *enc;
19580 return c;
19581}
19582
19583#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19584
19585static void
19586flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19587{
19588 p->lex.pcur -= back;
19589 if (has_delayed_token(p)) {
19590 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19591 if (len > 0) {
19592 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19593 p->delayed.end_line = p->ruby_sourceline;
19594 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19595 }
19596 dispatch_delayed_token(p, tSTRING_CONTENT);
19597 p->lex.ptok = p->lex.pcur;
19598 }
19599 dispatch_scan_event(p, tSTRING_CONTENT);
19600 p->lex.pcur += back;
19601}
19602
19603/* this can be shared with ripper, since it's independent from struct
19604 * parser_params. */
19605#ifndef RIPPER
19606#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19607#define SPECIAL_PUNCT(idx) ( \
19608 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19609 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19610 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19611 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19612 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19613 BIT('0', idx))
19614const uint_least32_t ruby_global_name_punct_bits[] = {
19615 SPECIAL_PUNCT(0),
19616 SPECIAL_PUNCT(1),
19617 SPECIAL_PUNCT(2),
19618};
19619#undef BIT
19620#undef SPECIAL_PUNCT
19621#endif
19622
19623static enum yytokentype
19624parser_peek_variable_name(struct parser_params *p)
19625{
19626 int c;
19627 const char *ptr = p->lex.pcur;
19628
19629 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19630 c = *ptr++;
19631 switch (c) {
19632 case '$':
19633 if ((c = *ptr) == '-') {
19634 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19635 c = *ptr;
19636 }
19637 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19638 return tSTRING_DVAR;
19639 }
19640 break;
19641 case '@':
19642 if ((c = *ptr) == '@') {
19643 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19644 c = *ptr;
19645 }
19646 break;
19647 case '{':
19648 p->lex.pcur = ptr;
19649 p->command_start = TRUE;
19650 yylval.state = p->lex.state;
19651 return tSTRING_DBEG;
19652 default:
19653 return 0;
19654 }
19655 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19656 return tSTRING_DVAR;
19657 return 0;
19658}
19659
19660#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19661#define IS_END() IS_lex_state(EXPR_END_ANY)
19662#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19663#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19664#define IS_LABEL_POSSIBLE() (\
19665 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19666 IS_ARG())
19667#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19668#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19669
19670static inline enum yytokentype
19671parser_string_term(struct parser_params *p, int func)
19672{
19673 xfree(p->lex.strterm);
19674 p->lex.strterm = 0;
19675 if (func & STR_FUNC_REGEXP) {
19676 set_yylval_num(regx_options(p));
19677 dispatch_scan_event(p, tREGEXP_END);
19678 SET_LEX_STATE(EXPR_END);
19679 return tREGEXP_END;
19680 }
19681 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19682 nextc(p);
19683 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19684 return tLABEL_END;
19685 }
19686 SET_LEX_STATE(EXPR_END);
19687 return tSTRING_END;
19688}
19689
19690static enum yytokentype
19691parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19692{
19693 int func = quote->func;
19694 int term = quote->term;
19695 int paren = quote->paren;
19696 int c, space = 0;
19697 rb_encoding *enc = p->enc;
19698 rb_encoding *base_enc = 0;
19699 rb_parser_string_t *lit;
19700
19701 if (func & STR_FUNC_TERM) {
19702 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
19703 SET_LEX_STATE(EXPR_END);
19704 xfree(p->lex.strterm);
19705 p->lex.strterm = 0;
19706 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
19707 }
19708 c = nextc(p);
19709 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19710 while (c != '\n' && ISSPACE(c = nextc(p)));
19711 space = 1;
19712 }
19713 if (func & STR_FUNC_LIST) {
19714 quote->func &= ~STR_FUNC_LIST;
19715 space = 1;
19716 }
19717 if (c == term && !quote->nest) {
19718 if (func & STR_FUNC_QWORDS) {
19719 quote->func |= STR_FUNC_TERM;
19720 pushback(p, c); /* dispatch the term at tSTRING_END */
19721 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19722 return ' ';
19723 }
19724 return parser_string_term(p, func);
19725 }
19726 if (space) {
19727 if (!ISSPACE(c)) pushback(p, c);
19728 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19729 return ' ';
19730 }
19731 newtok(p);
19732 if ((func & STR_FUNC_EXPAND) && c == '#') {
19733 enum yytokentype t = parser_peek_variable_name(p);
19734 if (t) return t;
19735 tokadd(p, '#');
19736 c = nextc(p);
19737 }
19738 pushback(p, c);
19739 if (tokadd_string(p, func, term, paren, &quote->nest,
19740 &enc, &base_enc) == -1) {
19741 if (p->eofp) {
19742#ifndef RIPPER
19743# define unterminated_literal(mesg) yyerror0(mesg)
19744#else
19745# define unterminated_literal(mesg) compile_error(p, mesg)
19746#endif
19747 literal_flush(p, p->lex.pcur);
19748 if (func & STR_FUNC_QWORDS) {
19749 /* no content to add, bailing out here */
19750 unterminated_literal("unterminated list meets end of file");
19751 xfree(p->lex.strterm);
19752 p->lex.strterm = 0;
19753 return tSTRING_END;
19754 }
19755 if (func & STR_FUNC_REGEXP) {
19756 unterminated_literal("unterminated regexp meets end of file");
19757 }
19758 else {
19759 unterminated_literal("unterminated string meets end of file");
19760 }
19761 quote->func |= STR_FUNC_TERM;
19762 }
19763 }
19764
19765 tokfix(p);
19766 lit = STR_NEW3(tok(p), toklen(p), enc, func);
19767 set_yylval_str(lit);
19768 flush_string_content(p, enc, 0);
19769
19770 return tSTRING_CONTENT;
19771}
19772
19773static enum yytokentype
19774heredoc_identifier(struct parser_params *p)
19775{
19776 /*
19777 * term_len is length of `<<"END"` except `END`,
19778 * in this case term_len is 4 (<, <, " and ").
19779 */
19780 long len, offset = p->lex.pcur - p->lex.pbeg;
19781 int c = nextc(p), term, func = 0, quote = 0;
19782 enum yytokentype token = tSTRING_BEG;
19783 int indent = 0;
19784
19785 if (c == '-') {
19786 c = nextc(p);
19787 func = STR_FUNC_INDENT;
19788 offset++;
19789 }
19790 else if (c == '~') {
19791 c = nextc(p);
19792 func = STR_FUNC_INDENT;
19793 offset++;
19794 indent = INT_MAX;
19795 }
19796 switch (c) {
19797 case '\'':
19798 func |= str_squote; goto quoted;
19799 case '"':
19800 func |= str_dquote; goto quoted;
19801 case '`':
19802 token = tXSTRING_BEG;
19803 func |= str_xquote; goto quoted;
19804
19805 quoted:
19806 quote++;
19807 offset++;
19808 term = c;
19809 len = 0;
19810 while ((c = nextc(p)) != term) {
19811 if (c == -1 || c == '\r' || c == '\n') {
19812 yyerror0("unterminated here document identifier");
19813 return -1;
19814 }
19815 }
19816 break;
19817
19818 default:
19819 if (!parser_is_identchar(p)) {
19820 pushback(p, c);
19821 if (func & STR_FUNC_INDENT) {
19822 pushback(p, indent > 0 ? '~' : '-');
19823 }
19824 return 0;
19825 }
19826 func |= str_dquote;
19827 do {
19828 int n = parser_precise_mbclen(p, p->lex.pcur-1);
19829 if (n < 0) return 0;
19830 p->lex.pcur += --n;
19831 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
19832 pushback(p, c);
19833 break;
19834 }
19835
19836 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
19837 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
19838 yyerror0("too long here document identifier");
19839 dispatch_scan_event(p, tHEREDOC_BEG);
19840 lex_goto_eol(p);
19841
19842 p->lex.strterm = new_heredoc(p);
19843 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
19844 here->offset = offset;
19845 here->sourceline = p->ruby_sourceline;
19846 here->length = (unsigned)len;
19847 here->quote = quote;
19848 here->func = func;
19849 here->lastline = p->lex.lastline;
19850
19851 token_flush(p);
19852 p->heredoc_indent = indent;
19853 p->heredoc_line_indent = 0;
19854 return token;
19855}
19856
19857static void
19858heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
19859{
19860 rb_parser_string_t *line;
19861 rb_strterm_t *term = p->lex.strterm;
19862
19863 p->lex.strterm = 0;
19864 line = here->lastline;
19865 p->lex.lastline = line;
19866 p->lex.pbeg = PARSER_STRING_PTR(line);
19867 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
19868 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
19869 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
19870 p->heredoc_end = p->ruby_sourceline;
19871 p->ruby_sourceline = (int)here->sourceline;
19872 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINTOR;
19873 p->eofp = 0;
19874 xfree(term);
19875}
19876
19877static int
19878dedent_string_column(const char *str, long len, int width)
19879{
19880 int i, col = 0;
19881
19882 for (i = 0; i < len && col < width; i++) {
19883 if (str[i] == ' ') {
19884 col++;
19885 }
19886 else if (str[i] == '\t') {
19887 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
19888 if (n > width) break;
19889 col = n;
19890 }
19891 else {
19892 break;
19893 }
19894 }
19895
19896 return i;
19897}
19898
19899static int
19900dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
19901{
19902 char *str;
19903 long len;
19904 int i;
19905
19906 len = PARSER_STRING_LEN(string);
19907 str = PARSER_STRING_PTR(string);
19908
19909 i = dedent_string_column(str, len, width);
19910 if (!i) return 0;
19911
19912 rb_parser_str_modify(string);
19913 str = PARSER_STRING_PTR(string);
19914 if (PARSER_STRING_LEN(string) != len)
19915 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
19916 MEMMOVE(str, str + i, char, len - i);
19917 rb_parser_str_set_len(p, string, len - i);
19918 return i;
19919}
19920
19921static NODE *
19922heredoc_dedent(struct parser_params *p, NODE *root)
19923{
19924 NODE *node, *str_node, *prev_node;
19925 int indent = p->heredoc_indent;
19926 rb_parser_string_t *prev_lit = 0;
19927
19928 if (indent <= 0) return root;
19929 if (!root) return root;
19930
19931 prev_node = node = str_node = root;
19932 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
19933
19934 while (str_node) {
19935 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
19936 if (nd_fl_newline(str_node)) {
19937 dedent_string(p, lit, indent);
19938 }
19939 if (!prev_lit) {
19940 prev_lit = lit;
19941 }
19942 else if (!literal_concat0(p, prev_lit, lit)) {
19943 return 0;
19944 }
19945 else {
19946 NODE *end = RNODE_LIST(node)->as.nd_end;
19947 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
19948 if (!node) {
19949 if (nd_type_p(prev_node, NODE_DSTR))
19950 nd_set_type(prev_node, NODE_STR);
19951 break;
19952 }
19953 RNODE_LIST(node)->as.nd_end = end;
19954 goto next_str;
19955 }
19956
19957 str_node = 0;
19958 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
19959 next_str:
19960 if (!nd_type_p(node, NODE_LIST)) break;
19961 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
19962 enum node_type type = nd_type(str_node);
19963 if (type == NODE_STR || type == NODE_DSTR) break;
19964 prev_lit = 0;
19965 str_node = 0;
19966 }
19967 }
19968 }
19969 return root;
19970}
19971
19972static int
19973whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
19974{
19975 const char *beg = p->lex.pbeg;
19976 const char *ptr = p->lex.pend;
19977
19978 if (ptr - beg < len) return FALSE;
19979 if (ptr > beg && ptr[-1] == '\n') {
19980 if (--ptr > beg && ptr[-1] == '\r') --ptr;
19981 if (ptr - beg < len) return FALSE;
19982 }
19983 if (strncmp(eos, ptr -= len, len)) return FALSE;
19984 if (indent) {
19985 while (beg < ptr && ISSPACE(*beg)) beg++;
19986 }
19987 return beg == ptr;
19988}
19989
19990static int
19991word_match_p(struct parser_params *p, const char *word, long len)
19992{
19993 if (strncmp(p->lex.pcur, word, len)) return 0;
19994 if (lex_eol_n_p(p, len)) return 1;
19995 int c = (unsigned char)p->lex.pcur[len];
19996 if (ISSPACE(c)) return 1;
19997 switch (c) {
19998 case '\0': case '\004': case '\032': return 1;
19999 }
20000 return 0;
20001}
20002
20003#define NUM_SUFFIX_R (1<<0)
20004#define NUM_SUFFIX_I (1<<1)
20005#define NUM_SUFFIX_ALL 3
20006
20007static int
20008number_literal_suffix(struct parser_params *p, int mask)
20009{
20010 int c, result = 0;
20011 const char *lastp = p->lex.pcur;
20012
20013 while ((c = nextc(p)) != -1) {
20014 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20015 result |= (mask & NUM_SUFFIX_I);
20016 mask &= ~NUM_SUFFIX_I;
20017 /* r after i, rational of complex is disallowed */
20018 mask &= ~NUM_SUFFIX_R;
20019 continue;
20020 }
20021 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20022 result |= (mask & NUM_SUFFIX_R);
20023 mask &= ~NUM_SUFFIX_R;
20024 continue;
20025 }
20026 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20027 p->lex.pcur = lastp;
20028 literal_flush(p, p->lex.pcur);
20029 return 0;
20030 }
20031 pushback(p, c);
20032 break;
20033 }
20034 return result;
20035}
20036
20037static enum yytokentype
20038set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20039{
20040 enum rb_numeric_type numeric_type = integer_literal;
20041
20042 if (type == tFLOAT) {
20043 numeric_type = float_literal;
20044 }
20045
20046 if (suffix & NUM_SUFFIX_R) {
20047 type = tRATIONAL;
20048 numeric_type = rational_literal;
20049 }
20050 if (suffix & NUM_SUFFIX_I) {
20051 type = tIMAGINARY;
20052 }
20053
20054 switch (type) {
20055 case tINTEGER:
20056 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20057 break;
20058 case tFLOAT:
20059 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20060 break;
20061 case tRATIONAL:
20062 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20063 break;
20064 case tIMAGINARY:
20065 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20066 (void)numeric_type; /* for ripper */
20067 break;
20068 default:
20069 rb_bug("unexpected token: %d", type);
20070 }
20071 SET_LEX_STATE(EXPR_END);
20072 return type;
20073}
20074
20075#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20076static void
20077parser_dispatch_heredoc_end(struct parser_params *p, int line)
20078{
20079 if (has_delayed_token(p))
20080 dispatch_delayed_token(p, tSTRING_CONTENT);
20081
20082#ifdef RIPPER
20083 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20084 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20085#else
20086 if (p->keep_tokens) {
20087 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20088 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20089 parser_append_tokens(p, str, tHEREDOC_END, line);
20090 }
20091#endif
20092
20093 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20094 lex_goto_eol(p);
20095 token_flush(p);
20096}
20097
20098static enum yytokentype
20099here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20100{
20101 int c, func, indent = 0;
20102 const char *eos, *ptr, *ptr_end;
20103 long len;
20104 rb_parser_string_t *str = 0;
20105 rb_encoding *enc = p->enc;
20106 rb_encoding *base_enc = 0;
20107 int bol;
20108#ifdef RIPPER
20109 VALUE s_value;
20110#endif
20111
20112 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20113 len = here->length;
20114 indent = (func = here->func) & STR_FUNC_INDENT;
20115
20116 if ((c = nextc(p)) == -1) {
20117 error:
20118#ifdef RIPPER
20119 if (!has_delayed_token(p)) {
20120 dispatch_scan_event(p, tSTRING_CONTENT);
20121 }
20122 else {
20123 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20124 if (!(func & STR_FUNC_REGEXP)) {
20125 int cr = ENC_CODERANGE_UNKNOWN;
20126 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20127 if (cr != ENC_CODERANGE_7BIT &&
20128 rb_is_usascii_enc(p->enc) &&
20129 enc != rb_utf8_encoding()) {
20130 enc = rb_ascii8bit_encoding();
20131 }
20132 }
20133 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20134 }
20135 dispatch_delayed_token(p, tSTRING_CONTENT);
20136 }
20137 lex_goto_eol(p);
20138#endif
20139 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20140 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20141 (int)len, eos);
20142 token_flush(p);
20143 SET_LEX_STATE(EXPR_END);
20144 return tSTRING_END;
20145 }
20146 bol = was_bol(p);
20147 if (!bol) {
20148 /* not beginning of line, cannot be the terminator */
20149 }
20150 else if (p->heredoc_line_indent == -1) {
20151 /* `heredoc_line_indent == -1` means
20152 * - "after an interpolation in the same line", or
20153 * - "in a continuing line"
20154 */
20155 p->heredoc_line_indent = 0;
20156 }
20157 else if (whole_match_p(p, eos, len, indent)) {
20158 dispatch_heredoc_end(p);
20159 restore:
20160 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20161 token_flush(p);
20162 SET_LEX_STATE(EXPR_END);
20163 return tSTRING_END;
20164 }
20165
20166 if (!(func & STR_FUNC_EXPAND)) {
20167 do {
20168 ptr = PARSER_STRING_PTR(p->lex.lastline);
20169 ptr_end = p->lex.pend;
20170 if (ptr_end > ptr) {
20171 switch (ptr_end[-1]) {
20172 case '\n':
20173 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20174 ptr_end++;
20175 break;
20176 }
20177 case '\r':
20178 --ptr_end;
20179 }
20180 }
20181
20182 if (p->heredoc_indent > 0) {
20183 long i = 0;
20184 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20185 i++;
20186 p->heredoc_line_indent = 0;
20187 }
20188
20189 if (str)
20190 parser_str_cat(str, ptr, ptr_end - ptr);
20191 else
20192 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20193 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20194 lex_goto_eol(p);
20195 if (p->heredoc_indent > 0) {
20196 goto flush_str;
20197 }
20198 if (nextc(p) == -1) {
20199 if (str) {
20200 rb_parser_string_free(p, str);
20201 str = 0;
20202 }
20203 goto error;
20204 }
20205 } while (!whole_match_p(p, eos, len, indent));
20206 }
20207 else {
20208 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20209 newtok(p);
20210 if (c == '#') {
20211 enum yytokentype t = parser_peek_variable_name(p);
20212 if (p->heredoc_line_indent != -1) {
20213 if (p->heredoc_indent > p->heredoc_line_indent) {
20214 p->heredoc_indent = p->heredoc_line_indent;
20215 }
20216 p->heredoc_line_indent = -1;
20217 }
20218 if (t) return t;
20219 tokadd(p, '#');
20220 c = nextc(p);
20221 }
20222 do {
20223 pushback(p, c);
20224 enc = p->enc;
20225 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20226 if (p->eofp) goto error;
20227 goto restore;
20228 }
20229 if (c != '\n') {
20230 if (c == '\\') p->heredoc_line_indent = -1;
20231 flush:
20232 str = STR_NEW3(tok(p), toklen(p), enc, func);
20233 flush_str:
20234 set_yylval_str(str);
20235#ifndef RIPPER
20236 if (bol) nd_set_fl_newline(yylval.node);
20237#endif
20238 flush_string_content(p, enc, 0);
20239 return tSTRING_CONTENT;
20240 }
20241 tokadd(p, nextc(p));
20242 if (p->heredoc_indent > 0) {
20243 lex_goto_eol(p);
20244 goto flush;
20245 }
20246 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20247 if ((c = nextc(p)) == -1) goto error;
20248 } while (!whole_match_p(p, eos, len, indent));
20249 str = STR_NEW3(tok(p), toklen(p), enc, func);
20250 }
20251 dispatch_heredoc_end(p);
20252 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20253 token_flush(p);
20254 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20255#ifdef RIPPER
20256 /* Preserve s_value for set_yylval_str */
20257 s_value = p->s_value;
20258#endif
20259 set_yylval_str(str);
20260#ifdef RIPPER
20261 set_parser_s_value(s_value);
20262#endif
20263
20264#ifndef RIPPER
20265 if (bol) nd_set_fl_newline(yylval.node);
20266#endif
20267 return tSTRING_CONTENT;
20268}
20269
20270#include "lex.c"
20271
20272static int
20273arg_ambiguous(struct parser_params *p, char c)
20274{
20275#ifndef RIPPER
20276 if (c == '/') {
20277 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20278 }
20279 else {
20280 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20281 }
20282#else
20283 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20284#endif
20285 return TRUE;
20286}
20287
20288/* returns true value if formal argument error;
20289 * Qtrue, or error message if ripper */
20290static VALUE
20291formal_argument_error(struct parser_params *p, ID id)
20292{
20293 switch (id_type(id)) {
20294 case ID_LOCAL:
20295 break;
20296#ifndef RIPPER
20297# define ERR(mesg) (yyerror0(mesg), Qtrue)
20298#else
20299# define ERR(mesg) WARN_S(mesg)
20300#endif
20301 case ID_CONST:
20302 return ERR("formal argument cannot be a constant");
20303 case ID_INSTANCE:
20304 return ERR("formal argument cannot be an instance variable");
20305 case ID_GLOBAL:
20306 return ERR("formal argument cannot be a global variable");
20307 case ID_CLASS:
20308 return ERR("formal argument cannot be a class variable");
20309 default:
20310 return ERR("formal argument must be local variable");
20311#undef ERR
20312 }
20313 shadowing_lvar(p, id);
20314
20315 return Qfalse;
20316}
20317
20318static int
20319lvar_defined(struct parser_params *p, ID id)
20320{
20321 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20322}
20323
20324/* emacsen -*- hack */
20325static long
20326parser_encode_length(struct parser_params *p, const char *name, long len)
20327{
20328 long nlen;
20329
20330 if (len > 5 && name[nlen = len - 5] == '-') {
20331 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20332 return nlen;
20333 }
20334 if (len > 4 && name[nlen = len - 4] == '-') {
20335 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20336 return nlen;
20337 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20338 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20339 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20340 return nlen;
20341 }
20342 return len;
20343}
20344
20345static void
20346parser_set_encode(struct parser_params *p, const char *name)
20347{
20348 rb_encoding *enc;
20349 VALUE excargs[3];
20350 int idx = 0;
20351
20352 const char *wrong = 0;
20353 switch (*name) {
20354 case 'e': case 'E': wrong = "external"; break;
20355 case 'i': case 'I': wrong = "internal"; break;
20356 case 'f': case 'F': wrong = "filesystem"; break;
20357 case 'l': case 'L': wrong = "locale"; break;
20358 }
20359 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20360 idx = rb_enc_find_index(name);
20361 if (idx < 0) {
20362 unknown:
20363 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20364 error:
20365 excargs[0] = rb_eArgError;
20366 excargs[2] = rb_make_backtrace();
20367 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20368 VALUE exc = rb_make_exception(3, excargs);
20369 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20370
20371 rb_ast_free(p->ast);
20372 p->ast = NULL;
20373
20374 rb_exc_raise(exc);
20375 }
20376 enc = rb_enc_from_index(idx);
20377 if (!rb_enc_asciicompat(enc)) {
20378 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20379 goto error;
20380 }
20381 p->enc = enc;
20382#ifndef RIPPER
20383 if (p->debug_lines) {
20384 long i;
20385 for (i = 0; i < p->debug_lines->len; i++) {
20386 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20387 }
20388 }
20389#endif
20390}
20391
20392static bool
20393comment_at_top(struct parser_params *p)
20394{
20395 if (p->token_seen) return false;
20396 return (p->line_count == (p->has_shebang ? 2 : 1));
20397}
20398
20399typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20400typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20401
20402static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20403
20404static void
20405magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20406{
20407 if (!comment_at_top(p)) {
20408 return;
20409 }
20410 parser_set_encode(p, val);
20411}
20412
20413static int
20414parser_get_bool(struct parser_params *p, const char *name, const char *val)
20415{
20416 switch (*val) {
20417 case 't': case 'T':
20418 if (STRCASECMP(val, "true") == 0) {
20419 return TRUE;
20420 }
20421 break;
20422 case 'f': case 'F':
20423 if (STRCASECMP(val, "false") == 0) {
20424 return FALSE;
20425 }
20426 break;
20427 }
20428 return parser_invalid_pragma_value(p, name, val);
20429}
20430
20431static int
20432parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20433{
20434 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20435 return -1;
20436}
20437
20438static void
20439parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20440{
20441 int b = parser_get_bool(p, name, val);
20442 if (b >= 0) p->token_info_enabled = b;
20443}
20444
20445static void
20446parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20447{
20448 int b;
20449
20450 if (p->token_seen) {
20451 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20452 return;
20453 }
20454
20455 b = parser_get_bool(p, name, val);
20456 if (b < 0) return;
20457
20458 p->frozen_string_literal = b;
20459}
20460
20461static void
20462parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20463{
20464 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20465 if (*s == ' ' || *s == '\t') continue;
20466 if (*s == '#') break;
20467 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20468 return;
20469 }
20470
20471 switch (*val) {
20472 case 'n': case 'N':
20473 if (STRCASECMP(val, "none") == 0) {
20474 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20475 return;
20476 }
20477 break;
20478 case 'l': case 'L':
20479 if (STRCASECMP(val, "literal") == 0) {
20480 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20481 return;
20482 }
20483 break;
20484 case 'e': case 'E':
20485 if (STRCASECMP(val, "experimental_copy") == 0) {
20486 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20487 return;
20488 }
20489 if (STRCASECMP(val, "experimental_everything") == 0) {
20490 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20491 return;
20492 }
20493 break;
20494 }
20495 parser_invalid_pragma_value(p, name, val);
20496}
20497
20498# if WARN_PAST_SCOPE
20499static void
20500parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20501{
20502 int b = parser_get_bool(p, name, val);
20503 if (b >= 0) p->past_scope_enabled = b;
20504}
20505# endif
20506
20508 const char *name;
20509 rb_magic_comment_setter_t func;
20510 rb_magic_comment_length_t length;
20511};
20512
20513static const struct magic_comment magic_comments[] = {
20514 {"coding", magic_comment_encoding, parser_encode_length},
20515 {"encoding", magic_comment_encoding, parser_encode_length},
20516 {"frozen_string_literal", parser_set_frozen_string_literal},
20517 {"shareable_constant_value", parser_set_shareable_constant_value},
20518 {"warn_indent", parser_set_token_info},
20519# if WARN_PAST_SCOPE
20520 {"warn_past_scope", parser_set_past_scope},
20521# endif
20522};
20523
20524static const char *
20525magic_comment_marker(const char *str, long len)
20526{
20527 long i = 2;
20528
20529 while (i < len) {
20530 switch (str[i]) {
20531 case '-':
20532 if (str[i-1] == '*' && str[i-2] == '-') {
20533 return str + i + 1;
20534 }
20535 i += 2;
20536 break;
20537 case '*':
20538 if (i + 1 >= len) return 0;
20539 if (str[i+1] != '-') {
20540 i += 4;
20541 }
20542 else if (str[i-1] != '-') {
20543 i += 2;
20544 }
20545 else {
20546 return str + i + 2;
20547 }
20548 break;
20549 default:
20550 i += 3;
20551 break;
20552 }
20553 }
20554 return 0;
20555}
20556
20557static int
20558parser_magic_comment(struct parser_params *p, const char *str, long len)
20559{
20560 int indicator = 0;
20561 VALUE name = 0, val = 0;
20562 const char *beg, *end, *vbeg, *vend;
20563#define str_copy(_s, _p, _n) ((_s) \
20564 ? (void)(rb_str_resize((_s), (_n)), \
20565 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20566 : (void)((_s) = STR_NEW((_p), (_n))))
20567
20568 if (len <= 7) return FALSE;
20569 if (!!(beg = magic_comment_marker(str, len))) {
20570 if (!(end = magic_comment_marker(beg, str + len - beg)))
20571 return FALSE;
20572 indicator = TRUE;
20573 str = beg;
20574 len = end - beg - 3;
20575 }
20576
20577 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20578 while (len > 0) {
20579 const struct magic_comment *mc = magic_comments;
20580 char *s;
20581 int i;
20582 long n = 0;
20583
20584 for (; len > 0 && *str; str++, --len) {
20585 switch (*str) {
20586 case '\'': case '"': case ':': case ';':
20587 continue;
20588 }
20589 if (!ISSPACE(*str)) break;
20590 }
20591 for (beg = str; len > 0; str++, --len) {
20592 switch (*str) {
20593 case '\'': case '"': case ':': case ';':
20594 break;
20595 default:
20596 if (ISSPACE(*str)) break;
20597 continue;
20598 }
20599 break;
20600 }
20601 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20602 if (!len) break;
20603 if (*str != ':') {
20604 if (!indicator) return FALSE;
20605 continue;
20606 }
20607
20608 do str++; while (--len > 0 && ISSPACE(*str));
20609 if (!len) break;
20610 const char *tok_beg = str;
20611 if (*str == '"') {
20612 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20613 if (*str == '\\') {
20614 --len;
20615 ++str;
20616 }
20617 }
20618 vend = str;
20619 if (len) {
20620 --len;
20621 ++str;
20622 }
20623 }
20624 else {
20625 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20626 vend = str;
20627 }
20628 const char *tok_end = str;
20629 if (indicator) {
20630 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20631 }
20632 else {
20633 while (len > 0 && (ISSPACE(*str))) --len, str++;
20634 if (len) return FALSE;
20635 }
20636
20637 n = end - beg;
20638 str_copy(name, beg, n);
20639 s = RSTRING_PTR(name);
20640 for (i = 0; i < n; ++i) {
20641 if (s[i] == '-') s[i] = '_';
20642 }
20643 do {
20644 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20645 n = vend - vbeg;
20646 if (mc->length) {
20647 n = (*mc->length)(p, vbeg, n);
20648 }
20649 str_copy(val, vbeg, n);
20650 p->lex.ptok = tok_beg;
20651 p->lex.pcur = tok_end;
20652 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20653 break;
20654 }
20655 } while (++mc < magic_comments + numberof(magic_comments));
20656#ifdef RIPPER
20657 str_copy(val, vbeg, vend - vbeg);
20658 dispatch2(magic_comment, name, val);
20659#endif
20660 }
20661
20662 return TRUE;
20663}
20664
20665static void
20666set_file_encoding(struct parser_params *p, const char *str, const char *send)
20667{
20668 int sep = 0;
20669 const char *beg = str;
20670 VALUE s;
20671
20672 for (;;) {
20673 if (send - str <= 6) return;
20674 switch (str[6]) {
20675 case 'C': case 'c': str += 6; continue;
20676 case 'O': case 'o': str += 5; continue;
20677 case 'D': case 'd': str += 4; continue;
20678 case 'I': case 'i': str += 3; continue;
20679 case 'N': case 'n': str += 2; continue;
20680 case 'G': case 'g': str += 1; continue;
20681 case '=': case ':':
20682 sep = 1;
20683 str += 6;
20684 break;
20685 default:
20686 str += 6;
20687 if (ISSPACE(*str)) break;
20688 continue;
20689 }
20690 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20691 sep = 0;
20692 }
20693 for (;;) {
20694 do {
20695 if (++str >= send) return;
20696 } while (ISSPACE(*str));
20697 if (sep) break;
20698 if (*str != '=' && *str != ':') return;
20699 sep = 1;
20700 str++;
20701 }
20702 beg = str;
20703 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
20704 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
20705 p->lex.ptok = beg;
20706 p->lex.pcur = str;
20707 parser_set_encode(p, RSTRING_PTR(s));
20708 rb_str_resize(s, 0);
20709}
20710
20711static void
20712parser_prepare(struct parser_params *p)
20713{
20714 int c = nextc0(p, FALSE);
20715 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
20716 switch (c) {
20717 case '#':
20718 if (peek(p, '!')) p->has_shebang = 1;
20719 break;
20720 case 0xef: /* UTF-8 BOM marker */
20721 if (!lex_eol_n_p(p, 2) &&
20722 (unsigned char)p->lex.pcur[0] == 0xbb &&
20723 (unsigned char)p->lex.pcur[1] == 0xbf) {
20724 p->enc = rb_utf8_encoding();
20725 p->lex.pcur += 2;
20726#ifndef RIPPER
20727 if (p->debug_lines) {
20728 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
20729 }
20730#endif
20731 p->lex.pbeg = p->lex.pcur;
20732 token_flush(p);
20733 return;
20734 }
20735 break;
20736 case -1: /* end of script. */
20737 return;
20738 }
20739 pushback(p, c);
20740 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
20741}
20742
20743#ifndef RIPPER
20744#define ambiguous_operator(tok, op, syn) ( \
20745 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
20746 rb_warning0("even though it seems like "syn""))
20747#else
20748#define ambiguous_operator(tok, op, syn) \
20749 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
20750#endif
20751#define warn_balanced(tok, op, syn) ((void) \
20752 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
20753 space_seen && !ISSPACE(c) && \
20754 (ambiguous_operator(tok, op, syn), 0)), \
20755 (enum yytokentype)(tok))
20756
20757static enum yytokentype
20758no_digits(struct parser_params *p)
20759{
20760 yyerror0("numeric literal without digits");
20761 if (peek(p, '_')) nextc(p);
20762 /* dummy 0, for tUMINUS_NUM at numeric */
20763 return set_number_literal(p, tINTEGER, 0, 10, 0);
20764}
20765
20766static enum yytokentype
20767parse_numeric(struct parser_params *p, int c)
20768{
20769 int is_float, seen_point, seen_e, nondigit;
20770 int suffix;
20771
20772 is_float = seen_point = seen_e = nondigit = 0;
20773 SET_LEX_STATE(EXPR_END);
20774 newtok(p);
20775 if (c == '-' || c == '+') {
20776 tokadd(p, c);
20777 c = nextc(p);
20778 }
20779 if (c == '0') {
20780 int start = toklen(p);
20781 c = nextc(p);
20782 if (c == 'x' || c == 'X') {
20783 /* hexadecimal */
20784 c = nextc(p);
20785 if (c != -1 && ISXDIGIT(c)) {
20786 do {
20787 if (c == '_') {
20788 if (nondigit) break;
20789 nondigit = c;
20790 continue;
20791 }
20792 if (!ISXDIGIT(c)) break;
20793 nondigit = 0;
20794 tokadd(p, c);
20795 } while ((c = nextc(p)) != -1);
20796 }
20797 pushback(p, c);
20798 tokfix(p);
20799 if (toklen(p) == start) {
20800 return no_digits(p);
20801 }
20802 else if (nondigit) goto trailing_uc;
20803 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20804 return set_number_literal(p, tINTEGER, suffix, 16, 0);
20805 }
20806 if (c == 'b' || c == 'B') {
20807 /* binary */
20808 c = nextc(p);
20809 if (c == '0' || c == '1') {
20810 do {
20811 if (c == '_') {
20812 if (nondigit) break;
20813 nondigit = c;
20814 continue;
20815 }
20816 if (c != '0' && c != '1') break;
20817 nondigit = 0;
20818 tokadd(p, c);
20819 } while ((c = nextc(p)) != -1);
20820 }
20821 pushback(p, c);
20822 tokfix(p);
20823 if (toklen(p) == start) {
20824 return no_digits(p);
20825 }
20826 else if (nondigit) goto trailing_uc;
20827 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20828 return set_number_literal(p, tINTEGER, suffix, 2, 0);
20829 }
20830 if (c == 'd' || c == 'D') {
20831 /* decimal */
20832 c = nextc(p);
20833 if (c != -1 && ISDIGIT(c)) {
20834 do {
20835 if (c == '_') {
20836 if (nondigit) break;
20837 nondigit = c;
20838 continue;
20839 }
20840 if (!ISDIGIT(c)) break;
20841 nondigit = 0;
20842 tokadd(p, c);
20843 } while ((c = nextc(p)) != -1);
20844 }
20845 pushback(p, c);
20846 tokfix(p);
20847 if (toklen(p) == start) {
20848 return no_digits(p);
20849 }
20850 else if (nondigit) goto trailing_uc;
20851 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20852 return set_number_literal(p, tINTEGER, suffix, 10, 0);
20853 }
20854 if (c == '_') {
20855 /* 0_0 */
20856 goto octal_number;
20857 }
20858 if (c == 'o' || c == 'O') {
20859 /* prefixed octal */
20860 c = nextc(p);
20861 if (c == -1 || c == '_' || !ISDIGIT(c)) {
20862 tokfix(p);
20863 return no_digits(p);
20864 }
20865 }
20866 if (c >= '0' && c <= '7') {
20867 /* octal */
20868 octal_number:
20869 do {
20870 if (c == '_') {
20871 if (nondigit) break;
20872 nondigit = c;
20873 continue;
20874 }
20875 if (c < '0' || c > '9') break;
20876 if (c > '7') goto invalid_octal;
20877 nondigit = 0;
20878 tokadd(p, c);
20879 } while ((c = nextc(p)) != -1);
20880 if (toklen(p) > start) {
20881 pushback(p, c);
20882 tokfix(p);
20883 if (nondigit) goto trailing_uc;
20884 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20885 return set_number_literal(p, tINTEGER, suffix, 8, 0);
20886 }
20887 if (nondigit) {
20888 pushback(p, c);
20889 goto trailing_uc;
20890 }
20891 }
20892 if (c > '7' && c <= '9') {
20893 invalid_octal:
20894 yyerror0("Invalid octal digit");
20895 }
20896 else if (c == '.' || c == 'e' || c == 'E') {
20897 tokadd(p, '0');
20898 }
20899 else {
20900 pushback(p, c);
20901 tokfix(p);
20902 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20903 return set_number_literal(p, tINTEGER, suffix, 10, 0);
20904 }
20905 }
20906
20907 for (;;) {
20908 switch (c) {
20909 case '0': case '1': case '2': case '3': case '4':
20910 case '5': case '6': case '7': case '8': case '9':
20911 nondigit = 0;
20912 tokadd(p, c);
20913 break;
20914
20915 case '.':
20916 if (nondigit) goto trailing_uc;
20917 if (seen_point || seen_e) {
20918 goto decode_num;
20919 }
20920 else {
20921 int c0 = nextc(p);
20922 if (c0 == -1 || !ISDIGIT(c0)) {
20923 pushback(p, c0);
20924 goto decode_num;
20925 }
20926 c = c0;
20927 }
20928 seen_point = toklen(p);
20929 tokadd(p, '.');
20930 tokadd(p, c);
20931 is_float++;
20932 nondigit = 0;
20933 break;
20934
20935 case 'e':
20936 case 'E':
20937 if (nondigit) {
20938 pushback(p, c);
20939 c = nondigit;
20940 goto decode_num;
20941 }
20942 if (seen_e) {
20943 goto decode_num;
20944 }
20945 nondigit = c;
20946 c = nextc(p);
20947 if (c != '-' && c != '+' && !ISDIGIT(c)) {
20948 pushback(p, c);
20949 c = nondigit;
20950 nondigit = 0;
20951 goto decode_num;
20952 }
20953 tokadd(p, nondigit);
20954 seen_e++;
20955 is_float++;
20956 tokadd(p, c);
20957 nondigit = (c == '-' || c == '+') ? c : 0;
20958 break;
20959
20960 case '_': /* `_' in number just ignored */
20961 if (nondigit) goto decode_num;
20962 nondigit = c;
20963 break;
20964
20965 default:
20966 goto decode_num;
20967 }
20968 c = nextc(p);
20969 }
20970
20971 decode_num:
20972 pushback(p, c);
20973 if (nondigit) {
20974 trailing_uc:
20975 literal_flush(p, p->lex.pcur - 1);
20976 YYLTYPE loc = RUBY_INIT_YYLLOC();
20977 compile_error(p, "trailing '%c' in number", nondigit);
20978 parser_show_error_line(p, &loc);
20979 }
20980 tokfix(p);
20981 if (is_float) {
20982 enum yytokentype type = tFLOAT;
20983
20984 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
20985 if (suffix & NUM_SUFFIX_R) {
20986 type = tRATIONAL;
20987 }
20988 else {
20989 strtod(tok(p), 0);
20990 if (errno == ERANGE) {
20991 rb_warning1("Float %s out of range", WARN_S(tok(p)));
20992 errno = 0;
20993 }
20994 }
20995 return set_number_literal(p, type, suffix, 0, seen_point);
20996 }
20997 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20998 return set_number_literal(p, tINTEGER, suffix, 10, 0);
20999}
21000
21001static enum yytokentype
21002parse_qmark(struct parser_params *p, int space_seen)
21003{
21004 rb_encoding *enc;
21005 register int c;
21006 rb_parser_string_t *lit;
21007
21008 if (IS_END()) {
21009 SET_LEX_STATE(EXPR_VALUE);
21010 return '?';
21011 }
21012 c = nextc(p);
21013 if (c == -1) {
21014 compile_error(p, "incomplete character syntax");
21015 return 0;
21016 }
21017 if (rb_enc_isspace(c, p->enc)) {
21018 if (!IS_ARG()) {
21019 int c2 = escaped_control_code(c);
21020 if (c2) {
21021 WARN_SPACE_CHAR(c2, "?");
21022 }
21023 }
21024 ternary:
21025 pushback(p, c);
21026 SET_LEX_STATE(EXPR_VALUE);
21027 return '?';
21028 }
21029 newtok(p);
21030 enc = p->enc;
21031 if (!parser_isascii(p)) {
21032 if (tokadd_mbchar(p, c) == -1) return 0;
21033 }
21034 else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
21035 !lex_eol_p(p) && is_identchar(p, p->lex.pcur, p->lex.pend, p->enc)) {
21036 if (space_seen) {
21037 const char *start = p->lex.pcur - 1, *ptr = start;
21038 do {
21039 int n = parser_precise_mbclen(p, ptr);
21040 if (n < 0) return -1;
21041 ptr += n;
21042 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21043 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21044 " a conditional operator, put a space after '?'",
21045 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21046 }
21047 goto ternary;
21048 }
21049 else if (c == '\\') {
21050 if (peek(p, 'u')) {
21051 nextc(p);
21052 enc = rb_utf8_encoding();
21053 tokadd_utf8(p, &enc, -1, 0, 0);
21054 }
21055 else if (!ISASCII(c = peekc(p)) && c != -1) {
21056 nextc(p);
21057 if (tokadd_mbchar(p, c) == -1) return 0;
21058 }
21059 else {
21060 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21061 tokadd(p, c);
21062 }
21063 }
21064 else {
21065 tokadd(p, c);
21066 }
21067 tokfix(p);
21068 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21069 set_yylval_str(lit);
21070 SET_LEX_STATE(EXPR_END);
21071 return tCHAR;
21072}
21073
21074static enum yytokentype
21075parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21076{
21077 register int c;
21078 const char *ptok = p->lex.pcur;
21079
21080 if (IS_BEG()) {
21081 int term;
21082 int paren;
21083
21084 c = nextc(p);
21085 quotation:
21086 if (c == -1) goto unterminated;
21087 if (!ISALNUM(c)) {
21088 term = c;
21089 if (!ISASCII(c)) goto unknown;
21090 c = 'Q';
21091 }
21092 else {
21093 term = nextc(p);
21094 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21095 unknown:
21096 pushback(p, term);
21097 c = parser_precise_mbclen(p, p->lex.pcur);
21098 if (c < 0) return 0;
21099 p->lex.pcur += c;
21100 yyerror0("unknown type of %string");
21101 return 0;
21102 }
21103 }
21104 if (term == -1) {
21105 unterminated:
21106 compile_error(p, "unterminated quoted string meets end of file");
21107 return 0;
21108 }
21109 paren = term;
21110 if (term == '(') term = ')';
21111 else if (term == '[') term = ']';
21112 else if (term == '{') term = '}';
21113 else if (term == '<') term = '>';
21114 else paren = 0;
21115
21116 p->lex.ptok = ptok-1;
21117 switch (c) {
21118 case 'Q':
21119 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21120 return tSTRING_BEG;
21121
21122 case 'q':
21123 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21124 return tSTRING_BEG;
21125
21126 case 'W':
21127 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21128 return tWORDS_BEG;
21129
21130 case 'w':
21131 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21132 return tQWORDS_BEG;
21133
21134 case 'I':
21135 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21136 return tSYMBOLS_BEG;
21137
21138 case 'i':
21139 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21140 return tQSYMBOLS_BEG;
21141
21142 case 'x':
21143 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21144 return tXSTRING_BEG;
21145
21146 case 'r':
21147 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21148 return tREGEXP_BEG;
21149
21150 case 's':
21151 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21152 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21153 return tSYMBEG;
21154
21155 default:
21156 yyerror0("unknown type of %string");
21157 return 0;
21158 }
21159 }
21160 if ((c = nextc(p)) == '=') {
21161 set_yylval_id('%');
21162 SET_LEX_STATE(EXPR_BEG);
21163 return tOP_ASGN;
21164 }
21165 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21166 goto quotation;
21167 }
21168 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21169 pushback(p, c);
21170 return warn_balanced('%', "%%", "string literal");
21171}
21172
21173static int
21174tokadd_ident(struct parser_params *p, int c)
21175{
21176 do {
21177 if (tokadd_mbchar(p, c) == -1) return -1;
21178 c = nextc(p);
21179 } while (parser_is_identchar(p));
21180 pushback(p, c);
21181 return 0;
21182}
21183
21184static ID
21185tokenize_ident(struct parser_params *p)
21186{
21187 ID ident = TOK_INTERN();
21188
21189 set_yylval_name(ident);
21190
21191 return ident;
21192}
21193
21194static int
21195parse_numvar(struct parser_params *p)
21196{
21197 size_t len;
21198 int overflow;
21199 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21200 const unsigned long nth_ref_max =
21201 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21202 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21203 * turned into a Fixnum, in compile.c */
21204
21205 if (overflow || n > nth_ref_max) {
21206 /* compile_error()? */
21207 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21208 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21209 }
21210 else {
21211 return (int)n;
21212 }
21213}
21214
21215static enum yytokentype
21216parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21217{
21218 const char *ptr = p->lex.pcur;
21219 register int c;
21220
21221 SET_LEX_STATE(EXPR_END);
21222 p->lex.ptok = ptr - 1; /* from '$' */
21223 newtok(p);
21224 c = nextc(p);
21225 switch (c) {
21226 case '_': /* $_: last read line string */
21227 c = nextc(p);
21228 if (parser_is_identchar(p)) {
21229 tokadd(p, '$');
21230 tokadd(p, '_');
21231 break;
21232 }
21233 pushback(p, c);
21234 c = '_';
21235 /* fall through */
21236 case '~': /* $~: match-data */
21237 case '*': /* $*: argv */
21238 case '$': /* $$: pid */
21239 case '?': /* $?: last status */
21240 case '!': /* $!: error string */
21241 case '@': /* $@: error position */
21242 case '/': /* $/: input record separator */
21243 case '\\': /* $\: output record separator */
21244 case ';': /* $;: field separator */
21245 case ',': /* $,: output field separator */
21246 case '.': /* $.: last read line number */
21247 case '=': /* $=: ignorecase */
21248 case ':': /* $:: load path */
21249 case '<': /* $<: default input handle */
21250 case '>': /* $>: default output handle */
21251 case '\"': /* $": already loaded files */
21252 tokadd(p, '$');
21253 tokadd(p, c);
21254 goto gvar;
21255
21256 case '-':
21257 tokadd(p, '$');
21258 tokadd(p, c);
21259 c = nextc(p);
21260 if (parser_is_identchar(p)) {
21261 if (tokadd_mbchar(p, c) == -1) return 0;
21262 }
21263 else {
21264 pushback(p, c);
21265 pushback(p, '-');
21266 return '$';
21267 }
21268 gvar:
21269 tokenize_ident(p);
21270 return tGVAR;
21271
21272 case '&': /* $&: last match */
21273 case '`': /* $`: string before last match */
21274 case '\'': /* $': string after last match */
21275 case '+': /* $+: string matches last paren. */
21276 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21277 tokadd(p, '$');
21278 tokadd(p, c);
21279 goto gvar;
21280 }
21281 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21282 return tBACK_REF;
21283
21284 case '1': case '2': case '3':
21285 case '4': case '5': case '6':
21286 case '7': case '8': case '9':
21287 tokadd(p, '$');
21288 do {
21289 tokadd(p, c);
21290 c = nextc(p);
21291 } while (c != -1 && ISDIGIT(c));
21292 pushback(p, c);
21293 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21294 tokfix(p);
21295 c = parse_numvar(p);
21296 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21297 return tNTH_REF;
21298
21299 default:
21300 if (!parser_is_identchar(p)) {
21301 YYLTYPE loc = RUBY_INIT_YYLLOC();
21302 if (c == -1 || ISSPACE(c)) {
21303 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21304 }
21305 else {
21306 pushback(p, c);
21307 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21308 }
21309 parser_show_error_line(p, &loc);
21310 set_yylval_noname();
21311 return tGVAR;
21312 }
21313 /* fall through */
21314 case '0':
21315 tokadd(p, '$');
21316 }
21317
21318 if (tokadd_ident(p, c)) return 0;
21319 SET_LEX_STATE(EXPR_END);
21320 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21321 tokenize_ident(p);
21322 }
21323 else {
21324 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21325 set_yylval_noname();
21326 }
21327 return tGVAR;
21328}
21329
21330static bool
21331parser_numbered_param(struct parser_params *p, int n)
21332{
21333 if (n < 0) return false;
21334
21335 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21336 return false;
21337 }
21338 if (p->max_numparam == ORDINAL_PARAM) {
21339 compile_error(p, "ordinary parameter is defined");
21340 return false;
21341 }
21342 struct vtable *args = p->lvtbl->args;
21343 if (p->max_numparam < n) {
21344 p->max_numparam = n;
21345 }
21346 while (n > args->pos) {
21347 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21348 }
21349 return true;
21350}
21351
21352static enum yytokentype
21353parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21354{
21355 const char *ptr = p->lex.pcur;
21356 enum yytokentype result = tIVAR;
21357 register int c = nextc(p);
21358 YYLTYPE loc;
21359
21360 p->lex.ptok = ptr - 1; /* from '@' */
21361 newtok(p);
21362 tokadd(p, '@');
21363 if (c == '@') {
21364 result = tCVAR;
21365 tokadd(p, '@');
21366 c = nextc(p);
21367 }
21368 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21369 if (c == -1 || !parser_is_identchar(p)) {
21370 pushback(p, c);
21371 RUBY_SET_YYLLOC(loc);
21372 if (result == tIVAR) {
21373 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21374 }
21375 else {
21376 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21377 }
21378 parser_show_error_line(p, &loc);
21379 set_yylval_noname();
21380 SET_LEX_STATE(EXPR_END);
21381 return result;
21382 }
21383 else if (ISDIGIT(c)) {
21384 pushback(p, c);
21385 RUBY_SET_YYLLOC(loc);
21386 if (result == tIVAR) {
21387 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21388 }
21389 else {
21390 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21391 }
21392 parser_show_error_line(p, &loc);
21393 set_yylval_noname();
21394 SET_LEX_STATE(EXPR_END);
21395 return result;
21396 }
21397
21398 if (tokadd_ident(p, c)) return 0;
21399 tokenize_ident(p);
21400 return result;
21401}
21402
21403static enum yytokentype
21404parse_ident(struct parser_params *p, int c, int cmd_state)
21405{
21406 enum yytokentype result;
21407 bool is_ascii = true;
21408 const enum lex_state_e last_state = p->lex.state;
21409 ID ident;
21410 int enforce_keyword_end = 0;
21411
21412 do {
21413 if (!ISASCII(c)) is_ascii = false;
21414 if (tokadd_mbchar(p, c) == -1) return 0;
21415 c = nextc(p);
21416 } while (parser_is_identchar(p));
21417 if ((c == '!' || c == '?') && !peek(p, '=')) {
21418 result = tFID;
21419 tokadd(p, c);
21420 }
21421 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21422 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21423 result = tIDENTIFIER;
21424 tokadd(p, c);
21425 }
21426 else {
21427 result = tCONSTANT; /* assume provisionally */
21428 pushback(p, c);
21429 }
21430 tokfix(p);
21431
21432 if (IS_LABEL_POSSIBLE()) {
21433 if (IS_LABEL_SUFFIX(0)) {
21434 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21435 nextc(p);
21436 tokenize_ident(p);
21437 return tLABEL;
21438 }
21439 }
21440
21441#ifndef RIPPER
21442 if (peek_end_expect_token_locations(p)) {
21443 const rb_code_position_t *end_pos;
21444 int lineno, column;
21445 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21446
21447 end_pos = peek_end_expect_token_locations(p)->pos;
21448 lineno = end_pos->lineno;
21449 column = end_pos->column;
21450
21451 if (p->debug) {
21452 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21453 p->ruby_sourceline, beg_pos, lineno, column);
21454 }
21455
21456 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21457 const struct kwtable *kw;
21458
21459 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21460 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21461 enforce_keyword_end = 1;
21462 }
21463 }
21464 }
21465#endif
21466
21467 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21468 const struct kwtable *kw;
21469
21470 /* See if it is a reserved word. */
21471 kw = rb_reserved_word(tok(p), toklen(p));
21472 if (kw) {
21473 enum lex_state_e state = p->lex.state;
21474 if (IS_lex_state_for(state, EXPR_FNAME)) {
21475 SET_LEX_STATE(EXPR_ENDFN);
21476 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21477 return kw->id[0];
21478 }
21479 SET_LEX_STATE(kw->state);
21480 if (IS_lex_state(EXPR_BEG)) {
21481 p->command_start = TRUE;
21482 }
21483 if (kw->id[0] == keyword_do) {
21484 if (lambda_beginning_p()) {
21485 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21486 return keyword_do_LAMBDA;
21487 }
21488 if (COND_P()) return keyword_do_cond;
21489 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21490 return keyword_do_block;
21491 return keyword_do;
21492 }
21493 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21494 return kw->id[0];
21495 else {
21496 if (kw->id[0] != kw->id[1])
21497 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21498 return kw->id[1];
21499 }
21500 }
21501 }
21502
21503 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21504 if (cmd_state) {
21505 SET_LEX_STATE(EXPR_CMDARG);
21506 }
21507 else {
21508 SET_LEX_STATE(EXPR_ARG);
21509 }
21510 }
21511 else if (p->lex.state == EXPR_FNAME) {
21512 SET_LEX_STATE(EXPR_ENDFN);
21513 }
21514 else {
21515 SET_LEX_STATE(EXPR_END);
21516 }
21517
21518 ident = tokenize_ident(p);
21519 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21520 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21521 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21522 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21523 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21524 }
21525 return result;
21526}
21527
21528static void
21529warn_cr(struct parser_params *p)
21530{
21531 if (!p->cr_seen) {
21532 p->cr_seen = TRUE;
21533 /* carried over with p->lex.nextline for nextc() */
21534 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21535 }
21536}
21537
21538static enum yytokentype
21539parser_yylex(struct parser_params *p)
21540{
21541 register int c;
21542 int space_seen = 0;
21543 int cmd_state;
21544 int label;
21545 enum lex_state_e last_state;
21546 int fallthru = FALSE;
21547 int token_seen = p->token_seen;
21548
21549 if (p->lex.strterm) {
21550 if (strterm_is_heredoc(p->lex.strterm)) {
21551 token_flush(p);
21552 return here_document(p, &p->lex.strterm->u.heredoc);
21553 }
21554 else {
21555 token_flush(p);
21556 return parse_string(p, &p->lex.strterm->u.literal);
21557 }
21558 }
21559 cmd_state = p->command_start;
21560 p->command_start = FALSE;
21561 p->token_seen = TRUE;
21562#ifndef RIPPER
21563 token_flush(p);
21564#endif
21565 retry:
21566 last_state = p->lex.state;
21567 switch (c = nextc(p)) {
21568 case '\0': /* NUL */
21569 case '\004': /* ^D */
21570 case '\032': /* ^Z */
21571 case -1: /* end of script. */
21572 p->eofp = 1;
21573#ifndef RIPPER
21574 if (p->end_expect_token_locations) {
21575 pop_end_expect_token_locations(p);
21576 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21577 return tDUMNY_END;
21578 }
21579#endif
21580 /* Set location for end-of-input because dispatch_scan_event is not called. */
21581 RUBY_SET_YYLLOC(*p->yylloc);
21582 return END_OF_INPUT;
21583
21584 /* white spaces */
21585 case '\r':
21586 warn_cr(p);
21587 /* fall through */
21588 case ' ': case '\t': case '\f':
21589 case '\13': /* '\v' */
21590 space_seen = 1;
21591 while ((c = nextc(p))) {
21592 switch (c) {
21593 case '\r':
21594 warn_cr(p);
21595 /* fall through */
21596 case ' ': case '\t': case '\f':
21597 case '\13': /* '\v' */
21598 break;
21599 default:
21600 goto outofloop;
21601 }
21602 }
21603 outofloop:
21604 pushback(p, c);
21605 dispatch_scan_event(p, tSP);
21606#ifndef RIPPER
21607 token_flush(p);
21608#endif
21609 goto retry;
21610
21611 case '#': /* it's a comment */
21612 p->token_seen = token_seen;
21613 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21614 /* no magic_comment in shebang line */
21615 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21616 if (comment_at_top(p)) {
21617 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21618 }
21619 }
21620 p->lex.pcur = pcur, p->lex.ptok = ptok;
21621 lex_goto_eol(p);
21622 dispatch_scan_event(p, tCOMMENT);
21623 fallthru = TRUE;
21624 /* fall through */
21625 case '\n':
21626 p->token_seen = token_seen;
21627 rb_parser_string_t *prevline = p->lex.lastline;
21628 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21629 !IS_lex_state(EXPR_LABELED));
21630 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21631 if (!fallthru) {
21632 dispatch_scan_event(p, tIGNORED_NL);
21633 }
21634 fallthru = FALSE;
21635 if (!c && p->ctxt.in_kwarg) {
21636 goto normal_newline;
21637 }
21638 goto retry;
21639 }
21640 while (1) {
21641 switch (c = nextc(p)) {
21642 case ' ': case '\t': case '\f': case '\r':
21643 case '\13': /* '\v' */
21644 space_seen = 1;
21645 break;
21646 case '#':
21647 pushback(p, c);
21648 if (space_seen) {
21649 dispatch_scan_event(p, tSP);
21650 token_flush(p);
21651 }
21652 goto retry;
21653 case '&':
21654 case '.': {
21655 dispatch_delayed_token(p, tIGNORED_NL);
21656 if (peek(p, '.') == (c == '&')) {
21657 pushback(p, c);
21658 dispatch_scan_event(p, tSP);
21659 goto retry;
21660 }
21661 }
21662 default:
21663 p->ruby_sourceline--;
21664 p->lex.nextline = p->lex.lastline;
21665 set_lastline(p, prevline);
21666 case -1: /* EOF no decrement*/
21667 if (c == -1 && space_seen) {
21668 dispatch_scan_event(p, tSP);
21669 }
21670 lex_goto_eol(p);
21671 if (c != -1) {
21672 token_flush(p);
21673 RUBY_SET_YYLLOC(*p->yylloc);
21674 }
21675 goto normal_newline;
21676 }
21677 }
21678 normal_newline:
21679 p->command_start = TRUE;
21680 SET_LEX_STATE(EXPR_BEG);
21681 return '\n';
21682
21683 case '*':
21684 if ((c = nextc(p)) == '*') {
21685 if ((c = nextc(p)) == '=') {
21686 set_yylval_id(idPow);
21687 SET_LEX_STATE(EXPR_BEG);
21688 return tOP_ASGN;
21689 }
21690 pushback(p, c);
21691 if (IS_SPCARG(c)) {
21692 rb_warning0("'**' interpreted as argument prefix");
21693 c = tDSTAR;
21694 }
21695 else if (IS_BEG()) {
21696 c = tDSTAR;
21697 }
21698 else {
21699 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
21700 }
21701 }
21702 else {
21703 if (c == '=') {
21704 set_yylval_id('*');
21705 SET_LEX_STATE(EXPR_BEG);
21706 return tOP_ASGN;
21707 }
21708 pushback(p, c);
21709 if (IS_SPCARG(c)) {
21710 rb_warning0("'*' interpreted as argument prefix");
21711 c = tSTAR;
21712 }
21713 else if (IS_BEG()) {
21714 c = tSTAR;
21715 }
21716 else {
21717 c = warn_balanced('*', "*", "argument prefix");
21718 }
21719 }
21720 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21721 return c;
21722
21723 case '!':
21724 c = nextc(p);
21725 if (IS_AFTER_OPERATOR()) {
21726 SET_LEX_STATE(EXPR_ARG);
21727 if (c == '@') {
21728 return '!';
21729 }
21730 }
21731 else {
21732 SET_LEX_STATE(EXPR_BEG);
21733 }
21734 if (c == '=') {
21735 return tNEQ;
21736 }
21737 if (c == '~') {
21738 return tNMATCH;
21739 }
21740 pushback(p, c);
21741 return '!';
21742
21743 case '=':
21744 if (was_bol(p)) {
21745 /* skip embedded rd document */
21746 if (word_match_p(p, "begin", 5)) {
21747 int first_p = TRUE;
21748
21749 lex_goto_eol(p);
21750 dispatch_scan_event(p, tEMBDOC_BEG);
21751 for (;;) {
21752 lex_goto_eol(p);
21753 if (!first_p) {
21754 dispatch_scan_event(p, tEMBDOC);
21755 }
21756 first_p = FALSE;
21757 c = nextc(p);
21758 if (c == -1) {
21759 compile_error(p, "embedded document meets end of file");
21760 return END_OF_INPUT;
21761 }
21762 if (c == '=' && word_match_p(p, "end", 3)) {
21763 break;
21764 }
21765 pushback(p, c);
21766 }
21767 lex_goto_eol(p);
21768 dispatch_scan_event(p, tEMBDOC_END);
21769 goto retry;
21770 }
21771 }
21772
21773 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21774 if ((c = nextc(p)) == '=') {
21775 if ((c = nextc(p)) == '=') {
21776 return tEQQ;
21777 }
21778 pushback(p, c);
21779 return tEQ;
21780 }
21781 if (c == '~') {
21782 return tMATCH;
21783 }
21784 else if (c == '>') {
21785 return tASSOC;
21786 }
21787 pushback(p, c);
21788 return '=';
21789
21790 case '<':
21791 c = nextc(p);
21792 if (c == '<' &&
21793 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
21794 !IS_END() &&
21795 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
21796 enum yytokentype token = heredoc_identifier(p);
21797 if (token) return token < 0 ? 0 : token;
21798 }
21799 if (IS_AFTER_OPERATOR()) {
21800 SET_LEX_STATE(EXPR_ARG);
21801 }
21802 else {
21803 if (IS_lex_state(EXPR_CLASS))
21804 p->command_start = TRUE;
21805 SET_LEX_STATE(EXPR_BEG);
21806 }
21807 if (c == '=') {
21808 if ((c = nextc(p)) == '>') {
21809 return tCMP;
21810 }
21811 pushback(p, c);
21812 return tLEQ;
21813 }
21814 if (c == '<') {
21815 if ((c = nextc(p)) == '=') {
21816 set_yylval_id(idLTLT);
21817 SET_LEX_STATE(EXPR_BEG);
21818 return tOP_ASGN;
21819 }
21820 pushback(p, c);
21821 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
21822 }
21823 pushback(p, c);
21824 return '<';
21825
21826 case '>':
21827 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21828 if ((c = nextc(p)) == '=') {
21829 return tGEQ;
21830 }
21831 if (c == '>') {
21832 if ((c = nextc(p)) == '=') {
21833 set_yylval_id(idGTGT);
21834 SET_LEX_STATE(EXPR_BEG);
21835 return tOP_ASGN;
21836 }
21837 pushback(p, c);
21838 return tRSHFT;
21839 }
21840 pushback(p, c);
21841 return '>';
21842
21843 case '"':
21844 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
21845 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
21846 p->lex.ptok = p->lex.pcur-1;
21847 return tSTRING_BEG;
21848
21849 case '`':
21850 if (IS_lex_state(EXPR_FNAME)) {
21851 SET_LEX_STATE(EXPR_ENDFN);
21852 return c;
21853 }
21854 if (IS_lex_state(EXPR_DOT)) {
21855 if (cmd_state)
21856 SET_LEX_STATE(EXPR_CMDARG);
21857 else
21858 SET_LEX_STATE(EXPR_ARG);
21859 return c;
21860 }
21861 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
21862 return tXSTRING_BEG;
21863
21864 case '\'':
21865 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
21866 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
21867 p->lex.ptok = p->lex.pcur-1;
21868 return tSTRING_BEG;
21869
21870 case '?':
21871 return parse_qmark(p, space_seen);
21872
21873 case '&':
21874 if ((c = nextc(p)) == '&') {
21875 SET_LEX_STATE(EXPR_BEG);
21876 if ((c = nextc(p)) == '=') {
21877 set_yylval_id(idANDOP);
21878 SET_LEX_STATE(EXPR_BEG);
21879 return tOP_ASGN;
21880 }
21881 pushback(p, c);
21882 return tANDOP;
21883 }
21884 else if (c == '=') {
21885 set_yylval_id('&');
21886 SET_LEX_STATE(EXPR_BEG);
21887 return tOP_ASGN;
21888 }
21889 else if (c == '.') {
21890 set_yylval_id(idANDDOT);
21891 SET_LEX_STATE(EXPR_DOT);
21892 return tANDDOT;
21893 }
21894 pushback(p, c);
21895 if (IS_SPCARG(c)) {
21896 if ((c != ':') ||
21897 (c = peekc_n(p, 1)) == -1 ||
21898 !(c == '\'' || c == '"' ||
21899 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
21900 rb_warning0("'&' interpreted as argument prefix");
21901 }
21902 c = tAMPER;
21903 }
21904 else if (IS_BEG()) {
21905 c = tAMPER;
21906 }
21907 else {
21908 c = warn_balanced('&', "&", "argument prefix");
21909 }
21910 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21911 return c;
21912
21913 case '|':
21914 if ((c = nextc(p)) == '|') {
21915 SET_LEX_STATE(EXPR_BEG);
21916 if ((c = nextc(p)) == '=') {
21917 set_yylval_id(idOROP);
21918 SET_LEX_STATE(EXPR_BEG);
21919 return tOP_ASGN;
21920 }
21921 pushback(p, c);
21922 if (IS_lex_state_for(last_state, EXPR_BEG)) {
21923 c = '|';
21924 pushback(p, '|');
21925 return c;
21926 }
21927 return tOROP;
21928 }
21929 if (c == '=') {
21930 set_yylval_id('|');
21931 SET_LEX_STATE(EXPR_BEG);
21932 return tOP_ASGN;
21933 }
21934 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
21935 pushback(p, c);
21936 return '|';
21937
21938 case '+':
21939 c = nextc(p);
21940 if (IS_AFTER_OPERATOR()) {
21941 SET_LEX_STATE(EXPR_ARG);
21942 if (c == '@') {
21943 return tUPLUS;
21944 }
21945 pushback(p, c);
21946 return '+';
21947 }
21948 if (c == '=') {
21949 set_yylval_id('+');
21950 SET_LEX_STATE(EXPR_BEG);
21951 return tOP_ASGN;
21952 }
21953 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
21954 SET_LEX_STATE(EXPR_BEG);
21955 pushback(p, c);
21956 if (c != -1 && ISDIGIT(c)) {
21957 return parse_numeric(p, '+');
21958 }
21959 return tUPLUS;
21960 }
21961 SET_LEX_STATE(EXPR_BEG);
21962 pushback(p, c);
21963 return warn_balanced('+', "+", "unary operator");
21964
21965 case '-':
21966 c = nextc(p);
21967 if (IS_AFTER_OPERATOR()) {
21968 SET_LEX_STATE(EXPR_ARG);
21969 if (c == '@') {
21970 return tUMINUS;
21971 }
21972 pushback(p, c);
21973 return '-';
21974 }
21975 if (c == '=') {
21976 set_yylval_id('-');
21977 SET_LEX_STATE(EXPR_BEG);
21978 return tOP_ASGN;
21979 }
21980 if (c == '>') {
21981 SET_LEX_STATE(EXPR_ENDFN);
21982 yylval.num = p->lex.lpar_beg;
21983 p->lex.lpar_beg = p->lex.paren_nest;
21984 return tLAMBDA;
21985 }
21986 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
21987 SET_LEX_STATE(EXPR_BEG);
21988 pushback(p, c);
21989 if (c != -1 && ISDIGIT(c)) {
21990 return tUMINUS_NUM;
21991 }
21992 return tUMINUS;
21993 }
21994 SET_LEX_STATE(EXPR_BEG);
21995 pushback(p, c);
21996 return warn_balanced('-', "-", "unary operator");
21997
21998 case '.': {
21999 int is_beg = IS_BEG();
22000 SET_LEX_STATE(EXPR_BEG);
22001 if ((c = nextc(p)) == '.') {
22002 if ((c = nextc(p)) == '.') {
22003 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22004 SET_LEX_STATE(EXPR_ENDARG);
22005 return tBDOT3;
22006 }
22007 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22008 rb_warn0("... at EOL, should be parenthesized?");
22009 }
22010 return is_beg ? tBDOT3 : tDOT3;
22011 }
22012 pushback(p, c);
22013 return is_beg ? tBDOT2 : tDOT2;
22014 }
22015 pushback(p, c);
22016 if (c != -1 && ISDIGIT(c)) {
22017 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22018 parse_numeric(p, '.');
22019 if (ISDIGIT(prev)) {
22020 yyerror0("unexpected fraction part after numeric literal");
22021 }
22022 else {
22023 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22024 }
22025 SET_LEX_STATE(EXPR_END);
22026 p->lex.ptok = p->lex.pcur;
22027 goto retry;
22028 }
22029 set_yylval_id('.');
22030 SET_LEX_STATE(EXPR_DOT);
22031 return '.';
22032 }
22033
22034 case '0': case '1': case '2': case '3': case '4':
22035 case '5': case '6': case '7': case '8': case '9':
22036 return parse_numeric(p, c);
22037
22038 case ')':
22039 COND_POP();
22040 CMDARG_POP();
22041 SET_LEX_STATE(EXPR_ENDFN);
22042 p->lex.paren_nest--;
22043 return c;
22044
22045 case ']':
22046 COND_POP();
22047 CMDARG_POP();
22048 SET_LEX_STATE(EXPR_END);
22049 p->lex.paren_nest--;
22050 return c;
22051
22052 case '}':
22053 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22054 if (!p->lex.brace_nest--) return tSTRING_DEND;
22055 COND_POP();
22056 CMDARG_POP();
22057 SET_LEX_STATE(EXPR_END);
22058 p->lex.paren_nest--;
22059 return c;
22060
22061 case ':':
22062 c = nextc(p);
22063 if (c == ':') {
22064 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22065 SET_LEX_STATE(EXPR_BEG);
22066 return tCOLON3;
22067 }
22068 set_yylval_id(idCOLON2);
22069 SET_LEX_STATE(EXPR_DOT);
22070 return tCOLON2;
22071 }
22072 if (IS_END() || ISSPACE(c) || c == '#') {
22073 pushback(p, c);
22074 c = warn_balanced(':', ":", "symbol literal");
22075 SET_LEX_STATE(EXPR_BEG);
22076 return c;
22077 }
22078 switch (c) {
22079 case '\'':
22080 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22081 break;
22082 case '"':
22083 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22084 break;
22085 default:
22086 pushback(p, c);
22087 break;
22088 }
22089 SET_LEX_STATE(EXPR_FNAME);
22090 return tSYMBEG;
22091
22092 case '/':
22093 if (IS_BEG()) {
22094 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22095 return tREGEXP_BEG;
22096 }
22097 if ((c = nextc(p)) == '=') {
22098 set_yylval_id('/');
22099 SET_LEX_STATE(EXPR_BEG);
22100 return tOP_ASGN;
22101 }
22102 pushback(p, c);
22103 if (IS_SPCARG(c)) {
22104 arg_ambiguous(p, '/');
22105 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22106 return tREGEXP_BEG;
22107 }
22108 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22109 return warn_balanced('/', "/", "regexp literal");
22110
22111 case '^':
22112 if ((c = nextc(p)) == '=') {
22113 set_yylval_id('^');
22114 SET_LEX_STATE(EXPR_BEG);
22115 return tOP_ASGN;
22116 }
22117 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22118 pushback(p, c);
22119 return '^';
22120
22121 case ';':
22122 SET_LEX_STATE(EXPR_BEG);
22123 p->command_start = TRUE;
22124 return ';';
22125
22126 case ',':
22127 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22128 return ',';
22129
22130 case '~':
22131 if (IS_AFTER_OPERATOR()) {
22132 if ((c = nextc(p)) != '@') {
22133 pushback(p, c);
22134 }
22135 SET_LEX_STATE(EXPR_ARG);
22136 }
22137 else {
22138 SET_LEX_STATE(EXPR_BEG);
22139 }
22140 return '~';
22141
22142 case '(':
22143 if (IS_BEG()) {
22144 c = tLPAREN;
22145 }
22146 else if (!space_seen) {
22147 /* foo( ... ) => method call, no ambiguity */
22148 }
22149 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22150 c = tLPAREN_ARG;
22151 }
22152 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22153 rb_warning0("parentheses after method name is interpreted as "
22154 "an argument list, not a decomposed argument");
22155 }
22156 p->lex.paren_nest++;
22157 COND_PUSH(0);
22158 CMDARG_PUSH(0);
22159 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22160 return c;
22161
22162 case '[':
22163 p->lex.paren_nest++;
22164 if (IS_AFTER_OPERATOR()) {
22165 if ((c = nextc(p)) == ']') {
22166 p->lex.paren_nest--;
22167 SET_LEX_STATE(EXPR_ARG);
22168 if ((c = nextc(p)) == '=') {
22169 return tASET;
22170 }
22171 pushback(p, c);
22172 return tAREF;
22173 }
22174 pushback(p, c);
22175 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22176 return '[';
22177 }
22178 else if (IS_BEG()) {
22179 c = tLBRACK;
22180 }
22181 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22182 c = tLBRACK;
22183 }
22184 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22185 COND_PUSH(0);
22186 CMDARG_PUSH(0);
22187 return c;
22188
22189 case '{':
22190 ++p->lex.brace_nest;
22191 if (lambda_beginning_p())
22192 c = tLAMBEG;
22193 else if (IS_lex_state(EXPR_LABELED))
22194 c = tLBRACE; /* hash */
22195 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22196 c = '{'; /* block (primary) */
22197 else if (IS_lex_state(EXPR_ENDARG))
22198 c = tLBRACE_ARG; /* block (expr) */
22199 else
22200 c = tLBRACE; /* hash */
22201 if (c != tLBRACE) {
22202 p->command_start = TRUE;
22203 SET_LEX_STATE(EXPR_BEG);
22204 }
22205 else {
22206 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22207 }
22208 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22209 COND_PUSH(0);
22210 CMDARG_PUSH(0);
22211 return c;
22212
22213 case '\\':
22214 c = nextc(p);
22215 if (c == '\n') {
22216 space_seen = 1;
22217 dispatch_scan_event(p, tSP);
22218 goto retry; /* skip \\n */
22219 }
22220 if (c == ' ') return tSP;
22221 if (ISSPACE(c)) return c;
22222 pushback(p, c);
22223 return '\\';
22224
22225 case '%':
22226 return parse_percent(p, space_seen, last_state);
22227
22228 case '$':
22229 return parse_gvar(p, last_state);
22230
22231 case '@':
22232 return parse_atmark(p, last_state);
22233
22234 case '_':
22235 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22236 p->ruby__end__seen = 1;
22237 p->eofp = 1;
22238#ifdef RIPPER
22239 lex_goto_eol(p);
22240 dispatch_scan_event(p, k__END__);
22241#endif
22242 return END_OF_INPUT;
22243 }
22244 newtok(p);
22245 break;
22246
22247 default:
22248 if (!parser_is_identchar(p)) {
22249 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22250 token_flush(p);
22251 goto retry;
22252 }
22253
22254 newtok(p);
22255 break;
22256 }
22257
22258 return parse_ident(p, c, cmd_state);
22259}
22260
22261static enum yytokentype
22262yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22263{
22264 enum yytokentype t;
22265
22266 p->lval = lval;
22267 lval->node = 0;
22268 p->yylloc = yylloc;
22269
22270 t = parser_yylex(p);
22271
22272 if (has_delayed_token(p))
22273 dispatch_delayed_token(p, t);
22274 else if (t != END_OF_INPUT)
22275 dispatch_scan_event(p, t);
22276
22277 return t;
22278}
22279
22280#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22281
22282static NODE*
22283node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22284{
22285 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22286
22287 rb_node_init(n, type);
22288 return n;
22289}
22290
22291static NODE *
22292nd_set_loc(NODE *nd, const YYLTYPE *loc)
22293{
22294 nd->nd_loc = *loc;
22295 nd_set_line(nd, loc->beg_pos.lineno);
22296 return nd;
22297}
22298
22299static NODE*
22300node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22301{
22302 NODE *n = node_new_internal(p, type, size, alignment);
22303
22304 nd_set_loc(n, loc);
22305 nd_set_node_id(n, parser_get_node_id(p));
22306 return n;
22307}
22308
22309#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22310
22311static rb_node_scope_t *
22312rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22313{
22314 rb_ast_id_table_t *nd_tbl;
22315 nd_tbl = local_tbl(p);
22316 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22317 n->nd_tbl = nd_tbl;
22318 n->nd_body = nd_body;
22319 n->nd_args = nd_args;
22320
22321 return n;
22322}
22323
22324static rb_node_scope_t *
22325rb_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)
22326{
22327 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22328 n->nd_tbl = nd_tbl;
22329 n->nd_body = nd_body;
22330 n->nd_args = nd_args;
22331
22332 return n;
22333}
22334
22335static rb_node_defn_t *
22336rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22337{
22338 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22339 n->nd_mid = nd_mid;
22340 n->nd_defn = nd_defn;
22341
22342 return n;
22343}
22344
22345static rb_node_defs_t *
22346rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22347{
22348 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22349 n->nd_recv = nd_recv;
22350 n->nd_mid = nd_mid;
22351 n->nd_defn = nd_defn;
22352
22353 return n;
22354}
22355
22356static rb_node_block_t *
22357rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22358{
22359 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22360 n->nd_head = nd_head;
22361 n->nd_end = (NODE *)n;
22362 n->nd_next = 0;
22363
22364 return n;
22365}
22366
22367static rb_node_for_t *
22368rb_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)
22369{
22370 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22371 n->nd_body = nd_body;
22372 n->nd_iter = nd_iter;
22373 n->for_keyword_loc = *for_keyword_loc;
22374 n->in_keyword_loc = *in_keyword_loc;
22375 n->do_keyword_loc = *do_keyword_loc;
22376 n->end_keyword_loc = *end_keyword_loc;
22377
22378 return n;
22379}
22380
22381static rb_node_for_masgn_t *
22382rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22383{
22384 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22385 n->nd_var = nd_var;
22386
22387 return n;
22388}
22389
22390static rb_node_retry_t *
22391rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22392{
22393 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22394
22395 return n;
22396}
22397
22398static rb_node_begin_t *
22399rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22400{
22401 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22402 n->nd_body = nd_body;
22403
22404 return n;
22405}
22406
22407static rb_node_rescue_t *
22408rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22409{
22410 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22411 n->nd_head = nd_head;
22412 n->nd_resq = nd_resq;
22413 n->nd_else = nd_else;
22414
22415 return n;
22416}
22417
22418static rb_node_resbody_t *
22419rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22420{
22421 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22422 n->nd_args = nd_args;
22423 n->nd_exc_var = nd_exc_var;
22424 n->nd_body = nd_body;
22425 n->nd_next = nd_next;
22426
22427 return n;
22428}
22429
22430static rb_node_ensure_t *
22431rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22432{
22433 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22434 n->nd_head = nd_head;
22435 n->nd_ensr = nd_ensr;
22436
22437 return n;
22438}
22439
22440static rb_node_and_t *
22441rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22442{
22443 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22444 n->nd_1st = nd_1st;
22445 n->nd_2nd = nd_2nd;
22446 n->operator_loc = *operator_loc;
22447
22448 return n;
22449}
22450
22451static rb_node_or_t *
22452rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22453{
22454 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22455 n->nd_1st = nd_1st;
22456 n->nd_2nd = nd_2nd;
22457 n->operator_loc = *operator_loc;
22458
22459 return n;
22460}
22461
22462static rb_node_return_t *
22463rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22464{
22465 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22466 n->nd_stts = nd_stts;
22467 n->keyword_loc = *keyword_loc;
22468 return n;
22469}
22470
22471static rb_node_yield_t *
22472rb_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)
22473{
22474 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22475 n->nd_head = nd_head;
22476 n->keyword_loc = *keyword_loc;
22477 n->lparen_loc = *lparen_loc;
22478 n->rparen_loc = *rparen_loc;
22479
22480 return n;
22481}
22482
22483static rb_node_if_t *
22484rb_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)
22485{
22486 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22487 n->nd_cond = nd_cond;
22488 n->nd_body = nd_body;
22489 n->nd_else = nd_else;
22490 n->if_keyword_loc = *if_keyword_loc;
22491 n->then_keyword_loc = *then_keyword_loc;
22492 n->end_keyword_loc = *end_keyword_loc;
22493
22494 return n;
22495}
22496
22497static rb_node_unless_t *
22498rb_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)
22499{
22500 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22501 n->nd_cond = nd_cond;
22502 n->nd_body = nd_body;
22503 n->nd_else = nd_else;
22504 n->keyword_loc = *keyword_loc;
22505 n->then_keyword_loc = *then_keyword_loc;
22506 n->end_keyword_loc = *end_keyword_loc;
22507
22508 return n;
22509}
22510
22511static rb_node_class_t *
22512rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc)
22513{
22514 /* Keep the order of node creation */
22515 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22516 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22517 n->nd_cpath = nd_cpath;
22518 n->nd_body = scope;
22519 n->nd_super = nd_super;
22520
22521 return n;
22522}
22523
22524static rb_node_sclass_t *
22525rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc)
22526{
22527 /* Keep the order of node creation */
22528 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22529 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22530 n->nd_recv = nd_recv;
22531 n->nd_body = scope;
22532
22533 return n;
22534}
22535
22536static rb_node_module_t *
22537rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc)
22538{
22539 /* Keep the order of node creation */
22540 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22541 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22542 n->nd_cpath = nd_cpath;
22543 n->nd_body = scope;
22544
22545 return n;
22546}
22547
22548static rb_node_iter_t *
22549rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22550{
22551 /* Keep the order of node creation */
22552 NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22553 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22554 n->nd_body = scope;
22555 n->nd_iter = 0;
22556
22557 return n;
22558}
22559
22560static rb_node_lambda_t *
22561rb_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)
22562{
22563 /* Keep the order of node creation */
22564 NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22565 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
22566 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
22567 n->nd_body = scope;
22568 n->operator_loc = *operator_loc;
22569 n->opening_loc = *opening_loc;
22570 n->closing_loc = *closing_loc;
22571
22572 return n;
22573}
22574
22575static rb_node_case_t *
22576rb_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)
22577{
22578 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22579 n->nd_head = nd_head;
22580 n->nd_body = nd_body;
22581 n->case_keyword_loc = *case_keyword_loc;
22582 n->end_keyword_loc = *end_keyword_loc;
22583
22584 return n;
22585}
22586
22587static rb_node_case2_t *
22588rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22589{
22590 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22591 n->nd_head = 0;
22592 n->nd_body = nd_body;
22593 n->case_keyword_loc = *case_keyword_loc;
22594 n->end_keyword_loc = *end_keyword_loc;
22595
22596 return n;
22597}
22598
22599static rb_node_case3_t *
22600rb_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)
22601{
22602 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22603 n->nd_head = nd_head;
22604 n->nd_body = nd_body;
22605 n->case_keyword_loc = *case_keyword_loc;
22606 n->end_keyword_loc = *end_keyword_loc;
22607
22608 return n;
22609}
22610
22611static rb_node_when_t *
22612rb_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)
22613{
22614 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22615 n->nd_head = nd_head;
22616 n->nd_body = nd_body;
22617 n->nd_next = nd_next;
22618 n->keyword_loc = *keyword_loc;
22619 n->then_keyword_loc = *then_keyword_loc;
22620
22621 return n;
22622}
22623
22624static rb_node_in_t *
22625rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22626{
22627 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22628 n->nd_head = nd_head;
22629 n->nd_body = nd_body;
22630 n->nd_next = nd_next;
22631
22632 return n;
22633}
22634
22635static rb_node_while_t *
22636rb_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)
22637{
22638 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22639 n->nd_cond = nd_cond;
22640 n->nd_body = nd_body;
22641 n->nd_state = nd_state;
22642 n->keyword_loc = *keyword_loc;
22643 n->closing_loc = *closing_loc;
22644
22645 return n;
22646}
22647
22648static rb_node_until_t *
22649rb_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)
22650{
22651 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22652 n->nd_cond = nd_cond;
22653 n->nd_body = nd_body;
22654 n->nd_state = nd_state;
22655 n->keyword_loc = *keyword_loc;
22656 n->closing_loc = *closing_loc;
22657
22658 return n;
22659}
22660
22661static rb_node_colon2_t *
22662rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc)
22663{
22664 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
22665 n->nd_head = nd_head;
22666 n->nd_mid = nd_mid;
22667
22668 return n;
22669}
22670
22671static rb_node_colon3_t *
22672rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
22673{
22674 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
22675 n->nd_mid = nd_mid;
22676
22677 return n;
22678}
22679
22680static rb_node_dot2_t *
22681rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22682{
22683 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
22684 n->nd_beg = nd_beg;
22685 n->nd_end = nd_end;
22686 n->operator_loc = *operator_loc;
22687
22688 return n;
22689}
22690
22691static rb_node_dot3_t *
22692rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22693{
22694 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
22695 n->nd_beg = nd_beg;
22696 n->nd_end = nd_end;
22697 n->operator_loc = *operator_loc;
22698
22699 return n;
22700}
22701
22702static rb_node_self_t *
22703rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
22704{
22705 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
22706 n->nd_state = 1;
22707
22708 return n;
22709}
22710
22711static rb_node_nil_t *
22712rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
22713{
22714 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
22715
22716 return n;
22717}
22718
22719static rb_node_true_t *
22720rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
22721{
22722 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
22723
22724 return n;
22725}
22726
22727static rb_node_false_t *
22728rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
22729{
22730 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
22731
22732 return n;
22733}
22734
22735static rb_node_super_t *
22736rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
22737 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
22738{
22739 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
22740 n->nd_args = nd_args;
22741 n->keyword_loc = *keyword_loc;
22742 n->lparen_loc = *lparen_loc;
22743 n->rparen_loc = *rparen_loc;
22744
22745 return n;
22746}
22747
22748static rb_node_zsuper_t *
22749rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
22750{
22751 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
22752
22753 return n;
22754}
22755
22756static rb_node_match2_t *
22757rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22758{
22759 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
22760 n->nd_recv = nd_recv;
22761 n->nd_value = nd_value;
22762 n->nd_args = 0;
22763
22764 return n;
22765}
22766
22767static rb_node_match3_t *
22768rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22769{
22770 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
22771 n->nd_recv = nd_recv;
22772 n->nd_value = nd_value;
22773
22774 return n;
22775}
22776
22777/* TODO: Use union for NODE_LIST2 */
22778static rb_node_list_t *
22779rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22780{
22781 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22782 n->nd_head = nd_head;
22783 n->as.nd_alen = 1;
22784 n->nd_next = 0;
22785
22786 return n;
22787}
22788
22789static rb_node_list_t *
22790rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22791{
22792 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22793 n->nd_head = nd_head;
22794 n->as.nd_alen = nd_alen;
22795 n->nd_next = nd_next;
22796
22797 return n;
22798}
22799
22800static rb_node_zlist_t *
22801rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
22802{
22803 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
22804
22805 return n;
22806}
22807
22808static rb_node_hash_t *
22809rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22810{
22811 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
22812 n->nd_head = nd_head;
22813 n->nd_brace = 0;
22814
22815 return n;
22816}
22817
22818static rb_node_masgn_t *
22819rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
22820{
22821 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
22822 n->nd_head = nd_head;
22823 n->nd_value = 0;
22824 n->nd_args = nd_args;
22825
22826 return n;
22827}
22828
22829static rb_node_gasgn_t *
22830rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22831{
22832 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
22833 n->nd_vid = nd_vid;
22834 n->nd_value = nd_value;
22835
22836 return n;
22837}
22838
22839static rb_node_lasgn_t *
22840rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22841{
22842 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
22843 n->nd_vid = nd_vid;
22844 n->nd_value = nd_value;
22845
22846 return n;
22847}
22848
22849static rb_node_dasgn_t *
22850rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22851{
22852 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
22853 n->nd_vid = nd_vid;
22854 n->nd_value = nd_value;
22855
22856 return n;
22857}
22858
22859static rb_node_iasgn_t *
22860rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22861{
22862 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
22863 n->nd_vid = nd_vid;
22864 n->nd_value = nd_value;
22865
22866 return n;
22867}
22868
22869static rb_node_cvasgn_t *
22870rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22871{
22872 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
22873 n->nd_vid = nd_vid;
22874 n->nd_value = nd_value;
22875
22876 return n;
22877}
22878
22879static rb_node_op_asgn1_t *
22880rb_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)
22881{
22882 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
22883 n->nd_recv = nd_recv;
22884 n->nd_mid = nd_mid;
22885 n->nd_index = index;
22886 n->nd_rvalue = rvalue;
22887 n->call_operator_loc = *call_operator_loc;
22888 n->opening_loc = *opening_loc;
22889 n->closing_loc = *closing_loc;
22890 n->binary_operator_loc = *binary_operator_loc;
22891
22892 return n;
22893}
22894
22895static rb_node_op_asgn2_t *
22896rb_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)
22897{
22898 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
22899 n->nd_recv = nd_recv;
22900 n->nd_value = nd_value;
22901 n->nd_vid = nd_vid;
22902 n->nd_mid = nd_mid;
22903 n->nd_aid = nd_aid;
22904 n->call_operator_loc = *call_operator_loc;
22905 n->message_loc = *message_loc;
22906 n->binary_operator_loc = *binary_operator_loc;
22907
22908 return n;
22909}
22910
22911static rb_node_op_asgn_or_t *
22912rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
22913{
22914 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
22915 n->nd_head = nd_head;
22916 n->nd_value = nd_value;
22917
22918 return n;
22919}
22920
22921static rb_node_op_asgn_and_t *
22922rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
22923{
22924 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
22925 n->nd_head = nd_head;
22926 n->nd_value = nd_value;
22927
22928 return n;
22929}
22930
22931static rb_node_gvar_t *
22932rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22933{
22934 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
22935 n->nd_vid = nd_vid;
22936
22937 return n;
22938}
22939
22940static rb_node_lvar_t *
22941rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22942{
22943 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
22944 n->nd_vid = nd_vid;
22945
22946 return n;
22947}
22948
22949static rb_node_dvar_t *
22950rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22951{
22952 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
22953 n->nd_vid = nd_vid;
22954
22955 return n;
22956}
22957
22958static rb_node_ivar_t *
22959rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22960{
22961 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
22962 n->nd_vid = nd_vid;
22963
22964 return n;
22965}
22966
22967static rb_node_const_t *
22968rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22969{
22970 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
22971 n->nd_vid = nd_vid;
22972
22973 return n;
22974}
22975
22976static rb_node_cvar_t *
22977rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22978{
22979 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
22980 n->nd_vid = nd_vid;
22981
22982 return n;
22983}
22984
22985static rb_node_nth_ref_t *
22986rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
22987{
22988 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
22989 n->nd_nth = nd_nth;
22990
22991 return n;
22992}
22993
22994static rb_node_back_ref_t *
22995rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
22996{
22997 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
22998 n->nd_nth = nd_nth;
22999
23000 return n;
23001}
23002
23003static rb_node_integer_t *
23004rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23005{
23006 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23007 n->val = val;
23008 n->minus = FALSE;
23009 n->base = base;
23010
23011 return n;
23012}
23013
23014static rb_node_float_t *
23015rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23016{
23017 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23018 n->val = val;
23019 n->minus = FALSE;
23020
23021 return n;
23022}
23023
23024static rb_node_rational_t *
23025rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23026{
23027 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23028 n->val = val;
23029 n->minus = FALSE;
23030 n->base = base;
23031 n->seen_point = seen_point;
23032
23033 return n;
23034}
23035
23036static rb_node_imaginary_t *
23037rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23038{
23039 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23040 n->val = val;
23041 n->minus = FALSE;
23042 n->base = base;
23043 n->seen_point = seen_point;
23044 n->type = numeric_type;
23045
23046 return n;
23047}
23048
23049static rb_node_str_t *
23050rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23051{
23052 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23053 n->string = string;
23054
23055 return n;
23056}
23057
23058/* TODO; Use union for NODE_DSTR2 */
23059static rb_node_dstr_t *
23060rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23061{
23062 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23063 n->string = string;
23064 n->as.nd_alen = nd_alen;
23065 n->nd_next = (rb_node_list_t *)nd_next;
23066
23067 return n;
23068}
23069
23070static rb_node_dstr_t *
23071rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23072{
23073 return rb_node_dstr_new0(p, string, 1, 0, loc);
23074}
23075
23076static rb_node_xstr_t *
23077rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23078{
23079 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23080 n->string = string;
23081
23082 return n;
23083}
23084
23085static rb_node_dxstr_t *
23086rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23087{
23088 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23089 n->string = string;
23090 n->as.nd_alen = nd_alen;
23091 n->nd_next = (rb_node_list_t *)nd_next;
23092
23093 return n;
23094}
23095
23096static rb_node_sym_t *
23097rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23098{
23099 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23100 n->string = rb_str_to_parser_string(p, str);
23101
23102 return n;
23103}
23104
23105static rb_node_dsym_t *
23106rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23107{
23108 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23109 n->string = string;
23110 n->as.nd_alen = nd_alen;
23111 n->nd_next = (rb_node_list_t *)nd_next;
23112
23113 return n;
23114}
23115
23116static rb_node_evstr_t *
23117rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23118{
23119 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23120 n->nd_body = nd_body;
23121 n->opening_loc = *opening_loc;
23122 n->closing_loc = *closing_loc;
23123
23124 return n;
23125}
23126
23127static rb_node_regx_t *
23128rb_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)
23129{
23130 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23131 n->string = string;
23132 n->options = options & RE_OPTION_MASK;
23133 n->opening_loc = *opening_loc;
23134 n->content_loc = *content_loc;
23135 n->closing_loc = *closing_loc;
23136
23137 return n;
23138}
23139
23140static rb_node_call_t *
23141rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23142{
23143 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23144 n->nd_recv = nd_recv;
23145 n->nd_mid = nd_mid;
23146 n->nd_args = nd_args;
23147
23148 return n;
23149}
23150
23151static rb_node_opcall_t *
23152rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23153{
23154 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23155 n->nd_recv = nd_recv;
23156 n->nd_mid = nd_mid;
23157 n->nd_args = nd_args;
23158
23159 return n;
23160}
23161
23162static rb_node_fcall_t *
23163rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23164{
23165 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23166 n->nd_mid = nd_mid;
23167 n->nd_args = nd_args;
23168
23169 return n;
23170}
23171
23172static rb_node_qcall_t *
23173rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23174{
23175 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23176 n->nd_recv = nd_recv;
23177 n->nd_mid = nd_mid;
23178 n->nd_args = nd_args;
23179
23180 return n;
23181}
23182
23183static rb_node_vcall_t *
23184rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23185{
23186 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23187 n->nd_mid = nd_mid;
23188
23189 return n;
23190}
23191
23192static rb_node_once_t *
23193rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23194{
23195 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23196 n->nd_body = nd_body;
23197
23198 return n;
23199}
23200
23201static rb_node_args_t *
23202rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23203{
23204 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23205 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23206
23207 return n;
23208}
23209
23210static rb_node_args_aux_t *
23211rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23212{
23213 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23214 n->nd_pid = nd_pid;
23215 n->nd_plen = nd_plen;
23216 n->nd_next = 0;
23217
23218 return n;
23219}
23220
23221static rb_node_opt_arg_t *
23222rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23223{
23224 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23225 n->nd_body = nd_body;
23226 n->nd_next = 0;
23227
23228 return n;
23229}
23230
23231static rb_node_kw_arg_t *
23232rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23233{
23234 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23235 n->nd_body = nd_body;
23236 n->nd_next = 0;
23237
23238 return n;
23239}
23240
23241static rb_node_postarg_t *
23242rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23243{
23244 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23245 n->nd_1st = nd_1st;
23246 n->nd_2nd = nd_2nd;
23247
23248 return n;
23249}
23250
23251static rb_node_argscat_t *
23252rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23253{
23254 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23255 n->nd_head = nd_head;
23256 n->nd_body = nd_body;
23257
23258 return n;
23259}
23260
23261static rb_node_argspush_t *
23262rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23263{
23264 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23265 n->nd_head = nd_head;
23266 n->nd_body = nd_body;
23267
23268 return n;
23269}
23270
23271static rb_node_splat_t *
23272rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23273{
23274 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23275 n->nd_head = nd_head;
23276 n->operator_loc = *operator_loc;
23277
23278 return n;
23279}
23280
23281static rb_node_block_pass_t *
23282rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23283{
23284 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23285 n->forwarding = 0;
23286 n->nd_head = 0;
23287 n->nd_body = nd_body;
23288 n->operator_loc = *operator_loc;
23289
23290 return n;
23291}
23292
23293static rb_node_alias_t *
23294rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23295{
23296 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23297 n->nd_1st = nd_1st;
23298 n->nd_2nd = nd_2nd;
23299 n->keyword_loc = *keyword_loc;
23300
23301 return n;
23302}
23303
23304static rb_node_valias_t *
23305rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23306{
23307 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23308 n->nd_alias = nd_alias;
23309 n->nd_orig = nd_orig;
23310 n->keyword_loc = *keyword_loc;
23311
23312 return n;
23313}
23314
23315static rb_node_undef_t *
23316rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23317{
23318 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23319 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23320 n->keyword_loc = NULL_LOC;
23321 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23322
23323 return n;
23324}
23325
23326static rb_node_errinfo_t *
23327rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23328{
23329 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23330
23331 return n;
23332}
23333
23334static rb_node_defined_t *
23335rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23336{
23337 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23338 n->nd_head = nd_head;
23339
23340 return n;
23341}
23342
23343static rb_node_postexe_t *
23344rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23345{
23346 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23347 n->nd_body = nd_body;
23348
23349 return n;
23350}
23351
23352static rb_node_attrasgn_t *
23353rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23354{
23355 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23356 n->nd_recv = nd_recv;
23357 n->nd_mid = nd_mid;
23358 n->nd_args = nd_args;
23359
23360 return n;
23361}
23362
23363static rb_node_aryptn_t *
23364rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23365{
23366 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23367 n->nd_pconst = 0;
23368 n->pre_args = pre_args;
23369 n->rest_arg = rest_arg;
23370 n->post_args = post_args;
23371
23372 return n;
23373}
23374
23375static rb_node_hshptn_t *
23376rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23377{
23378 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23379 n->nd_pconst = nd_pconst;
23380 n->nd_pkwargs = nd_pkwargs;
23381 n->nd_pkwrestarg = nd_pkwrestarg;
23382
23383 return n;
23384}
23385
23386static rb_node_fndptn_t *
23387rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23388{
23389 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23390 n->nd_pconst = 0;
23391 n->pre_rest_arg = pre_rest_arg;
23392 n->args = args;
23393 n->post_rest_arg = post_rest_arg;
23394
23395 return n;
23396}
23397
23398static rb_node_line_t *
23399rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23400{
23401 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23402
23403 return n;
23404}
23405
23406static rb_node_file_t *
23407rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23408{
23409 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23410 n->path = rb_str_to_parser_string(p, str);
23411
23412 return n;
23413}
23414
23415static rb_node_encoding_t *
23416rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23417{
23418 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23419 n->enc = p->enc;
23420
23421 return n;
23422}
23423
23424static rb_node_cdecl_t *
23425rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23426{
23427 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23428 n->nd_vid = nd_vid;
23429 n->nd_value = nd_value;
23430 n->nd_else = nd_else;
23431 n->shareability = shareability;
23432
23433 return n;
23434}
23435
23436static rb_node_op_cdecl_t *
23437rb_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)
23438{
23439 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23440 n->nd_head = nd_head;
23441 n->nd_value = nd_value;
23442 n->nd_aid = nd_aid;
23443 n->shareability = shareability;
23444
23445 return n;
23446}
23447
23448static rb_node_error_t *
23449rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23450{
23451 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23452
23453 return n;
23454}
23455
23456static rb_node_break_t *
23457rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23458{
23459 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23460 n->nd_stts = nd_stts;
23461 n->nd_chain = 0;
23462 n->keyword_loc = *keyword_loc;
23463
23464 return n;
23465}
23466
23467static rb_node_next_t *
23468rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23469{
23470 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23471 n->nd_stts = nd_stts;
23472 n->nd_chain = 0;
23473 n->keyword_loc = *keyword_loc;
23474
23475 return n;
23476}
23477
23478static rb_node_redo_t *
23479rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23480{
23481 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23482 n->nd_chain = 0;
23483 n->keyword_loc = *keyword_loc;
23484
23485 return n;
23486}
23487
23488static rb_node_def_temp_t *
23489rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23490{
23491 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23492 n->save.numparam_save = 0;
23493 n->save.max_numparam = 0;
23494 n->save.ctxt = p->ctxt;
23495 n->nd_def = 0;
23496 n->nd_mid = 0;
23497
23498 return n;
23499}
23500
23501static rb_node_def_temp_t *
23502def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23503{
23504 n->save.numparam_save = numparam_push(p);
23505 n->save.max_numparam = p->max_numparam;
23506 return n;
23507}
23508
23509#ifndef RIPPER
23510static enum node_type
23511nodetype(NODE *node) /* for debug */
23512{
23513 return (enum node_type)nd_type(node);
23514}
23515
23516static int
23517nodeline(NODE *node)
23518{
23519 return nd_line(node);
23520}
23521#endif
23522
23523static NODE*
23524newline_node(NODE *node)
23525{
23526 if (node) {
23527 node = remove_begin(node);
23528 nd_set_fl_newline(node);
23529 }
23530 return node;
23531}
23532
23533static void
23534fixpos(NODE *node, NODE *orig)
23535{
23536 if (!node) return;
23537 if (!orig) return;
23538 nd_set_line(node, nd_line(orig));
23539}
23540
23541static NODE*
23542block_append(struct parser_params *p, NODE *head, NODE *tail)
23543{
23544 NODE *end, *h = head, *nd;
23545
23546 if (tail == 0) return head;
23547
23548 if (h == 0) return tail;
23549 switch (nd_type(h)) {
23550 default:
23551 h = end = NEW_BLOCK(head, &head->nd_loc);
23552 head = end;
23553 break;
23554 case NODE_BLOCK:
23555 end = RNODE_BLOCK(h)->nd_end;
23556 break;
23557 }
23558
23559 nd = RNODE_BLOCK(end)->nd_head;
23560 switch (nd_type(nd)) {
23561 case NODE_RETURN:
23562 case NODE_BREAK:
23563 case NODE_NEXT:
23564 case NODE_REDO:
23565 case NODE_RETRY:
23566 rb_warning0L(nd_line(tail), "statement not reached");
23567 break;
23568
23569 default:
23570 break;
23571 }
23572
23573 if (!nd_type_p(tail, NODE_BLOCK)) {
23574 tail = NEW_BLOCK(tail, &tail->nd_loc);
23575 }
23576 RNODE_BLOCK(end)->nd_next = tail;
23577 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23578 nd_set_last_loc(head, nd_last_loc(tail));
23579 return head;
23580}
23581
23582/* append item to the list */
23583static NODE*
23584list_append(struct parser_params *p, NODE *list, NODE *item)
23585{
23586 NODE *last;
23587
23588 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23589 if (RNODE_LIST(list)->nd_next) {
23590 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23591 }
23592 else {
23593 last = list;
23594 }
23595
23596 RNODE_LIST(list)->as.nd_alen += 1;
23597 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23598 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23599
23600 nd_set_last_loc(list, nd_last_loc(item));
23601
23602 return list;
23603}
23604
23605/* concat two lists */
23606static NODE*
23607list_concat(NODE *head, NODE *tail)
23608{
23609 NODE *last;
23610
23611 if (RNODE_LIST(head)->nd_next) {
23612 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23613 }
23614 else {
23615 last = head;
23616 }
23617
23618 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23619 RNODE_LIST(last)->nd_next = tail;
23620 if (RNODE_LIST(tail)->nd_next) {
23621 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23622 }
23623 else {
23624 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23625 }
23626
23627 nd_set_last_loc(head, nd_last_loc(tail));
23628
23629 return head;
23630}
23631
23632static int
23633literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23634{
23635 if (!tail) return 1;
23636 if (!rb_parser_enc_compatible(p, head, tail)) {
23637 compile_error(p, "string literal encodings differ (%s / %s)",
23638 rb_enc_name(rb_parser_str_get_encoding(head)),
23639 rb_enc_name(rb_parser_str_get_encoding(tail)));
23640 rb_parser_str_resize(p, head, 0);
23641 rb_parser_str_resize(p, tail, 0);
23642 return 0;
23643 }
23644 rb_parser_str_buf_append(p, head, tail);
23645 return 1;
23646}
23647
23648static rb_parser_string_t *
23649string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23650{
23651 if (htype != NODE_DSTR) return NULL;
23652 if (RNODE_DSTR(head)->nd_next) {
23653 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
23654 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
23655 }
23656 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
23657 ASSUME(lit);
23658 return lit;
23659}
23660
23661#ifndef RIPPER
23662static rb_parser_string_t *
23663rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
23664{
23665 rb_parser_string_t *copy;
23666 if (!orig) return NULL;
23667 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
23668 copy->coderange = orig->coderange;
23669 copy->enc = orig->enc;
23670 return copy;
23671}
23672#endif
23673
23674/* concat two string literals */
23675static NODE *
23676literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
23677{
23678 enum node_type htype;
23679 rb_parser_string_t *lit;
23680
23681 if (!head) return tail;
23682 if (!tail) return head;
23683
23684 htype = nd_type(head);
23685 if (htype == NODE_EVSTR) {
23686 head = new_dstr(p, head, loc);
23687 htype = NODE_DSTR;
23688 }
23689 if (p->heredoc_indent > 0) {
23690 switch (htype) {
23691 case NODE_STR:
23692 head = str2dstr(p, head);
23693 case NODE_DSTR:
23694 return list_append(p, head, tail);
23695 default:
23696 break;
23697 }
23698 }
23699 switch (nd_type(tail)) {
23700 case NODE_STR:
23701 if ((lit = string_literal_head(p, htype, head)) != false) {
23702 htype = NODE_STR;
23703 }
23704 else {
23705 lit = RNODE_DSTR(head)->string;
23706 }
23707 if (htype == NODE_STR) {
23708 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
23709 error:
23710 rb_discard_node(p, head);
23711 rb_discard_node(p, tail);
23712 return 0;
23713 }
23714 rb_discard_node(p, tail);
23715 }
23716 else {
23717 list_append(p, head, tail);
23718 }
23719 break;
23720
23721 case NODE_DSTR:
23722 if (htype == NODE_STR) {
23723 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
23724 goto error;
23725 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23726 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
23727 RNODE_STR(head)->string = NULL;
23728 rb_discard_node(p, head);
23729 head = tail;
23730 }
23731 else if (!RNODE_DSTR(tail)->string) {
23732 append:
23733 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
23734 if (!RNODE_DSTR(head)->nd_next) {
23735 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
23736 }
23737 else if (RNODE_DSTR(tail)->nd_next) {
23738 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
23739 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
23740 }
23741 rb_discard_node(p, tail);
23742 }
23743 else if ((lit = string_literal_head(p, htype, head)) != false) {
23744 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
23745 goto error;
23746 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23747 RNODE_DSTR(tail)->string = 0;
23748 goto append;
23749 }
23750 else {
23751 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));
23752 RNODE_DSTR(tail)->string = 0;
23753 }
23754 break;
23755
23756 case NODE_EVSTR:
23757 if (htype == NODE_STR) {
23758 head = str2dstr(p, head);
23759 RNODE_DSTR(head)->as.nd_alen = 1;
23760 }
23761 list_append(p, head, tail);
23762 break;
23763 }
23764 return head;
23765}
23766
23767static void
23768nd_copy_flag(NODE *new_node, NODE *old_node)
23769{
23770 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
23771 nd_set_line(new_node, nd_line(old_node));
23772 new_node->nd_loc = old_node->nd_loc;
23773 new_node->node_id = old_node->node_id;
23774}
23775
23776static NODE *
23777str2dstr(struct parser_params *p, NODE *node)
23778{
23779 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
23780 nd_copy_flag(new_node, node);
23781 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
23782 RNODE_DSTR(new_node)->as.nd_alen = 0;
23783 RNODE_DSTR(new_node)->nd_next = 0;
23784 RNODE_STR(node)->string = 0;
23785
23786 return new_node;
23787}
23788
23789static NODE *
23790str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
23791{
23792 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
23793 nd_copy_flag(new_node, node);
23794 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
23795 RNODE_REGX(new_node)->options = options;
23796 nd_set_loc(new_node, loc);
23797 RNODE_REGX(new_node)->opening_loc = *opening_loc;
23798 RNODE_REGX(new_node)->content_loc = *content_loc;
23799 RNODE_REGX(new_node)->closing_loc = *closing_loc;
23800 RNODE_STR(node)->string = 0;
23801
23802 return new_node;
23803}
23804
23805static NODE *
23806evstr2dstr(struct parser_params *p, NODE *node)
23807{
23808 if (nd_type_p(node, NODE_EVSTR)) {
23809 node = new_dstr(p, node, &node->nd_loc);
23810 }
23811 return node;
23812}
23813
23814static NODE *
23815new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23816{
23817 NODE *head = node;
23818
23819 if (node) {
23820 switch (nd_type(node)) {
23821 case NODE_STR:
23822 return str2dstr(p, node);
23823 case NODE_DSTR:
23824 break;
23825 case NODE_EVSTR:
23826 return node;
23827 }
23828 }
23829 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
23830}
23831
23832static NODE *
23833new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
23834{
23835 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
23836 return list_append(p, dstr, node);
23837}
23838
23839static NODE *
23840call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
23841 const YYLTYPE *op_loc, const YYLTYPE *loc)
23842{
23843 NODE *expr;
23844 value_expr(recv);
23845 value_expr(arg1);
23846 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
23847 nd_set_line(expr, op_loc->beg_pos.lineno);
23848 return expr;
23849}
23850
23851static NODE *
23852call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
23853{
23854 NODE *opcall;
23855 value_expr(recv);
23856 opcall = NEW_OPCALL(recv, id, 0, loc);
23857 nd_set_line(opcall, op_loc->beg_pos.lineno);
23858 return opcall;
23859}
23860
23861static NODE *
23862new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
23863{
23864 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
23865 nd_set_line(qcall, op_loc->beg_pos.lineno);
23866 return qcall;
23867}
23868
23869static NODE*
23870new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
23871{
23872 NODE *ret;
23873 if (block) block_dup_check(p, args, block);
23874 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
23875 if (block) ret = method_add_block(p, ret, block, loc);
23876 fixpos(ret, recv);
23877 return ret;
23878}
23879
23881new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23882{
23884 body->node = node;
23885 body->opening_loc = *opening_loc;
23886 body->closing_loc = *closing_loc;
23887 return body;
23888}
23889
23890#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
23891
23892static NODE*
23893last_expr_once_body(NODE *node)
23894{
23895 if (!node) return 0;
23896 return nd_once_body(node);
23897}
23898
23899static NODE*
23900match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
23901{
23902 NODE *n;
23903 int line = op_loc->beg_pos.lineno;
23904
23905 value_expr(node1);
23906 value_expr(node2);
23907
23908 if ((n = last_expr_once_body(node1)) != 0) {
23909 switch (nd_type(n)) {
23910 case NODE_DREGX:
23911 {
23912 NODE *match = NEW_MATCH2(node1, node2, loc);
23913 nd_set_line(match, line);
23914 return match;
23915 }
23916
23917 case NODE_REGX:
23918 {
23919 const VALUE lit = rb_node_regx_string_val(n);
23920 if (!NIL_P(lit)) {
23921 NODE *match = NEW_MATCH2(node1, node2, loc);
23922 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
23923 nd_set_line(match, line);
23924 return match;
23925 }
23926 }
23927 }
23928 }
23929
23930 if ((n = last_expr_once_body(node2)) != 0) {
23931 NODE *match3;
23932
23933 switch (nd_type(n)) {
23934 case NODE_DREGX:
23935 match3 = NEW_MATCH3(node2, node1, loc);
23936 return match3;
23937 }
23938 }
23939
23940 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
23941 nd_set_line(n, line);
23942 return n;
23943}
23944
23945# if WARN_PAST_SCOPE
23946static int
23947past_dvar_p(struct parser_params *p, ID id)
23948{
23949 struct vtable *past = p->lvtbl->past;
23950 while (past) {
23951 if (vtable_included(past, id)) return 1;
23952 past = past->prev;
23953 }
23954 return 0;
23955}
23956# endif
23957
23958static int
23959numparam_nested_p(struct parser_params *p)
23960{
23961 struct local_vars *local = p->lvtbl;
23962 NODE *outer = local->numparam.outer;
23963 NODE *inner = local->numparam.inner;
23964 if (outer || inner) {
23965 NODE *used = outer ? outer : inner;
23966 compile_error(p, "numbered parameter is already used in\n"
23967 "%s:%d: %s block here",
23968 p->ruby_sourcefile, nd_line(used),
23969 outer ? "outer" : "inner");
23970 parser_show_error_line(p, &used->nd_loc);
23971 return 1;
23972 }
23973 return 0;
23974}
23975
23976static int
23977numparam_used_p(struct parser_params *p)
23978{
23979 NODE *numparam = p->lvtbl->numparam.current;
23980 if (numparam) {
23981 compile_error(p, "numbered parameter is already used in\n"
23982 "%s:%d: current block here",
23983 p->ruby_sourcefile, nd_line(numparam));
23984 parser_show_error_line(p, &numparam->nd_loc);
23985 return 1;
23986 }
23987 return 0;
23988}
23989
23990static int
23991it_used_p(struct parser_params *p)
23992{
23993 NODE *it = p->lvtbl->it;
23994 if (it) {
23995 compile_error(p, "'it' is already used in\n"
23996 "%s:%d: current block here",
23997 p->ruby_sourcefile, nd_line(it));
23998 parser_show_error_line(p, &it->nd_loc);
23999 return 1;
24000 }
24001 return 0;
24002}
24003
24004static NODE*
24005gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24006{
24007 ID *vidp = NULL;
24008 NODE *node;
24009 switch (id) {
24010 case keyword_self:
24011 return NEW_SELF(loc);
24012 case keyword_nil:
24013 return NEW_NIL(loc);
24014 case keyword_true:
24015 return NEW_TRUE(loc);
24016 case keyword_false:
24017 return NEW_FALSE(loc);
24018 case keyword__FILE__:
24019 {
24020 VALUE file = p->ruby_sourcefile_string;
24021 if (NIL_P(file))
24022 file = rb_str_new(0, 0);
24023 node = NEW_FILE(file, loc);
24024 }
24025 return node;
24026 case keyword__LINE__:
24027 return NEW_LINE(loc);
24028 case keyword__ENCODING__:
24029 return NEW_ENCODING(loc);
24030
24031 }
24032 switch (id_type(id)) {
24033 case ID_LOCAL:
24034 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24035 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24036 if (vidp) *vidp |= LVAR_USED;
24037 node = NEW_DVAR(id, loc);
24038 return node;
24039 }
24040 if (local_id_ref(p, id, &vidp)) {
24041 if (vidp) *vidp |= LVAR_USED;
24042 node = NEW_LVAR(id, loc);
24043 return node;
24044 }
24045 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24046 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24047 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24048 node = NEW_DVAR(id, loc);
24049 struct local_vars *local = p->lvtbl;
24050 if (!local->numparam.current) local->numparam.current = node;
24051 return node;
24052 }
24053# if WARN_PAST_SCOPE
24054 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24055 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24056 }
24057# endif
24058 /* method call without arguments */
24059 if (dyna_in_block(p) && id == rb_intern("it") && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24060 if (numparam_used_p(p)) return 0;
24061 if (p->max_numparam == ORDINAL_PARAM) {
24062 compile_error(p, "ordinary parameter is defined");
24063 return 0;
24064 }
24065 if (!p->it_id) {
24066 p->it_id = internal_id(p);
24067 vtable_add(p->lvtbl->args, p->it_id);
24068 }
24069 NODE *node = NEW_DVAR(p->it_id, loc);
24070 if (!p->lvtbl->it) p->lvtbl->it = node;
24071 return node;
24072 }
24073 return NEW_VCALL(id, loc);
24074 case ID_GLOBAL:
24075 return NEW_GVAR(id, loc);
24076 case ID_INSTANCE:
24077 return NEW_IVAR(id, loc);
24078 case ID_CONST:
24079 return NEW_CONST(id, loc);
24080 case ID_CLASS:
24081 return NEW_CVAR(id, loc);
24082 }
24083 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24084 return 0;
24085}
24086
24087static rb_node_opt_arg_t *
24088opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24089{
24090 rb_node_opt_arg_t *opts = opt_list;
24091 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24092
24093 while (opts->nd_next) {
24094 opts = opts->nd_next;
24095 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24096 }
24097 opts->nd_next = opt;
24098
24099 return opt_list;
24100}
24101
24102static rb_node_kw_arg_t *
24103kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24104{
24105 if (kwlist) {
24106 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24107 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24108 }
24109 return kwlist;
24110}
24111
24112static NODE *
24113new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
24114{
24115 NODE *n = expr;
24116 while (n) {
24117 if (nd_type_p(n, NODE_BEGIN)) {
24118 n = RNODE_BEGIN(n)->nd_body;
24119 }
24120 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24121 n = RNODE_BLOCK(n)->nd_head;
24122 }
24123 else {
24124 break;
24125 }
24126 }
24127 return NEW_DEFINED(n, loc);
24128}
24129
24130static NODE*
24131str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24132{
24133 VALUE lit;
24134 rb_parser_string_t *str = RNODE_STR(node)->string;
24135 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24136 yyerror1(loc, "invalid symbol");
24137 lit = STR_NEW0();
24138 }
24139 else {
24140 lit = rb_str_new_parser_string(str);
24141 }
24142 return NEW_SYM(lit, loc);
24143}
24144
24145static NODE*
24146symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24147{
24148 enum node_type type = nd_type(symbol);
24149 switch (type) {
24150 case NODE_DSTR:
24151 nd_set_type(symbol, NODE_DSYM);
24152 break;
24153 case NODE_STR:
24154 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24155 break;
24156 default:
24157 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24158 }
24159 return list_append(p, symbols, symbol);
24160}
24161
24162static void
24163dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24164{
24165 if (dreg->string) {
24166 reg_fragment_setenc(p, dreg->string, options);
24167 }
24168 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24169 NODE *frag = list->nd_head;
24170 if (nd_type_p(frag, NODE_STR)) {
24171 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24172 }
24173 else if (nd_type_p(frag, NODE_DSTR)) {
24174 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24175 }
24176 }
24177}
24178
24179static NODE *
24180new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24181{
24182 if (!node) {
24183 /* Check string is valid regex */
24184 rb_parser_string_t *str = STRING_NEW0();
24185 reg_compile(p, str, options);
24186 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24187 return node;
24188 }
24189 switch (nd_type(node)) {
24190 case NODE_STR:
24191 {
24192 /* Check string is valid regex */
24193 reg_compile(p, RNODE_STR(node)->string, options);
24194 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24195 }
24196 break;
24197 default:
24198 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24199 /* fall through */
24200 case NODE_DSTR:
24201 nd_set_type(node, NODE_DREGX);
24202 nd_set_loc(node, loc);
24203 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24204 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24205 if (dreg->nd_next) {
24206 dregex_fragment_setenc(p, dreg, options);
24207 }
24208 if (options & RE_OPTION_ONCE) {
24209 node = NEW_ONCE(node, loc);
24210 }
24211 break;
24212 }
24213 return node;
24214}
24215
24216static rb_node_kw_arg_t *
24217new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24218{
24219 if (!k) return 0;
24220 return NEW_KW_ARG((k), loc);
24221}
24222
24223static NODE *
24224new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24225{
24226 if (!node) {
24227 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24228 return xstr;
24229 }
24230 switch (nd_type(node)) {
24231 case NODE_STR:
24232 nd_set_type(node, NODE_XSTR);
24233 nd_set_loc(node, loc);
24234 break;
24235 case NODE_DSTR:
24236 nd_set_type(node, NODE_DXSTR);
24237 nd_set_loc(node, loc);
24238 break;
24239 default:
24240 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24241 break;
24242 }
24243 return node;
24244}
24245
24246static const
24247struct st_hash_type literal_type = {
24248 literal_cmp,
24249 literal_hash,
24250};
24251
24252static int nd_type_st_key_enable_p(NODE *node);
24253
24254static void
24255check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24256{
24257 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24258 if (!arg || !p->case_labels) return;
24259 if (!nd_type_st_key_enable_p(arg)) return;
24260
24261 if (p->case_labels == CHECK_LITERAL_WHEN) {
24262 p->case_labels = st_init_table(&literal_type);
24263 }
24264 else {
24265 st_data_t line;
24266 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24267 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24268 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24269 return;
24270 }
24271 }
24272 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24273}
24274
24275#ifdef RIPPER
24276static int
24277id_is_var(struct parser_params *p, ID id)
24278{
24279 if (is_notop_id(id)) {
24280 switch (id & ID_SCOPE_MASK) {
24281 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24282 return 1;
24283 case ID_LOCAL:
24284 if (dyna_in_block(p)) {
24285 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24286 }
24287 if (local_id(p, id)) return 1;
24288 /* method call without arguments */
24289 return 0;
24290 }
24291 }
24292 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24293 return 0;
24294}
24295#endif
24296
24297static inline enum lex_state_e
24298parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24299{
24300 if (p->debug) {
24301 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24302 }
24303 return p->lex.state = ls;
24304}
24305
24306#ifndef RIPPER
24307static void
24308flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24309{
24310 VALUE mesg = p->debug_buffer;
24311
24312 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24313 p->debug_buffer = Qnil;
24314 rb_io_puts(1, &mesg, out);
24315 }
24316 if (!NIL_P(str) && RSTRING_LEN(str)) {
24317 rb_io_write(p->debug_output, str);
24318 }
24319}
24320
24321static const char rb_parser_lex_state_names[][8] = {
24322 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24323 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24324 "LABEL", "LABELED","FITEM",
24325};
24326
24327static VALUE
24328append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24329{
24330 int i, sep = 0;
24331 unsigned int mask = 1;
24332 static const char none[] = "NONE";
24333
24334 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24335 if ((unsigned)state & mask) {
24336 if (sep) {
24337 rb_str_cat(buf, "|", 1);
24338 }
24339 sep = 1;
24340 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24341 }
24342 }
24343 if (!sep) {
24344 rb_str_cat(buf, none, sizeof(none)-1);
24345 }
24346 return buf;
24347}
24348
24349enum lex_state_e
24350rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24351 enum lex_state_e to, int line)
24352{
24353 VALUE mesg;
24354 mesg = rb_str_new_cstr("lex_state: ");
24355 append_lex_state_name(p, from, mesg);
24356 rb_str_cat_cstr(mesg, " -> ");
24357 append_lex_state_name(p, to, mesg);
24358 rb_str_catf(mesg, " at line %d\n", line);
24359 flush_debug_buffer(p, p->debug_output, mesg);
24360 return to;
24361}
24362
24363VALUE
24364rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24365{
24366 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24367}
24368
24369static void
24370append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24371{
24372 if (stack == 0) {
24373 rb_str_cat_cstr(mesg, "0");
24374 }
24375 else {
24376 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24377 for (; mask && !(stack & mask); mask >>= 1) continue;
24378 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24379 }
24380}
24381
24382void
24383rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24384 const char *name, int line)
24385{
24386 VALUE mesg = rb_sprintf("%s: ", name);
24387 append_bitstack_value(p, stack, mesg);
24388 rb_str_catf(mesg, " at line %d\n", line);
24389 flush_debug_buffer(p, p->debug_output, mesg);
24390}
24391
24392void
24393rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24394{
24395 va_list ap;
24396 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24397
24398 va_start(ap, fmt);
24399 rb_str_vcatf(mesg, fmt, ap);
24400 va_end(ap);
24401 yyerror0(RSTRING_PTR(mesg));
24402 RB_GC_GUARD(mesg);
24403
24404 mesg = rb_str_new(0, 0);
24405 append_lex_state_name(p, p->lex.state, mesg);
24406 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24407 rb_str_resize(mesg, 0);
24408 append_bitstack_value(p, p->cond_stack, mesg);
24409 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24410 rb_str_resize(mesg, 0);
24411 append_bitstack_value(p, p->cmdarg_stack, mesg);
24412 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24413 if (p->debug_output == rb_ractor_stdout())
24414 p->debug_output = rb_ractor_stderr();
24415 p->debug = TRUE;
24416}
24417
24418static YYLTYPE *
24419rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24420{
24421 yylloc->beg_pos.lineno = sourceline;
24422 yylloc->beg_pos.column = beg_pos;
24423 yylloc->end_pos.lineno = sourceline;
24424 yylloc->end_pos.column = end_pos;
24425 return yylloc;
24426}
24427
24428YYLTYPE *
24429rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24430{
24431 int sourceline = here->sourceline;
24432 int beg_pos = (int)here->offset - here->quote
24433 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24434 int end_pos = (int)here->offset + here->length + here->quote;
24435
24436 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24437}
24438
24439YYLTYPE *
24440rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24441{
24442 yylloc->beg_pos.lineno = p->delayed.beg_line;
24443 yylloc->beg_pos.column = p->delayed.beg_col;
24444 yylloc->end_pos.lineno = p->delayed.end_line;
24445 yylloc->end_pos.column = p->delayed.end_col;
24446
24447 return yylloc;
24448}
24449
24450YYLTYPE *
24451rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24452{
24453 int sourceline = p->ruby_sourceline;
24454 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24455 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24456 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24457}
24458
24459YYLTYPE *
24460rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24461{
24462 yylloc->end_pos = yylloc->beg_pos;
24463
24464 return yylloc;
24465}
24466
24467YYLTYPE *
24468rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24469{
24470 int sourceline = p->ruby_sourceline;
24471 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24472 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24473 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24474}
24475
24476YYLTYPE *
24477rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24478{
24479 int sourceline = p->ruby_sourceline;
24480 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24481 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24482 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24483}
24484#endif /* !RIPPER */
24485
24486static int
24487assignable0(struct parser_params *p, ID id, const char **err)
24488{
24489 if (!id) return -1;
24490 switch (id) {
24491 case keyword_self:
24492 *err = "Can't change the value of self";
24493 return -1;
24494 case keyword_nil:
24495 *err = "Can't assign to nil";
24496 return -1;
24497 case keyword_true:
24498 *err = "Can't assign to true";
24499 return -1;
24500 case keyword_false:
24501 *err = "Can't assign to false";
24502 return -1;
24503 case keyword__FILE__:
24504 *err = "Can't assign to __FILE__";
24505 return -1;
24506 case keyword__LINE__:
24507 *err = "Can't assign to __LINE__";
24508 return -1;
24509 case keyword__ENCODING__:
24510 *err = "Can't assign to __ENCODING__";
24511 return -1;
24512 }
24513 switch (id_type(id)) {
24514 case ID_LOCAL:
24515 if (dyna_in_block(p)) {
24516 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24517 compile_error(p, "Can't assign to numbered parameter _%d",
24518 NUMPARAM_ID_TO_IDX(id));
24519 return -1;
24520 }
24521 if (dvar_curr(p, id)) return NODE_DASGN;
24522 if (dvar_defined(p, id)) return NODE_DASGN;
24523 if (local_id(p, id)) return NODE_LASGN;
24524 dyna_var(p, id);
24525 return NODE_DASGN;
24526 }
24527 else {
24528 if (!local_id(p, id)) local_var(p, id);
24529 return NODE_LASGN;
24530 }
24531 break;
24532 case ID_GLOBAL: return NODE_GASGN;
24533 case ID_INSTANCE: return NODE_IASGN;
24534 case ID_CONST:
24535 if (!p->ctxt.in_def) return NODE_CDECL;
24536 *err = "dynamic constant assignment";
24537 return -1;
24538 case ID_CLASS: return NODE_CVASGN;
24539 default:
24540 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24541 }
24542 return -1;
24543}
24544
24545static NODE*
24546assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24547{
24548 const char *err = 0;
24549 int node_type = assignable0(p, id, &err);
24550 switch (node_type) {
24551 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24552 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24553 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24554 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24555 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24556 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24557 }
24558/* TODO: FIXME */
24559#ifndef RIPPER
24560 if (err) yyerror1(loc, err);
24561#else
24562 if (err) set_value(assign_error(p, err, p->s_lvalue));
24563#endif
24564 return NEW_ERROR(loc);
24565}
24566
24567static int
24568is_private_local_id(struct parser_params *p, ID name)
24569{
24570 VALUE s;
24571 if (name == idUScore) return 1;
24572 if (!is_local_id(name)) return 0;
24573 s = rb_id2str(name);
24574 if (!s) return 0;
24575 return RSTRING_PTR(s)[0] == '_';
24576}
24577
24578static int
24579shadowing_lvar_0(struct parser_params *p, ID name)
24580{
24581 if (dyna_in_block(p)) {
24582 if (dvar_curr(p, name)) {
24583 if (is_private_local_id(p, name)) return 1;
24584 yyerror0("duplicated argument name");
24585 }
24586 else if (dvar_defined(p, name) || local_id(p, name)) {
24587 vtable_add(p->lvtbl->vars, name);
24588 if (p->lvtbl->used) {
24589 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24590 }
24591 return 0;
24592 }
24593 }
24594 else {
24595 if (local_id(p, name)) {
24596 if (is_private_local_id(p, name)) return 1;
24597 yyerror0("duplicated argument name");
24598 }
24599 }
24600 return 1;
24601}
24602
24603static ID
24604shadowing_lvar(struct parser_params *p, ID name)
24605{
24606 shadowing_lvar_0(p, name);
24607 return name;
24608}
24609
24610static void
24611new_bv(struct parser_params *p, ID name)
24612{
24613 if (!name) return;
24614 if (!is_local_id(name)) {
24615 compile_error(p, "invalid local variable - %"PRIsVALUE,
24616 rb_id2str(name));
24617 return;
24618 }
24619 if (!shadowing_lvar_0(p, name)) return;
24620 dyna_var(p, name);
24621 ID *vidp = 0;
24622 if (dvar_defined_ref(p, name, &vidp)) {
24623 if (vidp) *vidp |= LVAR_USED;
24624 }
24625}
24626
24627static void
24628aryset_check(struct parser_params *p, NODE *args)
24629{
24630 NODE *block = 0, *kwds = 0;
24631 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
24632 block = RNODE_BLOCK_PASS(args)->nd_body;
24633 args = RNODE_BLOCK_PASS(args)->nd_head;
24634 }
24635 if (args && nd_type_p(args, NODE_ARGSCAT)) {
24636 args = RNODE_ARGSCAT(args)->nd_body;
24637 }
24638 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
24639 kwds = RNODE_ARGSPUSH(args)->nd_body;
24640 }
24641 else {
24642 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
24643 next = RNODE_LIST(next)->nd_next) {
24644 kwds = RNODE_LIST(next)->nd_head;
24645 }
24646 }
24647 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
24648 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
24649 }
24650 if (block) {
24651 yyerror1(&block->nd_loc, "block arg given in index assignment");
24652 }
24653}
24654
24655static NODE *
24656aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
24657{
24658 aryset_check(p, idx);
24659 return NEW_ATTRASGN(recv, tASET, idx, loc);
24660}
24661
24662static void
24663block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
24664{
24665 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
24666 compile_error(p, "both block arg and actual block given");
24667 }
24668}
24669
24670static NODE *
24671attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
24672{
24673 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
24674 return NEW_ATTRASGN(recv, id, 0, loc);
24675}
24676
24677static VALUE
24678rb_backref_error(struct parser_params *p, NODE *node)
24679{
24680#ifndef RIPPER
24681# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
24682#else
24683# define ERR(...) rb_sprintf(__VA_ARGS__)
24684#endif
24685 switch (nd_type(node)) {
24686 case NODE_NTH_REF:
24687 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
24688 case NODE_BACK_REF:
24689 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
24690 }
24691#undef ERR
24692 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
24693}
24694
24695static NODE *
24696arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24697{
24698 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
24699 switch (nd_type(node1)) {
24700 case NODE_LIST:
24701 return list_append(p, node1, node2);
24702 case NODE_BLOCK_PASS:
24703 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24704 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
24705 return node1;
24706 case NODE_ARGSPUSH:
24707 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
24708 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
24709 nd_set_type(node1, NODE_ARGSCAT);
24710 return node1;
24711 case NODE_ARGSCAT:
24712 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24713 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
24714 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
24715 return node1;
24716 }
24717 return NEW_ARGSPUSH(node1, node2, loc);
24718}
24719
24720static NODE *
24721arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24722{
24723 if (!node2) return node1;
24724 switch (nd_type(node1)) {
24725 case NODE_BLOCK_PASS:
24726 if (RNODE_BLOCK_PASS(node1)->nd_head)
24727 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24728 else
24729 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
24730 return node1;
24731 case NODE_ARGSPUSH:
24732 if (!nd_type_p(node2, NODE_LIST)) break;
24733 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
24734 nd_set_type(node1, NODE_ARGSCAT);
24735 return node1;
24736 case NODE_ARGSCAT:
24737 if (!nd_type_p(node2, NODE_LIST) ||
24738 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24739 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
24740 return node1;
24741 }
24742 return NEW_ARGSCAT(node1, node2, loc);
24743}
24744
24745static NODE *
24746last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
24747{
24748 NODE *n1;
24749 if ((n1 = splat_array(args)) != 0) {
24750 return list_append(p, n1, last_arg);
24751 }
24752 return arg_append(p, args, last_arg, loc);
24753}
24754
24755static NODE *
24756rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
24757{
24758 NODE *n1;
24759 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
24760 return list_concat(n1, rest_arg);
24761 }
24762 return arg_concat(p, args, rest_arg, loc);
24763}
24764
24765static NODE *
24766splat_array(NODE* node)
24767{
24768 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
24769 if (nd_type_p(node, NODE_LIST)) return node;
24770 return 0;
24771}
24772
24773static void
24774mark_lvar_used(struct parser_params *p, NODE *rhs)
24775{
24776 ID *vidp = NULL;
24777 if (!rhs) return;
24778 switch (nd_type(rhs)) {
24779 case NODE_LASGN:
24780 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
24781 if (vidp) *vidp |= LVAR_USED;
24782 }
24783 break;
24784 case NODE_DASGN:
24785 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
24786 if (vidp) *vidp |= LVAR_USED;
24787 }
24788 break;
24789#if 0
24790 case NODE_MASGN:
24791 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
24792 mark_lvar_used(p, rhs->nd_head);
24793 }
24794 break;
24795#endif
24796 }
24797}
24798
24799static int is_static_content(NODE *node);
24800
24801static NODE *
24802node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
24803{
24804 if (!lhs) return 0;
24805
24806 switch (nd_type(lhs)) {
24807 case NODE_CDECL:
24808 case NODE_GASGN:
24809 case NODE_IASGN:
24810 case NODE_LASGN:
24811 case NODE_DASGN:
24812 case NODE_MASGN:
24813 case NODE_CVASGN:
24814 set_nd_value(p, lhs, rhs);
24815 nd_set_loc(lhs, loc);
24816 break;
24817
24818 case NODE_ATTRASGN:
24819 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
24820 nd_set_loc(lhs, loc);
24821 break;
24822
24823 default:
24824 /* should not happen */
24825 break;
24826 }
24827
24828 return lhs;
24829}
24830
24831static NODE *
24832value_expr_check(struct parser_params *p, NODE *node)
24833{
24834 NODE *void_node = 0, *vn;
24835
24836 if (!node) {
24837 rb_warning0("empty expression");
24838 }
24839 while (node) {
24840 switch (nd_type(node)) {
24841 case NODE_ENSURE:
24842 vn = RNODE_ENSURE(node)->nd_head;
24843 node = RNODE_ENSURE(node)->nd_ensr;
24844 /* nd_ensr should not be NULL, check it out next */
24845 if (vn && (vn = value_expr_check(p, vn))) {
24846 goto found;
24847 }
24848 break;
24849
24850 case NODE_RESCUE:
24851 /* void only if all children are void */
24852 vn = RNODE_RESCUE(node)->nd_head;
24853 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
24854 if (!void_node) void_node = vn;
24855 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
24856 if (!nd_type_p(r, NODE_RESBODY)) {
24857 compile_error(p, "unexpected node");
24858 return NULL;
24859 }
24860 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
24861 void_node = 0;
24862 break;
24863 }
24864 if (!void_node) void_node = vn;
24865 }
24866 node = RNODE_RESCUE(node)->nd_else;
24867 if (!node) return void_node;
24868 break;
24869
24870 case NODE_RETURN:
24871 case NODE_BREAK:
24872 case NODE_NEXT:
24873 case NODE_REDO:
24874 case NODE_RETRY:
24875 goto found;
24876
24877 case NODE_CASE3:
24878 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
24879 compile_error(p, "unexpected node");
24880 return NULL;
24881 }
24882 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
24883 return NULL;
24884 }
24885 /* single line pattern matching with "=>" operator */
24886 goto found;
24887
24888 case NODE_BLOCK:
24889 while (RNODE_BLOCK(node)->nd_next) {
24890 node = RNODE_BLOCK(node)->nd_next;
24891 }
24892 node = RNODE_BLOCK(node)->nd_head;
24893 break;
24894
24895 case NODE_BEGIN:
24896 node = RNODE_BEGIN(node)->nd_body;
24897 break;
24898
24899 case NODE_IF:
24900 case NODE_UNLESS:
24901 if (!RNODE_IF(node)->nd_body) {
24902 return NULL;
24903 }
24904 else if (!RNODE_IF(node)->nd_else) {
24905 return NULL;
24906 }
24907 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
24908 if (!vn) return NULL;
24909 if (!void_node) void_node = vn;
24910 node = RNODE_IF(node)->nd_else;
24911 break;
24912
24913 case NODE_AND:
24914 case NODE_OR:
24915 node = RNODE_AND(node)->nd_1st;
24916 break;
24917
24918 case NODE_LASGN:
24919 case NODE_DASGN:
24920 case NODE_MASGN:
24921 mark_lvar_used(p, node);
24922 return NULL;
24923
24924 default:
24925 return NULL;
24926 }
24927 }
24928
24929 return NULL;
24930
24931 found:
24932 /* return the first found node */
24933 return void_node ? void_node : node;
24934}
24935
24936static int
24937value_expr_gen(struct parser_params *p, NODE *node)
24938{
24939 NODE *void_node = value_expr_check(p, node);
24940 if (void_node) {
24941 yyerror1(&void_node->nd_loc, "void value expression");
24942 /* or "control never reach"? */
24943 return FALSE;
24944 }
24945 return TRUE;
24946}
24947
24948static void
24949void_expr(struct parser_params *p, NODE *node)
24950{
24951 const char *useless = 0;
24952
24953 if (!RTEST(ruby_verbose)) return;
24954
24955 if (!node || !(node = nd_once_body(node))) return;
24956 switch (nd_type(node)) {
24957 case NODE_OPCALL:
24958 switch (RNODE_OPCALL(node)->nd_mid) {
24959 case '+':
24960 case '-':
24961 case '*':
24962 case '/':
24963 case '%':
24964 case tPOW:
24965 case tUPLUS:
24966 case tUMINUS:
24967 case '|':
24968 case '^':
24969 case '&':
24970 case tCMP:
24971 case '>':
24972 case tGEQ:
24973 case '<':
24974 case tLEQ:
24975 case tEQ:
24976 case tNEQ:
24977 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
24978 break;
24979 }
24980 break;
24981
24982 case NODE_LVAR:
24983 case NODE_DVAR:
24984 case NODE_GVAR:
24985 case NODE_IVAR:
24986 case NODE_CVAR:
24987 case NODE_NTH_REF:
24988 case NODE_BACK_REF:
24989 useless = "a variable";
24990 break;
24991 case NODE_CONST:
24992 useless = "a constant";
24993 break;
24994 case NODE_SYM:
24995 case NODE_LINE:
24996 case NODE_FILE:
24997 case NODE_ENCODING:
24998 case NODE_INTEGER:
24999 case NODE_FLOAT:
25000 case NODE_RATIONAL:
25001 case NODE_IMAGINARY:
25002 case NODE_STR:
25003 case NODE_DSTR:
25004 case NODE_REGX:
25005 case NODE_DREGX:
25006 useless = "a literal";
25007 break;
25008 case NODE_COLON2:
25009 case NODE_COLON3:
25010 useless = "::";
25011 break;
25012 case NODE_DOT2:
25013 useless = "..";
25014 break;
25015 case NODE_DOT3:
25016 useless = "...";
25017 break;
25018 case NODE_SELF:
25019 useless = "self";
25020 break;
25021 case NODE_NIL:
25022 useless = "nil";
25023 break;
25024 case NODE_TRUE:
25025 useless = "true";
25026 break;
25027 case NODE_FALSE:
25028 useless = "false";
25029 break;
25030 case NODE_DEFINED:
25031 useless = "defined?";
25032 break;
25033 }
25034
25035 if (useless) {
25036 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25037 }
25038}
25039
25040/* warns useless use of block and returns the last statement node */
25041static NODE *
25042void_stmts(struct parser_params *p, NODE *node)
25043{
25044 NODE *const n = node;
25045 if (!RTEST(ruby_verbose)) return n;
25046 if (!node) return n;
25047 if (!nd_type_p(node, NODE_BLOCK)) return n;
25048
25049 while (RNODE_BLOCK(node)->nd_next) {
25050 void_expr(p, RNODE_BLOCK(node)->nd_head);
25051 node = RNODE_BLOCK(node)->nd_next;
25052 }
25053 return RNODE_BLOCK(node)->nd_head;
25054}
25055
25056static NODE *
25057remove_begin(NODE *node)
25058{
25059 NODE **n = &node, *n1 = node;
25060 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25061 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25062 }
25063 return node;
25064}
25065
25066static void
25067reduce_nodes(struct parser_params *p, NODE **body)
25068{
25069 NODE *node = *body;
25070
25071 if (!node) {
25072 *body = NEW_NIL(&NULL_LOC);
25073 return;
25074 }
25075#define subnodes(type, n1, n2) \
25076 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25077 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25078 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25079
25080 while (node) {
25081 int newline = (int)nd_fl_newline(node);
25082 switch (nd_type(node)) {
25083 end:
25084 case NODE_NIL:
25085 *body = 0;
25086 return;
25087 case NODE_BEGIN:
25088 *body = node = RNODE_BEGIN(node)->nd_body;
25089 if (newline && node) nd_set_fl_newline(node);
25090 continue;
25091 case NODE_BLOCK:
25092 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25093 break;
25094 case NODE_IF:
25095 case NODE_UNLESS:
25096 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25097 return;
25098 case NODE_CASE:
25099 body = &RNODE_CASE(node)->nd_body;
25100 break;
25101 case NODE_WHEN:
25102 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25103 break;
25104 case NODE_ENSURE:
25105 body = &RNODE_ENSURE(node)->nd_head;
25106 break;
25107 case NODE_RESCUE:
25108 newline = 0; // RESBODY should not be a NEWLINE
25109 if (RNODE_RESCUE(node)->nd_else) {
25110 body = &RNODE_RESCUE(node)->nd_resq;
25111 break;
25112 }
25113 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25114 break;
25115 default:
25116 return;
25117 }
25118 node = *body;
25119 if (newline && node) nd_set_fl_newline(node);
25120 }
25121
25122#undef subnodes
25123}
25124
25125static int
25126is_static_content(NODE *node)
25127{
25128 if (!node) return 1;
25129 switch (nd_type(node)) {
25130 case NODE_HASH:
25131 if (!(node = RNODE_HASH(node)->nd_head)) break;
25132 case NODE_LIST:
25133 do {
25134 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25135 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25136 case NODE_SYM:
25137 case NODE_REGX:
25138 case NODE_LINE:
25139 case NODE_FILE:
25140 case NODE_ENCODING:
25141 case NODE_INTEGER:
25142 case NODE_FLOAT:
25143 case NODE_RATIONAL:
25144 case NODE_IMAGINARY:
25145 case NODE_STR:
25146 case NODE_NIL:
25147 case NODE_TRUE:
25148 case NODE_FALSE:
25149 case NODE_ZLIST:
25150 break;
25151 default:
25152 return 0;
25153 }
25154 return 1;
25155}
25156
25157static int
25158assign_in_cond(struct parser_params *p, NODE *node)
25159{
25160 switch (nd_type(node)) {
25161 case NODE_MASGN:
25162 case NODE_LASGN:
25163 case NODE_DASGN:
25164 case NODE_GASGN:
25165 case NODE_IASGN:
25166 case NODE_CVASGN:
25167 case NODE_CDECL:
25168 break;
25169
25170 default:
25171 return 0;
25172 }
25173
25174 if (!get_nd_value(p, node)) return 1;
25175 if (is_static_content(get_nd_value(p, node))) {
25176 /* reports always */
25177 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25178 }
25179 return 1;
25180}
25181
25182enum cond_type {
25183 COND_IN_OP,
25184 COND_IN_COND,
25185 COND_IN_FF
25186};
25187
25188#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25189 switch (t) { \
25190 case COND_IN_OP: break; \
25191 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25192 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25193 } \
25194} while (0)
25195
25196static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25197
25198static NODE*
25199range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25200{
25201 enum node_type type;
25202
25203 if (node == 0) return 0;
25204
25205 type = nd_type(node);
25206 value_expr(node);
25207 if (type == NODE_INTEGER) {
25208 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25209 ID lineno = rb_intern("$.");
25210 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25211 }
25212 return cond0(p, node, COND_IN_FF, loc, true);
25213}
25214
25215static NODE*
25216cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25217{
25218 if (node == 0) return 0;
25219 if (!(node = nd_once_body(node))) return 0;
25220 assign_in_cond(p, node);
25221
25222 switch (nd_type(node)) {
25223 case NODE_BEGIN:
25224 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25225 break;
25226
25227 case NODE_DSTR:
25228 case NODE_EVSTR:
25229 case NODE_STR:
25230 case NODE_FILE:
25231 SWITCH_BY_COND_TYPE(type, warn, "string ");
25232 break;
25233
25234 case NODE_REGX:
25235 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25236 nd_set_type(node, NODE_MATCH);
25237 break;
25238
25239 case NODE_DREGX:
25240 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25241
25242 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25243
25244 case NODE_BLOCK:
25245 {
25246 NODE *end = RNODE_BLOCK(node)->nd_end;
25247 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25248 if (top) top = node == end;
25249 *expr = cond0(p, *expr, type, loc, top);
25250 }
25251 break;
25252
25253 case NODE_AND:
25254 case NODE_OR:
25255 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25256 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25257 break;
25258
25259 case NODE_DOT2:
25260 case NODE_DOT3:
25261 if (!top) break;
25262 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25263 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25264 switch (nd_type(node)) {
25265 case NODE_DOT2:
25266 nd_set_type(node,NODE_FLIP2);
25267 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25268 (void)flip2;
25269 break;
25270 case NODE_DOT3:
25271 nd_set_type(node, NODE_FLIP3);
25272 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25273 (void)flip3;
25274 break;
25275 }
25276 break;
25277
25278 case NODE_SYM:
25279 case NODE_DSYM:
25280 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25281 break;
25282
25283 case NODE_LINE:
25284 SWITCH_BY_COND_TYPE(type, warning, "");
25285 break;
25286
25287 case NODE_ENCODING:
25288 SWITCH_BY_COND_TYPE(type, warning, "");
25289 break;
25290
25291 case NODE_INTEGER:
25292 case NODE_FLOAT:
25293 case NODE_RATIONAL:
25294 case NODE_IMAGINARY:
25295 SWITCH_BY_COND_TYPE(type, warning, "");
25296 break;
25297
25298 default:
25299 break;
25300 }
25301 return node;
25302}
25303
25304static NODE*
25305cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25306{
25307 if (node == 0) return 0;
25308 return cond0(p, node, COND_IN_COND, loc, true);
25309}
25310
25311static NODE*
25312method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25313{
25314 if (node == 0) return 0;
25315 return cond0(p, node, COND_IN_OP, loc, true);
25316}
25317
25318static NODE*
25319new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25320{
25321 YYLTYPE loc = {*pos, *pos};
25322 return NEW_NIL(&loc);
25323}
25324
25325static NODE*
25326new_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)
25327{
25328 if (!cc) return right;
25329 cc = cond0(p, cc, COND_IN_COND, loc, true);
25330 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25331}
25332
25333static NODE*
25334new_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)
25335{
25336 if (!cc) return right;
25337 cc = cond0(p, cc, COND_IN_COND, loc, true);
25338 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25339}
25340
25341#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))
25342
25343static NODE*
25344logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25345 const YYLTYPE *op_loc, const YYLTYPE *loc)
25346{
25347 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25348 NODE *op;
25349 value_expr(left);
25350 if (left && nd_type_p(left, type)) {
25351 NODE *node = left, *second;
25352 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25353 node = second;
25354 }
25355 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25356 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25357 left->nd_loc.end_pos = loc->end_pos;
25358 return left;
25359 }
25360 op = NEW_AND_OR(type, left, right, loc, op_loc);
25361 nd_set_line(op, op_loc->beg_pos.lineno);
25362 return op;
25363}
25364
25365#undef NEW_AND_OR
25366
25367static void
25368no_blockarg(struct parser_params *p, NODE *node)
25369{
25370 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25371 compile_error(p, "block argument should not be given");
25372 }
25373}
25374
25375static NODE *
25376ret_args(struct parser_params *p, NODE *node)
25377{
25378 if (node) {
25379 no_blockarg(p, node);
25380 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25381 node = RNODE_LIST(node)->nd_head;
25382 }
25383 }
25384 return node;
25385}
25386
25387static NODE *
25388new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
25389{
25390 if (node) no_blockarg(p, node);
25391
25392 return NEW_YIELD(node, loc, keyword_loc, lparen_loc, rparen_loc);
25393}
25394
25395static NODE*
25396negate_lit(struct parser_params *p, NODE* node)
25397{
25398 switch (nd_type(node)) {
25399 case NODE_INTEGER:
25400 RNODE_INTEGER(node)->minus = TRUE;
25401 break;
25402 case NODE_FLOAT:
25403 RNODE_FLOAT(node)->minus = TRUE;
25404 break;
25405 case NODE_RATIONAL:
25406 RNODE_RATIONAL(node)->minus = TRUE;
25407 break;
25408 case NODE_IMAGINARY:
25409 RNODE_IMAGINARY(node)->minus = TRUE;
25410 break;
25411 }
25412 return node;
25413}
25414
25415static NODE *
25416arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25417{
25418 if (node2) {
25419 if (!node1) return (NODE *)node2;
25420 node2->nd_head = node1;
25421 nd_set_first_lineno(node2, nd_first_lineno(node1));
25422 nd_set_first_column(node2, nd_first_column(node1));
25423 return (NODE *)node2;
25424 }
25425 return node1;
25426}
25427
25428static bool
25429args_info_empty_p(struct rb_args_info *args)
25430{
25431 if (args->pre_args_num) return false;
25432 if (args->post_args_num) return false;
25433 if (args->rest_arg) return false;
25434 if (args->opt_args) return false;
25435 if (args->block_arg) return false;
25436 if (args->kw_args) return false;
25437 if (args->kw_rest_arg) return false;
25438 return true;
25439}
25440
25441static rb_node_args_t *
25442new_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)
25443{
25444 struct rb_args_info *args = &tail->nd_ainfo;
25445
25446 if (args->forwarding) {
25447 if (rest_arg) {
25448 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25449 return tail;
25450 }
25451 rest_arg = idFWD_REST;
25452 }
25453
25454 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25455 args->pre_init = pre_args ? pre_args->nd_next : 0;
25456
25457 args->post_args_num = post_args ? post_args->nd_plen : 0;
25458 args->post_init = post_args ? post_args->nd_next : 0;
25459 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25460
25461 args->rest_arg = rest_arg;
25462
25463 args->opt_args = opt_args;
25464
25465#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25466 args->ruby2_keywords = args->forwarding;
25467#else
25468 args->ruby2_keywords = 0;
25469#endif
25470
25471 nd_set_loc(RNODE(tail), loc);
25472
25473 return tail;
25474}
25475
25476static rb_node_args_t *
25477new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25478{
25479 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25480 struct rb_args_info *args = &node->nd_ainfo;
25481 if (p->error_p) return node;
25482
25483 args->block_arg = block;
25484 args->kw_args = kw_args;
25485
25486 if (kw_args) {
25487 /*
25488 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25489 * variable order: k1, kr1, k2, &b, internal_id, krest
25490 * #=> <reorder>
25491 * variable order: kr1, k1, k2, internal_id, krest, &b
25492 */
25493 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25494 struct vtable *vtargs = p->lvtbl->args;
25495 rb_node_kw_arg_t *kwn = kw_args;
25496
25497 if (block) block = vtargs->tbl[vtargs->pos-1];
25498 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25499 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25500 while (kwn) {
25501 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25502 --kw_vars;
25503 --required_kw_vars;
25504 kwn = kwn->nd_next;
25505 }
25506
25507 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25508 ID vid = get_nd_vid(p, kwn->nd_body);
25509 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25510 *required_kw_vars++ = vid;
25511 }
25512 else {
25513 *kw_vars++ = vid;
25514 }
25515 }
25516
25517 arg_var(p, kw_bits);
25518 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25519 if (block) arg_var(p, block);
25520
25521 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25522 }
25523 else if (kw_rest_arg == idNil) {
25524 args->no_kwarg = 1;
25525 }
25526 else if (kw_rest_arg) {
25527 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25528 }
25529
25530 return node;
25531}
25532
25533static rb_node_args_t *
25534args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25535{
25536 if (max_numparam > NO_PARAM || it_id) {
25537 if (!args) {
25538 YYLTYPE loc = RUBY_INIT_YYLLOC();
25539 args = new_args_tail(p, 0, 0, 0, 0);
25540 nd_set_loc(RNODE(args), &loc);
25541 }
25542 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25543 }
25544 return args;
25545}
25546
25547static NODE*
25548new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25549{
25550 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25551
25552 if (pre_arg) {
25553 NODE *pre_args = NEW_LIST(pre_arg, loc);
25554 if (RNODE_ARYPTN(aryptn)->pre_args) {
25555 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25556 }
25557 else {
25558 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25559 }
25560 }
25561 return aryptn;
25562}
25563
25564static NODE*
25565new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25566{
25567 if (has_rest) {
25568 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25569 }
25570 else {
25571 rest_arg = NULL;
25572 }
25573 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25574
25575 return node;
25576}
25577
25578static NODE*
25579new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25580{
25581 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25582
25583 return fndptn;
25584}
25585
25586static NODE*
25587new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25588{
25589 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25590 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25591 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25592
25593 return node;
25594}
25595
25596static NODE*
25597new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25598{
25599 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25600 return hshptn;
25601}
25602
25603static NODE*
25604new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25605{
25606 NODE *node, *kw_rest_arg_node;
25607
25608 if (kw_rest_arg == idNil) {
25609 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25610 }
25611 else if (kw_rest_arg) {
25612 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25613 }
25614 else {
25615 kw_rest_arg_node = NULL;
25616 }
25617
25618 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25619
25620 return node;
25621}
25622
25623static NODE*
25624dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25625{
25626 if (!node) {
25627 return NEW_SYM(STR_NEW0(), loc);
25628 }
25629
25630 switch (nd_type(node)) {
25631 case NODE_DSTR:
25632 nd_set_type(node, NODE_DSYM);
25633 nd_set_loc(node, loc);
25634 break;
25635 case NODE_STR:
25636 node = str_to_sym_node(p, node, loc);
25637 break;
25638 default:
25639 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
25640 break;
25641 }
25642 return node;
25643}
25644
25645static int
25646nd_type_st_key_enable_p(NODE *node)
25647{
25648 switch (nd_type(node)) {
25649 case NODE_INTEGER:
25650 case NODE_FLOAT:
25651 case NODE_RATIONAL:
25652 case NODE_IMAGINARY:
25653 case NODE_STR:
25654 case NODE_SYM:
25655 case NODE_REGX:
25656 case NODE_LINE:
25657 case NODE_FILE:
25658 case NODE_ENCODING:
25659 return true;
25660 default:
25661 return false;
25662 }
25663}
25664
25665static VALUE
25666nd_value(struct parser_params *p, NODE *node)
25667{
25668 switch (nd_type(node)) {
25669 case NODE_STR:
25670 return rb_node_str_string_val(node);
25671 case NODE_INTEGER:
25672 return rb_node_integer_literal_val(node);
25673 case NODE_FLOAT:
25674 return rb_node_float_literal_val(node);
25675 case NODE_RATIONAL:
25676 return rb_node_rational_literal_val(node);
25677 case NODE_IMAGINARY:
25678 return rb_node_imaginary_literal_val(node);
25679 case NODE_SYM:
25680 return rb_node_sym_string_val(node);
25681 case NODE_REGX:
25682 return rb_node_regx_string_val(node);
25683 case NODE_LINE:
25684 return rb_node_line_lineno_val(node);
25685 case NODE_ENCODING:
25686 return rb_node_encoding_val(node);
25687 case NODE_FILE:
25688 return rb_node_file_path_val(node);
25689 default:
25690 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
25692 }
25693}
25694
25695static void
25696warn_duplicate_keys(struct parser_params *p, NODE *hash)
25697{
25698 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25699 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
25700 while (hash && RNODE_LIST(hash)->nd_next) {
25701 NODE *head = RNODE_LIST(hash)->nd_head;
25702 NODE *value = RNODE_LIST(hash)->nd_next;
25703 NODE *next = RNODE_LIST(value)->nd_next;
25704 st_data_t key;
25705 st_data_t data;
25706
25707 /* keyword splat, e.g. {k: 1, **z, k: 2} */
25708 if (!head) {
25709 head = value;
25710 }
25711
25712 if (nd_type_st_key_enable_p(head)) {
25713 key = (st_data_t)head;
25714
25715 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
25716 rb_warn2L(nd_line((NODE *)data),
25717 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
25718 nd_value(p, head), WARN_I(nd_line(head)));
25719 }
25720 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
25721 }
25722 hash = next;
25723 }
25724 st_free_table(p->warn_duplicate_keys_table);
25725 p->warn_duplicate_keys_table = NULL;
25726}
25727
25728static NODE *
25729new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25730{
25731 if (hash) warn_duplicate_keys(p, hash);
25732 return NEW_HASH(hash, loc);
25733}
25734
25735static void
25736error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
25737{
25738 if (is_private_local_id(p, id)) {
25739 return;
25740 }
25741 if (st_is_member(p->pvtbl, id)) {
25742 yyerror1(loc, "duplicated variable name");
25743 }
25744 else {
25745 st_insert(p->pvtbl, (st_data_t)id, 0);
25746 }
25747}
25748
25749static void
25750error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
25751{
25752 if (!p->pktbl) {
25753 p->pktbl = st_init_numtable();
25754 }
25755 else if (st_is_member(p->pktbl, key)) {
25756 yyerror1(loc, "duplicated key name");
25757 return;
25758 }
25759 st_insert(p->pktbl, (st_data_t)key, 0);
25760}
25761
25762static NODE *
25763new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25764{
25765 return NEW_HASH(hash, loc);
25766}
25767
25768static NODE *
25769new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25770{
25771 NODE *asgn;
25772
25773 if (lhs) {
25774 ID vid = get_nd_vid(p, lhs);
25775 YYLTYPE lhs_loc = lhs->nd_loc;
25776 if (op == tOROP) {
25777 set_nd_value(p, lhs, rhs);
25778 nd_set_loc(lhs, loc);
25779 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
25780 }
25781 else if (op == tANDOP) {
25782 set_nd_value(p, lhs, rhs);
25783 nd_set_loc(lhs, loc);
25784 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
25785 }
25786 else {
25787 asgn = lhs;
25788 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
25789 set_nd_value(p, asgn, rhs);
25790 nd_set_loc(asgn, loc);
25791 }
25792 }
25793 else {
25794 asgn = NEW_ERROR(loc);
25795 }
25796 return asgn;
25797}
25798
25799static NODE *
25800new_ary_op_assign(struct parser_params *p, NODE *ary,
25801 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
25802 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
25803{
25804 NODE *asgn;
25805
25806 aryset_check(p, args);
25807 args = make_list(args, args_loc);
25808 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
25809 fixpos(asgn, ary);
25810 return asgn;
25811}
25812
25813static NODE *
25814new_attr_op_assign(struct parser_params *p, NODE *lhs,
25815 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
25816 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
25817{
25818 NODE *asgn;
25819
25820 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
25821 fixpos(asgn, lhs);
25822 return asgn;
25823}
25824
25825static NODE *
25826new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25827{
25828 NODE *asgn;
25829
25830 if (lhs) {
25831 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
25832 }
25833 else {
25834 asgn = NEW_ERROR(loc);
25835 }
25836 fixpos(asgn, lhs);
25837 return asgn;
25838}
25839
25840static NODE *
25841const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
25842{
25843 if (p->ctxt.in_def) {
25844#ifndef RIPPER
25845 yyerror1(loc, "dynamic constant assignment");
25846#else
25847 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
25848#endif
25849 }
25850 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
25851}
25852
25853#ifdef RIPPER
25854static VALUE
25855assign_error(struct parser_params *p, const char *mesg, VALUE a)
25856{
25857 a = dispatch2(assign_error, ERR_MESG(), a);
25858 ripper_error(p);
25859 return a;
25860}
25861#endif
25862
25863static NODE *
25864new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
25865{
25866 NODE *result = head;
25867 if (rescue) {
25868 NODE *tmp = rescue_else ? rescue_else : rescue;
25869 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
25870
25871 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
25872 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
25873 }
25874 if (ensure) {
25875 result = NEW_ENSURE(result, ensure, loc);
25876 }
25877 fixpos(result, head);
25878 return result;
25879}
25880
25881static void
25882warn_unused_var(struct parser_params *p, struct local_vars *local)
25883{
25884 int cnt;
25885
25886 if (!local->used) return;
25887 cnt = local->used->pos;
25888 if (cnt != local->vars->pos) {
25889 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
25890 }
25891#ifndef RIPPER
25892 ID *v = local->vars->tbl;
25893 ID *u = local->used->tbl;
25894 for (int i = 0; i < cnt; ++i) {
25895 if (!v[i] || (u[i] & LVAR_USED)) continue;
25896 if (is_private_local_id(p, v[i])) continue;
25897 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
25898 }
25899#endif
25900}
25901
25902static void
25903local_push(struct parser_params *p, int toplevel_scope)
25904{
25905 struct local_vars *local;
25906 int inherits_dvars = toplevel_scope && compile_for_eval;
25907 int warn_unused_vars = RTEST(ruby_verbose);
25908
25909 local = ALLOC(struct local_vars);
25910 local->prev = p->lvtbl;
25911 local->args = vtable_alloc(0);
25912 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
25913#ifndef RIPPER
25914 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
25915 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
25916#endif
25917 local->numparam.outer = 0;
25918 local->numparam.inner = 0;
25919 local->numparam.current = 0;
25920 local->it = 0;
25921 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
25922
25923# if WARN_PAST_SCOPE
25924 local->past = 0;
25925# endif
25926 CMDARG_PUSH(0);
25927 COND_PUSH(0);
25928 p->lvtbl = local;
25929}
25930
25931static void
25932vtable_chain_free(struct parser_params *p, struct vtable *table)
25933{
25934 while (!DVARS_TERMINAL_P(table)) {
25935 struct vtable *cur_table = table;
25936 table = cur_table->prev;
25937 vtable_free(cur_table);
25938 }
25939}
25940
25941static void
25942local_free(struct parser_params *p, struct local_vars *local)
25943{
25944 vtable_chain_free(p, local->used);
25945
25946# if WARN_PAST_SCOPE
25947 vtable_chain_free(p, local->past);
25948# endif
25949
25950 vtable_chain_free(p, local->args);
25951 vtable_chain_free(p, local->vars);
25952
25953 ruby_sized_xfree(local, sizeof(struct local_vars));
25954}
25955
25956static void
25957local_pop(struct parser_params *p)
25958{
25959 struct local_vars *local = p->lvtbl->prev;
25960 if (p->lvtbl->used) {
25961 warn_unused_var(p, p->lvtbl);
25962 }
25963
25964 local_free(p, p->lvtbl);
25965 p->lvtbl = local;
25966
25967 CMDARG_POP();
25968 COND_POP();
25969}
25970
25971static rb_ast_id_table_t *
25972local_tbl(struct parser_params *p)
25973{
25974 int cnt_args = vtable_size(p->lvtbl->args);
25975 int cnt_vars = vtable_size(p->lvtbl->vars);
25976 int cnt = cnt_args + cnt_vars;
25977 int i, j;
25978 rb_ast_id_table_t *tbl;
25979
25980 if (cnt <= 0) return 0;
25981 tbl = rb_ast_new_local_table(p->ast, cnt);
25982 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
25983 /* remove IDs duplicated to warn shadowing */
25984 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
25985 ID id = p->lvtbl->vars->tbl[i];
25986 if (!vtable_included(p->lvtbl->args, id)) {
25987 tbl->ids[j++] = id;
25988 }
25989 }
25990 if (j < cnt) {
25991 tbl = rb_ast_resize_latest_local_table(p->ast, j);
25992 }
25993
25994 return tbl;
25995}
25996
25997static void
25998numparam_name(struct parser_params *p, ID id)
25999{
26000 if (!NUMPARAM_ID_P(id)) return;
26001 compile_error(p, "_%d is reserved for numbered parameter",
26002 NUMPARAM_ID_TO_IDX(id));
26003}
26004
26005static void
26006arg_var(struct parser_params *p, ID id)
26007{
26008 numparam_name(p, id);
26009 vtable_add(p->lvtbl->args, id);
26010}
26011
26012static void
26013local_var(struct parser_params *p, ID id)
26014{
26015 numparam_name(p, id);
26016 vtable_add(p->lvtbl->vars, id);
26017 if (p->lvtbl->used) {
26018 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26019 }
26020}
26021
26022#ifndef RIPPER
26023int
26024rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26025{
26026 return rb_local_defined(id, iseq);
26027}
26028#endif
26029
26030static int
26031local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26032{
26033 struct vtable *vars, *args, *used;
26034
26035 vars = p->lvtbl->vars;
26036 args = p->lvtbl->args;
26037 used = p->lvtbl->used;
26038
26039 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26040 vars = vars->prev;
26041 args = args->prev;
26042 if (used) used = used->prev;
26043 }
26044
26045 if (vars && vars->prev == DVARS_INHERIT) {
26046 return rb_parser_local_defined(p, id, p->parent_iseq);
26047 }
26048 else if (vtable_included(args, id)) {
26049 return 1;
26050 }
26051 else {
26052 int i = vtable_included(vars, id);
26053 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26054 return i != 0;
26055 }
26056}
26057
26058static int
26059local_id(struct parser_params *p, ID id)
26060{
26061 return local_id_ref(p, id, NULL);
26062}
26063
26064static int
26065check_forwarding_args(struct parser_params *p)
26066{
26067 if (local_id(p, idFWD_ALL)) return TRUE;
26068 compile_error(p, "unexpected ...");
26069 return FALSE;
26070}
26071
26072static void
26073add_forwarding_args(struct parser_params *p)
26074{
26075 arg_var(p, idFWD_REST);
26076#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26077 arg_var(p, idFWD_KWREST);
26078#endif
26079 arg_var(p, idFWD_BLOCK);
26080 arg_var(p, idFWD_ALL);
26081}
26082
26083static void
26084forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26085{
26086 bool conflict = false;
26087
26088 struct vtable *vars, *args;
26089
26090 vars = p->lvtbl->vars;
26091 args = p->lvtbl->args;
26092
26093 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26094 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26095 vars = vars->prev;
26096 args = args->prev;
26097 }
26098
26099 bool found = false;
26100 if (vars && vars->prev == DVARS_INHERIT && !found) {
26101 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26102 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26103 }
26104 else {
26105 found = (vtable_included(args, arg) &&
26106 !(all && vtable_included(args, all)));
26107 }
26108
26109 if (!found) {
26110 compile_error(p, "no anonymous %s parameter", var);
26111 }
26112 else if (conflict) {
26113 compile_error(p, "anonymous %s parameter is also used within block", var);
26114 }
26115}
26116
26117static NODE *
26118new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26119{
26120 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26121#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26122 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26123#endif
26124 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26125 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26126 block->forwarding = TRUE;
26127#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26128 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26129#endif
26130 return arg_blk_pass(args, block);
26131}
26132
26133static NODE *
26134numparam_push(struct parser_params *p)
26135{
26136 struct local_vars *local = p->lvtbl;
26137 NODE *inner = local->numparam.inner;
26138 if (!local->numparam.outer) {
26139 local->numparam.outer = local->numparam.current;
26140 }
26141 local->numparam.inner = 0;
26142 local->numparam.current = 0;
26143 local->it = 0;
26144 return inner;
26145}
26146
26147static void
26148numparam_pop(struct parser_params *p, NODE *prev_inner)
26149{
26150 struct local_vars *local = p->lvtbl;
26151 if (prev_inner) {
26152 /* prefer first one */
26153 local->numparam.inner = prev_inner;
26154 }
26155 else if (local->numparam.current) {
26156 /* current and inner are exclusive */
26157 local->numparam.inner = local->numparam.current;
26158 }
26159 if (p->max_numparam > NO_PARAM) {
26160 /* current and outer are exclusive */
26161 local->numparam.current = local->numparam.outer;
26162 local->numparam.outer = 0;
26163 }
26164 else {
26165 /* no numbered parameter */
26166 local->numparam.current = 0;
26167 }
26168 local->it = 0;
26169}
26170
26171static const struct vtable *
26172dyna_push(struct parser_params *p)
26173{
26174 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26175 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26176 if (p->lvtbl->used) {
26177 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26178 }
26179 return p->lvtbl->args;
26180}
26181
26182static void
26183dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26184{
26185 struct vtable *tmp = *vtblp;
26186 *vtblp = tmp->prev;
26187# if WARN_PAST_SCOPE
26188 if (p->past_scope_enabled) {
26189 tmp->prev = p->lvtbl->past;
26190 p->lvtbl->past = tmp;
26191 return;
26192 }
26193# endif
26194 vtable_free(tmp);
26195}
26196
26197static void
26198dyna_pop_1(struct parser_params *p)
26199{
26200 struct vtable *tmp;
26201
26202 if ((tmp = p->lvtbl->used) != 0) {
26203 warn_unused_var(p, p->lvtbl);
26204 p->lvtbl->used = p->lvtbl->used->prev;
26205 vtable_free(tmp);
26206 }
26207 dyna_pop_vtable(p, &p->lvtbl->args);
26208 dyna_pop_vtable(p, &p->lvtbl->vars);
26209}
26210
26211static void
26212dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26213{
26214 while (p->lvtbl->args != lvargs) {
26215 dyna_pop_1(p);
26216 if (!p->lvtbl->args) {
26217 struct local_vars *local = p->lvtbl->prev;
26218 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26219 p->lvtbl = local;
26220 }
26221 }
26222 dyna_pop_1(p);
26223}
26224
26225static int
26226dyna_in_block(struct parser_params *p)
26227{
26228 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26229}
26230
26231#ifndef RIPPER
26232int
26233dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26234{
26235 struct vtable *vars, *args, *used;
26236 int i;
26237
26238 args = p->lvtbl->args;
26239 vars = p->lvtbl->vars;
26240 used = p->lvtbl->used;
26241
26242 while (!DVARS_TERMINAL_P(vars)) {
26243 if (vtable_included(args, id)) {
26244 return 1;
26245 }
26246 if ((i = vtable_included(vars, id)) != 0) {
26247 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26248 return 1;
26249 }
26250 args = args->prev;
26251 vars = vars->prev;
26252 if (!vidrefp) used = 0;
26253 if (used) used = used->prev;
26254 }
26255
26256 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26257 return rb_dvar_defined(id, p->parent_iseq);
26258 }
26259
26260 return 0;
26261}
26262#endif
26263
26264static int
26265dvar_defined(struct parser_params *p, ID id)
26266{
26267 return dvar_defined_ref(p, id, NULL);
26268}
26269
26270static int
26271dvar_curr(struct parser_params *p, ID id)
26272{
26273 return (vtable_included(p->lvtbl->args, id) ||
26274 vtable_included(p->lvtbl->vars, id));
26275}
26276
26277static void
26278reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26279{
26280 compile_error(p,
26281 "regexp encoding option '%c' differs from source encoding '%s'",
26282 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26283}
26284
26285#ifndef RIPPER
26286static rb_encoding *
26287find_enc(struct parser_params* p, const char *name)
26288{
26289 int idx = rb_enc_find_index(name);
26290 if (idx < 0) {
26291 rb_bug("unknown encoding name: %s", name);
26292 }
26293
26294 return rb_enc_from_index(idx);
26295}
26296
26297static rb_encoding *
26298kcode_to_enc(struct parser_params* p, int kcode)
26299{
26300 rb_encoding *enc;
26301
26302 switch (kcode) {
26303 case ENC_ASCII8BIT:
26304 enc = rb_ascii8bit_encoding();
26305 break;
26306 case ENC_EUC_JP:
26307 enc = find_enc(p, "EUC-JP");
26308 break;
26309 case ENC_Windows_31J:
26310 enc = find_enc(p, "Windows-31J");
26311 break;
26312 case ENC_UTF8:
26313 enc = rb_utf8_encoding();
26314 break;
26315 default:
26316 enc = NULL;
26317 break;
26318 }
26319
26320 return enc;
26321}
26322
26323int
26324rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26325{
26326 int c = RE_OPTION_ENCODING_IDX(options);
26327
26328 if (c) {
26329 int opt, idx;
26330 rb_encoding *enc;
26331
26332 char_to_option_kcode(c, &opt, &idx);
26333 enc = kcode_to_enc(p, idx);
26334 if (enc != rb_parser_str_get_encoding(str) &&
26335 !rb_parser_is_ascii_string(p, str)) {
26336 goto error;
26337 }
26338 rb_parser_string_set_encoding(str, enc);
26339 }
26340 else if (RE_OPTION_ENCODING_NONE(options)) {
26341 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26342 !rb_parser_is_ascii_string(p, str)) {
26343 c = 'n';
26344 goto error;
26345 }
26346 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26347 }
26348 else if (rb_is_usascii_enc(p->enc)) {
26349 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26350 }
26351 return 0;
26352
26353 error:
26354 return c;
26355}
26356#endif
26357
26358static void
26359reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26360{
26361 int c = rb_reg_fragment_setenc(p, str, options);
26362 if (c) reg_fragment_enc_error(p, str, c);
26363}
26364
26365#ifndef UNIVERSAL_PARSER
26366typedef struct {
26367 struct parser_params* parser;
26368 rb_encoding *enc;
26369 NODE *succ_block;
26370 const YYLTYPE *loc;
26371 rb_parser_assignable_func assignable;
26373
26374static int
26375reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26376 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26377{
26379 struct parser_params* p = arg->parser;
26380 rb_encoding *enc = arg->enc;
26381 long len = name_end - name;
26382 const char *s = (const char *)name;
26383
26384 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26385}
26386
26387static NODE *
26388reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26389{
26391
26392 arg.parser = p;
26393 arg.enc = rb_enc_get(regexp);
26394 arg.succ_block = 0;
26395 arg.loc = loc;
26396 arg.assignable = assignable;
26397 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26398
26399 if (!arg.succ_block) return 0;
26400 return RNODE_BLOCK(arg.succ_block)->nd_next;
26401}
26402#endif
26403
26404#ifndef RIPPER
26405NODE *
26406rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26407{
26408 return assignable(p, id, val, loc);
26409}
26410
26411int
26412rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26413 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26414{
26415 ID var;
26416 NODE *node, *succ;
26417
26418 if (!len) return ST_CONTINUE;
26419 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26420 return ST_CONTINUE;
26421
26422 var = intern_cstr(s, len, enc);
26423 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26424 if (!lvar_defined(p, var)) return ST_CONTINUE;
26425 }
26426 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26427 succ = *succ_block;
26428 if (!succ) succ = NEW_ERROR(loc);
26429 succ = block_append(p, succ, node);
26430 *succ_block = succ;
26431 return ST_CONTINUE;
26432}
26433#endif
26434
26435static VALUE
26436parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26437{
26438 VALUE str2;
26439 reg_fragment_setenc(p, str, options);
26440 str2 = rb_str_new_parser_string(str);
26441 return rb_parser_reg_compile(p, str2, options);
26442}
26443
26444#ifndef RIPPER
26445VALUE
26446rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26447{
26448 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26449}
26450#endif
26451
26452static VALUE
26453reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26454{
26455 VALUE re;
26456 VALUE err;
26457
26458 err = rb_errinfo();
26459 re = parser_reg_compile(p, str, options);
26460 if (NIL_P(re)) {
26461 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26462 rb_set_errinfo(err);
26463 compile_error(p, "%"PRIsVALUE, m);
26464 return Qnil;
26465 }
26466 return re;
26467}
26468
26469#ifndef RIPPER
26470void
26471rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26472{
26473 p->do_print = print;
26474 p->do_loop = loop;
26475 p->do_chomp = chomp;
26476 p->do_split = split;
26477}
26478
26479static NODE *
26480parser_append_options(struct parser_params *p, NODE *node)
26481{
26482 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26483 const YYLTYPE *const LOC = &default_location;
26484
26485 if (p->do_print) {
26486 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26487 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26488 LOC);
26489 node = block_append(p, node, print);
26490 }
26491
26492 if (p->do_loop) {
26493 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26494
26495 if (p->do_split) {
26496 ID ifs = rb_intern("$;");
26497 ID fields = rb_intern("$F");
26498 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26499 NODE *split = NEW_GASGN(fields,
26500 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26501 rb_intern("split"), args, LOC),
26502 LOC);
26503 node = block_append(p, split, node);
26504 }
26505 if (p->do_chomp) {
26506 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26507 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26508 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26509 }
26510
26511 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26512 }
26513
26514 return node;
26515}
26516
26517void
26518rb_init_parse(void)
26519{
26520 /* just to suppress unused-function warnings */
26521 (void)nodetype;
26522 (void)nodeline;
26523}
26524
26525ID
26526internal_id(struct parser_params *p)
26527{
26528 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26529}
26530#endif /* !RIPPER */
26531
26532static void
26533parser_initialize(struct parser_params *p)
26534{
26535 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26536 p->command_start = TRUE;
26537 p->ruby_sourcefile_string = Qnil;
26538 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26539 string_buffer_init(p);
26540 p->node_id = 0;
26541 p->delayed.token = NULL;
26542 p->frozen_string_literal = -1; /* not specified */
26543#ifndef RIPPER
26544 p->error_buffer = Qfalse;
26545 p->end_expect_token_locations = NULL;
26546 p->token_id = 0;
26547 p->tokens = NULL;
26548#else
26549 p->result = Qnil;
26550 p->parsing_thread = Qnil;
26551 p->s_value = Qnil;
26552 p->s_lvalue = Qnil;
26553 p->s_value_stack = rb_ary_new();
26554#endif
26555 p->debug_buffer = Qnil;
26556 p->debug_output = rb_ractor_stdout();
26557 p->enc = rb_utf8_encoding();
26558 p->exits = 0;
26559}
26560
26561#ifdef RIPPER
26562#define rb_ruby_parser_mark ripper_parser_mark
26563#define rb_ruby_parser_free ripper_parser_free
26564#define rb_ruby_parser_memsize ripper_parser_memsize
26565#endif
26566
26567void
26568rb_ruby_parser_mark(void *ptr)
26569{
26570 struct parser_params *p = (struct parser_params*)ptr;
26571
26572 rb_gc_mark(p->ruby_sourcefile_string);
26573#ifndef RIPPER
26574 rb_gc_mark(p->error_buffer);
26575#else
26576 rb_gc_mark(p->value);
26577 rb_gc_mark(p->result);
26578 rb_gc_mark(p->parsing_thread);
26579 rb_gc_mark(p->s_value);
26580 rb_gc_mark(p->s_lvalue);
26581 rb_gc_mark(p->s_value_stack);
26582#endif
26583 rb_gc_mark(p->debug_buffer);
26584 rb_gc_mark(p->debug_output);
26585}
26586
26587void
26588rb_ruby_parser_free(void *ptr)
26589{
26590 struct parser_params *p = (struct parser_params*)ptr;
26591 struct local_vars *local, *prev;
26592
26593 if (p->ast) {
26594 rb_ast_free(p->ast);
26595 }
26596
26597 if (p->warn_duplicate_keys_table) {
26598 st_free_table(p->warn_duplicate_keys_table);
26599 }
26600
26601#ifndef RIPPER
26602 if (p->tokens) {
26603 rb_parser_ary_free(p, p->tokens);
26604 }
26605#endif
26606
26607 if (p->tokenbuf) {
26608 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26609 }
26610
26611 for (local = p->lvtbl; local; local = prev) {
26612 prev = local->prev;
26613 local_free(p, local);
26614 }
26615
26616 {
26617 token_info *ptinfo;
26618 while ((ptinfo = p->token_info) != 0) {
26619 p->token_info = ptinfo->next;
26620 xfree(ptinfo);
26621 }
26622 }
26623 string_buffer_free(p);
26624
26625 if (p->pvtbl) {
26626 st_free_table(p->pvtbl);
26627 }
26628
26629 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26630 st_free_table(p->case_labels);
26631 }
26632
26633 xfree(p->lex.strterm);
26634 p->lex.strterm = 0;
26635
26636 xfree(ptr);
26637}
26638
26639size_t
26640rb_ruby_parser_memsize(const void *ptr)
26641{
26642 struct parser_params *p = (struct parser_params*)ptr;
26643 struct local_vars *local;
26644 size_t size = sizeof(*p);
26645
26646 size += p->toksiz;
26647 for (local = p->lvtbl; local; local = local->prev) {
26648 size += sizeof(*local);
26649 if (local->vars) size += local->vars->capa * sizeof(ID);
26650 }
26651 return size;
26652}
26653
26654#ifndef RIPPER
26655#undef rb_reserved_word
26656
26657const struct kwtable *
26658rb_reserved_word(const char *str, unsigned int len)
26659{
26660 return reserved_word(str, len);
26661}
26662
26663#ifdef UNIVERSAL_PARSER
26665rb_ruby_parser_allocate(const rb_parser_config_t *config)
26666{
26667 /* parser_initialize expects fields to be set to 0 */
26668 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26669 p->config = config;
26670 return p;
26671}
26672
26674rb_ruby_parser_new(const rb_parser_config_t *config)
26675{
26676 /* parser_initialize expects fields to be set to 0 */
26677 rb_parser_t *p = rb_ruby_parser_allocate(config);
26678 parser_initialize(p);
26679 return p;
26680}
26681#else
26683rb_ruby_parser_allocate(void)
26684{
26685 /* parser_initialize expects fields to be set to 0 */
26686 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
26687 return p;
26688}
26689
26691rb_ruby_parser_new(void)
26692{
26693 /* parser_initialize expects fields to be set to 0 */
26694 rb_parser_t *p = rb_ruby_parser_allocate();
26695 parser_initialize(p);
26696 return p;
26697}
26698#endif
26699
26701rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
26702{
26703 p->error_buffer = main ? Qfalse : Qnil;
26704 p->parent_iseq = base;
26705 return p;
26706}
26707
26708void
26709rb_ruby_parser_set_script_lines(rb_parser_t *p)
26710{
26711 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
26712}
26713
26714void
26715rb_ruby_parser_error_tolerant(rb_parser_t *p)
26716{
26717 p->error_tolerant = 1;
26718}
26719
26720void
26721rb_ruby_parser_keep_tokens(rb_parser_t *p)
26722{
26723 p->keep_tokens = 1;
26724 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
26725}
26726
26728rb_ruby_parser_encoding(rb_parser_t *p)
26729{
26730 return p->enc;
26731}
26732
26733int
26734rb_ruby_parser_end_seen_p(rb_parser_t *p)
26735{
26736 return p->ruby__end__seen;
26737}
26738
26739int
26740rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
26741{
26742 p->debug = flag;
26743 return flag;
26744}
26745#endif /* !RIPPER */
26746
26747#ifdef RIPPER
26748int
26749rb_ruby_parser_get_yydebug(rb_parser_t *p)
26750{
26751 return p->debug;
26752}
26753
26754void
26755rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
26756{
26757 p->value = value;
26758}
26759
26760int
26761rb_ruby_parser_error_p(rb_parser_t *p)
26762{
26763 return p->error_p;
26764}
26765
26766VALUE
26767rb_ruby_parser_debug_output(rb_parser_t *p)
26768{
26769 return p->debug_output;
26770}
26771
26772void
26773rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
26774{
26775 p->debug_output = output;
26776}
26777
26778VALUE
26779rb_ruby_parser_parsing_thread(rb_parser_t *p)
26780{
26781 return p->parsing_thread;
26782}
26783
26784void
26785rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
26786{
26787 p->parsing_thread = parsing_thread;
26788}
26789
26790void
26791rb_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)
26792{
26793 p->lex.gets = gets;
26794 p->lex.input = input;
26795 p->eofp = 0;
26796 p->ruby_sourcefile_string = sourcefile_string;
26797 p->ruby_sourcefile = sourcefile;
26798 p->ruby_sourceline = sourceline;
26799}
26800
26801VALUE
26802rb_ruby_parser_result(rb_parser_t *p)
26803{
26804 return p->result;
26805}
26806
26808rb_ruby_parser_enc(rb_parser_t *p)
26809{
26810 return p->enc;
26811}
26812
26813VALUE
26814rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
26815{
26816 return p->ruby_sourcefile_string;
26817}
26818
26819int
26820rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
26821{
26822 return p->ruby_sourceline;
26823}
26824
26825int
26826rb_ruby_parser_lex_state(rb_parser_t *p)
26827{
26828 return p->lex.state;
26829}
26830
26831void
26832rb_ruby_ripper_parse0(rb_parser_t *p)
26833{
26834 parser_prepare(p);
26835 p->ast = rb_ast_new();
26836 ripper_yyparse((void*)p);
26837 rb_ast_free(p->ast);
26838 p->ast = 0;
26839 p->eval_tree = 0;
26840 p->eval_tree_begin = 0;
26841}
26842
26843int
26844rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
26845{
26846 return dedent_string(p, string, width);
26847}
26848
26849int
26850rb_ruby_ripper_initialized_p(rb_parser_t *p)
26851{
26852 return p->lex.input != 0;
26853}
26854
26855void
26856rb_ruby_ripper_parser_initialize(rb_parser_t *p)
26857{
26858 parser_initialize(p);
26859}
26860
26861long
26862rb_ruby_ripper_column(rb_parser_t *p)
26863{
26864 return p->lex.ptok - p->lex.pbeg;
26865}
26866
26867long
26868rb_ruby_ripper_token_len(rb_parser_t *p)
26869{
26870 return p->lex.pcur - p->lex.ptok;
26871}
26872
26874rb_ruby_ripper_lex_lastline(rb_parser_t *p)
26875{
26876 return p->lex.lastline;
26877}
26878
26879VALUE
26880rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
26881{
26882 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
26883}
26884
26885#ifdef UNIVERSAL_PARSER
26887rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
26888{
26889 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26890 p->config = config;
26891 return p;
26892}
26893#endif
26894
26895struct parser_params*
26896rb_ruby_ripper_parser_allocate(void)
26897{
26898 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
26899}
26900#endif /* RIPPER */
26901
26902#ifndef RIPPER
26903void
26904rb_parser_printf(struct parser_params *p, const char *fmt, ...)
26905{
26906 va_list ap;
26907 VALUE mesg = p->debug_buffer;
26908
26909 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
26910 va_start(ap, fmt);
26911 rb_str_vcatf(mesg, fmt, ap);
26912 va_end(ap);
26913 if (char_at_end(p, mesg, 0) == '\n') {
26914 rb_io_write(p->debug_output, mesg);
26915 p->debug_buffer = Qnil;
26916 }
26917}
26918
26919static void
26920parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
26921{
26922 va_list ap;
26923 int lineno, column;
26924
26925 if (loc) {
26926 lineno = loc->end_pos.lineno;
26927 column = loc->end_pos.column;
26928 }
26929 else {
26930 lineno = p->ruby_sourceline;
26931 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
26932 }
26933
26934 rb_io_flush(p->debug_output);
26935 p->error_p = 1;
26936 va_start(ap, fmt);
26937 p->error_buffer =
26938 rb_syntax_error_append(p->error_buffer,
26939 p->ruby_sourcefile_string,
26940 lineno, column,
26941 p->enc, fmt, ap);
26942 va_end(ap);
26943}
26944
26945static size_t
26946count_char(const char *str, int c)
26947{
26948 int n = 0;
26949 while (str[n] == c) ++n;
26950 return n;
26951}
26952
26953/*
26954 * strip enclosing double-quotes, same as the default yytnamerr except
26955 * for that single-quotes matching back-quotes do not stop stripping.
26956 *
26957 * "\"`class' keyword\"" => "`class' keyword"
26958 */
26959size_t
26960rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
26961{
26962 if (*yystr == '"') {
26963 size_t yyn = 0, bquote = 0;
26964 const char *yyp = yystr;
26965
26966 while (*++yyp) {
26967 switch (*yyp) {
26968 case '\'':
26969 if (!bquote) {
26970 bquote = count_char(yyp+1, '\'') + 1;
26971 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
26972 yyn += bquote;
26973 yyp += bquote - 1;
26974 break;
26975 }
26976 else {
26977 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
26978 if (yyres) memcpy(yyres + yyn, yyp, bquote);
26979 yyn += bquote;
26980 yyp += bquote - 1;
26981 bquote = 0;
26982 break;
26983 }
26984 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
26985 if (yyres) memcpy(yyres + yyn, yyp, 3);
26986 yyn += 3;
26987 yyp += 2;
26988 break;
26989 }
26990 goto do_not_strip_quotes;
26991 }
26992
26993 case ',':
26994 goto do_not_strip_quotes;
26995
26996 case '\\':
26997 if (*++yyp != '\\')
26998 goto do_not_strip_quotes;
26999 /* Fall through. */
27000 default:
27001 if (yyres)
27002 yyres[yyn] = *yyp;
27003 yyn++;
27004 break;
27005
27006 case '"':
27007 case '\0':
27008 if (yyres)
27009 yyres[yyn] = '\0';
27010 return yyn;
27011 }
27012 }
27013 do_not_strip_quotes: ;
27014 }
27015
27016 if (!yyres) return strlen(yystr);
27017
27018 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27019}
27020#endif
27021
27022#ifdef RIPPER
27023#define validate(x) (void)(x)
27024
27025static VALUE
27026ripper_dispatch0(struct parser_params *p, ID mid)
27027{
27028 return rb_funcall(p->value, mid, 0);
27029}
27030
27031static VALUE
27032ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27033{
27034 validate(a);
27035 return rb_funcall(p->value, mid, 1, a);
27036}
27037
27038static VALUE
27039ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27040{
27041 validate(a);
27042 validate(b);
27043 return rb_funcall(p->value, mid, 2, a, b);
27044}
27045
27046static VALUE
27047ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27048{
27049 validate(a);
27050 validate(b);
27051 validate(c);
27052 return rb_funcall(p->value, mid, 3, a, b, c);
27053}
27054
27055static VALUE
27056ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27057{
27058 validate(a);
27059 validate(b);
27060 validate(c);
27061 validate(d);
27062 return rb_funcall(p->value, mid, 4, a, b, c, d);
27063}
27064
27065static VALUE
27066ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27067{
27068 validate(a);
27069 validate(b);
27070 validate(c);
27071 validate(d);
27072 validate(e);
27073 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27074}
27075
27076static VALUE
27077ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27078{
27079 validate(a);
27080 validate(b);
27081 validate(c);
27082 validate(d);
27083 validate(e);
27084 validate(f);
27085 validate(g);
27086 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27087}
27088
27089void
27090ripper_error(struct parser_params *p)
27091{
27092 p->error_p = TRUE;
27093}
27094
27095VALUE
27096ripper_value(struct parser_params *p)
27097{
27098 (void)yystpcpy; /* may not used in newer bison */
27099
27100 return p->value;
27101}
27102
27103#endif /* RIPPER */
27104/*
27105 * Local variables:
27106 * mode: c
27107 * c-file-style: "ruby"
27108 * End:
27109 */
#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:675
#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:2138
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:785
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:3445
#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.